@pi-outpost/embed 0.20.1 → 0.22.0

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.
Files changed (86) hide show
  1. package/dist/PdfViewer-Cqn4OIhw.cjs +1 -0
  2. package/dist/{PdfViewer-DvoTT6jM.js → PdfViewer-D5anbvST.js} +251 -125
  3. package/dist/{abnfDiagram-VCTEODGH-CYuCmqs8.js → abnfDiagram-VCTEODGH-BX4P82Y6.js} +4 -4
  4. package/dist/{arc-CtDF59mU.js → arc-CLGGhOeW.js} +1 -1
  5. package/dist/{architectureDiagram-5GKGNRK7-D2-hmLgN.js → architectureDiagram-5GKGNRK7-BRdxCCja.js} +7 -7
  6. package/dist/{blockDiagram-OSKFZWR5-Bvi4xQOy.js → blockDiagram-OSKFZWR5-B1pU8Z2f.js} +10 -10
  7. package/dist/{c4Diagram-7LVT6UL2-CU4tNaf1.js → c4Diagram-7LVT6UL2-WfERxhw2.js} +8 -8
  8. package/dist/{channel-Cuipqk56.js → channel-Cf_XiG-0.js} +1 -1
  9. package/dist/{chunk-3NF5O7KM-B-2znsHr.js → chunk-3NF5O7KM-DQV4G__C.js} +9 -9
  10. package/dist/{chunk-4HAMMTFA-dRm_HqMI.js → chunk-4HAMMTFA-C2YXJpQw.js} +6 -6
  11. package/dist/{chunk-75Z2AOVW-Eg_bFxBJ.js → chunk-75Z2AOVW-DoA8rENV.js} +3 -3
  12. package/dist/{chunk-DU6HZSFF-CaHy-FdL.js → chunk-DU6HZSFF-BW30DVuW.js} +1 -1
  13. package/dist/{chunk-F27PBJKO-BriqLvNp.js → chunk-F27PBJKO-s9M3oGHp.js} +3 -3
  14. package/dist/{chunk-GMAD6QVW-DCCx2Rg1.js → chunk-GMAD6QVW-DZ2r0pLj.js} +5 -5
  15. package/dist/{chunk-GVQU2GXP-BRMv2gX3.js → chunk-GVQU2GXP-BhLneNgJ.js} +3 -3
  16. package/dist/{chunk-HLEWEB6X-DlG0X171.js → chunk-HLEWEB6X-BrzeadBj.js} +7 -7
  17. package/dist/{chunk-L3NEJ4N5-DkoFQHrz.js → chunk-L3NEJ4N5-BaR_9rF3.js} +6 -6
  18. package/dist/{chunk-OSK3NFVY-CxjvZYNR.js → chunk-OSK3NFVY-BUXOUgUl.js} +8 -8
  19. package/dist/{chunk-P2QGCYS3-uCJfSNHC.js → chunk-P2QGCYS3-BoMkrMIF.js} +1 -1
  20. package/dist/{chunk-POPQ4Y6H-D2Z11lA3.js → chunk-POPQ4Y6H-vLTNjxsT.js} +2 -2
  21. package/dist/{chunk-PWAF6VOD-j4sFqhOF.js → chunk-PWAF6VOD-9dCi1q-p.js} +2 -2
  22. package/dist/{chunk-SVP7TREG-CtJsmAIb.js → chunk-SVP7TREG-weNUySou.js} +3 -3
  23. package/dist/{chunk-XXDRQBXY-fOrVUHLI.js → chunk-XXDRQBXY-IzhWXllg.js} +1 -1
  24. package/dist/{chunk-ZLD2IHE6-tqumZV0E.js → chunk-ZLD2IHE6-CqnVd2rq.js} +7 -7
  25. package/dist/classDiagram-CYGNFDIV-DsnY_WNO.js +30 -0
  26. package/dist/classDiagram-v2-TLXNO2FR-DeNpu9ZP.js +30 -0
  27. package/dist/{core-B9pe29T7.js → core-D_MCdR2m.js} +1 -1
  28. package/dist/{cose-bilkent-JH36ORCC-1Ad4jvll.js → cose-bilkent-JH36ORCC-qPjrc3_9.js} +2 -2
  29. package/dist/{cynefinDiagram-5FMLGOSQ-BSRTnQvp.js → cynefinDiagram-5FMLGOSQ-BEFzUfsd.js} +4 -4
  30. package/dist/{dagre-OS7QT2EB-DcpSzxsR.js → dagre-OS7QT2EB-BtJ6v_Nc.js} +11 -11
  31. package/dist/{diagram-S7CK7UJ4-Cx2fQdp6.js → diagram-S7CK7UJ4-BH8mrGrv.js} +5 -5
  32. package/dist/{diagram-UQ7AKVKN-CvQH-Box.js → diagram-UQ7AKVKN-Bvz7faiB.js} +4 -4
  33. package/dist/{diagram-VSXAHHWV-CCpCVOIq.js → diagram-VSXAHHWV-l9f6spkp.js} +3 -3
  34. package/dist/{diagram-VX7I27RA-HE5nQAXN.js → diagram-VX7I27RA-BK8jsKkD.js} +6 -6
  35. package/dist/{diagram-Z3DM3KII-BEu4c4pP.js → diagram-Z3DM3KII-CqouFf3D.js} +4 -4
  36. package/dist/{dist-Dtt9eY41.js → dist-DWv23S35.js} +1 -1
  37. package/dist/docxExport-B5U9ZQcd.cjs +283 -0
  38. package/dist/docxExport-BO9Dyd6M.js +36026 -0
  39. package/dist/download-CqPD34Wv.js +7535 -0
  40. package/dist/download-HsZRTZnW.cjs +26 -0
  41. package/dist/{ebnfDiagram-PWID7BFC-B06rGL3A.js → ebnfDiagram-PWID7BFC-Bwmmg23f.js} +4 -4
  42. package/dist/{erDiagram-2YWLMYGG-IL4IhNXb.js → erDiagram-2YWLMYGG-RTHTTqyH.js} +14 -14
  43. package/dist/findInPage-BtPAvay_.js +89 -0
  44. package/dist/findInPage-CTLp-wZT.cjs +1 -0
  45. package/dist/flowDiagram-T62WH6J4-ptBWC6KI.js +16 -0
  46. package/dist/{ganttDiagram-EL5Y4UJY-CIBhrOW6.js → ganttDiagram-EL5Y4UJY-BTvevd1z.js} +6 -6
  47. package/dist/{gitGraphDiagram-WWUBYQGX-CjeedV4i.js → gitGraphDiagram-WWUBYQGX-Bh9F7wif.js} +3 -3
  48. package/dist/{infoDiagram-FKFFQAWI-BalzsRT4.js → infoDiagram-FKFFQAWI-D6en39j4.js} +3 -3
  49. package/dist/{ishikawaDiagram-5VMMS53U-BC2vrJSo.js → ishikawaDiagram-5VMMS53U-CvVqTWku.js} +4 -4
  50. package/dist/{journeyDiagram-EYS64GPL-CLMBONXO.js → journeyDiagram-EYS64GPL-CqhBN0KZ.js} +4 -4
  51. package/dist/{kanban-definition-UXKFOSKX-SNTHZo65.js → kanban-definition-UXKFOSKX-CWx_Y40t.js} +10 -10
  52. package/dist/{line-4_dF7rOW.js → line-CwYnx9Ke.js} +1 -1
  53. package/dist/{linear-C1gZJMVz.js → linear-DVFZQF4V.js} +1 -1
  54. package/dist/{mermaid.core-BIqYA7q2.js → mermaid.core-DI1iFk6G.js} +52 -52
  55. package/dist/{mindmap-definition-THT77NOG-BtDuvAQ_.js → mindmap-definition-THT77NOG-B9hdpQgy.js} +13 -13
  56. package/dist/pdf-BcvU2rBV.cjs +54 -0
  57. package/dist/{pdf-B6zVkETi.js → pdf-D6MygsxO.js} +455 -455
  58. package/dist/{pegDiagram-XKGWAZYB-Ucd8o52_.js → pegDiagram-XKGWAZYB-CIBfY2Ob.js} +4 -4
  59. package/dist/pi-outpost-embed.cjs +59 -84
  60. package/dist/pi-outpost-embed.js +16065 -22469
  61. package/dist/{pieDiagram-E7YTZNPT-DSx5wFMY.js → pieDiagram-E7YTZNPT-SG9oy_nV.js} +6 -6
  62. package/dist/{quadrantDiagram-AXDQQJYC-D8Y50xmh.js → quadrantDiagram-AXDQQJYC-C65HQ6gT.js} +3 -3
  63. package/dist/{railroadDiagram-O6MQD6OU-BTg2KtZO.js → railroadDiagram-O6MQD6OU-DLBEWyaH.js} +4 -4
  64. package/dist/{requirementDiagram-IS5BZ75X-C1OrS7DV.js → requirementDiagram-IS5BZ75X-DwrHgMzq.js} +13 -13
  65. package/dist/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-DArdT4gl.js} +5 -2
  66. package/dist/{sankeyDiagram-P5KCCOFB-DTnkE4oO.js → sankeyDiagram-P5KCCOFB-CcT0ZbW6.js} +2 -2
  67. package/dist/{sequenceDiagram-WJ2MYXX4-Ba-z2rSx.js → sequenceDiagram-WJ2MYXX4-DM6BpXMT.js} +6 -6
  68. package/dist/{src-BMMAFeC3.js → src-Dkp7vqs8.js} +1 -1
  69. package/dist/{stateDiagram-XQSTLZYL-BtcUS_dg.js → stateDiagram-XQSTLZYL-BhzcW44q.js} +16 -16
  70. package/dist/stateDiagram-v2-IH3M54BS-BE5CXOTu.js +30 -0
  71. package/dist/{swimlanes-V6O3JKXN-xxlpXv1f.js → swimlanes-V6O3JKXN-BR7rwPmC.js} +11 -11
  72. package/dist/swimlanesDiagram-JKAHXJPX-lIPwQ8Mc.js +30 -0
  73. package/dist/{timeline-definition-24CTP7MA-Dr8ouzBO.js → timeline-definition-24CTP7MA-BQmq-H07.js} +5 -5
  74. package/dist/{vennDiagram-4TSXK5OY-i6B1rhUA.js → vennDiagram-4TSXK5OY-BdzbrV6i.js} +4 -4
  75. package/dist/{wardleyDiagram-VM6X3IG4-1SFyFcXg.js → wardleyDiagram-VM6X3IG4-Ccz1enMd.js} +4 -4
  76. package/dist/{xychartDiagram-S5SC5T6Z-D6QDBBGJ.js → xychartDiagram-S5SC5T6Z-B-sQkN_B.js} +8 -8
  77. package/package.json +1 -1
  78. package/dist/PdfViewer-BEdoeHbS.cjs +0 -1
  79. package/dist/classDiagram-CYGNFDIV-DIu4rTyR.js +0 -30
  80. package/dist/classDiagram-v2-TLXNO2FR-BsYK4QnI.js +0 -30
  81. package/dist/flowDiagram-T62WH6J4-DdJo3Te1.js +0 -16
  82. package/dist/pdf-cYqATYeW.cjs +0 -54
  83. package/dist/stateDiagram-v2-IH3M54BS-E_Rhduzm.js +0 -30
  84. package/dist/swimlanesDiagram-JKAHXJPX-DyQwD-QO.js +0 -30
  85. package/dist/workspacePath-CfDl0V4n.js +0 -24
  86. package/dist/workspacePath-EgAFT36l.cjs +0 -1
