@mxmweb/fviewer 1.1.12 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +347 -345
  2. package/index.js.map +1 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -4,10 +4,10 @@ var K0 = (e) => {
4
4
  };
5
5
  var vm = (e, t, n) => t in e ? mm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
6
  var Kg = (e, t, n) => vm(e, typeof t != "symbol" ? t + "" : t, n), _0 = (e, t, n) => t.has(e) || K0("Cannot " + n);
7
- var Gr = (e, t, n) => (_0(e, t, "read from private field"), n ? n.call(e) : t.get(e)), vl = (e, t, n) => t.has(e) ? K0("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), bl = (e, t, n, r) => (_0(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), pl = (e, t, n) => (_0(e, t, "access private method"), n);
7
+ var Gr = (e, t, n) => (_0(e, t, "read from private field"), n ? n.call(e) : t.get(e)), bl = (e, t, n) => t.has(e) ? K0("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Cl = (e, t, n, r) => (_0(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), gl = (e, t, n) => (_0(e, t, "access private method"), n);
8
8
  var k0 = (e, t, n, r) => ({
9
9
  set _(s) {
10
- bl(e, t, s, n);
10
+ Cl(e, t, s, n);
11
11
  },
12
12
  get _() {
13
13
  return Gr(e, t, r);
@@ -14361,8 +14361,8 @@ function requirePdf() {
14361
14361
  try {
14362
14362
  if (ki && typeof hl == "string") {
14363
14363
  if (ki.addDefaultProtocol && hl.startsWith("www.")) {
14364
- const Cl = hl.match(/\./g);
14365
- Cl && Cl.length >= 2 && (hl = `http://${hl}`);
14364
+ const vl = hl.match(/\./g);
14365
+ vl && vl.length >= 2 && (hl = `http://${hl}`);
14366
14366
  }
14367
14367
  if (ki.tryConvertEncoding)
14368
14368
  try {
@@ -14370,9 +14370,9 @@ function requirePdf() {
14370
14370
  } catch {
14371
14371
  }
14372
14372
  }
14373
- const gl = sr ? new URL(hl, sr) : new URL(hl);
14374
- if (ot(gl))
14375
- return gl;
14373
+ const pl = sr ? new URL(hl, sr) : new URL(hl);
14374
+ if (ot(pl))
14375
+ return pl;
14376
14376
  } catch {
14377
14377
  }
14378
14378
  return null;
@@ -14386,8 +14386,8 @@ function requirePdf() {
14386
14386
  }), ki;
14387
14387
  }
14388
14388
  const Xn = function() {
14389
- function sr(ki, gl) {
14390
- this.constructor === sr && Ar("Cannot initialize BaseException."), this.message = ki, this.name = gl;
14389
+ function sr(ki, pl) {
14390
+ this.constructor === sr && Ar("Cannot initialize BaseException."), this.message = ki, this.name = pl;
14391
14391
  }
14392
14392
  return sr.prototype = new Error(), sr.constructor = sr, sr;
14393
14393
  }();
@@ -14439,18 +14439,18 @@ function requirePdf() {
14439
14439
  const sr = hl.length, ki = 8192;
14440
14440
  if (sr < ki)
14441
14441
  return String.fromCharCode.apply(null, hl);
14442
- const gl = [];
14443
- for (let Cl = 0; Cl < sr; Cl += ki) {
14444
- const xl = Math.min(Cl + ki, sr), Bl = hl.subarray(Cl, xl);
14445
- gl.push(String.fromCharCode.apply(null, Bl));
14442
+ const pl = [];
14443
+ for (let vl = 0; vl < sr; vl += ki) {
14444
+ const xl = Math.min(vl + ki, sr), Bl = hl.subarray(vl, xl);
14445
+ pl.push(String.fromCharCode.apply(null, Bl));
14446
14446
  }
14447
- return gl.join("");
14447
+ return pl.join("");
14448
14448
  }
14449
14449
  function un(hl) {
14450
14450
  typeof hl != "string" && Ar("Invalid argument for stringToBytes");
14451
14451
  const sr = hl.length, ki = new Uint8Array(sr);
14452
- for (let gl = 0; gl < sr; ++gl)
14453
- ki[gl] = hl.charCodeAt(gl) & 255;
14452
+ for (let pl = 0; pl < sr; ++pl)
14453
+ ki[pl] = hl.charCodeAt(pl) & 255;
14454
14454
  return ki;
14455
14455
  }
14456
14456
  function Fr(hl) {
@@ -14467,15 +14467,15 @@ function requirePdf() {
14467
14467
  let ki = 0;
14468
14468
  for (let xl = 0; xl < sr; xl++)
14469
14469
  ki += Fr(hl[xl]);
14470
- let gl = 0;
14471
- const Cl = new Uint8Array(ki);
14470
+ let pl = 0;
14471
+ const vl = new Uint8Array(ki);
14472
14472
  for (let xl = 0; xl < sr; xl++) {
14473
14473
  let Bl = hl[xl];
14474
14474
  Bl instanceof Uint8Array || (typeof Bl == "string" ? Bl = un(Bl) : Bl = new Uint8Array(Bl));
14475
14475
  const Ug = Bl.byteLength;
14476
- Cl.set(Bl, gl), gl += Ug;
14476
+ vl.set(Bl, pl), pl += Ug;
14477
14477
  }
14478
- return Cl;
14478
+ return vl;
14479
14479
  }
14480
14480
  function Pi(hl) {
14481
14481
  return String.fromCharCode(hl >> 24 & 255, hl >> 16 & 255, hl >> 8 & 255, hl & 255);
@@ -14485,8 +14485,8 @@ function requirePdf() {
14485
14485
  }
14486
14486
  function ji(hl) {
14487
14487
  const sr = /* @__PURE__ */ Object.create(null);
14488
- for (const [ki, gl] of hl)
14489
- sr[ki] = gl;
14488
+ for (const [ki, pl] of hl)
14489
+ sr[ki] = pl;
14490
14490
  return sr;
14491
14491
  }
14492
14492
  function _a() {
@@ -14514,27 +14514,27 @@ function requirePdf() {
14514
14514
  t.FeatureTest = Ha;
14515
14515
  const wl = [...Array(256).keys()].map((hl) => hl.toString(16).padStart(2, "0"));
14516
14516
  class Al {
14517
- static makeHexColor(sr, ki, gl) {
14518
- return `#${wl[sr]}${wl[ki]}${wl[gl]}`;
14517
+ static makeHexColor(sr, ki, pl) {
14518
+ return `#${wl[sr]}${wl[ki]}${wl[pl]}`;
14519
14519
  }
14520
14520
  static scaleMinMax(sr, ki) {
14521
- let gl;
14522
- sr[0] ? (sr[0] < 0 && (gl = ki[0], ki[0] = ki[1], ki[1] = gl), ki[0] *= sr[0], ki[1] *= sr[0], sr[3] < 0 && (gl = ki[2], ki[2] = ki[3], ki[3] = gl), ki[2] *= sr[3], ki[3] *= sr[3]) : (gl = ki[0], ki[0] = ki[2], ki[2] = gl, gl = ki[1], ki[1] = ki[3], ki[3] = gl, sr[1] < 0 && (gl = ki[2], ki[2] = ki[3], ki[3] = gl), ki[2] *= sr[1], ki[3] *= sr[1], sr[2] < 0 && (gl = ki[0], ki[0] = ki[1], ki[1] = gl), ki[0] *= sr[2], ki[1] *= sr[2]), ki[0] += sr[4], ki[1] += sr[4], ki[2] += sr[5], ki[3] += sr[5];
14521
+ let pl;
14522
+ sr[0] ? (sr[0] < 0 && (pl = ki[0], ki[0] = ki[1], ki[1] = pl), ki[0] *= sr[0], ki[1] *= sr[0], sr[3] < 0 && (pl = ki[2], ki[2] = ki[3], ki[3] = pl), ki[2] *= sr[3], ki[3] *= sr[3]) : (pl = ki[0], ki[0] = ki[2], ki[2] = pl, pl = ki[1], ki[1] = ki[3], ki[3] = pl, sr[1] < 0 && (pl = ki[2], ki[2] = ki[3], ki[3] = pl), ki[2] *= sr[1], ki[3] *= sr[1], sr[2] < 0 && (pl = ki[0], ki[0] = ki[1], ki[1] = pl), ki[0] *= sr[2], ki[1] *= sr[2]), ki[0] += sr[4], ki[1] += sr[4], ki[2] += sr[5], ki[3] += sr[5];
14523
14523
  }
14524
14524
  static transform(sr, ki) {
14525
14525
  return [sr[0] * ki[0] + sr[2] * ki[1], sr[1] * ki[0] + sr[3] * ki[1], sr[0] * ki[2] + sr[2] * ki[3], sr[1] * ki[2] + sr[3] * ki[3], sr[0] * ki[4] + sr[2] * ki[5] + sr[4], sr[1] * ki[4] + sr[3] * ki[5] + sr[5]];
14526
14526
  }
14527
14527
  static applyTransform(sr, ki) {
14528
- const gl = sr[0] * ki[0] + sr[1] * ki[2] + ki[4], Cl = sr[0] * ki[1] + sr[1] * ki[3] + ki[5];
14529
- return [gl, Cl];
14528
+ const pl = sr[0] * ki[0] + sr[1] * ki[2] + ki[4], vl = sr[0] * ki[1] + sr[1] * ki[3] + ki[5];
14529
+ return [pl, vl];
14530
14530
  }
14531
14531
  static applyInverseTransform(sr, ki) {
14532
- const gl = ki[0] * ki[3] - ki[1] * ki[2], Cl = (sr[0] * ki[3] - sr[1] * ki[2] + ki[2] * ki[5] - ki[4] * ki[3]) / gl, xl = (-sr[0] * ki[1] + sr[1] * ki[0] + ki[4] * ki[1] - ki[5] * ki[0]) / gl;
14533
- return [Cl, xl];
14532
+ const pl = ki[0] * ki[3] - ki[1] * ki[2], vl = (sr[0] * ki[3] - sr[1] * ki[2] + ki[2] * ki[5] - ki[4] * ki[3]) / pl, xl = (-sr[0] * ki[1] + sr[1] * ki[0] + ki[4] * ki[1] - ki[5] * ki[0]) / pl;
14533
+ return [vl, xl];
14534
14534
  }
14535
14535
  static getAxialAlignedBoundingBox(sr, ki) {
14536
- const gl = Al.applyTransform(sr, ki), Cl = Al.applyTransform(sr.slice(2, 4), ki), xl = Al.applyTransform([sr[0], sr[3]], ki), Bl = Al.applyTransform([sr[2], sr[1]], ki);
14537
- return [Math.min(gl[0], Cl[0], xl[0], Bl[0]), Math.min(gl[1], Cl[1], xl[1], Bl[1]), Math.max(gl[0], Cl[0], xl[0], Bl[0]), Math.max(gl[1], Cl[1], xl[1], Bl[1])];
14536
+ const pl = Al.applyTransform(sr, ki), vl = Al.applyTransform(sr.slice(2, 4), ki), xl = Al.applyTransform([sr[0], sr[3]], ki), Bl = Al.applyTransform([sr[2], sr[1]], ki);
14537
+ return [Math.min(pl[0], vl[0], xl[0], Bl[0]), Math.min(pl[1], vl[1], xl[1], Bl[1]), Math.max(pl[0], vl[0], xl[0], Bl[0]), Math.max(pl[1], vl[1], xl[1], Bl[1])];
14538
14538
  }
14539
14539
  static inverseTransform(sr) {
14540
14540
  const ki = sr[0] * sr[3] - sr[1] * sr[2];
@@ -14544,7 +14544,7 @@ function requirePdf() {
14544
14544
  return [sr[0] * ki[0] + sr[1] * ki[1] + sr[2] * ki[2], sr[3] * ki[0] + sr[4] * ki[1] + sr[5] * ki[2], sr[6] * ki[0] + sr[7] * ki[1] + sr[8] * ki[2]];
14545
14545
  }
14546
14546
  static singularValueDecompose2dScale(sr) {
14547
- const ki = [sr[0], sr[2], sr[1], sr[3]], gl = sr[0] * ki[0] + sr[1] * ki[2], Cl = sr[0] * ki[1] + sr[1] * ki[3], xl = sr[2] * ki[0] + sr[3] * ki[2], Bl = sr[2] * ki[1] + sr[3] * ki[3], Ug = (gl + Bl) / 2, Tg = Math.sqrt((gl + Bl) ** 2 - 4 * (gl * Bl - xl * Cl)) / 2, t0 = Ug + Tg || 1, Yg = Ug - Tg || 1;
14547
+ const ki = [sr[0], sr[2], sr[1], sr[3]], pl = sr[0] * ki[0] + sr[1] * ki[2], vl = sr[0] * ki[1] + sr[1] * ki[3], xl = sr[2] * ki[0] + sr[3] * ki[2], Bl = sr[2] * ki[1] + sr[3] * ki[3], Ug = (pl + Bl) / 2, Tg = Math.sqrt((pl + Bl) ** 2 - 4 * (pl * Bl - xl * vl)) / 2, t0 = Ug + Tg || 1, Yg = Ug - Tg || 1;
14548
14548
  return [Math.sqrt(t0), Math.sqrt(Yg)];
14549
14549
  }
14550
14550
  static normalizeRect(sr) {
@@ -14552,17 +14552,17 @@ function requirePdf() {
14552
14552
  return sr[0] > sr[2] && (ki[0] = sr[2], ki[2] = sr[0]), sr[1] > sr[3] && (ki[1] = sr[3], ki[3] = sr[1]), ki;
14553
14553
  }
14554
14554
  static intersect(sr, ki) {
14555
- const gl = Math.max(Math.min(sr[0], sr[2]), Math.min(ki[0], ki[2])), Cl = Math.min(Math.max(sr[0], sr[2]), Math.max(ki[0], ki[2]));
14556
- if (gl > Cl)
14555
+ const pl = Math.max(Math.min(sr[0], sr[2]), Math.min(ki[0], ki[2])), vl = Math.min(Math.max(sr[0], sr[2]), Math.max(ki[0], ki[2]));
14556
+ if (pl > vl)
14557
14557
  return null;
14558
14558
  const xl = Math.max(Math.min(sr[1], sr[3]), Math.min(ki[1], ki[3])), Bl = Math.min(Math.max(sr[1], sr[3]), Math.max(ki[1], ki[3]));
14559
- return xl > Bl ? null : [gl, xl, Cl, Bl];
14559
+ return xl > Bl ? null : [pl, xl, vl, Bl];
14560
14560
  }
14561
- static bezierBoundingBox(sr, ki, gl, Cl, xl, Bl, Ug, Tg) {
14561
+ static bezierBoundingBox(sr, ki, pl, vl, xl, Bl, Ug, Tg) {
14562
14562
  const t0 = [], Yg = [[], []];
14563
14563
  let u0, l0, m0, e0, v0, b0, w0, F0;
14564
14564
  for (let x0 = 0; x0 < 2; ++x0) {
14565
- if (x0 === 0 ? (l0 = 6 * sr - 12 * gl + 6 * xl, u0 = -3 * sr + 9 * gl - 9 * xl + 3 * Ug, m0 = 3 * gl - 3 * sr) : (l0 = 6 * ki - 12 * Cl + 6 * Bl, u0 = -3 * ki + 9 * Cl - 9 * Bl + 3 * Tg, m0 = 3 * Cl - 3 * ki), Math.abs(u0) < 1e-12) {
14565
+ if (x0 === 0 ? (l0 = 6 * sr - 12 * pl + 6 * xl, u0 = -3 * sr + 9 * pl - 9 * xl + 3 * Ug, m0 = 3 * pl - 3 * sr) : (l0 = 6 * ki - 12 * vl + 6 * Bl, u0 = -3 * ki + 9 * vl - 9 * Bl + 3 * Tg, m0 = 3 * vl - 3 * ki), Math.abs(u0) < 1e-12) {
14566
14566
  if (Math.abs(l0) < 1e-12)
14567
14567
  continue;
14568
14568
  e0 = -m0 / l0, 0 < e0 && e0 < 1 && t0.push(e0);
@@ -14573,7 +14573,7 @@ function requirePdf() {
14573
14573
  let h0 = t0.length, n0;
14574
14574
  const f0 = h0;
14575
14575
  for (; h0--; )
14576
- e0 = t0[h0], n0 = 1 - e0, Yg[0][h0] = n0 * n0 * n0 * sr + 3 * n0 * n0 * e0 * gl + 3 * n0 * e0 * e0 * xl + e0 * e0 * e0 * Ug, Yg[1][h0] = n0 * n0 * n0 * ki + 3 * n0 * n0 * e0 * Cl + 3 * n0 * e0 * e0 * Bl + e0 * e0 * e0 * Tg;
14576
+ e0 = t0[h0], n0 = 1 - e0, Yg[0][h0] = n0 * n0 * n0 * sr + 3 * n0 * n0 * e0 * pl + 3 * n0 * e0 * e0 * xl + e0 * e0 * e0 * Ug, Yg[1][h0] = n0 * n0 * n0 * ki + 3 * n0 * n0 * e0 * vl + 3 * n0 * e0 * e0 * Bl + e0 * e0 * e0 * Tg;
14577
14577
  return Yg[0][f0] = sr, Yg[1][f0] = ki, Yg[0][f0 + 1] = Ug, Yg[1][f0 + 1] = Tg, Yg[0].length = Yg[1].length = f0 + 2, [Math.min(...Yg[0]), Math.min(...Yg[1]), Math.max(...Yg[0]), Math.max(...Yg[1])];
14578
14578
  }
14579
14579
  }
@@ -14584,18 +14584,18 @@ function requirePdf() {
14584
14584
  let ki;
14585
14585
  if (hl[0] === "\xFE" && hl[1] === "\xFF" ? ki = "utf-16be" : hl[0] === "\xFF" && hl[1] === "\xFE" ? ki = "utf-16le" : hl[0] === "\xEF" && hl[1] === "\xBB" && hl[2] === "\xBF" && (ki = "utf-8"), ki)
14586
14586
  try {
14587
- const gl = new TextDecoder(ki, {
14587
+ const pl = new TextDecoder(ki, {
14588
14588
  fatal: !0
14589
- }), Cl = un(hl);
14590
- return gl.decode(Cl);
14591
- } catch (gl) {
14592
- dl(`stringToPDFString: "${gl}".`);
14589
+ }), vl = un(hl);
14590
+ return pl.decode(vl);
14591
+ } catch (pl) {
14592
+ dl(`stringToPDFString: "${pl}".`);
14593
14593
  }
14594
14594
  }
14595
14595
  const sr = [];
14596
- for (let ki = 0, gl = hl.length; ki < gl; ki++) {
14597
- const Cl = Dl[hl.charCodeAt(ki)];
14598
- sr.push(Cl ? String.fromCharCode(Cl) : hl.charAt(ki));
14596
+ for (let ki = 0, pl = hl.length; ki < pl; ki++) {
14597
+ const vl = Dl[hl.charCodeAt(ki)];
14598
+ sr.push(vl ? String.fromCharCode(vl) : hl.charAt(ki));
14599
14599
  }
14600
14600
  return sr.join("");
14601
14601
  }
@@ -14608,9 +14608,9 @@ function requirePdf() {
14608
14608
  }
14609
14609
  function Rl(hl) {
14610
14610
  const sr = ["\xFE\xFF"];
14611
- for (let ki = 0, gl = hl.length; ki < gl; ki++) {
14612
- const Cl = hl.charCodeAt(ki);
14613
- sr.push(String.fromCharCode(Cl >> 8 & 255), String.fromCharCode(Cl & 255));
14611
+ for (let ki = 0, pl = hl.length; ki < pl; ki++) {
14612
+ const vl = hl.charCodeAt(ki);
14613
+ sr.push(String.fromCharCode(vl >> 8 & 255), String.fromCharCode(vl & 255));
14614
14614
  }
14615
14615
  return sr.join("");
14616
14616
  }
@@ -14626,7 +14626,7 @@ function requirePdf() {
14626
14626
  function s0(hl, sr) {
14627
14627
  if (hl.length !== sr.length)
14628
14628
  return !1;
14629
- for (let ki = 0, gl = hl.length; ki < gl; ki++)
14629
+ for (let ki = 0, pl = hl.length; ki < pl; ki++)
14630
14630
  if (hl[ki] !== sr[ki])
14631
14631
  return !1;
14632
14632
  return !0;
@@ -14641,11 +14641,11 @@ function requirePdf() {
14641
14641
  get() {
14642
14642
  return sr;
14643
14643
  }
14644
- }), hl.promise = new Promise(function(ki, gl) {
14645
- hl.resolve = function(Cl) {
14646
- sr = !0, ki(Cl);
14647
- }, hl.reject = function(Cl) {
14648
- sr = !0, gl(Cl);
14644
+ }), hl.promise = new Promise(function(ki, pl) {
14645
+ hl.resolve = function(vl) {
14646
+ sr = !0, ki(vl);
14647
+ }, hl.reject = function(vl) {
14648
+ sr = !0, pl(vl);
14649
14649
  };
14650
14650
  }), hl;
14651
14651
  }
@@ -14835,7 +14835,7 @@ function requirePdf() {
14835
14835
  this.destroyed = !0, await ((u = this._transport) == null ? void 0 : u.destroy()), this._transport = null, this._worker && (this._worker.destroy(), this._worker = null);
14836
14836
  }
14837
14837
  };
14838
- e = new WeakMap(), vl(t, e, 0);
14838
+ e = new WeakMap(), bl(t, e, 0);
14839
14839
  let PDFDocumentLoadingTask = t;
14840
14840
  exports.PDFDocumentLoadingTask = PDFDocumentLoadingTask;
14841
14841
  class PDFDataRangeTransport {
@@ -15488,17 +15488,17 @@ function requirePdf() {
15488
15488
  return (0, _util.shadow)(this, "_setupFakeWorkerGlobal", loader());
15489
15489
  }
15490
15490
  };
15491
- r = new WeakMap(), vl(_PDFWorker, r, /* @__PURE__ */ new WeakMap());
15491
+ r = new WeakMap(), bl(_PDFWorker, r, /* @__PURE__ */ new WeakMap());
15492
15492
  let PDFWorker = _PDFWorker;
15493
15493
  exports.PDFWorker = PDFWorker, PDFWorker.getWorkerSrc = function() {
15494
15494
  return (0, _display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."), this.workerSrc;
15495
15495
  };
15496
15496
  class WorkerTransport {
15497
15497
  constructor(u, a, de, st) {
15498
- vl(this, s, null);
15499
- vl(this, i, /* @__PURE__ */ new Map());
15500
- vl(this, o, /* @__PURE__ */ new Map());
15501
- vl(this, c, null);
15498
+ bl(this, s, null);
15499
+ bl(this, i, /* @__PURE__ */ new Map());
15500
+ bl(this, o, /* @__PURE__ */ new Map());
15501
+ bl(this, c, null);
15502
15502
  this.messageHandler = u, this.loadingTask = a, this.commonObjs = new PDFObjects(), this.fontLoader = new _font_loader.FontLoader({
15503
15503
  docId: a.docId,
15504
15504
  onUnsupportedFeature: this._onUnsupportedFeature.bind(this),
@@ -15562,7 +15562,7 @@ function requirePdf() {
15562
15562
  Gr(this, i).clear(), Gr(this, o).clear(), this.hasOwnProperty("annotationStorage") && this.annotationStorage.resetModified();
15563
15563
  const a = this.messageHandler.sendWithPromise("Terminate", null);
15564
15564
  return u.push(a), Promise.all(u).then(() => {
15565
- this.commonObjs.clear(), this.fontLoader.clear(), bl(this, c, null), this._getFieldObjectsPromise = null, this._hasJSActionsPromise = null, this._networkStream && this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")), this.messageHandler && (this.messageHandler.destroy(), this.messageHandler = null), this.destroyCapability.resolve();
15565
+ this.commonObjs.clear(), this.fontLoader.clear(), Cl(this, c, null), this._getFieldObjectsPromise = null, this._hasJSActionsPromise = null, this._networkStream && this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")), this.messageHandler && (this.messageHandler.destroy(), this.messageHandler = null), this.destroyCapability.resolve();
15566
15566
  }, this.destroyCapability.reject), this.destroyCapability.promise;
15567
15567
  }
15568
15568
  setupMessageHandler() {
@@ -15762,7 +15762,7 @@ function requirePdf() {
15762
15762
  total: de.total
15763
15763
  });
15764
15764
  }), u.on("DocStats", (de) => {
15765
- this.destroyed || bl(this, s, Object.freeze({
15765
+ this.destroyed || Cl(this, s, Object.freeze({
15766
15766
  streamTypes: Object.freeze(de.streamTypes),
15767
15767
  fontTypes: Object.freeze(de.fontTypes)
15768
15768
  }));
@@ -15877,7 +15877,7 @@ function requirePdf() {
15877
15877
  return this.messageHandler.sendWithPromise("GetPermissions", null);
15878
15878
  }
15879
15879
  getMetadata() {
15880
- return Gr(this, c) || bl(this, c, this.messageHandler.sendWithPromise("GetMetadata", null).then((u) => {
15880
+ return Gr(this, c) || Cl(this, c, this.messageHandler.sendWithPromise("GetMetadata", null).then((u) => {
15881
15881
  var a, de;
15882
15882
  return {
15883
15883
  info: u[0],
@@ -15895,7 +15895,7 @@ function requirePdf() {
15895
15895
  for (const a of Gr(this, i).values())
15896
15896
  if (!a.cleanup())
15897
15897
  throw new Error(`startCleanup: Page ${a.pageNumber} is currently rendering.`);
15898
- this.commonObjs.clear(), u || this.fontLoader.clear(), bl(this, c, null), this._getFieldObjectsPromise = null, this._hasJSActionsPromise = null;
15898
+ this.commonObjs.clear(), u || this.fontLoader.clear(), Cl(this, c, null), this._getFieldObjectsPromise = null, this._hasJSActionsPromise = null;
15899
15899
  }
15900
15900
  }
15901
15901
  get loadingParams() {
@@ -15909,12 +15909,12 @@ function requirePdf() {
15909
15909
  s = new WeakMap(), i = new WeakMap(), o = new WeakMap(), c = new WeakMap();
15910
15910
  class PDFObjects {
15911
15911
  constructor() {
15912
- vl(this, l);
15913
- vl(this, h, /* @__PURE__ */ Object.create(null));
15912
+ bl(this, l);
15913
+ bl(this, h, /* @__PURE__ */ Object.create(null));
15914
15914
  }
15915
15915
  get(u, a = null) {
15916
15916
  if (a) {
15917
- const st = pl(this, l, P0).call(this, u);
15917
+ const st = gl(this, l, P0).call(this, u);
15918
15918
  return st.capability.promise.then(() => a(st.data)), null;
15919
15919
  }
15920
15920
  const de = Gr(this, h)[u];
@@ -15927,11 +15927,11 @@ function requirePdf() {
15927
15927
  return (a == null ? void 0 : a.capability.settled) || !1;
15928
15928
  }
15929
15929
  resolve(u, a = null) {
15930
- const de = pl(this, l, P0).call(this, u);
15930
+ const de = gl(this, l, P0).call(this, u);
15931
15931
  de.data = a, de.capability.resolve();
15932
15932
  }
15933
15933
  clear() {
15934
- bl(this, h, /* @__PURE__ */ Object.create(null));
15934
+ Cl(this, h, /* @__PURE__ */ Object.create(null));
15935
15935
  }
15936
15936
  }
15937
15937
  h = new WeakMap(), l = new WeakSet(), P0 = function(u) {
@@ -15943,8 +15943,8 @@ function requirePdf() {
15943
15943
  };
15944
15944
  class RenderTask {
15945
15945
  constructor(u) {
15946
- vl(this, tt, null);
15947
- bl(this, tt, u), this.onContinue = null;
15946
+ bl(this, tt, null);
15947
+ Cl(this, tt, u), this.onContinue = null;
15948
15948
  }
15949
15949
  get promise() {
15950
15950
  return Gr(this, tt).capability.promise;
@@ -16034,7 +16034,7 @@ function requirePdf() {
16034
16034
  this.cancelled || (this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper), this.operatorListIdx === this.operatorList.argsArray.length && (this.running = !1, this.operatorList.lastChunk && (this.gfx.endDrawing(), this._canvas && Gr(Le, pe).delete(this._canvas), this.callback())));
16035
16035
  }
16036
16036
  };
16037
- pe = new WeakMap(), vl(Le, pe, /* @__PURE__ */ new WeakSet());
16037
+ pe = new WeakMap(), bl(Le, pe, /* @__PURE__ */ new WeakSet());
16038
16038
  let InternalRenderTask = Le;
16039
16039
  const version = "2.16.105";
16040
16040
  exports.version = version;
@@ -16051,7 +16051,7 @@ function requirePdf() {
16051
16051
  var r = n(1), s = n(6), i = n(10);
16052
16052
  class o {
16053
16053
  constructor() {
16054
- vl(this, h);
16054
+ bl(this, h);
16055
16055
  this._storage = /* @__PURE__ */ new Map(), this._modified = !1, this.onSetModified = null, this.onResetModified = null, this.onAnnotationEditor = null;
16056
16056
  }
16057
16057
  getValue(pe, Le) {
@@ -16077,7 +16077,7 @@ function requirePdf() {
16077
16077
  E[a] !== de && (u = !0, E[a] = de);
16078
16078
  else
16079
16079
  u = !0, this._storage.set(pe, Le);
16080
- u && pl(this, h, X0).call(this), Le instanceof s.AnnotationEditor && typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(Le.constructor._type);
16080
+ u && gl(this, h, X0).call(this), Le instanceof s.AnnotationEditor && typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(Le.constructor._type);
16081
16081
  }
16082
16082
  has(pe) {
16083
16083
  return this._storage.has(pe);
@@ -16119,8 +16119,8 @@ function requirePdf() {
16119
16119
  class c extends o {
16120
16120
  constructor(Le) {
16121
16121
  super();
16122
- vl(this, b, null);
16123
- bl(this, b, structuredClone(Le.serializable));
16122
+ bl(this, b, null);
16123
+ Cl(this, b, structuredClone(Le.serializable));
16124
16124
  }
16125
16125
  get print() {
16126
16126
  (0, r.unreachable)("Should not call PrintAnnotationStorage.print");
@@ -16141,12 +16141,12 @@ function requirePdf() {
16141
16141
  var r = n(7), s = n(1);
16142
16142
  const pe = class pe {
16143
16143
  constructor(E) {
16144
- vl(this, o, this.focusin.bind(this));
16145
- vl(this, c, this.focusout.bind(this));
16146
- vl(this, h, !1);
16147
- vl(this, l, !1);
16148
- vl(this, b, !1);
16149
- vl(this, tt, pe._zIndex++);
16144
+ bl(this, o, this.focusin.bind(this));
16145
+ bl(this, c, this.focusout.bind(this));
16146
+ bl(this, h, !1);
16147
+ bl(this, l, !1);
16148
+ bl(this, b, !1);
16149
+ bl(this, tt, pe._zIndex++);
16150
16150
  this.constructor === pe && (0, s.unreachable)("Cannot initialize AnnotationEditor."), this.parent = E.parent, this.id = E.id, this.width = this.height = null, this.pageIndex = E.parent.pageIndex, this.name = E.name, this.div = null;
16151
16151
  const [u, a] = this.parent.viewportBaseDimensions;
16152
16152
  this.x = E.x / u, this.y = E.y / a, this.rotation = this.parent.viewport.rotation, this.isAttachedToDOM = !1;
@@ -16161,7 +16161,7 @@ function requirePdf() {
16161
16161
  this.div.style.zIndex = Gr(this, tt);
16162
16162
  }
16163
16163
  focusin(E) {
16164
- Gr(this, h) ? bl(this, h, !1) : this.parent.setSelected(this);
16164
+ Gr(this, h) ? Cl(this, h, !1) : this.parent.setSelected(this);
16165
16165
  }
16166
16166
  focusout(E) {
16167
16167
  if (!this.isAttachedToDOM)
@@ -16220,7 +16220,7 @@ function requirePdf() {
16220
16220
  E.preventDefault();
16221
16221
  return;
16222
16222
  }
16223
- E.ctrlKey && !u || E.shiftKey || E.metaKey && u ? this.parent.toggleSelected(this) : this.parent.setSelected(this), bl(this, h, !0);
16223
+ E.ctrlKey && !u || E.shiftKey || E.metaKey && u ? this.parent.toggleSelected(this) : this.parent.setSelected(this), Cl(this, h, !0);
16224
16224
  }
16225
16225
  getRect(E, u) {
16226
16226
  const [a, de] = this.parent.viewportBaseDimensions, [st, nt] = this.parent.pageDimensions, Ye = st * E / a, N = nt * u / de, P = this.x * st, p = this.y * nt, mt = this.width * st, Lt = this.height * nt;
@@ -16258,10 +16258,10 @@ function requirePdf() {
16258
16258
  return !1;
16259
16259
  }
16260
16260
  enableEditMode() {
16261
- bl(this, b, !0);
16261
+ Cl(this, b, !0);
16262
16262
  }
16263
16263
  disableEditMode() {
16264
- bl(this, b, !1);
16264
+ Cl(this, b, !1);
16265
16265
  }
16266
16266
  isInEditMode() {
16267
16267
  return Gr(this, b);
@@ -16315,7 +16315,7 @@ function requirePdf() {
16315
16315
  return Gr(this, l);
16316
16316
  }
16317
16317
  set isEditing(E) {
16318
- bl(this, l, E), E ? (this.parent.setSelected(this), this.parent.setActiveEditor(this)) : this.parent.setActiveEditor(null);
16318
+ Cl(this, l, E), E ? (this.parent.setSelected(this), this.parent.setActiveEditor(this)) : this.parent.setActiveEditor(null);
16319
16319
  }
16320
16320
  };
16321
16321
  o = new WeakMap(), c = new WeakMap(), h = new WeakMap(), l = new WeakMap(), b = new WeakMap(), tt = new WeakMap(), Kg(pe, "_colorManager", new r.ColorManager()), Kg(pe, "_zIndex", 1);
@@ -16339,7 +16339,7 @@ function requirePdf() {
16339
16339
  }
16340
16340
  class c {
16341
16341
  constructor() {
16342
- vl(this, Le, 0);
16342
+ bl(this, Le, 0);
16343
16343
  }
16344
16344
  getId() {
16345
16345
  return `${r.AnnotationEditorPrefix}${k0(this, Le)._++}`;
@@ -16348,11 +16348,11 @@ function requirePdf() {
16348
16348
  Le = new WeakMap();
16349
16349
  class h {
16350
16350
  constructor(un = 128) {
16351
- vl(this, E, []);
16352
- vl(this, u, !1);
16353
- vl(this, a);
16354
- vl(this, de, -1);
16355
- bl(this, a, un);
16351
+ bl(this, E, []);
16352
+ bl(this, u, !1);
16353
+ bl(this, a);
16354
+ bl(this, de, -1);
16355
+ Cl(this, a, un);
16356
16356
  }
16357
16357
  add({
16358
16358
  cmd: un,
@@ -16370,7 +16370,7 @@ function requirePdf() {
16370
16370
  type: Pi
16371
16371
  };
16372
16372
  if (Gr(this, de) === -1) {
16373
- Gr(this, E).length > 0 && (Gr(this, E).length = 0), bl(this, de, 0), Gr(this, E).push(_a);
16373
+ Gr(this, E).length > 0 && (Gr(this, E).length = 0), Cl(this, de, 0), Gr(this, E).push(_a);
16374
16374
  return;
16375
16375
  }
16376
16376
  if (Ri && Gr(this, E)[Gr(this, de)].type === Pi) {
@@ -16378,13 +16378,13 @@ function requirePdf() {
16378
16378
  return;
16379
16379
  }
16380
16380
  const ml = Gr(this, de) + 1;
16381
- ml === Gr(this, a) ? Gr(this, E).splice(0, 1) : (bl(this, de, ml), ml < Gr(this, E).length && Gr(this, E).splice(ml)), Gr(this, E).push(_a);
16381
+ ml === Gr(this, a) ? Gr(this, E).splice(0, 1) : (Cl(this, de, ml), ml < Gr(this, E).length && Gr(this, E).splice(ml)), Gr(this, E).push(_a);
16382
16382
  }
16383
16383
  undo() {
16384
- Gr(this, de) !== -1 && (bl(this, u, !0), Gr(this, E)[Gr(this, de)].undo(), bl(this, u, !1), bl(this, de, Gr(this, de) - 1));
16384
+ Gr(this, de) !== -1 && (Cl(this, u, !0), Gr(this, E)[Gr(this, de)].undo(), Cl(this, u, !1), Cl(this, de, Gr(this, de) - 1));
16385
16385
  }
16386
16386
  redo() {
16387
- Gr(this, de) < Gr(this, E).length - 1 && (bl(this, de, Gr(this, de) + 1), bl(this, u, !0), Gr(this, E)[Gr(this, de)].cmd(), bl(this, u, !1));
16387
+ Gr(this, de) < Gr(this, E).length - 1 && (Cl(this, de, Gr(this, de) + 1), Cl(this, u, !0), Gr(this, E)[Gr(this, de)].cmd(), Cl(this, u, !1));
16388
16388
  }
16389
16389
  hasSomethingToUndo() {
16390
16390
  return Gr(this, de) !== -1;
@@ -16393,13 +16393,13 @@ function requirePdf() {
16393
16393
  return Gr(this, de) < Gr(this, E).length - 1;
16394
16394
  }
16395
16395
  destroy() {
16396
- bl(this, E, null);
16396
+ Cl(this, E, null);
16397
16397
  }
16398
16398
  }
16399
16399
  E = new WeakMap(), u = new WeakMap(), a = new WeakMap(), de = new WeakMap(), t.CommandManager = h;
16400
16400
  const Ye = class Ye {
16401
16401
  constructor(un) {
16402
- vl(this, st);
16402
+ bl(this, st);
16403
16403
  this.buffer = [], this.callbacks = /* @__PURE__ */ new Map(), this.allKeys = /* @__PURE__ */ new Set();
16404
16404
  const Fr = Ye.platform.isMac;
16405
16405
  for (const [Oi, Pi] of un)
@@ -16418,7 +16418,7 @@ function requirePdf() {
16418
16418
  exec(un, Fr) {
16419
16419
  if (!this.allKeys.has(Fr.key))
16420
16420
  return;
16421
- const Oi = this.callbacks.get(pl(this, st, Y0).call(this, Fr));
16421
+ const Oi = this.callbacks.get(gl(this, st, Y0).call(this, Fr));
16422
16422
  Oi && (Oi.bind(un)(), Fr.stopPropagation(), Fr.preventDefault());
16423
16423
  }
16424
16424
  };
@@ -16431,10 +16431,10 @@ function requirePdf() {
16431
16431
  t.KeyboardManager = l;
16432
16432
  class b {
16433
16433
  constructor() {
16434
- vl(this, N, null);
16434
+ bl(this, N, null);
16435
16435
  }
16436
16436
  copy(un) {
16437
- un && (Array.isArray(un) ? bl(this, N, un.map((Fr) => Fr.serialize())) : bl(this, N, [un.serialize()]), bl(this, N, Gr(this, N).filter((Fr) => !!Fr)), Gr(this, N).length === 0 && bl(this, N, null));
16437
+ un && (Array.isArray(un) ? Cl(this, N, un.map((Fr) => Fr.serialize())) : Cl(this, N, [un.serialize()]), Cl(this, N, Gr(this, N).filter((Fr) => !!Fr)), Gr(this, N).length === 0 && Cl(this, N, null));
16438
16438
  }
16439
16439
  paste() {
16440
16440
  return Gr(this, N);
@@ -16443,7 +16443,7 @@ function requirePdf() {
16443
16443
  return Gr(this, N) === null;
16444
16444
  }
16445
16445
  destroy() {
16446
- bl(this, N, null);
16446
+ Cl(this, N, null);
16447
16447
  }
16448
16448
  }
16449
16449
  N = new WeakMap();
@@ -16471,23 +16471,23 @@ function requirePdf() {
16471
16471
  t.ColorManager = tt;
16472
16472
  const nr = class nr {
16473
16473
  constructor(un, Fr) {
16474
- vl(this, ot);
16475
- vl(this, p, null);
16476
- vl(this, mt, /* @__PURE__ */ new Map());
16477
- vl(this, Lt, /* @__PURE__ */ new Map());
16478
- vl(this, Zn, new b());
16479
- vl(this, ln, new h());
16480
- vl(this, qs, 0);
16481
- vl(this, Si, null);
16482
- vl(this, Is, null);
16483
- vl(this, Br, new c());
16484
- vl(this, Ur, !1);
16485
- vl(this, ur, r.AnnotationEditorType.NONE);
16486
- vl(this, As, /* @__PURE__ */ new Set());
16487
- vl(this, Ti, this.keydown.bind(this));
16488
- vl(this, Ni, this.onEditingAction.bind(this));
16489
- vl(this, dl, this.onPageChanging.bind(this));
16490
- vl(this, Ar, {
16474
+ bl(this, ot);
16475
+ bl(this, p, null);
16476
+ bl(this, mt, /* @__PURE__ */ new Map());
16477
+ bl(this, Lt, /* @__PURE__ */ new Map());
16478
+ bl(this, Zn, new b());
16479
+ bl(this, ln, new h());
16480
+ bl(this, qs, 0);
16481
+ bl(this, Si, null);
16482
+ bl(this, Is, null);
16483
+ bl(this, Br, new c());
16484
+ bl(this, Ur, !1);
16485
+ bl(this, ur, r.AnnotationEditorType.NONE);
16486
+ bl(this, As, /* @__PURE__ */ new Set());
16487
+ bl(this, Ti, this.keydown.bind(this));
16488
+ bl(this, Ni, this.onEditingAction.bind(this));
16489
+ bl(this, dl, this.onPageChanging.bind(this));
16490
+ bl(this, Ar, {
16491
16491
  isEditing: !1,
16492
16492
  isEmpty: !0,
16493
16493
  hasEmptyClipboard: !0,
@@ -16495,19 +16495,19 @@ function requirePdf() {
16495
16495
  hasSomethingToRedo: !1,
16496
16496
  hasSelectedEditor: !1
16497
16497
  });
16498
- vl(this, Dt, null);
16499
- bl(this, Dt, un), bl(this, Is, Fr), Gr(this, Is)._on("editingaction", Gr(this, Ni)), Gr(this, Is)._on("pagechanging", Gr(this, dl));
16498
+ bl(this, Dt, null);
16499
+ Cl(this, Dt, un), Cl(this, Is, Fr), Gr(this, Is)._on("editingaction", Gr(this, Ni)), Gr(this, Is)._on("pagechanging", Gr(this, dl));
16500
16500
  }
16501
16501
  destroy() {
16502
- pl(this, ot, T0).call(this), Gr(this, Is)._off("editingaction", Gr(this, Ni)), Gr(this, Is)._off("pagechanging", Gr(this, dl));
16502
+ gl(this, ot, T0).call(this), Gr(this, Is)._off("editingaction", Gr(this, Ni)), Gr(this, Is)._off("pagechanging", Gr(this, dl));
16503
16503
  for (const un of Gr(this, Lt).values())
16504
16504
  un.destroy();
16505
- Gr(this, Lt).clear(), Gr(this, mt).clear(), bl(this, p, null), Gr(this, As).clear(), Gr(this, Zn).destroy(), Gr(this, ln).destroy();
16505
+ Gr(this, Lt).clear(), Gr(this, mt).clear(), Cl(this, p, null), Gr(this, As).clear(), Gr(this, Zn).destroy(), Gr(this, ln).destroy();
16506
16506
  }
16507
16507
  onPageChanging({
16508
16508
  pageNumber: un
16509
16509
  }) {
16510
- bl(this, qs, un - 1);
16510
+ Cl(this, qs, un - 1);
16511
16511
  }
16512
16512
  focusMainContainer() {
16513
16513
  Gr(this, Dt).focus();
@@ -16520,21 +16520,21 @@ function requirePdf() {
16520
16520
  ["undo", "redo", "cut", "copy", "paste", "delete", "selectAll"].includes(un.name) && this[un.name]();
16521
16521
  }
16522
16522
  setEditingState(un) {
16523
- un ? (pl(this, ot, Z0).call(this), pl(this, ot, r0).call(this, {
16523
+ un ? (gl(this, ot, Z0).call(this), gl(this, ot, r0).call(this, {
16524
16524
  isEditing: Gr(this, ur) !== r.AnnotationEditorType.NONE,
16525
- isEmpty: pl(this, ot, g0).call(this),
16525
+ isEmpty: gl(this, ot, g0).call(this),
16526
16526
  hasSomethingToUndo: Gr(this, ln).hasSomethingToUndo(),
16527
16527
  hasSomethingToRedo: Gr(this, ln).hasSomethingToRedo(),
16528
16528
  hasSelectedEditor: !1,
16529
16529
  hasEmptyClipboard: Gr(this, Zn).isEmpty()
16530
- })) : (pl(this, ot, T0).call(this), pl(this, ot, r0).call(this, {
16530
+ })) : (gl(this, ot, T0).call(this), gl(this, ot, r0).call(this, {
16531
16531
  isEditing: !1
16532
16532
  }));
16533
16533
  }
16534
16534
  registerEditorTypes(un) {
16535
- bl(this, Si, un);
16535
+ Cl(this, Si, un);
16536
16536
  for (const Fr of Gr(this, Si))
16537
- pl(this, ot, p0).call(this, Fr.defaultPropertiesToUpdate);
16537
+ gl(this, ot, p0).call(this, Fr.defaultPropertiesToUpdate);
16538
16538
  }
16539
16539
  getId() {
16540
16540
  return Gr(this, Br).getId();
@@ -16546,10 +16546,10 @@ function requirePdf() {
16546
16546
  Gr(this, Lt).delete(un.pageIndex);
16547
16547
  }
16548
16548
  updateMode(un) {
16549
- if (bl(this, ur, un), un === r.AnnotationEditorType.NONE)
16550
- this.setEditingState(!1), pl(this, ot, Q0).call(this);
16549
+ if (Cl(this, ur, un), un === r.AnnotationEditorType.NONE)
16550
+ this.setEditingState(!1), gl(this, ot, Q0).call(this);
16551
16551
  else {
16552
- this.setEditingState(!0), pl(this, ot, J0).call(this);
16552
+ this.setEditingState(!0), gl(this, ot, J0).call(this);
16553
16553
  for (const Fr of Gr(this, Lt).values())
16554
16554
  Fr.updateMode(un);
16555
16555
  }
@@ -16582,23 +16582,23 @@ function requirePdf() {
16582
16582
  Gr(this, mt).delete(un.id), this.unselect(un);
16583
16583
  }
16584
16584
  setActiveEditor(un) {
16585
- Gr(this, p) !== un && (bl(this, p, un), un && pl(this, ot, p0).call(this, un.propertiesToUpdate));
16585
+ Gr(this, p) !== un && (Cl(this, p, un), un && gl(this, ot, p0).call(this, un.propertiesToUpdate));
16586
16586
  }
16587
16587
  toggleSelected(un) {
16588
16588
  if (Gr(this, As).has(un)) {
16589
- Gr(this, As).delete(un), un.unselect(), pl(this, ot, r0).call(this, {
16589
+ Gr(this, As).delete(un), un.unselect(), gl(this, ot, r0).call(this, {
16590
16590
  hasSelectedEditor: this.hasSelection
16591
16591
  });
16592
16592
  return;
16593
16593
  }
16594
- Gr(this, As).add(un), un.select(), pl(this, ot, p0).call(this, un.propertiesToUpdate), pl(this, ot, r0).call(this, {
16594
+ Gr(this, As).add(un), un.select(), gl(this, ot, p0).call(this, un.propertiesToUpdate), gl(this, ot, r0).call(this, {
16595
16595
  hasSelectedEditor: !0
16596
16596
  });
16597
16597
  }
16598
16598
  setSelected(un) {
16599
16599
  for (const Fr of Gr(this, As))
16600
16600
  Fr !== un && Fr.unselect();
16601
- Gr(this, As).clear(), Gr(this, As).add(un), un.select(), pl(this, ot, p0).call(this, un.propertiesToUpdate), pl(this, ot, r0).call(this, {
16601
+ Gr(this, As).clear(), Gr(this, As).add(un), un.select(), gl(this, ot, p0).call(this, un.propertiesToUpdate), gl(this, ot, r0).call(this, {
16602
16602
  hasSelectedEditor: !0
16603
16603
  });
16604
16604
  }
@@ -16606,7 +16606,7 @@ function requirePdf() {
16606
16606
  return Gr(this, As).has(un);
16607
16607
  }
16608
16608
  unselect(un) {
16609
- un.unselect(), Gr(this, As).delete(un), pl(this, ot, r0).call(this, {
16609
+ un.unselect(), Gr(this, As).delete(un), gl(this, ot, r0).call(this, {
16610
16610
  hasSelectedEditor: this.hasSelection
16611
16611
  });
16612
16612
  }
@@ -16614,24 +16614,24 @@ function requirePdf() {
16614
16614
  return Gr(this, As).size !== 0;
16615
16615
  }
16616
16616
  undo() {
16617
- Gr(this, ln).undo(), pl(this, ot, r0).call(this, {
16617
+ Gr(this, ln).undo(), gl(this, ot, r0).call(this, {
16618
16618
  hasSomethingToUndo: Gr(this, ln).hasSomethingToUndo(),
16619
16619
  hasSomethingToRedo: !0,
16620
- isEmpty: pl(this, ot, g0).call(this)
16620
+ isEmpty: gl(this, ot, g0).call(this)
16621
16621
  });
16622
16622
  }
16623
16623
  redo() {
16624
- Gr(this, ln).redo(), pl(this, ot, r0).call(this, {
16624
+ Gr(this, ln).redo(), gl(this, ot, r0).call(this, {
16625
16625
  hasSomethingToUndo: !0,
16626
16626
  hasSomethingToRedo: Gr(this, ln).hasSomethingToRedo(),
16627
- isEmpty: pl(this, ot, g0).call(this)
16627
+ isEmpty: gl(this, ot, g0).call(this)
16628
16628
  });
16629
16629
  }
16630
16630
  addCommands(un) {
16631
- Gr(this, ln).add(un), pl(this, ot, r0).call(this, {
16631
+ Gr(this, ln).add(un), gl(this, ot, r0).call(this, {
16632
16632
  hasSomethingToUndo: !0,
16633
16633
  hasSomethingToRedo: !1,
16634
- isEmpty: pl(this, ot, g0).call(this)
16634
+ isEmpty: gl(this, ot, g0).call(this)
16635
16635
  });
16636
16636
  }
16637
16637
  delete() {
@@ -16642,7 +16642,7 @@ function requirePdf() {
16642
16642
  Pi.remove();
16643
16643
  }, Oi = () => {
16644
16644
  for (const Pi of un)
16645
- pl(this, ot, R0).call(this, Pi);
16645
+ gl(this, ot, R0).call(this, Pi);
16646
16646
  };
16647
16647
  this.addCommands({
16648
16648
  cmd: Fr,
@@ -16657,7 +16657,7 @@ function requirePdf() {
16657
16657
  Fr.isEmpty() || un.push(Fr);
16658
16658
  if (un.length === 0)
16659
16659
  return;
16660
- Gr(this, Zn).copy(un), pl(this, ot, r0).call(this, {
16660
+ Gr(this, Zn).copy(un), gl(this, ot, r0).call(this, {
16661
16661
  hasEmptyClipboard: !1
16662
16662
  });
16663
16663
  }
@@ -16671,8 +16671,8 @@ function requirePdf() {
16671
16671
  this.unselectAll();
16672
16672
  const un = Gr(this, Lt).get(Gr(this, qs)), Fr = Gr(this, Zn).paste().map((Ri) => un.deserialize(Ri)), Oi = () => {
16673
16673
  for (const Ri of Fr)
16674
- pl(this, ot, R0).call(this, Ri);
16675
- pl(this, ot, C0).call(this, Fr);
16674
+ gl(this, ot, R0).call(this, Ri);
16675
+ gl(this, ot, C0).call(this, Fr);
16676
16676
  }, Pi = () => {
16677
16677
  for (const Ri of Fr)
16678
16678
  Ri.remove();
@@ -16686,17 +16686,17 @@ function requirePdf() {
16686
16686
  selectAll() {
16687
16687
  for (const un of Gr(this, As))
16688
16688
  un.commit();
16689
- pl(this, ot, C0).call(this, Gr(this, mt).values());
16689
+ gl(this, ot, C0).call(this, Gr(this, mt).values());
16690
16690
  }
16691
16691
  unselectAll() {
16692
16692
  if (Gr(this, p)) {
16693
16693
  Gr(this, p).commitOrRemove();
16694
16694
  return;
16695
16695
  }
16696
- if (pl(this, ot, C0).size !== 0) {
16696
+ if (gl(this, ot, C0).size !== 0) {
16697
16697
  for (const un of Gr(this, As))
16698
16698
  un.unselect();
16699
- Gr(this, As).clear(), pl(this, ot, r0).call(this, {
16699
+ Gr(this, As).clear(), gl(this, ot, r0).call(this, {
16700
16700
  hasSelectedEditor: !1
16701
16701
  });
16702
16702
  }
@@ -16727,13 +16727,13 @@ function requirePdf() {
16727
16727
  });
16728
16728
  }, J0 = function() {
16729
16729
  if (!Gr(this, Ur)) {
16730
- bl(this, Ur, !0);
16730
+ Cl(this, Ur, !0);
16731
16731
  for (const un of Gr(this, Lt).values())
16732
16732
  un.enable();
16733
16733
  }
16734
16734
  }, Q0 = function() {
16735
16735
  if (this.unselectAll(), Gr(this, Ur)) {
16736
- bl(this, Ur, !1);
16736
+ Cl(this, Ur, !1);
16737
16737
  for (const un of Gr(this, Lt).values())
16738
16738
  un.disable();
16739
16739
  }
@@ -16751,7 +16751,7 @@ function requirePdf() {
16751
16751
  Gr(this, As).clear();
16752
16752
  for (const Fr of un)
16753
16753
  Fr.isEmpty() || (Gr(this, As).add(Fr), Fr.select());
16754
- pl(this, ot, r0).call(this, {
16754
+ gl(this, ot, r0).call(this, {
16755
16755
  hasSelectedEditor: !0
16756
16756
  });
16757
16757
  }, Kg(nr, "_keyboardManager", new l([[["ctrl+a", "mac+meta+a"], nr.prototype.selectAll], [["ctrl+c", "mac+meta+c"], nr.prototype.copy], [["ctrl+v", "mac+meta+v"], nr.prototype.paste], [["ctrl+x", "mac+meta+x"], nr.prototype.cut], [["ctrl+z", "mac+meta+z"], nr.prototype.undo], [["ctrl+y", "ctrl+shift+Z", "mac+meta+shift+Z"], nr.prototype.redo], [["Backspace", "alt+Backspace", "ctrl+Backspace", "shift+Backspace", "mac+Backspace", "mac+alt+Backspace", "mac+ctrl+Backspace", "Delete", "ctrl+Delete", "shift+Delete"], nr.prototype.delete], [["Escape", "mac+Escape"], nr.prototype.unselectAll]]));
@@ -17773,7 +17773,7 @@ function requirePdf() {
17773
17773
  }
17774
17774
  const Is = ["butt", "round", "square"], Br = ["miter", "round", "bevel"], Ur = {}, ur = {}, dl = class dl {
17775
17775
  constructor(Dt, ot, Kn, It, Xn, Gn, me, kt) {
17776
- vl(this, Ti);
17776
+ bl(this, Ti);
17777
17777
  this.ctx = Dt, this.current = new nt(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = ot, this.objs = Kn, this.canvasFactory = It, this.imageLayer = Xn, 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 = [], this.optionalContentConfig = Gn, this.cachedCanvases = new a(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = me, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.backgroundColor = (kt == null ? void 0 : kt.background) || null, this.foregroundColor = (kt == null ? void 0 : kt.foreground) || null, this._cachedScaleForStroking = null, this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
17778
17778
  }
17779
17779
  getObject(Dt, ot = null) {
@@ -17839,7 +17839,7 @@ function requirePdf() {
17839
17839
  }
17840
17840
  }
17841
17841
  endDrawing() {
17842
- pl(this, Ti, O0).call(this), this.cachedCanvases.clear(), this.cachedPatterns.clear();
17842
+ gl(this, Ti, O0).call(this), this.cachedCanvases.clear(), this.cachedPatterns.clear();
17843
17843
  for (const Dt of this._cachedBitmapsMap.values()) {
17844
17844
  for (const ot of Dt.values())
17845
17845
  typeof HTMLCanvasElement < "u" && ot instanceof HTMLCanvasElement && (ot.width = ot.height = 0);
@@ -18342,7 +18342,7 @@ function requirePdf() {
18342
18342
  }
18343
18343
  }
18344
18344
  beginAnnotation(Dt, ot, Kn, It, Xn) {
18345
- if (pl(this, Ti, O0).call(this), p(this.ctx, this.foregroundColor), this.ctx.save(), this.save(), this.baseTransform && this.ctx.setTransform(...this.baseTransform), Array.isArray(ot) && ot.length === 4) {
18345
+ if (gl(this, Ti, O0).call(this), p(this.ctx, this.foregroundColor), this.ctx.save(), this.save(), this.baseTransform && this.ctx.setTransform(...this.baseTransform), Array.isArray(ot) && ot.length === 4) {
18346
18346
  const Gn = ot[2] - ot[0], me = ot[3] - ot[1];
18347
18347
  if (Xn && this.annotationCanvasMap) {
18348
18348
  Kn = Kn.slice(), Kn[4] -= ot[0], Kn[5] -= ot[1], ot = ot.slice(), ot[0] = ot[1] = 0, ot[2] = Gn, ot[3] = me;
@@ -19185,9 +19185,9 @@ function requirePdf() {
19185
19185
  parsedData: h,
19186
19186
  rawData: l
19187
19187
  }) {
19188
- vl(this, i);
19189
- vl(this, o);
19190
- bl(this, i, h), bl(this, o, l);
19188
+ bl(this, i);
19189
+ bl(this, o);
19190
+ Cl(this, i, h), Cl(this, o, l);
19191
19191
  }
19192
19192
  getRaw() {
19193
19193
  return Gr(this, o);
@@ -19215,26 +19215,26 @@ function requirePdf() {
19215
19215
  const s = Symbol("INTERNAL");
19216
19216
  class i {
19217
19217
  constructor(u, a) {
19218
- vl(this, c, !0);
19218
+ bl(this, c, !0);
19219
19219
  this.name = u, this.intent = a;
19220
19220
  }
19221
19221
  get visible() {
19222
19222
  return Gr(this, c);
19223
19223
  }
19224
19224
  _setVisible(u, a) {
19225
- u !== s && (0, r.unreachable)("Internal method `_setVisible` called."), bl(this, c, a);
19225
+ u !== s && (0, r.unreachable)("Internal method `_setVisible` called."), Cl(this, c, a);
19226
19226
  }
19227
19227
  }
19228
19228
  c = new WeakMap();
19229
19229
  class o {
19230
19230
  constructor(u) {
19231
- vl(this, pe);
19232
- vl(this, h, !0);
19233
- vl(this, l, /* @__PURE__ */ new Map());
19234
- vl(this, b, null);
19235
- vl(this, tt, null);
19231
+ bl(this, pe);
19232
+ bl(this, h, !0);
19233
+ bl(this, l, /* @__PURE__ */ new Map());
19234
+ bl(this, b, null);
19235
+ bl(this, tt, null);
19236
19236
  if (this.name = null, this.creator = null, u !== null) {
19237
- this.name = u.name, this.creator = u.creator, bl(this, tt, u.order);
19237
+ this.name = u.name, this.creator = u.creator, Cl(this, tt, u.order);
19238
19238
  for (const a of u.groups)
19239
19239
  Gr(this, l).set(a.id, new i(a.name, a.intent));
19240
19240
  if (u.baseState === "OFF")
@@ -19244,7 +19244,7 @@ function requirePdf() {
19244
19244
  Gr(this, l).get(a)._setVisible(s, !0);
19245
19245
  for (const a of u.off)
19246
19246
  Gr(this, l).get(a)._setVisible(s, !1);
19247
- bl(this, b, /* @__PURE__ */ new Map());
19247
+ Cl(this, b, /* @__PURE__ */ new Map());
19248
19248
  for (const [a, de] of Gr(this, l))
19249
19249
  Gr(this, b).set(a, de.visible);
19250
19250
  }
@@ -19258,7 +19258,7 @@ function requirePdf() {
19258
19258
  return Gr(this, l).has(u.id) ? Gr(this, l).get(u.id).visible : ((0, r.warn)(`Optional content group not found: ${u.id}`), !0);
19259
19259
  if (u.type === "OCMD") {
19260
19260
  if (u.expression)
19261
- return pl(this, pe, M0).call(this, u.expression);
19261
+ return gl(this, pe, M0).call(this, u.expression);
19262
19262
  if (!u.policy || u.policy === "AnyOn") {
19263
19263
  for (const a of u.ids) {
19264
19264
  if (!Gr(this, l).has(a))
@@ -19301,7 +19301,7 @@ function requirePdf() {
19301
19301
  (0, r.warn)(`Optional content group not found: ${u}`);
19302
19302
  return;
19303
19303
  }
19304
- Gr(this, l).get(u)._setVisible(s, !!a), bl(this, h, null);
19304
+ Gr(this, l).get(u)._setVisible(s, !!a), Cl(this, h, null);
19305
19305
  }
19306
19306
  get hasInitialVisibility() {
19307
19307
  if (Gr(this, h) !== null)
@@ -19309,9 +19309,9 @@ function requirePdf() {
19309
19309
  for (const [u, a] of Gr(this, l)) {
19310
19310
  const de = Gr(this, b).get(u);
19311
19311
  if (a.visible !== de)
19312
- return bl(this, h, !1);
19312
+ return Cl(this, h, !1);
19313
19313
  }
19314
- return bl(this, h, !0);
19314
+ return Cl(this, h, !0);
19315
19315
  }
19316
19316
  getOrder() {
19317
19317
  return Gr(this, l).size ? Gr(this, tt) ? Gr(this, tt).slice() : [...Gr(this, l).keys()] : null;
@@ -19332,7 +19332,7 @@ function requirePdf() {
19332
19332
  const nt = u[st];
19333
19333
  let Ye;
19334
19334
  if (Array.isArray(nt))
19335
- Ye = pl(this, pe, M0).call(this, nt);
19335
+ Ye = gl(this, pe, M0).call(this, nt);
19336
19336
  else if (Gr(this, l).has(nt))
19337
19337
  Ye = Gr(this, l).get(nt).visible;
19338
19338
  else
@@ -19638,22 +19638,22 @@ function requirePdf() {
19638
19638
  var r = n(7), s = n(1), i = n(23), o = n(24);
19639
19639
  const N = class N {
19640
19640
  constructor(p) {
19641
- vl(this, a);
19642
- vl(this, h);
19643
- vl(this, l, !1);
19644
- vl(this, b, this.pointerup.bind(this));
19645
- vl(this, tt, this.pointerdown.bind(this));
19646
- vl(this, pe, /* @__PURE__ */ new Map());
19647
- vl(this, Le, !1);
19648
- vl(this, E, !1);
19649
- vl(this, u);
19650
- N._initialized || (N._initialized = !0, i.FreeTextEditor.initialize(p.l10n), o.InkEditor.initialize(p.l10n), p.uiManager.registerEditorTypes([i.FreeTextEditor, o.InkEditor])), bl(this, u, p.uiManager), this.annotationStorage = p.annotationStorage, this.pageIndex = p.pageIndex, this.div = p.div, bl(this, h, p.accessibilityManager), Gr(this, u).addLayer(this);
19641
+ bl(this, a);
19642
+ bl(this, h);
19643
+ bl(this, l, !1);
19644
+ bl(this, b, this.pointerup.bind(this));
19645
+ bl(this, tt, this.pointerdown.bind(this));
19646
+ bl(this, pe, /* @__PURE__ */ new Map());
19647
+ bl(this, Le, !1);
19648
+ bl(this, E, !1);
19649
+ bl(this, u);
19650
+ N._initialized || (N._initialized = !0, i.FreeTextEditor.initialize(p.l10n), o.InkEditor.initialize(p.l10n), p.uiManager.registerEditorTypes([i.FreeTextEditor, o.InkEditor])), Cl(this, u, p.uiManager), this.annotationStorage = p.annotationStorage, this.pageIndex = p.pageIndex, this.div = p.div, Cl(this, h, p.accessibilityManager), Gr(this, u).addLayer(this);
19651
19651
  }
19652
19652
  updateToolbar(p) {
19653
19653
  Gr(this, u).updateToolbar(p);
19654
19654
  }
19655
19655
  updateMode(p = Gr(this, u).getMode()) {
19656
- pl(this, a, tm).call(this), p === s.AnnotationEditorType.INK ? (this.addInkEditorIfNeeded(!1), this.disableClick()) : this.enableClick(), Gr(this, u).unselectAll();
19656
+ gl(this, a, tm).call(this), p === s.AnnotationEditorType.INK ? (this.addInkEditorIfNeeded(!1), this.disableClick()) : this.enableClick(), Gr(this, u).unselectAll();
19657
19657
  }
19658
19658
  addInkEditorIfNeeded(p) {
19659
19659
  if (!p && Gr(this, u).getMode() !== s.AnnotationEditorType.INK)
@@ -19665,7 +19665,7 @@ function requirePdf() {
19665
19665
  return;
19666
19666
  }
19667
19667
  }
19668
- pl(this, a, I0).call(this, {
19668
+ gl(this, a, I0).call(this, {
19669
19669
  offsetX: 0,
19670
19670
  offsetY: 0
19671
19671
  }).setInBackground();
@@ -19708,7 +19708,7 @@ function requirePdf() {
19708
19708
  }, 0), Gr(this, E) || this.addInkEditorIfNeeded(!1);
19709
19709
  }
19710
19710
  add(p) {
19711
- if (pl(this, a, L0).call(this, p), Gr(this, u).addEditor(p), this.attach(p), !p.isAttachedToDOM) {
19711
+ if (gl(this, a, L0).call(this, p), Gr(this, u).addEditor(p), this.attach(p), !p.isAttachedToDOM) {
19712
19712
  const mt = p.render();
19713
19713
  this.div.append(mt), p.isAttachedToDOM = !0;
19714
19714
  }
@@ -19775,26 +19775,26 @@ function requirePdf() {
19775
19775
  pointerup(p) {
19776
19776
  const mt = r.KeyboardManager.platform.isMac;
19777
19777
  if (!(p.button !== 0 || p.ctrlKey && mt) && p.target === this.div && Gr(this, Le)) {
19778
- if (bl(this, Le, !1), !Gr(this, l)) {
19779
- bl(this, l, !0);
19778
+ if (Cl(this, Le, !1), !Gr(this, l)) {
19779
+ Cl(this, l, !0);
19780
19780
  return;
19781
19781
  }
19782
- pl(this, a, I0).call(this, p);
19782
+ gl(this, a, I0).call(this, p);
19783
19783
  }
19784
19784
  }
19785
19785
  pointerdown(p) {
19786
19786
  const mt = r.KeyboardManager.platform.isMac;
19787
19787
  if (p.button !== 0 || p.ctrlKey && mt || p.target !== this.div)
19788
19788
  return;
19789
- bl(this, Le, !0);
19789
+ Cl(this, Le, !0);
19790
19790
  const Lt = Gr(this, u).getActive();
19791
- bl(this, l, !Lt || Lt.isEmpty());
19791
+ Cl(this, l, !Lt || Lt.isEmpty());
19792
19792
  }
19793
19793
  drop(p) {
19794
19794
  const mt = p.dataTransfer.getData("text/plain"), Lt = Gr(this, u).getEditor(mt);
19795
19795
  if (!Lt)
19796
19796
  return;
19797
- p.preventDefault(), p.dataTransfer.dropEffect = "move", pl(this, a, L0).call(this, Lt);
19797
+ p.preventDefault(), p.dataTransfer.dropEffect = "move", gl(this, a, L0).call(this, Lt);
19798
19798
  const Zn = this.div.getBoundingClientRect(), ln = p.clientX - Zn.x, qs = p.clientY - Zn.y;
19799
19799
  Lt.translate(ln - Lt.startX, qs - Lt.startY), this.moveEditorInDOM(Lt), Lt.div.focus();
19800
19800
  }
@@ -19853,7 +19853,7 @@ function requirePdf() {
19853
19853
  }
19854
19854
  return null;
19855
19855
  }, I0 = function(p) {
19856
- const mt = this.getNextId(), Lt = pl(this, a, em).call(this, {
19856
+ const mt = this.getNextId(), Lt = gl(this, a, em).call(this, {
19857
19857
  parent: this,
19858
19858
  id: mt,
19859
19859
  x: p.offsetX,
@@ -19861,10 +19861,10 @@ function requirePdf() {
19861
19861
  });
19862
19862
  return Lt && this.add(Lt), Lt;
19863
19863
  }, tm = function() {
19864
- bl(this, E, !0);
19864
+ Cl(this, E, !0);
19865
19865
  for (const p of Gr(this, pe).values())
19866
19866
  p.isEmpty() && p.remove();
19867
- bl(this, E, !1);
19867
+ Cl(this, E, !1);
19868
19868
  }, Kg(N, "_initialized", !1);
19869
19869
  let c = N;
19870
19870
  t.AnnotationEditorLayer = c;
@@ -19883,15 +19883,15 @@ function requirePdf() {
19883
19883
  ...P,
19884
19884
  name: "freeTextEditor"
19885
19885
  });
19886
- vl(this, E);
19887
- vl(this, c, this.editorDivBlur.bind(this));
19888
- vl(this, h, this.editorDivFocus.bind(this));
19889
- vl(this, l, this.editorDivKeydown.bind(this));
19890
- vl(this, b);
19891
- vl(this, tt, "");
19892
- vl(this, pe, !1);
19893
- vl(this, Le);
19894
- bl(this, b, P.color || nt._defaultColor || i.AnnotationEditor._defaultLineColor), bl(this, Le, P.fontSize || nt._defaultFontSize);
19886
+ bl(this, E);
19887
+ bl(this, c, this.editorDivBlur.bind(this));
19888
+ bl(this, h, this.editorDivFocus.bind(this));
19889
+ bl(this, l, this.editorDivKeydown.bind(this));
19890
+ bl(this, b);
19891
+ bl(this, tt, "");
19892
+ bl(this, pe, !1);
19893
+ bl(this, Le);
19894
+ Cl(this, b, P.color || nt._defaultColor || i.AnnotationEditor._defaultLineColor), Cl(this, Le, P.fontSize || nt._defaultFontSize);
19895
19895
  }
19896
19896
  static initialize(P) {
19897
19897
  this._l10nPromise = new Map(["free_text_default_content", "editor_free_text_aria_label"].map((mt) => [mt, P.get(mt)]));
@@ -19911,10 +19911,10 @@ function requirePdf() {
19911
19911
  updateParams(P, p) {
19912
19912
  switch (P) {
19913
19913
  case r.AnnotationEditorParamsType.FREETEXT_SIZE:
19914
- pl(this, E, nm).call(this, p);
19914
+ gl(this, E, nm).call(this, p);
19915
19915
  break;
19916
19916
  case r.AnnotationEditorParamsType.FREETEXT_COLOR:
19917
- pl(this, E, rm).call(this, p);
19917
+ gl(this, E, rm).call(this, p);
19918
19918
  break;
19919
19919
  }
19920
19920
  }
@@ -19949,7 +19949,7 @@ function requirePdf() {
19949
19949
  this.isEditing = !1, this.parent.setEditingState(!0), super.remove();
19950
19950
  }
19951
19951
  commit() {
19952
- super.commit(), Gr(this, pe) || (bl(this, pe, !0), this.parent.addUndoableEditor(this)), this.disableEditMode(), bl(this, tt, pl(this, E, sm).call(this).trimEnd()), pl(this, E, N0).call(this);
19952
+ super.commit(), Gr(this, pe) || (Cl(this, pe, !0), this.parent.addUndoableEditor(this)), this.disableEditMode(), Cl(this, tt, gl(this, E, sm).call(this).trimEnd()), gl(this, E, N0).call(this);
19953
19953
  }
19954
19954
  shouldGetKeyboardEvents() {
19955
19955
  return this.isInEditMode();
@@ -20007,7 +20007,7 @@ function requirePdf() {
20007
20007
  }
20008
20008
  static deserialize(P, p) {
20009
20009
  const mt = super.deserialize(P, p);
20010
- return bl(mt, Le, P.fontSize), bl(mt, b, r.Util.makeHexColor(...P.color)), bl(mt, tt, P.value), mt;
20010
+ return Cl(mt, Le, P.fontSize), Cl(mt, b, r.Util.makeHexColor(...P.color)), Cl(mt, tt, P.value), mt;
20011
20011
  }
20012
20012
  serialize() {
20013
20013
  if (this.isEmpty())
@@ -20026,7 +20026,7 @@ function requirePdf() {
20026
20026
  };
20027
20027
  c = new WeakMap(), h = new WeakMap(), l = new WeakMap(), b = new WeakMap(), tt = new WeakMap(), pe = new WeakMap(), Le = new WeakMap(), E = new WeakSet(), nm = function(P) {
20028
20028
  const p = (Lt) => {
20029
- this.editorDiv.style.fontSize = `calc(${Lt}px * var(--scale-factor))`, this.translate(0, -(Lt - Gr(this, Le)) * this.parent.scaleFactor), bl(this, Le, Lt), pl(this, E, N0).call(this);
20029
+ this.editorDiv.style.fontSize = `calc(${Lt}px * var(--scale-factor))`, this.translate(0, -(Lt - Gr(this, Le)) * this.parent.scaleFactor), Cl(this, Le, Lt), gl(this, E, N0).call(this);
20030
20030
  }, mt = Gr(this, Le);
20031
20031
  this.parent.addCommands({
20032
20032
  cmd: () => {
@@ -20044,10 +20044,10 @@ function requirePdf() {
20044
20044
  const p = Gr(this, b);
20045
20045
  this.parent.addCommands({
20046
20046
  cmd: () => {
20047
- bl(this, b, P), this.editorDiv.style.color = P;
20047
+ Cl(this, b, P), this.editorDiv.style.color = P;
20048
20048
  },
20049
20049
  undo: () => {
20050
- bl(this, b, p), this.editorDiv.style.color = p;
20050
+ Cl(this, b, p), this.editorDiv.style.color = p;
20051
20051
  },
20052
20052
  mustExec: !0,
20053
20053
  type: r.AnnotationEditorParamsType.FREETEXT_COLOR,
@@ -20091,21 +20091,21 @@ function requirePdf() {
20091
20091
  ...Yn,
20092
20092
  name: "inkEditor"
20093
20093
  });
20094
- vl(this, p);
20095
- vl(this, l, 0);
20096
- vl(this, b, 0);
20097
- vl(this, tt, 0);
20098
- vl(this, pe, this.canvasPointermove.bind(this));
20099
- vl(this, Le, this.canvasPointerleave.bind(this));
20100
- vl(this, E, this.canvasPointerup.bind(this));
20101
- vl(this, u, this.canvasPointerdown.bind(this));
20102
- vl(this, a, !1);
20103
- vl(this, de, !1);
20104
- vl(this, st, null);
20105
- vl(this, nt, null);
20106
- vl(this, Ye, 0);
20107
- vl(this, N, 0);
20108
- vl(this, P, null);
20094
+ bl(this, p);
20095
+ bl(this, l, 0);
20096
+ bl(this, b, 0);
20097
+ bl(this, tt, 0);
20098
+ bl(this, pe, this.canvasPointermove.bind(this));
20099
+ bl(this, Le, this.canvasPointerleave.bind(this));
20100
+ bl(this, E, this.canvasPointerup.bind(this));
20101
+ bl(this, u, this.canvasPointerdown.bind(this));
20102
+ bl(this, a, !1);
20103
+ bl(this, de, !1);
20104
+ bl(this, st, null);
20105
+ bl(this, nt, null);
20106
+ bl(this, Ye, 0);
20107
+ bl(this, N, 0);
20108
+ bl(this, P, null);
20109
20109
  this.color = Yn.color || null, this.thickness = Yn.thickness || null, this.opacity = Yn.opacity || null, this.paths = [], this.bezierPath2D = [], this.currentPath = [], this.scaleFactor = 1, this.translationX = this.translationY = 0, this.x = 0, this.y = 0;
20110
20110
  }
20111
20111
  static initialize(Yn) {
@@ -20127,13 +20127,13 @@ function requirePdf() {
20127
20127
  updateParams(Yn, un) {
20128
20128
  switch (Yn) {
20129
20129
  case r.AnnotationEditorParamsType.INK_THICKNESS:
20130
- pl(this, p, im).call(this, un);
20130
+ gl(this, p, im).call(this, un);
20131
20131
  break;
20132
20132
  case r.AnnotationEditorParamsType.INK_COLOR:
20133
- pl(this, p, om).call(this, un);
20133
+ gl(this, p, om).call(this, un);
20134
20134
  break;
20135
20135
  case r.AnnotationEditorParamsType.INK_OPACITY:
20136
- pl(this, p, am).call(this, un);
20136
+ gl(this, p, am).call(this, un);
20137
20137
  break;
20138
20138
  }
20139
20139
  }
@@ -20144,10 +20144,10 @@ function requirePdf() {
20144
20144
  return [[r.AnnotationEditorParamsType.INK_THICKNESS, this.thickness || zt._defaultThickness], [r.AnnotationEditorParamsType.INK_COLOR, this.color || zt._defaultColor || s.AnnotationEditor._defaultLineColor], [r.AnnotationEditorParamsType.INK_OPACITY, Math.round(100 * (this.opacity ?? zt._defaultOpacity))]];
20145
20145
  }
20146
20146
  rebuild() {
20147
- super.rebuild(), this.div !== null && (this.canvas || (pl(this, p, y0).call(this), pl(this, p, A0).call(this)), this.isAttachedToDOM || (this.parent.add(this), pl(this, p, c0).call(this)), pl(this, p, d0).call(this));
20147
+ super.rebuild(), this.div !== null && (this.canvas || (gl(this, p, y0).call(this), gl(this, p, A0).call(this)), this.isAttachedToDOM || (this.parent.add(this), gl(this, p, c0).call(this)), gl(this, p, d0).call(this));
20148
20148
  }
20149
20149
  remove() {
20150
- this.canvas !== null && (this.isEmpty() || this.commit(), this.canvas.width = this.canvas.height = 0, this.canvas.remove(), this.canvas = null, Gr(this, nt).disconnect(), bl(this, nt, null), super.remove());
20150
+ this.canvas !== null && (this.isEmpty() || this.commit(), this.canvas.width = this.canvas.height = 0, this.canvas.remove(), this.canvas = null, Gr(this, nt).disconnect(), Cl(this, nt, null), super.remove());
20151
20151
  }
20152
20152
  enableEditMode() {
20153
20153
  Gr(this, a) || this.canvas === null || (super.enableEditMode(), this.div.draggable = !1, this.canvas.addEventListener("pointerdown", Gr(this, u)), this.canvas.addEventListener("pointerup", Gr(this, E)));
@@ -20162,22 +20162,22 @@ function requirePdf() {
20162
20162
  return this.paths.length === 0 || this.paths.length === 1 && this.paths[0].length === 0;
20163
20163
  }
20164
20164
  commit() {
20165
- Gr(this, a) || (super.commit(), this.isEditing = !1, this.disableEditMode(), this.setInForeground(), bl(this, a, !0), this.div.classList.add("disabled"), pl(this, p, d0).call(this, !0), this.parent.addInkEditorIfNeeded(!0), this.parent.moveEditorInDOM(this), this.div.focus());
20165
+ Gr(this, a) || (super.commit(), this.isEditing = !1, this.disableEditMode(), this.setInForeground(), Cl(this, a, !0), this.div.classList.add("disabled"), gl(this, p, d0).call(this, !0), this.parent.addInkEditorIfNeeded(!0), this.parent.moveEditorInDOM(this), this.div.focus());
20166
20166
  }
20167
20167
  focusin(Yn) {
20168
20168
  super.focusin(Yn), this.enableEditMode();
20169
20169
  }
20170
20170
  canvasPointerdown(Yn) {
20171
- Yn.button !== 0 || !this.isInEditMode() || Gr(this, a) || (this.setInForeground(), Yn.type !== "mouse" && this.div.focus(), Yn.stopPropagation(), this.canvas.addEventListener("pointerleave", Gr(this, Le)), this.canvas.addEventListener("pointermove", Gr(this, pe)), pl(this, p, lm).call(this, Yn.offsetX, Yn.offsetY));
20171
+ Yn.button !== 0 || !this.isInEditMode() || Gr(this, a) || (this.setInForeground(), Yn.type !== "mouse" && this.div.focus(), Yn.stopPropagation(), this.canvas.addEventListener("pointerleave", Gr(this, Le)), this.canvas.addEventListener("pointermove", Gr(this, pe)), gl(this, p, lm).call(this, Yn.offsetX, Yn.offsetY));
20172
20172
  }
20173
20173
  canvasPointermove(Yn) {
20174
- Yn.stopPropagation(), pl(this, p, cm).call(this, Yn.offsetX, Yn.offsetY);
20174
+ Yn.stopPropagation(), gl(this, p, cm).call(this, Yn.offsetX, Yn.offsetY);
20175
20175
  }
20176
20176
  canvasPointerup(Yn) {
20177
- Yn.button === 0 && this.isInEditMode() && this.currentPath.length !== 0 && (Yn.stopPropagation(), pl(this, p, j0).call(this, Yn), this.setInBackground());
20177
+ Yn.button === 0 && this.isInEditMode() && this.currentPath.length !== 0 && (Yn.stopPropagation(), gl(this, p, j0).call(this, Yn), this.setInBackground());
20178
20178
  }
20179
20179
  canvasPointerleave(Yn) {
20180
- pl(this, p, j0).call(this, Yn), this.setInBackground();
20180
+ gl(this, p, j0).call(this, Yn), this.setInBackground();
20181
20181
  }
20182
20182
  render() {
20183
20183
  if (this.div)
@@ -20187,28 +20187,28 @@ function requirePdf() {
20187
20187
  var _a;
20188
20188
  return (_a = this.div) == null ? void 0 : _a.setAttribute("aria-label", ji);
20189
20189
  });
20190
- const [Fr, Oi, Pi, Ri] = pl(this, p, um).call(this);
20191
- if (this.setAt(Fr, Oi, 0, 0), this.setDims(Pi, Ri), pl(this, p, y0).call(this), this.width) {
20190
+ const [Fr, Oi, Pi, Ri] = gl(this, p, um).call(this);
20191
+ if (this.setAt(Fr, Oi, 0, 0), this.setDims(Pi, Ri), gl(this, p, y0).call(this), this.width) {
20192
20192
  const [ji, _a] = this.parent.viewportBaseDimensions;
20193
- this.setAt(Yn * ji, un * _a, this.width * ji, this.height * _a), bl(this, de, !0), pl(this, p, c0).call(this), this.setDims(this.width * ji, this.height * _a), pl(this, p, a0).call(this), pl(this, p, q0).call(this), this.div.classList.add("disabled");
20193
+ this.setAt(Yn * ji, un * _a, this.width * ji, this.height * _a), Cl(this, de, !0), gl(this, p, c0).call(this), this.setDims(this.width * ji, this.height * _a), gl(this, p, a0).call(this), gl(this, p, q0).call(this), this.div.classList.add("disabled");
20194
20194
  } else
20195
20195
  this.div.classList.add("editing"), this.enableEditMode();
20196
- return pl(this, p, A0).call(this), this.div;
20196
+ return gl(this, p, A0).call(this), this.div;
20197
20197
  }
20198
20198
  setDimensions(Yn, un) {
20199
20199
  const Fr = Math.round(Yn), Oi = Math.round(un);
20200
20200
  if (Gr(this, Ye) === Fr && Gr(this, N) === Oi)
20201
20201
  return;
20202
- bl(this, Ye, Fr), bl(this, N, Oi), this.canvas.style.visibility = "hidden", Gr(this, l) && Math.abs(Gr(this, l) - Yn / un) > 0.01 && (un = Math.ceil(Yn / Gr(this, l)), this.setDims(Yn, un));
20202
+ Cl(this, Ye, Fr), Cl(this, N, Oi), this.canvas.style.visibility = "hidden", Gr(this, l) && Math.abs(Gr(this, l) - Yn / un) > 0.01 && (un = Math.ceil(Yn / Gr(this, l)), this.setDims(Yn, un));
20203
20203
  const [Pi, Ri] = this.parent.viewportBaseDimensions;
20204
- this.width = Yn / Pi, this.height = un / Ri, Gr(this, a) && pl(this, p, U0).call(this, Yn, un), pl(this, p, c0).call(this), pl(this, p, a0).call(this), this.canvas.style.visibility = "visible";
20204
+ this.width = Yn / Pi, this.height = un / Ri, Gr(this, a) && gl(this, p, U0).call(this, Yn, un), gl(this, p, c0).call(this), gl(this, p, a0).call(this), this.canvas.style.visibility = "visible";
20205
20205
  }
20206
20206
  static deserialize(Yn, un) {
20207
20207
  var wl, Al;
20208
20208
  const Fr = super.deserialize(Yn, un);
20209
20209
  Fr.thickness = Yn.thickness, Fr.color = r.Util.makeHexColor(...Yn.color), Fr.opacity = Yn.opacity;
20210
20210
  const [Oi, Pi] = un.pageDimensions, Ri = Fr.width * Oi, ji = Fr.height * Pi, _a = un.scaleFactor, ml = Yn.thickness / 2;
20211
- bl(Fr, l, Ri / ji), bl(Fr, a, !0), bl(Fr, Ye, Math.round(Ri)), bl(Fr, N, Math.round(ji));
20211
+ Cl(Fr, l, Ri / ji), Cl(Fr, a, !0), Cl(Fr, Ye, Math.round(Ri)), Cl(Fr, N, Math.round(ji));
20212
20212
  for (const {
20213
20213
  bezier: Dl
20214
20214
  } of Yn.paths) {
@@ -20219,11 +20219,11 @@ function requirePdf() {
20219
20219
  const lg = _a * (Dl[fg] - ml), s0 = _a * (ji - Dl[fg + 1] - ml), o0 = _a * (Dl[fg + 2] - ml), i0 = _a * (ji - Dl[fg + 3] - ml), hl = _a * (Dl[fg + 4] - ml), sr = _a * (ji - Dl[fg + 5] - ml);
20220
20220
  Fl.push([[Pl, Ol], [lg, s0], [o0, i0], [hl, sr]]), Pl = hl, Ol = sr;
20221
20221
  }
20222
- const Rl = pl(this, Dt, z0).call(this, Fl);
20222
+ const Rl = gl(this, Dt, z0).call(this, Fl);
20223
20223
  Fr.bezierPath2D.push(Rl);
20224
20224
  }
20225
- const Ha = pl(wl = Fr, p, W0).call(wl);
20226
- return bl(Fr, tt, Math.max(c, Ha[2] - Ha[0])), bl(Fr, b, Math.max(c, Ha[3] - Ha[1])), pl(Al = Fr, p, U0).call(Al, Ri, ji), Fr;
20225
+ const Ha = gl(wl = Fr, p, W0).call(wl);
20226
+ return Cl(Fr, tt, Math.max(c, Ha[2] - Ha[0])), Cl(Fr, b, Math.max(c, Ha[3] - Ha[1])), gl(Al = Fr, p, U0).call(Al, Ri, ji), Fr;
20227
20227
  }
20228
20228
  serialize() {
20229
20229
  if (this.isEmpty())
@@ -20234,7 +20234,7 @@ function requirePdf() {
20234
20234
  color: Fr,
20235
20235
  thickness: this.thickness,
20236
20236
  opacity: this.opacity,
20237
- paths: pl(this, p, hm).call(this, this.scaleFactor / this.parent.scaleFactor, this.translationX, this.translationY, un),
20237
+ paths: gl(this, p, hm).call(this, this.scaleFactor / this.parent.scaleFactor, this.translationX, this.translationY, un),
20238
20238
  pageIndex: this.parent.pageIndex,
20239
20239
  rect: Yn,
20240
20240
  rotation: this.rotation
@@ -20245,10 +20245,10 @@ function requirePdf() {
20245
20245
  const un = this.thickness;
20246
20246
  this.parent.addCommands({
20247
20247
  cmd: () => {
20248
- this.thickness = Yn, pl(this, p, d0).call(this);
20248
+ this.thickness = Yn, gl(this, p, d0).call(this);
20249
20249
  },
20250
20250
  undo: () => {
20251
- this.thickness = un, pl(this, p, d0).call(this);
20251
+ this.thickness = un, gl(this, p, d0).call(this);
20252
20252
  },
20253
20253
  mustExec: !0,
20254
20254
  type: r.AnnotationEditorParamsType.INK_THICKNESS,
@@ -20259,10 +20259,10 @@ function requirePdf() {
20259
20259
  const un = this.color;
20260
20260
  this.parent.addCommands({
20261
20261
  cmd: () => {
20262
- this.color = Yn, pl(this, p, a0).call(this);
20262
+ this.color = Yn, gl(this, p, a0).call(this);
20263
20263
  },
20264
20264
  undo: () => {
20265
- this.color = un, pl(this, p, a0).call(this);
20265
+ this.color = un, gl(this, p, a0).call(this);
20266
20266
  },
20267
20267
  mustExec: !0,
20268
20268
  type: r.AnnotationEditorParamsType.INK_COLOR,
@@ -20274,10 +20274,10 @@ function requirePdf() {
20274
20274
  const un = this.opacity;
20275
20275
  this.parent.addCommands({
20276
20276
  cmd: () => {
20277
- this.opacity = Yn, pl(this, p, a0).call(this);
20277
+ this.opacity = Yn, gl(this, p, a0).call(this);
20278
20278
  },
20279
20279
  undo: () => {
20280
- this.opacity = un, pl(this, p, a0).call(this);
20280
+ this.opacity = un, gl(this, p, a0).call(this);
20281
20281
  },
20282
20282
  mustExec: !0,
20283
20283
  type: r.AnnotationEditorParamsType.INK_OPACITY,
@@ -20303,15 +20303,15 @@ function requirePdf() {
20303
20303
  }, $0 = function() {
20304
20304
  this.ctx.lineWidth = this.thickness * this.parent.scaleFactor / this.scaleFactor, this.ctx.lineCap = "round", this.ctx.lineJoin = "round", this.ctx.miterLimit = 10, this.ctx.strokeStyle = `${this.color}${(0, o.opacityToHex)(this.opacity)}`;
20305
20305
  }, lm = function(Yn, un) {
20306
- this.isEditing = !0, Gr(this, de) || (bl(this, de, !0), pl(this, p, c0).call(this), this.thickness || (this.thickness = zt._defaultThickness), this.color || (this.color = zt._defaultColor || s.AnnotationEditor._defaultLineColor), this.opacity ?? (this.opacity = zt._defaultOpacity)), this.currentPath.push([Yn, un]), bl(this, st, null), pl(this, p, $0).call(this), this.ctx.beginPath(), this.ctx.moveTo(Yn, un), bl(this, P, () => {
20307
- Gr(this, P) && (Gr(this, st) && (this.isEmpty() ? (this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)) : pl(this, p, a0).call(this), this.ctx.lineTo(...Gr(this, st)), bl(this, st, null), this.ctx.stroke()), window.requestAnimationFrame(Gr(this, P)));
20306
+ this.isEditing = !0, Gr(this, de) || (Cl(this, de, !0), gl(this, p, c0).call(this), this.thickness || (this.thickness = zt._defaultThickness), this.color || (this.color = zt._defaultColor || s.AnnotationEditor._defaultLineColor), this.opacity ?? (this.opacity = zt._defaultOpacity)), this.currentPath.push([Yn, un]), Cl(this, st, null), gl(this, p, $0).call(this), this.ctx.beginPath(), this.ctx.moveTo(Yn, un), Cl(this, P, () => {
20307
+ Gr(this, P) && (Gr(this, st) && (this.isEmpty() ? (this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height)) : gl(this, p, a0).call(this), this.ctx.lineTo(...Gr(this, st)), Cl(this, st, null), this.ctx.stroke()), window.requestAnimationFrame(Gr(this, P)));
20308
20308
  }), window.requestAnimationFrame(Gr(this, P));
20309
20309
  }, cm = function(Yn, un) {
20310
20310
  const [Fr, Oi] = this.currentPath.at(-1);
20311
- Yn === Fr && un === Oi || (this.currentPath.push([Yn, un]), bl(this, st, [Yn, un]));
20311
+ Yn === Fr && un === Oi || (this.currentPath.push([Yn, un]), Cl(this, st, [Yn, un]));
20312
20312
  }, dm = function(Yn, un) {
20313
20313
  var ml;
20314
- this.ctx.closePath(), bl(this, P, null), Yn = Math.min(Math.max(Yn, 0), this.canvas.width), un = Math.min(Math.max(un, 0), this.canvas.height);
20314
+ this.ctx.closePath(), Cl(this, P, null), Yn = Math.min(Math.max(Yn, 0), this.canvas.width), un = Math.min(Math.max(un, 0), this.canvas.height);
20315
20315
  const [Fr, Oi] = this.currentPath.at(-1);
20316
20316
  (Yn !== Fr || un !== Oi) && this.currentPath.push([Yn, un]);
20317
20317
  let Pi;
@@ -20321,12 +20321,12 @@ function requirePdf() {
20321
20321
  const Ha = [Yn, un];
20322
20322
  Pi = [[Ha, Ha.slice(), Ha.slice(), Ha]];
20323
20323
  }
20324
- const Ri = pl(ml = zt, Dt, z0).call(ml, Pi);
20324
+ const Ri = gl(ml = zt, Dt, z0).call(ml, Pi);
20325
20325
  this.currentPath.length = 0;
20326
20326
  const ji = () => {
20327
20327
  this.paths.push(Pi), this.bezierPath2D.push(Ri), this.rebuild();
20328
20328
  }, _a = () => {
20329
- this.paths.pop(), this.bezierPath2D.pop(), this.paths.length === 0 ? this.remove() : (this.canvas || (pl(this, p, y0).call(this), pl(this, p, A0).call(this)), pl(this, p, d0).call(this));
20329
+ this.paths.pop(), this.bezierPath2D.pop(), this.paths.length === 0 ? this.remove() : (this.canvas || (gl(this, p, y0).call(this), gl(this, p, A0).call(this)), gl(this, p, d0).call(this));
20330
20330
  };
20331
20331
  this.parent.addCommands({
20332
20332
  cmd: ji,
@@ -20335,26 +20335,26 @@ function requirePdf() {
20335
20335
  });
20336
20336
  }, a0 = function() {
20337
20337
  if (this.isEmpty()) {
20338
- pl(this, p, E0).call(this);
20338
+ gl(this, p, E0).call(this);
20339
20339
  return;
20340
20340
  }
20341
- pl(this, p, $0).call(this);
20341
+ gl(this, p, $0).call(this);
20342
20342
  const {
20343
20343
  canvas: Yn,
20344
20344
  ctx: un
20345
20345
  } = this;
20346
- un.setTransform(1, 0, 0, 1, 0, 0), un.clearRect(0, 0, Yn.width, Yn.height), pl(this, p, E0).call(this);
20346
+ un.setTransform(1, 0, 0, 1, 0, 0), un.clearRect(0, 0, Yn.width, Yn.height), gl(this, p, E0).call(this);
20347
20347
  for (const Fr of this.bezierPath2D)
20348
20348
  un.stroke(Fr);
20349
20349
  }, j0 = function(Yn) {
20350
- pl(this, p, dm).call(this, Yn.offsetX, Yn.offsetY), this.canvas.removeEventListener("pointerleave", Gr(this, Le)), this.canvas.removeEventListener("pointermove", Gr(this, pe)), this.parent.addToAnnotationStorage(this);
20350
+ gl(this, p, dm).call(this, Yn.offsetX, Yn.offsetY), this.canvas.removeEventListener("pointerleave", Gr(this, Le)), this.canvas.removeEventListener("pointermove", Gr(this, pe)), this.parent.addToAnnotationStorage(this);
20351
20351
  }, y0 = function() {
20352
20352
  this.canvas = document.createElement("canvas"), this.canvas.width = this.canvas.height = 0, this.canvas.className = "inkEditorCanvas", zt._l10nPromise.get("editor_ink_canvas_aria_label").then((Yn) => {
20353
20353
  var un;
20354
20354
  return (un = this.canvas) == null ? void 0 : un.setAttribute("aria-label", Yn);
20355
20355
  }), this.div.append(this.canvas), this.ctx = this.canvas.getContext("2d");
20356
20356
  }, A0 = function() {
20357
- bl(this, nt, new ResizeObserver((Yn) => {
20357
+ Cl(this, nt, new ResizeObserver((Yn) => {
20358
20358
  const un = Yn[0].contentRect;
20359
20359
  un.width && un.height && this.setDimensions(un.width, un.height);
20360
20360
  })), Gr(this, nt).observe(this.div);
@@ -20362,12 +20362,12 @@ function requirePdf() {
20362
20362
  if (!Gr(this, de))
20363
20363
  return;
20364
20364
  const [Yn, un] = this.parent.viewportBaseDimensions;
20365
- this.canvas.width = Math.ceil(this.width * Yn), this.canvas.height = Math.ceil(this.height * un), pl(this, p, E0).call(this);
20365
+ this.canvas.width = Math.ceil(this.width * Yn), this.canvas.height = Math.ceil(this.height * un), gl(this, p, E0).call(this);
20366
20366
  }, U0 = function(Yn, un) {
20367
- const Fr = pl(this, p, D0).call(this), Oi = (Yn - Fr) / Gr(this, tt), Pi = (un - Fr) / Gr(this, b);
20367
+ const Fr = gl(this, p, D0).call(this), Oi = (Yn - Fr) / Gr(this, tt), Pi = (un - Fr) / Gr(this, b);
20368
20368
  this.scaleFactor = Math.min(Oi, Pi);
20369
20369
  }, E0 = function() {
20370
- const Yn = pl(this, p, D0).call(this) / 2;
20370
+ const Yn = gl(this, p, D0).call(this) / 2;
20371
20371
  this.ctx.setTransform(this.scaleFactor, 0, 0, this.scaleFactor, this.translationX * this.scaleFactor + Yn, this.translationY * this.scaleFactor + Yn);
20372
20372
  }, Dt = new WeakSet(), z0 = function(Yn) {
20373
20373
  const un = new Path2D();
@@ -20383,7 +20383,7 @@ function requirePdf() {
20383
20383
  _a = [], ml = [];
20384
20384
  for (let wl = 0, Al = Ha.length; wl < Al; wl++) {
20385
20385
  const [Dl, Fl, Pl, Ol] = Ha[wl], Rl = Yn * (Dl[0] + un) + ji, fg = Oi - Yn * (Dl[1] + Fr) - ji, cg = Yn * (Fl[0] + un) + ji, lg = Oi - Yn * (Fl[1] + Fr) - ji, s0 = Yn * (Pl[0] + un) + ji, o0 = Oi - Yn * (Pl[1] + Fr) - ji, i0 = Yn * (Ol[0] + un) + ji, hl = Oi - Yn * (Ol[1] + Fr) - ji;
20386
- wl === 0 && (_a.push(Rl, fg), ml.push(Rl, fg)), _a.push(cg, lg, s0, o0, i0, hl), pl(this, p, fm).call(this, Rl, fg, cg, lg, s0, o0, i0, hl, 4, ml);
20386
+ wl === 0 && (_a.push(Rl, fg), ml.push(Rl, fg)), _a.push(cg, lg, s0, o0, i0, hl), gl(this, p, fm).call(this, Rl, fg, cg, lg, s0, o0, i0, hl, 4, ml);
20387
20387
  }
20388
20388
  Ri.push({
20389
20389
  bezier: _a,
@@ -20392,7 +20392,7 @@ function requirePdf() {
20392
20392
  }
20393
20393
  return Ri;
20394
20394
  }, fm = function(Yn, un, Fr, Oi, Pi, Ri, ji, _a, ml, Ha) {
20395
- if (pl(this, p, pm).call(this, Yn, un, Fr, Oi, Pi, Ri, ji, _a)) {
20395
+ if (gl(this, p, pm).call(this, Yn, un, Fr, Oi, Pi, Ri, ji, _a)) {
20396
20396
  Ha.push(ji, _a);
20397
20397
  return;
20398
20398
  }
@@ -20420,15 +20420,15 @@ function requirePdf() {
20420
20420
  if (this.isEmpty())
20421
20421
  return;
20422
20422
  if (!Gr(this, a)) {
20423
- pl(this, p, a0).call(this);
20423
+ gl(this, p, a0).call(this);
20424
20424
  return;
20425
20425
  }
20426
- const un = pl(this, p, W0).call(this), Fr = pl(this, p, D0).call(this);
20427
- bl(this, tt, Math.max(c, un[2] - un[0])), bl(this, b, Math.max(c, un[3] - un[1]));
20426
+ const un = gl(this, p, W0).call(this), Fr = gl(this, p, D0).call(this);
20427
+ Cl(this, tt, Math.max(c, un[2] - un[0])), Cl(this, b, Math.max(c, un[3] - un[1]));
20428
20428
  const Oi = Math.ceil(Fr + Gr(this, tt) * this.scaleFactor), Pi = Math.ceil(Fr + Gr(this, b) * this.scaleFactor), [Ri, ji] = this.parent.viewportBaseDimensions;
20429
- this.width = Oi / Ri, this.height = Pi / ji, bl(this, l, Oi / Pi), pl(this, p, q0).call(this);
20429
+ this.width = Oi / Ri, this.height = Pi / ji, Cl(this, l, Oi / Pi), gl(this, p, q0).call(this);
20430
20430
  const _a = this.translationX, ml = this.translationY;
20431
- this.translationX = -un[0], this.translationY = -un[1], pl(this, p, c0).call(this), pl(this, p, a0).call(this), bl(this, Ye, Oi), bl(this, N, Pi), this.setDims(Oi, Pi);
20431
+ this.translationX = -un[0], this.translationY = -un[1], gl(this, p, c0).call(this), gl(this, p, a0).call(this), Cl(this, Ye, Oi), Cl(this, N, Pi), this.setDims(Oi, Pi);
20432
20432
  const Ha = Yn ? Fr / this.scaleFactor / 2 : 0;
20433
20433
  this.translate(_a - this.translationX - Ha, ml - this.translationY - Ha);
20434
20434
  }, q0 = function() {
@@ -20436,7 +20436,7 @@ function requirePdf() {
20436
20436
  style: Yn
20437
20437
  } = this.div;
20438
20438
  Gr(this, l) >= 1 ? (Yn.minHeight = `${c}px`, Yn.minWidth = `${Math.round(Gr(this, l) * c)}px`) : (Yn.minWidth = `${c}px`, Yn.minHeight = `${Math.round(c / Gr(this, l))}px`);
20439
- }, vl(zt, Dt), Kg(zt, "_defaultColor", null), Kg(zt, "_defaultOpacity", 1), Kg(zt, "_defaultThickness", 1), Kg(zt, "_l10nPromise"), Kg(zt, "_type", "ink");
20439
+ }, bl(zt, Dt), Kg(zt, "_defaultColor", null), Kg(zt, "_defaultOpacity", 1), Kg(zt, "_defaultThickness", 1), Kg(zt, "_l10nPromise"), Kg(zt, "_type", "ink");
20440
20440
  let h = zt;
20441
20441
  t.InkEditor = h;
20442
20442
  },
@@ -21868,7 +21868,7 @@ function requirePdf() {
21868
21868
  viewport: zt,
21869
21869
  accessibilityManager: Un
21870
21870
  } = me;
21871
- pl(this, Dt, V0).call(this, St, zt);
21871
+ gl(this, Dt, V0).call(this, St, zt);
21872
21872
  let nr = 0;
21873
21873
  for (const Fr of kt) {
21874
21874
  if (Fr.annotationType !== r.AnnotationType.POPUP) {
@@ -21901,12 +21901,12 @@ function requirePdf() {
21901
21901
  const Pi = Oi.render();
21902
21902
  if (Fr.hidden && (Pi.style.visibility = "hidden"), Array.isArray(Pi))
21903
21903
  for (const Ri of Pi)
21904
- Ri.style.zIndex = nr++, pl(Yn = Xn, Dt, H0).call(Yn, Ri, Fr.id, St, Un);
21904
+ Ri.style.zIndex = nr++, gl(Yn = Xn, Dt, H0).call(Yn, Ri, Fr.id, St, Un);
21905
21905
  else
21906
- Pi.style.zIndex = nr++, Oi instanceof P ? St.prepend(Pi) : pl(un = Xn, Dt, H0).call(un, Pi, Fr.id, St, Un);
21906
+ Pi.style.zIndex = nr++, Oi instanceof P ? St.prepend(Pi) : gl(un = Xn, Dt, H0).call(un, Pi, Fr.id, St, Un);
21907
21907
  }
21908
21908
  }
21909
- pl(this, Dt, G0).call(this, St, me.annotationCanvasMap);
21909
+ gl(this, Dt, G0).call(this, St, me.annotationCanvasMap);
21910
21910
  }
21911
21911
  static update(me) {
21912
21912
  const {
@@ -21914,7 +21914,7 @@ function requirePdf() {
21914
21914
  div: St,
21915
21915
  viewport: zt
21916
21916
  } = me;
21917
- pl(this, Dt, V0).call(this, St, zt), pl(this, Dt, G0).call(this, St, kt), St.hidden = !1;
21917
+ gl(this, Dt, V0).call(this, St, zt), gl(this, Dt, G0).call(this, St, kt), St.hidden = !1;
21918
21918
  }
21919
21919
  };
21920
21920
  Dt = new WeakSet(), H0 = function(me, kt, St, zt) {
@@ -21942,7 +21942,7 @@ function requirePdf() {
21942
21942
  }
21943
21943
  kt.clear();
21944
21944
  }
21945
- }, vl(Xn, Dt);
21945
+ }, bl(Xn, Dt);
21946
21946
  let Ar = Xn;
21947
21947
  t.AnnotationLayer = Ar;
21948
21948
  },
@@ -26827,16 +26827,16 @@ const {
26827
26827
  ...b
26828
26828
  } : ki;
26829
26829
  }, [n, b])(), un = useCallback((sr, ki) => {
26830
- const gl = Math.floor((sr - 1) / ki) * ki + 1;
26831
- return `${gl}-${gl + ki - 1}`;
26830
+ const pl = Math.floor((sr - 1) / ki) * ki + 1;
26831
+ return `${pl}-${pl + ki - 1}`;
26832
26832
  }, []), Fr = useCallback(async (sr) => {
26833
26833
  var ki;
26834
26834
  if (!(n === "pdf" || n === "pdf_slides"))
26835
26835
  return console.log(`\u6587\u4EF6\u7C7B\u578B ${n} \u4E0D\u662FPDF\uFF0C\u8DF3\u8FC7\u7F13\u5B58\u68C0\u67E5`), null;
26836
26836
  console.log(`\u68C0\u67E5\u9875\u9762 ${sr} \u662F\u5426\u5728\u7F13\u5B58\u4E2D`);
26837
- const Cl = Gn.current[sr];
26838
- if (Cl && Date.now() - Cl.timestamp < CACHE_EXPIRY_TIME)
26839
- return console.log(`\u4F7F\u7528\u5355\u4E2A\u9875\u9762\u7F13\u5B58: ${sr}`), Cl.pdfDocument ? (console.log(`\u76F4\u63A5\u8FD4\u56DE\u7F13\u5B58\u7684PDF\u6587\u6863: ${sr}`), Cl.pdfDocument) : null;
26837
+ const vl = Gn.current[sr];
26838
+ if (vl && Date.now() - vl.timestamp < CACHE_EXPIRY_TIME)
26839
+ return console.log(`\u4F7F\u7528\u5355\u4E2A\u9875\u9762\u7F13\u5B58: ${sr}`), vl.pdfDocument ? (console.log(`\u76F4\u63A5\u8FD4\u56DE\u7F13\u5B58\u7684PDF\u6587\u6863: ${sr}`), vl.pdfDocument) : null;
26840
26840
  const xl = un(sr, o), Bl = me.current[xl];
26841
26841
  if (console.log(`\u68C0\u67E5chunk\u7F13\u5B58: ${xl}, \u5B58\u5728: ${!!Bl}, \u5305\u542B\u9875\u9762: ${((ki = Bl == null ? void 0 : Bl.pages) == null ? void 0 : ki.join(", ")) || "\u65E0"}`), Bl && Date.now() - Bl.timestamp < CACHE_EXPIRY_TIME) {
26842
26842
  if (Bl.pages.includes(sr))
@@ -26849,15 +26849,15 @@ const {
26849
26849
  try {
26850
26850
  if (!(n === "pdf" || n === "pdf_slides"))
26851
26851
  throw console.log(`\u6587\u4EF6\u7C7B\u578B ${n} \u4E0D\u9700\u8981\u5206\u9875\u53C2\u6570\uFF0C\u83B7\u53D6\u5B8C\u6574\u5185\u5BB9`), new Error(`\u6587\u4EF6\u7C7B\u578B ${n} \u4E0D\u652F\u6301\u5206\u9875\u52A0\u8F7D`);
26852
- const Cl = Math.floor((sr - 1) / o) * o + 1, xl = un(sr, o);
26853
- console.log(`\u8BF7\u6C42PDF chunk\u6570\u636E: ${Cl} (\u5305\u542B\u9875\u9762 ${Cl}-${Cl + o - 1})`);
26852
+ const vl = Math.floor((sr - 1) / o) * o + 1, xl = un(sr, o);
26853
+ console.log(`\u8BF7\u6C42PDF chunk\u6570\u636E: ${vl} (\u5305\u542B\u9875\u9762 ${vl}-${vl + o - 1})`);
26854
26854
  const Bl = {
26855
26855
  "Content-Type": "application/json"
26856
26856
  };
26857
26857
  h && (Bl.Authorization = h);
26858
26858
  const Ug = {
26859
26859
  convertedFilePath: e,
26860
- pageNo: Cl,
26860
+ pageNo: vl,
26861
26861
  // 使用chunk的起始页
26862
26862
  pageSize: o
26863
26863
  }, Tg = await axios.post(
@@ -26867,19 +26867,19 @@ const {
26867
26867
  headers: Bl,
26868
26868
  responseType: "arraybuffer"
26869
26869
  }
26870
- ), t0 = Array.from({ length: o }, (Yg, u0) => Cl + u0);
26870
+ ), t0 = Array.from({ length: o }, (Yg, u0) => vl + u0);
26871
26871
  return me.current[xl] = {
26872
26872
  data: Tg.data,
26873
26873
  pages: t0,
26874
26874
  timestamp: Date.now(),
26875
- totalPages: s || mt
26876
- // 优先使用用户传入的总页数
26875
+ totalPages: s
26876
+ // 始终使用用户传入的总页数,不覆盖
26877
26877
  }, console.log(`\u7F13\u5B58PDF chunk\u6570\u636E: ${xl}, \u5305\u542B\u9875\u9762: ${t0.join(", ")}, \u8BF7\u6C42\u7684\u9875\u9762: ${sr}`), console.log("\u5F53\u524D\u6240\u6709\u7F13\u5B58:", Object.keys(me.current)), Tg.data;
26878
- } catch (gl) {
26879
- throw console.error("\u83B7\u53D6PDF stream\u6570\u636E\u5931\u8D25:", gl), new Error(`PDF\u8BF7\u6C42\u5931\u8D25: ${((ki = gl.response) == null ? void 0 : ki.status) || "\u7F51\u7EDC\u9519\u8BEF"}`);
26878
+ } catch (pl) {
26879
+ throw console.error("\u83B7\u53D6PDF stream\u6570\u636E\u5931\u8D25:", pl), new Error(`PDF\u8BF7\u6C42\u5931\u8D25: ${((ki = pl.response) == null ? void 0 : ki.status) || "\u7F51\u7EDC\u9519\u8BEF"}`);
26880
26880
  }
26881
26881
  }, [c, e, o, h, un, s, mt, n]), Pi = useCallback(async (sr, ki = !1) => {
26882
- var gl;
26882
+ var pl;
26883
26883
  if (!sr) return;
26884
26884
  if (!(n === "pdf" || n === "pdf_slides"))
26885
26885
  return console.log(`\u6587\u4EF6\u7C7B\u578B ${n} \u4E0D\u662FPDF\uFF0C\u8DF3\u8FC7PDF\u52A0\u8F7D\u903B\u8F91`), null;
@@ -26895,14 +26895,16 @@ const {
26895
26895
  });
26896
26896
  if (Ug.error)
26897
26897
  throw new Error(Ug.error);
26898
- if (Ug.type !== "pdf" || !((gl = Ug.content) != null && gl.document))
26898
+ if (Ug.type !== "pdf" || !((pl = Ug.content) != null && pl.document))
26899
26899
  throw new Error("\u89E3\u6790\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u7684PDF\u6587\u6863");
26900
26900
  const Tg = Ug.content.document;
26901
26901
  console.log("\u8BBE\u7F6EPDF\u6587\u6863:", Tg), console.log("PDF\u6587\u6863\u7C7B\u578B:", typeof Tg), console.log("PDF\u6587\u6863\u65B9\u6CD5:", Tg ? Object.getOwnPropertyNames(Object.getPrototypeOf(Tg)) : "\u65E0\u6587\u6863"), console.log("PDF\u6587\u6863\u9875\u6570:", Tg ? Tg.numPages : "\u65E0\u9875\u6570"), console.log("\u5F53\u524D\u8BF7\u6C42\u7684\u9875\u9762:", sr), console.log("PDF\u6587\u6863\u5305\u542B\u7684\u9875\u9762\u8303\u56F4:", Tg ? `1-${Tg.numPages}` : "\u65E0\u9875\u6570"), Br(Tg);
26902
26902
  const t0 = un(sr, o);
26903
- if (me.current[t0] && (me.current[t0].pdfDocument = Tg, console.log(`\u7F13\u5B58PDF\u6587\u6863\u5230chunk: ${t0}`)), Tg && Tg.numPages) {
26903
+ if (me.current[t0] && (me.current[t0].pdfDocument = Tg, console.log(`\u7F13\u5B58PDF\u6587\u6863\u5230chunk: ${t0}`)), s)
26904
+ console.log(`\u4F7F\u7528\u7528\u6237\u4F20\u5165\u7684\u603B\u9875\u6570: ${s}`), Lt(s);
26905
+ else if (Tg && Tg.numPages) {
26904
26906
  const Yg = Tg.numPages;
26905
- console.log(`\u4ECEPDF\u6587\u6863\u83B7\u53D6\u5B9E\u9645\u603B\u9875\u6570: ${Yg}`), Lt(Yg);
26907
+ console.log(`\u7528\u6237\u672A\u4F20\u5165\u603B\u9875\u6570\uFF0C\u4ECEPDF\u6587\u6863\u83B7\u53D6\u5B9E\u9645\u603B\u9875\u6570: ${Yg}`), Lt(Yg);
26906
26908
  }
26907
26909
  return de(!1), nt(""), console.log(`\u9875\u9762 ${sr} \u52A0\u8F7D\u5B8C\u6210`), Tg;
26908
26910
  } catch (xl) {
@@ -26911,10 +26913,10 @@ const {
26911
26913
  }, [Oi, t, h, mt, Fr, un, o, n]), Ri = useCallback((sr) => {
26912
26914
  if (!(n === "pdf" || n === "pdf_slides"))
26913
26915
  return !1;
26914
- const gl = Gn.current[sr];
26915
- if (gl && Date.now() - gl.timestamp < CACHE_EXPIRY_TIME)
26916
- return !!gl.pdfDocument;
26917
- const Cl = un(sr, o), xl = me.current[Cl];
26916
+ const pl = Gn.current[sr];
26917
+ if (pl && Date.now() - pl.timestamp < CACHE_EXPIRY_TIME)
26918
+ return !!pl.pdfDocument;
26919
+ const vl = un(sr, o), xl = me.current[vl];
26918
26920
  return xl && Date.now() - xl.timestamp < CACHE_EXPIRY_TIME ? xl.pages.includes(sr) && !!xl.pdfDocument : !1;
26919
26921
  }, [o, un, n]), ji = useCallback(() => {
26920
26922
  console.log("\u68C0\u67E5markdown\u5185\u5BB9\u662F\u5426\u5728\u7F13\u5B58\u4E2D");
@@ -26928,17 +26930,17 @@ const {
26928
26930
  "Content-Type": "application/json"
26929
26931
  };
26930
26932
  h && (ki.Authorization = h);
26931
- const gl = {
26933
+ const pl = {
26932
26934
  convertedFilePath: e
26933
26935
  // 不传pageNo和pageSize,获取完整文章
26934
26936
  };
26935
- console.log("\u53D1\u9001markdown\u8BF7\u6C42:", gl);
26936
- const Cl = await axios.post(c, gl, {
26937
+ console.log("\u53D1\u9001markdown\u8BF7\u6C42:", pl);
26938
+ const vl = await axios.post(c, pl, {
26937
26939
  headers: ki,
26938
26940
  responseType: "text"
26939
26941
  // markdown返回文本
26940
26942
  });
26941
- return console.log("markdown\u54CD\u5E94\u72B6\u6001:", Cl.status), console.log("markdown\u54CD\u5E94\u6570\u636E\u957F\u5EA6:", ((sr = Cl.data) == null ? void 0 : sr.length) || 0), Cl.data;
26943
+ return console.log("markdown\u54CD\u5E94\u72B6\u6001:", vl.status), console.log("markdown\u54CD\u5E94\u6570\u636E\u957F\u5EA6:", ((sr = vl.data) == null ? void 0 : sr.length) || 0), vl.data;
26942
26944
  } catch (ki) {
26943
26945
  throw console.error("\u83B7\u53D6markdown\u6570\u636E\u5931\u8D25:", ki), new Error(`\u83B7\u53D6markdown\u6570\u636E\u5931\u8D25: ${ki.message}`);
26944
26946
  }
@@ -27001,20 +27003,20 @@ const {
27001
27003
  "Content-Type": "application/json"
27002
27004
  };
27003
27005
  h && (ki.Authorization = h);
27004
- const gl = {
27006
+ const pl = {
27005
27007
  convertedFilePath: e
27006
27008
  // 非PDF文件类型不传pageNo和pageSize,获取完整文件内容
27007
27009
  };
27008
- console.log("\u53D1\u9001\u901A\u7528\u6587\u4EF6\u8BF7\u6C42:", gl);
27009
- const Cl = await axios.post(
27010
+ console.log("\u53D1\u9001\u901A\u7528\u6587\u4EF6\u8BF7\u6C42:", pl);
27011
+ const vl = await axios.post(
27010
27012
  c,
27011
- gl,
27013
+ pl,
27012
27014
  {
27013
27015
  headers: ki,
27014
27016
  responseType: "arraybuffer"
27015
27017
  }
27016
27018
  );
27017
- return console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u72B6\u6001:", Cl.status), console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u6570\u636E\u957F\u5EA6:", ((sr = Cl.data) == null ? void 0 : sr.byteLength) || 0), Cl.data;
27019
+ return console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u72B6\u6001:", vl.status), console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u6570\u636E\u957F\u5EA6:", ((sr = vl.data) == null ? void 0 : sr.byteLength) || 0), vl.data;
27018
27020
  } catch (ki) {
27019
27021
  throw console.error("\u83B7\u53D6\u901A\u7528\u6587\u4EF6\u6570\u636E\u5931\u8D25:", ki), new Error(`\u83B7\u53D6\u901A\u7528\u6587\u4EF6\u6570\u636E\u5931\u8D25: ${ki.message}`);
27020
27022
  }
@@ -27030,25 +27032,25 @@ const {
27030
27032
  }
27031
27033
  const sr = `${n}_${e}`, ki = ot[sr];
27032
27034
  if (console.log(`\u68C0\u67E5\u901A\u7528\u6587\u6863\u7F13\u5B58\uFF0Ckey: ${sr}, \u7F13\u5B58\u5B58\u5728: ${!!ki}, \u7F13\u5B58\u65F6\u95F4: ${ki ? Date.now() - ki.timestamp : "N/A"}ms`), ki && Date.now() - ki.timestamp < CACHE_EXPIRY_TIME)
27033
- return console.log(`\u4F7F\u7528\u7F13\u5B58\u7684\u901A\u7528\u6587\u6863\u5185\u5BB9\uFF0C\u6587\u4EF6\u7C7B\u578B: ${n}`), n === "text" && ki.content ? dl(ki.content) : n === "html" && ki.content && Dt(ki.content), p(1), Lt(1), de(!1), nt(""), ki.content;
27035
+ return console.log(`\u4F7F\u7528\u7F13\u5B58\u7684\u901A\u7528\u6587\u6863\u5185\u5BB9\uFF0C\u6587\u4EF6\u7C7B\u578B: ${n}`), n === "text" && ki.content ? dl(ki.content) : n === "html" && ki.content && Dt(ki.content), p(1), Lt(s || 1), de(!1), nt(""), ki.content;
27034
27036
  It.current = !0, de(!0), nt(`\u6B63\u5728\u52A0\u8F7D${n}\u6587\u6863...`), N(null), console.log(`\u5F00\u59CB\u52A0\u8F7D\u901A\u7528\u6587\u6863\uFF0C\u6587\u4EF6\u7C7B\u578B: ${n}`);
27035
- const gl = await Al(), Cl = await parseFile(gl, {
27037
+ const pl = await Al(), vl = await parseFile(pl, {
27036
27038
  fileName: t || `${n}\u6587\u6863`,
27037
27039
  fileType: n,
27038
27040
  // 传递实际的文件类型
27039
27041
  token: h
27040
27042
  });
27041
- if (Cl.error)
27042
- throw new Error(Cl.error);
27043
+ if (vl.error)
27044
+ throw new Error(vl.error);
27043
27045
  let xl = null;
27044
- if (Cl.type === "text" && Cl.content)
27045
- dl(Cl.content), xl = Cl.content;
27046
- else if (Cl.type === "html" && Cl.content)
27047
- Dt(Cl.content), xl = Cl.content;
27048
- else if (Cl.type === "image" && Cl.content)
27049
- ur(Cl.content), xl = Cl.content;
27046
+ if (vl.type === "text" && vl.content)
27047
+ dl(vl.content), xl = vl.content;
27048
+ else if (vl.type === "html" && vl.content)
27049
+ Dt(vl.content), xl = vl.content;
27050
+ else if (vl.type === "image" && vl.content)
27051
+ ur(vl.content), xl = vl.content;
27050
27052
  else {
27051
- const Ug = new TextDecoder("utf-8").decode(gl);
27053
+ const Ug = new TextDecoder("utf-8").decode(pl);
27052
27054
  dl({ type: "text", content: Ug }), xl = { type: "text", content: Ug };
27053
27055
  }
27054
27056
  if (xl) {
@@ -27061,7 +27063,7 @@ const {
27061
27063
  };
27062
27064
  Kn(Ug), console.log(`\u901A\u7528\u6587\u6863\u5185\u5BB9\u5DF2\u7F13\u5B58\uFF0C\u6587\u4EF6\u7C7B\u578B: ${n}, \u7F13\u5B58\u952E: ${Bl}`), console.log("\u5F53\u524D\u7F13\u5B58\u72B6\u6001:", Ug);
27063
27065
  }
27064
- return de(!1), nt(""), It.current = !1, Xn.current = !0, console.log(`\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5B8C\u6210\uFF0C\u6587\u4EF6\u7C7B\u578B: ${n}`), Cl;
27066
+ return de(!1), nt(""), It.current = !1, Xn.current = !0, console.log(`\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5B8C\u6210\uFF0C\u6587\u4EF6\u7C7B\u578B: ${n}`), vl;
27065
27067
  } catch (sr) {
27066
27068
  throw console.error("\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5931\u8D25:", sr), N(sr.message || "\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"), de(!1), nt(""), It.current = !1, Xn.current = !0, sr;
27067
27069
  }
@@ -27077,11 +27079,11 @@ const {
27077
27079
  }
27078
27080
  console.log("PDF\u9875\u9762\u53D8\u5316:", sr, "\u5F53\u524D\u9875:", zt.current), console.log(`\u9875\u9762 ${sr} \u662F\u5426\u5728\u7F13\u5B58\u4E2D:`, Ri(sr)), zt.current = sr, p(sr);
27079
27081
  try {
27080
- await Pi(sr, !1), l("pageChange", { pageNumber: sr, totalPages: mt });
27081
- } catch (gl) {
27082
- console.error("PDF\u9875\u9762\u52A0\u8F7D\u5931\u8D25:", gl);
27083
- const Cl = zt.current;
27084
- p(Cl);
27082
+ await Pi(sr, !1), l("pageChange", { pageNumber: sr, totalPages: s || mt });
27083
+ } catch (pl) {
27084
+ console.error("PDF\u9875\u9762\u52A0\u8F7D\u5931\u8D25:", pl);
27085
+ const vl = zt.current;
27086
+ p(vl);
27085
27087
  }
27086
27088
  }, [Pi, mt, l, Ri, a, n]);
27087
27089
  useEffect(() => {
@@ -27115,21 +27117,21 @@ const {
27115
27117
  console.log(`\u6587\u4EF6\u7C7B\u578B ${n} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);
27116
27118
  return;
27117
27119
  }
27118
- const ki = zt.current + 1;
27119
- mt && ki <= mt && Fl(ki);
27120
+ const ki = zt.current + 1, pl = s || mt;
27121
+ pl && ki <= pl && Fl(ki);
27120
27122
  }, [mt, Fl, n]), i0 = useCallback(() => {
27121
27123
  const sr = Date.now();
27122
27124
  Object.keys(Gn.current).forEach((ki) => {
27123
- const gl = Gn.current[parseInt(ki)];
27124
- sr - gl.timestamp > CACHE_EXPIRY_TIME && (delete Gn.current[parseInt(ki)], console.log(`\u6E05\u7406\u8FC7\u671F\u9875\u9762\u7F13\u5B58: ${ki}`));
27125
+ const pl = Gn.current[parseInt(ki)];
27126
+ sr - pl.timestamp > CACHE_EXPIRY_TIME && (delete Gn.current[parseInt(ki)], console.log(`\u6E05\u7406\u8FC7\u671F\u9875\u9762\u7F13\u5B58: ${ki}`));
27125
27127
  }), Object.keys(me.current).forEach((ki) => {
27126
- const gl = me.current[ki];
27127
- sr - gl.timestamp > CACHE_EXPIRY_TIME && (delete me.current[ki], console.log(`\u6E05\u7406\u8FC7\u671Fchunk\u7F13\u5B58: ${ki}`));
27128
+ const pl = me.current[ki];
27129
+ sr - pl.timestamp > CACHE_EXPIRY_TIME && (delete me.current[ki], console.log(`\u6E05\u7406\u8FC7\u671Fchunk\u7F13\u5B58: ${ki}`));
27128
27130
  }), kt.current && sr - kt.current.timestamp > CACHE_EXPIRY_TIME && (kt.current = null, console.log("\u6E05\u7406\u8FC7\u671Fmarkdown\u5185\u5BB9\u7F13\u5B58")), Kn((ki) => {
27129
- const gl = { ...ki };
27130
- return Object.keys(gl).forEach((Cl) => {
27131
- sr - gl[Cl].timestamp > CACHE_EXPIRY_TIME && (delete gl[Cl], console.log(`\u6E05\u7406\u8FC7\u671F\u901A\u7528\u6587\u4EF6\u7F13\u5B58: ${Cl}`));
27132
- }), gl;
27131
+ const pl = { ...ki };
27132
+ return Object.keys(pl).forEach((vl) => {
27133
+ sr - pl[vl].timestamp > CACHE_EXPIRY_TIME && (delete pl[vl], console.log(`\u6E05\u7406\u8FC7\u671F\u901A\u7528\u6587\u4EF6\u7F13\u5B58: ${vl}`));
27134
+ }), pl;
27133
27135
  });
27134
27136
  }, []), hl = useCallback(() => {
27135
27137
  if (t) return t;
@@ -27149,10 +27151,10 @@ const {
27149
27151
  }, []), useEffect(() => {
27150
27152
  console.log("=== useEffect \u88AB\u89E6\u53D1 ==="), console.log("\u89E6\u53D1\u65F6\u95F4:", (/* @__PURE__ */ new Date()).toISOString()), console.log("\u89E6\u53D1\u539F\u56E0:", { initialPage: r, fileType: n }), (async () => {
27151
27153
  try {
27152
- const ki = n === "pdf" || n === "pdf_slides", gl = ki && r || 1;
27153
- console.log("\u5F00\u59CB\u521D\u59CB\u52A0\u8F7D\uFF0C\u6587\u4EF6\u7C7B\u578B:", n, "\u6709\u6548\u9875\u7801:", gl, "\u662F\u5426PDF:", ki), n === "markdown" || n === "markdown_table" ? (await ml(), p(1), Lt(1), l("pageChange", { pageNumber: 1, totalPages: 1 })) : n === "image" ? (await wl(), p(1), Lt(1), Si(0), l("pageChange", { pageNumber: 1, totalPages: 1 })) : ki ? (await Pi(gl, !0), p(gl), setTimeout(() => {
27154
- l("pageChange", { pageNumber: gl, totalPages: mt });
27155
- }, 0)) : (console.log("=== \u521D\u59CB\u52A0\u8F7D\uFF1A\u4F7F\u7528\u901A\u7528\u52A0\u8F7D\u51FD\u6570\u5904\u7406\u6587\u4EF6\u7C7B\u578B ===", n), await Dl(), p(1), Lt(1), l("pageChange", { pageNumber: 1, totalPages: 1 }));
27154
+ const ki = n === "pdf" || n === "pdf_slides", pl = ki && r || 1;
27155
+ console.log("\u5F00\u59CB\u521D\u59CB\u52A0\u8F7D\uFF0C\u6587\u4EF6\u7C7B\u578B:", n, "\u6709\u6548\u9875\u7801:", pl, "\u662F\u5426PDF:", ki), n === "markdown" || n === "markdown_table" ? (await ml(), p(1), Lt(s || 1), l("pageChange", { pageNumber: 1, totalPages: s || 1 })) : n === "image" ? (await wl(), p(1), Lt(s || 1), Si(0), l("pageChange", { pageNumber: 1, totalPages: s || 1 })) : ki ? (await Pi(pl, !0), p(pl), setTimeout(() => {
27156
+ l("pageChange", { pageNumber: pl, totalPages: s || mt });
27157
+ }, 0)) : (console.log("=== \u521D\u59CB\u52A0\u8F7D\uFF1A\u4F7F\u7528\u901A\u7528\u52A0\u8F7D\u51FD\u6570\u5904\u7406\u6587\u4EF6\u7C7B\u578B ===", n), await Dl(), p(1), Lt(s || 1), l("pageChange", { pageNumber: 1, totalPages: s || 1 }));
27156
27158
  } catch (ki) {
27157
27159
  console.error("\u521D\u59CB\u52A0\u8F7D\u5931\u8D25:", ki);
27158
27160
  }