@component-hook/pdf-canvas 1.0.5-alpha.4 → 1.1.0-alpha.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.
@@ -8083,123 +8083,6 @@ class ku extends he {
8083
8083
  }
8084
8084
  }
8085
8085
  E(ku, "type", "Vibrance"), E(ku, "defaults", { vibrance: 0 }), E(ku, "uniformLocations", ["uVibrance"]), z.setClass(ku);
8086
- const dS = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='20'%20cy='20'%20r='10.75'%20stroke='currentColor'%20stroke-width='2.5'/%3e%3cpath%20d='M16%2024L23.7782%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M24%2024L16.2218%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e";
8087
- function fS(o) {
8088
- return new URL((/* @__PURE__ */ Object.assign({ "../assets/close.svg": dS }))[`../assets/${o}`], import.meta.url).href;
8089
- }
8090
- function gS(o) {
8091
- return new Promise((t, e) => {
8092
- const s = window.URL.createObjectURL(o), i = new Image();
8093
- i.src = s, i.addEventListener("load", async () => {
8094
- window.URL.revokeObjectURL(s), t(await pS(i));
8095
- }), i.addEventListener("error", (n) => {
8096
- window.URL.revokeObjectURL(s), e(n);
8097
- });
8098
- });
8099
- }
8100
- function pS(o) {
8101
- return new Promise((t) => {
8102
- const e = document.createElement("canvas"), s = e.getContext("2d"), { naturalWidth: i, naturalHeight: n } = o;
8103
- e.width = i, e.height = n, s == null || s.drawImage(o, 0, 0, i, n), t(e.toDataURL("image/jpeg", 0.8));
8104
- });
8105
- }
8106
- let b0 = null;
8107
- function mS() {
8108
- const o = document.createElement("div");
8109
- o.style.width = "1in", document.body.append(o);
8110
- const t = o.offsetWidth;
8111
- return o.remove(), t;
8112
- }
8113
- function vS() {
8114
- const o = b0 ?? mS();
8115
- return b0 = o, o / 72;
8116
- }
8117
- function bS(o, t = 500) {
8118
- if (typeof o != "function") throw new TypeError("The first argument is not a function.");
8119
- let e = null;
8120
- return function(...s) {
8121
- e && clearTimeout(e), e = setTimeout(() => {
8122
- e = null, o.apply(this, s);
8123
- }, t);
8124
- };
8125
- }
8126
- const Bs = /* @__PURE__ */ new Map();
8127
- function yS(o) {
8128
- const t = new ug(o);
8129
- return Bs.set(o, t), t;
8130
- }
8131
- function _S(o, t) {
8132
- const e = Date.now();
8133
- return {
8134
- PDFId: `${o.name}-${e}`,
8135
- name: o.name.replace(/.pdf/, ""),
8136
- updateDate: e,
8137
- PDFBase64: t
8138
- };
8139
- }
8140
- function wS(o, t) {
8141
- const e = o.getViewport({ scale: t }), s = document.createElement("canvas"), i = s.getContext("2d"), n = vS() / window.devicePixelRatio;
8142
- s.width = Math.floor(e.width * n), s.height = Math.floor(e.height * n);
8143
- const r = {
8144
- canvasContext: i,
8145
- viewport: e,
8146
- transform: [n, 0, 0, n, 0, 0]
8147
- }, a = o.render(r);
8148
- return { canvas: s, renderTask: a };
8149
- }
8150
- async function xS(o, t, e) {
8151
- const s = o || fS("close.svg"), { objects: i, options: n } = await eS(s), r = i.filter((h) => h !== null), a = px.groupSVGElements(r, n);
8152
- return r.forEach((h) => {
8153
- h.stroke = t;
8154
- }), a.hoverCursor = "pointer", a.stroke = `${t}-${e}`, a;
8155
- }
8156
- function SS(o, t) {
8157
- if (!Bs.get(o)) return;
8158
- const s = 1 / 3, i = PS(t, s);
8159
- ob(o, i, s);
8160
- }
8161
- async function CS(o, t) {
8162
- const e = await gS(t), s = Date.now(), n = {
8163
- PDFId: `${t.name}${s}`,
8164
- name: t.name.replace(/.png|.jpg|.jpeg/, ""),
8165
- updateDate: s,
8166
- PDFBase64: e
8167
- };
8168
- return ab(o, { url: e }), { ...n, pages: 1 };
8169
- }
8170
- async function ab(o, { url: t, scale: e = 0.5 }) {
8171
- if (!Bs.get(o)) return;
8172
- const i = await Oe.fromURL(t);
8173
- i.scale(e), ob(o, i, e);
8174
- }
8175
- function ob(o, t, e) {
8176
- const s = Bs.get(o);
8177
- s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
8178
- }
8179
- function Yh(o, t) {
8180
- if (!t) return;
8181
- const { oCoords: e } = o;
8182
- if (!e) return;
8183
- const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: a, scaleX: h } = t;
8184
- t.top = i - n * a / 2, t.left = s - r * h / 2, t.setCoords();
8185
- }
8186
- function AS(o, t, e) {
8187
- !e || !o || (e.scale(1 / t), Yh(o, e));
8188
- }
8189
- function TS(o, t, e) {
8190
- o && (o.borderScaleFactor = 1 / t, o.cornerSize = 6 * (1 / t), o.touchCornerSize = 24 * (1 / t), o.cornerStrokeColor = e.stroke, o.setCoords());
8191
- }
8192
- function ES(o) {
8193
- const t = Bs.get(o);
8194
- t && (t.discardActiveObject(), t.renderAll());
8195
- }
8196
- function kS(o) {
8197
- const t = Bs.get(o);
8198
- t && (t.clear(), Bs.delete(o));
8199
- }
8200
- function PS(o, t) {
8201
- return new Oe(o, { scaleX: t, scaleY: t });
8202
- }
8203
8086
  var pl = {};