@@ -246,7 +246,7 @@ function D(e) {
246
246
  function O(e, t = null, n = null) {
247
247
  if (!e) return null;
248
248
  if (n && typeof e == "string" && (n.addDefaultProtocol && e.startsWith("www.") && e.match(/\./g)?.length >= 2 && (e = `http://${e}`), n.tryConvertEncoding)) try {
249
- e = se(e);
249
+ e = oe(e);
250
250
  } catch {}
251
251
  let r = t ? URL.parse(e, t) : URL.parse(e);
252
252
  return D(r) ? r : null;
@@ -271,32 +271,32 @@ var j = function() {
271
271
  this.message = e, this.name = t;
272
272
  }
273
273
  return e.prototype = /* @__PURE__ */ Error(), e.constructor = e, e;
274
- }(), te = class extends j {
274
+ }(), M = class extends j {
275
275
  constructor(e, t) {
276
276
  super(e, "PasswordException"), this.code = t;
277
277
  }
278
- }, ne = class extends j {
278
+ }, te = class extends j {
279
279
  constructor(e, t) {
280
280
  super(e, "UnknownErrorException"), this.details = t;
281
281
  }
282
- }, re = class extends j {
282
+ }, ne = class extends j {
283
283
  constructor(e) {
284
284
  super(e, "InvalidPDFException");
285
285
  }
286
- }, M = class extends j {
286
+ }, N = class extends j {
287
287
  constructor(e, t, n) {
288
288
  super(e, "ResponseException"), this.status = t, this.missing = n;
289
289
  }
290
- }, ie = class extends j {
290
+ }, re = class extends j {
291
291
  constructor(e) {
292
292
  super(e, "FormatError");
293
293
  }
294
- }, N = class extends j {
294
+ }, P = class extends j {
295
295
  constructor(e) {
296
296
  super(e, "AbortException");
297
297
  }
298
298
  };
299
- function ae(e) {
299
+ function ie(e) {
300
300
  (typeof e != "object" || e?.length === void 0) && T("Invalid argument for bytesToString");
301
301
  let t = e.length, n = 8192;
302
302
  if (t < n) return String.fromCharCode.apply(null, e);
@@ -307,13 +307,13 @@ function ae(e) {
307
307
  }
308
308
  return r.join("");
309
309
  }
310
- function oe(e) {
310
+ function ae(e) {
311
311
  typeof e != "string" && T("Invalid argument for stringToBytes");
312
312
  let t = e.length, n = new Uint8Array(t);
313
313
  for (let r = 0; r < t; ++r) n[r] = e.charCodeAt(r) & 255;
314
314
  return n;
315
315
  }
316
- var P = class {
316
+ var F = class {
317
317
  static get isLittleEndian() {
318
318
  let e = /* @__PURE__ */ new Uint8Array(4);
319
319
  e[0] = 1;
@@ -354,7 +354,7 @@ var P = class {
354
354
  static get isBackdropFilterSupported() {
355
355
  return A(this, "isBackdropFilterSupported", typeof CSS < "u" && CSS.supports("backdrop-filter", "blur(1px)"));
356
356
  }
357
- }, F = class {
357
+ }, I = class {
358
358
  static get hexNums() {
359
359
  return A(this, "hexNums", Array.from(Array(256).keys(), (e) => e.toString(16).padStart(2, "0")));
360
360
  }
@@ -459,19 +459,19 @@ var P = class {
459
459
  c[0] = Math.min(c[0], e, o), c[1] = Math.min(c[1], t, s), c[2] = Math.max(c[2], e, o), c[3] = Math.max(c[3], t, s), this.#t(e, n, i, o, t, r, a, s, 3 * (-e + 3 * (n - i) + o), 6 * (e - 2 * n + i), 3 * (n - e), c), this.#t(e, n, i, o, t, r, a, s, 3 * (-t + 3 * (r - a) + s), 6 * (t - 2 * r + a), 3 * (r - t), c);
460
460
  }
461
461
  };
462
- function se(e) {
462
+ function oe(e) {
463
463
  return decodeURIComponent(escape(e));
464
464
  }
465
- var ce = null, le = null;
466
- function ue(e) {
467
- return ce || (ce = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, le = /* @__PURE__ */ new Map([["ſt", "ſt"]])), e.replaceAll(ce, (e, t, n) => t ? t.normalize("NFKC") : le.get(n));
465
+ var se = null, ce = null;
466
+ function le(e) {
467
+ return se || (se = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, ce = /* @__PURE__ */ new Map([["ſt", "ſt"]])), e.replaceAll(se, (e, t, n) => t ? t.normalize("NFKC") : ce.get(n));
468
468
  }
469
- function de() {
469
+ function ue() {
470
470
  if (typeof crypto.randomUUID == "function") return crypto.randomUUID();
471
471
  let e = /* @__PURE__ */ new Uint8Array(32);
472
- return crypto.getRandomValues(e), ae(e);
472
+ return crypto.getRandomValues(e), ie(e);
473
473
  }
474
- function fe(e, t, n) {
474
+ function de(e, t, n) {
475
475
  if (!Array.isArray(n) || n.length < 2) return !1;
476
476
  let [r, i, ...a] = n;
477
477
  if (!e(r) && !Number.isInteger(r) || !t(i)) return !1;
@@ -497,14 +497,14 @@ function fe(e, t, n) {
497
497
  for (let e of a) if (!(typeof e == "number" || s && e === null)) return !1;
498
498
  return !0;
499
499
  }
500
- var pe = () => [], me = () => /* @__PURE__ */ new Map(), he = () => Object.create(null), ge = () => /* @__PURE__ */ new Set();
500
+ var fe = () => [], pe = () => /* @__PURE__ */ new Map(), me = () => Object.create(null), he = () => /* @__PURE__ */ new Set();
501
501
  typeof Iterator.prototype.join != "function" && (Iterator.prototype.join = function(e) {
502
502
  return [...this].join(e);
503
503
  });
504
- function I(e, t, n) {
504
+ function L(e, t, n) {
505
505
  return Math.min(Math.max(e, t), n);
506
506
  }
507
- var _e = class e {
507
+ var ge = class e {
508
508
  constructor({ viewBox: e, userUnit: t, scale: n, rotation: r, offsetX: i = 0, offsetY: a = 0, dontFlip: o = !1 }) {
509
509
  this.viewBox = e, this.userUnit = t, this.scale = n, this.rotation = r, this.offsetX = i, this.offsetY = a, n *= t;
510
510
  let s = (e[2] + e[0]) / 2, c = (e[3] + e[1]) / 2, l, u, d, f;
@@ -556,13 +556,13 @@ var _e = class e {
556
556
  }
557
557
  convertToViewportPoint(e, t) {
558
558
  let n = [e, t];
559
- return F.applyTransform(n, this.transform), n;
559
+ return I.applyTransform(n, this.transform), n;
560
560
  }
561
561
  convertToPdfPoint(e, t) {
562
562
  let n = [e, t];
563
- return F.applyInverseTransform(n, this.transform), n;
563
+ return I.applyInverseTransform(n, this.transform), n;
564
564
  }
565
- }, ve = class e {
565
+ }, _e = class e {
566
566
  static textContent(t) {
567
567
  let n = [], r = {
568
568
  items: n,
@@ -581,7 +581,7 @@ var _e = class e {
581
581
  static shouldBuildText(e) {
582
582
  return e !== "textarea" && e !== "input" && e !== "option" && e !== "select";
583
583
  }
584
- }, ye = /url\(|image-set\(/i, be = /^on/i, xe = class {
584
+ }, ve = /url\(|image-set\(/i, ye = /^on/i, be = class {
585
585
  static get _allowedHtmlElements() {
586
586
  return A(this, "_allowedHtmlElements", /* @__PURE__ */ new Set([
587
587
  "a",
@@ -676,7 +676,7 @@ var _e = class e {
676
676
  static setAttributes({ html: e, element: t, storage: n = null, intent: r, linkService: i }) {
677
677
  let { attributes: a } = t, o = e instanceof HTMLAnchorElement;
678
678
  a.type === "radio" && (a.name = `${a.name}-${r}`);
679
- for (let [t, n] of Object.entries(a)) if (n != null && !be.test(t) && !(r === "richText" && !this._allowedRichTextAttributes.has(t))) switch (t) {
679
+ for (let [t, n] of Object.entries(a)) if (n != null && !ye.test(t) && !(r === "richText" && !this._allowedRichTextAttributes.has(t))) switch (t) {
680
680
  case "class":
681
681
  n.length && e.setAttribute(t, n.join(" "));
682
682
  break;
@@ -687,7 +687,7 @@ var _e = class e {
687
687
  case "style":
688
688
  if (r === "richText") {
689
689
  let t = this._allowedRichTextStyles;
690
- for (let [r, i] of Object.entries(n)) t.has(r) && !ye.test(i) && (e.style[r] = i);
690
+ for (let [r, i] of Object.entries(n)) t.has(r) && !ve.test(i) && (e.style[r] = i);
691
691
  } else Object.assign(e.style, n);
692
692
  break;
693
693
  case "textContent":
@@ -718,7 +718,7 @@ var _e = class e {
718
718
  if (r.children.length === 0) {
719
719
  if (r.value) {
720
720
  let e = document.createTextNode(r.value);
721
- a.append(e), o && ve.shouldBuildText(r.name) && c.push(e);
721
+ a.append(e), o && _e.shouldBuildText(r.name) && c.push(e);
722
722
  }
723
723
  return { textDivs: c };
724
724
  }
@@ -756,7 +756,7 @@ var _e = class e {
756
756
  ]);
757
757
  else if (s.value) {
758
758
  let e = document.createTextNode(s.value);
759
- o && ve.shouldBuildText(u) && c.push(e), d.append(e);
759
+ o && _e.shouldBuildText(u) && c.push(e), d.append(e);
760
760
  }
761
761
  }
762
762
  }
@@ -769,7 +769,7 @@ var _e = class e {
769
769
  }
770
770
  static getPageViewport(e, { scale: t = 1, rotation: n = 0 }) {
771
771
  let { width: r, height: i } = e.attributes.style;
772
- return new _e({
772
+ return new ge({
773
773
  viewBox: [
774
774
  0,
775
775
  0,
@@ -781,13 +781,13 @@ var _e = class e {
781
781
  rotation: n
782
782
  });
783
783
  }
784
- }, Se = class {
784
+ }, xe = class {
785
785
  static CSS = 96;
786
786
  static PDF = 72;
787
787
  static PDF_TO_CSS_UNITS = this.CSS / this.PDF;
788
788
  };
789
- async function Ce(e, t = "text") {
790
- if (Ae(e, document.baseURI)) {
789
+ async function Se(e, t = "text") {
790
+ if (ke(e, document.baseURI)) {
791
791
  let n = await fetch(e);
792
792
  if (!n.ok) throw Error(n.statusText);
793
793
  switch (t) {
@@ -819,25 +819,25 @@ async function Ce(e, t = "text") {
819
819
  }, i.send(null);
820
820
  });
821
821
  }
822
- var we = class extends j {
822
+ var Ce = class extends j {
823
823
  constructor(e, t = 0) {
824
824
  super(e, "RenderingCancelledException"), this.extraDelay = t;
825
825
  }
826
826
  };
827
- function Te(e) {
827
+ function we(e) {
828
828
  let t = e.length, n = 0;
829
829
  for (; n < t && e[n].trim() === "";) n++;
830
830
  return e.substring(n, n + 5).toLowerCase() === "data:";
831
831
  }
832
- function Ee(e) {
832
+ function Te(e) {
833
833
  return typeof e == "string" && /\.pdf$/i.test(e);
834
834
  }
835
- function De(e) {
835
+ function Ee(e) {
836
836
  return [e] = e.split(/[#?]/, 1), k(e);
837
837
  }
838
- function Oe(e, t = "document.pdf") {
838
+ function De(e, t = "document.pdf") {
839
839
  if (typeof e != "string") return t;
840
- if (Te(e)) return w("getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons."), t;
840
+ if (we(e)) return w("getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons."), t;
841
841
  let n = ((e) => {
842
842
  try {
843
843
  return new URL(e);
@@ -873,7 +873,7 @@ function Oe(e, t = "document.pdf") {
873
873
  }
874
874
  return t;
875
875
  }
876
- var ke = class {
876
+ var Oe = class {
877
877
  #e = /* @__PURE__ */ new Map();
878
878
  times = [];
879
879
  time(e) {
@@ -891,17 +891,17 @@ var ke = class {
891
891
  return this.times.map((t) => `${t.name.padEnd(e)} ${t.end - t.start}ms\n`).join("");
892
892
  }
893
893
  };
894
- function Ae(e, t) {
894
+ function ke(e, t) {
895
895
  let n = t ? URL.parse(e, t) : URL.parse(e);
896
896
  return /https?:/.test(n?.protocol ?? "");
897
897
  }
898
- function L(e) {
898
+ function R(e) {
899
899
  e.preventDefault();
900
900
  }
901
- function R(e) {
901
+ function z(e) {
902
902
  e.preventDefault(), e.stopPropagation();
903
903
  }
904
- var je = class {
904
+ var Ae = class {
905
905
  static #e;
906
906
  static toDateObject(e) {
907
907
  if (e instanceof Date) return e;
@@ -925,7 +925,7 @@ var je = class {
925
925
  return u = u >= 0 && u <= 59 ? u : 0, c === "-" ? (a += l, o += u) : c === "+" && (a -= l, o -= u), new Date(Date.UTC(n, r, i, a, o, s));
926
926
  }
927
927
  };
928
- function Me(e) {
928
+ function je(e) {
929
929
  if (e.startsWith("#")) {
930
930
  let t = e.slice(1);
931
931
  return [
@@ -961,25 +961,25 @@ function Me(e) {
961
961
  t[4] !== void 0 && t[4] !== "none" ? parseFloat(t[4]) : 1
962
962
  ] : null;
963
963
  }
964
- function Ne(e) {
965
- let t = Me(e);
964
+ function Me(e) {
965
+ let t = je(e);
966
966
  return t ? t.slice(0, 3) : (w(`Not a valid color format: "${e}"`), [
967
967
  0,
968
968
  0,
969
969
  0
970
970
  ]);
971
971
  }
972
- function Pe(e) {
972
+ function Ne(e) {
973
973
  let t = document.createElement("span");
974
974
  t.style.visibility = "hidden", t.style.colorScheme = "only light", document.body.append(t);
975
975
  for (let n of e.keys()) {
976
976
  t.style.color = n;
977
977
  let r = window.getComputedStyle(t).color;
978
- e.set(n, Ne(r));
978
+ e.set(n, Me(r));
979
979
  }
980
980
  t.remove();
981
981
  }
982
- function z(e) {
982
+ function B(e) {
983
983
  let { a: t, b: n, c: r, d: i, e: a, f: o } = e.getTransform();
984
984
  return [
985
985
  t,
@@ -990,7 +990,7 @@ function z(e) {
990
990
  o
991
991
  ];
992
992
  }
993
- function B(e) {
993
+ function V(e) {
994
994
  let { a: t, b: n, c: r, d: i, e: a, f: o } = e.getTransform().invertSelf();
995
995
  return [
996
996
  t,
@@ -1001,14 +1001,14 @@ function B(e) {
1001
1001
  o
1002
1002
  ];
1003
1003
  }
1004
- function Fe(e, t, n = !1, r = !0) {
1005
- if (t instanceof _e) {
1004
+ function Pe(e, t, n = !1, r = !0) {
1005
+ if (t instanceof ge) {
1006
1006
  let { pageWidth: r, pageHeight: i } = t.rawDims, { style: a } = e, o = `round(down, var(--total-scale-factor) * ${r}px, var(--scale-round-x))`, s = `round(down, var(--total-scale-factor) * ${i}px, var(--scale-round-y))`;
1007
1007
  !n || t.rotation % 180 == 0 ? (a.width = o, a.height = s) : (a.width = s, a.height = o);
1008
1008
  }
1009
1009
  r && e.setAttribute("data-main-rotation", t.rotation);
1010
1010
  }
1011
- var Ie = class e {
1011
+ var Fe = class e {
1012
1012
  constructor() {
1013
1013
  let { pixelRatio: t } = e;
1014
1014
  this.sx = t, this.sy = t;
@@ -1035,7 +1035,7 @@ var Ie = class e {
1035
1035
  }
1036
1036
  return e;
1037
1037
  }
1038
- }, Le = [
1038
+ }, Ie = [
1039
1039
  "image/apng",
1040
1040
  "image/avif",
1041
1041
  "image/bmp",
@@ -1045,26 +1045,26 @@ var Ie = class e {
1045
1045
  "image/svg+xml",
1046
1046
  "image/webp",
1047
1047
  "image/x-icon"
1048
- ], Re = class {
1048
+ ], Le = class {
1049
1049
  static get isDarkMode() {
1050
1050
  return A(this, "isDarkMode", !!window?.matchMedia?.("(prefers-color-scheme: dark)").matches);
1051
1051
  }
1052
- }, ze = class {
1052
+ }, Re = class {
1053
1053
  static get commentForegroundColor() {
1054
1054
  let e = document.createElement("span");
1055
1055
  e.classList.add("comment", "sidebar");
1056
1056
  let { style: t } = e;
1057
1057
  t.width = t.height = "0", t.display = "none", t.color = "var(--comment-fg-color)", document.body.append(e);
1058
1058
  let { color: n } = window.getComputedStyle(e);
1059
- return e.remove(), A(this, "commentForegroundColor", Ne(n));
1059
+ return e.remove(), A(this, "commentForegroundColor", Me(n));
1060
1060
  }
1061
1061
  };
1062
- function Be(e, t) {
1063
- t = I(t ?? 1, 0, 1);
1062
+ function ze(e, t) {
1063
+ t = L(t ?? 1, 0, 1);
1064
1064
  let n = 255 * (1 - t);
1065
1065
  return e.map((e) => Math.round(e * t + n));
1066
1066
  }
1067
- function Ve(e, t) {
1067
+ function Be(e, t) {
1068
1068
  let n = e[0] / 255, r = e[1] / 255, i = e[2] / 255, a = Math.max(n, r, i), o = Math.min(n, r, i), s = (a + o) / 2;
1069
1069
  if (a === o) t[0] = t[1] = 0;
1070
1070
  else {
@@ -1081,7 +1081,7 @@ function Ve(e, t) {
1081
1081
  }
1082
1082
  t[2] = s;
1083
1083
  }
1084
- function He(e, t) {
1084
+ function Ve(e, t) {
1085
1085
  let n = e[0], r = e[1], i = e[2], a = (1 - Math.abs(2 * i - 1)) * r, o = a * (1 - Math.abs(n / 60 % 2 - 1)), s = i - a / 2;
1086
1086
  switch (Math.floor(n / 60)) {
1087
1087
  case 0:
@@ -1103,36 +1103,36 @@ function He(e, t) {
1103
1103
  case 6: t[0] = a + s, t[1] = s, t[2] = o + s;
1104
1104
  }
1105
1105
  }
1106
- function Ue(e) {
1106
+ function He(e) {
1107
1107
  return e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
1108
1108
  }
1109
- function We(e, t, n) {
1110
- He(e, n), n.map(Ue);
1109
+ function Ue(e, t, n) {
1110
+ Ve(e, n), n.map(He);
1111
1111
  let r = .2126 * n[0] + .7152 * n[1] + .0722 * n[2];
1112
- He(t, n), n.map(Ue);
1112
+ Ve(t, n), n.map(He);
1113
1113
  let i = .2126 * n[0] + .7152 * n[1] + .0722 * n[2];
1114
1114
  return r > i ? (r + .05) / (i + .05) : (i + .05) / (r + .05);
1115
1115
  }
1116
- var Ge = /* @__PURE__ */ new Map();
1117
- function Ke(e, t) {
1118
- let n = e[0] + e[1] * 256 + e[2] * 65536 + t[0] * 16777216 + t[1] * 4294967296 + t[2] * 1099511627776, r = Ge.get(n);
1116
+ var We = /* @__PURE__ */ new Map();
1117
+ function Ge(e, t) {
1118
+ let n = e[0] + e[1] * 256 + e[2] * 65536 + t[0] * 16777216 + t[1] * 4294967296 + t[2] * 1099511627776, r = We.get(n);
1119
1119
  if (r) return r;
1120
1120
  let i = /* @__PURE__ */ new Float32Array(9), a = i.subarray(0, 3), o = i.subarray(3, 6);
1121
- Ve(e, o);
1121
+ Be(e, o);
1122
1122
  let s = i.subarray(6, 9);
1123
- Ve(t, s);
1123
+ Be(t, s);
1124
1124
  let c = s[2] < .5, l = c ? 12 : 4.5;
1125
- if (o[2] = c ? Math.sqrt(o[2]) : 1 - Math.sqrt(1 - o[2]), We(o, s, a) < l) {
1125
+ if (o[2] = c ? Math.sqrt(o[2]) : 1 - Math.sqrt(1 - o[2]), Ue(o, s, a) < l) {
1126
1126
  let e, t;
1127
1127
  for (c ? (e = o[2], t = 1) : (e = 0, t = o[2]); t - e > .005;) {
1128
1128
  let n = o[2] = (e + t) / 2;
1129
- c === We(o, s, a) < l ? e = n : t = n;
1129
+ c === Ue(o, s, a) < l ? e = n : t = n;
1130
1130
  }
1131
1131
  o[2] = c ? t : e;
1132
1132
  }
1133
- return He(o, a), r = F.makeHexColor(Math.round(a[0] * 255), Math.round(a[1] * 255), Math.round(a[2] * 255)), Ge.set(n, r), r;
1133
+ return Ve(o, a), r = I.makeHexColor(Math.round(a[0] * 255), Math.round(a[1] * 255), Math.round(a[2] * 255)), We.set(n, r), r;
1134
1134
  }
1135
- function qe({ html: e, dir: t, className: n }, r) {
1135
+ function Ke({ html: e, dir: t, className: n }, r) {
1136
1136
  let i = document.createDocumentFragment();
1137
1137
  if (typeof e == "string") {
1138
1138
  let n = document.createElement("p");
@@ -1143,14 +1143,14 @@ function qe({ html: e, dir: t, className: n }, r) {
1143
1143
  n.append(document.createTextNode(i)), e < t - 1 && n.append(document.createElement("br"));
1144
1144
  }
1145
1145
  i.append(n);
1146
- } else xe.render({
1146
+ } else be.render({
1147
1147
  xfaHtml: e,
1148
1148
  div: i,
1149
1149
  intent: "richText"
1150
1150
  });
1151
1151
  i.firstElementChild.classList.add("richText", n), r.append(i);
1152
1152
  }
1153
- function Je(e) {
1153
+ function qe(e) {
1154
1154
  let t = new Path2D();
1155
1155
  if (!e) return t;
1156
1156
  for (let n = 0, r = e.length; n < r;) switch (e[n++]) {
@@ -1173,7 +1173,7 @@ function Je(e) {
1173
1173
  }
1174
1174
  return t;
1175
1175
  }
1176
- var Ye = class e {
1176
+ var Je = class e {
1177
1177
  #e = null;
1178
1178
  #t = null;
1179
1179
  #n;
@@ -1196,7 +1196,7 @@ var Ye = class e {
1196
1196
  let t = this.#e = document.createElement("div");
1197
1197
  t.classList.add("editToolbar", "hidden"), t.setAttribute("role", "toolbar");
1198
1198
  let n = this.#n._uiManager._signal;
1199
- n instanceof AbortSignal && !n.aborted && (t.addEventListener("contextmenu", L, { signal: n }), t.addEventListener("pointerdown", e.#l, { signal: n }));
1199
+ n instanceof AbortSignal && !n.aborted && (t.addEventListener("contextmenu", R, { signal: n }), t.addEventListener("pointerdown", e.#l, { signal: n }));
1200
1200
  let r = this.#r = document.createElement("div");
1201
1201
  r.className = "buttons", t.append(r);
1202
1202
  let i = this.#n.toolbarPosition;
@@ -1213,10 +1213,10 @@ var Ye = class e {
1213
1213
  e.stopPropagation();
1214
1214
  }
1215
1215
  #u(e) {
1216
- this.#n._focusEventsAllowed = !1, R(e);
1216
+ this.#n._focusEventsAllowed = !1, z(e);
1217
1217
  }
1218
1218
  #d(e) {
1219
- this.#n._focusEventsAllowed = !0, R(e);
1219
+ this.#n._focusEventsAllowed = !0, z(e);
1220
1220
  }
1221
1221
  #f(e) {
1222
1222
  let t = this.#n._uiManager._signal;
@@ -1226,7 +1226,7 @@ var Ye = class e {
1226
1226
  }), e.addEventListener("focusout", this.#d.bind(this), {
1227
1227
  capture: !0,
1228
1228
  signal: t
1229
- }), e.addEventListener("contextmenu", L, { signal: t }), !0);
1229
+ }), e.addEventListener("contextmenu", R, { signal: t }), !0);
1230
1230
  }
1231
1231
  hide() {
1232
1232
  this.#e.classList.add("hidden"), this.#t?.hideDropdown();
@@ -1297,7 +1297,7 @@ var Ye = class e {
1297
1297
  remove() {
1298
1298
  this.#e.remove(), this.#t?.destroy(), this.#t = null;
1299
1299
  }
1300
- }, Xe = class {
1300
+ }, Ye = class {
1301
1301
  #e = null;
1302
1302
  #t = null;
1303
1303
  #n;
@@ -1308,7 +1308,7 @@ var Ye = class e {
1308
1308
  let e = this.#t = document.createElement("div");
1309
1309
  e.className = "editToolbar", e.setAttribute("role", "toolbar");
1310
1310
  let t = this.#n._signal;
1311
- t instanceof AbortSignal && !t.aborted && e.addEventListener("contextmenu", L, { signal: t });
1311
+ t instanceof AbortSignal && !t.aborted && e.addEventListener("contextmenu", R, { signal: t });
1312
1312
  let n = this.#e = document.createElement("div");
1313
1313
  return n.className = "buttons", e.append(n), this.#n.hasCommentManager() && this.#a("commentButton", "pdfjs-comment-floating-button", "pdfjs-comment-floating-button-label", () => {
1314
1314
  this.#n.commentSelection("floating_button");
@@ -1343,13 +1343,13 @@ var Ye = class e {
1343
1343
  let a = document.createElement("span");
1344
1344
  i.append(a), a.className = "visuallyHidden", a.setAttribute("data-l10n-id", n);
1345
1345
  let o = this.#n._signal;
1346
- o instanceof AbortSignal && !o.aborted && (i.addEventListener("contextmenu", L, { signal: o }), i.addEventListener("click", r, { signal: o })), this.#e.append(i);
1346
+ o instanceof AbortSignal && !o.aborted && (i.addEventListener("contextmenu", R, { signal: o }), i.addEventListener("click", r, { signal: o })), this.#e.append(i);
1347
1347
  }
1348
- }, Ze = Object.freeze({ internal: "f63eb798-ea37-4556-98de-f8303ee5a694" });
1349
- function Qe(e, t, n) {
1348
+ }, Xe = Object.freeze({ internal: "f63eb798-ea37-4556-98de-f8303ee5a694" });
1349
+ function Ze(e, t, n) {
1350
1350
  for (let r of n) t.addEventListener(r, e[r].bind(e));
1351
1351
  }
1352
- var V = class e {
1352
+ var H = class e {
1353
1353
  static #e = NaN;
1354
1354
  static #t = null;
1355
1355
  static #n = NaN;
@@ -1390,13 +1390,13 @@ var V = class e {
1390
1390
  static clearTimeStamp() {
1391
1391
  e.#n = NaN;
1392
1392
  }
1393
- }, $e = class {
1393
+ }, Qe = class {
1394
1394
  #e = 0;
1395
1395
  get id() {
1396
1396
  return `${c}${this.#e++}`;
1397
1397
  }
1398
- }, et = class e {
1399
- #e = de();
1398
+ }, $e = class e {
1399
+ #e = ue();
1400
1400
  #t = 0;
1401
1401
  #n = null;
1402
1402
  static get _isSVGFittingCanvas() {
@@ -1418,7 +1418,7 @@ var V = class e {
1418
1418
  isSvg: !1
1419
1419
  };
1420
1420
  let t;
1421
- if (typeof n == "string" ? (r.url = n, t = await Ce(n, "blob")) : n instanceof File ? t = r.file = n : n instanceof Blob && (t = n), t.type === "image/svg+xml") {
1421
+ if (typeof n == "string" ? (r.url = n, t = await Se(n, "blob")) : n instanceof File ? t = r.file = n : n instanceof Blob && (t = n), t.type === "image/svg+xml") {
1422
1422
  let n = e._isSVGFittingCanvas, i = new FileReader(), a = new Image(), o = new Promise((e, t) => {
1423
1423
  a.onload = () => {
1424
1424
  r.bitmap = a, r.isSvg = !0, e();
@@ -1488,7 +1488,7 @@ var V = class e {
1488
1488
  isValidId(e) {
1489
1489
  return e.startsWith(`image_${this.#e}_`);
1490
1490
  }
1491
- }, tt = class {
1491
+ }, et = class {
1492
1492
  #e = [];
1493
1493
  #t = !1;
1494
1494
  #n;
@@ -1546,14 +1546,14 @@ var V = class e {
1546
1546
  destroy() {
1547
1547
  this.#e = null;
1548
1548
  }
1549
- }, nt = class e {
1549
+ }, tt = class e {
1550
1550
  static ALT = 1;
1551
1551
  static CTRL = 2;
1552
1552
  static META = 4;
1553
1553
  static SHIFT = 8;
1554
1554
  constructor(t) {
1555
1555
  this.callbacks = /* @__PURE__ */ new Map();
1556
- let { isMac: n } = P.platform;
1556
+ let { isMac: n } = F.platform;
1557
1557
  for (let [r, i, a = {}] of t) {
1558
1558
  let t = r.some((e) => e.startsWith("mac+"));
1559
1559
  for (let o of r) {
@@ -1564,7 +1564,7 @@ var V = class e {
1564
1564
  e && (r = o.slice(4));
1565
1565
  }
1566
1566
  let [s, c] = e.#e(r);
1567
- s !== null && this.callbacks.getOrInsertComputed(s, pe).push({
1567
+ s !== null && this.callbacks.getOrInsertComputed(s, fe).push({
1568
1568
  callback: i,
1569
1569
  options: a,
1570
1570
  modifiers: c
@@ -1603,9 +1603,9 @@ var V = class e {
1603
1603
  let i = (n.altKey ? e.ALT : 0) | (n.ctrlKey ? e.CTRL : 0) | (n.metaKey ? e.META : 0) | (n.shiftKey ? e.SHIFT : 0), a = r.find((e) => e.modifiers === i);
1604
1604
  if (!a) return;
1605
1605
  let { callback: o, options: { bubbles: s = !1, args: c = [], checker: l = null } } = a;
1606
- l && !l(t, n) || (o.bind(t, ...c, n)(), s || R(n));
1606
+ l && !l(t, n) || (o.bind(t, ...c, n)(), s || z(n));
1607
1607
  }
1608
- }, rt = class e {
1608
+ }, nt = class e {
1609
1609
  static _colorsMapping = /* @__PURE__ */ new Map([["CanvasText", [
1610
1610
  0,
1611
1611
  0,
@@ -1617,19 +1617,19 @@ var V = class e {
1617
1617
  ]]]);
1618
1618
  get _colors() {
1619
1619
  let e = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
1620
- return Pe(e), A(this, "_colors", e);
1620
+ return Ne(e), A(this, "_colors", e);
1621
1621
  }
1622
1622
  convert(t) {
1623
- let n = Ne(t);
1623
+ let n = Me(t);
1624
1624
  if (!window.matchMedia("(forced-colors: active)").matches) return n;
1625
1625
  for (let [t, r] of this._colors) if (r.every((e, t) => e === n[t])) return e._colorsMapping.get(t);
1626
1626
  return n;
1627
1627
  }
1628
1628
  getHexCode(e) {
1629
1629
  let t = this._colors.get(e);
1630
- return t ? F.makeHexColor(...t) : e;
1630
+ return t ? I.makeHexColor(...t) : e;
1631
1631
  }
1632
- }, it = class e {
1632
+ }, rt = class e {
1633
1633
  #e = new AbortController();
1634
1634
  #t = null;
1635
1635
  #n = null;
@@ -1639,7 +1639,7 @@ var V = class e {
1639
1639
  #o = null;
1640
1640
  #s = null;
1641
1641
  #c = null;
1642
- #l = new tt();
1642
+ #l = new et();
1643
1643
  #u = null;
1644
1644
  #d = null;
1645
1645
  #f = null;
@@ -1658,7 +1658,7 @@ var V = class e {
1658
1658
  #w = null;
1659
1659
  #T = !1;
1660
1660
  #E = null;
1661
- #D = new $e();
1661
+ #D = new Qe();
1662
1662
  #O = !1;
1663
1663
  #k = !1;
1664
1664
  #A = !1;
@@ -1698,7 +1698,7 @@ var V = class e {
1698
1698
  }
1699
1699
  return !0;
1700
1700
  }, i = this.TRANSLATE_SMALL, a = this.TRANSLATE_BIG;
1701
- return A(this, "_keyboardManager", new nt([
1701
+ return A(this, "_keyboardManager", new tt([
1702
1702
  [
1703
1703
  ["ctrl+a", "mac+meta+a"],
1704
1704
  t.selectAll,
@@ -1819,7 +1819,7 @@ var V = class e {
1819
1819
  this.#K = e, this.#q = t, this.#J = n, this.#o = r, this.#u = i, this.#z = a, this.#H = s, this._eventBus = o;
1820
1820
  let _ = {
1821
1821
  signal: g,
1822
- ...Ze
1822
+ ...Xe
1823
1823
  };
1824
1824
  o.on("editingaction", this.onEditingAction.bind(this), _), o.on("pagechanging", this.onPageChanging.bind(this), _), o.on("scalechanging", this.onScaleChanging.bind(this), _), o.on("rotationchanging", this.onRotationChanging.bind(this), _), o.on("setpreference", this.onSetPreference.bind(this), _), o.on("switchannotationeditorparams", (e) => this.updateParams(e.type, e.value), _), window.addEventListener("pointerdown", () => {
1825
1825
  this.#k = !0;
@@ -1835,7 +1835,7 @@ var V = class e {
1835
1835
  capture: !0,
1836
1836
  signal: g
1837
1837
  }), this.#te(), this.#ce(), this.#ie(), this.#s = s.annotationStorage, this.#x = s.filterFactory, this.#B = c, this.#w = l || null, this.#v = u, this.#y = d, this.#b = f, this.#F = p || null, this.viewParameters = {
1838
- realScale: Se.PDF_TO_CSS_UNITS,
1838
+ realScale: xe.PDF_TO_CSS_UNITS,
1839
1839
  rotation: 0
1840
1840
  }, this.isShiftKeyDown = !1, this._editorUndoBar = m || null, this._supportsPinchToZoom = h !== !1, i?.setSidebarUiManager(this);
1841
1841
  }
@@ -1943,7 +1943,7 @@ var V = class e {
1943
1943
  let { resolve: t, promise: n } = Promise.withResolvers(), r = (n) => {
1944
1944
  n.pageNumber === e && (this._eventBus.off("editorsrendered", r), t());
1945
1945
  };
1946
- this._eventBus.on("editorsrendered", r, Ze), await n;
1946
+ this._eventBus.on("editorsrendered", r, Xe), await n;
1947
1947
  }
1948
1948
  getSignature(e) {
1949
1949
  this.#z?.getSignature({
@@ -1958,7 +1958,7 @@ var V = class e {
1958
1958
  this._eventBus.on("annotationeditormodechanged", t, {
1959
1959
  once: !0,
1960
1960
  signal: this._signal,
1961
- ...Ze
1961
+ ...Xe
1962
1962
  }), this._eventBus.dispatch("showannotationeditorui", {
1963
1963
  source: this,
1964
1964
  mode: e
@@ -2001,7 +2001,7 @@ var V = class e {
2001
2001
  this.#_.delete(e);
2002
2002
  }
2003
2003
  onScaleChanging({ scale: e }) {
2004
- this.commitOrRemove(), this.viewParameters.realScale = e * Se.PDF_TO_CSS_UNITS;
2004
+ this.commitOrRemove(), this.viewParameters.realScale = e * xe.PDF_TO_CSS_UNITS;
2005
2005
  for (let e of this.#_) e.onScaleChanging();
2006
2006
  this.#f?.onScaleChanging();
2007
2007
  }
@@ -2054,7 +2054,7 @@ var V = class e {
2054
2054
  let e = document.getSelection();
2055
2055
  if (!e || e.isCollapsed) return;
2056
2056
  let t = this.#X(e).closest(".textLayer"), n = this.getSelectionBoxes(t);
2057
- n && (this.#E ||= new Xe(this), this.#E.show(t, n, this.direction === "ltr"));
2057
+ n && (this.#E ||= new Ye(this), this.#E.show(t, n, this.direction === "ltr"));
2058
2058
  }
2059
2059
  getAndRemoveDataFromAnnotationStorage(e) {
2060
2060
  if (!this.#s) return null;
@@ -2313,7 +2313,7 @@ var V = class e {
2313
2313
  return;
2314
2314
  }
2315
2315
  for (let e of this.#r.values()) e.addStandaloneCommentButton();
2316
- e === l.SIGNATURE && await this.#z?.loadSignatures(), n && V.clearPointerType(), this.setEditingState(!0), await this.#de(), this.unselectAll();
2316
+ e === l.SIGNATURE && await this.#z?.loadSignatures(), n && H.clearPointerType(), this.setEditingState(!0), await this.#de(), this.unselectAll();
2317
2317
  for (let t of this.#i.values()) t.updateMode(e);
2318
2318
  if (e === l.POPUP) {
2319
2319
  this.#n ||= await this.#H.getAnnotationsByType(new Set(this.#g.map((e) => e._editorType)));
@@ -2606,7 +2606,7 @@ var V = class e {
2606
2606
  return this.#I !== l.NONE;
2607
2607
  }
2608
2608
  get imageManager() {
2609
- return A(this, "imageManager", new et());
2609
+ return A(this, "imageManager", new $e());
2610
2610
  }
2611
2611
  getSelectionBoxes(e) {
2612
2612
  if (!e) return null;
@@ -2671,7 +2671,7 @@ var V = class e {
2671
2671
  addMissingCanvas(e, t) {
2672
2672
  (this.#P ||= /* @__PURE__ */ new Map()).set(e, t);
2673
2673
  }
2674
- }, at = class e {
2674
+ }, it = class e {
2675
2675
  #e = null;
2676
2676
  #t = !1;
2677
2677
  #n = null;
@@ -2705,7 +2705,7 @@ var V = class e {
2705
2705
  let n = this.#r = document.createElement("span");
2706
2706
  t.append(n), this.#d ? (t.classList.add("new"), t.setAttribute("data-l10n-id", e.#f.missing), n.setAttribute("data-l10n-id", e.#f["missing-label"])) : (t.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button"), n.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button-label"));
2707
2707
  let r = this.#c._uiManager._signal;
2708
- t.addEventListener("contextmenu", L, { signal: r }), t.addEventListener("pointerdown", (e) => e.stopPropagation(), { signal: r });
2708
+ t.addEventListener("contextmenu", R, { signal: r }), t.addEventListener("pointerdown", (e) => e.stopPropagation(), { signal: r });
2709
2709
  let i = (e) => {
2710
2710
  e.preventDefault(), this.#c._uiManager.editAltText(this.#c), this.#d && this.#c._reportTelemetry({
2711
2711
  action: "pdfjs.image.alt_text.image_status_label_clicked",
@@ -2809,7 +2809,7 @@ var V = class e {
2809
2809
  }
2810
2810
  this.#t ? n.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-decorative-tooltip") : (n.removeAttribute("data-l10n-id"), n.textContent = this.#e), n.parentNode || t.append(n), this.#c.getElementForAltText()?.setAttribute("aria-describedby", n.id);
2811
2811
  }
2812
- }, ot = class {
2812
+ }, at = class {
2813
2813
  #e = null;
2814
2814
  #t = null;
2815
2815
  #n = !1;
@@ -2878,13 +2878,13 @@ var V = class e {
2878
2878
  e.tabIndex = "0", e.ariaHasPopup = "dialog", t ? (e.ariaControls = "commentPopup", e.setAttribute("data-l10n-id", "pdfjs-show-comment-button")) : (e.ariaControlsElements = [this.#r._uiManager.getCommentDialogElement()], e.setAttribute("data-l10n-id", "pdfjs-editor-add-comment-button"));
2879
2879
  let n = this.#r._uiManager._signal;
2880
2880
  if (!(n instanceof AbortSignal) || n.aborted) return e;
2881
- e.addEventListener("contextmenu", L, { signal: n }), t && (e.addEventListener("focusin", (e) => {
2882
- this.#r._focusEventsAllowed = !1, R(e);
2881
+ e.addEventListener("contextmenu", R, { signal: n }), t && (e.addEventListener("focusin", (e) => {
2882
+ this.#r._focusEventsAllowed = !1, z(e);
2883
2883
  }, {
2884
2884
  capture: !0,
2885
2885
  signal: n
2886
2886
  }), e.addEventListener("focusout", (e) => {
2887
- this.#r._focusEventsAllowed = !0, R(e);
2887
+ this.#r._focusEventsAllowed = !0, z(e);
2888
2888
  }, {
2889
2889
  capture: !0,
2890
2890
  signal: n
@@ -2957,7 +2957,7 @@ var V = class e {
2957
2957
  destroy() {
2958
2958
  this.#t?.remove(), this.#t = null, this.#e?.remove(), this.#e = null, this.#o = "", this.#a = null, this.#s = null, this.#r = null, this.#n = !1, this.#c = !1;
2959
2959
  }
2960
- }, st = class e {
2960
+ }, ot = class e {
2961
2961
  #e;
2962
2962
  #t = !1;
2963
2963
  #n = null;
@@ -2977,7 +2977,7 @@ var V = class e {
2977
2977
  });
2978
2978
  }
2979
2979
  get MIN_TOUCH_DISTANCE_TO_PINCH() {
2980
- return 35 / Ie.pixelRatio;
2980
+ return 35 / Fe.pixelRatio;
2981
2981
  }
2982
2982
  #f(e) {
2983
2983
  if (this.#r?.()) return;
@@ -2991,7 +2991,7 @@ var V = class e {
2991
2991
  e.pointerType === "touch" && (this.#s?.abort(), this.#s = null);
2992
2992
  };
2993
2993
  n.addEventListener("pointerdown", (e) => {
2994
- e.pointerType === "touch" && (R(e), i(e));
2994
+ e.pointerType === "touch" && (z(e), i(e));
2995
2995
  }, r), n.addEventListener("pointerup", i, r), n.addEventListener("pointercancel", i, r);
2996
2996
  return;
2997
2997
  }
@@ -3004,9 +3004,9 @@ var V = class e {
3004
3004
  };
3005
3005
  t.addEventListener("touchmove", this.#p.bind(this), n);
3006
3006
  let r = this.#m.bind(this);
3007
- t.addEventListener("touchend", r, n), t.addEventListener("touchcancel", r, n), n.capture = !0, t.addEventListener("pointerdown", R, n), t.addEventListener("pointermove", R, n), t.addEventListener("pointercancel", R, n), t.addEventListener("pointerup", R, n), this.#i?.();
3007
+ t.addEventListener("touchend", r, n), t.addEventListener("touchcancel", r, n), n.capture = !0, t.addEventListener("pointerdown", z, n), t.addEventListener("pointermove", z, n), t.addEventListener("pointercancel", z, n), t.addEventListener("pointerup", z, n), this.#i?.();
3008
3008
  }
3009
- if (R(e), e.touches.length !== 2 || this.#n?.()) {
3009
+ if (z(e), e.touches.length !== 2 || this.#n?.()) {
3010
3010
  this.#l = null;
3011
3011
  return;
3012
3012
  }
@@ -3020,7 +3020,7 @@ var V = class e {
3020
3020
  }
3021
3021
  #p(t) {
3022
3022
  if (!this.#l || t.touches.length !== 2) return;
3023
- R(t);
3023
+ z(t);
3024
3024
  let [n, r] = t.touches;
3025
3025
  n.identifier > r.identifier && ([n, r] = [r, n]);
3026
3026
  let { screenX: i, screenY: a } = n, { screenX: o, screenY: s } = r, c = this.#l, { touch0X: l, touch0Y: u, touch1X: d, touch1Y: f } = c, p = d - l, m = f - u, h = o - i, g = s - a, _ = Math.hypot(h, g) || 1, v = Math.hypot(p, m) || 1;
@@ -3033,12 +3033,12 @@ var V = class e {
3033
3033
  this.#a?.(y, v, _);
3034
3034
  }
3035
3035
  #m(e) {
3036
- e.touches.length >= 2 || (this.#d && (this.#d.abort(), this.#d = null, this.#o?.()), this.#l && (R(e), this.#l = null, this.#t = !1));
3036
+ e.touches.length >= 2 || (this.#d && (this.#d.abort(), this.#d = null, this.#o?.()), this.#l && (z(e), this.#l = null, this.#t = !1));
3037
3037
  }
3038
3038
  destroy() {
3039
3039
  this.#u?.abort(), this.#u = null, this.#s?.abort(), this.#s = null;
3040
3040
  }
3041
- }, H = class e {
3041
+ }, U = class e {
3042
3042
  #e = null;
3043
3043
  #t = null;
3044
3044
  #n = null;
@@ -3077,12 +3077,12 @@ var V = class e {
3077
3077
  #w = !1;
3078
3078
  #T = e._zIndex++;
3079
3079
  static _borderLineWidth = -1;
3080
- static _colorManager = new rt();
3080
+ static _colorManager = new nt();
3081
3081
  static _zIndex = 1;
3082
3082
  static _telemetryTimeout = 1e3;
3083
3083
  static get _resizerKeyboardManager() {
3084
- let t = e.prototype._resizeWithKeyboard, n = it.TRANSLATE_SMALL, r = it.TRANSLATE_BIG;
3085
- return A(this, "_resizerKeyboardManager", new nt([
3084
+ let t = e.prototype._resizeWithKeyboard, n = rt.TRANSLATE_SMALL, r = rt.TRANSLATE_BIG;
3085
+ return A(this, "_resizerKeyboardManager", new tt([
3086
3086
  [
3087
3087
  ["ArrowLeft"],
3088
3088
  t,
@@ -3149,7 +3149,7 @@ var V = class e {
3149
3149
  return A(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
3150
3150
  }
3151
3151
  static deleteAnnotationElement(e) {
3152
- let t = new ct({
3152
+ let t = new st({
3153
3153
  id: e._uiManager.getId(),
3154
3154
  parent: e.parent,
3155
3155
  uiManager: e._uiManager
@@ -3317,15 +3317,15 @@ var V = class e {
3317
3317
  let { div: { style: t }, pageDimensions: [n, r] } = this, { x: i, y: a, width: o, height: s } = this;
3318
3318
  if (o *= n, s *= r, i *= n, a *= r, this._mustFixPosition) switch (e) {
3319
3319
  case 0:
3320
- i = I(i, 0, n - o), a = I(a, 0, r - s);
3320
+ i = L(i, 0, n - o), a = L(a, 0, r - s);
3321
3321
  break;
3322
3322
  case 90:
3323
- i = I(i, 0, n - s), a = I(a, o, r);
3323
+ i = L(i, 0, n - s), a = L(a, o, r);
3324
3324
  break;
3325
3325
  case 180:
3326
- i = I(i, o, n), a = I(a, s, r);
3326
+ i = L(i, o, n), a = L(a, s, r);
3327
3327
  break;
3328
- case 270: i = I(i, s, n), a = I(a, 0, r - o);
3328
+ case 270: i = L(i, s, n), a = L(a, 0, r - o);
3329
3329
  }
3330
3330
  this.x = i /= n, this.y = a /= r;
3331
3331
  let [c, l] = this.getBaseTranslation();
@@ -3416,13 +3416,13 @@ var V = class e {
3416
3416
  ], t = this._uiManager._signal;
3417
3417
  for (let n of e) {
3418
3418
  let e = document.createElement("div");
3419
- this.#c.append(e), e.classList.add("resizer", n), e.setAttribute("data-resizer-name", n), e.addEventListener("pointerdown", this.#A.bind(this, n), { signal: t }), e.addEventListener("contextmenu", L, { signal: t }), e.tabIndex = -1;
3419
+ this.#c.append(e), e.classList.add("resizer", n), e.setAttribute("data-resizer-name", n), e.addEventListener("pointerdown", this.#A.bind(this, n), { signal: t }), e.addEventListener("contextmenu", R, { signal: t }), e.tabIndex = -1;
3420
3420
  }
3421
3421
  this.div.prepend(this.#c);
3422
3422
  }
3423
3423
  #A(e, t) {
3424
3424
  t.preventDefault();
3425
- let { isMac: n } = P.platform;
3425
+ let { isMac: n } = F.platform;
3426
3426
  if (t.button !== 0 || t.ctrlKey && n) return;
3427
3427
  this.#n?.toggle(!1);
3428
3428
  let r = this._isDraggable;
@@ -3432,10 +3432,10 @@ var V = class e {
3432
3432
  passive: !0,
3433
3433
  capture: !0,
3434
3434
  signal: a
3435
- }), window.addEventListener("touchmove", R, {
3435
+ }), window.addEventListener("touchmove", z, {
3436
3436
  passive: !1,
3437
3437
  signal: a
3438
- }), window.addEventListener("contextmenu", L, { signal: a }), this.#u = {
3438
+ }), window.addEventListener("contextmenu", R, { signal: a }), this.#u = {
3439
3439
  savedX: this.x,
3440
3440
  savedY: this.y,
3441
3441
  savedWidth: this.width,
@@ -3501,7 +3501,7 @@ var V = class e {
3501
3501
  if ([E, D] = m(E / r, D / i), _) {
3502
3502
  let e = Math.hypot(s, c);
3503
3503
  w = T = Math.max(Math.min(Math.hypot(b[0] - y[0] - E, b[1] - y[1] - D) / e, 1 / s, 1 / c), l / s, u / c);
3504
- } else v ? w = I(Math.abs(b[0] - y[0] - E), l, 1) / s : T = I(Math.abs(b[1] - y[1] - D), u, 1) / c;
3504
+ } else v ? w = L(Math.abs(b[0] - y[0] - E), l, 1) / s : T = L(Math.abs(b[1] - y[1] - D), u, 1) / c;
3505
3505
  let O = e._round(s * w), ee = e._round(c * T);
3506
3506
  x = f(...g(O, ee));
3507
3507
  let k = S - x[0], A = C - x[1];
@@ -3521,7 +3521,7 @@ var V = class e {
3521
3521
  }
3522
3522
  async addEditToolbar() {
3523
3523
  if (this._editToolbar || this.#_) return this._editToolbar;
3524
- this._editToolbar = new Ye(this), this.div.append(this._editToolbar.render());
3524
+ this._editToolbar = new Je(this), this.div.append(this._editToolbar.render());
3525
3525
  let { toolbarButtons: e } = this;
3526
3526
  if (e) for (let [t, n] of e) await this._editToolbar.addButton(t, n);
3527
3527
  return this.hasComment || this._editToolbar.addButton("comment", this.addCommentButton()), this._editToolbar.addButton("delete"), this._editToolbar;
@@ -3543,7 +3543,7 @@ var V = class e {
3543
3543
  return this.div.getBoundingClientRect();
3544
3544
  }
3545
3545
  createAltText() {
3546
- return this.#n || (at.initialize(e._l10n), this.#n = new at(this), this.#e &&= (this.#n.data = this.#e, null)), this.#n;
3546
+ return this.#n || (it.initialize(e._l10n), this.#n = new it(this), this.#e &&= (this.#n.data = this.#e, null)), this.#n;
3547
3547
  }
3548
3548
  get altTextData() {
3549
3549
  return this.#n?.data;
@@ -3570,7 +3570,7 @@ var V = class e {
3570
3570
  this.#r?.focusButton();
3571
3571
  }
3572
3572
  addCommentButton() {
3573
- return this.canAddComment ? this.#r ||= new ot(this) : null;
3573
+ return this.canAddComment ? this.#r ||= new at(this) : null;
3574
3574
  }
3575
3575
  addStandaloneCommentButton() {
3576
3576
  if (this._uiManager.hasCommentManager()) {
@@ -3600,10 +3600,10 @@ var V = class e {
3600
3600
  };
3601
3601
  }
3602
3602
  set comment(e) {
3603
- this.#r ||= new ot(this), typeof e == "object" && e ? this.#r.restoreData(e) : this.#r.data = e, this.hasComment ? (this.removeCommentButtonFromToolbar(), this.addStandaloneCommentButton(), this._uiManager.updateComment(this)) : (this.addCommentButtonInToolbar(), this.removeStandaloneCommentButton(), this._uiManager.removeComment(this));
3603
+ this.#r ||= new at(this), typeof e == "object" && e ? this.#r.restoreData(e) : this.#r.data = e, this.hasComment ? (this.removeCommentButtonFromToolbar(), this.addStandaloneCommentButton(), this._uiManager.updateComment(this)) : (this.addCommentButtonInToolbar(), this.removeStandaloneCommentButton(), this._uiManager.removeComment(this));
3604
3604
  }
3605
3605
  setCommentData({ comment: e, popupRef: t, richText: n }) {
3606
- if (!t || (this.#r ||= new ot(this), this.#r.setInitialText(e, n), !this.annotationElementId)) return;
3606
+ if (!t || (this.#r ||= new at(this), this.#r.setInitialText(e, n), !this.annotationElementId)) return;
3607
3607
  let r = this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);
3608
3608
  r && this.updateFromAnnotationLayer(r);
3609
3609
  }
@@ -3617,7 +3617,7 @@ var V = class e {
3617
3617
  return !!this.#r && !this.#r.isEmpty() && !this.#r.isDeleted();
3618
3618
  }
3619
3619
  async editComment(e) {
3620
- this.#r ||= new ot(this), this.#r.edit(e);
3620
+ this.#r ||= new at(this), this.#r.edit(e);
3621
3621
  }
3622
3622
  toggleComment(e, t = void 0) {
3623
3623
  this.hasComment && this._uiManager.toggleComment(this, e, t);
@@ -3652,11 +3652,11 @@ var V = class e {
3652
3652
  let [t, n] = this.parentDimensions;
3653
3653
  this.parentRotation % 180 != 0 && (e.style.maxWidth = `${(100 * n / t).toFixed(2)}%`, e.style.maxHeight = `${(100 * t / n).toFixed(2)}%`);
3654
3654
  let [r, i] = this.getInitialTranslation();
3655
- return this.translate(r, i), Qe(this, e, [
3655
+ return this.translate(r, i), Ze(this, e, [
3656
3656
  "keydown",
3657
3657
  "pointerdown",
3658
3658
  "dblclick"
3659
- ]), this.isResizable && this._uiManager._supportsPinchToZoom && (this.#C ||= new st({
3659
+ ]), this.isResizable && this._uiManager._supportsPinchToZoom && (this.#C ||= new ot({
3660
3660
  container: e,
3661
3661
  isPinchingDisabled: () => !this.isSelected,
3662
3662
  onPinchStart: this.#P.bind(this),
@@ -3693,7 +3693,7 @@ var V = class e {
3693
3693
  this.#n?.toggle(!0), this.parent.togglePointerEvents(!0), this.#M();
3694
3694
  }
3695
3695
  pointerdown(e) {
3696
- let { isMac: t } = P.platform;
3696
+ let { isMac: t } = F.platform;
3697
3697
  if (e.button !== 0 || e.ctrlKey && t) {
3698
3698
  e.preventDefault();
3699
3699
  return;
@@ -3705,7 +3705,7 @@ var V = class e {
3705
3705
  this.#L(e);
3706
3706
  }
3707
3707
  #L(e) {
3708
- let { isMac: t } = P.platform;
3708
+ let { isMac: t } = F.platform;
3709
3709
  e.ctrlKey && !t || e.shiftKey || e.metaKey && t ? this.parent.toggleSelected(this) : this.parent.setSelected(this);
3710
3710
  }
3711
3711
  #R(e) {
@@ -3722,20 +3722,20 @@ var V = class e {
3722
3722
  n || (n = !0, this._uiManager.toggleComment(this, !0, !1), this._onStartDragging());
3723
3723
  let { clientX: t, clientY: r, pointerId: i } = e;
3724
3724
  if (i !== this.#o) {
3725
- R(e);
3725
+ z(e);
3726
3726
  return;
3727
3727
  }
3728
3728
  let [a, o] = this.screenToPageTranslation(t - this.#b, r - this.#x);
3729
3729
  this.#b = t, this.#x = r, this._uiManager.dragSelectedEditors(a, o);
3730
- }, a), window.addEventListener("touchmove", R, a), window.addEventListener("pointerdown", (e) => {
3731
- e.pointerType === this.#s && (this.#C || e.isPrimary) && o(e), R(e);
3730
+ }, a), window.addEventListener("touchmove", z, a), window.addEventListener("pointerdown", (e) => {
3731
+ e.pointerType === this.#s && (this.#C || e.isPrimary) && o(e), z(e);
3732
3732
  }, a));
3733
3733
  let s = (e) => {
3734
3734
  if (!this.#o || this.#o === e.pointerId) {
3735
3735
  o(e);
3736
3736
  return;
3737
3737
  }
3738
- R(e);
3738
+ z(e);
3739
3739
  };
3740
3740
  window.addEventListener("pointerup", s, { signal: i }), window.addEventListener("blur", s, { signal: i });
3741
3741
  }
@@ -4119,16 +4119,16 @@ var V = class e {
4119
4119
  let { firstElementChild: t } = e.container;
4120
4120
  t?.nodeName === "DIV" && t.classList.contains("annotationContent") && t.remove();
4121
4121
  }
4122
- }, ct = class extends H {
4122
+ }, st = class extends U {
4123
4123
  constructor(e) {
4124
4124
  super(e), this.annotationElementId = e.annotationElementId, this.deleted = !0;
4125
4125
  }
4126
4126
  serialize() {
4127
4127
  return this.serializeDeleted();
4128
4128
  }
4129
- }, lt = 3285377520, U = 4294901760, W = 65535, ut = class {
4129
+ }, ct = 3285377520, W = 4294901760, lt = 65535, ut = class {
4130
4130
  constructor(e) {
4131
- this.h1 = e ? e & 4294967295 : lt, this.h2 = e ? e & 4294967295 : lt;
4131
+ this.h1 = e ? e & 4294967295 : ct, this.h2 = e ? e & 4294967295 : ct;
4132
4132
  }
4133
4133
  update(e) {
4134
4134
  let t, n;
@@ -4141,17 +4141,17 @@ var V = class e {
4141
4141
  } else if (ArrayBuffer.isView(e)) t = e.slice(), n = t.byteLength;
4142
4142
  else throw Error("Invalid data format, must be a string or TypedArray.");
4143
4143
  let r = n >> 2, i = n - r * 4, a = new Uint32Array(t.buffer, 0, r), o = 0, s = 0, c = this.h1, l = this.h2, u = 3432918353, d = 461845907, f = 11601, p = 13715;
4144
- for (let e = 0; e < r; e++) e & 1 ? (o = a[e], o = o * u & U | o * f & W, o = o << 15 | o >>> 17, o = o * d & U | o * p & W, c ^= o, c = c << 13 | c >>> 19, c = c * 5 + 3864292196) : (s = a[e], s = s * u & U | s * f & W, s = s << 15 | s >>> 17, s = s * d & U | s * p & W, l ^= s, l = l << 13 | l >>> 19, l = l * 5 + 3864292196);
4144
+ for (let e = 0; e < r; e++) e & 1 ? (o = a[e], o = o * u & W | o * f & lt, o = o << 15 | o >>> 17, o = o * d & W | o * p & lt, c ^= o, c = c << 13 | c >>> 19, c = c * 5 + 3864292196) : (s = a[e], s = s * u & W | s * f & lt, s = s << 15 | s >>> 17, s = s * d & W | s * p & lt, l ^= s, l = l << 13 | l >>> 19, l = l * 5 + 3864292196);
4145
4145
  switch (o = 0, i) {
4146
4146
  case 3: o ^= t[r * 4 + 2] << 16;
4147
4147
  case 2: o ^= t[r * 4 + 1] << 8;
4148
- case 1: o ^= t[r * 4], o = o * u & U | o * f & W, o = o << 15 | o >>> 17, o = o * d & U | o * p & W, r & 1 ? c ^= o : l ^= o;
4148
+ case 1: o ^= t[r * 4], o = o * u & W | o * f & lt, o = o << 15 | o >>> 17, o = o * d & W | o * p & lt, r & 1 ? c ^= o : l ^= o;
4149
4149
  }
4150
4150
  this.h1 = c, this.h2 = l;
4151
4151
  }
4152
4152
  hexdigest() {
4153
4153
  let e = this.h1, t = this.h2;
4154
- return e ^= t >>> 1, e = e * 3981806797 & U | e * 36045 & W, t = t * 4283543511 & U | ((t << 16 | e >>> 16) * 2950163797 & U) >>> 16, e ^= t >>> 1, e = e * 444984403 & U | e * 60499 & W, t = t * 3301882366 & U | ((t << 16 | e >>> 16) * 3120437893 & U) >>> 16, e ^= t >>> 1, (e >>> 0).toString(16).padStart(8, "0") + (t >>> 0).toString(16).padStart(8, "0");
4154
+ return e ^= t >>> 1, e = e * 3981806797 & W | e * 36045 & lt, t = t * 4283543511 & W | ((t << 16 | e >>> 16) * 2950163797 & W) >>> 16, e ^= t >>> 1, e = e * 444984403 & W | e * 60499 & lt, t = t * 3301882366 & W | ((t << 16 | e >>> 16) * 3120437893 & W) >>> 16, e ^= t >>> 1, (e >>> 0).toString(16).padStart(8, "0") + (t >>> 0).toString(16).padStart(8, "0");
4155
4155
  }
4156
4156
  }, dt = Object.freeze({
4157
4157
  map: null,
@@ -4174,13 +4174,13 @@ var V = class e {
4174
4174
  }
4175
4175
  remove(e) {
4176
4176
  let t = this.#r.get(e);
4177
- t !== void 0 && (t instanceof H && this.#n.delete(t.annotationElementId), this.#r.delete(e), this.#r.size === 0 && this.resetModified(), !this.#r.values().some((e) => e instanceof H) && this.onAnnotationEditor?.(null));
4177
+ t !== void 0 && (t instanceof U && this.#n.delete(t.annotationElementId), this.#r.delete(e), this.#r.size === 0 && this.resetModified(), !this.#r.values().some((e) => e instanceof U) && this.onAnnotationEditor?.(null));
4178
4178
  }
4179
4179
  setValue(e, t) {
4180
4180
  let n = this.#r.get(e), r = !1;
4181
4181
  if (n !== void 0) for (let [e, i] of Object.entries(t)) n[e] !== i && (r = !0, n[e] = i);
4182
4182
  else r = !0, this.#r.set(e, t);
4183
- r && this.#i(), t instanceof H && ((this.#n ||= /* @__PURE__ */ new Map()).set(t.annotationElementId, t), this.onAnnotationEditor?.(t.constructor._type));
4183
+ r && this.#i(), t instanceof U && ((this.#n ||= /* @__PURE__ */ new Map()).set(t.annotationElementId, t), this.onAnnotationEditor?.(t.constructor._type));
4184
4184
  }
4185
4185
  has(e) {
4186
4186
  return this.#r.has(e);
@@ -4201,7 +4201,7 @@ var V = class e {
4201
4201
  if (this.#r.size === 0) return dt;
4202
4202
  let e = /* @__PURE__ */ new Map(), t = new ut(), n = [], r = Object.create(null), i = !1;
4203
4203
  for (let [n, a] of this.#r) {
4204
- let o = a instanceof H ? a.serialize(!1, r) : a;
4204
+ let o = a instanceof U ? a.serialize(!1, r) : a;
4205
4205
  a.page && (a.pageIndex = a.page._pageIndex, delete a.page), o && (e.set(n, o), t.update(`${n}:${JSON.stringify(o)}`), i ||= !!o.bitmap);
4206
4206
  }
4207
4207
  if (i) for (let t of e.values()) t.bitmap && n.push(t.bitmap);
@@ -4214,7 +4214,7 @@ var V = class e {
4214
4214
  get editorStats() {
4215
4215
  let e = null, t = /* @__PURE__ */ new Map(), n = 0, r = 0;
4216
4216
  for (let i of this.#r.values()) {
4217
- if (!(i instanceof H)) {
4217
+ if (!(i instanceof U)) {
4218
4218
  i.popup && (i.popup.deleted ? r += 1 : n += 1);
4219
4219
  continue;
4220
4220
  }
@@ -4226,7 +4226,7 @@ var V = class e {
4226
4226
  let s = e[o] ||= /* @__PURE__ */ new Map();
4227
4227
  for (let [e, t] of Object.entries(a)) {
4228
4228
  if (e === "type") continue;
4229
- let n = s.getOrInsertComputed(e, me);
4229
+ let n = s.getOrInsertComputed(e, pe);
4230
4230
  n.set(t, (n.get(t) ?? 0) + 1);
4231
4231
  }
4232
4232
  }
@@ -4393,7 +4393,7 @@ var yt = new Uint32Array(new Uint8Array([
4393
4393
  return n !== void 0 && (t?.(n, e), this.#o[e] = this.#o[n]), this;
4394
4394
  }
4395
4395
  pushBaseTransform(e) {
4396
- return this.#e.push(F.multiplyByDOMMatrix(this.#e.at(-1), e.getTransform())), this;
4396
+ return this.#e.push(I.multiplyByDOMMatrix(this.#e.at(-1), e.getTransform())), this;
4397
4397
  }
4398
4398
  popBaseTransform() {
4399
4399
  return this.#e.length > 1 && this.#e.pop(), this;
@@ -4402,33 +4402,33 @@ var yt = new Uint32Array(new Uint8Array([
4402
4402
  return this._pendingBBoxIdx !== e && (this._pendingBBoxIdx = e, this.#n.set(t, 0)), this;
4403
4403
  }
4404
4404
  recordClipBox(e, n, r, i, a, o) {
4405
- let s = F.multiplyByDOMMatrix(this.#e.at(-1), n.getTransform()), c = t.slice();
4406
- F.axialAlignedBoundingBox([
4405
+ let s = I.multiplyByDOMMatrix(this.#e.at(-1), n.getTransform()), c = t.slice();
4406
+ I.axialAlignedBoundingBox([
4407
4407
  r,
4408
4408
  a,
4409
4409
  i,
4410
4410
  o
4411
4411
  ], s, c);
4412
- let l = F.intersect(this.#t, c);
4412
+ let l = I.intersect(this.#t, c);
4413
4413
  return l ? (this.#t[0] = l[0], this.#t[1] = l[1], this.#t[2] = l[2], this.#t[3] = l[3]) : (this.#t[0] = this.#t[1] = Infinity, this.#t[2] = this.#t[3] = -Infinity), this;
4414
4414
  }
4415
4415
  recordBBox(e, n, r, i, a, o) {
4416
4416
  let s = this.#t;
4417
4417
  if (s[0] === Infinity) return this;
4418
- let c = F.multiplyByDOMMatrix(this.#e.at(-1), n.getTransform());
4419
- if (s[0] === -Infinity) return F.axialAlignedBoundingBox([
4418
+ let c = I.multiplyByDOMMatrix(this.#e.at(-1), n.getTransform());
4419
+ if (s[0] === -Infinity) return I.axialAlignedBoundingBox([
4420
4420
  r,
4421
4421
  a,
4422
4422
  i,
4423
4423
  o
4424
4424
  ], c, this.#n), this;
4425
4425
  let l = t.slice();
4426
- return F.axialAlignedBoundingBox([
4426
+ return I.axialAlignedBoundingBox([
4427
4427
  r,
4428
4428
  a,
4429
4429
  i,
4430
4430
  o
4431
- ], c, l), this.#n[0] = I(l[0], s[0], this.#n[0]), this.#n[1] = I(l[1], s[1], this.#n[1]), this.#n[2] = I(l[2], this.#n[2], s[2]), this.#n[3] = I(l[3], this.#n[3], s[3]), this;
4431
+ ], c, l), this.#n[0] = L(l[0], s[0], this.#n[0]), this.#n[1] = L(l[1], s[1], this.#n[1]), this.#n[2] = L(l[2], this.#n[2], s[2]), this.#n[3] = L(l[3], this.#n[3], s[3]), this;
4432
4432
  }
4433
4433
  recordFullPageBBox(e) {
4434
4434
  return this.#n[0] = Math.max(0, this.#t[0]), this.#n[1] = Math.max(0, this.#t[1]), this.#n[2] = Math.min(this.#r, this.#t[2]), this.#n[3] = Math.min(this.#i, this.#t[3]), this;
@@ -4588,7 +4588,7 @@ var yt = new Uint32Array(new Uint8Array([
4588
4588
  0,
4589
4589
  0,
4590
4590
  0
4591
- ], F.axialAlignedBoundingBox(s, n.fontMatrix, l), (r !== 1 || i !== 0 || a !== 0) && vt(r, -r, i, a, l), c))) return this.recordBBox(e, t, l[0], l[2], l[1], l[3]);
4591
+ ], I.axialAlignedBoundingBox(s, n.fontMatrix, l), (r !== 1 || i !== 0 || a !== 0) && vt(r, -r, i, a, l), c))) return this.recordBBox(e, t, l[0], l[2], l[1], l[3]);
4592
4592
  if (!o) return this.recordFullPageBBox(e);
4593
4593
  let u = o();
4594
4594
  return s && l && c === void 0 && (c = l[0] <= i - u.actualBoundingBoxLeft && l[2] >= i + u.actualBoundingBoxRight && l[1] <= a - u.actualBoundingBoxAscent && l[3] >= a + u.actualBoundingBoxDescent, this.#i.set(n, c), c) ? this.recordBBox(e, t, l[0], l[2], l[1], l[3]) : this.recordBBox(e, t, i - u.actualBoundingBoxLeft, i + u.actualBoundingBoxRight, a - u.actualBoundingBoxAscent, a + u.actualBoundingBoxDescent);
@@ -4804,7 +4804,7 @@ var yt = new Uint32Array(new Uint8Array([
4804
4804
  #n = 4;
4805
4805
  #r = 0;
4806
4806
  #i = new e.#a(this.#n * 6);
4807
- static #a = P.isFloat16ArraySupported ? Float16Array : Float32Array;
4807
+ static #a = F.isFloat16ArraySupported ? Float16Array : Float32Array;
4808
4808
  constructor(e) {
4809
4809
  this.#e = e.width, this.#t = e.height;
4810
4810
  }
@@ -4814,16 +4814,16 @@ var yt = new Uint32Array(new Uint8Array([
4814
4814
  let t = new e.#a(this.#n * 6);
4815
4815
  t.set(this.#i), this.#i = t;
4816
4816
  }
4817
- let o = z(n), s;
4817
+ let o = B(n), s;
4818
4818
  if (a[0] !== Infinity) {
4819
4819
  let e = t.slice();
4820
- F.axialAlignedBoundingBox([
4820
+ I.axialAlignedBoundingBox([
4821
4821
  0,
4822
4822
  -i,
4823
4823
  r,
4824
4824
  0
4825
4825
  ], o, e);
4826
- let n = F.intersect(a, e);
4826
+ let n = I.intersect(a, e);
4827
4827
  if (!n) return;
4828
4828
  let [c, l, u, d] = n;
4829
4829
  if (c !== e[0] || l !== e[1] || u !== e[2] || d !== e[3]) {
@@ -4856,7 +4856,7 @@ var yt = new Uint32Array(new Uint8Array([
4856
4856
  0,
4857
4857
  r,
4858
4858
  -i
4859
- ], F.applyTransform(s, o, 0), F.applyTransform(s, o, 2), F.applyTransform(s, o, 4)), s[0] /= this.#e, s[1] /= this.#t, s[2] /= this.#e, s[3] /= this.#t, s[4] /= this.#e, s[5] /= this.#t, this.#i.set(s, this.#r * 6), this.#r++;
4859
+ ], I.applyTransform(s, o, 0), I.applyTransform(s, o, 2), I.applyTransform(s, o, 4)), s[0] /= this.#e, s[1] /= this.#t, s[2] /= this.#e, s[3] /= this.#t, s[4] /= this.#e, s[5] /= this.#t, this.#i.set(s, this.#r * 6), this.#r++;
4860
4860
  }
4861
4861
  take() {
4862
4862
  return this.#i.subarray(0, this.#r * 6);
@@ -4944,7 +4944,7 @@ var yt = new Uint32Array(new Uint8Array([
4944
4944
  return A(this, "isFontLoadingAPISupported", e);
4945
4945
  }
4946
4946
  get isSyncFontLoadingSupported() {
4947
- return A(this, "isSyncFontLoadingSupported", e || P.platform.isFirefox);
4947
+ return A(this, "isSyncFontLoadingSupported", e || F.platform.isFirefox);
4948
4948
  }
4949
4949
  _queueLoadingCallback(e) {
4950
4950
  function t() {
@@ -5040,7 +5040,7 @@ var yt = new Uint32Array(new Uint8Array([
5040
5040
  } catch (e) {
5041
5041
  w(`getPathGenerator - ignoring character: "${e}".`);
5042
5042
  }
5043
- let i = Je(r?.path);
5043
+ let i = qe(r?.path);
5044
5044
  return this.fontExtraProperties || e.delete(n), this.compiledGlyphs[t] = i;
5045
5045
  }
5046
5046
  get black() {
@@ -5407,7 +5407,7 @@ var yt = new Uint32Array(new Uint8Array([
5407
5407
  let e = this.data[At.SHADING_TYPE], n = null;
5408
5408
  if (l.length > 0) {
5409
5409
  n = t.slice();
5410
- for (let e = 0, t = l.length; e < t; e += 2) F.pointBoundingBox(l[e], l[e + 1], n);
5410
+ for (let e = 0, t = l.length; e < t; e += 2) I.pointBoundingBox(l[e], l[e + 1], n);
5411
5411
  }
5412
5412
  return [
5413
5413
  "Mesh",
@@ -5428,7 +5428,7 @@ var yt = new Uint32Array(new Uint8Array([
5428
5428
  this.#e = e;
5429
5429
  }
5430
5430
  get path() {
5431
- return P.isFloat16ArraySupported ? new Float16Array(this.#e) : new Float32Array(this.#e);
5431
+ return F.isFloat16ArraySupported ? new Float16Array(this.#e) : new Float32Array(this.#e);
5432
5432
  }
5433
5433
  };
5434
5434
  function It(t) {
@@ -5447,7 +5447,7 @@ function It(t) {
5447
5447
  function Lt(t) {
5448
5448
  if (e && typeof Buffer < "u" && t instanceof Buffer) throw Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
5449
5449
  if (t instanceof Uint8Array && t.byteLength === t.buffer.byteLength) return t;
5450
- if (typeof t == "string") return oe(t);
5450
+ if (typeof t == "string") return ae(t);
5451
5451
  if (t instanceof ArrayBuffer || ArrayBuffer.isView(t) || typeof t == "object" && !isNaN(t?.length)) return new Uint8Array(t);
5452
5452
  throw Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");
5453
5453
  }
@@ -5456,7 +5456,7 @@ function Rt(e) {
5456
5456
  if (e.endsWith("/")) return e;
5457
5457
  throw Error(`Invalid factory url: "${e}" must include trailing slash.`);
5458
5458
  }
5459
- var zt = (e) => typeof e == "object" && Number.isInteger(e?.num) && e.num >= 0 && Number.isInteger(e?.gen) && e.gen >= 0, Bt = fe.bind(null, zt, (e) => typeof e == "object" && typeof e?.name == "string"), Vt = class {
5459
+ var zt = (e) => typeof e == "object" && Number.isInteger(e?.num) && e.num >= 0 && Number.isInteger(e?.gen) && e.gen >= 0, Bt = de.bind(null, zt, (e) => typeof e == "object" && typeof e?.name == "string"), Vt = class {
5460
5460
  #e = /* @__PURE__ */ new Map();
5461
5461
  #t = Promise.resolve();
5462
5462
  postMessage(e, t) {
@@ -5500,15 +5500,15 @@ var zt = (e) => typeof e == "object" && Number.isInteger(e?.num) && e.num >= 0 &
5500
5500
  };
5501
5501
  function Ut() {}
5502
5502
  function J(e) {
5503
- if (e instanceof N || e instanceof re || e instanceof te || e instanceof M || e instanceof ne) return e;
5503
+ if (e instanceof P || e instanceof ne || e instanceof M || e instanceof N || e instanceof te) return e;
5504
5504
  switch (e instanceof Error || typeof e == "object" && e || T("wrapReason: Expected \"reason\" to be a (possibly cloned) Error."), e.name) {
5505
- case "AbortException": return new N(e.message);
5506
- case "InvalidPDFException": return new re(e.message);
5507
- case "PasswordException": return new te(e.message, e.code);
5508
- case "ResponseException": return new M(e.message, e.status, e.missing);
5509
- case "UnknownErrorException": return new ne(e.message, e.details);
5505
+ case "AbortException": return new P(e.message);
5506
+ case "InvalidPDFException": return new ne(e.message);
5507
+ case "PasswordException": return new M(e.message, e.code);
5508
+ case "ResponseException": return new N(e.message, e.status, e.missing);
5509
+ case "UnknownErrorException": return new te(e.message, e.details);
5510
5510
  }
5511
- return new ne(e.message, e.toString());
5511
+ return new te(e.message, e.toString());
5512
5512
  }
5513
5513
  var Wt = class {
5514
5514
  #e = new AbortController();
@@ -5799,8 +5799,8 @@ var Wt = class {
5799
5799
  }
5800
5800
  }, Kt = class extends Gt {
5801
5801
  async _fetch(e, t) {
5802
- let n = await Ce(e, t === "cMapUrl" && !e.endsWith(".bcmap") ? "text" : "bytes");
5803
- return n instanceof Uint8Array ? n : oe(n);
5802
+ let n = await Se(e, t === "cMapUrl" && !e.endsWith(".bcmap") ? "text" : "bytes");
5803
+ return n instanceof Uint8Array ? n : ae(n);
5804
5804
  }
5805
5805
  }, qt = class {
5806
5806
  #e = !1;
@@ -5914,7 +5914,7 @@ var Wt = class {
5914
5914
  if (this.#e === void 0) {
5915
5915
  this.#e = "";
5916
5916
  let e = this.#i.URL;
5917
- e !== this.#i.baseURI && (Te(e) ? w("#createUrl: ignore \"data:\"-URL for performance reasons.") : this.#e = ee(e, ""));
5917
+ e !== this.#i.baseURI && (we(e) ? w("#createUrl: ignore \"data:\"-URL for performance reasons.") : this.#e = ee(e, ""));
5918
5918
  }
5919
5919
  return `url(${this.#e}#${e})`;
5920
5920
  }
@@ -5937,9 +5937,9 @@ var Wt = class {
5937
5937
  filter: null
5938
5938
  }, this.#c.set(r, i)), !e || !t)) return i.url;
5939
5939
  let a = this.#v(e);
5940
- e = F.makeHexColor(...a);
5940
+ e = I.makeHexColor(...a);
5941
5941
  let o = this.#v(t);
5942
- if (t = F.makeHexColor(...o), this.#b(), e === "#000000" && t === "#ffffff" || e === t) return i.url;
5942
+ if (t = I.makeHexColor(...o), this.#b(), e === "#000000" && t === "#ffffff" || e === t) return i.url;
5943
5943
  let s = Array(256);
5944
5944
  for (let e = 0; e <= 255; e++) {
5945
5945
  let t = e / 255;
@@ -5962,7 +5962,7 @@ var Wt = class {
5962
5962
  }
5963
5963
  createSelectionStyle(e = null) {
5964
5964
  let t = e ? this.addSelectionHCMFilter(e.foreground, e.background) : this.addSelectionFilter();
5965
- return t === "none" || !P.platform.isFirefox ? null : {
5965
+ return t === "none" || !F.platform.isFirefox ? null : {
5966
5966
  "backdrop-filter": t,
5967
5967
  "background-color": "transparent"
5968
5968
  };
@@ -6051,10 +6051,10 @@ var Wt = class {
6051
6051
  t.append(n), this.#h(n, "feFuncA", e);
6052
6052
  }
6053
6053
  #v(e) {
6054
- return this.#l.style.color = "CanvasText", this.#l.style.backgroundColor = e, Ne(getComputedStyle(this.#l).getPropertyValue("background-color"));
6054
+ return this.#l.style.color = "CanvasText", this.#l.style.backgroundColor = e, Me(getComputedStyle(this.#l).getPropertyValue("background-color"));
6055
6055
  }
6056
6056
  #y(e) {
6057
- return this.#l.style.color = "CanvasText", this.#l.style.backgroundColor = e, Me(getComputedStyle(this.#l).getPropertyValue("background-color"));
6057
+ return this.#l.style.color = "CanvasText", this.#l.style.backgroundColor = e, je(getComputedStyle(this.#l).getPropertyValue("background-color"));
6058
6058
  }
6059
6059
  #b() {
6060
6060
  this.#l.style.color = "", this.#l.style.backgroundColor = "";
@@ -6092,7 +6092,7 @@ var $t = class extends Yt {}, en = class extends qt {
6092
6092
  }
6093
6093
  };
6094
6094
  function nn({ src: e, srcPos: t = 0, dest: n, width: r, height: i, nonBlackColor: a = 4294967295, inverseDecode: o = !1 }) {
6095
- let s = P.isLittleEndian ? 4278190080 : 255, [c, l] = o ? [a, s] : [s, a], u = r >> 3, d = r & 7, f = c ^ l, p = e.length;
6095
+ let s = F.isLittleEndian ? 4278190080 : 255, [c, l] = o ? [a, s] : [s, a], u = r >> 3, d = r & 7, f = c ^ l, p = e.length;
6096
6096
  n = new Uint32Array(n.buffer);
6097
6097
  let m = 0;
6098
6098
  for (let r = 0; r < i; ++r) {
@@ -6110,8 +6110,8 @@ function nn({ src: e, srcPos: t = 0, dest: n, width: r, height: i, nonBlackColor
6110
6110
  };
6111
6111
  }
6112
6112
  function rn({ src: e, srcPos: t = 0, dest: n, destPos: r = 0, width: i, height: a }) {
6113
- let o = 0, s = i * a * 3, c = s >> 2, l = new Uint32Array(e.buffer, t, c), u = P.isLittleEndian ? 4278190080 : 255;
6114
- if (P.isLittleEndian) {
6113
+ let o = 0, s = i * a * 3, c = s >> 2, l = new Uint32Array(e.buffer, t, c), u = F.isLittleEndian ? 4278190080 : 255;
6114
+ if (F.isLittleEndian) {
6115
6115
  for (; o < c - 2; o += 3, r += 4) {
6116
6116
  let e = l[o], t = l[o + 1], i = l[o + 2];
6117
6117
  n[r] = e | u, n[r + 1] = e >>> 24 | t << 8 | u, n[r + 2] = t >>> 16 | i << 16 | u, n[r + 3] = i >>> 8 | u;
@@ -6285,12 +6285,12 @@ var fn = class {
6285
6285
  }
6286
6286
  _createGradient(e, t = null) {
6287
6287
  let n, r = this._p0, i = this._p1;
6288
- if (t && (r = r.slice(), i = i.slice(), F.applyTransform(r, t), F.applyTransform(i, t)), this._type === "axial") n = e.createLinearGradient(r[0], r[1], i[0], i[1]);
6288
+ if (t && (r = r.slice(), i = i.slice(), I.applyTransform(r, t), I.applyTransform(i, t)), this._type === "axial") n = e.createLinearGradient(r[0], r[1], i[0], i[1]);
6289
6289
  else if (this._type === "radial") {
6290
6290
  let a = this._r0, o = this._r1;
6291
6291
  if (t) {
6292
6292
  let e = /* @__PURE__ */ new Float32Array(2);
6293
- F.singularValueDecompose2dScale(t, e), a *= e[0], o *= e[0];
6293
+ I.singularValueDecompose2dScale(t, e), a *= e[0], o *= e[0];
6294
6294
  }
6295
6295
  n = e.createRadialGradient(r[0], r[1], a, i[0], i[1], o);
6296
6296
  }
@@ -6299,11 +6299,11 @@ var fn = class {
6299
6299
  }
6300
6300
  _createReversedGradient(e, t = null) {
6301
6301
  let n = this._p1, r = this._p0;
6302
- t && (n = n.slice(), r = r.slice(), F.applyTransform(n, t), F.applyTransform(r, t));
6302
+ t && (n = n.slice(), r = r.slice(), I.applyTransform(n, t), I.applyTransform(r, t));
6303
6303
  let i = this._r1, a = this._r0;
6304
6304
  if (t) {
6305
6305
  let e = /* @__PURE__ */ new Float32Array(2);
6306
- F.singularValueDecompose2dScale(t, e), i *= e[0], a *= e[0];
6306
+ I.singularValueDecompose2dScale(t, e), i *= e[0], a *= e[0];
6307
6307
  }
6308
6308
  let o = e.createRadialGradient(n[0], n[1], i, r[0], r[1], a), s = this._colorStops.map(([e, t]) => [1 - e, t]).reverse();
6309
6309
  for (let [e, t] of s) o.addColorStop(e, t);
@@ -6313,8 +6313,8 @@ var fn = class {
6313
6313
  let i;
6314
6314
  if (r === Y.STROKE || r === Y.FILL) {
6315
6315
  if (this.isOriginBased()) {
6316
- let r = F.transform(n, t.baseTransform);
6317
- this.matrix && (r = F.transform(r, this.matrix));
6316
+ let r = I.transform(n, t.baseTransform);
6317
+ this.matrix && (r = I.transform(r, this.matrix));
6318
6318
  let i = .001, a = Math.hypot(r[0], r[1]), o = Math.hypot(r[2], r[3]), s = (r[0] * r[2] + r[1] * r[3]) / (a * o);
6319
6319
  if (Math.abs(s) < i) {
6320
6320
  if (this.isRadial()) {
@@ -6322,13 +6322,13 @@ var fn = class {
6322
6322
  } else return this._createGradient(e, r);
6323
6323
  }
6324
6324
  }
6325
- let a = t.current.getClippedPathBoundingBox(r, z(e)) || [
6325
+ let a = t.current.getClippedPathBoundingBox(r, B(e)) || [
6326
6326
  0,
6327
6327
  0,
6328
6328
  0,
6329
6329
  0
6330
6330
  ], o = Math.ceil(a[2] - a[0]) || 1, s = Math.ceil(a[3] - a[1]) || 1, c = t.canvasFactory.create(o, s), l = c.context;
6331
- l.clearRect(0, 0, l.canvas.width, l.canvas.height), l.beginPath(), l.rect(0, 0, l.canvas.width, l.canvas.height), l.translate(-a[0], -a[1]), n = F.transform(n, [
6331
+ l.clearRect(0, 0, l.canvas.width, l.canvas.height), l.beginPath(), l.rect(0, 0, l.canvas.width, l.canvas.height), l.translate(-a[0], -a[1]), n = I.transform(n, [
6332
6332
  1,
6333
6333
  0,
6334
6334
  0,
@@ -6347,19 +6347,19 @@ function mn(e, t, n, r, i, a, o, s) {
6347
6347
  c[n * 2 + 1] > c[r * 2 + 1] && (f = n, n = r, r = f, f = a, a = o, o = f), c[r * 2 + 1] > c[i * 2 + 1] && (f = r, r = i, i = f, f = o, o = s, s = f), c[n * 2 + 1] > c[r * 2 + 1] && (f = n, n = r, r = f, f = a, a = o, o = f);
6348
6348
  let p = (c[n * 2] + t.offsetX) * t.scaleX, m = (c[n * 2 + 1] + t.offsetY) * t.scaleY, h = (c[r * 2] + t.offsetX) * t.scaleX, g = (c[r * 2 + 1] + t.offsetY) * t.scaleY, _ = (c[i * 2] + t.offsetX) * t.scaleX, v = (c[i * 2 + 1] + t.offsetY) * t.scaleY;
6349
6349
  if (m >= v) return;
6350
- let y = l[a * 4], b = l[a * 4 + 1], x = l[a * 4 + 2], S = l[o * 4], C = l[o * 4 + 1], w = l[o * 4 + 2], T = l[s * 4], E = l[s * 4 + 1], D = l[s * 4 + 2], O = Math.round(m), ee = Math.round(v), k, A, j, te, ne, re, M, ie;
6350
+ let y = l[a * 4], b = l[a * 4 + 1], x = l[a * 4 + 2], S = l[o * 4], C = l[o * 4 + 1], w = l[o * 4 + 2], T = l[s * 4], E = l[s * 4 + 1], D = l[s * 4 + 2], O = Math.round(m), ee = Math.round(v), k, A, j, M, te, ne, N, re;
6351
6351
  for (let e = O; e <= ee; e++) {
6352
6352
  if (e < g) {
6353
6353
  let t = e < m ? 0 : (m - e) / (m - g);
6354
- k = p - (p - h) * t, A = y - (y - S) * t, j = b - (b - C) * t, te = x - (x - w) * t;
6354
+ k = p - (p - h) * t, A = y - (y - S) * t, j = b - (b - C) * t, M = x - (x - w) * t;
6355
6355
  } else {
6356
6356
  let t;
6357
- t = e > v ? 1 : g === v ? 0 : (g - e) / (g - v), k = h - (h - _) * t, A = S - (S - T) * t, j = C - (C - E) * t, te = w - (w - D) * t;
6357
+ t = e > v ? 1 : g === v ? 0 : (g - e) / (g - v), k = h - (h - _) * t, A = S - (S - T) * t, j = C - (C - E) * t, M = w - (w - D) * t;
6358
6358
  }
6359
6359
  let t;
6360
- t = e < m ? 0 : e > v ? 1 : (m - e) / (m - v), ne = p - (p - _) * t, re = y - (y - T) * t, M = b - (b - E) * t, ie = x - (x - D) * t;
6361
- let n = Math.round(Math.min(k, ne)), r = Math.round(Math.max(k, ne)), i = d * e + n * 4;
6362
- for (let e = n; e <= r; e++) t = (k - e) / (k - ne), t < 0 ? t = 0 : t > 1 && (t = 1), u[i++] = A - (A - re) * t | 0, u[i++] = j - (j - M) * t | 0, u[i++] = te - (te - ie) * t | 0, u[i++] = 255;
6360
+ t = e < m ? 0 : e > v ? 1 : (m - e) / (m - v), te = p - (p - _) * t, ne = y - (y - T) * t, N = b - (b - E) * t, re = x - (x - D) * t;
6361
+ let n = Math.round(Math.min(k, te)), r = Math.round(Math.max(k, te)), i = d * e + n * 4;
6362
+ for (let e = n; e <= r; e++) t = (k - e) / (k - te), t < 0 ? t = 0 : t > 1 && (t = 1), u[i++] = A - (A - ne) * t | 0, u[i++] = j - (j - N) * t | 0, u[i++] = M - (M - re) * t | 0, u[i++] = 255;
6363
6363
  }
6364
6364
  }
6365
6365
  var hn = class extends fn {
@@ -6399,12 +6399,12 @@ var hn = class extends fn {
6399
6399
  getPattern(e, t, n, r) {
6400
6400
  dn(e, this._bbox);
6401
6401
  let i = /* @__PURE__ */ new Float32Array(2);
6402
- if (r === Y.SHADING) F.singularValueDecompose2dScale(z(e), i);
6402
+ if (r === Y.SHADING) I.singularValueDecompose2dScale(B(e), i);
6403
6403
  else if (this.matrix) {
6404
- F.singularValueDecompose2dScale(this.matrix, i);
6404
+ I.singularValueDecompose2dScale(this.matrix, i);
6405
6405
  let [e, n] = i;
6406
- F.singularValueDecompose2dScale(t.baseTransform, i), i[0] *= e, i[1] *= n;
6407
- } else F.singularValueDecompose2dScale(t.baseTransform, i);
6406
+ I.singularValueDecompose2dScale(t.baseTransform, i), i[0] *= e, i[1] *= n;
6407
+ } else I.singularValueDecompose2dScale(t.baseTransform, i);
6408
6408
  let a = this._createMeshCanvas(i, r === Y.SHADING ? null : this._background, t.canvasFactory);
6409
6409
  r !== Y.SHADING && (e.setTransform(...t.baseTransform), this.matrix && e.transform(...this.matrix)), e.translate(a.offsetX, a.offsetY), e.scale(a.scaleX, a.scaleY);
6410
6410
  let o = e.createPattern(a.canvas, "no-repeat");
@@ -6429,7 +6429,7 @@ var vn = {
6429
6429
  }, yn = class e {
6430
6430
  static MAX_PATTERN_SIZE = 3e3;
6431
6431
  constructor(e, t, n, r) {
6432
- this.color = e[1], this.operatorList = e[2], this.matrix = e[3], this.bbox = e[4], this.xstep = e[5], this.ystep = e[6], this.paintType = e[7], this.tilingType = e[8], this.needsIsolation = e[9] ?? !0, this.ctx = t, this.canvasGraphicsFactory = n, this.baseTransform = r, this.patternBaseMatrix = this.matrix ? F.transform(r, this.matrix) : r;
6432
+ this.color = e[1], this.operatorList = e[2], this.matrix = e[3], this.bbox = e[4], this.xstep = e[5], this.ystep = e[6], this.paintType = e[7], this.tilingType = e[8], this.needsIsolation = e[9] ?? !0, this.ctx = t, this.canvasGraphicsFactory = n, this.baseTransform = r, this.patternBaseMatrix = this.matrix ? I.transform(r, this.matrix) : r;
6433
6433
  }
6434
6434
  canSkipPatternCanvas([e, t, n, r]) {
6435
6435
  let [i, a, o, s] = this.bbox, c = Math.abs(this.xstep), l = Math.abs(this.ystep);
@@ -6438,25 +6438,25 @@ var vn = {
6438
6438
  return d <= u && p <= f ? [u, f] : null;
6439
6439
  }
6440
6440
  updatePatternDims(e, t) {
6441
- let n = F.inverseTransform(this.patternBaseMatrix), r = [e[0], e[1]], i = [e[2], e[3]];
6442
- F.applyTransform(r, n), F.applyTransform(i, n), t[0] = Math.abs(i[0] - r[0]), t[1] = Math.abs(i[1] - r[1]), t[2] = Math.min(r[0], i[0]), t[3] = Math.min(r[1], i[1]);
6441
+ let n = I.inverseTransform(this.patternBaseMatrix), r = [e[0], e[1]], i = [e[2], e[3]];
6442
+ I.applyTransform(r, n), I.applyTransform(i, n), t[0] = Math.abs(i[0] - r[0]), t[1] = Math.abs(i[1] - r[1]), t[2] = Math.min(r[0], i[0]), t[3] = Math.min(r[1], i[1]);
6443
6443
  }
6444
6444
  _renderTileCanvas(e, t, n, r) {
6445
6445
  let [i, a, o, s] = this.bbox, c = e.canvasFactory.create(n.size, r.size), l = c.context, u = this.canvasGraphicsFactory.createCanvasGraphics(l, t);
6446
- return u.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(u, this.paintType, this.color), l.translate(-n.scale * i, -r.scale * a), u.transform(0, n.scale, 0, 0, r.scale, 0, 0), l.save(), u.dependencyTracker?.save(), this.clipBbox(u, i, a, o, s), u.baseTransform = z(u.ctx), u.executeOperatorList(this.operatorList), u.endDrawing(), u.dependencyTracker?.restore(), l.restore(), c;
6446
+ return u.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(u, this.paintType, this.color), l.translate(-n.scale * i, -r.scale * a), u.transform(0, n.scale, 0, 0, r.scale, 0, 0), l.save(), u.dependencyTracker?.save(), this.clipBbox(u, i, a, o, s), u.baseTransform = B(u.ctx), u.executeOperatorList(this.operatorList), u.endDrawing(), u.dependencyTracker?.restore(), l.restore(), c;
6447
6447
  }
6448
6448
  _getCombinedScales() {
6449
6449
  let e = /* @__PURE__ */ new Float32Array(2);
6450
- F.singularValueDecompose2dScale(this.matrix, e);
6450
+ I.singularValueDecompose2dScale(this.matrix, e);
6451
6451
  let [t, n] = e;
6452
- return F.singularValueDecompose2dScale(this.baseTransform, e), [t * e[0], n * e[1]];
6452
+ return I.singularValueDecompose2dScale(this.baseTransform, e), [t * e[0], n * e[1]];
6453
6453
  }
6454
6454
  drawPattern(e, t, n = !1, [r, i], a) {
6455
6455
  let [o, s, c, l] = this.bbox, u = e.dependencyTracker;
6456
6456
  if (u && (e.dependencyTracker = new wt(u, a)), e.save(), n ? e.ctx.clip(t, "evenodd") : e.ctx.clip(t), e.ctx.setTransform(...this.patternBaseMatrix), e.ctx.translate(r * this.xstep, i * this.ystep), this.needsIsolation || e.ctx.globalAlpha !== 1 || e.ctx.globalCompositeOperation !== "source-over" || e.inSMaskMode) {
6457
6457
  let t = c - o, n = l - s, [r, i] = this._getCombinedScales(), u = this.getSizeAndScale(t, this.ctx.canvas.width, r), d = this.getSizeAndScale(n, this.ctx.canvas.height, i), f = this._renderTileCanvas(e, a, u, d);
6458
6458
  e.ctx.drawImage(f.canvas, o, s, t, n), e.canvasFactory.destroy(f);
6459
- } else this.setFillAndStrokeStyleToContext(e, this.paintType, this.color), this.clipBbox(e, o, s, c, l), e.baseTransformStack.push(e.baseTransform), e.baseTransform = z(e.ctx), e.executeOperatorList(this.operatorList), e.baseTransform = e.baseTransformStack.pop();
6459
+ } else this.setFillAndStrokeStyleToContext(e, this.paintType, this.color), this.clipBbox(e, o, s, c, l), e.baseTransformStack.push(e.baseTransform), e.baseTransform = B(e.ctx), e.executeOperatorList(this.operatorList), e.baseTransform = e.baseTransformStack.pop();
6460
6460
  e.restore(), u && (e.dependencyTracker = u);
6461
6461
  }
6462
6462
  createPatternCanvas(e, t) {
@@ -6497,12 +6497,12 @@ var vn = {
6497
6497
  }
6498
6498
  clipBbox(e, t, n, r, i) {
6499
6499
  let a = r - t, o = i - n, s = new Path2D();
6500
- s.rect(t, n, a, o), F.axialAlignedBoundingBox([
6500
+ s.rect(t, n, a, o), I.axialAlignedBoundingBox([
6501
6501
  t,
6502
6502
  n,
6503
6503
  r,
6504
6504
  i
6505
- ], z(e.ctx), e.current.minMax), e.ctx.clip(s), e.current.updateClipFromPath();
6505
+ ], B(e.ctx), e.current.minMax), e.ctx.clip(s), e.current.updateClipFromPath();
6506
6506
  }
6507
6507
  setFillAndStrokeStyleToContext(e, t, n) {
6508
6508
  let r = e.ctx, i = e.current;
@@ -6514,14 +6514,14 @@ var vn = {
6514
6514
  case vn.UNCOLORED:
6515
6515
  r.fillStyle = r.strokeStyle = n, i.fillColor = i.strokeColor = n;
6516
6516
  break;
6517
- default: throw new ie(`Unsupported paint type: ${t}`);
6517
+ default: throw new re(`Unsupported paint type: ${t}`);
6518
6518
  }
6519
6519
  }
6520
6520
  isModifyingCurrentTransform() {
6521
6521
  return !1;
6522
6522
  }
6523
6523
  getPattern(e, t, n, r, i) {
6524
- let a = r === Y.SHADING ? n : F.transform(n, this.patternBaseMatrix), o = this.createPatternCanvas(t, i), s = new DOMMatrix(a);
6524
+ let a = r === Y.SHADING ? n : I.transform(n, this.patternBaseMatrix), o = this.createPatternCanvas(t, i), s = new DOMMatrix(a);
6525
6525
  s = s.translate(o.offsetX, o.offsetY), s = s.scale(1 / o.scaleX, 1 / o.scaleY);
6526
6526
  let c = e.createPattern(o.canvas, "repeat");
6527
6527
  return t.canvasFactory.destroy(o.canvasEntry), c.setTransform(s), c;
@@ -6563,7 +6563,7 @@ function Tn(e, t) {
6563
6563
  };
6564
6564
  }
6565
6565
  function En(e, t, n, r, i, a, o, s, c, l) {
6566
- let [u, d, f, p, m, h] = z(e);
6566
+ let [u, d, f, p, m, h] = B(e);
6567
6567
  if (d === 0 && f === 0) {
6568
6568
  let g = o * u + m, _ = Math.round(g), v = s * p + h, y = Math.round(v), b = (o + c) * u + m, x = Math.abs(Math.round(b) - _) || 1, S = (s + l) * p + h, C = Math.abs(Math.round(S) - y) || 1;
6569
6569
  return e.setTransform(Math.sign(u), 0, 0, Math.sign(p), _, y), e.drawImage(t, n, r, i, a, 0, 0, x, C), e.setTransform(u, d, f, p, m, h), [x, C];
@@ -6619,14 +6619,14 @@ var Dn = class {
6619
6619
  getPathBoundingBox(e = Y.FILL, t = null) {
6620
6620
  let n = this.minMax.slice();
6621
6621
  if (e === Y.STROKE) {
6622
- t || T("Stroke bounding box must include transform."), F.singularValueDecompose2dScale(t, Z);
6622
+ t || T("Stroke bounding box must include transform."), I.singularValueDecompose2dScale(t, Z);
6623
6623
  let e = Z[0] * this.lineWidth / 2, r = Z[1] * this.lineWidth / 2;
6624
6624
  n[0] -= e, n[1] -= r, n[2] += e, n[3] += r;
6625
6625
  }
6626
6626
  return n;
6627
6627
  }
6628
6628
  updateClipFromPath() {
6629
- let e = F.intersect(this.clipBox, this.getPathBoundingBox());
6629
+ let e = I.intersect(this.clipBox, this.getPathBoundingBox());
6630
6630
  this.startNewPathAndClipBox(e || [
6631
6631
  0,
6632
6632
  0,
@@ -6641,7 +6641,7 @@ var Dn = class {
6641
6641
  this.clipBox.set(e, 0), this.minMax.set(n, 0);
6642
6642
  }
6643
6643
  getClippedPathBoundingBox(e = Y.FILL, t = null) {
6644
- return F.intersect(this.clipBox, this.getPathBoundingBox(e, t));
6644
+ return I.intersect(this.clipBox, this.getPathBoundingBox(e, t));
6645
6645
  }
6646
6646
  };
6647
6647
  function On(e, t) {
@@ -6704,8 +6704,8 @@ function jn(e) {
6704
6704
  }
6705
6705
  function Mn(e, t) {
6706
6706
  if (t) return !0;
6707
- F.singularValueDecompose2dScale(e, Z);
6708
- let n = Math.fround(Ie.pixelRatio * Se.PDF_TO_CSS_UNITS);
6707
+ I.singularValueDecompose2dScale(e, Z);
6708
+ let n = Math.fround(Fe.pixelRatio * xe.PDF_TO_CSS_UNITS);
6709
6709
  return Z[0] <= n && Z[1] <= n;
6710
6710
  }
6711
6711
  var Nn = [
@@ -6737,9 +6737,9 @@ var Nn = [
6737
6737
  let i = this.ctx.canvas.width, a = this.ctx.canvas.height, o = this.ctx.fillStyle;
6738
6738
  if (this.ctx.fillStyle = r || "#ffffff", this.ctx.fillRect(0, 0, i, a), this.ctx.fillStyle = o, n) {
6739
6739
  let e = this.transparentCanvasEntry = this.canvasFactory.create(i, a);
6740
- this.compositeCtx = this.ctx, {canvas: this.transparentCanvas, context: this.ctx} = e, this.ctx.save(), this.ctx.transform(...z(this.compositeCtx));
6740
+ this.compositeCtx = this.ctx, {canvas: this.transparentCanvas, context: this.ctx} = e, this.ctx.save(), this.ctx.transform(...B(this.compositeCtx));
6741
6741
  }
6742
- this.ctx.save(), jn(this.ctx), e && (this.ctx.transform(...e), this.outputScaleX = e[0], this.outputScaleY = e[3]), this.ctx.transform(...t.transform), this.viewportScale = t.scale, this.baseTransform = z(this.ctx);
6742
+ this.ctx.save(), jn(this.ctx), e && (this.ctx.transform(...e), this.outputScaleX = e[0], this.outputScaleY = e[3]), this.ctx.transform(...t.transform), this.viewportScale = t.scale, this.baseTransform = B(this.ctx);
6743
6743
  }
6744
6744
  executeOperatorList(e, t, n, r, i) {
6745
6745
  let a = e.argsArray, o = e.fnArray, s = t || 0, c = a.length;
@@ -6827,10 +6827,10 @@ var Nn = [
6827
6827
  };
6828
6828
  }
6829
6829
  _createMaskCanvas(e, t) {
6830
- let r = this.ctx, { width: i, height: a } = t, o = this.current.fillColor, s = this.current.patternFill, c = z(r), l, u, d, f;
6830
+ let r = this.ctx, { width: i, height: a } = t, o = this.current.fillColor, s = this.current.patternFill, c = B(r), l, u, d, f;
6831
6831
  if ((t.bitmap || t.data) && t.count > 1) {
6832
6832
  let n = t.bitmap || t.data.buffer;
6833
- u = JSON.stringify(s ? c : [c.slice(0, 4), o]), l = this._cachedBitmapsMap.getOrInsertComputed(n, me);
6833
+ u = JSON.stringify(s ? c : [c.slice(0, 4), o]), l = this._cachedBitmapsMap.getOrInsertComputed(n, pe);
6834
6834
  let r = l.get(u);
6835
6835
  if (r && !s) {
6836
6836
  let t = Math.round(Math.min(c[0], c[2]) + c[4]), n = Math.round(Math.min(c[1], c[3]) + c[5]);
@@ -6843,7 +6843,7 @@ var Nn = [
6843
6843
  d = r;
6844
6844
  }
6845
6845
  d || (f = this.canvasFactory.create(i, a), kn(f.context, t));
6846
- let p = F.transform(c, [
6846
+ let p = I.transform(c, [
6847
6847
  1 / i,
6848
6848
  0,
6849
6849
  0,
@@ -6851,7 +6851,7 @@ var Nn = [
6851
6851
  0,
6852
6852
  0
6853
6853
  ]);
6854
- p = F.transform(p, [
6854
+ p = I.transform(p, [
6855
6855
  1,
6856
6856
  0,
6857
6857
  0,
@@ -6860,7 +6860,7 @@ var Nn = [
6860
6860
  -a
6861
6861
  ]);
6862
6862
  let m = n.slice();
6863
- F.axialAlignedBoundingBox([
6863
+ I.axialAlignedBoundingBox([
6864
6864
  0,
6865
6865
  0,
6866
6866
  i,
@@ -6870,11 +6870,11 @@ var Nn = [
6870
6870
  S.translate(-C, -w), S.transform(...p);
6871
6871
  let T = null;
6872
6872
  if (!d) {
6873
- let e = this._scaleImage(f.canvas, B(S));
6873
+ let e = this._scaleImage(f.canvas, V(S));
6874
6874
  d = e.img, T = e.tmpCanvas, d !== f.canvas && (this.canvasFactory.destroy(f), f = null), l && s && (l.set(u, d), T = null, f = null);
6875
6875
  }
6876
- S.imageSmoothingEnabled = Mn(z(S), t.interpolate), En(S, d, 0, 0, d.width, d.height, 0, 0, i, a), T && this.canvasFactory.destroy(T), f && this.canvasFactory.destroy(f), S.globalCompositeOperation = "source-in";
6877
- let E = F.transform(B(S), [
6876
+ S.imageSmoothingEnabled = Mn(B(S), t.interpolate), En(S, d, 0, 0, d.width, d.height, 0, 0, i, a), T && this.canvasFactory.destroy(T), f && this.canvasFactory.destroy(f), S.globalCompositeOperation = "source-in";
6877
+ let E = I.transform(V(S), [
6878
6878
  1,
6879
6879
  0,
6880
6880
  0,
@@ -6970,7 +6970,7 @@ var Nn = [
6970
6970
  }
6971
6971
  let o;
6972
6972
  if (n === "Luminosity" && r) {
6973
- let [e, t, n] = Me(r), a = Math.round(.3 * e + .59 * t + .11 * n);
6973
+ let [e, t, n] = je(r), a = Math.round(.3 * e + .59 * t + .11 * n);
6974
6974
  o = i?.[a] ?? a;
6975
6975
  } else o = i?.[0] ?? 0;
6976
6976
  let { width: s, height: c } = this.ctx.canvas, l = t.width * t.height, u = s * c < 4 * l, d = a ? {
@@ -6986,8 +6986,8 @@ var Nn = [
6986
6986
  if (c.drawImage(e, t, n), a && (c.globalCompositeOperation = "destination-atop", c.fillStyle = a, c.fillRect(0, 0, r, i)), !o) return s;
6987
6987
  let l = this.canvasFactory.create(r, i), u = l.context;
6988
6988
  u.filter = o.url;
6989
- let d = P.isCanvasFilterSupported && u.filter !== "none" && u.filter !== "";
6990
- if (u.drawImage(s.canvas, 0, 0), P.isCanvasFilterSupported && (u.filter = "none"), !d) {
6989
+ let d = F.isCanvasFilterSupported && u.filter !== "none" && u.filter !== "";
6990
+ if (u.drawImage(s.canvas, 0, 0), F.isCanvasFilterSupported && (u.filter = "none"), !d) {
6991
6991
  let e = u.getImageData(0, 0, r, i), { data: t } = e, { transferMap: n } = o;
6992
6992
  if (o.subtype === "Luminosity") for (let e = 0, r = t.length; e < r; e += 4) {
6993
6993
  let r = .3 * t[e] + .59 * t[e + 1] + .11 * t[e + 2] + .5 | 0;
@@ -7013,7 +7013,7 @@ var Nn = [
7013
7013
  let { width: r, height: i } = e, a = t ?? this.canvasFactory.create(r, i), o = a.context;
7014
7014
  n = Math.round(n * 255) / 255;
7015
7015
  let s = n < 1;
7016
- s && this.#s === void 0 && (this.#s = P.isCanvasFilterSupported ? /* @__PURE__ */ new Map() : "none");
7016
+ s && this.#s === void 0 && (this.#s = F.isCanvasFilterSupported ? /* @__PURE__ */ new Map() : "none");
7017
7017
  let c = "none";
7018
7018
  if (s && this.#s instanceof Map && (c = this.#s.getOrInsertComputed(n, () => this.filterFactory.addKnockoutFilter(n))), !s || c !== "none") return t && (o.save(), o.setTransform(1, 0, 0, 1, 0, 0), o.clearRect(0, 0, r, i), o.restore()), o.filter = c, o.drawImage(e, 0, 0), o.filter = "none", a;
7019
7019
  let l = e.getContext("2d", { willReadFrequently: !0 }).getImageData(0, 0, r, i), u = o.createImageData(r, i), d = l.data, f = u.data, p = n > 0 ? 1 / n : 1e6;
@@ -7035,11 +7035,11 @@ var Nn = [
7035
7035
  0,
7036
7036
  0
7037
7037
  ], backdropOffset: a = [0, 0], reuseMaskEntry: o = null, poolMeta: s = null, sourceAlpha: c = 1, sourceFilter: l = "none", knockoutAlpha: u = 1 } = n, { width: d, height: f } = t, p = this.#f(t, o, u), m = e.globalCompositeOperation;
7038
- if (e.save(), e.setTransform(...i), e.globalAlpha = 1, P.isCanvasFilterSupported && (e.filter = "none"), e.globalCompositeOperation = "destination-out", e.drawImage(p.canvas, 0, 0), r) {
7038
+ if (e.save(), e.setTransform(...i), e.globalAlpha = 1, F.isCanvasFilterSupported && (e.filter = "none"), e.globalCompositeOperation = "destination-out", e.drawImage(p.canvas, 0, 0), r) {
7039
7039
  let [t, n] = a, i = this.#p(s, "knockoutBackdropEntry", d, f), o = i.context;
7040
7040
  o.drawImage(r, t, n, d, f, 0, 0, d, f), o.globalCompositeOperation = "destination-in", o.drawImage(p.canvas, 0, 0), o.globalCompositeOperation = "source-over", e.globalCompositeOperation = "destination-over", e.drawImage(i.canvas, 0, 0), s || this.canvasFactory.destroy(i);
7041
7041
  }
7042
- e.globalCompositeOperation = m, e.globalAlpha = c, P.isCanvasFilterSupported && (e.filter = l ?? "none"), e.drawImage(t, 0, 0), e.restore(), o || this.canvasFactory.destroy(p);
7042
+ e.globalCompositeOperation = m, e.globalAlpha = c, F.isCanvasFilterSupported && (e.filter = l ?? "none"), e.drawImage(t, 0, 0), e.restore(), o || this.canvasFactory.destroy(p);
7043
7043
  }
7044
7044
  #h(e = 1) {
7045
7045
  if (this.#e === 0 || this.#t > 0 || !this.contentVisible) return !1;
@@ -7143,10 +7143,10 @@ var Nn = [
7143
7143
  let n = t === _.stroke ? this.current.lineWidth / 2 : 0;
7144
7144
  this.dependencyTracker.resetBBox(e).recordBBox(e, this.ctx, r[0] - n, r[2] + n, r[1] - n, r[3] + n).recordDependencies(e, ["transform"]);
7145
7145
  }
7146
- i instanceof Path2D || (i = n[0] = Je(i)), F.axialAlignedBoundingBox(r, z(this.ctx), this.current.minMax);
7146
+ i instanceof Path2D || (i = n[0] = qe(i)), I.axialAlignedBoundingBox(r, B(this.ctx), this.current.minMax);
7147
7147
  let a = this.current.tilingPatternDims;
7148
7148
  if (a && t !== _.stroke && t !== _.closeStroke && this.current.fillColor instanceof yn) {
7149
- let e = F.intersect(this.current.clipBox, this.current.minMax);
7149
+ let e = I.intersect(this.current.clipBox, this.current.minMax);
7150
7150
  e ? this.current.fillColor.updatePatternDims(e, a) : this.current.tilingPatternDims = null;
7151
7151
  }
7152
7152
  this[t](e, i), this._pathStartIdx = e;
@@ -7159,14 +7159,14 @@ var Nn = [
7159
7159
  if (i.globalAlpha = this.current.strokeAlpha, this.contentVisible) {
7160
7160
  if (typeof a == "object" && a?.getPattern) {
7161
7161
  let n = a.isModifyingCurrentTransform() ? i.getTransform() : null;
7162
- if (i.save(), i.strokeStyle = a.getPattern(i, this, B(i), Y.STROKE, e), n) {
7162
+ if (i.save(), i.strokeStyle = a.getPattern(i, this, V(i), Y.STROKE, e), n) {
7163
7163
  let e = new Path2D();
7164
7164
  e.addPath(t, i.getTransform().invertSelf().multiplySelf(n)), t = e;
7165
7165
  }
7166
7166
  this.rescaleAndStroke(t, !1), i.restore();
7167
7167
  } else this.rescaleAndStroke(t, !0);
7168
7168
  }
7169
- this.dependencyTracker?.recordDependencies(e, G.stroke), n && this.consumePath(e, t, this.current.getClippedPathBoundingBox(Y.STROKE, z(this.ctx))), i.globalAlpha = this.current.fillAlpha, this.#g(r);
7169
+ this.dependencyTracker?.recordDependencies(e, G.stroke), n && this.consumePath(e, t, this.current.getClippedPathBoundingBox(Y.STROKE, B(this.ctx))), i.globalAlpha = this.current.fillAlpha, this.#g(r);
7170
7170
  }
7171
7171
  closeStroke(e, t) {
7172
7172
  this.stroke(e, t);
@@ -7180,7 +7180,7 @@ var Nn = [
7180
7180
  return;
7181
7181
  }
7182
7182
  let u = a.isModifyingCurrentTransform() ? i.getTransform() : null;
7183
- if (this.dependencyTracker?.save(e), i.save(), i.fillStyle = a.getPattern(i, this, B(i), Y.FILL, e), u) {
7183
+ if (this.dependencyTracker?.save(e), i.save(), i.fillStyle = a.getPattern(i, this, V(i), Y.FILL, e), u) {
7184
7184
  let e = new Path2D();
7185
7185
  e.addPath(t, i.getTransform().invertSelf().multiplySelf(u)), t = e;
7186
7186
  }
@@ -7252,7 +7252,7 @@ var Nn = [
7252
7252
  if (a.fontMatrix = i.fontMatrix || r, (a.fontMatrix[0] === 0 || a.fontMatrix[3] === 0) && w("Invalid font matrix for font " + t), n < 0 ? (n = -n, a.fontDirection = -1) : a.fontDirection = 1, this.current.font = i, this.current.fontSize = n, i.isType3Font) return;
7253
7253
  let o = i.loadedName || "sans-serif", s = i.systemFontInfo?.css || `"${o}", ${i.fallbackName}`, c = "normal";
7254
7254
  i.black ? c = "900" : i.bold && (c = "bold");
7255
- let l = i.italic ? "italic" : "normal", u = I(n, bn, xn);
7255
+ let l = i.italic ? "italic" : "normal", u = L(n, bn, xn);
7256
7256
  this.current.fontSizeScale = n / u, this.ctx.font = `${l} ${c} ${u}px ${s}`;
7257
7257
  }
7258
7258
  setTextRenderingMode(e, t) {
@@ -7294,7 +7294,7 @@ var Nn = [
7294
7294
  if (d === f.STROKE || d === f.FILL_STROKE) {
7295
7295
  if (a) {
7296
7296
  t ||= o.getTransform(), o.setTransform(...a);
7297
- let { a: e, b: n, c: r, d: i } = t, s = F.inverseTransform(a), c = F.transform([
7297
+ let { a: e, b: n, c: r, d: i } = t, s = I.inverseTransform(a), c = I.transform([
7298
7298
  e,
7299
7299
  n,
7300
7300
  r,
@@ -7302,13 +7302,13 @@ var Nn = [
7302
7302
  0,
7303
7303
  0
7304
7304
  ], s);
7305
- F.singularValueDecompose2dScale(c, Z), o.lineWidth *= Math.max(Z[0], Z[1]) / u, o.stroke(this.#_(g, t, a));
7305
+ I.singularValueDecompose2dScale(c, Z), o.lineWidth *= Math.max(Z[0], Z[1]) / u, o.stroke(this.#_(g, t, a));
7306
7306
  } else o.lineWidth /= u, o.stroke(g);
7307
7307
  }
7308
7308
  o.restore();
7309
7309
  } else (d === f.FILL || d === f.FILL_STROKE) && (o.fillText(t, n, r), this.dependencyTracker?.recordCharacterBBox(e, o, c, u, n, r, () => o.measureText(t))), (d === f.STROKE || d === f.FILL_STROKE) && (this.dependencyTracker && this.dependencyTracker?.recordCharacterBBox(e, o, c, u, n, r, () => o.measureText(t)).recordDependencies(e, G.stroke), o.strokeText(t, n, r));
7310
7310
  p && ((this.pendingTextPaths ||= []).push({
7311
- transform: z(o),
7311
+ transform: B(o),
7312
7312
  x: n,
7313
7313
  y: r,
7314
7314
  fontSize: u,
@@ -7345,13 +7345,13 @@ var Nn = [
7345
7345
  let y, b, x = n.textRenderingMode & f.FILL_STROKE_MASK, S = x === f.FILL || x === f.FILL_STROKE, C = x === f.STROKE || x === f.FILL_STROKE, w = n.lineWidth, T = n.textMatrixScale;
7346
7346
  if (T === 0 || w === 0 ? C && (w = this.getSinglePixelWidth()) : w /= T, s !== 1 && (o.scale(s, s), w /= s), o.lineWidth = w, S && n.patternFill) {
7347
7347
  o.save();
7348
- let t = n.fillColor.getPattern(o, this, B(o), Y.FILL, e);
7349
- y = z(o), o.restore(), o.fillStyle = t;
7348
+ let t = n.fillColor.getPattern(o, this, V(o), Y.FILL, e);
7349
+ y = B(o), o.restore(), o.fillStyle = t;
7350
7350
  }
7351
7351
  if (C && n.patternStroke) {
7352
7352
  o.save();
7353
- let t = n.strokeColor.getPattern(o, this, B(o), Y.STROKE, e);
7354
- b = z(o), o.restore(), o.strokeStyle = t;
7353
+ let t = n.strokeColor.getPattern(o, this, V(o), Y.STROKE, e);
7354
+ b = B(o), o.restore(), o.strokeStyle = t;
7355
7355
  }
7356
7356
  if (r.isInvalidPDFjsFont) {
7357
7357
  let r = [], i = 0;
@@ -7410,7 +7410,7 @@ var Nn = [
7410
7410
  let e = (v.isSpace ? u : 0) + l, r = a.charProcOperatorList[v.operatorListId];
7411
7411
  r ? this.contentVisible && (this.save(), r.fnArray[0] === _.setCharWidth && (i.fillAlpha = i.strokeAlpha = 1, n.globalAlpha = 1), n.scale(o, o), n.transform(...p), this.executeOperatorList(r), this.restore()) : w(`Type3 character "${v.operatorListId}" is not available.`);
7412
7412
  let s = [v.width, 0];
7413
- F.applyTransform(s, p), y = s[0] * o + e, n.translate(y, 0), i.x += y * d;
7413
+ I.applyTransform(s, p), y = s[0] * o + e, n.translate(y, 0), i.x += y * d;
7414
7414
  }
7415
7415
  n.restore(), x && (this.dependencyTracker = x);
7416
7416
  }
@@ -7422,7 +7422,7 @@ var Nn = [
7422
7422
  getColorN_Pattern(t, n) {
7423
7423
  let r;
7424
7424
  if (n[0] === "TilingPattern") {
7425
- let t = this.baseTransform || z(this.ctx);
7425
+ let t = this.baseTransform || B(this.ctx);
7426
7426
  r = new yn(n, this.ctx, { createCanvasGraphics: (t, n) => new e(t, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {
7427
7427
  optionalContentConfig: this.optionalContentConfig,
7428
7428
  markedContentStack: this.markedContentStack
@@ -7462,11 +7462,11 @@ var Nn = [
7462
7462
  shadingFill(e, t) {
7463
7463
  if (!this.contentVisible) return;
7464
7464
  let r = this.#h(this.current.fillAlpha), i = this.ctx;
7465
- this.save(e), i.fillStyle = this._getPattern(e, t).getPattern(i, this, B(i), Y.SHADING, e);
7466
- let a = B(i);
7465
+ this.save(e), i.fillStyle = this._getPattern(e, t).getPattern(i, this, V(i), Y.SHADING, e);
7466
+ let a = V(i);
7467
7467
  if (a) {
7468
7468
  let { width: e, height: t } = i.canvas, r = n.slice();
7469
- F.axialAlignedBoundingBox([
7469
+ I.axialAlignedBoundingBox([
7470
7470
  0,
7471
7471
  0,
7472
7472
  e,
@@ -7484,8 +7484,8 @@ var Nn = [
7484
7484
  T("Should not call beginImageData");
7485
7485
  }
7486
7486
  paintFormXObjectBegin(e, t, n) {
7487
- if (this.contentVisible && (this.save(e), this.baseTransformStack.push(this.baseTransform), t && this.transform(e, ...t), this.baseTransform = z(this.ctx), n)) {
7488
- F.axialAlignedBoundingBox(n, this.baseTransform, this.current.minMax);
7487
+ if (this.contentVisible && (this.save(e), this.baseTransformStack.push(this.baseTransform), t && this.transform(e, ...t), this.baseTransform = B(this.ctx), n)) {
7488
+ I.axialAlignedBoundingBox(n, this.baseTransform, this.current.minMax);
7489
7489
  let [t, r, i, a] = n, o = new Path2D();
7490
7490
  o.rect(t, r, i - t, a - r), this.ctx.clip(o), this.dependencyTracker?.recordClipBox(e, this.ctx, t, i, r, a), this.endPath(e);
7491
7491
  }
@@ -7512,7 +7512,7 @@ var Nn = [
7512
7512
  return;
7513
7513
  }
7514
7514
  !t.isolated && !t.knockout && this.#e === 0 && C("TODO: Fully support non-isolated non-knockout groups.");
7515
- let a = z(i);
7515
+ let a = B(i);
7516
7516
  t.matrix && i.transform(...t.matrix);
7517
7517
  let o = [
7518
7518
  0,
@@ -7520,7 +7520,7 @@ var Nn = [
7520
7520
  i.canvas.width,
7521
7521
  i.canvas.height
7522
7522
  ], s;
7523
- t.bbox ? (s = n.slice(), F.axialAlignedBoundingBox(t.bbox, z(i), s), s = F.intersect(s, o) || [
7523
+ t.bbox ? (s = n.slice(), I.axialAlignedBoundingBox(t.bbox, B(i), s), s = I.intersect(s, o) || [
7524
7524
  0,
7525
7525
  0,
7526
7526
  0,
@@ -7586,10 +7586,10 @@ var Nn = [
7586
7586
  if (t.isGray && this.#v(r), this.ctx = i, this.ctx.imageSmoothingEnabled = !1, this.dependencyTracker?.popBaseTransform(), t.smask) this.tempSMask = this.smaskStack.pop(), this.restore(e), this.dependencyTracker && (this.ctx.restore(), this.inSMaskMode && this.ctx.setTransform(this.suspendedCtx.getTransform())), this.#y(a);
7587
7587
  else {
7588
7588
  this.ctx.restore();
7589
- let t = z(this.ctx);
7589
+ let t = B(this.ctx);
7590
7590
  this.restore(e), this.ctx.save(), this.ctx.setTransform(...t);
7591
7591
  let o = n.slice();
7592
- F.axialAlignedBoundingBox([
7592
+ I.axialAlignedBoundingBox([
7593
7593
  0,
7594
7594
  0,
7595
7595
  r.canvas.width,
@@ -7603,7 +7603,7 @@ var Nn = [
7603
7603
  let c = this.#f(r.canvas);
7604
7604
  s.globalCompositeOperation = "destination-in", s.drawImage(c.canvas, 0, 0);
7605
7605
  let l = this.ctx.globalCompositeOperation, u = this.ctx.globalAlpha, d = this.ctx.filter;
7606
- this.ctx.save(), this.ctx.setTransform(...t), this.ctx.globalAlpha = 1, P.isCanvasFilterSupported && (this.ctx.filter = "none"), this.ctx.globalCompositeOperation = "destination-out", this.ctx.drawImage(c.canvas, 0, 0), this.ctx.globalCompositeOperation = l, this.ctx.globalAlpha = u, P.isCanvasFilterSupported && (this.ctx.filter = d ?? "none"), this.ctx.drawImage(o.canvas, 0, 0), this.ctx.restore(), this.canvasFactory.destroy(c), this.canvasFactory.destroy(o);
7606
+ this.ctx.save(), this.ctx.setTransform(...t), this.ctx.globalAlpha = 1, F.isCanvasFilterSupported && (this.ctx.filter = "none"), this.ctx.globalCompositeOperation = "destination-out", this.ctx.drawImage(c.canvas, 0, 0), this.ctx.globalCompositeOperation = l, this.ctx.globalAlpha = u, F.isCanvasFilterSupported && (this.ctx.filter = d ?? "none"), this.ctx.drawImage(o.canvas, 0, 0), this.ctx.restore(), this.canvasFactory.destroy(c), this.canvasFactory.destroy(o);
7607
7607
  } else {
7608
7608
  let e = s?.backdropCtx ?? null;
7609
7609
  this.#m(this.ctx, r.canvas, {
@@ -7629,7 +7629,7 @@ var Nn = [
7629
7629
  }
7630
7630
  #v(e) {
7631
7631
  let { canvas: t } = e, { width: n, height: r } = t;
7632
- if (P.isCanvasFilterSupported) {
7632
+ if (F.isCanvasFilterSupported) {
7633
7633
  e.save(), e.setTransform(1, 0, 0, 1, 0, 0), e.filter = "grayscale(1)", e.globalAlpha = 1, e.globalCompositeOperation = "copy", e.drawImage(t, 0, 0), e.restore();
7634
7634
  return;
7635
7635
  }
@@ -7647,12 +7647,12 @@ var Nn = [
7647
7647
  if (this.#u(), jn(this.ctx), this.ctx.save(), this.save(e), this.baseTransform && this.ctx.setTransform(...this.baseTransform), n) {
7648
7648
  let i = n[2] - n[0], s = n[3] - n[1];
7649
7649
  if (a && this.annotationCanvasMap) {
7650
- r = r.slice(), r[4] -= n[0], r[5] -= n[1], n = n.slice(), n[0] = n[1] = 0, n[2] = i, n[3] = s, F.singularValueDecompose2dScale(z(this.ctx), Z);
7650
+ r = r.slice(), r[4] -= n[0], r[5] -= n[1], n = n.slice(), n[0] = n[1] = 0, n[2] = i, n[3] = s, I.singularValueDecompose2dScale(B(this.ctx), Z);
7651
7651
  let { viewportScale: e } = this, a = Math.ceil(i * this.outputScaleX * e), c = Math.ceil(s * this.outputScaleY * e);
7652
7652
  this.annotationCanvas = this.canvasFactory.create(a, c);
7653
7653
  let { canvas: l, context: u } = this.annotationCanvas;
7654
7654
  if (o) {
7655
- let e = this.annotationCanvasMap.getOrInsertComputed(t, pe);
7655
+ let e = this.annotationCanvasMap.getOrInsertComputed(t, fe);
7656
7656
  l.setAttribute("data-canvas-name", o);
7657
7657
  let n = e.findIndex((e) => e.getAttribute("data-canvas-name") === o);
7658
7658
  n === -1 ? e.push(l) : e[n] = l;
@@ -7664,7 +7664,7 @@ var Nn = [
7664
7664
  t.rect(n[0], n[1], i, s), this.ctx.clip(t);
7665
7665
  }
7666
7666
  }
7667
- this.current = new Dn(this.ctx.canvas.width, this.ctx.canvas.height), this.baseTransformStack.push(this.baseTransform), this.transform(e, ...r), this.transform(e, ...i), this.baseTransform = z(this.ctx);
7667
+ this.current = new Dn(this.ctx.canvas.width, this.ctx.canvas.height), this.baseTransformStack.push(this.baseTransform), this.transform(e, ...r), this.transform(e, ...i), this.baseTransform = B(this.ctx);
7668
7668
  }
7669
7669
  endAnnotation(e) {
7670
7670
  this.annotationCanvas && (this.ctx.restore(), this.#d(), this.ctx = this.annotationCanvas.savedCtx, delete this.annotationCanvas.savedCtx, delete this.annotationCanvas), this.baseTransform = this.baseTransformStack.pop();
@@ -7681,12 +7681,12 @@ var Nn = [
7681
7681
  t = this.getObject(e, t.data, t);
7682
7682
  let s = this.#h(this.current.fillAlpha), c = this.ctx;
7683
7683
  c.save();
7684
- let l = z(c);
7684
+ let l = B(c);
7685
7685
  c.transform(n, r, i, a, 0, 0);
7686
7686
  let u = this._createMaskCanvas(e, t);
7687
7687
  c.setTransform(1, 0, 0, 1, u.offsetX - l[4], u.offsetY - l[5]), this.dependencyTracker?.resetBBox(e);
7688
7688
  for (let t = 0, s = o.length; t < s; t += 2) {
7689
- let s = F.transform(l, [
7689
+ let s = I.transform(l, [
7690
7690
  n,
7691
7691
  r,
7692
7692
  i,
@@ -7704,7 +7704,7 @@ var Nn = [
7704
7704
  this.dependencyTracker?.resetBBox(e).recordDependencies(e, G.transformAndFill);
7705
7705
  for (let n of t) {
7706
7706
  let { data: t, width: o, height: s, transform: c } = n, l = this.canvasFactory.create(o, s), u = l.context;
7707
- u.save(), kn(u, this.getObject(e, t, n)), u.globalCompositeOperation = "source-in", u.fillStyle = a ? i.getPattern(u, this, B(r), Y.FILL, e) : i, u.fillRect(0, 0, o, s), u.restore(), r.save(), r.transform(...c), r.scale(1, -1), En(r, l.canvas, 0, 0, o, s, 0, -1, 1, 1), this.canvasFactory.destroy(l), this.dependencyTracker?.recordBBox(e, r, 0, o, 0, s), r.restore();
7707
+ u.save(), kn(u, this.getObject(e, t, n)), u.globalCompositeOperation = "source-in", u.fillStyle = a ? i.getPattern(u, this, V(r), Y.FILL, e) : i, u.fillRect(0, 0, o, s), u.restore(), r.save(), r.transform(...c), r.scale(1, -1), En(r, l.canvas, 0, 0, o, s, 0, -1, 1, 1), this.canvasFactory.destroy(l), this.dependencyTracker?.recordBBox(e, r, 0, o, 0, s), r.restore();
7708
7708
  }
7709
7709
  this.compose(), this.dependencyTracker?.recordOperation(e), this.#g(n);
7710
7710
  }
@@ -7769,8 +7769,8 @@ var Nn = [
7769
7769
  let e = this.canvasFactory.create(n, r);
7770
7770
  On(e.context, t), s = this.applyTransferMapsToCanvas(e.context), c = e;
7771
7771
  }
7772
- let l = this._scaleImage(s, B(a));
7773
- a.imageSmoothingEnabled = Mn(z(a), t.interpolate), this.dependencyTracker && (this.dependencyTracker.resetBBox(e).recordBBox(e, a, 0, n, -r, 0).recordDependencies(e, G.imageXObject).recordOperation(e), this.imagesTracker?.record(a, n, r, this.dependencyTracker.clipBox)), En(a, l.img, 0, 0, l.paintWidth, l.paintHeight, 0, -r, n, r), l.tmpCanvas && this.canvasFactory.destroy(l.tmpCanvas), c && this.canvasFactory.destroy(c), this.compose(), this.restore(e), this.#g(i);
7772
+ let l = this._scaleImage(s, V(a));
7773
+ a.imageSmoothingEnabled = Mn(B(a), t.interpolate), this.dependencyTracker && (this.dependencyTracker.resetBBox(e).recordBBox(e, a, 0, n, -r, 0).recordDependencies(e, G.imageXObject).recordOperation(e), this.imagesTracker?.record(a, n, r, this.dependencyTracker.clipBox)), En(a, l.img, 0, 0, l.paintWidth, l.paintHeight, 0, -r, n, r), l.tmpCanvas && this.canvasFactory.destroy(l.tmpCanvas), c && this.canvasFactory.destroy(c), this.compose(), this.restore(e), this.#g(i);
7774
7774
  }
7775
7775
  paintInlineImageXObjectGroup(e, t, n) {
7776
7776
  if (!this.contentVisible) return;
@@ -7810,7 +7810,7 @@ var Nn = [
7810
7810
  }
7811
7811
  getSinglePixelWidth() {
7812
7812
  if (!this._cachedGetSinglePixelWidth) {
7813
- let e = z(this.ctx);
7813
+ let e = B(this.ctx);
7814
7814
  if (e[1] === 0 && e[2] === 0) this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(e[0]), Math.abs(e[3]));
7815
7815
  else {
7816
7816
  let t = Math.abs(e[0] * e[3] - e[2] * e[1]), n = Math.hypot(e[0], e[2]), r = Math.hypot(e[1], e[3]);
@@ -7963,7 +7963,7 @@ function Vn(e) {
7963
7963
  if (e) {
7964
7964
  if (!/^[\x00-\xFF]+$/.test(n)) return n;
7965
7965
  try {
7966
- let r = new TextDecoder(e, { fatal: !0 }), i = oe(n);
7966
+ let r = new TextDecoder(e, { fatal: !0 }), i = ae(n);
7967
7967
  n = r.decode(i), t = !1;
7968
7968
  } catch {}
7969
7969
  }
@@ -8043,12 +8043,12 @@ function Gn(e) {
8043
8043
  if (e.includes("%")) try {
8044
8044
  e = decodeURIComponent(e);
8045
8045
  } catch {}
8046
- if (Ee(e)) return e;
8046
+ if (Te(e)) return e;
8047
8047
  }
8048
8048
  return null;
8049
8049
  }
8050
8050
  function Kn(e, t) {
8051
- return new M(`Unexpected server response (${e}) while retrieving PDF "${t.href}".`, e, e === 404 || e === 0 && t.protocol === "file:");
8051
+ return new N(`Unexpected server response (${e}) while retrieving PDF "${t.href}".`, e, e === 404 || e === 0 && t.protocol === "file:");
8052
8052
  }
8053
8053
  function qn(e, t) {
8054
8054
  if (e !== t) throw Error(`Expected range response-origin "${e}" to match "${t}".`);
@@ -8092,7 +8092,7 @@ var Zn = class extends Rn {
8092
8092
  rangeChunkSize: r,
8093
8093
  disableRange: t
8094
8094
  });
8095
- this._contentLength = o, this._isRangeSupported = s, this._filename = Gn(a), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new N("Streaming is disabled.")), this._headersCapability.resolve();
8095
+ this._contentLength = o, this._isRangeSupported = s, this._filename = Gn(a), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new P("Streaming is disabled.")), this._headersCapability.resolve();
8096
8096
  }).catch(this._headersCapability.reject);
8097
8097
  }
8098
8098
  async read() {
@@ -8194,7 +8194,7 @@ var nr = class extends Rn {
8194
8194
  let { pdfDataRangeTransport: t, disableRange: n, disableStream: r } = e._source, { length: i, contentDispositionFilename: a } = t;
8195
8195
  this._queuedChunks = e._queuedChunks || [];
8196
8196
  for (let e of this._queuedChunks) this._loaded += e.byteLength;
8197
- this._done = e._progressiveDone, this._contentLength = i, this._isStreamingSupported = !r, this._isRangeSupported = !n, Ee(a) && (this._filename = a), this._headersCapability.resolve();
8197
+ this._done = e._progressiveDone, this._contentLength = i, this._isStreamingSupported = !r, this._isRangeSupported = !n, Te(a) && (this._filename = a), this._headersCapability.resolve();
8198
8198
  let o = this._loaded;
8199
8199
  Promise.resolve().then(() => {
8200
8200
  o > 0 && this._loaded === o && this._callOnProgress();
@@ -8260,7 +8260,7 @@ var nr = class extends Rn {
8260
8260
  }
8261
8261
  }, ar = 200, or = 206;
8262
8262
  function sr(e) {
8263
- return typeof e == "string" ? oe(e).buffer : e;
8263
+ return typeof e == "string" ? ae(e).buffer : e;
8264
8264
  }
8265
8265
  var cr = class extends Rn {
8266
8266
  #e = /* @__PURE__ */ new WeakMap();
@@ -8446,7 +8446,7 @@ var fr = class extends Rn {
8446
8446
  let n = dr(i);
8447
8447
  this._reader = n.getReader();
8448
8448
  let { size: a } = e;
8449
- this._contentLength = a, this._isRangeSupported = !t && a > 2 * r, !this._isStreamingSupported && this._isRangeSupported && this.cancel(new N("Streaming is disabled.")), this._headersCapability.resolve();
8449
+ this._contentLength = a, this._isRangeSupported = !t && a > 2 * r, !this._isStreamingSupported && this._isRangeSupported && this.cancel(new P("Streaming is disabled.")), this._headersCapability.resolve();
8450
8450
  }).catch((e) => {
8451
8451
  e.code === "ENOENT" && (e = Kn(0, i)), this._headersCapability.reject(e);
8452
8452
  });
@@ -8497,7 +8497,7 @@ var fr = class extends Rn {
8497
8497
  }
8498
8498
  };
8499
8499
  function hr(t) {
8500
- return Ae(t) ? Zn : e ? fr : cr;
8500
+ return ke(t) ? Zn : e ? fr : cr;
8501
8501
  }
8502
8502
  var gr = class {
8503
8503
  static #e = null;
@@ -8732,7 +8732,7 @@ var gr = class {
8732
8732
  let i = t[e] - 1;
8733
8733
  o[e] = r[i], i < n && s++;
8734
8734
  }
8735
- let c = this.#n, l = c - a, u = I(n - s, 0, l);
8735
+ let c = this.#n, l = c - a, u = L(n - s, 0, l);
8736
8736
  for (let t = 0, n = 0; t < c; t++) e.has(t + 1) || (r[n++] = r[t]);
8737
8737
  r.copyWithin(u + a, u, l), r.set(o, u), this.#s(i), r.every((e, t) => e === t + 1) && (this.#e = null);
8738
8738
  }
@@ -8814,7 +8814,7 @@ var gr = class {
8814
8814
  let t = /* @__PURE__ */ new Map();
8815
8815
  for (let n = 0, r = e.length; n < r; n++) {
8816
8816
  let r = this.getPageId(e[n]);
8817
- t.getOrInsertComputed(r, pe).push(n + 1);
8817
+ t.getOrInsertComputed(r, fe).push(n + 1);
8818
8818
  }
8819
8819
  return this.getPageMappingForSaving(t);
8820
8820
  }
@@ -8898,7 +8898,7 @@ var gr = class {
8898
8898
  e.enqueue(t), e.close();
8899
8899
  } });
8900
8900
  else throw Error("No \"textContentSource\" parameter specified.");
8901
- this.#t = this.#u = r, this.#i = n, this.#f = i.scale * Ie.pixelRatio, this.#d = i.rotation, this.#o = {
8901
+ this.#t = this.#u = r, this.#i = n, this.#f = i.scale * Fe.pixelRatio, this.#d = i.rotation, this.#o = {
8902
8902
  div: null,
8903
8903
  properties: null,
8904
8904
  ctx: null
@@ -8911,12 +8911,12 @@ var gr = class {
8911
8911
  -1,
8912
8912
  -s,
8913
8913
  c + o
8914
- ], this.#c = a, this.#s = o, e.#k(), r.style.setProperty("--min-font-size", e.#S), Fe(r, i), this.#e.promise.finally(() => {
8914
+ ], this.#c = a, this.#s = o, e.#k(), r.style.setProperty("--min-font-size", e.#S), Pe(r, i), this.#e.promise.finally(() => {
8915
8915
  e.#C.delete(this), this.#o = null, this.#p = null;
8916
8916
  }).catch(() => {});
8917
8917
  }
8918
8918
  static get fontFamilyMap() {
8919
- let { isWindows: e, isFirefox: t } = P.platform;
8919
+ let { isWindows: e, isFirefox: t } = F.platform;
8920
8920
  return A(this, "fontFamilyMap", /* @__PURE__ */ new Map([["sans-serif", `${e && t ? "Calibri, " : ""}sans-serif`], ["monospace", `${e && t ? "Lucida Console, " : ""}monospace`]]));
8921
8921
  }
8922
8922
  render() {
@@ -8933,8 +8933,8 @@ var gr = class {
8933
8933
  return this.#l = this.#h.getReader(), e.#C.add(this), t(), this.#e.promise;
8934
8934
  }
8935
8935
  update({ viewport: t, onBefore: n = null }) {
8936
- let r = t.scale * Ie.pixelRatio, i = t.rotation;
8937
- if (i !== this.#d && (n?.(), this.#d = i, Fe(this.#u, { rotation: i })), r !== this.#f) {
8936
+ let r = t.scale * Fe.pixelRatio, i = t.rotation;
8937
+ if (i !== this.#d && (n?.(), this.#d = i, Pe(this.#u, { rotation: i })), r !== this.#f) {
8938
8938
  n?.(), this.#f = r;
8939
8939
  let t = {
8940
8940
  div: null,
@@ -8945,7 +8945,7 @@ var gr = class {
8945
8945
  }
8946
8946
  }
8947
8947
  cancel() {
8948
- let e = new N("TextLayer task cancelled.");
8948
+ let e = new P("TextLayer task cancelled.");
8949
8949
  this.#l?.cancel(e).catch(() => {}), this.#l = null, this.#e.reject(e);
8950
8950
  }
8951
8951
  get textDivs() {
@@ -8982,7 +8982,7 @@ var gr = class {
8982
8982
  fontSize: 0
8983
8983
  };
8984
8984
  this.#g.push(n);
8985
- let i = F.transform(this.#v, t.transform), a = Math.atan2(i[1], i[0]), o = this.#p[t.fontName];
8985
+ let i = I.transform(this.#v, t.transform), a = Math.atan2(i[1], i[0]), o = this.#p[t.fontName];
8986
8986
  o.vertical && (a += Math.PI / 2);
8987
8987
  let s = this.#r && o.fontSubstitution || o.fontFamily;
8988
8988
  s = e.fontFamilyMap.get(s) || s;
@@ -9049,22 +9049,22 @@ var gr = class {
9049
9049
  let a = i.measureText(""), o = a.fontBoundingBoxAscent, s = Math.abs(a.fontBoundingBoxDescent);
9050
9050
  i.canvas.width = i.canvas.height = 0;
9051
9051
  let c = .8;
9052
- return o ? c = o / (o + s) : (P.platform.isFirefox && w("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."), t.ascent ? c = t.ascent : t.descent && (c = 1 + t.descent)), this.#y.set(e, c), c;
9052
+ return o ? c = o / (o + s) : (F.platform.isFirefox && w("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."), t.ascent ? c = t.ascent : t.descent && (c = 1 + t.descent)), this.#y.set(e, c), c;
9053
9053
  }
9054
9054
  }, Or = 100;
9055
9055
  function kr(t = {}) {
9056
- let n = new Ar(), { docId: r } = n, i = t.url ? It(t.url) : null, a = t.data ? Lt(t.data) : null, o = t.httpHeaders || null, s = t.withCredentials === !0, c = t.password ?? null, l = t.range instanceof jr ? t.range : null, u = Number.isInteger(t.rangeChunkSize) && t.rangeChunkSize > 0 ? t.rangeChunkSize : 2 ** 16, d = t.worker instanceof Pr ? t.worker : null, f = t.verbosity, p = typeof t.docBaseUrl == "string" && !Te(t.docBaseUrl) ? t.docBaseUrl : null, m = Rt(t.cMapUrl), h = t.cMapPacked !== !1, g = Rt(t.iccUrl), _ = Rt(t.standardFontDataUrl), v = Rt(t.wasmUrl), y = t.stopAtErrors !== !0, b = Number.isInteger(t.maxImageSize) && t.maxImageSize > -1 ? t.maxImageSize : -1, S = typeof t.isOffscreenCanvasSupported == "boolean" ? t.isOffscreenCanvasSupported : !e, C = typeof t.isImageDecoderSupported == "boolean" ? t.isImageDecoderSupported : !e, w = Number.isInteger(t.canvasMaxAreaInBytes) ? t.canvasMaxAreaInBytes : -1, T = typeof t.disableFontFace == "boolean" ? t.disableFontFace : e, E = t.fontExtraProperties === !0, D = t.enableXfa === !0, O = t.ownerDocument || globalThis.document, ee = t.disableRange === !0, k = t.disableStream === !0, A = t.disableAutoFetch === !0, j = t.pdfBug === !0, te = t.CanvasFactory || (e ? en : Jt), ne = t.FilterFactory || (e ? $t : Xt), re = t.BinaryDataFactory || (e ? tn : Kt), M = t.enableHWA === !0, ie = t.enableWebGPU === !0 ? sn() : Promise.resolve(!1), N = t.useWasm !== !1, ae = t.pagesMapper || new xr(), oe = typeof t.useSystemFonts == "boolean" ? t.useSystemFonts : !e && !T, P = typeof t.useWorkerFetch == "boolean" ? t.useWorkerFetch : !!(re === Kt && m && h && _ && v && Ae(m, document.baseURI) && Ae(_, document.baseURI) && Ae(v, document.baseURI));
9056
+ let n = new Ar(), { docId: r } = n, i = t.url ? It(t.url) : null, a = t.data ? Lt(t.data) : null, o = t.httpHeaders || null, s = t.withCredentials === !0, c = t.password ?? null, l = t.range instanceof jr ? t.range : null, u = Number.isInteger(t.rangeChunkSize) && t.rangeChunkSize > 0 ? t.rangeChunkSize : 2 ** 16, d = t.worker instanceof Pr ? t.worker : null, f = t.verbosity, p = typeof t.docBaseUrl == "string" && !we(t.docBaseUrl) ? t.docBaseUrl : null, m = Rt(t.cMapUrl), h = t.cMapPacked !== !1, g = Rt(t.iccUrl), _ = Rt(t.standardFontDataUrl), v = Rt(t.wasmUrl), y = t.stopAtErrors !== !0, b = Number.isInteger(t.maxImageSize) && t.maxImageSize > -1 ? t.maxImageSize : -1, S = typeof t.isOffscreenCanvasSupported == "boolean" ? t.isOffscreenCanvasSupported : !e, C = typeof t.isImageDecoderSupported == "boolean" ? t.isImageDecoderSupported : !e, w = Number.isInteger(t.canvasMaxAreaInBytes) ? t.canvasMaxAreaInBytes : -1, T = typeof t.disableFontFace == "boolean" ? t.disableFontFace : e, E = t.fontExtraProperties === !0, D = t.enableXfa === !0, O = t.ownerDocument || globalThis.document, ee = t.disableRange === !0, k = t.disableStream === !0, A = t.disableAutoFetch === !0, j = t.pdfBug === !0, M = t.CanvasFactory || (e ? en : Jt), te = t.FilterFactory || (e ? $t : Xt), ne = t.BinaryDataFactory || (e ? tn : Kt), N = t.enableHWA === !0, re = t.enableWebGPU === !0 ? sn() : Promise.resolve(!1), P = t.useWasm !== !1, ie = t.pagesMapper || new xr(), ae = typeof t.useSystemFonts == "boolean" ? t.useSystemFonts : !e && !T, F = typeof t.useWorkerFetch == "boolean" ? t.useWorkerFetch : !!(ne === Kt && m && h && _ && v && ke(m, document.baseURI) && ke(_, document.baseURI) && ke(v, document.baseURI));
9057
9057
  x(f);
9058
- let F = {
9059
- canvasFactory: new te({
9058
+ let I = {
9059
+ canvasFactory: new M({
9060
9060
  ownerDocument: O,
9061
- enableHWA: M
9061
+ enableHWA: N
9062
9062
  }),
9063
- filterFactory: new ne({
9063
+ filterFactory: new te({
9064
9064
  docId: r,
9065
9065
  ownerDocument: O
9066
9066
  }),
9067
- binaryDataFactory: P ? null : new re({
9067
+ binaryDataFactory: F ? null : new ne({
9068
9068
  cMapUrl: m,
9069
9069
  standardFontDataUrl: _,
9070
9070
  wasmUrl: v
@@ -9074,7 +9074,7 @@ function kr(t = {}) {
9074
9074
  verbosity: f,
9075
9075
  port: gr.workerPort
9076
9076
  }), n._worker = d);
9077
- let se = {
9077
+ let oe = {
9078
9078
  docId: r,
9079
9079
  apiVersion: "6.2.108",
9080
9080
  data: a,
@@ -9091,9 +9091,9 @@ function kr(t = {}) {
9091
9091
  isImageDecoderSupported: C,
9092
9092
  canvasMaxAreaInBytes: w,
9093
9093
  fontExtraProperties: E,
9094
- useSystemFonts: oe,
9095
- useWasm: N,
9096
- useWorkerFetch: P,
9094
+ useSystemFonts: ae,
9095
+ useWasm: P,
9096
+ useWorkerFetch: F,
9097
9097
  cMapUrl: m,
9098
9098
  cMapPacked: h,
9099
9099
  iccUrl: g,
@@ -9101,20 +9101,20 @@ function kr(t = {}) {
9101
9101
  wasmUrl: v,
9102
9102
  hasGPU: !1
9103
9103
  }
9104
- }, ce = {
9104
+ }, se = {
9105
9105
  ownerDocument: O,
9106
9106
  pdfBug: j,
9107
9107
  styleElement: null,
9108
- enableHWA: M,
9108
+ enableHWA: N,
9109
9109
  loadingParams: {
9110
9110
  disableAutoFetch: A,
9111
9111
  enableXfa: D
9112
9112
  }
9113
9113
  };
9114
- return Promise.all([d.promise, ie]).then(function([, e]) {
9114
+ return Promise.all([d.promise, re]).then(function([, e]) {
9115
9115
  if (d.destroyed) throw Error("Worker was destroyed");
9116
- se.evaluatorOptions.hasGPU = e;
9117
- let t = d.messageHandler.sendWithPromise("GetDocRequest", se, a ? [a.buffer] : null), c;
9116
+ oe.evaluatorOptions.hasGPU = e;
9117
+ let t = d.messageHandler.sendWithPromise("GetDocRequest", oe, a ? [a.buffer] : null), c;
9118
9118
  if (!a) {
9119
9119
  if (l) c = new nr({
9120
9120
  pdfDataRangeTransport: l,
@@ -9133,7 +9133,7 @@ function kr(t = {}) {
9133
9133
  }
9134
9134
  return t.then((e) => {
9135
9135
  if (d.destroyed) throw Error("Worker was destroyed");
9136
- let t = new Wt(r, e, d.port), i = new Fr(t, n, c, ce, F, ae);
9136
+ let t = new Wt(r, e, d.port), i = new Fr(t, n, c, se, I, ie);
9137
9137
  if (n._transport = i, n.destroyed) throw Error("Loading aborted");
9138
9138
  t.send("Ready", null);
9139
9139
  });
@@ -9326,7 +9326,7 @@ var Ar = class e {
9326
9326
  #e = !1;
9327
9327
  #t = null;
9328
9328
  constructor(e, t, n, r, i = !1) {
9329
- this._pageIndex = e, this._pageInfo = t, this._transport = n, this._stats = i ? new ke() : null, this._pdfBug = i, this.commonObjs = n.commonObjs, this.objs = new wr(), this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1, this.recordedBBoxes = null, this.#t = r, this.imageCoordinates = null;
9329
+ this._pageIndex = e, this._pageInfo = t, this._transport = n, this._stats = i ? new Oe() : null, this._pdfBug = i, this.commonObjs = n.commonObjs, this.objs = new wr(), this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1, this.recordedBBoxes = null, this.#t = r, this.imageCoordinates = null;
9330
9330
  }
9331
9331
  clone(t) {
9332
9332
  let n = new e(t, this._pageInfo, this._transport, this.#t, this._pdfBug);
@@ -9351,7 +9351,7 @@ var Ar = class e {
9351
9351
  return this._pageInfo.view;
9352
9352
  }
9353
9353
  getViewport({ scale: e, rotation: t = this.rotate, offsetX: n = 0, offsetY: r = 0, dontFlip: i = !1 } = {}) {
9354
- return new _e({
9354
+ return new ge({
9355
9355
  viewBox: this.view,
9356
9356
  userUnit: this.userUnit,
9357
9357
  scale: e,
@@ -9381,7 +9381,7 @@ var Ar = class e {
9381
9381
  this._stats?.time("Overall");
9382
9382
  let _ = this._transport.getRenderingIntent(r, i, f, p), { renderingIntent: v, cacheKey: y } = _;
9383
9383
  this.#e = !1, l ||= this._transport.getOptionalContentConfig(v);
9384
- let b = this._intentStates.getOrInsertComputed(y, he);
9384
+ let b = this._intentStates.getOrInsertComputed(y, me);
9385
9385
  b.streamReaderCancelTimeout &&= (clearTimeout(b.streamReaderCancelTimeout), null);
9386
9386
  let x = !!(v & a.PRINT);
9387
9387
  b.displayReadyCapability || (b.displayReadyCapability = Promise.withResolvers(), b.operatorList = {
@@ -9443,7 +9443,7 @@ var Ar = class e {
9443
9443
  function i() {
9444
9444
  s.operatorList.lastChunk && (s.opListReadCapability.resolve(s.operatorList), s.renderTasks.delete(c));
9445
9445
  }
9446
- let a = this._transport.getRenderingIntent(e, t, n, r, !0), s = this._intentStates.getOrInsertComputed(a.cacheKey, he), c;
9446
+ let a = this._transport.getRenderingIntent(e, t, n, r, !0), s = this._intentStates.getOrInsertComputed(a.cacheKey, me), c;
9447
9447
  return s.opListReadCapability || (c = Object.create(null), c.operatorListChanged = i, s.opListReadCapability = Promise.withResolvers(), (s.renderTasks ||= /* @__PURE__ */ new Set()).add(c), s.operatorList = {
9448
9448
  fnArray: [],
9449
9449
  argsArray: [],
@@ -9465,7 +9465,7 @@ var Ar = class e {
9465
9465
  });
9466
9466
  }
9467
9467
  async getTextContent(e = {}) {
9468
- if (this._transport._htmlForXfa) return this.getXfa().then((e) => ve.textContent(e));
9468
+ if (this._transport._htmlForXfa) return this.getXfa().then((e) => _e.textContent(e));
9469
9469
  let t = this.streamTextContent(e), n = {
9470
9470
  items: [],
9471
9471
  styles: Object.create(null),
@@ -9490,7 +9490,7 @@ var Ar = class e {
9490
9490
  cleanup(e = !1) {
9491
9491
  this.#e = !0;
9492
9492
  let t = this.#n();
9493
- return e && t && (this._stats &&= new ke()), t;
9493
+ return e && t && (this._stats &&= new Oe()), t;
9494
9494
  }
9495
9495
  #n() {
9496
9496
  if (!this.#e || this.destroyed) return !1;
@@ -9543,7 +9543,7 @@ var Ar = class e {
9543
9543
  if (e.streamReader) {
9544
9544
  if (e.streamReaderCancelTimeout &&= (clearTimeout(e.streamReaderCancelTimeout), null), !n) {
9545
9545
  if (e.renderTasks.size > 0) return;
9546
- if (t instanceof we) {
9546
+ if (t instanceof Ce) {
9547
9547
  let n = Or;
9548
9548
  t.extraDelay > 0 && t.extraDelay < 1e3 && (n += t.extraDelay), e.streamReaderCancelTimeout = setTimeout(() => {
9549
9549
  e.streamReaderCancelTimeout = null, this._abortOperatorList({
@@ -9555,7 +9555,7 @@ var Ar = class e {
9555
9555
  return;
9556
9556
  }
9557
9557
  }
9558
- if (e.streamReader.cancel(new N(t.message)).catch(() => {}), e.streamReader = null, !this._transport.destroyed) {
9558
+ if (e.streamReader.cancel(new P(t.message)).catch(() => {}), e.streamReader = null, !this._transport.destroyed) {
9559
9559
  for (let [t, n] of this._intentStates) if (n === e) {
9560
9560
  this._intentStates.delete(t);
9561
9561
  break;
@@ -9717,7 +9717,7 @@ var Ar = class e {
9717
9717
  this.loadingTask.onProgress?.({
9718
9718
  loaded: e,
9719
9719
  total: t,
9720
- percent: t ? I(Math.round(e / t * 100), 0, 100) : NaN
9720
+ percent: t ? L(Math.round(e / t * 100), 0, 100) : NaN
9721
9721
  });
9722
9722
  }
9723
9723
  get annotationStorage() {
@@ -9770,7 +9770,7 @@ var Ar = class e {
9770
9770
  this.#r.clear(), this.#i.clear(), this.#a.clear(), Object.hasOwn(this, "annotationStorage") && this.annotationStorage.resetModified();
9771
9771
  let t = this.messageHandler.sendWithPromise("Terminate", null);
9772
9772
  return e.push(t), Promise.all(e).then(() => {
9773
- this.commonObjs.clear(), this.fontLoader.clear(), this.#t.clear(), this.filterFactory.destroy(), Dr.cleanup(), this.#n?.cancelAllRequests(new N("Worker was terminated.")), this.messageHandler?.destroy(), this.messageHandler = null, this.destroyCapability.resolve();
9773
+ this.commonObjs.clear(), this.fontLoader.clear(), this.#t.clear(), this.filterFactory.destroy(), Dr.cleanup(), this.#n?.cancelAllRequests(new P("Worker was terminated.")), this.messageHandler?.destroy(), this.messageHandler = null, this.destroyCapability.resolve();
9774
9774
  }, this.destroyCapability.reject), this.destroyCapability.promise;
9775
9775
  }
9776
9776
  setupMessageHandler() {
@@ -10127,7 +10127,7 @@ var Ar = class e {
10127
10127
  }), this.operatorListIdx = 0, this.graphicsReady = !0, this.graphicsReadyCallback?.();
10128
10128
  }
10129
10129
  cancel(t = null, n = 0) {
10130
- this.running = !1, this.cancelled = !0, this.gfx?.endDrawing(), this.#e &&= (window.cancelAnimationFrame(this.#e), null), e.#t.delete(this._canvas), t ||= new we(`Rendering cancelled, page ${this._pageIndex + 1}`, n), this.callback(t), this.task.onError?.(t);
10130
+ this.running = !1, this.cancelled = !0, this.gfx?.endDrawing(), this.#e &&= (window.cancelAnimationFrame(this.#e), null), e.#t.delete(this._canvas), t ||= new Ce(`Rendering cancelled, page ${this._pageIndex + 1}`, n), this.callback(t), this.task.onError?.(t);
10131
10131
  }
10132
10132
  operatorListChanged() {
10133
10133
  if (!this.graphicsReady) {
@@ -10160,7 +10160,7 @@ var Ar = class e {
10160
10160
  #l = null;
10161
10161
  static #u = null;
10162
10162
  static get _keyboardManager() {
10163
- return A(this, "_keyboardManager", new nt([
10163
+ return A(this, "_keyboardManager", new tt([
10164
10164
  [["Escape"], e.prototype._hideDropdownFromKeyboard],
10165
10165
  [["Space"], e.prototype._colorSelectFromKeyboard],
10166
10166
  [["ArrowDown", "ArrowRight"], e.prototype._moveToNext],
@@ -10192,7 +10192,7 @@ var Ar = class e {
10192
10192
  }
10193
10193
  #d() {
10194
10194
  let t = document.createElement("div"), n = this.#l._signal;
10195
- t.addEventListener("contextmenu", L, { signal: n }), t.className = "dropdown", t.role = "listbox", t.ariaMultiSelectable = "false", t.ariaOrientation = "vertical", t.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"), this.#o && (t.id = `${this.#o.id}_colorpicker_dropdown`);
10195
+ t.addEventListener("contextmenu", R, { signal: n }), t.className = "dropdown", t.role = "listbox", t.ariaMultiSelectable = "false", t.ariaOrientation = "vertical", t.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"), this.#o && (t.id = `${this.#o.id}_colorpicker_dropdown`);
10196
10196
  for (let [r, i] of this.#l.highlightColors) {
10197
10197
  let a = document.createElement("button");
10198
10198
  a.tabIndex = "0", a.role = "option", a.setAttribute("data-color", i), a.title = r, a.setAttribute("data-l10n-id", e.#u[r]);
@@ -10306,17 +10306,17 @@ var Ar = class e {
10306
10306
  }
10307
10307
  renderButton() {
10308
10308
  if (this.#e) return this.#e;
10309
- let { editorType: t, colorType: n, colorAndOpacityType: r, opacityType: i, color: a, opacity: o } = this.#n, s = this.#t = P.isAlphaColorInputSupported && i !== void 0, c = this.#e = document.createElement("input");
10309
+ let { editorType: t, colorType: n, colorAndOpacityType: r, opacityType: i, color: a, opacity: o } = this.#n, s = this.#t = F.isAlphaColorInputSupported && i !== void 0, c = this.#e = document.createElement("input");
10310
10310
  if (c.type = "color", s) {
10311
10311
  c.setAttribute("alpha", "");
10312
- let e = F.hexNums[Math.round((o ?? 1) * 255)];
10312
+ let e = I.hexNums[Math.round((o ?? 1) * 255)];
10313
10313
  c.value = (a || "#000000") + e;
10314
10314
  } else c.value = a || "#000000";
10315
10315
  return c.className = "basicColorPicker", c.tabIndex = 0, c.setAttribute("data-l10n-id", e.#i[t]), c.addEventListener("input", () => {
10316
10316
  if (s) {
10317
- let e = Me(c.value);
10317
+ let e = je(c.value);
10318
10318
  if (!e) return;
10319
- let [t, a, o, s] = e, l = F.makeHexColor(t, a, o);
10319
+ let [t, a, o, s] = e, l = I.makeHexColor(t, a, o);
10320
10320
  r === void 0 ? (this.#r.updateParams(n, l), this.#r.updateParams(i, s)) : this.#r.updateParams(r, {
10321
10321
  color: l,
10322
10322
  opacity: s
@@ -10327,14 +10327,14 @@ var Ar = class e {
10327
10327
  update(e) {
10328
10328
  if (this.#e) {
10329
10329
  if (this.#t) {
10330
- let t = F.hexNums[Math.round(this.#n.opacity * 255)];
10330
+ let t = I.hexNums[Math.round(this.#n.opacity * 255)];
10331
10331
  this.#e.value = e + t;
10332
10332
  } else this.#e.value = e;
10333
10333
  }
10334
10334
  }
10335
10335
  updateOpacity(e) {
10336
10336
  if (!this.#e || !this.#t) return;
10337
- let t = F.hexNums[Math.round(e * 255)];
10337
+ let t = I.hexNums[Math.round(e * 255)];
10338
10338
  this.#e.value = this.#n.color + t;
10339
10339
  }
10340
10340
  destroy() {
@@ -10343,10 +10343,10 @@ var Ar = class e {
10343
10343
  hideDropdown() {}
10344
10344
  };
10345
10345
  function Hr(e) {
10346
- return Math.floor(I(e, 0, 1) * 255).toString(16).padStart(2, "0");
10346
+ return Math.floor(L(e, 0, 1) * 255).toString(16).padStart(2, "0");
10347
10347
  }
10348
10348
  function Ur(e) {
10349
- return I(e, 0, 1) * 255;
10349
+ return L(e, 0, 1) * 255;
10350
10350
  }
10351
10351
  var Wr = class {
10352
10352
  static CMYK_G([e, t, n, r]) {
@@ -10580,9 +10580,9 @@ var Wr = class {
10580
10580
  case h.UNDERLINE: a.borderBottomStyle = "solid";
10581
10581
  }
10582
10582
  let r = t.borderColor || null;
10583
- r ? (this.#t = !0, a.borderColor = F.makeHexColor(...r)) : a.borderWidth = 0;
10583
+ r ? (this.#t = !0, a.borderColor = I.makeHexColor(...r)) : a.borderWidth = 0;
10584
10584
  }
10585
- let c = F.normalizeRect([
10585
+ let c = I.normalizeRect([
10586
10586
  t.rect[0],
10587
10587
  n.view[3] - t.rect[1] + n.view[1],
10588
10588
  t.rect[2],
@@ -10798,7 +10798,7 @@ var Wr = class {
10798
10798
  }
10799
10799
  _setBackgroundColor(e) {
10800
10800
  let t = this.data.backgroundColor || null;
10801
- e.style.backgroundColor = t === null ? "transparent" : F.makeHexColor(...t);
10801
+ e.style.backgroundColor = t === null ? "transparent" : I.makeHexColor(...t);
10802
10802
  }
10803
10803
  }, Zr = class extends Q {
10804
10804
  constructor(e) {
@@ -10958,7 +10958,7 @@ var Wr = class {
10958
10958
  return this.container;
10959
10959
  }
10960
10960
  _getKeyModifier(e) {
10961
- return P.platform.isMac ? e.metaKey : e.ctrlKey;
10961
+ return F.platform.isMac ? e.metaKey : e.ctrlKey;
10962
10962
  }
10963
10963
  _setEventListener(e, t, n, r, i) {
10964
10964
  n.includes("mouse") ? e.addEventListener(n, (e) => {
@@ -11006,7 +11006,7 @@ var Wr = class {
11006
11006
  let e = Math.abs(this.data.rect[3] - this.data.rect[1] - 2);
11007
11007
  a = Math.min(r, o(e / 1.35));
11008
11008
  }
11009
- i.fontSize = `calc(${a}px * var(--total-scale-factor))`, i.color = F.makeHexColor(...n), this.data.textAlignment !== null && !this.data.comb && (i.textAlign = t[this.data.textAlignment]);
11009
+ i.fontSize = `calc(${a}px * var(--total-scale-factor))`, i.color = I.makeHexColor(...n), this.data.textAlignment !== null && !this.data.comb && (i.textAlign = t[this.data.textAlignment]);
11010
11010
  }
11011
11011
  _setRequired(e, t) {
11012
11012
  t ? e.setAttribute("required", !0) : e.removeAttribute("required"), e.setAttribute("aria-required", t);
@@ -11471,7 +11471,7 @@ var Wr = class {
11471
11471
  #w = null;
11472
11472
  #T = null;
11473
11473
  constructor({ container: e, color: t, elements: n, titleObj: r, modificationDate: i, contentsObj: a, richText: o, parent: s, rect: c, parentRect: l, open: u, commentManager: d = null }) {
11474
- this.#o = e, this.#x = r, this.#s = a, this.#b = o, this.#u = s, this.#a = t, this.#y = c, this.#d = l, this.#l = n, this.#e = d, this.#w = n[0], this.#c = je.toDateObject(i), this.trigger = n.flatMap((e) => e.getElementsToTriggerPopup()), d || (this.#E(), this.#o.hidden = !0, u && this.#I());
11474
+ this.#o = e, this.#x = r, this.#s = a, this.#b = o, this.#u = s, this.#a = t, this.#y = c, this.#d = l, this.#l = n, this.#e = d, this.#w = n[0], this.#c = Ae.toDateObject(i), this.trigger = n.flatMap((e) => e.getElementsToTriggerPopup()), d || (this.#E(), this.#o.hidden = !0, u && this.#I());
11475
11475
  }
11476
11476
  #E() {
11477
11477
  if (this.#m) return;
@@ -11585,7 +11585,7 @@ var Wr = class {
11585
11585
  if (this.#p) return;
11586
11586
  let e = this.#p = document.createElement("div");
11587
11587
  if (e.className = "popup", this.#a) {
11588
- let t = e.style.outlineColor = F.makeHexColor(...this.#a);
11588
+ let t = e.style.outlineColor = I.makeHexColor(...this.#a);
11589
11589
  e.style.backgroundColor = `color-mix(in srgb, ${t} 30%, white)`;
11590
11590
  }
11591
11591
  let t = document.createElement("span");
@@ -11597,7 +11597,7 @@ var Wr = class {
11597
11597
  let e = document.createElement("time");
11598
11598
  e.className = "popupDate", e.setAttribute("data-l10n-id", "pdfjs-annotation-date-time-string"), e.setAttribute("data-l10n-args", JSON.stringify({ dateObj: this.#c.valueOf() })), e.dateTime = this.#c.toISOString(), t.append(e);
11599
11599
  }
11600
- qe({
11600
+ Ke({
11601
11601
  html: this.#A || this.#s.str,
11602
11602
  dir: this.#s?.dir,
11603
11603
  className: "popupContent"
@@ -11650,7 +11650,7 @@ var Wr = class {
11650
11650
  this.#E(), this.#S ||= {
11651
11651
  contentsObj: this.#s,
11652
11652
  richText: this.#b
11653
- }, e && (this.#h = null), t && t.text && (this.#b = this.#N(t.text), this.#c = je.toDateObject(t.date), this.#s = null), this.#p?.remove(), this.#p = null;
11653
+ }, e && (this.#h = null), t && t.text && (this.#b = this.#N(t.text), this.#c = Ae.toDateObject(t.date), this.#s = null), this.#p?.remove(), this.#p = null;
11654
11654
  }
11655
11655
  resetEdited() {
11656
11656
  this.#S && ({contentsObj: this.#s, richText: this.#b} = this.#S, this.#S = null, this.#p?.remove(), this.#p = null, this.#h = null);
@@ -11661,11 +11661,11 @@ var Wr = class {
11661
11661
  #F() {
11662
11662
  if (this.#h !== null) return;
11663
11663
  let { page: { view: e }, viewport: { rawDims: { pageWidth: t, pageHeight: n, pageX: r, pageY: i } } } = this.#u, a = !!this.#d, o = a ? this.#d : this.#y;
11664
- for (let e of this.#l) if (!o || F.intersect(e.data.rect, o) !== null) {
11664
+ for (let e of this.#l) if (!o || I.intersect(e.data.rect, o) !== null) {
11665
11665
  o = e.data.rect, a = !0;
11666
11666
  break;
11667
11667
  }
11668
- let s = F.normalizeRect([
11668
+ let s = I.normalizeRect([
11669
11669
  o[0],
11670
11670
  e[3] - o[1] + e[1],
11671
11671
  o[2],
@@ -11961,7 +11961,7 @@ var Wr = class {
11961
11961
  this.container.classList.add("fileAttachmentAnnotation");
11962
11962
  let { container: e, data: t } = this, n;
11963
11963
  t.hasAppearance || t.fillAlpha === 0 ? n = document.createElement("div") : (n = document.createElement("img"), n.src = `${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name) ? "paperclip" : "pushpin"}.svg`, t.fillAlpha && t.fillAlpha < 1 && (n.style = `filter: opacity(${Math.round(t.fillAlpha * 100)}%);`)), n.addEventListener("dblclick", this.#t.bind(this)), this.#e = n;
11964
- let { isMac: r } = P.platform;
11964
+ let { isMac: r } = F.platform;
11965
11965
  return e.addEventListener("keydown", (e) => {
11966
11966
  e.key === "Enter" && (r ? e.metaKey : e.ctrlKey) && this.#t();
11967
11967
  }), !t.popupRef && this.hasPopupData ? (this.hasOwnCommentButton = !0, this._createPopup()) : n.classList.add("popupTriggerArea"), e.append(n), e;
@@ -12046,7 +12046,7 @@ var Wr = class {
12046
12046
  }
12047
12047
  async render(e) {
12048
12048
  let { annotations: t, optionalContentConfig: n } = e, r = this.div;
12049
- Fe(r, this.viewport);
12049
+ Pe(r, this.viewport);
12050
12050
  let i = /* @__PURE__ */ new Map(), a = [], o = {
12051
12051
  data: null,
12052
12052
  layer: r,
@@ -12078,7 +12078,7 @@ var Wr = class {
12078
12078
  o.data = e;
12079
12079
  let r = Xr.create(o);
12080
12080
  if (!r.isRenderable) continue;
12081
- t || (this.#o.push(r), e.popupRef && i.getOrInsertComputed(e.popupRef, pe).push(r));
12081
+ t || (this.#o.push(r), e.popupRef && i.getOrInsertComputed(e.popupRef, fe).push(r));
12082
12082
  let s = r.render();
12083
12083
  e.hidden && (s.style.visibility = "hidden"), r.updateOC(n), r._isEditable && (this.#r.set(r.data.id, r), this._annotationEditorUIManager?.renderAnnotationElement(r));
12084
12084
  }
@@ -12133,7 +12133,7 @@ var Wr = class {
12133
12133
  }
12134
12134
  update({ viewport: e, optionalContentConfig: t }) {
12135
12135
  let n = this.div;
12136
- this.viewport = e, Fe(n, { rotation: e.rotation });
12136
+ this.viewport = e, Pe(n, { rotation: e.rotation });
12137
12137
  for (let e of this.#o) e.updateOC(t);
12138
12138
  this.#l(), n.hidden = !1;
12139
12139
  }
@@ -12212,7 +12212,7 @@ var Wr = class {
12212
12212
  verticalCornerRadius: 0
12213
12213
  }));
12214
12214
  }
12215
- }, Ti = /\r\n?|\n/g, Ei = class e extends H {
12215
+ }, Ti = /\r\n?|\n/g, Ei = class e extends U {
12216
12216
  #e = "";
12217
12217
  #t = `${this.id}-editor`;
12218
12218
  #n = null;
@@ -12223,8 +12223,8 @@ var Wr = class {
12223
12223
  static _defaultColor = null;
12224
12224
  static _defaultFontSize = 10;
12225
12225
  static get _keyboardManager() {
12226
- let t = e.prototype, n = (e) => e.isEmpty(), r = it.TRANSLATE_SMALL, i = it.TRANSLATE_BIG;
12227
- return A(this, "_keyboardManager", new nt([
12226
+ let t = e.prototype, n = (e) => e.isEmpty(), r = rt.TRANSLATE_SMALL, i = rt.TRANSLATE_BIG;
12227
+ return A(this, "_keyboardManager", new tt([
12228
12228
  [
12229
12229
  [
12230
12230
  "ctrl+s",
@@ -12309,10 +12309,10 @@ var Wr = class {
12309
12309
  super({
12310
12310
  ...t,
12311
12311
  name: "freeTextEditor"
12312
- }), this.color = t.color || e._defaultColor || H._defaultLineColor, this.#r = t.fontSize || e._defaultFontSize, this.annotationElementId || this._uiManager.a11yAlert(H._l10nAlert.freetext), this.canAddComment = !1;
12312
+ }), this.color = t.color || e._defaultColor || U._defaultLineColor, this.#r = t.fontSize || e._defaultFontSize, this.annotationElementId || this._uiManager.a11yAlert(U._l10nAlert.freetext), this.canAddComment = !1;
12313
12313
  }
12314
12314
  static initialize(e, t) {
12315
- H.initialize(e, t);
12315
+ U.initialize(e, t);
12316
12316
  let n = getComputedStyle(document.documentElement);
12317
12317
  this._internalPadding = parseFloat(n.getPropertyValue("--freetext-padding"));
12318
12318
  }
@@ -12333,7 +12333,7 @@ var Wr = class {
12333
12333
  }
12334
12334
  }
12335
12335
  static get defaultPropertiesToUpdate() {
12336
- return [[u.FREETEXT_SIZE, e._defaultFontSize], [u.FREETEXT_COLOR, e._defaultColor || H._defaultLineColor]];
12336
+ return [[u.FREETEXT_SIZE, e._defaultFontSize], [u.FREETEXT_COLOR, e._defaultColor || U._defaultLineColor]];
12337
12337
  }
12338
12338
  get propertiesToUpdate() {
12339
12339
  return [[u.FREETEXT_SIZE, this.#r], [u.FREETEXT_COLOR, this.color]];
@@ -12594,12 +12594,12 @@ var Wr = class {
12594
12594
  };
12595
12595
  }
12596
12596
  let a = await super.deserialize(t, n, r);
12597
- return a.#r = t.fontSize, a.color = F.makeHexColor(...t.color), a.#e = e.#d(t.value), a._initialData = i, t.comment && a.setCommentData(t), a;
12597
+ return a.#r = t.fontSize, a.color = I.makeHexColor(...t.color), a.#e = e.#d(t.value), a._initialData = i, t.comment && a.setCommentData(t), a;
12598
12598
  }
12599
12599
  serialize(e = !1) {
12600
12600
  if (this.isEmpty()) return null;
12601
12601
  if (this.deleted) return this.serializeDeleted();
12602
- let t = H._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.color), n = Object.assign(super.serialize(e), {
12602
+ let t = U._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.color), n = Object.assign(super.serialize(e), {
12603
12603
  color: t,
12604
12604
  fontSize: this.#r,
12605
12605
  value: this.#u()
@@ -12918,7 +12918,7 @@ var Wr = class {
12918
12918
  ], o = r, s = i, c = r, l = i, u = e ? Math.max : Math.min, d = /* @__PURE__ */ new Float32Array(4);
12919
12919
  for (let e = 6, f = n.length; e < f; e += 6) {
12920
12920
  let f = n[e + 4], p = n[e + 5];
12921
- isNaN(n[e]) ? (F.pointBoundingBox(f, p, a), s > p ? (o = f, s = p) : s === p && (o = u(o, f)), l < p ? (c = f, l = p) : l === p && (c = u(c, f))) : (d.set(t, 0), F.bezierBoundingBox(r, i, ...n.slice(e, e + 6), d), F.rectBoundingBox(...d, a), s > d[1] ? (o = d[0], s = d[1]) : s === d[1] && (o = u(o, d[0])), l < d[3] ? (c = d[2], l = d[3]) : l === d[3] && (c = u(c, d[2]))), r = f, i = p;
12921
+ isNaN(n[e]) ? (I.pointBoundingBox(f, p, a), s > p ? (o = f, s = p) : s === p && (o = u(o, f)), l < p ? (c = f, l = p) : l === p && (c = u(c, f))) : (d.set(t, 0), I.bezierBoundingBox(r, i, ...n.slice(e, e + 6), d), I.rectBoundingBox(...d, a), s > d[1] ? (o = d[0], s = d[1]) : s === d[1] && (o = u(o, d[0])), l < d[3] ? (c = d[2], l = d[3]) : l === d[3] && (c = u(c, d[2]))), r = f, i = p;
12922
12922
  }
12923
12923
  let f = this.#t;
12924
12924
  f[0] = a[0] - this.#n, f[1] = a[1] - this.#n, f[2] = a[2] - a[0] + 2 * this.#n, f[3] = a[3] - a[1] + 2 * this.#n, this.firstPoint = [o, s], this.lastPoint = [c, l];
@@ -12960,7 +12960,7 @@ var Wr = class {
12960
12960
  u,
12961
12961
  !1
12962
12962
  ];
12963
- this.#r.push(d, f), F.rectBoundingBox(e, l, c, u, a);
12963
+ this.#r.push(d, f), I.rectBoundingBox(e, l, c, u, a);
12964
12964
  }
12965
12965
  let s = a[2] - a[0] + 2 * r, c = a[3] - a[1] + 2 * r, l = a[0] - r, u = a[1] - r, d = i ? -Infinity : Infinity, f = Infinity, p = this.#r.at(i ? -1 : -2), m = [p[0], p[2]];
12966
12966
  for (let e of this.#r) {
@@ -13115,7 +13115,7 @@ var Wr = class {
13115
13115
  newOutliner(e, t, n, r, i, a = 0) {
13116
13116
  return new ji(e, t, n, r, i, a);
13117
13117
  }
13118
- }, Ni = class e extends H {
13118
+ }, Ni = class e extends U {
13119
13119
  #e = null;
13120
13120
  #t = 0;
13121
13121
  #n;
@@ -13144,7 +13144,7 @@ var Wr = class {
13144
13144
  static _freeHighlightClipId = "";
13145
13145
  static get _keyboardManager() {
13146
13146
  let t = e.prototype;
13147
- return A(this, "_keyboardManager", new nt([
13147
+ return A(this, "_keyboardManager", new tt([
13148
13148
  [
13149
13149
  ["ArrowLeft"],
13150
13150
  t._moveCaret,
@@ -13171,7 +13171,7 @@ var Wr = class {
13171
13171
  super({
13172
13172
  ...t,
13173
13173
  name: "highlightEditor"
13174
- }), this.color = t.color || e._defaultColor, this.#g = t.thickness || e._defaultThickness, this.opacity = t.opacity || e._defaultOpacity, this.#n = t.boxes || null, this.#_ = t.methodOfCreation || "", this.#h = t.text || "", this._isDraggable = !1, this.defaultL10nId = "pdfjs-editor-highlight-editor", t.highlightId > -1 ? (this.#d = !0, this.#y(t), this.#w()) : this.#n && (this.#e = t.anchorNode, this.#t = t.anchorOffset, this.#o = t.focusNode, this.#s = t.focusOffset, this.#v(), this.#w(), this.rotate(this.rotation)), this.annotationElementId || this._uiManager.a11yAlert(H._l10nAlert.highlight);
13174
+ }), this.color = t.color || e._defaultColor, this.#g = t.thickness || e._defaultThickness, this.opacity = t.opacity || e._defaultOpacity, this.#n = t.boxes || null, this.#_ = t.methodOfCreation || "", this.#h = t.text || "", this._isDraggable = !1, this.defaultL10nId = "pdfjs-editor-highlight-editor", t.highlightId > -1 ? (this.#d = !0, this.#y(t), this.#w()) : this.#n && (this.#e = t.anchorNode, this.#t = t.anchorOffset, this.#o = t.focusNode, this.#s = t.focusOffset, this.#v(), this.#w(), this.rotate(this.rotation)), this.annotationElementId || this._uiManager.a11yAlert(U._l10nAlert.highlight);
13175
13175
  }
13176
13176
  get telemetryInitialData() {
13177
13177
  return {
@@ -13248,7 +13248,7 @@ var Wr = class {
13248
13248
  this.#p = [(l[0] - i) / o, (l[1] - a) / s];
13249
13249
  }
13250
13250
  static initialize(t, n) {
13251
- H.initialize(t, n), e._defaultColor ||= n.highlightColors?.values().next().value || "#fff066";
13251
+ U.initialize(t, n), e._defaultColor ||= n.highlightColors?.values().next().value || "#fff066";
13252
13252
  }
13253
13253
  static updateDefaultParams(t, n) {
13254
13254
  switch (t) {
@@ -13430,7 +13430,7 @@ var Wr = class {
13430
13430
  let e = super.render();
13431
13431
  this.#h && (e.setAttribute("aria-label", this.#h), e.setAttribute("role", "mark")), this.#d ? e.classList.add("free") : this.div.addEventListener("keydown", this.#E.bind(this), { signal: this._uiManager._signal });
13432
13432
  let t = this.#c = document.createElement("div");
13433
- return e.append(t), t.setAttribute("aria-hidden", "true"), t.className = "internal", t.style.clipPath = this.#r, this.setDims(), Qe(this, this.#c, ["pointerover", "pointerleave"]), this.enableEditing(), e;
13433
+ return e.append(t), t.setAttribute("aria-hidden", "true"), t.className = "internal", t.style.clipPath = this.#r, this.setDims(), Ze(this, this.#c, ["pointerover", "pointerleave"]), this.enableEditing(), e;
13434
13434
  }
13435
13435
  pointerover() {
13436
13436
  this.isSelected || this.parent?.drawLayer.updateProperties(this.#m, { rootClass: { hovered: !0 } });
@@ -13490,11 +13490,11 @@ var Wr = class {
13490
13490
  let { x: a, y: o, width: s, height: c } = n.getBoundingClientRect(), l = new AbortController(), u = e.combinedSignal(l), d = (t) => {
13491
13491
  l.abort(), this.#M(e, t);
13492
13492
  };
13493
- window.addEventListener("blur", d, { signal: u }), window.addEventListener("pointerup", d, { signal: u }), window.addEventListener("pointerdown", R, {
13493
+ window.addEventListener("blur", d, { signal: u }), window.addEventListener("pointerup", d, { signal: u }), window.addEventListener("pointerdown", z, {
13494
13494
  capture: !0,
13495
13495
  passive: !1,
13496
13496
  signal: u
13497
- }), window.addEventListener("contextmenu", L, { signal: u }), n.addEventListener("pointermove", this.#j.bind(this, e), { signal: u }), this._freeHighlight = new ji({
13497
+ }), window.addEventListener("contextmenu", R, { signal: u }), n.addEventListener("pointermove", this.#j.bind(this, e), { signal: u }), this._freeHighlight = new ji({
13498
13498
  x: r,
13499
13499
  y: i
13500
13500
  }, [
@@ -13576,7 +13576,7 @@ var Wr = class {
13576
13576
  };
13577
13577
  }
13578
13578
  let { color: i, quadPoints: a, inkLists: o, outlines: s, opacity: c } = e, u = await super.deserialize(e, t, n);
13579
- u.color = F.makeHexColor(...i), u.opacity = c || 1, o && (u.#g = e.thickness), u._initialData = r, e.comment && u.setCommentData(e);
13579
+ u.color = I.makeHexColor(...i), u.opacity = c || 1, o && (u.#g = e.thickness), u._initialData = r, e.comment && u.setCommentData(e);
13580
13580
  let [d, f] = u.pageDimensions, [p, m] = u.pageTranslation;
13581
13581
  if (a) {
13582
13582
  let e = u.#n = [];
@@ -13628,7 +13628,7 @@ var Wr = class {
13628
13628
  serialize(e = !1) {
13629
13629
  if (this.isEmpty() || e) return null;
13630
13630
  if (this.deleted) return this.serializeDeleted();
13631
- let t = H._colorManager.convert(this._uiManager.getNonHCMColor(this.color)), n = super.serialize(e);
13631
+ let t = U._colorManager.convert(this._uiManager.getNonHCMColor(this.color)), n = super.serialize(e);
13632
13632
  return Object.assign(n, {
13633
13633
  color: t,
13634
13634
  opacity: this.opacity,
@@ -13674,7 +13674,7 @@ var Wr = class {
13674
13674
  clone() {
13675
13675
  T("Not implemented");
13676
13676
  }
13677
- }, Fi = class e extends H {
13677
+ }, Fi = class e extends U {
13678
13678
  #e = null;
13679
13679
  #t;
13680
13680
  _colorPicker = null;
@@ -13698,7 +13698,7 @@ var Wr = class {
13698
13698
  e.drawOutlines && (this.#a(e), this.#c());
13699
13699
  }
13700
13700
  #a({ drawOutlines: e, drawId: t, drawingOptions: n }) {
13701
- this.#e = e, this._drawingOptions ||= n, this.annotationElementId || this._uiManager.a11yAlert(H._l10nAlert[this.editorType]), t >= 0 ? (this._drawId = t, this.parent.drawLayer.finalizeDraw(t, e.defaultProperties)) : this._drawId = this.#o(e, this.parent), this.#d(e.box);
13701
+ this.#e = e, this._drawingOptions ||= n, this.annotationElementId || this._uiManager.a11yAlert(U._l10nAlert[this.editorType]), t >= 0 ? (this._drawId = t, this.parent.drawLayer.finalizeDraw(t, e.defaultProperties)) : this._drawId = this.#o(e, this.parent), this.#d(e.box);
13702
13702
  }
13703
13703
  #o(t, n) {
13704
13704
  let { id: r } = n.drawLayer.draw(e._mergeSVGProperties(this._drawingOptions.toSVGProperties(), t.defaultSVGProperties), !1, !1);
@@ -14010,20 +14010,20 @@ var Wr = class {
14010
14010
  }
14011
14011
  static startDrawing(t, n, r, i) {
14012
14012
  let { target: a, offsetX: o, offsetY: s, pointerId: c, pointerType: l } = i;
14013
- if (V.isInitializedAndDifferentPointerType(l)) return;
14013
+ if (H.isInitializedAndDifferentPointerType(l)) return;
14014
14014
  let { viewport: { rotation: u } } = t, { width: d, height: f } = a.getBoundingClientRect(), p = e.#r = new AbortController(), m = t.combinedSignal(p);
14015
- if (V.setPointer(l, c), window.addEventListener("pointerup", (e) => {
14016
- V.isSamePointerIdOrRemove(e.pointerId) && this._endDraw(e);
14015
+ if (H.setPointer(l, c), window.addEventListener("pointerup", (e) => {
14016
+ H.isSamePointerIdOrRemove(e.pointerId) && this._endDraw(e);
14017
14017
  }, { signal: m }), window.addEventListener("pointercancel", (e) => {
14018
- V.isSamePointerIdOrRemove(e.pointerId) && this._currentParent.endDrawingSession();
14018
+ H.isSamePointerIdOrRemove(e.pointerId) && this._currentParent.endDrawingSession();
14019
14019
  }, { signal: m }), window.addEventListener("pointerdown", (t) => {
14020
- V.isSamePointerType(t.pointerType) && (V.initializeAndAddPointerId(t.pointerId), e.#n.isCancellable() && (e.#n.removeLastElement(), e.#n.isEmpty() ? this._currentParent.endDrawingSession(!0) : this._endDraw(null)));
14020
+ H.isSamePointerType(t.pointerType) && (H.initializeAndAddPointerId(t.pointerId), e.#n.isCancellable() && (e.#n.removeLastElement(), e.#n.isEmpty() ? this._currentParent.endDrawingSession(!0) : this._endDraw(null)));
14021
14021
  }, {
14022
14022
  capture: !0,
14023
14023
  passive: !1,
14024
14024
  signal: m
14025
- }), window.addEventListener("contextmenu", L, { signal: m }), a.addEventListener("pointermove", this._drawMove.bind(this), { signal: m }), a.addEventListener("touchmove", (e) => {
14026
- V.isSameTimeStamp(e.timeStamp) && R(e);
14025
+ }), window.addEventListener("contextmenu", R, { signal: m }), a.addEventListener("pointermove", this._drawMove.bind(this), { signal: m }), a.addEventListener("touchmove", (e) => {
14026
+ H.isSameTimeStamp(e.timeStamp) && z(e);
14027
14027
  }, { signal: m }), t.toggleDrawing(), n._editorUndoBar?.hide(), e.#n) {
14028
14028
  t.drawLayer.updateProperties(this._currentDrawId, e.#n.startNew(o, s, d, f, u));
14029
14029
  return;
@@ -14031,18 +14031,18 @@ var Wr = class {
14031
14031
  n.updateUIForDefaultProperties(this), e.#n = this.createDrawerInstance(o, s, d, f, u), e.#i = this.getDefaultDrawingOptions(), this._currentParent = t, {id: this._currentDrawId} = t.drawLayer.draw(this._mergeSVGProperties(e.#i.toSVGProperties(), e.#n.defaultSVGProperties), !0, !1);
14032
14032
  }
14033
14033
  static _drawMove(t) {
14034
- if (V.isSameTimeStamp(t.timeStamp), !e.#n) return;
14034
+ if (H.isSameTimeStamp(t.timeStamp), !e.#n) return;
14035
14035
  let { offsetX: n, offsetY: r, pointerId: i } = t;
14036
- if (V.isSamePointerId(i)) {
14037
- if (V.isUsingMultiplePointers()) {
14036
+ if (H.isSamePointerId(i)) {
14037
+ if (H.isUsingMultiplePointers()) {
14038
14038
  this._endDraw(t);
14039
14039
  return;
14040
14040
  }
14041
- this._currentParent.drawLayer.updateProperties(this._currentDrawId, e.#n.add(n, r)), V.setTimeStamp(t.timeStamp), R(t);
14041
+ this._currentParent.drawLayer.updateProperties(this._currentDrawId, e.#n.add(n, r)), H.setTimeStamp(t.timeStamp), z(t);
14042
14042
  }
14043
14043
  }
14044
14044
  static _cleanup(t) {
14045
- t && (this._currentDrawId = -1, this._currentParent = null, e.#n = null, e.#i = null, V.clearTimeStamp()), e.#r && (e.#r.abort(), e.#r = null, V.clearPointerIds());
14045
+ t && (this._currentDrawId = -1, this._currentParent = null, e.#n = null, e.#i = null, H.clearTimeStamp()), e.#r && (e.#r.abort(), e.#r = null, H.clearPointerIds());
14046
14046
  }
14047
14047
  static _endDraw(t) {
14048
14048
  let n = this._currentParent;
@@ -14388,17 +14388,17 @@ var Wr = class {
14388
14388
  let e = this.#e = n.slice();
14389
14389
  for (let { line: t } of this.#r) {
14390
14390
  if (t.length <= 12) {
14391
- for (let n = 4, r = t.length; n < r; n += 6) F.pointBoundingBox(t[n], t[n + 1], e);
14391
+ for (let n = 4, r = t.length; n < r; n += 6) I.pointBoundingBox(t[n], t[n + 1], e);
14392
14392
  continue;
14393
14393
  }
14394
14394
  let n = t[4], r = t[5];
14395
14395
  for (let i = 6, a = t.length; i < a; i += 6) {
14396
14396
  let [a, o, s, c, l, u] = t.subarray(i, i + 6);
14397
- F.bezierBoundingBox(n, r, a, o, s, c, l, u, e), n = l, r = u;
14397
+ I.bezierBoundingBox(n, r, a, o, s, c, l, u, e), n = l, r = u;
14398
14398
  }
14399
14399
  }
14400
14400
  let [t, r] = this.#l();
14401
- e[0] = I(e[0] - t, 0, 1), e[1] = I(e[1] - r, 0, 1), e[2] = I(e[2] + t, 0, 1), e[3] = I(e[3] + r, 0, 1), e[2] -= e[0], e[3] -= e[1];
14401
+ e[0] = L(e[0] - t, 0, 1), e[1] = L(e[1] - r, 0, 1), e[2] = L(e[2] + t, 0, 1), e[3] = L(e[3] + r, 0, 1), e[2] -= e[0], e[3] -= e[1];
14402
14402
  }
14403
14403
  get box() {
14404
14404
  return this.#e;
@@ -14521,7 +14521,7 @@ var Wr = class {
14521
14521
  constructor(e) {
14522
14522
  super(), this._viewParameters = e, super.updateProperties({
14523
14523
  fill: "none",
14524
- stroke: H._defaultLineColor,
14524
+ stroke: U._defaultLineColor,
14525
14525
  "stroke-opacity": 1,
14526
14526
  "stroke-width": 1,
14527
14527
  "stroke-linecap": "round",
@@ -14547,7 +14547,7 @@ var Wr = class {
14547
14547
  }), this._willKeepAspectRatio = !0, this.defaultL10nId = "pdfjs-editor-ink-editor";
14548
14548
  }
14549
14549
  static initialize(e, t) {
14550
- H.initialize(e, t), this._defaultDrawingOptions = new Ri(t.viewParameters);
14550
+ U.initialize(e, t), this._defaultDrawingOptions = new Ri(t.viewParameters);
14551
14551
  }
14552
14552
  static getDefaultDrawingOptions(e) {
14553
14553
  let t = this._defaultDrawingOptions.clone();
@@ -14640,7 +14640,7 @@ var Wr = class {
14640
14640
  }
14641
14641
  createDrawingOptions({ color: t, thickness: n, opacity: r }) {
14642
14642
  this._drawingOptions = e.getDefaultDrawingOptions({
14643
- stroke: F.makeHexColor(...t),
14643
+ stroke: I.makeHexColor(...t),
14644
14644
  "stroke-width": n,
14645
14645
  "stroke-opacity": r
14646
14646
  });
@@ -14649,7 +14649,7 @@ var Wr = class {
14649
14649
  if (this.isEmpty()) return null;
14650
14650
  if (this.deleted) return this.serializeDeleted();
14651
14651
  let { lines: t, points: n } = this.serializeDraw(e), { _drawingOptions: { stroke: r, "stroke-opacity": i, "stroke-width": a } } = this, o = Object.assign(super.serialize(e), {
14652
- color: H._colorManager.convert(r),
14652
+ color: U._colorManager.convert(r),
14653
14653
  opacity: i,
14654
14654
  thickness: a,
14655
14655
  paths: {
@@ -15023,7 +15023,7 @@ var Wr = class {
15023
15023
  }, Wi = class e extends Pi {
15024
15024
  constructor() {
15025
15025
  super(), super.updateProperties({
15026
- fill: H._defaultLineColor,
15026
+ fill: U._defaultLineColor,
15027
15027
  "stroke-width": 0
15028
15028
  });
15029
15029
  }
@@ -15034,7 +15034,7 @@ var Wr = class {
15034
15034
  }, Gi = class e extends Ri {
15035
15035
  constructor(e) {
15036
15036
  super(e), super.updateProperties({
15037
- stroke: H._defaultLineColor,
15037
+ stroke: U._defaultLineColor,
15038
15038
  "stroke-width": 1
15039
15039
  });
15040
15040
  }
@@ -15058,7 +15058,7 @@ var Wr = class {
15058
15058
  }), this._willKeepAspectRatio = !0, this.#n = e.signatureData || null, this.#t = null, this.defaultL10nId = "pdfjs-editor-signature-editor1";
15059
15059
  }
15060
15060
  static initialize(e, t) {
15061
- H.initialize(e, t), this._defaultDrawingOptions = new Wi(), this._defaultDrawnSignatureOptions = new Gi(t.viewParameters);
15061
+ U.initialize(e, t), this._defaultDrawingOptions = new Wi(), this._defaultDrawnSignatureOptions = new Gi(t.viewParameters);
15062
15062
  }
15063
15063
  static getDefaultDrawingOptions(e) {
15064
15064
  let t = this._defaultDrawingOptions.clone();
@@ -15215,7 +15215,7 @@ var Wr = class {
15215
15215
  let r = await super.deserialize(e, t, n);
15216
15216
  return r.#e = e.areContours, r.description = e.accessibilityData?.alt || "", r.#r = e.uuid, r;
15217
15217
  }
15218
- }, qi = class extends H {
15218
+ }, qi = class extends U {
15219
15219
  #e = null;
15220
15220
  #t = null;
15221
15221
  #n = null;
@@ -15236,10 +15236,10 @@ var Wr = class {
15236
15236
  }), this.#r = e.bitmapUrl, this.#i = e.bitmapFile, this.defaultL10nId = "pdfjs-editor-stamp-editor";
15237
15237
  }
15238
15238
  static initialize(e, t) {
15239
- H.initialize(e, t);
15239
+ U.initialize(e, t);
15240
15240
  }
15241
15241
  static isHandlingMimeForPasting(e) {
15242
- return Le.includes(e);
15242
+ return Ie.includes(e);
15243
15243
  }
15244
15244
  static paste(e, t) {
15245
15245
  t.pasteEditor({ mode: l.STAMP }, { bitmapFile: e.getAsFile() });
@@ -15330,7 +15330,7 @@ var Wr = class {
15330
15330
  return;
15331
15331
  }
15332
15332
  let e = document.createElement("input");
15333
- e.type = "file", e.accept = Le.join(",");
15333
+ e.type = "file", e.accept = Ie.join(",");
15334
15334
  let t = this._uiManager._signal;
15335
15335
  this.#n = new Promise((n) => {
15336
15336
  e.addEventListener("change", async () => {
@@ -15397,11 +15397,11 @@ var Wr = class {
15397
15397
  }
15398
15398
  this._uiManager.enableWaiting(!1);
15399
15399
  let o = this.#o = document.createElement("canvas");
15400
- o.setAttribute("role", "img"), this.addContainer(o), this.width = t / r, this.height = n / i, this.setDims(), this._initialOptions?.isCentered ? this.center() : this.fixAndSetPosition(), this._initialOptions = null, (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) && (e.hidden = !1), this.#g(), this.#u ||= (this.parent.addUndoableEditor(this), !0), this._reportTelemetry({ action: "inserted_image" }), this.#a && this.div.setAttribute("aria-description", this.#a), this.annotationElementId || this._uiManager.a11yAlert(H._l10nAlert.stamp);
15400
+ o.setAttribute("role", "img"), this.addContainer(o), this.width = t / r, this.height = n / i, this.setDims(), this._initialOptions?.isCentered ? this.center() : this.fixAndSetPosition(), this._initialOptions = null, (!this._uiManager.useNewAltTextWhenAddingImage || !this._uiManager.useNewAltTextFlow || this.annotationElementId) && (e.hidden = !1), this.#g(), this.#u ||= (this.parent.addUndoableEditor(this), !0), this._reportTelemetry({ action: "inserted_image" }), this.#a && this.div.setAttribute("aria-description", this.#a), this.annotationElementId || this._uiManager.a11yAlert(U._l10nAlert.stamp);
15401
15401
  }
15402
15402
  copyCanvas(e, t, n = !1) {
15403
15403
  e ||= 224;
15404
- let { width: r, height: i } = this.#e, a = new Ie(), o = this.#e, s = r, c = i, l = null;
15404
+ let { width: r, height: i } = this.#e, a = new Fe(), o = this.#e, s = r, c = i, l = null;
15405
15405
  if (t) {
15406
15406
  if (r > t || i > t) {
15407
15407
  let e = Math.min(t / r, t / i);
@@ -15413,7 +15413,7 @@ var Wr = class {
15413
15413
  let u = l.getContext("2d");
15414
15414
  u.filter = this._uiManager.hcmFilter;
15415
15415
  let d = "white", f = "#cfcfd8";
15416
- this._uiManager.hcmFilter === "none" ? Re.isDarkMode && (d = "#8f8f9d", f = "#42414d") : f = "black";
15416
+ this._uiManager.hcmFilter === "none" ? Le.isDarkMode && (d = "#8f8f9d", f = "#42414d") : f = "black";
15417
15417
  let p = 15 * a.sx, m = 15 * a.sy, h = new OffscreenCanvas(p * 2, m * 2), g = h.getContext("2d");
15418
15418
  g.fillStyle = d, g.fillRect(0, 0, p * 2, m * 2), g.fillStyle = f, g.fillRect(0, 0, p, m), g.fillRect(p, m, p, m), u.fillStyle = u.createPattern(h, "repeat"), u.fillRect(0, 0, e, n), u.drawImage(o, 0, 0, o.width, o.height, 0, 0, e, n);
15419
15419
  }
@@ -15450,7 +15450,7 @@ var Wr = class {
15450
15450
  return o;
15451
15451
  }
15452
15452
  #g() {
15453
- let [e, t] = this.parentDimensions, { width: n, height: r } = this, i = new Ie(), a = Math.ceil(n * e * i.sx), o = Math.ceil(r * t * i.sy), s = this.#o;
15453
+ let [e, t] = this.parentDimensions, { width: n, height: r } = this, i = new Fe(), a = Math.ceil(n * e * i.sx), o = Math.ceil(r * t * i.sy), s = this.#o;
15454
15454
  if (!s || s.width === a && s.height === o) return;
15455
15455
  s.width = a, s.height = o;
15456
15456
  let c = this.#l ? this.#e : this.#h(a, o), l = s.getContext("2d");
@@ -15466,7 +15466,7 @@ var Wr = class {
15466
15466
  return {width: e.width, height: e.height} = this.#e, e.getContext("2d").drawImage(this.#e, 0, 0), e.toDataURL();
15467
15467
  }
15468
15468
  if (this.#l) {
15469
- let [e, t] = this.pageDimensions, n = Math.round(this.width * e * Se.PDF_TO_CSS_UNITS), r = Math.round(this.height * t * Se.PDF_TO_CSS_UNITS), i = new OffscreenCanvas(n, r);
15469
+ let [e, t] = this.pageDimensions, n = Math.round(this.width * e * xe.PDF_TO_CSS_UNITS), r = Math.round(this.height * t * xe.PDF_TO_CSS_UNITS), i = new OffscreenCanvas(n, r);
15470
15470
  return i.getContext("2d").drawImage(this.#e, 0, 0, this.#e.width, this.#e.height, 0, 0, n, r), i.transferToImageBitmap();
15471
15471
  }
15472
15472
  return structuredClone(this.#e);
@@ -15672,7 +15672,7 @@ var Wr = class {
15672
15672
  }
15673
15673
  if (!o) return;
15674
15674
  let l = this.#a.get(o);
15675
- l?.annotationElementId === null && (R(e), l.dblclick(e));
15675
+ l?.annotationElementId === null && (z(e), l.dblclick(e));
15676
15676
  }, {
15677
15677
  signal: e,
15678
15678
  capture: !0
@@ -15731,7 +15731,7 @@ var Wr = class {
15731
15731
  this.#h.unselectAll();
15732
15732
  let { target: t } = e;
15733
15733
  if (t === this.#d.div || (t.getAttribute("role") === "img" || t.classList.contains("endOfContent") || t.classList.contains("textLayerImages") || t.classList.contains("textLayerImagePlaceholder")) && this.#d.div.contains(t)) {
15734
- let { isMac: t } = P.platform;
15734
+ let { isMac: t } = F.platform;
15735
15735
  if (e.button !== 0 || e.ctrlKey && t) return;
15736
15736
  this.#h.showAllEditors("highlight", !0, !0), this.#d.div.classList.add("free"), this.toggleDrawing(), Ni.startHighlighting(this, this.#h.direction === "ltr", {
15737
15737
  target: this.#d.div,
@@ -15768,7 +15768,7 @@ var Wr = class {
15768
15768
  this.detach(e), this.#h.removeEditor(e), e.div.remove(), e.isAttachedToDOM = !1;
15769
15769
  }
15770
15770
  changeParent(e) {
15771
- e.parent !== this && (e.parent && e.annotationElementId && (this.#h.addDeletedAnnotationElement(e), H.deleteAnnotationElement(e), e.annotationElementId = null), this.attach(e), e.parent?.detach(e), e.setParent(this), e.div && e.isAttachedToDOM && (e.div.remove(), this.div.append(e.div)));
15771
+ e.parent !== this && (e.parent && e.annotationElementId && (this.#h.addDeletedAnnotationElement(e), U.deleteAnnotationElement(e), e.annotationElementId = null), this.attach(e), e.parent?.detach(e), e.setParent(this), e.div && e.isAttachedToDOM && (e.div.remove(), this.div.append(e.div)));
15772
15772
  }
15773
15773
  add(e) {
15774
15774
  if (!(e.parent === this && e.isAttachedToDOM)) {
@@ -15871,7 +15871,7 @@ var Wr = class {
15871
15871
  this.#h.unselect(e);
15872
15872
  }
15873
15873
  pointerup(e) {
15874
- let { isMac: t } = P.platform;
15874
+ let { isMac: t } = F.platform;
15875
15875
  if (e.button !== 0 || e.ctrlKey && t || e.target !== this.div || !this.#o || (this.#o = !1, this.#y?.isDrawer && this.#y.supportMultipleDrawings)) return;
15876
15876
  if (!this.#t) {
15877
15877
  this.#t = !0;
@@ -15889,7 +15889,7 @@ var Wr = class {
15889
15889
  this.#o = !1;
15890
15890
  return;
15891
15891
  }
15892
- let { isMac: t } = P.platform;
15892
+ let { isMac: t } = F.platform;
15893
15893
  if (e.button !== 0 || e.ctrlKey && t || e.target !== this.div) return;
15894
15894
  if (this.#o = !0, this.#y?.isDrawer) {
15895
15895
  this.startDrawingSession(e);
@@ -15941,14 +15941,14 @@ var Wr = class {
15941
15941
  for (let e of this.#a.values()) e.isEmpty() && e.remove();
15942
15942
  }
15943
15943
  async render({ viewport: e }) {
15944
- this.viewport = e, Fe(this.div, e);
15944
+ this.viewport = e, Pe(this.div, e);
15945
15945
  for (let e of this.#h.getEditors(this.pageIndex)) this.add(e), e.rebuild();
15946
15946
  await this.#h.findClonesForPage(this), this.div.hidden = this.isEmpty, this.updateMode();
15947
15947
  }
15948
15948
  update({ viewport: e }) {
15949
15949
  this.#h.commitOrRemove(), this.#S();
15950
15950
  let t = this.viewport.rotation, n = e.rotation;
15951
- if (this.viewport = e, Fe(this.div, { rotation: n }), t !== n) for (let e of this.#a.values()) e.rotate(n);
15951
+ if (this.viewport = e, Pe(this.div, { rotation: n }), t !== n) for (let e of this.#a.values()) e.rotate(n);
15952
15952
  }
15953
15953
  get pageDimensions() {
15954
15954
  let { pageWidth: e, pageHeight: t } = this.viewport.rawDims;
@@ -16262,7 +16262,7 @@ var ta = class e {
16262
16262
  (r - t) * this.#a / s,
16263
16263
  0,
16264
16264
  0
16265
- ], l = F.inverseTransform(c), u = document.createElement("canvas");
16265
+ ], l = I.inverseTransform(c), u = document.createElement("canvas");
16266
16266
  return u.className = "textLayerImagePlaceholder", u.width = 0, u.height = 0, Object.assign(u.style, {
16267
16267
  opacity: 0,
16268
16268
  position: "absolute",
@@ -16282,68 +16282,68 @@ var ta = class e {
16282
16282
  }
16283
16283
  };
16284
16284
  globalThis._pdfjsTestingUtils = { HighlightOutliner: ki }, globalThis.pdfjsLib = {
16285
- AbortException: N,
16285
+ AbortException: P,
16286
16286
  AnnotationEditorLayer: Ji,
16287
16287
  AnnotationEditorParamsType: u,
16288
16288
  AnnotationEditorType: l,
16289
- AnnotationEditorUIManager: it,
16289
+ AnnotationEditorUIManager: rt,
16290
16290
  AnnotationLayer: wi,
16291
16291
  AnnotationMode: o,
16292
16292
  AnnotationType: m,
16293
- applyOpacity: Be,
16293
+ applyOpacity: ze,
16294
16294
  build: zr,
16295
16295
  ColorPicker: Br,
16296
16296
  createValidAbsoluteUrl: O,
16297
- CSSConstants: ze,
16297
+ CSSConstants: Re,
16298
16298
  DOMSVGFactory: Kr,
16299
16299
  DrawLayer: $i,
16300
- FeatureTest: P,
16301
- fetchData: Ce,
16302
- findContrastColor: Ke,
16300
+ FeatureTest: F,
16301
+ fetchData: Se,
16302
+ findContrastColor: Ge,
16303
16303
  getDocument: kr,
16304
- getFilenameFromUrl: De,
16305
- getPdfFilenameFromUrl: Oe,
16306
- getRGB: Ne,
16307
- getRGBA: Me,
16308
- getUuid: de,
16304
+ getFilenameFromUrl: Ee,
16305
+ getPdfFilenameFromUrl: De,
16306
+ getRGB: Me,
16307
+ getRGBA: je,
16308
+ getUuid: ue,
16309
16309
  GlobalWorkerOptions: gr,
16310
16310
  ImageKind: p,
16311
- InvalidPDFException: re,
16312
- isDataScheme: Te,
16313
- isPdfFile: Ee,
16311
+ InvalidPDFException: ne,
16312
+ isDataScheme: we,
16313
+ isPdfFile: Te,
16314
16314
  isValidExplicitDest: Bt,
16315
- makeArr: pe,
16316
- makeMap: me,
16317
- makeObj: he,
16318
- makeSet: ge,
16319
- MathClamp: I,
16320
- noContextMenu: L,
16321
- normalizeUnicode: ue,
16315
+ makeArr: fe,
16316
+ makeMap: pe,
16317
+ makeObj: me,
16318
+ makeSet: he,
16319
+ MathClamp: L,
16320
+ noContextMenu: R,
16321
+ normalizeUnicode: le,
16322
16322
  OPS: _,
16323
- OutputScale: Ie,
16324
- PasswordException: te,
16323
+ OutputScale: Fe,
16324
+ PasswordException: M,
16325
16325
  PasswordResponses: y,
16326
16326
  PDFDataRangeTransport: jr,
16327
- PDFDateString: je,
16327
+ PDFDateString: Ae,
16328
16328
  PDFWorker: Pr,
16329
16329
  PermissionFlag: d,
16330
- PixelsPerInch: Se,
16331
- RenderingCancelledException: we,
16332
- renderRichText: qe,
16333
- ResponseException: M,
16334
- setLayerDimensions: Fe,
16330
+ PixelsPerInch: xe,
16331
+ RenderingCancelledException: Ce,
16332
+ renderRichText: Ke,
16333
+ ResponseException: N,
16334
+ setLayerDimensions: Pe,
16335
16335
  shadow: A,
16336
16336
  SignatureExtractor: Ui,
16337
- stopEvent: R,
16338
- SupportedImageMimeTypes: Le,
16337
+ stopEvent: z,
16338
+ SupportedImageMimeTypes: Ie,
16339
16339
  TextLayer: Dr,
16340
16340
  TextLayerImages: ta,
16341
- TouchManager: st,
16341
+ TouchManager: ot,
16342
16342
  updateUrlHash: ee,
16343
- Util: F,
16343
+ Util: I,
16344
16344
  VerbosityLevel: g,
16345
16345
  version: Rr,
16346
- XfaLayer: xe
16346
+ XfaLayer: be
16347
16347
  };
16348
16348
  //#endregion
16349
- export { gr as GlobalWorkerOptions, Dr as TextLayer, kr as getDocument };
16349
+ export { P as AbortException, Ji as AnnotationEditorLayer, u as AnnotationEditorParamsType, l as AnnotationEditorType, rt as AnnotationEditorUIManager, wi as AnnotationLayer, o as AnnotationMode, m as AnnotationType, Re as CSSConstants, Br as ColorPicker, Kr as DOMSVGFactory, $i as DrawLayer, F as FeatureTest, gr as GlobalWorkerOptions, p as ImageKind, ne as InvalidPDFException, L as MathClamp, _ as OPS, Fe as OutputScale, jr as PDFDataRangeTransport, Ae as PDFDateString, Pr as PDFWorker, M as PasswordException, y as PasswordResponses, d as PermissionFlag, xe as PixelsPerInch, Ce as RenderingCancelledException, N as ResponseException, Ui as SignatureExtractor, Ie as SupportedImageMimeTypes, Dr as TextLayer, ta as TextLayerImages, ot as TouchManager, I as Util, g as VerbosityLevel, be as XfaLayer, ze as applyOpacity, zr as build, O as createValidAbsoluteUrl, Se as fetchData, Ge as findContrastColor, kr as getDocument, Ee as getFilenameFromUrl, De as getPdfFilenameFromUrl, Me as getRGB, je as getRGBA, ue as getUuid, we as isDataScheme, Te as isPdfFile, Bt as isValidExplicitDest, fe as makeArr, pe as makeMap, me as makeObj, he as makeSet, R as noContextMenu, le as normalizeUnicode, Ke as renderRichText, Pe as setLayerDimensions, A as shadow, z as stopEvent, ee as updateUrlHash, Rr as version };