@sandeepmvn/react-pdf-annotator-v2 1.2.13 → 1.2.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.
@@ -137,12 +137,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
137
137
  ADD_TO_PATH_FLAG: 4
138
138
  };
139
139
  e.TextRenderingMode = y;
140
- const x = {
140
+ const S = {
141
141
  GRAYSCALE_1BPP: 1,
142
142
  RGB_24BPP: 2,
143
143
  RGBA_32BPP: 3
144
144
  };
145
- e.ImageKind = x;
145
+ e.ImageKind = S;
146
146
  const m = {
147
147
  TEXT: 1,
148
148
  LINK: 2,
@@ -212,14 +212,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
212
212
  COMMITONSELCHANGE: 67108864
213
213
  };
214
214
  e.AnnotationFieldFlag = _;
215
- const S = {
215
+ const x = {
216
216
  SOLID: 1,
217
217
  DASHED: 2,
218
218
  BEVELED: 3,
219
219
  INSET: 4,
220
220
  UNDERLINE: 5
221
221
  };
222
- e.AnnotationBorderStyleType = S;
222
+ e.AnnotationBorderStyleType = x;
223
223
  const F = {
224
224
  E: "Mouse Enter",
225
225
  X: "Mouse Exit",
@@ -675,7 +675,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
675
675
  /* 2 */
676
676
  /***/
677
677
  (__unused_webpack_module, exports$1, __w_pdfjs_require__) => {
678
- var t, r, n, a, lt, St, h, d, l, u, p, g, f, v, y, At, m, w, Mt, _, S;
678
+ var t, r, n, a, lt, St, h, d, l, u, p, g, f, v, y, At, m, w, Mt, _, x;
679
679
  Object.defineProperty(exports$1, "__esModule", {
680
680
  value: !0
681
681
  }), exports$1.RenderTask = exports$1.PDFWorkerUtil = exports$1.PDFWorker = exports$1.PDFPageProxy = exports$1.PDFDocumentProxy = exports$1.PDFDocumentLoadingTask = exports$1.PDFDataRangeTransport = exports$1.LoopbackPort = exports$1.DefaultStandardFontDataFactory = exports$1.DefaultFilterFactory = exports$1.DefaultCanvasFactory = exports$1.DefaultCMapReaderFactory = void 0, Object.defineProperty(exports$1, "SVGGraphics", {
@@ -2004,9 +2004,9 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2004
2004
  if (this.cancelled)
2005
2005
  return;
2006
2006
  if (this._canvas) {
2007
- if (b(F, S).has(this._canvas))
2007
+ if (b(F, x).has(this._canvas))
2008
2008
  throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");
2009
- b(F, S).add(this._canvas);
2009
+ b(F, x).add(this._canvas);
2010
2010
  }
2011
2011
  this._pdfBug && (($ = globalThis.StepperManager) != null && $.enabled) && (this.stepper = globalThis.StepperManager.create(this._pageIndex), this.stepper.init(this.operatorList), this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint());
2012
2012
  const {
@@ -2026,7 +2026,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2026
2026
  }
2027
2027
  cancel(D = null, T = 0) {
2028
2028
  var M;
2029
- this.running = !1, this.cancelled = !0, (M = this.gfx) == null || M.endDrawing(), b(F, S).delete(this._canvas), this.callback(D || new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, T));
2029
+ this.running = !1, this.cancelled = !0, (M = this.gfx) == null || M.endDrawing(), b(F, x).delete(this._canvas), this.callback(D || new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, T));
2030
2030
  }
2031
2031
  operatorListChanged() {
2032
2032
  var D;
@@ -2045,10 +2045,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2045
2045
  }) : Promise.resolve().then(this._nextBound).catch(this._cancelBound);
2046
2046
  }
2047
2047
  async _next() {
2048
- 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(), b(F, S).delete(this._canvas), this.callback())));
2048
+ 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(), b(F, x).delete(this._canvas), this.callback())));
2049
2049
  }
2050
2050
  };
2051
- S = new WeakMap(), de(F, S, /* @__PURE__ */ new WeakSet());
2051
+ x = new WeakMap(), de(F, x, /* @__PURE__ */ new WeakSet());
2052
2052
  let InternalRenderTask = F;
2053
2053
  const version = "3.11.174";
2054
2054
  exports$1.version = version;
@@ -2076,30 +2076,30 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2076
2076
  de(this, u, /* @__PURE__ */ new Map());
2077
2077
  this.onSetModified = null, this.onResetModified = null, this.onAnnotationEditor = null;
2078
2078
  }
2079
- getValue(y, x) {
2079
+ getValue(y, S) {
2080
2080
  const m = b(this, u).get(y);
2081
- return m === void 0 ? x : Object.assign(x, m);
2081
+ return m === void 0 ? S : Object.assign(S, m);
2082
2082
  }
2083
2083
  getRawValue(y) {
2084
2084
  return b(this, u).get(y);
2085
2085
  }
2086
2086
  remove(y) {
2087
2087
  if (b(this, u).delete(y), b(this, u).size === 0 && this.resetModified(), typeof this.onAnnotationEditor == "function") {
2088
- for (const x of b(this, u).values())
2089
- if (x instanceof a.AnnotationEditor)
2088
+ for (const S of b(this, u).values())
2089
+ if (S instanceof a.AnnotationEditor)
2090
2090
  return;
2091
2091
  this.onAnnotationEditor(null);
2092
2092
  }
2093
2093
  }
2094
- setValue(y, x) {
2094
+ setValue(y, S) {
2095
2095
  const m = b(this, u).get(y);
2096
2096
  let w = !1;
2097
2097
  if (m !== void 0)
2098
- for (const [k, _] of Object.entries(x))
2098
+ for (const [k, _] of Object.entries(S))
2099
2099
  m[k] !== _ && (w = !0, m[k] = _);
2100
2100
  else
2101
- w = !0, b(this, u).set(y, x);
2102
- w && te(this, p, yr).call(this), x instanceof a.AnnotationEditor && typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(x.constructor._type);
2101
+ w = !0, b(this, u).set(y, S);
2102
+ w && te(this, p, yr).call(this), S instanceof a.AnnotationEditor && typeof this.onAnnotationEditor == "function" && this.onAnnotationEditor(S.constructor._type);
2103
2103
  }
2104
2104
  has(y) {
2105
2105
  return b(this, u).has(y);
@@ -2108,8 +2108,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2108
2108
  return b(this, u).size > 0 ? (0, n.objectFromMap)(b(this, u)) : null;
2109
2109
  }
2110
2110
  setAll(y) {
2111
- for (const [x, m] of Object.entries(y))
2112
- this.setValue(x, m);
2111
+ for (const [S, m] of Object.entries(y))
2112
+ this.setValue(S, m);
2113
2113
  }
2114
2114
  get size() {
2115
2115
  return b(this, u).size;
@@ -2123,18 +2123,18 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2123
2123
  get serializable() {
2124
2124
  if (b(this, u).size === 0)
2125
2125
  return o;
2126
- const y = /* @__PURE__ */ new Map(), x = new s.MurmurHash3_64(), m = [], w = /* @__PURE__ */ Object.create(null);
2126
+ const y = /* @__PURE__ */ new Map(), S = new s.MurmurHash3_64(), m = [], w = /* @__PURE__ */ Object.create(null);
2127
2127
  let k = !1;
2128
- for (const [_, S] of b(this, u)) {
2129
- const F = S instanceof a.AnnotationEditor ? S.serialize(!1, w) : S;
2130
- F && (y.set(_, F), x.update(`${_}:${JSON.stringify(F)}`), k || (k = !!F.bitmap));
2128
+ for (const [_, x] of b(this, u)) {
2129
+ const F = x instanceof a.AnnotationEditor ? x.serialize(!1, w) : x;
2130
+ F && (y.set(_, F), S.update(`${_}:${JSON.stringify(F)}`), k || (k = !!F.bitmap));
2131
2131
  }
2132
2132
  if (k)
2133
2133
  for (const _ of y.values())
2134
2134
  _.bitmap && m.push(_.bitmap);
2135
2135
  return y.size > 0 ? {
2136
2136
  map: y,
2137
- hash: x.hexdigest(),
2137
+ hash: S.hexdigest(),
2138
2138
  transfers: m
2139
2139
  } : o;
2140
2140
  }
@@ -2143,14 +2143,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2143
2143
  b(this, l) || (ue(this, l, !0), typeof this.onSetModified == "function" && this.onSetModified());
2144
2144
  }, e.AnnotationStorage = h;
2145
2145
  class d extends h {
2146
- constructor(x) {
2146
+ constructor(S) {
2147
2147
  super();
2148
2148
  de(this, f);
2149
2149
  const {
2150
2150
  map: m,
2151
2151
  hash: w,
2152
2152
  transfers: k
2153
- } = x.serializable, _ = structuredClone(m, k ? {
2153
+ } = S.serializable, _ = structuredClone(m, k ? {
2154
2154
  transfer: k
2155
2155
  } : null);
2156
2156
  ue(this, f, {
@@ -2171,7 +2171,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2171
2171
  /* 4 */
2172
2172
  /***/
2173
2173
  (t, e, r) => {
2174
- var d, l, u, p, g, f, v, y, x, m, w, k, _, S, F, Lt, Bt, T, Ut, jt, br, xr, Sr, zt, Ar;
2174
+ var d, l, u, p, g, f, v, y, S, m, w, k, _, x, F, Lt, Bt, T, Ut, jt, br, xr, Sr, zt, Ar;
2175
2175
  Object.defineProperty(e, "__esModule", {
2176
2176
  value: !0
2177
2177
  }), e.AnnotationEditor = void 0;
@@ -2187,7 +2187,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2187
2187
  de(this, f, !1);
2188
2188
  de(this, v, null);
2189
2189
  de(this, y, this.focusin.bind(this));
2190
- de(this, x, this.focusout.bind(this));
2190
+ de(this, S, this.focusout.bind(this));
2191
2191
  de(this, m, !1);
2192
2192
  de(this, w, !1);
2193
2193
  de(this, k, !1);
@@ -2196,7 +2196,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2196
2196
  $e(this, "_focusEventsAllowed", !0);
2197
2197
  $e(this, "_l10nPromise", null);
2198
2198
  de(this, _, !1);
2199
- de(this, S, Y._zIndex++);
2199
+ de(this, x, Y._zIndex++);
2200
2200
  this.constructor === Y && (0, a.unreachable)("Cannot initialize AnnotationEditor."), this.parent = B.parent, this.id = B.id, this.width = this.height = null, this.pageIndex = B.parent.pageIndex, this.name = B.name, this.div = null, this._uiManager = B.uiManager, this.annotationElementId = null, this._willKeepAspectRatio = !1, this._initialOptions.isCentered = B.isCentered, this._structTreeParentId = null;
2201
2201
  const {
2202
2202
  rotation: V,
@@ -2283,7 +2283,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2283
2283
  this.div.style.zIndex = 0;
2284
2284
  }
2285
2285
  setInForeground() {
2286
- this.div.style.zIndex = b(this, S);
2286
+ this.div.style.zIndex = b(this, x);
2287
2287
  }
2288
2288
  setParent(B) {
2289
2289
  B !== null && (this.pageIndex = B.pageIndex, this.pageDimensions = B.pageDimensions), this.parent = B;
@@ -2438,7 +2438,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2438
2438
  b(this, d) === B && b(this, l) === V || (ue(this, d, B), ue(this, l, V), te(this, F, zt).call(this));
2439
2439
  }
2440
2440
  render() {
2441
- this.div = document.createElement("div"), this.div.setAttribute("data-editor-rotation", (360 - this.rotation) % 360), this.div.className = this.name, this.div.setAttribute("id", this.id), this.div.setAttribute("tabIndex", 0), this.setInForeground(), this.div.addEventListener("focusin", b(this, y)), this.div.addEventListener("focusout", b(this, x));
2441
+ this.div = document.createElement("div"), this.div.setAttribute("data-editor-rotation", (360 - this.rotation) % 360), this.div.className = this.name, this.div.setAttribute("id", this.id), this.div.setAttribute("tabIndex", 0), this.setInForeground(), this.div.addEventListener("focusin", b(this, y)), this.div.addEventListener("focusout", b(this, S));
2442
2442
  const [B, V] = this.parentDimensions;
2443
2443
  this.parentRotation % 180 !== 0 && (this.div.style.maxWidth = `${(100 * V / B).toFixed(2)}%`, this.div.style.maxHeight = `${(100 * B / V).toFixed(2)}%`);
2444
2444
  const [Q, I] = this.getInitialTranslation();
@@ -2513,7 +2513,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2513
2513
  }
2514
2514
  rebuild() {
2515
2515
  var B, V;
2516
- (B = this.div) == null || B.addEventListener("focusin", b(this, y)), (V = this.div) == null || V.addEventListener("focusout", b(this, x));
2516
+ (B = this.div) == null || B.addEventListener("focusin", b(this, y)), (V = this.div) == null || V.addEventListener("focusout", b(this, S));
2517
2517
  }
2518
2518
  serialize(B = !1, V = null) {
2519
2519
  (0, a.unreachable)("An editor must be serializable");
@@ -2530,7 +2530,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2530
2530
  }
2531
2531
  remove() {
2532
2532
  var B;
2533
- this.div.removeEventListener("focusin", b(this, y)), this.div.removeEventListener("focusout", b(this, x)), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), (B = b(this, u)) == null || B.remove(), ue(this, u, null), ue(this, p, null);
2533
+ this.div.removeEventListener("focusin", b(this, y)), this.div.removeEventListener("focusout", b(this, S)), this.isEmpty() || this.commit(), this.parent ? this.parent.remove(this) : this._uiManager.removeEditor(this), (B = b(this, u)) == null || B.remove(), ue(this, u, null), ue(this, p, null);
2534
2534
  }
2535
2535
  get isResizable() {
2536
2536
  return !1;
@@ -2576,7 +2576,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2576
2576
  return 16;
2577
2577
  }
2578
2578
  };
2579
- d = new WeakMap(), l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), x = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), S = new WeakMap(), F = new WeakSet(), Lt = function([B, V], Q, I) {
2579
+ d = new WeakMap(), l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), x = new WeakMap(), F = new WeakSet(), Lt = function([B, V], Q, I) {
2580
2580
  [Q, I] = this.screenToPageTranslation(Q, I), this.x += Q / B, this.y += I / V, this.fixAndSetPosition();
2581
2581
  }, Bt = function() {
2582
2582
  const [B, V] = this.parentDimensions, {
@@ -2782,7 +2782,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2782
2782
  /* 5 */
2783
2783
  /***/
2784
2784
  (t, e, r) => {
2785
- var f, v, y, x, m, Ht, _, S, F, A, D, Fr, C, R, O, $, K, J, Y, se, B, V, Q, I, P, E, N, z, G, H, ee, ce, ve, me, xe, Se, Ce, ne, le, L, Z, re, he, ye, Fe, Pe, ie, Cr, Gt, Wt, Ft, Vt, qt, rt, pt, Pr, wr, Xt, gt, Kt;
2785
+ var f, v, y, S, m, Ht, _, x, F, A, D, Fr, C, R, O, $, K, J, Y, se, B, V, Q, I, P, E, N, z, G, H, ee, ce, ve, me, xe, Se, Ce, ne, le, L, Z, re, he, ye, Fe, Pe, ie, Cr, Gt, Wt, Ft, Vt, qt, rt, pt, Pr, wr, Xt, gt, Kt;
2786
2786
  Object.defineProperty(e, "__esModule", {
2787
2787
  value: !0
2788
2788
  }), e.KeyboardManager = e.CommandManager = e.ColorManager = e.AnnotationEditorUIManager = void 0, e.bindEvents = s, e.opacityToHex = o;
@@ -2808,7 +2808,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2808
2808
  de(this, m);
2809
2809
  de(this, v, (0, n.getUuid)());
2810
2810
  de(this, y, 0);
2811
- de(this, x, null);
2811
+ de(this, S, null);
2812
2812
  }
2813
2813
  static get _isSVGFittingCanvas() {
2814
2814
  const X = 'data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>', Re = new OffscreenCanvas(1, 3).getContext("2d"), Be = new Image();
@@ -2829,26 +2829,26 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2829
2829
  return te(this, m, Ht).call(this, X, X);
2830
2830
  }
2831
2831
  async getFromId(X) {
2832
- b(this, x) || ue(this, x, /* @__PURE__ */ new Map());
2833
- const ge = b(this, x).get(X);
2832
+ b(this, S) || ue(this, S, /* @__PURE__ */ new Map());
2833
+ const ge = b(this, S).get(X);
2834
2834
  return ge ? ge.bitmap ? (ge.refCounter += 1, ge) : ge.file ? this.getFromFile(ge.file) : this.getFromUrl(ge.url) : null;
2835
2835
  }
2836
2836
  getSvgUrl(X) {
2837
- const ge = b(this, x).get(X);
2837
+ const ge = b(this, S).get(X);
2838
2838
  return ge != null && ge.isSvg ? ge.svgUrl : null;
2839
2839
  }
2840
2840
  deleteId(X) {
2841
- b(this, x) || ue(this, x, /* @__PURE__ */ new Map());
2842
- const ge = b(this, x).get(X);
2841
+ b(this, S) || ue(this, S, /* @__PURE__ */ new Map());
2842
+ const ge = b(this, S).get(X);
2843
2843
  ge && (ge.refCounter -= 1, ge.refCounter === 0 && (ge.bitmap = null));
2844
2844
  }
2845
2845
  isValidId(X) {
2846
2846
  return X.startsWith(`image_${b(this, v)}_`);
2847
2847
  }
2848
2848
  };
2849
- v = new WeakMap(), y = new WeakMap(), x = new WeakMap(), m = new WeakSet(), Ht = async function(X, ge) {
2850
- b(this, x) || ue(this, x, /* @__PURE__ */ new Map());
2851
- let Re = b(this, x).get(X);
2849
+ v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), m = new WeakSet(), Ht = async function(X, ge) {
2850
+ b(this, S) || ue(this, S, /* @__PURE__ */ new Map());
2851
+ let Re = b(this, S).get(X);
2852
2852
  if (Re === null)
2853
2853
  return null;
2854
2854
  if (Re != null && Re.bitmap)
@@ -2885,13 +2885,13 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2885
2885
  } catch (Be) {
2886
2886
  console.error(Be), Re = null;
2887
2887
  }
2888
- return b(this, x).set(X, Re), Re && b(this, x).set(Re.id, Re), Re;
2888
+ return b(this, S).set(X, Re), Re && b(this, S).set(Re.id, Re), Re;
2889
2889
  };
2890
2890
  let d = k;
2891
2891
  class l {
2892
2892
  constructor(X = 128) {
2893
2893
  de(this, _, []);
2894
- de(this, S, !1);
2894
+ de(this, x, !1);
2895
2895
  de(this, F);
2896
2896
  de(this, A, -1);
2897
2897
  ue(this, F, X);
@@ -2904,7 +2904,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2904
2904
  overwriteIfSameType: He = !1,
2905
2905
  keepUndo: Ie = !1
2906
2906
  }) {
2907
- if (Re && X(), b(this, S))
2907
+ if (Re && X(), b(this, x))
2908
2908
  return;
2909
2909
  const j = {
2910
2910
  cmd: X,
@@ -2923,10 +2923,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2923
2923
  U === b(this, F) ? b(this, _).splice(0, 1) : (ue(this, A, U), U < b(this, _).length && b(this, _).splice(U)), b(this, _).push(j);
2924
2924
  }
2925
2925
  undo() {
2926
- b(this, A) !== -1 && (ue(this, S, !0), b(this, _)[b(this, A)].undo(), ue(this, S, !1), ue(this, A, b(this, A) - 1));
2926
+ b(this, A) !== -1 && (ue(this, x, !0), b(this, _)[b(this, A)].undo(), ue(this, x, !1), ue(this, A, b(this, A) - 1));
2927
2927
  }
2928
2928
  redo() {
2929
- b(this, A) < b(this, _).length - 1 && (ue(this, A, b(this, A) + 1), ue(this, S, !0), b(this, _)[b(this, A)].cmd(), ue(this, S, !1));
2929
+ b(this, A) < b(this, _).length - 1 && (ue(this, A, b(this, A) + 1), ue(this, x, !0), b(this, _)[b(this, A)].cmd(), ue(this, x, !1));
2930
2930
  }
2931
2931
  hasSomethingToUndo() {
2932
2932
  return b(this, A) !== -1;
@@ -2938,7 +2938,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
2938
2938
  ue(this, _, null);
2939
2939
  }
2940
2940
  }
2941
- _ = new WeakMap(), S = new WeakMap(), F = new WeakMap(), A = new WeakMap(), e.CommandManager = l;
2941
+ _ = new WeakMap(), x = new WeakMap(), F = new WeakMap(), A = new WeakMap(), e.CommandManager = l;
2942
2942
  class u {
2943
2943
  constructor(X) {
2944
2944
  de(this, D);
@@ -3606,7 +3606,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
3606
3606
  var Y, se, B, V, Q, I, P, E, N, z, G, H, ct, ht, Zt, Ct, Pt, vt, mt;
3607
3607
  Object.defineProperty(e, "__esModule", {
3608
3608
  value: !0
3609
- }), e.StatTimer = e.RenderingCancelledException = e.PixelsPerInch = e.PageViewport = e.PDFDateString = e.DOMStandardFontDataFactory = e.DOMSVGFactory = e.DOMFilterFactory = e.DOMCanvasFactory = e.DOMCMapReaderFactory = void 0, e.deprecated = A, e.getColorValues = R, e.getCurrentTransform = O, e.getCurrentTransformInverse = $, e.getFilenameFromUrl = m, e.getPdfFilenameFromUrl = w, e.getRGB = C, e.getXfaPageViewport = M, e.isDataScheme = y, e.isPdfFile = x, e.isValidFetchUrl = _, e.loadScript = F, e.noContextMenu = S, e.setLayerDimensions = K;
3609
+ }), e.StatTimer = e.RenderingCancelledException = e.PixelsPerInch = e.PageViewport = e.PDFDateString = e.DOMStandardFontDataFactory = e.DOMSVGFactory = e.DOMFilterFactory = e.DOMCanvasFactory = e.DOMCMapReaderFactory = void 0, e.deprecated = A, e.getColorValues = R, e.getCurrentTransform = O, e.getCurrentTransformInverse = $, e.getFilenameFromUrl = m, e.getPdfFilenameFromUrl = w, e.getRGB = C, e.getXfaPageViewport = M, e.isDataScheme = y, e.isPdfFile = S, e.isValidFetchUrl = _, e.loadScript = F, e.noContextMenu = x, e.setLayerDimensions = K;
3610
3610
  var n = r(7), a = r(1);
3611
3611
  const s = "http://www.w3.org/2000/svg", J = class J {
3612
3612
  };
@@ -3881,7 +3881,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
3881
3881
  L++;
3882
3882
  return ne.substring(L, L + 5).toLowerCase() === "data:";
3883
3883
  }
3884
- function x(ne) {
3884
+ function S(ne) {
3885
3885
  return typeof ne == "string" && /\.pdf$/i.test(ne);
3886
3886
  }
3887
3887
  function m(ne, le = !1) {
@@ -3944,7 +3944,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
3944
3944
  return !1;
3945
3945
  }
3946
3946
  }
3947
- function S(ne) {
3947
+ function x(ne) {
3948
3948
  ne.preventDefault();
3949
3949
  }
3950
3950
  function F(ne, le = !1) {
@@ -4201,17 +4201,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4201
4201
  else
4202
4202
  throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");
4203
4203
  const g = p >> 2, f = p - g * 4, v = new Uint32Array(u.buffer, 0, g);
4204
- let y = 0, x = 0, m = this.h1, w = this.h2;
4205
- const k = 3432918353, _ = 461845907, S = k & o, F = _ & o;
4204
+ let y = 0, S = 0, m = this.h1, w = this.h2;
4205
+ const k = 3432918353, _ = 461845907, x = k & o, F = _ & o;
4206
4206
  for (let A = 0; A < g; A++)
4207
- A & 1 ? (y = v[A], y = y * k & s | y * S & o, y = y << 15 | y >>> 17, y = y * _ & s | y * F & o, m ^= y, m = m << 13 | m >>> 19, m = m * 5 + 3864292196) : (x = v[A], x = x * k & s | x * S & o, x = x << 15 | x >>> 17, x = x * _ & s | x * F & o, w ^= x, w = w << 13 | w >>> 19, w = w * 5 + 3864292196);
4207
+ A & 1 ? (y = v[A], y = y * k & s | y * x & o, y = y << 15 | y >>> 17, y = y * _ & s | y * F & o, m ^= y, m = m << 13 | m >>> 19, m = m * 5 + 3864292196) : (S = v[A], S = S * k & s | S * x & o, S = S << 15 | S >>> 17, S = S * _ & s | S * F & o, w ^= S, w = w << 13 | w >>> 19, w = w * 5 + 3864292196);
4208
4208
  switch (y = 0, f) {
4209
4209
  case 3:
4210
4210
  y ^= u[g * 4 + 2] << 16;
4211
4211
  case 2:
4212
4212
  y ^= u[g * 4 + 1] << 8;
4213
4213
  case 1:
4214
- y ^= u[g * 4], y = y * k & s | y * S & o, y = y << 15 | y >>> 17, y = y * _ & s | y * F & o, g & 1 ? m ^= y : w ^= y;
4214
+ y ^= u[g * 4], y = y * k & s | y * x & o, y = y << 15 | y >>> 17, y = y * _ & s | y * F & o, g & 1 ? m ^= y : w ^= y;
4215
4215
  }
4216
4216
  this.h1 = m, this.h2 = w;
4217
4217
  }
@@ -4343,9 +4343,9 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4343
4343
  const v = this._document.createElement("canvas");
4344
4344
  v.width = 1, v.height = 1;
4345
4345
  const y = v.getContext("2d");
4346
- let x = 0;
4346
+ let S = 0;
4347
4347
  function m(C, R) {
4348
- if (++x > 30) {
4348
+ if (++S > 30) {
4349
4349
  (0, n.warn)("Load test font never loaded."), R();
4350
4350
  return;
4351
4351
  }
@@ -4358,11 +4358,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4358
4358
  const w = `lt${Date.now()}${this.loadTestFontId++}`;
4359
4359
  let k = this._loadTestFont;
4360
4360
  k = p(k, 976, w.length, w);
4361
- const S = 16, F = 1482184792;
4362
- let A = u(k, S);
4361
+ const x = 16, F = 1482184792;
4362
+ let A = u(k, x);
4363
4363
  for (g = 0, f = w.length - 3; g < f; g += 4)
4364
4364
  A = A - F + u(w, g) | 0;
4365
- g < w.length && (A = A - F + u(w + "XXX", g) | 0), k = p(k, S, 4, (0, n.string32)(A));
4365
+ g < w.length && (A = A - F + u(w + "XXX", g) | 0), k = p(k, x, 4, (0, n.string32)(A));
4366
4366
  const D = `url(data:font/opentype;base64,${btoa(k)});`, T = `@font-face {font-family:"${w}";src:${D}}`;
4367
4367
  this.insertRule(T);
4368
4368
  const M = this._document.createElement("div");
@@ -4555,7 +4555,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4555
4555
  }
4556
4556
  }
4557
4557
  }
4558
- function x(I, P, E, N, z, G, H, ee, ce, ve) {
4558
+ function S(I, P, E, N, z, G, H, ee, ce, ve) {
4559
4559
  const [me, xe, Se, Ce, ne, le] = (0, a.getCurrentTransform)(I);
4560
4560
  if (xe === 0 && Se === 0) {
4561
4561
  const re = H * me + ne, he = Math.round(re), ye = ee * Ce + le, Fe = Math.round(ye), Pe = (H + ce) * me + ne, ie = Math.abs(Math.round(Pe) - he) || 1, _e = (ee + ve) * Ce + le, Te = Math.abs(Math.round(_e) - Fe) || 1;
@@ -4738,7 +4738,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4738
4738
  })), I.putImageData(ee, 0, xe * f);
4739
4739
  }
4740
4740
  }
4741
- function S(I, P) {
4741
+ function x(I, P) {
4742
4742
  const E = ["strokeStyle", "fillStyle", "fillRule", "globalAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "globalCompositeOperation", "font", "filter"];
4743
4743
  for (const N of E)
4744
4744
  I[N] !== void 0 && (P[N] = I[N]);
@@ -4895,7 +4895,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4895
4895
  let Se = n.Util.transform(ee, [1 / N, 0, 0, -1 / z, 0, 0]);
4896
4896
  Se = n.Util.transform(Se, [1, 0, 0, 1, 0, -z]);
4897
4897
  const Ce = n.Util.applyTransform([0, 0], Se), ne = n.Util.applyTransform([N, z], Se), le = n.Util.normalizeRect([Ce[0], Ce[1], ne[0], ne[1]]), L = Math.round(le[2] - le[0]) || 1, Z = Math.round(le[3] - le[1]) || 1, re = this.cachedCanvases.getCanvas("fillCanvas", L, Z), he = re.context, ye = Math.min(Ce[0], ne[0]), Fe = Math.min(Ce[1], ne[1]);
4898
- he.translate(-ye, -Fe), he.transform(...Se), me || (me = this._scaleImage(xe.canvas, (0, a.getCurrentTransformInverse)(he)), me = me.img, ce && H && ce.set(ve, me)), he.imageSmoothingEnabled = R((0, a.getCurrentTransform)(he), P.interpolate), x(he, me, 0, 0, me.width, me.height, 0, 0, N, z), he.globalCompositeOperation = "source-in";
4898
+ he.translate(-ye, -Fe), he.transform(...Se), me || (me = this._scaleImage(xe.canvas, (0, a.getCurrentTransformInverse)(he)), me = me.img, ce && H && ce.set(ve, me)), he.imageSmoothingEnabled = R((0, a.getCurrentTransform)(he), P.interpolate), S(he, me, 0, 0, me.width, me.height, 0, 0, N, z), he.globalCompositeOperation = "source-in";
4899
4899
  const Pe = n.Util.transform((0, a.getCurrentTransformInverse)(he), [1, 0, 0, 1, -ye, -Fe]);
4900
4900
  return he.fillStyle = H ? G.getPattern(E, this, Pe, s.PathType.FILL) : G, he.fillRect(0, 0, N, z), ce && !H && (this.cachedCanvases.delete("fillCanvas"), ce.set(ve, re.canvas)), {
4901
4901
  canvas: re.canvas,
@@ -4980,12 +4980,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4980
4980
  const P = this.ctx.canvas.width, E = this.ctx.canvas.height, N = "smaskGroupAt" + this.groupLevel, z = this.cachedCanvases.getCanvas(N, P, E);
4981
4981
  this.suspendedCtx = this.ctx, this.ctx = z.context;
4982
4982
  const G = this.ctx;
4983
- G.setTransform(...(0, a.getCurrentTransform)(this.suspendedCtx)), S(this.suspendedCtx, G), v(G, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
4983
+ G.setTransform(...(0, a.getCurrentTransform)(this.suspendedCtx)), x(this.suspendedCtx, G), v(G, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
4984
4984
  }
4985
4985
  endSMaskMode() {
4986
4986
  if (!this.inSMaskMode)
4987
4987
  throw new Error("endSMaskMode called while not in smask mode");
4988
- this.ctx._removeMirroring(), S(this.ctx, this.suspendedCtx), this.ctx = this.suspendedCtx, this.suspendedCtx = null;
4988
+ this.ctx._removeMirroring(), x(this.ctx, this.suspendedCtx), this.ctx = this.suspendedCtx, this.suspendedCtx = null;
4989
4989
  }
4990
4990
  compose(P) {
4991
4991
  if (!this.current.activeSMask)
@@ -4995,12 +4995,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
4995
4995
  C(N, E, this.ctx, P), this.ctx.save(), this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height), this.ctx.restore();
4996
4996
  }
4997
4997
  save() {
4998
- this.inSMaskMode ? (S(this.ctx, this.suspendedCtx), this.suspendedCtx.save()) : this.ctx.save();
4998
+ this.inSMaskMode ? (x(this.ctx, this.suspendedCtx), this.suspendedCtx.save()) : this.ctx.save();
4999
4999
  const P = this.current;
5000
5000
  this.stateStack.push(P), this.current = P.clone();
5001
5001
  }
5002
5002
  restore() {
5003
- this.stateStack.length === 0 && this.inSMaskMode && this.endSMaskMode(), this.stateStack.length !== 0 && (this.current = this.stateStack.pop(), this.inSMaskMode ? (this.suspendedCtx.restore(), S(this.suspendedCtx, this.ctx)) : this.ctx.restore(), this.checkSMaskState(), this.pendingClip = null, this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null);
5003
+ this.stateStack.length === 0 && this.inSMaskMode && this.endSMaskMode(), this.stateStack.length !== 0 && (this.current = this.stateStack.pop(), this.inSMaskMode ? (this.suspendedCtx.restore(), x(this.suspendedCtx, this.ctx)) : this.ctx.restore(), this.checkSMaskState(), this.pendingClip = null, this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null);
5004
5004
  }
5005
5005
  transform(P, E, N, z, G, H) {
5006
5006
  this.ctx.transform(P, E, N, z, G, H), this._cachedScaleForStroking[0] = -1, this._cachedGetSinglePixelWidth = null;
@@ -5344,7 +5344,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5344
5344
  backdrop: P.smask.backdrop,
5345
5345
  transferMap: P.smask.transferMap || null,
5346
5346
  startTransformInverse: null
5347
- }) : (E.setTransform(1, 0, 0, 1, 0, 0), E.translate(H, ee), E.scale(me, xe), E.save()), S(E, ne), this.ctx = ne, this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]), this.groupStack.push(E), this.groupLevel++;
5347
+ }) : (E.setTransform(1, 0, 0, 1, 0, 0), E.translate(H, ee), E.scale(me, xe), E.save()), x(E, ne), this.ctx = ne, this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]), this.groupStack.push(E), this.groupLevel++;
5348
5348
  }
5349
5349
  endGroup(P) {
5350
5350
  if (!this.contentVisible)
@@ -5425,7 +5425,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5425
5425
  } = G, me = this.cachedCanvases.getCanvas("maskCanvas", ee, ce), xe = me.context;
5426
5426
  xe.save();
5427
5427
  const Se = this.getObject(H, G);
5428
- _(xe, Se), xe.globalCompositeOperation = "source-in", xe.fillStyle = z ? N.getPattern(xe, this, (0, a.getCurrentTransformInverse)(E), s.PathType.FILL) : N, xe.fillRect(0, 0, ee, ce), xe.restore(), E.save(), E.transform(...ve), E.scale(1, -1), x(E, me.canvas, 0, 0, ee, ce, 0, -1, 1, 1), E.restore();
5428
+ _(xe, Se), xe.globalCompositeOperation = "source-in", xe.fillStyle = z ? N.getPattern(xe, this, (0, a.getCurrentTransformInverse)(E), s.PathType.FILL) : N, xe.fillRect(0, 0, ee, ce), xe.restore(), E.save(), E.transform(...ve), E.scale(1, -1), S(E, me.canvas, 0, 0, ee, ce, 0, -1, 1, 1), E.restore();
5429
5429
  }
5430
5430
  this.compose();
5431
5431
  }
@@ -5492,7 +5492,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5492
5492
  k(ce, P), G = this.applyTransferMapsToCanvas(ce);
5493
5493
  }
5494
5494
  const H = this._scaleImage(G, (0, a.getCurrentTransformInverse)(z));
5495
- z.imageSmoothingEnabled = R((0, a.getCurrentTransform)(z), P.interpolate), x(z, H.img, 0, 0, H.paintWidth, H.paintHeight, 0, -N, E, N), this.compose(), this.restore();
5495
+ z.imageSmoothingEnabled = R((0, a.getCurrentTransform)(z), P.interpolate), S(z, H.img, 0, 0, H.paintWidth, H.paintHeight, 0, -N, E, N), this.compose(), this.restore();
5496
5496
  }
5497
5497
  paintInlineImageXObjectGroup(P, E) {
5498
5498
  if (!this.contentVisible)
@@ -5506,7 +5506,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5506
5506
  k(ce, P), z = this.applyTransferMapsToCanvas(ce);
5507
5507
  }
5508
5508
  for (const G of E)
5509
- N.save(), N.transform(...G.transform), N.scale(1, -1), x(N, z, G.x, G.y, G.w, G.h, 0, -1, 1, 1), N.restore();
5509
+ N.save(), N.transform(...G.transform), N.scale(1, -1), S(N, z, G.x, G.y, G.w, G.h, 0, -1, 1, 1), N.restore();
5510
5510
  this.compose();
5511
5511
  }