8204
8087
  pl.d = (o, t) => {
8205
8088
  for (var e in t)
@@ -8230,7 +8113,7 @@ pl.d(Z, {
8230
8113
  ),
8231
8114
  AnnotationLayer: () => (
8232
8115
  /* reexport */
8233
- CA
8116
+ aA
8234
8117
  ),
8235
8118
  AnnotationMode: () => (
8236
8119
  /* reexport */
@@ -8278,7 +8161,7 @@ pl.d(Z, {
8278
8161
  ),
8279
8162
  PDFDataRangeTransport: () => (
8280
8163
  /* reexport */
8281
- ly
8164
+ oy
8282
8165
  ),
8283
8166
  PDFDateString: () => (
8284
8167
  /* reexport */
@@ -8290,11 +8173,11 @@ pl.d(Z, {
8290
8173
  ),
8291
8174
  PasswordResponses: () => (
8292
8175
  /* reexport */
8293
- RS
8176
+ pS
8294
8177
  ),
8295
8178
  PermissionFlag: () => (
8296
8179
  /* reexport */
8297
- DS
8180
+ gS
8298
8181
  ),
8299
8182
  PixelsPerInch: () => (
8300
8183
  /* reexport */
@@ -8326,15 +8209,15 @@ pl.d(Z, {
8326
8209
  ),
8327
8210
  XfaLayer: () => (
8328
8211
  /* reexport */
8329
- uy
8212
+ ly
8330
8213
  ),
8331
8214
  build: () => (
8332
8215
  /* reexport */
8333
- nA
8216
+ HC
8334
8217
  ),
8335
8218
  createValidAbsoluteUrl: () => (
8336
8219
  /* reexport */
8337
- jS
8220
+ yS
8338
8221
  ),
8339
8222
  fetchData: () => (
8340
8223
  /* reexport */
@@ -8342,19 +8225,19 @@ pl.d(Z, {
8342
8225
  ),
8343
8226
  getDocument: () => (
8344
8227
  /* reexport */
8345
- qC
8228
+ OC
8346
8229
  ),
8347
8230
  getFilenameFromUrl: () => (
8348
8231
  /* reexport */
8349
- US
8232
+ kS
8350
8233
  ),
8351
8234
  getPdfFilenameFromUrl: () => (
8352
8235
  /* reexport */
8353
- YS
8236
+ PS
8354
8237
  ),
8355
8238
  getXfaPageViewport: () => (
8356
8239
  /* reexport */
8357
- $S
8240
+ MS
8358
8241
  ),
8359
8242
  isDataScheme: () => (
8360
8243
  /* reexport */
@@ -8370,7 +8253,7 @@ pl.d(Z, {
8370
8253
  ),
8371
8254
  normalizeUnicode: () => (
8372
8255
  /* reexport */
8373
- WS
8256
+ AS
8374
8257
  ),
8375
8258
  setLayerDimensions: () => (
8376
8259
  /* reexport */
@@ -8386,10 +8269,10 @@ pl.d(Z, {
8386
8269
  ),
8387
8270
  version: () => (
8388
8271
  /* reexport */
8389
- iA
8272
+ BC
8390
8273
  )
8391
8274
  });
8392
- const Re = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), hb = [1, 0, 0, 1, 0, 0], gg = [1e-3, 0, 0, 1e-3, 0, 0], MS = 1e7, Xf = 1.35, xs = {
8275
+ const Re = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), ab = [1, 0, 0, 1, 0, 0], gg = [1e-3, 0, 0, 1e-3, 0, 0], dS = 1e7, Xf = 1.35, xs = {
8393
8276
  ANY: 1,
8394
8277
  DISPLAY: 2,
8395
8278
  PRINT: 4,
@@ -8403,7 +8286,7 @@ const Re = typeof process == "object" && process + "" == "[object process]" && !
8403
8286
  ENABLE: 1,
8404
8287
  ENABLE_FORMS: 2,
8405
8288
  ENABLE_STORAGE: 3
8406
- }, OS = "pdfjs_internal_editor_", nt = {
8289
+ }, fS = "pdfjs_internal_editor_", nt = {
8407
8290
  DISABLE: -1,
8408
8291
  NONE: 0,
8409
8292
  FREETEXT: 3,
@@ -8425,7 +8308,7 @@ const Re = typeof process == "object" && process + "" == "[object process]" && !
8425
8308
  HIGHLIGHT_FREE: 34,
8426
8309
  HIGHLIGHT_SHOW_ALL: 35,
8427
8310
  DRAW_STEP: 41
8428
- }, DS = {
8311
+ }, gS = {
8429
8312
  PRINT: 4,
8430
8313
  MODIFY_CONTENTS: 8,
8431
8314
  COPY: 16,
@@ -8565,15 +8448,15 @@ const Re = typeof process == "object" && process + "" == "[object process]" && !
8565
8448
  constructPath: 91,
8566
8449
  setStrokeTransparent: 92,
8567
8450
  setFillTransparent: 93
8568
- }, RS = {
8451
+ }, pS = {
8569
8452
  NEED_PASSWORD: 1,
8570
8453
  INCORRECT_PASSWORD: 2
8571
8454
  };
8572
8455
  let mf = pf.WARNINGS;
8573
- function LS(o) {
8456
+ function mS(o) {
8574
8457
  Number.isInteger(o) && (mf = o);
8575
8458
  }
8576
- function FS() {
8459
+ function vS() {
8577
8460
  return mf;
8578
8461
  }
8579
8462
  function vf(o) {
@@ -8588,7 +8471,7 @@ function Et(o) {
8588
8471
  function te(o, t) {
8589
8472
  o || Et(t);
8590
8473
  }
8591
- function IS(o) {
8474
+ function bS(o) {
8592
8475
  switch (o == null ? void 0 : o.protocol) {
8593
8476
  case "http:":
8594
8477
  case "https:":
@@ -8600,7 +8483,7 @@ function IS(o) {
8600
8483
  return !1;
8601
8484
  }
8602
8485
  }
8603
- function jS(o, t = null, e = null) {
8486
+ function yS(o, t = null, e = null) {
8604
8487
  if (!o)
8605
8488
  return null;
8606
8489
  try {
@@ -8611,12 +8494,12 @@ function jS(o, t = null, e = null) {
8611
8494
  }
8612
8495
  if (e.tryConvertEncoding)
8613
8496
  try {
8614
- o = VS(o);
8497
+ o = CS(o);
8615
8498
  } catch {
8616
8499
  }
8617
8500
  }
8618
8501
  const s = t ? new URL(o, t) : new URL(o);
8619
- if (IS(s))
8502
+ if (bS(s))
8620
8503
  return s;
8621
8504
  } catch {
8622
8505
  }
@@ -8636,7 +8519,7 @@ const Ar = function() {
8636
8519
  }
8637
8520
  return t.prototype = new Error(), t.constructor = t, t;
8638
8521
  }();
8639
- class y0 extends Ar {
8522
+ class b0 extends Ar {
8640
8523
  constructor(t, e) {
8641
8524
  super(t, "PasswordException"), this.code = e;
8642
8525
  }
@@ -8661,7 +8544,7 @@ class Ed extends Ar {
8661
8544
  super(t, "UnexpectedResponseException"), this.status = e;
8662
8545
  }
8663
8546
  }
8664
- class NS extends Ar {
8547
+ class _S extends Ar {
8665
8548
  constructor(t) {
8666
8549
  super(t, "FormatError");
8667
8550
  }
@@ -8671,7 +8554,7 @@ class _r extends Ar {
8671
8554
  super(t, "AbortException");
8672
8555
  }
8673
8556
  }
8674
- function lb(o) {
8557
+ function ob(o) {
8675
8558
  (typeof o != "object" || (o == null ? void 0 : o.length) === void 0) && Et("Invalid argument for bytesToString");
8676
8559
  const t = o.length, e = 8192;
8677
8560
  if (t < e)
@@ -8690,7 +8573,7 @@ function bf(o) {
8690
8573
  e[s] = o.charCodeAt(s) & 255;
8691
8574
  return e;
8692
8575
  }
8693
- function BS(o) {
8576
+ function wS(o) {
8694
8577
  return String.fromCharCode(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255, o & 255);
8695
8578
  }
8696
8579
  function Qp(o) {
@@ -8699,11 +8582,11 @@ function Qp(o) {
8699
8582
  t[e] = s;
8700
8583
  return t;
8701
8584
  }
8702
- function HS() {
8585
+ function xS() {
8703
8586
  const o = new Uint8Array(4);
8704
8587
  return o[0] = 1, new Uint32Array(o.buffer, 0, 1)[0] === 1;
8705
8588
  }
8706
- function GS() {
8589
+ function SS() {
8707
8590
  try {
8708
8591
  return new Function(""), !0;
8709
8592
  } catch {
@@ -8712,10 +8595,10 @@ function GS() {
8712
8595
  }
8713
8596
  class Ye {
8714
8597
  static get isLittleEndian() {
8715
- return ht(this, "isLittleEndian", HS());
8598
+ return ht(this, "isLittleEndian", xS());
8716
8599
  }
8717
8600
  static get isEvalSupported() {
8718
- return ht(this, "isEvalSupported", GS());
8601
+ return ht(this, "isEvalSupported", SS());
8719
8602
  }
8720
8603
  static get isOffscreenCanvasSupported() {
8721
8604
  return ht(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas < "u");
@@ -8803,22 +8686,22 @@ kn = new WeakSet(), ju = function(t, e, s, i, n, r, a, h, c, u) {
8803
8686
  const p = Math.sqrt(g), v = 2 * c;
8804
8687
  w(this, kn, ju).call(this, t, e, s, i, n, r, a, h, (-u + p) / v, f), w(this, kn, ju).call(this, t, e, s, i, n, r, a, h, (-u - p) / v, f);
8805
8688
  }, y(q, kn);
8806
- function VS(o) {
8689
+ function CS(o) {
8807
8690
  return decodeURIComponent(escape(o));
8808
8691
  }
8809
- let $f = null, _0 = null;
8810
- function WS(o) {
8811
- return $f || ($f = /([\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, _0 = /* @__PURE__ */ new Map([["ſt", "ſt"]])), o.replaceAll($f, (t, e, s) => e ? e.normalize("NFKC") : _0.get(s));
8692
+ let $f = null, y0 = null;
8693
+ function AS(o) {
8694
+ return $f || ($f = /([\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, y0 = /* @__PURE__ */ new Map([["ſt", "ſt"]])), o.replaceAll($f, (t, e, s) => e ? e.normalize("NFKC") : y0.get(s));
8812
8695
  }
8813
- function zS() {
8696
+ function TS() {
8814
8697
  if (typeof crypto.randomUUID == "function")
8815
8698
  return crypto.randomUUID();
8816
8699
  const o = new Uint8Array(32);
8817
- return crypto.getRandomValues(o), lb(o);
8700
+ return crypto.getRandomValues(o), ob(o);
8818
8701
  }
8819
8702
  const Zp = "pdfjs_internal_id_";
8820
- function XS(o) {
8821
- return Uint8Array.prototype.toBase64 ? o.toBase64() : btoa(lb(o));
8703
+ function ES(o) {
8704
+ return Uint8Array.prototype.toBase64 ? o.toBase64() : btoa(ob(o));
8822
8705
  }
8823
8706
  typeof Promise.try != "function" && (Promise.try = function(o, ...t) {
8824
8707
  return new Promise((e) => {
@@ -8830,7 +8713,7 @@ const Xi = "http://www.w3.org/2000/svg", Lr = class Lr {
8830
8713
  K(Lr, "CSS", 96), K(Lr, "PDF", 72), K(Lr, "PDF_TO_CSS_UNITS", Lr.CSS / Lr.PDF);
8831
8714
  let wr = Lr;
8832
8715
  async function yf(o, t = "text") {
8833
- if ($h(o, document.baseURI)) {
8716
+ if (Yh(o, document.baseURI)) {
8834
8717
  const e = await fetch(o);
8835
8718
  if (!e.ok)
8836
8719
  throw new Error(e.statusText);
@@ -8952,10 +8835,10 @@ function _f(o) {
8952
8835
  function em(o) {
8953
8836
  return typeof o == "string" && /\.pdf$/i.test(o);
8954
8837
  }
8955
- function US(o) {
8838
+ function kS(o) {
8956
8839
  return [o] = o.split(/[#?]/, 1), o.substring(o.lastIndexOf("/") + 1);
8957
8840
  }
8958
- function YS(o, t = "document.pdf") {
8841
+ function PS(o, t = "document.pdf") {
8959
8842
  if (typeof o != "string")
8960
8843
  return t;
8961
8844
  if (_f(o))
@@ -8969,7 +8852,7 @@ function YS(o, t = "document.pdf") {
8969
8852
  }
8970
8853
  return n || t;
8971
8854
  }
8972
- class w0 {
8855
+ class _0 {
8973
8856
  constructor() {
8974
8857
  K(this, "started", /* @__PURE__ */ Object.create(null));
8975
8858
  K(this, "times", []);
@@ -9001,7 +8884,7 @@ class w0 {
9001
8884
  return t.join("");
9002
8885
  }
9003
8886
  }
9004
- function $h(o, t) {
8887
+ function Yh(o, t) {
9005
8888
  try {
9006
8889
  const {
9007
8890
  protocol: e
@@ -9045,7 +8928,7 @@ class sm {
9045
8928
  }
9046
8929
  }
9047
8930
  Al = new WeakMap(), y(sm, Al);
9048
- function $S(o, {
8931
+ function MS(o, {
9049
8932
  scale: t = 1,
9050
8933
  rotation: e = 0
9051
8934
  }) {
@@ -9067,7 +8950,7 @@ function im(o) {
9067
8950
  }
9068
8951
  return o.startsWith("rgb(") ? o.slice(4, -1).split(",").map((t) => parseInt(t)) : o.startsWith("rgba(") ? o.slice(5, -1).split(",").map((t) => parseInt(t)).slice(0, 3) : (rt(`Not a valid color format: "${o}"`), [0, 0, 0]);
9069
8952
  }
9070
- function qS(o) {
8953
+ function OS(o) {
9071
8954
  const t = document.createElement("span");
9072
8955
  t.style.visibility = "hidden", document.body.append(t);
9073
8956
  for (const e of o.keys()) {
@@ -9123,7 +9006,7 @@ class vg {
9123
9006
  return this.sx === this.sy;
9124
9007
  }
9125
9008
  }
9126
- var Hn, Br, $s, Hr, Tl, El, Fd, cb, $e, ub, db, Nu, fb, yg;
9009
+ var Hn, Br, $s, Hr, Tl, El, Fd, hb, $e, lb, cb, Nu, ub, yg;
9127
9010
  const $i = class $i {
9128
9011
  constructor(t) {
9129
9012
  y(this, $e);
@@ -9145,7 +9028,7 @@ const $i = class $i {
9145
9028
  const e = l(this, $s)._uiManager._signal;
9146
9029
  t.addEventListener("contextmenu", gi, {
9147
9030
  signal: e
9148
- }), t.addEventListener("pointerdown", w($i, Fd, cb), {
9031
+ }), t.addEventListener("pointerdown", w($i, Fd, hb), {
9149
9032
  signal: e
9150
9033
  });
9151
9034
  const s = m(this, Hr, document.createElement("div"));
@@ -9157,7 +9040,7 @@ const $i = class $i {
9157
9040
  } = t, r = l(this, $s)._uiManager.direction === "ltr" ? 1 - i[0] : i[0];
9158
9041
  n.insetInlineEnd = `${100 * r}%`, n.top = `calc(${100 * i[1]}% + var(--editor-toolbar-vert-offset))`;
9159
9042
  }
9160
- return w(this, $e, fb).call(this), t;
9043
+ return w(this, $e, ub).call(this), t;
9161
9044
  }
9162
9045
  get div() {
9163
9046
  return l(this, Hn);
@@ -9184,24 +9067,24 @@ const $i = class $i {
9184
9067
  l(this, Hn).remove(), (t = l(this, Br)) == null || t.destroy(), m(this, Br, null);
9185
9068
  }
9186
9069
  };
9187
- Hn = new WeakMap(), Br = new WeakMap(), $s = new WeakMap(), Hr = new WeakMap(), Tl = new WeakMap(), El = new WeakMap(), Fd = new WeakSet(), cb = function(t) {
9070
+ Hn = new WeakMap(), Br = new WeakMap(), $s = new WeakMap(), Hr = new WeakMap(), Tl = new WeakMap(), El = new WeakMap(), Fd = new WeakSet(), hb = function(t) {
9188
9071
  t.stopPropagation();
9189
- }, $e = new WeakSet(), ub = function(t) {
9072
+ }, $e = new WeakSet(), lb = function(t) {
9190
9073
  l(this, $s)._focusEventsAllowed = !1, Cs(t);
9191
- }, db = function(t) {
9074
+ }, cb = function(t) {
9192
9075
  l(this, $s)._focusEventsAllowed = !0, Cs(t);
9193
9076
  }, Nu = function(t) {
9194
9077
  const e = l(this, $s)._uiManager._signal;
9195
- t.addEventListener("focusin", w(this, $e, ub).bind(this), {
9078
+ t.addEventListener("focusin", w(this, $e, lb).bind(this), {
9196
9079
  capture: !0,
9197
9080
  signal: e
9198
- }), t.addEventListener("focusout", w(this, $e, db).bind(this), {
9081
+ }), t.addEventListener("focusout", w(this, $e, cb).bind(this), {
9199
9082
  capture: !0,
9200
9083
  signal: e
9201
9084
  }), t.addEventListener("contextmenu", gi, {
9202
9085
  signal: e
9203
9086
  });
9204
- }, fb = function() {
9087
+ }, ub = function() {
9205
9088
  const {
9206
9089
  editorType: t,
9207
9090
  _uiManager: e
@@ -9216,8 +9099,8 @@ Hn = new WeakMap(), Br = new WeakMap(), $s = new WeakMap(), Hr = new WeakMap(),
9216
9099
  return t.className = "divider", t;
9217
9100
  }, y($i, Fd), y($i, El, null);
9218
9101
  let bg = $i;
9219
- var kl, Gr, Vr, xr, gb, pb, mb;
9220
- class KS {
9102
+ var kl, Gr, Vr, xr, db, fb, gb;
9103
+ class DS {
9221
9104
  constructor(t) {
9222
9105
  y(this, xr);
9223
9106
  y(this, kl, null);
@@ -9226,23 +9109,23 @@ class KS {
9226
9109
  m(this, Vr, t);
9227
9110
  }
9228
9111
  show(t, e, s) {
9229
- const [i, n] = w(this, xr, pb).call(this, e, s), {
9112
+ const [i, n] = w(this, xr, fb).call(this, e, s), {
9230
9113
  style: r
9231
- } = l(this, Gr) || m(this, Gr, w(this, xr, gb).call(this));
9114
+ } = l(this, Gr) || m(this, Gr, w(this, xr, db).call(this));
9232
9115
  t.append(l(this, Gr)), r.insetInlineEnd = `${100 * i}%`, r.top = `calc(${100 * n}% + var(--editor-toolbar-vert-offset))`;
9233
9116
  }
9234
9117
  hide() {
9235
9118
  l(this, Gr).remove();
9236
9119
  }
9237
9120
  }
9238
- kl = new WeakMap(), Gr = new WeakMap(), Vr = new WeakMap(), xr = new WeakSet(), gb = function() {
9121
+ kl = new WeakMap(), Gr = new WeakMap(), Vr = new WeakMap(), xr = new WeakSet(), db = function() {
9239
9122
  const t = m(this, Gr, document.createElement("div"));
9240
9123
  t.className = "editToolbar", t.setAttribute("role", "toolbar"), t.addEventListener("contextmenu", gi, {
9241
9124
  signal: l(this, Vr)._signal
9242
9125
  });
9243
9126
  const e = m(this, kl, document.createElement("div"));
9244
- return e.className = "buttons", t.append(e), w(this, xr, mb).call(this), t;
9245
- }, pb = function(t, e) {
9127
+ return e.className = "buttons", t.append(e), w(this, xr, gb).call(this), t;
9128
+ }, fb = function(t, e) {
9246
9129
  let s = 0, i = 0;
9247
9130
  for (const n of t) {
9248
9131
  const r = n.y + n.height;
@@ -9256,7 +9139,7 @@ kl = new WeakMap(), Gr = new WeakMap(), Vr = new WeakMap(), xr = new WeakSet(),
9256
9139
  e ? a > i && (i = a) : a < i && (i = a);
9257
9140
  }
9258
9141
  return [e ? 1 - i : i, s];
9259
- }, mb = function() {
9142
+ }, gb = function() {
9260
9143
  const t = document.createElement("button");
9261
9144
  t.className = "highlightButton", t.tabIndex = 0, t.setAttribute("data-l10n-id", "pdfjs-highlight-floating-button1");
9262
9145
  const e = document.createElement("span");
@@ -9275,12 +9158,12 @@ function kd(o, t, e) {
9275
9158
  t.addEventListener(s, o[s].bind(o));
9276
9159
  }
9277
9160
  var Id;
9278
- class JS {
9161
+ class RS {
9279
9162
  constructor() {
9280
9163
  y(this, Id, 0);
9281
9164
  }
9282
9165
  get id() {
9283
- return `${OS}${je(this, Id)._++}`;
9166
+ return `${fS}${je(this, Id)._++}`;
9284
9167
  }
9285
9168
  }
9286
9169
  Id = new WeakMap();
@@ -9288,7 +9171,7 @@ var xo, Pl, Ae, So, Bu;
9288
9171
  const hm = class hm {
9289
9172
  constructor() {
9290
9173
  y(this, So);
9291
- y(this, xo, zS());
9174
+ y(this, xo, TS());
9292
9175
  y(this, Pl, 0);
9293
9176
  y(this, Ae, null);
9294
9177
  }
@@ -9404,7 +9287,7 @@ xo = new WeakMap(), Pl = new WeakMap(), Ae = new WeakMap(), So = new WeakSet(),
9404
9287
  };
9405
9288
  let _g = hm;
9406
9289
  var Xt, Gn, Ml, jt;
9407
- class QS {
9290
+ class LS {
9408
9291
  constructor(t = 128) {
9409
9292
  y(this, Xt, []);
9410
9293
  y(this, Gn, !1);
@@ -9481,7 +9364,7 @@ class QS {
9481
9364
  }
9482
9365
  }
9483
9366
  Xt = new WeakMap(), Gn = new WeakMap(), Ml = new WeakMap(), jt = new WeakMap();
9484
- var jd, vb;
9367
+ var jd, pb;
9485
9368
  class eu {
9486
9369
  constructor(t) {
9487
9370
  y(this, jd);
@@ -9504,7 +9387,7 @@ class eu {
9504
9387
  exec(t, e) {
9505
9388
  if (!this.allKeys.has(e.key))
9506
9389
  return;
9507
- const s = this.callbacks.get(w(this, jd, vb).call(this, e));
9390
+ const s = this.callbacks.get(w(this, jd, pb).call(this, e));
9508
9391
  if (!s)
9509
9392
  return;
9510
9393
  const {
@@ -9518,7 +9401,7 @@ class eu {
9518
9401
  a && !a(t, e) || (i.bind(t, ...r, e)(), n || Cs(e));
9519
9402
  }
9520
9403
  }
9521
- jd = new WeakSet(), vb = function(t) {
9404
+ jd = new WeakSet(), pb = function(t) {
9522
9405
  t.altKey && this.buffer.push("alt"), t.ctrlKey && this.buffer.push("ctrl"), t.metaKey && this.buffer.push("meta"), t.shiftKey && this.buffer.push("shift"), this.buffer.push(t.key);
9523
9406
  const e = this.buffer.join("+");
9524
9407
  return this.buffer.length = 0, e;
@@ -9526,7 +9409,7 @@ jd = new WeakSet(), vb = function(t) {
9526
9409
  const Nd = class Nd {
9527
9410
  get _colors() {
9528
9411
  const t = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
9529
- return qS(t), ht(this, "_colors", t);
9412
+ return OS(t), ht(this, "_colors", t);
9530
9413
  }
9531
9414
  convert(t) {
9532
9415
  const e = im(t);
@@ -9544,7 +9427,7 @@ const Nd = class Nd {
9544
9427
  };
9545
9428
  K(Nd, "_colorsMapping", /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]));
9546
9429
  let wg = Nd;
9547
- var Co, cs, re, me, Ao, Qi, To, Os, Vn, Wr, Eo, zr, _i, qs, Xr, Ol, Dl, ko, Rl, wi, Wn, Po, zn, xi, Bd, Xn, Ll, Un, Ur, Fl, Il, le, yt, Zi, Yr, jl, Nl, Yn, Si, tn, Bl, Ds, B, Hu, xg, bb, yb, Gu, _b, wb, xb, Sg, Sb, Cg, Ag, Cb, Ne, Ui, Ab, Tb, Tg, Eb, qh, Eg;
9430
+ var Co, cs, re, me, Ao, Qi, To, Os, Vn, Wr, Eo, zr, _i, qs, Xr, Ol, Dl, ko, Rl, wi, Wn, Po, zn, xi, Bd, Xn, Ll, Un, Ur, Fl, Il, le, yt, Zi, Yr, jl, Nl, Yn, Si, tn, Bl, Ds, B, Hu, xg, mb, vb, Gu, bb, yb, _b, Sg, wb, Cg, Ag, xb, Ne, Ui, Sb, Cb, Tg, Ab, $h, Eg;
9548
9431
  const mo = class mo {
9549
9432
  constructor(t, e, s, i, n, r, a, h, c, u, d, f, g) {
9550
9433
  y(this, B);
@@ -9555,7 +9438,7 @@ const mo = class mo {
9555
9438
  y(this, Ao, null);
9556
9439
  y(this, Qi, null);
9557
9440
  y(this, To, null);
9558
- y(this, Os, new QS());
9441
+ y(this, Os, new LS());
9559
9442
  y(this, Vn, null);
9560
9443
  y(this, Wr, null);
9561
9444
  y(this, Eo, 0);
@@ -9573,7 +9456,7 @@ const mo = class mo {
9573
9456
  y(this, Po, null);
9574
9457
  y(this, zn, !1);
9575
9458
  y(this, xi, null);
9576
- y(this, Bd, new JS());
9459
+ y(this, Bd, new RS());
9577
9460
  y(this, Xn, !1);
9578
9461
  y(this, Ll, !1);
9579
9462
  y(this, Un, null);
@@ -9611,7 +9494,7 @@ const mo = class mo {
9611
9494
  signal: p
9612
9495
  }), i._on("switchannotationeditorparams", (v) => this.updateParams(v.type, v.value), {
9613
9496
  signal: p
9614
- }), w(this, B, _b).call(this), w(this, B, Cb).call(this), w(this, B, Sg).call(this), m(this, Qi, n.annotationStorage), m(this, Rl, n.filterFactory), m(this, Yr, r), m(this, Po, a || null), m(this, Ol, h), m(this, Dl, c), m(this, ko, u), m(this, Il, d || null), this.viewParameters = {
9497
+ }), w(this, B, bb).call(this), w(this, B, xb).call(this), w(this, B, Sg).call(this), m(this, Qi, n.annotationStorage), m(this, Rl, n.filterFactory), m(this, Yr, r), m(this, Po, a || null), m(this, Ol, h), m(this, Dl, c), m(this, ko, u), m(this, Il, d || null), this.viewParameters = {
9615
9498
  realScale: wr.PDF_TO_CSS_UNITS,
9616
9499
  rotation: 0
9617
9500
  }, this.isShiftKeyDown = !1, this._editorUndoBar = f || null, this._supportsPinchToZoom = g !== !1;
@@ -9844,7 +9727,7 @@ const mo = class mo {
9844
9727
  w(this, B, Sg).call(this), w(this, B, Cg).call(this);
9845
9728
  }
9846
9729
  removeEditListeners() {
9847
- w(this, B, Sb).call(this), w(this, B, Ag).call(this);
9730
+ w(this, B, wb).call(this), w(this, B, Ag).call(this);
9848
9731
  }
9849
9732
  dragOver(t) {
9850
9733
  for (const {
@@ -9949,13 +9832,13 @@ const mo = class mo {
9949
9832
  }
9950
9833
  }
9951
9834
  setEditingState(t) {
9952
- t ? (w(this, B, wb).call(this), w(this, B, Cg).call(this), w(this, B, Ne).call(this, {
9835
+ t ? (w(this, B, yb).call(this), w(this, B, Cg).call(this), w(this, B, Ne).call(this, {
9953
9836
  isEditing: l(this, le) !== nt.NONE,
9954
- isEmpty: w(this, B, qh).call(this),
9837
+ isEmpty: w(this, B, $h).call(this),
9955
9838
  hasSomethingToUndo: l(this, Os).hasSomethingToUndo(),
9956
9839
  hasSomethingToRedo: l(this, Os).hasSomethingToRedo(),
9957
9840
  hasSelectedEditor: !1
9958
- })) : (w(this, B, xb).call(this), w(this, B, Ag).call(this), w(this, B, Ne).call(this, {
9841
+ })) : (w(this, B, _b).call(this), w(this, B, Ag).call(this), w(this, B, Ne).call(this, {
9959
9842
  isEditing: !1
9960
9843
  }), this.disableUserSelect(!1));
9961
9844
  }
@@ -9988,10 +9871,10 @@ const mo = class mo {
9988
9871
  var i;
9989
9872
  if (l(this, le) !== t && !(l(this, Ds) && (await l(this, Ds).promise, !l(this, Ds)))) {
9990
9873
  if (m(this, Ds, Promise.withResolvers()), m(this, le, t), t === nt.NONE) {
9991
- this.setEditingState(!1), w(this, B, Tb).call(this), (i = this._editorUndoBar) == null || i.hide(), l(this, Ds).resolve();
9874
+ this.setEditingState(!1), w(this, B, Cb).call(this), (i = this._editorUndoBar) == null || i.hide(), l(this, Ds).resolve();
9992
9875
  return;
9993
9876
  }
9994
- this.setEditingState(!0), await w(this, B, Ab).call(this), this.unselectAll();
9877
+ this.setEditingState(!0), await w(this, B, Sb).call(this), this.unselectAll();
9995
9878
  for (const n of l(this, me).values())
9996
9879
  n.updateMode(t);
9997
9880
  if (!e) {
@@ -10085,7 +9968,7 @@ const mo = class mo {
10085
9968
  l(this, cs) !== t && (m(this, cs, t), t && w(this, B, Ui).call(this, t.propertiesToUpdate));
10086
9969
  }
10087
9970
  updateUI(t) {
10088
- l(this, B, Eb) === t && w(this, B, Ui).call(this, t.propertiesToUpdate);
9971
+ l(this, B, Ab) === t && w(this, B, Ui).call(this, t.propertiesToUpdate);
10089
9972
  }
10090
9973
  updateUIForDefaultProperties(t) {
10091
9974
  w(this, B, Ui).call(this, t.defaultPropertiesToUpdate);
@@ -10132,21 +10015,21 @@ const mo = class mo {
10132
10015
  l(this, Os).undo(), w(this, B, Ne).call(this, {
10133
10016
  hasSomethingToUndo: l(this, Os).hasSomethingToUndo(),
10134
10017
  hasSomethingToRedo: !0,
10135
- isEmpty: w(this, B, qh).call(this)
10018
+ isEmpty: w(this, B, $h).call(this)
10136
10019
  }), (t = this._editorUndoBar) == null || t.hide();
10137
10020
  }
10138
10021
  redo() {
10139
10022
  l(this, Os).redo(), w(this, B, Ne).call(this, {
10140
10023
  hasSomethingToUndo: !0,
10141
10024
  hasSomethingToRedo: l(this, Os).hasSomethingToRedo(),
10142
- isEmpty: w(this, B, qh).call(this)
10025
+ isEmpty: w(this, B, $h).call(this)
10143
10026
  });
10144
10027
  }
10145
10028
  addCommands(t) {
10146
10029
  l(this, Os).add(t), w(this, B, Ne).call(this, {
10147
10030
  hasSomethingToUndo: !0,
10148
10031
  hasSomethingToRedo: !1,
10149
- isEmpty: w(this, B, qh).call(this)
10032
+ isEmpty: w(this, B, $h).call(this)
10150
10033
  });
10151
10034
  }
10152
10035
  cleanUndoStack(t) {
@@ -10396,13 +10279,13 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10396
10279
  if (s.hasTextLayer(t))
10397
10280
  return s;
10398
10281
  return null;
10399
- }, bb = function() {
10282
+ }, mb = function() {
10400
10283
  const t = document.getSelection();
10401
10284
  if (!t || t.isCollapsed)
10402
10285
  return;
10403
10286
  const s = w(this, B, Hu).call(this, t).closest(".textLayer"), i = this.getSelectionBoxes(s);
10404
- i && (l(this, xi) || m(this, xi, new KS(this)), l(this, xi).show(s, i, this.direction === "ltr"));
10405
- }, yb = function() {
10287
+ i && (l(this, xi) || m(this, xi, new DS(this)), l(this, xi).show(s, i, this.direction === "ltr"));
10288
+ }, vb = function() {
10406
10289
  var n, r, a;
10407
10290
  const t = document.getSelection();
10408
10291
  if (!t || t.isCollapsed) {
@@ -10438,12 +10321,12 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10438
10321
  });
10439
10322
  }
10440
10323
  }, Gu = function(t = "") {
10441
- l(this, le) === nt.HIGHLIGHT ? this.highlightSelection(t) : l(this, Ol) && w(this, B, bb).call(this);
10442
- }, _b = function() {
10443
- document.addEventListener("selectionchange", w(this, B, yb).bind(this), {
10324
+ l(this, le) === nt.HIGHLIGHT ? this.highlightSelection(t) : l(this, Ol) && w(this, B, mb).call(this);
10325
+ }, bb = function() {
10326
+ document.addEventListener("selectionchange", w(this, B, vb).bind(this), {
10444
10327
  signal: this._signal
10445
10328
  });
10446
- }, wb = function() {
10329
+ }, yb = function() {
10447
10330
  if (l(this, Wn))
10448
10331
  return;
10449
10332
  m(this, Wn, new AbortController());
@@ -10453,7 +10336,7 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10453
10336
  }), window.addEventListener("blur", this.blur.bind(this), {
10454
10337
  signal: t
10455
10338
  });
10456
- }, xb = function() {
10339
+ }, _b = function() {
10457
10340
  var t;
10458
10341
  (t = l(this, Wn)) == null || t.abort(), m(this, Wn, null);
10459
10342
  }, Sg = function() {
@@ -10466,7 +10349,7 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10466
10349
  }), window.addEventListener("keyup", this.keyup.bind(this), {
10467
10350
  signal: t
10468
10351
  });
10469
- }, Sb = function() {
10352
+ }, wb = function() {
10470
10353
  var t;
10471
10354
  (t = l(this, Un)) == null || t.abort(), m(this, Un, null);
10472
10355
  }, Cg = function() {
@@ -10484,7 +10367,7 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10484
10367
  }, Ag = function() {
10485
10368
  var t;
10486
10369
  (t = l(this, Vn)) == null || t.abort(), m(this, Vn, null);
10487
- }, Cb = function() {
10370
+ }, xb = function() {
10488
10371
  const t = this._signal;
10489
10372
  document.addEventListener("dragover", this.dragOver.bind(this), {
10490
10373
  signal: t
@@ -10501,7 +10384,7 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10501
10384
  source: this,
10502
10385
  details: t
10503
10386
  });
10504
- }, Ab = async function() {
10387
+ }, Sb = async function() {
10505
10388
  if (!l(this, Xn)) {
10506
10389
  m(this, Xn, !0);
10507
10390
  const t = [];
@@ -10511,7 +10394,7 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10511
10394
  for (const e of l(this, re).values())
10512
10395
  e.enable();
10513
10396
  }
10514
- }, Tb = function() {
10397
+ }, Cb = function() {
10515
10398
  if (this.unselectAll(), l(this, Xn)) {
10516
10399
  m(this, Xn, !1);
10517
10400
  for (const t of l(this, me).values())
@@ -10522,12 +10405,12 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10522
10405
  }, Tg = function(t) {
10523
10406
  const e = l(this, me).get(t.pageIndex);
10524
10407
  e ? e.addOrRebuild(t) : (this.addEditor(t), this.addToAnnotationStorage(t));
10525
- }, Eb = function() {
10408
+ }, Ab = function() {
10526
10409
  let t = null;
10527
10410
  for (t of l(this, yt))
10528
10411
  ;
10529
10412
  return t;
10530
- }, qh = function() {
10413
+ }, $h = function() {
10531
10414
  if (l(this, re).size === 0)
10532
10415
  return !0;
10533
10416
  if (l(this, re).size === 1)
@@ -10545,7 +10428,7 @@ Co = new WeakMap(), cs = new WeakMap(), re = new WeakMap(), me = new WeakMap(),
10545
10428
  });
10546
10429
  }, K(mo, "TRANSLATE_SMALL", 1), K(mo, "TRANSLATE_BIG", 10);
10547
10430
  let $a = mo;
10548
- var ce, Ci, Ks, Mo, Ai, us, Oo, Ti, ss, en, $r, Ei, $n, li, Kh, Vu;
10431
+ var ce, Ci, Ks, Mo, Ai, us, Oo, Ti, ss, en, $r, Ei, $n, li, qh, Vu;
10549
10432
  const Be = class Be {
10550
10433
  constructor(t) {
10551
10434
  y(this, li);
@@ -10588,7 +10471,7 @@ const Be = class Be {
10588
10471
  n.preventDefault(), l(this, ss)._uiManager.editAltText(l(this, ss)), l(this, Ei) && l(this, ss)._reportTelemetry({
10589
10472
  action: "pdfjs.image.alt_text.image_status_label_clicked",
10590
10473
  data: {
10591
- label: l(this, li, Kh)
10474
+ label: l(this, li, qh)
10592
10475
  }
10593
10476
  });
10594
10477
  };
@@ -10663,7 +10546,7 @@ const Be = class Be {
10663
10546
  l(this, ss)._reportTelemetry({
10664
10547
  action: "pdfjs.image.alt_text.image_status_label_displayed",
10665
10548
  data: {
10666
- label: l(this, li, Kh)
10549
+ label: l(this, li, qh)
10667
10550
  }
10668
10551
  });
10669
10552
  }
@@ -10672,7 +10555,7 @@ const Be = class Be {
10672
10555
  (t = l(this, Ks)) == null || t.remove(), m(this, Ks, null), m(this, Mo, null), m(this, Ai, null), (e = l(this, Ti)) == null || e.remove(), m(this, Ti, null);
10673
10556
  }
10674
10557
  };
10675
- ce = new WeakMap(), Ci = new WeakMap(), Ks = new WeakMap(), Mo = new WeakMap(), Ai = new WeakMap(), us = new WeakMap(), Oo = new WeakMap(), Ti = new WeakMap(), ss = new WeakMap(), en = new WeakMap(), $r = new WeakMap(), Ei = new WeakMap(), $n = new WeakMap(), li = new WeakSet(), Kh = function() {
10558
+ ce = new WeakMap(), Ci = new WeakMap(), Ks = new WeakMap(), Mo = new WeakMap(), Ai = new WeakMap(), us = new WeakMap(), Oo = new WeakMap(), Ti = new WeakMap(), ss = new WeakMap(), en = new WeakMap(), $r = new WeakMap(), Ei = new WeakMap(), $n = new WeakMap(), li = new WeakSet(), qh = function() {
10676
10559
  return l(this, ce) && "added" || l(this, ce) === null && this.guessedText && "review" || "missing";
10677
10560
  }, Vu = async function() {
10678
10561
  var i, n, r;
@@ -10680,7 +10563,7 @@ ce = new WeakMap(), Ci = new WeakMap(), Ks = new WeakMap(), Mo = new WeakMap(),
10680
10563
  if (!t)
10681
10564
  return;
10682
10565
  if (l(this, Ei)) {
10683
- if (t.classList.toggle("done", !!l(this, ce)), t.setAttribute("data-l10n-id", l(Be, $n)[l(this, li, Kh)]), (i = l(this, Mo)) == null || i.setAttribute("data-l10n-id", l(Be, $n)[`${l(this, li, Kh)}-label`]), !l(this, ce)) {
10566
+ if (t.classList.toggle("done", !!l(this, ce)), t.setAttribute("data-l10n-id", l(Be, $n)[l(this, li, qh)]), (i = l(this, Mo)) == null || i.setAttribute("data-l10n-id", l(Be, $n)[`${l(this, li, qh)}-label`]), !l(this, ce)) {
10684
10567
  (n = l(this, Ai)) == null || n.remove();
10685
10568
  return;
10686
10569
  }
@@ -10719,7 +10602,7 @@ ce = new WeakMap(), Ci = new WeakMap(), Ks = new WeakMap(), Mo = new WeakMap(),
10719
10602
  s == null || s.setAttribute("aria-describedby", e.id);
10720
10603
  }, y(Be, $n, null), K(Be, "_l10n", null);
10721
10604
  let Pd = Be;
10722
- var Hl, qr, Gl, Vl, Wl, zl, Xl, Do, sn, Kr, qn, Dn, kb, Pb, kg;
10605
+ var Hl, qr, Gl, Vl, Wl, zl, Xl, Do, sn, Kr, qn, Dn, Tb, Eb, kg;
10723
10606
  const lm = class lm {
10724
10607
  constructor({
10725
10608
  container: t,
@@ -10742,7 +10625,7 @@ const lm = class lm {
10742
10625
  y(this, sn, null);
10743
10626
  y(this, Kr);
10744
10627
  y(this, qn, null);
10745
- m(this, Hl, t), m(this, Gl, s), m(this, Vl, e), m(this, Wl, i), m(this, zl, n), m(this, Xl, r), m(this, Kr, new AbortController()), m(this, Do, AbortSignal.any([a, l(this, Kr).signal])), t.addEventListener("touchstart", w(this, Dn, kb).bind(this), {
10628
+ m(this, Hl, t), m(this, Gl, s), m(this, Vl, e), m(this, Wl, i), m(this, zl, n), m(this, Xl, r), m(this, Kr, new AbortController()), m(this, Do, AbortSignal.any([a, l(this, Kr).signal])), t.addEventListener("touchstart", w(this, Dn, Tb).bind(this), {
10746
10629
  passive: !1,
10747
10630
  signal: l(this, Do)
10748
10631
  });
@@ -10755,7 +10638,7 @@ const lm = class lm {
10755
10638
  (t = l(this, Kr)) == null || t.abort(), m(this, Kr, null);
10756
10639
  }
10757
10640
  };
10758
- Hl = new WeakMap(), qr = new WeakMap(), Gl = new WeakMap(), Vl = new WeakMap(), Wl = new WeakMap(), zl = new WeakMap(), Xl = new WeakMap(), Do = new WeakMap(), sn = new WeakMap(), Kr = new WeakMap(), qn = new WeakMap(), Dn = new WeakSet(), kb = function(t) {
10641
+ Hl = new WeakMap(), qr = new WeakMap(), Gl = new WeakMap(), Vl = new WeakMap(), Wl = new WeakMap(), zl = new WeakMap(), Xl = new WeakMap(), Do = new WeakMap(), sn = new WeakMap(), Kr = new WeakMap(), qn = new WeakMap(), Dn = new WeakSet(), Tb = function(t) {
10759
10642
  var i, n, r;
10760
10643
  if ((i = l(this, Vl)) != null && i.call(this) || t.touches.length < 2)
10761
10644
  return;
@@ -10765,7 +10648,7 @@ Hl = new WeakMap(), qr = new WeakMap(), Gl = new WeakMap(), Vl = new WeakMap(),
10765
10648
  signal: a,
10766
10649
  passive: !1
10767
10650
  };
10768
- h.addEventListener("touchmove", w(this, Dn, Pb).bind(this), c), h.addEventListener("touchend", w(this, Dn, kg).bind(this), c), h.addEventListener("touchcancel", w(this, Dn, kg).bind(this), c), (n = l(this, Wl)) == null || n.call(this);
10651
+ h.addEventListener("touchmove", w(this, Dn, Eb).bind(this), c), h.addEventListener("touchend", w(this, Dn, kg).bind(this), c), h.addEventListener("touchcancel", w(this, Dn, kg).bind(this), c), (n = l(this, Wl)) == null || n.call(this);
10769
10652
  }
10770
10653
  if (Cs(t), t.touches.length !== 2 || (r = l(this, Gl)) != null && r.call(this)) {
10771
10654
  m(this, sn, null);
@@ -10778,7 +10661,7 @@ Hl = new WeakMap(), qr = new WeakMap(), Gl = new WeakMap(), Vl = new WeakMap(),
10778
10661
  touch1X: s.screenX,
10779
10662
  touch1Y: s.screenY
10780
10663
  });
10781
- }, Pb = function(t) {
10664
+ }, Eb = function(t) {
10782
10665
  var A;
10783
10666
  if (!l(this, sn) || t.touches.length !== 2)
10784
10667
  return;
@@ -10809,7 +10692,7 @@ Hl = new WeakMap(), qr = new WeakMap(), Gl = new WeakMap(), Vl = new WeakMap(),
10809
10692
  l(this, qn).abort(), m(this, qn, null), (e = l(this, Xl)) == null || e.call(this), l(this, sn) && (t.preventDefault(), m(this, sn, null), m(this, qr, !1));
10810
10693
  };
10811
10694
  let Md = lm;
10812
- var Jr, Js, Mt, Ro, Kn, Ul, Qr, ve, Zr, nn, Jn, Yl, ta, ds, $l, ea, rn, ki, Lo, Fo, Rs, sa, ql, Hd, J, Pg, Kl, Mg, Wu, Mb, Ob, Og, zu, Dg, Db, Rb, Lb, Rg, Fb, Lg, Ib, jb, Nb, Fg, Jh;
10695
+ var Jr, Js, Mt, Ro, Kn, Ul, Qr, ve, Zr, nn, Jn, Yl, ta, ds, $l, ea, rn, ki, Lo, Fo, Rs, sa, ql, Hd, J, Pg, Kl, Mg, Wu, kb, Pb, Og, zu, Dg, Mb, Ob, Db, Rg, Rb, Lg, Lb, Fb, Ib, Fg, Kh;
10813
10696
  const at = class at {
10814
10697
  constructor(t) {
10815
10698
  y(this, J);
@@ -10887,7 +10770,7 @@ const at = class at {
10887
10770
  return ht(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
10888
10771
  }
10889
10772
  static deleteAnnotationElement(t) {
10890
- const e = new ZS({
10773
+ const e = new FS({
10891
10774
  id: t.parent.getNextId(),
10892
10775
  parent: t.parent,
10893
10776
  uiManager: t._uiManager
@@ -10964,7 +10847,7 @@ const at = class at {
10964
10847
  this.div.style.zIndex = l(this, Hd);
10965
10848
  }
10966
10849
  setParent(t) {
10967
- t !== null ? (this.pageIndex = t.pageIndex, this.pageDimensions = t.pageDimensions) : w(this, J, Jh).call(this), this.parent = t;
10850
+ t !== null ? (this.pageIndex = t.pageIndex, this.pageDimensions = t.pageDimensions) : w(this, J, Kh).call(this), this.parent = t;
10968
10851
  }
10969
10852
  focusin(t) {
10970
10853
  this._focusEventsAllowed && (l(this, ta) ? m(this, ta, !1) : this.parent.setSelected(this));
@@ -11189,9 +11072,9 @@ const at = class at {
11189
11072
  return this.translate(s, i), kd(this, this.div, ["pointerdown"]), this.isResizable && this._uiManager._supportsPinchToZoom && (l(this, sa) || m(this, sa, new Md({
11190
11073
  container: this.div,
11191
11074
  isPinchingDisabled: () => !this.isSelected,
11192
- onPinchStart: w(this, J, Db).bind(this),
11193
- onPinching: w(this, J, Rb).bind(this),
11194
- onPinchEnd: w(this, J, Lb).bind(this),
11075
+ onPinchStart: w(this, J, Mb).bind(this),
11076
+ onPinching: w(this, J, Ob).bind(this),
11077
+ onPinchEnd: w(this, J, Db).bind(this),
11195
11078
  signal: this._uiManager._signal
11196
11079
  }))), (n = this._uiManager._editorUndoBar) == null || n.hide(), this.div;
11197
11080
  }
@@ -11204,7 +11087,7 @@ const at = class at {
11204
11087
  return;
11205
11088
  }
11206
11089
  if (m(this, ta, !0), this._isDraggable) {
11207
- w(this, J, Fb).call(this, t);
11090
+ w(this, J, Rb).call(this, t);
11208
11091
  return;
11209
11092
  }
11210
11093
  w(this, J, Rg).call(this, t);
@@ -11321,7 +11204,7 @@ const at = class at {
11321
11204
  }
11322
11205
  remove() {
11323
11206
  var t, e;
11324
- if ((t = l(this, Jn)) == null || t.abort(), m(this, Jn, null), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), l(this, ki) && (clearTimeout(l(this, ki)), m(this, ki, null)), w(this, J, Jh).call(this), this.removeEditToolbar(), l(this, Rs)) {
11207
+ if ((t = l(this, Jn)) == null || t.abort(), m(this, Jn, null), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), l(this, ki) && (clearTimeout(l(this, ki)), m(this, ki, null)), w(this, J, Kh).call(this), this.removeEditToolbar(), l(this, Rs)) {
11325
11208
  for (const s of l(this, Rs).values())
11326
11209
  clearTimeout(s);
11327
11210
  m(this, Rs, null);
@@ -11332,7 +11215,7 @@ const at = class at {
11332
11215
  return !1;
11333
11216
  }
11334
11217
  makeResizable() {
11335
- this.isResizable && (w(this, J, Mb).call(this), l(this, ve).classList.remove("hidden"), kd(this, this.div, ["keydown"]));
11218
+ this.isResizable && (w(this, J, kb).call(this), l(this, ve).classList.remove("hidden"), kd(this, this.div, ["keydown"]));
11336
11219
  }
11337
11220
  get toolbarPosition() {
11338
11221
  return null;
@@ -11349,14 +11232,14 @@ const at = class at {
11349
11232
  const e = l(this, ve).children;
11350
11233
  if (!l(this, Js)) {
11351
11234
  m(this, Js, Array.from(e));
11352
- const r = w(this, J, Ib).bind(this), a = w(this, J, jb).bind(this), h = this._uiManager._signal;
11235
+ const r = w(this, J, Lb).bind(this), a = w(this, J, Fb).bind(this), h = this._uiManager._signal;
11353
11236
  for (const c of l(this, Js)) {
11354
11237
  const u = c.getAttribute("data-resizer-name");
11355
11238
  c.setAttribute("role", "spinbutton"), c.addEventListener("keydown", r, {
11356
11239
  signal: h
11357
11240
  }), c.addEventListener("blur", a, {
11358
11241
  signal: h
11359
- }), c.addEventListener("focus", w(this, J, Nb).bind(this, u), {
11242
+ }), c.addEventListener("focus", w(this, J, Ib).bind(this, u), {
11360
11243
  signal: h
11361
11244
  }), c.setAttribute("data-l10n-id", at._l10nResizer[u]);
11362
11245
  }
@@ -11394,7 +11277,7 @@ const at = class at {
11394
11277
  });
11395
11278
  }
11396
11279
  _stopResizingWithKeyboard() {
11397
- w(this, J, Jh).call(this), this.div.focus();
11280
+ w(this, J, Kh).call(this), this.div.focus();
11398
11281
  }
11399
11282
  select() {
11400
11283
  var t, e, s;
@@ -11528,21 +11411,21 @@ Jr = new WeakMap(), Js = new WeakMap(), Mt = new WeakMap(), Ro = new WeakMap(),
11528
11411
  default:
11529
11412
  return [1, 0, 0, 1];
11530
11413
  }
11531
- }, Mb = function() {
11414
+ }, kb = function() {
11532
11415
  if (l(this, ve))
11533
11416
  return;
11534
11417
  m(this, ve, document.createElement("div")), l(this, ve).classList.add("resizers");
11535
11418
  const t = this._willKeepAspectRatio ? ["topLeft", "topRight", "bottomRight", "bottomLeft"] : ["topLeft", "topMiddle", "topRight", "middleRight", "bottomRight", "bottomMiddle", "bottomLeft", "middleLeft"], e = this._uiManager._signal;
11536
11419
  for (const s of t) {
11537
11420
  const i = document.createElement("div");
11538
- l(this, ve).append(i), i.classList.add("resizer", s), i.setAttribute("data-resizer-name", s), i.addEventListener("pointerdown", w(this, J, Ob).bind(this, s), {
11421
+ l(this, ve).append(i), i.classList.add("resizer", s), i.setAttribute("data-resizer-name", s), i.addEventListener("pointerdown", w(this, J, Pb).bind(this, s), {
11539
11422
  signal: e
11540
11423
  }), i.addEventListener("contextmenu", gi, {
11541
11424
  signal: e
11542
11425
  }), i.tabIndex = -1;
11543
11426
  }
11544
11427
  this.div.prepend(l(this, ve));
11545
- }, Ob = function(t, e) {
11428
+ }, Pb = function(t, e) {
11546
11429
  var u;
11547
11430
  e.preventDefault();
11548
11431
  const {
@@ -11653,7 +11536,7 @@ Jr = new WeakMap(), Js = new WeakMap(), Mt = new WeakMap(), Ro = new WeakMap(),
11653
11536
  P = f(..._(Y, N));
11654
11537
  const H = O - P[0], it = k - P[1];
11655
11538
  l(this, ds) || m(this, ds, [this.x, this.y, this.width, this.height]), this.width = Y, this.height = N, this.x = H, this.y = it, this.setDims(s * Y, i * N), this.fixAndSetPosition(), this._onResizing();
11656
- }, Db = function() {
11539
+ }, Mb = function() {
11657
11540
  var t;
11658
11541
  m(this, nn, {
11659
11542
  savedX: this.x,
@@ -11661,7 +11544,7 @@ Jr = new WeakMap(), Js = new WeakMap(), Mt = new WeakMap(), Ro = new WeakMap(),
11661
11544
  savedWidth: this.width,
11662
11545
  savedHeight: this.height
11663
11546
  }), (t = l(this, Mt)) == null || t.toggle(!1), this.parent.togglePointerEvents(!1);
11664
- }, Rb = function(t, e, s) {
11547
+ }, Ob = function(t, e, s) {
11665
11548
  let n = 0.7 * (s / e) + 1 - 0.7;
11666
11549
  if (n === 1)
11667
11550
  return;
@@ -11673,7 +11556,7 @@ Jr = new WeakMap(), Js = new WeakMap(), Mt = new WeakMap(), Ro = new WeakMap(),
11673
11556
  l(this, ds) || m(this, ds, [u, d, f, g]);
11674
11557
  const x = a(f / 2, g / 2), C = at._round(u + x[0]), A = at._round(d + x[1]), P = a(_ / 2, b / 2);
11675
11558
  this.x = C - P[0], this.y = A - P[1], this.width = _, this.height = b, this.setDims(h * _, c * b), this.fixAndSetPosition(), this._onResizing();
11676
- }, Lb = function() {
11559
+ }, Db = function() {
11677
11560
  var t;
11678
11561
  (t = l(this, Mt)) == null || t.toggle(!0), this.parent.togglePointerEvents(!0), w(this, J, zu).call(this);
11679
11562
  }, Rg = function(t) {
@@ -11681,7 +11564,7 @@ Jr = new WeakMap(), Js = new WeakMap(), Mt = new WeakMap(), Ro = new WeakMap(),
11681
11564
  isMac: e
11682
11565
  } = Ye.platform;
11683
11566
  t.ctrlKey && !e || t.shiftKey || t.metaKey && e ? this.parent.toggleSelected(this) : this.parent.setSelected(this);
11684
- }, Fb = function(t) {
11567
+ }, Rb = function(t) {
11685
11568
  const {
11686
11569
  isSelected: e
11687
11570
  } = this;
@@ -11732,22 +11615,22 @@ Jr = new WeakMap(), Js = new WeakMap(), Mt = new WeakMap(), Ro = new WeakMap(),
11732
11615
  }), this.div.addEventListener("focusout", this.focusout.bind(this), {
11733
11616
  signal: t
11734
11617
  });
11735
- }, Ib = function(t) {
11618
+ }, Lb = function(t) {
11736
11619
  at._resizerKeyboardManager.exec(this, t);
11737
- }, jb = function(t) {
11620
+ }, Fb = function(t) {
11738
11621
  var e;
11739
- l(this, rn) && ((e = t.relatedTarget) == null ? void 0 : e.parentNode) !== l(this, ve) && w(this, J, Jh).call(this);
11740
- }, Nb = function(t) {
11622
+ l(this, rn) && ((e = t.relatedTarget) == null ? void 0 : e.parentNode) !== l(this, ve) && w(this, J, Kh).call(this);
11623
+ }, Ib = function(t) {
11741
11624
  m(this, Yl, l(this, rn) ? t : "");
11742
11625
  }, Fg = function(t) {
11743
11626
  if (l(this, Js))
11744
11627
  for (const e of l(this, Js))
11745
11628
  e.tabIndex = t;
11746
- }, Jh = function() {
11629
+ }, Kh = function() {
11747
11630
  m(this, rn, !1), w(this, J, Fg).call(this, -1), w(this, J, zu).call(this);
11748
11631
  }, y(at, Kl), K(at, "_l10n", null), K(at, "_l10nResizer", null), K(at, "_borderLineWidth", -1), K(at, "_colorManager", new wg()), K(at, "_zIndex", 1), K(at, "_telemetryTimeout", 1e3);
11749
11632
  let Ht = at;
11750
- class ZS extends Ht {
11633
+ class FS extends Ht {
11751
11634
  constructor(t) {
11752
11635
  super(t), this.annotationElementId = t.annotationElementId, this.deleted = !0;
11753
11636
  }
@@ -11755,10 +11638,10 @@ class ZS extends Ht {
11755
11638
  return this.serializeDeleted();
11756
11639
  }
11757
11640
  }
11758
- const x0 = 3285377520, Ms = 4294901760, bi = 65535;
11759
- class Bb {
11641
+ const w0 = 3285377520, Ms = 4294901760, bi = 65535;
11642
+ class jb {
11760
11643
  constructor(t) {
11761
- this.h1 = t ? t & 4294967295 : x0, this.h2 = t ? t & 4294967295 : x0;
11644
+ this.h1 = t ? t & 4294967295 : w0, this.h2 = t ? t & 4294967295 : w0;
11762
11645
  }
11763
11646
  update(t) {
11764
11647
  let e, s;
@@ -11797,7 +11680,7 @@ const Ig = Object.freeze({
11797
11680
  hash: "",
11798
11681
  transfer: void 0
11799
11682
  });
11800
- var ia, na, ue, Gd, Hb;
11683
+ var ia, na, ue, Gd, Nb;
11801
11684
  class nm {
11802
11685
  constructor() {
11803
11686
  y(this, Gd);
@@ -11829,7 +11712,7 @@ class nm {
11829
11712
  s[n] !== r && (i = !0, s[n] = r);
11830
11713
  else
11831
11714
  i = !0, l(this, ue).set(t, e);
11832
- i && w(this, Gd, Hb).call(this), e instanceof Ht && typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(e.constructor._type);
11715
+ i && w(this, Gd, Nb).call(this), e instanceof Ht && typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(e.constructor._type);
11833
11716
  }
11834
11717
  has(t) {
11835
11718
  return l(this, ue).has(t);
@@ -11848,12 +11731,12 @@ class nm {
11848
11731
  l(this, ia) && (m(this, ia, !1), typeof this.onResetModified == "function" && this.onResetModified());
11849
11732
  }
11850
11733
  get print() {
11851
- return new Gb(this);
11734
+ return new Bb(this);
11852
11735
  }
11853
11736
  get serializable() {
11854
11737
  if (l(this, ue).size === 0)
11855
11738
  return Ig;
11856
- const t = /* @__PURE__ */ new Map(), e = new Bb(), s = [], i = /* @__PURE__ */ Object.create(null);
11739
+ const t = /* @__PURE__ */ new Map(), e = new jb(), s = [], i = /* @__PURE__ */ Object.create(null);
11857
11740
  let n = !1;
11858
11741
  for (const [r, a] of l(this, ue)) {
11859
11742
  const h = a instanceof Ht ? a.serialize(!1, i) : a;
@@ -11910,11 +11793,11 @@ class nm {
11910
11793
  });
11911
11794
  }
11912
11795
  }
11913
- ia = new WeakMap(), na = new WeakMap(), ue = new WeakMap(), Gd = new WeakSet(), Hb = function() {
11796
+ ia = new WeakMap(), na = new WeakMap(), ue = new WeakMap(), Gd = new WeakSet(), Nb = function() {
11914
11797
  l(this, ia) || (m(this, ia, !0), typeof this.onSetModified == "function" && this.onSetModified());
11915
11798
  };
11916
11799
  var Jl;
11917
- class Gb extends nm {
11800
+ class Bb extends nm {
11918
11801
  constructor(e) {
11919
11802
  super();
11920
11803
  y(this, Jl);
@@ -11946,7 +11829,7 @@ class Gb extends nm {
11946
11829
  }
11947
11830
  Jl = new WeakMap();
11948
11831
  var Io;
11949
- class tC {
11832
+ class IS {
11950
11833
  constructor({
11951
11834
  ownerDocument: t = globalThis.document,
11952
11835
  styleElement: e = null
@@ -12081,7 +11964,7 @@ class tC {
12081
11964
  let _ = s(f, p);
12082
11965
  for (n = 0, r = d.length - 3; n < r; n += 4)
12083
11966
  _ = _ - v + s(d, n) | 0;
12084
- n < d.length && (_ = _ - v + s(d + "XXX", n) | 0), f = i(f, p, 4, BS(_));
11967
+ n < d.length && (_ = _ - v + s(d + "XXX", n) | 0), f = i(f, p, 4, wS(_));
12085
11968
  const b = `url(data:font/opentype;base64,${btoa(f)});`, x = `@font-face {font-family:"${d}";src:${b}}`;
12086
11969
  this.insertRule(x);
12087
11970
  const C = this._document.createElement("div");
@@ -12096,7 +11979,7 @@ class tC {
12096
11979
  }
12097
11980
  }
12098
11981
  Io = new WeakMap();
12099
- class eC {
11982
+ class jS {
12100
11983
  constructor(t, {
12101
11984
  disableFontFace: e = !1,
12102
11985
  fontExtraProperties: s = !1,
@@ -12126,7 +12009,7 @@ class eC {
12126
12009
  var s;
12127
12010
  if (!this.data || this.disableFontFace)
12128
12011
  return null;
12129
- const t = `url(data:${this.mimetype};base64,${XS(this.data)});`;
12012
+ const t = `url(data:${this.mimetype};base64,${ES(this.data)});`;
12130
12013
  let e;
12131
12014
  if (!this.cssFontInfo)
12132
12015
  e = `@font-face {font-family:"${this.loadedName}";src:${t}}`;
@@ -12163,10 +12046,10 @@ const Pu = {
12163
12046
  PULL_COMPLETE: 7,
12164
12047
  START_COMPLETE: 8
12165
12048
  };
12166
- function S0() {
12049
+ function x0() {
12167
12050
  }
12168
12051
  function ts(o) {
12169
- if (o instanceof _r || o instanceof pg || o instanceof xl || o instanceof y0 || o instanceof Ed || o instanceof Uf)
12052
+ if (o instanceof _r || o instanceof pg || o instanceof xl || o instanceof b0 || o instanceof Ed || o instanceof Uf)
12170
12053
  return o;
12171
12054
  switch (o instanceof Error || typeof o == "object" && o !== null || Et('wrapReason: Expected "reason" to be a (possibly cloned) Error.'), o.name) {
12172
12055
  case "AbortException":
@@ -12176,7 +12059,7 @@ function ts(o) {
12176
12059
  case "MissingPDFException":
12177
12060
  return new xl(o.message);
12178
12061
  case "PasswordException":
12179
- return new y0(o.message, o.code);
12062
+ return new b0(o.message, o.code);
12180
12063
  case "UnexpectedResponseException":
12181
12064
  return new Ed(o.message, o.status);
12182
12065
  case "UnknownErrorException":
@@ -12184,12 +12067,12 @@ function ts(o) {
12184
12067
  }
12185
12068
  return new Uf(o.message, o.toString());
12186
12069
  }
12187
- var jo, Vs, Vb, Wb, zb, Xu;
12188
- class Qh {
12070
+ var jo, Vs, Hb, Gb, Vb, Xu;
12071
+ class Jh {
12189
12072
  constructor(t, e, s) {
12190
12073
  y(this, Vs);
12191
12074
  y(this, jo, new AbortController());
12192
- this.sourceName = t, this.targetName = e, this.comObj = s, this.callbackId = 1, this.streamId = 1, this.streamSinks = /* @__PURE__ */ Object.create(null), this.streamControllers = /* @__PURE__ */ Object.create(null), this.callbackCapabilities = /* @__PURE__ */ Object.create(null), this.actionHandler = /* @__PURE__ */ Object.create(null), s.addEventListener("message", w(this, Vs, Vb).bind(this), {
12075
+ this.sourceName = t, this.targetName = e, this.comObj = s, this.callbackId = 1, this.streamId = 1, this.streamSinks = /* @__PURE__ */ Object.create(null), this.streamControllers = /* @__PURE__ */ Object.create(null), this.callbackCapabilities = /* @__PURE__ */ Object.create(null), this.actionHandler = /* @__PURE__ */ Object.create(null), s.addEventListener("message", w(this, Vs, Hb).bind(this), {
12193
12076
  signal: l(this, jo).signal
12194
12077
  });
12195
12078
  }
@@ -12271,13 +12154,13 @@ class Qh {
12271
12154
  (t = l(this, jo)) == null || t.abort(), m(this, jo, null);
12272
12155
  }
12273
12156
  }
12274
- jo = new WeakMap(), Vs = new WeakSet(), Vb = function({
12157
+ jo = new WeakMap(), Vs = new WeakSet(), Hb = function({
12275
12158
  data: t
12276
12159
  }) {
12277
12160
  if (t.targetName !== this.sourceName)
12278
12161
  return;
12279
12162
  if (t.stream) {
12280
- w(this, Vs, zb).call(this, t);
12163
+ w(this, Vs, Vb).call(this, t);
12281
12164
  return;
12282
12165
  }
12283
12166
  if (t.callback) {
@@ -12317,11 +12200,11 @@ jo = new WeakMap(), Vs = new WeakSet(), Vb = function({
12317
12200
  return;
12318
12201
  }
12319
12202
  if (t.streamId) {
12320
- w(this, Vs, Wb).call(this, t);
12203
+ w(this, Vs, Gb).call(this, t);
12321
12204
  return;
12322
12205
  }
12323
12206
  e(t.data);
12324
- }, Wb = function(t) {
12207
+ }, Gb = function(t) {
12325
12208
  const e = t.streamId, s = this.sourceName, i = t.sourceName, n = this.comObj, r = this, a = this.actionHandler[t.action], h = {
12326
12209
  enqueue(c, u = 1, d) {
12327
12210
  if (this.isCancelled)
@@ -12376,7 +12259,7 @@ jo = new WeakMap(), Vs = new WeakSet(), Vb = function({
12376
12259
  reason: ts(c)
12377
12260
  });
12378
12261
  });
12379
- }, zb = function(t) {
12262
+ }, Vb = function(t) {
12380
12263
  const e = t.streamId, s = this.sourceName, i = t.sourceName, n = this.comObj, r = this.streamControllers[e], a = this.streamSinks[e];
12381
12264
  switch (t.stream) {
12382
12265
  case Qt.START_COMPLETE:
@@ -12396,7 +12279,7 @@ jo = new WeakMap(), Vs = new WeakSet(), Vb = function({
12396
12279
  });
12397
12280
  break;
12398
12281
  }
12399
- a.desiredSize <= 0 && t.desiredSize > 0 && a.sinkCapability.resolve(), a.desiredSize = t.desiredSize, Promise.try(a.onPull || S0).then(function() {
12282
+ a.desiredSize <= 0 && t.desiredSize > 0 && a.sinkCapability.resolve(), a.desiredSize = t.desiredSize, Promise.try(a.onPull || x0).then(function() {
12400
12283
  n.postMessage({
12401
12284
  sourceName: s,
12402
12285
  targetName: i,
@@ -12434,7 +12317,7 @@ jo = new WeakMap(), Vs = new WeakSet(), Vb = function({
12434
12317
  if (!a)
12435
12318
  break;
12436
12319
  const h = ts(t.reason);
12437
- Promise.try(a.onCancel || S0, h).then(function() {
12320
+ Promise.try(a.onCancel || x0, h).then(function() {
12438
12321
  n.postMessage({
12439
12322
  sourceName: s,
12440
12323
  targetName: i,
@@ -12460,7 +12343,7 @@ jo = new WeakMap(), Vs = new WeakSet(), Vb = function({
12460
12343
  await Promise.allSettled([(s = t.startCall) == null ? void 0 : s.promise, (i = t.pullCall) == null ? void 0 : i.promise, (n = t.cancelCall) == null ? void 0 : n.promise]), delete this.streamControllers[e];
12461
12344
  };
12462
12345
  var Ql;
12463
- class Xb {
12346
+ class Wb {
12464
12347
  constructor({
12465
12348
  enableHWA: t = !1
12466
12349
  }) {
@@ -12495,7 +12378,7 @@ class Xb {
12495
12378
  }
12496
12379
  }
12497
12380
  Ql = new WeakMap();
12498
- class sC extends Xb {
12381
+ class NS extends Wb {
12499
12382
  constructor({
12500
12383
  ownerDocument: t = globalThis.document,
12501
12384
  enableHWA: e = !1
@@ -12509,7 +12392,7 @@ class sC extends Xb {
12509
12392
  return s.width = t, s.height = e, s;
12510
12393
  }
12511
12394
  }
12512
- class Ub {
12395
+ class zb {
12513
12396
  constructor({
12514
12397
  baseUrl: t = null,
12515
12398
  isCompressed: e = !0
@@ -12535,13 +12418,13 @@ class Ub {
12535
12418
  Et("Abstract method `_fetch` called.");
12536
12419
  }
12537
12420
  }
12538
- class Yb extends Ub {
12421
+ class Xb extends zb {
12539
12422
  async _fetch(t) {
12540
12423
  const e = await yf(t, this.isCompressed ? "arraybuffer" : "text");
12541
12424
  return e instanceof ArrayBuffer ? new Uint8Array(e) : bf(e);
12542
12425
  }
12543
12426
  }
12544
- class $b {
12427
+ class Ub {
12545
12428
  addFilter(t) {
12546
12429
  return "none";
12547
12430
  }
@@ -12560,8 +12443,8 @@ class $b {
12560
12443
  destroy(t = !1) {
12561
12444
  }
12562
12445
  }
12563
- var ra, No, an, on, Te, aa, oa, W, Se, Zh, ro, Uu, ao, qb, jg, oo, tl, el, Ng, sl;
12564
- class iC extends $b {
12446
+ var ra, No, an, on, Te, aa, oa, W, Se, Qh, ro, Uu, ao, Yb, jg, oo, Zh, tl, Ng, el;
12447
+ class BS extends Ub {
12565
12448
  constructor({
12566
12449
  docId: e,
12567
12450
  ownerDocument: s = globalThis.document
@@ -12589,21 +12472,21 @@ class iC extends $b {
12589
12472
  const h = `g_${l(this, on)}_transfer_map_${je(this, oa)._++}`, c = w(this, W, ao).call(this, h);
12590
12473
  l(this, W, Se).set(e, c), l(this, W, Se).set(a, c);
12591
12474
  const u = w(this, W, oo).call(this, h);
12592
- return w(this, W, el).call(this, i, n, r, u), c;
12475
+ return w(this, W, tl).call(this, i, n, r, u), c;
12593
12476
  }
12594
12477
  addHCMFilter(e, s) {
12595
12478
  var p;
12596
12479
  const i = `${e}-${s}`, n = "base";
12597
- let r = l(this, W, Zh).get(n);
12480
+ let r = l(this, W, Qh).get(n);
12598
12481
  if ((r == null ? void 0 : r.key) === i || (r ? ((p = r.filter) == null || p.remove(), r.key = i, r.url = "none", r.filter = null) : (r = {
12599
12482
  key: i,
12600
12483
  url: "none",
12601
12484
  filter: null
12602
- }, l(this, W, Zh).set(n, r)), !e || !s))
12485
+ }, l(this, W, Qh).set(n, r)), !e || !s))
12603
12486
  return r.url;
12604
- const a = w(this, W, sl).call(this, e);
12487
+ const a = w(this, W, el).call(this, e);
12605
12488
  e = q.makeHexColor(...a);
12606
- const h = w(this, W, sl).call(this, s);
12489
+ const h = w(this, W, el).call(this, s);
12607
12490
  if (s = q.makeHexColor(...h), l(this, W, ro).style.color = "", e === "#000000" && s === "#ffffff" || e === s)
12608
12491
  return r.url;
12609
12492
  const c = new Array(256);
@@ -12612,14 +12495,14 @@ class iC extends $b {
12612
12495
  c[v] = _ <= 0.03928 ? _ / 12.92 : ((_ + 0.055) / 1.055) ** 2.4;
12613
12496
  }
12614
12497
  const u = c.join(","), d = `g_${l(this, on)}_hcm_filter`, f = r.filter = w(this, W, oo).call(this, d);
12615
- w(this, W, el).call(this, u, u, u, f), w(this, W, jg).call(this, f);
12498
+ w(this, W, tl).call(this, u, u, u, f), w(this, W, jg).call(this, f);
12616
12499
  const g = (v, _) => {
12617
12500
  const b = a[v] / 255, x = h[v] / 255, C = new Array(_ + 1);
12618
12501
  for (let A = 0; A <= _; A++)
12619
12502
  C[A] = b + A / _ * (x - b);
12620
12503
  return C.join(",");
12621
12504
  };
12622
- return w(this, W, el).call(this, g(0, 5), g(1, 5), g(2, 5), f), r.url = w(this, W, ao).call(this, d), r.url;
12505
+ return w(this, W, tl).call(this, g(0, 5), g(1, 5), g(2, 5), f), r.url = w(this, W, ao).call(this, d), r.url;
12623
12506
  }
12624
12507
  addAlphaFilter(e) {
12625
12508
  let s = l(this, W, Se).get(e);
@@ -12643,20 +12526,20 @@ class iC extends $b {
12643
12526
  const r = `g_${l(this, on)}_luminosity_map_${je(this, oa)._++}`, a = w(this, W, ao).call(this, r);
12644
12527
  l(this, W, Se).set(e, a), l(this, W, Se).set(n, a);
12645
12528
  const h = w(this, W, oo).call(this, r);
12646
- return w(this, W, qb).call(this, h), e && w(this, W, Ng).call(this, i, h), a;
12529
+ return w(this, W, Yb).call(this, h), e && w(this, W, Ng).call(this, i, h), a;
12647
12530
  }
12648
12531
  addHighlightHCMFilter(e, s, i, n, r) {
12649
12532
  var x;
12650
12533
  const a = `${s}-${i}-${n}-${r}`;
12651
- let h = l(this, W, Zh).get(e);
12534
+ let h = l(this, W, Qh).get(e);
12652
12535
  if ((h == null ? void 0 : h.key) === a || (h ? ((x = h.filter) == null || x.remove(), h.key = a, h.url = "none", h.filter = null) : (h = {
12653
12536
  key: a,
12654
12537
  url: "none",
12655
12538
  filter: null
12656
- }, l(this, W, Zh).set(e, h)), !s || !i))
12539
+ }, l(this, W, Qh).set(e, h)), !s || !i))
12657
12540
  return h.url;
12658
- const [c, u] = [s, i].map(w(this, W, sl).bind(this));
12659
- let d = Math.round(0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2]), f = Math.round(0.2126 * u[0] + 0.7152 * u[1] + 0.0722 * u[2]), [g, p] = [n, r].map(w(this, W, sl).bind(this));
12541
+ const [c, u] = [s, i].map(w(this, W, el).bind(this));
12542
+ let d = Math.round(0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2]), f = Math.round(0.2126 * u[0] + 0.7152 * u[1] + 0.0722 * u[2]), [g, p] = [n, r].map(w(this, W, el).bind(this));
12660
12543
  f < d && ([d, f, g, p] = [f, d, p, g]), l(this, W, ro).style.color = "";
12661
12544
  const v = (C, A, P) => {
12662
12545
  const O = new Array(256), k = (f - d) / P, M = C / 255, R = (A - C) / (255 * P);
@@ -12671,7 +12554,7 @@ class iC extends $b {
12671
12554
  O[I] = O[F - 1];
12672
12555
  return O.join(",");
12673
12556
  }, _ = `g_${l(this, on)}_hcm_${e}_filter`, b = h.filter = w(this, W, oo).call(this, _);
12674
- return w(this, W, jg).call(this, b), w(this, W, el).call(this, v(g[0], p[0], 5), v(g[1], p[1], 5), v(g[2], p[2], 5), b), h.url = w(this, W, ao).call(this, _), h.url;
12557
+ return w(this, W, jg).call(this, b), w(this, W, tl).call(this, v(g[0], p[0], 5), v(g[1], p[1], 5), v(g[2], p[2], 5), b), h.url = w(this, W, ao).call(this, _), h.url;
12675
12558
  }
12676
12559
  destroy(e = !1) {
12677
12560
  var s, i, n, r;
@@ -12680,7 +12563,7 @@ class iC extends $b {
12680
12563
  }
12681
12564
  ra = new WeakMap(), No = new WeakMap(), an = new WeakMap(), on = new WeakMap(), Te = new WeakMap(), aa = new WeakMap(), oa = new WeakMap(), W = new WeakSet(), Se = function() {
12682
12565
  return l(this, No) || m(this, No, /* @__PURE__ */ new Map());
12683
- }, Zh = function() {
12566
+ }, Qh = function() {
12684
12567
  return l(this, aa) || m(this, aa, /* @__PURE__ */ new Map());
12685
12568
  }, ro = function() {
12686
12569
  if (!l(this, an)) {
@@ -12711,7 +12594,7 @@ ra = new WeakMap(), No = new WeakMap(), an = new WeakMap(), on = new WeakMap(),
12711
12594
  s !== l(this, Te).baseURI && (_f(s) ? rt('#createUrl: ignore "data:"-URL for performance reasons.') : m(this, ra, s.split("#", 1)[0]));
12712
12595
  }
12713
12596
  return `url(${l(this, ra)}#${e})`;
12714
- }, qb = function(e) {
12597
+ }, Yb = function(e) {
12715
12598
  const s = l(this, Te).createElementNS(Xi, "feColorMatrix");
12716
12599
  s.setAttribute("type", "matrix"), s.setAttribute("values", "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"), e.append(s);
12717
12600
  }, jg = function(e) {
@@ -12720,19 +12603,19 @@ ra = new WeakMap(), No = new WeakMap(), an = new WeakMap(), on = new WeakMap(),
12720
12603
  }, oo = function(e) {
12721
12604
  const s = l(this, Te).createElementNS(Xi, "filter");
12722
12605
  return s.setAttribute("color-interpolation-filters", "sRGB"), s.setAttribute("id", e), l(this, W, ro).append(s), s;
12723
- }, tl = function(e, s, i) {
12606
+ }, Zh = function(e, s, i) {
12724
12607
  const n = l(this, Te).createElementNS(Xi, s);
12725
12608
  n.setAttribute("type", "discrete"), n.setAttribute("tableValues", i), e.append(n);
12726
- }, el = function(e, s, i, n) {
12609
+ }, tl = function(e, s, i, n) {
12727
12610
  const r = l(this, Te).createElementNS(Xi, "feComponentTransfer");
12728
- n.append(r), w(this, W, tl).call(this, r, "feFuncR", e), w(this, W, tl).call(this, r, "feFuncG", s), w(this, W, tl).call(this, r, "feFuncB", i);
12611
+ n.append(r), w(this, W, Zh).call(this, r, "feFuncR", e), w(this, W, Zh).call(this, r, "feFuncG", s), w(this, W, Zh).call(this, r, "feFuncB", i);
12729
12612
  }, Ng = function(e, s) {
12730
12613
  const i = l(this, Te).createElementNS(Xi, "feComponentTransfer");
12731
- s.append(i), w(this, W, tl).call(this, i, "feFuncA", e);
12732
- }, sl = function(e) {
12614
+ s.append(i), w(this, W, Zh).call(this, i, "feFuncA", e);
12615
+ }, el = function(e) {
12733
12616
  return l(this, W, ro).style.color = e, im(getComputedStyle(l(this, W, ro)).getPropertyValue("color"));
12734
12617
  };
12735
- class Kb {
12618
+ class $b {
12736
12619
  constructor({
12737
12620
  baseUrl: t = null
12738
12621
  }) {
@@ -12754,32 +12637,32 @@ class Kb {
12754
12637
  Et("Abstract method `_fetch` called.");
12755
12638
  }
12756
12639
  }
12757
- class Jb extends Kb {
12640
+ class qb extends $b {
12758
12641
  async _fetch(t) {
12759
12642
  const e = await yf(t, "arraybuffer");
12760
12643
  return new Uint8Array(e);
12761
12644
  }
12762
12645
  }
12763
12646
  Re && rt("Please use the `legacy` build in Node.js environments.");
12764
- async function Qb(o) {
12647
+ async function Kb(o) {
12765
12648
  const e = await process.getBuiltinModule("fs").promises.readFile(o);
12766
12649
  return new Uint8Array(e);
12767
12650
  }
12768
- class nC extends $b {
12651
+ class HS extends Ub {
12769
12652
  }
12770
- class rC extends Xb {
12653
+ class GS extends Wb {
12771
12654
  _createCanvas(t, e) {
12772
12655
  return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t, e);
12773
12656
  }
12774
12657
  }
12775
- class aC extends Ub {
12658
+ class VS extends zb {
12776
12659
  async _fetch(t) {
12777
- return Qb(t);
12660
+ return Kb(t);
12778
12661
  }
12779
12662
  }
12780
- class oC extends Kb {
12663
+ class WS extends $b {
12781
12664
  async _fetch(t) {
12782
- return Qb(t);
12665
+ return Kb(t);
12783
12666
  }
12784
12667
  }
12785
12668
  const De = {
@@ -12798,7 +12681,7 @@ class rm {
12798
12681
  Et("Abstract method `getPattern` called.");
12799
12682
  }
12800
12683
  }
12801
- class hC extends rm {
12684
+ class zS extends rm {
12802
12685
  constructor(t) {
12803
12686
  super(), this._type = t[1], this._bbox = t[2], this._colorStops = t[3], this._p0 = t[4], this._p1 = t[5], this._r0 = t[6], this._r1 = t[7], this.matrix = null;
12804
12687
  }
@@ -12846,7 +12729,7 @@ function qf(o, t, e, s, i, n, r, a) {
12846
12729
  xt = (H - ut) / (H - et), xt < 0 ? xt = 0 : xt > 1 && (xt = 1), u[kt++] = it - (it - At) * xt | 0, u[kt++] = j - (j - Gt) * xt | 0, u[kt++] = G - (G - Kt) * xt | 0, u[kt++] = 255;
12847
12730
  }
12848
12731
  }
12849
- function lC(o, t, e) {
12732
+ function XS(o, t, e) {
12850
12733
  const s = t.coords, i = t.colors;
12851
12734
  let n, r;
12852
12735
  switch (t.type) {
@@ -12866,7 +12749,7 @@ function lC(o, t, e) {
12866
12749
  throw new Error("illegal figure");
12867
12750
  }
12868
12751
  }
12869
- class cC extends rm {
12752
+ class US extends rm {
12870
12753
  constructor(t) {
12871
12754
  super(), this._coords = t[2], this._colors = t[3], this._figures = t[4], this._bounds = t[5], this._bbox = t[7], this._background = t[8], this.matrix = null;
12872
12755
  }
@@ -12885,7 +12768,7 @@ class cC extends rm {
12885
12768
  O[k] = e[0], O[k + 1] = e[1], O[k + 2] = e[2], O[k + 3] = 255;
12886
12769
  }
12887
12770
  for (const O of this._figures)
12888
- lC(A, O, v);
12771
+ XS(A, O, v);
12889
12772
  return C.putImageData(A, 2, 2), {
12890
12773
  canvas: x.canvas,
12891
12774
  offsetX: a - 2 * g,
@@ -12907,23 +12790,23 @@ class cC extends rm {
12907
12790
  return i !== De.SHADING && (t.setTransform(...e.baseTransform), this.matrix && t.transform(...this.matrix)), t.translate(r.offsetX, r.offsetY), t.scale(r.scaleX, r.scaleY), t.createPattern(r.canvas, "no-repeat");
12908
12791
  }
12909
12792
  }
12910
- class uC extends rm {
12793
+ class YS extends rm {
12911
12794
  getPattern() {
12912
12795
  return "hotpink";
12913
12796
  }
12914
12797
  }
12915
- function dC(o) {
12798
+ function $S(o) {
12916
12799
  switch (o[0]) {
12917
12800
  case "RadialAxial":
12918
- return new hC(o);
12801
+ return new zS(o);
12919
12802
  case "Mesh":
12920
- return new cC(o);
12803
+ return new US(o);
12921
12804
  case "Dummy":
12922
- return new uC();
12805
+ return new YS();
12923
12806
  }
12924
12807
  throw new Error(`Unknown IR type: ${o[0]}`);
12925
12808
  }
12926
- const C0 = {
12809
+ const S0 = {
12927
12810
  COLORED: 1,
12928
12811
  UNCOLORED: 2
12929
12812
  }, Vd = class Vd {
@@ -12987,16 +12870,16 @@ const C0 = {
12987
12870
  setFillAndStrokeStyleToContext(t, e, s) {
12988
12871
  const i = t.ctx, n = t.current;
12989
12872
  switch (e) {
12990
- case C0.COLORED:
12873
+ case S0.COLORED:
12991
12874
  const r = this.ctx;
12992
12875
  i.fillStyle = r.fillStyle, i.strokeStyle = r.strokeStyle, n.fillColor = r.fillStyle, n.strokeColor = r.strokeStyle;
12993
12876
  break;
12994
- case C0.UNCOLORED:
12877
+ case S0.UNCOLORED:
12995
12878
  const a = q.makeHexColor(s[0], s[1], s[2]);
12996
12879
  i.fillStyle = a, i.strokeStyle = a, n.fillColor = a, n.strokeColor = a;
12997
12880
  break;
12998
12881
  default:
12999
- throw new NS(`Unsupported paint type: ${e}`);
12882
+ throw new _S(`Unsupported paint type: ${e}`);
13000
12883
  }
13001
12884
  }
13002
12885
  getPattern(t, e, s, i) {
@@ -13011,7 +12894,7 @@ const C0 = {
13011
12894
  };
13012
12895
  K(Vd, "MAX_PATTERN_SIZE", 3e3);
13013
12896
  let Hg = Vd;
13014
- function fC({
12897
+ function qS({
13015
12898
  src: o,
13016
12899
  srcPos: t = 0,
13017
12900
  dest: e,
@@ -13039,8 +12922,8 @@ function fC({
13039
12922
  destPos: g
13040
12923
  };
13041
12924
  }
13042
- const A0 = 16, T0 = 100, gC = 15, E0 = 10, k0 = 1e3, rs = 16;
13043
- function pC(o, t) {
12925
+ const C0 = 16, A0 = 100, KS = 15, T0 = 10, E0 = 1e3, rs = 16;
12926
+ function JS(o, t) {
13044
12927
  if (o._removeMirroring)
13045
12928
  throw new Error("Context is already forwarding operations.");
13046
12929
  o.__originalSave = o.save, o.__originalRestore = o.restore, o.__originalRotate = o.rotate, o.__originalScale = o.scale, o.__originalTranslate = o.translate, o.__originalTransform = o.transform, o.__originalSetTransform = o.setTransform, o.__originalResetTransform = o.resetTransform, o.__originalClip = o.clip, o.__originalMoveTo = o.moveTo, o.__originalLineTo = o.lineTo, o.__originalBezierCurveTo = o.bezierCurveTo, o.__originalRect = o.rect, o.__originalClosePath = o.closePath, o.__originalBeginPath = o.beginPath, o._removeMirroring = () => {
@@ -13077,7 +12960,7 @@ function pC(o, t) {
13077
12960
  t.beginPath(), this.__originalBeginPath();
13078
12961
  };
13079
12962
  }
13080
- class mC {
12963
+ class QS {
13081
12964
  constructor(t) {
13082
12965
  this.canvasFactory = t, this.cache = /* @__PURE__ */ Object.create(null);
13083
12966
  }
@@ -13109,12 +12992,12 @@ function Mu(o, t, e, s, i, n, r, a, h, c) {
13109
12992
  const _ = Math.hypot(u, d), b = Math.hypot(f, g);
13110
12993
  return [_ * h, b * c];
13111
12994
  }
13112
- function vC(o) {
12995
+ function ZS(o) {
13113
12996
  const {
13114
12997
  width: t,
13115
12998
  height: e
13116
12999
  } = o;
13117
- if (t > k0 || e > k0)
13000
+ if (t > E0 || e > E0)
13118
13001
  return null;
13119
13002
  const s = 1e3, i = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]), n = t + 1;
13120
13003
  let r = new Uint8Array(n * (e + 1)), a, h, c;
@@ -13165,9 +13048,9 @@ function vC(o) {
13165
13048
  b.save(), b.scale(1 / t, -1 / e), b.translate(0, -e), b.fill(v), b.beginPath(), b.restore();
13166
13049
  };
13167
13050
  }
13168
- class P0 {
13051
+ class k0 {
13169
13052
  constructor(t, e) {
13170
- this.alphaIsShape = !1, this.fontSize = 0, this.fontSizeScale = 1, this.textMatrix = hb, this.textMatrixScale = 1, this.fontMatrix = gg, this.leading = 0, this.x = 0, this.y = 0, this.lineX = 0, this.lineY = 0, this.charSpacing = 0, this.wordSpacing = 0, this.textHScale = 1, this.textRenderingMode = xe.FILL, this.textRise = 0, this.fillColor = "#000000", this.strokeColor = "#000000", this.patternFill = !1, this.patternStroke = !1, this.fillAlpha = 1, this.strokeAlpha = 1, this.lineWidth = 1, this.activeSMask = null, this.transferMaps = "none", this.startNewPathAndClipBox([0, 0, t, e]);
13053
+ this.alphaIsShape = !1, this.fontSize = 0, this.fontSizeScale = 1, this.textMatrix = ab, this.textMatrixScale = 1, this.fontMatrix = gg, this.leading = 0, this.x = 0, this.y = 0, this.lineX = 0, this.lineY = 0, this.charSpacing = 0, this.wordSpacing = 0, this.textHScale = 1, this.textRenderingMode = xe.FILL, this.textRise = 0, this.fillColor = "#000000", this.strokeColor = "#000000", this.patternFill = !1, this.patternStroke = !1, this.fillAlpha = 1, this.strokeAlpha = 1, this.lineWidth = 1, this.activeSMask = null, this.transferMaps = "none", this.startNewPathAndClipBox([0, 0, t, e]);
13171
13054
  }
13172
13055
  clone() {
13173
13056
  const t = Object.create(this);
@@ -13213,7 +13096,7 @@ class P0 {
13213
13096
  return q.intersect(this.clipBox, this.getPathBoundingBox(t, e));
13214
13097
  }
13215
13098
  }
13216
- function M0(o, t) {
13099
+ function P0(o, t) {
13217
13100
  if (t instanceof ImageData) {
13218
13101
  o.putImageData(t, 0, 0);
13219
13102
  return;
@@ -13252,7 +13135,7 @@ function M0(o, t) {
13252
13135
  else
13253
13136
  throw new Error(`bad image kind: ${t.kind}`);
13254
13137
  }
13255
- function O0(o, t) {
13138
+ function M0(o, t) {
13256
13139
  if (t.bitmap) {
13257
13140
  o.drawImage(t.bitmap, 0, 0);
13258
13141
  return;
@@ -13264,7 +13147,7 @@ function O0(o, t) {
13264
13147
  const f = d < n ? rs : i;
13265
13148
  ({
13266
13149
  srcPos: h
13267
- } = fC({
13150
+ } = qS({
13268
13151
  src: c,
13269
13152
  srcPos: h,
13270
13153
  dest: u,
@@ -13288,7 +13171,7 @@ function Ou(o) {
13288
13171
  t !== "none" && t !== "" && (o.filter = "none");
13289
13172
  }
13290
13173
  }
13291
- function D0(o, t) {
13174
+ function O0(o, t) {
13292
13175
  if (t)
13293
13176
  return !0;
13294
13177
  const e = q.singularValueDecompose2dScale(o);
@@ -13296,7 +13179,7 @@ function D0(o, t) {
13296
13179
  const s = Math.fround((globalThis.devicePixelRatio || 1) * wr.PDF_TO_CSS_UNITS);
13297
13180
  return e[0] <= s && e[1] <= s;
13298
13181
  }
13299
- const bC = ["butt", "round", "square"], yC = ["miter", "round", "bevel"], _C = {}, R0 = {};
13182
+ const tC = ["butt", "round", "square"], eC = ["miter", "round", "bevel"], sC = {}, D0 = {};
13300
13183
  var pi, Gg, Vg, Wg;
13301
13184
  const cm = class cm {
13302
13185
  constructor(t, e, s, i, n, {
@@ -13304,7 +13187,7 @@ const cm = class cm {
13304
13187
  markedContentStack: a = null
13305
13188
  }, h, c) {
13306
13189
  y(this, pi);
13307
- this.ctx = t, this.current = new P0(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = a || [], this.optionalContentConfig = r, this.cachedCanvases = new mC(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = h, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = c, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
13190
+ this.ctx = t, this.current = new k0(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = a || [], this.optionalContentConfig = r, this.cachedCanvases = new QS(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = h, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = c, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
13308
13191
  }
13309
13192
  getObject(t, e = null) {
13310
13193
  return typeof t == "string" ? t.startsWith("g_") ? this.commonObjs.get(t) : this.objs.get(t) : e;
@@ -13328,7 +13211,7 @@ const cm = class cm {
13328
13211
  const h = n.length;
13329
13212
  if (h === a)
13330
13213
  return a;
13331
- const c = h - a > E0 && typeof s == "function", u = c ? Date.now() + gC : 0;
13214
+ const c = h - a > T0 && typeof s == "function", u = c ? Date.now() + KS : 0;
13332
13215
  let d = 0;
13333
13216
  const f = this.commonObjs, g = this.objs;
13334
13217
  let p;
@@ -13345,7 +13228,7 @@ const cm = class cm {
13345
13228
  }
13346
13229
  if (a++, a === h)
13347
13230
  return a;
13348
- if (c && ++d > E0) {
13231
+ if (c && ++d > T0) {
13349
13232
  if (Date.now() > u)
13350
13233
  return s(), a;
13351
13234
  d = 0;
@@ -13394,11 +13277,11 @@ const cm = class cm {
13394
13277
  }
13395
13278
  u = R;
13396
13279
  }
13397
- u || (d = this.cachedCanvases.getCanvas("maskCanvas", s, i), O0(d.context, t));
13280
+ u || (d = this.cachedCanvases.getCanvas("maskCanvas", s, i), M0(d.context, t));
13398
13281
  let f = q.transform(a, [1 / s, 0, 0, -1 / i, 0, 0]);
13399
13282
  f = q.transform(f, [1, 0, 0, 1, 0, -i]);
13400
13283
  const [g, p, v, _] = q.getAxialAlignedBoundingBox([0, 0, s, i], f), b = Math.round(v - g) || 1, x = Math.round(_ - p) || 1, C = this.cachedCanvases.getCanvas("fillCanvas", b, x), A = C.context, P = g, O = p;
13401
- A.translate(-P, -O), A.transform(...f), u || (u = this._scaleImage(d.canvas, vi(A)), u = u.img, h && r && h.set(c, u)), A.imageSmoothingEnabled = D0(Dt(A), t.interpolate), Mu(A, u, 0, 0, u.width, u.height, 0, 0, s, i), A.globalCompositeOperation = "source-in";
13284
+ A.translate(-P, -O), A.transform(...f), u || (u = this._scaleImage(d.canvas, vi(A)), u = u.img, h && r && h.set(c, u)), A.imageSmoothingEnabled = O0(Dt(A), t.interpolate), Mu(A, u, 0, 0, u.width, u.height, 0, 0, s, i), A.globalCompositeOperation = "source-in";
13402
13285
  const k = q.transform(vi(A), [1, 0, 0, 1, -P, -O]);
13403
13286
  return A.fillStyle = r ? n.getPattern(e, this, k, De.FILL) : n, A.fillRect(0, 0, s, i), h && !r && (this.cachedCanvases.delete("fillCanvas"), h.set(c, C.canvas)), {
13404
13287
  canvas: C.canvas,
@@ -13410,10 +13293,10 @@ const cm = class cm {
13410
13293
  t !== this.current.lineWidth && (this._cachedScaleForStroking[0] = -1), this.current.lineWidth = t, this.ctx.lineWidth = t;
13411
13294
  }
13412
13295
  setLineCap(t) {
13413
- this.ctx.lineCap = bC[t];
13296
+ this.ctx.lineCap = tC[t];
13414
13297
  }
13415
13298
  setLineJoin(t) {
13416
- this.ctx.lineJoin = yC[t];
13299
+ this.ctx.lineJoin = eC[t];
13417
13300
  }
13418
13301
  setMiterLimit(t) {
13419
13302
  this.ctx.miterLimit = t;
@@ -13483,7 +13366,7 @@ const cm = class cm {
13483
13366
  const t = this.ctx.canvas.width, e = this.ctx.canvas.height, s = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(s, t, e);
13484
13367
  this.suspendedCtx = this.ctx, this.ctx = i.context;
13485
13368
  const n = this.ctx;
13486
- n.setTransform(...Dt(this.suspendedCtx)), Gh(this.suspendedCtx, n), pC(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
13369
+ n.setTransform(...Dt(this.suspendedCtx)), Gh(this.suspendedCtx, n), JS(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
13487
13370
  }
13488
13371
  endSMaskMode() {
13489
13372
  if (!this.inSMaskMode)
@@ -13597,13 +13480,13 @@ const cm = class cm {
13597
13480
  this.consumePath();
13598
13481
  }
13599
13482
  clip() {
13600
- this.pendingClip = _C;
13483
+ this.pendingClip = sC;
13601
13484
  }
13602
13485
  eoClip() {
13603
- this.pendingClip = R0;
13486
+ this.pendingClip = D0;
13604
13487
  }
13605
13488
  beginText() {
13606
- this.current.textMatrix = hb, this.current.textMatrixScale = 1, this.current.x = this.current.lineX = 0, this.current.y = this.current.lineY = 0;
13489
+ this.current.textMatrix = ab, this.current.textMatrixScale = 1, this.current.x = this.current.lineX = 0, this.current.y = this.current.lineY = 0;
13607
13490
  }
13608
13491
  endText() {
13609
13492
  const t = this.pendingTextPaths, e = this.ctx;
@@ -13646,7 +13529,7 @@ const cm = class cm {
13646
13529
  s.black ? a = "900" : s.bold && (a = "bold");
13647
13530
  const h = s.italic ? "italic" : "normal";
13648
13531
  let c = e;
13649
- e < A0 ? c = A0 : e > T0 && (c = T0), this.current.fontSizeScale = e / c, this.ctx.font = `${h} ${a} ${c}px ${r}`;
13532
+ e < C0 ? c = C0 : e > A0 && (c = A0), this.current.fontSizeScale = e / c, this.ctx.font = `${h} ${a} ${c}px ${r}`;
13650
13533
  }
13651
13534
  setTextRenderingMode(t) {
13652
13535
  this.current.textRenderingMode = t;
@@ -13835,7 +13718,7 @@ const cm = class cm {
13835
13718
  }
13836
13719
  _getPattern(t, e = null) {
13837
13720
  let s;
13838
- return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = dC(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
13721
+ return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = $S(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
13839
13722
  }
13840
13723
  shadingFill(t) {
13841
13724
  if (!this.contentVisible)
@@ -13930,7 +13813,7 @@ const cm = class cm {
13930
13813
  } else
13931
13814
  Ou(this.ctx), this.endPath(), this.ctx.rect(e[0], e[1], r, a), this.ctx.clip(), this.ctx.beginPath();
13932
13815
  }
13933
- this.current = new P0(this.ctx.canvas.width, this.ctx.canvas.height), this.transform(...s), this.transform(...i);
13816
+ this.current = new k0(this.ctx.canvas.width, this.ctx.canvas.height), this.transform(...s), this.transform(...i);
13934
13817
  }
13935
13818
  endAnnotation() {
13936
13819
  this.annotationCanvas && (this.ctx.restore(), w(this, pi, Vg).call(this), this.ctx = this.annotationCanvas.savedCtx, delete this.annotationCanvas.savedCtx, delete this.annotationCanvas);
@@ -13941,7 +13824,7 @@ const cm = class cm {
13941
13824
  const e = t.count;
13942
13825
  t = this.getObject(t.data, t), t.count = e;
13943
13826
  const s = this.ctx, i = this.processingType3;
13944
- if (i && (i.compiled === void 0 && (i.compiled = vC(t)), i.compiled)) {
13827
+ if (i && (i.compiled === void 0 && (i.compiled = ZS(t)), i.compiled)) {
13945
13828
  i.compiled(s);
13946
13829
  return;
13947
13830
  }
@@ -13977,7 +13860,7 @@ const cm = class cm {
13977
13860
  } = n, u = this.cachedCanvases.getCanvas("maskCanvas", a, h), d = u.context;
13978
13861
  d.save();
13979
13862
  const f = this.getObject(r, n);
13980
- O0(d, f), d.globalCompositeOperation = "source-in", d.fillStyle = i ? s.getPattern(d, this, vi(e), De.FILL) : s, d.fillRect(0, 0, a, h), d.restore(), e.save(), e.transform(...c), e.scale(1, -1), Mu(e, u.canvas, 0, 0, a, h, 0, -1, 1, 1), e.restore();
13863
+ M0(d, f), d.globalCompositeOperation = "source-in", d.fillStyle = i ? s.getPattern(d, this, vi(e), De.FILL) : s, d.fillRect(0, 0, a, h), d.restore(), e.save(), e.transform(...c), e.scale(1, -1), Mu(e, u.canvas, 0, 0, a, h, 0, -1, 1, 1), e.restore();
13981
13864
  }
13982
13865
  this.compose();
13983
13866
  }
@@ -14041,10 +13924,10 @@ const cm = class cm {
14041
13924
  n = t;
14042
13925
  else {
14043
13926
  const h = this.cachedCanvases.getCanvas("inlineImage", e, s).context;
14044
- M0(h, t), n = this.applyTransferMapsToCanvas(h);
13927
+ P0(h, t), n = this.applyTransferMapsToCanvas(h);
14045
13928
  }
14046
13929
  const r = this._scaleImage(n, vi(i));
14047
- i.imageSmoothingEnabled = D0(Dt(i), t.interpolate), Mu(i, r.img, 0, 0, r.paintWidth, r.paintHeight, 0, -s, e, s), this.compose(), this.restore();
13930
+ i.imageSmoothingEnabled = O0(Dt(i), t.interpolate), Mu(i, r.img, 0, 0, r.paintWidth, r.paintHeight, 0, -s, e, s), this.compose(), this.restore();
14048
13931
  }
14049
13932
  paintInlineImageXObjectGroup(t, e) {
14050
13933
  if (!this.contentVisible)
@@ -14055,7 +13938,7 @@ const cm = class cm {
14055
13938
  i = t.bitmap;
14056
13939
  else {
14057
13940
  const n = t.width, r = t.height, h = this.cachedCanvases.getCanvas("inlineImage", n, r).context;
14058
- M0(h, t), i = this.applyTransferMapsToCanvas(h);
13941
+ P0(h, t), i = this.applyTransferMapsToCanvas(h);
14059
13942
  }
14060
13943
  for (const n of e)
14061
13944
  s.save(), s.transform(...n.transform), s.scale(1, -1), Mu(s, i, n.x, n.y, n.w, n.h, 0, -1, 1, 1), s.restore();
@@ -14091,7 +13974,7 @@ const cm = class cm {
14091
13974
  const e = this.current.isEmptyClip();
14092
13975
  this.pendingClip && this.current.updateClipFromPath(), this.pendingClip || this.compose(t);
14093
13976
  const s = this.ctx;
14094
- this.pendingClip && (e || (this.pendingClip === R0 ? s.clip("evenodd") : s.clip()), this.pendingClip = null), this.current.startNewPathAndClipBox(this.current.clipBox), s.beginPath();
13977
+ this.pendingClip && (e || (this.pendingClip === D0 ? s.clip("evenodd") : s.clip()), this.pendingClip = null), this.current.startNewPathAndClipBox(this.current.clipBox), s.beginPath();
14095
13978
  }
14096
13979
  getSinglePixelWidth() {
14097
13980
  if (!this._cachedGetSinglePixelWidth) {
@@ -14208,7 +14091,7 @@ class Cn {
14208
14091
  }
14209
14092
  Zl = new WeakMap(), tc = new WeakMap(), y(Cn, Zl, null), y(Cn, tc, "");
14210
14093
  var ha, ec;
14211
- class wC {
14094
+ class iC {
14212
14095
  constructor({
14213
14096
  parsedData: t,
14214
14097
  rawData: e
@@ -14233,7 +14116,7 @@ class wC {
14233
14116
  ha = new WeakMap(), ec = new WeakMap();
14234
14117
  const ho = Symbol("INTERNAL");
14235
14118
  var sc, ic, nc, Bo;
14236
- class xC {
14119
+ class nC {
14237
14120
  constructor(t, {
14238
14121
  name: e,
14239
14122
  intent: s,
@@ -14263,7 +14146,7 @@ class xC {
14263
14146
  }
14264
14147
  sc = new WeakMap(), ic = new WeakMap(), nc = new WeakMap(), Bo = new WeakMap();
14265
14148
  var Qn, _t, Ho, Go, rc, zg;
14266
- class SC {
14149
+ class rC {
14267
14150
  constructor(t, e = xs.DISPLAY) {
14268
14151
  y(this, rc);
14269
14152
  y(this, Qn, null);
@@ -14273,7 +14156,7 @@ class SC {
14273
14156
  if (this.renderingIntent = e, this.name = null, this.creator = null, t !== null) {
14274
14157
  this.name = t.name, this.creator = t.creator, m(this, Go, t.order);
14275
14158
  for (const s of t.groups)
14276
- l(this, _t).set(s.id, new xC(e, s));
14159
+ l(this, _t).set(s.id, new nC(e, s));
14277
14160
  if (t.baseState === "OFF")
14278
14161
  for (const s of l(this, _t).values())
14279
14162
  s._setVisible(ho, !1);
@@ -14388,7 +14271,7 @@ class SC {
14388
14271
  getHash() {
14389
14272
  if (l(this, Qn) !== null)
14390
14273
  return l(this, Qn);
14391
- const t = new Bb();
14274
+ const t = new jb();
14392
14275
  for (const [e, s] of l(this, _t))
14393
14276
  t.update(`${e}:${s.visible}`);
14394
14277
  return m(this, Qn, t.hexdigest());
@@ -14425,7 +14308,7 @@ Qn = new WeakMap(), _t = new WeakMap(), Ho = new WeakMap(), Go = new WeakMap(),
14425
14308
  }
14426
14309
  return s === "And";
14427
14310
  };
14428
- class CC {
14311
+ class aC {
14429
14312
  constructor(t, {
14430
14313
  disableRange: e = !1,
14431
14314
  disableStream: s = !1
@@ -14497,12 +14380,12 @@ class CC {
14497
14380
  getFullReader() {
14498
14381
  te(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once.");
14499
14382
  const t = this._queuedChunks;
14500
- return this._queuedChunks = null, new AC(this, t, this._progressiveDone, this._contentDispositionFilename);
14383
+ return this._queuedChunks = null, new oC(this, t, this._progressiveDone, this._contentDispositionFilename);
14501
14384
  }
14502
14385
  getRangeReader(t, e) {
14503
14386
  if (e <= this._progressiveDataLength)
14504
14387
  return null;
14505
- const s = new TC(this, t, e);
14388
+ const s = new hC(this, t, e);
14506
14389
  return this._pdfDataRangeTransport.requestDataRange(t, e), this._rangeReaders.push(s), s;
14507
14390
  }
14508
14391
  cancelAllRequests(t) {
@@ -14513,7 +14396,7 @@ class CC {
14513
14396
  this._pdfDataRangeTransport.abort();
14514
14397
  }
14515
14398
  }
14516
- class AC {
14399
+ class oC {
14517
14400
  constructor(t, e, s = !1, i = null) {
14518
14401
  this._stream = t, this._done = s || !1, this._filename = em(i) ? i : null, this._queuedChunks = e || [], this._loaded = 0;
14519
14402
  for (const n of this._queuedChunks)
@@ -14568,7 +14451,7 @@ class AC {
14568
14451
  this._done || (this._done = !0);
14569
14452
  }
14570
14453
  }
14571
- class TC {
14454
+ class hC {
14572
14455
  constructor(t, e, s) {
14573
14456
  this._stream = t, this._begin = e, this._end = s, this._queuedChunk = null, this._requests = [], this._done = !1, this.onProgress = null;
14574
14457
  }
@@ -14620,7 +14503,7 @@ class TC {
14620
14503
  this._requests.length = 0, this._stream._removeRangeReader(this);
14621
14504
  }
14622
14505
  }
14623
- function EC(o) {
14506
+ function lC(o) {
14624
14507
  let t = !0, e = s("filename\\*", "i").exec(o);
14625
14508
  if (e) {
14626
14509
  e = e[1];
@@ -14709,7 +14592,7 @@ function EC(o) {
14709
14592
  }
14710
14593
  return "";
14711
14594
  }
14712
- function Zb(o, t) {
14595
+ function Jb(o, t) {
14713
14596
  const e = new Headers();
14714
14597
  if (!o || !t || typeof t != "object")
14715
14598
  return e;
@@ -14726,7 +14609,7 @@ function wf(o) {
14726
14609
  }
14727
14610
  return null;
14728
14611
  }
14729
- function ty({
14612
+ function Qb({
14730
14613
  responseHeaders: o,
14731
14614
  isHttp: t,
14732
14615
  rangeChunkSize: e,
@@ -14738,10 +14621,10 @@ function ty({
14738
14621
  }, n = parseInt(o.get("Content-Length"), 10);
14739
14622
  return !Number.isInteger(n) || (i.suggestedLength = n, n <= 2 * e) || s || !t || o.get("Accept-Ranges") !== "bytes" || (o.get("Content-Encoding") || "identity") !== "identity" || (i.allowRangeRequests = !0), i;
14740
14623
  }
14741
- function ey(o) {
14624
+ function Zb(o) {
14742
14625
  const t = o.get("Content-Disposition");
14743
14626
  if (t) {
14744
- let e = EC(t);
14627
+ let e = lC(t);
14745
14628
  if (e.includes("%"))
14746
14629
  try {
14747
14630
  e = decodeURIComponent(e);
@@ -14755,10 +14638,10 @@ function ey(o) {
14755
14638
  function xf(o, t) {
14756
14639
  return o === 404 || o === 0 && t.startsWith("file:") ? new xl('Missing PDF "' + t + '".') : new Ed(`Unexpected server response (${o}) while retrieving PDF "${t}".`, o);
14757
14640
  }
14758
- function sy(o) {
14641
+ function ty(o) {
14759
14642
  return o === 200 || o === 206;
14760
14643
  }
14761
- function iy(o, t, e) {
14644
+ function ey(o, t, e) {
14762
14645
  return {
14763
14646
  method: "GET",
14764
14647
  headers: o,
@@ -14768,25 +14651,25 @@ function iy(o, t, e) {
14768
14651
  redirect: "follow"
14769
14652
  };
14770
14653
  }
14771
- function ny(o) {
14654
+ function sy(o) {
14772
14655
  return o instanceof Uint8Array ? o.buffer : o instanceof ArrayBuffer ? o : (rt(`getArrayBuffer - unexpected data format: ${o}`), new Uint8Array(o).buffer);
14773
14656
  }
14774
- class L0 {
14657
+ class R0 {
14775
14658
  constructor(t) {
14776
14659
  K(this, "_responseOrigin", null);
14777
- this.source = t, this.isHttp = /^https?:/i.test(t.url), this.headers = Zb(this.isHttp, t.httpHeaders), this._fullRequestReader = null, this._rangeRequestReaders = [];
14660
+ this.source = t, this.isHttp = /^https?:/i.test(t.url), this.headers = Jb(this.isHttp, t.httpHeaders), this._fullRequestReader = null, this._rangeRequestReaders = [];
14778
14661
  }
14779
14662
  get _progressiveDataLength() {
14780
14663
  var t;
14781
14664
  return ((t = this._fullRequestReader) == null ? void 0 : t._loaded) ?? 0;
14782
14665
  }
14783
14666
  getFullReader() {
14784
- return te(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new kC(this), this._fullRequestReader;
14667
+ return te(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new cC(this), this._fullRequestReader;
14785
14668
  }
14786
14669
  getRangeReader(t, e) {
14787
14670
  if (e <= this._progressiveDataLength)
14788
14671
  return null;
14789
- const s = new PC(this, t, e);
14672
+ const s = new uC(this, t, e);
14790
14673
  return this._rangeRequestReaders.push(s), s;
14791
14674
  }
14792
14675
  cancelAllRequests(t) {
@@ -14796,26 +14679,26 @@ class L0 {
14796
14679
  s.cancel(t);
14797
14680
  }
14798
14681
  }
14799
- class kC {
14682
+ class cC {
14800
14683
  constructor(t) {
14801
14684
  this._stream = t, this._reader = null, this._loaded = 0, this._filename = null;
14802
14685
  const e = t.source;
14803
14686
  this._withCredentials = e.withCredentials || !1, this._contentLength = e.length, this._headersCapability = Promise.withResolvers(), this._disableRange = e.disableRange || !1, this._rangeChunkSize = e.rangeChunkSize, !this._rangeChunkSize && !this._disableRange && (this._disableRange = !0), this._abortController = new AbortController(), this._isStreamingSupported = !e.disableStream, this._isRangeSupported = !e.disableRange;
14804
14687
  const s = new Headers(t.headers), i = e.url;
14805
- fetch(i, iy(s, this._withCredentials, this._abortController)).then((n) => {
14806
- if (t._responseOrigin = wf(n.url), !sy(n.status))
14688
+ fetch(i, ey(s, this._withCredentials, this._abortController)).then((n) => {
14689
+ if (t._responseOrigin = wf(n.url), !ty(n.status))
14807
14690
  throw xf(n.status, i);
14808
14691
  this._reader = n.body.getReader(), this._headersCapability.resolve();
14809
14692
  const r = n.headers, {
14810
14693
  allowRangeRequests: a,
14811
14694
  suggestedLength: h
14812
- } = ty({
14695
+ } = Qb({
14813
14696
  responseHeaders: r,
14814
14697
  isHttp: t.isHttp,
14815
14698
  rangeChunkSize: this._rangeChunkSize,
14816
14699
  disableRange: this._disableRange
14817
14700
  });
14818
- this._isRangeSupported = a, this._contentLength = h || this._contentLength, this._filename = ey(r), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new _r("Streaming is disabled."));
14701
+ this._isRangeSupported = a, this._contentLength = h || this._contentLength, this._filename = Zb(r), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new _r("Streaming is disabled."));
14819
14702
  }).catch(this._headersCapability.reject), this.onProgress = null;
14820
14703
  }
14821
14704
  get headersReady() {
@@ -14847,7 +14730,7 @@ class kC {
14847
14730
  loaded: this._loaded,
14848
14731
  total: this._contentLength
14849
14732
  }), {
14850
- value: ny(t),
14733
+ value: sy(t),
14851
14734
  done: !1
14852
14735
  });
14853
14736
  }
@@ -14856,7 +14739,7 @@ class kC {
14856
14739
  (e = this._reader) == null || e.cancel(t), this._abortController.abort();
14857
14740
  }
14858
14741
  }
14859
- class PC {
14742
+ class uC {
14860
14743
  constructor(t, e, s) {
14861
14744
  this._stream = t, this._reader = null, this._loaded = 0;
14862
14745
  const i = t.source;
@@ -14864,11 +14747,11 @@ class PC {
14864
14747
  const n = new Headers(t.headers);
14865
14748
  n.append("Range", `bytes=${e}-${s - 1}`);
14866
14749
  const r = i.url;
14867
- fetch(r, iy(n, this._withCredentials, this._abortController)).then((a) => {
14750
+ fetch(r, ey(n, this._withCredentials, this._abortController)).then((a) => {
14868
14751
  const h = wf(a.url);
14869
14752
  if (h !== t._responseOrigin)
14870
14753
  throw new Error(`Expected range response-origin "${h}" to match "${t._responseOrigin}".`);
14871
- if (!sy(a.status))
14754
+ if (!ty(a.status))
14872
14755
  throw xf(a.status, r);
14873
14756
  this._readCapability.resolve(), this._reader = a.body.getReader();
14874
14757
  }).catch(this._readCapability.reject), this.onProgress = null;
@@ -14889,7 +14772,7 @@ class PC {
14889
14772
  } : (this._loaded += t.byteLength, (s = this.onProgress) == null || s.call(this, {
14890
14773
  loaded: this._loaded
14891
14774
  }), {
14892
- value: ny(t),
14775
+ value: sy(t),
14893
14776
  done: !1
14894
14777
  });
14895
14778
  }
@@ -14899,18 +14782,18 @@ class PC {
14899
14782
  }
14900
14783
  }
14901
14784
  const Kf = 200, Jf = 206;
14902
- function MC(o) {
14785
+ function dC(o) {
14903
14786
  const t = o.response;
14904
14787
  return typeof t != "string" ? t : bf(t).buffer;
14905
14788
  }
14906
- class OC {
14789
+ class fC {
14907
14790
  constructor({
14908
14791
  url: t,
14909
14792
  httpHeaders: e,
14910
14793
  withCredentials: s
14911
14794
  }) {
14912
14795
  K(this, "_responseOrigin", null);
14913
- this.url = t, this.isHttp = /^https?:/i.test(t), this.headers = Zb(this.isHttp, e), this.withCredentials = s || !1, this.currXhrId = 0, this.pendingRequests = /* @__PURE__ */ Object.create(null);
14796
+ this.url = t, this.isHttp = /^https?:/i.test(t), this.headers = Jb(this.isHttp, e), this.withCredentials = s || !1, this.currXhrId = 0, this.pendingRequests = /* @__PURE__ */ Object.create(null);
14914
14797
  }
14915
14798
  request(t) {
14916
14799
  const e = new XMLHttpRequest(), s = this.currXhrId++, i = this.pendingRequests[s] = {
@@ -14944,7 +14827,7 @@ class OC {
14944
14827
  s.onError(i.status);
14945
14828
  return;
14946
14829
  }
14947
- const a = MC(i);
14830
+ const a = dC(i);
14948
14831
  if (n === Jf) {
14949
14832
  const h = i.getResponseHeader("Content-Range"), c = /bytes (\d+)-(\d+)\/(\d+)/.exec(h);
14950
14833
  c ? s.onDone({
@@ -14967,19 +14850,19 @@ class OC {
14967
14850
  delete this.pendingRequests[t], e.abort();
14968
14851
  }
14969
14852
  }
14970
- class DC {
14853
+ class gC {
14971
14854
  constructor(t) {
14972
- this._source = t, this._manager = new OC(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
14855
+ this._source = t, this._manager = new fC(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
14973
14856
  }
14974
14857
  _onRangeRequestReaderClosed(t) {
14975
14858
  const e = this._rangeRequestReaders.indexOf(t);
14976
14859
  e >= 0 && this._rangeRequestReaders.splice(e, 1);
14977
14860
  }
14978
14861
  getFullReader() {
14979
- return te(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new RC(this._manager, this._source), this._fullRequestReader;
14862
+ return te(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new pC(this._manager, this._source), this._fullRequestReader;
14980
14863
  }
14981
14864
  getRangeReader(t, e) {
14982
- const s = new LC(this._manager, t, e);
14865
+ const s = new mC(this._manager, t, e);
14983
14866
  return s.onClosed = this._onRangeRequestReaderClosed.bind(this), this._rangeRequestReaders.push(s), s;
14984
14867
  }
14985
14868
  cancelAllRequests(t) {
@@ -14989,7 +14872,7 @@ class DC {
14989
14872
  s.cancel(t);
14990
14873
  }
14991
14874
  }
14992
- class RC {
14875
+ class pC {
14993
14876
  constructor(t, e) {
14994
14877
  this._manager = t, this._url = e.url, this._fullRequestId = t.request({
14995
14878
  onHeadersReceived: this._onHeadersReceived.bind(this),
@@ -15007,13 +14890,13 @@ class RC {
15007
14890
  }) : []), {
15008
14891
  allowRangeRequests: n,
15009
14892
  suggestedLength: r
15010
- } = ty({
14893
+ } = Qb({
15011
14894
  responseHeaders: i,
15012
14895
  isHttp: this._manager.isHttp,
15013
14896
  rangeChunkSize: this._rangeChunkSize,
15014
14897
  disableRange: this._disableRange
15015
14898
  });
15016
- n && (this._isRangeSupported = !0), this._contentLength = r || this._contentLength, this._filename = ey(i), this._isRangeSupported && this._manager.abortRequest(t), this._headersCapability.resolve();
14899
+ n && (this._isRangeSupported = !0), this._contentLength = r || this._contentLength, this._filename = Zb(i), this._isRangeSupported && this._manager.abortRequest(t), this._headersCapability.resolve();
15017
14900
  }
15018
14901
  _onDone(t) {
15019
14902
  if (t && (this._requests.length > 0 ? this._requests.shift().resolve({
@@ -15082,7 +14965,7 @@ class RC {
15082
14965
  this._requests.length = 0, this._manager.isPendingRequest(this._fullRequestId) && this._manager.abortRequest(this._fullRequestId), this._fullRequestReader = null;
15083
14966
  }
15084
14967
  }
15085
- class LC {
14968
+ class mC {
15086
14969
  constructor(t, e, s) {
15087
14970
  this._manager = t, this._url = t.url, this._requestId = t.request({
15088
14971
  begin: e,
@@ -15158,28 +15041,28 @@ class LC {
15158
15041
  this._requests.length = 0, this._manager.isPendingRequest(this._requestId) && this._manager.abortRequest(this._requestId), this._close();
15159
15042
  }
15160
15043
  }
15161
- const FC = /^[a-z][a-z0-9\-+.]+:/i;
15162
- function IC(o) {
15163
- if (FC.test(o))
15044
+ const vC = /^[a-z][a-z0-9\-+.]+:/i;
15045
+ function bC(o) {
15046
+ if (vC.test(o))
15164
15047
  return new URL(o);
15165
15048
  const t = process.getBuiltinModule("url");
15166
15049
  return new URL(t.pathToFileURL(o));
15167
15050
  }
15168
- class jC {
15051
+ class yC {
15169
15052
  constructor(t) {
15170
- this.source = t, this.url = IC(t.url), te(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
15053
+ this.source = t, this.url = bC(t.url), te(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
15171
15054
  }
15172
15055
  get _progressiveDataLength() {
15173
15056
  var t;
15174
15057
  return ((t = this._fullRequestReader) == null ? void 0 : t._loaded) ?? 0;
15175
15058
  }
15176
15059
  getFullReader() {
15177
- return te(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new NC(this), this._fullRequestReader;
15060
+ return te(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new _C(this), this._fullRequestReader;
15178
15061
  }
15179
15062
  getRangeReader(t, e) {
15180
15063
  if (e <= this._progressiveDataLength)
15181
15064
  return null;
15182
- const s = new BC(this, t, e);
15065
+ const s = new wC(this, t, e);
15183
15066
  return this._rangeRequestReaders.push(s), s;
15184
15067
  }
15185
15068
  cancelAllRequests(t) {
@@ -15189,7 +15072,7 @@ class jC {
15189
15072
  s.cancel(t);
15190
15073
  }
15191
15074
  }
15192
- class NC {
15075
+ class _C {
15193
15076
  constructor(t) {
15194
15077
  this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null;
15195
15078
  const e = t.source;
@@ -15254,7 +15137,7 @@ class NC {
15254
15137
  }), !this._isStreamingSupported && this._isRangeSupported && this._error(new _r("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
15255
15138
  }
15256
15139
  }
15257
- class BC {
15140
+ class wC {
15258
15141
  constructor(t, e, s) {
15259
15142
  this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
15260
15143
  const i = t.source;
@@ -15305,8 +15188,8 @@ class BC {
15305
15188
  }), this._storedError && this._readableStream.destroy(this._storedError);
15306
15189
  }
15307
15190
  }
15308
- const HC = 1e5, Ze = 30, GC = 0.8;
15309
- var N0, Zn, is, ac, oc, la, hn, hc, lc, ca, Vo, Wo, tr, zo, cc, Xo, ua, uc, dc, da, fa, fc, er, Uo, Rn, ry, ay, Xg, As, Yu, Ug, oy, hy;
15191
+ const xC = 1e5, Ze = 30, SC = 0.8;
15192
+ var N0, Zn, is, ac, oc, la, hn, hc, lc, ca, Vo, Wo, tr, zo, cc, Xo, ua, uc, dc, da, fa, fc, er, Uo, Rn, iy, ny, Xg, As, Yu, Ug, ry, ay;
15310
15193
  const ne = class ne {
15311
15194
  constructor({
15312
15195
  textContentSource: t,
@@ -15354,7 +15237,7 @@ const ne = class ne {
15354
15237
  pageX: r,
15355
15238
  pageY: a
15356
15239
  } = s.rawDims;
15357
- m(this, dc, [1, 0, 0, -1, -r, a + n]), m(this, lc, i), m(this, hc, n), w(h = ne, As, oy).call(h), Ya(e, s), l(this, Zn).promise.finally(() => {
15240
+ m(this, dc, [1, 0, 0, -1, -r, a + n]), m(this, lc, i), m(this, hc, n), w(h = ne, As, ry).call(h), Ya(e, s), l(this, Zn).promise.finally(() => {
15358
15241
  l(ne, Uo).delete(this), m(this, hn, null), m(this, zo, null);
15359
15242
  }).catch(() => {
15360
15243
  });
@@ -15376,7 +15259,7 @@ const ne = class ne {
15376
15259
  l(this, Zn).resolve();
15377
15260
  return;
15378
15261
  }
15379
- l(this, la) ?? m(this, la, e.lang), Object.assign(l(this, zo), e.styles), w(this, Rn, ry).call(this, e.items), t();
15262
+ l(this, la) ?? m(this, la, e.lang), Object.assign(l(this, zo), e.styles), w(this, Rn, iy).call(this, e.items), t();
15380
15263
  }, l(this, Zn).reject);
15381
15264
  };
15382
15265
  return m(this, ca, l(this, Xo).getReader()), l(ne, Uo).add(this), t(), l(this, Zn).promise;
@@ -15423,14 +15306,14 @@ const ne = class ne {
15423
15306
  }
15424
15307
  }
15425
15308
  };
15426
- Zn = new WeakMap(), is = new WeakMap(), ac = new WeakMap(), oc = new WeakMap(), la = new WeakMap(), hn = new WeakMap(), hc = new WeakMap(), lc = new WeakMap(), ca = new WeakMap(), Vo = new WeakMap(), Wo = new WeakMap(), tr = new WeakMap(), zo = new WeakMap(), cc = new WeakMap(), Xo = new WeakMap(), ua = new WeakMap(), uc = new WeakMap(), dc = new WeakMap(), da = new WeakMap(), fa = new WeakMap(), fc = new WeakMap(), er = new WeakMap(), Uo = new WeakMap(), Rn = new WeakSet(), ry = function(t) {
15309
+ Zn = new WeakMap(), is = new WeakMap(), ac = new WeakMap(), oc = new WeakMap(), la = new WeakMap(), hn = new WeakMap(), hc = new WeakMap(), lc = new WeakMap(), ca = new WeakMap(), Vo = new WeakMap(), Wo = new WeakMap(), tr = new WeakMap(), zo = new WeakMap(), cc = new WeakMap(), Xo = new WeakMap(), ua = new WeakMap(), uc = new WeakMap(), dc = new WeakMap(), da = new WeakMap(), fa = new WeakMap(), fc = new WeakMap(), er = new WeakMap(), Uo = new WeakMap(), Rn = new WeakSet(), iy = function(t) {
15427
15310
  var i, n;
15428
15311
  if (l(this, ac))
15429
15312
  return;
15430
15313
  (n = l(this, hn)).ctx ?? (n.ctx = w(i = ne, As, Yu).call(i, l(this, la)));
15431
15314
  const e = l(this, ua), s = l(this, cc);
15432
15315
  for (const r of t) {
15433
- if (e.length > HC) {
15316
+ if (e.length > xC) {
15434
15317
  rt("Ignoring additional textDivs for performance reasons."), m(this, ac, !0);
15435
15318
  return;
15436
15319
  }
@@ -15441,9 +15324,9 @@ Zn = new WeakMap(), is = new WeakMap(), ac = new WeakMap(), oc = new WeakMap(),
15441
15324
  } else r.type === "endMarkedContent" && m(this, is, l(this, is).parentNode);
15442
15325
  continue;
15443
15326
  }
15444
- s.push(r.str), w(this, Rn, ay).call(this, r);
15327
+ s.push(r.str), w(this, Rn, ny).call(this, r);
15445
15328
  }
15446
- }, ay = function(t) {
15329
+ }, ny = function(t) {
15447
15330
  var v;
15448
15331
  const e = document.createElement("span"), s = {
15449
15332
  angle: 0,
@@ -15459,7 +15342,7 @@ Zn = new WeakMap(), is = new WeakMap(), ac = new WeakMap(), oc = new WeakMap(),
15459
15342
  r.vertical && (n += Math.PI / 2);
15460
15343
  let a = l(this, oc) && r.fontSubstitution || r.fontFamily;
15461
15344
  a = ne.fontFamilyMap.get(a) || a;
15462
- const h = Math.hypot(i[2], i[3]), c = h * w(v = ne, As, hy).call(v, a, l(this, la));
15345
+ const h = Math.hypot(i[2], i[3]), c = h * w(v = ne, As, ay).call(v, a, l(this, la));
15463
15346
  let u, d;
15464
15347
  n === 0 ? (u = i[4], d = i[5] - c) : (u = i[4] + c * Math.sin(n), d = i[5] - c * Math.cos(n));
15465
15348
  const f = "calc(var(--scale-factor)*", g = e.style;
@@ -15515,12 +15398,12 @@ Zn = new WeakMap(), is = new WeakMap(), ac = new WeakMap(), oc = new WeakMap(),
15515
15398
  }, Ug = function(t, e, s) {
15516
15399
  const i = l(this, fc).get(t);
15517
15400
  e === i.size && s === i.family || (t.font = `${e}px ${s}`, i.size = e, i.family = s);
15518
- }, oy = function() {
15401
+ }, ry = function() {
15519
15402
  if (l(this, er) !== null)
15520
15403
  return;
15521
15404
  const t = document.createElement("div");
15522
15405
  t.style.opacity = 0, t.style.lineHeight = 1, t.style.fontSize = "1px", t.style.position = "absolute", t.textContent = "X", document.body.append(t), m(this, er, t.getBoundingClientRect().height), t.remove();
15523
- }, hy = function(t, e) {
15406
+ }, ay = function(t, e) {
15524
15407
  const s = l(this, da).get(t);
15525
15408
  if (s)
15526
15409
  return s;
@@ -15547,7 +15430,7 @@ Zn = new WeakMap(), is = new WeakMap(), ac = new WeakMap(), oc = new WeakMap(),
15547
15430
  break;
15548
15431
  }
15549
15432
  i.canvas.width = i.canvas.height = 0;
15550
- const c = r ? r / (r + a) : GC;
15433
+ const c = r ? r / (r + a) : SC;
15551
15434
  return l(this, da).set(t, c), c;
15552
15435
  }, y(ne, As), y(ne, da, /* @__PURE__ */ new Map()), y(ne, fa, /* @__PURE__ */ new Map()), y(ne, fc, /* @__PURE__ */ new WeakMap()), y(ne, er, null), y(ne, Uo, /* @__PURE__ */ new Set());
15553
15436
  let Sl = ne;
@@ -15580,8 +15463,8 @@ class Cl {
15580
15463
  return !(t === "textarea" || t === "input" || t === "option" || t === "select");
15581
15464
  }
15582
15465
  }
15583
- const VC = 65536, WC = 100, zC = 5e3, XC = Re ? rC : sC, UC = Re ? aC : Yb, YC = Re ? nC : iC, $C = Re ? oC : Jb;
15584
- function qC(o = {}) {
15466
+ const CC = 65536, AC = 100, TC = 5e3, EC = Re ? GS : NS, kC = Re ? VS : Xb, PC = Re ? HS : BS, MC = Re ? WS : qb;
15467
+ function OC(o = {}) {
15585
15468
  typeof o == "string" || o instanceof URL ? o = {
15586
15469
  url: o
15587
15470
  } : (o instanceof ArrayBuffer || ArrayBuffer.isView(o)) && (o = {
@@ -15589,10 +15472,10 @@ function qC(o = {}) {
15589
15472
  });
15590
15473
  const t = new Yg(), {
15591
15474
  docId: e
15592
- } = t, s = o.url ? KC(o.url) : null, i = o.data ? JC(o.data) : null, n = o.httpHeaders || null, r = o.withCredentials === !0, a = o.password ?? null, h = o.range instanceof ly ? o.range : null, c = Number.isInteger(o.rangeChunkSize) && o.rangeChunkSize > 0 ? o.rangeChunkSize : VC;
15475
+ } = t, s = o.url ? DC(o.url) : null, i = o.data ? RC(o.data) : null, n = o.httpHeaders || null, r = o.withCredentials === !0, a = o.password ?? null, h = o.range instanceof oy ? o.range : null, c = Number.isInteger(o.rangeChunkSize) && o.rangeChunkSize > 0 ? o.rangeChunkSize : CC;
15593
15476
  let u = o.worker instanceof wo ? o.worker : null;
15594
- const d = o.verbosity, f = typeof o.docBaseUrl == "string" && !_f(o.docBaseUrl) ? o.docBaseUrl : null, g = typeof o.cMapUrl == "string" ? o.cMapUrl : null, p = o.cMapPacked !== !1, v = o.CMapReaderFactory || UC, _ = typeof o.standardFontDataUrl == "string" ? o.standardFontDataUrl : null, b = o.StandardFontDataFactory || $C, x = o.stopAtErrors !== !0, C = Number.isInteger(o.maxImageSize) && o.maxImageSize > -1 ? o.maxImageSize : -1, A = o.isEvalSupported !== !1, P = typeof o.isOffscreenCanvasSupported == "boolean" ? o.isOffscreenCanvasSupported : !Re, O = typeof o.isImageDecoderSupported == "boolean" ? o.isImageDecoderSupported : !Re && (Ye.platform.isFirefox || !globalThis.chrome), k = Number.isInteger(o.canvasMaxAreaInBytes) ? o.canvasMaxAreaInBytes : -1, M = typeof o.disableFontFace == "boolean" ? o.disableFontFace : Re, R = o.fontExtraProperties === !0, F = o.enableXfa === !0, I = o.ownerDocument || globalThis.document, Y = o.disableRange === !0, N = o.disableStream === !0, H = o.disableAutoFetch === !0, it = o.pdfBug === !0, j = o.CanvasFactory || XC, G = o.FilterFactory || YC, et = o.enableHWA === !0, At = h ? h.length : o.length ?? NaN, Gt = typeof o.useSystemFonts == "boolean" ? o.useSystemFonts : !Re && !M, Kt = typeof o.useWorkerFetch == "boolean" ? o.useWorkerFetch : v === Yb && b === Jb && g && _ && $h(g, document.baseURI) && $h(_, document.baseURI), It = null;
15595
- LS(d);
15477
+ const d = o.verbosity, f = typeof o.docBaseUrl == "string" && !_f(o.docBaseUrl) ? o.docBaseUrl : null, g = typeof o.cMapUrl == "string" ? o.cMapUrl : null, p = o.cMapPacked !== !1, v = o.CMapReaderFactory || kC, _ = typeof o.standardFontDataUrl == "string" ? o.standardFontDataUrl : null, b = o.StandardFontDataFactory || MC, x = o.stopAtErrors !== !0, C = Number.isInteger(o.maxImageSize) && o.maxImageSize > -1 ? o.maxImageSize : -1, A = o.isEvalSupported !== !1, P = typeof o.isOffscreenCanvasSupported == "boolean" ? o.isOffscreenCanvasSupported : !Re, O = typeof o.isImageDecoderSupported == "boolean" ? o.isImageDecoderSupported : !Re && (Ye.platform.isFirefox || !globalThis.chrome), k = Number.isInteger(o.canvasMaxAreaInBytes) ? o.canvasMaxAreaInBytes : -1, M = typeof o.disableFontFace == "boolean" ? o.disableFontFace : Re, R = o.fontExtraProperties === !0, F = o.enableXfa === !0, I = o.ownerDocument || globalThis.document, Y = o.disableRange === !0, N = o.disableStream === !0, H = o.disableAutoFetch === !0, it = o.pdfBug === !0, j = o.CanvasFactory || EC, G = o.FilterFactory || PC, et = o.enableHWA === !0, At = h ? h.length : o.length ?? NaN, Gt = typeof o.useSystemFonts == "boolean" ? o.useSystemFonts : !Re && !M, Kt = typeof o.useWorkerFetch == "boolean" ? o.useWorkerFetch : v === Xb && b === qb && g && _ && Yh(g, document.baseURI) && Yh(_, document.baseURI), It = null;
15478
+ mS(d);
15596
15479
  const xt = {
15597
15480
  canvasFactory: new j({
15598
15481
  ownerDocument: I,
@@ -15659,7 +15542,7 @@ function qC(o = {}) {
15659
15542
  const kt = u.messageHandler.sendWithPromise("GetDocRequest", pe, i ? [i.buffer] : null);
15660
15543
  let ut;
15661
15544
  if (h)
15662
- ut = new CC(h, {
15545
+ ut = new aC(h, {
15663
15546
  disableRange: Y,
15664
15547
  disableStream: N
15665
15548
  });
@@ -15668,14 +15551,14 @@ function qC(o = {}) {
15668
15551
  throw new Error("getDocument - no `url` parameter provided.");
15669
15552
  let hs;
15670
15553
  if (Re)
15671
- if ($h(s)) {
15554
+ if (Yh(s)) {
15672
15555
  if (typeof fetch > "u" || typeof Response > "u" || !("body" in Response.prototype))
15673
15556
  throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");
15674
- hs = L0;
15557
+ hs = R0;
15675
15558
  } else
15676
- hs = jC;
15559
+ hs = yC;
15677
15560
  else
15678
- hs = $h(s) ? L0 : DC;
15561
+ hs = Yh(s) ? R0 : gC;
15679
15562
  ut = new hs({
15680
15563
  url: s,
15681
15564
  length: At,
@@ -15691,12 +15574,12 @@ function qC(o = {}) {
15691
15574
  throw new Error("Loading aborted");
15692
15575
  if (u.destroyed)
15693
15576
  throw new Error("Worker was destroyed");
15694
- const mi = new Qh(e, hs, u.port), Fe = new eA(mi, t, ut, Es, xt);
15577
+ const mi = new Jh(e, hs, u.port), Fe = new jC(mi, t, ut, Es, xt);
15695
15578
  t._transport = Fe, mi.send("Ready", null);
15696
15579
  });
15697
15580
  }).catch(t._capability.reject), t;
15698
15581
  }
15699
- function KC(o) {
15582
+ function DC(o) {
15700
15583
  if (o instanceof URL)
15701
15584
  return o.href;
15702
15585
  try {
@@ -15707,7 +15590,7 @@ function KC(o) {
15707
15590
  }
15708
15591
  throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
15709
15592
  }
15710
- function JC(o) {
15593
+ function RC(o) {
15711
15594
  if (Re && typeof Buffer < "u" && o instanceof Buffer)
15712
15595
  throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
15713
15596
  if (o instanceof Uint8Array && o.byteLength === o.buffer.byteLength)
@@ -15718,7 +15601,7 @@ function JC(o) {
15718
15601
  return new Uint8Array(o);
15719
15602
  throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");
15720
15603
  }
15721
- function F0(o) {
15604
+ function L0(o) {
15722
15605
  return typeof o == "object" && Number.isInteger(o == null ? void 0 : o.num) && o.num >= 0 && Number.isInteger(o == null ? void 0 : o.gen) && o.gen >= 0;
15723
15606
  }
15724
15607
  var Wd;
@@ -15742,7 +15625,7 @@ const zd = class zd {
15742
15625
  };
15743
15626
  Wd = new WeakMap(), y(zd, Wd, 0);
15744
15627
  let Yg = zd;
15745
- class ly {
15628
+ class oy {
15746
15629
  constructor(t, e, s = !1, i = null) {
15747
15630
  this.length = t, this.initialData = e, this.progressiveDone = s, this.contentDispositionFilename = i, this._rangeListeners = [], this._progressListeners = [], this._progressiveReadListeners = [], this._progressiveDoneListeners = [], this._readyCapability = Promise.withResolvers();
15748
15631
  }
@@ -15789,7 +15672,7 @@ class ly {
15789
15672
  abort() {
15790
15673
  }
15791
15674
  }
15792
- class QC {
15675
+ class LC {
15793
15676
  constructor(t, e) {
15794
15677
  this._pdfInfo = t, this._transport = e;
15795
15678
  }
@@ -15902,12 +15785,12 @@ class QC {
15902
15785
  }
15903
15786
  }
15904
15787
  var sr, ln, Hs, lo, $u;
15905
- class ZC {
15788
+ class FC {
15906
15789
  constructor(t, e, s, i = !1) {
15907
15790
  y(this, Hs);
15908
15791
  y(this, sr, null);
15909
15792
  y(this, ln, !1);
15910
- this._pageIndex = t, this._pageInfo = e, this._transport = s, this._stats = i ? new w0() : null, this._pdfBug = i, this.commonObjs = s.commonObjs, this.objs = new cy(), this._maybeCleanupAfterRender = !1, this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1;
15793
+ this._pageIndex = t, this._pageInfo = e, this._transport = s, this._stats = i ? new _0() : null, this._pdfBug = i, this.commonObjs = s.commonObjs, this.objs = new hy(), this._maybeCleanupAfterRender = !1, this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1;
15911
15794
  }
15912
15795
  get pageNumber() {
15913
15796
  return this._pageIndex + 1;
@@ -16112,7 +15995,7 @@ class ZC {
16112
15995
  cleanup(t = !1) {
16113
15996
  m(this, ln, !0);
16114
15997
  const e = w(this, Hs, lo).call(this, !1);
16115
- return t && e && this._stats && (this._stats = new w0()), e;
15998
+ return t && e && this._stats && (this._stats = new _0()), e;
16116
15999
  }
16117
16000
  _startRenderPage(t, e) {
16118
16001
  var i, n;
@@ -16183,7 +16066,7 @@ class ZC {
16183
16066
  if (t.renderTasks.size > 0)
16184
16067
  return;
16185
16068
  if (e instanceof tm) {
16186
- let i = WC;
16069
+ let i = AC;
16187
16070
  e.extraDelay > 0 && e.extraDelay < 1e3 && (i += e.extraDelay), t.streamReaderCancelTimeout = setTimeout(() => {
16188
16071
  t.streamReaderCancelTimeout = null, this._abortOperatorList({
16189
16072
  intentState: t,
@@ -16215,7 +16098,7 @@ sr = new WeakMap(), ln = new WeakMap(), Hs = new WeakSet(), lo = function(t = !1
16215
16098
  if (t)
16216
16099
  return m(this, sr, setTimeout(() => {
16217
16100
  m(this, sr, null), w(this, Hs, lo).call(this, !1);
16218
- }, zC)), !1;
16101
+ }, TC)), !1;
16219
16102
  for (const {
16220
16103
  renderTasks: e,
16221
16104
  operatorList: s
@@ -16227,7 +16110,7 @@ sr = new WeakMap(), ln = new WeakMap(), Hs = new WeakSet(), lo = function(t = !1
16227
16110
  l(this, sr) && (clearTimeout(l(this, sr)), m(this, sr, null));
16228
16111
  };
16229
16112
  var cn, Xd;
16230
- class tA {
16113
+ class IC {
16231
16114
  constructor() {
16232
16115
  y(this, cn, /* @__PURE__ */ new Map());
16233
16116
  y(this, Xd, Promise.resolve());
@@ -16274,7 +16157,7 @@ const Ot = class Ot {
16274
16157
  constructor({
16275
16158
  name: t = null,
16276
16159
  port: e = null,
16277
- verbosity: s = FS()
16160
+ verbosity: s = vS()
16278
16161
  } = {}) {
16279
16162
  y(this, Yo);
16280
16163
  var i;
@@ -16296,7 +16179,7 @@ const Ot = class Ot {
16296
16179
  return this._messageHandler;
16297
16180
  }
16298
16181
  _initializeFromPort(t) {
16299
- this._port = t, this._messageHandler = new Qh("main", "worker", t), this._messageHandler.on("ready", function() {
16182
+ this._port = t, this._messageHandler = new Jh("main", "worker", t), this._messageHandler.on("ready", function() {
16300
16183
  }), w(this, Yo, qu).call(this);
16301
16184
  }
16302
16185
  _initialize() {
@@ -16311,7 +16194,7 @@ const Ot = class Ot {
16311
16194
  Ot._isSameOrigin(window.location.href, t) || (t = Ot._createCDNWrapper(new URL(t, window.location).href));
16312
16195
  const e = new Worker(t, {
16313
16196
  type: "module"
16314
- }), s = new Qh("main", "worker", e), i = () => {
16197
+ }), s = new Jh("main", "worker", e), i = () => {
16315
16198
  n.abort(), s.destroy(), e.terminate(), this.destroyed ? this._readyCapability.reject(new Error("Worker was destroyed")) : this._setupFakeWorker();
16316
16199
  }, n = new AbortController();
16317
16200
  e.addEventListener("error", () => {
@@ -16352,10 +16235,10 @@ const Ot = class Ot {
16352
16235
  this._readyCapability.reject(new Error("Worker was destroyed"));
16353
16236
  return;
16354
16237
  }
16355
- const e = new tA();
16238
+ const e = new IC();
16356
16239
  this._port = e;
16357
- const s = `fake${je(Ot, Ud)._++}`, i = new Qh(s + "_worker", s, e);
16358
- t.setup(i, e), this._messageHandler = new Qh(s, s + "_worker", e), w(this, Yo, qu).call(this);
16240
+ const s = `fake${je(Ot, Ud)._++}`, i = new Jh(s + "_worker", s, e);
16241
+ t.setup(i, e), this._messageHandler = new Jh(s, s + "_worker", e), w(this, Yo, qu).call(this);
16359
16242
  }).catch((t) => {
16360
16243
  this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`));
16361
16244
  });
@@ -16416,8 +16299,8 @@ Ud = new WeakMap(), ga = new WeakMap(), pa = new WeakMap(), Yo = new WeakSet(),
16416
16299
  }));
16417
16300
  };
16418
16301
  let wo = Ot;
16419
- var un, Pi, qo, Ko, dn, ma, il;
16420
- class eA {
16302
+ var un, Pi, qo, Ko, dn, ma, sl;
16303
+ class jC {
16421
16304
  constructor(t, e, s, i, n) {
16422
16305
  y(this, ma);
16423
16306
  y(this, un, /* @__PURE__ */ new Map());
@@ -16425,7 +16308,7 @@ class eA {
16425
16308
  y(this, qo, /* @__PURE__ */ new Map());
16426
16309
  y(this, Ko, /* @__PURE__ */ new Map());
16427
16310
  y(this, dn, null);
16428
- this.messageHandler = t, this.loadingTask = e, this.commonObjs = new cy(), this.fontLoader = new tC({
16311
+ this.messageHandler = t, this.loadingTask = e, this.commonObjs = new hy(), this.fontLoader = new IS({
16429
16312
  ownerDocument: i.ownerDocument,
16430
16313
  styleElement: i.styleElement
16431
16314
  }), this.loadingParams = i.loadingParams, this._params = i, this.canvasFactory = n.canvasFactory, this.filterFactory = n.filterFactory, this.cMapReaderFactory = n.cMapReaderFactory, this.standardFontDataFactory = n.standardFontDataFactory, this.destroyed = !1, this.destroyCapability = null, this._networkStream = s, this._fullReader = null, this._lastProgress = null, this.downloadInfoCapability = Promise.withResolvers(), this.setupMessageHandler();
@@ -16447,7 +16330,7 @@ class eA {
16447
16330
  default:
16448
16331
  rt(`getRenderingIntent - invalid intent: ${t}`);
16449
16332
  }
16450
- const h = r & xs.PRINT && s instanceof Gb ? s : this.annotationStorage;
16333
+ const h = r & xs.PRINT && s instanceof Bb ? s : this.annotationStorage;
16451
16334
  switch (e) {
16452
16335
  case Bn.DISABLE:
16453
16336
  r += xs.ANNOTATIONS_DISABLE;
@@ -16568,7 +16451,7 @@ class eA {
16568
16451
  }), t.on("GetDoc", ({
16569
16452
  pdfInfo: s
16570
16453
  }) => {
16571
- this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new QC(s, this));
16454
+ this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new LC(s, this));
16572
16455
  }), t.on("DocException", (s) => {
16573
16456
  e._capability.reject(ts(s));
16574
16457
  }), t.on("PasswordRequest", (s) => {
@@ -16612,7 +16495,7 @@ class eA {
16612
16495
  rt(`Error during font loading: ${g}`), this.commonObjs.resolve(s, g);
16613
16496
  break;
16614
16497
  }
16615
- const u = c && ((r = globalThis.FontInspector) != null && r.enabled) ? (g, p) => globalThis.FontInspector.fontAdded(g, p) : null, d = new eC(n, {
16498
+ const u = c && ((r = globalThis.FontInspector) != null && r.enabled) ? (g, p) => globalThis.FontInspector.fontAdded(g, p) : null, d = new jS(n, {
16616
16499
  disableFontFace: a,
16617
16500
  fontExtraProperties: h,
16618
16501
  inspectFont: u
@@ -16654,7 +16537,7 @@ class eA {
16654
16537
  }
16655
16538
  switch (n) {
16656
16539
  case "Image":
16657
- a.objs.resolve(s, r), (r == null ? void 0 : r.dataLen) > MS && (a._maybeCleanupAfterRender = !0);
16540
+ a.objs.resolve(s, r), (r == null ? void 0 : r.dataLen) > dS && (a._maybeCleanupAfterRender = !0);
16658
16541
  break;
16659
16542
  case "Pattern":
16660
16543
  a.objs.resolve(s, r);
@@ -16714,13 +16597,13 @@ class eA {
16714
16597
  if (this.destroyed)
16715
16598
  throw new Error("Transport destroyed");
16716
16599
  n.refStr && l(this, Ko).set(n.refStr, t);
16717
- const r = new ZC(e, n, this, this._params.pdfBug);
16600
+ const r = new FC(e, n, this, this._params.pdfBug);
16718
16601
  return l(this, Pi).set(e, r), r;
16719
16602
  });
16720
16603
  return l(this, qo).set(e, i), i;
16721
16604
  }
16722
16605
  getPageIndex(t) {
16723
- return F0(t) ? this.messageHandler.sendWithPromise("GetPageIndex", {
16606
+ return L0(t) ? this.messageHandler.sendWithPromise("GetPageIndex", {
16724
16607
  num: t.num,
16725
16608
  gen: t.gen
16726
16609
  }) : Promise.reject(new Error("Invalid pageIndex request."));
@@ -16732,10 +16615,10 @@ class eA {
16732
16615
  });
16733
16616
  }
16734
16617
  getFieldObjects() {
16735
- return w(this, ma, il).call(this, "GetFieldObjects");
16618
+ return w(this, ma, sl).call(this, "GetFieldObjects");
16736
16619
  }
16737
16620
  hasJSActions() {
16738
- return w(this, ma, il).call(this, "HasJSActions");
16621
+ return w(this, ma, sl).call(this, "HasJSActions");
16739
16622
  }
16740
16623
  getCalculationOrderIds() {
16741
16624
  return this.messageHandler.sendWithPromise("GetCalculationOrderIds", null);
@@ -16767,7 +16650,7 @@ class eA {
16767
16650
  return this.messageHandler.sendWithPromise("GetAttachments", null);
16768
16651
  }
16769
16652
  getDocJSActions() {
16770
- return w(this, ma, il).call(this, "GetDocJSActions");
16653
+ return w(this, ma, sl).call(this, "GetDocJSActions");
16771
16654
  }
16772
16655
  getPageJSActions(t) {
16773
16656
  return this.messageHandler.sendWithPromise("GetPageJSActions", {
@@ -16783,7 +16666,7 @@ class eA {
16783
16666
  return this.messageHandler.sendWithPromise("GetOutline", null);
16784
16667
  }
16785
16668
  getOptionalContentConfig(t) {
16786
- return w(this, ma, il).call(this, "GetOptionalContentConfig").then((e) => new SC(e, t));
16669
+ return w(this, ma, sl).call(this, "GetOptionalContentConfig").then((e) => new rC(e, t));
16787
16670
  }
16788
16671
  getPermissions() {
16789
16672
  return this.messageHandler.sendWithPromise("GetPermissions", null);
@@ -16796,7 +16679,7 @@ class eA {
16796
16679
  var n, r;
16797
16680
  return {
16798
16681
  info: i[0],
16799
- metadata: i[1] ? new wC(i[1]) : null,
16682
+ metadata: i[1] ? new iC(i[1]) : null,
16800
16683
  contentDispositionFilename: ((n = this._fullReader) == null ? void 0 : n.filename) ?? null,
16801
16684
  contentLength: ((r = this._fullReader) == null ? void 0 : r.contentLength) ?? null
16802
16685
  };
@@ -16816,13 +16699,13 @@ class eA {
16816
16699
  }
16817
16700
  }
16818
16701
  cachedPageNumber(t) {
16819
- if (!F0(t))
16702
+ if (!L0(t))
16820
16703
  return null;
16821
16704
  const e = t.gen === 0 ? `${t.num}R` : `${t.num}R${t.gen}`;
16822
16705
  return l(this, Ko).get(e) ?? null;
16823
16706
  }
16824
16707
  }
16825
- un = new WeakMap(), Pi = new WeakMap(), qo = new WeakMap(), Ko = new WeakMap(), dn = new WeakMap(), ma = new WeakSet(), il = function(t, e = null) {
16708
+ un = new WeakMap(), Pi = new WeakMap(), qo = new WeakMap(), Ko = new WeakMap(), dn = new WeakMap(), ma = new WeakSet(), sl = function(t, e = null) {
16826
16709
  const s = l(this, un).get(t);
16827
16710
  if (s)
16828
16711
  return s;
@@ -16831,7 +16714,7 @@ un = new WeakMap(), Pi = new WeakMap(), qo = new WeakMap(), Ko = new WeakMap(),
16831
16714
  };
16832
16715
  const Vh = Symbol("INITIAL_DATA");
16833
16716
  var fs, gc, $g;
16834
- class cy {
16717
+ class hy {
16835
16718
  constructor() {
16836
16719
  y(this, gc);
16837
16720
  y(this, fs, /* @__PURE__ */ Object.create(null));
@@ -16885,7 +16768,7 @@ fs = new WeakMap(), gc = new WeakSet(), $g = function(t) {
16885
16768
  });
16886
16769
  };
16887
16770
  var ir;
16888
- class sA {
16771
+ class NC {
16889
16772
  constructor(t) {
16890
16773
  y(this, ir, null);
16891
16774
  m(this, ir, t), this.onContinue = null;
@@ -16926,7 +16809,7 @@ const Fr = class Fr {
16926
16809
  pageColors: f = null
16927
16810
  }) {
16928
16811
  y(this, nr, null);
16929
- this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = a, this.canvasFactory = h, this.filterFactory = c, this._pdfBug = d, this.pageColors = f, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = u === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new sA(this), this._cancelBound = this.cancel.bind(this), this._continueBound = this._continue.bind(this), this._scheduleNextBound = this._scheduleNext.bind(this), this._nextBound = this._next.bind(this), this._canvas = e.canvasContext.canvas;
16812
+ this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = a, this.canvasFactory = h, this.filterFactory = c, this._pdfBug = d, this.pageColors = f, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = u === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new NC(this), this._cancelBound = this.cancel.bind(this), this._continueBound = this._continue.bind(this), this._scheduleNextBound = this._scheduleNext.bind(this), this._nextBound = this._next.bind(this), this._canvas = e.canvasContext.canvas;
16930
16813
  }
16931
16814
  get completed() {
16932
16815
  return this.capability.promise.catch(function() {
@@ -16986,14 +16869,14 @@ const Fr = class Fr {
16986
16869
  };
16987
16870
  nr = new WeakMap(), va = new WeakMap(), y(Fr, va, /* @__PURE__ */ new WeakSet());
16988
16871
  let qg = Fr;
16989
- const iA = "4.10.38", nA = "f9bea397f";
16990
- function I0(o) {
16872
+ const BC = "4.10.38", HC = "f9bea397f";
16873
+ function F0(o) {
16991
16874
  return Math.floor(Math.max(0, Math.min(1, o)) * 255).toString(16).padStart(2, "0");
16992
16875
  }
16993
16876
  function Wh(o) {
16994
16877
  return Math.max(0, Math.min(255, 255 * o));
16995
16878
  }
16996
- class j0 {
16879
+ class I0 {
16997
16880
  static CMYK_G([t, e, s, i]) {
16998
16881
  return ["G", 1 - Math.min(1, 0.3 * t + 0.59 * s + 0.11 * e + i)];
16999
16882
  }
@@ -17007,7 +16890,7 @@ class j0 {
17007
16890
  return t = Wh(t), [t, t, t];
17008
16891
  }
17009
16892
  static G_HTML([t]) {
17010
- const e = I0(t);
16893
+ const e = F0(t);
17011
16894
  return `#${e}${e}${e}`;
17012
16895
  }
17013
16896
  static RGB_G([t, e, s]) {
@@ -17017,7 +16900,7 @@ class j0 {
17017
16900
  return t.map(Wh);
17018
16901
  }
17019
16902
  static RGB_HTML(t) {
17020
- return `#${t.map(I0).join("")}`;
16903
+ return `#${t.map(F0).join("")}`;
17021
16904
  }
17022
16905
  static T_HTML() {
17023
16906
  return "#00000000";
@@ -17040,7 +16923,7 @@ class j0 {
17040
16923
  return ["CMYK", i, n, r, a];
17041
16924
  }
17042
16925
  }
17043
- class rA {
16926
+ class GC {
17044
16927
  create(t, e, s = !1) {
17045
16928
  if (t <= 0 || e <= 0)
17046
16929
  throw new Error("Invalid SVG dimensions");
@@ -17056,12 +16939,12 @@ class rA {
17056
16939
  Et("Abstract method `_createSVG` called.");
17057
16940
  }
17058
16941
  }
17059
- class am extends rA {
16942
+ class am extends GC {
17060
16943
  _createSVG(t) {
17061
16944
  return document.createElementNS(Xi, t);
17062
16945
  }
17063
16946
  }
17064
- class uy {
16947
+ class ly {
17065
16948
  static setupStorage(t, e, s, i, n) {
17066
16949
  const r = i.getValue(e, {
17067
16950
  value: null
@@ -17211,62 +17094,62 @@ class uy {
17211
17094
  t.div.style.transform = e, t.div.hidden = !1;
17212
17095
  }
17213
17096
  }
17214
- const su = 1e3, aA = 9, qa = /* @__PURE__ */ new WeakSet();
17097
+ const su = 1e3, VC = 9, qa = /* @__PURE__ */ new WeakSet();
17215
17098
  function mr(o) {
17216
17099
  return {
17217
17100
  width: o[2] - o[0],
17218
17101
  height: o[3] - o[1]
17219
17102
  };
17220
17103
  }
17221
- class oA {
17104
+ class WC {
17222
17105
  static create(t) {
17223
17106
  switch (t.data.annotationType) {
17224
17107
  case ie.LINK:
17225
- return new dy(t);
17108
+ return new cy(t);
17226
17109
  case ie.TEXT:
17227
- return new hA(t);
17110
+ return new zC(t);
17228
17111
  case ie.WIDGET:
17229
17112
  switch (t.data.fieldType) {
17230
17113
  case "Tx":
17231
- return new lA(t);
17114
+ return new XC(t);
17232
17115
  case "Btn":
17233
- return t.data.radioButton ? new py(t) : t.data.checkBox ? new uA(t) : new dA(t);
17116
+ return t.data.radioButton ? new fy(t) : t.data.checkBox ? new YC(t) : new $C(t);
17234
17117
  case "Ch":
17235
- return new fA(t);
17118
+ return new qC(t);
17236
17119
  case "Sig":
17237
- return new cA(t);
17120
+ return new UC(t);
17238
17121
  }
17239
17122
  return new Za(t);
17240
17123
  case ie.POPUP:
17241
17124
  return new Jg(t);
17242
17125
  case ie.FREETEXT:
17243
- return new _y(t);
17126
+ return new by(t);
17244
17127
  case ie.LINE:
17245
- return new pA(t);
17128
+ return new JC(t);
17246
17129
  case ie.SQUARE:
17247
- return new mA(t);
17130
+ return new QC(t);
17248
17131
  case ie.CIRCLE:
17249
- return new vA(t);
17132
+ return new ZC(t);
17250
17133
  case ie.POLYLINE:
17251
- return new wy(t);
17134
+ return new yy(t);
17252
17135
  case ie.CARET:
17253
- return new yA(t);
17136
+ return new eA(t);
17254
17137
  case ie.INK:
17255
17138
  return new om(t);
17256
17139
  case ie.POLYGON:
17257
- return new bA(t);
17140
+ return new tA(t);
17258
17141
  case ie.HIGHLIGHT:
17259
- return new xy(t);
17142
+ return new _y(t);
17260
17143
  case ie.UNDERLINE:
17261
- return new _A(t);
17144
+ return new sA(t);
17262
17145
  case ie.SQUIGGLY:
17263
- return new wA(t);
17146
+ return new iA(t);
17264
17147
  case ie.STRIKEOUT:
17265
- return new xA(t);
17148
+ return new nA(t);
17266
17149
  case ie.STAMP:
17267
- return new Sy(t);
17150
+ return new wy(t);
17268
17151
  case ie.FILEATTACHMENT:
17269
- return new SA(t);
17152
+ return new rA(t);
17270
17153
  default:
17271
17154
  return new qt(t);
17272
17155
  }
@@ -17342,7 +17225,7 @@ const um = class um {
17342
17225
  if (v > 0 || _ > 0) {
17343
17226
  const x = `calc(${v}px * var(--scale-factor)) / calc(${_}px * var(--scale-factor))`;
17344
17227
  r.borderRadius = x;
17345
- } else if (this instanceof py) {
17228
+ } else if (this instanceof fy) {
17346
17229
  const x = `calc(${a}px * var(--scale-factor)) / calc(${h}px * var(--scale-factor))`;
17347
17230
  r.borderRadius = x;
17348
17231
  }
@@ -17394,8 +17277,8 @@ const um = class um {
17394
17277
  get _commonActions() {
17395
17278
  const t = (e, s, i) => {
17396
17279
  const n = i.detail[e], r = n[0], a = n.slice(1);
17397
- i.target.style[s] = j0[`${r}_HTML`](a), this.annotationStorage.setValue(this.data.id, {
17398
- [s]: j0[`${r}_rgb`](a)
17280
+ i.target.style[s] = I0[`${r}_HTML`](a), this.annotationStorage.setValue(this.data.id, {
17281
+ [s]: I0[`${r}_rgb`](a)
17399
17282
  });
17400
17283
  };
17401
17284
  return ht(this, "_commonActions", {
@@ -17654,8 +17537,8 @@ ba = new WeakMap(), Jo = new WeakMap(), Qo = new WeakMap(), pc = new WeakSet(),
17654
17537
  e.left = `${100 * (t[0] - a) / n}%`, e.top = `${100 * (r - t[3] + h) / r}%`, i === 0 ? (e.width = `${100 * c / n}%`, e.height = `${100 * u / r}%`) : this.setRotation(i);
17655
17538
  };
17656
17539
  let qt = um;
17657
- var Ss, Er, fy, gy;
17658
- class dy extends qt {
17540
+ var Ss, Er, uy, dy;
17541
+ class cy extends qt {
17659
17542
  constructor(e, s = null) {
17660
17543
  super(e, {
17661
17544
  isRenderable: !0,
@@ -17672,7 +17555,7 @@ class dy extends qt {
17672
17555
  } = this, i = document.createElement("a");
17673
17556
  i.setAttribute("data-element-id", e.id);
17674
17557
  let n = !1;
17675
- return e.url ? (s.addLinkAttributes(i, e.url, e.newWindow), n = !0) : e.action ? (this._bindNamedAction(i, e.action), n = !0) : e.attachment ? (w(this, Ss, fy).call(this, i, e.attachment, e.attachmentDest), n = !0) : e.setOCGState ? (w(this, Ss, gy).call(this, i, e.setOCGState), n = !0) : e.dest ? (this._bindLink(i, e.dest), n = !0) : (e.actions && (e.actions.Action || e.actions["Mouse Up"] || e.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions && (this._bindJSAction(i, e), n = !0), e.resetForm ? (this._bindResetFormAction(i, e.resetForm), n = !0) : this.isTooltipOnly && !n && (this._bindLink(i, ""), n = !0)), this.container.classList.add("linkAnnotation"), n && this.container.append(i), this.container;
17558
+ return e.url ? (s.addLinkAttributes(i, e.url, e.newWindow), n = !0) : e.action ? (this._bindNamedAction(i, e.action), n = !0) : e.attachment ? (w(this, Ss, uy).call(this, i, e.attachment, e.attachmentDest), n = !0) : e.setOCGState ? (w(this, Ss, dy).call(this, i, e.setOCGState), n = !0) : e.dest ? (this._bindLink(i, e.dest), n = !0) : (e.actions && (e.actions.Action || e.actions["Mouse Up"] || e.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions && (this._bindJSAction(i, e), n = !0), e.resetForm ? (this._bindResetFormAction(i, e.resetForm), n = !0) : this.isTooltipOnly && !n && (this._bindLink(i, ""), n = !0)), this.container.classList.add("linkAnnotation"), n && this.container.append(i), this.container;
17676
17559
  }
17677
17560
  _bindLink(e, s) {
17678
17561
  e.href = this.linkService.getDestinationHash(s), e.onclick = () => (s && this.linkService.goToDestination(s), !1), (s || s === "") && w(this, Ss, Er).call(this);
@@ -17781,15 +17664,15 @@ class dy extends qt {
17781
17664
  }
17782
17665
  Ss = new WeakSet(), Er = function() {
17783
17666
  this.container.setAttribute("data-internal-link", "");
17784
- }, fy = function(e, s, i = null) {
17667
+ }, uy = function(e, s, i = null) {
17785
17668
  e.href = this.linkService.getAnchorUrl(""), s.description && (e.title = s.description), e.onclick = () => {
17786
17669
  var n;
17787
17670
  return (n = this.downloadManager) == null || n.openOrDownloadData(s.content, s.filename, i), !1;
17788
17671
  }, w(this, Ss, Er).call(this);
17789
- }, gy = function(e, s) {
17672
+ }, dy = function(e, s) {
17790
17673
  e.href = this.linkService.getAnchorUrl(""), e.onclick = () => (this.linkService.executeSetOCGState(s), !1), w(this, Ss, Er).call(this);
17791
17674
  };
17792
- class hA extends qt {
17675
+ class zC extends qt {
17793
17676
  constructor(t) {
17794
17677
  super(t, {
17795
17678
  isRenderable: !0
@@ -17862,7 +17745,7 @@ class Za extends qt {
17862
17745
  _setTextStyle(t) {
17863
17746
  const e = ["left", "center", "right"], {
17864
17747
  fontColor: s
17865
- } = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || aA, n = t.style;
17748
+ } = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || VC, n = t.style;
17866
17749
  let r;
17867
17750
  const a = 2, h = (c) => Math.round(10 * c) / 10;
17868
17751
  if (this.data.multiLine) {
@@ -17878,7 +17761,7 @@ class Za extends qt {
17878
17761
  e ? t.setAttribute("required", !0) : t.removeAttribute("required"), t.setAttribute("aria-required", e);
17879
17762
  }
17880
17763
  }
17881
- class lA extends Za {
17764
+ class XC extends Za {
17882
17765
  constructor(t) {
17883
17766
  const e = t.renderForms || t.data.hasOwnCanvas || !t.data.hasAppearance && !!t.data.fieldValue;
17884
17767
  super(t, {
@@ -18084,14 +17967,14 @@ class lA extends Za {
18084
17967
  return this._setTextStyle(s), this._setBackgroundColor(s), this._setDefaultPropertiesFromJS(s), this.container.append(s), this.container;
18085
17968
  }
18086
17969
  }
18087
- class cA extends Za {
17970
+ class UC extends Za {
18088
17971
  constructor(t) {
18089
17972
  super(t, {
18090
17973
  isRenderable: !!t.data.hasOwnCanvas
18091
17974
  });
18092
17975
  }
18093
17976
  }
18094
- class uA extends Za {
17977
+ class YC extends Za {
18095
17978
  constructor(t) {
18096
17979
  super(t, {
18097
17980
  isRenderable: t.renderForms
@@ -18135,7 +18018,7 @@ class uA extends Za {
18135
18018
  }), this._setEventListeners(n, null, [["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], (r) => r.target.checked)), this._setBackgroundColor(n), this._setDefaultPropertiesFromJS(n), this.container.append(n), this.container;
18136
18019
  }
18137
18020
  }
18138
- class py extends Za {
18021
+ class fy extends Za {
18139
18022
  constructor(t) {
18140
18023
  super(t, {
18141
18024
  isRenderable: t.renderForms
@@ -18190,7 +18073,7 @@ class py extends Za {
18190
18073
  return this._setBackgroundColor(n), this._setDefaultPropertiesFromJS(n), this.container.append(n), this.container;
18191
18074
  }
18192
18075
  }
18193
- class dA extends dy {
18076
+ class $C extends cy {
18194
18077
  constructor(t) {
18195
18078
  super(t, {
18196
18079
  ignoreBorder: t.data.hasAppearance
@@ -18205,7 +18088,7 @@ class dA extends dy {
18205
18088
  })), t;
18206
18089
  }
18207
18090
  }
18208
- class fA extends Za {
18091
+ class qC extends Za {
18209
18092
  constructor(t) {
18210
18093
  super(t, {
18211
18094
  isRenderable: t.renderForms
@@ -18357,7 +18240,7 @@ class Jg extends qt {
18357
18240
  }
18358
18241
  render() {
18359
18242
  this.container.classList.add("popupAnnotation");
18360
- const t = this.popup = new gA({
18243
+ const t = this.popup = new KC({
18361
18244
  container: this.container,
18362
18245
  color: this.data.color,
18363
18246
  titleObj: this.data.titleObj,
@@ -18375,8 +18258,8 @@ class Jg extends qt {
18375
18258
  return this.container.setAttribute("aria-controls", e.map((s) => `${Zp}${s}`).join(",")), this.container;
18376
18259
  }
18377
18260
  }
18378
- var Zo, Yd, $d, th, ya, Vt, fn, eh, mc, vc, sh, gn, Qs, pn, bc, mn, yc, _a, wa, Ct, Ju, Qg, my, vy, by, yy, Qu, Zu, Zg;
18379
- class gA {
18261
+ var Zo, Yd, $d, th, ya, Vt, fn, eh, mc, vc, sh, gn, Qs, pn, bc, mn, yc, _a, wa, Ct, Ju, Qg, gy, py, my, vy, Qu, Zu, Zg;
18262
+ class KC {
18380
18263
  constructor({
18381
18264
  container: t,
18382
18265
  color: e,
@@ -18391,7 +18274,7 @@ class gA {
18391
18274
  open: d
18392
18275
  }) {
18393
18276
  y(this, Ct);
18394
- y(this, Zo, w(this, Ct, by).bind(this));
18277
+ y(this, Zo, w(this, Ct, my).bind(this));
18395
18278
  y(this, Yd, w(this, Ct, Zg).bind(this));
18396
18279
  y(this, $d, w(this, Ct, Zu).bind(this));
18397
18280
  y(this, th, w(this, Ct, Qu).bind(this));
@@ -18440,7 +18323,7 @@ class gA {
18440
18323
  }
18441
18324
  const i = l(this, Ct, Ju);
18442
18325
  if (i)
18443
- uy.render({
18326
+ ly.render({
18444
18327
  xfaHtml: i,
18445
18328
  intent: "richText",
18446
18329
  div: t
@@ -18472,7 +18355,7 @@ class gA {
18472
18355
  l(this, _a) || m(this, _a, {
18473
18356
  contentsObj: l(this, fn),
18474
18357
  richText: l(this, mn)
18475
- }), t && m(this, pn, null), e && (m(this, mn, w(this, Ct, vy).call(this, e)), m(this, fn, null)), (s = l(this, Qs)) == null || s.remove(), m(this, Qs, null);
18358
+ }), t && m(this, pn, null), e && (m(this, mn, w(this, Ct, py).call(this, e)), m(this, fn, null)), (s = l(this, Qs)) == null || s.remove(), m(this, Qs, null);
18476
18359
  }
18477
18360
  resetEdited() {
18478
18361
  var t;
@@ -18497,10 +18380,10 @@ Zo = new WeakMap(), Yd = new WeakMap(), $d = new WeakMap(), th = new WeakMap(),
18497
18380
  }, Qg = function() {
18498
18381
  var t, e, s;
18499
18382
  return ((s = (e = (t = l(this, Ct, Ju)) == null ? void 0 : t.attributes) == null ? void 0 : e.style) == null ? void 0 : s.fontSize) || 0;
18500
- }, my = function() {
18383
+ }, gy = function() {
18501
18384
  var t, e, s;
18502
18385
  return ((s = (e = (t = l(this, Ct, Ju)) == null ? void 0 : t.attributes) == null ? void 0 : e.style) == null ? void 0 : s.color) || null;
18503
- }, vy = function(t) {
18386
+ }, py = function(t) {
18504
18387
  const e = [], s = {
18505
18388
  str: t,
18506
18389
  html: {
@@ -18515,7 +18398,7 @@ Zo = new WeakMap(), Yd = new WeakMap(), $d = new WeakMap(), th = new WeakMap(),
18515
18398
  }
18516
18399
  }, i = {
18517
18400
  style: {
18518
- color: l(this, Ct, my),
18401
+ color: l(this, Ct, gy),
18519
18402
  fontSize: l(this, Ct, Qg) ? `calc(${l(this, Ct, Qg)}px * var(--scale-factor))` : ""
18520
18403
  }
18521
18404
  };
@@ -18527,9 +18410,9 @@ Zo = new WeakMap(), Yd = new WeakMap(), $d = new WeakMap(), th = new WeakMap(),
18527
18410
  attributes: i
18528
18411
  });
18529
18412
  return s;
18530
- }, by = function(t) {
18413
+ }, my = function(t) {
18531
18414
  t.altKey || t.shiftKey || t.ctrlKey || t.metaKey || (t.key === "Enter" || t.key === "Escape" && l(this, gn)) && w(this, Ct, Qu).call(this);
18532
- }, yy = function() {
18415
+ }, vy = function() {
18533
18416
  if (l(this, pn) !== null)
18534
18417
  return;
18535
18418
  const {
@@ -18560,11 +18443,11 @@ Zo = new WeakMap(), Yd = new WeakMap(), $d = new WeakMap(), th = new WeakMap(),
18560
18443
  }, Qu = function() {
18561
18444
  m(this, gn, !l(this, gn)), l(this, gn) ? (w(this, Ct, Zu).call(this), l(this, Vt).addEventListener("click", l(this, th)), l(this, Vt).addEventListener("keydown", l(this, Zo))) : (w(this, Ct, Zg).call(this), l(this, Vt).removeEventListener("click", l(this, th)), l(this, Vt).removeEventListener("keydown", l(this, Zo)));
18562
18445
  }, Zu = function() {
18563
- l(this, Qs) || this.render(), this.isVisible ? l(this, gn) && l(this, Vt).classList.add("focused") : (w(this, Ct, yy).call(this), l(this, Vt).hidden = !1, l(this, Vt).style.zIndex = parseInt(l(this, Vt).style.zIndex) + 1e3);
18446
+ l(this, Qs) || this.render(), this.isVisible ? l(this, gn) && l(this, Vt).classList.add("focused") : (w(this, Ct, vy).call(this), l(this, Vt).hidden = !1, l(this, Vt).style.zIndex = parseInt(l(this, Vt).style.zIndex) + 1e3);
18564
18447
  }, Zg = function() {
18565
18448
  l(this, Vt).classList.remove("focused"), !(l(this, gn) || !this.isVisible) && (l(this, Vt).hidden = !0, l(this, Vt).style.zIndex = parseInt(l(this, Vt).style.zIndex) - 1e3);
18566
18449
  };
18567
- class _y extends qt {
18450
+ class by extends qt {
18568
18451
  constructor(t) {
18569
18452
  super(t, {
18570
18453
  isRenderable: !0,
@@ -18585,7 +18468,7 @@ class _y extends qt {
18585
18468
  }
18586
18469
  }
18587
18470
  var _c;
18588
- class pA extends qt {
18471
+ class JC extends qt {
18589
18472
  constructor(e) {
18590
18473
  super(e, {
18591
18474
  isRenderable: !0,
@@ -18610,7 +18493,7 @@ class pA extends qt {
18610
18493
  }
18611
18494
  _c = new WeakMap();
18612
18495
  var wc;
18613
- class mA extends qt {
18496
+ class QC extends qt {
18614
18497
  constructor(e) {
18615
18498
  super(e, {
18616
18499
  isRenderable: !0,
@@ -18635,7 +18518,7 @@ class mA extends qt {
18635
18518
  }
18636
18519
  wc = new WeakMap();
18637
18520
  var xc;
18638
- class vA extends qt {
18521
+ class ZC extends qt {
18639
18522
  constructor(e) {
18640
18523
  super(e, {
18641
18524
  isRenderable: !0,
@@ -18660,7 +18543,7 @@ class vA extends qt {
18660
18543
  }
18661
18544
  xc = new WeakMap();
18662
18545
  var Sc;
18663
- class wy extends qt {
18546
+ class yy extends qt {
18664
18547
  constructor(e) {
18665
18548
  super(e, {
18666
18549
  isRenderable: !0,
@@ -18702,12 +18585,12 @@ class wy extends qt {
18702
18585
  }
18703
18586
  }
18704
18587
  Sc = new WeakMap();
18705
- class bA extends wy {
18588
+ class tA extends yy {
18706
18589
  constructor(t) {
18707
18590
  super(t), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
18708
18591
  }
18709
18592
  }
18710
- class yA extends qt {
18593
+ class eA extends qt {
18711
18594
  constructor(t) {
18712
18595
  super(t, {
18713
18596
  isRenderable: !0,
@@ -18806,7 +18689,7 @@ Cc = new WeakMap(), xa = new WeakMap(), Ac = new WeakSet(), tp = function(e, s)
18806
18689
  };
18807
18690
  }
18808
18691
  };
18809
- class xy extends qt {
18692
+ class _y extends qt {
18810
18693
  constructor(t) {
18811
18694
  super(t, {
18812
18695
  isRenderable: !0,
@@ -18818,7 +18701,7 @@ class xy extends qt {
18818
18701
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("highlightAnnotation"), this._editOnDoubleClick(), this.container;
18819
18702
  }
18820
18703
  }
18821
- class _A extends qt {
18704
+ class sA extends qt {
18822
18705
  constructor(t) {
18823
18706
  super(t, {
18824
18707
  isRenderable: !0,
@@ -18830,7 +18713,7 @@ class _A extends qt {
18830
18713
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("underlineAnnotation"), this.container;
18831
18714
  }
18832
18715
  }
18833
- class wA extends qt {
18716
+ class iA extends qt {
18834
18717
  constructor(t) {
18835
18718
  super(t, {
18836
18719
  isRenderable: !0,
@@ -18842,7 +18725,7 @@ class wA extends qt {
18842
18725
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("squigglyAnnotation"), this.container;
18843
18726
  }
18844
18727
  }
18845
- class xA extends qt {
18728
+ class nA extends qt {
18846
18729
  constructor(t) {
18847
18730
  super(t, {
18848
18731
  isRenderable: !0,
@@ -18854,7 +18737,7 @@ class xA extends qt {
18854
18737
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("strikeoutAnnotation"), this.container;
18855
18738
  }
18856
18739
  }
18857
- class Sy extends qt {
18740
+ class wy extends qt {
18858
18741
  constructor(t) {
18859
18742
  super(t, {
18860
18743
  isRenderable: !0,
@@ -18866,7 +18749,7 @@ class Sy extends qt {
18866
18749
  }
18867
18750
  }
18868
18751
  var Tc, Ec, ep;
18869
- class SA extends qt {
18752
+ class rA extends qt {
18870
18753
  constructor(e) {
18871
18754
  var i;
18872
18755
  super(e, {
@@ -18908,8 +18791,8 @@ Tc = new WeakMap(), Ec = new WeakSet(), ep = function() {
18908
18791
  var e;
18909
18792
  (e = this.downloadManager) == null || e.openOrDownloadData(this.content, this.filename);
18910
18793
  };
18911
- var kc, Sa, Ca, Pc, Ka, Cy, sp;
18912
- class CA {
18794
+ var kc, Sa, Ca, Pc, Ka, xy, sp;
18795
+ class aA {
18913
18796
  constructor({
18914
18797
  div: t,
18915
18798
  accessibilityManager: e,
@@ -18968,7 +18851,7 @@ class CA {
18968
18851
  continue;
18969
18852
  }
18970
18853
  n.data = a;
18971
- const c = oA.create(n);
18854
+ const c = WC.create(n);
18972
18855
  if (!c.isRenderable)
18973
18856
  continue;
18974
18857
  if (!h && a.popupRef) {
@@ -18976,7 +18859,7 @@ class CA {
18976
18859
  d ? d.push(c) : i.set(a.popupRef, [c]);
18977
18860
  }
18978
18861
  const u = c.render();
18979
- a.hidden && (u.style.visibility = "hidden"), await w(this, Ka, Cy).call(this, u, a.id), c._isEditable && (l(this, Ca).set(c.data.id, c), (r = this._annotationEditorUIManager) == null || r.renderAnnotationElement(c));
18862
+ a.hidden && (u.style.visibility = "hidden"), await w(this, Ka, xy).call(this, u, a.id), c._isEditable && (l(this, Ca).set(c.data.id, c), (r = this._annotationEditorUIManager) == null || r.renderAnnotationElement(c));
18980
18863
  }
18981
18864
  w(this, Ka, sp).call(this);
18982
18865
  }
@@ -18995,7 +18878,7 @@ class CA {
18995
18878
  return l(this, Ca).get(t);
18996
18879
  }
18997
18880
  }
18998
- kc = new WeakMap(), Sa = new WeakMap(), Ca = new WeakMap(), Pc = new WeakMap(), Ka = new WeakSet(), Cy = async function(t, e) {
18881
+ kc = new WeakMap(), Sa = new WeakMap(), Ca = new WeakMap(), Pc = new WeakMap(), Ka = new WeakSet(), xy = async function(t, e) {
18999
18882
  var r, a;
19000
18883
  const s = t.firstChild || t, i = s.id = `${Zp}${e}`, n = await ((r = l(this, Pc)) == null ? void 0 : r.getAriaAttributes(i));
19001
18884
  if (n)
@@ -19019,7 +18902,7 @@ kc = new WeakMap(), Sa = new WeakMap(), Ca = new WeakMap(), Pc = new WeakMap(),
19019
18902
  l(this, Sa).clear();
19020
18903
  };
19021
18904
  const Du = /\r\n?|\n/g;
19022
- var Zs, gs, Mc, Aa, ps, se, Ay, Ty, Ey, td, Pn, ed, sd, ky, np, Py;
18905
+ var Zs, gs, Mc, Aa, ps, se, Sy, Cy, Ay, td, Pn, ed, sd, Ty, np, Ey;
19023
18906
  const Pt = class Pt extends Ht {
19024
18907
  constructor(e) {
19025
18908
  super({
@@ -19082,10 +18965,10 @@ const Pt = class Pt extends Ht {
19082
18965
  updateParams(e, s) {
19083
18966
  switch (e) {
19084
18967
  case ct.FREETEXT_SIZE:
19085
- w(this, se, Ay).call(this, s);
18968
+ w(this, se, Sy).call(this, s);
19086
18969
  break;
19087
18970
  case ct.FREETEXT_COLOR:
19088
- w(this, se, Ty).call(this, s);
18971
+ w(this, se, Cy).call(this, s);
19089
18972
  break;
19090
18973
  }
19091
18974
  }
@@ -19145,7 +19028,7 @@ const Pt = class Pt extends Ht {
19145
19028
  if (!this.isInEditMode())
19146
19029
  return;
19147
19030
  super.commit(), this.disableEditMode();
19148
- const e = l(this, gs), s = m(this, gs, w(this, se, Ey).call(this).trimEnd());
19031
+ const e = l(this, gs), s = m(this, gs, w(this, se, Ay).call(this).trimEnd());
19149
19032
  if (e === s)
19150
19033
  return;
19151
19034
  const i = (n) => {
@@ -19303,7 +19186,7 @@ const Pt = class Pt extends Ht {
19303
19186
  static async deserialize(e, s, i) {
19304
19187
  var a;
19305
19188
  let n = null;
19306
- if (e instanceof _y) {
19189
+ if (e instanceof by) {
19307
19190
  const {
19308
19191
  data: {
19309
19192
  defaultAppearanceData: {
@@ -19352,13 +19235,13 @@ const Pt = class Pt extends Ht {
19352
19235
  annotationType: nt.FREETEXT,
19353
19236
  color: n,
19354
19237
  fontSize: l(this, ps),
19355
- value: w(this, se, ky).call(this),
19238
+ value: w(this, se, Ty).call(this),
19356
19239
  pageIndex: this.pageIndex,
19357
19240
  rect: i,
19358
19241
  rotation: this.rotation,
19359
19242
  structTreeParentId: this._structTreeParentId
19360
19243
  };
19361
- return e ? r : this.annotationElementId && !w(this, se, Py).call(this, r) ? null : (r.id = this.annotationElementId, r);
19244
+ return e ? r : this.annotationElementId && !w(this, se, Ey).call(this, r) ? null : (r.id = this.annotationElementId, r);
19362
19245
  }
19363
19246
  renderAnnotationElement(e) {
19364
19247
  const s = super.renderAnnotationElement(e);
@@ -19383,7 +19266,7 @@ const Pt = class Pt extends Ht {
19383
19266
  super.resetAnnotationElement(e), e.resetEdited();
19384
19267
  }
19385
19268
  };
19386
- Zs = new WeakMap(), gs = new WeakMap(), Mc = new WeakMap(), Aa = new WeakMap(), ps = new WeakMap(), se = new WeakSet(), Ay = function(e) {
19269
+ Zs = new WeakMap(), gs = new WeakMap(), Mc = new WeakMap(), Aa = new WeakMap(), ps = new WeakMap(), se = new WeakSet(), Sy = function(e) {
19387
19270
  const s = (n) => {
19388
19271
  this.editorDiv.style.fontSize = `calc(${n}px * var(--scale-factor))`, this.translate(0, -(n - l(this, ps)) * this.parentScale), m(this, ps, n), w(this, se, td).call(this);
19389
19272
  }, i = l(this, ps);
@@ -19396,7 +19279,7 @@ Zs = new WeakMap(), gs = new WeakMap(), Mc = new WeakMap(), Aa = new WeakMap(),
19396
19279
  overwriteIfSameType: !0,
19397
19280
  keepUndo: !0
19398
19281
  });
19399
- }, Ty = function(e) {
19282
+ }, Cy = function(e) {
19400
19283
  const s = (n) => {
19401
19284
  m(this, Zs, this.editorDiv.style.color = n);
19402
19285
  }, i = l(this, Zs);
@@ -19409,7 +19292,7 @@ Zs = new WeakMap(), gs = new WeakMap(), Mc = new WeakMap(), Aa = new WeakMap(),
19409
19292
  overwriteIfSameType: !0,
19410
19293
  keepUndo: !0
19411
19294
  });
19412
- }, Ey = function() {
19295
+ }, Ay = function() {
19413
19296
  var i;
19414
19297
  const e = [];
19415
19298
  this.editorDiv.normalize();
@@ -19440,11 +19323,11 @@ Zs = new WeakMap(), gs = new WeakMap(), Mc = new WeakMap(), Aa = new WeakMap(),
19440
19323
  const s = document.createElement("div");
19441
19324
  s.append(e ? document.createTextNode(e) : document.createElement("br")), this.editorDiv.append(s);
19442
19325
  }
19443
- }, ky = function() {
19326
+ }, Ty = function() {
19444
19327
  return l(this, gs).replaceAll(" ", " ");
19445
19328
  }, np = function(e) {
19446
19329
  return e.replaceAll(" ", " ");
19447
- }, Py = function(e) {
19330
+ }, Ey = function(e) {
19448
19331
  const {
19449
19332
  value: s,
19450
19333
  fontSize: i,
@@ -19514,7 +19397,7 @@ class X {
19514
19397
  }
19515
19398
  }
19516
19399
  K(X, "PRECISION", 1e-4);
19517
- var ms, ti, ih, nh, Mi, ot, Ta, Ea, Oc, Dc, rh, ah, rr, Rc, qd, Kd, oe, nl, My, Oy, Dy, Ry, Ly, Fy;
19400
+ var ms, ti, ih, nh, Mi, ot, Ta, Ea, Oc, Dc, rh, ah, rr, Rc, qd, Kd, oe, il, ky, Py, My, Oy, Dy, Ry;
19518
19401
  const qi = class qi {
19519
19402
  constructor({
19520
19403
  x: t,
@@ -19561,18 +19444,18 @@ const qi = class qi {
19561
19444
  return "";
19562
19445
  const t = l(this, Mi), e = l(this, ti);
19563
19446
  if (isNaN(l(this, ot)[6]) && !this.isEmpty())
19564
- return w(this, oe, My).call(this);
19447
+ return w(this, oe, ky).call(this);
19565
19448
  const s = [];
19566
19449
  s.push(`M${t[4]} ${t[5]}`);
19567
19450
  for (let i = 6; i < t.length; i += 6)
19568
19451
  isNaN(t[i]) ? s.push(`L${t[i + 4]} ${t[i + 5]}`) : s.push(`C${t[i]} ${t[i + 1]} ${t[i + 2]} ${t[i + 3]} ${t[i + 4]} ${t[i + 5]}`);
19569
- w(this, oe, Dy).call(this, s);
19452
+ w(this, oe, My).call(this, s);
19570
19453
  for (let i = e.length - 6; i >= 6; i -= 6)
19571
19454
  isNaN(e[i]) ? s.push(`L${e[i + 4]} ${e[i + 5]}`) : s.push(`C${e[i]} ${e[i + 1]} ${e[i + 2]} ${e[i + 3]} ${e[i + 4]} ${e[i + 5]}`);
19572
- return w(this, oe, Oy).call(this, s), s.join(" ");
19455
+ return w(this, oe, Py).call(this, s), s.join(" ");
19573
19456
  }
19574
19457
  newFreeDrawOutline(t, e, s, i, n, r) {
19575
- return new Iy(t, e, s, i, n, r);
19458
+ return new Ly(t, e, s, i, n, r);
19576
19459
  }
19577
19460
  getOutlines() {
19578
19461
  var d;
@@ -19580,7 +19463,7 @@ const qi = class qi {
19580
19463
  for (let f = 0, g = h.length - 2; f < g; f += 2)
19581
19464
  h[f] = (l(this, rr)[f] - i) / r, h[f + 1] = (l(this, rr)[f + 1] - n) / a;
19582
19465
  if (h[h.length - 2] = (l(this, Ta) - i) / r, h[h.length - 1] = (l(this, Ea) - n) / a, isNaN(s[6]) && !this.isEmpty())
19583
- return w(this, oe, Ry).call(this, h);
19466
+ return w(this, oe, Oy).call(this, h);
19584
19467
  const c = new Float32Array(l(this, Mi).length + 24 + l(this, ti).length);
19585
19468
  let u = t.length;
19586
19469
  for (let f = 0; f < u; f += 2) {
@@ -19590,7 +19473,7 @@ const qi = class qi {
19590
19473
  }
19591
19474
  c[f] = t[f], c[f + 1] = t[f + 1];
19592
19475
  }
19593
- u = w(this, oe, Fy).call(this, c, u);
19476
+ u = w(this, oe, Ry).call(this, c, u);
19594
19477
  for (let f = e.length - 6; f >= 6; f -= 6)
19595
19478
  for (let g = 0; g < 6; g += 2) {
19596
19479
  if (isNaN(e[f + g])) {
@@ -19599,34 +19482,34 @@ const qi = class qi {
19599
19482
  }
19600
19483
  c[u] = e[f + g], c[u + 1] = e[f + g + 1], u += 2;
19601
19484
  }
19602
- return w(this, oe, Ly).call(this, c, u), this.newFreeDrawOutline(c, h, l(this, ms), l(this, rh), l(this, ih), l(this, nh));
19485
+ return w(this, oe, Dy).call(this, c, u), this.newFreeDrawOutline(c, h, l(this, ms), l(this, rh), l(this, ih), l(this, nh));
19603
19486
  }
19604
19487
  };
19605
- ms = new WeakMap(), ti = new WeakMap(), ih = new WeakMap(), nh = new WeakMap(), Mi = new WeakMap(), ot = new WeakMap(), Ta = new WeakMap(), Ea = new WeakMap(), Oc = new WeakMap(), Dc = new WeakMap(), rh = new WeakMap(), ah = new WeakMap(), rr = new WeakMap(), Rc = new WeakMap(), qd = new WeakMap(), Kd = new WeakMap(), oe = new WeakSet(), nl = function() {
19488
+ ms = new WeakMap(), ti = new WeakMap(), ih = new WeakMap(), nh = new WeakMap(), Mi = new WeakMap(), ot = new WeakMap(), Ta = new WeakMap(), Ea = new WeakMap(), Oc = new WeakMap(), Dc = new WeakMap(), rh = new WeakMap(), ah = new WeakMap(), rr = new WeakMap(), Rc = new WeakMap(), qd = new WeakMap(), Kd = new WeakMap(), oe = new WeakSet(), il = function() {
19606
19489
  const t = l(this, ot).subarray(4, 6), e = l(this, ot).subarray(16, 18), [s, i, n, r] = l(this, ms);
19607
19490
  return [(l(this, Ta) + (t[0] - e[0]) / 2 - s) / n, (l(this, Ea) + (t[1] - e[1]) / 2 - i) / r, (l(this, Ta) + (e[0] - t[0]) / 2 - s) / n, (l(this, Ea) + (e[1] - t[1]) / 2 - i) / r];
19608
- }, My = function() {
19609
- const [t, e, s, i] = l(this, ms), [n, r, a, h] = w(this, oe, nl).call(this);
19491
+ }, ky = function() {
19492
+ const [t, e, s, i] = l(this, ms), [n, r, a, h] = w(this, oe, il).call(this);
19610
19493
  return `M${(l(this, ot)[2] - t) / s} ${(l(this, ot)[3] - e) / i} L${(l(this, ot)[4] - t) / s} ${(l(this, ot)[5] - e) / i} L${n} ${r} L${a} ${h} L${(l(this, ot)[16] - t) / s} ${(l(this, ot)[17] - e) / i} L${(l(this, ot)[14] - t) / s} ${(l(this, ot)[15] - e) / i} Z`;
19611
- }, Oy = function(t) {
19494
+ }, Py = function(t) {
19612
19495
  const e = l(this, ti);
19613
19496
  t.push(`L${e[4]} ${e[5]} Z`);
19614
- }, Dy = function(t) {
19615
- const [e, s, i, n] = l(this, ms), r = l(this, ot).subarray(4, 6), a = l(this, ot).subarray(16, 18), [h, c, u, d] = w(this, oe, nl).call(this);
19497
+ }, My = function(t) {
19498
+ const [e, s, i, n] = l(this, ms), r = l(this, ot).subarray(4, 6), a = l(this, ot).subarray(16, 18), [h, c, u, d] = w(this, oe, il).call(this);
19616
19499
  t.push(`L${(r[0] - e) / i} ${(r[1] - s) / n} L${h} ${c} L${u} ${d} L${(a[0] - e) / i} ${(a[1] - s) / n}`);
19617
- }, Ry = function(t) {
19618
- const e = l(this, ot), [s, i, n, r] = l(this, ms), [a, h, c, u] = w(this, oe, nl).call(this), d = new Float32Array(36);
19500
+ }, Oy = function(t) {
19501
+ const e = l(this, ot), [s, i, n, r] = l(this, ms), [a, h, c, u] = w(this, oe, il).call(this), d = new Float32Array(36);
19619
19502
  return d.set([NaN, NaN, NaN, NaN, (e[2] - s) / n, (e[3] - i) / r, NaN, NaN, NaN, NaN, (e[4] - s) / n, (e[5] - i) / r, NaN, NaN, NaN, NaN, a, h, NaN, NaN, NaN, NaN, c, u, NaN, NaN, NaN, NaN, (e[16] - s) / n, (e[17] - i) / r, NaN, NaN, NaN, NaN, (e[14] - s) / n, (e[15] - i) / r], 0), this.newFreeDrawOutline(d, t, l(this, ms), l(this, rh), l(this, ih), l(this, nh));
19620
- }, Ly = function(t, e) {
19503
+ }, Dy = function(t, e) {
19621
19504
  const s = l(this, ti);
19622
19505
  return t.set([NaN, NaN, NaN, NaN, s[4], s[5]], e), e += 6;
19623
- }, Fy = function(t, e) {
19624
- const s = l(this, ot).subarray(4, 6), i = l(this, ot).subarray(16, 18), [n, r, a, h] = l(this, ms), [c, u, d, f] = w(this, oe, nl).call(this);
19506
+ }, Ry = function(t, e) {
19507
+ const s = l(this, ot).subarray(4, 6), i = l(this, ot).subarray(16, 18), [n, r, a, h] = l(this, ms), [c, u, d, f] = w(this, oe, il).call(this);
19625
19508
  return t.set([NaN, NaN, NaN, NaN, (s[0] - n) / a, (s[1] - r) / h, NaN, NaN, NaN, NaN, c, u, NaN, NaN, NaN, NaN, d, f, NaN, NaN, NaN, NaN, (i[0] - n) / a, (i[1] - r) / h], e), e += 24;
19626
19509
  }, y(qi, Rc, 8), y(qi, qd, 2), y(qi, Kd, l(qi, Rc) + l(qi, qd));
19627
19510
  let Od = qi;
19628
- var oh, ka, vn, Lc, vs, Fc, Ut, Jd, jy;
19629
- class Iy extends X {
19511
+ var oh, ka, vn, Lc, vs, Fc, Ut, Jd, Fy;
19512
+ class Ly extends X {
19630
19513
  constructor(e, s, i, n, r, a) {
19631
19514
  super();
19632
19515
  y(this, Jd);
@@ -19637,7 +19520,7 @@ class Iy extends X {
19637
19520
  y(this, vs);
19638
19521
  y(this, Fc);
19639
19522
  y(this, Ut);
19640
- m(this, Ut, e), m(this, vs, s), m(this, oh, i), m(this, Fc, n), m(this, vn, r), m(this, Lc, a), this.lastPoint = [NaN, NaN], w(this, Jd, jy).call(this, a);
19523
+ m(this, Ut, e), m(this, vs, s), m(this, oh, i), m(this, Fc, n), m(this, vn, r), m(this, Lc, a), this.lastPoint = [NaN, NaN], w(this, Jd, Fy).call(this, a);
19641
19524
  const [h, c, u, d] = l(this, ka);
19642
19525
  for (let f = 0, g = e.length; f < g; f += 2)
19643
19526
  e[f] = (e[f] - h) / u, e[f + 1] = (e[f + 1] - c) / d;
@@ -19696,7 +19579,7 @@ class Iy extends X {
19696
19579
  return _.getOutlines();
19697
19580
  }
19698
19581
  }
19699
- oh = new WeakMap(), ka = new WeakMap(), vn = new WeakMap(), Lc = new WeakMap(), vs = new WeakMap(), Fc = new WeakMap(), Ut = new WeakMap(), Jd = new WeakSet(), jy = function(e) {
19582
+ oh = new WeakMap(), ka = new WeakMap(), vn = new WeakMap(), Lc = new WeakMap(), vs = new WeakMap(), Fc = new WeakMap(), Ut = new WeakMap(), Jd = new WeakSet(), Fy = function(e) {
19700
19583
  const s = l(this, Ut);
19701
19584
  let i = s[4], n = s[5], r = i, a = n, h = i, c = n, u = i, d = n;
19702
19585
  const f = e ? Math.max : Math.min;
@@ -19712,7 +19595,7 @@ oh = new WeakMap(), ka = new WeakMap(), vn = new WeakMap(), Lc = new WeakMap(),
19712
19595
  const g = l(this, ka);
19713
19596
  g[0] = r - l(this, vn), g[1] = a - l(this, vn), g[2] = h - r + 2 * l(this, vn), g[3] = c - a + 2 * l(this, vn), this.lastPoint = [u, d];
19714
19597
  };
19715
- var Ic, jc, ar, ei, qe, Ny, id, By, Hy, ap;
19598
+ var Ic, jc, ar, ei, qe, Iy, id, jy, Ny, ap;
19716
19599
  class rp {
19717
19600
  constructor(t, e = 0, s = 0, i = !0) {
19718
19601
  y(this, qe);
@@ -19742,11 +19625,11 @@ class rp {
19742
19625
  l(this, ar).sort((e, s) => e[0] - s[0] || e[1] - s[1] || e[2] - s[2]);
19743
19626
  const t = [];
19744
19627
  for (const e of l(this, ar))
19745
- e[3] ? (t.push(...w(this, qe, ap).call(this, e)), w(this, qe, By).call(this, e)) : (w(this, qe, Hy).call(this, e), t.push(...w(this, qe, ap).call(this, e)));
19746
- return w(this, qe, Ny).call(this, t);
19628
+ e[3] ? (t.push(...w(this, qe, ap).call(this, e)), w(this, qe, jy).call(this, e)) : (w(this, qe, Ny).call(this, e), t.push(...w(this, qe, ap).call(this, e)));
19629
+ return w(this, qe, Iy).call(this, t);
19747
19630
  }
19748
19631
  }
19749
- Ic = new WeakMap(), jc = new WeakMap(), ar = new WeakMap(), ei = new WeakMap(), qe = new WeakSet(), Ny = function(t) {
19632
+ Ic = new WeakMap(), jc = new WeakMap(), ar = new WeakMap(), ei = new WeakMap(), qe = new WeakSet(), Iy = function(t) {
19750
19633
  const e = [], s = /* @__PURE__ */ new Set();
19751
19634
  for (const r of t) {
19752
19635
  const [a, h, c] = r;
@@ -19776,7 +19659,7 @@ Ic = new WeakMap(), jc = new WeakMap(), ar = new WeakMap(), ei = new WeakMap(),
19776
19659
  }
19777
19660
  n.push(f, g);
19778
19661
  }
19779
- return new AA(i, l(this, Ic), l(this, jc));
19662
+ return new oA(i, l(this, Ic), l(this, jc));
19780
19663
  }, id = function(t) {
19781
19664
  const e = l(this, ei);
19782
19665
  let s = 0, i = e.length - 1;
@@ -19787,10 +19670,10 @@ Ic = new WeakMap(), jc = new WeakMap(), ar = new WeakMap(), ei = new WeakMap(),
19787
19670
  r < t ? s = n + 1 : i = n - 1;
19788
19671
  }
19789
19672
  return i + 1;
19790
- }, By = function([, t, e]) {
19673
+ }, jy = function([, t, e]) {
19791
19674
  const s = w(this, qe, id).call(this, t);
19792
19675
  l(this, ei).splice(s, 0, [t, e]);
19793
- }, Hy = function([, t, e]) {
19676
+ }, Ny = function([, t, e]) {
19794
19677
  const s = w(this, qe, id).call(this, t);
19795
19678
  for (let i = s; i < l(this, ei).length; i++) {
19796
19679
  const [n, r] = l(this, ei)[i];
@@ -19834,7 +19717,7 @@ Ic = new WeakMap(), jc = new WeakMap(), ar = new WeakMap(), ei = new WeakMap(),
19834
19717
  return n;
19835
19718
  };
19836
19719
  var Nc, hh;
19837
- class AA extends X {
19720
+ class oA extends X {
19838
19721
  constructor(e, s, i) {
19839
19722
  super();
19840
19723
  y(this, Nc);
@@ -19874,15 +19757,15 @@ class AA extends X {
19874
19757
  Nc = new WeakMap(), hh = new WeakMap();
19875
19758
  class op extends Od {
19876
19759
  newFreeDrawOutline(t, e, s, i, n, r) {
19877
- return new TA(t, e, s, i, n, r);
19760
+ return new hA(t, e, s, i, n, r);
19878
19761
  }
19879
19762
  }
19880
- class TA extends Iy {
19763
+ class hA extends Ly {
19881
19764
  newOutliner(t, e, s, i, n, r = 0) {
19882
19765
  return new op(t, e, s, i, n, r);
19883
19766
  }
19884
19767
  }
19885
- var si, Pa, lh, ae, Bc, ch, Hc, Gc, or, ii, uh, Vc, St, hp, lp, cp, kr, Gy, Nn;
19768
+ var si, Pa, lh, ae, Bc, ch, Hc, Gc, or, ii, uh, Vc, St, hp, lp, cp, kr, By, Nn;
19886
19769
  const es = class es {
19887
19770
  constructor({
19888
19771
  editor: t = null,
@@ -20030,7 +19913,7 @@ si = new WeakMap(), Pa = new WeakMap(), lh = new WeakMap(), ae = new WeakMap(),
20030
19913
  this.hideDropdown();
20031
19914
  return;
20032
19915
  }
20033
- if (m(this, Bc, t.detail === 0), l(this, or) || (m(this, or, new AbortController()), window.addEventListener("pointerdown", w(this, St, Gy).bind(this), {
19916
+ if (m(this, Bc, t.detail === 0), l(this, or) || (m(this, or, new AbortController()), window.addEventListener("pointerdown", w(this, St, By).bind(this), {
20034
19917
  signal: l(this, ii).combinedSignal(l(this, or))
20035
19918
  })), l(this, ae)) {
20036
19919
  l(this, ae).classList.remove("hidden");
@@ -20038,14 +19921,14 @@ si = new WeakMap(), Pa = new WeakMap(), lh = new WeakMap(), ae = new WeakMap(),
20038
19921
  }
20039
19922
  const e = m(this, ae, w(this, St, hp).call(this));
20040
19923
  l(this, si).append(e);
20041
- }, Gy = function(t) {
19924
+ }, By = function(t) {
20042
19925
  var e;
20043
19926
  (e = l(this, ae)) != null && e.contains(t.target) || this.hideDropdown();
20044
19927
  }, Nn = function() {
20045
19928
  return l(this, ae) && !l(this, ae).classList.contains("hidden");
20046
19929
  }, y(es, Vc, null);
20047
19930
  let Dd = es;
20048
- var dh, Wc, bn, Ma, fh, ns, zc, Xc, Oa, Ls, bs, be, gh, yn, Ee, ph, Fs, Uc, st, up, nd, Vy, Wy, zy, dp, Pr, Gs, co, Xy, rd, rl, Uy, Yy, $y, qy, Ky;
19931
+ var dh, Wc, bn, Ma, fh, ns, zc, Xc, Oa, Ls, bs, be, gh, yn, Ee, ph, Fs, Uc, st, up, nd, Hy, Gy, Vy, dp, Pr, Gs, co, Wy, rd, nl, zy, Xy, Uy, Yy, $y;
20049
19932
  const mt = class mt extends Ht {
20050
19933
  constructor(e) {
20051
19934
  super({
@@ -20127,10 +20010,10 @@ const mt = class mt extends Ht {
20127
20010
  updateParams(e, s) {
20128
20011
  switch (e) {
20129
20012
  case ct.HIGHLIGHT_COLOR:
20130
- w(this, st, Vy).call(this, s);
20013
+ w(this, st, Hy).call(this, s);
20131
20014
  break;
20132
20015
  case ct.HIGHLIGHT_THICKNESS:
20133
- w(this, st, Wy).call(this, s);
20016
+ w(this, st, Gy).call(this, s);
20134
20017
  break;
20135
20018
  }
20136
20019
  }
@@ -20153,13 +20036,13 @@ const mt = class mt extends Ht {
20153
20036
  super.enableEditing(), this.div.classList.toggle("disabled", !1);
20154
20037
  }
20155
20038
  fixAndSetPosition() {
20156
- return super.fixAndSetPosition(w(this, st, rl).call(this));
20039
+ return super.fixAndSetPosition(w(this, st, nl).call(this));
20157
20040
  }
20158
20041
  getBaseTranslation() {
20159
20042
  return [0, 0];
20160
20043
  }
20161
20044
  getRect(e, s) {
20162
- return super.getRect(e, s, w(this, st, rl).call(this));
20045
+ return super.getRect(e, s, w(this, st, nl).call(this));
20163
20046
  }
20164
20047
  onceAdded(e) {
20165
20048
  this.annotationElementId || this.parent.addUndoableEditor(this), e && this.div.focus();
@@ -20199,7 +20082,7 @@ const mt = class mt extends Ht {
20199
20082
  if (this.div)
20200
20083
  return this.div;
20201
20084
  const e = super.render();
20202
- l(this, ph) && (e.setAttribute("aria-label", l(this, ph)), e.setAttribute("role", "mark")), l(this, be) ? e.classList.add("free") : this.div.addEventListener("keydown", w(this, st, Xy).bind(this), {
20085
+ l(this, ph) && (e.setAttribute("aria-label", l(this, ph)), e.setAttribute("role", "mark")), l(this, be) ? e.classList.add("free") : this.div.addEventListener("keydown", w(this, st, Wy).bind(this), {
20203
20086
  signal: this._uiManager._signal
20204
20087
  });
20205
20088
  const s = m(this, Oa, document.createElement("div"));
@@ -20277,7 +20160,7 @@ const mt = class mt extends Ht {
20277
20160
  width: c,
20278
20161
  height: u
20279
20162
  } = i.getBoundingClientRect(), d = new AbortController(), f = e.combinedSignal(d), g = (p) => {
20280
- d.abort(), w(this, Gs, qy).call(this, e, p);
20163
+ d.abort(), w(this, Gs, Yy).call(this, e, p);
20281
20164
  };
20282
20165
  window.addEventListener("blur", g, {
20283
20166
  signal: f
@@ -20289,7 +20172,7 @@ const mt = class mt extends Ht {
20289
20172
  signal: f
20290
20173
  }), window.addEventListener("contextmenu", gi, {
20291
20174
  signal: f
20292
- }), i.addEventListener("pointermove", w(this, Gs, $y).bind(this, e), {
20175
+ }), i.addEventListener("pointermove", w(this, Gs, Uy).bind(this, e), {
20293
20176
  signal: f
20294
20177
  }), this._freeHighlight = new op({
20295
20178
  x: n,
@@ -20316,7 +20199,7 @@ const mt = class mt extends Ht {
20316
20199
  static async deserialize(e, s, i) {
20317
20200
  var v, _, b, x;
20318
20201
  let n = null;
20319
- if (e instanceof xy) {
20202
+ if (e instanceof _y) {
20320
20203
  const {
20321
20204
  data: {
20322
20205
  quadPoints: C,
@@ -20441,14 +20324,14 @@ const mt = class mt extends Ht {
20441
20324
  color: i,
20442
20325
  opacity: l(this, yn),
20443
20326
  thickness: l(this, Fs),
20444
- quadPoints: w(this, st, Uy).call(this),
20445
- outlines: w(this, st, Yy).call(this, s),
20327
+ quadPoints: w(this, st, zy).call(this),
20328
+ outlines: w(this, st, Xy).call(this, s),
20446
20329
  pageIndex: this.pageIndex,
20447
20330
  rect: s,
20448
- rotation: w(this, st, rl).call(this),
20331
+ rotation: w(this, st, nl).call(this),
20449
20332
  structTreeParentId: this._structTreeParentId
20450
20333
  };
20451
- return this.annotationElementId && !w(this, st, Ky).call(this, n) ? null : (n.id = this.annotationElementId, n);
20334
+ return this.annotationElementId && !w(this, st, $y).call(this, n) ? null : (n.id = this.annotationElementId, n);
20452
20335
  }
20453
20336
  renderAnnotationElement(e) {
20454
20337
  return e.updateEdited({
@@ -20527,7 +20410,7 @@ dh = new WeakMap(), Wc = new WeakMap(), bn = new WeakMap(), Ma = new WeakMap(),
20527
20410
  lastPoint: u
20528
20411
  } = l(this, ns);
20529
20412
  m(this, gh, [(u[0] - r) / h, (u[1] - a) / c]);
20530
- }, Vy = function(e) {
20413
+ }, Hy = function(e) {
20531
20414
  const s = (r, a) => {
20532
20415
  var h, c;
20533
20416
  this.color = r, m(this, yn, a), (h = this.parent) == null || h.drawLayer.updateProperties(l(this, bs), {
@@ -20549,9 +20432,9 @@ dh = new WeakMap(), Wc = new WeakMap(), bn = new WeakMap(), Ma = new WeakMap(),
20549
20432
  action: "color_changed",
20550
20433
  color: this._uiManager.highlightColorNames.get(e)
20551
20434
  }, !0);
20552
- }, Wy = function(e) {
20435
+ }, Gy = function(e) {
20553
20436
  const s = l(this, Fs), i = (n) => {
20554
- m(this, Fs, n), w(this, st, zy).call(this, n);
20437
+ m(this, Fs, n), w(this, st, Vy).call(this, n);
20555
20438
  };
20556
20439
  this.addCommands({
20557
20440
  cmd: i.bind(this, e),
@@ -20565,7 +20448,7 @@ dh = new WeakMap(), Wc = new WeakMap(), bn = new WeakMap(), Ma = new WeakMap(),
20565
20448
  action: "thickness_changed",
20566
20449
  thickness: e
20567
20450
  }, !0);
20568
- }, zy = function(e) {
20451
+ }, Vy = function(e) {
20569
20452
  if (!l(this, be))
20570
20453
  return;
20571
20454
  w(this, st, nd).call(this, {
@@ -20613,16 +20496,16 @@ dh = new WeakMap(), Wc = new WeakMap(), bn = new WeakMap(), Ma = new WeakMap(),
20613
20496
  return [s, 1 - e - i, n, i];
20614
20497
  }
20615
20498
  return [e, s, i, n];
20616
- }, Xy = function(e) {
20499
+ }, Wy = function(e) {
20617
20500
  mt._keyboardManager.exec(this, e);
20618
20501
  }, rd = function(e) {
20619
20502
  if (!l(this, dh))
20620
20503
  return;
20621
20504
  const s = window.getSelection();
20622
20505
  e ? s.setPosition(l(this, dh), l(this, Wc)) : s.setPosition(l(this, zc), l(this, Xc));
20623
- }, rl = function() {
20506
+ }, nl = function() {
20624
20507
  return l(this, be) ? this.rotation : 0;
20625
- }, Uy = function() {
20508
+ }, zy = function() {
20626
20509
  if (l(this, be))
20627
20510
  return null;
20628
20511
  const [e, s] = this.pageDimensions, [i, n] = this.pageTranslation, r = l(this, bn), a = new Float32Array(r.length * 8);
@@ -20637,22 +20520,22 @@ dh = new WeakMap(), Wc = new WeakMap(), bn = new WeakMap(), Ma = new WeakMap(),
20637
20520
  a[h] = a[h + 4] = g, a[h + 1] = a[h + 3] = p, a[h + 2] = a[h + 6] = g + d * e, a[h + 5] = a[h + 7] = p - f * s, h += 8;
20638
20521
  }
20639
20522
  return a;
20640
- }, Yy = function(e) {
20641
- return l(this, Ls).serialize(e, w(this, st, rl).call(this));
20642
- }, $y = function(e, s) {
20523
+ }, Xy = function(e) {
20524
+ return l(this, Ls).serialize(e, w(this, st, nl).call(this));
20525
+ }, Uy = function(e, s) {
20643
20526
  this._freeHighlight.add(s) && e.drawLayer.updateProperties(this._freeHighlightId, {
20644
20527
  path: {
20645
20528
  d: this._freeHighlight.toSVGPath()
20646
20529
  }
20647
20530
  });
20648
- }, qy = function(e, s) {
20531
+ }, Yy = function(e, s) {
20649
20532
  this._freeHighlight.isEmpty() ? e.drawLayer.remove(this._freeHighlightId) : e.createAndAddNewEditor(s, !1, {
20650
20533
  highlightId: this._freeHighlightId,
20651
20534
  highlightOutlines: this._freeHighlight.getOutlines(),
20652
20535
  clipPathId: this._freeHighlightClipId,
20653
20536
  methodOfCreation: "main_toolbar"
20654
20537
  }), this._freeHighlightId = -1, this._freeHighlight = null, this._freeHighlightClipId = "";
20655
- }, Ky = function(e) {
20538
+ }, $y = function(e) {
20656
20539
  const {
20657
20540
  color: s
20658
20541
  } = this._initialData;
@@ -20660,7 +20543,7 @@ dh = new WeakMap(), Wc = new WeakMap(), bn = new WeakMap(), Ma = new WeakMap(),
20660
20543
  }, y(mt, Gs), K(mt, "_defaultColor", null), K(mt, "_defaultOpacity", 1), K(mt, "_defaultThickness", 12), K(mt, "_type", "highlight"), K(mt, "_editorType", nt.HIGHLIGHT), K(mt, "_freeHighlightId", -1), K(mt, "_freeHighlight", null), K(mt, "_freeHighlightClipId", "");
20661
20544
  let Rd = mt;
20662
20545
  var Da;
20663
- class EA {
20546
+ class lA {
20664
20547
  constructor() {
20665
20548
  y(this, Da, /* @__PURE__ */ Object.create(null));
20666
20549
  }
@@ -20692,7 +20575,7 @@ class EA {
20692
20575
  }
20693
20576
  }
20694
20577
  Da = new WeakMap();
20695
- var ys, mh, de, Ra, La, hr, lr, cr, Fa, gt, gp, pp, mp, al, Jy, ad, ol, uo;
20578
+ var ys, mh, de, Ra, La, hr, lr, cr, Fa, gt, gp, pp, mp, rl, qy, ad, al, uo;
20696
20579
  const U = class U extends Ht {
20697
20580
  constructor(e) {
20698
20581
  super(e);
@@ -20700,7 +20583,7 @@ const U = class U extends Ht {
20700
20583
  y(this, ys, null);
20701
20584
  y(this, mh);
20702
20585
  K(this, "_drawId", null);
20703
- m(this, mh, e.mustBeCommitted || !1), e.drawOutlines && (w(this, gt, gp).call(this, e), w(this, gt, al).call(this));
20586
+ m(this, mh, e.mustBeCommitted || !1), e.drawOutlines && (w(this, gt, gp).call(this, e), w(this, gt, rl).call(this));
20704
20587
  }
20705
20588
  static _mergeSVGProperties(e, s) {
20706
20589
  const i = new Set(Object.keys(e));
@@ -20747,7 +20630,7 @@ const U = class U extends Ht {
20747
20630
  var u;
20748
20631
  n.updateProperty(s, h);
20749
20632
  const c = l(this, ys).updateProperty(s, h);
20750
- c && w(this, gt, ol).call(this, c), (u = this.parent) == null || u.drawLayer.updateProperties(this._drawId, n.toSVGProperties());
20633
+ c && w(this, gt, al).call(this, c), (u = this.parent) == null || u.drawLayer.updateProperties(this._drawId, n.toSVGProperties());
20751
20634
  };
20752
20635
  this.addCommands({
20753
20636
  cmd: a.bind(this, i),
@@ -20821,12 +20704,12 @@ const U = class U extends Ht {
20821
20704
  w(this, gt, mp).call(this), super.remove();
20822
20705
  }
20823
20706
  rebuild() {
20824
- this.parent && (super.rebuild(), this.div !== null && (w(this, gt, al).call(this), w(this, gt, ol).call(this, l(this, ys).box), this.isAttachedToDOM || this.parent.add(this)));
20707
+ this.parent && (super.rebuild(), this.div !== null && (w(this, gt, rl).call(this), w(this, gt, al).call(this, l(this, ys).box), this.isAttachedToDOM || this.parent.add(this)));
20825
20708
  }
20826
20709
  setParent(e) {
20827
20710
  var i;
20828
20711
  let s = !1;
20829
- this.parent && !e ? (this._uiManager.removeShouldRescale(this), w(this, gt, mp).call(this)) : e && (this._uiManager.addShouldRescale(this), w(this, gt, al).call(this, e), s = !this.parent && ((i = this.div) == null ? void 0 : i.classList.contains("selectedEditor"))), super.setParent(e), s && this.select();
20712
+ this.parent && !e ? (this._uiManager.removeShouldRescale(this), w(this, gt, mp).call(this)) : e && (this._uiManager.addShouldRescale(this), w(this, gt, rl).call(this, e), s = !this.parent && ((i = this.div) == null ? void 0 : i.classList.contains("selectedEditor"))), super.setParent(e), s && this.select();
20830
20713
  }
20831
20714
  rotate() {
20832
20715
  this.parent && this.parent.drawLayer.updateProperties(this._drawId, U._mergeSVGProperties({
@@ -20834,7 +20717,7 @@ const U = class U extends Ht {
20834
20717
  }, l(this, ys).updateRotation((this.parentRotation - this.rotation + 360) % 360)));
20835
20718
  }
20836
20719
  onScaleChanging() {
20837
- this.parent && w(this, gt, ol).call(this, l(this, ys).updateParentDimensions(this.parentDimensions, this.parent.scale));
20720
+ this.parent && w(this, gt, al).call(this, l(this, ys).updateParentDimensions(this.parentDimensions, this.parent.scale));
20838
20721
  }
20839
20722
  static onScaleChangingWhenDrawing() {
20840
20723
  }
@@ -20980,7 +20863,7 @@ const U = class U extends Ht {
20980
20863
  } = s.viewport, c = this.deserializeDraw(a, h, n, r, this._INNER_MARGIN, e), u = await super.deserialize(e, s, i);
20981
20864
  return u.createDrawingOptions(e), w(d = u, gt, gp).call(d, {
20982
20865
  drawOutlines: c
20983
- }), w(f = u, gt, al).call(f), u.onScaleChanging(), u.rotate(), u;
20866
+ }), w(f = u, gt, rl).call(f), u.onScaleChanging(), u.rotate(), u;
20984
20867
  }
20985
20868
  serializeDraw(e) {
20986
20869
  const [s, i] = this.pageTranslation, [n, r] = this.pageDimensions;
@@ -21000,7 +20883,7 @@ ys = new WeakMap(), mh = new WeakMap(), de = new WeakMap(), Ra = new WeakMap(),
21000
20883
  drawId: s,
21001
20884
  drawingOptions: i
21002
20885
  }) {
21003
- m(this, ys, e), this._drawingOptions || (this._drawingOptions = i), s >= 0 ? (this._drawId = s, this.parent.drawLayer.finalizeDraw(s, e.defaultProperties)) : this._drawId = w(this, gt, pp).call(this, e, this.parent), w(this, gt, ol).call(this, e.box);
20886
+ m(this, ys, e), this._drawingOptions || (this._drawingOptions = i), s >= 0 ? (this._drawId = s, this.parent.drawLayer.finalizeDraw(s, e.defaultProperties)) : this._drawId = w(this, gt, pp).call(this, e, this.parent), w(this, gt, al).call(this, e.box);
21004
20887
  }, pp = function(e, s) {
21005
20888
  const {
21006
20889
  id: i
@@ -21008,7 +20891,7 @@ ys = new WeakMap(), mh = new WeakMap(), de = new WeakMap(), Ra = new WeakMap(),
21008
20891
  return i;
21009
20892
  }, mp = function() {
21010
20893
  this._drawId === null || !this.parent || (this.parent.drawLayer.remove(this._drawId), this._drawId = null, this._drawingOptions.reset());
21011
- }, al = function(e = this.parent) {
20894
+ }, rl = function(e = this.parent) {
21012
20895
  if (!(this._drawId !== null && this.parent === e)) {
21013
20896
  if (this._drawId !== null) {
21014
20897
  this.parent.drawLayer.updateParent(this._drawId, e.drawLayer);
@@ -21016,7 +20899,7 @@ ys = new WeakMap(), mh = new WeakMap(), de = new WeakMap(), Ra = new WeakMap(),
21016
20899
  }
21017
20900
  this._drawingOptions.updateAll(), this._drawId = w(this, gt, pp).call(this, l(this, ys), e);
21018
20901
  }
21019
- }, Jy = function([e, s, i, n]) {
20902
+ }, qy = function([e, s, i, n]) {
21020
20903
  const {
21021
20904
  parentDimensions: [r, a],
21022
20905
  rotation: h
@@ -21050,8 +20933,8 @@ ys = new WeakMap(), mh = new WeakMap(), de = new WeakMap(), Ra = new WeakMap(),
21050
20933
  default:
21051
20934
  return [e, s, i, n];
21052
20935
  }
21053
- }, ol = function(e) {
21054
- if ([this.x, this.y, this.width, this.height] = w(this, gt, Jy).call(this, e), this.div) {
20936
+ }, al = function(e) {
20937
+ if ([this.x, this.y, this.width, this.height] = w(this, gt, qy).call(this, e), this.div) {
21055
20938
  this.fixAndSetPosition();
21056
20939
  const [s, i] = this.parentDimensions;
21057
20940
  this.setDims(this.width * s, this.height * i);
@@ -21104,7 +20987,7 @@ ys = new WeakMap(), mh = new WeakMap(), de = new WeakMap(), Ra = new WeakMap(),
21104
20987
  }, K(U, "_currentDrawId", -1), K(U, "_currentParent", null), y(U, de, null), y(U, Ra, null), y(U, La, null), y(U, hr, NaN), y(U, lr, null), y(U, cr, null), y(U, Fa, NaN), K(U, "_INNER_MARGIN", 3);
21105
20988
  let fp = U;
21106
20989
  var Oi, fe, ge, Ia, vh, He, ye, Is, ja, Na, Ba, bh, od;
21107
- class kA {
20990
+ class cA {
21108
20991
  constructor(t, e, s, i, n, r) {
21109
20992
  y(this, bh);
21110
20993
  y(this, Oi, new Float64Array(6));
@@ -21231,7 +21114,7 @@ class kA {
21231
21114
  Oi = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), Ia = new WeakMap(), vh = new WeakMap(), He = new WeakMap(), ye = new WeakMap(), Is = new WeakMap(), ja = new WeakMap(), Na = new WeakMap(), Ba = new WeakMap(), bh = new WeakSet(), od = function(t, e) {
21232
21115
  return X._normalizePoint(t, e, l(this, Na), l(this, Ba), l(this, Ia));
21233
21116
  };
21234
- var Ge, Yc, $c, _s, Di, Ri, yh, _h, wh, we, Yi, Qy, Zy, t_;
21117
+ var Ge, Yc, $c, _s, Di, Ri, yh, _h, wh, we, Yi, Ky, Jy, Qy;
21235
21118
  const dm = class dm extends X {
21236
21119
  constructor() {
21237
21120
  super(...arguments);
@@ -21247,7 +21130,7 @@ const dm = class dm extends X {
21247
21130
  y(this, wh);
21248
21131
  }
21249
21132
  build(e, s, i, n, r, a, h) {
21250
- m(this, Di, s), m(this, Ri, i), m(this, yh, n), m(this, _h, r), m(this, wh, a), m(this, $c, h ?? 0), m(this, _s, e), w(this, we, Zy).call(this);
21133
+ m(this, Di, s), m(this, Ri, i), m(this, yh, n), m(this, _h, r), m(this, wh, a), m(this, $c, h ?? 0), m(this, _s, e), w(this, we, Jy).call(this);
21251
21134
  }
21252
21135
  setLastElement(e) {
21253
21136
  return l(this, _s).push(e), {
@@ -21284,7 +21167,7 @@ const dm = class dm extends X {
21284
21167
  return e.join("");
21285
21168
  }
21286
21169
  serialize([e, s, i, n], r) {
21287
- const a = [], h = [], [c, u, d, f] = w(this, we, Qy).call(this);
21170
+ const a = [], h = [], [c, u, d, f] = w(this, we, Ky).call(this);
21288
21171
  let g, p, v, _, b, x, C, A, P;
21289
21172
  switch (l(this, _h)) {
21290
21173
  case 0:
@@ -21369,7 +21252,7 @@ const dm = class dm extends X {
21369
21252
  return l(this, Ge);
21370
21253
  }
21371
21254
  updateProperty(e, s) {
21372
- return e === "stroke-width" ? w(this, we, t_).call(this, s) : null;
21255
+ return e === "stroke-width" ? w(this, we, Qy).call(this, s) : null;
21373
21256
  }
21374
21257
  updateParentDimensions([e, s], i) {
21375
21258
  const [n, r] = w(this, we, Yi).call(this);
@@ -21522,10 +21405,10 @@ const dm = class dm extends X {
21522
21405
  Ge = new WeakMap(), Yc = new WeakMap(), $c = new WeakMap(), _s = new WeakMap(), Di = new WeakMap(), Ri = new WeakMap(), yh = new WeakMap(), _h = new WeakMap(), wh = new WeakMap(), we = new WeakSet(), Yi = function(e = l(this, wh)) {
21523
21406
  const s = l(this, $c) + e / 2 * l(this, yh);
21524
21407
  return l(this, _h) % 180 === 0 ? [s / l(this, Di), s / l(this, Ri)] : [s / l(this, Ri), s / l(this, Di)];
21525
- }, Qy = function() {
21408
+ }, Ky = function() {
21526
21409
  const [e, s, i, n] = l(this, Ge), [r, a] = w(this, we, Yi).call(this, 0);
21527
21410
  return [e + r, s + a, i - 2 * r, n - 2 * a];
21528
- }, Zy = function() {
21411
+ }, Jy = function() {
21529
21412
  const e = m(this, Ge, new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]));
21530
21413
  for (const {
21531
21414
  line: n
@@ -21545,7 +21428,7 @@ Ge = new WeakMap(), Yc = new WeakMap(), $c = new WeakMap(), _s = new WeakMap(),
21545
21428
  }
21546
21429
  const [s, i] = w(this, we, Yi).call(this);
21547
21430
  e[0] = Math.min(1, Math.max(0, e[0] - s)), e[1] = Math.min(1, Math.max(0, e[1] - i)), e[2] = Math.min(1, Math.max(0, e[2] + s)), e[3] = Math.min(1, Math.max(0, e[3] + i)), e[2] -= e[0], e[3] -= e[1];
21548
- }, t_ = function(e) {
21431
+ }, Qy = function(e) {
21549
21432
  const [s, i] = w(this, we, Yi).call(this);
21550
21433
  m(this, wh, e);
21551
21434
  const [n, r] = w(this, we, Yi).call(this), [a, h] = [n - s, r - i], c = l(this, Ge);
@@ -21553,7 +21436,7 @@ Ge = new WeakMap(), Yc = new WeakMap(), $c = new WeakMap(), _s = new WeakMap(),
21553
21436
  };
21554
21437
  let Ld = dm;
21555
21438
  var xh;
21556
- const fm = class fm extends EA {
21439
+ const fm = class fm extends lA {
21557
21440
  constructor(e) {
21558
21441
  super();
21559
21442
  y(this, xh);
@@ -21577,7 +21460,7 @@ const fm = class fm extends EA {
21577
21460
  };
21578
21461
  xh = new WeakMap();
21579
21462
  let vp = fm;
21580
- var Qd, e_;
21463
+ var Qd, Zy;
21581
21464
  const vo = class vo extends fp {
21582
21465
  constructor(e) {
21583
21466
  super({
@@ -21601,7 +21484,7 @@ const vo = class vo extends fp {
21601
21484
  return ht(this, "typesMap", /* @__PURE__ */ new Map([[ct.INK_THICKNESS, "stroke-width"], [ct.INK_COLOR, "stroke"], [ct.INK_OPACITY, "stroke-opacity"]]));
21602
21485
  }
21603
21486
  static createDrawerInstance(e, s, i, n, r) {
21604
- return new kA(e, s, i, n, r, this._defaultDrawingOptions["stroke-width"]);
21487
+ return new cA(e, s, i, n, r, this._defaultDrawingOptions["stroke-width"]);
21605
21488
  }
21606
21489
  static deserializeDraw(e, s, i, n, r, a) {
21607
21490
  return Ld.deserialize(e, s, i, n, r, a);
@@ -21703,7 +21586,7 @@ const vo = class vo extends fp {
21703
21586
  rotation: this.rotation,
21704
21587
  structTreeParentId: this._structTreeParentId
21705
21588
  };
21706
- return e ? c : this.annotationElementId && !w(this, Qd, e_).call(this, c) ? null : (c.id = this.annotationElementId, c);
21589
+ return e ? c : this.annotationElementId && !w(this, Qd, Zy).call(this, c) ? null : (c.id = this.annotationElementId, c);
21707
21590
  }
21708
21591
  renderAnnotationElement(e) {
21709
21592
  const {
@@ -21717,7 +21600,7 @@ const vo = class vo extends fp {
21717
21600
  }), null;
21718
21601
  }
21719
21602
  };
21720
- Qd = new WeakSet(), e_ = function(e) {
21603
+ Qd = new WeakSet(), Zy = function(e) {
21721
21604
  const {
21722
21605
  color: s,
21723
21606
  thickness: i,
@@ -21727,7 +21610,7 @@ Qd = new WeakSet(), e_ = function(e) {
21727
21610
  return this._hasBeenMoved || this._hasBeenResized || e.color.some((a, h) => a !== s[h]) || e.thickness !== i || e.opacity !== n || e.pageIndex !== r;
21728
21611
  }, K(vo, "_type", "ink"), K(vo, "_editorType", nt.INK), K(vo, "_defaultDrawingOptions", null);
21729
21612
  let bp = vo;
21730
- var Nt, _e, ur, _n, dr, Sh, Li, Fi, ws, Ch, pt, hl, ll, hd, _p, ld, wp, cd, s_;
21613
+ var Nt, _e, ur, _n, dr, Sh, Li, Fi, ws, Ch, pt, ol, hl, hd, _p, ld, wp, cd, t_;
21731
21614
  const ml = class ml extends Ht {
21732
21615
  constructor(e) {
21733
21616
  super({
@@ -21912,7 +21795,7 @@ const ml = class ml extends Ht {
21912
21795
  static async deserialize(e, s, i) {
21913
21796
  var v;
21914
21797
  let n = null;
21915
- if (e instanceof Sy) {
21798
+ if (e instanceof wy) {
21916
21799
  const {
21917
21800
  data: {
21918
21801
  rect: _,
@@ -21984,7 +21867,7 @@ const ml = class ml extends Ht {
21984
21867
  type: "Figure",
21985
21868
  alt: r
21986
21869
  }), this.annotationElementId) {
21987
- const h = w(this, pt, s_).call(this, i);
21870
+ const h = w(this, pt, t_).call(this, i);
21988
21871
  if (h.isSame)
21989
21872
  return null;
21990
21873
  h.isSameAltText ? delete i.accessibilityData : i.accessibilityData.structParent = this._initialData.structParent ?? -1;
@@ -22010,13 +21893,13 @@ const ml = class ml extends Ht {
22010
21893
  }), null;
22011
21894
  }
22012
21895
  };
22013
- Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(), dr = new WeakMap(), Sh = new WeakMap(), Li = new WeakMap(), Fi = new WeakMap(), ws = new WeakMap(), Ch = new WeakMap(), pt = new WeakSet(), hl = function(e, s = !1) {
21896
+ Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(), dr = new WeakMap(), Sh = new WeakMap(), Li = new WeakMap(), Fi = new WeakMap(), ws = new WeakMap(), Ch = new WeakMap(), pt = new WeakSet(), ol = function(e, s = !1) {
22014
21897
  if (!e) {
22015
21898
  this.remove();
22016
21899
  return;
22017
21900
  }
22018
21901
  m(this, Nt, e.bitmap), s || (m(this, _e, e.id), m(this, ws, e.isSvg)), e.file && m(this, Sh, e.file.name), w(this, pt, _p).call(this);
22019
- }, ll = function() {
21902
+ }, hl = function() {
22020
21903
  if (m(this, ur, null), this._uiManager.enableWaiting(!1), !!l(this, Li)) {
22021
21904
  if (this._uiManager.useNewAltTextWhenAddingImage && this._uiManager.useNewAltTextFlow && l(this, Nt)) {
22022
21905
  this._editToolbar.hide(), this._uiManager.editAltText(this, !0);
@@ -22039,17 +21922,17 @@ Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(),
22039
21922
  }
22040
21923
  }, hd = function() {
22041
21924
  if (l(this, _e)) {
22042
- this._uiManager.enableWaiting(!0), this._uiManager.imageManager.getFromId(l(this, _e)).then((i) => w(this, pt, hl).call(this, i, !0)).finally(() => w(this, pt, ll).call(this));
21925
+ this._uiManager.enableWaiting(!0), this._uiManager.imageManager.getFromId(l(this, _e)).then((i) => w(this, pt, ol).call(this, i, !0)).finally(() => w(this, pt, hl).call(this));
22043
21926
  return;
22044
21927
  }
22045
21928
  if (l(this, _n)) {
22046
21929
  const i = l(this, _n);
22047
- m(this, _n, null), this._uiManager.enableWaiting(!0), m(this, ur, this._uiManager.imageManager.getFromUrl(i).then((n) => w(this, pt, hl).call(this, n)).finally(() => w(this, pt, ll).call(this)));
21930
+ m(this, _n, null), this._uiManager.enableWaiting(!0), m(this, ur, this._uiManager.imageManager.getFromUrl(i).then((n) => w(this, pt, ol).call(this, n)).finally(() => w(this, pt, hl).call(this)));
22048
21931
  return;
22049
21932
  }
22050
21933
  if (l(this, dr)) {
22051
21934
  const i = l(this, dr);
22052
- m(this, dr, null), this._uiManager.enableWaiting(!0), m(this, ur, this._uiManager.imageManager.getFromFile(i).then((n) => w(this, pt, hl).call(this, n)).finally(() => w(this, pt, ll).call(this)));
21935
+ m(this, dr, null), this._uiManager.enableWaiting(!0), m(this, ur, this._uiManager.imageManager.getFromFile(i).then((n) => w(this, pt, ol).call(this, n)).finally(() => w(this, pt, hl).call(this)));
22053
21936
  return;
22054
21937
  }
22055
21938
  const e = document.createElement("input");
@@ -22067,7 +21950,7 @@ Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(),
22067
21950
  data: {
22068
21951
  alt_text_modal: this._uiManager.useNewAltTextFlow
22069
21952
  }
22070
- }), w(this, pt, hl).call(this, n);
21953
+ }), w(this, pt, ol).call(this, n);
22071
21954
  }
22072
21955
  i();
22073
21956
  }, {
@@ -22077,7 +21960,7 @@ Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(),
22077
21960
  }, {
22078
21961
  signal: s
22079
21962
  });
22080
- }).finally(() => w(this, pt, ll).call(this))), e.click();
21963
+ }).finally(() => w(this, pt, hl).call(this))), e.click();
22081
21964
  }, _p = function() {
22082
21965
  var d;
22083
21966
  const {
@@ -22141,7 +22024,7 @@ Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(),
22141
22024
  return a.getContext("2d").drawImage(l(this, Nt), 0, 0, l(this, Nt).width, l(this, Nt).height, 0, 0, n, r), a.transferToImageBitmap();
22142
22025
  }
22143
22026
  return structuredClone(l(this, Nt));
22144
- }, s_ = function(e) {
22027
+ }, t_ = function(e) {
22145
22028
  var a;
22146
22029
  const {
22147
22030
  pageIndex: s,
@@ -22155,7 +22038,7 @@ Nt = new WeakMap(), _e = new WeakMap(), ur = new WeakMap(), _n = new WeakMap(),
22155
22038
  };
22156
22039
  }, K(ml, "_type", "stamp"), K(ml, "_editorType", nt.STAMP);
22157
22040
  let yp = ml;
22158
- var Ha, Ah, Ii, fr, wn, js, gr, Th, Ga, ni, xn, ke, Sn, $, pr, Rt, i_, yi, Sp, Cp, ud;
22041
+ var Ha, Ah, Ii, fr, wn, js, gr, Th, Ga, ni, xn, ke, Sn, $, pr, Rt, e_, yi, Sp, Cp, ud;
22159
22042
  const Us = class Us {
22160
22043
  constructor({
22161
22044
  uiManager: t,
@@ -22313,7 +22196,7 @@ const Us = class Us {
22313
22196
  if (this.div.tabIndex = -1, (t = l(this, ke)) != null && t.div && !l(this, Sn)) {
22314
22197
  m(this, Sn, new AbortController());
22315
22198
  const e = l(this, $).combinedSignal(l(this, Sn));
22316
- l(this, ke).div.addEventListener("pointerdown", w(this, Rt, i_).bind(this), {
22199
+ l(this, ke).div.addEventListener("pointerdown", w(this, Rt, e_).bind(this), {
22317
22200
  signal: e
22318
22201
  }), l(this, ke).div.classList.add("highlighting");
22319
22202
  }
@@ -22564,7 +22447,7 @@ const Us = class Us {
22564
22447
  return l(this, $).viewParameters.realScale;
22565
22448
  }
22566
22449
  };
22567
- Ha = new WeakMap(), Ah = new WeakMap(), Ii = new WeakMap(), fr = new WeakMap(), wn = new WeakMap(), js = new WeakMap(), gr = new WeakMap(), Th = new WeakMap(), Ga = new WeakMap(), ni = new WeakMap(), xn = new WeakMap(), ke = new WeakMap(), Sn = new WeakMap(), $ = new WeakMap(), pr = new WeakMap(), Rt = new WeakSet(), i_ = function(t) {
22450
+ Ha = new WeakMap(), Ah = new WeakMap(), Ii = new WeakMap(), fr = new WeakMap(), wn = new WeakMap(), js = new WeakMap(), gr = new WeakMap(), Th = new WeakMap(), Ga = new WeakMap(), ni = new WeakMap(), xn = new WeakMap(), ke = new WeakMap(), Sn = new WeakMap(), $ = new WeakMap(), pr = new WeakMap(), Rt = new WeakSet(), e_ = function(t) {
22568
22451
  l(this, $).unselectAll();
22569
22452
  const {
22570
22453
  target: e
@@ -22607,7 +22490,7 @@ Ha = new WeakMap(), Ah = new WeakMap(), Ii = new WeakMap(), fr = new WeakMap(),
22607
22490
  t.isEmpty() && t.remove();
22608
22491
  }, K(Us, "_initialized", !1), y(Us, pr, new Map([ip, bp, yp, Rd].map((t) => [t._editorType, t])));
22609
22492
  let xp = Us;
22610
- var ri, qc, Ve, Va, Zd, n_, Wi, Tp, r_, Ep;
22493
+ var ri, qc, Ve, Va, Zd, s_, Wi, Tp, i_, Ep;
22611
22494
  const Ce = class Ce {
22612
22495
  constructor({
22613
22496
  pageIndex: t
@@ -22641,7 +22524,7 @@ const Ce = class Ce {
22641
22524
  r.append(a);
22642
22525
  const h = `path_p${this.pageIndex}_${i}`;
22643
22526
  a.setAttribute("id", h), a.setAttribute("vector-effect", "non-scaling-stroke"), e && l(this, Va).set(i, a);
22644
- const c = s ? w(this, Wi, r_).call(this, r, h) : null, u = Ce._svgFactory.createElement("use");
22527
+ const c = s ? w(this, Wi, i_).call(this, r, h) : null, u = Ce._svgFactory.createElement("use");
22645
22528
  return n.append(u), u.setAttribute("href", `#${h}`), this.updateProperties(n, t), l(this, Ve).set(i, n), {
22646
22529
  id: i,
22647
22530
  clipPathId: `url(#${c})`
@@ -22682,7 +22565,7 @@ const Ce = class Ce {
22682
22565
  path: r
22683
22566
  } = e, a = typeof t == "number" ? l(this, Ve).get(t) : t;
22684
22567
  if (a) {
22685
- if (s && w(this, Wi, Ep).call(this, a, s), i && w(h = Ce, Zd, n_).call(h, a, i), n) {
22568
+ if (s && w(this, Wi, Ep).call(this, a, s), i && w(h = Ce, Zd, s_).call(h, a, i), n) {
22686
22569
  const {
22687
22570
  classList: c
22688
22571
  } = a;
@@ -22711,7 +22594,7 @@ const Ce = class Ce {
22711
22594
  l(this, Ve).clear(), l(this, Va).clear();
22712
22595
  }
22713
22596
  };
22714
- ri = new WeakMap(), qc = new WeakMap(), Ve = new WeakMap(), Va = new WeakMap(), Zd = new WeakSet(), n_ = function(t, [e, s, i, n]) {
22597
+ ri = new WeakMap(), qc = new WeakMap(), Ve = new WeakMap(), Va = new WeakMap(), Zd = new WeakSet(), s_ = function(t, [e, s, i, n]) {
22715
22598
  const {
22716
22599
  style: r
22717
22600
  } = t;
@@ -22719,7 +22602,7 @@ ri = new WeakMap(), qc = new WeakMap(), Ve = new WeakMap(), Va = new WeakMap(),
22719
22602
  }, Wi = new WeakSet(), Tp = function() {
22720
22603
  const t = Ce._svgFactory.create(1, 1, !0);
22721
22604
  return l(this, ri).append(t), t.setAttribute("aria-hidden", !0), t;
22722
- }, r_ = function(t, e) {
22605
+ }, i_ = function(t, e) {
22723
22606
  const s = Ce._svgFactory.createElement("clipPath");
22724
22607
  t.append(s);
22725
22608
  const i = `clip_${e}`;
@@ -22745,7 +22628,7 @@ Z.ColorPicker;
22745
22628
  Z.DOMSVGFactory;
22746
22629
  Z.DrawLayer;
22747
22630
  Z.FeatureTest;
22748
- var PA = Z.GlobalWorkerOptions;
22631
+ var uA = Z.GlobalWorkerOptions;
22749
22632
  Z.ImageKind;
22750
22633
  Z.InvalidPDFException;
22751
22634
  Z.MissingPDFException;
@@ -22767,7 +22650,7 @@ Z.XfaLayer;
22767
22650
  Z.build;
22768
22651
  Z.createValidAbsoluteUrl;
22769
22652
  Z.fetchData;
22770
- var MA = Z.getDocument;
22653
+ var dA = Z.getDocument;
22771
22654
  Z.getFilenameFromUrl;
22772
22655
  Z.getPdfFilenameFromUrl;
22773
22656
  Z.getXfaPageViewport;
@@ -22779,24 +22662,141 @@ Z.setLayerDimensions;
22779
22662
  Z.shadow;
22780
22663
  Z.stopEvent;
22781
22664
  Z.version;
22782
- const OA = {
22665
+ const fA = {
22783
22666
  "pdfjs-dist": "4.10.38"
22784
22667
  };
22785
- function DA(o) {
22668
+ function gA(o) {
22786
22669
  return new Promise((t, e) => {
22787
22670
  const s = new FileReader();
22788
22671
  s.addEventListener("load", () => t(s.result)), s.addEventListener("error", e), s.readAsDataURL(o);
22789
22672
  });
22790
22673
  }
22791
- const RA = OA["pdfjs-dist"].replace("^", "");
22792
- PA.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${RA}/pdf.worker.min.mjs`;
22793
- async function LA(o) {
22794
- const t = "data:application/pdf;base64,", e = await DA(o);
22674
+ const pA = fA["pdfjs-dist"].replace("^", "");
22675
+ uA.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${pA}/pdf.worker.min.mjs`;
22676
+ async function mA(o) {
22677
+ const t = "data:application/pdf;base64,", e = await gA(o);
22795
22678
  if (typeof e == "string")
22796
22679
  return window.atob(e.slice(t.length));
22797
22680
  }
22681
+ function vA(o, t) {
22682
+ return dA({ data: o, password: t }).promise;
22683
+ }
22684
+ const bA = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='20'%20cy='20'%20r='10.75'%20stroke='currentColor'%20stroke-width='2.5'/%3e%3cpath%20d='M16%2024L23.7782%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M24%2024L16.2218%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e";
22685
+ function yA(o) {
22686
+ return new URL((/* @__PURE__ */ Object.assign({ "../assets/close.svg": bA }))[`../assets/${o}`], import.meta.url).href;
22687
+ }
22688
+ function _A(o) {
22689
+ return new Promise((t, e) => {
22690
+ const s = window.URL.createObjectURL(o), i = new Image();
22691
+ i.src = s, i.addEventListener("load", async () => {
22692
+ window.URL.revokeObjectURL(s), t(await wA(i));
22693
+ }), i.addEventListener("error", (n) => {
22694
+ window.URL.revokeObjectURL(s), e(n);
22695
+ });
22696
+ });
22697
+ }
22698
+ function wA(o) {
22699
+ return new Promise((t) => {
22700
+ const e = document.createElement("canvas"), s = e.getContext("2d"), { naturalWidth: i, naturalHeight: n } = o;
22701
+ e.width = i, e.height = n, s == null || s.drawImage(o, 0, 0, i, n), t(e.toDataURL("image/jpeg", 0.8));
22702
+ });
22703
+ }
22704
+ let j0 = null;
22705
+ function xA() {
22706
+ const o = document.createElement("div");
22707
+ o.style.width = "1in", document.body.append(o);
22708
+ const t = o.offsetWidth;
22709
+ return o.remove(), t;
22710
+ }
22711
+ function SA() {
22712
+ const o = j0 ?? xA();
22713
+ return j0 = o, o / 72;
22714
+ }
22715
+ function CA(o, t = 500) {
22716
+ if (typeof o != "function") throw new TypeError("The first argument is not a function.");
22717
+ let e = null;
22718
+ return function(...s) {
22719
+ e && clearTimeout(e), e = setTimeout(() => {
22720
+ e = null, o.apply(this, s);
22721
+ }, t);
22722
+ };
22723
+ }
22724
+ const Bs = /* @__PURE__ */ new Map();
22725
+ function AA(o) {
22726
+ const t = new ug(o);
22727
+ return Bs.set(o, t), t;
22728
+ }
22729
+ function TA(o, t) {
22730
+ const e = Date.now();
22731
+ return {
22732
+ PDFId: `${o.name}-${e}`,
22733
+ name: o.name.replace(/.pdf/, ""),
22734
+ updateDate: e,
22735
+ PDFBase64: t
22736
+ };
22737
+ }
22738
+ function EA(o, t) {
22739
+ const e = o.getViewport({ scale: t }), s = document.createElement("canvas"), i = s.getContext("2d"), n = SA() / window.devicePixelRatio;
22740
+ s.width = Math.floor(e.width * n), s.height = Math.floor(e.height * n);
22741
+ const r = {
22742
+ canvasContext: i,
22743
+ viewport: e,
22744
+ transform: [n, 0, 0, n, 0, 0]
22745
+ }, a = o.render(r);
22746
+ return { canvas: s, renderTask: a };
22747
+ }
22748
+ async function kA(o, t, e) {
22749
+ const s = o || yA("close.svg"), { objects: i, options: n } = await eS(s), r = i.filter((h) => h !== null), a = px.groupSVGElements(r, n);
22750
+ return r.forEach((h) => {
22751
+ h.stroke = t;
22752
+ }), a.hoverCursor = "pointer", a.stroke = `${t}-${e}`, a;
22753
+ }
22754
+ function PA(o, t) {
22755
+ if (!Bs.get(o)) return;
22756
+ const s = 1 / 3, i = FA(t, s);
22757
+ r_(o, i, s);
22758
+ }
22759
+ async function MA(o, t) {
22760
+ const e = await _A(t), s = Date.now(), n = {
22761
+ PDFId: `${t.name}${s}`,
22762
+ name: t.name.replace(/.png|.jpg|.jpeg/, ""),
22763
+ updateDate: s,
22764
+ PDFBase64: e
22765
+ };
22766
+ return n_(o, { url: e }), { ...n, pages: 1 };
22767
+ }
22768
+ async function n_(o, { url: t, scale: e = 0.5 }) {
22769
+ if (!Bs.get(o)) return;
22770
+ const i = await Oe.fromURL(t);
22771
+ i.scale(e), r_(o, i, e);
22772
+ }
22773
+ function r_(o, t, e) {
22774
+ const s = Bs.get(o);
22775
+ s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
22776
+ }
22777
+ function ll(o, t) {
22778
+ if (!t) return;
22779
+ const { oCoords: e } = o;
22780
+ if (!e) return;
22781
+ const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: a, scaleX: h } = t;
22782
+ t.top = i - n * a / 2, t.left = s - r * h / 2, t.setCoords();
22783
+ }
22784
+ function OA(o, t, e) {
22785
+ !e || !o || (e.scale(1 / t), ll(o, e));
22786
+ }
22787
+ function DA(o, t, e) {
22788
+ o && (o.borderScaleFactor = 1 / t, o.cornerSize = 6 * (1 / t), o.touchCornerSize = 24 * (1 / t), o.cornerStrokeColor = e.stroke, o.setCoords());
22789
+ }
22790
+ function RA(o) {
22791
+ const t = Bs.get(o);
22792
+ t && (t.discardActiveObject(), t.renderAll());
22793
+ }
22794
+ function LA(o) {
22795
+ const t = Bs.get(o);
22796
+ t && (t.clear(), Bs.delete(o));
22797
+ }
22798
22798
  function FA(o, t) {
22799
- return MA({ data: o, password: t }).promise;
22799
+ return new Oe(o, { scaleX: t, scaleY: t });
22800
22800
  }
22801
22801
  const IA = {
22802
22802
  top: 100,
@@ -22826,7 +22826,7 @@ function BA(o = "") {
22826
22826
  const t = no(0), e = no(null), s = no(null), i = no(1), n = no({ ...NA });
22827
22827
  function r() {
22828
22828
  if (!o || Bs.has(o)) return;
22829
- const k = yS(o);
22829
+ const k = AA(o);
22830
22830
  return k.on("selection:cleared", () => A(k)), k;
22831
22831
  }
22832
22832
  function a(k, M) {
@@ -22839,9 +22839,9 @@ function BA(o = "") {
22839
22839
  return ((I = F[R]) == null ? void 0 : I.call(F, k, M)) ?? Promise.reject(new Error(`Unsupported ${R} file type.`));
22840
22840
  }
22841
22841
  async function h(k, M) {
22842
- const R = await LA(k);
22842
+ const R = await mA(k);
22843
22843
  if (!R) return;
22844
- const F = _S(k, R);
22844
+ const F = TA(k, R);
22845
22845
  try {
22846
22846
  return await c({ page: 1, PDFBase64: R, scale: 0.8, password: M }), { ...F, pages: t.current };
22847
22847
  } catch (I) {
@@ -22850,20 +22850,20 @@ function BA(o = "") {
22850
22850
  }
22851
22851
  async function c({ page: k, PDFBase64: M, scale: R, password: F }) {
22852
22852
  try {
22853
- const I = await FA(M, F), Y = await I.getPage(k), { renderTask: N, canvas: H } = wS(Y, R);
22853
+ const I = await vA(M, F), Y = await I.getPage(k), { renderTask: N, canvas: H } = EA(Y, R);
22854
22854
  return t.current = I.numPages, N.promise.then(() => u(H));
22855
22855
  } catch (I) {
22856
22856
  return Promise.reject(I);
22857
22857
  }
22858
22858
  }
22859
22859
  function u(k) {
22860
- SS(o, k);
22860
+ PA(o, k);
22861
22861
  }
22862
22862
  async function d(k) {
22863
- return await CS(o, k);
22863
+ return await MA(o, k);
22864
22864
  }
22865
22865
  async function f({ url: k, scale: M = 0.5 }) {
22866
- await ab(o, { url: k, scale: M });
22866
+ await n_(o, { url: k, scale: M });
22867
22867
  }
22868
22868
  async function g(k, M) {
22869
22869
  const R = Bs.get(o);
@@ -22881,7 +22881,7 @@ function BA(o = "") {
22881
22881
  R.add(F), v(R, F);
22882
22882
  }
22883
22883
  function v(k, M) {
22884
- M.on("selected", (R) => _({ canvas: k, target: R.target })), M.on("modified", (R) => Yh(R.target, e.current)), M.on("scaling", (R) => Yh(R.transform.target, e.current)), M.on("moving", (R) => Yh(R.transform.target, e.current)), M.on("rotating", (R) => Yh(R.transform.target, e.current));
22884
+ M.on("selected", (R) => _({ canvas: k, target: R.target })), M.on("modified", (R) => ll(R.target, e.current)), M.on("scaling", (R) => ll(R.transform.target, e.current)), M.on("moving", (R) => ll(R.transform.target, e.current)), M.on("rotating", (R) => ll(R.transform.target, e.current));
22885
22885
  }
22886
22886
  async function _({
22887
22887
  canvas: k,
@@ -22891,7 +22891,7 @@ function BA(o = "") {
22891
22891
  }) {
22892
22892
  var Y;
22893
22893
  if (((Y = e.current) == null ? void 0 : Y.stroke) === `${R}-${F}`) return;
22894
- const I = await xS(n.current.src, R, F);
22894
+ const I = await kA(n.current.src, R, F);
22895
22895
  A(k), e.current = I, s.current = M, b(k, M, F), x(i.current, !0), k.add(I);
22896
22896
  }
22897
22897
  function b(k, M, R) {
@@ -22910,7 +22910,7 @@ function BA(o = "") {
22910
22910
  }
22911
22911
  function x(k, M = !1) {
22912
22912
  const R = Bs.get(o);
22913
- i.current = k, R && (TS(s.current, k, n.current), AS(s.current, k, e.current), !M && R.renderAll());
22913
+ i.current = k, R && (DA(s.current, k, n.current), OA(s.current, k, e.current), !M && R.renderAll());
22914
22914
  }
22915
22915
  function C(k) {
22916
22916
  if (!k) return;
@@ -22922,10 +22922,10 @@ function BA(o = "") {
22922
22922
  e.current && (k.remove(e.current), e.current = s.current = null);
22923
22923
  }
22924
22924
  function P() {
22925
- ES(o);
22925
+ RA(o);
22926
22926
  }
22927
22927
  function O() {
22928
- kS(o);
22928
+ LA(o);
22929
22929
  }
22930
22930
  return {
22931
22931
  createCanvas: r,
@@ -22942,7 +22942,7 @@ function BA(o = "") {
22942
22942
  }
22943
22943
  function HA(o) {
22944
22944
  let t = 0;
22945
- const e = bS(() => {
22945
+ const e = CA(() => {
22946
22946
  t !== window.innerWidth && (t = window.innerWidth, o());
22947
22947
  });
22948
22948
  zh(() => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), []);