image-pii-redactor 0.6.1 → 0.6.2

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.
@@ -262,9 +262,9 @@ wt.elementStyles = [], wt.shadowRootOptions = { mode: "open" }, wt[Gt("elementPr
262
262
  * Copyright 2017 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
264
  */
265
- const Dr = globalThis, oo = (e) => e, $n = Dr.trustedTypes, io = $n ? $n.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Pa = "$lit$", Ke = `lit$${Math.random().toFixed(9).slice(2)}$`, ka = "?" + Ke, Ss = `<${ka}>`, st = document, Bt = () => st.createComment(""), Vt = (e) => e === null || typeof e != "object" && typeof e != "function", Or = Array.isArray, Gs = (e) => Or(e) || typeof e?.[Symbol.iterator] == "function", Fn = `[
265
+ const Dr = globalThis, oo = (e) => e, $n = Dr.trustedTypes, io = $n ? $n.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Pa = "$lit$", Ke = `lit$${Math.random().toFixed(9).slice(2)}$`, ka = "?" + Ke, Ss = `<${ka}>`, st = document, Mt = () => st.createComment(""), Vt = (e) => e === null || typeof e != "object" && typeof e != "function", Or = Array.isArray, Gs = (e) => Or(e) || typeof e?.[Symbol.iterator] == "function", Fn = `[
266
266
  \f\r]`, Et = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ao = /-->/g, so = />/g, Qe = RegExp(`>|${Fn}(?:([^\\s"'>=/]+)(${Fn}*=${Fn}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), uo = /'/g, co = /"/g, Aa = /^(?:script|style|textarea|title)$/i, xa = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), ue = xa(1), Nn = xa(2), Ct = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), lo = /* @__PURE__ */ new WeakMap(), rt = st.createTreeWalker(st, 129);
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), uo = /'/g, co = /"/g, Aa = /^(?:script|style|textarea|title)$/i, xa = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), Ce = xa(1), Nn = xa(2), Ct = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), lo = /* @__PURE__ */ new WeakMap(), rt = st.createTreeWalker(st, 129);
268
268
  function Ca(e, t) {
269
269
  if (!Or(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
270
  return io !== void 0 ? io.createHTML(t) : t;
@@ -294,15 +294,15 @@ class Lt {
294
294
  for (; (o = rt.nextNode()) !== null && u.length < s; ) {
295
295
  if (o.nodeType === 1) {
296
296
  if (o.hasAttributes()) for (const h of o.getAttributeNames()) if (h.endsWith(Pa)) {
297
- const d = l[a++], m = o.getAttribute(h).split(Ke), $ = /([.?@])?(.*)/.exec(d);
298
- u.push({ type: 1, index: i, name: $[2], strings: m, ctor: $[1] === "." ? Ms : $[1] === "?" ? Bs : $[1] === "@" ? Vs : Dn }), o.removeAttribute(h);
297
+ const d = l[a++], m = o.getAttribute(h).split(Ke), C = /([.?@])?(.*)/.exec(d);
298
+ u.push({ type: 1, index: i, name: C[2], strings: m, ctor: C[1] === "." ? Bs : C[1] === "?" ? Ms : C[1] === "@" ? Vs : Dn }), o.removeAttribute(h);
299
299
  } else h.startsWith(Ke) && (u.push({ type: 6, index: i }), o.removeAttribute(h));
300
300
  if (Aa.test(o.tagName)) {
301
301
  const h = o.textContent.split(Ke), d = h.length - 1;
302
302
  if (d > 0) {
303
303
  o.textContent = $n ? $n.emptyScript : "";
304
- for (let m = 0; m < d; m++) o.append(h[m], Bt()), rt.nextNode(), u.push({ type: 2, index: ++i });
305
- o.append(h[d], Bt());
304
+ for (let m = 0; m < d; m++) o.append(h[m], Mt()), rt.nextNode(), u.push({ type: 2, index: ++i });
305
+ o.append(h[d], Mt());
306
306
  }
307
307
  }
308
308
  } else if (o.nodeType === 8) if (o.data === ka) u.push({ type: 2, index: i });
@@ -357,7 +357,7 @@ let Hr = class $a {
357
357
  return this._$AM?._$AU ?? this._$Cv;
358
358
  }
359
359
  constructor(t, n, r, o) {
360
- this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = o, this._$Cv = o?.isConnected ?? !0;
360
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = o, this._$Cv = o?.isConnected ?? !0;
361
361
  }
362
362
  get parentNode() {
363
363
  let t = this._$AA.parentNode;
@@ -371,7 +371,7 @@ let Hr = class $a {
371
371
  return this._$AB;
372
372
  }
373
373
  _$AI(t, n = this) {
374
- t = $t(this, t, n), Vt(t) ? t === T || t == null || t === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== Ct && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Gs(t) ? this.k(t) : this._(t);
374
+ t = $t(this, t, n), Vt(t) ? t === E || t == null || t === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== Ct && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Gs(t) ? this.k(t) : this._(t);
375
375
  }
376
376
  O(t) {
377
377
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -380,7 +380,7 @@ let Hr = class $a {
380
380
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
381
381
  }
382
382
  _(t) {
383
- this._$AH !== T && Vt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(st.createTextNode(t)), this._$AH = t;
383
+ this._$AH !== E && Vt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(st.createTextNode(t)), this._$AH = t;
384
384
  }
385
385
  $(t) {
386
386
  const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Lt.createElement(Ca(r.h, r.h[0]), this.options)), r);
@@ -398,7 +398,7 @@ let Hr = class $a {
398
398
  Or(this._$AH) || (this._$AH = [], this._$AR());
399
399
  const n = this._$AH;
400
400
  let r, o = 0;
401
- for (const i of t) o === n.length ? n.push(r = new $a(this.O(Bt()), this.O(Bt()), this, this.options)) : r = n[o], r._$AI(i), o++;
401
+ for (const i of t) o === n.length ? n.push(r = new $a(this.O(Mt()), this.O(Mt()), this, this.options)) : r = n[o], r._$AI(i), o++;
402
402
  o < n.length && (this._$AR(r && r._$AB.nextSibling, o), n.length = o);
403
403
  }
404
404
  _$AR(t = this._$AA.nextSibling, n) {
@@ -419,7 +419,7 @@ class Dn {
419
419
  return this._$AM._$AU;
420
420
  }
421
421
  constructor(t, n, r, o, i) {
422
- this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t, this.name = n, this._$AM = o, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = T;
422
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = n, this._$AM = o, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = E;
423
423
  }
424
424
  _$AI(t, n = this, r, o) {
425
425
  const i = this.strings;
@@ -428,28 +428,28 @@ class Dn {
428
428
  else {
429
429
  const s = t;
430
430
  let u, c;
431
- for (t = i[0], u = 0; u < i.length - 1; u++) c = $t(this, s[r + u], n, u), c === Ct && (c = this._$AH[u]), a ||= !Vt(c) || c !== this._$AH[u], c === T ? t = T : t !== T && (t += (c ?? "") + i[u + 1]), this._$AH[u] = c;
431
+ for (t = i[0], u = 0; u < i.length - 1; u++) c = $t(this, s[r + u], n, u), c === Ct && (c = this._$AH[u]), a ||= !Vt(c) || c !== this._$AH[u], c === E ? t = E : t !== E && (t += (c ?? "") + i[u + 1]), this._$AH[u] = c;
432
432
  }
433
433
  a && !o && this.j(t);
434
434
  }
435
435
  j(t) {
436
- t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
436
+ t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
437
437
  }
438
438
  }
439
- class Ms extends Dn {
439
+ class Bs extends Dn {
440
440
  constructor() {
441
441
  super(...arguments), this.type = 3;
442
442
  }
443
443
  j(t) {
444
- this.element[this.name] = t === T ? void 0 : t;
444
+ this.element[this.name] = t === E ? void 0 : t;
445
445
  }
446
446
  }
447
- class Bs extends Dn {
447
+ class Ms extends Dn {
448
448
  constructor() {
449
449
  super(...arguments), this.type = 4;
450
450
  }
451
451
  j(t) {
452
- this.element.toggleAttribute(this.name, !!t && t !== T);
452
+ this.element.toggleAttribute(this.name, !!t && t !== E);
453
453
  }
454
454
  }
455
455
  class Vs extends Dn {
@@ -457,8 +457,8 @@ class Vs extends Dn {
457
457
  super(t, n, r, o, i), this.type = 5;
458
458
  }
459
459
  _$AI(t, n = this) {
460
- if ((t = $t(this, t, n, 0) ?? T) === Ct) return;
461
- const r = this._$AH, o = t === T && r !== T || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, i = t !== T && (r === T || o);
460
+ if ((t = $t(this, t, n, 0) ?? E) === Ct) return;
461
+ const r = this._$AH, o = t === E && r !== E || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, i = t !== E && (r === E || o);
462
462
  o && this.element.removeEventListener(this.name, this, r), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
463
463
  }
464
464
  handleEvent(t) {
@@ -483,7 +483,7 @@ const Ks = (e, t, n) => {
483
483
  let o = r._$litPart$;
484
484
  if (o === void 0) {
485
485
  const i = n?.renderBefore ?? null;
486
- r._$litPart$ = o = new Hr(t.insertBefore(Bt(), i), i, void 0, n ?? {});
486
+ r._$litPart$ = o = new Hr(t.insertBefore(Mt(), i), i, void 0, n ?? {});
487
487
  }
488
488
  return o._$AI(e), o;
489
489
  };
@@ -524,7 +524,7 @@ _s?.({ LitElement: Ft });
524
524
  * Copyright 2017 Google LLC
525
525
  * SPDX-License-Identifier: BSD-3-Clause
526
526
  */
527
- const Rs = (e) => (t, n) => {
527
+ const Js = (e) => (t, n) => {
528
528
  n !== void 0 ? n.addInitializer(() => {
529
529
  customElements.define(e, t);
530
530
  }) : customElements.define(e, t);
@@ -534,7 +534,7 @@ const Rs = (e) => (t, n) => {
534
534
  * Copyright 2017 Google LLC
535
535
  * SPDX-License-Identifier: BSD-3-Clause
536
536
  */
537
- const Js = { attribute: !0, type: String, converter: Cn, reflect: !1, hasChanged: Er }, Us = (e = Js, t, n) => {
537
+ const Rs = { attribute: !0, type: String, converter: Cn, reflect: !1, hasChanged: Er }, Us = (e = Rs, t, n) => {
538
538
  const { kind: r, metadata: o } = n;
539
539
  let i = globalThis.litPropertyMetadata.get(o);
540
540
  if (i === void 0 && globalThis.litPropertyMetadata.set(o, i = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), i.set(n.name, e), r === "accessor") {
@@ -566,7 +566,7 @@ function qe(e) {
566
566
  * Copyright 2017 Google LLC
567
567
  * SPDX-License-Identifier: BSD-3-Clause
568
568
  */
569
- function R(e) {
569
+ function Z(e) {
570
570
  return qe({ ...e, state: !0, attribute: !1 });
571
571
  }
572
572
  /**
@@ -1028,17 +1028,6 @@ const Zs = Cs`
1028
1028
  background: var(--accent-hover);
1029
1029
  }
1030
1030
 
1031
- .done-network {
1032
- margin-top: 20px;
1033
- font-size: 13px;
1034
- color: var(--text-secondary);
1035
- }
1036
-
1037
- .done-network-zero {
1038
- color: var(--success);
1039
- font-weight: 500;
1040
- }
1041
-
1042
1031
  /* --- Responsive --- */
1043
1032
  @container (min-width: 640px) {
1044
1033
  .editor {
@@ -1152,31 +1141,31 @@ function zn(e) {
1152
1141
  return Math.max(0, Math.min(255, Math.round(e)));
1153
1142
  }
1154
1143
  async function au(e, t = "eng", n) {
1155
- const o = await (await import("./index-NN5oQYVf.js").then((E) => E.i)).createWorker(t, void 0, {
1156
- logger: (E) => {
1144
+ const o = await (await import("./index-NN5oQYVf.js").then((T) => T.i)).createWorker(t, void 0, {
1145
+ logger: (T) => {
1157
1146
  n?.({
1158
1147
  phase: "ocr",
1159
- progress: E.progress,
1160
- message: E.status
1148
+ progress: T.progress,
1149
+ message: T.status
1161
1150
  });
1162
1151
  }
1163
1152
  });
1164
1153
  let i, a = 0, s = 0;
1165
1154
  if (e instanceof ImageBitmap) {
1166
1155
  a = e.width, s = e.height;
1167
- const E = new OffscreenCanvas(e.width, e.height);
1168
- E.getContext("2d").drawImage(e, 0, 0), i = await E.convertToBlob({ type: "image/png" });
1156
+ const T = new OffscreenCanvas(e.width, e.height);
1157
+ T.getContext("2d").drawImage(e, 0, 0), i = await T.convertToBlob({ type: "image/png" });
1169
1158
  } else if (e instanceof Blob) {
1170
1159
  try {
1171
- const E = await createImageBitmap(e);
1172
- a = E.width, s = E.height, E.close();
1160
+ const T = await createImageBitmap(e);
1161
+ a = T.width, s = T.height, T.close();
1173
1162
  } catch {
1174
1163
  }
1175
1164
  i = e;
1176
1165
  } else {
1177
1166
  a = e.naturalWidth, s = e.naturalHeight;
1178
- const E = new OffscreenCanvas(e.naturalWidth, e.naturalHeight);
1179
- E.getContext("2d").drawImage(e, 0, 0), i = await E.convertToBlob({ type: "image/png" });
1167
+ const T = new OffscreenCanvas(e.naturalWidth, e.naturalHeight);
1168
+ T.getContext("2d").drawImage(e, 0, 0), i = await T.convertToBlob({ type: "image/png" });
1180
1169
  }
1181
1170
  const u = await iu(i);
1182
1171
  let c;
@@ -1188,29 +1177,29 @@ async function au(e, t = "eng", n) {
1188
1177
  const l = [];
1189
1178
  let h = "", d = 0;
1190
1179
  const m = c.data.lines ?? [];
1191
- for (let E = 0; E < m.length; E++) {
1192
- const ht = m[E].words ?? [];
1180
+ for (let T = 0; T < m.length; T++) {
1181
+ const ht = m[T].words ?? [];
1193
1182
  for (let dt = 0; dt < ht.length; dt++) {
1194
- const Ce = ht[dt], It = Ce.text, Xt = d, Gn = d + It.length;
1183
+ const xe = ht[dt], It = xe.text, Xt = d, Gn = d + It.length;
1195
1184
  l.push({
1196
1185
  text: It,
1197
1186
  bbox: {
1198
- x0: Ce.bbox.x0,
1199
- y0: Ce.bbox.y0,
1200
- x1: Ce.bbox.x1,
1201
- y1: Ce.bbox.y1
1187
+ x0: xe.bbox.x0,
1188
+ y0: xe.bbox.y0,
1189
+ x1: xe.bbox.x1,
1190
+ y1: xe.bbox.y1
1202
1191
  },
1203
- confidence: Ce.confidence,
1192
+ confidence: xe.confidence,
1204
1193
  charStart: Xt,
1205
1194
  charEnd: Gn,
1206
- lineIndex: E
1195
+ lineIndex: T
1207
1196
  }), h += It, d += It.length, dt < ht.length - 1 && (h += " ", d += 1);
1208
1197
  }
1209
- E < m.length - 1 && (h += `
1198
+ T < m.length - 1 && (h += `
1210
1199
  `, d += 1);
1211
1200
  }
1212
- const $ = c.data, ee = $.imageWidth ?? a, xe = $.imageHeight ?? s;
1213
- return { fullText: h, words: l, imageWidth: ee, imageHeight: xe };
1201
+ const C = c.data, ee = C.imageWidth ?? a, Ae = C.imageHeight ?? s;
1202
+ return { fullText: h, words: l, imageWidth: ee, imageHeight: Ae };
1214
1203
  }
1215
1204
  function su(e, t, n) {
1216
1205
  return e.filter((r) => r.charStart < n && r.charEnd > t);
@@ -1410,7 +1399,7 @@ const mu = {
1410
1399
  }, Nu = function(e = 1) {
1411
1400
  let t = this.fullPointer, n = Math.floor(Math.random() * t.length);
1412
1401
  return n + e > this.length && (n = this.length - e, n = n < 0 ? 0 : n), t = t.slice(n, n + e), this.update(t);
1413
- }, ju = { forEach: ku, map: Au, filter: xu, find: Cu, some: $u, random: Nu }, ye = {
1402
+ }, ju = { forEach: ku, map: Au, filter: xu, find: Cu, some: $u, random: Nu }, be = {
1414
1403
  /** */
1415
1404
  termList: function() {
1416
1405
  return this.methods.one.termList(this.docs);
@@ -1495,14 +1484,14 @@ const mu = {
1495
1484
  return typeof e == "number" ? this.eq(e) : typeof e == "string" ? this.if(e) : this;
1496
1485
  }
1497
1486
  };
1498
- ye.group = ye.groups;
1499
- ye.fullSentence = ye.fullSentences;
1500
- ye.sentence = ye.fullSentences;
1501
- ye.lastTerm = ye.lastTerms;
1502
- ye.firstTerm = ye.firstTerms;
1503
- const sr = Object.assign({}, ye, Pu, ju);
1487
+ be.group = be.groups;
1488
+ be.fullSentence = be.fullSentences;
1489
+ be.sentence = be.fullSentences;
1490
+ be.lastTerm = be.lastTerms;
1491
+ be.firstTerm = be.firstTerms;
1492
+ const sr = Object.assign({}, be, Pu, ju);
1504
1493
  sr.get = sr.eq;
1505
- class Je {
1494
+ class Re {
1506
1495
  constructor(t, n, r = {}) {
1507
1496
  [
1508
1497
  ["document", t],
@@ -1555,7 +1544,7 @@ class Je {
1555
1544
  }
1556
1545
  // create a new View, from this one
1557
1546
  update(t) {
1558
- const n = new Je(this.document, t);
1547
+ const n = new Re(this.document, t);
1559
1548
  if (this._cache && t && t.length > 0) {
1560
1549
  const r = [];
1561
1550
  t.forEach((o, i) => {
@@ -1567,10 +1556,10 @@ class Je {
1567
1556
  }
1568
1557
  // create a new View, from this one
1569
1558
  toView(t) {
1570
- return new Je(this.document, t || this.pointer);
1559
+ return new Re(this.document, t || this.pointer);
1571
1560
  }
1572
1561
  fromText(t) {
1573
- const { methods: n } = this, r = n.one.tokenize.fromString(t, this.world), o = new Je(r);
1562
+ const { methods: n } = this, r = n.one.tokenize.fromString(t, this.world), o = new Re(r);
1574
1563
  return o.world = this.world, o.compute(["normal", "freeze", "lexicon"]), this.world.compute.preTagger && o.compute("preTagger"), o.compute("unfreeze"), o;
1575
1564
  }
1576
1565
  clone() {
@@ -1580,7 +1569,7 @@ class Je {
1580
1569
  return n.document = t, n._cache = this._cache, n;
1581
1570
  }
1582
1571
  }
1583
- Object.assign(Je.prototype, sr);
1572
+ Object.assign(Re.prototype, sr);
1584
1573
  const Tu = "14.15.0", mo = function(e) {
1585
1574
  return e && typeof e == "object" && !Array.isArray(e);
1586
1575
  }, Iu = function(e) {
@@ -1646,7 +1635,7 @@ const Du = function(e, t) {
1646
1635
  return o;
1647
1636
  }, jn = Object.assign({}, ar), v = function(e, t) {
1648
1637
  t && v.addWords(t);
1649
- const n = Ta(e, Je, jn);
1638
+ const n = Ta(e, Re, jn);
1650
1639
  return e && n.compute(jn.hooks), n;
1651
1640
  };
1652
1641
  Object.defineProperty(v, "_world", {
@@ -1656,11 +1645,11 @@ Object.defineProperty(v, "_world", {
1656
1645
  v.tokenize = function(e, t) {
1657
1646
  const { compute: n } = this._world;
1658
1647
  t && v.addWords(t);
1659
- const r = Ta(e, Je, jn);
1648
+ const r = Ta(e, Re, jn);
1660
1649
  return n.contractions && r.compute(["alias", "normal", "machine", "contractions"]), r;
1661
1650
  };
1662
1651
  v.plugin = function(e) {
1663
- return ja(e, this._world, Je, this), this;
1652
+ return ja(e, this._world, Re, this), this;
1664
1653
  };
1665
1654
  v.extend = v.plugin;
1666
1655
  v.world = function() {
@@ -1691,7 +1680,7 @@ const Fu = function(e) {
1691
1680
  one: {
1692
1681
  cacheDoc: Fu
1693
1682
  }
1694
- }, Mu = {
1683
+ }, Bu = {
1695
1684
  /** */
1696
1685
  cache: function() {
1697
1686
  return this._cache = this.methods.one.cacheDoc(this.document), this;
@@ -1700,14 +1689,14 @@ const Fu = function(e) {
1700
1689
  uncache: function() {
1701
1690
  return this._cache = null, this;
1702
1691
  }
1703
- }, Bu = function(e) {
1704
- Object.assign(e.prototype, Mu);
1692
+ }, Mu = function(e) {
1693
+ Object.assign(e.prototype, Bu);
1705
1694
  }, Vu = {
1706
1695
  cache: function(e) {
1707
1696
  e._cache = e.methods.one.cacheDoc(e.document);
1708
1697
  }
1709
1698
  }, Lu = {
1710
- api: Bu,
1699
+ api: Mu,
1711
1700
  compute: Vu,
1712
1701
  methods: zu
1713
1702
  }, Wu = {
@@ -1755,16 +1744,16 @@ const Fu = function(e) {
1755
1744
  const a = i.match(r).join(""), s = n[n.length - 1];
1756
1745
  s.post = a + s.post, o.post = o.post.replace(r, "");
1757
1746
  }
1758
- }, Ru = function(e, t, n) {
1747
+ }, Ju = function(e, t, n) {
1759
1748
  const r = e[t];
1760
1749
  if (t !== 0 || !bo(r.text))
1761
1750
  return;
1762
1751
  n[0].text = Ku(n[0].text);
1763
1752
  const o = e[t];
1764
1753
  o.tags.has("ProperNoun") || o.tags.has("Acronym") || bo(o.text) && o.text.length > 1 && (o.text = _u(o.text));
1765
- }, Ju = function(e, t, n, r) {
1754
+ }, Ru = function(e, t, n, r) {
1766
1755
  const [o, i, a] = t;
1767
- i === 0 || a === r[o].length ? xt(n) : (xt(n), xt([e[t[1]]])), Ru(e, i, n), Ia(e, i, n);
1756
+ i === 0 || a === r[o].length ? xt(n) : (xt(n), xt([e[t[1]]])), Ju(e, i, n), Ia(e, i, n);
1768
1757
  }, Uu = function(e, t, n, r) {
1769
1758
  const [o, , i] = t, a = (r[o] || []).length;
1770
1759
  i < a ? (yo(e, i, n), xt(n)) : a === i && (xt(e), yo(e, i, n), r[o + 1] && (n[n.length - 1].post += " ")), Ia(e, t[2], n), t[4] = n[n.length - 1].id;
@@ -1793,7 +1782,7 @@ const vo = (e) => (e = e.length < 3 ? "0" + e : e, e.length < 3 ? "0" + e : e),
1793
1782
  t.forEach((u, c) => {
1794
1783
  const l = u.fullPointer[0], [h] = l, d = r[h];
1795
1784
  let m = Qu(e, o);
1796
- m.length !== 0 && (m = qu(m), n ? (wo(t.update([l]).firstTerm()), Ju(d, l, m, r)) : (wo(t.update([l]).lastTerm()), Uu(d, l, m, r)), r[h] && r[h][l[1]] && (l[3] = r[h][l[1]].id), a[c] = l, l[2] += m.length, i[c] = l);
1785
+ m.length !== 0 && (m = qu(m), n ? (wo(t.update([l]).firstTerm()), Ru(d, l, m, r)) : (wo(t.update([l]).lastTerm()), Uu(d, l, m, r)), r[h] && r[h][l[1]] && (l[3] = r[h][l[1]].id), a[c] = l, l[2] += m.length, i[c] = l);
1797
1786
  });
1798
1787
  const s = t.toView(i);
1799
1788
  return t.ptrs = a, s.compute(["id", "index", "freeze", "lexicon"]), s.world.compute.preTagger && s.compute("preTagger"), s.compute("unfreeze"), s;
@@ -1974,7 +1963,7 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
1974
1963
  const o = t[n.normal], i = t[r.normal];
1975
1964
  return o < i ? 1 : o > i ? -1 : 0;
1976
1965
  }), e;
1977
- }, Mn = { alpha: ac, length: sc, wordCount: uc, sequential: cc, byFreq: lc }, hc = /* @__PURE__ */ new Set(["index", "sequence", "seq", "sequential", "chron", "chronological"]), dc = /* @__PURE__ */ new Set(["freq", "frequency", "topk", "repeats"]), fc = /* @__PURE__ */ new Set(["alpha", "alphabetical"]), pc = function(e, t) {
1966
+ }, Bn = { alpha: ac, length: sc, wordCount: uc, sequential: cc, byFreq: lc }, hc = /* @__PURE__ */ new Set(["index", "sequence", "seq", "sequential", "chron", "chronological"]), dc = /* @__PURE__ */ new Set(["freq", "frequency", "topk", "repeats"]), fc = /* @__PURE__ */ new Set(["alpha", "alphabetical"]), pc = function(e, t) {
1978
1967
  let n = e.fullPointer;
1979
1968
  return n = n.sort((r, o) => (r = e.update([r]), o = e.update([o]), t(r, o))), e.ptrs = n, e;
1980
1969
  }, gc = function(e) {
@@ -1989,7 +1978,7 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
1989
1978
  normal: i.map((s) => s.machine || s.normal || "").join(" "),
1990
1979
  pointer: r[a]
1991
1980
  }));
1992
- return hc.has(e) && (e = "sequential"), fc.has(e) && (e = "alpha"), dc.has(e) ? (o = Mn.byFreq(o), this.update(o.map((i) => i.pointer))) : typeof Mn[e] == "function" ? (o = o.sort(Mn[e]), this.update(o.map((i) => i.pointer))) : this;
1981
+ return hc.has(e) && (e = "sequential"), fc.has(e) && (e = "alpha"), dc.has(e) ? (o = Bn.byFreq(o), this.update(o.map((i) => i.pointer))) : typeof Bn[e] == "function" ? (o = o.sort(Bn[e]), this.update(o.map((i) => i.pointer))) : this;
1993
1982
  }, mc = function() {
1994
1983
  let e = this.pointer || this.docs.map((t, n) => [n]);
1995
1984
  return e = [].concat(e), e = e.reverse(), this._cache && (this._cache = this._cache.reverse()), this.update(e);
@@ -2148,7 +2137,7 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
2148
2137
  contractions: Tc,
2149
2138
  numberSuffixes: Ic
2150
2139
  }
2151
- }, Bn = function(e, t, n) {
2140
+ }, Mn = function(e, t, n) {
2152
2141
  const [r, o] = t;
2153
2142
  !n || n.length === 0 || (n = n.map((i, a) => (i.implicit = i.text, i.machine = i.text, i.pre = "", i.post = "", i.text = "", i.normal = "", i.index = [r, o + a], i)), n[0] && (n[0].pre = e[r][o].pre, n[n.length - 1].post = e[r][o].post, n[0].text = e[r][o].text, n[0].normal = e[r][o].normal), e[r].splice(o, 1, ...n));
2154
2143
  }, Dc = /'/, Oc = /* @__PURE__ */ new Set([
@@ -2179,22 +2168,22 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
2179
2168
  return null;
2180
2169
  }, Fc = function(e, t) {
2181
2170
  return e[t].normal === "ain't" || e[t].normal === "aint" ? null : [e[t].normal.replace(/n't/, ""), "not"];
2182
- }, Mr = /'/, zc = /(e|é|aison|sion|tion)$/, Mc = /(age|isme|acle|ege|oire)$/, Bc = (e, t) => {
2183
- const n = e[t].normal.split(Mr)[1];
2171
+ }, Br = /'/, zc = /(e|é|aison|sion|tion)$/, Bc = /(age|isme|acle|ege|oire)$/, Mc = (e, t) => {
2172
+ const n = e[t].normal.split(Br)[1];
2184
2173
  return n && n.endsWith("e") ? ["la", n] : ["le", n];
2185
2174
  }, Vc = (e, t) => {
2186
- const n = e[t].normal.split(Mr)[1];
2187
- return n && zc.test(n) && !Mc.test(n) ? ["du", n] : n && n.endsWith("s") ? ["des", n] : ["de", n];
2188
- }, Lc = (e, t) => ["je", e[t].normal.split(Mr)[1]], Vn = {
2175
+ const n = e[t].normal.split(Br)[1];
2176
+ return n && zc.test(n) && !Bc.test(n) ? ["du", n] : n && n.endsWith("s") ? ["des", n] : ["de", n];
2177
+ }, Lc = (e, t) => ["je", e[t].normal.split(Br)[1]], Vn = {
2189
2178
  preJ: Lc,
2190
- preL: Bc,
2179
+ preL: Mc,
2191
2180
  preD: Vc
2192
- }, Wc = /^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i, Kc = /^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i, _c = /^[0-9]{3}-[0-9]{4}$/, Rc = function(e, t) {
2181
+ }, Wc = /^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i, Kc = /^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i, _c = /^[0-9]{3}-[0-9]{4}$/, Jc = function(e, t) {
2193
2182
  const n = e[t];
2194
2183
  let r = n.text.match(Wc);
2195
2184
  return r !== null ? n.tags.has("PhoneNumber") === !0 || _c.test(n.text) ? null : [r[1], "to", r[2]] : (r = n.text.match(Kc), r !== null ? [r[1], "to", r[4]] : null);
2196
- }, Jc = /^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/, Uc = function(e, t, n) {
2197
- const r = n.model.one.numberSuffixes || {}, i = e[t].text.match(Jc);
2185
+ }, Rc = /^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/, Uc = function(e, t, n) {
2186
+ const r = n.model.one.numberSuffixes || {}, i = e[t].text.match(Rc);
2198
2187
  if (i !== null) {
2199
2188
  const a = i[2].toLowerCase().trim();
2200
2189
  return r.hasOwnProperty(a) ? null : [i[1], a];
@@ -2247,14 +2236,14 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
2247
2236
  }
2248
2237
  let h = Qc(i, a[u], c, l);
2249
2238
  if (!h && Co.hasOwnProperty(l) && (h = Co[l](a, u, t)), !h && $o.hasOwnProperty(c) && (h = $o[c](a, u)), c === "there" && l === "s" && (h = Zc(a, u)), h) {
2250
- h = Ln(h, e), Bn(n, [s, u], h), xo(n[s], e, u, h.length);
2239
+ h = Ln(h, e), Mn(n, [s, u], h), xo(n[s], e, u, h.length);
2251
2240
  continue;
2252
2241
  }
2253
2242
  if (qc.test(a[u].normal)) {
2254
- h = Rc(a, u), h && (h = Ln(h, e), Bn(n, [s, u], h), o.one.setTag(h, "NumberRange", t), h[2] && h[2].tags.has("Time") && o.one.setTag([h[0]], "Time", t, null, "time-range"), xo(n[s], e, u, h.length));
2243
+ h = Jc(a, u), h && (h = Ln(h, e), Mn(n, [s, u], h), o.one.setTag(h, "NumberRange", t), h[2] && h[2].tags.has("Time") && o.one.setTag([h[0]], "Time", t, null, "time-range"), xo(n[s], e, u, h.length));
2255
2244
  continue;
2256
2245
  }
2257
- h = Uc(a, u, t), h && (h = Ln(h, e), Bn(n, [s, u], h), o.one.setTag([h[1]], "Unit", t, null, "contraction-unit"));
2246
+ h = Uc(a, u, t), h && (h = Ln(h, e), Mn(n, [s, u], h), o.one.setTag([h[1]], "Unit", t, null, "contraction-unit"));
2258
2247
  }
2259
2248
  });
2260
2249
  }, Yc = { contractions: Xc }, el = {
@@ -2269,9 +2258,9 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
2269
2258
  if (a[l] !== void 0 && s[u + 1]) {
2270
2259
  const h = u + a[l] - 1;
2271
2260
  for (let d = h; d > u; d -= 1) {
2272
- const m = s.slice(u, d + 1), $ = m.map((ee) => ee.machine || ee.normal).join(" ");
2273
- if (i.hasOwnProperty($) === !0) {
2274
- o(m, i[$], t, !1, "1-frozen-multi-lexicon"), m.forEach((ee) => ee.frozen = !0);
2261
+ const m = s.slice(u, d + 1), C = m.map((ee) => ee.machine || ee.normal).join(" ");
2262
+ if (i.hasOwnProperty(C) === !0) {
2263
+ o(m, i[C], t, !1, "1-frozen-multi-lexicon"), m.forEach((ee) => ee.frozen = !0);
2275
2264
  continue;
2276
2265
  }
2277
2266
  }
@@ -2327,10 +2316,10 @@ const ac = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, sc
2327
2316
  const d = e.slice(t, h + 1);
2328
2317
  if (d.length <= 1)
2329
2318
  return !1;
2330
- const m = d.map(($) => $.machine || $.normal).join(" ");
2319
+ const m = d.map((C) => C.machine || C.normal).join(" ");
2331
2320
  if (s.hasOwnProperty(m) === !0) {
2332
- const $ = s[m];
2333
- return i(d, $, n, !1, "1-multi-lexicon"), $ && $.length === 2 && ($[0] === "PhrasalVerb" || $[1] === "PhrasalVerb") && i([d[1]], "Particle", n, !1, "1-phrasal-particle"), !0;
2321
+ const C = s[m];
2322
+ return i(d, C, n, !1, "1-multi-lexicon"), C && C.length === 2 && (C[0] === "PhrasalVerb" || C[1] === "PhrasalVerb") && i([d[1]], "Particle", n, !1, "1-phrasal-particle"), !0;
2334
2323
  }
2335
2324
  }
2336
2325
  return !1;
@@ -2514,7 +2503,7 @@ const kl = {
2514
2503
  return n = Do(n, t), Object.keys(r).forEach((o) => {
2515
2504
  r[o] = Do(r[o], t);
2516
2505
  }), { ptrs: n, byGroup: r };
2517
- }, Jt = function(e, t, n) {
2506
+ }, Rt = function(e, t, n) {
2518
2507
  const r = n.methods.one;
2519
2508
  return typeof e == "number" && (e = String(e)), typeof e == "string" && (e = r.killUnicode(e, n), e = r.parseMatch(e, t, n)), e;
2520
2509
  }, Sa = (e) => Object.prototype.toString.call(e) === "[object Object]", Ut = (e) => e && Sa(e) && e.isView === !0, qt = (e) => e && Sa(e) && e.isNet === !0, Al = function(e, t, n) {
@@ -2523,7 +2512,7 @@ const kl = {
2523
2512
  return this.intersection(e);
2524
2513
  if (qt(e))
2525
2514
  return this.sweep(e, { tagger: !1 }).view.settle();
2526
- e = Jt(e, n, this.world);
2515
+ e = Rt(e, n, this.world);
2527
2516
  const o = { regs: e, group: t }, i = r.match(this.docs, o, this._cache), { ptrs: a, byGroup: s } = Ha(i, this.fullPointer), u = this.toView(a);
2528
2517
  return u._groups = s, u;
2529
2518
  }, xl = function(e, t, n) {
@@ -2532,7 +2521,7 @@ const kl = {
2532
2521
  return this.intersection(e).eq(0);
2533
2522
  if (qt(e))
2534
2523
  return this.sweep(e, { tagger: !1, matchOne: !0 }).view;
2535
- e = Jt(e, n, this.world);
2524
+ e = Rt(e, n, this.world);
2536
2525
  const o = { regs: e, group: t, justOne: !0 }, i = r.match(this.docs, o, this._cache), { ptrs: a, byGroup: s } = Ha(i, this.fullPointer), u = this.toView(a);
2537
2526
  return u._groups = s, u;
2538
2527
  }, Cl = function(e, t, n) {
@@ -2541,7 +2530,7 @@ const kl = {
2541
2530
  return this.intersection(e).fullPointer.length > 0;
2542
2531
  if (qt(e))
2543
2532
  return this.sweep(e, { tagger: !1 }).view.found;
2544
- e = Jt(e, n, this.world);
2533
+ e = Rt(e, n, this.world);
2545
2534
  const o = { regs: e, group: t, justOne: !0 };
2546
2535
  return r.match(this.docs, o, this._cache).ptrs.length > 0;
2547
2536
  }, $l = function(e, t, n) {
@@ -2552,7 +2541,7 @@ const kl = {
2552
2541
  const u = this.sweep(e, { tagger: !1 }).view.settle();
2553
2542
  return this.if(u);
2554
2543
  }
2555
- e = Jt(e, n, this.world);
2544
+ e = Rt(e, n, this.world);
2556
2545
  const o = { regs: e, group: t, justOne: !0 };
2557
2546
  let i = this.fullPointer;
2558
2547
  const a = this._cache || [];
@@ -2570,7 +2559,7 @@ const kl = {
2570
2559
  const s = this.sweep(e, { tagger: !1 }).view.settle();
2571
2560
  return this.ifNo(s);
2572
2561
  }
2573
- e = Jt(e, n, this.world);
2562
+ e = Rt(e, n, this.world);
2574
2563
  const i = this._cache || [], a = this.filter((s, u) => {
2575
2564
  const c = { regs: e, group: t, justOne: !0 };
2576
2565
  return o.match(s.docs, c, i[u]).ptrs.length === 0;
@@ -2618,19 +2607,19 @@ const kl = {
2618
2607
  return [e[0], e[1], t[2]];
2619
2608
  }, Sl = function(e) {
2620
2609
  return Object.prototype.toString.call(e) === "[object Array]";
2621
- }, Br = (e, t, n) => typeof e == "string" || Sl(e) ? t.match(e, n) : e || t.none(), Vr = function(e, t) {
2610
+ }, Mr = (e, t, n) => typeof e == "string" || Sl(e) ? t.match(e, n) : e || t.none(), Vr = function(e, t) {
2622
2611
  const [n, r, o] = e;
2623
2612
  return t.document[n] && t.document[n][r] && (e[3] = e[3] || t.document[n][r].id, t.document[n][o - 1] && (e[4] = e[4] || t.document[n][o - 1].id)), e;
2624
2613
  }, Nt = {};
2625
2614
  Nt.splitOn = function(e, t) {
2626
- const { splitAll: n } = this.methods.one.pointer, r = Br(e, this, t).fullPointer, o = n(this.fullPointer, r);
2615
+ const { splitAll: n } = this.methods.one.pointer, r = Mr(e, this, t).fullPointer, o = n(this.fullPointer, r);
2627
2616
  let i = [];
2628
2617
  return o.forEach((a) => {
2629
2618
  i.push(a.passthrough), i.push(a.before), i.push(a.match), i.push(a.after);
2630
2619
  }), i = i.filter((a) => a), i = i.map((a) => Vr(a, this)), this.update(i);
2631
2620
  };
2632
2621
  Nt.splitBefore = function(e, t) {
2633
- const { splitAll: n } = this.methods.one.pointer, r = Br(e, this, t).fullPointer, o = n(this.fullPointer, r);
2622
+ const { splitAll: n } = this.methods.one.pointer, r = Mr(e, this, t).fullPointer, o = n(this.fullPointer, r);
2634
2623
  for (let a = 0; a < o.length; a += 1)
2635
2624
  !o[a].after && o[a + 1] && o[a + 1].before && o[a].match && o[a].match[0] === o[a + 1].before[0] && (o[a].after = o[a + 1].before, delete o[a + 1].before);
2636
2625
  let i = [];
@@ -2639,7 +2628,7 @@ Nt.splitBefore = function(e, t) {
2639
2628
  }), i = i.filter((a) => a), i = i.map((a) => Vr(a, this)), this.update(i);
2640
2629
  };
2641
2630
  Nt.splitAfter = function(e, t) {
2642
- const { splitAll: n } = this.methods.one.pointer, r = Br(e, this, t).fullPointer, o = n(this.fullPointer, r);
2631
+ const { splitAll: n } = this.methods.one.pointer, r = Mr(e, this, t).fullPointer, o = n(this.fullPointer, r);
2643
2632
  let i = [];
2644
2633
  return o.forEach((a) => {
2645
2634
  i.push(a.passthrough), a.before && a.match ? i.push(Ga(a.before, a.match)) : (i.push(a.before), i.push(a.match)), i.push(a.after);
@@ -2668,62 +2657,62 @@ const Gl = function(e, t) {
2668
2657
  join: function() {
2669
2658
  return Oo(this);
2670
2659
  }
2671
- }, ve = Object.assign({}, jl, Hl, Nt, Fl);
2672
- ve.lookBehind = ve.before;
2673
- ve.lookBefore = ve.before;
2674
- ve.lookAhead = ve.after;
2675
- ve.lookAfter = ve.after;
2676
- ve.notIf = ve.ifNo;
2660
+ }, ye = Object.assign({}, jl, Hl, Nt, Fl);
2661
+ ye.lookBehind = ye.before;
2662
+ ye.lookBefore = ye.before;
2663
+ ye.lookAhead = ye.after;
2664
+ ye.lookAfter = ye.after;
2665
+ ye.notIf = ye.ifNo;
2677
2666
  const zl = function(e) {
2678
- Object.assign(e.prototype, ve);
2679
- }, Ml = /(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/, Bl = /([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/, Vl = / /g, Ll = (e) => /^[![^]*(<[^<]*>)?\(/.test(e) && /\)[?\]+*$~]*$/.test(e), Ho = (e) => /^[![^]*(<[^<]*>)?\//.test(e) && /\/[?\]+*$~]*$/.test(e), So = function(e) {
2667
+ Object.assign(e.prototype, ye);
2668
+ }, Bl = /(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/, Ml = /([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/, Vl = / /g, Ll = (e) => /^[![^]*(<[^<]*>)?\(/.test(e) && /\)[?\]+*$~]*$/.test(e), Ho = (e) => /^[![^]*(<[^<]*>)?\//.test(e) && /\/[?\]+*$~]*$/.test(e), So = function(e) {
2680
2669
  return e = e.map((t) => t.trim()), e = e.filter((t) => t), e;
2681
2670
  }, Wl = function(e) {
2682
- const t = e.split(Ml);
2671
+ const t = e.split(Bl);
2683
2672
  let n = [];
2684
2673
  t.forEach((o) => {
2685
2674
  if (Ho(o)) {
2686
2675
  n.push(o);
2687
2676
  return;
2688
2677
  }
2689
- n = n.concat(o.split(Bl));
2678
+ n = n.concat(o.split(Ml));
2690
2679
  }), n = So(n);
2691
2680
  let r = [];
2692
2681
  return n.forEach((o) => {
2693
2682
  Ll(o) || Ho(o) ? r.push(o) : r = r.concat(o.split(Vl));
2694
2683
  }), r = So(r), r;
2695
- }, Go = /\{([0-9]+)?(, *[0-9]*)?\}/, Fo = /&&/, Kl = new RegExp(/^<\s*(\S+)\s*>/), zo = (e) => e.charAt(0).toUpperCase() + e.substring(1), ce = (e) => e.charAt(e.length - 1), ne = (e) => e.charAt(0), Pt = (e) => e.substring(1), kt = (e) => e.substring(0, e.length - 1), Ot = function(e) {
2684
+ }, Go = /\{([0-9]+)?(, *[0-9]*)?\}/, Fo = /&&/, Kl = new RegExp(/^<\s*(\S+)\s*>/), zo = (e) => e.charAt(0).toUpperCase() + e.substring(1), ue = (e) => e.charAt(e.length - 1), ne = (e) => e.charAt(0), Pt = (e) => e.substring(1), kt = (e) => e.substring(0, e.length - 1), Ot = function(e) {
2696
2685
  return e = Pt(e), e = kt(e), e;
2697
2686
  }, Fa = function(e, t) {
2698
2687
  const n = {};
2699
2688
  for (let r = 0; r < 2; r += 1) {
2700
- if (ce(e) === "$" && (n.end = !0, e = kt(e)), ne(e) === "^" && (n.start = !0, e = Pt(e)), ce(e) === "?" && (n.optional = !0, e = kt(e)), (ne(e) === "[" || ce(e) === "]") && (n.group = null, ne(e) === "[" && (n.groupStart = !0), ce(e) === "]" && (n.groupEnd = !0), e = e.replace(/^\[/, ""), e = e.replace(/\]$/, ""), ne(e) === "<")) {
2689
+ if (ue(e) === "$" && (n.end = !0, e = kt(e)), ne(e) === "^" && (n.start = !0, e = Pt(e)), ue(e) === "?" && (n.optional = !0, e = kt(e)), (ne(e) === "[" || ue(e) === "]") && (n.group = null, ne(e) === "[" && (n.groupStart = !0), ue(e) === "]" && (n.groupEnd = !0), e = e.replace(/^\[/, ""), e = e.replace(/\]$/, ""), ne(e) === "<")) {
2701
2690
  const o = Kl.exec(e);
2702
2691
  o.length >= 2 && (n.group = o[1], e = e.replace(o[0], ""));
2703
2692
  }
2704
- if (ce(e) === "+" && (n.greedy = !0, e = kt(e)), e !== "*" && ce(e) === "*" && e !== "\\*" && (n.greedy = !0, e = kt(e)), ne(e) === "!" && (n.negative = !0, e = Pt(e)), ne(e) === "~" && ce(e) === "~" && e.length > 2 && (e = Ot(e), n.fuzzy = !0, n.min = t.fuzzy || 0.85, /\(/.test(e) === !1))
2693
+ if (ue(e) === "+" && (n.greedy = !0, e = kt(e)), e !== "*" && ue(e) === "*" && e !== "\\*" && (n.greedy = !0, e = kt(e)), ne(e) === "!" && (n.negative = !0, e = Pt(e)), ne(e) === "~" && ue(e) === "~" && e.length > 2 && (e = Ot(e), n.fuzzy = !0, n.min = t.fuzzy || 0.85, /\(/.test(e) === !1))
2705
2694
  return n.word = e, n;
2706
- if (ne(e) === "/" && ce(e) === "/")
2695
+ if (ne(e) === "/" && ue(e) === "/")
2707
2696
  return e = Ot(e), t.caseSensitive && (n.use = "text"), n.regex = new RegExp(e), n;
2708
- if (Go.test(e) === !0 && (e = e.replace(Go, (o, i, a) => (a === void 0 ? (n.min = Number(i), n.max = Number(i)) : (a = a.replace(/, */, ""), i === void 0 ? (n.min = 0, n.max = Number(a)) : (n.min = Number(i), n.max = Number(a || 999))), n.greedy = !0, n.min || (n.optional = !0), ""))), ne(e) === "(" && ce(e) === ")") {
2697
+ if (Go.test(e) === !0 && (e = e.replace(Go, (o, i, a) => (a === void 0 ? (n.min = Number(i), n.max = Number(i)) : (a = a.replace(/, */, ""), i === void 0 ? (n.min = 0, n.max = Number(a)) : (n.min = Number(i), n.max = Number(a || 999))), n.greedy = !0, n.min || (n.optional = !0), ""))), ne(e) === "(" && ue(e) === ")") {
2709
2698
  Fo.test(e) ? (n.choices = e.split(Fo), n.operator = "and") : (n.choices = e.split("|"), n.operator = "or"), n.choices[0] = Pt(n.choices[0]);
2710
2699
  const o = n.choices.length - 1;
2711
2700
  n.choices[o] = kt(n.choices[o]), n.choices = n.choices.map((i) => i.trim()), n.choices = n.choices.filter((i) => i), n.choices = n.choices.map((i) => i.split(/ /g).map((a) => Fa(a, t))), e = "";
2712
2701
  }
2713
- if (ne(e) === "{" && ce(e) === "}") {
2702
+ if (ne(e) === "{" && ue(e) === "}") {
2714
2703
  if (e = Ot(e), n.root = e, /\//.test(e)) {
2715
2704
  const o = n.root.split(/\//);
2716
2705
  n.root = o[0], n.pos = o[1], n.pos === "adj" && (n.pos = "Adjective"), n.pos = n.pos.charAt(0).toUpperCase() + n.pos.substr(1).toLowerCase(), o[2] !== void 0 && (n.sense = o[2]);
2717
2706
  }
2718
2707
  return n;
2719
2708
  }
2720
- if (ne(e) === "<" && ce(e) === ">")
2709
+ if (ne(e) === "<" && ue(e) === ">")
2721
2710
  return e = Ot(e), n.chunk = zo(e), n.greedy = !0, n;
2722
- if (ne(e) === "%" && ce(e) === "%")
2711
+ if (ne(e) === "%" && ue(e) === "%")
2723
2712
  return e = Ot(e), n.switch = e, n;
2724
2713
  }
2725
2714
  return ne(e) === "#" ? (n.tag = Pt(e), n.tag = zo(n.tag), n) : ne(e) === "@" ? (n.method = Pt(e), n) : e === "." ? (n.anything = !0, n) : e === "*" ? (n.anything = !0, n.greedy = !0, n.optional = !0, n) : (e && (e = e.replace("\\*", "*"), e = e.replace("\\.", "."), t.caseSensitive ? n.use = "text" : e = e.toLowerCase(), n.word = e), n);
2726
- }, _l = /[a-z0-9][-–—][a-z]/i, Rl = function(e, t) {
2715
+ }, _l = /[a-z0-9][-–—][a-z]/i, Jl = function(e, t) {
2727
2716
  const n = t.model.one.prefixes;
2728
2717
  for (let r = e.length - 1; r >= 0; r -= 1) {
2729
2718
  const o = e[r];
@@ -2738,21 +2727,21 @@ const zl = function(e) {
2738
2727
  }
2739
2728
  }
2740
2729
  return e;
2741
- }, Mo = function(e, t) {
2730
+ }, Bo = function(e, t) {
2742
2731
  const { all: n } = t.methods.two.transform.verb || {}, r = e.root;
2743
2732
  return n ? n(r, t.model) : [];
2744
- }, Bo = function(e, t) {
2733
+ }, Mo = function(e, t) {
2745
2734
  const { all: n } = t.methods.two.transform.noun || {};
2746
2735
  return n ? n(e.root, t.model) : [e.root];
2747
2736
  }, Vo = function(e, t) {
2748
2737
  const { all: n } = t.methods.two.transform.adjective || {};
2749
2738
  return n ? n(e.root, t.model) : [e.root];
2750
- }, Jl = function(e, t) {
2739
+ }, Rl = function(e, t) {
2751
2740
  return e = e.map((n) => {
2752
2741
  if (n.root)
2753
2742
  if (t.methods.two && t.methods.two.transform) {
2754
2743
  let r = [];
2755
- n.pos ? n.pos === "Verb" ? r = r.concat(Mo(n, t)) : n.pos === "Noun" ? r = r.concat(Bo(n, t)) : n.pos === "Adjective" && (r = r.concat(Vo(n, t))) : (r = r.concat(Mo(n, t)), r = r.concat(Bo(n, t)), r = r.concat(Vo(n, t))), r = r.filter((o) => o), r.length > 0 && (n.operator = "or", n.fastOr = new Set(r));
2744
+ n.pos ? n.pos === "Verb" ? r = r.concat(Bo(n, t)) : n.pos === "Noun" ? r = r.concat(Mo(n, t)) : n.pos === "Adjective" && (r = r.concat(Vo(n, t))) : (r = r.concat(Bo(n, t)), r = r.concat(Mo(n, t)), r = r.concat(Vo(n, t))), r = r.filter((o) => o), r.length > 0 && (n.operator = "or", n.fastOr = new Set(r));
2756
2745
  } else
2757
2746
  n.machine = n.root, delete n.id, delete n.root;
2758
2747
  return n;
@@ -2791,7 +2780,7 @@ const zl = function(e) {
2791
2780
  return [];
2792
2781
  t = t || {}, typeof e == "number" && (e = String(e));
2793
2782
  let r = Wl(e);
2794
- return r = r.map((o) => Fa(o, t)), r = Rl(r, n), r = Jl(r, n), r = Zl(r), r;
2783
+ return r = r.map((o) => Fa(o, t)), r = Jl(r, n), r = Rl(r, n), r = Zl(r), r;
2795
2784
  }, Yl = function(e, t) {
2796
2785
  for (const n of t)
2797
2786
  if (e.has(n))
@@ -2837,23 +2826,23 @@ const zl = function(e) {
2837
2826
  return 0;
2838
2827
  const r = th(e, t), o = Math.max(e.length, t.length);
2839
2828
  return 1 - (o === 0 ? 0 : r / o);
2840
- }, rh = /([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/, oh = /([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/, Lo = /^[-–—]$/, Wo = / [-–—]{1,3} /, Pe = (e, t) => e.post.indexOf(t) !== -1, Kt = {
2829
+ }, rh = /([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/, oh = /([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/, Lo = /^[-–—]$/, Wo = / [-–—]{1,3} /, we = (e, t) => e.post.indexOf(t) !== -1, Kt = {
2841
2830
  /** does it have a quotation symbol? */
2842
2831
  hasQuote: (e) => rh.test(e.pre) || oh.test(e.post),
2843
2832
  /** does it have a comma? */
2844
- hasComma: (e) => Pe(e, ","),
2833
+ hasComma: (e) => we(e, ","),
2845
2834
  /** does it end in a period? */
2846
- hasPeriod: (e) => Pe(e, ".") === !0 && Pe(e, "...") === !1,
2835
+ hasPeriod: (e) => we(e, ".") === !0 && we(e, "...") === !1,
2847
2836
  /** does it end in an exclamation */
2848
- hasExclamation: (e) => Pe(e, "!"),
2837
+ hasExclamation: (e) => we(e, "!"),
2849
2838
  /** does it end with a question mark? */
2850
- hasQuestionMark: (e) => Pe(e, "?") || Pe(e, "¿"),
2839
+ hasQuestionMark: (e) => we(e, "?") || we(e, "¿"),
2851
2840
  /** is there a ... at the end? */
2852
- hasEllipses: (e) => Pe(e, "..") || Pe(e, "…"),
2841
+ hasEllipses: (e) => we(e, "..") || we(e, "…"),
2853
2842
  /** is there a semicolon after term word? */
2854
- hasSemicolon: (e) => Pe(e, ";"),
2843
+ hasSemicolon: (e) => we(e, ";"),
2855
2844
  /** is there a colon after term word? */
2856
- hasColon: (e) => Pe(e, ":"),
2845
+ hasColon: (e) => we(e, ":"),
2857
2846
  /** is there a slash '/' in term word? */
2858
2847
  hasSlash: (e) => /\//.test(e.text),
2859
2848
  /** a hyphen connects two words like-term */
@@ -3158,13 +3147,13 @@ const ah = function(e, t) {
3158
3147
  }
3159
3148
  return !0;
3160
3149
  }), e;
3161
- }, Ma = function(e, t) {
3150
+ }, Ba = function(e, t) {
3162
3151
  return e.pointer[0] = t, Object.keys(e.groups).forEach((n) => {
3163
3152
  e.groups[n][0] = t;
3164
3153
  }), e;
3165
3154
  }, kh = function(e, t, n) {
3166
3155
  let r = Lr(e, t, 0, e.length);
3167
- return r ? (r = Ma(r, n), r) : null;
3156
+ return r ? (r = Ba(r, n), r) : null;
3168
3157
  }, Ah = function(e, t, n) {
3169
3158
  n = n || [];
3170
3159
  const { regs: r, group: o, justOne: i } = t;
@@ -3186,7 +3175,7 @@ const ah = function(e, t) {
3186
3175
  break;
3187
3176
  let d = Lr(h, r, l, c.length);
3188
3177
  if (d) {
3189
- if (d = Ma(d, u), a.push(d), i === !0)
3178
+ if (d = Ba(d, u), a.push(d), i === !0)
3190
3179
  break e;
3191
3180
  const m = d.pointer[2];
3192
3181
  Math.abs(m - 1) > l && (l = Math.abs(m - 1));
@@ -3243,11 +3232,11 @@ const ah = function(e, t) {
3243
3232
  t.hasOwnProperty(a.id) && (r += t[a.id].join("")), r += a.pre || "", r += a.text || "", n.hasOwnProperty(a.id) && (r += n[a.id].join("")), r += a.post || "";
3244
3233
  }
3245
3234
  }), r;
3246
- }, Oh = { html: Dh }, Ba = /[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/, hr = /^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/, Hh = /[,:;)('"\u201D\]]/, Sh = /^[-–—]$/, Gh = / /, nt = function(e, t, n = !0) {
3235
+ }, Oh = { html: Dh }, Ma = /[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/, hr = /^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/, Hh = /[,:;)('"\u201D\]]/, Sh = /^[-–—]$/, Gh = / /, nt = function(e, t, n = !0) {
3247
3236
  let r = "";
3248
3237
  return e.forEach((o) => {
3249
3238
  let i = o.pre || "", a = o.post || "";
3250
- t.punctuation === "some" && (i = i.replace(hr, ""), Sh.test(a) && (a = " "), a = a.replace(Hh, ""), a = a.replace(/\?!+/, "?"), a = a.replace(/!+/, "!"), a = a.replace(/\?+/, "?"), a = a.replace(/\.{2,}/, ""), o.tags.has("Abbreviation") && (a = a.replace(/\./, ""))), t.whitespace === "some" && (i = i.replace(/\s/, ""), a = a.replace(/\s+/, " ")), t.keepPunct || (i = i.replace(hr, ""), a === "-" ? a = " " : a = a.replace(Ba, ""));
3239
+ t.punctuation === "some" && (i = i.replace(hr, ""), Sh.test(a) && (a = " "), a = a.replace(Hh, ""), a = a.replace(/\?!+/, "?"), a = a.replace(/!+/, "!"), a = a.replace(/\?+/, "?"), a = a.replace(/\.{2,}/, ""), o.tags.has("Abbreviation") && (a = a.replace(/\./, ""))), t.whitespace === "some" && (i = i.replace(/\s/, ""), a = a.replace(/\s+/, " ")), t.keepPunct || (i = i.replace(hr, ""), a === "-" ? a = " " : a = a.replace(Ma, ""));
3251
3240
  let s = o[t.form || "text"] || o.normal || "";
3252
3241
  t.form === "implicit" && (s = o.implicit || o.text), t.form === "root" && o.implicit && (s = o.root || o.implicit || o.normal), (t.form === "machine" || t.form === "implicit" || t.form === "root") && o.implicit && (!a || !Gh.test(a)) && (a += " "), r += i + s + a;
3253
3242
  }), n === !1 && (r = r.trim()), t.lowerCase === !0 && (r = r.toLowerCase()), r;
@@ -3260,7 +3249,7 @@ const ah = function(e, t) {
3260
3249
  if (t.keepSpace || (n = n.trim()), t.keepEndPunct === !1) {
3261
3250
  e[0][0].tags.has("Emoticon") || (n = n.replace(hr, ""));
3262
3251
  const r = e[e.length - 1];
3263
- r[r.length - 1].tags.has("Emoticon") || (n = n.replace(Ba, "")), n.endsWith("'") && !n.endsWith("s'") && (n = n.replace(/'/, ""));
3252
+ r[r.length - 1].tags.has("Emoticon") || (n = n.replace(Ma, "")), n.endsWith("'") && !n.endsWith("s'") && (n = n.replace(/'/, ""));
3264
3253
  }
3265
3254
  return t.cleanWhitespace === !0 && (n = n.trim()), n;
3266
3255
  }, Ue = {
@@ -3350,7 +3339,7 @@ const Wr = function(e) {
3350
3339
  Fe.sentences = Fe.sentence;
3351
3340
  Fe.clean = Fe.normal;
3352
3341
  Fe.reduced = Fe.root;
3353
- const Mh = function(e, t) {
3342
+ const Bh = function(e, t) {
3354
3343
  return t = t || {}, typeof t == "string" && (t = {}), t = Object.assign({}, zh, t), t.offset && e.compute("offset"), e.docs.map((n, r) => {
3355
3344
  const o = {};
3356
3345
  return Object.keys(t).forEach((i) => {
@@ -3360,14 +3349,14 @@ const Mh = function(e, t) {
3360
3349
  }, dr = {
3361
3350
  /** return data */
3362
3351
  json: function(e) {
3363
- const t = Mh(this, e);
3352
+ const t = Bh(this, e);
3364
3353
  return typeof e == "number" ? t[e] : t;
3365
3354
  }
3366
3355
  };
3367
3356
  dr.data = dr.json;
3368
- const Bh = () => typeof window < "u" && window.document, Vh = function(e) {
3357
+ const Mh = () => typeof window < "u" && window.document, Vh = function(e) {
3369
3358
  const t = this.methods.one.debug || {};
3370
- return e && t.hasOwnProperty(e) ? (t[e](this), this) : Bh() ? (t.clientSide(this), this) : (t.tags(this), this);
3359
+ return e && t.hasOwnProperty(e) ? (t[e](this), this) : Mh() ? (t.clientSide(this), this) : (t.tags(this), this);
3371
3360
  }, Lh = function(e) {
3372
3361
  const t = e.pre || "", n = e.post || "";
3373
3362
  return t + e.text + n;
@@ -3396,7 +3385,7 @@ const Bh = () => typeof window < "u" && window.document, Vh = function(e) {
3396
3385
  return e.forEach((r) => {
3397
3386
  t[r] = t[r] || 0, t[r] += 1;
3398
3387
  }), Object.keys(t).map((r) => ({ normal: r, count: t[r] })).sort((r, o) => r.count > o.count ? -1 : 0);
3399
- }, Rh = function(e) {
3388
+ }, Jh = function(e) {
3400
3389
  if (Kh(e))
3401
3390
  return La(this, e);
3402
3391
  if (e === "text")
@@ -3425,11 +3414,11 @@ const Bh = () => typeof window < "u" && window.document, Vh = function(e) {
3425
3414
  }), t;
3426
3415
  }
3427
3416
  return e === "tags" ? this.docs.map((t) => t.reduce((n, r) => (n[r.implicit || r.normal] = Array.from(r.tags), n), {})) : e === "debug" ? this.debug() : this.text();
3428
- }, Jh = {
3417
+ }, Rh = {
3429
3418
  /** */
3430
3419
  debug: Vh,
3431
3420
  /** */
3432
- out: Rh,
3421
+ out: Jh,
3433
3422
  /** */
3434
3423
  wrap: function(e) {
3435
3424
  return La(this, e);
@@ -3444,7 +3433,7 @@ const Bh = () => typeof window < "u" && window.document, Vh = function(e) {
3444
3433
  }
3445
3434
  return t.keepPunct === void 0 && (t.keepPunct = !0), t.keepSpace === void 0 && (t.keepSpace = !0), Fh(this.docs, t);
3446
3435
  }
3447
- }, Qh = Object.assign({}, Jh, qh, dr, Oh), Zh = function(e) {
3436
+ }, Qh = Object.assign({}, Rh, qh, dr, Oh), Zh = function(e) {
3448
3437
  Object.assign(e.prototype, Qh);
3449
3438
  }, Xh = function(e) {
3450
3439
  console.log("%c -=-=- ", "background-color:#6699cc;"), e.forEach((t) => {
@@ -3645,7 +3634,7 @@ const Bh = () => typeof window < "u" && window.document, Vh = function(e) {
3645
3634
  const u = sd(s);
3646
3635
  o.push(u);
3647
3636
  }), o = ud(o), o;
3648
- }, Ra = function(e, t) {
3637
+ }, Ja = function(e, t) {
3649
3638
  const n = [];
3650
3639
  return Ka(e, t).forEach((o) => {
3651
3640
  o.passthrough && n.push(o.passthrough), o.before && n.push(o.before), o.after && n.push(o.after);
@@ -3669,37 +3658,37 @@ const Bh = () => typeof window < "u" && window.document, Vh = function(e) {
3669
3658
  const [r, o] = n;
3670
3659
  return t[r] && t[r][o] && (n[3] = t[r][o].id), n;
3671
3660
  });
3672
- }, Ae = {};
3673
- Ae.union = function(e) {
3661
+ }, ke = {};
3662
+ ke.union = function(e) {
3674
3663
  e = Kr(e, this);
3675
3664
  let t = _a(this.fullPointer, e.fullPointer);
3676
3665
  return t = Qt(t, this.document), this.toView(t);
3677
3666
  };
3678
- Ae.and = Ae.union;
3679
- Ae.intersection = function(e) {
3667
+ ke.and = ke.union;
3668
+ ke.intersection = function(e) {
3680
3669
  e = Kr(e, this);
3681
3670
  let t = yd(this.fullPointer, e.fullPointer);
3682
3671
  return t = Qt(t, this.document), this.toView(t);
3683
3672
  };
3684
- Ae.not = function(e) {
3673
+ ke.not = function(e) {
3685
3674
  e = Kr(e, this);
3686
- let t = Ra(this.fullPointer, e.fullPointer);
3675
+ let t = Ja(this.fullPointer, e.fullPointer);
3687
3676
  return t = Qt(t, this.document), this.toView(t);
3688
3677
  };
3689
- Ae.difference = Ae.not;
3690
- Ae.complement = function() {
3678
+ ke.difference = ke.not;
3679
+ ke.complement = function() {
3691
3680
  const e = this.all();
3692
- let t = Ra(e.fullPointer, this.fullPointer);
3681
+ let t = Ja(e.fullPointer, this.fullPointer);
3693
3682
  return t = Qt(t, this.document), this.toView(t);
3694
3683
  };
3695
- Ae.settle = function() {
3684
+ ke.settle = function() {
3696
3685
  let e = this.fullPointer;
3697
3686
  return e.forEach((t) => {
3698
3687
  e = _a(e, [t]);
3699
3688
  }), e = Qt(e, this.document), this.update(e);
3700
3689
  };
3701
3690
  const wd = function(e) {
3702
- Object.assign(e.prototype, Ae);
3691
+ Object.assign(e.prototype, ke);
3703
3692
  }, Pd = {
3704
3693
  methods: md,
3705
3694
  api: wd
@@ -3853,7 +3842,7 @@ const wd = function(e) {
3853
3842
  methods: {
3854
3843
  one: Sd
3855
3844
  }
3856
- }, Ja = / /, _o = function(e, t) {
3845
+ }, Ra = / /, _o = function(e, t) {
3857
3846
  t === "Noun" && (e.chunk = t), t === "Verb" && (e.chunk = t);
3858
3847
  }, Ua = function(e, t, n, r) {
3859
3848
  if (e.tags.has(t) === !0 || t === ".")
@@ -3873,14 +3862,14 @@ const wd = function(e) {
3873
3862
  }
3874
3863
  return e.tags.add(t), e.dirty = !0, _o(e, t), !0;
3875
3864
  }, Fd = function(e, t, n, r) {
3876
- const o = t.split(Ja);
3865
+ const o = t.split(Ra);
3877
3866
  e.forEach((i, a) => {
3878
3867
  let s = o[a];
3879
3868
  s && (s = s.replace(/^#/, ""), Ua(i, s, n, r));
3880
3869
  });
3881
3870
  }, zd = function(e) {
3882
3871
  return Object.prototype.toString.call(e) === "[object Array]";
3883
- }, Md = (e, t, n = "") => {
3872
+ }, Bd = (e, t, n = "") => {
3884
3873
  const r = (a) => "\x1B[33m\x1B[3m" + a + "\x1B[0m", o = (a) => "\x1B[3m" + a + "\x1B[0m", i = e.map((a) => a.text || "[" + a.implicit + "]").join(" ");
3885
3874
  typeof t != "string" && t.length > 2 && (t = t.slice(0, 2).join(", #") + " +"), t = typeof t != "string" ? t.join(", #") : t, console.log(` ${r(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${o(n)}`);
3886
3875
  }, qa = function(e, t, n = {}, r, o) {
@@ -3888,7 +3877,7 @@ const wd = function(e) {
3888
3877
  if (!t)
3889
3878
  return;
3890
3879
  const a = typeof process > "u" || !process.env ? self.env || {} : process.env;
3891
- if (a && a.DEBUG_TAGS && Md(e, t, o), zd(t) === !0) {
3880
+ if (a && a.DEBUG_TAGS && Bd(e, t, o), zd(t) === !0) {
3892
3881
  t.forEach((s) => qa(e, s, n, r));
3893
3882
  return;
3894
3883
  }
@@ -3896,14 +3885,14 @@ const wd = function(e) {
3896
3885
  console.warn(`compromise: Invalid tag '${t}'`);
3897
3886
  return;
3898
3887
  }
3899
- if (t = t.trim(), Ja.test(t)) {
3888
+ if (t = t.trim(), Ra.test(t)) {
3900
3889
  Fd(e, t, i, r);
3901
3890
  return;
3902
3891
  }
3903
3892
  t = t.replace(/^#/, "");
3904
3893
  for (let s = 0; s < e.length; s += 1)
3905
3894
  Ua(e[s], t, i, r);
3906
- }, Bd = function(e, t, n) {
3895
+ }, Md = function(e, t, n) {
3907
3896
  t = t.trim().replace(/^#/, "");
3908
3897
  for (let r = 0; r < e.length; r += 1) {
3909
3898
  const o = e[r];
@@ -3992,9 +3981,9 @@ const wd = function(e) {
3992
3981
  })), o;
3993
3982
  })(e) : (Ge(t = e).forEach(_e), t);
3994
3983
  var t;
3995
- }, _d = (e) => "\x1B[31m" + e + "\x1B[0m", Rd = (e) => "\x1B[2m" + e + "\x1B[0m", pr = function(e, t) {
3984
+ }, _d = (e) => "\x1B[31m" + e + "\x1B[0m", Jd = (e) => "\x1B[2m" + e + "\x1B[0m", pr = function(e, t) {
3996
3985
  let n = "-> ";
3997
- t && (n = Rd("→ "));
3986
+ t && (n = Jd("→ "));
3998
3987
  let r = "";
3999
3988
  return Ge(e).forEach(((o, i) => {
4000
3989
  let a = o.id || "";
@@ -4003,20 +3992,20 @@ const wd = function(e) {
4003
3992
  r += " ".repeat(s) + n + a + `
4004
3993
  `;
4005
3994
  })), r;
4006
- }, Ro = function(e) {
3995
+ }, Jo = function(e) {
4007
3996
  let t = Ge(e);
4008
3997
  t.forEach(((r) => {
4009
3998
  delete (r = Object.assign({}, r)).children;
4010
3999
  }));
4011
4000
  let n = t[0];
4012
4001
  return n && !n.id && Object.keys(n.props).length === 0 && t.shift(), t;
4013
- }, Jo = { text: pr, txt: pr, array: Ro, flat: Ro }, Uo = function(e, t) {
4014
- return t === "nested" || t === "json" ? e : t === "debug" ? (console.log(pr(e, !0)), null) : Jo.hasOwnProperty(t) ? Jo[t](e) : e;
4015
- }, Rn = (e) => {
4002
+ }, Ro = { text: pr, txt: pr, array: Jo, flat: Jo }, Uo = function(e, t) {
4003
+ return t === "nested" || t === "json" ? e : t === "debug" ? (console.log(pr(e, !0)), null) : Ro.hasOwnProperty(t) ? Ro[t](e) : e;
4004
+ }, Jn = (e) => {
4016
4005
  Ge(e, ((t, n) => {
4017
4006
  t.id && (t._cache.parents = t._cache.parents || [], n._cache.parents = t._cache.parents.concat([t.id]));
4018
4007
  }));
4019
- }, Jd = (e, t) => (Object.keys(t).forEach(((n) => {
4008
+ }, Rd = (e, t) => (Object.keys(t).forEach(((n) => {
4020
4009
  if (t[n] instanceof Set) {
4021
4010
  let r = e[n] || /* @__PURE__ */ new Set();
4022
4011
  e[n] = /* @__PURE__ */ new Set([...r, ...t[n]]);
@@ -4090,11 +4079,11 @@ let qd = class Pn {
4090
4079
  fillDown() {
4091
4080
  var t;
4092
4081
  return t = this.json, Ge(t, ((n, r) => {
4093
- r.props = Jd(r.props, n.props);
4082
+ r.props = Rd(r.props, n.props);
4094
4083
  })), this;
4095
4084
  }
4096
4085
  depth() {
4097
- Rn(this.json);
4086
+ Jn(this.json);
4098
4087
  let t = Ge(this.json), n = t.length > 1 ? 1 : 0;
4099
4088
  return t.forEach(((r) => {
4100
4089
  if (r._cache.parents.length === 0) return;
@@ -4103,10 +4092,10 @@ let qd = class Pn {
4103
4092
  })), n;
4104
4093
  }
4105
4094
  out(t) {
4106
- return Rn(this.json), Uo(this.json, t);
4095
+ return Jn(this.json), Uo(this.json, t);
4107
4096
  }
4108
4097
  debug() {
4109
- return Rn(this.json), Uo(this.json, "debug"), this;
4098
+ return Jn(this.json), Uo(this.json, "debug"), this;
4110
4099
  }
4111
4100
  };
4112
4101
  const Qa = function(e) {
@@ -4186,7 +4175,7 @@ const ft = {
4186
4175
  }, rf = {
4187
4176
  one: {
4188
4177
  setTag: qa,
4189
- unTag: Bd,
4178
+ unTag: Md,
4190
4179
  addTags: nf,
4191
4180
  canBe: Vd
4192
4181
  }
@@ -4451,7 +4440,7 @@ const Ff = function(e) {
4451
4440
  Hf.test(s) === !0 && gr.hasOwnProperty(s) === !1 && Sf.test(s) === !1 ? (n.length > 0 ? (n[n.length - 1] += i, n.push(s)) : n.push(i + s), i = "") : i += s;
4452
4441
  }
4453
4442
  return i && (n.length === 0 && (n[0] = ""), n[n.length - 1] += i), n = Of(n), n = Ef(n), n = n.filter((a) => a), n;
4454
- }, ni = /\p{Letter}/u, en = /[\p{Number}\p{Currency_Symbol}]/u, Mf = /^[a-z]\.([a-z]\.)+/i, Bf = /[sn]['’]$/, Vf = function(e, t) {
4443
+ }, ni = /\p{Letter}/u, en = /[\p{Number}\p{Currency_Symbol}]/u, Bf = /^[a-z]\.([a-z]\.)+/i, Mf = /[sn]['’]$/, Vf = function(e, t) {
4455
4444
  const { prePunctuation: n, postPunctuation: r, emoticons: o } = t.one;
4456
4445
  let i = e, a = "", s = "";
4457
4446
  const u = Array.from(e);
@@ -4472,7 +4461,7 @@ const Ff = function(e) {
4472
4461
  if (r[h] !== !0) {
4473
4462
  if (ni.test(h) || en.test(h))
4474
4463
  break;
4475
- h === "." && Mf.test(i) === !0 || h === "'" && Bf.test(i) === !0 || (s = u.pop() + s);
4464
+ h === "." && Bf.test(i) === !0 || h === "'" && Mf.test(i) === !0 || (s = u.pop() + s);
4476
4465
  }
4477
4466
  }
4478
4467
  return e = u.join(""), e === "" && (i = i.replace(/ *$/, (l) => (s = l || "", "")), e = i, a = ""), { str: e, pre: a, post: s };
@@ -4495,8 +4484,8 @@ const Ff = function(e) {
4495
4484
  e = e || "", e = e.toLowerCase(), e = e.trim();
4496
4485
  const t = e;
4497
4486
  return e = e.replace(/[,;.!?]+$/, ""), e = e.replace(/\u2026/g, "..."), e = e.replace(/\u2013/g, "-"), /^[:;]/.test(e) === !1 && (e = e.replace(/\.{3,}$/g, ""), e = e.replace(/[",.!:;?)]+$/g, ""), e = e.replace(/^['"(]+/g, "")), e = e.replace(/[\u200B-\u200D\uFEFF]/g, ""), e = e.trim(), e === "" && (e = t), e = e.replace(/([0-9]),([0-9])/g, "$1$2"), e;
4498
- }, _f = /([A-Z]\.)+[A-Z]?,?$/, Rf = /^[A-Z]\.,?$/, Jf = /[A-Z]{2,}('s|,)?$/, Uf = /([a-z]\.)+[a-z]\.?$/, qf = function(e) {
4499
- return _f.test(e) === !0 || Uf.test(e) === !0 || Rf.test(e) === !0 || Jf.test(e) === !0;
4487
+ }, _f = /([A-Z]\.)+[A-Z]?,?$/, Jf = /^[A-Z]\.,?$/, Rf = /[A-Z]{2,}('s|,)?$/, Uf = /([a-z]\.)+[a-z]\.?$/, qf = function(e) {
4488
+ return _f.test(e) === !0 || Uf.test(e) === !0 || Jf.test(e) === !0 || Rf.test(e) === !0;
4500
4489
  }, Qf = function(e) {
4501
4490
  return qf(e) && (e = e.replace(/\./g, "")), e;
4502
4491
  }, Xa = function(e, t) {
@@ -4982,15 +4971,15 @@ const mp = {
4982
4971
  for (let r = 0; r < n.length; r += 1)
4983
4972
  for (let o = 0; o < n[r].length; o += 1)
4984
4973
  n[r][o].normal !== "" && (t += 1, n[r][o].wordCount = t);
4985
- }, Jn = function(e, t) {
4974
+ }, Rn = function(e, t) {
4986
4975
  const n = e.docs;
4987
4976
  for (let r = 0; r < n.length; r += 1)
4988
4977
  for (let o = 0; o < n[r].length; o += 1)
4989
4978
  t(n[r][o], e.world);
4990
4979
  }, Tp = {
4991
- alias: (e) => Jn(e, kp),
4992
- machine: (e) => Jn(e, xp),
4993
- normal: (e) => Jn(e, Xa),
4980
+ alias: (e) => Rn(e, kp),
4981
+ machine: (e) => Rn(e, xp),
4982
+ normal: (e) => Rn(e, Xa),
4994
4983
  freq: Cp,
4995
4984
  offset: $p,
4996
4985
  index: Np,
@@ -5055,17 +5044,17 @@ const mp = {
5055
5044
  }
5056
5045
  n.one.typeahead[o] = r[o];
5057
5046
  }), this;
5058
- }, Mp = {
5059
- typeahead: zp
5060
5047
  }, Bp = {
5048
+ typeahead: zp
5049
+ }, Mp = {
5061
5050
  one: {
5062
5051
  typeahead: {}
5063
5052
  //set a blank key-val
5064
5053
  }
5065
5054
  }, Vp = {
5066
- model: Bp,
5055
+ model: Mp,
5067
5056
  api: Hp,
5068
- lib: Mp,
5057
+ lib: Bp,
5069
5058
  compute: Dp,
5070
5059
  hooks: ["typeahead"]
5071
5060
  };
@@ -5290,7 +5279,7 @@ const ts = {
5290
5279
  }, _p = function(e, t, n) {
5291
5280
  const r = br.fromAlphaCode(t);
5292
5281
  return r < e.symCount ? e.syms[r] : n + r + 1 - e.symCount;
5293
- }, Rp = function(e) {
5282
+ }, Jp = function(e) {
5294
5283
  const t = [], n = (r, o) => {
5295
5284
  let i = e.nodes[r];
5296
5285
  i[0] === "!" && (t.push(o), i = i.slice(1));
@@ -5309,13 +5298,13 @@ const ts = {
5309
5298
  }
5310
5299
  };
5311
5300
  return n(0, ""), t;
5312
- }, Jp = function(e) {
5301
+ }, Rp = function(e) {
5313
5302
  const t = {
5314
5303
  nodes: e.split(";"),
5315
5304
  syms: [],
5316
5305
  symCount: 0
5317
5306
  };
5318
- return e.match(":") && Kp(t), Rp(t);
5307
+ return e.match(":") && Kp(t), Jp(t);
5319
5308
  }, Up = function(e) {
5320
5309
  if (!e)
5321
5310
  return {};
@@ -5324,14 +5313,14 @@ const ts = {
5324
5313
  return r[i[0]] = i[1], r;
5325
5314
  }, {}), n = {};
5326
5315
  return Object.keys(t).forEach(function(r) {
5327
- const o = Jp(t[r]);
5316
+ const o = Rp(t[r]);
5328
5317
  r === "true" && (r = !0);
5329
5318
  for (let i = 0; i < o.length; i++) {
5330
5319
  const a = o[i];
5331
5320
  n.hasOwnProperty(a) === !0 ? Array.isArray(n[a]) === !1 ? n[a] = [n[a], r] : n[a].push(r) : n[a] = r;
5332
5321
  }
5333
5322
  }), n;
5334
- }, fe = ["Possessive", "Pronoun"], qp = {
5323
+ }, de = ["Possessive", "Pronoun"], qp = {
5335
5324
  // numbers
5336
5325
  "20th century fox": "Organization",
5337
5326
  "7 eleven": "Organization",
@@ -5380,17 +5369,17 @@ const ts = {
5380
5369
  am: ["Copula", "PresentTense"],
5381
5370
  were: ["Copula", "PastTense"],
5382
5371
  // possessive pronouns
5383
- her: fe,
5384
- his: fe,
5385
- hers: fe,
5386
- their: fe,
5387
- theirs: fe,
5388
- themselves: fe,
5389
- your: fe,
5390
- our: fe,
5391
- ours: fe,
5392
- my: fe,
5393
- its: fe,
5372
+ her: de,
5373
+ his: de,
5374
+ hers: de,
5375
+ their: de,
5376
+ theirs: de,
5377
+ themselves: de,
5378
+ your: de,
5379
+ our: de,
5380
+ ours: de,
5381
+ my: de,
5382
+ its: de,
5394
5383
  // misc
5395
5384
  vs: ["Conjunction", "Abbreviation"],
5396
5385
  if: ["Condition", "Preposition"],
@@ -5848,7 +5837,7 @@ const f = "Singular", G = {
5848
5837
  //service-wise
5849
5838
  // they: n,//snakes they
5850
5839
  }
5851
- }, p = "Infinitive", Z = {
5840
+ }, p = "Infinitive", Q = {
5852
5841
  beforeTags: {
5853
5842
  Modal: p,
5854
5843
  //would date
@@ -6017,11 +6006,11 @@ const f = "Singular", G = {
6017
6006
  //float away
6018
6007
  }
6019
6008
  }, ng = {
6020
- beforeTags: Object.assign({}, Z.beforeTags, G.beforeTags, {}),
6021
- afterTags: Object.assign({}, Z.afterTags, G.afterTags, {}),
6022
- beforeWords: Object.assign({}, Z.beforeWords, G.beforeWords, {}),
6023
- afterWords: Object.assign({}, Z.afterWords, G.afterWords, {})
6024
- }, g = "Adjective", B = {
6009
+ beforeTags: Object.assign({}, Q.beforeTags, G.beforeTags, {}),
6010
+ afterTags: Object.assign({}, Q.afterTags, G.afterTags, {}),
6011
+ beforeWords: Object.assign({}, Q.beforeWords, G.beforeWords, {}),
6012
+ afterWords: Object.assign({}, Q.afterWords, G.afterWords, {})
6013
+ }, g = "Adjective", M = {
6025
6014
  beforeTags: {
6026
6015
  Determiner: g,
6027
6016
  //the detailed
@@ -6143,7 +6132,7 @@ const f = "Singular", G = {
6143
6132
  //as shocking as
6144
6133
  //about: jj, //cool about
6145
6134
  }
6146
- }, b = "Gerund", Re = {
6135
+ }, b = "Gerund", Je = {
6147
6136
  beforeTags: {
6148
6137
  // Verb: g, // loves shocking
6149
6138
  Adverb: b,
@@ -6241,28 +6230,28 @@ const f = "Singular", G = {
6241
6230
  down: b
6242
6231
  //
6243
6232
  }
6244
- }, k = "Gerund", Me = "Adjective", rg = {
6245
- beforeTags: Object.assign({}, B.beforeTags, Re.beforeTags, {
6233
+ }, k = "Gerund", Be = "Adjective", rg = {
6234
+ beforeTags: Object.assign({}, M.beforeTags, Je.beforeTags, {
6246
6235
  // Copula: jj,
6247
6236
  Imperative: k,
6248
6237
  //recommend living in
6249
- Infinitive: Me,
6238
+ Infinitive: Be,
6250
6239
  //say charming things
6251
6240
  // PresentTense: g,
6252
6241
  Plural: k
6253
6242
  //kids cutting
6254
6243
  }),
6255
- afterTags: Object.assign({}, B.afterTags, Re.afterTags, {
6256
- Noun: Me
6244
+ afterTags: Object.assign({}, M.afterTags, Je.afterTags, {
6245
+ Noun: Be
6257
6246
  //shocking ignorance
6258
6247
  // Plural: jj, //shocking lies
6259
6248
  }),
6260
- beforeWords: Object.assign({}, B.beforeWords, Re.beforeWords, {
6261
- is: Me,
6249
+ beforeWords: Object.assign({}, M.beforeWords, Je.beforeWords, {
6250
+ is: Be,
6262
6251
  are: k,
6263
6252
  //is overflowing: JJ, are overflowing : VB ??
6264
- was: Me,
6265
- of: Me,
6253
+ was: Be,
6254
+ of: Be,
6266
6255
  //of varying
6267
6256
  suggest: k,
6268
6257
  suggests: k,
@@ -6282,8 +6271,8 @@ const f = "Singular", G = {
6282
6271
  avoid: k,
6283
6272
  avoided: k,
6284
6273
  avoiding: k,
6285
- except: Me,
6286
- accept: Me,
6274
+ except: Be,
6275
+ accept: Be,
6287
6276
  assess: k,
6288
6277
  explore: k,
6289
6278
  fear: k,
@@ -6292,10 +6281,10 @@ const f = "Singular", G = {
6292
6281
  question: k,
6293
6282
  help: k,
6294
6283
  embrace: k,
6295
- with: Me
6284
+ with: Be
6296
6285
  //filled with daring
6297
6286
  }),
6298
- afterWords: Object.assign({}, B.afterWords, Re.afterWords, {
6287
+ afterWords: Object.assign({}, M.afterWords, Je.afterWords, {
6299
6288
  to: k,
6300
6289
  not: k,
6301
6290
  //trying not to car
@@ -6315,9 +6304,9 @@ const f = "Singular", G = {
6315
6304
  // Pronoun: 'Noun'//as an adult i
6316
6305
  }
6317
6306
  }, og = {
6318
- beforeTags: Object.assign({}, B.beforeTags, G.beforeTags, si.beforeTags),
6319
- afterTags: Object.assign({}, B.afterTags, G.afterTags, si.afterTags),
6320
- beforeWords: Object.assign({}, B.beforeWords, G.beforeWords, {
6307
+ beforeTags: Object.assign({}, M.beforeTags, G.beforeTags, si.beforeTags),
6308
+ afterTags: Object.assign({}, M.afterTags, G.afterTags, si.afterTags),
6309
+ beforeWords: Object.assign({}, M.beforeWords, G.beforeWords, {
6321
6310
  // are representative
6322
6311
  are: "Adjective",
6323
6312
  is: "Adjective",
@@ -6329,7 +6318,7 @@ const f = "Singular", G = {
6329
6318
  out: "Adjective"
6330
6319
  //comes out fine
6331
6320
  }),
6332
- afterWords: Object.assign({}, B.afterWords, G.afterWords)
6321
+ afterWords: Object.assign({}, M.afterWords, G.afterWords)
6333
6322
  }, y = "PastTense", Ht = "Adjective", nn = {
6334
6323
  beforeTags: {
6335
6324
  Adverb: y,
@@ -6431,10 +6420,10 @@ const f = "Singular", G = {
6431
6420
  about: Ht
6432
6421
  }
6433
6422
  }, ig = {
6434
- beforeTags: Object.assign({}, B.beforeTags, nn.beforeTags),
6435
- afterTags: Object.assign({}, B.afterTags, nn.afterTags),
6436
- beforeWords: Object.assign({}, B.beforeWords, nn.beforeWords),
6437
- afterWords: Object.assign({}, B.afterWords, nn.afterWords)
6423
+ beforeTags: Object.assign({}, M.beforeTags, nn.beforeTags),
6424
+ afterTags: Object.assign({}, M.afterTags, nn.afterTags),
6425
+ beforeWords: Object.assign({}, M.beforeWords, nn.beforeWords),
6426
+ afterWords: Object.assign({}, M.afterWords, nn.afterWords)
6438
6427
  }, ag = {
6439
6428
  afterTags: {
6440
6429
  Noun: "Adjective",
@@ -6443,13 +6432,13 @@ const f = "Singular", G = {
6443
6432
  //clean and excellent
6444
6433
  }
6445
6434
  }, sg = {
6446
- beforeTags: Object.assign({}, B.beforeTags, Z.beforeTags, {
6435
+ beforeTags: Object.assign({}, M.beforeTags, Q.beforeTags, {
6447
6436
  // always clean
6448
6437
  Adverb: void 0,
6449
6438
  Negative: void 0
6450
6439
  }),
6451
- afterTags: Object.assign({}, B.afterTags, Z.afterTags, ag.afterTags),
6452
- beforeWords: Object.assign({}, B.beforeWords, Z.beforeWords, {
6440
+ afterTags: Object.assign({}, M.afterTags, Q.afterTags, ag.afterTags),
6441
+ beforeWords: Object.assign({}, M.beforeWords, Q.beforeWords, {
6453
6442
  // have seperate contracts
6454
6443
  have: void 0,
6455
6444
  had: void 0,
@@ -6461,7 +6450,7 @@ const f = "Singular", G = {
6461
6450
  // be sure
6462
6451
  be: "Adjective"
6463
6452
  }),
6464
- afterWords: Object.assign({}, B.afterWords, Z.afterWords, {
6453
+ afterWords: Object.assign({}, M.afterWords, Q.afterWords, {
6465
6454
  to: void 0,
6466
6455
  //slick to the touch
6467
6456
  as: "Adjective"
@@ -6505,25 +6494,25 @@ const f = "Singular", G = {
6505
6494
  them: "Gerund"
6506
6495
  }
6507
6496
  }, ug = {
6508
- beforeTags: Object.assign({}, Re.beforeTags, G.beforeTags, rn.beforeTags),
6509
- afterTags: Object.assign({}, Re.afterTags, G.afterTags, rn.afterTags),
6510
- beforeWords: Object.assign({}, Re.beforeWords, G.beforeWords, rn.beforeWords),
6511
- afterWords: Object.assign({}, Re.afterWords, G.afterWords, rn.afterWords)
6497
+ beforeTags: Object.assign({}, Je.beforeTags, G.beforeTags, rn.beforeTags),
6498
+ afterTags: Object.assign({}, Je.afterTags, G.afterTags, rn.afterTags),
6499
+ beforeWords: Object.assign({}, Je.beforeWords, G.beforeWords, rn.beforeWords),
6500
+ afterWords: Object.assign({}, Je.afterWords, G.afterWords, rn.afterWords)
6512
6501
  }, pt = "Singular", Ze = "Infinitive", cg = {
6513
- beforeTags: Object.assign({}, Z.beforeTags, G.beforeTags, {
6502
+ beforeTags: Object.assign({}, Q.beforeTags, G.beforeTags, {
6514
6503
  // Noun: undefined
6515
6504
  Adjective: pt,
6516
6505
  //great name
6517
6506
  Particle: pt
6518
6507
  //brought under control
6519
6508
  }),
6520
- afterTags: Object.assign({}, Z.afterTags, G.afterTags, {
6509
+ afterTags: Object.assign({}, Q.afterTags, G.afterTags, {
6521
6510
  ProperNoun: Ze,
6522
6511
  Gerund: Ze,
6523
6512
  Adjective: Ze,
6524
6513
  Copula: pt
6525
6514
  }),
6526
- beforeWords: Object.assign({}, Z.beforeWords, G.beforeWords, {
6515
+ beforeWords: Object.assign({}, Q.beforeWords, G.beforeWords, {
6527
6516
  // is time
6528
6517
  is: pt,
6529
6518
  was: pt,
@@ -6532,7 +6521,7 @@ const f = "Singular", G = {
6532
6521
  have: null
6533
6522
  //have cash
6534
6523
  }),
6535
- afterWords: Object.assign({}, Z.afterWords, G.afterWords, {
6524
+ afterWords: Object.assign({}, Q.afterWords, G.afterWords, {
6536
6525
  // for: vb,//work for
6537
6526
  instead: Ze,
6538
6527
  // that: nn,//subject that was
@@ -6592,43 +6581,43 @@ const f = "Singular", G = {
6592
6581
  wanted: x
6593
6582
  // and:true, //sue and jeff
6594
6583
  }
6595
- }, H = "Month", lg = "Person", on = {
6584
+ }, O = "Month", lg = "Person", on = {
6596
6585
  beforeTags: {
6597
- Date: H,
6598
- Value: H
6586
+ Date: O,
6587
+ Value: O
6599
6588
  },
6600
6589
  afterTags: {
6601
- Date: H,
6602
- Value: H
6590
+ Date: O,
6591
+ Value: O
6603
6592
  },
6604
6593
  beforeWords: {
6605
- by: H,
6606
- in: H,
6607
- on: H,
6608
- during: H,
6609
- after: H,
6610
- before: H,
6611
- between: H,
6612
- until: H,
6613
- til: H,
6614
- sometime: H,
6615
- of: H,
6594
+ by: O,
6595
+ in: O,
6596
+ on: O,
6597
+ during: O,
6598
+ after: O,
6599
+ before: O,
6600
+ between: O,
6601
+ until: O,
6602
+ til: O,
6603
+ sometime: O,
6604
+ of: O,
6616
6605
  //5th of april
6617
- this: H,
6606
+ this: O,
6618
6607
  //this april
6619
- next: H,
6620
- last: H,
6621
- previous: H,
6622
- following: H,
6608
+ next: O,
6609
+ last: O,
6610
+ previous: O,
6611
+ following: O,
6623
6612
  with: lg
6624
6613
  // for: p,
6625
6614
  },
6626
6615
  afterWords: {
6627
- sometime: H,
6628
- in: H,
6629
- of: H,
6630
- until: H,
6631
- the: H
6616
+ sometime: O,
6617
+ in: O,
6618
+ of: O,
6619
+ until: O,
6620
+ the: O
6632
6621
  //june the 4th
6633
6622
  }
6634
6623
  }, hg = {
@@ -6642,10 +6631,10 @@ const f = "Singular", G = {
6642
6631
  beforeWords: Object.assign({}, G.beforeWords, V.beforeWords, { i: "Infinitive", we: "Infinitive" }),
6643
6632
  afterWords: Object.assign({}, G.afterWords, V.afterWords)
6644
6633
  }, fg = {
6645
- beforeTags: Object.assign({}, G.beforeTags, V.beforeTags, Z.beforeTags),
6646
- afterTags: Object.assign({}, G.afterTags, V.afterTags, Z.afterTags),
6647
- beforeWords: Object.assign({}, G.beforeWords, V.beforeWords, Z.beforeWords),
6648
- afterWords: Object.assign({}, G.afterWords, V.afterWords, Z.afterWords)
6634
+ beforeTags: Object.assign({}, G.beforeTags, V.beforeTags, Q.beforeTags),
6635
+ afterTags: Object.assign({}, G.afterTags, V.afterTags, Q.afterTags),
6636
+ beforeWords: Object.assign({}, G.beforeWords, V.beforeWords, Q.beforeWords),
6637
+ afterWords: Object.assign({}, G.afterWords, V.afterWords, Q.afterWords)
6649
6638
  }, J = "Place", an = {
6650
6639
  beforeTags: {
6651
6640
  Place: J
@@ -6678,29 +6667,29 @@ const f = "Singular", G = {
6678
6667
  beforeWords: Object.assign({}, an.beforeWords, V.beforeWords),
6679
6668
  afterWords: Object.assign({}, an.afterWords, V.afterWords)
6680
6669
  }, gg = {
6681
- beforeTags: Object.assign({}, V.beforeTags, B.beforeTags),
6682
- afterTags: Object.assign({}, V.afterTags, B.afterTags),
6683
- beforeWords: Object.assign({}, V.beforeWords, B.beforeWords),
6684
- afterWords: Object.assign({}, V.afterWords, B.afterWords)
6685
- }, le = "Unit", mg = {
6686
- beforeTags: { Value: le },
6670
+ beforeTags: Object.assign({}, V.beforeTags, M.beforeTags),
6671
+ afterTags: Object.assign({}, V.afterTags, M.afterTags),
6672
+ beforeWords: Object.assign({}, V.beforeWords, M.beforeWords),
6673
+ afterWords: Object.assign({}, V.afterWords, M.afterWords)
6674
+ }, ce = "Unit", mg = {
6675
+ beforeTags: { Value: ce },
6687
6676
  afterTags: {},
6688
6677
  beforeWords: {
6689
- per: le,
6690
- every: le,
6691
- each: le,
6692
- square: le,
6678
+ per: ce,
6679
+ every: ce,
6680
+ each: ce,
6681
+ square: ce,
6693
6682
  //square km
6694
- cubic: le,
6695
- sq: le,
6696
- metric: le
6683
+ cubic: ce,
6684
+ sq: ce,
6685
+ metric: ce
6697
6686
  //metric ton
6698
6687
  },
6699
6688
  afterWords: {
6700
- per: le,
6701
- squared: le,
6702
- cubed: le,
6703
- long: le
6689
+ per: ce,
6690
+ squared: ce,
6691
+ cubed: ce,
6692
+ long: ce
6704
6693
  //foot long
6705
6694
  }
6706
6695
  }, At = {
@@ -6755,13 +6744,13 @@ At["Plural|Verb"] = {
6755
6744
  //changes seven gears
6756
6745
  })
6757
6746
  };
6758
- const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W = "PastTense", gt = "Adverb", re = "Plural", F = "Actor", un = "Verb", q = "Noun", bg = "ProperNoun", pe = "LastName", ui = "Modal", N = "Place", Un = "Participle", yg = [
6747
+ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W = "PastTense", gt = "Adverb", re = "Plural", F = "Actor", un = "Verb", U = "Noun", bg = "ProperNoun", fe = "LastName", ui = "Modal", $ = "Place", Un = "Participle", yg = [
6759
6748
  null,
6760
6749
  null,
6761
6750
  {
6762
6751
  //2-letter
6763
6752
  ea: w,
6764
- ia: q,
6753
+ ia: U,
6765
6754
  ic: A,
6766
6755
  ly: gt,
6767
6756
  "'n": un,
@@ -6776,7 +6765,7 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6776
6765
  "'ll": ui,
6777
6766
  "'re": "Copula",
6778
6767
  azy: A,
6779
- eer: q,
6768
+ eer: U,
6780
6769
  end: un,
6781
6770
  ped: W,
6782
6771
  ffy: A,
@@ -6791,8 +6780,8 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6791
6780
  // oid: Adj,
6792
6781
  ous: A,
6793
6782
  que: A,
6794
- ger: q,
6795
- ber: q,
6783
+ ger: U,
6784
+ ber: U,
6796
6785
  rol: w,
6797
6786
  sis: w,
6798
6787
  ogy: w,
@@ -6813,8 +6802,8 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6813
6802
  oze: L,
6814
6803
  ful: A,
6815
6804
  bal: A,
6816
- ton: q,
6817
- pur: N
6805
+ ton: U,
6806
+ pur: $
6818
6807
  },
6819
6808
  {
6820
6809
  //4-letter
@@ -6829,14 +6818,14 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6829
6818
  cted: W,
6830
6819
  dged: W,
6831
6820
  ield: w,
6832
- akis: pe,
6821
+ akis: fe,
6833
6822
  cede: L,
6834
- chuk: pe,
6835
- czyk: pe,
6823
+ chuk: fe,
6824
+ czyk: fe,
6836
6825
  ects: Xe,
6837
6826
  iend: w,
6838
6827
  ends: un,
6839
- enko: pe,
6828
+ enko: fe,
6840
6829
  ette: w,
6841
6830
  iary: w,
6842
6831
  wner: w,
@@ -6856,18 +6845,18 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6856
6845
  less: A,
6857
6846
  llen: A,
6858
6847
  made: A,
6859
- nsen: pe,
6848
+ nsen: fe,
6860
6849
  oses: Xe,
6861
6850
  ould: ui,
6862
6851
  some: A,
6863
- sson: pe,
6852
+ sson: fe,
6864
6853
  ians: re,
6865
6854
  // tage: Inf,
6866
6855
  tion: w,
6867
- tage: q,
6856
+ tage: U,
6868
6857
  ique: w,
6869
6858
  tive: A,
6870
- tors: q,
6859
+ tors: U,
6871
6860
  vice: w,
6872
6861
  lier: w,
6873
6862
  fier: w,
@@ -6913,17 +6902,17 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6913
6902
  uent: A,
6914
6903
  erer: F,
6915
6904
  //caterer
6916
- bury: N,
6917
- dorf: q,
6918
- esty: q,
6919
- wych: N,
6920
- dale: N,
6921
- folk: N,
6922
- vale: N,
6923
- abad: N,
6924
- sham: N,
6925
- wick: N,
6926
- view: N
6905
+ bury: $,
6906
+ dorf: U,
6907
+ esty: U,
6908
+ wych: $,
6909
+ dale: $,
6910
+ folk: $,
6911
+ vale: $,
6912
+ abad: $,
6913
+ sham: $,
6914
+ wick: $,
6915
+ view: $
6927
6916
  },
6928
6917
  {
6929
6918
  //5-letter
@@ -6939,9 +6928,9 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6939
6928
  fully: gt,
6940
6929
  ishes: Xe,
6941
6930
  ities: re,
6942
- marek: pe,
6943
- nssen: pe,
6944
- ology: q,
6931
+ marek: fe,
6932
+ nssen: fe,
6933
+ ology: U,
6945
6934
  osome: w,
6946
6935
  tment: w,
6947
6936
  ports: re,
@@ -6951,11 +6940,11 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6951
6940
  tures: re,
6952
6941
  wards: gt,
6953
6942
  where: gt,
6954
- archy: q,
6955
- pathy: q,
6956
- opoly: q,
6957
- embly: q,
6958
- phate: q,
6943
+ archy: U,
6944
+ pathy: U,
6945
+ opoly: U,
6946
+ embly: U,
6947
+ phate: U,
6959
6948
  ndent: w,
6960
6949
  scent: w,
6961
6950
  onist: F,
@@ -6974,49 +6963,49 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
6974
6963
  rient: w,
6975
6964
  dient: w,
6976
6965
  maker: F,
6977
- burgh: N,
6978
- mouth: N,
6979
- ceter: N,
6980
- ville: N,
6981
- hurst: N,
6982
- stead: N,
6983
- endon: N,
6984
- brook: N,
6985
- shire: N,
6986
- worth: q,
6966
+ burgh: $,
6967
+ mouth: $,
6968
+ ceter: $,
6969
+ ville: $,
6970
+ hurst: $,
6971
+ stead: $,
6972
+ endon: $,
6973
+ brook: $,
6974
+ shire: $,
6975
+ worth: U,
6987
6976
  field: bg,
6988
- ridge: N
6977
+ ridge: $
6989
6978
  },
6990
6979
  {
6991
6980
  //6-letter
6992
- auskas: pe,
6981
+ auskas: fe,
6993
6982
  parent: w,
6994
6983
  cedent: w,
6995
6984
  ionary: w,
6996
6985
  cklist: w,
6997
- brooke: N,
6986
+ brooke: $,
6998
6987
  keeper: F,
6999
6988
  logist: F,
7000
6989
  teenth: "Value",
7001
6990
  worker: F,
7002
6991
  master: F,
7003
6992
  writer: F,
7004
- brough: N,
7005
- cester: N,
7006
- ington: N,
7007
- cliffe: N,
7008
- ingham: N
6993
+ brough: $,
6994
+ cester: $,
6995
+ ington: $,
6996
+ cliffe: $,
6997
+ ingham: $
7009
6998
  },
7010
6999
  {
7011
7000
  //7-letter
7012
- chester: N,
7001
+ chester: $,
7013
7002
  logists: F,
7014
- opoulos: pe,
7015
- borough: N,
7016
- sdottir: pe
7003
+ opoulos: fe,
7004
+ borough: $,
7005
+ sdottir: fe
7017
7006
  //swedish female
7018
7007
  }
7019
- ], oe = "Adjective", j = "Noun", St = "Verb", vg = [
7008
+ ], oe = "Adjective", N = "Noun", St = "Verb", vg = [
7020
7009
  null,
7021
7010
  null,
7022
7011
  {
@@ -7024,27 +7013,27 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
7024
7013
  },
7025
7014
  {
7026
7015
  // 3-letter
7027
- neo: j,
7028
- bio: j,
7016
+ neo: N,
7017
+ bio: N,
7029
7018
  // pre: Noun,
7030
7019
  "de-": St,
7031
7020
  "re-": St,
7032
7021
  "un-": St,
7033
- "ex-": j
7022
+ "ex-": N
7034
7023
  },
7035
7024
  {
7036
7025
  // 4-letter
7037
- anti: j,
7038
- auto: j,
7026
+ anti: N,
7027
+ auto: N,
7039
7028
  faux: oe,
7040
- hexa: j,
7041
- kilo: j,
7042
- mono: j,
7043
- nano: j,
7044
- octa: j,
7045
- poly: j,
7029
+ hexa: N,
7030
+ kilo: N,
7031
+ mono: N,
7032
+ nano: N,
7033
+ octa: N,
7034
+ poly: N,
7046
7035
  semi: oe,
7047
- tele: j,
7036
+ tele: N,
7048
7037
  "pro-": oe,
7049
7038
  "mis-": St,
7050
7039
  "dis-": St,
@@ -7053,22 +7042,22 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
7053
7042
  },
7054
7043
  {
7055
7044
  // 5-letter
7056
- anglo: j,
7057
- centi: j,
7058
- ethno: j,
7059
- ferro: j,
7060
- grand: j,
7061
- hepta: j,
7062
- hydro: j,
7063
- intro: j,
7064
- macro: j,
7065
- micro: j,
7066
- milli: j,
7067
- nitro: j,
7068
- penta: j,
7045
+ anglo: N,
7046
+ centi: N,
7047
+ ethno: N,
7048
+ ferro: N,
7049
+ grand: N,
7050
+ hepta: N,
7051
+ hydro: N,
7052
+ intro: N,
7053
+ macro: N,
7054
+ micro: N,
7055
+ milli: N,
7056
+ nitro: N,
7057
+ penta: N,
7069
7058
  quasi: oe,
7070
- radio: j,
7071
- tetra: j,
7059
+ radio: N,
7060
+ tetra: N,
7072
7061
  "omni-": oe,
7073
7062
  "post-": oe
7074
7063
  },
@@ -7084,7 +7073,7 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
7084
7073
  },
7085
7074
  {
7086
7075
  // 7-letter
7087
- electro: j
7076
+ electro: N
7088
7077
  }
7089
7078
  ], S = "Adjective", cn = "Infinitive", ln = "PresentTense", Ne = "Singular", X = "PastTense", ci = "Adverb", je = "Expression", li = "Actor", hi = "Verb", di = "Noun", hn = "LastName", wg = {
7090
7079
  a: [
@@ -7220,66 +7209,66 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
7220
7209
  [/[ea]{2}zy$/, S],
7221
7210
  [/.[^aeiou]ity$/, Ne]
7222
7211
  ]
7223
- }, Q = "Verb", D = "Noun", Pg = {
7212
+ }, q = "Verb", I = "Noun", Pg = {
7224
7213
  // looking at the previous word's tags:
7225
7214
  leftTags: [
7226
- ["Adjective", D],
7227
- ["Possessive", D],
7228
- ["Determiner", D],
7229
- ["Adverb", Q],
7230
- ["Pronoun", Q],
7231
- ["Value", D],
7232
- ["Ordinal", D],
7233
- ["Modal", Q],
7234
- ["Superlative", D],
7235
- ["Demonym", D],
7215
+ ["Adjective", I],
7216
+ ["Possessive", I],
7217
+ ["Determiner", I],
7218
+ ["Adverb", q],
7219
+ ["Pronoun", q],
7220
+ ["Value", I],
7221
+ ["Ordinal", I],
7222
+ ["Modal", q],
7223
+ ["Superlative", I],
7224
+ ["Demonym", I],
7236
7225
  ["Honorific", "Person"]
7237
7226
  //dr. Smith
7238
7227
  ],
7239
7228
  // looking at the previous word:
7240
7229
  leftWords: [
7241
- ["i", Q],
7242
- ["first", D],
7243
- ["it", Q],
7244
- ["there", Q],
7245
- ["not", Q],
7246
- ["because", D],
7247
- ["if", D],
7248
- ["but", D],
7249
- ["who", Q],
7250
- ["this", D],
7251
- ["his", D],
7252
- ["when", D],
7253
- ["you", Q],
7230
+ ["i", q],
7231
+ ["first", I],
7232
+ ["it", q],
7233
+ ["there", q],
7234
+ ["not", q],
7235
+ ["because", I],
7236
+ ["if", I],
7237
+ ["but", I],
7238
+ ["who", q],
7239
+ ["this", I],
7240
+ ["his", I],
7241
+ ["when", I],
7242
+ ["you", q],
7254
7243
  ["very", "Adjective"],
7255
- ["old", D],
7256
- ["never", Q],
7257
- ["before", D],
7258
- ["a", D],
7259
- ["the", D],
7260
- ["been", Q]
7244
+ ["old", I],
7245
+ ["never", q],
7246
+ ["before", I],
7247
+ ["a", I],
7248
+ ["the", I],
7249
+ ["been", q]
7261
7250
  ],
7262
7251
  // looking at the next word's tags:
7263
7252
  rightTags: [
7264
- ["Copula", D],
7265
- ["PastTense", D],
7266
- ["Conjunction", D],
7267
- ["Modal", D]
7253
+ ["Copula", I],
7254
+ ["PastTense", I],
7255
+ ["Conjunction", I],
7256
+ ["Modal", I]
7268
7257
  ],
7269
7258
  // looking at the next word:
7270
7259
  rightWords: [
7271
- ["there", Q],
7272
- ["me", Q],
7260
+ ["there", q],
7261
+ ["me", q],
7273
7262
  ["man", "Adjective"],
7274
7263
  // ['only', vb],
7275
- ["him", Q],
7276
- ["it", Q],
7264
+ ["him", q],
7265
+ ["it", q],
7277
7266
  //relaunch it
7278
- ["were", D],
7279
- ["took", D],
7280
- ["himself", Q],
7281
- ["went", D],
7282
- ["who", D],
7267
+ ["were", I],
7268
+ ["took", I],
7269
+ ["himself", q],
7270
+ ["went", I],
7271
+ ["who", I],
7283
7272
  ["jr", "Person"]
7284
7273
  ]
7285
7274
  }, ct = {
@@ -7901,22 +7890,22 @@ const A = "Adjective", L = "Infinitive", Xe = "PresentTense", w = "Singular", W
7901
7890
  [/(ss)$/i, "$1"],
7902
7891
  [/(ic)s$/i, "$1"],
7903
7892
  [/s$/i, ""]
7904
- ], Mg = function(e) {
7893
+ ], Bg = function(e) {
7905
7894
  return Object.keys(e).reduce((t, n) => (t[e[n]] = n, t), {});
7906
7895
  }, cs = function(e, t) {
7907
- const { irregularPlurals: n } = t.two, r = Mg(n);
7896
+ const { irregularPlurals: n } = t.two, r = Bg(n);
7908
7897
  if (r.hasOwnProperty(e))
7909
7898
  return r[e];
7910
7899
  for (let o = 0; o < fn.length; o++)
7911
7900
  if (fn[o][0].test(e) === !0)
7912
7901
  return e = e.replace(fn[o][0], fn[o][1]), e;
7913
7902
  return e;
7914
- }, Bg = function(e, t) {
7903
+ }, Mg = function(e, t) {
7915
7904
  const n = [e], r = Sn(e, t);
7916
7905
  r !== e && n.push(r);
7917
7906
  const o = cs(e, t);
7918
7907
  return o !== e && n.push(o), n;
7919
- }, Vg = { toPlural: Sn, toSingular: cs, all: Bg };
7908
+ }, Vg = { toPlural: Sn, toSingular: cs, all: Mg };
7920
7909
  let at = {
7921
7910
  Gerund: ["ing"],
7922
7911
  Actor: ["erer"],
@@ -8043,7 +8032,7 @@ const ls = function(e) {
8043
8032
  else
8044
8033
  return e;
8045
8034
  return c && (l += " " + c), s && (l = s + " " + l), l;
8046
- }, Wg = (e) => / /.test(e) ? e.split(/ /) : [e, ""], Rr = function(e, t) {
8035
+ }, Wg = (e) => / /.test(e) ? e.split(/ /) : [e, ""], Jr = function(e, t) {
8047
8036
  const { toPast: n, toPresent: r, toGerund: o, toParticiple: i } = t.two.models;
8048
8037
  if (e === "be")
8049
8038
  return {
@@ -8068,22 +8057,22 @@ const ls = function(e) {
8068
8057
  u[l] += " " + s;
8069
8058
  }), u;
8070
8059
  }, Kg = function(e, t) {
8071
- const n = Rr(e, t);
8060
+ const n = Jr(e, t);
8072
8061
  return delete n.FutureTense, Object.values(n).filter((r) => r);
8073
8062
  }, _g = {
8074
8063
  toInfinitive: vr,
8075
- conjugate: Rr,
8064
+ conjugate: Jr,
8076
8065
  all: Kg
8077
- }, Jr = function(e, t) {
8066
+ }, Rr = function(e, t) {
8078
8067
  const n = t.two.models.toSuperlative;
8079
8068
  return ae(e, n);
8080
8069
  }, Ur = function(e, t) {
8081
8070
  const n = t.two.models.toComparative;
8082
8071
  return ae(e, n);
8083
- }, Rg = function(e, t) {
8072
+ }, Jg = function(e, t) {
8084
8073
  const n = t.two.models.fromComparative;
8085
8074
  return ae(e, n);
8086
- }, Jg = function(e, t) {
8075
+ }, Rg = function(e, t) {
8087
8076
  const n = t.two.models.fromSuperlative;
8088
8077
  return ae(e, n);
8089
8078
  }, Ug = function(e, t) {
@@ -8270,15 +8259,15 @@ const ls = function(e) {
8270
8259
  return t || (t = e + "ly"), t;
8271
8260
  }, em = function(e, t) {
8272
8261
  let n = [e];
8273
- return n.push(Jr(e, t)), n.push(Ur(e, t)), n.push(ds(e)), n = n.filter((r) => r), n = new Set(n), Array.from(n);
8262
+ return n.push(Rr(e, t)), n.push(Ur(e, t)), n.push(ds(e)), n = n.filter((r) => r), n = new Set(n), Array.from(n);
8274
8263
  }, tm = {
8275
- toSuperlative: Jr,
8264
+ toSuperlative: Rr,
8276
8265
  toComparative: Ur,
8277
8266
  toAdverb: ds,
8278
8267
  toNoun: Ug,
8279
8268
  fromAdverb: Xg,
8280
- fromSuperlative: Jg,
8281
- fromComparative: Rg,
8269
+ fromSuperlative: Rg,
8270
+ fromComparative: Jg,
8282
8271
  all: em
8283
8272
  }, nm = {
8284
8273
  noun: Vg,
@@ -8513,10 +8502,10 @@ const ls = function(e) {
8513
8502
  e[n] === "Uncountable" && (t.two.uncountable[n] = !0, e[n] = "Uncountable");
8514
8503
  }), t;
8515
8504
  }, wi = function(e, t, n) {
8516
- const r = Rr(e, Pr);
8505
+ const r = Jr(e, Pr);
8517
8506
  t[r.PastTense] = t[r.PastTense] || "PastTense", t[r.Gerund] = t[r.Gerund] || "Gerund", n === !0 && (t[r.PresentTense] = t[r.PresentTense] || "PresentTense");
8518
8507
  }, Pi = function(e, t, n) {
8519
- const r = Jr(e, n);
8508
+ const r = Rr(e, n);
8520
8509
  t[r] = t[r] || "Superlative";
8521
8510
  const o = Ur(e, n);
8522
8511
  t[o] = t[o] || "Comparative";
@@ -8746,7 +8735,7 @@ const pm = function(e, t, n, r) {
8746
8735
  }, zm = function(e, t, n, r) {
8747
8736
  const o = r.methods.one.setTag, i = e[t], a = ["PastTense", "PresentTense", "Auxiliary", "Modal", "Particle"];
8748
8737
  i.tags.has("Verb") && (a.find((u) => i.tags.has(u)) || o([i], "Infinitive", r, null, "2-verb-type''"));
8749
- }, gs = /^[A-Z]('s|,)?$/, ms = /^[A-Z-]+$/, bs = /^[A-Z]+s$/, Mm = /([A-Z]\.)+[A-Z]?,?$/, Bm = /[A-Z]{2,}('s|,)?$/, Vm = /([a-z]\.)+[a-z]\.?$/, ys = {
8738
+ }, gs = /^[A-Z]('s|,)?$/, ms = /^[A-Z-]+$/, bs = /^[A-Z]+s$/, Bm = /([A-Z]\.)+[A-Z]?,?$/, Mm = /[A-Z]{2,}('s|,)?$/, Vm = /([a-z]\.)+[a-z]\.?$/, ys = {
8750
8739
  I: !0,
8751
8740
  A: !0
8752
8741
  }, Lm = {
@@ -8762,7 +8751,7 @@ const pm = function(e, t, n, r) {
8762
8751
  n = n.replace(/s$/, "");
8763
8752
  else
8764
8753
  return !1;
8765
- return n.length > 5 || ys.hasOwnProperty(n) || t.one.lexicon.hasOwnProperty(e.normal) ? !1 : Mm.test(n) === !0 || Vm.test(n) === !0 || gs.test(n) === !0 || Bm.test(n) === !0;
8754
+ return n.length > 5 || ys.hasOwnProperty(n) || t.one.lexicon.hasOwnProperty(e.normal) ? !1 : Bm.test(n) === !0 || Vm.test(n) === !0 || gs.test(n) === !0 || Mm.test(n) === !0;
8766
8755
  }, Km = function(e, t, n) {
8767
8756
  const r = e[t];
8768
8757
  return r.tags.has("RomanNumeral") || r.tags.has("Acronym") || r.frozen ? null : Wm(r, n) ? (r.tags.clear(), z(r, ["Acronym", "Noun"], "3-no-period-acronym"), Lm[r.normal] === !0 && z(r, "Place", "3-place-acronym"), bs.test(r.text) === !0 && z(r, "Plural", "3-plural-acronym"), !0) : !ys.hasOwnProperty(r.text) && gs.test(r.text) ? (r.tags.clear(), z(r, ["Acronym", "Noun"], "3-one-letter-acronym"), !0) : r.tags.has("Organization") && r.text.length <= 3 ? (z(r, "Acronym", "3-org-acronym"), !0) : r.tags.has("Organization") && ms.test(r.text) && r.text.length <= 6 ? (z(r, "Acronym", "3-titlecase-acronym"), !0) : null;
@@ -8784,9 +8773,9 @@ const pm = function(e, t, n, r) {
8784
8773
  return z(s, u, "3-[neighbour]"), Zt(e, t, n), e[t].confidence = 0.2, !0;
8785
8774
  }
8786
8775
  return null;
8787
- }, Rm = (e) => /^\p{Lu}[\p{Ll}'’]/u.test(e), Ii = function(e, t, n) {
8788
- return !e || e.tags.has("FirstName") || e.tags.has("Place") ? !1 : e.tags.has("ProperNoun") || e.tags.has("Organization") || e.tags.has("Acronym") ? !0 : !n && Rm(e.text) ? t === 0 ? e.tags.has("Singular") : !0 : !1;
8789
- }, Jm = function(e, t, n, r) {
8776
+ }, Jm = (e) => /^\p{Lu}[\p{Ll}'’]/u.test(e), Ii = function(e, t, n) {
8777
+ return !e || e.tags.has("FirstName") || e.tags.has("Place") ? !1 : e.tags.has("ProperNoun") || e.tags.has("Organization") || e.tags.has("Acronym") ? !0 : !n && Jm(e.text) ? t === 0 ? e.tags.has("Singular") : !0 : !1;
8778
+ }, Rm = function(e, t, n, r) {
8790
8779
  const o = n.model.two.orgWords, i = n.methods.one.setTag, a = e[t], s = a.machine || a.normal;
8791
8780
  if (o[s] === !0 && Ii(e[t - 1], t - 1, r)) {
8792
8781
  i([e[t]], "Organization", n, null, "3-[org-word]");
@@ -8852,22 +8841,22 @@ const pm = function(e, t, n, r) {
8852
8841
  let r = !1;
8853
8842
  const o = e[t].tags;
8854
8843
  (o.size === 0 || o.size === 1 && (o.has("Hyphenated") || o.has("HashTag") || o.has("Prefix") || o.has("SlashedTerm"))) && (r = !0), r && (z(e[t], "Noun", "3-[fallback]"), Zt(e, t, n), e[t].confidence = 0.1);
8855
- }, Ym = /^[A-Z][a-z]/, ge = (e, t) => e[t].tags.has("ProperNoun") && Ym.test(e[t].text) ? "Noun" : null, Oi = (e, t, n) => t === 0 && !e[1] ? n : null, e0 = function(e, t) {
8844
+ }, Ym = /^[A-Z][a-z]/, pe = (e, t) => e[t].tags.has("ProperNoun") && Ym.test(e[t].text) ? "Noun" : null, Oi = (e, t, n) => t === 0 && !e[1] ? n : null, e0 = function(e, t) {
8856
8845
  return !e[t + 1] && e[t - 1] && e[t - 1].tags.has("Determiner") ? "Noun" : null;
8857
8846
  }, t0 = function(e, t, n) {
8858
8847
  return t === 0 && e.length > 3 ? n : null;
8859
8848
  }, Hi = {
8860
- "Adj|Gerund": (e, t) => ge(e, t),
8861
- "Adj|Noun": (e, t) => ge(e, t) || e0(e, t),
8862
- "Actor|Verb": (e, t) => ge(e, t),
8863
- "Adj|Past": (e, t) => ge(e, t),
8864
- "Adj|Present": (e, t) => ge(e, t),
8865
- "Noun|Gerund": (e, t) => ge(e, t),
8866
- "Noun|Verb": (e, t) => t > 0 && ge(e, t) || Oi(e, t, "Infinitive"),
8867
- "Plural|Verb": (e, t) => ge(e, t) || Oi(e, t, "PresentTense") || t0(e, t, "Plural"),
8868
- "Person|Noun": (e, t) => ge(e, t),
8869
- "Person|Verb": (e, t) => t !== 0 ? ge(e, t) : null,
8870
- "Person|Adj": (e, t) => t === 0 && e.length > 1 || ge(e, t) ? "Person" : null
8849
+ "Adj|Gerund": (e, t) => pe(e, t),
8850
+ "Adj|Noun": (e, t) => pe(e, t) || e0(e, t),
8851
+ "Actor|Verb": (e, t) => pe(e, t),
8852
+ "Adj|Past": (e, t) => pe(e, t),
8853
+ "Adj|Present": (e, t) => pe(e, t),
8854
+ "Noun|Gerund": (e, t) => pe(e, t),
8855
+ "Noun|Verb": (e, t) => t > 0 && pe(e, t) || Oi(e, t, "Infinitive"),
8856
+ "Plural|Verb": (e, t) => pe(e, t) || Oi(e, t, "PresentTense") || t0(e, t, "Plural"),
8857
+ "Person|Noun": (e, t) => pe(e, t),
8858
+ "Person|Verb": (e, t) => t !== 0 ? pe(e, t) : null,
8859
+ "Person|Adj": (e, t) => t === 0 && e.length > 1 || pe(e, t) ? "Person" : null
8871
8860
  }, qr = typeof process > "u" || !process.env ? self.env || {} : process.env, Si = /^(under|over|mis|re|un|dis|semi)-?/, Gi = (e, t) => {
8872
8861
  if (!e || !t)
8873
8862
  return null;
@@ -8936,7 +8925,7 @@ const pm = function(e, t, n, r) {
8936
8925
  Zt(e, o, t), i = i || _m(e, o, t), i = i || Xm(e, o, t);
8937
8926
  }
8938
8927
  for (let o = 0; o < e.length; o += 1)
8939
- e[o].frozen !== !0 && (Jm(e, o, n, r), Zm(e, o, n, r), r0(e, o, n), zm(e, o, t, n), gm(e, o, t, n));
8928
+ e[o].frozen !== !0 && (Rm(e, o, n, r), Zm(e, o, n, r), r0(e, o, n), zm(e, o, t, n), gm(e, o, t, n));
8940
8929
  i0(e, n);
8941
8930
  }, l0 = function(e) {
8942
8931
  const { methods: t, model: n, world: r } = e, o = e.docs;
@@ -9003,7 +8992,7 @@ const pm = function(e, t, n, r) {
9003
8992
  }
9004
8993
  }
9005
8994
  });
9006
- }, Mi = {
8995
+ }, Bi = {
9007
8996
  // adverbs
9008
8997
  // 'Comparative': 'RBR',
9009
8998
  // 'Superlative': 'RBS',
@@ -9071,8 +9060,8 @@ const pm = function(e, t, n, r) {
9071
9060
  return "TO";
9072
9061
  const t = e.tagRank || [];
9073
9062
  for (let n = 0; n < t.length; n += 1)
9074
- if (Mi.hasOwnProperty(t[n]))
9075
- return Mi[t[n]];
9063
+ if (Bi.hasOwnProperty(t[n]))
9064
+ return Bi[t[n]];
9076
9065
  return null;
9077
9066
  }, f0 = function(e) {
9078
9067
  e.compute("tagRank"), e.docs.forEach((t) => {
@@ -9536,10 +9525,10 @@ const pm = function(e, t, n, r) {
9536
9525
  return "would";
9537
9526
  }
9538
9527
  return !1;
9539
- }, M0 = function(e, t) {
9528
+ }, B0 = function(e, t) {
9540
9529
  const n = e[t].normal.split(S0)[0];
9541
9530
  return n === "how" || n === "what" ? [n, "did"] : z0(e, t) === "had" ? [n, "had"] : [n, "would"];
9542
- }, B0 = function(e, t) {
9531
+ }, M0 = function(e, t) {
9543
9532
  for (let n = t - 1; n >= 0; n -= 1)
9544
9533
  if (e[n].tags.has("Noun") || e[n].tags.has("Pronoun") || e[n].tags.has("Plural") || e[n].tags.has("Singular"))
9545
9534
  return e[n];
@@ -9548,7 +9537,7 @@ const pm = function(e, t, n, r) {
9548
9537
  if (e[t].normal === "ain't" || e[t].normal === "aint") {
9549
9538
  if (e[t + 1] && e[t + 1].normal === "never")
9550
9539
  return ["have"];
9551
- const r = B0(e, t);
9540
+ const r = M0(e, t);
9552
9541
  if (r) {
9553
9542
  if (r.normal === "we" || r.normal === "they")
9554
9543
  return ["are", "not"];
@@ -9573,7 +9562,7 @@ const pm = function(e, t, n, r) {
9573
9562
  //by sunday's
9574
9563
  for: !0
9575
9564
  //for sunday's
9576
- }, K0 = /* @__PURE__ */ new Set(["too", "also", "enough", "about"]), _0 = /* @__PURE__ */ new Set(["is", "are", "did", "were", "could", "should", "must", "had", "have"]), R0 = (e, t) => {
9565
+ }, K0 = /* @__PURE__ */ new Set(["too", "also", "enough", "about"]), _0 = /* @__PURE__ */ new Set(["is", "are", "did", "were", "could", "should", "must", "had", "have"]), J0 = (e, t) => {
9577
9566
  const n = e[t];
9578
9567
  if (L0.hasOwnProperty(n.machine || n.normal))
9579
9568
  return !1;
@@ -9618,7 +9607,7 @@ const pm = function(e, t, n, r) {
9618
9607
  return o.switch === "Noun|Verb";
9619
9608
  }
9620
9609
  return !!r.tags.has("Value");
9621
- }, Bi = /'/, J0 = function(e) {
9610
+ }, Mi = /'/, R0 = function(e) {
9622
9611
  e.forEach((t, n) => {
9623
9612
  t.index && (t.index[1] = n);
9624
9613
  });
@@ -9626,14 +9615,14 @@ const pm = function(e, t, n, r) {
9626
9615
  const o = t.update();
9627
9616
  o.document = [e];
9628
9617
  let i = n + r;
9629
- n > 0 && (n -= 1), e[i] && (i += 1), o.ptrs = [[0, n, i]], o.compute(["freeze", "lexicon", "preTagger", "unfreeze"]), J0(e);
9618
+ n > 0 && (n -= 1), e[i] && (i += 1), o.ptrs = [[0, n, i]], o.compute(["freeze", "lexicon", "preTagger", "unfreeze"]), R0(e);
9630
9619
  }, Vi = {
9631
9620
  // how'd
9632
- d: (e, t) => M0(e, t),
9621
+ d: (e, t) => B0(e, t),
9633
9622
  // we ain't
9634
9623
  t: (e, t) => V0(e, t),
9635
9624
  // bob's
9636
- s: (e, t, n) => R0(e, t) ? n.methods.one.setTag([e[t]], "Possessive", n, null, "2-contraction") : H0(e, t)
9625
+ s: (e, t, n) => J0(e, t) ? n.methods.one.setTag([e[t]], "Possessive", n, null, "2-contraction") : H0(e, t)
9637
9626
  }, q0 = function(e, t) {
9638
9627
  const n = t.fromText(e.join(" "));
9639
9628
  return n.compute("id"), n.docs[0];
@@ -9644,7 +9633,7 @@ const pm = function(e, t, n, r) {
9644
9633
  if (r[i].implicit)
9645
9634
  continue;
9646
9635
  let a = null;
9647
- Bi.test(r[i].normal) === !0 && (a = r[i].normal.split(Bi)[1]);
9636
+ Mi.test(r[i].normal) === !0 && (a = r[i].normal.split(Mi)[1]);
9648
9637
  let s = null;
9649
9638
  if (Vi.hasOwnProperty(a) && (s = Vi[a](r, i, t)), s) {
9650
9639
  s = q0(s, e), j0(n, [o, i], s), U0(n[o], e, i, s.length);
@@ -11237,17 +11226,17 @@ const S1 = {
11237
11226
  typeof t == "string" && (n = this.buildNet([{ match: t }]));
11238
11227
  const r = this.tokenize(e), o = F1(r, n);
11239
11228
  return o.found ? (o.compute(["index", "tagger"]), o.match(t)) : r.none();
11240
- }, M1 = {
11229
+ }, B1 = {
11241
11230
  lib: {
11242
11231
  lazy: z1
11243
11232
  }
11244
- }, B1 = function(e, t) {
11233
+ }, M1 = function(e, t) {
11245
11234
  const n = e.methods.two.transform.verb.conjugate, r = n(t, e.model);
11246
11235
  return e.has("#Gerund") ? r.Gerund : e.has("#PastTense") ? r.PastTense : e.has("#PresentTense") ? r.PresentTense : e.has("#Gerund") ? r.Gerund : t;
11247
11236
  }, V1 = function(e, t) {
11248
11237
  let n = t;
11249
11238
  return e.forEach((r) => {
11250
- r.has("#Infinitive") || (n = B1(r, t)), r.replaceWith(n);
11239
+ r.has("#Infinitive") || (n = M1(r, t)), r.replaceWith(n);
11251
11240
  }), e;
11252
11241
  }, L1 = function(e, t) {
11253
11242
  let n = t;
@@ -11268,16 +11257,16 @@ const S1 = {
11268
11257
  r = r.filter((i) => i), r = r.map((i) => `{${i}}`).join(" ");
11269
11258
  let o = this.match(r);
11270
11259
  return n && (o = o.if(n)), o.has("#Verb") ? V1(o, t) : o.has("#Noun") ? L1(o, t) : o.has("#Adverb") ? W1(o, t) : o.has("#Adjective") ? K1(o, t) : this;
11271
- }, R1 = function(e) {
11260
+ }, J1 = function(e) {
11272
11261
  e.prototype.swap = _1;
11273
- }, J1 = {
11274
- api: R1
11262
+ }, R1 = {
11263
+ api: J1
11275
11264
  };
11276
11265
  v.plugin(k0);
11277
11266
  v.plugin(X0);
11278
11267
  v.plugin(S1);
11279
- v.plugin(M1);
11280
- v.plugin(J1);
11268
+ v.plugin(B1);
11269
+ v.plugin(R1);
11281
11270
  const mt = function(e) {
11282
11271
  const { fromComparative: t, fromSuperlative: n } = e.methods.two.transform.adjective, r = e.text("normal");
11283
11272
  return e.has("#Comparative") ? t(r, e.model) : e.has("#Superlative") ? n(r, e.model) : r;
@@ -11911,10 +11900,10 @@ const ub = function(e, t, n) {
11911
11900
  t.test(n[0].pre) && (n[0].pre = n[0].pre.replace(t, ""));
11912
11901
  }), e;
11913
11902
  }
11914
- }, tr = (e) => e.split("|").reduce((t, n) => (t[n] = !0, t), {}), nr = "unicode|punctuation|whitespace|acronyms", Ri = "|case|contractions|parentheses|quotations|emoji|honorifics|debullet", Ob = "|possessives|adverbs|nouns|verbs", Hb = {
11903
+ }, tr = (e) => e.split("|").reduce((t, n) => (t[n] = !0, t), {}), nr = "unicode|punctuation|whitespace|acronyms", Ji = "|case|contractions|parentheses|quotations|emoji|honorifics|debullet", Ob = "|possessives|adverbs|nouns|verbs", Hb = {
11915
11904
  light: tr(nr),
11916
- medium: tr(nr + Ri),
11917
- heavy: tr(nr + Ri + Ob)
11905
+ medium: tr(nr + Ji),
11906
+ heavy: tr(nr + Ji + Ob)
11918
11907
  };
11919
11908
  function Sb(e) {
11920
11909
  e.prototype.normalize = function(t = "light") {
@@ -11928,7 +11917,7 @@ const Gb = {
11928
11917
  }, Fb = function(e) {
11929
11918
  let t = e.clauses().match("<Noun>"), n = t.match("@hasComma");
11930
11919
  return n = n.not("#Place"), n.found && (t = t.splitAfter(n)), t = t.splitOn("#Expression"), t = t.splitOn("(he|she|we|you|they|i)"), t = t.splitOn("(#Noun|#Adjective) [(he|him|she|it)]", 0), t = t.splitOn("[(he|him|she|it)] (#Determiner|#Value)", 0), t = t.splitBefore("#Noun [(the|a|an)] #Adjective? #Noun", 0), t = t.splitOn("[(here|there)] #Noun", 0), t = t.splitOn("[#Noun] (here|there)", 0), t = t.splitBefore("(our|my|their|your)"), t = t.splitOn("#Noun [#Determiner]", 0), t = t.if("#Noun"), t;
11931
- }, Ji = [
11920
+ }, Ri = [
11932
11921
  "after",
11933
11922
  "although",
11934
11923
  "as if",
@@ -11969,14 +11958,14 @@ const Gb = {
11969
11958
  return !0;
11970
11959
  if (!e.before().found)
11971
11960
  return !1;
11972
- for (let n = 0; n < Ji.length; n += 1)
11973
- if (e.has(Ji[n]))
11961
+ for (let n = 0; n < Ri.length; n += 1)
11962
+ if (e.has(Ri[n]))
11974
11963
  return !0;
11975
11964
  return !1;
11976
- }, Mb = "(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)", Bb = function(e, t) {
11965
+ }, Bb = "(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)", Mb = function(e, t) {
11977
11966
  if (e.has("#Plural") || e.has("#Noun and #Noun") || e.has("(we|they)"))
11978
11967
  return !0;
11979
- if (t.has(Mb) === !0 || e.has("#Singular"))
11968
+ if (t.has(Bb) === !0 || e.has("#Singular"))
11980
11969
  return !1;
11981
11970
  const n = t.text("normal");
11982
11971
  return n.length > 3 && n.endsWith("s") && !n.endsWith("ss");
@@ -11989,7 +11978,7 @@ const Gb = {
11989
11978
  determiner: e.match("#Determiner").eq(0),
11990
11979
  adjectives: e.match("#Adjective"),
11991
11980
  number: e.values(),
11992
- isPlural: Bb(e, t),
11981
+ isPlural: Mb(e, t),
11993
11982
  isSubordinate: zb(e),
11994
11983
  root: t
11995
11984
  };
@@ -12010,18 +11999,18 @@ const Gb = {
12010
11999
  };
12011
12000
  }, Ps = function(e) {
12012
12001
  return !e.has("^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$");
12013
- }, _b = { tags: !0 }, Rb = function(e, t) {
12002
+ }, _b = { tags: !0 }, Jb = function(e, t) {
12014
12003
  if (t.isPlural === !0 || (t.root.has("#Possessive") && (t.root = t.root.possessives().strip()), !Ps(t.root)))
12015
12004
  return e;
12016
12005
  const { methods: n, model: r } = e.world, { toPlural: o } = n.two.transform.noun, i = t.root.text({ keepPunct: !1 }), a = o(i, r);
12017
12006
  e.match(t.root).replaceWith(a, _b).tag("Plural", "toPlural"), t.determiner.has("(a|an)") && e.remove(t.determiner);
12018
12007
  const s = t.root.after("not? #Adverb+? [#Copula]", 0);
12019
12008
  return s.found && (s.has("is") ? e.replace(s, "are") : s.has("was") && e.replace(s, "were")), e;
12020
- }, Jb = { tags: !0 }, Ub = function(e, t) {
12009
+ }, Rb = { tags: !0 }, Ub = function(e, t) {
12021
12010
  if (t.isPlural === !1)
12022
12011
  return e;
12023
12012
  const { methods: n, model: r } = e.world, { toSingular: o } = n.two.transform.noun, i = t.root.text("normal"), a = o(i, r);
12024
- return e.replace(t.root, a, Jb).tag("Singular", "toPlural"), e;
12013
+ return e.replace(t.root, a, Rb).tag("Singular", "toPlural"), e;
12025
12014
  }, qb = function(e) {
12026
12015
  class t extends e {
12027
12016
  constructor(r, o, i) {
@@ -12060,7 +12049,7 @@ const Gb = {
12060
12049
  }), o.getNth(r);
12061
12050
  }
12062
12051
  toPlural(r) {
12063
- return this.getNth(r).map((o) => Rb(o, We(o)));
12052
+ return this.getNth(r).map((o) => Jb(o, We(o)));
12064
12053
  }
12065
12054
  toSingular(r) {
12066
12055
  return this.getNth(r).map((o) => {
@@ -12108,7 +12097,7 @@ const Gb = {
12108
12097
  amount: 1,
12109
12098
  str: e
12110
12099
  };
12111
- }, M = {
12100
+ }, B = {
12112
12101
  ones: {
12113
12102
  zeroth: 0,
12114
12103
  first: 1,
@@ -12195,25 +12184,25 @@ const Gb = {
12195
12184
  grand: 1e3
12196
12185
  }
12197
12186
  }, Yb = (e, t) => {
12198
- if (M.ones.hasOwnProperty(e)) {
12187
+ if (B.ones.hasOwnProperty(e)) {
12199
12188
  if (t.ones || t.teens)
12200
12189
  return !1;
12201
- } else if (M.teens.hasOwnProperty(e)) {
12190
+ } else if (B.teens.hasOwnProperty(e)) {
12202
12191
  if (t.ones || t.teens || t.tens)
12203
12192
  return !1;
12204
- } else if (M.tens.hasOwnProperty(e) && (t.ones || t.teens || t.tens))
12193
+ } else if (B.tens.hasOwnProperty(e) && (t.ones || t.teens || t.tens))
12205
12194
  return !1;
12206
12195
  return !0;
12207
12196
  }, ey = function(e) {
12208
12197
  let t = "0.";
12209
12198
  for (let n = 0; n < e.length; n++) {
12210
12199
  const r = e[n];
12211
- if (M.ones.hasOwnProperty(r) === !0)
12212
- t += M.ones[r];
12213
- else if (M.teens.hasOwnProperty(r) === !0)
12214
- t += M.teens[r];
12215
- else if (M.tens.hasOwnProperty(r) === !0)
12216
- t += M.tens[r];
12200
+ if (B.ones.hasOwnProperty(r) === !0)
12201
+ t += B.ones[r];
12202
+ else if (B.teens.hasOwnProperty(r) === !0)
12203
+ t += B.teens[r];
12204
+ else if (B.tens.hasOwnProperty(r) === !0)
12205
+ t += B.tens[r];
12217
12206
  else if (/^[0-9]$/.test(r) === !0)
12218
12207
  t += r;
12219
12208
  else
@@ -12251,23 +12240,23 @@ const Gb = {
12251
12240
  h && (o += l / h || 0);
12252
12241
  continue;
12253
12242
  }
12254
- if (M.tens.hasOwnProperty(u) && r.ones && Object.keys(r).length === 1 && (o = r.ones * 100, r = {}), Yb(u, r) === !1)
12243
+ if (B.tens.hasOwnProperty(u) && r.ones && Object.keys(r).length === 1 && (o = r.ones * 100, r = {}), Yb(u, r) === !1)
12255
12244
  return null;
12256
12245
  if (/^[0-9.]+$/.test(u))
12257
12246
  r.ones = parseFloat(u);
12258
- else if (M.ones.hasOwnProperty(u) === !0)
12259
- r.ones = M.ones[u];
12260
- else if (M.teens.hasOwnProperty(u) === !0)
12261
- r.teens = M.teens[u];
12262
- else if (M.tens.hasOwnProperty(u) === !0)
12263
- r.tens = M.tens[u];
12264
- else if (M.multiples.hasOwnProperty(u) === !0) {
12265
- let l = M.multiples[u];
12247
+ else if (B.ones.hasOwnProperty(u) === !0)
12248
+ r.ones = B.ones[u];
12249
+ else if (B.teens.hasOwnProperty(u) === !0)
12250
+ r.teens = B.teens[u];
12251
+ else if (B.tens.hasOwnProperty(u) === !0)
12252
+ r.tens = B.tens[u];
12253
+ else if (B.multiples.hasOwnProperty(u) === !0) {
12254
+ let l = B.multiples[u];
12266
12255
  if (l === n)
12267
12256
  return null;
12268
12257
  if (l === 100 && a[s + 1] !== void 0) {
12269
12258
  const h = a[s + 1];
12270
- M.multiples[h] && (l *= M.multiples[h], s += 1);
12259
+ B.multiples[h] && (l *= B.multiples[h], s += 1);
12271
12260
  }
12272
12261
  n === null || l < n ? (o += (mn(r) || 1) * l, n = l, r = {}) : (o += mn(r), n = l, o = (o || 1) * l, r = {});
12273
12262
  }
@@ -12405,7 +12394,7 @@ const Gb = {
12405
12394
  for (let a = 0; a < i.length; a++)
12406
12395
  n.push(t[i[a]]);
12407
12396
  return n;
12408
- }, Rt = function(e) {
12397
+ }, Jt = function(e) {
12409
12398
  let t = e.num;
12410
12399
  if (t === 0 || t === "0")
12411
12400
  return "zero";
@@ -12421,7 +12410,7 @@ const Gb = {
12421
12410
  }, fy = function(e) {
12422
12411
  if (!e.numerator || !e.denominator)
12423
12412
  return "";
12424
- const t = Rt({ num: e.numerator }), n = Rt({ num: e.denominator });
12413
+ const t = Jt({ num: e.numerator }), n = Jt({ num: e.denominator });
12425
12414
  return `${t} out of ${n}`;
12426
12415
  }, Xi = {
12427
12416
  one: "first",
@@ -12441,12 +12430,12 @@ const Gb = {
12441
12430
  eighty: "eightieth",
12442
12431
  ninety: "ninetieth"
12443
12432
  }, ks = (e) => {
12444
- const t = Rt(e).split(" "), n = t[t.length - 1];
12433
+ const t = Jt(e).split(" "), n = t[t.length - 1];
12445
12434
  return Xi.hasOwnProperty(n) ? t[t.length - 1] = Xi[n] : t[t.length - 1] = n.replace(/y$/, "i") + "th", t.join(" ");
12446
12435
  }, py = function(e) {
12447
12436
  if (!e.numerator || !e.denominator)
12448
12437
  return "";
12449
- const t = Rt({ num: e.numerator });
12438
+ const t = Jt({ num: e.numerator });
12450
12439
  let n = ks({ num: e.denominator });
12451
12440
  return e.denominator === 2 && (n = "half"), t && n ? (e.numerator !== 1 && (n += "s"), `${t} ${n}`) : "";
12452
12441
  }, gy = function(e) {
@@ -12507,18 +12496,18 @@ const Gb = {
12507
12496
  let r = Zb(this);
12508
12497
  return r = r.getNth(n), new t(this.document, r.pointer);
12509
12498
  };
12510
- }, my = "one|two|three|four|five|six|seven|eight|nine", Be = "twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty", by = "eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen", rr = function(e) {
12499
+ }, my = "one|two|three|four|five|six|seven|eight|nine", Me = "twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty", by = "eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen", rr = function(e) {
12511
12500
  let t = e.match("#Value+");
12512
- if (t.has("#NumericValue #NumericValue") && (t.has("#Value @hasComma #Value") ? t.splitAfter("@hasComma") : t.has("#NumericValue #Fraction") ? t.splitAfter("#NumericValue #Fraction") : t = t.splitAfter("#NumericValue")), t.has("#Value #Value #Value") && !t.has("#Multiple") && t.has("(" + Be + ") #Cardinal #Cardinal") && (t = t.splitAfter("(" + Be + ") #Cardinal")), t.has("#Value #Value")) {
12513
- t.has("#NumericValue #NumericValue") && (t = t.splitOn("#Year")), t.has("(" + Be + ") (" + by + ")") && (t = t.splitAfter("(" + Be + ")"));
12501
+ if (t.has("#NumericValue #NumericValue") && (t.has("#Value @hasComma #Value") ? t.splitAfter("@hasComma") : t.has("#NumericValue #Fraction") ? t.splitAfter("#NumericValue #Fraction") : t = t.splitAfter("#NumericValue")), t.has("#Value #Value #Value") && !t.has("#Multiple") && t.has("(" + Me + ") #Cardinal #Cardinal") && (t = t.splitAfter("(" + Me + ") #Cardinal")), t.has("#Value #Value")) {
12502
+ t.has("#NumericValue #NumericValue") && (t = t.splitOn("#Year")), t.has("(" + Me + ") (" + by + ")") && (t = t.splitAfter("(" + Me + ")"));
12514
12503
  const n = t.match("#Cardinal #Cardinal");
12515
12504
  if (n.found && !t.has("(point|decimal|#Fraction)") && !n.has("#Cardinal (#Multiple|point|decimal)")) {
12516
- const r = t.has(`(${my}) (${Be})`), o = n.has("(" + Be + ") #Cardinal"), i = n.has("#Multiple #Value");
12505
+ const r = t.has(`(${my}) (${Me})`), o = n.has("(" + Me + ") #Cardinal"), i = n.has("#Multiple #Value");
12517
12506
  !r && !o && !i && n.terms().forEach((a) => {
12518
12507
  t = t.splitOn(a);
12519
12508
  });
12520
12509
  }
12521
- t.match("#Ordinal #Ordinal").match("#TextValue").found && !t.has("#Multiple") && (t.has("(" + Be + ") #Ordinal") || (t = t.splitAfter("#Ordinal"))), t = t.splitBefore("#Ordinal [#Cardinal]", 0), t.has("#TextValue #NumericValue") && !t.has("(" + Be + "|#Multiple)") && (t = t.splitBefore("#TextValue #NumericValue"));
12510
+ t.match("#Ordinal #Ordinal").match("#TextValue").found && !t.has("#Multiple") && (t.has("(" + Me + ") #Ordinal") || (t = t.splitAfter("#Ordinal"))), t = t.splitBefore("#Ordinal [#Cardinal]", 0), t.has("#TextValue #NumericValue") && !t.has("(" + Me + "|#Multiple)") && (t = t.splitBefore("#TextValue #NumericValue"));
12522
12511
  }
12523
12512
  return t = t.splitAfter("#NumberRange"), t = t.splitBefore("#Year"), t;
12524
12513
  }, yy = function(e, t) {
@@ -12530,7 +12519,7 @@ const Gb = {
12530
12519
  num: o,
12531
12520
  suffix: i
12532
12521
  }) : null;
12533
- }, U = function(e) {
12522
+ }, R = function(e) {
12534
12523
  if (typeof e == "string")
12535
12524
  return { num: Ar(e) };
12536
12525
  let t = e.text("reduced");
@@ -12607,7 +12596,7 @@ const Gb = {
12607
12596
  return e.prefix + vy(e) + e.suffix;
12608
12597
  if (t === "TextCardinal") {
12609
12598
  const { prefix: r, suffix: o } = ta(e);
12610
- return r + Rt(e) + o;
12599
+ return r + Jt(e) + o;
12611
12600
  }
12612
12601
  let n = e.num;
12613
12602
  return e.hasComma && (n = n.toLocaleString()), e.prefix + String(n) + e.suffix;
@@ -12619,7 +12608,7 @@ const Gb = {
12619
12608
  return wy(e) ? e.reduce((t, n) => (t[n] = !0, t), {}) : e || {};
12620
12609
  }, ky = function(e, t = {}) {
12621
12610
  return t = Py(t), e.filter((n) => {
12622
- const { unit: r } = U(n);
12611
+ const { unit: r } = R(n);
12623
12612
  return !!(r && t[r] === !0);
12624
12613
  });
12625
12614
  }, Ay = function(e) {
@@ -12628,15 +12617,15 @@ const Gb = {
12628
12617
  super(r, o, i), this.viewType = "Numbers";
12629
12618
  }
12630
12619
  parse(r) {
12631
- return this.getNth(r).map(U);
12620
+ return this.getNth(r).map(R);
12632
12621
  }
12633
12622
  get(r) {
12634
- return this.getNth(r).map(U).map((o) => o.num);
12623
+ return this.getNth(r).map(R).map((o) => o.num);
12635
12624
  }
12636
12625
  json(r) {
12637
12626
  const o = typeof r == "object" ? r : {};
12638
12627
  return this.getNth(r).map((i) => {
12639
- const a = i.toView().json(o)[0], s = U(i);
12628
+ const a = i.toView().json(o)[0], s = R(i);
12640
12629
  return a.number = {
12641
12630
  prefix: s.prefix,
12642
12631
  num: s.num,
@@ -12667,7 +12656,7 @@ const Gb = {
12667
12656
  const r = this.map((o) => {
12668
12657
  if (!this.has("#TextValue"))
12669
12658
  return o;
12670
- const i = U(o);
12659
+ const i = R(o);
12671
12660
  if (i.num === null)
12672
12661
  return o;
12673
12662
  const a = o.has("#Ordinal") ? "Ordinal" : "Cardinal", s = Ye(i, a);
@@ -12678,7 +12667,7 @@ const Gb = {
12678
12667
  /** add commas, or nicer formatting for numbers */
12679
12668
  toLocaleString() {
12680
12669
  return this.forEach((o) => {
12681
- const i = U(o);
12670
+ const i = R(o);
12682
12671
  if (i.num === null)
12683
12672
  return;
12684
12673
  let a = i.num.toLocaleString();
@@ -12694,7 +12683,7 @@ const Gb = {
12694
12683
  const o = this.map((i) => {
12695
12684
  if (i.has("#TextValue"))
12696
12685
  return i;
12697
- const a = U(i);
12686
+ const a = R(i);
12698
12687
  if (a.num === null)
12699
12688
  return i;
12700
12689
  const s = i.has("#Ordinal") ? "TextOrdinal" : "TextCardinal", u = Ye(a, s);
@@ -12707,7 +12696,7 @@ const Gb = {
12707
12696
  const o = this.map((i) => {
12708
12697
  if (!i.has("#Ordinal"))
12709
12698
  return i;
12710
- const a = U(i);
12699
+ const a = R(i);
12711
12700
  if (a.num === null)
12712
12701
  return i;
12713
12702
  const s = i.has("#TextValue") ? "TextCardinal" : "Cardinal", u = Ye(a, s);
@@ -12720,7 +12709,7 @@ const Gb = {
12720
12709
  const o = this.map((i) => {
12721
12710
  if (i.has("#Ordinal"))
12722
12711
  return i;
12723
- const a = U(i);
12712
+ const a = R(i);
12724
12713
  if (a.num === null)
12725
12714
  return i;
12726
12715
  const s = i.has("#TextValue") ? "TextOrdinal" : "Ordinal", u = Ye(a, s);
@@ -12730,20 +12719,20 @@ const Gb = {
12730
12719
  }
12731
12720
  /** return only numbers that are == n */
12732
12721
  isEqual(r) {
12733
- return this.filter((o) => U(o).num === r);
12722
+ return this.filter((o) => R(o).num === r);
12734
12723
  }
12735
12724
  /** return only numbers that are > n*/
12736
12725
  greaterThan(r) {
12737
- return this.filter((o) => U(o).num > r);
12726
+ return this.filter((o) => R(o).num > r);
12738
12727
  }
12739
12728
  /** return only numbers that are < n*/
12740
12729
  lessThan(r) {
12741
- return this.filter((o) => U(o).num < r);
12730
+ return this.filter((o) => R(o).num < r);
12742
12731
  }
12743
12732
  /** return only numbers > min and < max */
12744
12733
  between(r, o) {
12745
12734
  return this.filter((i) => {
12746
- const a = U(i).num;
12735
+ const a = R(i).num;
12747
12736
  return a > r && a < o;
12748
12737
  });
12749
12738
  }
@@ -12751,9 +12740,9 @@ const Gb = {
12751
12740
  set(r) {
12752
12741
  if (r === void 0)
12753
12742
  return this;
12754
- typeof r == "string" && (r = U(r).num);
12743
+ typeof r == "string" && (r = R(r).num);
12755
12744
  const i = this.map((a) => {
12756
- const s = U(a);
12745
+ const s = R(a);
12757
12746
  if (s.num = r, s.num === null)
12758
12747
  return a;
12759
12748
  let u = a.has("#Ordinal") ? "Ordinal" : "Cardinal";
@@ -12766,9 +12755,9 @@ const Gb = {
12766
12755
  add(r) {
12767
12756
  if (!r)
12768
12757
  return this;
12769
- typeof r == "string" && (r = U(r).num);
12758
+ typeof r == "string" && (r = R(r).num);
12770
12759
  const i = this.map((a) => {
12771
- const s = U(a);
12760
+ const s = R(a);
12772
12761
  if (s.num === null)
12773
12762
  return a;
12774
12763
  s.num += r;
@@ -12896,9 +12885,9 @@ const Gb = {
12896
12885
  return e;
12897
12886
  }, zy = function(e) {
12898
12887
  return e.verbs().first().toNegative().compute("chunks"), e;
12899
- }, My = function(e) {
12900
- return e.verbs().first().toPositive().compute("chunks"), e;
12901
12888
  }, By = function(e) {
12889
+ return e.verbs().first().toPositive().compute("chunks"), e;
12890
+ }, My = function(e) {
12902
12891
  return e.verbs().toInfinitive(), e;
12903
12892
  }, Vy = function(e) {
12904
12893
  class t extends e {
@@ -12926,13 +12915,13 @@ const Gb = {
12926
12915
  return this.getNth(o).map((i) => (et(i), i = Fy(i), i));
12927
12916
  }
12928
12917
  toInfinitive(o) {
12929
- return this.getNth(o).map((i) => (et(i), By(i)));
12918
+ return this.getNth(o).map((i) => (et(i), My(i)));
12930
12919
  }
12931
12920
  toNegative(o) {
12932
12921
  return this.getNth(o).map((i) => (et(i), zy(i)));
12933
12922
  }
12934
12923
  toPositive(o) {
12935
- return this.getNth(o).map((i) => (et(i), My(i)));
12924
+ return this.getNth(o).map((i) => (et(i), By(i)));
12936
12925
  }
12937
12926
  isQuestion(o) {
12938
12927
  return this.questions(o);
@@ -12970,28 +12959,28 @@ const Gb = {
12970
12959
  t.firstName = e.match("#FirstName+"), t.lastName = e.match("#LastName+"), t.honorific = e.match("#Honorific+");
12971
12960
  const n = t.lastName, r = t.firstName;
12972
12961
  return (!r.found || !n.found) && !r.found && !n.found && e.has("^#Honorific .$") && (t.lastName = e.match(".$")), t;
12973
- }, de = "male", Y = "female", ra = {
12974
- mr: de,
12962
+ }, he = "male", Y = "female", ra = {
12963
+ mr: he,
12975
12964
  mrs: Y,
12976
12965
  miss: Y,
12977
12966
  madam: Y,
12978
12967
  // british stuff
12979
- king: de,
12968
+ king: he,
12980
12969
  queen: Y,
12981
- duke: de,
12970
+ duke: he,
12982
12971
  duchess: Y,
12983
- baron: de,
12972
+ baron: he,
12984
12973
  baroness: Y,
12985
- count: de,
12974
+ count: he,
12986
12975
  countess: Y,
12987
- prince: de,
12976
+ prince: he,
12988
12977
  princess: Y,
12989
- sire: de,
12978
+ sire: he,
12990
12979
  dame: Y,
12991
12980
  lady: Y,
12992
- ayatullah: de,
12981
+ ayatullah: he,
12993
12982
  //i think?
12994
- congressman: de,
12983
+ congressman: he,
12995
12984
  congresswoman: Y,
12996
12985
  "first lady": Y,
12997
12986
  // marked as non-binary
@@ -13001,7 +12990,7 @@ const Gb = {
13001
12990
  if (n.has("#FemaleName"))
13002
12991
  return Y;
13003
12992
  if (n.has("#MaleName"))
13004
- return de;
12993
+ return he;
13005
12994
  if (r.found) {
13006
12995
  let i = r.text("normal");
13007
12996
  if (i = i.replace(/\./g, ""), ra.hasOwnProperty(i))
@@ -13009,7 +12998,7 @@ const Gb = {
13009
12998
  if (/^her /.test(i))
13010
12999
  return Y;
13011
13000
  if (/^his /.test(i))
13012
- return de;
13001
+ return he;
13013
13002
  }
13014
13003
  const o = t.after();
13015
13004
  if (!o.has("#Person") && o.has("#Pronoun")) {
@@ -13018,7 +13007,7 @@ const Gb = {
13018
13007
  return null;
13019
13008
  const a = i.has("(he|his)"), s = i.has("(she|her|hers)");
13020
13009
  if (a && !s)
13021
- return de;
13010
+ return he;
13022
13011
  if (s && !a)
13023
13012
  return Y;
13024
13013
  }
@@ -13060,12 +13049,12 @@ const Gb = {
13060
13049
  let r = Wy(this);
13061
13050
  return r = r.getNth(n), new t(this.document, r.pointer);
13062
13051
  };
13063
- }, Ry = function(e) {
13052
+ }, Jy = function(e) {
13064
13053
  let t = e.match("(#Place|#Address)+"), n = t.match("@hasComma");
13065
13054
  return n = n.filter((r) => r.has("(asia|africa|europe|america)$") ? !0 : !(r.has("(#City|#Region|#ProperNoun)$") && r.after("^(#Country|#Region)").found)), t = t.splitAfter(n), t;
13066
- }, Jy = function(e) {
13055
+ }, Ry = function(e) {
13067
13056
  e.prototype.places = function(t) {
13068
- let n = Ry(this);
13057
+ let n = Jy(this);
13069
13058
  return n = n.getNth(t), new e(this.document, n.pointer);
13070
13059
  };
13071
13060
  }, Uy = function(e) {
@@ -13079,7 +13068,7 @@ const Gb = {
13079
13068
  }, Qy = function(e) {
13080
13069
  e.prototype.topics = qy;
13081
13070
  }, Zy = function(e) {
13082
- _y(e), Jy(e), Uy(e), Qy(e);
13071
+ _y(e), Ry(e), Uy(e), Qy(e);
13083
13072
  }, Xy = { api: Zy }, Yy = function(e) {
13084
13073
  let t = e.match("<Verb>");
13085
13074
  return t = t.not("#Conjunction"), t = t.not("#Preposition"), t = t.splitAfter("@hasComma"), t = t.splitAfter("[(do|did|am|was|is|will)] (is|was)", 0), t = t.splitBefore("(#Verb && !#Copula) [being] #Verb", 0), t = t.splitBefore("#Verb [to be] #Verb", 0), t = t.splitAfter("[help] #PresentTense", 0), t = t.splitBefore("(#PresentTense|#PastTense) [#Copula]$", 0), t = t.splitBefore("(#PresentTense|#PastTense) [will be]$", 0), t = t.splitBefore("(#PresentTense|#PastTense) [(had|has)]", 0), t = t.not("#Reflexive$"), t = t.not("#Adjective"), t = t.splitAfter("[#PastTense] #PastTense", 0), t = t.splitAfter("[#PastTense] #Auxiliary+ #PastTense", 0), t = t.splitAfter("#Copula [#Gerund] #PastTense", 0), t = t.if("#Verb"), t.has("(#Verb && !#Auxiliary) #Adverb+? #Copula") && (t = t.splitBefore("#Copula")), t;
@@ -13117,7 +13106,7 @@ const Gb = {
13117
13106
  verb: e.not(t),
13118
13107
  particle: t
13119
13108
  };
13120
- }, be = function(e) {
13109
+ }, me = function(e) {
13121
13110
  const t = e.clone();
13122
13111
  t.contractions().expand();
13123
13112
  const n = ev(t);
@@ -13129,7 +13118,7 @@ const Gb = {
13129
13118
  negative: rv(t),
13130
13119
  phrasal: ov(n)
13131
13120
  };
13132
- }, me = { tense: "PresentTense" }, yn = { conditional: !0 }, Ie = { tense: "FutureTense" }, bt = { progressive: !0 }, K = { tense: "PastTense" }, yt = { complete: !0, progressive: !1 }, Ve = { passive: !0 }, iv = { plural: !0 }, av = { plural: !1 }, sv = function(e) {
13121
+ }, ge = { tense: "PresentTense" }, yn = { conditional: !0 }, Ie = { tense: "FutureTense" }, bt = { progressive: !0 }, K = { tense: "PastTense" }, yt = { complete: !0, progressive: !1 }, Ve = { passive: !0 }, iv = { plural: !0 }, av = { plural: !1 }, sv = function(e) {
13133
13122
  const t = {};
13134
13123
  return e.forEach((n) => {
13135
13124
  Object.assign(t, n);
@@ -13141,7 +13130,7 @@ const Gb = {
13141
13130
  ["#Imperative", []]
13142
13131
  ],
13143
13132
  "want-infinitive": [
13144
- ["^(want|wants|wanted) to #Infinitive$", [me]],
13133
+ ["^(want|wants|wanted) to #Infinitive$", [ge]],
13145
13134
  ["^wanted to #Infinitive$", [K]],
13146
13135
  ["^will want to #Infinitive$", [Ie]]
13147
13136
  ],
@@ -13149,9 +13138,9 @@ const Gb = {
13149
13138
  // started looking
13150
13139
  ["^#PastTense #Gerund$", [K]],
13151
13140
  // starts looking
13152
- ["^#PresentTense #Gerund$", [me]],
13141
+ ["^#PresentTense #Gerund$", [ge]],
13153
13142
  // start looking
13154
- ["^#Infinitive #Gerund$", [me]],
13143
+ ["^#Infinitive #Gerund$", [ge]],
13155
13144
  // will start looking
13156
13145
  ["^will #Infinitive #Gerund$", [Ie]],
13157
13146
  // have started looking
@@ -13161,9 +13150,9 @@ const Gb = {
13161
13150
  ],
13162
13151
  "simple-present": [
13163
13152
  // he walks',
13164
- ["^#PresentTense$", [me]],
13153
+ ["^#PresentTense$", [ge]],
13165
13154
  // we walk
13166
- ["^#Infinitive$", [me]]
13155
+ ["^#Infinitive$", [ge]]
13167
13156
  ],
13168
13157
  "simple-past": [
13169
13158
  // he walked',
@@ -13176,7 +13165,7 @@ const Gb = {
13176
13165
  // === Progressive ===
13177
13166
  "present-progressive": [
13178
13167
  // he is walking
13179
- ["^(is|are|am) #Gerund$", [me, bt]]
13168
+ ["^(is|are|am) #Gerund$", [ge, bt]]
13180
13169
  ],
13181
13170
  "past-progressive": [
13182
13171
  // he was walking
@@ -13227,11 +13216,11 @@ const Gb = {
13227
13216
  ],
13228
13217
  "passive-present": [
13229
13218
  // is walked, are stolen
13230
- ["^(is|are|am) #Passive", [me, Ve]],
13219
+ ["^(is|are|am) #Passive", [ge, Ve]],
13231
13220
  // is being walked
13232
- ["^(is|are|am) being #Passive", [me, Ve]],
13221
+ ["^(is|are|am) being #Passive", [ge, Ve]],
13233
13222
  // has been cleaned
13234
- ["^has been #Passive", [me, Ve]]
13223
+ ["^has been #Passive", [ge, Ve]]
13235
13224
  ],
13236
13225
  "passive-future": [
13237
13226
  // will have been walked
@@ -13242,7 +13231,7 @@ const Gb = {
13242
13231
  // === Conditional ===
13243
13232
  "present-conditional": [
13244
13233
  // would be walked
13245
- ["would be #PastTense", [me, yn]]
13234
+ ["would be #PastTense", [ge, yn]]
13246
13235
  ],
13247
13236
  "past-conditional": [
13248
13237
  // would have been walked
@@ -13261,7 +13250,7 @@ const Gb = {
13261
13250
  ],
13262
13251
  "auxiliary-present": [
13263
13252
  // we do walk
13264
- ["^(does|do) #Infinitive$", [me, yt, iv]]
13253
+ ["^(does|do) #Infinitive$", [ge, yt, iv]]
13265
13254
  ],
13266
13255
  // === modals ===
13267
13256
  "modal-past": [
@@ -13318,25 +13307,25 @@ const uv = function(e, t) {
13318
13307
  return i.found || n.found === !1 && (i = t.match("^(that|this|those)"), i.found) ? i : (r = n.last(), ia(r) && (n.remove(r), r = n.last()), ia(r) && (n.remove(r), r = n.last()), r);
13319
13308
  }, dv = function(e, t) {
13320
13309
  return t.has("(are|were|does)") || e.has("(those|they|we)") ? !0 : e.found && e.isPlural ? e.isPlural().found : !1;
13321
- }, ke = function(e) {
13310
+ }, Pe = function(e) {
13322
13311
  const t = hv(e);
13323
13312
  return {
13324
13313
  subject: t,
13325
13314
  plural: dv(t, e)
13326
13315
  };
13327
- }, O = (e) => e, zt = (e, t) => {
13328
- const n = ke(e), r = n.subject;
13316
+ }, D = (e) => e, zt = (e, t) => {
13317
+ const n = Pe(e), r = n.subject;
13329
13318
  return r.has("i") || r.has("we") ? !0 : n.plural;
13330
13319
  }, fv = (e, t) => {
13331
- const { subject: n, plural: r } = ke(e);
13320
+ const { subject: n, plural: r } = Pe(e);
13332
13321
  return r || n.has("we") ? "were" : "was";
13333
- }, Mt = function(e, t) {
13322
+ }, Bt = function(e, t) {
13334
13323
  if (e.has("were"))
13335
13324
  return "are";
13336
- const { subject: n, plural: r } = ke(e);
13325
+ const { subject: n, plural: r } = Pe(e);
13337
13326
  return n.has("i") ? "am" : n.has("we") || r ? "are" : "is";
13338
13327
  }, Xr = function(e, t) {
13339
- const n = ke(e), r = n.subject;
13328
+ const n = Pe(e), r = n.subject;
13340
13329
  return r.has("i") || r.has("we") || n.plural ? "do" : "does";
13341
13330
  }, se = function(e) {
13342
13331
  if (e.has("#Infinitive"))
@@ -13364,7 +13353,7 @@ const uv = function(e, t) {
13364
13353
  const { toInfinitive: t } = e.methods.two.transform.verb, n = e.text("normal");
13365
13354
  return t(n, e.model, se(e));
13366
13355
  }, gv = function(e) {
13367
- const t = be(e);
13356
+ const t = me(e);
13368
13357
  e = e.clone().toView();
13369
13358
  const n = De(e, t);
13370
13359
  return {
@@ -13386,7 +13375,7 @@ const uv = function(e, t) {
13386
13375
  e.prepend(s);
13387
13376
  }
13388
13377
  return e.fullSentence().compute(["freeze", "lexicon", "preTagger", "postTagger", "unfreeze", "chunks"]), e;
13389
- }, he = { tags: !0 }, Oe = {
13378
+ }, le = { tags: !0 }, Oe = {
13390
13379
  noAux: (e, t) => (t.auxiliary.found && (e = e.remove(t.auxiliary)), e),
13391
13380
  // walk->walked
13392
13381
  simple: (e, t) => {
@@ -13394,12 +13383,12 @@ const uv = function(e, t) {
13394
13383
  if (o.has("#Modal"))
13395
13384
  return e;
13396
13385
  let i = o.text({ keepPunct: !1 });
13397
- return i = r(i, e.model, se(o)), i = n(i, e.model).PastTense, i = i === "been" ? "was" : i, i === "was" && (i = fv(e)), i && e.replace(o, i, he), e;
13386
+ return i = r(i, e.model, se(o)), i = n(i, e.model).PastTense, i = i === "been" ? "was" : i, i === "was" && (i = fv(e)), i && e.replace(o, i, le), e;
13398
13387
  },
13399
13388
  both: function(e, t) {
13400
13389
  return t.negative.found ? (e.replace("will", "did"), e) : (e = Oe.simple(e, t), e = Oe.noAux(e, t), e);
13401
13390
  },
13402
- hasHad: (e) => (e.replace("has", "had", he), e),
13391
+ hasHad: (e) => (e.replace("has", "had", le), e),
13403
13392
  // some verbs have this weird past-tense form
13404
13393
  // drive -> driven, (!drove)
13405
13394
  hasParticiple: (e, t) => {
@@ -13413,55 +13402,55 @@ const uv = function(e, t) {
13413
13402
  // he walks -> he walked
13414
13403
  "simple-present": Oe.simple,
13415
13404
  // he walked
13416
- "simple-past": O,
13405
+ "simple-past": D,
13417
13406
  // he will walk -> he walked
13418
13407
  "simple-future": Oe.both,
13419
13408
  // he is walking
13420
- "present-progressive": (e) => (e.replace("are", "were", he), e.replace("(is|are|am)", "was", he), e),
13409
+ "present-progressive": (e) => (e.replace("are", "were", le), e.replace("(is|are|am)", "was", le), e),
13421
13410
  // he was walking
13422
- "past-progressive": O,
13411
+ "past-progressive": D,
13423
13412
  // he will be walking
13424
13413
  "future-progressive": (e, t) => (e.match(t.root).insertBefore("was"), e.remove("(will|be)"), e),
13425
13414
  // has walked -> had walked (?)
13426
13415
  "present-perfect": Oe.hasHad,
13427
13416
  // had walked
13428
- "past-perfect": O,
13417
+ "past-perfect": D,
13429
13418
  // will have walked -> had walked
13430
13419
  "future-perfect": (e, t) => (e.match(t.root).insertBefore("had"), e.has("will") && (e = aa(e)), e.remove("have"), e),
13431
13420
  // has been walking -> had been
13432
13421
  "present-perfect-progressive": Oe.hasHad,
13433
13422
  // had been walking
13434
- "past-perfect-progressive": O,
13423
+ "past-perfect-progressive": D,
13435
13424
  // will have been -> had
13436
- "future-perfect-progressive": (e) => (e.remove("will"), e.replace("have", "had", he), e),
13425
+ "future-perfect-progressive": (e) => (e.remove("will"), e.replace("have", "had", le), e),
13437
13426
  // got walked
13438
- "passive-past": (e) => (e.replace("have", "had", he), e),
13427
+ "passive-past": (e) => (e.replace("have", "had", le), e),
13439
13428
  // is being walked -> 'was being walked'
13440
- "passive-present": (e) => (e.replace("(is|are)", "was", he), e),
13429
+ "passive-present": (e) => (e.replace("(is|are)", "was", le), e),
13441
13430
  // will be walked -> had been walked
13442
- "passive-future": (e, t) => (t.auxiliary.has("will be") && (e.match(t.root).insertBefore("had been"), e.remove("(will|be)")), t.auxiliary.has("will have been") && (e.replace("have", "had", he), e.remove("will")), e),
13431
+ "passive-future": (e, t) => (t.auxiliary.has("will be") && (e.match(t.root).insertBefore("had been"), e.remove("(will|be)")), t.auxiliary.has("will have been") && (e.replace("have", "had", le), e.remove("will")), e),
13443
13432
  // would be walked -> 'would have been walked'
13444
13433
  "present-conditional": (e) => (e.replace("be", "have been"), e),
13445
13434
  // would have been walked
13446
- "past-conditional": O,
13435
+ "past-conditional": D,
13447
13436
  // is going to drink -> was going to drink
13448
- "auxiliary-future": (e) => (e.replace("(is|are|am)", "was", he), e),
13437
+ "auxiliary-future": (e) => (e.replace("(is|are|am)", "was", le), e),
13449
13438
  // used to walk
13450
- "auxiliary-past": O,
13439
+ "auxiliary-past": D,
13451
13440
  // we do walk -> we did walk
13452
- "auxiliary-present": (e) => (e.replace("(do|does)", "did", he), e),
13441
+ "auxiliary-present": (e) => (e.replace("(do|does)", "did", le), e),
13453
13442
  // must walk -> 'must have walked'
13454
- "modal-infinitive": (e, t) => (e.has("can") ? e.replace("can", "could", he) : (Oe.simple(e, t), e.match("#Modal").insertAfter("have").tag("Auxiliary")), e),
13443
+ "modal-infinitive": (e, t) => (e.has("can") ? e.replace("can", "could", le) : (Oe.simple(e, t), e.match("#Modal").insertAfter("have").tag("Auxiliary")), e),
13455
13444
  // must have walked
13456
- "modal-past": O,
13445
+ "modal-past": D,
13457
13446
  // wanted to walk
13458
- "want-infinitive": (e) => (e.replace("(want|wants)", "wanted", he), e.remove("will"), e),
13447
+ "want-infinitive": (e) => (e.replace("(want|wants)", "wanted", le), e.remove("will"), e),
13459
13448
  // started looking
13460
13449
  "gerund-phrase": (e, t) => (t.root = t.root.not("#Gerund$"), Oe.simple(e, t), aa(e), e)
13461
13450
  }, yv = function(e, t, n) {
13462
13451
  return ca.hasOwnProperty(n) && (e = ca[n](e, t), e.fullSentence().compute(["tagger", "chunks"])), e;
13463
13452
  }, $r = function(e, t) {
13464
- const n = ke(e), r = n.subject;
13453
+ const n = Pe(e), r = n.subject;
13465
13454
  return r.has("(i|we|you)") ? "have" : n.plural === !1 || r.has("he") || r.has("she") || r.has("#Person") ? "has" : "have";
13466
13455
  }, Nr = (e, t) => {
13467
13456
  const { conjugate: n, toInfinitive: r } = e.methods.two.transform.verb, { root: o, auxiliary: i } = t;
@@ -13492,17 +13481,17 @@ const uv = function(e, t) {
13492
13481
  // he will be walking
13493
13482
  // 'future-progressive': noop,
13494
13483
  // has walked -> had walked (?)
13495
- "present-perfect": O,
13484
+ "present-perfect": D,
13496
13485
  // had walked
13497
- "past-perfect": O,
13486
+ "past-perfect": D,
13498
13487
  // will have walked -> had walked
13499
13488
  "future-perfect": (e, t) => e.replace("will have", $r(e)),
13500
13489
  // has been walking -> had been
13501
- "present-perfect-progressive": O,
13490
+ "present-perfect-progressive": D,
13502
13491
  // had been walking
13503
- "past-perfect-progressive": O,
13492
+ "past-perfect-progressive": D,
13504
13493
  // will have been -> had
13505
- "future-perfect-progressive": O
13494
+ "future-perfect-progressive": D
13506
13495
  // got walked
13507
13496
  // 'passive-past': noop,
13508
13497
  // is being walked -> 'was being walked'
@@ -13532,7 +13521,7 @@ const uv = function(e, t) {
13532
13521
  }, Se = { tags: !0 }, vt = (e, t) => {
13533
13522
  const { conjugate: n, toInfinitive: r } = e.methods.two.transform.verb, o = t.root;
13534
13523
  let i = o.text("normal");
13535
- return i = r(i, e.model, se(o)), zt(e) === !1 && (i = n(i, e.model).PresentTense), o.has("#Copula") && (i = Mt(e)), i && (e = e.replace(o, i, Se), e.not("#Particle").tag("PresentTense")), e;
13524
+ return i = r(i, e.model, se(o)), zt(e) === !1 && (i = n(i, e.model).PresentTense), o.has("#Copula") && (i = Bt(e)), i && (e = e.replace(o, i, Se), e.not("#Particle").tag("PresentTense")), e;
13536
13525
  }, ha = (e, t) => {
13537
13526
  const { conjugate: n, toInfinitive: r } = e.methods.two.transform.verb, o = t.root;
13538
13527
  let i = o.text("normal");
@@ -13548,7 +13537,7 @@ const uv = function(e, t) {
13548
13537
  "simple-present": (e, t) => {
13549
13538
  const { conjugate: n } = e.methods.two.transform.verb, { root: r } = t;
13550
13539
  if (r.has("#Infinitive")) {
13551
- const i = ke(e).subject;
13540
+ const i = Pe(e).subject;
13552
13541
  if (zt(e) || i.has("i"))
13553
13542
  return e;
13554
13543
  const a = r.text("normal"), s = n(a, e.model).PresentTense;
@@ -13563,17 +13552,17 @@ const uv = function(e, t) {
13563
13552
  "simple-future": (e, t) => {
13564
13553
  const { root: n, auxiliary: r } = t;
13565
13554
  if (r.has("will") && n.has("be")) {
13566
- const o = Mt(e);
13555
+ const o = Bt(e);
13567
13556
  e.replace(n, o), e = e.remove("will"), e.replace("not " + o, o + " not");
13568
13557
  } else
13569
13558
  vt(e, t), e = e.remove("will");
13570
13559
  return e;
13571
13560
  },
13572
13561
  // is walking ->
13573
- "present-progressive": O,
13562
+ "present-progressive": D,
13574
13563
  // was walking -> is walking
13575
13564
  "past-progressive": (e, t) => {
13576
- const n = Mt(e);
13565
+ const n = Bt(e);
13577
13566
  return e.replace("(were|was)", n, Se);
13578
13567
  },
13579
13568
  // will be walking -> is walking
@@ -13582,13 +13571,13 @@ const uv = function(e, t) {
13582
13571
  "present-perfect": (e, t) => (vt(e, t), e = e.remove("(have|had|has)"), e),
13583
13572
  // had walked -> has walked
13584
13573
  "past-perfect": (e, t) => {
13585
- const r = ke(e).subject;
13574
+ const r = Pe(e).subject;
13586
13575
  return zt(e) || r.has("i") ? (e = Cr(e, t), e.remove("had"), e) : (e.replace("had", "has", Se), e);
13587
13576
  },
13588
13577
  // will have walked -> has walked
13589
13578
  "future-perfect": (e) => (e.match("will").insertBefore("has"), e.remove("have").remove("will")),
13590
13579
  // has been walking
13591
- "present-perfect-progressive": O,
13580
+ "present-perfect-progressive": D,
13592
13581
  // had been walking
13593
13582
  "past-perfect-progressive": (e) => e.replace("had", "has", Se),
13594
13583
  // will have been -> has been
@@ -13597,15 +13586,15 @@ const uv = function(e, t) {
13597
13586
  // was walked -> is walked
13598
13587
  // had been walked -> is walked
13599
13588
  "passive-past": (e, t) => {
13600
- const n = Mt(e);
13589
+ const n = Bt(e);
13601
13590
  return e.has("(had|have|has)") && e.has("been") ? (e.replace("(had|have|has)", n, Se), e.replace("been", "being"), e) : e.replace("(got|was|were)", n);
13602
13591
  },
13603
13592
  // is being walked ->
13604
- "passive-present": O,
13593
+ "passive-present": D,
13605
13594
  // will be walked -> is being walked
13606
13595
  "passive-future": (e) => (e.replace("will", "is"), e.replace("be", "being")),
13607
13596
  // would be walked ->
13608
- "present-conditional": O,
13597
+ "present-conditional": D,
13609
13598
  // would have been walked ->
13610
13599
  "past-conditional": (e) => (e.replace("been", "be"), e.remove("have")),
13611
13600
  // is going to drink -> is drinking
@@ -13620,9 +13609,9 @@ const uv = function(e, t) {
13620
13609
  return ha(e, t), e.replace(t.auxiliary, "is"), e;
13621
13610
  },
13622
13611
  // we do walk ->
13623
- "auxiliary-present": O,
13612
+ "auxiliary-present": D,
13624
13613
  // must walk -> 'must have walked'
13625
- "modal-infinitive": O,
13614
+ "modal-infinitive": D,
13626
13615
  // must have walked
13627
13616
  "modal-past": (e, t) => (wv(e, t), e.remove("have")),
13628
13617
  // started looking
@@ -13652,25 +13641,25 @@ const uv = function(e, t) {
13652
13641
  // he walked
13653
13642
  "simple-past": vn,
13654
13643
  // he will walk ->
13655
- "simple-future": O,
13644
+ "simple-future": D,
13656
13645
  // is walking ->
13657
13646
  "present-progressive": fa,
13658
13647
  // was walking ->
13659
13648
  "past-progressive": fa,
13660
13649
  // will be walking ->
13661
- "future-progressive": O,
13650
+ "future-progressive": D,
13662
13651
  // has walked ->
13663
13652
  "present-perfect": (e) => (e.match("(have|has)").replaceWith("will have"), e),
13664
13653
  // had walked ->
13665
13654
  "past-perfect": (e) => e.replace("(had|has)", "will have"),
13666
13655
  // will have walked ->
13667
- "future-perfect": O,
13656
+ "future-perfect": D,
13668
13657
  // has been walking
13669
13658
  "present-perfect-progressive": (e) => e.replace("has", "will have"),
13670
13659
  // had been walking
13671
13660
  "past-perfect-progressive": (e) => e.replace("had", "will have"),
13672
13661
  // will have been ->
13673
- "future-perfect-progressive": O,
13662
+ "future-perfect-progressive": D,
13674
13663
  // got walked ->
13675
13664
  // was walked ->
13676
13665
  // was being walked ->
@@ -13679,13 +13668,13 @@ const uv = function(e, t) {
13679
13668
  // is being walked ->
13680
13669
  "passive-present": (e) => (e.replace("being", "will be"), e.remove("(is|are|am)"), e),
13681
13670
  // will be walked ->
13682
- "passive-future": O,
13671
+ "passive-future": D,
13683
13672
  // would be walked ->
13684
13673
  "present-conditional": (e) => e.replace("would", "will"),
13685
13674
  // would have been walked ->
13686
13675
  "past-conditional": (e) => e.replace("would", "will"),
13687
13676
  // is going to drink ->
13688
- "auxiliary-future": O,
13677
+ "auxiliary-future": D,
13689
13678
  // used to walk -> is walking
13690
13679
  // did walk -> is walking
13691
13680
  "auxiliary-past": (e) => e.has("used") && e.has("to") ? (e.replace("used", "will"), e.remove("to")) : (e.replace("did", "will"), e),
@@ -13693,9 +13682,9 @@ const uv = function(e, t) {
13693
13682
  // he does walk ->
13694
13683
  "auxiliary-present": (e) => e.replace("(do|does)", "will"),
13695
13684
  // must walk ->
13696
- "modal-infinitive": O,
13685
+ "modal-infinitive": D,
13697
13686
  // must have walked
13698
- "modal-past": O,
13687
+ "modal-past": D,
13699
13688
  // started looking
13700
13689
  "gerund-phrase": (e, t) => (t.root = t.root.not("#Gerund$"), vn(e, t), e.remove("(had|have)")),
13701
13690
  // wanted to walk
@@ -13710,7 +13699,7 @@ const uv = function(e, t) {
13710
13699
  a = n(a, e.model, se(o));
13711
13700
  const s = r(a, e.model).Gerund;
13712
13701
  if (s) {
13713
- const u = Mt(e);
13702
+ const u = Bt(e);
13714
13703
  e.replace(o, s, Av), e.remove(i), e.prepend(u);
13715
13704
  }
13716
13705
  return e.replace("not is", "is not"), e.replace("not are", "are not"), e.fullSentence().compute(["tagger", "chunks"]), e;
@@ -13756,7 +13745,7 @@ const uv = function(e, t) {
13756
13745
  super(r, o, i), this.viewType = "Verbs";
13757
13746
  }
13758
13747
  parse(r) {
13759
- return this.getNth(r).map(be);
13748
+ return this.getNth(r).map(me);
13760
13749
  }
13761
13750
  json(r, o) {
13762
13751
  return this.getNth(o).map((s) => {
@@ -13765,60 +13754,60 @@ const uv = function(e, t) {
13765
13754
  }, []);
13766
13755
  }
13767
13756
  subjects(r) {
13768
- return this.getNth(r).map((o) => (be(o), ke(o).subject));
13757
+ return this.getNth(r).map((o) => (me(o), Pe(o).subject));
13769
13758
  }
13770
13759
  adverbs(r) {
13771
13760
  return this.getNth(r).map((o) => o.match("#Adverb"));
13772
13761
  }
13773
13762
  isSingular(r) {
13774
- return this.getNth(r).filter((o) => ke(o).plural !== !0);
13763
+ return this.getNth(r).filter((o) => Pe(o).plural !== !0);
13775
13764
  }
13776
13765
  isPlural(r) {
13777
- return this.getNth(r).filter((o) => ke(o).plural === !0);
13766
+ return this.getNth(r).filter((o) => Pe(o).plural === !0);
13778
13767
  }
13779
13768
  isImperative(r) {
13780
13769
  return this.getNth(r).filter((o) => o.has("#Imperative"));
13781
13770
  }
13782
13771
  toInfinitive(r) {
13783
13772
  return this.getNth(r).map((o) => {
13784
- const i = be(o), a = De(o, i);
13773
+ const i = me(o), a = De(o, i);
13785
13774
  return bv(o, i, a.form);
13786
13775
  });
13787
13776
  }
13788
13777
  toPresentTense(r) {
13789
13778
  return this.getNth(r).map((o) => {
13790
- const i = be(o), a = De(o, i);
13779
+ const i = me(o), a = De(o, i);
13791
13780
  return a.isInfinitive ? o : Pv(o, i, a.form);
13792
13781
  });
13793
13782
  }
13794
13783
  toPastTense(r) {
13795
13784
  return this.getNth(r).map((o) => {
13796
- const i = be(o), a = De(o, i);
13785
+ const i = me(o), a = De(o, i);
13797
13786
  return a.isInfinitive ? o : yv(o, i, a.form);
13798
13787
  });
13799
13788
  }
13800
13789
  toFutureTense(r) {
13801
13790
  return this.getNth(r).map((o) => {
13802
- const i = be(o), a = De(o, i);
13791
+ const i = me(o), a = De(o, i);
13803
13792
  return a.isInfinitive ? o : kv(o, i, a.form);
13804
13793
  });
13805
13794
  }
13806
13795
  toGerund(r) {
13807
13796
  return this.getNth(r).map((o) => {
13808
- const i = be(o), a = De(o, i);
13797
+ const i = me(o), a = De(o, i);
13809
13798
  return a.isInfinitive ? o : xv(o, i, a.form);
13810
13799
  });
13811
13800
  }
13812
13801
  toPastParticiple(r) {
13813
13802
  return this.getNth(r).map((o) => {
13814
- const i = be(o), a = De(o, i);
13803
+ const i = me(o), a = De(o, i);
13815
13804
  return a.isInfinitive ? o : vv(o, i, a.form);
13816
13805
  });
13817
13806
  }
13818
13807
  conjugate(r) {
13819
13808
  const { conjugate: o, toInfinitive: i } = this.world.methods.two.transform.verb;
13820
13809
  return this.getNth(r).map((a) => {
13821
- const s = be(a), u = De(a, s);
13810
+ const s = me(a), u = De(a, s);
13822
13811
  u.form === "imperative" && (u.form = "simple-present");
13823
13812
  let c = s.root.text("normal");
13824
13813
  if (!s.root.has("#Infinitive")) {
@@ -13843,7 +13832,7 @@ const uv = function(e, t) {
13843
13832
  }
13844
13833
  toNegative(r) {
13845
13834
  return this.getNth(r).map((o) => {
13846
- const i = be(o), a = De(o, i);
13835
+ const i = me(o), a = De(o, i);
13847
13836
  return Cv(o, i, a.form);
13848
13837
  });
13849
13838
  }
@@ -13979,7 +13968,7 @@ function Fv(e, t, n = 0, r = 0) {
13979
13968
  let s = su(t, i.start, i.end);
13980
13969
  if (s.length === 0 && i.text && (s = zv(t, i.text)), s.length === 0)
13981
13970
  continue;
13982
- const u = Bv(s);
13971
+ const u = Mv(s);
13983
13972
  for (const c of u.values()) {
13984
13973
  const l = Vv(c.map((h) => h.bbox));
13985
13974
  o.push({
@@ -14013,8 +14002,8 @@ function zv(e, t) {
14013
14002
  return a === n || n.includes(a) || a.includes(n);
14014
14003
  });
14015
14004
  }
14016
- const Mv = 200;
14017
- function Bv(e) {
14005
+ const Bv = 200;
14006
+ function Mv(e) {
14018
14007
  const t = /* @__PURE__ */ new Map();
14019
14008
  for (const o of e) {
14020
14009
  const i = t.get(o.lineIndex) ?? [];
@@ -14027,7 +14016,7 @@ function Bv(e) {
14027
14016
  let s = [a[0]];
14028
14017
  for (let u = 1; u < a.length; u++) {
14029
14018
  const c = a[u - 1], l = a[u];
14030
- l.bbox.x0 - c.bbox.x1 > Mv ? (n.set(o * 1e4 + r++, s), s = [l]) : s.push(l);
14019
+ l.bbox.x0 - c.bbox.x1 > Bv ? (n.set(o * 1e4 + r++, s), s = [l]) : s.push(l);
14031
14020
  }
14032
14021
  n.set(o * 1e4 + r++, s);
14033
14022
  }
@@ -14069,7 +14058,7 @@ function Wv(e, t) {
14069
14058
  }
14070
14059
  return r;
14071
14060
  }
14072
- const Kv = /* @__PURE__ */ new Set(["GIVENNAME", "SURNAME", "PERSON"]), _v = 8, Rv = 5, Jv = 0.5, va = 230, Uv = 210;
14061
+ const Kv = /* @__PURE__ */ new Set(["GIVENNAME", "SURNAME", "PERSON"]), _v = 8, Jv = 5, Rv = 0.5, va = 230, Uv = 210;
14073
14062
  let qv = 0;
14074
14063
  function Qv(e, t, n, r) {
14075
14064
  const o = [], i = /* @__PURE__ */ new Set(), a = e.filter((s) => s.label && Kv.has(s.label)).sort((s, u) => s.bbox.x0 - u.bbox.x0);
@@ -14079,31 +14068,31 @@ function Qv(e, t, n, r) {
14079
14068
  i.add(l);
14080
14069
  const h = Math.round(c * _v);
14081
14070
  if (u.x0 < h * 0.25) continue;
14082
- const d = Math.max(0, u.x0 - h), m = Math.max(0, u.y0), $ = Math.min(n, u.y1);
14083
- let ee = 0, xe = -1, E = -1, ze = "gap";
14084
- for (let we = u.x0 - 1; we >= d; we--) {
14085
- const Yr = r(we, m, $);
14071
+ const d = Math.max(0, u.x0 - h), m = Math.max(0, u.y0), C = Math.min(n, u.y1);
14072
+ let ee = 0, Ae = -1, T = -1, ze = "gap";
14073
+ for (let ve = u.x0 - 1; ve >= d; ve--) {
14074
+ const Yr = r(ve, m, C);
14086
14075
  if (ze === "gap")
14087
- Yr >= va ? ee++ : (ze = "dark", E = we, xe = we);
14076
+ Yr >= va ? ee++ : (ze = "dark", T = ve, Ae = ve);
14088
14077
  else if (ze === "dark")
14089
14078
  if (Yr < va)
14090
- xe = we;
14079
+ Ae = ve;
14091
14080
  else {
14092
14081
  ze = "done";
14093
14082
  break;
14094
14083
  }
14095
14084
  }
14096
- if (ze === "dark" && (xe = d), ee < Rv || E < 0 || xe < 0) continue;
14097
- const ht = E - xe + 1, dt = Math.round(c * Jv);
14085
+ if (ze === "dark" && (Ae = d), ee < Jv || T < 0 || Ae < 0) continue;
14086
+ const ht = T - Ae + 1, dt = Math.round(c * Rv);
14098
14087
  if (ht < dt) continue;
14099
- let Ce = 0;
14100
- for (let we = xe; we <= E; we++)
14101
- Ce += r(we, m, $);
14102
- if (Ce / ht > Uv) continue;
14088
+ let xe = 0;
14089
+ for (let ve = Ae; ve <= T; ve++)
14090
+ xe += r(ve, m, C);
14091
+ if (xe / ht > Uv) continue;
14103
14092
  const Xt = Math.round(c * 1.5), Gn = {
14104
- x0: xe,
14093
+ x0: Ae,
14105
14094
  y0: Math.max(0, u.y0 - Xt),
14106
- x1: E + ee + 1,
14095
+ x1: T + ee + 1,
14107
14096
  // include the gap (blank space is part of avatar area)
14108
14097
  y1: Math.min(n, u.y1 + Xt)
14109
14098
  };
@@ -14125,8 +14114,8 @@ function Zv(e, t, n) {
14125
14114
  const l = Math.max(0, Math.min(t - 1, Math.round(s))), h = Math.max(0, Math.round(u)), d = Math.min(n, Math.round(c));
14126
14115
  if (h >= d) return 255;
14127
14116
  let m = 0;
14128
- for (let $ = h; $ < d; $++) {
14129
- const ee = ($ * t + l) * 4;
14117
+ for (let C = h; C < d; C++) {
14118
+ const ee = (C * t + l) * 4;
14130
14119
  m += (a[ee] + a[ee + 1] + a[ee + 2]) / 3;
14131
14120
  }
14132
14121
  return m / (d - h);
@@ -14205,8 +14194,8 @@ async function nw(e, t, n) {
14205
14194
  if (h.length > 0) {
14206
14195
  let d;
14207
14196
  e instanceof Blob ? d = await createImageBitmap(e) : d = e;
14208
- const m = Zv(d, i.imageWidth, i.imageHeight), $ = Qv(h, i.imageWidth, i.imageHeight, m);
14209
- l.push(...$);
14197
+ const m = Zv(d, i.imageWidth, i.imageHeight), C = Qv(h, i.imageWidth, i.imageHeight, m);
14198
+ l.push(...C);
14210
14199
  }
14211
14200
  }
14212
14201
  return n?.({
@@ -14249,14 +14238,14 @@ const ow = {
14249
14238
  detectAvatars: !0,
14250
14239
  memoryMode: "auto"
14251
14240
  };
14252
- var iw = Object.defineProperty, aw = Object.getOwnPropertyDescriptor, I = (e, t, n, r) => {
14241
+ var iw = Object.defineProperty, aw = Object.getOwnPropertyDescriptor, H = (e, t, n, r) => {
14253
14242
  for (var o = r > 1 ? void 0 : r ? aw(t, n) : t, i = e.length - 1, a; i >= 0; i--)
14254
14243
  (a = e[i]) && (o = (r ? a(t, n, o) : a(o)) || o);
14255
14244
  return r && o && iw(t, n, o), o;
14256
14245
  };
14257
- let C = class extends Ft {
14246
+ let j = class extends Ft {
14258
14247
  constructor() {
14259
- super(...arguments), this.lang = Le.lang, this.nerModel = Le.nerModel, this.maxFileSize = Le.maxFileSize, this.minConfidence = Le.minConfidence, this.useRegex = Le.useRegex, this.useCompromise = Le.useCompromise, this.detectAvatars = Le.detectAvatars, this.phase = "idle", this.progress = 0, this.progressMessage = "", this.errorMessage = "", this.imageUrl = "", this.imageWidth = 0, this.imageHeight = 0, this.redactions = [], this.entities = [], this.ocrResult = null, this.dragOver = !1, this.isDrawing = !1, this.drawMode = !1, this.drawStart = null, this.drawCurrent = null, this.networkRequestCount = 0, this.redactedBlob = null, this.modelCached = !1, this.imageFile = null, this.imageElement = null, this.undoStack = [], this.perfObserver = null;
14248
+ super(...arguments), this.lang = Le.lang, this.nerModel = Le.nerModel, this.maxFileSize = Le.maxFileSize, this.minConfidence = Le.minConfidence, this.useRegex = Le.useRegex, this.useCompromise = Le.useCompromise, this.detectAvatars = Le.detectAvatars, this.phase = "idle", this.progress = 0, this.progressMessage = "", this.errorMessage = "", this.imageUrl = "", this.imageWidth = 0, this.imageHeight = 0, this.redactions = [], this.entities = [], this.ocrResult = null, this.dragOver = !1, this.isDrawing = !1, this.drawMode = !1, this.drawStart = null, this.drawCurrent = null, this.redactedBlob = null, this.imageFile = null, this.imageElement = null, this.undoStack = [];
14260
14249
  }
14261
14250
  // --- Pipeline config (derived from public properties) ---
14262
14251
  get pipelineConfig() {
@@ -14270,20 +14259,7 @@ let C = class extends Ft {
14270
14259
  };
14271
14260
  }
14272
14261
  connectedCallback() {
14273
- if (super.connectedCallback(), typeof PerformanceObserver < "u") {
14274
- this.perfObserver = new PerformanceObserver((e) => {
14275
- for (const t of e.getEntries()) {
14276
- const n = t.name ?? "";
14277
- (n.includes("huggingface.co") || n.includes("hf.co")) && this.networkRequestCount++;
14278
- }
14279
- });
14280
- try {
14281
- this.perfObserver.observe({ type: "resource", buffered: !1 });
14282
- } catch {
14283
- this.perfObserver = null;
14284
- }
14285
- }
14286
- this.maybePreloadModel();
14262
+ super.connectedCallback(), this.maybePreloadModel();
14287
14263
  }
14288
14264
  async maybePreloadModel() {
14289
14265
  const e = navigator.connection;
@@ -14308,24 +14284,24 @@ let C = class extends Ft {
14308
14284
  this.phase = "idle", this.progress = 0, this.progressMessage = "", this.errorMessage = "", this.redactions = [], this.entities = [], this.ocrResult = null, this.imageFile = null, this.undoStack = [], this.drawMode = !1, this.imageUrl && (URL.revokeObjectURL(this.imageUrl), this.imageUrl = ""), this.imageElement = null, this.redactedBlob = null, delete window.__redactionDone;
14309
14285
  }
14310
14286
  disconnectedCallback() {
14311
- super.disconnectedCallback(), this.imageUrl && URL.revokeObjectURL(this.imageUrl), this.perfObserver?.disconnect(), this.perfObserver = null;
14287
+ super.disconnectedCallback(), this.imageUrl && URL.revokeObjectURL(this.imageUrl);
14312
14288
  }
14313
14289
  // --- Rendering ---
14314
14290
  render() {
14315
- return ue`
14291
+ return Ce`
14316
14292
  <div class="container">
14317
14293
  ${this.renderTrustBanner()}
14318
- ${this.phase === "idle" ? this.renderDropZone() : T}
14319
- ${this.phase === "loading" || this.phase === "ocr" || this.phase === "detecting" ? this.renderProgress() : T}
14320
- ${this.phase === "reviewing" ? this.renderEditor() : T}
14321
- ${this.phase === "exporting" ? this.renderProgress() : T}
14322
- ${this.phase === "done" ? this.renderDone() : T}
14323
- ${this.errorMessage ? this.renderError() : T}
14294
+ ${this.phase === "idle" ? this.renderDropZone() : E}
14295
+ ${this.phase === "loading" || this.phase === "ocr" || this.phase === "detecting" ? this.renderProgress() : E}
14296
+ ${this.phase === "reviewing" ? this.renderEditor() : E}
14297
+ ${this.phase === "exporting" ? this.renderProgress() : E}
14298
+ ${this.phase === "done" ? this.renderDone() : E}
14299
+ ${this.errorMessage ? this.renderError() : E}
14324
14300
  </div>
14325
14301
  `;
14326
14302
  }
14327
14303
  renderTrustBanner() {
14328
- return ue`
14304
+ return Ce`
14329
14305
  <div class="trust-banner">
14330
14306
  ${Xs}
14331
14307
  <span>Your data never leaves your device. All processing happens in
@@ -14334,7 +14310,7 @@ let C = class extends Ft {
14334
14310
  `;
14335
14311
  }
14336
14312
  renderDropZone() {
14337
- return ue`
14313
+ return Ce`
14338
14314
  <div
14339
14315
  class="dropzone ${this.dragOver ? "dragover" : ""}"
14340
14316
  @click=${this.handleDropZoneClick}
@@ -14360,7 +14336,7 @@ let C = class extends Ft {
14360
14336
  `;
14361
14337
  }
14362
14338
  renderProgress() {
14363
- return ue`
14339
+ return Ce`
14364
14340
  <div class="progress-container">
14365
14341
  <div class="progress-phase">
14366
14342
  ${{
@@ -14382,7 +14358,7 @@ let C = class extends Ft {
14382
14358
  }
14383
14359
  renderEditor() {
14384
14360
  const e = `0 0 ${this.imageWidth} ${this.imageHeight}`;
14385
- return ue`
14361
+ return Ce`
14386
14362
  <div class="editor">
14387
14363
  <div class="toolbar">
14388
14364
  <div class="toolbar-row toolbar-utils">
@@ -14450,7 +14426,7 @@ let C = class extends Ft {
14450
14426
  width=${Math.abs(this.drawCurrent.x - this.drawStart.x)}
14451
14427
  height=${Math.abs(this.drawCurrent.y - this.drawStart.y)}
14452
14428
  />
14453
- ` : T}
14429
+ ` : E}
14454
14430
  </svg>
14455
14431
  </div>
14456
14432
  </div>
@@ -14461,7 +14437,7 @@ let C = class extends Ft {
14461
14437
  / ${this.redactions.length})
14462
14438
  </div>
14463
14439
  ${this.redactions.map(
14464
- (t) => ue`
14440
+ (t) => Ce`
14465
14441
  <label class="entity-item">
14466
14442
  <input
14467
14443
  type="checkbox"
@@ -14484,7 +14460,7 @@ let C = class extends Ft {
14484
14460
  `;
14485
14461
  }
14486
14462
  renderError() {
14487
- return ue`
14463
+ return Ce`
14488
14464
  <div class="error">
14489
14465
  <p>${this.errorMessage}</p>
14490
14466
  <button @click=${this.reset}>Try again</button>
@@ -14494,23 +14470,17 @@ let C = class extends Ft {
14494
14470
  renderDone() {
14495
14471
  const e = typeof navigator.share == "function" && typeof navigator.canShare == "function" && this.redactedBlob != null && navigator.canShare({
14496
14472
  files: [new File([this.redactedBlob], "redacted.png", { type: "image/png" })]
14497
- }), t = this.networkRequestCount === 0 ? ue`<p class="done-network done-network-zero">
14498
- Network requests to AI model host: 0 — served from local cache.
14499
- </p>` : ue`<p class="done-network">
14500
- Network requests to AI model host: ${this.networkRequestCount}.
14501
- ${this.modelCached ? ue`Model is now cached — next time will be 0.` : T}
14502
- </p>`;
14503
- return ue`
14473
+ });
14474
+ return Ce`
14504
14475
  <div class="done">
14505
14476
  <div class="done-title">Redaction complete</div>
14506
14477
  <div class="done-actions">
14507
14478
  <button class="primary" @click=${this.handleDownload}>
14508
14479
  Download
14509
14480
  </button>
14510
- ${e ? ue`<button @click=${this.handleShare}>Share</button>` : T}
14481
+ ${e ? Ce`<button @click=${this.handleShare}>Share</button>` : E}
14511
14482
  <button @click=${this.reset}>Redact another</button>
14512
14483
  </div>
14513
- ${t}
14514
14484
  </div>
14515
14485
  `;
14516
14486
  }
@@ -14542,7 +14512,7 @@ let C = class extends Ft {
14542
14512
  this.errorMessage = `File too large (${Math.round(e.size / 1024 / 1024)}MB). Maximum is ${Math.round(this.maxFileSize / 1024 / 1024)}MB.`;
14543
14513
  return;
14544
14514
  }
14545
- this.errorMessage = "", this.networkRequestCount = 0, this.imageFile = e, this.imageUrl = URL.createObjectURL(e), this.phase = "loading";
14515
+ this.errorMessage = "", this.imageFile = e, this.imageUrl = URL.createObjectURL(e), this.phase = "loading";
14546
14516
  try {
14547
14517
  const t = await this.loadImage(this.imageUrl);
14548
14518
  this.imageElement = t, this.imageWidth = t.naturalWidth, this.imageHeight = t.naturalHeight;
@@ -14551,23 +14521,11 @@ let C = class extends Ft {
14551
14521
  this.pipelineConfig,
14552
14522
  (r) => this.handleProgress(r)
14553
14523
  );
14554
- this.ocrResult = n.ocr, this.entities = n.entities, this.redactions = n.redactions, this.undoStack = [], this.phase = "reviewing", this.checkModelCached();
14524
+ this.ocrResult = n.ocr, this.entities = n.entities, this.redactions = n.redactions, this.undoStack = [], this.phase = "reviewing";
14555
14525
  } catch (t) {
14556
14526
  console.error("Pipeline error:", t), this.errorMessage = t instanceof Error ? t.message : "An unexpected error occurred.", this.phase = "idle";
14557
14527
  }
14558
14528
  }
14559
- async checkModelCached() {
14560
- if ("caches" in window)
14561
- try {
14562
- const e = await caches.keys();
14563
- for (const t of e)
14564
- if ((await (await caches.open(t)).keys()).some((o) => o.url.includes("huggingface.co"))) {
14565
- this.modelCached = !0;
14566
- return;
14567
- }
14568
- } catch {
14569
- }
14570
- }
14571
14529
  loadImage(e) {
14572
14530
  return new Promise((t, n) => {
14573
14531
  const r = new Image();
@@ -14700,88 +14658,82 @@ let C = class extends Ft {
14700
14658
  this.imageWidth = t.naturalWidth, this.imageHeight = t.naturalHeight;
14701
14659
  }
14702
14660
  };
14703
- C.styles = Zs;
14704
- I([
14661
+ j.styles = Zs;
14662
+ H([
14705
14663
  qe({ type: String })
14706
- ], C.prototype, "lang", 2);
14707
- I([
14664
+ ], j.prototype, "lang", 2);
14665
+ H([
14708
14666
  qe({ type: String, attribute: "ner-model" })
14709
- ], C.prototype, "nerModel", 2);
14710
- I([
14667
+ ], j.prototype, "nerModel", 2);
14668
+ H([
14711
14669
  qe({ type: Number, attribute: "max-file-size" })
14712
- ], C.prototype, "maxFileSize", 2);
14713
- I([
14670
+ ], j.prototype, "maxFileSize", 2);
14671
+ H([
14714
14672
  qe({ type: Number, attribute: "min-confidence" })
14715
- ], C.prototype, "minConfidence", 2);
14716
- I([
14673
+ ], j.prototype, "minConfidence", 2);
14674
+ H([
14717
14675
  qe({ type: Boolean, attribute: "use-regex" })
14718
- ], C.prototype, "useRegex", 2);
14719
- I([
14676
+ ], j.prototype, "useRegex", 2);
14677
+ H([
14720
14678
  qe({ type: Boolean, attribute: "use-compromise" })
14721
- ], C.prototype, "useCompromise", 2);
14722
- I([
14679
+ ], j.prototype, "useCompromise", 2);
14680
+ H([
14723
14681
  qe({ type: Boolean, attribute: "detect-avatars" })
14724
- ], C.prototype, "detectAvatars", 2);
14725
- I([
14726
- R()
14727
- ], C.prototype, "phase", 2);
14728
- I([
14729
- R()
14730
- ], C.prototype, "progress", 2);
14731
- I([
14732
- R()
14733
- ], C.prototype, "progressMessage", 2);
14734
- I([
14735
- R()
14736
- ], C.prototype, "errorMessage", 2);
14737
- I([
14738
- R()
14739
- ], C.prototype, "imageUrl", 2);
14740
- I([
14741
- R()
14742
- ], C.prototype, "imageWidth", 2);
14743
- I([
14744
- R()
14745
- ], C.prototype, "imageHeight", 2);
14746
- I([
14747
- R()
14748
- ], C.prototype, "redactions", 2);
14749
- I([
14750
- R()
14751
- ], C.prototype, "entities", 2);
14752
- I([
14753
- R()
14754
- ], C.prototype, "ocrResult", 2);
14755
- I([
14756
- R()
14757
- ], C.prototype, "dragOver", 2);
14758
- I([
14759
- R()
14760
- ], C.prototype, "isDrawing", 2);
14761
- I([
14762
- R()
14763
- ], C.prototype, "drawMode", 2);
14764
- I([
14765
- R()
14766
- ], C.prototype, "drawStart", 2);
14767
- I([
14768
- R()
14769
- ], C.prototype, "drawCurrent", 2);
14770
- I([
14771
- R()
14772
- ], C.prototype, "networkRequestCount", 2);
14773
- I([
14774
- R()
14775
- ], C.prototype, "redactedBlob", 2);
14776
- I([
14777
- R()
14778
- ], C.prototype, "modelCached", 2);
14779
- I([
14682
+ ], j.prototype, "detectAvatars", 2);
14683
+ H([
14684
+ Z()
14685
+ ], j.prototype, "phase", 2);
14686
+ H([
14687
+ Z()
14688
+ ], j.prototype, "progress", 2);
14689
+ H([
14690
+ Z()
14691
+ ], j.prototype, "progressMessage", 2);
14692
+ H([
14693
+ Z()
14694
+ ], j.prototype, "errorMessage", 2);
14695
+ H([
14696
+ Z()
14697
+ ], j.prototype, "imageUrl", 2);
14698
+ H([
14699
+ Z()
14700
+ ], j.prototype, "imageWidth", 2);
14701
+ H([
14702
+ Z()
14703
+ ], j.prototype, "imageHeight", 2);
14704
+ H([
14705
+ Z()
14706
+ ], j.prototype, "redactions", 2);
14707
+ H([
14708
+ Z()
14709
+ ], j.prototype, "entities", 2);
14710
+ H([
14711
+ Z()
14712
+ ], j.prototype, "ocrResult", 2);
14713
+ H([
14714
+ Z()
14715
+ ], j.prototype, "dragOver", 2);
14716
+ H([
14717
+ Z()
14718
+ ], j.prototype, "isDrawing", 2);
14719
+ H([
14720
+ Z()
14721
+ ], j.prototype, "drawMode", 2);
14722
+ H([
14723
+ Z()
14724
+ ], j.prototype, "drawStart", 2);
14725
+ H([
14726
+ Z()
14727
+ ], j.prototype, "drawCurrent", 2);
14728
+ H([
14729
+ Z()
14730
+ ], j.prototype, "redactedBlob", 2);
14731
+ H([
14780
14732
  Qs(".file-input")
14781
- ], C.prototype, "fileInput", 2);
14782
- C = I([
14783
- Rs("pii-redactor")
14784
- ], C);
14733
+ ], j.prototype, "fileInput", 2);
14734
+ j = H([
14735
+ Js("pii-redactor")
14736
+ ], j);
14785
14737
  async function hw(e = {}) {
14786
14738
  if (!("serviceWorker" in navigator) || !navigator.serviceWorker)
14787
14739
  return null;
@@ -14806,7 +14758,7 @@ async function dw() {
14806
14758
  export {
14807
14759
  eu as DARK_THRESHOLD,
14808
14760
  Le as DEFAULT_CONFIG,
14809
- C as PiiRedactor,
14761
+ j as PiiRedactor,
14810
14762
  nw as analyzeImage,
14811
14763
  ru as computeAverageLuminance,
14812
14764
  lu as detectPiiNer,