5512
5512
  paintSolidColorImageMask() {
@@ -5650,8 +5650,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5650
5650
  function o(m, w) {
5651
5651
  if (!w)
5652
5652
  return;
5653
- const k = w[2] - w[0], _ = w[3] - w[1], S = new Path2D();
5654
- S.rect(w[0], w[1], k, _), m.clip(S);
5653
+ const k = w[2] - w[0], _ = w[3] - w[1], x = new Path2D();
5654
+ x.rect(w[0], w[1], k, _), m.clip(x);
5655
5655
  }
5656
5656
  class h {
5657
5657
  constructor() {
@@ -5672,10 +5672,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5672
5672
  k.addColorStop(_[0], _[1]);
5673
5673
  return k;
5674
5674
  }
5675
- getPattern(w, k, _, S) {
5675
+ getPattern(w, k, _, x) {
5676
5676
  let F;
5677
- if (S === s.STROKE || S === s.FILL) {
5678
- const A = k.current.getClippedPathBoundingBox(S, (0, a.getCurrentTransform)(w)) || [0, 0, 0, 0], D = Math.ceil(A[2] - A[0]) || 1, T = Math.ceil(A[3] - A[1]) || 1, M = k.cachedCanvases.getCanvas("pattern", D, T, !0), C = M.context;
5677
+ if (x === s.STROKE || x === s.FILL) {
5678
+ const A = k.current.getClippedPathBoundingBox(x, (0, a.getCurrentTransform)(w)) || [0, 0, 0, 0], D = Math.ceil(A[2] - A[0]) || 1, T = Math.ceil(A[3] - A[1]) || 1, M = k.cachedCanvases.getCanvas("pattern", D, T, !0), C = M.context;
5679
5679
  C.clearRect(0, 0, C.canvas.width, C.canvas.height), C.beginPath(), C.rect(0, 0, C.canvas.width, C.canvas.height), C.translate(-A[0], -A[1]), _ = n.Util.transform(_, [1, 0, 0, 1, A[0], A[1]]), C.transform(...k.baseTransform), this.matrix && C.transform(...this.matrix), o(C, this._bbox), C.fillStyle = this._createGradient(C), C.fill(), F = w.createPattern(M.canvas, "no-repeat");
5680
5680
  const R = new DOMMatrix(_);
5681
5681
  F.setTransform(R);
@@ -5684,11 +5684,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5684
5684
  return F;
5685
5685
  }
5686
5686
  }
5687
- function l(m, w, k, _, S, F, A, D) {
5687
+ function l(m, w, k, _, x, F, A, D) {
5688
5688
  const T = w.coords, M = w.colors, C = m.data, R = m.width * 4;
5689
5689
  let O;
5690
- T[k + 1] > T[_ + 1] && (O = k, k = _, _ = O, O = F, F = A, A = O), T[_ + 1] > T[S + 1] && (O = _, _ = S, S = O, O = A, A = D, D = O), T[k + 1] > T[_ + 1] && (O = k, k = _, _ = O, O = F, F = A, A = O);
5691
- const $ = (T[k] + w.offsetX) * w.scaleX, K = (T[k + 1] + w.offsetY) * w.scaleY, J = (T[_] + w.offsetX) * w.scaleX, Y = (T[_ + 1] + w.offsetY) * w.scaleY, se = (T[S] + w.offsetX) * w.scaleX, B = (T[S + 1] + w.offsetY) * w.scaleY;
5690
+ T[k + 1] > T[_ + 1] && (O = k, k = _, _ = O, O = F, F = A, A = O), T[_ + 1] > T[x + 1] && (O = _, _ = x, x = O, O = A, A = D, D = O), T[k + 1] > T[_ + 1] && (O = k, k = _, _ = O, O = F, F = A, A = O);
5691
+ const $ = (T[k] + w.offsetX) * w.scaleX, K = (T[k + 1] + w.offsetY) * w.scaleY, J = (T[_] + w.offsetX) * w.scaleX, Y = (T[_ + 1] + w.offsetY) * w.scaleY, se = (T[x] + w.offsetX) * w.scaleX, B = (T[x + 1] + w.offsetY) * w.scaleY;
5692
5692
  if (K >= B)
5693
5693
  return;
5694
5694
  const V = M[F], Q = M[F + 1], I = M[F + 2], P = M[A], E = M[A + 1], N = M[A + 2], z = M[D], G = M[D + 1], H = M[D + 2], ee = Math.round(K), ce = Math.round(B);
@@ -5710,7 +5710,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5710
5710
  }
5711
5711
  }
5712
5712
  function u(m, w, k) {
5713
- const _ = w.coords, S = w.colors;
5713
+ const _ = w.coords, x = w.colors;
5714
5714
  let F, A;
5715
5715
  switch (w.type) {
5716
5716
  case "lattice":
@@ -5718,12 +5718,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5718
5718
  for (F = 0; F < T; F++) {
5719
5719
  let C = F * D;
5720
5720
  for (let R = 0; R < M; R++, C++)
5721
- l(m, k, _[C], _[C + 1], _[C + D], S[C], S[C + 1], S[C + D]), l(m, k, _[C + D + 1], _[C + 1], _[C + D], S[C + D + 1], S[C + 1], S[C + D]);
5721
+ l(m, k, _[C], _[C + 1], _[C + D], x[C], x[C + 1], x[C + D]), l(m, k, _[C + D + 1], _[C + 1], _[C + D], x[C + D + 1], x[C + 1], x[C + D]);
5722
5722
  }
5723
5723
  break;
5724
5724
  case "triangles":
5725
5725
  for (F = 0, A = _.length; F < A; F += 3)
5726
- l(m, k, _[F], _[F + 1], _[F + 2], S[F], S[F + 1], S[F + 2]);
5726
+ l(m, k, _[F], _[F + 1], _[F + 2], x[F], x[F + 1], x[F + 2]);
5727
5727
  break;
5728
5728
  default:
5729
5729
  throw new Error("illegal figure");
@@ -5757,17 +5757,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5757
5757
  scaleY: K
5758
5758
  };
5759
5759
  }
5760
- getPattern(w, k, _, S) {
5760
+ getPattern(w, k, _, x) {
5761
5761
  o(w, this._bbox);
5762
5762
  let F;
5763
- if (S === s.SHADING)
5763
+ if (x === s.SHADING)
5764
5764
  F = n.Util.singularValueDecompose2dScale((0, a.getCurrentTransform)(w));
5765
5765
  else if (F = n.Util.singularValueDecompose2dScale(k.baseTransform), this.matrix) {
5766
5766
  const D = n.Util.singularValueDecompose2dScale(this.matrix);
5767
5767
  F = [F[0] * D[0], F[1] * D[1]];
5768
5768
  }
5769
- const A = this._createMeshCanvas(F, S === s.SHADING ? null : this._background, k.cachedCanvases);
5770
- return S !== s.SHADING && (w.setTransform(...k.baseTransform), this.matrix && w.transform(...this.matrix)), w.translate(A.offsetX, A.offsetY), w.scale(A.scaleX, A.scaleY), w.createPattern(A.canvas, "no-repeat");
5769
+ const A = this._createMeshCanvas(F, x === s.SHADING ? null : this._background, k.cachedCanvases);
5770
+ return x !== s.SHADING && (w.setTransform(...k.baseTransform), this.matrix && w.transform(...this.matrix)), w.translate(A.offsetX, A.offsetY), w.scale(A.scaleX, A.scaleY), w.createPattern(A.canvas, "no-repeat");
5771
5771
  }
5772
5772
  }
5773
5773
  class g extends h {
@@ -5789,14 +5789,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5789
5789
  const v = {
5790
5790
  COLORED: 1,
5791
5791
  UNCOLORED: 2
5792
- }, x = class x {
5793
- constructor(w, k, _, S, F) {
5794
- this.operatorList = w[2], this.matrix = w[3] || [1, 0, 0, 1, 0, 0], this.bbox = w[4], this.xstep = w[5], this.ystep = w[6], this.paintType = w[7], this.tilingType = w[8], this.color = k, this.ctx = _, this.canvasGraphicsFactory = S, this.baseTransform = F;
5792
+ }, S = class S {
5793
+ constructor(w, k, _, x, F) {
5794
+ this.operatorList = w[2], this.matrix = w[3] || [1, 0, 0, 1, 0, 0], this.bbox = w[4], this.xstep = w[5], this.ystep = w[6], this.paintType = w[7], this.tilingType = w[8], this.color = k, this.ctx = _, this.canvasGraphicsFactory = x, this.baseTransform = F;
5795
5795
  }
5796
5796
  createPatternCanvas(w) {
5797
- const k = this.operatorList, _ = this.bbox, S = this.xstep, F = this.ystep, A = this.paintType, D = this.tilingType, T = this.color, M = this.canvasGraphicsFactory;
5797
+ const k = this.operatorList, _ = this.bbox, x = this.xstep, F = this.ystep, A = this.paintType, D = this.tilingType, T = this.color, M = this.canvasGraphicsFactory;
5798
5798
  (0, n.info)("TilingType: " + D);
5799
- const C = _[0], R = _[1], O = _[2], $ = _[3], K = n.Util.singularValueDecompose2dScale(this.matrix), J = n.Util.singularValueDecompose2dScale(this.baseTransform), Y = [K[0] * J[0], K[1] * J[1]], se = this.getSizeAndScale(S, this.ctx.canvas.width, Y[0]), B = this.getSizeAndScale(F, this.ctx.canvas.height, Y[1]), V = w.cachedCanvases.getCanvas("pattern", se.size, B.size, !0), Q = V.context, I = M.createCanvasGraphics(Q);
5799
+ const C = _[0], R = _[1], O = _[2], $ = _[3], K = n.Util.singularValueDecompose2dScale(this.matrix), J = n.Util.singularValueDecompose2dScale(this.baseTransform), Y = [K[0] * J[0], K[1] * J[1]], se = this.getSizeAndScale(x, this.ctx.canvas.width, Y[0]), B = this.getSizeAndScale(F, this.ctx.canvas.height, Y[1]), V = w.cachedCanvases.getCanvas("pattern", se.size, B.size, !0), Q = V.context, I = M.createCanvasGraphics(Q);
5800
5800
  I.groupLevel = w.groupLevel, this.setFillAndStrokeStyleToContext(I, A, T);
5801
5801
  let P = C, E = R, N = O, z = $;
5802
5802
  return C < 0 && (P = 0, N += Math.abs(C)), R < 0 && (E = 0, z += Math.abs(R)), Q.translate(-(se.scale * P), -(B.scale * E)), I.transform(se.scale, 0, 0, B.scale, 0, 0), Q.save(), this.clipBbox(I, P, E, N, z), I.baseTransform = (0, a.getCurrentTransform)(I.ctx), I.executeOperatorList(k), I.endDrawing(), {
@@ -5809,35 +5809,35 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5809
5809
  }
5810
5810
  getSizeAndScale(w, k, _) {
5811
5811
  w = Math.abs(w);
5812
- const S = Math.max(x.MAX_PATTERN_SIZE, k);
5812
+ const x = Math.max(S.MAX_PATTERN_SIZE, k);
5813
5813
  let F = Math.ceil(w * _);
5814
- return F >= S ? F = S : _ = F / w, {
5814
+ return F >= x ? F = x : _ = F / w, {
5815
5815
  scale: _,
5816
5816
  size: F
5817
5817
  };
5818
5818
  }
5819
- clipBbox(w, k, _, S, F) {
5820
- const A = S - k, D = F - _;
5821
- w.ctx.rect(k, _, A, D), w.current.updateRectMinMax((0, a.getCurrentTransform)(w.ctx), [k, _, S, F]), w.clip(), w.endPath();
5819
+ clipBbox(w, k, _, x, F) {
5820
+ const A = x - k, D = F - _;
5821
+ w.ctx.rect(k, _, A, D), w.current.updateRectMinMax((0, a.getCurrentTransform)(w.ctx), [k, _, x, F]), w.clip(), w.endPath();
5822
5822
  }
5823
5823
  setFillAndStrokeStyleToContext(w, k, _) {
5824
- const S = w.ctx, F = w.current;
5824
+ const x = w.ctx, F = w.current;
5825
5825
  switch (k) {
5826
5826
  case v.COLORED:
5827
5827
  const A = this.ctx;
5828
- S.fillStyle = A.fillStyle, S.strokeStyle = A.strokeStyle, F.fillColor = A.fillStyle, F.strokeColor = A.strokeStyle;
5828
+ x.fillStyle = A.fillStyle, x.strokeStyle = A.strokeStyle, F.fillColor = A.fillStyle, F.strokeColor = A.strokeStyle;
5829
5829
  break;
5830
5830
  case v.UNCOLORED:
5831
5831
  const D = n.Util.makeHexColor(_[0], _[1], _[2]);
5832
- S.fillStyle = D, S.strokeStyle = D, F.fillColor = D, F.strokeColor = D;
5832
+ x.fillStyle = D, x.strokeStyle = D, F.fillColor = D, F.strokeColor = D;
5833
5833
  break;
5834
5834
  default:
5835
5835
  throw new n.FormatError(`Unsupported paint type: ${k}`);
5836
5836
  }
5837
5837
  }
5838
- getPattern(w, k, _, S) {
5838
+ getPattern(w, k, _, x) {
5839
5839
  let F = _;
5840
- S !== s.SHADING && (F = n.Util.transform(F, k.baseTransform), this.matrix && (F = n.Util.transform(F, this.matrix)));
5840
+ x !== s.SHADING && (F = n.Util.transform(F, k.baseTransform), this.matrix && (F = n.Util.transform(F, this.matrix)));
5841
5841
  const A = this.createPatternCanvas(k);
5842
5842
  let D = new DOMMatrix(F);
5843
5843
  D = D.translate(A.offsetX, A.offsetY), D = D.scale(1 / A.scaleX, 1 / A.scaleY);
@@ -5845,8 +5845,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5845
5845
  return T.setTransform(D), T;
5846
5846
  }
5847
5847
  };
5848
- $e(x, "MAX_PATTERN_SIZE", 3e3);
5849
- let y = x;
5848
+ $e(S, "MAX_PATTERN_SIZE", 3e3);
5849
+ let y = S;
5850
5850
  e.TilingPattern = y;
5851
5851
  },
5852
5852
  /* 13 */
@@ -5874,23 +5874,23 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5874
5874
  nonBlackColor: f = 4294967295,
5875
5875
  inverseDecode: v = !1
5876
5876
  }) {
5877
- const y = n.FeatureTest.isLittleEndian ? 4278190080 : 255, [x, m] = v ? [f, y] : [y, f], w = p >> 3, k = p & 7, _ = d.length;
5877
+ const y = n.FeatureTest.isLittleEndian ? 4278190080 : 255, [S, m] = v ? [f, y] : [y, f], w = p >> 3, k = p & 7, _ = d.length;
5878
5878
  u = new Uint32Array(u.buffer);
5879
- let S = 0;
5879
+ let x = 0;
5880
5880
  for (let F = 0; F < g; F++) {
5881
5881
  for (const D = l + w; l < D; l++) {
5882
5882
  const T = l < _ ? d[l] : 255;
5883
- u[S++] = T & 128 ? m : x, u[S++] = T & 64 ? m : x, u[S++] = T & 32 ? m : x, u[S++] = T & 16 ? m : x, u[S++] = T & 8 ? m : x, u[S++] = T & 4 ? m : x, u[S++] = T & 2 ? m : x, u[S++] = T & 1 ? m : x;
5883
+ u[x++] = T & 128 ? m : S, u[x++] = T & 64 ? m : S, u[x++] = T & 32 ? m : S, u[x++] = T & 16 ? m : S, u[x++] = T & 8 ? m : S, u[x++] = T & 4 ? m : S, u[x++] = T & 2 ? m : S, u[x++] = T & 1 ? m : S;
5884
5884
  }
5885
5885
  if (k === 0)
5886
5886
  continue;
5887
5887
  const A = l < _ ? d[l++] : 255;
5888
5888
  for (let D = 0; D < k; D++)
5889
- u[S++] = A & 1 << 7 - D ? m : x;
5889
+ u[x++] = A & 1 << 7 - D ? m : S;
5890
5890
  }
5891
5891
  return {
5892
5892
  srcPos: l,
5893
- destPos: S
5893
+ destPos: x
5894
5894
  };
5895
5895
  }
5896
5896
  function o({
@@ -5902,17 +5902,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5902
5902
  height: f
5903
5903
  }) {
5904
5904
  let v = 0;
5905
- const y = d.length >> 2, x = new Uint32Array(d.buffer, l, y);
5905
+ const y = d.length >> 2, S = new Uint32Array(d.buffer, l, y);
5906
5906
  if (n.FeatureTest.isLittleEndian) {
5907
5907
  for (; v < y - 2; v += 3, p += 4) {
5908
- const m = x[v], w = x[v + 1], k = x[v + 2];
5908
+ const m = S[v], w = S[v + 1], k = S[v + 2];
5909
5909
  u[p] = m | 4278190080, u[p + 1] = m >>> 24 | w << 8 | 4278190080, u[p + 2] = w >>> 16 | k << 16 | 4278190080, u[p + 3] = k >>> 8 | 4278190080;
5910
5910
  }
5911
5911
  for (let m = v * 4, w = d.length; m < w; m += 3)
5912
5912
  u[p++] = d[m] | d[m + 1] << 8 | d[m + 2] << 16 | 4278190080;
5913
5913
  } else {
5914
5914
  for (; v < y - 2; v += 3, p += 4) {
5915
- const m = x[v], w = x[v + 1], k = x[v + 2];
5915
+ const m = S[v], w = S[v + 1], k = S[v + 2];
5916
5916
  u[p] = m | 255, u[p + 1] = m << 24 | w >>> 8 | 255, u[p + 2] = w << 16 | k >>> 16 | 255, u[p + 3] = k << 8 | 255;
5917
5917
  }
5918
5918
  for (let m = v * 4, w = d.length; m < w; m += 3)
@@ -5981,8 +5981,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
5981
5981
  class h {
5982
5982
  constructor(f, v, y) {
5983
5983
  de(this, d);
5984
- this.sourceName = f, this.targetName = v, this.comObj = y, this.callbackId = 1, this.streamId = 1, this.streamSinks = /* @__PURE__ */ Object.create(null), this.streamControllers = /* @__PURE__ */ Object.create(null), this.callbackCapabilities = /* @__PURE__ */ Object.create(null), this.actionHandler = /* @__PURE__ */ Object.create(null), this._onComObjOnMessage = (x) => {
5985
- const m = x.data;
5984
+ this.sourceName = f, this.targetName = v, this.comObj = y, this.callbackId = 1, this.streamId = 1, this.streamSinks = /* @__PURE__ */ Object.create(null), this.streamControllers = /* @__PURE__ */ Object.create(null), this.callbackCapabilities = /* @__PURE__ */ Object.create(null), this.actionHandler = /* @__PURE__ */ Object.create(null), this._onComObjOnMessage = (S) => {
5985
+ const m = S.data;
5986
5986
  if (m.targetName !== this.sourceName)
5987
5987
  return;
5988
5988
  if (m.stream) {
@@ -6006,23 +6006,23 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6006
6006
  throw new Error(`Unknown action from worker: ${m.action}`);
6007
6007
  if (m.callbackId) {
6008
6008
  const k = this.sourceName, _ = m.sourceName;
6009
- new Promise(function(S) {
6010
- S(w(m.data));
6011
- }).then(function(S) {
6009
+ new Promise(function(x) {
6010
+ x(w(m.data));
6011
+ }).then(function(x) {
6012
6012
  y.postMessage({
6013
6013
  sourceName: k,
6014
6014
  targetName: _,
6015
6015
  callback: a.DATA,
6016
6016
  callbackId: m.callbackId,
6017
- data: S
6017
+ data: x
6018
6018
  });
6019
- }, function(S) {
6019
+ }, function(x) {
6020
6020
  y.postMessage({
6021
6021
  sourceName: k,
6022
6022
  targetName: _,
6023
6023
  callback: a.ERROR,
6024
6024
  callbackId: m.callbackId,
6025
- reason: o(S)
6025
+ reason: o(x)
6026
6026
  });
6027
6027
  });
6028
6028
  return;
@@ -6049,14 +6049,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6049
6049
  }, y);
6050
6050
  }
6051
6051
  sendWithPromise(f, v, y) {
6052
- const x = this.callbackId++, m = new n.PromiseCapability();
6053
- this.callbackCapabilities[x] = m;
6052
+ const S = this.callbackId++, m = new n.PromiseCapability();
6053
+ this.callbackCapabilities[S] = m;
6054
6054
  try {
6055
6055
  this.comObj.postMessage({
6056
6056
  sourceName: this.sourceName,
6057
6057
  targetName: this.targetName,
6058
6058
  action: f,
6059
- callbackId: x,
6059
+ callbackId: S,
6060
6060
  data: v
6061
6061
  }, y);
6062
6062
  } catch (w) {
@@ -6064,13 +6064,13 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6064
6064
  }
6065
6065
  return m.promise;
6066
6066
  }
6067
- sendWithStream(f, v, y, x) {
6067
+ sendWithStream(f, v, y, S) {
6068
6068
  const m = this.streamId++, w = this.sourceName, k = this.targetName, _ = this.comObj;
6069
6069
  return new ReadableStream({
6070
- start: (S) => {
6070
+ start: (x) => {
6071
6071
  const F = new n.PromiseCapability();
6072
6072
  return this.streamControllers[m] = {
6073
- controller: S,
6073
+ controller: x,
6074
6074
  startCall: F,
6075
6075
  pullCall: null,
6076
6076
  cancelCall: null,
@@ -6081,28 +6081,28 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6081
6081
  action: f,
6082
6082
  streamId: m,
6083
6083
  data: v,
6084
- desiredSize: S.desiredSize
6085
- }, x), F.promise;
6084
+ desiredSize: x.desiredSize
6085
+ }, S), F.promise;
6086
6086
  },
6087
- pull: (S) => {
6087
+ pull: (x) => {
6088
6088
  const F = new n.PromiseCapability();
6089
6089
  return this.streamControllers[m].pullCall = F, _.postMessage({
6090
6090
  sourceName: w,
6091
6091
  targetName: k,
6092
6092
  stream: s.PULL,
6093
6093
  streamId: m,
6094
- desiredSize: S.desiredSize
6094
+ desiredSize: x.desiredSize
6095
6095
  }), F.promise;
6096
6096
  },
6097
- cancel: (S) => {
6098
- (0, n.assert)(S instanceof Error, "cancel must have a valid reason");
6097
+ cancel: (x) => {
6098
+ (0, n.assert)(x instanceof Error, "cancel must have a valid reason");
6099
6099
  const F = new n.PromiseCapability();
6100
6100
  return this.streamControllers[m].cancelCall = F, this.streamControllers[m].isClosed = !0, _.postMessage({
6101
6101
  sourceName: w,
6102
6102
  targetName: k,
6103
6103
  stream: s.CANCEL,
6104
6104
  streamId: m,
6105
- reason: o(S)
6105
+ reason: o(x)
6106
6106
  }), F.promise;
6107
6107
  }
6108
6108
  }, y);
@@ -6112,34 +6112,34 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6112
6112
  }
6113
6113
  }
6114
6114
  d = new WeakSet(), Dr = function(f) {
6115
- const v = f.streamId, y = this.sourceName, x = f.sourceName, m = this.comObj, w = this, k = this.actionHandler[f.action], _ = {
6116
- enqueue(S, F = 1, A) {
6115
+ const v = f.streamId, y = this.sourceName, S = f.sourceName, m = this.comObj, w = this, k = this.actionHandler[f.action], _ = {
6116
+ enqueue(x, F = 1, A) {
6117
6117
  if (this.isCancelled)
6118
6118
  return;
6119
6119
  const D = this.desiredSize;
6120
6120
  this.desiredSize -= F, D > 0 && this.desiredSize <= 0 && (this.sinkCapability = new n.PromiseCapability(), this.ready = this.sinkCapability.promise), m.postMessage({
6121
6121
  sourceName: y,
6122
- targetName: x,
6122
+ targetName: S,
6123
6123
  stream: s.ENQUEUE,
6124
6124
  streamId: v,
6125
- chunk: S
6125
+ chunk: x
6126
6126
  }, A);
6127
6127
  },
6128
6128
  close() {
6129
6129
  this.isCancelled || (this.isCancelled = !0, m.postMessage({
6130
6130
  sourceName: y,
6131
- targetName: x,
6131
+ targetName: S,
6132
6132
  stream: s.CLOSE,
6133
6133
  streamId: v
6134
6134
  }), delete w.streamSinks[v]);
6135
6135
  },
6136
- error(S) {
6137
- (0, n.assert)(S instanceof Error, "error must have a valid reason"), !this.isCancelled && (this.isCancelled = !0, m.postMessage({
6136
+ error(x) {
6137
+ (0, n.assert)(x instanceof Error, "error must have a valid reason"), !this.isCancelled && (this.isCancelled = !0, m.postMessage({
6138
6138
  sourceName: y,
6139
- targetName: x,
6139
+ targetName: S,
6140
6140
  stream: s.ERROR,
6141
6141
  streamId: v,
6142
- reason: o(S)
6142
+ reason: o(x)
6143
6143
  }));
6144
6144
  },
6145
6145
  sinkCapability: new n.PromiseCapability(),
@@ -6149,27 +6149,27 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6149
6149
  desiredSize: f.desiredSize,
6150
6150
  ready: null
6151
6151
  };
6152
- _.sinkCapability.resolve(), _.ready = _.sinkCapability.promise, this.streamSinks[v] = _, new Promise(function(S) {
6153
- S(k(f.data, _));
6152
+ _.sinkCapability.resolve(), _.ready = _.sinkCapability.promise, this.streamSinks[v] = _, new Promise(function(x) {
6153
+ x(k(f.data, _));
6154
6154
  }).then(function() {
6155
6155
  m.postMessage({
6156
6156
  sourceName: y,
6157
- targetName: x,
6157
+ targetName: S,
6158
6158
  stream: s.START_COMPLETE,
6159
6159
  streamId: v,
6160
6160
  success: !0
6161
6161
  });
6162
- }, function(S) {
6162
+ }, function(x) {
6163
6163
  m.postMessage({
6164
6164
  sourceName: y,
6165
- targetName: x,
6165
+ targetName: S,
6166
6166
  stream: s.START_COMPLETE,
6167
6167
  streamId: v,
6168
- reason: o(S)
6168
+ reason: o(x)
6169
6169
  });
6170
6170
  });
6171
6171
  }, Er = function(f) {
6172
- const v = f.streamId, y = this.sourceName, x = f.sourceName, m = this.comObj, w = this.streamControllers[v], k = this.streamSinks[v];
6172
+ const v = f.streamId, y = this.sourceName, S = f.sourceName, m = this.comObj, w = this.streamControllers[v], k = this.streamSinks[v];
6173
6173
  switch (f.stream) {
6174
6174
  case s.START_COMPLETE:
6175
6175
  f.success ? w.startCall.resolve() : w.startCall.reject(o(f.reason));
@@ -6181,7 +6181,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6181
6181
  if (!k) {
6182
6182
  m.postMessage({
6183
6183
  sourceName: y,
6184
- targetName: x,
6184
+ targetName: S,
6185
6185
  stream: s.PULL_COMPLETE,
6186
6186
  streamId: v,
6187
6187
  success: !0
@@ -6189,12 +6189,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6189
6189
  break;
6190
6190
  }
6191
6191
  k.desiredSize <= 0 && f.desiredSize > 0 && k.sinkCapability.resolve(), k.desiredSize = f.desiredSize, new Promise(function(_) {
6192
- var S;
6193
- _((S = k.onPull) == null ? void 0 : S.call(k));
6192
+ var x;
6193
+ _((x = k.onPull) == null ? void 0 : x.call(k));
6194
6194
  }).then(function() {
6195
6195
  m.postMessage({
6196
6196
  sourceName: y,
6197
- targetName: x,
6197
+ targetName: S,
6198
6198
  stream: s.PULL_COMPLETE,
6199
6199
  streamId: v,
6200
6200
  success: !0
@@ -6202,7 +6202,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6202
6202
  }, function(_) {
6203
6203
  m.postMessage({
6204
6204
  sourceName: y,
6205
- targetName: x,
6205
+ targetName: S,
6206
6206
  stream: s.PULL_COMPLETE,
6207
6207
  streamId: v,
6208
6208
  reason: o(_)
@@ -6229,12 +6229,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6229
6229
  if (!k)
6230
6230
  break;
6231
6231
  new Promise(function(_) {
6232
- var S;
6233
- _((S = k.onCancel) == null ? void 0 : S.call(k, o(f.reason)));
6232
+ var x;
6233
+ _((x = k.onCancel) == null ? void 0 : x.call(k, o(f.reason)));
6234
6234
  }).then(function() {
6235
6235
  m.postMessage({
6236
6236
  sourceName: y,
6237
- targetName: x,
6237
+ targetName: S,
6238
6238
  stream: s.CANCEL_COMPLETE,
6239
6239
  streamId: v,
6240
6240
  success: !0
@@ -6242,7 +6242,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6242
6242
  }, function(_) {
6243
6243
  m.postMessage({
6244
6244
  sourceName: y,
6245
- targetName: x,
6245
+ targetName: S,
6246
6246
  stream: s.CANCEL_COMPLETE,
6247
6247
  streamId: v,
6248
6248
  reason: o(_)
@@ -6253,8 +6253,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6253
6253
  throw new Error("Unexpected stream case");
6254
6254
  }
6255
6255
  }, wt = async function(f, v) {
6256
- var y, x, m;
6257
- await Promise.allSettled([(y = f.startCall) == null ? void 0 : y.promise, (x = f.pullCall) == null ? void 0 : x.promise, (m = f.cancelCall) == null ? void 0 : m.promise]), delete this.streamControllers[v];
6256
+ var y, S, m;
6257
+ await Promise.allSettled([(y = f.startCall) == null ? void 0 : y.promise, (S = f.pullCall) == null ? void 0 : S.promise, (m = f.cancelCall) == null ? void 0 : m.promise]), delete this.streamControllers[v];
6258
6258
  }, e.MessageHandler = h;
6259
6259
  },
6260
6260
  /* 16 */
@@ -6299,75 +6299,75 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6299
6299
  var n = r(1), a = r(8);
6300
6300
  const s = Symbol("INTERNAL");
6301
6301
  class o {
6302
- constructor(x, m) {
6302
+ constructor(S, m) {
6303
6303
  de(this, d, !0);
6304
- this.name = x, this.intent = m;
6304
+ this.name = S, this.intent = m;
6305
6305
  }
6306
6306
  get visible() {
6307
6307
  return b(this, d);
6308
6308
  }
6309
- _setVisible(x, m) {
6310
- x !== s && (0, n.unreachable)("Internal method `_setVisible` called."), ue(this, d, m);
6309
+ _setVisible(S, m) {
6310
+ S !== s && (0, n.unreachable)("Internal method `_setVisible` called."), ue(this, d, m);
6311
6311
  }
6312
6312
  }
6313
6313
  d = new WeakMap();
6314
6314
  class h {
6315
- constructor(x) {
6315
+ constructor(S) {
6316
6316
  de(this, f);
6317
6317
  de(this, l, null);
6318
6318
  de(this, u, /* @__PURE__ */ new Map());
6319
6319
  de(this, p, null);
6320
6320
  de(this, g, null);
6321
- if (this.name = null, this.creator = null, x !== null) {
6322
- this.name = x.name, this.creator = x.creator, ue(this, g, x.order);
6323
- for (const m of x.groups)
6321
+ if (this.name = null, this.creator = null, S !== null) {
6322
+ this.name = S.name, this.creator = S.creator, ue(this, g, S.order);
6323
+ for (const m of S.groups)
6324
6324
  b(this, u).set(m.id, new o(m.name, m.intent));
6325
- if (x.baseState === "OFF")
6325
+ if (S.baseState === "OFF")
6326
6326
  for (const m of b(this, u).values())
6327
6327
  m._setVisible(s, !1);
6328
- for (const m of x.on)
6328
+ for (const m of S.on)
6329
6329
  b(this, u).get(m)._setVisible(s, !0);
6330
- for (const m of x.off)
6330
+ for (const m of S.off)
6331
6331
  b(this, u).get(m)._setVisible(s, !1);
6332
6332
  ue(this, p, this.getHash());
6333
6333
  }
6334
6334
  }
6335
- isVisible(x) {
6335
+ isVisible(S) {
6336
6336
  if (b(this, u).size === 0)
6337
6337
  return !0;
6338
- if (!x)
6338
+ if (!S)
6339
6339
  return (0, n.warn)("Optional content group not defined."), !0;
6340
- if (x.type === "OCG")
6341
- return b(this, u).has(x.id) ? b(this, u).get(x.id).visible : ((0, n.warn)(`Optional content group not found: ${x.id}`), !0);
6342
- if (x.type === "OCMD") {
6343
- if (x.expression)
6344
- return te(this, f, Qt).call(this, x.expression);
6345
- if (!x.policy || x.policy === "AnyOn") {
6346
- for (const m of x.ids) {
6340
+ if (S.type === "OCG")
6341
+ return b(this, u).has(S.id) ? b(this, u).get(S.id).visible : ((0, n.warn)(`Optional content group not found: ${S.id}`), !0);
6342
+ if (S.type === "OCMD") {
6343
+ if (S.expression)
6344
+ return te(this, f, Qt).call(this, S.expression);
6345
+ if (!S.policy || S.policy === "AnyOn") {
6346
+ for (const m of S.ids) {
6347
6347
  if (!b(this, u).has(m))
6348
6348
  return (0, n.warn)(`Optional content group not found: ${m}`), !0;
6349
6349
  if (b(this, u).get(m).visible)
6350
6350
  return !0;
6351
6351
  }
6352
6352
  return !1;
6353
- } else if (x.policy === "AllOn") {
6354
- for (const m of x.ids) {
6353
+ } else if (S.policy === "AllOn") {
6354
+ for (const m of S.ids) {
6355
6355
  if (!b(this, u).has(m))
6356
6356
  return (0, n.warn)(`Optional content group not found: ${m}`), !0;
6357
6357
  if (!b(this, u).get(m).visible)
6358
6358
  return !1;
6359
6359
  }
6360
6360
  return !0;
6361
- } else if (x.policy === "AnyOff") {
6362
- for (const m of x.ids) {
6361
+ } else if (S.policy === "AnyOff") {
6362
+ for (const m of S.ids) {
6363
6363
  if (!b(this, u).has(m))
6364
6364
  return (0, n.warn)(`Optional content group not found: ${m}`), !0;
6365
6365
  if (!b(this, u).get(m).visible)
6366
6366
  return !0;
6367
6367
  }
6368
6368
  return !1;
6369
- } else if (x.policy === "AllOff") {
6370
- for (const m of x.ids) {
6369
+ } else if (S.policy === "AllOff") {
6370
+ for (const m of S.ids) {
6371
6371
  if (!b(this, u).has(m))
6372
6372
  return (0, n.warn)(`Optional content group not found: ${m}`), !0;
6373
6373
  if (b(this, u).get(m).visible)
@@ -6375,16 +6375,16 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6375
6375
  }
6376
6376
  return !0;
6377
6377
  }
6378
- return (0, n.warn)(`Unknown optional content policy ${x.policy}.`), !0;
6378
+ return (0, n.warn)(`Unknown optional content policy ${S.policy}.`), !0;
6379
6379
  }
6380
- return (0, n.warn)(`Unknown group type ${x.type}.`), !0;
6380
+ return (0, n.warn)(`Unknown group type ${S.type}.`), !0;
6381
6381
  }
6382
- setVisibility(x, m = !0) {
6383
- if (!b(this, u).has(x)) {
6384
- (0, n.warn)(`Optional content group not found: ${x}`);
6382
+ setVisibility(S, m = !0) {
6383
+ if (!b(this, u).has(S)) {
6384
+ (0, n.warn)(`Optional content group not found: ${S}`);
6385
6385
  return;
6386
6386
  }
6387
- b(this, u).get(x)._setVisible(s, !!m), ue(this, l, null);
6387
+ b(this, u).get(S)._setVisible(s, !!m), ue(this, l, null);
6388
6388
  }
6389
6389
  get hasInitialVisibility() {
6390
6390
  return b(this, p) === null || this.getHash() === b(this, p);
@@ -6395,43 +6395,43 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6395
6395
  getGroups() {
6396
6396
  return b(this, u).size > 0 ? (0, n.objectFromMap)(b(this, u)) : null;
6397
6397
  }
6398
- getGroup(x) {
6399
- return b(this, u).get(x) || null;
6398
+ getGroup(S) {
6399
+ return b(this, u).get(S) || null;
6400
6400
  }
6401
6401
  getHash() {
6402
6402
  if (b(this, l) !== null)
6403
6403
  return b(this, l);
6404
- const x = new a.MurmurHash3_64();
6404
+ const S = new a.MurmurHash3_64();
6405
6405
  for (const [m, w] of b(this, u))
6406
- x.update(`${m}:${w.visible}`);
6407
- return ue(this, l, x.hexdigest());
6406
+ S.update(`${m}:${w.visible}`);
6407
+ return ue(this, l, S.hexdigest());
6408
6408
  }
6409
6409
  }
6410
- l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakSet(), Qt = function(x) {
6411
- const m = x.length;
6410
+ l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakSet(), Qt = function(S) {
6411
+ const m = S.length;
6412
6412
  if (m < 2)
6413
6413
  return !0;
6414
- const w = x[0];
6414
+ const w = S[0];
6415
6415
  for (let k = 1; k < m; k++) {
6416
- const _ = x[k];
6417
- let S;
6416
+ const _ = S[k];
6417
+ let x;
6418
6418
  if (Array.isArray(_))
6419
- S = te(this, f, Qt).call(this, _);
6419
+ x = te(this, f, Qt).call(this, _);
6420
6420
  else if (b(this, u).has(_))
6421
- S = b(this, u).get(_).visible;
6421
+ x = b(this, u).get(_).visible;
6422
6422
  else
6423
6423
  return (0, n.warn)(`Optional content group not found: ${_}`), !0;
6424
6424
  switch (w) {
6425
6425
  case "And":
6426
- if (!S)
6426
+ if (!x)
6427
6427
  return !1;
6428
6428
  break;
6429
6429
  case "Or":
6430
- if (S)
6430
+ if (x)
6431
6431
  return !0;
6432
6432
  break;
6433
6433
  case "Not":
6434
- return !S;
6434
+ return !x;
6435
6435
  default:
6436
6436
  return !0;
6437
6437
  }
@@ -6456,22 +6456,22 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6456
6456
  disableStream: v = !1
6457
6457
  }, y) {
6458
6458
  if ((0, n.assert)(y, 'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'), this._queuedChunks = [], this._progressiveDone = p, this._contentDispositionFilename = g, (u == null ? void 0 : u.length) > 0) {
6459
- const x = u instanceof Uint8Array && u.byteLength === u.buffer.byteLength ? u.buffer : new Uint8Array(u).buffer;
6460
- this._queuedChunks.push(x);
6459
+ const S = u instanceof Uint8Array && u.byteLength === u.buffer.byteLength ? u.buffer : new Uint8Array(u).buffer;
6460
+ this._queuedChunks.push(S);
6461
6461
  }
6462
- this._pdfDataRangeTransport = y, this._isStreamingSupported = !v, this._isRangeSupported = !f, this._contentLength = l, this._fullRequestReader = null, this._rangeReaders = [], this._pdfDataRangeTransport.addRangeListener((x, m) => {
6462
+ this._pdfDataRangeTransport = y, this._isStreamingSupported = !v, this._isRangeSupported = !f, this._contentLength = l, this._fullRequestReader = null, this._rangeReaders = [], this._pdfDataRangeTransport.addRangeListener((S, m) => {
6463
6463
  this._onReceiveData({
6464
- begin: x,
6464
+ begin: S,
6465
6465
  chunk: m
6466
6466
  });
6467
- }), this._pdfDataRangeTransport.addProgressListener((x, m) => {
6467
+ }), this._pdfDataRangeTransport.addProgressListener((S, m) => {
6468
6468
  this._onProgress({
6469
- loaded: x,
6469
+ loaded: S,
6470
6470
  total: m
6471
6471
  });
6472
- }), this._pdfDataRangeTransport.addProgressiveReadListener((x) => {
6472
+ }), this._pdfDataRangeTransport.addProgressiveReadListener((S) => {
6473
6473
  this._onReceiveData({
6474
- chunk: x
6474
+ chunk: S
6475
6475
  });
6476
6476
  }), this._pdfDataRangeTransport.addProgressiveDoneListener(() => {
6477
6477
  this._onProgressiveDone();
@@ -6703,16 +6703,16 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6703
6703
  if (!(0, a.validateResponseStatus)(y.status))
6704
6704
  throw (0, a.createResponseStatusError)(y.status, v);
6705
6705
  this._reader = y.body.getReader(), this._headersCapability.resolve();
6706
- const x = (k) => y.headers.get(k), {
6706
+ const S = (k) => y.headers.get(k), {
6707
6707
  allowRangeRequests: m,
6708
6708
  suggestedLength: w
6709
6709
  } = (0, a.validateRangeRequestCapabilities)({
6710
- getResponseHeader: x,
6710
+ getResponseHeader: S,
6711
6711
  isHttp: this._stream.isHttp,
6712
6712
  rangeChunkSize: this._rangeChunkSize,
6713
6713
  disableRange: this._disableRange
6714
6714
  });
6715
- this._isRangeSupported = m, this._contentLength = w || this._contentLength, this._filename = (0, a.extractFilenameFromHeader)(x), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new n.AbortException("Streaming is disabled."));
6715
+ this._isRangeSupported = m, this._contentLength = w || this._contentLength, this._filename = (0, a.extractFilenameFromHeader)(S), !this._isStreamingSupported && this._isRangeSupported && this.cancel(new n.AbortException("Streaming is disabled."));
6716
6716
  }).catch(this._headersCapability.reject), this.onProgress = null;
6717
6717
  }
6718
6718
  get headersReady() {
@@ -6758,10 +6758,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6758
6758
  this._stream = g, this._reader = null, this._loaded = 0;
6759
6759
  const y = g.source;
6760
6760
  this._withCredentials = y.withCredentials || !1, this._readCapability = new n.PromiseCapability(), this._isStreamingSupported = !y.disableStream, this._abortController = new AbortController(), this._headers = o(this._stream.httpHeaders), this._headers.append("Range", `bytes=${f}-${v - 1}`);
6761
- const x = y.url;
6762
- fetch(x, s(this._headers, this._withCredentials, this._abortController)).then((m) => {
6761
+ const S = y.url;
6762
+ fetch(S, s(this._headers, this._withCredentials, this._abortController)).then((m) => {
6763
6763
  if (!(0, a.validateResponseStatus)(m.status))
6764
- throw (0, a.createResponseStatusError)(m.status, x);
6764
+ throw (0, a.createResponseStatusError)(m.status, S);
6765
6765
  this._readCapability.resolve(), this._reader = m.body.getReader();
6766
6766
  }).catch(this._readCapability.reject), this.onProgress = null;
6767
6767
  }
@@ -6854,69 +6854,69 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6854
6854
  let y = g(h);
6855
6855
  return y = v(y), u(y);
6856
6856
  }
6857
- function d(y, x) {
6858
- return new RegExp("(?:^|;)\\s*" + y + '\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)', x);
6857
+ function d(y, S) {
6858
+ return new RegExp("(?:^|;)\\s*" + y + '\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)', S);
6859
6859
  }
6860
- function l(y, x) {
6860
+ function l(y, S) {
6861
6861
  if (y) {
6862
- if (!/^[\x00-\xFF]+$/.test(x))
6863
- return x;
6862
+ if (!/^[\x00-\xFF]+$/.test(S))
6863
+ return S;
6864
6864
  try {
6865
6865
  const m = new TextDecoder(y, {
6866
6866
  fatal: !0
6867
- }), w = (0, n.stringToBytes)(x);
6868
- x = m.decode(w), o = !1;
6867
+ }), w = (0, n.stringToBytes)(S);
6868
+ S = m.decode(w), o = !1;
6869
6869
  } catch {
6870
6870
  }
6871
6871
  }
6872
- return x;
6872
+ return S;
6873
6873
  }
6874
6874
  function u(y) {
6875
6875
  return o && /[\x80-\xff]/.test(y) && (y = l("utf-8", y), o && (y = l("iso-8859-1", y))), y;
6876
6876
  }
6877
6877
  function p(y) {
6878
- const x = [];
6878
+ const S = [];
6879
6879
  let m;
6880
6880
  const w = d("filename\\*((?!0\\d)\\d+)(\\*?)", "ig");
6881
6881
  for (; (m = w.exec(y)) !== null; ) {
6882
- let [, _, S, F] = m;
6883
- if (_ = parseInt(_, 10), _ in x) {
6882
+ let [, _, x, F] = m;
6883
+ if (_ = parseInt(_, 10), _ in S) {
6884
6884
  if (_ === 0)
6885
6885
  break;
6886
6886
  continue;
6887
6887
  }
6888
- x[_] = [S, F];
6888
+ S[_] = [x, F];
6889
6889
  }
6890
6890
  const k = [];
6891
- for (let _ = 0; _ < x.length && _ in x; ++_) {
6892
- let [S, F] = x[_];
6893
- F = g(F), S && (F = unescape(F), _ === 0 && (F = f(F))), k.push(F);
6891
+ for (let _ = 0; _ < S.length && _ in S; ++_) {
6892
+ let [x, F] = S[_];
6893
+ F = g(F), x && (F = unescape(F), _ === 0 && (F = f(F))), k.push(F);
6894
6894
  }
6895
6895
  return k.join("");
6896
6896
  }
6897
6897
  function g(y) {
6898
6898
  if (y.startsWith('"')) {
6899
- const x = y.slice(1).split('\\"');
6900
- for (let m = 0; m < x.length; ++m) {
6901
- const w = x[m].indexOf('"');
6902
- w !== -1 && (x[m] = x[m].slice(0, w), x.length = m + 1), x[m] = x[m].replaceAll(/\\(.)/g, "$1");
6899
+ const S = y.slice(1).split('\\"');
6900
+ for (let m = 0; m < S.length; ++m) {
6901
+ const w = S[m].indexOf('"');
6902
+ w !== -1 && (S[m] = S[m].slice(0, w), S.length = m + 1), S[m] = S[m].replaceAll(/\\(.)/g, "$1");
6903
6903
  }
6904
- y = x.join('"');
6904
+ y = S.join('"');
6905
6905
  }
6906
6906
  return y;
6907
6907
  }
6908
6908
  function f(y) {
6909
- const x = y.indexOf("'");
6910
- if (x === -1)
6909
+ const S = y.indexOf("'");
6910
+ if (S === -1)
6911
6911
  return y;
6912
- const m = y.slice(0, x), k = y.slice(x + 1).replace(/^[^']*'/, "");
6912
+ const m = y.slice(0, S), k = y.slice(S + 1).replace(/^[^']*'/, "");
6913
6913
  return l(m, k);
6914
6914
  }
6915
6915
  function v(y) {
6916
- return !y.startsWith("=?") || /[\x00-\x19\x80-\xff]/.test(y) ? y : y.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g, function(x, m, w, k) {
6916
+ return !y.startsWith("=?") || /[\x00-\x19\x80-\xff]/.test(y) ? y : y.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g, function(S, m, w, k) {
6917
6917
  if (w === "q" || w === "Q")
6918
- return k = k.replaceAll("_", " "), k = k.replaceAll(/=([0-9a-fA-F]{2})/g, function(_, S) {
6919
- return String.fromCharCode(parseInt(S, 16));
6918
+ return k = k.replaceAll("_", " "), k = k.replaceAll(/=([0-9a-fA-F]{2})/g, function(_, x) {
6919
+ return String.fromCharCode(parseInt(x, 16));
6920
6920
  }), l(m, k);
6921
6921
  try {
6922
6922
  k = atob(k);
@@ -6945,19 +6945,19 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6945
6945
  this.url = f, this.isHttp = /^https?:/i.test(f), this.httpHeaders = this.isHttp && v.httpHeaders || /* @__PURE__ */ Object.create(null), this.withCredentials = v.withCredentials || !1, this.currXhrId = 0, this.pendingRequests = /* @__PURE__ */ Object.create(null);
6946
6946
  }
6947
6947
  requestRange(f, v, y) {
6948
- const x = {
6948
+ const S = {
6949
6949
  begin: f,
6950
6950
  end: v
6951
6951
  };
6952
6952
  for (const m in y)
6953
- x[m] = y[m];
6954
- return this.request(x);
6953
+ S[m] = y[m];
6954
+ return this.request(S);
6955
6955
  }
6956
6956
  requestFull(f) {
6957
6957
  return this.request(f);
6958
6958
  }
6959
6959
  request(f) {
6960
- const v = new XMLHttpRequest(), y = this.currXhrId++, x = this.pendingRequests[y] = {
6960
+ const v = new XMLHttpRequest(), y = this.currXhrId++, S = this.pendingRequests[y] = {
6961
6961
  xhr: v
6962
6962
  };
6963
6963
  v.open("GET", this.url), v.withCredentials = this.withCredentials;
@@ -6965,35 +6965,35 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
6965
6965
  const w = this.httpHeaders[m];
6966
6966
  w !== void 0 && v.setRequestHeader(m, w);
6967
6967
  }
6968
- return this.isHttp && "begin" in f && "end" in f ? (v.setRequestHeader("Range", `bytes=${f.begin}-${f.end - 1}`), x.expectedStatus = o) : x.expectedStatus = s, v.responseType = "arraybuffer", f.onError && (v.onerror = function(m) {
6968
+ return this.isHttp && "begin" in f && "end" in f ? (v.setRequestHeader("Range", `bytes=${f.begin}-${f.end - 1}`), S.expectedStatus = o) : S.expectedStatus = s, v.responseType = "arraybuffer", f.onError && (v.onerror = function(m) {
6969
6969
  f.onError(v.status);
6970
- }), v.onreadystatechange = this.onStateChange.bind(this, y), v.onprogress = this.onProgress.bind(this, y), x.onHeadersReceived = f.onHeadersReceived, x.onDone = f.onDone, x.onError = f.onError, x.onProgress = f.onProgress, v.send(null), y;
6970
+ }), v.onreadystatechange = this.onStateChange.bind(this, y), v.onprogress = this.onProgress.bind(this, y), S.onHeadersReceived = f.onHeadersReceived, S.onDone = f.onDone, S.onError = f.onError, S.onProgress = f.onProgress, v.send(null), y;
6971
6971
  }
6972
6972
  onProgress(f, v) {
6973
- var x;
6973
+ var S;
6974
6974
  const y = this.pendingRequests[f];
6975
- y && ((x = y.onProgress) == null || x.call(y, v));
6975
+ y && ((S = y.onProgress) == null || S.call(y, v));
6976
6976
  }
6977
6977
  onStateChange(f, v) {
6978
- var _, S, F;
6978
+ var _, x, F;
6979
6979
  const y = this.pendingRequests[f];
6980
6980
  if (!y)
6981
6981
  return;
6982
- const x = y.xhr;
6983
- if (x.readyState >= 2 && y.onHeadersReceived && (y.onHeadersReceived(), delete y.onHeadersReceived), x.readyState !== 4 || !(f in this.pendingRequests))
6982
+ const S = y.xhr;
6983
+ if (S.readyState >= 2 && y.onHeadersReceived && (y.onHeadersReceived(), delete y.onHeadersReceived), S.readyState !== 4 || !(f in this.pendingRequests))
6984
6984
  return;
6985
- if (delete this.pendingRequests[f], x.status === 0 && this.isHttp) {
6986
- (_ = y.onError) == null || _.call(y, x.status);
6985
+ if (delete this.pendingRequests[f], S.status === 0 && this.isHttp) {
6986
+ (_ = y.onError) == null || _.call(y, S.status);
6987
6987
  return;
6988
6988
  }
6989
- const m = x.status || s;
6989
+ const m = S.status || s;
6990
6990
  if (!(m === s && y.expectedStatus === o) && m !== y.expectedStatus) {
6991
- (S = y.onError) == null || S.call(y, x.status);
6991
+ (x = y.onError) == null || x.call(y, S.status);
6992
6992
  return;
6993
6993
  }
6994
- const k = h(x);
6994
+ const k = h(S);
6995
6995
  if (m === o) {
6996
- const A = x.getResponseHeader("Content-Range"), D = /bytes (\d+)-(\d+)\/(\d+)/.exec(A);
6996
+ const A = S.getResponseHeader("Content-Range"), D = /bytes (\d+)-(\d+)\/(\d+)/.exec(A);
6997
6997
  y.onDone({
6998
6998
  begin: parseInt(D[1], 10),
6999
6999
  chunk: k
@@ -7001,7 +7001,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7001
7001
  } else k ? y.onDone({
7002
7002
  begin: 0,
7003
7003
  chunk: k
7004
- }) : (F = y.onError) == null || F.call(y, x.status);
7004
+ }) : (F = y.onError) == null || F.call(y, S.status);
7005
7005
  }
7006
7006
  getRequestXhr(f) {
7007
7007
  return this.pendingRequests[f].xhr;
@@ -7053,7 +7053,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7053
7053
  }
7054
7054
  _onHeadersReceived() {
7055
7055
  const f = this._fullRequestId, v = this._manager.getRequestXhr(f), y = (w) => v.getResponseHeader(w), {
7056
- allowRangeRequests: x,
7056
+ allowRangeRequests: S,
7057
7057
  suggestedLength: m
7058
7058
  } = (0, a.validateRangeRequestCapabilities)({
7059
7059
  getResponseHeader: y,
@@ -7061,7 +7061,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7061
7061
  rangeChunkSize: this._rangeChunkSize,
7062
7062
  disableRange: this._disableRange
7063
7063
  });
7064
- x && (this._isRangeSupported = !0), this._contentLength = m || this._contentLength, this._filename = (0, a.extractFilenameFromHeader)(y), this._isRangeSupported && this._manager.abortRequest(f), this._headersReceivedCapability.resolve();
7064
+ S && (this._isRangeSupported = !0), this._contentLength = m || this._contentLength, this._filename = (0, a.extractFilenameFromHeader)(y), this._isRangeSupported && this._manager.abortRequest(f), this._headersReceivedCapability.resolve();
7065
7065
  }
7066
7066
  _onDone(f) {
7067
7067
  if (f && (this._requests.length > 0 ? this._requests.shift().resolve({
@@ -7133,12 +7133,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7133
7133
  class p {
7134
7134
  constructor(f, v, y) {
7135
7135
  this._manager = f;
7136
- const x = {
7136
+ const S = {
7137
7137
  onDone: this._onDone.bind(this),
7138
7138
  onError: this._onError.bind(this),
7139
7139
  onProgress: this._onProgress.bind(this)
7140
7140
  };
7141
- this._url = f.url, this._requestId = f.requestRange(v, y, x), this._requests = [], this._queuedChunk = null, this._done = !1, this._storedError = void 0, this.onProgress = null, this.onClosed = null;
7141
+ this._url = f.url, this._requestId = f.requestRange(v, y, S), this._requests = [], this._queuedChunk = null, this._done = !1, this._storedError = void 0, this.onProgress = null, this.onClosed = null;
7142
7142
  }
7143
7143
  _close() {
7144
7144
  var f;
@@ -7210,38 +7210,38 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7210
7210
  var n = r(1), a = r(20);
7211
7211
  const s = /^file:\/\/\/[a-zA-Z]:\//;
7212
7212
  function o(y) {
7213
- const x = require$$5, m = x.parse(y);
7214
- return m.protocol === "file:" || m.host ? m : /^[a-z]:[/\\]/i.test(y) ? x.parse(`file:///${y}`) : (m.host || (m.protocol = "file:"), m);
7213
+ const S = require$$5, m = S.parse(y);
7214
+ return m.protocol === "file:" || m.host ? m : /^[a-z]:[/\\]/i.test(y) ? S.parse(`file:///${y}`) : (m.host || (m.protocol = "file:"), m);
7215
7215
  }
7216
7216
  class h {
7217
- constructor(x) {
7218
- this.source = x, this.url = o(x.url), this.isHttp = this.url.protocol === "http:" || this.url.protocol === "https:", this.isFsUrl = this.url.protocol === "file:", this.httpHeaders = this.isHttp && x.httpHeaders || {}, this._fullRequestReader = null, this._rangeRequestReaders = [];
7217
+ constructor(S) {
7218
+ this.source = S, this.url = o(S.url), this.isHttp = this.url.protocol === "http:" || this.url.protocol === "https:", this.isFsUrl = this.url.protocol === "file:", this.httpHeaders = this.isHttp && S.httpHeaders || {}, this._fullRequestReader = null, this._rangeRequestReaders = [];
7219
7219
  }
7220
7220
  get _progressiveDataLength() {
7221
- var x;
7222
- return ((x = this._fullRequestReader) == null ? void 0 : x._loaded) ?? 0;
7221
+ var S;
7222
+ return ((S = this._fullRequestReader) == null ? void 0 : S._loaded) ?? 0;
7223
7223
  }
7224
7224
  getFullReader() {
7225
7225
  return (0, n.assert)(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = this.isFsUrl ? new f(this) : new p(this), this._fullRequestReader;
7226
7226
  }
7227
- getRangeReader(x, m) {
7227
+ getRangeReader(S, m) {
7228
7228
  if (m <= this._progressiveDataLength)
7229
7229
  return null;
7230
- const w = this.isFsUrl ? new v(this, x, m) : new g(this, x, m);
7230
+ const w = this.isFsUrl ? new v(this, S, m) : new g(this, S, m);
7231
7231
  return this._rangeRequestReaders.push(w), w;
7232
7232
  }
7233
- cancelAllRequests(x) {
7233
+ cancelAllRequests(S) {
7234
7234
  var m;
7235
- (m = this._fullRequestReader) == null || m.cancel(x);
7235
+ (m = this._fullRequestReader) == null || m.cancel(S);
7236
7236
  for (const w of this._rangeRequestReaders.slice(0))
7237
- w.cancel(x);
7237
+ w.cancel(S);
7238
7238
  }
7239
7239
  }
7240
7240
  e.PDFNodeStream = h;
7241
7241
  class d {
7242
- constructor(x) {
7243
- this._url = x.url, this._done = !1, this._storedError = null, this.onProgress = null;
7244
- const m = x.source;
7242
+ constructor(S) {
7243
+ this._url = S.url, this._done = !1, this._storedError = null, this.onProgress = null;
7244
+ const m = S.source;
7245
7245
  this._contentLength = m.length, this._loaded = 0, this._filename = null, this._disableRange = m.disableRange || !1, this._rangeChunkSize = m.rangeChunkSize, !this._rangeChunkSize && !this._disableRange && (this._disableRange = !0), this._isStreamingSupported = !m.disableStream, this._isRangeSupported = !m.disableRange, this._readableStream = null, this._readCapability = new n.PromiseCapability(), this._headersCapability = new n.PromiseCapability();
7246
7246
  }
7247
7247
  get headersReady() {
@@ -7268,39 +7268,39 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7268
7268
  };
7269
7269
  if (this._storedError)
7270
7270
  throw this._storedError;
7271
- const x = this._readableStream.read();
7272
- return x === null ? (this._readCapability = new n.PromiseCapability(), this.read()) : (this._loaded += x.length, (w = this.onProgress) == null || w.call(this, {
7271
+ const S = this._readableStream.read();
7272
+ return S === null ? (this._readCapability = new n.PromiseCapability(), this.read()) : (this._loaded += S.length, (w = this.onProgress) == null || w.call(this, {
7273
7273
  loaded: this._loaded,
7274
7274
  total: this._contentLength
7275
7275
  }), {
7276
- value: new Uint8Array(x).buffer,
7276
+ value: new Uint8Array(S).buffer,
7277
7277
  done: !1
7278
7278
  });
7279
7279
  }
7280
- cancel(x) {
7280
+ cancel(S) {
7281
7281
  if (!this._readableStream) {
7282
- this._error(x);
7282
+ this._error(S);
7283
7283
  return;
7284
7284
  }
7285
- this._readableStream.destroy(x);
7285
+ this._readableStream.destroy(S);
7286
7286
  }
7287
- _error(x) {
7288
- this._storedError = x, this._readCapability.resolve();
7287
+ _error(S) {
7288
+ this._storedError = S, this._readCapability.resolve();
7289
7289
  }
7290
- _setReadableStream(x) {
7291
- this._readableStream = x, x.on("readable", () => {
7290
+ _setReadableStream(S) {
7291
+ this._readableStream = S, S.on("readable", () => {
7292
7292
  this._readCapability.resolve();
7293
- }), x.on("end", () => {
7294
- x.destroy(), this._done = !0, this._readCapability.resolve();
7295
- }), x.on("error", (m) => {
7293
+ }), S.on("end", () => {
7294
+ S.destroy(), this._done = !0, this._readCapability.resolve();
7295
+ }), S.on("error", (m) => {
7296
7296
  this._error(m);
7297
7297
  }), !this._isStreamingSupported && this._isRangeSupported && this._error(new n.AbortException("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
7298
7298
  }
7299
7299
  }
7300
7300
  class l {
7301
- constructor(x) {
7302
- this._url = x.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = new n.PromiseCapability();
7303
- const m = x.source;
7301
+ constructor(S) {
7302
+ this._url = S.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = new n.PromiseCapability();
7303
+ const m = S.source;
7304
7304
  this._isStreamingSupported = !m.disableStream;
7305
7305
  }
7306
7306
  get isStreamingSupported() {
@@ -7315,35 +7315,35 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7315
7315
  };
7316
7316
  if (this._storedError)
7317
7317
  throw this._storedError;
7318
- const x = this._readableStream.read();
7319
- return x === null ? (this._readCapability = new n.PromiseCapability(), this.read()) : (this._loaded += x.length, (w = this.onProgress) == null || w.call(this, {
7318
+ const S = this._readableStream.read();
7319
+ return S === null ? (this._readCapability = new n.PromiseCapability(), this.read()) : (this._loaded += S.length, (w = this.onProgress) == null || w.call(this, {
7320
7320
  loaded: this._loaded
7321
7321
  }), {
7322
- value: new Uint8Array(x).buffer,
7322
+ value: new Uint8Array(S).buffer,
7323
7323
  done: !1
7324
7324
  });
7325
7325
  }
7326
- cancel(x) {
7326
+ cancel(S) {
7327
7327
  if (!this._readableStream) {
7328
- this._error(x);
7328
+ this._error(S);
7329
7329
  return;
7330
7330
  }
7331
- this._readableStream.destroy(x);
7331
+ this._readableStream.destroy(S);
7332
7332
  }
7333
- _error(x) {
7334
- this._storedError = x, this._readCapability.resolve();
7333
+ _error(S) {
7334
+ this._storedError = S, this._readCapability.resolve();
7335
7335
  }
7336
- _setReadableStream(x) {
7337
- this._readableStream = x, x.on("readable", () => {
7336
+ _setReadableStream(S) {
7337
+ this._readableStream = S, S.on("readable", () => {
7338
7338
  this._readCapability.resolve();
7339
- }), x.on("end", () => {
7340
- x.destroy(), this._done = !0, this._readCapability.resolve();
7341
- }), x.on("error", (m) => {
7339
+ }), S.on("end", () => {
7340
+ S.destroy(), this._done = !0, this._readCapability.resolve();
7341
+ }), S.on("error", (m) => {
7342
7342
  this._error(m);
7343
7343
  }), this._storedError && this._readableStream.destroy(this._storedError);
7344
7344
  }
7345
7345
  }
7346
- function u(y, x) {
7346
+ function u(y, S) {
7347
7347
  return {
7348
7348
  protocol: y.protocol,
7349
7349
  auth: y.auth,
@@ -7351,12 +7351,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7351
7351
  port: y.port,
7352
7352
  path: y.path,
7353
7353
  method: "GET",
7354
- headers: x
7354
+ headers: S
7355
7355
  };
7356
7356
  }
7357
7357
  class p extends d {
7358
- constructor(x) {
7359
- super(x);
7358
+ constructor(S) {
7359
+ super(S);
7360
7360
  const m = (w) => {
7361
7361
  if (w.statusCode === 404) {
7362
7362
  const F = new n.MissingPDFException(`Missing PDF "${this._url}".`);
@@ -7366,21 +7366,21 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7366
7366
  this._headersCapability.resolve(), this._setReadableStream(w);
7367
7367
  const k = (F) => this._readableStream.headers[F.toLowerCase()], {
7368
7368
  allowRangeRequests: _,
7369
- suggestedLength: S
7369
+ suggestedLength: x
7370
7370
  } = (0, a.validateRangeRequestCapabilities)({
7371
7371
  getResponseHeader: k,
7372
- isHttp: x.isHttp,
7372
+ isHttp: S.isHttp,
7373
7373
  rangeChunkSize: this._rangeChunkSize,
7374
7374
  disableRange: this._disableRange
7375
7375
  });
7376
- this._isRangeSupported = _, this._contentLength = S || this._contentLength, this._filename = (0, a.extractFilenameFromHeader)(k);
7376
+ this._isRangeSupported = _, this._contentLength = x || this._contentLength, this._filename = (0, a.extractFilenameFromHeader)(k);
7377
7377
  };
7378
7378
  if (this._request = null, this._url.protocol === "http:") {
7379
7379
  const w = require$$5;
7380
- this._request = w.request(u(this._url, x.httpHeaders), m);
7380
+ this._request = w.request(u(this._url, S.httpHeaders), m);
7381
7381
  } else {
7382
7382
  const w = require$$5;
7383
- this._request = w.request(u(this._url, x.httpHeaders), m);
7383
+ this._request = w.request(u(this._url, S.httpHeaders), m);
7384
7384
  }
7385
7385
  this._request.on("error", (w) => {
7386
7386
  this._storedError = w, this._headersCapability.reject(w);
@@ -7388,17 +7388,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7388
7388
  }
7389
7389
  }
7390
7390
  class g extends l {
7391
- constructor(x, m, w) {
7392
- super(x), this._httpHeaders = {};
7393
- for (const _ in x.httpHeaders) {
7394
- const S = x.httpHeaders[_];
7395
- S !== void 0 && (this._httpHeaders[_] = S);
7391
+ constructor(S, m, w) {
7392
+ super(S), this._httpHeaders = {};
7393
+ for (const _ in S.httpHeaders) {
7394
+ const x = S.httpHeaders[_];
7395
+ x !== void 0 && (this._httpHeaders[_] = x);
7396
7396
  }
7397
7397
  this._httpHeaders.Range = `bytes=${m}-${w - 1}`;
7398
7398
  const k = (_) => {
7399
7399
  if (_.statusCode === 404) {
7400
- const S = new n.MissingPDFException(`Missing PDF "${this._url}".`);
7401
- this._storedError = S;
7400
+ const x = new n.MissingPDFException(`Missing PDF "${this._url}".`);
7401
+ this._storedError = x;
7402
7402
  return;
7403
7403
  }
7404
7404
  this._setReadableStream(_);
@@ -7416,8 +7416,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7416
7416
  }
7417
7417
  }
7418
7418
  class f extends d {
7419
- constructor(x) {
7420
- super(x);
7419
+ constructor(S) {
7420
+ super(S);
7421
7421
  let m = decodeURIComponent(this._url.path);
7422
7422
  s.test(this._url.href) && (m = m.replace(/^\//, ""));
7423
7423
  const w = require$$5;
@@ -7431,8 +7431,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7431
7431
  }
7432
7432
  }
7433
7433
  class v extends l {
7434
- constructor(x, m, w) {
7435
- super(x);
7434
+ constructor(S, m, w) {
7435
+ super(S);
7436
7436
  let k = decodeURIComponent(this._url.path);
7437
7437
  s.test(this._url.href) && (k = k.replace(/^\//, ""));
7438
7438
  const _ = require$$5;
@@ -7454,20 +7454,20 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7454
7454
  fontStyle: "normal",
7455
7455
  fontWeight: "normal",
7456
7456
  fillColor: "#000000"
7457
- }, o = "http://www.w3.org/XML/1998/namespace", h = "http://www.w3.org/1999/xlink", d = ["butt", "round", "square"], l = ["miter", "round", "bevel"], u = function(_, S = "", F = !1) {
7457
+ }, o = "http://www.w3.org/XML/1998/namespace", h = "http://www.w3.org/1999/xlink", d = ["butt", "round", "square"], l = ["miter", "round", "bevel"], u = function(_, x = "", F = !1) {
7458
7458
  if (URL.createObjectURL && typeof Blob < "u" && !F)
7459
7459
  return URL.createObjectURL(new Blob([_], {
7460
- type: S
7460
+ type: x
7461
7461
  }));
7462
7462
  const A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
7463
- let D = `data:${S};base64,`;
7463
+ let D = `data:${x};base64,`;
7464
7464
  for (let T = 0, M = _.length; T < M; T += 3) {
7465
7465
  const C = _[T] & 255, R = _[T + 1] & 255, O = _[T + 2] & 255, $ = C >> 2, K = (C & 3) << 4 | R >> 4, J = T + 1 < M ? (R & 15) << 2 | O >> 6 : 64, Y = T + 2 < M ? O & 63 : 64;
7466
7466
  D += A[$] + A[K] + A[J] + A[Y];
7467
7467
  }
7468
7468
  return D;
7469
7469
  }, p = function() {
7470
- const _ = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]), S = 12, F = new Int32Array(256);
7470
+ const _ = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]), x = 12, F = new Int32Array(256);
7471
7471
  for (let O = 0; O < 256; O++) {
7472
7472
  let $ = O;
7473
7473
  for (let K = 0; K < 8; K++)
@@ -7549,9 +7549,9 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7549
7549
  P[E++] ^= 255;
7550
7550
  }
7551
7551
  }
7552
- const z = new Uint8Array([Y >> 24 & 255, Y >> 16 & 255, Y >> 8 & 255, Y & 255, se >> 24 & 255, se >> 16 & 255, se >> 8 & 255, se & 255, B, V, 0, 0, 0]), G = M(P), H = _.length + S * 3 + z.length + G.length, ee = new Uint8Array(H);
7552
+ const z = new Uint8Array([Y >> 24 & 255, Y >> 16 & 255, Y >> 8 & 255, Y & 255, se >> 24 & 255, se >> 16 & 255, se >> 8 & 255, se & 255, B, V, 0, 0, 0]), G = M(P), H = _.length + x * 3 + z.length + G.length, ee = new Uint8Array(H);
7553
7553
  let ce = 0;
7554
- return ee.set(_, ce), ce += _.length, D("IHDR", z, ee, ce), ce += S + z.length, D("IDATA", G, ee, ce), ce += S + G.length, D("IEND", new Uint8Array(0), ee, ce), u(ee, "image/png", K);
7554
+ return ee.set(_, ce), ce += _.length, D("IHDR", z, ee, ce), ce += x + z.length, D("IDATA", G, ee, ce), ce += x + G.length, D("IEND", new Uint8Array(0), ee, ce), u(ee, "image/png", K);
7555
7555
  }
7556
7556
  return function($, K, J) {
7557
7557
  const Y = $.kind === void 0 ? a.ImageKind.GRAYSCALE_1BPP : $.kind;
@@ -7565,73 +7565,73 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7565
7565
  clone() {
7566
7566
  return Object.create(this);
7567
7567
  }
7568
- setCurrentPoint(S, F) {
7569
- this.x = S, this.y = F;
7568
+ setCurrentPoint(x, F) {
7569
+ this.x = x, this.y = F;
7570
7570
  }
7571
7571
  }
7572
7572
  function f(_) {
7573
- let S = [];
7573
+ let x = [];
7574
7574
  const F = [];
7575
7575
  for (const A of _) {
7576
7576
  if (A.fn === "save") {
7577
- S.push({
7577
+ x.push({
7578
7578
  fnId: 92,
7579
7579
  fn: "group",
7580
7580
  items: []
7581
- }), F.push(S), S = S.at(-1).items;
7581
+ }), F.push(x), x = x.at(-1).items;
7582
7582
  continue;
7583
7583
  }
7584
- A.fn === "restore" ? S = F.pop() : S.push(A);
7584
+ A.fn === "restore" ? x = F.pop() : x.push(A);
7585
7585
  }
7586
- return S;
7586
+ return x;
7587
7587
  }
7588
7588
  function v(_) {
7589
7589
  if (Number.isInteger(_))
7590
7590
  return _.toString();
7591
- const S = _.toFixed(10);
7592
- let F = S.length - 1;
7593
- if (S[F] !== "0")
7594
- return S;
7591
+ const x = _.toFixed(10);
7592
+ let F = x.length - 1;
7593
+ if (x[F] !== "0")
7594
+ return x;
7595
7595
  do
7596
7596
  F--;
7597
- while (S[F] === "0");
7598
- return S.substring(0, S[F] === "." ? F : F + 1);
7597
+ while (x[F] === "0");
7598
+ return x.substring(0, x[F] === "." ? F : F + 1);
7599
7599
  }
7600
7600
  function y(_) {
7601
7601
  if (_[4] === 0 && _[5] === 0) {
7602
7602
  if (_[1] === 0 && _[2] === 0)
7603
7603
  return _[0] === 1 && _[3] === 1 ? "" : `scale(${v(_[0])} ${v(_[3])})`;
7604
7604
  if (_[0] === _[3] && _[1] === -_[2]) {
7605
- const S = Math.acos(_[0]) * 180 / Math.PI;
7606
- return `rotate(${v(S)})`;
7605
+ const x = Math.acos(_[0]) * 180 / Math.PI;
7606
+ return `rotate(${v(x)})`;
7607
7607
  }
7608
7608
  } else if (_[0] === 1 && _[1] === 0 && _[2] === 0 && _[3] === 1)
7609
7609
  return `translate(${v(_[4])} ${v(_[5])})`;
7610
7610
  return `matrix(${v(_[0])} ${v(_[1])} ${v(_[2])} ${v(_[3])} ${v(_[4])} ${v(_[5])})`;
7611
7611
  }
7612
- let x = 0, m = 0, w = 0;
7612
+ let S = 0, m = 0, w = 0;
7613
7613
  class k {
7614
- constructor(S, F, A = !1) {
7615
- (0, n.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."), this.svgFactory = new n.DOMSVGFactory(), this.current = new g(), this.transformMatrix = a.IDENTITY_MATRIX, this.transformStack = [], this.extraStack = [], this.commonObjs = S, this.objs = F, this.pendingClip = null, this.pendingEOFill = !1, this.embedFonts = !1, this.embeddedFonts = /* @__PURE__ */ Object.create(null), this.cssStyle = null, this.forceDataSchema = !!A, this._operatorIdMapping = [];
7614
+ constructor(x, F, A = !1) {
7615
+ (0, n.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."), this.svgFactory = new n.DOMSVGFactory(), this.current = new g(), this.transformMatrix = a.IDENTITY_MATRIX, this.transformStack = [], this.extraStack = [], this.commonObjs = x, this.objs = F, this.pendingClip = null, this.pendingEOFill = !1, this.embedFonts = !1, this.embeddedFonts = /* @__PURE__ */ Object.create(null), this.cssStyle = null, this.forceDataSchema = !!A, this._operatorIdMapping = [];
7616
7616
  for (const D in a.OPS)
7617
7617
  this._operatorIdMapping[a.OPS[D]] = D;
7618
7618
  }
7619
- getObject(S, F = null) {
7620
- return typeof S == "string" ? S.startsWith("g_") ? this.commonObjs.get(S) : this.objs.get(S) : F;
7619
+ getObject(x, F = null) {
7620
+ return typeof x == "string" ? x.startsWith("g_") ? this.commonObjs.get(x) : this.objs.get(x) : F;
7621
7621
  }
7622
7622
  save() {
7623
7623
  this.transformStack.push(this.transformMatrix);
7624
- const S = this.current;
7625
- this.extraStack.push(S), this.current = S.clone();
7624
+ const x = this.current;
7625
+ this.extraStack.push(x), this.current = x.clone();
7626
7626
  }
7627
7627
  restore() {
7628
7628
  this.transformMatrix = this.transformStack.pop(), this.current = this.extraStack.pop(), this.pendingClip = null, this.tgrp = null;
7629
7629
  }
7630
- group(S) {
7631
- this.save(), this.executeOpTree(S), this.restore();
7630
+ group(x) {
7631
+ this.save(), this.executeOpTree(x), this.restore();
7632
7632
  }
7633
- loadDependencies(S) {
7634
- const F = S.fnArray, A = S.argsArray;
7633
+ loadDependencies(x) {
7634
+ const F = x.fnArray, A = x.argsArray;
7635
7635
  for (let D = 0, T = F.length; D < T; D++)
7636
7636
  if (F[D] === a.OPS.dependency)
7637
7637
  for (const M of A[D]) {
@@ -7642,17 +7642,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7642
7642
  }
7643
7643
  return Promise.all(this.current.dependencies);
7644
7644
  }
7645
- transform(S, F, A, D, T, M) {
7646
- const C = [S, F, A, D, T, M];
7645
+ transform(x, F, A, D, T, M) {
7646
+ const C = [x, F, A, D, T, M];
7647
7647
  this.transformMatrix = a.Util.transform(this.transformMatrix, C), this.tgrp = null;
7648
7648
  }
7649
- getSVG(S, F) {
7649
+ getSVG(x, F) {
7650
7650
  this.viewport = F;
7651
7651
  const A = this._initialize(F);
7652
- return this.loadDependencies(S).then(() => (this.transformMatrix = a.IDENTITY_MATRIX, this.executeOpTree(this.convertOpList(S)), A));
7652
+ return this.loadDependencies(x).then(() => (this.transformMatrix = a.IDENTITY_MATRIX, this.executeOpTree(this.convertOpList(x)), A));
7653
7653
  }
7654
- convertOpList(S) {
7655
- const F = this._operatorIdMapping, A = S.argsArray, D = S.fnArray, T = [];
7654
+ convertOpList(x) {
7655
+ const F = this._operatorIdMapping, A = x.argsArray, D = x.fnArray, T = [];
7656
7656
  for (let M = 0, C = D.length; M < C; M++) {
7657
7657
  const R = D[M];
7658
7658
  T.push({
@@ -7663,8 +7663,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7663
7663
  }
7664
7664
  return f(T);
7665
7665
  }
7666
- executeOpTree(S) {
7667
- for (const F of S) {
7666
+ executeOpTree(x) {
7667
+ for (const F of x) {
7668
7668
  const A = F.fn, D = F.fnId, T = F.args;
7669
7669
  switch (D | 0) {
7670
7670
  case a.OPS.beginText:
@@ -7822,34 +7822,34 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7822
7822
  }
7823
7823
  }
7824
7824
  }
7825
- setWordSpacing(S) {
7826
- this.current.wordSpacing = S;
7825
+ setWordSpacing(x) {
7826
+ this.current.wordSpacing = x;
7827
7827
  }
7828
- setCharSpacing(S) {
7829
- this.current.charSpacing = S;
7828
+ setCharSpacing(x) {
7829
+ this.current.charSpacing = x;
7830
7830
  }
7831
7831
  nextLine() {
7832
7832
  this.moveText(0, this.current.leading);
7833
7833
  }
7834
- setTextMatrix(S, F, A, D, T, M) {
7834
+ setTextMatrix(x, F, A, D, T, M) {
7835
7835
  const C = this.current;
7836
- C.textMatrix = C.lineMatrix = [S, F, A, D, T, M], C.textMatrixScale = Math.hypot(S, F), C.x = C.lineX = 0, C.y = C.lineY = 0, C.xcoords = [], C.ycoords = [], C.tspan = this.svgFactory.createElement("svg:tspan"), C.tspan.setAttributeNS(null, "font-family", C.fontFamily), C.tspan.setAttributeNS(null, "font-size", `${v(C.fontSize)}px`), C.tspan.setAttributeNS(null, "y", v(-C.y)), C.txtElement = this.svgFactory.createElement("svg:text"), C.txtElement.append(C.tspan);
7836
+ C.textMatrix = C.lineMatrix = [x, F, A, D, T, M], C.textMatrixScale = Math.hypot(x, F), C.x = C.lineX = 0, C.y = C.lineY = 0, C.xcoords = [], C.ycoords = [], C.tspan = this.svgFactory.createElement("svg:tspan"), C.tspan.setAttributeNS(null, "font-family", C.fontFamily), C.tspan.setAttributeNS(null, "font-size", `${v(C.fontSize)}px`), C.tspan.setAttributeNS(null, "y", v(-C.y)), C.txtElement = this.svgFactory.createElement("svg:text"), C.txtElement.append(C.tspan);
7837
7837
  }
7838
7838
  beginText() {
7839
- const S = this.current;
7840
- S.x = S.lineX = 0, S.y = S.lineY = 0, S.textMatrix = a.IDENTITY_MATRIX, S.lineMatrix = a.IDENTITY_MATRIX, S.textMatrixScale = 1, S.tspan = this.svgFactory.createElement("svg:tspan"), S.txtElement = this.svgFactory.createElement("svg:text"), S.txtgrp = this.svgFactory.createElement("svg:g"), S.xcoords = [], S.ycoords = [];
7839
+ const x = this.current;
7840
+ x.x = x.lineX = 0, x.y = x.lineY = 0, x.textMatrix = a.IDENTITY_MATRIX, x.lineMatrix = a.IDENTITY_MATRIX, x.textMatrixScale = 1, x.tspan = this.svgFactory.createElement("svg:tspan"), x.txtElement = this.svgFactory.createElement("svg:text"), x.txtgrp = this.svgFactory.createElement("svg:g"), x.xcoords = [], x.ycoords = [];
7841
7841
  }
7842
- moveText(S, F) {
7842
+ moveText(x, F) {
7843
7843
  const A = this.current;
7844
- A.x = A.lineX += S, A.y = A.lineY += F, A.xcoords = [], A.ycoords = [], A.tspan = this.svgFactory.createElement("svg:tspan"), A.tspan.setAttributeNS(null, "font-family", A.fontFamily), A.tspan.setAttributeNS(null, "font-size", `${v(A.fontSize)}px`), A.tspan.setAttributeNS(null, "y", v(-A.y));
7844
+ A.x = A.lineX += x, A.y = A.lineY += F, A.xcoords = [], A.ycoords = [], A.tspan = this.svgFactory.createElement("svg:tspan"), A.tspan.setAttributeNS(null, "font-family", A.fontFamily), A.tspan.setAttributeNS(null, "font-size", `${v(A.fontSize)}px`), A.tspan.setAttributeNS(null, "y", v(-A.y));
7845
7845
  }
7846
- showText(S) {
7846
+ showText(x) {
7847
7847
  const F = this.current, A = F.font, D = F.fontSize;
7848
7848
  if (D === 0)
7849
7849
  return;
7850
7850
  const T = F.fontSizeScale, M = F.charSpacing, C = F.wordSpacing, R = F.fontDirection, O = F.textHScale * R, $ = A.vertical, K = $ ? 1 : -1, J = A.defaultVMetrics, Y = D * F.fontMatrix[0];
7851
7851
  let se = 0;
7852
- for (const Q of S) {
7852
+ for (const Q of x) {
7853
7853
  if (Q === null) {
7854
7854
  se += R * C;
7855
7855
  continue;
@@ -7880,20 +7880,20 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7880
7880
  let V = F.textMatrix;
7881
7881
  F.textRise !== 0 && (V = V.slice(), V[5] += F.textRise), F.txtElement.setAttributeNS(null, "transform", `${y(V)} scale(${v(O)}, -1)`), F.txtElement.setAttributeNS(o, "xml:space", "preserve"), F.txtElement.append(F.tspan), F.txtgrp.append(F.txtElement), this._ensureTransformGroup().append(F.txtElement);
7882
7882
  }
7883
- setLeadingMoveText(S, F) {
7884
- this.setLeading(-F), this.moveText(S, F);
7883
+ setLeadingMoveText(x, F) {
7884
+ this.setLeading(-F), this.moveText(x, F);
7885
7885
  }
7886
- addFontStyle(S) {
7887
- if (!S.data)
7886
+ addFontStyle(x) {
7887
+ if (!x.data)
7888
7888
  throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');
7889
7889
  this.cssStyle || (this.cssStyle = this.svgFactory.createElement("svg:style"), this.cssStyle.setAttributeNS(null, "type", "text/css"), this.defs.append(this.cssStyle));
7890
- const F = u(S.data, S.mimetype, this.forceDataSchema);
7891
- this.cssStyle.textContent += `@font-face { font-family: "${S.loadedName}"; src: url(${F}); }
7890
+ const F = u(x.data, x.mimetype, this.forceDataSchema);
7891
+ this.cssStyle.textContent += `@font-face { font-family: "${x.loadedName}"; src: url(${F}); }
7892
7892
  `;
7893
7893
  }
7894
- setFont(S) {
7895
- const F = this.current, A = this.commonObjs.get(S[0]);
7896
- let D = S[1];
7894
+ setFont(x) {
7895
+ const F = this.current, A = this.commonObjs.get(x[0]);
7896
+ let D = x[1];
7897
7897
  F.font = A, this.embedFonts && !A.missingFile && !this.embeddedFonts[A.loadedName] && (this.addFontStyle(A), this.embeddedFonts[A.loadedName] = A), F.fontMatrix = A.fontMatrix || a.FONT_IDENTITY_MATRIX;
7898
7898
  let T = "normal";
7899
7899
  A.black ? T = "900" : A.bold && (T = "bold");
@@ -7902,51 +7902,51 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7902
7902
  }
7903
7903
  endText() {
7904
7904
  var F;
7905
- const S = this.current;
7906
- S.textRenderingMode & a.TextRenderingMode.ADD_TO_PATH_FLAG && ((F = S.txtElement) != null && F.hasChildNodes()) && (S.element = S.txtElement, this.clip("nonzero"), this.endPath());
7905
+ const x = this.current;
7906
+ x.textRenderingMode & a.TextRenderingMode.ADD_TO_PATH_FLAG && ((F = x.txtElement) != null && F.hasChildNodes()) && (x.element = x.txtElement, this.clip("nonzero"), this.endPath());
7907
7907
  }
7908
- setLineWidth(S) {
7909
- S > 0 && (this.current.lineWidth = S);
7908
+ setLineWidth(x) {
7909
+ x > 0 && (this.current.lineWidth = x);
7910
7910
  }
7911
- setLineCap(S) {
7912
- this.current.lineCap = d[S];
7911
+ setLineCap(x) {
7912
+ this.current.lineCap = d[x];
7913
7913
  }
7914
- setLineJoin(S) {
7915
- this.current.lineJoin = l[S];
7914
+ setLineJoin(x) {
7915
+ this.current.lineJoin = l[x];
7916
7916
  }
7917
- setMiterLimit(S) {
7918
- this.current.miterLimit = S;
7917
+ setMiterLimit(x) {
7918
+ this.current.miterLimit = x;
7919
7919
  }
7920
- setStrokeAlpha(S) {
7921
- this.current.strokeAlpha = S;
7920
+ setStrokeAlpha(x) {
7921
+ this.current.strokeAlpha = x;
7922
7922
  }
7923
- setStrokeRGBColor(S, F, A) {
7924
- this.current.strokeColor = a.Util.makeHexColor(S, F, A);
7923
+ setStrokeRGBColor(x, F, A) {
7924
+ this.current.strokeColor = a.Util.makeHexColor(x, F, A);
7925
7925
  }
7926
- setFillAlpha(S) {
7927
- this.current.fillAlpha = S;
7926
+ setFillAlpha(x) {
7927
+ this.current.fillAlpha = x;
7928
7928
  }
7929
- setFillRGBColor(S, F, A) {
7930
- this.current.fillColor = a.Util.makeHexColor(S, F, A), this.current.tspan = this.svgFactory.createElement("svg:tspan"), this.current.xcoords = [], this.current.ycoords = [];
7929
+ setFillRGBColor(x, F, A) {
7930
+ this.current.fillColor = a.Util.makeHexColor(x, F, A), this.current.tspan = this.svgFactory.createElement("svg:tspan"), this.current.xcoords = [], this.current.ycoords = [];
7931
7931
  }
7932
- setStrokeColorN(S) {
7933
- this.current.strokeColor = this._makeColorN_Pattern(S);
7932
+ setStrokeColorN(x) {
7933
+ this.current.strokeColor = this._makeColorN_Pattern(x);
7934
7934
  }
7935
- setFillColorN(S) {
7936
- this.current.fillColor = this._makeColorN_Pattern(S);
7935
+ setFillColorN(x) {
7936
+ this.current.fillColor = this._makeColorN_Pattern(x);
7937
7937
  }
7938
- shadingFill(S) {
7938
+ shadingFill(x) {
7939
7939
  const {
7940
7940
  width: F,
7941
7941
  height: A
7942
7942
  } = this.viewport, D = a.Util.inverseTransform(this.transformMatrix), [T, M, C, R] = a.Util.getAxialAlignedBoundingBox([0, 0, F, A], D), O = this.svgFactory.createElement("svg:rect");
7943
- O.setAttributeNS(null, "x", T), O.setAttributeNS(null, "y", M), O.setAttributeNS(null, "width", C - T), O.setAttributeNS(null, "height", R - M), O.setAttributeNS(null, "fill", this._makeShadingPattern(S)), this.current.fillAlpha < 1 && O.setAttributeNS(null, "fill-opacity", this.current.fillAlpha), this._ensureTransformGroup().append(O);
7943
+ O.setAttributeNS(null, "x", T), O.setAttributeNS(null, "y", M), O.setAttributeNS(null, "width", C - T), O.setAttributeNS(null, "height", R - M), O.setAttributeNS(null, "fill", this._makeShadingPattern(x)), this.current.fillAlpha < 1 && O.setAttributeNS(null, "fill-opacity", this.current.fillAlpha), this._ensureTransformGroup().append(O);
7944
7944
  }
7945
- _makeColorN_Pattern(S) {
7946
- return S[0] === "TilingPattern" ? this._makeTilingPattern(S) : this._makeShadingPattern(S);
7945
+ _makeColorN_Pattern(x) {
7946
+ return x[0] === "TilingPattern" ? this._makeTilingPattern(x) : this._makeShadingPattern(x);
7947
7947
  }
7948
- _makeTilingPattern(S) {
7949
- const F = S[1], A = S[2], D = S[3] || a.IDENTITY_MATRIX, [T, M, C, R] = S[4], O = S[5], $ = S[6], K = S[7], J = `shading${w++}`, [Y, se, B, V] = a.Util.normalizeRect([...a.Util.applyTransform([T, M], D), ...a.Util.applyTransform([C, R], D)]), [Q, I] = a.Util.singularValueDecompose2dScale(D), P = O * Q, E = $ * I, N = this.svgFactory.createElement("svg:pattern");
7948
+ _makeTilingPattern(x) {
7949
+ const F = x[1], A = x[2], D = x[3] || a.IDENTITY_MATRIX, [T, M, C, R] = x[4], O = x[5], $ = x[6], K = x[7], J = `shading${w++}`, [Y, se, B, V] = a.Util.normalizeRect([...a.Util.applyTransform([T, M], D), ...a.Util.applyTransform([C, R], D)]), [Q, I] = a.Util.singularValueDecompose2dScale(D), P = O * Q, E = $ * I, N = this.svgFactory.createElement("svg:pattern");
7950
7950
  N.setAttributeNS(null, "id", J), N.setAttributeNS(null, "patternUnits", "userSpaceOnUse"), N.setAttributeNS(null, "width", P), N.setAttributeNS(null, "height", E), N.setAttributeNS(null, "x", `${Y}`), N.setAttributeNS(null, "y", `${se}`);
7951
7951
  const z = this.svg, G = this.transformMatrix, H = this.current.fillColor, ee = this.current.strokeColor, ce = this.svgFactory.create(B - Y, V - se);
7952
7952
  if (this.svg = ce, this.transformMatrix = D, K === 2) {
@@ -7955,22 +7955,22 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7955
7955
  }
7956
7956
  return this.executeOpTree(this.convertOpList(A)), this.svg = z, this.transformMatrix = G, this.current.fillColor = H, this.current.strokeColor = ee, N.append(ce.childNodes[0]), this.defs.append(N), `url(#${J})`;
7957
7957
  }
7958
- _makeShadingPattern(S) {
7959
- switch (typeof S == "string" && (S = this.objs.get(S)), S[0]) {
7958
+ _makeShadingPattern(x) {
7959
+ switch (typeof x == "string" && (x = this.objs.get(x)), x[0]) {
7960
7960
  case "RadialAxial":
7961
- const F = `shading${w++}`, A = S[3];
7961
+ const F = `shading${w++}`, A = x[3];
7962
7962
  let D;
7963
- switch (S[1]) {
7963
+ switch (x[1]) {
7964
7964
  case "axial":
7965
- const T = S[4], M = S[5];
7965
+ const T = x[4], M = x[5];
7966
7966
  D = this.svgFactory.createElement("svg:linearGradient"), D.setAttributeNS(null, "id", F), D.setAttributeNS(null, "gradientUnits", "userSpaceOnUse"), D.setAttributeNS(null, "x1", T[0]), D.setAttributeNS(null, "y1", T[1]), D.setAttributeNS(null, "x2", M[0]), D.setAttributeNS(null, "y2", M[1]);
7967
7967
  break;
7968
7968
  case "radial":
7969
- const C = S[4], R = S[5], O = S[6], $ = S[7];
7969
+ const C = x[4], R = x[5], O = x[6], $ = x[7];
7970
7970
  D = this.svgFactory.createElement("svg:radialGradient"), D.setAttributeNS(null, "id", F), D.setAttributeNS(null, "gradientUnits", "userSpaceOnUse"), D.setAttributeNS(null, "cx", R[0]), D.setAttributeNS(null, "cy", R[1]), D.setAttributeNS(null, "r", $), D.setAttributeNS(null, "fx", C[0]), D.setAttributeNS(null, "fy", C[1]), D.setAttributeNS(null, "fr", O);
7971
7971
  break;
7972
7972
  default:
7973
- throw new Error(`Unknown RadialAxial type: ${S[1]}`);
7973
+ throw new Error(`Unknown RadialAxial type: ${x[1]}`);
7974
7974
  }
7975
7975
  for (const T of A) {
7976
7976
  const M = this.svgFactory.createElement("svg:stop");
@@ -7982,16 +7982,16 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
7982
7982
  case "Dummy":
7983
7983
  return "hotpink";
7984
7984
  default:
7985
- throw new Error(`Unknown IR type: ${S[0]}`);
7985
+ throw new Error(`Unknown IR type: ${x[0]}`);
7986
7986
  }
7987
7987
  }
7988
- setDash(S, F) {
7989
- this.current.dashArray = S, this.current.dashPhase = F;
7988
+ setDash(x, F) {
7989
+ this.current.dashArray = x, this.current.dashPhase = F;
7990
7990
  }
7991
- constructPath(S, F) {
7991
+ constructPath(x, F) {
7992
7992
  const A = this.current;
7993
7993
  let D = A.x, T = A.y, M = [], C = 0;
7994
- for (const R of S)
7994
+ for (const R of x)
7995
7995
  switch (R | 0) {
7996
7996
  case a.OPS.rectangle:
7997
7997
  D = F[C++], T = F[C++];
@@ -8017,55 +8017,55 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8017
8017
  M.push("Z");
8018
8018
  break;
8019
8019
  }
8020
- M = M.join(" "), A.path && S.length > 0 && S[0] !== a.OPS.rectangle && S[0] !== a.OPS.moveTo ? M = A.path.getAttributeNS(null, "d") + M : (A.path = this.svgFactory.createElement("svg:path"), this._ensureTransformGroup().append(A.path)), A.path.setAttributeNS(null, "d", M), A.path.setAttributeNS(null, "fill", "none"), A.element = A.path, A.setCurrentPoint(D, T);
8020
+ M = M.join(" "), A.path && x.length > 0 && x[0] !== a.OPS.rectangle && x[0] !== a.OPS.moveTo ? M = A.path.getAttributeNS(null, "d") + M : (A.path = this.svgFactory.createElement("svg:path"), this._ensureTransformGroup().append(A.path)), A.path.setAttributeNS(null, "d", M), A.path.setAttributeNS(null, "fill", "none"), A.element = A.path, A.setCurrentPoint(D, T);
8021
8021
  }
8022
8022
  endPath() {
8023
- const S = this.current;
8024
- if (S.path = null, !this.pendingClip)
8023
+ const x = this.current;
8024
+ if (x.path = null, !this.pendingClip)
8025
8025
  return;
8026
- if (!S.element) {
8026
+ if (!x.element) {
8027
8027
  this.pendingClip = null;
8028
8028
  return;
8029
8029
  }
8030
- const F = `clippath${x++}`, A = this.svgFactory.createElement("svg:clipPath");
8030
+ const F = `clippath${S++}`, A = this.svgFactory.createElement("svg:clipPath");
8031
8031
  A.setAttributeNS(null, "id", F), A.setAttributeNS(null, "transform", y(this.transformMatrix));
8032
- const D = S.element.cloneNode(!0);
8033
- if (this.pendingClip === "evenodd" ? D.setAttributeNS(null, "clip-rule", "evenodd") : D.setAttributeNS(null, "clip-rule", "nonzero"), this.pendingClip = null, A.append(D), this.defs.append(A), S.activeClipUrl) {
8034
- S.clipGroup = null;
8032
+ const D = x.element.cloneNode(!0);
8033
+ if (this.pendingClip === "evenodd" ? D.setAttributeNS(null, "clip-rule", "evenodd") : D.setAttributeNS(null, "clip-rule", "nonzero"), this.pendingClip = null, A.append(D), this.defs.append(A), x.activeClipUrl) {
8034
+ x.clipGroup = null;
8035
8035
  for (const T of this.extraStack)
8036
8036
  T.clipGroup = null;
8037
- A.setAttributeNS(null, "clip-path", S.activeClipUrl);
8037
+ A.setAttributeNS(null, "clip-path", x.activeClipUrl);
8038
8038
  }
8039
- S.activeClipUrl = `url(#${F})`, this.tgrp = null;
8039
+ x.activeClipUrl = `url(#${F})`, this.tgrp = null;
8040
8040
  }
8041
- clip(S) {
8042
- this.pendingClip = S;
8041
+ clip(x) {
8042
+ this.pendingClip = x;
8043
8043
  }
8044
8044
  closePath() {
8045
- const S = this.current;
8046
- if (S.path) {
8047
- const F = `${S.path.getAttributeNS(null, "d")}Z`;
8048
- S.path.setAttributeNS(null, "d", F);
8045
+ const x = this.current;
8046
+ if (x.path) {
8047
+ const F = `${x.path.getAttributeNS(null, "d")}Z`;
8048
+ x.path.setAttributeNS(null, "d", F);
8049
8049
  }
8050
8050
  }
8051
- setLeading(S) {
8052
- this.current.leading = -S;
8051
+ setLeading(x) {
8052
+ this.current.leading = -x;
8053
8053
  }
8054
- setTextRise(S) {
8055
- this.current.textRise = S;
8054
+ setTextRise(x) {
8055
+ this.current.textRise = x;
8056
8056
  }
8057
- setTextRenderingMode(S) {
8058
- this.current.textRenderingMode = S;
8057
+ setTextRenderingMode(x) {
8058
+ this.current.textRenderingMode = x;
8059
8059
  }
8060
- setHScale(S) {
8061
- this.current.textHScale = S / 100;
8060
+ setHScale(x) {
8061
+ this.current.textHScale = x / 100;
8062
8062
  }
8063
- setRenderingIntent(S) {
8063
+ setRenderingIntent(x) {
8064
8064
  }
8065
- setFlatness(S) {
8065
+ setFlatness(x) {
8066
8066
  }
8067
- setGState(S) {
8068
- for (const [F, A] of S)
8067
+ setGState(x) {
8068
+ for (const [F, A] of x)
8069
8069
  switch (F) {
8070
8070
  case "LW":
8071
8071
  this.setLineWidth(A);
@@ -8103,30 +8103,30 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8103
8103
  }
8104
8104
  }
8105
8105
  fill() {
8106
- const S = this.current;
8107
- S.element && (S.element.setAttributeNS(null, "fill", S.fillColor), S.element.setAttributeNS(null, "fill-opacity", S.fillAlpha), this.endPath());
8106
+ const x = this.current;
8107
+ x.element && (x.element.setAttributeNS(null, "fill", x.fillColor), x.element.setAttributeNS(null, "fill-opacity", x.fillAlpha), this.endPath());
8108
8108
  }
8109
8109
  stroke() {
8110
- const S = this.current;
8111
- S.element && (this._setStrokeAttributes(S.element), S.element.setAttributeNS(null, "fill", "none"), this.endPath());
8110
+ const x = this.current;
8111
+ x.element && (this._setStrokeAttributes(x.element), x.element.setAttributeNS(null, "fill", "none"), this.endPath());
8112
8112
  }
8113
- _setStrokeAttributes(S, F = 1) {
8113
+ _setStrokeAttributes(x, F = 1) {
8114
8114
  const A = this.current;
8115
8115
  let D = A.dashArray;
8116
8116
  F !== 1 && D.length > 0 && (D = D.map(function(T) {
8117
8117
  return F * T;
8118
- })), S.setAttributeNS(null, "stroke", A.strokeColor), S.setAttributeNS(null, "stroke-opacity", A.strokeAlpha), S.setAttributeNS(null, "stroke-miterlimit", v(A.miterLimit)), S.setAttributeNS(null, "stroke-linecap", A.lineCap), S.setAttributeNS(null, "stroke-linejoin", A.lineJoin), S.setAttributeNS(null, "stroke-width", v(F * A.lineWidth) + "px"), S.setAttributeNS(null, "stroke-dasharray", D.map(v).join(" ")), S.setAttributeNS(null, "stroke-dashoffset", v(F * A.dashPhase) + "px");
8118
+ })), x.setAttributeNS(null, "stroke", A.strokeColor), x.setAttributeNS(null, "stroke-opacity", A.strokeAlpha), x.setAttributeNS(null, "stroke-miterlimit", v(A.miterLimit)), x.setAttributeNS(null, "stroke-linecap", A.lineCap), x.setAttributeNS(null, "stroke-linejoin", A.lineJoin), x.setAttributeNS(null, "stroke-width", v(F * A.lineWidth) + "px"), x.setAttributeNS(null, "stroke-dasharray", D.map(v).join(" ")), x.setAttributeNS(null, "stroke-dashoffset", v(F * A.dashPhase) + "px");
8119
8119
  }
8120
8120
  eoFill() {
8121
- var S;
8122
- (S = this.current.element) == null || S.setAttributeNS(null, "fill-rule", "evenodd"), this.fill();
8121
+ var x;
8122
+ (x = this.current.element) == null || x.setAttributeNS(null, "fill-rule", "evenodd"), this.fill();
8123
8123
  }
8124
8124
  fillStroke() {
8125
8125
  this.stroke(), this.fill();
8126
8126
  }
8127
8127
  eoFillStroke() {
8128
- var S;
8129
- (S = this.current.element) == null || S.setAttributeNS(null, "fill-rule", "evenodd"), this.fillStroke();
8128
+ var x;
8129
+ (x = this.current.element) == null || x.setAttributeNS(null, "fill-rule", "evenodd"), this.fillStroke();
8130
8130
  }
8131
8131
  closeStroke() {
8132
8132
  this.closePath(), this.stroke();
@@ -8138,25 +8138,25 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8138
8138
  this.closePath(), this.eoFillStroke();
8139
8139
  }
8140
8140
  paintSolidColorImageMask() {
8141
- const S = this.svgFactory.createElement("svg:rect");
8142
- S.setAttributeNS(null, "x", "0"), S.setAttributeNS(null, "y", "0"), S.setAttributeNS(null, "width", "1px"), S.setAttributeNS(null, "height", "1px"), S.setAttributeNS(null, "fill", this.current.fillColor), this._ensureTransformGroup().append(S);
8141
+ const x = this.svgFactory.createElement("svg:rect");
8142
+ x.setAttributeNS(null, "x", "0"), x.setAttributeNS(null, "y", "0"), x.setAttributeNS(null, "width", "1px"), x.setAttributeNS(null, "height", "1px"), x.setAttributeNS(null, "fill", this.current.fillColor), this._ensureTransformGroup().append(x);
8143
8143
  }
8144
- paintImageXObject(S) {
8145
- const F = this.getObject(S);
8144
+ paintImageXObject(x) {
8145
+ const F = this.getObject(x);
8146
8146
  if (!F) {
8147
- (0, a.warn)(`Dependent image with object ID ${S} is not ready yet`);
8147
+ (0, a.warn)(`Dependent image with object ID ${x} is not ready yet`);
8148
8148
  return;
8149
8149
  }
8150
8150
  this.paintInlineImageXObject(F);
8151
8151
  }
8152
- paintInlineImageXObject(S, F) {
8153
- const A = S.width, D = S.height, T = p(S, this.forceDataSchema, !!F), M = this.svgFactory.createElement("svg:rect");
8152
+ paintInlineImageXObject(x, F) {
8153
+ const A = x.width, D = x.height, T = p(x, this.forceDataSchema, !!F), M = this.svgFactory.createElement("svg:rect");
8154
8154
  M.setAttributeNS(null, "x", "0"), M.setAttributeNS(null, "y", "0"), M.setAttributeNS(null, "width", v(A)), M.setAttributeNS(null, "height", v(D)), this.current.element = M, this.clip("nonzero");
8155
8155
  const C = this.svgFactory.createElement("svg:image");
8156
8156
  C.setAttributeNS(h, "xlink:href", T), C.setAttributeNS(null, "x", "0"), C.setAttributeNS(null, "y", v(-D)), C.setAttributeNS(null, "width", v(A) + "px"), C.setAttributeNS(null, "height", v(D) + "px"), C.setAttributeNS(null, "transform", `scale(${v(1 / A)} ${v(-1 / D)})`), F ? F.append(C) : this._ensureTransformGroup().append(C);
8157
8157
  }
8158
- paintImageMaskXObject(S) {
8159
- const F = this.getObject(S.data, S);
8158
+ paintImageMaskXObject(x) {
8159
+ const F = this.getObject(x.data, x);
8160
8160
  if (F.bitmap) {
8161
8161
  (0, a.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");
8162
8162
  return;
@@ -8168,24 +8168,24 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8168
8168
  const R = this.svgFactory.createElement("svg:rect");
8169
8169
  R.setAttributeNS(null, "x", "0"), R.setAttributeNS(null, "y", "0"), R.setAttributeNS(null, "width", v(D)), R.setAttributeNS(null, "height", v(T)), R.setAttributeNS(null, "fill", M), R.setAttributeNS(null, "mask", `url(#${A.maskId})`), this.defs.append(C), this._ensureTransformGroup().append(R), this.paintInlineImageXObject(F, C);
8170
8170
  }
8171
- paintFormXObjectBegin(S, F) {
8172
- if (Array.isArray(S) && S.length === 6 && this.transform(S[0], S[1], S[2], S[3], S[4], S[5]), F) {
8171
+ paintFormXObjectBegin(x, F) {
8172
+ if (Array.isArray(x) && x.length === 6 && this.transform(x[0], x[1], x[2], x[3], x[4], x[5]), F) {
8173
8173
  const A = F[2] - F[0], D = F[3] - F[1], T = this.svgFactory.createElement("svg:rect");
8174
8174
  T.setAttributeNS(null, "x", F[0]), T.setAttributeNS(null, "y", F[1]), T.setAttributeNS(null, "width", v(A)), T.setAttributeNS(null, "height", v(D)), this.current.element = T, this.clip("nonzero"), this.endPath();
8175
8175
  }
8176
8176
  }
8177
8177
  paintFormXObjectEnd() {
8178
8178
  }
8179
- _initialize(S) {
8180
- const F = this.svgFactory.create(S.width, S.height), A = this.svgFactory.createElement("svg:defs");
8179
+ _initialize(x) {
8180
+ const F = this.svgFactory.create(x.width, x.height), A = this.svgFactory.createElement("svg:defs");
8181
8181
  F.append(A), this.defs = A;
8182
8182
  const D = this.svgFactory.createElement("svg:g");
8183
- return D.setAttributeNS(null, "transform", y(S.transform)), F.append(D), this.svg = D, F;
8183
+ return D.setAttributeNS(null, "transform", y(x.transform)), F.append(D), this.svg = D, F;
8184
8184
  }
8185
8185
  _ensureClipGroup() {
8186
8186
  if (!this.current.clipGroup) {
8187
- const S = this.svgFactory.createElement("svg:g");
8188
- S.setAttributeNS(null, "clip-path", this.current.activeClipUrl), this.svg.append(S), this.current.clipGroup = S;
8187
+ const x = this.svgFactory.createElement("svg:g");
8188
+ x.setAttributeNS(null, "clip-path", this.current.activeClipUrl), this.svg.append(x), this.current.clipGroup = x;
8189
8189
  }
8190
8190
  return this.current.clipGroup;
8191
8191
  }
@@ -8237,7 +8237,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8237
8237
  (t, e, r) => {
8238
8238
  Object.defineProperty(e, "__esModule", {
8239
8239
  value: !0
8240
- }), e.TextLayerRenderTask = void 0, e.renderTextLayer = y, e.updateTextLayer = x;
8240
+ }), e.TextLayerRenderTask = void 0, e.renderTextLayer = y, e.updateTextLayer = S;
8241
8241
  var n = r(1), a = r(6);
8242
8242
  const s = 1e5, o = 30, h = 0.8, d = /* @__PURE__ */ new Map();
8243
8243
  function l(m, w) {
@@ -8260,8 +8260,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8260
8260
  return k;
8261
8261
  const _ = l(o, w);
8262
8262
  _.font = `${o}px ${m}`;
8263
- const S = _.measureText("");
8264
- let F = S.fontBoundingBoxAscent, A = Math.abs(S.fontBoundingBoxDescent);
8263
+ const x = _.measureText("");
8264
+ let F = x.fontBoundingBoxAscent, A = Math.abs(x.fontBoundingBoxDescent);
8265
8265
  if (F) {
8266
8266
  const T = F / (F + A);
8267
8267
  return d.set(m, T), _.canvas.width = _.canvas.height = 0, T;
@@ -8287,7 +8287,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8287
8287
  return d.set(m, h), h;
8288
8288
  }
8289
8289
  function p(m, w, k) {
8290
- const _ = document.createElement("span"), S = {
8290
+ const _ = document.createElement("span"), x = {
8291
8291
  angle: 0,
8292
8292
  canvasWidth: 0,
8293
8293
  hasText: w.str !== "",
@@ -8303,7 +8303,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8303
8303
  let C, R;
8304
8304
  A === 0 ? (C = F[4], R = F[5] - M) : (C = F[4] + M * Math.sin(A), R = F[5] - M * Math.cos(A));
8305
8305
  const O = "calc(var(--scale-factor)*", $ = _.style;
8306
- m._container === m._rootContainer ? ($.left = `${(100 * C / m._pageWidth).toFixed(2)}%`, $.top = `${(100 * R / m._pageHeight).toFixed(2)}%`) : ($.left = `${O}${C.toFixed(2)}px)`, $.top = `${O}${R.toFixed(2)}px)`), $.fontSize = `${O}${T.toFixed(2)}px)`, $.fontFamily = D.fontFamily, S.fontSize = T, _.setAttribute("role", "presentation"), _.textContent = w.str, _.dir = w.dir, m._fontInspectorEnabled && (_.dataset.fontName = w.fontName), A !== 0 && (S.angle = A * (180 / Math.PI));
8306
+ m._container === m._rootContainer ? ($.left = `${(100 * C / m._pageWidth).toFixed(2)}%`, $.top = `${(100 * R / m._pageHeight).toFixed(2)}%`) : ($.left = `${O}${C.toFixed(2)}px)`, $.top = `${O}${R.toFixed(2)}px)`), $.fontSize = `${O}${T.toFixed(2)}px)`, $.fontFamily = D.fontFamily, x.fontSize = T, _.setAttribute("role", "presentation"), _.textContent = w.str, _.dir = w.dir, m._fontInspectorEnabled && (_.dataset.fontName = w.fontName), A !== 0 && (x.angle = A * (180 / Math.PI));
8307
8307
  let K = !1;
8308
8308
  if (w.str.length > 1)
8309
8309
  K = !0;
@@ -8311,14 +8311,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8311
8311
  const J = Math.abs(w.transform[0]), Y = Math.abs(w.transform[3]);
8312
8312
  J !== Y && Math.max(J, Y) / Math.min(J, Y) > 1.5 && (K = !0);
8313
8313
  }
8314
- K && (S.canvasWidth = D.vertical ? w.height : w.width), m._textDivProperties.set(_, S), m._isReadableStream && m._layoutText(_);
8314
+ K && (x.canvasWidth = D.vertical ? w.height : w.width), m._textDivProperties.set(_, x), m._isReadableStream && m._layoutText(_);
8315
8315
  }
8316
8316
  function g(m) {
8317
8317
  const {
8318
8318
  div: w,
8319
8319
  scale: k,
8320
8320
  properties: _,
8321
- ctx: S,
8321
+ ctx: x,
8322
8322
  prevFontSize: F,
8323
8323
  prevFontFamily: A
8324
8324
  } = m, {
@@ -8332,10 +8332,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8332
8332
  canvasWidth: C,
8333
8333
  fontSize: R
8334
8334
  } = _;
8335
- (F !== R || A !== M) && (S.font = `${R * k}px ${M}`, m.prevFontSize = R, m.prevFontFamily = M);
8335
+ (F !== R || A !== M) && (x.font = `${R * k}px ${M}`, m.prevFontSize = R, m.prevFontFamily = M);
8336
8336
  const {
8337
8337
  width: O
8338
- } = S.measureText(w.textContent);
8338
+ } = x.measureText(w.textContent);
8339
8339
  O > 0 && (T = `scaleX(${C * k / O})`);
8340
8340
  }
8341
8341
  _.angle !== 0 && (T = `rotate(${_.angle}deg) ${T}`), T.length > 0 && (D.transform = T);
@@ -8349,8 +8349,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8349
8349
  return;
8350
8350
  }
8351
8351
  if (!m._isReadableStream)
8352
- for (const S of w)
8353
- m._layoutText(S);
8352
+ for (const x of w)
8353
+ m._layoutText(x);
8354
8354
  k.resolve();
8355
8355
  }
8356
8356
  class v {
@@ -8358,13 +8358,13 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8358
8358
  textContentSource: w,
8359
8359
  container: k,
8360
8360
  viewport: _,
8361
- textDivs: S,
8361
+ textDivs: x,
8362
8362
  textDivProperties: F,
8363
8363
  textContentItemsStr: A,
8364
8364
  isOffscreenCanvasSupported: D
8365
8365
  }) {
8366
8366
  var O;
8367
- this._textContentSource = w, this._isReadableStream = w instanceof ReadableStream, this._container = this._rootContainer = k, this._textDivs = S || [], this._textContentItemsStr = A || [], this._isOffscreenCanvasSupported = D, this._fontInspectorEnabled = !!((O = globalThis.FontInspector) != null && O.enabled), this._reader = null, this._textDivProperties = F || /* @__PURE__ */ new WeakMap(), this._canceled = !1, this._capability = new n.PromiseCapability(), this._layoutTextParams = {
8367
+ this._textContentSource = w, this._isReadableStream = w instanceof ReadableStream, this._container = this._rootContainer = k, this._textDivs = x || [], this._textContentItemsStr = A || [], this._isOffscreenCanvasSupported = D, this._fontInspectorEnabled = !!((O = globalThis.FontInspector) != null && O.enabled), this._reader = null, this._textDivProperties = F || /* @__PURE__ */ new WeakMap(), this._canceled = !1, this._capability = new n.PromiseCapability(), this._layoutTextParams = {
8368
8368
  prevFontSize: null,
8369
8369
  prevFontFamily: null,
8370
8370
  div: null,
@@ -8394,8 +8394,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8394
8394
  for (const _ of w) {
8395
8395
  if (_.str === void 0) {
8396
8396
  if (_.type === "beginMarkedContentProps" || _.type === "beginMarkedContent") {
8397
- const S = this._container;
8398
- this._container = document.createElement("span"), this._container.classList.add("markedContent"), _.id !== null && this._container.setAttribute("id", `${_.id}`), S.append(this._container);
8397
+ const x = this._container;
8398
+ this._container = document.createElement("span"), this._container.classList.add("markedContent"), _.id !== null && this._container.setAttribute("id", `${_.id}`), x.append(this._container);
8399
8399
  } else _.type === "endMarkedContent" && (this._container = this._container.parentNode);
8400
8400
  continue;
8401
8401
  }
@@ -8415,23 +8415,23 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8415
8415
  if (this._isReadableStream) {
8416
8416
  const _ = () => {
8417
8417
  this._reader.read().then(({
8418
- value: S,
8418
+ value: x,
8419
8419
  done: F
8420
8420
  }) => {
8421
8421
  if (F) {
8422
8422
  w.resolve();
8423
8423
  return;
8424
8424
  }
8425
- Object.assign(k, S.styles), this._processItems(S.items, k), _();
8425
+ Object.assign(k, x.styles), this._processItems(x.items, k), _();
8426
8426
  }, w.reject);
8427
8427
  };
8428
8428
  this._reader = this._textContentSource.getReader(), _();
8429
8429
  } else if (this._textContentSource) {
8430
8430
  const {
8431
8431
  items: _,
8432
- styles: S
8432
+ styles: x
8433
8433
  } = this._textContentSource;
8434
- this._processItems(_, S), w.resolve();
8434
+ this._processItems(_, x), w.resolve();
8435
8435
  } else
8436
8436
  throw new Error('No "textContentSource" parameter specified.');
8437
8437
  w.promise.then(() => {
@@ -8445,24 +8445,24 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8445
8445
  const {
8446
8446
  container: w,
8447
8447
  viewport: k
8448
- } = m, _ = getComputedStyle(w), S = _.getPropertyValue("visibility"), F = parseFloat(_.getPropertyValue("--scale-factor"));
8449
- S === "visible" && (!F || Math.abs(F - k.scale) > 1e-5) && console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");
8448
+ } = m, _ = getComputedStyle(w), x = _.getPropertyValue("visibility"), F = parseFloat(_.getPropertyValue("--scale-factor"));
8449
+ x === "visible" && (!F || Math.abs(F - k.scale) > 1e-5) && console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");
8450
8450
  const A = new v(m);
8451
8451
  return A._render(), A;
8452
8452
  }
8453
- function x({
8453
+ function S({
8454
8454
  container: m,
8455
8455
  viewport: w,
8456
8456
  textDivs: k,
8457
8457
  textDivProperties: _,
8458
- isOffscreenCanvasSupported: S,
8458
+ isOffscreenCanvasSupported: x,
8459
8459
  mustRotate: F = !0,
8460
8460
  mustRescale: A = !0
8461
8461
  }) {
8462
8462
  if (F && (0, a.setLayerDimensions)(m, {
8463
8463
  rotation: w.rotation
8464
8464
  }), A) {
8465
- const D = l(0, S), M = {
8465
+ const D = l(0, x), M = {
8466
8466
  prevFontSize: null,
8467
8467
  prevFontFamily: null,
8468
8468
  div: null,
@@ -8478,7 +8478,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8478
8478
  /* 27 */
8479
8479
  /***/
8480
8480
  (t, e, r) => {
8481
- var u, p, g, f, v, y, x, m, w, k, _, $t, Dt, er, tr;
8481
+ var u, p, g, f, v, y, S, m, w, k, _, $t, Dt, er, tr;
8482
8482
  Object.defineProperty(e, "__esModule", {
8483
8483
  value: !0
8484
8484
  }), e.AnnotationEditorLayer = void 0;
@@ -8500,7 +8500,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8500
8500
  de(this, f, this.pointerup.bind(this));
8501
8501
  de(this, v, this.pointerdown.bind(this));
8502
8502
  de(this, y, /* @__PURE__ */ new Map());
8503
- de(this, x, !1);
8503
+ de(this, S, !1);
8504
8504
  de(this, m, !1);
8505
8505
  de(this, w, !1);
8506
8506
  de(this, k);
@@ -8696,8 +8696,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8696
8696
  const {
8697
8697
  isMac: R
8698
8698
  } = n.FeatureTest.platform;
8699
- if (!(C.button !== 0 || C.ctrlKey && R) && C.target === this.div && b(this, x)) {
8700
- if (ue(this, x, !1), !b(this, p)) {
8699
+ if (!(C.button !== 0 || C.ctrlKey && R) && C.target === this.div && b(this, S)) {
8700
+ if (ue(this, S, !1), !b(this, p)) {
8701
8701
  ue(this, p, !0);
8702
8702
  return;
8703
8703
  }
@@ -8709,8 +8709,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8709
8709
  }
8710
8710
  }
8711
8711
  pointerdown(C) {
8712
- if (b(this, x)) {
8713
- ue(this, x, !1);
8712
+ if (b(this, S)) {
8713
+ ue(this, S, !1);
8714
8714
  return;
8715
8715
  }
8716
8716
  const {
@@ -8718,7 +8718,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8718
8718
  } = n.FeatureTest.platform;
8719
8719
  if (C.button !== 0 || C.ctrlKey && R || C.target !== this.div)
8720
8720
  return;
8721
- ue(this, x, !0);
8721
+ ue(this, S, !0);
8722
8722
  const O = b(this, k).getActive();
8723
8723
  ue(this, p, !O || O.isEmpty());
8724
8724
  }
@@ -8756,7 +8756,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8756
8756
  return [C, R];
8757
8757
  }
8758
8758
  };
8759
- u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), x = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), _ = new WeakSet(), $t = function(C) {
8759
+ u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), _ = new WeakSet(), $t = function(C) {
8760
8760
  switch (b(this, k).getMode()) {
8761
8761
  case n.AnnotationEditorType.FREETEXT:
8762
8762
  return new s.FreeTextEditor(C);
@@ -8799,7 +8799,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8799
8799
  /* 28 */
8800
8800
  /***/
8801
8801
  (t, e, r) => {
8802
- var d, l, u, p, g, f, v, y, x, m, Tr, _r, kr, yt, rr, Rr, nr;
8802
+ var d, l, u, p, g, f, v, y, S, m, Tr, _r, kr, yt, rr, Rr, nr;
8803
8803
  Object.defineProperty(e, "__esModule", {
8804
8804
  value: !0
8805
8805
  }), e.FreeTextEditor = void 0;
@@ -8819,7 +8819,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8819
8819
  de(this, f, "");
8820
8820
  de(this, v, `${this.id}-editor`);
8821
8821
  de(this, y);
8822
- de(this, x, null);
8822
+ de(this, S, null);
8823
8823
  ue(this, g, R.color || T._defaultColor || s.AnnotationEditor._defaultLineColor), ue(this, y, R.fontSize || T._defaultFontSize);
8824
8824
  }
8825
8825
  static get _keyboardManager() {
@@ -8993,7 +8993,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
8993
8993
  if (this.annotationElementId) {
8994
8994
  const {
8995
8995
  position: Y
8996
- } = b(this, x);
8996
+ } = b(this, S);
8997
8997
  let [se, B] = this.getInitialTranslation();
8998
8998
  [se, B] = this.pageTranslationToScreen(se, B);
8999
8999
  const [V, Q] = this.pageDimensions, [I, P] = this.pageTranslation;
@@ -9061,7 +9061,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9061
9061
  };
9062
9062
  }
9063
9063
  const J = super.deserialize(R, O, $);
9064
- return ue(J, y, R.fontSize), ue(J, g, n.Util.makeHexColor(...R.color)), ue(J, f, R.value), J.annotationElementId = R.id || null, ue(J, x, K), J;
9064
+ return ue(J, y, R.fontSize), ue(J, g, n.Util.makeHexColor(...R.color)), ue(J, f, R.value), J.annotationElementId = R.id || null, ue(J, S, K), J;
9065
9065
  }
9066
9066
  serialize(R = !1) {
9067
9067
  if (this.isEmpty())
@@ -9085,7 +9085,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9085
9085
  return R ? J : this.annotationElementId && !te(this, m, Rr).call(this, J) ? null : (J.id = this.annotationElementId, J);
9086
9086
  }
9087
9087
  };
9088
- d = new WeakMap(), l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), x = new WeakMap(), m = new WeakSet(), Tr = function(R) {
9088
+ d = new WeakMap(), l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), m = new WeakSet(), Tr = function(R) {
9089
9089
  const O = (K) => {
9090
9090
  this.editorDiv.style.fontSize = `calc(${K}px * var(--scale-factor))`, this.translate(0, -(K - b(this, y)) * this.parentScale), ue(this, y, K), te(this, m, yt).call(this);
9091
9091
  }, $ = b(this, y);
@@ -9151,7 +9151,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9151
9151
  color: K,
9152
9152
  rect: J,
9153
9153
  pageIndex: Y
9154
- } = b(this, x);
9154
+ } = b(this, S);
9155
9155
  return R.value !== O || R.fontSize !== $ || R.rect.some((se, B) => Math.abs(se - J[B]) >= 1) || R.color.some((se, B) => se !== K[B]) || R.pageIndex !== Y;
9156
9156
  }, nr = function(R = !1) {
9157
9157
  if (!this.annotationElementId)
@@ -9161,7 +9161,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9161
9161
  return;
9162
9162
  }
9163
9163
  const O = T._internalPadding * this.parentScale;
9164
- b(this, x).rect = this.getRect(O, O);
9164
+ b(this, S).rect = this.getRect(O, O);
9165
9165
  }, $e(T, "_freeTextDefaultContent", ""), $e(T, "_internalPadding", 0), $e(T, "_defaultColor", null), $e(T, "_defaultFontSize", 10), $e(T, "_type", "freetext");
9166
9166
  let h = T;
9167
9167
  e.FreeTextEditor = h;
@@ -9187,13 +9187,13 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9187
9187
  case n.AnnotationType.LINK:
9188
9188
  return new y(j);
9189
9189
  case n.AnnotationType.TEXT:
9190
- return new x(j);
9190
+ return new S(j);
9191
9191
  case n.AnnotationType.WIDGET:
9192
9192
  switch (j.data.fieldType) {
9193
9193
  case "Tx":
9194
9194
  return new w(j);
9195
9195
  case "Btn":
9196
- return j.data.radioButton ? new S(j) : j.data.checkBox ? new _(j) : new F(j);
9196
+ return j.data.radioButton ? new x(j) : j.data.checkBox ? new _(j) : new F(j);
9197
9197
  case "Ch":
9198
9198
  return new A(j);
9199
9199
  case "Sig":
@@ -9285,7 +9285,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9285
9285
  if (Xe > 0 || Ze > 0) {
9286
9286
  const Qe = `calc(${Xe}px * var(--scale-factor)) / calc(${Ze}px * var(--scale-factor))`;
9287
9287
  pe.style.borderRadius = Qe;
9288
- } else if (this instanceof S) {
9288
+ } else if (this instanceof x) {
9289
9289
  const Qe = `calc(${De}px * var(--scale-factor)) / calc(${Ge}px * var(--scale-factor))`;
9290
9290
  pe.style.borderRadius = Qe;
9291
9291
  }
@@ -9713,7 +9713,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
9713
9713
  }, Nr = function(U, W) {
9714
9714
  U.href = this.linkService.getAnchorUrl(""), U.onclick = () => (this.linkService.executeSetOCGState(W), !1), te(this, G, ot).call(this);
9715
9715
  };
9716
- class x extends v {
9716
+ class S extends v {
9717
9717
  constructor(j) {
9718
9718
  super(j, {
9719
9719
  isRenderable: !0
@@ -10062,7 +10062,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
10062
10062
  }), this._setEventListeners(pe, null, [["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], (Ae) => Ae.target.checked)), this._setBackgroundColor(pe), this._setDefaultPropertiesFromJS(pe), this.container.append(pe), this.container;
10063
10063
  }
10064
10064
  }
10065
- class S extends m {
10065
+ class x extends m {
10066
10066
  constructor(j) {
10067
10067
  super(j, {
10068
10068
  isRenderable: j.renderForms
@@ -11057,18 +11057,18 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11057
11057
  });
11058
11058
  const g = [[l, -1, p]], f = o.div;
11059
11059
  if (f.append(p), o.viewport) {
11060
- const x = `matrix(${o.viewport.transform.join(",")})`;
11061
- f.style.transform = x;
11060
+ const S = `matrix(${o.viewport.transform.join(",")})`;
11061
+ f.style.transform = S;
11062
11062
  }
11063
11063
  u !== "richText" && f.setAttribute("class", "xfaLayer xfaFont");
11064
11064
  const v = [];
11065
11065
  for (; g.length > 0; ) {
11066
- const [x, m, w] = g.at(-1);
11067
- if (m + 1 === x.children.length) {
11066
+ const [S, m, w] = g.at(-1);
11067
+ if (m + 1 === S.children.length) {
11068
11068
  g.pop();
11069
11069
  continue;
11070
11070
  }
11071
- const k = x.children[++g.at(-1)[1]];
11071
+ const k = S.children[++g.at(-1)[1]];
11072
11072
  if (k === null)
11073
11073
  continue;
11074
11074
  const {
@@ -11079,22 +11079,22 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11079
11079
  v.push(F), w.append(F);
11080
11080
  continue;
11081
11081
  }
11082
- const S = (y = k == null ? void 0 : k.attributes) != null && y.xmlns ? document.createElementNS(k.attributes.xmlns, _) : document.createElement(_);
11083
- if (w.append(S), k.attributes && this.setAttributes({
11084
- html: S,
11082
+ const x = (y = k == null ? void 0 : k.attributes) != null && y.xmlns ? document.createElementNS(k.attributes.xmlns, _) : document.createElement(_);
11083
+ if (w.append(x), k.attributes && this.setAttributes({
11084
+ html: x,
11085
11085
  element: k,
11086
11086
  storage: h,
11087
11087
  intent: u,
11088
11088
  linkService: d
11089
11089
  }), k.children && k.children.length > 0)
11090
- g.push([k, -1, S]);
11090
+ g.push([k, -1, x]);
11091
11091
  else if (k.value) {
11092
11092
  const F = document.createTextNode(k.value);
11093
- n.XfaText.shouldBuildText(_) && v.push(F), S.append(F);
11093
+ n.XfaText.shouldBuildText(_) && v.push(F), x.append(F);
11094
11094
  }
11095
11095
  }
11096
- for (const x of f.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))
11097
- x.setAttribute("readOnly", !0);
11096
+ for (const S of f.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))
11097
+ S.setAttribute("readOnly", !0);
11098
11098
  return {
11099
11099
  textDivs: v
11100
11100
  };
@@ -11109,7 +11109,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11109
11109
  /* 33 */
11110
11110
  /***/
11111
11111
  (t, e, r) => {
11112
- var l, u, p, g, f, v, y, x, m, w, k, _, S, F, A, Mr, Lr, Br, Ur, lr, jr, cr, zr, Hr, Gr, Wr, Vr, it, hr, Tt, _t, dt, dr, kt, G, qr, ur, Xr, Kr, fr, Rt, ut;
11112
+ var l, u, p, g, f, v, y, S, m, w, k, _, x, F, A, Mr, Lr, Br, Ur, lr, jr, cr, zr, Hr, Gr, Wr, Vr, it, hr, Tt, _t, dt, dr, kt, G, qr, ur, Xr, Kr, fr, Rt, ut;
11113
11113
  Object.defineProperty(e, "__esModule", {
11114
11114
  value: !0
11115
11115
  }), e.InkEditor = void 0;
@@ -11128,12 +11128,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11128
11128
  de(this, f, this.canvasPointerup.bind(this));
11129
11129
  de(this, v, this.canvasPointerdown.bind(this));
11130
11130
  de(this, y, new Path2D());
11131
- de(this, x, !1);
11131
+ de(this, S, !1);
11132
11132
  de(this, m, !1);
11133
11133
  de(this, w, !1);
11134
11134
  de(this, k, null);
11135
11135
  de(this, _, 0);
11136
- de(this, S, 0);
11136
+ de(this, x, 0);
11137
11137
  de(this, F, null);
11138
11138
  this.color = L.color || null, this.thickness = L.thickness || null, this.opacity = L.opacity || null, this.paths = [], this.bezierPath2D = [], this.allRawPaths = [], this.currentPath = [], this.scaleFactor = 1, this.translationX = this.translationY = 0, this.x = 0, this.y = 0, this._willKeepAspectRatio = !0;
11139
11139
  }
@@ -11188,7 +11188,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11188
11188
  this.setDimensions(re, he);
11189
11189
  }
11190
11190
  enableEditMode() {
11191
- b(this, x) || this.canvas === null || (super.enableEditMode(), this._isDraggable = !1, this.canvas.addEventListener("pointerdown", b(this, v)));
11191
+ b(this, S) || this.canvas === null || (super.enableEditMode(), this._isDraggable = !1, this.canvas.addEventListener("pointerdown", b(this, v)));
11192
11192
  }
11193
11193
  disableEditMode() {
11194
11194
  !this.isInEditMode() || this.canvas === null || (super.disableEditMode(), this._isDraggable = !this.isEmpty(), this.div.classList.remove("editing"), this.canvas.removeEventListener("pointerdown", b(this, v)));
@@ -11200,7 +11200,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11200
11200
  return this.paths.length === 0 || this.paths.length === 1 && this.paths[0].length === 0;
11201
11201
  }
11202
11202
  commit() {
11203
- b(this, x) || (super.commit(), this.isEditing = !1, this.disableEditMode(), this.setInForeground(), ue(this, x, !0), this.div.classList.add("disabled"), te(this, A, ut).call(this, !0), this.makeResizable(), this.parent.addInkEditorIfNeeded(!0), this.moveInDOM(), this.div.focus({
11203
+ b(this, S) || (super.commit(), this.isEditing = !1, this.disableEditMode(), this.setInForeground(), ue(this, S, !0), this.div.classList.add("disabled"), te(this, A, ut).call(this, !0), this.makeResizable(), this.parent.addInkEditorIfNeeded(!0), this.moveInDOM(), this.div.focus({
11204
11204
  preventScroll: !0
11205
11205
  }));
11206
11206
  }
@@ -11208,7 +11208,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11208
11208
  this._focusEventsAllowed && (super.focusin(L), this.enableEditMode());
11209
11209
  }
11210
11210
  canvasPointerdown(L) {
11211
- L.button !== 0 || !this.isInEditMode() || b(this, x) || (this.setInForeground(), L.preventDefault(), L.type !== "mouse" && this.div.focus(), te(this, A, jr).call(this, L.offsetX, L.offsetY));
11211
+ L.button !== 0 || !this.isInEditMode() || b(this, S) || (this.setInForeground(), L.preventDefault(), L.type !== "mouse" && this.div.focus(), te(this, A, jr).call(this, L.offsetX, L.offsetY));
11212
11212
  }
11213
11213
  canvasPointermove(L) {
11214
11214
  L.preventDefault(), te(this, A, cr).call(this, L.offsetX, L.offsetY);
@@ -11220,7 +11220,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11220
11220
  te(this, A, hr).call(this, L);
11221
11221
  }
11222
11222
  get isResizable() {
11223
- return !this.isEmpty() && b(this, x);
11223
+ return !this.isEmpty() && b(this, S);
11224
11224
  }
11225
11225
  render() {
11226
11226
  if (this.div)
@@ -11240,11 +11240,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11240
11240
  }
11241
11241
  setDimensions(L, Z) {
11242
11242
  const re = Math.round(L), he = Math.round(Z);
11243
- if (b(this, _) === re && b(this, S) === he)
11243
+ if (b(this, _) === re && b(this, x) === he)
11244
11244
  return;
11245
- ue(this, _, re), ue(this, S, he), this.canvas.style.visibility = "hidden";
11245
+ ue(this, _, re), ue(this, x, he), this.canvas.style.visibility = "hidden";
11246
11246
  const [ye, Fe] = this.parentDimensions;
11247
- this.width = L / ye, this.height = Z / Fe, this.fixAndSetPosition(), b(this, x) && te(this, A, dr).call(this, L, Z), te(this, A, dt).call(this), te(this, A, it).call(this), this.canvas.style.visibility = "visible", this.fixDims();
11247
+ this.width = L / ye, this.height = Z / Fe, this.fixAndSetPosition(), b(this, S) && te(this, A, dr).call(this, L, Z), te(this, A, dt).call(this), te(this, A, it).call(this), this.canvas.style.visibility = "visible", this.fixDims();
11248
11248
  }
11249
11249
  static deserialize(L, Z, re) {
11250
11250
  var Ee, Ne, ze;
@@ -11253,7 +11253,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11253
11253
  const he = super.deserialize(L, Z, re);
11254
11254
  he.thickness = L.thickness, he.color = n.Util.makeHexColor(...L.color), he.opacity = L.opacity;
11255
11255
  const [ye, Fe] = he.pageDimensions, Pe = he.width * ye, ie = he.height * Fe, _e = he.parentScale, Te = L.thickness / 2;
11256
- ue(he, x, !0), ue(he, _, Math.round(Pe)), ue(he, S, Math.round(ie));
11256
+ ue(he, S, !0), ue(he, _, Math.round(Pe)), ue(he, x, Math.round(ie));
11257
11257
  const {
11258
11258
  paths: Ke,
11259
11259
  rect: qe,
@@ -11293,7 +11293,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11293
11293
  };
11294
11294
  }
11295
11295
  };
11296
- l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), x = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), S = new WeakMap(), F = new WeakMap(), A = new WeakSet(), Mr = function(L) {
11296
+ l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), x = new WeakMap(), F = new WeakMap(), A = new WeakSet(), Mr = function(L) {
11297
11297
  const Z = this.thickness;
11298
11298
  this.addCommands({
11299
11299
  cmd: () => {
@@ -11553,11 +11553,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11553
11553
  }
11554
11554
  return [L, re, Z, he];
11555
11555
  }, Rt = function() {
11556
- return b(this, x) ? Math.ceil(this.thickness * this.parentScale) : 0;
11556
+ return b(this, S) ? Math.ceil(this.thickness * this.parentScale) : 0;
11557
11557
  }, ut = function(L = !1) {
11558
11558
  if (this.isEmpty())
11559
11559
  return;
11560
- if (!b(this, x)) {
11560
+ if (!b(this, S)) {
11561
11561
  te(this, A, it).call(this);
11562
11562
  return;
11563
11563
  }
@@ -11566,7 +11566,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11566
11566
  const he = Math.ceil(re + b(this, u) * this.scaleFactor), ye = Math.ceil(re + b(this, l) * this.scaleFactor), [Fe, Pe] = this.parentDimensions;
11567
11567
  this.width = he / Fe, this.height = ye / Pe, this.setAspectRatio(he, ye);
11568
11568
  const ie = this.translationX, _e = this.translationY;
11569
- this.translationX = -Z[0], this.translationY = -Z[1], te(this, A, dt).call(this), te(this, A, it).call(this), ue(this, _, he), ue(this, S, ye), this.setDims(he, ye);
11569
+ this.translationX = -Z[0], this.translationY = -Z[1], te(this, A, dt).call(this), te(this, A, it).call(this), ue(this, _, he), ue(this, x, ye), this.setDims(he, ye);
11570
11570
  const Te = L ? re / this.scaleFactor / 2 : 0;
11571
11571
  this.translate(ie - this.translationX - Te, _e - this.translationY - Te);
11572
11572
  }, de(Ce, G), $e(Ce, "_defaultColor", null), $e(Ce, "_defaultOpacity", 1), $e(Ce, "_defaultThickness", 1), $e(Ce, "_type", "ink");
@@ -11576,7 +11576,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11576
11576
  /* 34 */
11577
11577
  /***/
11578
11578
  (t, e, r) => {
11579
- var d, l, u, p, g, f, v, y, x, m, w, bt, xt, Nt, pr, Zr, Yr, gr, Ot, Jr;
11579
+ var d, l, u, p, g, f, v, y, S, m, w, bt, xt, Nt, pr, Zr, Yr, gr, Ot, Jr;
11580
11580
  Object.defineProperty(e, "__esModule", {
11581
11581
  value: !0
11582
11582
  }), e.StampEditor = void 0;
@@ -11596,7 +11596,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11596
11596
  de(this, f, null);
11597
11597
  de(this, v, null);
11598
11598
  de(this, y, null);
11599
- de(this, x, !1);
11599
+ de(this, S, !1);
11600
11600
  de(this, m, !1);
11601
11601
  ue(this, p, K.bitmapUrl), ue(this, g, K.bitmapFile);
11602
11602
  }
@@ -11658,7 +11658,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11658
11658
  isSvg: I,
11659
11659
  accessibilityData: P
11660
11660
  } = K;
11661
- Q && Y.imageManager.isValidId(Q) ? ue(se, l, Q) : ue(se, p, V), ue(se, x, I);
11661
+ Q && Y.imageManager.isValidId(Q) ? ue(se, l, Q) : ue(se, p, V), ue(se, S, I);
11662
11662
  const [E, N] = se.pageDimensions;
11663
11663
  return se.width = (B[2] - B[0]) / E, se.height = (B[3] - B[1]) / N, P && (se.altTextData = P), se;
11664
11664
  }
@@ -11671,7 +11671,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11671
11671
  pageIndex: this.pageIndex,
11672
11672
  rect: this.getRect(0, 0),
11673
11673
  rotation: this.rotation,
11674
- isSvg: b(this, x),
11674
+ isSvg: b(this, S),
11675
11675
  structTreeParentId: this._structTreeParentId
11676
11676
  };
11677
11677
  if (K)
@@ -11686,25 +11686,25 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11686
11686
  }), J === null)
11687
11687
  return Y;
11688
11688
  J.stamps || (J.stamps = /* @__PURE__ */ new Map());
11689
- const V = b(this, x) ? (Y.rect[2] - Y.rect[0]) * (Y.rect[3] - Y.rect[1]) : null;
11689
+ const V = b(this, S) ? (Y.rect[2] - Y.rect[0]) * (Y.rect[3] - Y.rect[1]) : null;
11690
11690
  if (!J.stamps.has(b(this, l)))
11691
11691
  J.stamps.set(b(this, l), {
11692
11692
  area: V,
11693
11693
  serialized: Y
11694
11694
  }), Y.bitmap = te(this, w, Ot).call(this, !1);
11695
- else if (b(this, x)) {
11695
+ else if (b(this, S)) {
11696
11696
  const Q = J.stamps.get(b(this, l));
11697
11697
  V > Q.area && (Q.area = V, Q.serialized.bitmap.close(), Q.serialized.bitmap = te(this, w, Ot).call(this, !1));
11698
11698
  }
11699
11699
  return Y;
11700
11700
  }
11701
11701
  };
11702
- d = new WeakMap(), l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), x = new WeakMap(), m = new WeakMap(), w = new WeakSet(), bt = function(K, J = !1) {
11702
+ d = new WeakMap(), l = new WeakMap(), u = new WeakMap(), p = new WeakMap(), g = new WeakMap(), f = new WeakMap(), v = new WeakMap(), y = new WeakMap(), S = new WeakMap(), m = new WeakMap(), w = new WeakSet(), bt = function(K, J = !1) {
11703
11703
  if (!K) {
11704
11704
  this.remove();
11705
11705
  return;
11706
11706
  }
11707
- ue(this, d, K.bitmap), J || (ue(this, l, K.id), ue(this, x, K.isSvg)), te(this, w, pr).call(this);
11707
+ ue(this, d, K.bitmap), J || (ue(this, l, K.id), ue(this, S, K.isSvg)), te(this, w, pr).call(this);
11708
11708
  }, xt = function() {
11709
11709
  ue(this, u, null), this._uiManager.enableWaiting(!1), b(this, f) && this.div.focus();
11710
11710
  }, Nt = function() {
@@ -11790,11 +11790,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11790
11790
  if (!Y || Y.width === K && Y.height === J)
11791
11791
  return;
11792
11792
  Y.width = K, Y.height = J;
11793
- const se = b(this, x) ? b(this, d) : te(this, w, Yr).call(this, K, J), B = Y.getContext("2d");
11793
+ const se = b(this, S) ? b(this, d) : te(this, w, Yr).call(this, K, J), B = Y.getContext("2d");
11794
11794
  B.filter = this._uiManager.hcmFilter, B.drawImage(se, 0, 0, se.width, se.height, 0, 0, K, J);
11795
11795
  }, Ot = function(K) {
11796
11796
  if (K) {
11797
- if (b(this, x)) {
11797
+ if (b(this, S)) {
11798
11798
  const se = this._uiManager.imageManager.getSvgUrl(b(this, l));
11799
11799
  if (se)
11800
11800
  return se;
@@ -11805,7 +11805,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
11805
11805
  height: J.height
11806
11806
  } = b(this, d), J.getContext("2d").drawImage(b(this, d), 0, 0), J.toDataURL();
11807
11807
  }
11808
- if (b(this, x)) {
11808
+ if (b(this, S)) {
11809
11809
  const [J, Y] = this.pageDimensions, se = Math.round(this.width * J * s.PixelsPerInch.PDF_TO_CSS_UNITS), B = Math.round(this.height * Y * s.PixelsPerInch.PDF_TO_CSS_UNITS), V = new OffscreenCanvas(se, B);
11810
11810
  return V.getContext("2d").drawImage(b(this, d), 0, 0, b(this, d).width, b(this, d).height, 0, 0, se, B), V.transferToImageBitmap();
11811
11811
  }
@@ -12131,12 +12131,12 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12131
12131
  fontSize: f,
12132
12132
  setFontSize: v,
12133
12133
  onDownload: y,
12134
- onPrint: x,
12134
+ onPrint: S,
12135
12135
  isProcessing: m,
12136
12136
  onDelete: w,
12137
12137
  selectedAnnotationId: k,
12138
12138
  undo: _,
12139
- redo: S,
12139
+ redo: x,
12140
12140
  canUndo: F,
12141
12141
  canRedo: A,
12142
12142
  onSignatureClick: D,
@@ -12197,7 +12197,7 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12197
12197
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
12198
12198
  !O && /* @__PURE__ */ jsxs(Fragment, { children: [
12199
12199
  /* @__PURE__ */ jsx(ToolButton, { label: "Undo", onClick: _, disabled: !F, children: /* @__PURE__ */ jsx(UndoIcon, {}) }),
12200
- /* @__PURE__ */ jsx(ToolButton, { label: "Redo", onClick: S, disabled: !A, children: /* @__PURE__ */ jsx(RedoIcon, {}) }),
12200
+ /* @__PURE__ */ jsx(ToolButton, { label: "Redo", onClick: x, disabled: !A, children: /* @__PURE__ */ jsx(RedoIcon, {}) }),
12201
12201
  /* @__PURE__ */ jsx("div", { className: "w-px h-6 bg-gray-300" })
12202
12202
  ] }),
12203
12203
  /* @__PURE__ */ jsxs("div", { className: "relative", ref: se, children: [
@@ -12207,7 +12207,7 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12207
12207
  "button",
12208
12208
  {
12209
12209
  onClick: () => {
12210
- x(), K(!1);
12210
+ S(), K(!1);
12211
12211
  },
12212
12212
  disabled: m,
12213
12213
  className: "w-full text-left px-4 py-2 text-sm text-gray-800 hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-3",
@@ -12296,9 +12296,9 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12296
12296
  setSelectedAnnotationId: f,
12297
12297
  signatureData: v,
12298
12298
  initialsData: y,
12299
- activeStamp: x,
12299
+ activeStamp: S,
12300
12300
  readonly: m = !1
12301
- } = t, [w, k] = useState({ mode: "none", startPos: { x: 0, y: 0 } }), [_, S] = useState(null), F = useRef(null), [A, D] = useState(null), [T, M] = useState(null), C = (B) => {
12301
+ } = t, [w, k] = useState({ mode: "none", startPos: { x: 0, y: 0 } }), [_, x] = useState(null), F = useRef(null), [A, D] = useState(null), [T, M] = useState(null), C = (B) => {
12302
12302
  const V = B.currentTarget, Q = V.getScreenCTM();
12303
12303
  if (Q) {
12304
12304
  const E = new DOMPoint(B.clientX, B.clientY).matrixTransform(Q.inverse());
@@ -12336,7 +12336,7 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12336
12336
  f(I ? I.id : null), I && k({ mode: "moving", startPos: V, originalAnnotation: I });
12337
12337
  return;
12338
12338
  }
12339
- ["TEXT", "STAMP", "SIGNATURE", "INITIALS"].includes(a) || (k({ mode: "drawing", startPos: V }), ["PEN", "HIGHLIGHTER", "UNDERLINE", "STRIKETHROUGH", "SQUIGGLY"].includes(a) && S({ type: a, points: [V], color: s, strokeWidth: o, id: "temp", page: 0 }));
12339
+ ["TEXT", "STAMP", "SIGNATURE", "INITIALS"].includes(a) || (k({ mode: "drawing", startPos: V }), ["PEN", "HIGHLIGHTER", "UNDERLINE", "STRIKETHROUGH", "SQUIGGLY"].includes(a) && x({ type: a, points: [V], color: s, strokeWidth: o, id: "temp", page: 0 }));
12340
12340
  }
12341
12341
  }, O = (B) => {
12342
12342
  if (m) return;
@@ -12363,10 +12363,10 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12363
12363
  } else w.mode === "none" && M(null);
12364
12364
  if (w.mode === "moving" && w.originalAnnotation) {
12365
12365
  const Q = V.x - w.startPos.x, I = V.y - w.startPos.y;
12366
- S(moveAnnotation(w.originalAnnotation, Q, I));
12366
+ x(moveAnnotation(w.originalAnnotation, Q, I));
12367
12367
  } else if (w.mode === "resizing" && w.originalAnnotation && w.handle) {
12368
12368
  const Q = V.x - w.startPos.x, I = V.y - w.startPos.y;
12369
- S(resizeAnnotation(w.originalAnnotation, w.handle, Q, I));
12369
+ x(resizeAnnotation(w.originalAnnotation, w.handle, Q, I));
12370
12370
  } else if (w.mode === "drawing") {
12371
12371
  const { startPos: Q } = w;
12372
12372
  let I = null;
@@ -12385,7 +12385,7 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12385
12385
  I = { type: "CIRCLE", cx: (Q.x + V.x) / 2, cy: (Q.y + V.y) / 2, rx: Math.abs(Q.x - V.x) / 2, ry: Math.abs(Q.y - V.y) / 2, color: s, strokeWidth: o, id: "temp", page: 0 };
12386
12386
  break;
12387
12387
  }
12388
- I && S(I);
12388
+ I && x(I);
12389
12389
  }
12390
12390
  }, $ = () => {
12391
12391
  if (!m) {
@@ -12395,7 +12395,7 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12395
12395
  const { id: B, page: V, ...Q } = _;
12396
12396
  d(Q);
12397
12397
  }
12398
- k({ mode: "none", startPos: { x: 0, y: 0 } }), S(null);
12398
+ k({ mode: "none", startPos: { x: 0, y: 0 } }), x(null);
12399
12399
  }
12400
12400
  }, K = (B) => {
12401
12401
  if (m || w.mode !== "none") return;
@@ -12405,7 +12405,7 @@ const FONT_SIZES = [8, 10, 12, 14, 16, 20, 24, 32, 48, 64], STROKE_WIDTHS = [1,
12405
12405
  return (Q = F.current) == null ? void 0 : Q.focus();
12406
12406
  }, 0)), a === "STAMP") {
12407
12407
  const I = (/* @__PURE__ */ new Date()).toLocaleString();
12408
- d({ type: "STAMP", x: V.x - 70, y: V.y - 25, width: 140, height: 55, text: x, fontSize: 18, color: s, strokeWidth: 2, timestamp: I });
12408
+ d({ type: "STAMP", x: V.x - 70, y: V.y - 25, width: 140, height: 55, text: S, fontSize: 18, color: s, strokeWidth: 2, timestamp: I });
12409
12409
  }
12410
12410
  a === "SIGNATURE" && v && d({ type: "SIGNATURE", x: V.x - 75, y: V.y - 37.5, width: 150, height: 75, imageData: v, color: s, strokeWidth: 0 }), a === "INITIALS" && y && d({ type: "INITIALS", x: V.x - 40, y: V.y - 20, width: 80, height: 40, imageData: y, color: s, strokeWidth: 0 });
12411
12411
  }, J = () => {
@@ -12657,27 +12657,27 @@ const PdfPage = (t) => {
12657
12657
  e.getPage(r).then(d);
12658
12658
  }, [e, r]), useEffect(() => {
12659
12659
  if (h && s.current) {
12660
- const y = s.current, x = y.getContext("2d");
12661
- if (!x) return;
12660
+ const y = s.current, S = y.getContext("2d");
12661
+ if (!S) return;
12662
12662
  p.current && (p.current.cancel(), p.current = null);
12663
- const m = h.getViewport({ scale: n });
12664
- y.width = m.width, y.height = m.height, u({ width: m.width, height: m.height });
12665
- const w = {
12666
- canvasContext: x,
12663
+ const m = h.getViewport({ scale: n }), w = window.devicePixelRatio || 1;
12664
+ y.width = Math.floor(m.width * w), y.height = Math.floor(m.height * w), y.style.width = `${m.width}px`, y.style.height = `${m.height}px`, S.setTransform(w, 0, 0, w, 0, 0), u({ width: m.width, height: m.height });
12665
+ const k = {
12666
+ canvasContext: S,
12667
12667
  viewport: m
12668
- }, k = h.render(w);
12669
- p.current = k, k.promise.then(async () => {
12668
+ }, _ = h.render(k);
12669
+ p.current = _, _.promise.then(async () => {
12670
12670
  if (p.current = null, o.current) {
12671
12671
  o.current.innerHTML = "";
12672
- const _ = await h.getTextContent();
12672
+ const x = await h.getTextContent();
12673
12673
  await pdfExports.renderTextLayer({
12674
- textContentSource: _,
12674
+ textContentSource: x,
12675
12675
  container: o.current,
12676
12676
  viewport: m
12677
12677
  }).promise;
12678
12678
  }
12679
- }).catch((_) => {
12680
- _.name !== "RenderingCancelledException" && console.error("Error rendering page:", _), p.current = null;
12679
+ }).catch((x) => {
12680
+ x.name !== "RenderingCancelledException" && console.error("Error rendering page:", x), p.current = null;
12681
12681
  });
12682
12682
  }
12683
12683
  return () => {
@@ -12790,37 +12790,37 @@ const PdfPage = (t) => {
12790
12790
  }, useAnnotationHistory = () => {
12791
12791
  var f, v;
12792
12792
  const [t, e] = useState({ history: [{}], index: 0 }), r = ((f = t == null ? void 0 : t.history) == null ? void 0 : f[(t == null ? void 0 : t.index) ?? 0]) ?? {}, n = useCallback((y) => {
12793
- e((x) => {
12793
+ e((S) => {
12794
12794
  var _;
12795
- const m = ((_ = x == null ? void 0 : x.history) == null ? void 0 : _[(x == null ? void 0 : x.index) ?? 0]) ?? {}, w = y(m);
12795
+ const m = ((_ = S == null ? void 0 : S.history) == null ? void 0 : _[(S == null ? void 0 : S.index) ?? 0]) ?? {}, w = y(m);
12796
12796
  if (JSON.stringify(m) === JSON.stringify(w))
12797
- return x;
12798
- const k = ((x == null ? void 0 : x.history) ?? [{}]).slice(0, ((x == null ? void 0 : x.index) ?? 0) + 1);
12797
+ return S;
12798
+ const k = ((S == null ? void 0 : S.history) ?? [{}]).slice(0, ((S == null ? void 0 : S.index) ?? 0) + 1);
12799
12799
  return k.push(w), {
12800
12800
  history: k,
12801
12801
  index: k.length - 1
12802
12802
  };
12803
12803
  });
12804
- }, []), a = useCallback((y, x) => {
12804
+ }, []), a = useCallback((y, S) => {
12805
12805
  n((m) => {
12806
12806
  const w = JSON.parse(JSON.stringify(m)), k = {
12807
- ...x,
12807
+ ...S,
12808
12808
  page: y,
12809
12809
  id: `${Date.now()}-${Math.random()}`
12810
12810
  }, _ = w[y] ? [...w[y], k] : [k];
12811
12811
  return w[y] = _, w;
12812
12812
  });
12813
- }, [n]), s = useCallback((y, x) => {
12813
+ }, [n]), s = useCallback((y, S) => {
12814
12814
  n((m) => {
12815
12815
  const w = JSON.parse(JSON.stringify(m));
12816
- return w[y] ? (w[y] = w[y].filter((k) => k.id !== x), w) : m;
12816
+ return w[y] ? (w[y] = w[y].filter((k) => k.id !== S), w) : m;
12817
12817
  });
12818
12818
  }, [n]), o = useCallback((y) => {
12819
- n((x) => {
12820
- const m = JSON.parse(JSON.stringify(x)), w = y.page;
12821
- if (!m[w]) return x;
12819
+ n((S) => {
12820
+ const m = JSON.parse(JSON.stringify(S)), w = y.page;
12821
+ if (!m[w]) return S;
12822
12822
  const k = m[w].findIndex((_) => _.id === y.id);
12823
- return k === -1 ? x : (m[w][k] = y, m);
12823
+ return k === -1 ? S : (m[w][k] = y, m);
12824
12824
  });
12825
12825
  }, [n]), h = useCallback(() => {
12826
12826
  n(() => ({}));
@@ -12836,10 +12836,10 @@ const PdfPage = (t) => {
12836
12836
  }));
12837
12837
  }, []), u = useCallback(() => {
12838
12838
  e((y) => {
12839
- var x;
12839
+ var S;
12840
12840
  return {
12841
12841
  ...y,
12842
- index: Math.min((((x = y == null ? void 0 : y.history) == null ? void 0 : x.length) ?? 1) - 1, ((y == null ? void 0 : y.index) ?? 0) + 1)
12842
+ index: Math.min((((S = y == null ? void 0 : y.history) == null ? void 0 : S.length) ?? 1) - 1, ((y == null ? void 0 : y.index) ?? 0) + 1)
12843
12843
  };
12844
12844
  });
12845
12845
  }, []), p = ((t == null ? void 0 : t.index) ?? 0) > 0, g = ((t == null ? void 0 : t.index) ?? 0) < (((v = t == null ? void 0 : t.history) == null ? void 0 : v.length) ?? 1) - 1;
@@ -13087,7 +13087,7 @@ var encodeToBase64 = function(t) {
13087
13087
  }, dateRegex = /^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/, parseDate = function(t) {
13088
13088
  var e = t.match(dateRegex);
13089
13089
  if (e) {
13090
- var r = e[1], n = e[2], a = n === void 0 ? "01" : n, s = e[3], o = s === void 0 ? "01" : s, h = e[4], d = h === void 0 ? "00" : h, l = e[5], u = l === void 0 ? "00" : l, p = e[6], g = p === void 0 ? "00" : p, f = e[7], v = f === void 0 ? "Z" : f, y = e[8], x = y === void 0 ? "00" : y, m = e[9], w = m === void 0 ? "00" : m, k = v === "Z" ? "Z" : "" + v + x + ":" + w, _ = /* @__PURE__ */ new Date(r + "-" + a + "-" + o + "T" + d + ":" + u + ":" + g + k);
13090
+ var r = e[1], n = e[2], a = n === void 0 ? "01" : n, s = e[3], o = s === void 0 ? "01" : s, h = e[4], d = h === void 0 ? "00" : h, l = e[5], u = l === void 0 ? "00" : l, p = e[6], g = p === void 0 ? "00" : p, f = e[7], v = f === void 0 ? "Z" : f, y = e[8], S = y === void 0 ? "00" : y, m = e[9], w = m === void 0 ? "00" : m, k = v === "Z" ? "Z" : "" + v + S + ":" + w, _ = /* @__PURE__ */ new Date(r + "-" + a + "-" + o + "T" + d + ":" + u + ":" + g + k);
13091
13091
  return _;
13092
13092
  }
13093
13093
  }, findLastMatch = function(t, e) {
@@ -14042,56 +14042,56 @@ deflate$4.deflate = deflate$1;
14042
14042
  deflate$4.deflateRaw = deflateRaw;
14043
14043
  deflate$4.gzip = gzip;
14044
14044
  var inflate$4 = {}, inflate$3 = {}, BAD$1 = 30, TYPE$1 = 12, inffast = function t(e, r) {
14045
- var n, a, s, o, h, d, l, u, p, g, f, v, y, x, m, w, k, _, S, F, A, D, T, M, C;
14046
- n = e.state, a = e.next_in, M = e.input, s = a + (e.avail_in - 5), o = e.next_out, C = e.output, h = o - (r - e.avail_out), d = o + (e.avail_out - 257), l = n.dmax, u = n.wsize, p = n.whave, g = n.wnext, f = n.window, v = n.hold, y = n.bits, x = n.lencode, m = n.distcode, w = (1 << n.lenbits) - 1, k = (1 << n.distbits) - 1;
14045
+ var n, a, s, o, h, d, l, u, p, g, f, v, y, S, m, w, k, _, x, F, A, D, T, M, C;
14046
+ n = e.state, a = e.next_in, M = e.input, s = a + (e.avail_in - 5), o = e.next_out, C = e.output, h = o - (r - e.avail_out), d = o + (e.avail_out - 257), l = n.dmax, u = n.wsize, p = n.whave, g = n.wnext, f = n.window, v = n.hold, y = n.bits, S = n.lencode, m = n.distcode, w = (1 << n.lenbits) - 1, k = (1 << n.distbits) - 1;
14047
14047
  e:
14048
14048
  do {
14049
- y < 15 && (v += M[a++] << y, y += 8, v += M[a++] << y, y += 8), _ = x[v & w];
14049
+ y < 15 && (v += M[a++] << y, y += 8, v += M[a++] << y, y += 8), _ = S[v & w];
14050
14050
  t:
14051
14051
  for (; ; ) {
14052
- if (S = _ >>> 24, v >>>= S, y -= S, S = _ >>> 16 & 255, S === 0)
14052
+ if (x = _ >>> 24, v >>>= x, y -= x, x = _ >>> 16 & 255, x === 0)
14053
14053
  C[o++] = _ & 65535;
14054
- else if (S & 16) {
14055
- F = _ & 65535, S &= 15, S && (y < S && (v += M[a++] << y, y += 8), F += v & (1 << S) - 1, v >>>= S, y -= S), y < 15 && (v += M[a++] << y, y += 8, v += M[a++] << y, y += 8), _ = m[v & k];
14054
+ else if (x & 16) {
14055
+ F = _ & 65535, x &= 15, x && (y < x && (v += M[a++] << y, y += 8), F += v & (1 << x) - 1, v >>>= x, y -= x), y < 15 && (v += M[a++] << y, y += 8, v += M[a++] << y, y += 8), _ = m[v & k];
14056
14056
  r:
14057
14057
  for (; ; ) {
14058
- if (S = _ >>> 24, v >>>= S, y -= S, S = _ >>> 16 & 255, S & 16) {
14059
- if (A = _ & 65535, S &= 15, y < S && (v += M[a++] << y, y += 8, y < S && (v += M[a++] << y, y += 8)), A += v & (1 << S) - 1, A > l) {
14058
+ if (x = _ >>> 24, v >>>= x, y -= x, x = _ >>> 16 & 255, x & 16) {
14059
+ if (A = _ & 65535, x &= 15, y < x && (v += M[a++] << y, y += 8, y < x && (v += M[a++] << y, y += 8)), A += v & (1 << x) - 1, A > l) {
14060
14060
  e.msg = "invalid distance too far back", n.mode = BAD$1;
14061
14061
  break e;
14062
14062
  }
14063
- if (v >>>= S, y -= S, S = o - h, A > S) {
14064
- if (S = A - S, S > p && n.sane) {
14063
+ if (v >>>= x, y -= x, x = o - h, A > x) {
14064
+ if (x = A - x, x > p && n.sane) {
14065
14065
  e.msg = "invalid distance too far back", n.mode = BAD$1;
14066
14066
  break e;
14067
14067
  }
14068
14068
  if (D = 0, T = f, g === 0) {
14069
- if (D += u - S, S < F) {
14070
- F -= S;
14069
+ if (D += u - x, x < F) {
14070
+ F -= x;
14071
14071
  do
14072
14072
  C[o++] = f[D++];
14073
- while (--S);
14073
+ while (--x);
14074
14074
  D = o - A, T = C;
14075
14075
  }
14076
- } else if (g < S) {
14077
- if (D += u + g - S, S -= g, S < F) {
14078
- F -= S;
14076
+ } else if (g < x) {
14077
+ if (D += u + g - x, x -= g, x < F) {
14078
+ F -= x;
14079
14079
  do
14080
14080
  C[o++] = f[D++];
14081
- while (--S);
14081
+ while (--x);
14082
14082
  if (D = 0, g < F) {
14083
- S = g, F -= S;
14083
+ x = g, F -= x;
14084
14084
  do
14085
14085
  C[o++] = f[D++];
14086
- while (--S);
14086
+ while (--x);
14087
14087
  D = o - A, T = C;
14088
14088
  }
14089
14089
  }
14090
- } else if (D += g - S, S < F) {
14091
- F -= S;
14090
+ } else if (D += g - x, x < F) {
14091
+ F -= x;
14092
14092
  do
14093
14093
  C[o++] = f[D++];
14094
- while (--S);
14094
+ while (--x);
14095
14095
  D = o - A, T = C;
14096
14096
  }
14097
14097
  for (; F > 2; )
@@ -14104,17 +14104,17 @@ var inflate$4 = {}, inflate$3 = {}, BAD$1 = 30, TYPE$1 = 12, inffast = function
14104
14104
  while (F > 2);
14105
14105
  F && (C[o++] = C[D++], F > 1 && (C[o++] = C[D++]));
14106
14106
  }
14107
- } else if (S & 64) {
14107
+ } else if (x & 64) {
14108
14108
  e.msg = "invalid distance code", n.mode = BAD$1;
14109
14109
  break e;
14110
14110
  } else {
14111
- _ = m[(_ & 65535) + (v & (1 << S) - 1)];
14111
+ _ = m[(_ & 65535) + (v & (1 << x) - 1)];
14112
14112
  continue r;
14113
14113
  }
14114
14114
  break;
14115
14115
  }
14116
- } else if (S & 64)
14117
- if (S & 32) {
14116
+ } else if (x & 64)
14117
+ if (x & 32) {
14118
14118
  n.mode = TYPE$1;
14119
14119
  break e;
14120
14120
  } else {
@@ -14122,7 +14122,7 @@ var inflate$4 = {}, inflate$3 = {}, BAD$1 = 30, TYPE$1 = 12, inffast = function
14122
14122
  break e;
14123
14123
  }
14124
14124
  else {
14125
- _ = x[(_ & 65535) + (v & (1 << S) - 1)];
14125
+ _ = S[(_ & 65535) + (v & (1 << x) - 1)];
14126
14126
  continue t;
14127
14127
  }
14128
14128
  break;
@@ -14264,7 +14264,7 @@ var inflate$4 = {}, inflate$3 = {}, BAD$1 = 30, TYPE$1 = 12, inffast = function
14264
14264
  64,
14265
14265
  64
14266
14266
  ], inftrees = function t(e, r, n, a, s, o, h, d) {
14267
- var l = d.bits, u = 0, p = 0, g = 0, f = 0, v = 0, y = 0, x = 0, m = 0, w = 0, k = 0, _, S, F, A, D, T = null, M = 0, C, R = new utils$2.Buf16(MAXBITS + 1), O = new utils$2.Buf16(MAXBITS + 1), $ = null, K = 0, J, Y, se;
14267
+ var l = d.bits, u = 0, p = 0, g = 0, f = 0, v = 0, y = 0, S = 0, m = 0, w = 0, k = 0, _, x, F, A, D, T = null, M = 0, C, R = new utils$2.Buf16(MAXBITS + 1), O = new utils$2.Buf16(MAXBITS + 1), $ = null, K = 0, J, Y, se;
14268
14268
  for (u = 0; u <= MAXBITS; u++)
14269
14269
  R[u] = 0;
14270
14270
  for (p = 0; p < a; p++)
@@ -14284,13 +14284,13 @@ var inflate$4 = {}, inflate$3 = {}, BAD$1 = 30, TYPE$1 = 12, inffast = function
14284
14284
  O[u + 1] = O[u] + R[u];
14285
14285
  for (p = 0; p < a; p++)
14286
14286
  r[n + p] !== 0 && (h[O[r[n + p]]++] = p);
14287
- if (e === CODES$1 ? (T = $ = h, C = 19) : e === LENS$1 ? (T = lbase, M -= 257, $ = lext, K -= 257, C = 256) : (T = dbase, $ = dext, C = -1), k = 0, p = 0, u = g, D = o, y = v, x = 0, F = -1, w = 1 << v, A = w - 1, e === LENS$1 && w > ENOUGH_LENS$1 || e === DISTS$1 && w > ENOUGH_DISTS$1)
14287
+ if (e === CODES$1 ? (T = $ = h, C = 19) : e === LENS$1 ? (T = lbase, M -= 257, $ = lext, K -= 257, C = 256) : (T = dbase, $ = dext, C = -1), k = 0, p = 0, u = g, D = o, y = v, S = 0, F = -1, w = 1 << v, A = w - 1, e === LENS$1 && w > ENOUGH_LENS$1 || e === DISTS$1 && w > ENOUGH_DISTS$1)
14288
14288
  return 1;
14289
14289
  for (; ; ) {
14290
- J = u - x, h[p] < C ? (Y = 0, se = h[p]) : h[p] > C ? (Y = $[K + h[p]], se = T[M + h[p]]) : (Y = 96, se = 0), _ = 1 << u - x, S = 1 << y, g = S;
14290
+ J = u - S, h[p] < C ? (Y = 0, se = h[p]) : h[p] > C ? (Y = $[K + h[p]], se = T[M + h[p]]) : (Y = 96, se = 0), _ = 1 << u - S, x = 1 << y, g = x;
14291
14291
  do
14292
- S -= _, s[D + (k >> x) + S] = J << 24 | Y << 16 | se | 0;
14293
- while (S !== 0);
14292
+ x -= _, s[D + (k >> S) + x] = J << 24 | Y << 16 | se | 0;
14293
+ while (x !== 0);
14294
14294
  for (_ = 1 << u - 1; k & _; )
14295
14295
  _ >>= 1;
14296
14296
  if (_ !== 0 ? (k &= _ - 1, k += _) : k = 0, p++, --R[u] === 0) {
@@ -14299,14 +14299,14 @@ var inflate$4 = {}, inflate$3 = {}, BAD$1 = 30, TYPE$1 = 12, inffast = function
14299
14299
  u = r[n + h[p]];
14300
14300
  }
14301
14301
  if (u > v && (k & A) !== F) {
14302
- for (x === 0 && (x = v), D += g, y = u - x, m = 1 << y; y + x < f && (m -= R[y + x], !(m <= 0)); )
14302
+ for (S === 0 && (S = v), D += g, y = u - S, m = 1 << y; y + S < f && (m -= R[y + S], !(m <= 0)); )
14303
14303
  y++, m <<= 1;
14304
14304
  if (w += 1 << y, e === LENS$1 && w > ENOUGH_LENS$1 || e === DISTS$1 && w > ENOUGH_DISTS$1)
14305
14305
  return 1;
14306
14306
  F = k & A, s[F] = v << 24 | y << 16 | D - o | 0;
14307
14307
  }
14308
14308
  }
14309
- return k !== 0 && (s[D + k] = u - x << 24 | 64 << 16 | 0), d.bits = v, 0;
14309
+ return k !== 0 && (s[D + k] = u - S << 24 | 64 << 16 | 0), d.bits = v, 0;
14310
14310
  }, utils$1 = common, adler32 = adler32_1, crc32 = crc32_1, inflate_fast = inffast, inflate_table = inftrees, CODES = 0, LENS = 1, DISTS = 2, Z_FINISH = 4, Z_BLOCK = 5, Z_TREES = 6, Z_OK = 0, Z_STREAM_END = 1, Z_NEED_DICT = 2, Z_STREAM_ERROR = -2, Z_DATA_ERROR = -3, Z_MEM_ERROR = -4, Z_BUF_ERROR = -5, Z_DEFLATED = 8, HEAD = 1, FLAGS = 2, TIME = 3, OS = 4, EXLEN = 5, EXTRA = 6, NAME = 7, COMMENT = 8, HCRC = 9, DICTID = 10, DICT = 11, TYPE = 12, TYPEDO = 13, STORED = 14, COPY_ = 15, COPY = 16, TABLE = 17, LENLENS = 18, CODELENS = 19, LEN_ = 20, LEN = 21, LENEXT = 22, DIST = 23, DISTEXT = 24, MATCH = 25, LIT = 26, CHECK = 27, LENGTH = 28, DONE = 29, BAD = 30, MEM = 31, SYNC = 32, ENOUGH_LENS = 852, ENOUGH_DISTS = 592, MAX_WBITS = 15, DEF_WBITS = MAX_WBITS;
14311
14311
  function zswap32(t) {
14312
14312
  return (t >>> 24 & 255) + (t >>> 8 & 65280) + ((t & 65280) << 8) + ((t & 255) << 24);
@@ -14356,7 +14356,7 @@ function updatewindow(t, e, r, n) {
14356
14356
  return s.window === null && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new utils$1.Buf8(s.wsize)), n >= s.wsize ? (utils$1.arraySet(s.window, e, r - s.wsize, s.wsize, 0), s.wnext = 0, s.whave = s.wsize) : (a = s.wsize - s.wnext, a > n && (a = n), utils$1.arraySet(s.window, e, r - n, a, s.wnext), n -= a, n ? (utils$1.arraySet(s.window, e, r - n, n, 0), s.wnext = n, s.whave = s.wsize) : (s.wnext += a, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += a))), 0;
14357
14357
  }
14358
14358
  function inflate$2(t, e) {
14359
- var r, n, a, s, o, h, d, l, u, p, g, f, v, y, x = 0, m, w, k, _, S, F, A, D, T = new utils$1.Buf8(4), M, C, R = (
14359
+ var r, n, a, s, o, h, d, l, u, p, g, f, v, y, S = 0, m, w, k, _, x, F, A, D, T = new utils$1.Buf8(4), M, C, R = (
14360
14360
  /* permutation of code lengths */
14361
14361
  [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]
14362
14362
  );
@@ -14582,7 +14582,7 @@ function inflate$2(t, e) {
14582
14582
  r.have = 0, r.mode = CODELENS;
14583
14583
  case CODELENS:
14584
14584
  for (; r.have < r.nlen + r.ndist; ) {
14585
- for (; x = r.lencode[l & (1 << r.lenbits) - 1], m = x >>> 24, w = x >>> 16 & 255, k = x & 65535, !(m <= u); ) {
14585
+ for (; S = r.lencode[l & (1 << r.lenbits) - 1], m = S >>> 24, w = S >>> 16 & 255, k = S & 65535, !(m <= u); ) {
14586
14586
  if (h === 0)
14587
14587
  break e;
14588
14588
  h--, l += n[s++] << u, u += 8;
@@ -14647,13 +14647,13 @@ function inflate$2(t, e) {
14647
14647
  t.next_out = o, t.avail_out = d, t.next_in = s, t.avail_in = h, r.hold = l, r.bits = u, inflate_fast(t, g), o = t.next_out, a = t.output, d = t.avail_out, s = t.next_in, n = t.input, h = t.avail_in, l = r.hold, u = r.bits, r.mode === TYPE && (r.back = -1);
14648
14648
  break;
14649
14649
  }
14650
- for (r.back = 0; x = r.lencode[l & (1 << r.lenbits) - 1], m = x >>> 24, w = x >>> 16 & 255, k = x & 65535, !(m <= u); ) {
14650
+ for (r.back = 0; S = r.lencode[l & (1 << r.lenbits) - 1], m = S >>> 24, w = S >>> 16 & 255, k = S & 65535, !(m <= u); ) {
14651
14651
  if (h === 0)
14652
14652
  break e;
14653
14653
  h--, l += n[s++] << u, u += 8;
14654
14654
  }
14655
14655
  if (w && !(w & 240)) {
14656
- for (_ = m, S = w, F = k; x = r.lencode[F + ((l & (1 << _ + S) - 1) >> _)], m = x >>> 24, w = x >>> 16 & 255, k = x & 65535, !(_ + m <= u); ) {
14656
+ for (_ = m, x = w, F = k; S = r.lencode[F + ((l & (1 << _ + x) - 1) >> _)], m = S >>> 24, w = S >>> 16 & 255, k = S & 65535, !(_ + m <= u); ) {
14657
14657
  if (h === 0)
14658
14658
  break e;
14659
14659
  h--, l += n[s++] << u, u += 8;
@@ -14684,13 +14684,13 @@ function inflate$2(t, e) {
14684
14684
  }
14685
14685
  r.was = r.length, r.mode = DIST;
14686
14686
  case DIST:
14687
- for (; x = r.distcode[l & (1 << r.distbits) - 1], m = x >>> 24, w = x >>> 16 & 255, k = x & 65535, !(m <= u); ) {
14687
+ for (; S = r.distcode[l & (1 << r.distbits) - 1], m = S >>> 24, w = S >>> 16 & 255, k = S & 65535, !(m <= u); ) {
14688
14688
  if (h === 0)
14689
14689
  break e;
14690
14690
  h--, l += n[s++] << u, u += 8;
14691
14691
  }
14692
14692
  if (!(w & 240)) {
14693
- for (_ = m, S = w, F = k; x = r.distcode[F + ((l & (1 << _ + S) - 1) >> _)], m = x >>> 24, w = x >>> 16 & 255, k = x & 65535, !(_ + m <= u); ) {
14693
+ for (_ = m, x = w, F = k; S = r.distcode[F + ((l & (1 << _ + x) - 1) >> _)], m = S >>> 24, w = S >>> 16 & 255, k = S & 65535, !(_ + m <= u); ) {
14694
14694
  if (h === 0)
14695
14695
  break e;
14696
14696
  h--, l += n[s++] << u, u += 8;
@@ -16370,7 +16370,7 @@ var PDFFlateStream = (
16370
16370
  }
16371
16371
  return t.prototype.serializeToBuffer = function() {
16372
16372
  return __awaiter(this, void 0, void 0, function() {
16373
- var e, r, n, a, s, o, h, d, l, u, p, g, f, v, y, x, m;
16373
+ var e, r, n, a, s, o, h, d, l, u, p, g, f, v, y, S, m;
16374
16374
  return __generator(this, function(w) {
16375
16375
  switch (w.label) {
16376
16376
  case 0:
@@ -16378,7 +16378,7 @@ var PDFFlateStream = (
16378
16378
  case 1:
16379
16379
  e = w.sent(), r = e.size, n = e.header, a = e.indirectObjects, s = e.xref, o = e.trailerDict, h = e.trailer, d = 0, l = new Uint8Array(r), d += n.copyBytesInto(l, d), l[d++] = CharCodes$1.Newline, l[d++] = CharCodes$1.Newline, u = 0, p = a.length, w.label = 2;
16380
16380
  case 2:
16381
- return u < p ? (g = a[u], f = g[0], v = g[1], y = String(f.objectNumber), d += copyStringIntoBuffer(y, l, d), l[d++] = CharCodes$1.Space, x = String(f.generationNumber), d += copyStringIntoBuffer(x, l, d), l[d++] = CharCodes$1.Space, l[d++] = CharCodes$1.o, l[d++] = CharCodes$1.b, l[d++] = CharCodes$1.j, l[d++] = CharCodes$1.Newline, d += v.copyBytesInto(l, d), l[d++] = CharCodes$1.Newline, l[d++] = CharCodes$1.e, l[d++] = CharCodes$1.n, l[d++] = CharCodes$1.d, l[d++] = CharCodes$1.o, l[d++] = CharCodes$1.b, l[d++] = CharCodes$1.j, l[d++] = CharCodes$1.Newline, l[d++] = CharCodes$1.Newline, m = v instanceof PDFObjectStream ? v.getObjectsCount() : 1, this.shouldWaitForTick(m) ? [4, waitForTick()] : [3, 4]) : [3, 5];
16381
+ return u < p ? (g = a[u], f = g[0], v = g[1], y = String(f.objectNumber), d += copyStringIntoBuffer(y, l, d), l[d++] = CharCodes$1.Space, S = String(f.generationNumber), d += copyStringIntoBuffer(S, l, d), l[d++] = CharCodes$1.Space, l[d++] = CharCodes$1.o, l[d++] = CharCodes$1.b, l[d++] = CharCodes$1.j, l[d++] = CharCodes$1.Newline, d += v.copyBytesInto(l, d), l[d++] = CharCodes$1.Newline, l[d++] = CharCodes$1.e, l[d++] = CharCodes$1.n, l[d++] = CharCodes$1.d, l[d++] = CharCodes$1.o, l[d++] = CharCodes$1.b, l[d++] = CharCodes$1.j, l[d++] = CharCodes$1.Newline, l[d++] = CharCodes$1.Newline, m = v instanceof PDFObjectStream ? v.getObjectsCount() : 1, this.shouldWaitForTick(m) ? [4, waitForTick()] : [3, 4]) : [3, 5];
16382
16382
  case 3:
16383
16383
  w.sent(), w.label = 4;
16384
16384
  case 4:
@@ -16479,8 +16479,8 @@ var PDFCrossRefStream = (
16479
16479
  return o;
16480
16480
  }, s.computeMaxEntryByteWidths = function() {
16481
16481
  for (var o = s.entryTuplesCache.access(), h = [0, 0, 0], d = 0, l = o.length; d < l; d++) {
16482
- var u = o[d], p = u[0], g = u[1], f = u[2], v = sizeInBytes(p), y = sizeInBytes(g), x = sizeInBytes(f);
16483
- v > h[0] && (h[0] = v), y > h[1] && (h[1] = y), x > h[2] && (h[2] = x);
16482
+ var u = o[d], p = u[0], g = u[1], f = u[2], v = sizeInBytes(p), y = sizeInBytes(g), S = sizeInBytes(f);
16483
+ v > h[0] && (h[0] = v), y > h[1] && (h[1] = y), S > h[2] && (h[2] = S);
16484
16484
  }
16485
16485
  return h;
16486
16486
  }, s.entries = n || [], s.entryTuplesCache = Cache.populatedBy(s.computeEntryTuples), s.maxByteWidthsCache = Cache.populatedBy(s.computeMaxEntryByteWidths), s.indexCache = Cache.populatedBy(s.computeIndex), r.set(PDFName.of("Type"), PDFName.of("XRef")), s;
@@ -16542,7 +16542,7 @@ var PDFCrossRefStream = (
16542
16542
  }
16543
16543
  return e.prototype.computeBufferSize = function() {
16544
16544
  return __awaiter(this, void 0, void 0, function() {
16545
- var r, n, a, s, o, h, d, l, v, y, u, m, p, g, x, f, v, y, x, m, w, k, _, S;
16545
+ var r, n, a, s, o, h, d, l, v, y, u, m, p, g, S, f, v, y, S, m, w, k, _, x;
16546
16546
  return __generator(this, function(F) {
16547
16547
  switch (F.label) {
16548
16548
  case 0:
@@ -16554,19 +16554,19 @@ var PDFCrossRefStream = (
16554
16554
  case 3:
16555
16555
  return [3, 5];
16556
16556
  case 4:
16557
- x = last(h), f = last(d), (!x || x.length % this.objectsPerStream === 0) && (x = [], h.push(x), f = PDFRef.of(r++), d.push(f)), s.addCompressedEntry(m, f, x.length), x.push(u), F.label = 5;
16557
+ S = last(h), f = last(d), (!S || S.length % this.objectsPerStream === 0) && (S = [], h.push(S), f = PDFRef.of(r++), d.push(f)), s.addCompressedEntry(m, f, S.length), S.push(u), F.label = 5;
16558
16558
  case 5:
16559
16559
  return v++, [3, 1];
16560
16560
  case 6:
16561
16561
  v = 0, y = h.length, F.label = 7;
16562
16562
  case 7:
16563
- return v < y ? (x = h[v], m = d[v], w = PDFObjectStream.withContextAndObjects(this.context, x, this.encodeStreams), s.addUncompressedEntry(m, a), a += this.computeIndirectObjectSize([m, w]), o.push([m, w]), this.shouldWaitForTick(x.length) ? [4, waitForTick()] : [3, 9]) : [3, 10];
16563
+ return v < y ? (S = h[v], m = d[v], w = PDFObjectStream.withContextAndObjects(this.context, S, this.encodeStreams), s.addUncompressedEntry(m, a), a += this.computeIndirectObjectSize([m, w]), o.push([m, w]), this.shouldWaitForTick(S.length) ? [4, waitForTick()] : [3, 9]) : [3, 10];
16564
16564
  case 8:
16565
16565
  F.sent(), F.label = 9;
16566
16566
  case 9:
16567
16567
  return v++, [3, 7];
16568
16568
  case 10:
16569
- return k = PDFRef.of(r++), s.dict.set(PDFName.of("Size"), PDFNumber.of(r)), s.addUncompressedEntry(k, a), _ = a, a += this.computeIndirectObjectSize([k, s]), o.push([k, s]), S = PDFTrailer.forLastCrossRefSectionOffset(_), a += S.sizeInBytes(), [2, { size: a, header: n, indirectObjects: o, trailer: S }];
16569
+ return k = PDFRef.of(r++), s.dict.set(PDFName.of("Size"), PDFNumber.of(r)), s.addUncompressedEntry(k, a), _ = a, a += this.computeIndirectObjectSize([k, s]), o.push([k, s]), x = PDFTrailer.forLastCrossRefSectionOffset(_), a += x.sizeInBytes(), [2, { size: a, header: n, indirectObjects: o, trailer: x }];
16570
16570
  }
16571
16571
  });
16572
16572
  });
@@ -16850,13 +16850,13 @@ end`;
16850
16850
  });
16851
16851
  }, t.prototype.embedFontDescriptor = function(e) {
16852
16852
  return __awaiter(this, void 0, void 0, function() {
16853
- var r, n, a, s, o, h, d, l, u, p, g, f, v, y, x;
16853
+ var r, n, a, s, o, h, d, l, u, p, g, f, v, y, S;
16854
16854
  return __generator(this, function(m) {
16855
16855
  switch (m.label) {
16856
16856
  case 0:
16857
16857
  return [4, this.embedFontStream(e)];
16858
16858
  case 1:
16859
- return r = m.sent(), n = this.scale, a = this.font, s = a.italicAngle, o = a.ascent, h = a.descent, d = a.capHeight, l = a.xHeight, u = this.font.bbox, p = u.minX, g = u.minY, f = u.maxX, v = u.maxY, y = e.obj((x = {
16859
+ return r = m.sent(), n = this.scale, a = this.font, s = a.italicAngle, o = a.ascent, h = a.descent, d = a.capHeight, l = a.xHeight, u = this.font.bbox, p = u.minX, g = u.minY, f = u.maxX, v = u.maxY, y = e.obj((S = {
16860
16860
  Type: "FontDescriptor",
16861
16861
  FontName: this.baseFontName,
16862
16862
  Flags: deriveFontFlags(this.font),
@@ -16869,7 +16869,7 @@ end`;
16869
16869
  // Not sure how to compute/find this, nor is anybody else really:
16870
16870
  // https://stackoverflow.com/questions/35485179/stemv-value-of-the-truetype-font
16871
16871
  StemV: 0
16872
- }, x[this.isCFF() ? "FontFile3" : "FontFile2"] = r, x)), [2, e.register(y)];
16872
+ }, S[this.isCFF() ? "FontFile3" : "FontFile2"] = r, S)), [2, e.register(y)];
16873
16873
  }
16874
16874
  });
16875
16875
  });
@@ -17095,36 +17095,36 @@ UPNG.toRGBA8.decodeImage = function(t, e, r, n) {
17095
17095
  d[f] = 255 << 24 | t[y + 4] << 16 | t[y + 2] << 8 | t[y];
17096
17096
  }
17097
17097
  } else {
17098
- var x = v[0], m = v[1], w = v[2];
17098
+ var S = v[0], m = v[1], w = v[2];
17099
17099
  if (u == 8) for (var f = 0; f < a; f++) {
17100
17100
  var k = f << 2, y = f * 3;
17101
- d[f] = 255 << 24 | t[y + 2] << 16 | t[y + 1] << 8 | t[y], t[y] == x && t[y + 1] == m && t[y + 2] == w && (h[k + 3] = 0);
17101
+ d[f] = 255 << 24 | t[y + 2] << 16 | t[y + 1] << 8 | t[y], t[y] == S && t[y + 1] == m && t[y + 2] == w && (h[k + 3] = 0);
17102
17102
  }
17103
17103
  if (u == 16) for (var f = 0; f < a; f++) {
17104
17104
  var k = f << 2, y = f * 6;
17105
- d[f] = 255 << 24 | t[y + 4] << 16 | t[y + 2] << 8 | t[y], p(t, y) == x && p(t, y + 2) == m && p(t, y + 4) == w && (h[k + 3] = 0);
17105
+ d[f] = 255 << 24 | t[y + 4] << 16 | t[y + 2] << 8 | t[y], p(t, y) == S && p(t, y + 2) == m && p(t, y + 4) == w && (h[k + 3] = 0);
17106
17106
  }
17107
17107
  }
17108
17108
  } else if (l == 3) {
17109
- var _ = n.tabs.PLTE, S = n.tabs.tRNS, F = S ? S.length : 0;
17109
+ var _ = n.tabs.PLTE, x = n.tabs.tRNS, F = x ? x.length : 0;
17110
17110
  if (u == 1) for (var A = 0; A < r; A++)
17111
17111
  for (var D = A * o, T = A * e, f = 0; f < e; f++) {
17112
17112
  var k = T + f << 2, M = t[D + (f >> 3)] >> 7 - ((f & 7) << 0) & 1, C = 3 * M;
17113
- h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? S[M] : 255;
17113
+ h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? x[M] : 255;
17114
17114
  }
17115
17115
  if (u == 2) for (var A = 0; A < r; A++)
17116
17116
  for (var D = A * o, T = A * e, f = 0; f < e; f++) {
17117
17117
  var k = T + f << 2, M = t[D + (f >> 2)] >> 6 - ((f & 3) << 1) & 3, C = 3 * M;
17118
- h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? S[M] : 255;
17118
+ h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? x[M] : 255;
17119
17119
  }
17120
17120
  if (u == 4) for (var A = 0; A < r; A++)
17121
17121
  for (var D = A * o, T = A * e, f = 0; f < e; f++) {
17122
17122
  var k = T + f << 2, M = t[D + (f >> 1)] >> 4 - ((f & 1) << 2) & 15, C = 3 * M;
17123
- h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? S[M] : 255;
17123
+ h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? x[M] : 255;
17124
17124
  }
17125
17125
  if (u == 8) for (var f = 0; f < a; f++) {
17126
17126
  var k = f << 2, M = t[f], C = 3 * M;
17127
- h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? S[M] : 255;
17127
+ h[k] = _[C], h[k + 1] = _[C + 1], h[k + 2] = _[C + 2], h[k + 3] = M < F ? x[M] : 255;
17128
17128
  }
17129
17129
  } else if (l == 4) {
17130
17130
  if (u == 8) for (var f = 0; f < a; f++) {
@@ -17136,26 +17136,26 @@ UPNG.toRGBA8.decodeImage = function(t, e, r, n) {
17136
17136
  h[k] = O, h[k + 1] = O, h[k + 2] = O, h[k + 3] = t[R + 2];
17137
17137
  }
17138
17138
  } else if (l == 0)
17139
- for (var x = n.tabs.tRNS ? n.tabs.tRNS : -1, A = 0; A < r; A++) {
17139
+ for (var S = n.tabs.tRNS ? n.tabs.tRNS : -1, A = 0; A < r; A++) {
17140
17140
  var $ = A * o, K = A * e;
17141
17141
  if (u == 1) for (var J = 0; J < e; J++) {
17142
- var O = 255 * (t[$ + (J >>> 3)] >>> 7 - (J & 7) & 1), Y = O == x * 255 ? 0 : 255;
17142
+ var O = 255 * (t[$ + (J >>> 3)] >>> 7 - (J & 7) & 1), Y = O == S * 255 ? 0 : 255;
17143
17143
  d[K + J] = Y << 24 | O << 16 | O << 8 | O;
17144
17144
  }
17145
17145
  else if (u == 2) for (var J = 0; J < e; J++) {
17146
- var O = 85 * (t[$ + (J >>> 2)] >>> 6 - ((J & 3) << 1) & 3), Y = O == x * 85 ? 0 : 255;
17146
+ var O = 85 * (t[$ + (J >>> 2)] >>> 6 - ((J & 3) << 1) & 3), Y = O == S * 85 ? 0 : 255;
17147
17147
  d[K + J] = Y << 24 | O << 16 | O << 8 | O;
17148
17148
  }
17149
17149
  else if (u == 4) for (var J = 0; J < e; J++) {
17150
- var O = 17 * (t[$ + (J >>> 1)] >>> 4 - ((J & 1) << 2) & 15), Y = O == x * 17 ? 0 : 255;
17150
+ var O = 17 * (t[$ + (J >>> 1)] >>> 4 - ((J & 1) << 2) & 15), Y = O == S * 17 ? 0 : 255;
17151
17151
  d[K + J] = Y << 24 | O << 16 | O << 8 | O;
17152
17152
  }
17153
17153
  else if (u == 8) for (var J = 0; J < e; J++) {
17154
- var O = t[$ + J], Y = O == x ? 0 : 255;
17154
+ var O = t[$ + J], Y = O == S ? 0 : 255;
17155
17155
  d[K + J] = Y << 24 | O << 16 | O << 8 | O;
17156
17156
  }
17157
17157
  else if (u == 16) for (var J = 0; J < e; J++) {
17158
- var O = t[$ + (J << 1)], Y = p(t, $ + (J << f)) == x ? 0 : 255;
17158
+ var O = t[$ + (J << 1)], Y = p(t, $ + (J << f)) == S ? 0 : 255;
17159
17159
  d[K + J] = Y << 24 | O << 16 | O << 8 | O;
17160
17160
  }
17161
17161
  }
@@ -17179,9 +17179,9 @@ UPNG.decode = function(t) {
17179
17179
  var y = o.frames[o.frames.length - 1];
17180
17180
  y.data = UPNG.decode._decompress(o, l.slice(0, u), y.rect.width, y.rect.height), u = 0;
17181
17181
  }
17182
- var x = { x: s(e, r + 12), y: s(e, r + 16), width: s(e, r + 4), height: s(e, r + 8) }, m = a(e, r + 22);
17182
+ var S = { x: s(e, r + 12), y: s(e, r + 16), width: s(e, r + 4), height: s(e, r + 8) }, m = a(e, r + 22);
17183
17183
  m = a(e, r + 20) / (m == 0 ? 100 : m);
17184
- var w = { rect: x, delay: Math.round(m * 1e3), dispose: e[r + 24], blend: e[r + 25] };
17184
+ var w = { rect: S, delay: Math.round(m * 1e3), dispose: e[r + 24], blend: e[r + 25] };
17185
17185
  o.frames.push(w);
17186
17186
  } else if (v == "fdAT") {
17187
17187
  for (var g = 0; g < f - 4; g++) l[u + g] = e[r + g + 4];
@@ -17193,16 +17193,16 @@ UPNG.decode = function(t) {
17193
17193
  for (var g = 0; g < 8; g++) o.tabs[v].push(n.readUint(e, r + g * 4));
17194
17194
  } else if (v == "tEXt") {
17195
17195
  o.tabs[v] == null && (o.tabs[v] = {});
17196
- var k = n.nextZero(e, r), _ = n.readASCII(e, r, k - r), S = n.readASCII(e, k + 1, r + f - k - 1);
17197
- o.tabs[v][_] = S;
17196
+ var k = n.nextZero(e, r), _ = n.readASCII(e, r, k - r), x = n.readASCII(e, k + 1, r + f - k - 1);
17197
+ o.tabs[v][_] = x;
17198
17198
  } else if (v == "iTXt") {
17199
17199
  o.tabs[v] == null && (o.tabs[v] = {});
17200
17200
  var k = 0, F = r;
17201
17201
  k = n.nextZero(e, F);
17202
17202
  var _ = n.readASCII(e, F, k - F);
17203
17203
  F = k + 1, e[F], e[F + 1], F += 2, k = n.nextZero(e, F), n.readASCII(e, F, k - F), F = k + 1, k = n.nextZero(e, F), n.readUTF8(e, F, k - F), F = k + 1;
17204
- var S = n.readUTF8(e, F, f - (F - r));
17205
- o.tabs[v][_] = S;
17204
+ var x = n.readUTF8(e, F, f - (F - r));
17205
+ o.tabs[v][_] = x;
17206
17206
  } else if (v == "PLTE")
17207
17207
  o.tabs[v] = n.readBytes(e, r, f);
17208
17208
  else if (v == "hIST") {
@@ -17238,9 +17238,9 @@ UPNG.inflateRaw = function() {
17238
17238
  return t.H = {}, t.H.N = function(e, r) {
17239
17239
  var n = Uint8Array, a = 0, s = 0, o = 0, h = 0, d = 0, l = 0, u = 0, p = 0, g = 0, f, v;
17240
17240
  if (e[0] == 3 && e[1] == 0) return r || new n(0);
17241
- var y = t.H, x = y.b, m = y.e, w = y.R, k = y.n, _ = y.A, S = y.Z, F = y.m, A = r == null;
17241
+ var y = t.H, S = y.b, m = y.e, w = y.R, k = y.n, _ = y.A, x = y.Z, F = y.m, A = r == null;
17242
17242
  for (A && (r = new n(e.length >>> 2 << 3)); a == 0; ) {
17243
- if (a = x(e, g, 1), s = x(e, g + 1, 2), g += 3, s == 0) {
17243
+ if (a = S(e, g, 1), s = S(e, g + 1, 2), g += 3, s == 0) {
17244
17244
  g & 7 && (g += 8 - (g & 7));
17245
17245
  var D = (g >>> 3) + 4, T = e[D - 4] | e[D - 3] << 8;
17246
17246
  A && (r = t.H.W(r, p + T)), r.set(new n(e.buffer, e.byteOffset + D, T), p), g = D + T << 3, p += T;
@@ -17261,7 +17261,7 @@ UPNG.inflateRaw = function() {
17261
17261
  u = (1 << $) - 1, k(F.C, O), _(F.C, O, f), k(F.D, $), _(F.D, $, v);
17262
17262
  }
17263
17263
  for (; ; ) {
17264
- var K = f[S(e, g) & l];
17264
+ var K = f[x(e, g) & l];
17265
17265
  g += K & 15;
17266
17266
  var J = K >>> 4;
17267
17267
  if (!(J >>> 8))
@@ -17274,9 +17274,9 @@ UPNG.inflateRaw = function() {
17274
17274
  var se = F.q[J - 257];
17275
17275
  Y = p + (se >>> 3) + m(e, g, se & 7), g += se & 7;
17276
17276
  }
17277
- var B = v[S(e, g) & u];
17277
+ var B = v[x(e, g) & u];
17278
17278
  g += B & 15;
17279
- var V = B >>> 4, Q = F.c[V], I = (Q >>> 4) + x(e, g, Q & 15);
17279
+ var V = B >>> 4, Q = F.c[V], I = (Q >>> 4) + S(e, g, Q & 15);
17280
17280
  for (g += Q & 15; p < Y; )
17281
17281
  r[p] = r[p++ - I], r[p] = r[p++ - I], r[p] = r[p++ - I], r[p] = r[p++ - I];
17282
17282
  p = Y;
@@ -17365,14 +17365,14 @@ UPNG.inflateRaw = function() {
17365
17365
  }();
17366
17366
  UPNG.decode._readInterlace = function(t, e) {
17367
17367
  for (var r = e.width, n = e.height, a = UPNG.decode._getBPP(e), s = a >> 3, o = Math.ceil(r * a / 8), h = new Uint8Array(n * o), d = 0, l = [0, 0, 4, 0, 2, 0, 1], u = [0, 4, 0, 2, 0, 1, 0], p = [8, 8, 8, 4, 4, 2, 2], g = [8, 8, 4, 4, 2, 2, 1], f = 0; f < 7; ) {
17368
- for (var v = p[f], y = g[f], x = 0, m = 0, w = l[f]; w < n; )
17368
+ for (var v = p[f], y = g[f], S = 0, m = 0, w = l[f]; w < n; )
17369
17369
  w += v, m++;
17370
17370
  for (var k = u[f]; k < r; )
17371
- k += y, x++;
17372
- var _ = Math.ceil(x * a / 8);
17373
- UPNG.decode._filterZero(t, e, d, x, m);
17374
- for (var S = 0, F = l[f]; F < n; ) {
17375
- for (var A = u[f], D = d + S * _ << 3; A < r; ) {
17371
+ k += y, S++;
17372
+ var _ = Math.ceil(S * a / 8);
17373
+ UPNG.decode._filterZero(t, e, d, S, m);
17374
+ for (var x = 0, F = l[f]; F < n; ) {
17375
+ for (var A = u[f], D = d + x * _ << 3; A < r; ) {
17376
17376
  if (a == 1) {
17377
17377
  var T = t[D >> 3];
17378
17378
  T = T >> 7 - (D & 7) & 1, h[F * o + (A >> 3)] |= T << 7 - ((A & 7) << 0);
@@ -17389,9 +17389,9 @@ UPNG.decode._readInterlace = function(t, e) {
17389
17389
  for (var M = F * o + A * s, C = 0; C < s; C++) h[M + C] = t[(D >> 3) + C];
17390
17390
  D += a, A += y;
17391
17391
  }
17392
- S++, F += v;
17392
+ x++, F += v;
17393
17393
  }
17394
- x * m != 0 && (d += m * (1 + _)), f = f + 1;
17394
+ S * m != 0 && (d += m * (1 + _)), f = f + 1;
17395
17395
  }
17396
17396
  return h;
17397
17397
  };
@@ -17475,14 +17475,14 @@ UPNG._copyTile = function(t, e, r, n, a, s, o, h, d) {
17475
17475
  if (o >= 0 && h >= 0 ? (p = f * e + v << 2, g = (h + f) * a + o + v << 2) : (p = (-h + f) * e - o + v << 2, g = f * a + v << 2), d == 0)
17476
17476
  n[g] = t[p], n[g + 1] = t[p + 1], n[g + 2] = t[p + 2], n[g + 3] = t[p + 3];
17477
17477
  else if (d == 1) {
17478
- var y = t[p + 3] * 0.00392156862745098, x = t[p] * y, m = t[p + 1] * y, w = t[p + 2] * y, k = n[g + 3] * (1 / 255), _ = n[g] * k, S = n[g + 1] * k, F = n[g + 2] * k, A = 1 - y, D = y + k * A, T = D == 0 ? 0 : 1 / D;
17479
- n[g + 3] = 255 * D, n[g + 0] = (x + _ * A) * T, n[g + 1] = (m + S * A) * T, n[g + 2] = (w + F * A) * T;
17478
+ var y = t[p + 3] * 0.00392156862745098, S = t[p] * y, m = t[p + 1] * y, w = t[p + 2] * y, k = n[g + 3] * (1 / 255), _ = n[g] * k, x = n[g + 1] * k, F = n[g + 2] * k, A = 1 - y, D = y + k * A, T = D == 0 ? 0 : 1 / D;
17479
+ n[g + 3] = 255 * D, n[g + 0] = (S + _ * A) * T, n[g + 1] = (m + x * A) * T, n[g + 2] = (w + F * A) * T;
17480
17480
  } else if (d == 2) {
17481
- var y = t[p + 3], x = t[p], m = t[p + 1], w = t[p + 2], k = n[g + 3], _ = n[g], S = n[g + 1], F = n[g + 2];
17482
- y == k && x == _ && m == S && w == F ? (n[g] = 0, n[g + 1] = 0, n[g + 2] = 0, n[g + 3] = 0) : (n[g] = x, n[g + 1] = m, n[g + 2] = w, n[g + 3] = y);
17481
+ var y = t[p + 3], S = t[p], m = t[p + 1], w = t[p + 2], k = n[g + 3], _ = n[g], x = n[g + 1], F = n[g + 2];
17482
+ y == k && S == _ && m == x && w == F ? (n[g] = 0, n[g + 1] = 0, n[g + 2] = 0, n[g + 3] = 0) : (n[g] = S, n[g + 1] = m, n[g + 2] = w, n[g + 3] = y);
17483
17483
  } else if (d == 3) {
17484
- var y = t[p + 3], x = t[p], m = t[p + 1], w = t[p + 2], k = n[g + 3], _ = n[g], S = n[g + 1], F = n[g + 2];
17485
- if (y == k && x == _ && m == S && w == F) continue;
17484
+ var y = t[p + 3], S = t[p], m = t[p + 1], w = t[p + 2], k = n[g + 3], _ = n[g], x = n[g + 1], F = n[g + 2];
17485
+ if (y == k && S == _ && m == x && w == F) continue;
17486
17486
  if (y < 220 && k > 20) return !1;
17487
17487
  }
17488
17488
  return !0;
@@ -17507,8 +17507,8 @@ UPNG.encode._main = function(t, e, r, n, a) {
17507
17507
  g += 8 + f * 3 + 4 + (p ? 8 + f * 1 + 4 : 0);
17508
17508
  }
17509
17509
  for (var y = 0; y < t.frames.length; y++) {
17510
- var x = t.frames[y];
17511
- u && (g += 38), g += x.cimg.length + 12, y != 0 && (g += 4);
17510
+ var S = t.frames[y];
17511
+ u && (g += 38), g += S.cimg.length + 12, y != 0 && (g += 4);
17512
17512
  }
17513
17513
  g += 12;
17514
17514
  for (var m = new Uint8Array(g), w = [137, 80, 78, 71, 13, 10, 26, 10], v = 0; v < 8; v++) m[v] = w[v];
@@ -17516,8 +17516,8 @@ UPNG.encode._main = function(t, e, r, n, a) {
17516
17516
  var f = t.plte.length;
17517
17517
  o(m, l, f * 3), l += 4, d(m, l, "PLTE"), l += 4;
17518
17518
  for (var v = 0; v < f; v++) {
17519
- var k = v * 3, _ = t.plte[v], S = _ & 255, F = _ >>> 8 & 255, A = _ >>> 16 & 255;
17520
- m[l + k + 0] = S, m[l + k + 1] = F, m[l + k + 2] = A;
17519
+ var k = v * 3, _ = t.plte[v], x = _ & 255, F = _ >>> 8 & 255, A = _ >>> 16 & 255;
17520
+ m[l + k + 0] = x, m[l + k + 1] = F, m[l + k + 2] = A;
17521
17521
  }
17522
17522
  if (l += f * 3, o(m, l, s(m, l - f * 3 - 4, f * 3 + 4)), l += 4, p) {
17523
17523
  o(m, l, f), l += 4, d(m, l, "tRNS"), l += 4;
@@ -17526,9 +17526,9 @@ UPNG.encode._main = function(t, e, r, n, a) {
17526
17526
  }
17527
17527
  }
17528
17528
  for (var D = 0, y = 0; y < t.frames.length; y++) {
17529
- var x = t.frames[y];
17530
- u && (o(m, l, 26), l += 4, d(m, l, "fcTL"), l += 4, o(m, l, D++), l += 4, o(m, l, x.rect.width), l += 4, o(m, l, x.rect.height), l += 4, o(m, l, x.rect.x), l += 4, o(m, l, x.rect.y), l += 4, h(m, l, n[y]), l += 2, h(m, l, 1e3), l += 2, m[l] = x.dispose, l++, m[l] = x.blend, l++, o(m, l, s(m, l - 30, 30)), l += 4);
17531
- var T = x.cimg, f = T.length;
17529
+ var S = t.frames[y];
17530
+ u && (o(m, l, 26), l += 4, d(m, l, "fcTL"), l += 4, o(m, l, D++), l += 4, o(m, l, S.rect.width), l += 4, o(m, l, S.rect.height), l += 4, o(m, l, S.rect.x), l += 4, o(m, l, S.rect.y), l += 4, h(m, l, n[y]), l += 2, h(m, l, 1e3), l += 2, m[l] = S.dispose, l++, m[l] = S.blend, l++, o(m, l, s(m, l - 30, 30)), l += 4);
17531
+ var T = S.cimg, f = T.length;
17532
17532
  o(m, l, f + (y == 0 ? 0 : 4)), l += 4;
17533
17533
  var M = l;
17534
17534
  d(m, l, y == 0 ? "IDAT" : "fdAT"), l += 4, y != 0 && (o(m, l, D++), l += 4), m.set(T, l), l += f, o(m, l, s(m, M, l - M)), l += 4;
@@ -17545,31 +17545,31 @@ UPNG.encode.compressPNG = function(t, e, r) {
17545
17545
  };
17546
17546
  UPNG.encode.compress = function(t, e, r, n, a) {
17547
17547
  for (var s = a[0], o = a[1], h = a[2], d = a[3], l = a[4], u = 6, p = 8, g = 255, f = 0; f < t.length; f++)
17548
- for (var v = new Uint8Array(t[f]), y = v.length, x = 0; x < y; x += 4) g &= v[x + 3];
17549
- var m = g != 255, w = UPNG.encode.framize(t, e, r, s, o, h), k = {}, _ = [], S = [];
17548
+ for (var v = new Uint8Array(t[f]), y = v.length, S = 0; S < y; S += 4) g &= v[S + 3];
17549
+ var m = g != 255, w = UPNG.encode.framize(t, e, r, s, o, h), k = {}, _ = [], x = [];
17550
17550
  if (n != 0) {
17551
- for (var F = [], x = 0; x < w.length; x++) F.push(w[x].img.buffer);
17552
- for (var A = UPNG.encode.concatRGBA(F), D = UPNG.quantize(A, n), T = 0, M = new Uint8Array(D.abuf), x = 0; x < w.length; x++) {
17553
- var C = w[x].img, R = C.length;
17554
- S.push(new Uint8Array(D.inds.buffer, T >> 2, R >> 2));
17551
+ for (var F = [], S = 0; S < w.length; S++) F.push(w[S].img.buffer);
17552
+ for (var A = UPNG.encode.concatRGBA(F), D = UPNG.quantize(A, n), T = 0, M = new Uint8Array(D.abuf), S = 0; S < w.length; S++) {
17553
+ var C = w[S].img, R = C.length;
17554
+ x.push(new Uint8Array(D.inds.buffer, T >> 2, R >> 2));
17555
17555
  for (var f = 0; f < R; f += 4)
17556
17556
  C[f] = M[T + f], C[f + 1] = M[T + f + 1], C[f + 2] = M[T + f + 2], C[f + 3] = M[T + f + 3];
17557
17557
  T += R;
17558
17558
  }
17559
- for (var x = 0; x < D.plte.length; x++) _.push(D.plte[x].est.rgba);
17559
+ for (var S = 0; S < D.plte.length; S++) _.push(D.plte[S].est.rgba);
17560
17560
  } else
17561
17561
  for (var f = 0; f < w.length; f++) {
17562
17562
  var O = w[f], $ = new Uint32Array(O.img.buffer), K = O.rect.width, y = $.length, J = new Uint8Array(y);
17563
- S.push(J);
17564
- for (var x = 0; x < y; x++) {
17565
- var Y = $[x];
17566
- if (x != 0 && Y == $[x - 1]) J[x] = J[x - 1];
17567
- else if (x > K && Y == $[x - K]) J[x] = J[x - K];
17563
+ x.push(J);
17564
+ for (var S = 0; S < y; S++) {
17565
+ var Y = $[S];
17566
+ if (S != 0 && Y == $[S - 1]) J[S] = J[S - 1];
17567
+ else if (S > K && Y == $[S - K]) J[S] = J[S - K];
17568
17568
  else {
17569
17569
  var se = k[Y];
17570
17570
  if (se == null && (k[Y] = se = _.length, _.push(Y), _.length >= 300))
17571
17571
  break;
17572
- J[x] = se;
17572
+ J[S] = se;
17573
17573
  }
17574
17574
  }
17575
17575
  }
@@ -17583,17 +17583,17 @@ UPNG.encode.compress = function(t, e, r, n, a) {
17583
17583
  var I = 4 * K, P = 4;
17584
17584
  if (B <= 256 && l == !1) {
17585
17585
  I = Math.ceil(p * K / 8);
17586
- for (var E = new Uint8Array(I * V), N = S[f], z = 0; z < V; z++) {
17587
- var x = z * I, G = z * K;
17588
- if (p == 8) for (var H = 0; H < K; H++) E[x + H] = N[G + H];
17589
- else if (p == 4) for (var H = 0; H < K; H++) E[x + (H >> 1)] |= N[G + H] << 4 - (H & 1) * 4;
17590
- else if (p == 2) for (var H = 0; H < K; H++) E[x + (H >> 2)] |= N[G + H] << 6 - (H & 3) * 2;
17591
- else if (p == 1) for (var H = 0; H < K; H++) E[x + (H >> 3)] |= N[G + H] << 7 - (H & 7) * 1;
17586
+ for (var E = new Uint8Array(I * V), N = x[f], z = 0; z < V; z++) {
17587
+ var S = z * I, G = z * K;
17588
+ if (p == 8) for (var H = 0; H < K; H++) E[S + H] = N[G + H];
17589
+ else if (p == 4) for (var H = 0; H < K; H++) E[S + (H >> 1)] |= N[G + H] << 4 - (H & 1) * 4;
17590
+ else if (p == 2) for (var H = 0; H < K; H++) E[S + (H >> 2)] |= N[G + H] << 6 - (H & 3) * 2;
17591
+ else if (p == 1) for (var H = 0; H < K; H++) E[S + (H >> 3)] |= N[G + H] << 7 - (H & 7) * 1;
17592
17592
  }
17593
17593
  Q = E, u = 3, P = 1;
17594
17594
  } else if (m == !1 && w.length == 1) {
17595
- for (var E = new Uint8Array(K * V * 3), ee = K * V, x = 0; x < ee; x++) {
17596
- var C = x * 3, ce = x * 4;
17595
+ for (var E = new Uint8Array(K * V * 3), ee = K * V, S = 0; S < ee; S++) {
17596
+ var C = S * 3, ce = S * 4;
17597
17597
  E[C] = Q[ce], E[C + 1] = Q[ce + 1], E[C + 2] = Q[ce + 2];
17598
17598
  }
17599
17599
  Q = E, u = 2, P = 3, I = 3 * K;
@@ -17606,14 +17606,14 @@ UPNG.encode.framize = function(t, e, r, n, a, s) {
17606
17606
  for (var o = [], h = 0; h < t.length; h++) {
17607
17607
  var d = new Uint8Array(t[h]), l = new Uint32Array(d.buffer), u, p = 0, g = 0, f = e, v = r, y = n ? 1 : 0;
17608
17608
  if (h != 0) {
17609
- for (var x = s || n || h == 1 || o[h - 2].dispose != 0 ? 1 : 2, m = 0, w = 1e9, k = 0; k < x; k++) {
17610
- for (var O = new Uint8Array(t[h - 1 - k]), _ = new Uint32Array(t[h - 1 - k]), S = e, F = r, A = -1, D = -1, T = 0; T < r; T++) for (var M = 0; M < e; M++) {
17609
+ for (var S = s || n || h == 1 || o[h - 2].dispose != 0 ? 1 : 2, m = 0, w = 1e9, k = 0; k < S; k++) {
17610
+ for (var O = new Uint8Array(t[h - 1 - k]), _ = new Uint32Array(t[h - 1 - k]), x = e, F = r, A = -1, D = -1, T = 0; T < r; T++) for (var M = 0; M < e; M++) {
17611
17611
  var C = T * e + M;
17612
- l[C] != _[C] && (M < S && (S = M), M > A && (A = M), T < F && (F = T), T > D && (D = T));
17612
+ l[C] != _[C] && (M < x && (x = M), M > A && (A = M), T < F && (F = T), T > D && (D = T));
17613
17613
  }
17614
- A == -1 && (S = F = A = D = 0), a && ((S & 1) == 1 && S--, (F & 1) == 1 && F--);
17615
- var R = (A - S + 1) * (D - F + 1);
17616
- R < w && (w = R, m = k, p = S, g = F, f = A - S + 1, v = D - F + 1);
17614
+ A == -1 && (x = F = A = D = 0), a && ((x & 1) == 1 && x--, (F & 1) == 1 && F--);
17615
+ var R = (A - x + 1) * (D - F + 1);
17616
+ R < w && (w = R, m = k, p = x, g = F, f = A - x + 1, v = D - F + 1);
17617
17617
  }
17618
17618
  var O = new Uint8Array(t[h - 1 - m]);
17619
17619
  m == 1 && (o[h - 1].dispose = 2), u = new Uint8Array(f * v * 4), UPNG._copyTile(O, e, r, u, f, v, -p, -g, 0), y = UPNG._copyTile(d, e, r, u, f, v, -p, -g, 3) ? 1 : 0, y == 1 ? UPNG.encode._prepareDiff(d, e, r, u, { x: p, y: g, width: f, height: v }) : UPNG._copyTile(d, e, r, u, f, v, -p, -g, 0);
@@ -17635,11 +17635,11 @@ UPNG.encode.framize = function(t, e, r, n, a, s) {
17635
17635
  return o;
17636
17636
  };
17637
17637
  UPNG.encode._updateFrame = function(t, e, r, n, a, s, o) {
17638
- for (var h = Uint8Array, d = Uint32Array, l = new h(t[a - 1]), u = new d(t[a - 1]), p = a + 1 < t.length ? new h(t[a + 1]) : null, g = new h(t[a]), f = new d(g.buffer), v = e, y = r, x = -1, m = -1, w = 0; w < s.height; w++) for (var k = 0; k < s.width; k++) {
17639
- var _ = s.x + k, S = s.y + w, F = S * e + _, A = f[F];
17640
- A == 0 || n[a - 1].dispose == 0 && u[F] == A && (p == null || p[F * 4 + 3] != 0) || (_ < v && (v = _), _ > x && (x = _), S < y && (y = S), S > m && (m = S));
17638
+ for (var h = Uint8Array, d = Uint32Array, l = new h(t[a - 1]), u = new d(t[a - 1]), p = a + 1 < t.length ? new h(t[a + 1]) : null, g = new h(t[a]), f = new d(g.buffer), v = e, y = r, S = -1, m = -1, w = 0; w < s.height; w++) for (var k = 0; k < s.width; k++) {
17639
+ var _ = s.x + k, x = s.y + w, F = x * e + _, A = f[F];
17640
+ A == 0 || n[a - 1].dispose == 0 && u[F] == A && (p == null || p[F * 4 + 3] != 0) || (_ < v && (v = _), _ > S && (S = _), x < y && (y = x), x > m && (m = x));
17641
17641
  }
17642
- x == -1 && (v = y = x = m = 0), o && ((v & 1) == 1 && v--, (y & 1) == 1 && y--), s = { x: v, y, width: x - v + 1, height: m - y + 1 };
17642
+ S == -1 && (v = y = S = m = 0), o && ((v & 1) == 1 && v--, (y & 1) == 1 && y--), s = { x: v, y, width: S - v + 1, height: m - y + 1 };
17643
17643
  var D = n[a];
17644
17644
  D.rect = s, D.blend = 1, D.img = new Uint8Array(s.width * s.height * 4), n[a - 1].dispose == 0 ? (UPNG._copyTile(l, e, r, D.img, s.width, s.height, -s.x, -s.y, 0), UPNG.encode._prepareDiff(g, e, r, D.img, s)) : UPNG._copyTile(g, e, r, D.img, s.width, s.height, -s.x, -s.y, 0);
17645
17645
  };
@@ -17705,7 +17705,7 @@ UPNG.quantize = function(t, e) {
17705
17705
  var r = new Uint8Array(t), n = r.slice(0), a = new Uint32Array(n.buffer), s = UPNG.quantize.getKDtree(n, e), o = s[0], h = s[1];
17706
17706
  UPNG.quantize.planeDst;
17707
17707
  for (var d = r, l = a, u = d.length, p = new Uint8Array(r.length >> 2), g = 0; g < u; g += 4) {
17708
- var f = d[g] * 0.00392156862745098, v = d[g + 1] * (1 / 255), y = d[g + 2] * (1 / 255), x = d[g + 3] * (1 / 255), m = UPNG.quantize.getNearest(o, f, v, y, x);
17708
+ var f = d[g] * 0.00392156862745098, v = d[g + 1] * (1 / 255), y = d[g + 2] * (1 / 255), S = d[g + 3] * (1 / 255), m = UPNG.quantize.getNearest(o, f, v, y, S);
17709
17709
  p[g >> 2] = m.ind, l[g >> 2] = m.est.rgba;
17710
17710
  }
17711
17711
  return { abuf: n.buffer, inds: p, plte: h };
@@ -17798,15 +17798,15 @@ UPNG.quantize.estats = function(t) {
17798
17798
  if (n != 0)
17799
17799
  for (var y = 0; y < 10 && (g = p.multVec(u, g), v = Math.sqrt(p.dot(g, g)), g = p.sml(1 / v, g), !(Math.abs(v - f) < 1e-9)); y++)
17800
17800
  f = v;
17801
- var x = [a * d, s * d, o * d, h * d], m = p.dot(p.sml(255, x), g);
17801
+ var S = [a * d, s * d, o * d, h * d], m = p.dot(p.sml(255, S), g);
17802
17802
  return {
17803
17803
  Cov: l,
17804
- q: x,
17804
+ q: S,
17805
17805
  e: g,
17806
17806
  L: f,
17807
17807
  eMq255: m,
17808
- eMq: p.dot(g, x),
17809
- rgba: (Math.round(255 * x[3]) << 24 | Math.round(255 * x[2]) << 16 | Math.round(255 * x[1]) << 8 | Math.round(255 * x[0]) << 0) >>> 0
17808
+ eMq: p.dot(g, S),
17809
+ rgba: (Math.round(255 * S[3]) << 24 | Math.round(255 * S[2]) << 16 | Math.round(255 * S[1]) << 8 | Math.round(255 * S[0]) << 0) >>> 0
17810
17810
  };
17811
17811
  };
17812
17812
  UPNG.M4 = {
@@ -18811,12 +18811,12 @@ var PNG = (
18811
18811
  if (s === 1)
18812
18812
  g = fixedLitCodeTab, f = fixedDistCodeTab;
18813
18813
  else if (s === 2) {
18814
- var v = this.getBits(5) + 257, y = this.getBits(5) + 1, x = this.getBits(4) + 4, m = new Uint8Array(codeLenCodeMap.length), w = void 0;
18815
- for (w = 0; w < x; ++w)
18814
+ var v = this.getBits(5) + 257, y = this.getBits(5) + 1, S = this.getBits(4) + 4, m = new Uint8Array(codeLenCodeMap.length), w = void 0;
18815
+ for (w = 0; w < S; ++w)
18816
18816
  m[codeLenCodeMap[w]] = this.getBits(3);
18817
18817
  var k = this.generateHuffmanTable(m);
18818
18818
  n = 0, w = 0;
18819
- for (var _ = v + y, S = new Uint8Array(_), F = void 0, A = void 0, D = void 0; w < _; ) {
18819
+ for (var _ = v + y, x = new Uint8Array(_), F = void 0, A = void 0, D = void 0; w < _; ) {
18820
18820
  var T = this.getCode(k);
18821
18821
  if (T === 16)
18822
18822
  F = 2, A = 3, D = n;
@@ -18825,13 +18825,13 @@ var PNG = (
18825
18825
  else if (T === 18)
18826
18826
  F = 7, A = 11, D = n = 0;
18827
18827
  else {
18828
- S[w++] = n = T;
18828
+ x[w++] = n = T;
18829
18829
  continue;
18830
18830
  }
18831
18831
  for (var M = this.getBits(F) + A; M-- > 0; )
18832
- S[w++] = D;
18832
+ x[w++] = D;
18833
18833
  }
18834
- g = this.generateHuffmanTable(S.subarray(0, v)), f = this.generateHuffmanTable(S.subarray(v, _));
18834
+ g = this.generateHuffmanTable(x.subarray(0, v)), f = this.generateHuffmanTable(x.subarray(v, _));
18835
18835
  } else
18836
18836
  throw new Error("Unknown block type in flate stream");
18837
18837
  r = this.buffer;
@@ -18909,32 +18909,32 @@ var PNG = (
18909
18909
  return e.prototype.readBlock = function() {
18910
18910
  var r = 512, n = r * 2, a = r, s, o, h, d = this.lzwState;
18911
18911
  if (d) {
18912
- var l = d.earlyChange, u = d.nextCode, p = d.dictionaryValues, g = d.dictionaryLengths, f = d.dictionaryPrevCodes, v = d.codeLength, y = d.prevCode, x = d.currentSequence, m = d.currentSequenceLength, w = 0, k = this.bufferLength, _ = this.ensureBuffer(this.bufferLength + n);
18912
+ var l = d.earlyChange, u = d.nextCode, p = d.dictionaryValues, g = d.dictionaryLengths, f = d.dictionaryPrevCodes, v = d.codeLength, y = d.prevCode, S = d.currentSequence, m = d.currentSequenceLength, w = 0, k = this.bufferLength, _ = this.ensureBuffer(this.bufferLength + n);
18913
18913
  for (s = 0; s < r; s++) {
18914
- var S = this.readBits(v), F = m > 0;
18915
- if (!S || S < 256)
18916
- x[0] = S, m = 1;
18917
- else if (S >= 258)
18918
- if (S < u)
18919
- for (m = g[S], o = m - 1, h = S; o >= 0; o--)
18920
- x[o] = p[h], h = f[h];
18914
+ var x = this.readBits(v), F = m > 0;
18915
+ if (!x || x < 256)
18916
+ S[0] = x, m = 1;
18917
+ else if (x >= 258)
18918
+ if (x < u)
18919
+ for (m = g[x], o = m - 1, h = x; o >= 0; o--)
18920
+ S[o] = p[h], h = f[h];
18921
18921
  else
18922
- x[m++] = x[0];
18923
- else if (S === 256) {
18922
+ S[m++] = S[0];
18923
+ else if (x === 256) {
18924
18924
  v = 9, u = 258, m = 0;
18925
18925
  continue;
18926
18926
  } else {
18927
18927
  this.eof = !0, delete this.lzwState;
18928
18928
  break;
18929
18929
  }
18930
- if (F && (f[u] = y, g[u] = g[y] + 1, p[u] = x[0], u++, v = u + l & u + l - 1 ? v : Math.min(Math.log(u + l) / 0.6931471805599453 + 1, 12) | 0), y = S, w += m, n < w) {
18930
+ if (F && (f[u] = y, g[u] = g[y] + 1, p[u] = S[0], u++, v = u + l & u + l - 1 ? v : Math.min(Math.log(u + l) / 0.6931471805599453 + 1, 12) | 0), y = x, w += m, n < w) {
18931
18931
  do
18932
18932
  n += a;
18933
18933
  while (n < w);
18934
18934
  _ = this.ensureBuffer(this.bufferLength + n);
18935
18935
  }
18936
18936
  for (o = 0; o < m; o++)
18937
- _[k++] = x[o];
18937
+ _[k++] = S[o];
18938
18938
  }
18939
18939
  d.nextCode = u, d.codeLength = v, d.prevCode = y, d.currentSequenceLength = m, this.bufferLength = k;
18940
18940
  }
@@ -20537,11 +20537,11 @@ var Newline$1 = CharCodes$1.Newline, CarriageReturn$1 = CharCodes$1.CarriageRetu
20537
20537
  g = g << 8 | this.bytes.next();
20538
20538
  for (var y = 0, f = 0, v = a; f < v; f++)
20539
20539
  y = y << 8 | this.bytes.next();
20540
- for (var x = 0, f = 0, v = s; f < v; f++)
20541
- x = x << 8 | this.bytes.next();
20540
+ for (var S = 0, f = 0, v = s; f < v; f++)
20541
+ S = S << 8 | this.bytes.next();
20542
20542
  n === 0 && (g = 1);
20543
20543
  var m = l + p, w = {
20544
- ref: PDFRef.of(m, x),
20544
+ ref: PDFRef.of(m, S),
20545
20545
  offset: y,
20546
20546
  deleted: g === 0,
20547
20547
  inObjectStream: g === 2
@@ -21072,7 +21072,7 @@ var grayscale = function(t) {
21072
21072
  r = Math.abs(r), n = Math.abs(n), px = p * (h - t) * 0.5 + u * (d - e) * 0.5, py = p * (d - e) * 0.5 - u * (h - t) * 0.5;
21073
21073
  var g = px * px / (r * r) + py * py / (n * n);
21074
21074
  g > 1 && (g = Math.sqrt(g), r *= g, n *= g);
21075
- var f = p / r, v = u / r, y = -u / n, x = p / n, m = f * h + v * d, w = y * h + x * d, k = f * t + v * e, _ = y * t + x * e, S = (k - m) * (k - m) + (_ - w) * (_ - w), F = 1 / S - 0.25;
21075
+ var f = p / r, v = u / r, y = -u / n, S = p / n, m = f * h + v * d, w = y * h + S * d, k = f * t + v * e, _ = y * t + S * e, x = (k - m) * (k - m) + (_ - w) * (_ - w), F = 1 / x - 0.25;
21076
21076
  F < 0 && (F = 0);
21077
21077
  var A = Math.sqrt(F);
21078
21078
  s === a && (A = -A);
@@ -21084,13 +21084,13 @@ var grayscale = function(t) {
21084
21084
  }
21085
21085
  return $;
21086
21086
  }, segmentToBezier = function(t, e, r, n, a, s, o, h) {
21087
- var d = h * a, l = -o * s, u = o * a, p = h * s, g = 0.5 * (n - r), f = 8 / 3 * Math.sin(g * 0.5) * Math.sin(g * 0.5) / Math.sin(g), v = t + Math.cos(r) - f * Math.sin(r), y = e + Math.sin(r) + f * Math.cos(r), x = t + Math.cos(n), m = e + Math.sin(n), w = x + f * Math.sin(n), k = m - f * Math.cos(n), _ = [
21087
+ var d = h * a, l = -o * s, u = o * a, p = h * s, g = 0.5 * (n - r), f = 8 / 3 * Math.sin(g * 0.5) * Math.sin(g * 0.5) / Math.sin(g), v = t + Math.cos(r) - f * Math.sin(r), y = e + Math.sin(r) + f * Math.cos(r), S = t + Math.cos(n), m = e + Math.sin(n), w = S + f * Math.sin(n), k = m - f * Math.cos(n), _ = [
21088
21088
  d * v + l * y,
21089
21089
  u * v + p * y,
21090
21090
  d * w + l * k,
21091
21091
  u * w + p * k,
21092
- d * x + l * m,
21093
- u * x + p * m
21092
+ d * S + l * m,
21093
+ u * S + p * m
21094
21094
  ];
21095
21095
  return _;
21096
21096
  }, svgPathToOperators = function(t) {
@@ -21397,7 +21397,7 @@ var grayscale = function(t) {
21397
21397
  rotate: degrees(0),
21398
21398
  xSkew: degrees(0),
21399
21399
  ySkew: degrees(0)
21400
- }), v = [], y = 0, x = t.selectedLines.length; y < x; y++) {
21400
+ }), v = [], y = 0, S = t.selectedLines.length; y < S; y++) {
21401
21401
  var m = t.textLines[t.selectedLines[y]];
21402
21402
  v.push.apply(v, drawRectangle({
21403
21403
  x: m.x - h,
@@ -21585,7 +21585,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21585
21585
  }
21586
21586
  if (!n && s > t.length)
21587
21587
  return a - 1;
21588
- var x = e.heightAtSize(a), m = x + x * 0.2, w = m * s;
21588
+ var S = e.heightAtSize(a), m = S + S * 0.2, w = m * s;
21589
21589
  if (w > Math.abs(r.height))
21590
21590
  return a - 1;
21591
21591
  a += 1;
@@ -21626,10 +21626,10 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21626
21626
  }, layoutMultilineText = function(t, e) {
21627
21627
  var r = e.alignment, n = e.fontSize, a = e.font, s = e.bounds, o = lineSplit(cleanText(t));
21628
21628
  (n === void 0 || n === 0) && (n = computeFontSize(o, a, s, !0));
21629
- for (var h = a.heightAtSize(n), d = h + h * 0.2, l = [], u = s.x, p = s.y, g = s.x + s.width, f = s.y + s.height, v = s.y + s.height, y = 0, x = o.length; y < x; y++)
21629
+ for (var h = a.heightAtSize(n), d = h + h * 0.2, l = [], u = s.x, p = s.y, g = s.x + s.width, f = s.y + s.height, v = s.y + s.height, y = 0, S = o.length; y < S; y++)
21630
21630
  for (var m = o[y]; m !== void 0; ) {
21631
- var w = splitOutLines(m, s.width, a, n), k = w.line, _ = w.encoded, S = w.width, F = w.remainder, A = r === TextAlignment.Left ? s.x : r === TextAlignment.Center ? s.x + s.width / 2 - S / 2 : r === TextAlignment.Right ? s.x + s.width - S : s.x;
21632
- v -= d, A < u && (u = A), v < p && (p = v), A + S > g && (g = A + S), v + h > f && (f = v + h), l.push({ text: k, encoded: _, width: S, height: h, x: A, y: v }), m = F == null ? void 0 : F.trim();
21631
+ var w = splitOutLines(m, s.width, a, n), k = w.line, _ = w.encoded, x = w.width, F = w.remainder, A = r === TextAlignment.Left ? s.x : r === TextAlignment.Center ? s.x + s.width / 2 - x / 2 : r === TextAlignment.Right ? s.x + s.width - x : s.x;
21632
+ v -= d, A < u && (u = A), v < p && (p = v), A + x > g && (g = A + x), v + h > f && (f = v + h), l.push({ text: k, encoded: _, width: x, height: h, x: A, y: v }), m = F == null ? void 0 : F.trim();
21633
21633
  }
21634
21634
  return {
21635
21635
  fontSize: n,
@@ -21647,9 +21647,9 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21647
21647
  if (o.length > s)
21648
21648
  throw new CombedTextLayoutError(o.length, s);
21649
21649
  (r === void 0 || r === 0) && (r = computeCombedFontSize(o, n, a, s));
21650
- for (var h = a.width / s, d = n.heightAtSize(r, { descender: !1 }), l = a.y + (a.height / 2 - d / 2), u = [], p = a.x, g = a.y, f = a.x + a.width, v = a.y + a.height, y = 0, x = 0; y < s; ) {
21651
- var m = charAtIndex(o, x), w = m[0], k = m[1], _ = n.encodeText(w), S = n.widthOfTextAtSize(w, r), F = a.x + (h * y + h / 2), A = F - S / 2;
21652
- A < p && (p = A), l < g && (g = l), A + S > f && (f = A + S), l + d > v && (v = l + d), u.push({ text: o, encoded: _, width: S, height: d, x: A, y: l }), y += 1, x += k;
21650
+ for (var h = a.width / s, d = n.heightAtSize(r, { descender: !1 }), l = a.y + (a.height / 2 - d / 2), u = [], p = a.x, g = a.y, f = a.x + a.width, v = a.y + a.height, y = 0, S = 0; y < s; ) {
21651
+ var m = charAtIndex(o, S), w = m[0], k = m[1], _ = n.encodeText(w), x = n.widthOfTextAtSize(w, r), F = a.x + (h * y + h / 2), A = F - x / 2;
21652
+ A < p && (p = A), l < g && (g = l), A + x > f && (f = A + x), l + d > v && (v = l + d), u.push({ text: o, encoded: _, width: x, height: d, x: A, y: l }), y += 1, S += k;
21653
21653
  }
21654
21654
  return {
21655
21655
  fontSize: r,
@@ -21693,9 +21693,9 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21693
21693
  `);
21694
21694
  t.setDefaultAppearance(s);
21695
21695
  }, defaultCheckBoxAppearanceProvider = function(t, e) {
21696
- var r, n, a, s = getDefaultColor(e), o = getDefaultColor(t.acroField), h = e.getRectangle(), d = e.getAppearanceCharacteristics(), l = e.getBorderStyle(), u = (r = l == null ? void 0 : l.getWidth()) !== null && r !== void 0 ? r : 0, p = reduceRotation(d == null ? void 0 : d.getRotation()), g = adjustDimsForRotation(h, p), f = g.width, v = g.height, y = rotateInPlace(__assign(__assign({}, h), { rotation: p })), x = rgb(0, 0, 0), m = (n = componentsToColor(d == null ? void 0 : d.getBorderColor())) !== null && n !== void 0 ? n : x, w = componentsToColor(d == null ? void 0 : d.getBackgroundColor()), k = componentsToColor(d == null ? void 0 : d.getBackgroundColor(), 0.8), _ = (a = s ?? o) !== null && a !== void 0 ? a : x;
21696
+ var r, n, a, s = getDefaultColor(e), o = getDefaultColor(t.acroField), h = e.getRectangle(), d = e.getAppearanceCharacteristics(), l = e.getBorderStyle(), u = (r = l == null ? void 0 : l.getWidth()) !== null && r !== void 0 ? r : 0, p = reduceRotation(d == null ? void 0 : d.getRotation()), g = adjustDimsForRotation(h, p), f = g.width, v = g.height, y = rotateInPlace(__assign(__assign({}, h), { rotation: p })), S = rgb(0, 0, 0), m = (n = componentsToColor(d == null ? void 0 : d.getBorderColor())) !== null && n !== void 0 ? n : S, w = componentsToColor(d == null ? void 0 : d.getBackgroundColor()), k = componentsToColor(d == null ? void 0 : d.getBackgroundColor(), 0.8), _ = (a = s ?? o) !== null && a !== void 0 ? a : S;
21697
21697
  updateDefaultAppearance(s ? e : t.acroField, _);
21698
- var S = {
21698
+ var x = {
21699
21699
  x: 0 + u / 2,
21700
21700
  y: 0 + u / 2,
21701
21701
  width: f - u,
@@ -21707,18 +21707,18 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21707
21707
  };
21708
21708
  return {
21709
21709
  normal: {
21710
- on: __spreadArrays(y, drawCheckBox(__assign(__assign({}, S), { color: w, filled: !0 }))),
21711
- off: __spreadArrays(y, drawCheckBox(__assign(__assign({}, S), { color: w, filled: !1 })))
21710
+ on: __spreadArrays(y, drawCheckBox(__assign(__assign({}, x), { color: w, filled: !0 }))),
21711
+ off: __spreadArrays(y, drawCheckBox(__assign(__assign({}, x), { color: w, filled: !1 })))
21712
21712
  },
21713
21713
  down: {
21714
- on: __spreadArrays(y, drawCheckBox(__assign(__assign({}, S), { color: k, filled: !0 }))),
21715
- off: __spreadArrays(y, drawCheckBox(__assign(__assign({}, S), { color: k, filled: !1 })))
21714
+ on: __spreadArrays(y, drawCheckBox(__assign(__assign({}, x), { color: k, filled: !0 }))),
21715
+ off: __spreadArrays(y, drawCheckBox(__assign(__assign({}, x), { color: k, filled: !1 })))
21716
21716
  }
21717
21717
  };
21718
21718
  }, defaultRadioGroupAppearanceProvider = function(t, e) {
21719
- var r, n, a, s = getDefaultColor(e), o = getDefaultColor(t.acroField), h = e.getRectangle(), d = e.getAppearanceCharacteristics(), l = e.getBorderStyle(), u = (r = l == null ? void 0 : l.getWidth()) !== null && r !== void 0 ? r : 0, p = reduceRotation(d == null ? void 0 : d.getRotation()), g = adjustDimsForRotation(h, p), f = g.width, v = g.height, y = rotateInPlace(__assign(__assign({}, h), { rotation: p })), x = rgb(0, 0, 0), m = (n = componentsToColor(d == null ? void 0 : d.getBorderColor())) !== null && n !== void 0 ? n : x, w = componentsToColor(d == null ? void 0 : d.getBackgroundColor()), k = componentsToColor(d == null ? void 0 : d.getBackgroundColor(), 0.8), _ = (a = s ?? o) !== null && a !== void 0 ? a : x;
21719
+ var r, n, a, s = getDefaultColor(e), o = getDefaultColor(t.acroField), h = e.getRectangle(), d = e.getAppearanceCharacteristics(), l = e.getBorderStyle(), u = (r = l == null ? void 0 : l.getWidth()) !== null && r !== void 0 ? r : 0, p = reduceRotation(d == null ? void 0 : d.getRotation()), g = adjustDimsForRotation(h, p), f = g.width, v = g.height, y = rotateInPlace(__assign(__assign({}, h), { rotation: p })), S = rgb(0, 0, 0), m = (n = componentsToColor(d == null ? void 0 : d.getBorderColor())) !== null && n !== void 0 ? n : S, w = componentsToColor(d == null ? void 0 : d.getBackgroundColor()), k = componentsToColor(d == null ? void 0 : d.getBackgroundColor(), 0.8), _ = (a = s ?? o) !== null && a !== void 0 ? a : S;
21720
21720
  updateDefaultAppearance(s ? e : t.acroField, _);
21721
- var S = {
21721
+ var x = {
21722
21722
  x: f / 2,
21723
21723
  y: v / 2,
21724
21724
  width: f - u,
@@ -21729,21 +21729,21 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21729
21729
  };
21730
21730
  return {
21731
21731
  normal: {
21732
- on: __spreadArrays(y, drawRadioButton(__assign(__assign({}, S), { color: w, filled: !0 }))),
21733
- off: __spreadArrays(y, drawRadioButton(__assign(__assign({}, S), { color: w, filled: !1 })))
21732
+ on: __spreadArrays(y, drawRadioButton(__assign(__assign({}, x), { color: w, filled: !0 }))),
21733
+ off: __spreadArrays(y, drawRadioButton(__assign(__assign({}, x), { color: w, filled: !1 })))
21734
21734
  },
21735
21735
  down: {
21736
- on: __spreadArrays(y, drawRadioButton(__assign(__assign({}, S), { color: k, filled: !0 }))),
21737
- off: __spreadArrays(y, drawRadioButton(__assign(__assign({}, S), { color: k, filled: !1 })))
21736
+ on: __spreadArrays(y, drawRadioButton(__assign(__assign({}, x), { color: k, filled: !0 }))),
21737
+ off: __spreadArrays(y, drawRadioButton(__assign(__assign({}, x), { color: k, filled: !1 })))
21738
21738
  }
21739
21739
  };
21740
21740
  }, defaultButtonAppearanceProvider = function(t, e, r) {
21741
- var n, a, s, o, h, d = getDefaultColor(e), l = getDefaultColor(t.acroField), u = getDefaultFontSize(e), p = getDefaultFontSize(t.acroField), g = e.getRectangle(), f = e.getAppearanceCharacteristics(), v = e.getBorderStyle(), y = f == null ? void 0 : f.getCaptions(), x = (n = y == null ? void 0 : y.normal) !== null && n !== void 0 ? n : "", m = (s = (a = y == null ? void 0 : y.down) !== null && a !== void 0 ? a : x) !== null && s !== void 0 ? s : "", w = (o = v == null ? void 0 : v.getWidth()) !== null && o !== void 0 ? o : 0, k = reduceRotation(f == null ? void 0 : f.getRotation()), _ = adjustDimsForRotation(g, k), S = _.width, F = _.height, A = rotateInPlace(__assign(__assign({}, g), { rotation: k })), D = rgb(0, 0, 0), T = componentsToColor(f == null ? void 0 : f.getBorderColor()), M = componentsToColor(f == null ? void 0 : f.getBackgroundColor()), C = componentsToColor(f == null ? void 0 : f.getBackgroundColor(), 0.8), R = {
21741
+ var n, a, s, o, h, d = getDefaultColor(e), l = getDefaultColor(t.acroField), u = getDefaultFontSize(e), p = getDefaultFontSize(t.acroField), g = e.getRectangle(), f = e.getAppearanceCharacteristics(), v = e.getBorderStyle(), y = f == null ? void 0 : f.getCaptions(), S = (n = y == null ? void 0 : y.normal) !== null && n !== void 0 ? n : "", m = (s = (a = y == null ? void 0 : y.down) !== null && a !== void 0 ? a : S) !== null && s !== void 0 ? s : "", w = (o = v == null ? void 0 : v.getWidth()) !== null && o !== void 0 ? o : 0, k = reduceRotation(f == null ? void 0 : f.getRotation()), _ = adjustDimsForRotation(g, k), x = _.width, F = _.height, A = rotateInPlace(__assign(__assign({}, g), { rotation: k })), D = rgb(0, 0, 0), T = componentsToColor(f == null ? void 0 : f.getBorderColor()), M = componentsToColor(f == null ? void 0 : f.getBackgroundColor()), C = componentsToColor(f == null ? void 0 : f.getBackgroundColor(), 0.8), R = {
21742
21742
  x: w,
21743
21743
  y: w,
21744
- width: S - w * 2,
21744
+ width: x - w * 2,
21745
21745
  height: F - w * 2
21746
- }, O = layoutSinglelineText(x, {
21746
+ }, O = layoutSinglelineText(S, {
21747
21747
  alignment: TextAlignment.Center,
21748
21748
  fontSize: u ?? p,
21749
21749
  font: r,
@@ -21758,7 +21758,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21758
21758
  var Y = {
21759
21759
  x: 0 + w / 2,
21760
21760
  y: 0 + w / 2,
21761
- width: S - w,
21761
+ width: x - w,
21762
21762
  height: F - w,
21763
21763
  borderWidth: w,
21764
21764
  borderColor: T,
@@ -21771,7 +21771,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21771
21771
  down: __spreadArrays(A, drawButton(__assign(__assign({}, Y), { color: C, textLines: [$.line] })))
21772
21772
  };
21773
21773
  }, defaultTextFieldAppearanceProvider = function(t, e, r) {
21774
- var n, a, s, o, h = getDefaultColor(e), d = getDefaultColor(t.acroField), l = getDefaultFontSize(e), u = getDefaultFontSize(t.acroField), p = e.getRectangle(), g = e.getAppearanceCharacteristics(), f = e.getBorderStyle(), v = (n = t.getText()) !== null && n !== void 0 ? n : "", y = (a = f == null ? void 0 : f.getWidth()) !== null && a !== void 0 ? a : 0, x = reduceRotation(g == null ? void 0 : g.getRotation()), m = adjustDimsForRotation(p, x), w = m.width, k = m.height, _ = rotateInPlace(__assign(__assign({}, p), { rotation: x })), S = rgb(0, 0, 0), F = componentsToColor(g == null ? void 0 : g.getBorderColor()), A = componentsToColor(g == null ? void 0 : g.getBackgroundColor()), D, T, M = t.isCombed() ? 0 : 1, C = {
21774
+ var n, a, s, o, h = getDefaultColor(e), d = getDefaultColor(t.acroField), l = getDefaultFontSize(e), u = getDefaultFontSize(t.acroField), p = e.getRectangle(), g = e.getAppearanceCharacteristics(), f = e.getBorderStyle(), v = (n = t.getText()) !== null && n !== void 0 ? n : "", y = (a = f == null ? void 0 : f.getWidth()) !== null && a !== void 0 ? a : 0, S = reduceRotation(g == null ? void 0 : g.getRotation()), m = adjustDimsForRotation(p, S), w = m.width, k = m.height, _ = rotateInPlace(__assign(__assign({}, p), { rotation: S })), x = rgb(0, 0, 0), F = componentsToColor(g == null ? void 0 : g.getBorderColor()), A = componentsToColor(g == null ? void 0 : g.getBackgroundColor()), D, T, M = t.isCombed() ? 0 : 1, C = {
21775
21775
  x: y + M,
21776
21776
  y: y + M,
21777
21777
  width: w - (y + M) * 2,
@@ -21802,7 +21802,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21802
21802
  });
21803
21803
  D = [R.line], T = R.fontSize;
21804
21804
  }
21805
- var O = (o = h ?? d) !== null && o !== void 0 ? o : S;
21805
+ var O = (o = h ?? d) !== null && o !== void 0 ? o : x;
21806
21806
  updateDefaultAppearance(h || l !== void 0 ? e : t.acroField, O, r, T);
21807
21807
  var $ = {
21808
21808
  x: 0 + y / 2,
@@ -21820,7 +21820,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21820
21820
  };
21821
21821
  return __spreadArrays(_, drawTextField($));
21822
21822
  }, defaultDropdownAppearanceProvider = function(t, e, r) {
21823
- var n, a, s, o = getDefaultColor(e), h = getDefaultColor(t.acroField), d = getDefaultFontSize(e), l = getDefaultFontSize(t.acroField), u = e.getRectangle(), p = e.getAppearanceCharacteristics(), g = e.getBorderStyle(), f = (n = t.getSelected()[0]) !== null && n !== void 0 ? n : "", v = (a = g == null ? void 0 : g.getWidth()) !== null && a !== void 0 ? a : 0, y = reduceRotation(p == null ? void 0 : p.getRotation()), x = adjustDimsForRotation(u, y), m = x.width, w = x.height, k = rotateInPlace(__assign(__assign({}, u), { rotation: y })), _ = rgb(0, 0, 0), S = componentsToColor(p == null ? void 0 : p.getBorderColor()), F = componentsToColor(p == null ? void 0 : p.getBackgroundColor()), A = 1, D = {
21823
+ var n, a, s, o = getDefaultColor(e), h = getDefaultColor(t.acroField), d = getDefaultFontSize(e), l = getDefaultFontSize(t.acroField), u = e.getRectangle(), p = e.getAppearanceCharacteristics(), g = e.getBorderStyle(), f = (n = t.getSelected()[0]) !== null && n !== void 0 ? n : "", v = (a = g == null ? void 0 : g.getWidth()) !== null && a !== void 0 ? a : 0, y = reduceRotation(p == null ? void 0 : p.getRotation()), S = adjustDimsForRotation(u, y), m = S.width, w = S.height, k = rotateInPlace(__assign(__assign({}, u), { rotation: y })), _ = rgb(0, 0, 0), x = componentsToColor(p == null ? void 0 : p.getBorderColor()), F = componentsToColor(p == null ? void 0 : p.getBackgroundColor()), A = 1, D = {
21824
21824
  x: v + A,
21825
21825
  y: v + A,
21826
21826
  width: m - (v + A) * 2,
@@ -21838,7 +21838,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21838
21838
  width: m - v,
21839
21839
  height: w - v,
21840
21840
  borderWidth: v ?? 0,
21841
- borderColor: S,
21841
+ borderColor: x,
21842
21842
  textColor: R,
21843
21843
  font: r.name,
21844
21844
  fontSize: C,
@@ -21848,16 +21848,16 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21848
21848
  };
21849
21849
  return __spreadArrays(k, drawTextField(O));
21850
21850
  }, defaultOptionListAppearanceProvider = function(t, e, r) {
21851
- var n, a, s = getDefaultColor(e), o = getDefaultColor(t.acroField), h = getDefaultFontSize(e), d = getDefaultFontSize(t.acroField), l = e.getRectangle(), u = e.getAppearanceCharacteristics(), p = e.getBorderStyle(), g = (n = p == null ? void 0 : p.getWidth()) !== null && n !== void 0 ? n : 0, f = reduceRotation(u == null ? void 0 : u.getRotation()), v = adjustDimsForRotation(l, f), y = v.width, x = v.height, m = rotateInPlace(__assign(__assign({}, l), { rotation: f })), w = rgb(0, 0, 0), k = componentsToColor(u == null ? void 0 : u.getBorderColor()), _ = componentsToColor(u == null ? void 0 : u.getBackgroundColor()), S = t.getOptions(), F = t.getSelected();
21852
- t.isSorted() && S.sort();
21853
- for (var A = "", D = 0, T = S.length; D < T; D++)
21854
- A += S[D], D < T - 1 && (A += `
21851
+ var n, a, s = getDefaultColor(e), o = getDefaultColor(t.acroField), h = getDefaultFontSize(e), d = getDefaultFontSize(t.acroField), l = e.getRectangle(), u = e.getAppearanceCharacteristics(), p = e.getBorderStyle(), g = (n = p == null ? void 0 : p.getWidth()) !== null && n !== void 0 ? n : 0, f = reduceRotation(u == null ? void 0 : u.getRotation()), v = adjustDimsForRotation(l, f), y = v.width, S = v.height, m = rotateInPlace(__assign(__assign({}, l), { rotation: f })), w = rgb(0, 0, 0), k = componentsToColor(u == null ? void 0 : u.getBorderColor()), _ = componentsToColor(u == null ? void 0 : u.getBackgroundColor()), x = t.getOptions(), F = t.getSelected();
21852
+ t.isSorted() && x.sort();
21853
+ for (var A = "", D = 0, T = x.length; D < T; D++)
21854
+ A += x[D], D < T - 1 && (A += `
21855
21855
  `);
21856
21856
  for (var M = 1, C = {
21857
21857
  x: g + M,
21858
21858
  y: g + M,
21859
21859
  width: y - (g + M) * 2,
21860
- height: x - (g + M) * 2
21860
+ height: S - (g + M) * 2
21861
21861
  }, R = layoutMultilineText(A, {
21862
21862
  alignment: TextAlignment.Left,
21863
21863
  fontSize: h ?? d,
@@ -21872,7 +21872,7 @@ var MIN_FONT_SIZE = 4, MAX_FONT_SIZE = 500, computeFontSize = function(t, e, r,
21872
21872
  x: 0 + g / 2,
21873
21873
  y: 0 + g / 2,
21874
21874
  width: y - g,
21875
- height: x - g,
21875
+ height: S - g,
21876
21876
  borderWidth: g ?? 0,
21877
21877
  borderColor: k,
21878
21878
  textColor: B,
@@ -22048,8 +22048,8 @@ var assertFieldAppearanceOptions = function(t) {
22048
22048
  }, t.prototype.createWidget = function(e) {
22049
22049
  var r, n = e.textColor, a = e.backgroundColor, s = e.borderColor, o = e.borderWidth, h = toDegrees(e.rotate), d = e.caption, l = e.x, u = e.y, p = e.width + o, g = e.height + o, f = !!e.hidden, v = e.page;
22050
22050
  assertMultiple(h, "degreesAngle", 90);
22051
- var y = PDFWidgetAnnotation.create(this.doc.context, this.ref), x = rotateRectangle({ x: l, y: u, width: p, height: g }, o, h);
22052
- y.setRectangle(x), v && y.setP(v);
22051
+ var y = PDFWidgetAnnotation.create(this.doc.context, this.ref), S = rotateRectangle({ x: l, y: u, width: p, height: g }, o, h);
22052
+ y.setRectangle(S), v && y.setP(v);
22053
22053
  var m = y.getOrCreateAppearanceCharacteristics();
22054
22054
  a && m.setBackgroundColor(colorToComponents(a)), m.setRotation(h), d && m.setCaptions({ normal: d }), s && m.setBorderColor(colorToComponents(s));
22055
22055
  var w = y.getOrCreateBorderStyle();
@@ -22095,7 +22095,7 @@ var assertFieldAppearanceOptions = function(t) {
22095
22095
  ySkew: degrees(0)
22096
22096
  };
22097
22097
  n === ImageAlignment.Center ? (y.x += (f.width - u * 2) / 2 - v.width / 2, y.y += (f.height - u * 2) / 2 - v.height / 2) : n === ImageAlignment.Right && (y.x = f.width - u - v.width, y.y = f.height - u - v.height);
22098
- var x = this.doc.context.addRandomSuffix("Image", 10), m = __spreadArrays(g, drawImage(x, y)), w = { XObject: (a = {}, a[x] = r.ref, a) }, k = o.formXObject(m, {
22098
+ var S = this.doc.context.addRandomSuffix("Image", 10), m = __spreadArrays(g, drawImage(S, y)), w = { XObject: (a = {}, a[S] = r.ref, a) }, k = o.formXObject(m, {
22099
22099
  Resources: w,
22100
22100
  BBox: o.obj([0, 0, h.width, h.height]),
22101
22101
  Matrix: o.obj([1, 0, 0, 1, 0, 0])
@@ -22466,8 +22466,8 @@ var assertFieldAppearanceOptions = function(t) {
22466
22466
  rotate: (f = a == null ? void 0 : a.rotate) !== null && f !== void 0 ? f : degrees(0),
22467
22467
  hidden: a == null ? void 0 : a.hidden,
22468
22468
  page: n.ref
22469
- }), y = this.doc.context.register(v.dict), x = this.acroField.addWidgetWithOpt(y, PDFHexString.fromText(r), !this.isMutuallyExclusive());
22470
- v.setAppearanceState(PDFName.of("Off")), this.updateWidgetAppearance(v, x), n.node.addAnnot(y);
22469
+ }), y = this.doc.context.register(v.dict), S = this.acroField.addWidgetWithOpt(y, PDFHexString.fromText(r), !this.isMutuallyExclusive());
22470
+ v.setAppearanceState(PDFName.of("Off")), this.updateWidgetAppearance(v, S), n.node.addAnnot(y);
22471
22471
  }, e.prototype.needsAppearancesUpdate = function() {
22472
22472
  for (var r, n = this.acroField.getWidgets(), a = 0, s = n.length; a < s; a++) {
22473
22473
  var o = n[a], h = o.getAppearanceState(), d = (r = o.getAppearances()) === null || r === void 0 ? void 0 : r.normal;
@@ -23225,7 +23225,7 @@ var PDFEmbeddedFile = (
23225
23225
  });
23226
23226
  }, t.prototype.embedPages = function(e, r, n) {
23227
23227
  return r === void 0 && (r = []), n === void 0 && (n = []), __awaiter(this, void 0, void 0, function() {
23228
- var l, u, a, s, o, h, d, l, u, p, g, f, v, y, x;
23228
+ var l, u, a, s, o, h, d, l, u, p, g, f, v, y, S;
23229
23229
  return __generator(this, function(m) {
23230
23230
  switch (m.label) {
23231
23231
  case 0:
@@ -23244,7 +23244,7 @@ var PDFEmbeddedFile = (
23244
23244
  case 3:
23245
23245
  return l++, [3, 1];
23246
23246
  case 4:
23247
- return (x = this.embeddedPages).push.apply(x, d), [2, d];
23247
+ return (S = this.embeddedPages).push.apply(S, d), [2, d];
23248
23248
  }
23249
23249
  });
23250
23250
  });
@@ -23462,11 +23462,11 @@ var PDFPage = (
23462
23462
  }, t.prototype.drawText = function(e, r) {
23463
23463
  var n, a, s, o, h, d, l;
23464
23464
  r === void 0 && (r = {}), assertIs(e, "text", ["string"]), assertOrUndefined(r.color, "options.color", [[Object, "Color"]]), assertRangeOrUndefined(r.opacity, "opacity.opacity", 0, 1), assertOrUndefined(r.font, "options.font", [[PDFFont, "PDFFont"]]), assertOrUndefined(r.size, "options.size", ["number"]), assertOrUndefined(r.rotate, "options.rotate", [[Object, "Rotation"]]), assertOrUndefined(r.xSkew, "options.xSkew", [[Object, "Rotation"]]), assertOrUndefined(r.ySkew, "options.ySkew", [[Object, "Rotation"]]), assertOrUndefined(r.x, "options.x", ["number"]), assertOrUndefined(r.y, "options.y", ["number"]), assertOrUndefined(r.lineHeight, "options.lineHeight", ["number"]), assertOrUndefined(r.maxWidth, "options.maxWidth", ["number"]), assertOrUndefined(r.wordBreaks, "options.wordBreaks", [Array]), assertIsOneOfOrUndefined(r.blendMode, "options.blendMode", BlendMode);
23465
- for (var u = this.setOrEmbedFont(r.font), p = u.oldFont, g = u.newFont, f = u.newFontKey, v = r.size || this.fontSize, y = r.wordBreaks || this.doc.defaultWordBreaks, x = function(A) {
23465
+ for (var u = this.setOrEmbedFont(r.font), p = u.oldFont, g = u.newFont, f = u.newFontKey, v = r.size || this.fontSize, y = r.wordBreaks || this.doc.defaultWordBreaks, S = function(A) {
23466
23466
  return g.widthOfTextAtSize(A, v);
23467
- }, m = r.maxWidth === void 0 ? lineSplit(cleanText(e)) : breakTextIntoLines(e, y, r.maxWidth, x), w = new Array(m.length), k = 0, _ = m.length; k < _; k++)
23467
+ }, m = r.maxWidth === void 0 ? lineSplit(cleanText(e)) : breakTextIntoLines(e, y, r.maxWidth, S), w = new Array(m.length), k = 0, _ = m.length; k < _; k++)
23468
23468
  w[k] = g.encodeText(m[k]);
23469
- var S = this.maybeEmbedGraphicsState({
23469
+ var x = this.maybeEmbedGraphicsState({
23470
23470
  opacity: r.opacity,
23471
23471
  blendMode: r.blendMode
23472
23472
  }), F = this.getContentStream();
@@ -23480,7 +23480,7 @@ var PDFPage = (
23480
23480
  x: (h = r.x) !== null && h !== void 0 ? h : this.x,
23481
23481
  y: (d = r.y) !== null && d !== void 0 ? d : this.y,
23482
23482
  lineHeight: (l = r.lineHeight) !== null && l !== void 0 ? l : this.lineHeight,
23483
- graphicsState: S
23483
+ graphicsState: x
23484
23484
  })), r.font && (p ? this.setFont(p) : this.resetFont());
23485
23485
  }, t.prototype.drawImage = function(e, r) {
23486
23486
  var n, a, s, o, h, d, l;
@@ -23585,8 +23585,8 @@ var PDFPage = (
23585
23585
  blendMode: e.blendMode
23586
23586
  });
23587
23587
  !("color" in e) && !("borderColor" in e) && (e.color = rgb(0, 0, 0));
23588
- var x = this.getContentStream();
23589
- x.push.apply(x, drawRectangle({
23588
+ var S = this.getContentStream();
23589
+ S.push.apply(S, drawRectangle({
23590
23590
  x: (r = e.x) !== null && r !== void 0 ? r : this.x,
23591
23591
  y: (n = e.y) !== null && n !== void 0 ? n : this.y,
23592
23592
  width: (a = e.width) !== null && a !== void 0 ? a : 150,
@@ -23712,7 +23712,7 @@ var PDFPage = (
23712
23712
  }, e.prototype.addToPage = function(r, n, a) {
23713
23713
  var s, o, h, d, l, u, p, g, f, v, y;
23714
23714
  assertOrUndefined(r, "text", ["string"]), assertOrUndefined(n, "page", [[PDFPage, "PDFPage"]]), assertFieldAppearanceOptions(a);
23715
- var x = this.createWidget({
23715
+ var S = this.createWidget({
23716
23716
  x: ((s = a == null ? void 0 : a.x) !== null && s !== void 0 ? s : 0) - ((o = a == null ? void 0 : a.borderWidth) !== null && o !== void 0 ? o : 0) / 2,
23717
23717
  y: ((h = a == null ? void 0 : a.y) !== null && h !== void 0 ? h : 0) - ((d = a == null ? void 0 : a.borderWidth) !== null && d !== void 0 ? d : 0) / 2,
23718
23718
  width: (l = a == null ? void 0 : a.width) !== null && l !== void 0 ? l : 100,
@@ -23725,10 +23725,10 @@ var PDFPage = (
23725
23725
  caption: r,
23726
23726
  hidden: a == null ? void 0 : a.hidden,
23727
23727
  page: n.ref
23728
- }), m = this.doc.context.register(x.dict);
23728
+ }), m = this.doc.context.register(S.dict);
23729
23729
  this.acroField.addWidget(m);
23730
23730
  var w = (y = a == null ? void 0 : a.font) !== null && y !== void 0 ? y : this.doc.getForm().getDefaultFont();
23731
- this.updateWidgetAppearance(x, w), n.node.addAnnot(m);
23731
+ this.updateWidgetAppearance(S, w), n.node.addAnnot(m);
23732
23732
  }, e.prototype.needsAppearancesUpdate = function() {
23733
23733
  var r;
23734
23734
  if (this.isDirty())
@@ -23770,7 +23770,7 @@ const ANNOTATION_METADATA_SUBJECT_PREFIX = "PDF_ANNOTATOR_DATA::", safeGetAnnota
23770
23770
  };
23771
23771
  }
23772
23772
  }, PdfViewer = forwardRef(({ fileUrl: t, fileName: e, readonly: r = !1, onAnnotationsChange: n, initialAnnotations: a, initialHistoryState: s, onSave: o, onPrint: h, onGetAnnotationData: d }, l) => {
23773
- const [u, p] = useState(null), [g, f] = useState(0), [v, y] = useState(1), [x, m] = useState(1), [w, k] = useState("SELECT"), [_, S] = useState(DEFAULT_COLOR), [F, A] = useState(DEFAULT_STROKE_WIDTH), [D, T] = useState(DEFAULT_FONT_SIZE), [M, C] = useState(!1), [R, O] = useState(null), [$, K] = useState(null), [J, Y] = useState(null), [se, B] = useState(null), [V, Q] = useState("APPROVED"), [I, P] = useState({}), { annotations: E, addAnnotation: N, deleteAnnotation: z, updateAnnotation: G, clearAnnotations: H, undo: ee, redo: ce, canUndo: ve, canRedo: me, setAnnotations: xe, historyState: Se, setHistoryState: Ce } = useAnnotationHistory(), ne = useRef(null), le = useRef([]), [L, Z] = useState(!1), [re, he] = useState({ x: 0, y: 0 }), ye = useCallback((Ee, Ne) => {
23773
+ const [u, p] = useState(null), [g, f] = useState(0), [v, y] = useState(1), [S, m] = useState(1), [w, k] = useState("SELECT"), [_, x] = useState(DEFAULT_COLOR), [F, A] = useState(DEFAULT_STROKE_WIDTH), [D, T] = useState(DEFAULT_FONT_SIZE), [M, C] = useState(!1), [R, O] = useState(null), [$, K] = useState(null), [J, Y] = useState(null), [se, B] = useState(null), [V, Q] = useState("APPROVED"), [I, P] = useState({}), { annotations: E, addAnnotation: N, deleteAnnotation: z, updateAnnotation: G, clearAnnotations: H, undo: ee, redo: ce, canUndo: ve, canRedo: me, setAnnotations: xe, historyState: Se, setHistoryState: Ce } = useAnnotationHistory(), ne = useRef(null), le = useRef([]), [L, Z] = useState(!1), [re, he] = useState({ x: 0, y: 0 }), ye = useCallback((Ee, Ne) => {
23774
23774
  P((ze) => {
23775
23775
  const ae = (((ze[Ee] || 0) + (Ne === "cw" ? 90 : -90)) % 360 + 360) % 360;
23776
23776
  return { ...ze, [Ee]: ae };
@@ -24111,13 +24111,13 @@ const ANNOTATION_METADATA_SUBJECT_PREFIX = "PDF_ANNOTATOR_DATA::", safeGetAnnota
24111
24111
  fileName: e,
24112
24112
  currentPage: v,
24113
24113
  totalPages: g,
24114
- zoom: x,
24114
+ zoom: S,
24115
24115
  setZoom: m,
24116
24116
  setCurrentPage: Pe,
24117
24117
  activeTool: w,
24118
24118
  setActiveTool: k,
24119
24119
  toolColor: _,
24120
- setToolColor: S,
24120
+ setToolColor: x,
24121
24121
  strokeWidth: F,
24122
24122
  setStrokeWidth: A,
24123
24123
  fontSize: D,
@@ -24164,7 +24164,7 @@ const ANNOTATION_METADATA_SUBJECT_PREFIX = "PDF_ANNOTATOR_DATA::", safeGetAnnota
24164
24164
  {
24165
24165
  pdf: u,
24166
24166
  pageNumber: Ne,
24167
- zoom: x,
24167
+ zoom: S,
24168
24168
  rotation: I[Ne] || 0,
24169
24169
  activeTool: w,
24170
24170
  toolColor: _,