@univerjs/engine-render 0.10.3 → 0.10.4

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.
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var M8 = Object.defineProperty;
2
2
  var R8 = (r, t, e) => t in r ? M8(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
3
  var k = (r, t, e) => R8(r, typeof t != "symbol" ? t + "" : t, e);
4
- import { Tools as o1, DEFAULT_STYLES as u2, FontStyleType as F0, BaselineOffset as m3, getCellInfoInMergeData as O8, Rectangle as M3, ColorKit as d4, Disposable as D2, EventSubject as s1, checkParagraphHasIndentByStyle as I8, DataStreamTreeTokenType as J, BorderStyleTypes as U1, BooleanNumber as t1, DisposableCollection as L8, toDisposable as V1, sortRules as g2, Registry as je, Range as H3, numberToABC as P8, HorizontalAlign as d1, VerticalAlign as k2, insertTextToContent as N8, horizontalLineSegmentsSubtraction as $8, deleteContent as U8, DataStreamTreeNodeType as X1, GridType as N1, BulletAlignment as Ie, TableTextWrapType as J0, PositionedObjectLayoutType as K1, WrapTextType as W0, ColumnSeparatorType as u0, TableRowHeightRule as n0, VerticalAlignmentType as X2, TableAlignmentType as Le, NAMED_STYLE_SPACE_MAP as H8, ObjectRelativeFromV as b1, SpacingRule as Q0, CustomDecorationType as q8, CustomRangeType as Pe, ObjectMatrix as W1, SectionType as ee, NumberUnitType as G8, DocumentFlavor as l7, WrapStrategy as T1, PageOrientType as N4, NAMED_STYLE_MAP as W8, mergeWith as v6, AlignTypeH as o3, ObjectRelativeFromH as z1, AlignTypeV as J3, ListGlyphType as S3, numberToListABC as u7, Skeleton as Y8, PRESET_LIST_TYPE as X8, DocumentDataModel as g4, DEFAULT_EMPTY_DOCUMENT_VALUE as d7, Inject as b3, LocaleService as V8, IContextService as K8, IConfigService as g7, Injector as we, SheetSkeleton as Z8, extractPureTextFromCell as c7, CellValueType as N2, addLinkToDocumentModel as J8, searchArray as S0, isNullCell as Q8, getColorStyle as y3, isWhiteColor as b6, TextDecoration as f2, requestImmediateMacroTask as h7, COLORS as y6, createIdentifier as $4, ThemeService as k7, invertColorByMatrix as ea, MOVE_BUFFER_VALUE as z6, sortRulesByDesc as _6, isClassDependencyItem as ta, IUniverInstanceService as aa, remove as D6, UniverInstanceType as ra, Plugin as sa, merge as na, registerDependencies as ia } from "@univerjs/core";
4
+ import { Tools as o1, DEFAULT_STYLES as u2, FontStyleType as F0, BaselineOffset as m3, getCellInfoInMergeData as O8, Rectangle as M3, ColorKit as d4, Disposable as D2, EventSubject as s1, checkParagraphHasIndentByStyle as I8, DataStreamTreeTokenType as J, BorderStyleTypes as U1, BooleanNumber as t1, DisposableCollection as L8, toDisposable as V1, sortRules as g2, Registry as je, Range as H3, numberToABC as P8, HorizontalAlign as d1, VerticalAlign as k2, CellValueType as T2, insertTextToContent as N8, horizontalLineSegmentsSubtraction as $8, deleteContent as U8, DataStreamTreeNodeType as X1, GridType as N1, BulletAlignment as Ie, TableTextWrapType as J0, PositionedObjectLayoutType as K1, WrapTextType as W0, ColumnSeparatorType as u0, TableRowHeightRule as n0, VerticalAlignmentType as X2, TableAlignmentType as Le, NAMED_STYLE_SPACE_MAP as H8, ObjectRelativeFromV as b1, SpacingRule as Q0, CustomDecorationType as q8, CustomRangeType as Pe, ObjectMatrix as W1, SectionType as ee, NumberUnitType as G8, DocumentFlavor as l7, WrapStrategy as T1, PageOrientType as N4, NAMED_STYLE_MAP as W8, mergeWith as v6, AlignTypeH as o3, ObjectRelativeFromH as z1, AlignTypeV as J3, ListGlyphType as S3, numberToListABC as u7, Skeleton as Y8, PRESET_LIST_TYPE as X8, DocumentDataModel as g4, DEFAULT_EMPTY_DOCUMENT_VALUE as d7, Inject as b3, LocaleService as V8, IContextService as K8, IConfigService as g7, Injector as we, SheetSkeleton as Z8, extractPureTextFromCell as c7, addLinkToDocumentModel as J8, searchArray as S0, isNullCell as Q8, getColorStyle as y3, isWhiteColor as b6, TextDecoration as f2, requestImmediateMacroTask as h7, COLORS as y6, createIdentifier as $4, ThemeService as k7, invertColorByMatrix as ea, MOVE_BUFFER_VALUE as z6, sortRulesByDesc as _6, isClassDependencyItem as ta, IUniverInstanceService as aa, remove as D6, UniverInstanceType as ra, Plugin as sa, merge as na, registerDependencies as ia } from "@univerjs/core";
5
5
  import { BehaviorSubject as I3, Subject as P1, startWith as oa, distinctUntilChanged as m7, Subscription as la, Observable as p7, shareReplay as ua, debounceTime as da } from "rxjs";
6
6
  var f7 = /* @__PURE__ */ ((r) => (r.RECT = "rect", r.CIRCLE = "circle", r.PATH = "path", r))(f7 || {}), ga = /* @__PURE__ */ ((r) => (r[r.XY = 0] = "XY", r[r.X = 1] = "X", r[r.Y = 2] = "Y", r))(ga || {});
7
7
  const L3 = 1, q3 = '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', v7 = {
@@ -36,20 +36,20 @@ class fa {
36
36
  return new RegExp(this.toString(t), t);
37
37
  }
38
38
  }
39
- class T2 extends fa {
39
+ class B2 extends fa {
40
40
  constructor(...t) {
41
41
  super(), this.data = [];
42
42
  for (const e of t)
43
- e instanceof T2 ? this.data.push(...e.data) : this.data.push(ba(e));
43
+ e instanceof B2 ? this.data.push(...e.data) : this.data.push(ba(e));
44
44
  this._unique();
45
45
  }
46
46
  union(...t) {
47
- return new T2(this, ...t);
47
+ return new B2(this, ...t);
48
48
  }
49
49
  subtract(...t) {
50
50
  const e = this.data.slice(), a = [];
51
51
  let s = 0;
52
- const { data: n } = new T2(...t);
52
+ const { data: n } = new B2(...t);
53
53
  for (; e.length !== 0; ) {
54
54
  const i = e.shift(), [o, l] = i;
55
55
  let u;
@@ -64,7 +64,7 @@ class T2 extends fa {
64
64
  g < o ? (u = !1, s++) : l < c ? a.push(i) : c <= o && g < l ? (s++, e.unshift([g + 1, l])) : o < c && g < l ? (s++, a.push([o, c - 1]), e.unshift([g + 1, l])) : o < c && l <= g && a.push([o, c - 1]);
65
65
  } while (!u);
66
66
  }
67
- return new T2(...a);
67
+ return new B2(...a);
68
68
  }
69
69
  intersect(...t) {
70
70
  return this.subtract(this.subtract(...t));
@@ -87,7 +87,7 @@ class T2 extends fa {
87
87
  this.data = t;
88
88
  }
89
89
  }
90
- const xe = (...r) => new T2(...r);
90
+ const xe = (...r) => new B2(...r);
91
91
  function va(r) {
92
92
  if (r.length !== 1) {
93
93
  const t = `${r.length} (${JSON.stringify(r)})`;
@@ -164,8 +164,8 @@ function ja(r) {
164
164
  l.l === 57343 ? a(l.h) : s(l.h, 56320, l.l);
165
165
  }
166
166
  return {
167
- entire: new T2(...t),
168
- partial: e.map(({ h: n, l: i }) => ({ h: n, l: new T2(...i) }))
167
+ entire: new B2(...t),
168
+ partial: e.map(({ h: n, l: i }) => ({ h: n, l: new B2(...i) }))
169
169
  };
170
170
  function a(n) {
171
171
  t.push(n);
@@ -32459,12 +32459,12 @@ function b7(r) {
32459
32459
  throw new Error("Expected at least one sub category, but received 0.");
32460
32460
  return t.map((a) => {
32461
32461
  const n = r[a].map((i) => mv(a, i));
32462
- return new T2().union(...n);
32462
+ return new B2().union(...n);
32463
32463
  }).reduce((a, s) => a.intersect(s));
32464
32464
  }
32465
32465
  function mv(r, t) {
32466
32466
  const a = kv[r][t];
32467
- return new T2().union(...a);
32467
+ return new B2().union(...a);
32468
32468
  }
32469
32469
  const U4 = b7({
32470
32470
  Script: ["Han", "Katakana", "Hiragana", "Hangul", "Bopomofo"],
@@ -32677,10 +32677,10 @@ class F1 {
32677
32677
  subscriptSizeRatio: c,
32678
32678
  subscriptOffset: g,
32679
32679
  superscriptSizeRatio: h,
32680
- superscriptOffset: p,
32681
- hdmxData: f,
32680
+ superscriptOffset: f,
32681
+ hdmxData: p,
32682
32682
  glyphHorizonMap: m
32683
- } = s, v = f == null ? void 0 : f.indexOf(Math.floor(e)), y = m.get(a.charCodeAt(0));
32683
+ } = s, v = p == null ? void 0 : p.indexOf(Math.floor(e)), y = m.get(a.charCodeAt(0));
32684
32684
  let z = n;
32685
32685
  if (y) {
32686
32686
  const { width: _, pixelsPerEm: j = [] } = y;
@@ -32696,7 +32696,7 @@ class F1 {
32696
32696
  sbr: c,
32697
32697
  sbo: g * e,
32698
32698
  spr: h,
32699
- spo: p * e
32699
+ spo: f * e
32700
32700
  };
32701
32701
  }
32702
32702
  static _calculateBoundingBoxByMeasureText(t, e) {
@@ -32723,7 +32723,7 @@ class F1 {
32723
32723
  }
32724
32724
  }
32725
32725
  k(F1, "_getTextHeightCache", {}), k(F1, "_context"), k(F1, "_fontDataMap", /* @__PURE__ */ new Map()), k(F1, "_globalFontMeasureCache", /* @__PURE__ */ new Map());
32726
- const z7 = 180, zv = Math.PI / z7, _v = z7 / Math.PI, E6 = "rgb(", Dv = "rgba(", M2 = (r, t) => r ? t != null ? `${Dv + r.join(",")},${t})` : `${E6 + r.join(",")})` : `${E6}0,0,0)`, jv = 100, V2 = (r, t) => {
32726
+ const z7 = 180, zv = Math.PI / z7, _v = z7 / Math.PI, E6 = "rgb(", Dv = "rgba(", R2 = (r, t) => r ? t != null ? `${Dv + r.join(",")},${t})` : `${E6 + r.join(",")})` : `${E6}0,0,0)`, jv = 100, V2 = (r, t) => {
32727
32727
  if (o1.isNumber(r))
32728
32728
  return r;
32729
32729
  if (t && r && o1.isString(r) && r.substr(r.length - 1, 1) === "%") {
@@ -32918,12 +32918,12 @@ function Iv(r, t, e, a, s) {
32918
32918
  e,
32919
32919
  a
32920
32920
  );
32921
- const { isMerged: u, isMergedMainCell: d, startRow: c, startColumn: g, endRow: h, endColumn: p } = s;
32922
- let f = {
32921
+ const { isMerged: u, isMergedMainCell: d, startRow: c, startColumn: g, endRow: h, endColumn: f } = s;
32922
+ let p = {
32923
32923
  startRow: c,
32924
32924
  startColumn: g,
32925
32925
  endRow: h,
32926
- endColumn: p,
32926
+ endColumn: f,
32927
32927
  startY: 0,
32928
32928
  endY: 0,
32929
32929
  startX: 0,
@@ -32931,18 +32931,18 @@ function Iv(r, t, e, a, s) {
32931
32931
  };
32932
32932
  const m = e.length - 1, v = a.length - 1;
32933
32933
  if (u && c !== -1 && g !== -1) {
32934
- const y = e[c - 1] || 0, z = e[h] || e[m], _ = a[g - 1] || 0, j = a[p] || a[v];
32935
- f = {
32936
- ...f,
32934
+ const y = e[c - 1] || 0, z = e[h] || e[m], _ = a[g - 1] || 0, j = a[f] || a[v];
32935
+ p = {
32936
+ ...p,
32937
32937
  startY: y,
32938
32938
  endY: z,
32939
32939
  startX: _,
32940
32940
  endX: j
32941
32941
  };
32942
- } else if (!u && h !== -1 && p !== -1) {
32943
- const y = e[h] || e[m], z = a[p] || a[v];
32944
- f = {
32945
- ...f,
32942
+ } else if (!u && h !== -1 && f !== -1) {
32943
+ const y = e[h] || e[m], z = a[f] || a[v];
32944
+ p = {
32945
+ ...p,
32946
32946
  startY: n,
32947
32947
  endY: y,
32948
32948
  startX: o,
@@ -32958,7 +32958,7 @@ function Iv(r, t, e, a, s) {
32958
32958
  endY: i,
32959
32959
  startX: o,
32960
32960
  endX: l,
32961
- mergeInfo: f
32961
+ mergeInfo: p
32962
32962
  };
32963
32963
  }
32964
32964
  const sB = Iv;
@@ -34518,29 +34518,29 @@ function Gv(r) {
34518
34518
  return r > 0 ? te.DOWN : te.UP;
34519
34519
  }
34520
34520
  function R7(r, t, e) {
34521
- var p;
34521
+ var f;
34522
34522
  const a = [];
34523
34523
  let s = 0, n = 0, i = 0, o = 0, l = 0;
34524
34524
  const u = Gv(e), d = r.length;
34525
34525
  e = Math.abs(e);
34526
34526
  const c = Math.tan(e), g = Math.sin(e), h = Math.cos(e);
34527
34527
  if (u === te.UP) {
34528
- let f = 0;
34528
+ let p = 0;
34529
34529
  for (let m = 0; m < d; m++) {
34530
34530
  const v = r[m], { lineHeight: y = 0 } = v;
34531
- f += m === 0 ? 0 : y;
34531
+ p += m === 0 ? 0 : y;
34532
34532
  const z = t * g + y * h;
34533
- a.push(f / c), z > n && (n = z), m === 0 && (i += y * g, l += y * h);
34533
+ a.push(p / c), z > n && (n = z), m === 0 && (i += y * g, l += y * h);
34534
34534
  }
34535
- i += f / g + t * h, l -= n;
34535
+ i += p / g + t * h, l -= n;
34536
34536
  } else {
34537
- let f = 0, m = -1;
34537
+ let p = 0, m = -1;
34538
34538
  const v = [];
34539
34539
  for (let _ = d - 1; _ >= 0; _--) {
34540
34540
  const j = r[_], { lineHeight: w = 0 } = j, x = w / c, C = (t + x) * g;
34541
- v.unshift(w / c), C > n && (n = C, f = x, m = _), _ === 0 ? i += w * g : _ === d - 1 ? i += t * h + w / g : i += w / g;
34541
+ v.unshift(w / c), C > n && (n = C, p = x, m = _), _ === 0 ? i += w * g : _ === d - 1 ? i += t * h + w / g : i += w / g;
34542
34542
  }
34543
- let y = ((p = r[m]) == null ? void 0 : p.lineHeight) || 0, z = 0;
34543
+ let y = ((f = r[m]) == null ? void 0 : f.lineHeight) || 0, z = 0;
34544
34544
  for (let _ = m + 1; _ <= d - 1; _++) {
34545
34545
  const j = r[_], { lineHeight: w = 0 } = j;
34546
34546
  y += w, z += v[_] || 0, a[_] = -z;
@@ -34550,7 +34550,7 @@ function R7(r, t, e) {
34550
34550
  const j = r[_], { lineHeight: w = 0 } = j;
34551
34551
  z += v[_ + 1] || 0, a[_] = z, s += w;
34552
34552
  }
34553
- a[m] = 0, d === 1 && (i += t * h), o = y / g - f * h;
34553
+ a[m] = 0, d === 1 && (i += t * h), o = y / g - p * h;
34554
34554
  }
34555
34555
  return {
34556
34556
  rotateTranslateXList: a,
@@ -34590,7 +34590,7 @@ function Wv(r, t, e) {
34590
34590
  };
34591
34591
  }
34592
34592
  function Yv(r, t, e, a) {
34593
- const { left: s = 0, top: n = 0, width: i = 0, height: o = 0, angle: l = 0 } = r, { left: u = 0, top: d = 0, angle: c = 0 } = t, g = u + e / 2, h = d + a / 2, p = s + u, f = n + d, m = p + i / 2, v = f + o / 2, y = W4(new U(g, h), c, new U(p, f), new U(m, v));
34593
+ const { left: s = 0, top: n = 0, width: i = 0, height: o = 0, angle: l = 0 } = r, { left: u = 0, top: d = 0, angle: c = 0 } = t, g = u + e / 2, h = d + a / 2, f = s + u, p = n + d, m = f + i / 2, v = p + o / 2, y = W4(new U(g, h), c, new U(f, p), new U(m, v));
34594
34594
  return {
34595
34595
  left: y.x,
34596
34596
  top: y.y,
@@ -35498,7 +35498,7 @@ class tb extends O7 {
35498
35498
  }
35499
35499
  clearRect(e, a, s, n) {
35500
35500
  const { scaleX: i, scaleY: o } = this._getScale();
35501
- e = Z(e, i), a = Z(a, o), s = Z(s, i), n = Z(n, o), this._context.save(), this._context.fillStyle = M2([255, 255, 255]), this._context.fillRect(e, a, s, n), this._context.restore();
35501
+ e = Z(e, i), a = Z(a, o), s = Z(s, i), n = Z(n, o), this._context.save(), this._context.fillStyle = R2([255, 255, 255]), this._context.fillRect(e, a, s, n), this._context.restore();
35502
35502
  }
35503
35503
  clearRectForTexture(e, a, s, n) {
35504
35504
  }
@@ -35866,13 +35866,13 @@ let gb = class extends x3 {
35866
35866
  }
35867
35867
  // eslint-disable-next-line max-lines-per-function
35868
35868
  draw(e, a, s, n, { viewRanges: i, checkOutOfViewBound: o }) {
35869
- const { stylesCache: l, worksheet: u, rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s, { background: p, backgroundPositions: f } = l;
35870
- if (!u || !p || !d || !g || c === void 0 || h === void 0)
35869
+ const { stylesCache: l, worksheet: u, rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s, { background: f, backgroundPositions: p } = l;
35870
+ if (!u || !f || !d || !g || c === void 0 || h === void 0)
35871
35871
  return;
35872
35872
  e.save();
35873
35873
  const { scaleX: m, scaleY: v } = e.getScale(), y = {
35874
35874
  ctx: e,
35875
- backgroundPositions: f,
35875
+ backgroundPositions: p,
35876
35876
  scaleX: m,
35877
35877
  scaleY: v,
35878
35878
  checkOutOfViewBound: o,
@@ -35885,14 +35885,14 @@ let gb = class extends x3 {
35885
35885
  z.push(...C);
35886
35886
  });
35887
35887
  const _ = (x) => {
35888
- const C = p[x], S = (B, A, L) => {
35888
+ const C = f[x], S = (B, A, L) => {
35889
35889
  if (s.worksheet.getSpanModel().getMergeDataIndex(B, A) !== -1)
35890
35890
  return;
35891
35891
  const O = s.getCellByIndexWithNoHeader(B, A);
35892
35892
  if (!O) return;
35893
35893
  (L || C.getValue(B, A)) && (y.cellInfo = O, this.renderBGByCell(y, B, A));
35894
35894
  };
35895
- e.fillStyle = x || M2([255, 255, 255]);
35895
+ e.fillStyle = x || R2([255, 255, 255]);
35896
35896
  const F = new Path2D();
35897
35897
  y.backgroundPaths = F, e.beginPath();
35898
35898
  const T = C.getSizeOf();
@@ -35900,8 +35900,8 @@ let gb = class extends x3 {
35900
35900
  H3.foreach(B, S);
35901
35901
  }) : C.forValue(S), e.fill(F), e.closePath();
35902
35902
  }, j = (x) => {
35903
- const C = p[x];
35904
- e.fillStyle = x || M2([255, 255, 255]);
35903
+ const C = f[x];
35904
+ e.fillStyle = x || R2([255, 255, 255]);
35905
35905
  const S = new Path2D();
35906
35906
  y.backgroundPaths = S, e.beginPath(), z.forEach((F) => {
35907
35907
  if (C.getValue(F.startRow, F.startColumn)) {
@@ -35910,7 +35910,7 @@ let gb = class extends x3 {
35910
35910
  y.cellInfo = R, this.renderBGByCell(y, F.startRow, F.startColumn);
35911
35911
  }
35912
35912
  }), e.fill(S), e.closePath();
35913
- }, w = Object.keys(p);
35913
+ }, w = Object.keys(f);
35914
35914
  for (let x = 0; x < w.length; x++) {
35915
35915
  const C = w[x];
35916
35916
  _(C), j(C);
@@ -35919,13 +35919,13 @@ let gb = class extends x3 {
35919
35919
  }
35920
35920
  renderBGByCell(e, a, s) {
35921
35921
  const { spreadsheetSkeleton: n, backgroundPaths: i, scaleX: o, scaleY: l, viewRanges: u, diffRanges: d, cellInfo: c } = e;
35922
- let { startY: g, endY: h, startX: p, endX: f } = c;
35922
+ let { startY: g, endY: h, startX: f, endX: p } = c;
35923
35923
  const { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c, z = d && d.length > 0 ? d : u;
35924
- if (g = y.startY, h = y.endY, p = y.startX, f = y.endX, !m && !v && !S7(z, a, s))
35924
+ if (g = y.startY, h = y.endY, f = y.startX, p = y.endX, !m && !v && !S7(z, a, s))
35925
35925
  return !0;
35926
35926
  const _ = n.worksheet.getRowVisible(a), j = n.worksheet.getColVisible(s);
35927
35927
  if (!_ || !j) return !0;
35928
- const w = Z(p, o), x = Z(g, l), C = Z(f, o), S = Z(h, l);
35928
+ const w = Z(f, o), x = Z(g, l), C = Z(p, o), S = Z(h, l);
35929
35929
  i.rect(w, x, C - w, S - x);
35930
35930
  }
35931
35931
  };
@@ -35944,11 +35944,11 @@ let kb = class extends x3 {
35944
35944
  if (!u || !d || !g || c === void 0 || h === void 0)
35945
35945
  return;
35946
35946
  e.save(), e.translateWithPrecisionRatio(m2, m2);
35947
- const p = this._getScale(e.getScale()), { border: f } = o;
35948
- if (!f) return;
35947
+ const f = this._getScale(e.getScale()), { border: p } = o;
35948
+ if (!p) return;
35949
35949
  const m = {
35950
35950
  ctx: e,
35951
- precisionScale: p,
35951
+ precisionScale: f,
35952
35952
  overflowCache: l,
35953
35953
  diffRanges: n,
35954
35954
  viewRanges: i,
@@ -35956,13 +35956,13 @@ let kb = class extends x3 {
35956
35956
  };
35957
35957
  e.beginPath(), i.forEach((v) => {
35958
35958
  H3.foreach(v, (y, z) => {
35959
- const _ = f.getValue(y, z);
35959
+ const _ = p.getValue(y, z);
35960
35960
  _ && this.renderBorderByCell(m, y, z, _);
35961
35961
  });
35962
35962
  }), e.closePath(), e.restore();
35963
35963
  }
35964
35964
  renderBorderByCell(e, a, s, n) {
35965
- const { ctx: i, precisionScale: o, overflowCache: l, spreadsheetSkeleton: u, diffRanges: d } = e, c = u.getCellWithCoordByIndex(a, s, !1), { startY: g, endY: h, startX: p, endX: f } = c, { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c;
35965
+ const { ctx: i, precisionScale: o, overflowCache: l, spreadsheetSkeleton: u, diffRanges: d } = e, c = u.getCellWithCoordByIndex(a, s, !1), { startY: g, endY: h, startX: f, endX: p } = c, { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c;
35966
35966
  if (!m) {
35967
35967
  const z = u.worksheet.getRowVisible(a), _ = u.worksheet.getColVisible(s);
35968
35968
  if (!z || !_) return !0;
@@ -35973,7 +35973,7 @@ let kb = class extends x3 {
35973
35973
  const { type: _, style: j, color: w } = n[z];
35974
35974
  if (j === U1.NONE)
35975
35975
  continue;
35976
- let x = g, C = h, S = p, F = f;
35976
+ let x = g, C = h, S = f, F = p;
35977
35977
  if (_ !== K.TOP && _ !== K.BOTTOM && _ !== K.LEFT && _ !== K.RIGHT) {
35978
35978
  if (m)
35979
35979
  return !0;
@@ -36011,8 +36011,8 @@ const mb = "DefaultColumnHeaderLayoutExtension", pb = {
36011
36011
  fontSize: 13,
36012
36012
  fontFamily: q3,
36013
36013
  fontColor: "#000000",
36014
- backgroundColor: M2([248, 249, 250]),
36015
- borderColor: M2([217, 217, 217]),
36014
+ backgroundColor: R2([248, 249, 250]),
36015
+ borderColor: R2([217, 217, 217]),
36016
36016
  textAlign: "center",
36017
36017
  textBaseline: "middle"
36018
36018
  };
@@ -36060,8 +36060,8 @@ class fb extends x3 {
36060
36060
  const { rowHeightAccumulation: u, columnTotalWidth: d, columnWidthAccumulation: c, rowTotalHeight: g, worksheet: h } = s;
36061
36061
  if (!u || !c || d === void 0 || g === void 0)
36062
36062
  return;
36063
- const p = this.getColumnsCfg(h.getSheetId()), f = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
36064
- this.setStyleToCtx(e, f), e.save(), e.fillStyle = f.backgroundColor, e.fillRectByPrecision(0, 0, d, i), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(m2, m2);
36063
+ const f = this.getColumnsCfg(h.getSheetId()), p = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
36064
+ this.setStyleToCtx(e, p), e.save(), e.fillStyle = p.backgroundColor, e.fillRectByPrecision(0, 0, d, i), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(m2, m2);
36065
36065
  let v = 0;
36066
36066
  for (let z = o - 1; z <= l; z++) {
36067
36067
  if (z < 0 || z > c.length - 1)
@@ -36069,7 +36069,7 @@ class fb extends x3 {
36069
36069
  const _ = c[z];
36070
36070
  if (v === _)
36071
36071
  continue;
36072
- const j = { left: v, top: 0, right: _, width: _ - v, height: i }, [w, x] = this.getCfgOfCurrentColumn(p, f, z);
36072
+ const j = { left: v, top: 0, right: _, width: _ - v, height: i }, [w, x] = this.getCfgOfCurrentColumn(f, p, z);
36073
36073
  x && w.backgroundColor && (e.save(), e.fillStyle = w.backgroundColor, e.fillRectByPrecision(j.left, j.top, j.width, j.height), e.restore()), e.beginPath(), e.moveToByPrecision(j.right, 0), e.lineToByPrecision(j.right, j.height), e.stroke();
36074
36074
  const C = (() => {
36075
36075
  switch (w.textAlign) {
@@ -36112,25 +36112,25 @@ class zb extends x3 {
36112
36112
  if (!(g != null && g.customRender))
36113
36113
  return;
36114
36114
  let h = s.getCellWithCoordByIndex(d, c, !1);
36115
- const { mergeInfo: p } = h;
36116
- if (!this.isRenderDiffRangesByRow(p.startRow, p.endRow, n))
36115
+ const { mergeInfo: f } = h;
36116
+ if (!this.isRenderDiffRangesByRow(f.startRow, f.endRow, n))
36117
36117
  return !0;
36118
36118
  if (h.isMerged || h.isMergedMainCell) {
36119
- const v = yb(p);
36119
+ const v = yb(f);
36120
36120
  if (l.has(v))
36121
36121
  return;
36122
36122
  l.add(v);
36123
36123
  }
36124
36124
  if (h.isMerged) {
36125
36125
  const v = {
36126
- row: p.startRow,
36127
- col: p.startColumn
36126
+ row: f.startRow,
36127
+ col: f.startColumn
36128
36128
  };
36129
36129
  if (g = i.getCell(v.row, v.col), !(g != null && g.customRender))
36130
36130
  return;
36131
36131
  h = s.getCellWithCoordByIndex(v.row, v.col);
36132
36132
  }
36133
- const f = {
36133
+ const p = {
36134
36134
  data: g,
36135
36135
  style: s.getStyles().getStyleByCell(g),
36136
36136
  primaryWithCoord: h,
@@ -36141,7 +36141,7 @@ class zb extends x3 {
36141
36141
  unitId: i.unitId
36142
36142
  }, m = g.customRender.sort(g2);
36143
36143
  e.save(), m.forEach((v) => {
36144
- v.drawWith(e, f, s, this.parent);
36144
+ v.drawWith(e, p, s, this.parent);
36145
36145
  }), e.restore();
36146
36146
  });
36147
36147
  }
@@ -41745,23 +41745,23 @@ class v4 {
41745
41745
  for (; l.length > 0; ) {
41746
41746
  let u = 0, d = "", c = 0, g = Math.min(this._lastBreakLength, l.length);
41747
41747
  g === 0 && (g = Math.min(10, l.length));
41748
- let h = l.slice(0, g), p = F1.getMeasureText(h, this._fontStyle);
41749
- if (p.width + e.width <= this._width) {
41748
+ let h = l.slice(0, g), f = F1.getMeasureText(h, this._fontStyle);
41749
+ if (f.width + e.width <= this._width) {
41750
41750
  u = g;
41751
- for (let f = g + 1; f <= l.length && (h = l.slice(0, f), p = F1.getMeasureText(h, this._fontStyle), p.width + e.width <= this._width); f++)
41752
- u = f;
41751
+ for (let p = g + 1; p <= l.length && (h = l.slice(0, p), f = F1.getMeasureText(h, this._fontStyle), f.width + e.width <= this._width); p++)
41752
+ u = p;
41753
41753
  } else {
41754
41754
  u = 0;
41755
- for (let f = g - 1; f >= 1; f--)
41756
- if (h = l.slice(0, f), p = F1.getMeasureText(h, this._fontStyle), p.width + e.width <= this._width) {
41757
- u = f;
41755
+ for (let p = g - 1; p >= 1; p--)
41756
+ if (h = l.slice(0, p), f = F1.getMeasureText(h, this._fontStyle), f.width + e.width <= this._width) {
41757
+ u = p;
41758
41758
  break;
41759
41759
  }
41760
41760
  }
41761
41761
  if (u > 0 && (this._lastBreakLength = u), u > 0 && (d = l.slice(0, u), c = F1.getMeasureText(d, this._fontStyle).width), u === 0 && e.text.length === 0 && (u = 1, d = l[0], c = F1.getMeasureText(d, this._fontStyle).width), u > 0) {
41762
41762
  e.text += d, e.width += c;
41763
- const f = F1.getMeasureText(e.text, this._fontStyle);
41764
- if (e.height = f.fontBoundingBoxAscent + f.fontBoundingBoxDescent, e.baseline = f.fontBoundingBoxAscent, l = l.slice(u), l.length > 0) {
41763
+ const p = F1.getMeasureText(e.text, this._fontStyle);
41764
+ if (e.height = p.fontBoundingBoxAscent + p.fontBoundingBoxDescent, e.baseline = p.fontBoundingBoxAscent, l = l.slice(u), l.length > 0) {
41765
41765
  if (this._lines.push(e), a += e.height, a > this._height)
41766
41766
  break;
41767
41767
  e = {
@@ -42042,29 +42042,29 @@ class Z4 extends C3 {
42042
42042
  );
42043
42043
  }
42044
42044
  static drawWith(e, a, s) {
42045
- var z;
42046
- const { text: n, fontStyle: i, warp: o, hAlign: l, vAlign: u, width: d, height: c, left: g = 0, top: h = 0 } = a, p = s != null ? s : new v4(n, i, !!o, d, u === k2.TOP ? c : 1 / 0), f = p.calculate(), m = p.getTotalHeight(), v = u === k2.TOP ? 0 : u === k2.MIDDLE ? (c - m) / 2 : c - m;
42047
- let y = h + v;
42048
- e.save(), e.font = i, e.fillStyle = (z = a.color) != null ? z : z3;
42049
- for (const _ of f) {
42050
- const j = _.height, w = _.width, x = l === d1.LEFT || l === d1.UNSPECIFIED ? 0 : l === d1.CENTER ? (d - w) / 2 : d - w, C = y + _.baseline;
42051
- e.fillText(_.text, g + x, C), a.underline && this._drawTextDecoration(e, {
42052
- x: g + x,
42053
- y: y + j - 1,
42045
+ var _;
42046
+ const { text: n, fontStyle: i, warp: o, hAlign: l, vAlign: u, width: d, height: c, left: g = 0, top: h = 0, cellValueType: f } = a, p = s != null ? s : new v4(n, i, !!o, d, u === k2.TOP ? c : 1 / 0), m = p.calculate(), v = p.getTotalHeight(), y = u === k2.TOP ? 0 : u === k2.MIDDLE ? (c - v) / 2 : c - v;
42047
+ let z = h + y;
42048
+ e.save(), e.font = i, e.fillStyle = (_ = a.color) != null ? _ : z3;
42049
+ for (const j of m) {
42050
+ const w = j.height, x = j.width, C = l === d1.LEFT || l === d1.UNSPECIFIED || !o && d < x && f === T2.NUMBER ? 0 : l === d1.CENTER ? (d - x) / 2 : d - x, S = z + j.baseline;
42051
+ e.fillText(j.text, g + C, S), a.underline && this._drawTextDecoration(e, {
42052
+ x: g + C,
42053
+ y: z + w - 1,
42054
42054
  // Position underline near bottom of line
42055
- width: w,
42055
+ width: x,
42056
42056
  color: a.color || "#000000",
42057
42057
  lineWidth: 1
42058
42058
  }), a.strokeLine && this._drawTextDecoration(e, {
42059
- x: g + x,
42060
- y: y + _.baseline - j * 0.3,
42059
+ x: g + C,
42060
+ y: z + j.baseline - w * 0.3,
42061
42061
  // Position strikethrough roughly in middle
42062
- width: w,
42062
+ width: x,
42063
42063
  color: a.color || "#000000",
42064
42064
  lineWidth: 1
42065
- }), y = y + j;
42065
+ }), z = z + w;
42066
42066
  }
42067
- return e.restore(), m;
42067
+ return e.restore(), v;
42068
42068
  }
42069
42069
  /**
42070
42070
  * Draw text decoration lines (underline, strikethrough, etc.)
@@ -42200,7 +42200,7 @@ class J4 {
42200
42200
  };
42201
42201
  }
42202
42202
  }
42203
- class P2 {
42203
+ class N2 {
42204
42204
  constructor(t, e) {
42205
42205
  k(this, "children", []);
42206
42206
  k(this, "parent");
@@ -42212,7 +42212,7 @@ class P2 {
42212
42212
  this.nodeType = t, this.content = e;
42213
42213
  }
42214
42214
  static create(t, e) {
42215
- return new P2(t, e);
42215
+ return new N2(t, e);
42216
42216
  }
42217
42217
  dispose() {
42218
42218
  this.children.forEach((t) => {
@@ -42253,26 +42253,26 @@ class P2 {
42253
42253
  const { children: e, parent: a, startIndex: s, nodeType: n, content: i = "" } = this.getProps();
42254
42254
  if (this.exclude(t))
42255
42255
  return;
42256
- const o = 0, l = t - s, u = l, d = i.slice(o, l), c = P2.create(n, d);
42256
+ const o = 0, l = t - s, u = l, d = i.slice(o, l), c = N2.create(n, d);
42257
42257
  c.parent = a, c.setIndexRange(o, l - 1);
42258
- const g = i.slice(u), h = P2.create(n, g);
42258
+ const g = i.slice(u), h = N2.create(n, g);
42259
42259
  h.parent = a, h.setIndexRange(u, u + g.length - 1);
42260
- const p = [], f = [];
42260
+ const f = [], p = [];
42261
42261
  for (const m of e) {
42262
42262
  const { startIndex: v } = m;
42263
42263
  if (m.exclude(t))
42264
- t < v ? p.push(m) : f.push(m);
42264
+ t < v ? f.push(m) : p.push(m);
42265
42265
  else {
42266
42266
  const y = m.split(t);
42267
42267
  if (y == null) {
42268
- p.push(m);
42268
+ f.push(m);
42269
42269
  continue;
42270
42270
  }
42271
42271
  const { firstNode: z, lastNode: _ } = y;
42272
- p.push(z), p.push(_);
42272
+ f.push(z), f.push(_);
42273
42273
  }
42274
42274
  }
42275
- return c.children = p, h.children = f, c._resetBlocks(), h._resetBlocks(), {
42275
+ return c.children = f, h.children = p, c._resetBlocks(), h._resetBlocks(), {
42276
42276
  firstNode: c,
42277
42277
  lastNode: h
42278
42278
  };
@@ -42330,46 +42330,46 @@ function q6(r, t) {
42330
42330
  const h = r[g];
42331
42331
  if (h === J.PARAGRAPH) {
42332
42332
  e += J.PARAGRAPH;
42333
- const p = P2.create(X1.PARAGRAPH, e), f = l[l.length - 1];
42334
- if (f && f.isFinished) {
42335
- if (Q3(p, [f.table], X1.PARAGRAPH), t) {
42336
- const m = t.find((v) => v.startIndex === f.table.startIndex && v.endIndex === f.table.endIndex + 1);
42337
- m && n.set(m.tableId, { table: f.table });
42333
+ const f = N2.create(X1.PARAGRAPH, e), p = l[l.length - 1];
42334
+ if (p && p.isFinished) {
42335
+ if (Q3(f, [p.table], X1.PARAGRAPH), t) {
42336
+ const m = t.find((v) => v.startIndex === p.table.startIndex && v.endIndex === p.table.endIndex + 1);
42337
+ m && n.set(m.tableId, { table: p.table });
42338
42338
  }
42339
42339
  l.pop();
42340
42340
  }
42341
- p.setIndexRange(g - e.length + 1, g), p.addBlocks(c), c.length = 0, e = "", d.length > 0 ? o.push(p) : i.push(p);
42341
+ f.setIndexRange(g - e.length + 1, g), f.addBlocks(c), c.length = 0, e = "", d.length > 0 ? o.push(f) : i.push(f);
42342
42342
  } else if (h === J.SECTION_BREAK) {
42343
- const p = P2.create(X1.SECTION_BREAK), f = d.length > 0 ? o : i;
42344
- Q3(p, f);
42345
- const m = f[f.length - 1];
42343
+ const f = N2.create(X1.SECTION_BREAK), p = d.length > 0 ? o : i;
42344
+ Q3(f, p);
42345
+ const m = p[p.length - 1];
42346
42346
  if (m && m.content && (m.content += J.SECTION_BREAK), d.length > 0) {
42347
42347
  const v = d[d.length - 1];
42348
- Q3(v, [p], X1.TABLE_CELL);
42348
+ Q3(v, [f], X1.TABLE_CELL);
42349
42349
  } else
42350
- s.push(p);
42351
- f.length = 0;
42350
+ s.push(f);
42351
+ p.length = 0;
42352
42352
  } else if (h === J.TABLE_START) {
42353
- const p = P2.create(X1.TABLE);
42353
+ const f = N2.create(X1.TABLE);
42354
42354
  l.push({
42355
- table: p,
42355
+ table: f,
42356
42356
  isFinished: !1
42357
42357
  });
42358
42358
  } else if (h === J.TABLE_ROW_START) {
42359
- const p = P2.create(X1.TABLE_ROW);
42360
- u.push(p);
42359
+ const f = N2.create(X1.TABLE_ROW);
42360
+ u.push(f);
42361
42361
  } else if (h === J.TABLE_CELL_START) {
42362
- const p = P2.create(X1.TABLE_CELL);
42363
- d.push(p);
42362
+ const f = N2.create(X1.TABLE_CELL);
42363
+ d.push(f);
42364
42364
  } else if (h === J.TABLE_END) {
42365
- const p = l[l.length - 1];
42366
- p.isFinished = !0, e = "";
42365
+ const f = l[l.length - 1];
42366
+ f.isFinished = !0, e = "";
42367
42367
  } else if (h === J.TABLE_ROW_END) {
42368
- const p = u.pop(), f = l[l.length - 1];
42369
- Q3(f.table, [p], X1.TABLE);
42368
+ const f = u.pop(), p = l[l.length - 1];
42369
+ Q3(p.table, [f], X1.TABLE);
42370
42370
  } else if (h === J.TABLE_CELL_END) {
42371
- const p = d.pop(), f = u[u.length - 1];
42372
- Q3(f, [p], X1.TABLE_ROW);
42371
+ const f = d.pop(), p = u[u.length - 1];
42372
+ Q3(p, [f], X1.TABLE_ROW);
42373
42373
  } else h === J.CUSTOM_BLOCK && c.push(g), e += h;
42374
42374
  }
42375
42375
  return { sectionList: s, tableNodeCache: n };
@@ -42582,7 +42582,7 @@ function ne(r, t) {
42582
42582
  function ny(r, t, e) {
42583
42583
  return Fe(Q1.WORD, r, t, e);
42584
42584
  }
42585
- function L2(r, t, e, a) {
42585
+ function P2(r, t, e, a) {
42586
42586
  return Fe(Q1.LETTER, r, t, e, a);
42587
42587
  }
42588
42588
  function G6(r, t) {
@@ -42670,24 +42670,24 @@ function Fe(r, t, e, a, s) {
42670
42670
  t === J.PARAGRAPH && (c = J.PARAGRAPH);
42671
42671
  let g = null, h = 0;
42672
42672
  s && s.boundingBox && s.font ? g = F1.getBBoxFromGlyphInfo(s, n) : g = F1.getTextSize(t, n);
42673
- const { width: p = 0 } = g;
42674
- let f = a != null ? a : p;
42675
- if (ct(l, u) && (f = p + (Ce(t) ? o : o / 2), l === N1.SNAP_TO_CHARS && (h = (f - p) / 2)), s && s.kerning !== 0 && s.font) {
42673
+ const { width: f = 0 } = g;
42674
+ let p = a != null ? a : f;
42675
+ if (ct(l, u) && (p = f + (Ce(t) ? o : o / 2), l === N1.SNAP_TO_CHARS && (h = (p - f) / 2)), s && s.kerning !== 0 && s.font) {
42676
42676
  const m = g3(n.fontSize) / s.font.unitsPerEm, v = s.kerning * m;
42677
- f += v, h += v;
42677
+ p += v, h += v;
42678
42678
  }
42679
42679
  return {
42680
42680
  content: t,
42681
42681
  ts: i,
42682
42682
  fontStyle: n,
42683
- width: f,
42683
+ width: p,
42684
42684
  bBox: g,
42685
42685
  xOffset: h,
42686
42686
  left: 0,
42687
42687
  glyphType: r,
42688
42688
  streamType: c,
42689
42689
  isJustifiable: et(t),
42690
- adjustability: ne(t, f),
42690
+ adjustability: ne(t, p),
42691
42691
  count: t.length,
42692
42692
  raw: t
42693
42693
  };
@@ -42758,13 +42758,13 @@ function uy(r, t, e, a, s = 0, n = !1, i, o, l, u) {
42758
42758
  lineTop: c = 0,
42759
42759
  contentHeight: g = 0,
42760
42760
  paddingLeft: h = 0,
42761
- paddingRight: p = 0,
42762
- paddingTop: f = 0,
42761
+ paddingRight: f = 0,
42762
+ paddingTop: p = 0,
42763
42763
  paddingBottom: m = 0,
42764
42764
  marginTop: v = 0,
42765
42765
  spaceBelowApply: y = 0
42766
42766
  } = e, { skeTablesInParagraph: z } = i, _ = (T = o.skeDrawings) != null ? T : /* @__PURE__ */ new Map(), j = (R = o.skeTables) != null ? R : /* @__PURE__ */ new Map(), w = l == null ? void 0 : l.skeDrawings, x = u == null ? void 0 : u.skeDrawings, C = fy(t, r);
42767
- if (C.lineIndex = s, C.paragraphStart = n, C.contentHeight = g, C.top = c, C.lineHeight = d, C.paddingTop = f, C.paddingBottom = m, C.marginTop = v, C.spaceBelowApply = y, n && Array.isArray(z) && z.length > 0) {
42767
+ if (C.lineIndex = s, C.paragraphStart = n, C.contentHeight = g, C.top = c, C.lineHeight = d, C.paddingTop = p, C.paddingBottom = m, C.marginTop = v, C.spaceBelowApply = y, n && Array.isArray(z) && z.length > 0) {
42768
42768
  const B = z[z.length - 1].tableId;
42769
42769
  C.isBehindTable = !0, C.tableId = B;
42770
42770
  }
@@ -42774,7 +42774,7 @@ function uy(r, t, e, a, s = 0, n = !1, i, o, l, u) {
42774
42774
  c,
42775
42775
  a,
42776
42776
  h,
42777
- p,
42777
+ f,
42778
42778
  o,
42779
42779
  l,
42780
42780
  u,
@@ -42814,8 +42814,8 @@ function Xe(r, t, e) {
42814
42814
  if (u !== K1.WRAP_TOP_AND_BOTTOM)
42815
42815
  return;
42816
42816
  if (o === 0) {
42817
- const p = a - d, f = d + s + c;
42818
- return p + f < e || p > t + e ? void 0 : p + f;
42817
+ const f = a - d, p = d + s + c;
42818
+ return f + p < e || f > t + e ? void 0 : f + p;
42819
42819
  }
42820
42820
  let { top: g = 0, height: h = 0 } = Se(o, n, i, a, s);
42821
42821
  if (g -= d, h += c, !(g + h < e || g > t + e))
@@ -42833,16 +42833,16 @@ function cy(r, t, e, a, s, n, i, o, l, u, d, c) {
42833
42833
  width: s
42834
42834
  }
42835
42835
  ), i && u && u.forEach((h) => {
42836
- const p = ie(h, i, n, !0), f = Ve(p, r, t, e);
42837
- f && g.push(f);
42836
+ const f = ie(h, i, n, !0), p = Ve(f, r, t, e);
42837
+ p && g.push(p);
42838
42838
  }), o && d && d.forEach((h) => {
42839
- const p = ie(h, o, n, !1), f = Ve(p, r, t, e);
42840
- f && g.push(f);
42841
- }), l == null || l.forEach((h) => {
42842
- const p = Ve(h, r, t, e);
42839
+ const f = ie(h, o, n, !1), p = Ve(f, r, t, e);
42843
42840
  p && g.push(p);
42841
+ }), l == null || l.forEach((h) => {
42842
+ const f = Ve(h, r, t, e);
42843
+ f && g.push(f);
42844
42844
  }), c && c.size > 0 && c.forEach((h) => {
42845
- const { left: p, top: f, width: m, height: v, tableSource: y } = h, { dist: z } = y, _ = b4(f, v, p, m, t, r, e, z);
42845
+ const { left: f, top: p, width: m, height: v, tableSource: y } = h, { dist: z } = y, _ = b4(p, v, f, m, t, r, e, z);
42846
42846
  _ && g.push(_);
42847
42847
  }), py(e, g);
42848
42848
  }
@@ -42879,9 +42879,9 @@ function Ve(r, t, e, a) {
42879
42879
  }
42880
42880
  return X6(_, e, t, a);
42881
42881
  }
42882
- const { distL: c = 0, distT: g = 0, distB: h = 0, distR: p = 0, wrapText: f } = u, m = { distL: c, distT: g, distB: h, distR: p };
42882
+ const { distL: c = 0, distT: g = 0, distB: h = 0, distR: f = 0, wrapText: p } = u, m = { distL: c, distT: g, distB: h, distR: f };
42883
42883
  if (l === 0)
42884
- return b4(s, n, i, o, e, t, a, m, d, f);
42884
+ return b4(s, n, i, o, e, t, a, m, d, p);
42885
42885
  const v = Se(l, i, o, s, n);
42886
42886
  if (d === K1.WRAP_SQUARE) {
42887
42887
  const { left: y, width: z, top: _, height: j } = v;
@@ -42895,7 +42895,7 @@ function Ve(r, t, e, a) {
42895
42895
  a,
42896
42896
  m,
42897
42897
  d,
42898
- f
42898
+ p
42899
42899
  );
42900
42900
  }
42901
42901
  return X6(v.points, e, t, a);
@@ -42942,8 +42942,8 @@ function b4(r, t, e, a, s, n, i, o, l = K1.WRAP_SQUARE, u = W0.BOTH_SIDES) {
42942
42942
  distR: c = 0,
42943
42943
  distT: g = 0,
42944
42944
  distB: h = 0
42945
- } = o, p = r - (l === K1.WRAP_SQUARE ? g : 0), f = t + (l === K1.WRAP_SQUARE ? h + g : 0);
42946
- if (p + f <= s || p >= n + s)
42945
+ } = o, f = r - (l === K1.WRAP_SQUARE ? g : 0), p = t + (l === K1.WRAP_SQUARE ? h + g : 0);
42946
+ if (f + p <= s || f >= n + s)
42947
42947
  return;
42948
42948
  let m = e - d, v = a + d + c;
42949
42949
  const y = my(u, m, v, i);
@@ -43089,8 +43089,8 @@ function Ke(r, t, e, a) {
43089
43089
  };
43090
43090
  }
43091
43091
  function by(r, t, e, a, s) {
43092
- var f;
43093
- const { startIndex: n, endIndex: i, children: o } = a, l = (f = e.getTableByStartIndex(n)) == null ? void 0 : f.tableSource;
43092
+ var p;
43093
+ const { startIndex: n, endIndex: i, children: o } = a, l = (p = e.getTableByStartIndex(n)) == null ? void 0 : p.tableSource;
43094
43094
  if (l == null)
43095
43095
  throw new Error("Table not found");
43096
43096
  const u = e6(n, i, l);
@@ -43137,8 +43137,8 @@ function by(r, t, e, a, s) {
43137
43137
  x.height = T, x.top = d, d += T, c = Math.max(c, F);
43138
43138
  }
43139
43139
  u.width = c, u.height = d;
43140
- const { pageWidth: g, marginLeft: h = 0, marginRight: p = 0 } = t;
43141
- return u.left = it(g - h - p, c, l.align, l.indent), u;
43140
+ const { pageWidth: g, marginLeft: h = 0, marginRight: f = 0 } = t;
43141
+ return u.left = it(g - h - f, c, l.align, l.indent), u;
43142
43142
  }
43143
43143
  function yy(r, t) {
43144
43144
  const { startIndex: e, endIndex: a } = t;
@@ -43149,8 +43149,8 @@ function yy(r, t) {
43149
43149
  }
43150
43150
  }
43151
43151
  function zy(r, t, e, a, s, n) {
43152
- var f;
43153
- const i = [], { startIndex: o, endIndex: l, children: u } = a, d = (f = e.getTableByStartIndex(o)) == null ? void 0 : f.tableSource;
43152
+ var p;
43153
+ const i = [], { startIndex: o, endIndex: l, children: u } = a, d = (p = e.getTableByStartIndex(o)) == null ? void 0 : p.tableSource;
43154
43154
  if (d == null)
43155
43155
  throw new Error("Table not found when creating table skeletons");
43156
43156
  const c = d.tableRows[0].repeatHeaderRow === t1.TRUE, g = e6(o, l, d), h = {
@@ -43176,10 +43176,10 @@ function zy(r, t, e, a, s, n) {
43176
43176
  );
43177
43177
  }
43178
43178
  _y(h, t, i, d);
43179
- const p = i[0].height <= n;
43179
+ const f = i[0].height <= n;
43180
43180
  return {
43181
43181
  skeTables: i,
43182
- fromCurrentPage: p
43182
+ fromCurrentPage: f
43183
43183
  };
43184
43184
  }
43185
43185
  function _y(r, t, e, a) {
@@ -43197,7 +43197,7 @@ function R0(r, t, e) {
43197
43197
  return e && (i -= t.repeatRowHeight), i;
43198
43198
  }
43199
43199
  function nt(r, t, e, a, s, n, i, o, l, u = !1) {
43200
- const d = R0(t, l, !1), c = R0(t, l, !0), { children: g, startIndex: h, endIndex: p } = n, f = o.tableRows[i], { trHeight: m, cantSplit: v } = f, y = [], { hRule: z, val: _ } = m, j = v === t1.TRUE && m.hRule === n0.AUTO, w = 72, x = l.remainHeight <= w;
43200
+ const d = R0(t, l, !1), c = R0(t, l, !0), { children: g, startIndex: h, endIndex: f } = n, p = o.tableRows[i], { trHeight: m, cantSplit: v } = p, y = [], { hRule: z, val: _ } = m, j = v === t1.TRUE && m.hRule === n0.AUTO, w = 72, x = l.remainHeight <= w;
43201
43201
  let C = K6(e);
43202
43202
  const S = [0];
43203
43203
  for (const F of g) {
@@ -43213,7 +43213,7 @@ function nt(r, t, e, a, s, n, i, o, l, u = !1) {
43213
43213
  d
43214
43214
  );
43215
43215
  for (; y.length < R.length; ) {
43216
- const B = ot(h, p, i, f, u), A = g.length;
43216
+ const B = ot(h, f, i, p, u), A = g.length;
43217
43217
  B.cells = [...new Array(A)].map((L, I) => {
43218
43218
  const O = vt(
43219
43219
  r,
@@ -43242,10 +43242,10 @@ function nt(r, t, e, a, s, n, i, o, l, u = !1) {
43242
43242
  }
43243
43243
  i === 0 && l.repeatRow && (l.repeatRowHeight = S[S.length - 1]);
43244
43244
  for (const F of y)
43245
- Dy(F, f);
43245
+ Dy(F, p);
43246
43246
  for (; y.length > 0; ) {
43247
43247
  const F = y.shift(), T = C.rows[C.rows.length - 1];
43248
- (l.remainHeight < w || l.remainHeight < F.height) && (l.remainHeight = R0(t, l, i !== 0 && F.index !== T.index), l.rowTop = 0, C.rows.length > 0 && (C = e6(h, p, o), e.push(C), l.repeatRow && u === !1 && i !== 0 && F.index !== T.index && (l.remainHeight = R0(t, l, !1), nt(
43248
+ (l.remainHeight < w || l.remainHeight < F.height) && (l.remainHeight = R0(t, l, i !== 0 && F.index !== T.index), l.rowTop = 0, C.rows.length > 0 && (C = e6(h, f, o), e.push(C), l.repeatRow && u === !1 && i !== 0 && F.index !== T.index && (l.remainHeight = R0(t, l, !1), nt(
43249
43249
  r,
43250
43250
  t,
43251
43251
  e,
@@ -43339,12 +43339,12 @@ function MB(r) {
43339
43339
  function wy(r, t, e, a, s, n, i = O1.Normal) {
43340
43340
  if (n)
43341
43341
  if (s.bulletSkeleton) {
43342
- const { bulletSkeleton: o, paragraphStyle: l = {} } = s, { gridType: u = N1.LINES, charSpace: d = 0, defaultTabStop: c = 10.5 } = a, { snapToGrid: g = t1.TRUE } = l, h = le(d, c, u, g), p = oy(t[0], o, h), f = o.paragraphProperties || {};
43343
- s.paragraphStyle = oz(s.paragraphStyle, { ...f, hanging: { v: p.width } }), h0(r, [p, ...t], e, a, s, n, i);
43342
+ const { bulletSkeleton: o, paragraphStyle: l = {} } = s, { gridType: u = N1.LINES, charSpace: d = 0, defaultTabStop: c = 10.5 } = a, { snapToGrid: g = t1.TRUE } = l, h = le(d, c, u, g), f = oy(t[0], o, h), p = o.paragraphProperties || {};
43343
+ s.paragraphStyle = oz(s.paragraphStyle, { ...p, hanging: { v: f.width } }), h0(r, [f, ...t], e, a, s, n, i);
43344
43344
  } else
43345
43345
  h0(r, t, e, a, s, n, i);
43346
43346
  else
43347
- I2(r, t, e, a, s, n, i);
43347
+ L2(r, t, e, a, s, n, i);
43348
43348
  return [...e];
43349
43349
  }
43350
43350
  function xy(r) {
@@ -43392,11 +43392,11 @@ function Fy(r) {
43392
43392
  t.unshift(e), e = r.glyphGroup.pop();
43393
43393
  return r.glyphGroup.length === 0 && (r.glyphGroup.push(...t), t.length = 0), t;
43394
43394
  }
43395
- function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43395
+ function L2(r, t, e, a, s, n, i = O1.Normal, o) {
43396
43396
  var d;
43397
43397
  const l = $3(e), u = Yy(l);
43398
43398
  if (u) {
43399
- const c = J6(t), { divide: g, isLast: h } = u, p = (d = g == null ? void 0 : g.glyphGroup) == null ? void 0 : d[g.glyphGroup.length - 1], f = (p == null ? void 0 : p.width) || 0, m = (p == null ? void 0 : p.left) || 0, v = f + m, { hyphenationZone: y } = a;
43399
+ const c = J6(t), { divide: g, isLast: h } = u, f = (d = g == null ? void 0 : g.glyphGroup) == null ? void 0 : d[g.glyphGroup.length - 1], p = (f == null ? void 0 : f.width) || 0, m = (f == null ? void 0 : f.left) || 0, v = p + m, { hyphenationZone: y } = a;
43400
43400
  if (v + c > g.width) {
43401
43401
  M0(g, {
43402
43402
  isFull: !0
@@ -43416,7 +43416,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43416
43416
  j.length > 1 && t.unshift(j.pop());
43417
43417
  break;
43418
43418
  }
43419
- j.length > 0 && A0(g, j, v), t.length && I2(
43419
+ j.length > 0 && A0(g, j, v), t.length && L2(
43420
43420
  r,
43421
43421
  t,
43422
43422
  e,
@@ -43430,7 +43430,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43430
43430
  const j = Fy(g);
43431
43431
  j.length > 0 && (M0(g, {
43432
43432
  breakType: O1.Normal
43433
- }), I2(r, j, e, a, s, n, O1.Hyphen)), I2(
43433
+ }), L2(r, j, e, a, s, n, O1.Hyphen)), L2(
43434
43434
  r,
43435
43435
  t,
43436
43436
  e,
@@ -43441,7 +43441,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43441
43441
  o
43442
43442
  );
43443
43443
  } else
43444
- I2(
43444
+ L2(
43445
43445
  r,
43446
43446
  t,
43447
43447
  e,
@@ -43457,7 +43457,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43457
43457
  )
43458
43458
  M0(g, {
43459
43459
  isFull: !0
43460
- }), I2(
43460
+ }), L2(
43461
43461
  r,
43462
43462
  t,
43463
43463
  e,
@@ -43495,7 +43495,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43495
43495
  T + R
43496
43496
  );
43497
43497
  for (let H = P; H < L.length; H++)
43498
- I2(
43498
+ L2(
43499
43499
  r,
43500
43500
  [L[H]],
43501
43501
  e,
@@ -43503,7 +43503,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
43503
43503
  s,
43504
43504
  n
43505
43505
  );
43506
- I2(r, t, e, a, s, n, i);
43506
+ L2(r, t, e, a, s, n, i);
43507
43507
  return;
43508
43508
  }
43509
43509
  }
@@ -43521,18 +43521,18 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
43521
43521
  console.error("The column width is less than 0, need to adjust page width to make it great than 0");
43522
43522
  return;
43523
43523
  }
43524
- const c = Wy(d), g = Math.max(...t.map((E1) => E1.bBox.ba)), h = Math.max(...t.map((E1) => E1.bBox.bd)), p = o || g + h, {
43525
- paragraphStyle: f = {},
43524
+ const c = Wy(d), g = Math.max(...t.map((E1) => E1.bBox.ba)), h = Math.max(...t.map((E1) => E1.bBox.bd)), f = o || g + h, {
43525
+ paragraphStyle: p = {},
43526
43526
  paragraphNonInlineSkeDrawings: m,
43527
43527
  skeTablesInParagraph: v,
43528
43528
  skeHeaders: y,
43529
43529
  skeFooters: z,
43530
43530
  pDrawingAnchor: _,
43531
43531
  paragraphIndex: j
43532
- } = s, { namedStyleType: w } = f, x = w !== void 0 ? H8[w] : null, C = {
43533
- ...f,
43534
- spaceAbove: (s3 = f.spaceAbove) != null ? s3 : x == null ? void 0 : x.spaceAbove,
43535
- spaceBelow: (H2 = f.spaceBelow) != null ? H2 : x == null ? void 0 : x.spaceBelow
43532
+ } = s, { namedStyleType: w } = p, x = w !== void 0 ? H8[w] : null, C = {
43533
+ ...p,
43534
+ spaceAbove: (s3 = p.spaceAbove) != null ? s3 : x == null ? void 0 : x.spaceAbove,
43535
+ spaceBelow: (H2 = p.spaceBelow) != null ? H2 : x == null ? void 0 : x.spaceBelow
43536
43536
  }, {
43537
43537
  // direction,
43538
43538
  spaceAbove: S,
@@ -43552,7 +43552,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
43552
43552
  a,
43553
43553
  s
43554
43554
  ), { paddingTop: H, paddingBottom: X, contentHeight: Q, lineSpacingApply: g1 } = gt(
43555
- p,
43555
+ f,
43556
43556
  L,
43557
43557
  I,
43558
43558
  $,
@@ -43570,7 +43570,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
43570
43570
  let h1 = d.parent;
43571
43571
  h1 || (h1 = Te(l));
43572
43572
  const p1 = (c == null ? void 0 : c.lineHeight) || 0, D1 = (c == null ? void 0 : c.top) || 0, m1 = p1 + D1, { pageWidth: j1, headerId: $1, footerId: y1, segmentId: C1 } = l, I1 = (E3 = y == null ? void 0 : y.get($1)) == null ? void 0 : E3.get(j1), H1 = (X3 = z == null ? void 0 : z.get(y1)) == null ? void 0 : X3.get(j1);
43573
- let R2 = !1;
43573
+ let O2 = !1;
43574
43574
  if (c) {
43575
43575
  const E1 = Ay(c);
43576
43576
  if (E1.length > 0) {
@@ -43582,15 +43582,15 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
43582
43582
  const E1 = [...m.values()].filter((x2) => x2.drawingOrigin.docTransform.positionV.relativeFrom !== b1.LINE);
43583
43583
  Z6(r, m1, i1, d, E1, s.paragraphIndex, n, (K3 = _ == null ? void 0 : _.get(j)) == null ? void 0 : K3.top);
43584
43584
  }
43585
- v != null && v.length > 0 && (R2 = By(r, m1, i1, l, d, h1, v, s.paragraphIndex, a, (l2 = _ == null ? void 0 : _.get(j)) == null ? void 0 : l2.top));
43586
- const O2 = dy(
43585
+ v != null && v.length > 0 && (O2 = By(r, m1, i1, l, d, h1, v, s.paragraphIndex, a, (l2 = _ == null ? void 0 : _.get(j)) == null ? void 0 : l2.top));
43586
+ const I2 = dy(
43587
43587
  i1,
43588
43588
  m1,
43589
43589
  l,
43590
43590
  I1,
43591
43591
  H1
43592
43592
  );
43593
- if (i1 + O2 > h1.height && d.lines.length > 0 && l.sections.length > 0 || R2) {
43593
+ if (i1 + I2 > h1.height && d.lines.length > 0 && l.sections.length > 0 || O2) {
43594
43594
  if (st(d, !0), ut(
43595
43595
  r,
43596
43596
  t,
@@ -43624,7 +43624,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
43624
43624
  {
43625
43625
  lineHeight: i1,
43626
43626
  contentHeight: Q,
43627
- lineTop: O2,
43627
+ lineTop: I2,
43628
43628
  paddingLeft: L1,
43629
43629
  paddingRight: n2,
43630
43630
  paddingTop: H,
@@ -43640,7 +43640,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
43640
43640
  I1,
43641
43641
  H1
43642
43642
  );
43643
- d.lines.push(i2), i2.parent = d, vy(j, i2, m1, _), I2(
43643
+ d.lines.push(i2), i2.parent = d, vy(j, i2, m1, _), L2(
43644
43644
  r,
43645
43645
  t,
43646
43646
  e,
@@ -43668,12 +43668,12 @@ function Z6(r, t, e, a, s, n, i, o) {
43668
43668
  const c = d.drawingOrigin.layoutType;
43669
43669
  return c !== K1.INLINE && c !== K1.WRAP_NONE;
43670
43670
  }).map((d) => {
43671
- const { drawingOrigin: c, drawingId: g, aTop: h, aLeft: p, width: f, height: m, angle: v } = d, y = c.docTransform.positionV;
43671
+ const { drawingOrigin: c, drawingId: g, aTop: h, aLeft: f, width: p, height: m, angle: v } = d, y = c.docTransform.positionV;
43672
43672
  return {
43673
43673
  id: g,
43674
43674
  top: h,
43675
- left: p,
43676
- width: f,
43675
+ left: f,
43676
+ width: p,
43677
43677
  height: m,
43678
43678
  angle: v,
43679
43679
  type: a6.IMAGE,
@@ -43689,7 +43689,7 @@ function Sy(r, t, e, a, s, n, i) {
43689
43689
  const o = Ty(t, s, e, a, i);
43690
43690
  if (o == null)
43691
43691
  return;
43692
- const { tableId: l, width: u, height: d, tableSource: c } = t, { left: g, top: h } = o, p = {
43692
+ const { tableId: l, width: u, height: d, tableSource: c } = t, { left: g, top: h } = o, f = {
43693
43693
  id: l,
43694
43694
  top: h,
43695
43695
  left: g,
@@ -43699,14 +43699,14 @@ function Sy(r, t, e, a, s, n, i) {
43699
43699
  type: a6.TABLE,
43700
43700
  positionV: c.position.positionV
43701
43701
  };
43702
- lt(r, [p], s, n), t.top = h, t.left = g;
43702
+ lt(r, [f], s, n), t.top = h, t.left = g;
43703
43703
  }
43704
43704
  function Ty(r, t, e, a, s) {
43705
- var p, f, m;
43706
- const n = (p = t.parent) == null ? void 0 : p.parent;
43705
+ var f, p, m;
43706
+ const n = (f = t.parent) == null ? void 0 : f.parent;
43707
43707
  if (n == null)
43708
43708
  return;
43709
- const i = t6(t), { tableSource: o, width: l, height: u } = r, { positionH: d, positionV: c } = o.position, g = (f = kt(d, t, n, l, i)) != null ? f : 0, h = (m = mt(
43709
+ const i = t6(t), { tableSource: o, width: l, height: u } = r, { positionH: d, positionV: c } = o.position, g = (p = kt(d, t, n, l, i)) != null ? p : 0, h = (m = mt(
43710
43710
  c,
43711
43711
  n,
43712
43712
  e,
@@ -43745,10 +43745,10 @@ function By(r, t, e, a, s, n, i, o, l, u) {
43745
43745
  default:
43746
43746
  throw new Error(`Unsupported table text wrap type: ${h.textWrap}`);
43747
43747
  }
43748
- const { top: p, left: f, height: m } = g;
43749
- if (!r.isDirty && p + m > n.height && d.isSlideTable === !1) {
43748
+ const { top: f, left: p, height: m } = g;
43749
+ if (!r.isDirty && f + m > n.height && d.isSlideTable === !1) {
43750
43750
  i.pop();
43751
- const v = n.height - p, { segmentId: y } = a, z = r.viewModel.getSelfOrHeaderFooterViewModel(y), _ = d.tableNode;
43751
+ const v = n.height - f, { segmentId: y } = a, z = r.viewModel.getSelfOrHeaderFooterViewModel(y), _ = d.tableNode;
43752
43752
  yy(r.skeletonResourceReference.skeListLevel, _);
43753
43753
  const {
43754
43754
  fromCurrentPage: j,
@@ -43762,7 +43762,7 @@ function By(r, t, e, a, s, n, i, o, l, u) {
43762
43762
  v
43763
43763
  );
43764
43764
  if (w.forEach((x, C) => {
43765
- x.top = C === 0 && j ? p : 0, x.left = f;
43765
+ x.top = C === 0 && j ? f : 0, x.left = p;
43766
43766
  }), j) {
43767
43767
  const x = w.shift();
43768
43768
  a.skeTables.set(x.tableId, x), x.parent = a, i.push({
@@ -43797,22 +43797,22 @@ function lt(r, t, e, a) {
43797
43797
  return;
43798
43798
  let n = !1;
43799
43799
  for (const h of t) {
43800
- const p = r.floatObjectsCache.get(h.id);
43801
- if (p == null || p.page.segmentId !== s.segmentId)
43800
+ const f = r.floatObjectsCache.get(h.id);
43801
+ if (f == null || f.page.segmentId !== s.segmentId)
43802
43802
  continue;
43803
- const f = (u = (l = (o = p.page.sections[0]) == null ? void 0 : o.columns[0]) == null ? void 0 : l.lines[0]) == null ? void 0 : u.paragraphIndex, m = (g = (c = (d = s.sections[0]) == null ? void 0 : d.columns[0]) == null ? void 0 : c.lines[0]) == null ? void 0 : g.paragraphIndex;
43804
- p.page && f && m && f !== m && (p.page.skeDrawings.delete(h.id), r.floatObjectsCache.delete(h.id), de([p.page], (v) => {
43803
+ const p = (u = (l = (o = f.page.sections[0]) == null ? void 0 : o.columns[0]) == null ? void 0 : l.lines[0]) == null ? void 0 : u.paragraphIndex, m = (g = (c = (d = s.sections[0]) == null ? void 0 : d.columns[0]) == null ? void 0 : c.lines[0]) == null ? void 0 : g.paragraphIndex;
43804
+ f.page && p && m && p !== m && (f.page.skeDrawings.delete(h.id), r.floatObjectsCache.delete(h.id), de([f.page], (v) => {
43805
43805
  var C;
43806
43806
  const { lineHeight: y, top: z } = v, _ = v.parent;
43807
43807
  if (n || _ == null)
43808
43808
  return;
43809
43809
  const { width: j, left: w } = _;
43810
- Y6(p.floatObject, y, z, w, j) && (n = !0, r.isDirty = !0, r.layoutStartPointer[p.page.segmentId] = Math.min(v.paragraphIndex, (C = r.layoutStartPointer[p.page.segmentId]) != null ? C : Number.POSITIVE_INFINITY), r.paragraphsOpenNewPage.add(a));
43810
+ Y6(f.floatObject, y, z, w, j) && (n = !0, r.isDirty = !0, r.layoutStartPointer[f.page.segmentId] = Math.min(v.paragraphIndex, (C = r.layoutStartPointer[f.page.segmentId]) != null ? C : Number.POSITIVE_INFINITY), r.paragraphsOpenNewPage.add(a));
43811
43811
  }));
43812
43812
  }
43813
43813
  n = !1, de([s], (h) => {
43814
43814
  var y, z;
43815
- const { lineHeight: p, top: f } = h, { width: m, left: v } = e;
43815
+ const { lineHeight: f, top: p } = h, { width: m, left: v } = e;
43816
43816
  if (!n)
43817
43817
  for (const _ of t.values()) {
43818
43818
  let j = _;
@@ -43825,7 +43825,7 @@ function lt(r, t, e, a) {
43825
43825
  else
43826
43826
  continue;
43827
43827
  }
43828
- if (Y6(j, p, f, v, m)) {
43828
+ if (Y6(j, f, p, v, m)) {
43829
43829
  n = !0, r.isDirty = !0, r.layoutStartPointer[s.segmentId] = Math.min(h.paragraphIndex, (z = r.layoutStartPointer[s.segmentId]) != null ? z : Number.POSITIVE_INFINITY);
43830
43830
  let x = r.floatObjectsCache.get(_.id);
43831
43831
  x == null && (x = {
@@ -43915,16 +43915,16 @@ function Iy(r, t, e) {
43915
43915
  return;
43916
43916
  const n = t6(a), i = /* @__PURE__ */ new Map(), { top: o, lineHeight: l, marginBottom: u = 0 } = r;
43917
43917
  for (const h of r.divides)
43918
- for (const p of h.glyphGroup)
43919
- if (p.streamType === J.CUSTOM_BLOCK && p.width !== 0) {
43920
- const { drawingId: f } = p;
43921
- if (f == null)
43918
+ for (const f of h.glyphGroup)
43919
+ if (f.streamType === J.CUSTOM_BLOCK && f.width !== 0) {
43920
+ const { drawingId: p } = f;
43921
+ if (p == null)
43922
43922
  continue;
43923
- const m = t == null ? void 0 : t.get(f), v = m == null ? void 0 : m.drawingOrigin;
43923
+ const m = t == null ? void 0 : t.get(p), v = m == null ? void 0 : m.drawingOrigin;
43924
43924
  if (v == null || m == null)
43925
43925
  continue;
43926
- const { docTransform: y } = v, { size: z, angle: _ } = y, { width: j = 0, height: w = 0 } = z, x = p.bBox.bd + p.bBox.ba;
43927
- m.aLeft = h.left + h.paddingLeft + p.left + 0.5 * p.width - 0.5 * j || 0, m.aTop = o + l - 0.5 * x - 0.5 * w - u, m.width = j, m.height = w, m.angle = _, m.isPageBreak = n, m.lineTop = o, m.columnLeft = a.left, m.blockAnchorTop = e != null ? e : o, m.lineHeight = r.lineHeight, i.set(m.drawingId, m);
43926
+ const { docTransform: y } = v, { size: z, angle: _ } = y, { width: j = 0, height: w = 0 } = z, x = f.bBox.bd + f.bBox.ba;
43927
+ m.aLeft = h.left + h.paddingLeft + f.left + 0.5 * f.width - 0.5 * j || 0, m.aTop = o + l - 0.5 * x - 0.5 * w - u, m.width = j, m.height = w, m.angle = _, m.isPageBreak = n, m.lineTop = o, m.columnLeft = a.left, m.blockAnchorTop = e != null ? e : o, m.lineHeight = r.lineHeight, i.set(m.drawingId, m);
43928
43928
  }
43929
43929
  const d = new Map([...s.skeDrawings, ...i]);
43930
43930
  s.skeDrawings = d;
@@ -43940,8 +43940,8 @@ function Ly(r, t, e, a, s, n = []) {
43940
43940
  const { drawingOrigin: h } = g;
43941
43941
  if (!h)
43942
43942
  continue;
43943
- const { docTransform: p } = h, { positionH: f, positionV: m, size: v, angle: y } = p, { width: z = 0, height: _ = 0 } = v;
43944
- g.aLeft = (d = kt(f, e, i, z, l)) != null ? d : 0, g.aTop = (c = mt(
43943
+ const { docTransform: f } = h, { positionH: p, positionV: m, size: v, angle: y } = f, { width: z = 0, height: _ = 0 } = v;
43944
+ g.aLeft = (d = kt(p, e, i, z, l)) != null ? d : 0, g.aTop = (c = mt(
43945
43945
  m,
43946
43946
  i,
43947
43947
  r,
@@ -44122,7 +44122,7 @@ function ue(r, t = -1) {
44122
44122
  let o = i, l = Number.NEGATIVE_INFINITY, u = 0;
44123
44123
  for (const d of s) {
44124
44124
  const { columns: c } = d, g = o;
44125
- let h = g, p = Number.NEGATIVE_INFINITY, f = 0;
44125
+ let h = g, f = Number.NEGATIVE_INFINITY, p = 0;
44126
44126
  for (const m of c) {
44127
44127
  const { lines: v } = m, y = h;
44128
44128
  let z = y, _ = 0, j = Number.NEGATIVE_INFINITY;
@@ -44150,9 +44150,9 @@ function ue(r, t = -1) {
44150
44150
  }
44151
44151
  w.st = P ? R + 1 : R, w.ed = B >= w.st ? B : w.st, w.width = A, w.asc = L, w.dsc = I, j = Math.max(j, A), z = w.ed;
44152
44152
  }
44153
- m.st = y + 1, m.ed = z >= m.st ? z : m.st, m.height = _, m.width = j, f += j, p = Math.max(p, m.height), h = m.ed;
44153
+ m.st = y + 1, m.ed = z >= m.st ? z : m.st, m.height = _, m.width = j, p += j, f = Math.max(f, m.height), h = m.ed;
44154
44154
  }
44155
- d.st = g + 1, d.ed = h >= d.st ? h : d.st, d.height = p, u += p, l = Math.max(l, f), o = d.ed;
44155
+ d.st = g + 1, d.ed = h >= d.st ? h : d.st, d.height = f, u += f, l = Math.max(l, p), o = d.ed;
44156
44156
  }
44157
44157
  for (const d of n.values()) {
44158
44158
  const { ed: c } = d;
@@ -44163,13 +44163,13 @@ function ue(r, t = -1) {
44163
44163
  }
44164
44164
  function V0(r, t) {
44165
44165
  de(t, (e, a, s, n) => {
44166
- var c, g, h, p;
44167
- const { segmentId: i } = n, o = (c = r.paragraphConfigCache.get(i)) == null ? void 0 : c.get(e.paragraphIndex), l = o == null ? void 0 : o.paragraphInlineSkeDrawings, u = (p = (h = (g = r.skeletonResourceReference) == null ? void 0 : g.drawingAnchor) == null ? void 0 : h.get(i)) == null ? void 0 : p.get(e.paragraphIndex);
44166
+ var c, g, h, f;
44167
+ const { segmentId: i } = n, o = (c = r.paragraphConfigCache.get(i)) == null ? void 0 : c.get(e.paragraphIndex), l = o == null ? void 0 : o.paragraphInlineSkeDrawings, u = (f = (h = (g = r.skeletonResourceReference) == null ? void 0 : g.drawingAnchor) == null ? void 0 : h.get(i)) == null ? void 0 : f.get(e.paragraphIndex);
44168
44168
  l && l.size > 0 && Iy(e, l, u == null ? void 0 : u.top);
44169
44169
  const d = o == null ? void 0 : o.paragraphStyle;
44170
44170
  if (e.divides.length > 0) {
44171
- const f = e.divides[e.divides.length - 1];
44172
- f.glyphGroup[f.glyphGroup.length - 1].streamType === J.PARAGRAPH && (d != null && d.borderBottom) && (e.borderBottom = d.borderBottom);
44171
+ const p = e.divides[e.divides.length - 1];
44172
+ p.glyphGroup[p.glyphGroup.length - 1].streamType === J.PARAGRAPH && (d != null && d.borderBottom) && (e.borderBottom = d.borderBottom);
44173
44173
  }
44174
44174
  });
44175
44175
  }
@@ -44184,8 +44184,8 @@ function OB(r, t) {
44184
44184
  const { divides: u } = l, d = u.length;
44185
44185
  for (let c = 0; c < d; c++) {
44186
44186
  const g = u[c], { glyphGroup: h } = g;
44187
- for (const p of h)
44188
- t && H4(t) && t(p, g, l, i, s, e);
44187
+ for (const f of h)
44188
+ t && H4(t) && t(f, g, l, i, s, e);
44189
44189
  }
44190
44190
  }
44191
44191
  }
@@ -44352,7 +44352,7 @@ function f3(r, t, e, a, s) {
44352
44352
  marginLeft: d = 0,
44353
44353
  // localeService,
44354
44354
  renderConfig: c = {}
44355
- } = a, { paragraphStyle: g = {}, bullet: h } = s, { isRenderStyle: p } = c, { startIndex: f } = e, m = t.getTextRun(r + f), v = p === t1.FALSE ? e5 : m != null ? m : e5, y = t.getCustomDecoration(r + f), z = y && y.show !== !1, _ = z ? Hy(y) : null, j = t.getCustomRange(r + f), w = j && j.show !== !1, x = w ? qy(j) : null, C = w || z || !!h || (g == null ? void 0 : g.namedStyleType), { st: S, ed: F } = v;
44355
+ } = a, { paragraphStyle: g = {}, bullet: h } = s, { isRenderStyle: f } = c, { startIndex: p } = e, m = t.getTextRun(r + p), v = f === t1.FALSE ? e5 : m != null ? m : e5, y = t.getCustomDecoration(r + p), z = y && y.show !== !1, _ = z ? Hy(y) : null, j = t.getCustomRange(r + p), w = j && j.show !== !1, x = w ? qy(j) : null, C = w || z || !!h || (g == null ? void 0 : g.namedStyleType), { st: S, ed: F } = v;
44356
44356
  let { ts: T = {} } = v;
44357
44357
  const R = y4.getValue(S, F);
44358
44358
  if (R && !C && m)
@@ -44449,8 +44449,8 @@ function iz(r, t) {
44449
44449
  pageOrient: c = N4.PORTRAIT,
44450
44450
  defaultHeaderId: g,
44451
44451
  defaultFooterId: h,
44452
- evenPageHeaderId: p,
44453
- evenPageFooterId: f,
44452
+ evenPageHeaderId: f,
44453
+ evenPageFooterId: p,
44454
44454
  firstPageHeaderId: m,
44455
44455
  firstPageFooterId: v,
44456
44456
  useFirstPageHeaderFooter: y,
@@ -44490,8 +44490,8 @@ function iz(r, t) {
44490
44490
  marginFooter: a1 = S,
44491
44491
  defaultHeaderId: i1 = g,
44492
44492
  defaultFooterId: h1 = h,
44493
- evenPageHeaderId: p1 = p,
44494
- evenPageFooterId: D1 = f,
44493
+ evenPageHeaderId: p1 = f,
44494
+ evenPageFooterId: D1 = p,
44495
44495
  firstPageHeaderId: m1 = m,
44496
44496
  firstPageFooterId: j1 = v,
44497
44497
  useFirstPageHeaderFooter: $1 = y,
@@ -44499,8 +44499,8 @@ function iz(r, t) {
44499
44499
  columnProperties: C1 = [],
44500
44500
  columnSeparatorType: I1 = u0.NONE,
44501
44501
  contentDirection: H1,
44502
- sectionType: R2,
44503
- textDirection: O2,
44502
+ sectionType: O2,
44503
+ textDirection: I2,
44504
44504
  renderConfig: q1 = A
44505
44505
  } = l, s2 = e.getChildren()[t + 1], e2 = (i2 = e.getSectionBreak(s2 == null ? void 0 : s2.endIndex)) == null ? void 0 : i2.sectionType, M1 = { defaultHeaderId: i1, evenPageHeaderId: p1, firstPageHeaderId: m1 }, L1 = { defaultFooterId: h1, evenPageFooterId: D1, firstPageFooterId: j1 };
44506
44506
  return N.width === null && (N.width = Number.POSITIVE_INFINITY), N.height === null && (N.height = Number.POSITIVE_INFINITY), {
@@ -44523,9 +44523,9 @@ function iz(r, t) {
44523
44523
  columnProperties: C1,
44524
44524
  columnSeparatorType: I1,
44525
44525
  contentDirection: H1,
44526
- sectionType: R2,
44526
+ sectionType: O2,
44527
44527
  sectionTypeNext: e2,
44528
- textDirection: O2,
44528
+ textDirection: I2,
44529
44529
  renderConfig: q1,
44530
44530
  autoHyphenation: F,
44531
44531
  doNotHyphenateCaps: T,
@@ -44576,8 +44576,8 @@ function _3(r, t, e, a = 1, s = g0.SECTION) {
44576
44576
  useFirstPageHeaderFooter: c,
44577
44577
  evenAndOddHeaders: g,
44578
44578
  footerTreeMap: h,
44579
- headerTreeMap: p,
44580
- columnProperties: f = [],
44579
+ headerTreeMap: f,
44580
+ columnProperties: p = [],
44581
44581
  columnSeparatorType: m,
44582
44582
  marginTop: v = 0,
44583
44583
  marginBottom: y = 0,
@@ -44592,9 +44592,9 @@ function _3(r, t, e, a = 1, s = g0.SECTION) {
44592
44592
  let P = R != null ? R : "", N = L != null ? L : "";
44593
44593
  a === i && c === t1.TRUE ? (P = A != null ? A : "", N = O != null ? O : "") : a % 2 === 0 && g === t1.TRUE && (P = B != null ? B : "", N = I != null ? I : "");
44594
44594
  let $, H;
44595
- P && ((j1 = C.get(P)) != null && j1.has(F) ? $ = ($1 = C.get(P)) == null ? void 0 : $1.get(F) : p && p.has(P) && ($ = z4(
44595
+ P && ((j1 = C.get(P)) != null && j1.has(F) ? $ = ($1 = C.get(P)) == null ? void 0 : $1.get(F) : f && f.has(P) && ($ = z4(
44596
44596
  r,
44597
- p.get(P),
44597
+ f.get(P),
44598
44598
  t,
44599
44599
  e,
44600
44600
  P,
@@ -44611,7 +44611,7 @@ function _3(r, t, e, a = 1, s = g0.SECTION) {
44611
44611
  let D1 = 0;
44612
44612
  Q && (D1 = Q.top + Q.height);
44613
44613
  const m1 = rt(
44614
- f,
44614
+ p,
44615
44615
  m,
44616
44616
  D1,
44617
44617
  0,
@@ -44660,8 +44660,8 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
44660
44660
  localeService: c,
44661
44661
  pageSize: g,
44662
44662
  drawings: h,
44663
- marginLeft: p = 0,
44664
- marginRight: f = 0,
44663
+ marginLeft: f = 0,
44664
+ marginRight: p = 0,
44665
44665
  marginHeader: m = 0,
44666
44666
  marginFooter: v = 0
44667
44667
  } = e, y = (g == null ? void 0 : g.width) || Number.POSITIVE_INFINITY, z = (g == null ? void 0 : g.height) || Number.POSITIVE_INFINITY, _ = {
@@ -44669,7 +44669,7 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
44669
44669
  footerTreeMap: u,
44670
44670
  headerTreeMap: d,
44671
44671
  pageSize: {
44672
- width: y - p - f,
44672
+ width: y - f - p,
44673
44673
  height: ft(z) - (n ? m : v) - 5
44674
44674
  },
44675
44675
  localeService: c,
@@ -44707,12 +44707,12 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
44707
44707
  }
44708
44708
  function vt(r, t, e, a, s, n = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY) {
44709
44709
  var F, T;
44710
- const { lists: o, footerTreeMap: l, headerTreeMap: u, localeService: d, drawings: c } = t, { skeletonResourceReference: g } = r, { cellMargin: h, tableRows: p, tableColumns: f, tableId: m } = e, v = p[a].tableCells[s], {
44710
+ const { lists: o, footerTreeMap: l, headerTreeMap: u, localeService: d, drawings: c } = t, { skeletonResourceReference: g } = r, { cellMargin: h, tableRows: f, tableColumns: p, tableId: m } = e, v = f[a].tableCells[s], {
44711
44711
  start: y = { v: 10 },
44712
44712
  end: z = { v: 10 },
44713
44713
  top: _ = { v: 5 },
44714
44714
  bottom: j = { v: 5 }
44715
- } = (T = (F = v.margin) != null ? F : h) != null ? T : {}, w = f[s].size.width.v, x = i, C = {
44715
+ } = (T = (F = v.margin) != null ? F : h) != null ? T : {}, w = p[s].size.width.v, x = i, C = {
44716
44716
  lists: o,
44717
44717
  footerTreeMap: l,
44718
44718
  headerTreeMap: u,
@@ -45025,18 +45025,18 @@ function Sz(r, t, e, a, s, n) {
45025
45025
  glyphType: d,
45026
45026
  glyphSymbol: c
45027
45027
  } = i, g = { ...s, ...u }, h = d3(g);
45028
- let p;
45029
- c ? p = c : p = Tz(l, t, e, a);
45030
- const f = (v = (m = a == null ? void 0 : a[t]) == null ? void 0 : m.startIndexItem) != null ? v : 1;
45028
+ let f;
45029
+ c ? f = c : f = Tz(l, t, e, a);
45030
+ const p = (v = (m = a == null ? void 0 : a[t]) == null ? void 0 : m.startIndexItem) != null ? v : 1;
45031
45031
  return {
45032
45032
  listId: r,
45033
- symbol: p,
45033
+ symbol: f,
45034
45034
  // symbol 列表的内容
45035
45035
  ts: g,
45036
45036
  // 文字样式
45037
45037
  fontStyle: h,
45038
45038
  //
45039
- startIndexItem: f + 1,
45039
+ startIndexItem: p + 1,
45040
45040
  // bBox,
45041
45041
  nestingLevel: i,
45042
45042
  bulletAlign: o,
@@ -45129,9 +45129,9 @@ function Oz(r, t, e, a, s, n, i) {
45129
45129
  lists: l,
45130
45130
  drawings: u = {},
45131
45131
  localeService: d
45132
- } = n, { endIndex: c, blocks: g = [], children: h } = s, { segmentId: p } = a, f = t.getParagraph(c) || { startIndex: 0 }, { paragraphStyle: m = {}, bullet: v } = f, { skeHeaders: y, skeFooters: z, skeListLevel: _, drawingAnchor: j } = o, w = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
45133
- let C = j == null ? void 0 : j.get(p);
45134
- C == null && (C = /* @__PURE__ */ new Map(), j == null || j.set(p, C));
45132
+ } = n, { endIndex: c, blocks: g = [], children: h } = s, { segmentId: f } = a, p = t.getParagraph(c) || { startIndex: 0 }, { paragraphStyle: m = {}, bullet: v } = p, { skeHeaders: y, skeFooters: z, skeListLevel: _, drawingAnchor: j } = o, w = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
45133
+ let C = j == null ? void 0 : j.get(f);
45134
+ C == null && (C = /* @__PURE__ */ new Map(), j == null || j.set(f, C));
45135
45135
  const S = {
45136
45136
  paragraphIndex: c,
45137
45137
  // TODO optimize this deepClone
@@ -45151,13 +45151,13 @@ function Oz(r, t, e, a, s, n, i) {
45151
45151
  skeFooters: z,
45152
45152
  pDrawingAnchor: C
45153
45153
  };
45154
- let F = r.paragraphConfigCache.get(p);
45155
- if (F == null && (F = /* @__PURE__ */ new Map(), r.paragraphConfigCache.set(p, F)), F.has(c)) {
45154
+ let F = r.paragraphConfigCache.get(f);
45155
+ if (F == null && (F = /* @__PURE__ */ new Map(), r.paragraphConfigCache.set(f, F)), F.has(c)) {
45156
45156
  const A = (B = F.get(c)) == null ? void 0 : B.bulletSkeleton;
45157
45157
  S.bulletSkeleton = A;
45158
45158
  } else {
45159
45159
  const A = Mz(v, _), L = Fz(v, l, A);
45160
- Rz(f, v, L, _), S.bulletSkeleton = L;
45160
+ Rz(p, v, L, _), S.bulletSkeleton = L;
45161
45161
  }
45162
45162
  for (let A = 0, L = g.length; A < L; A++) {
45163
45163
  const I = g[A], O = t.getCustomBlock(I);
@@ -45649,19 +45649,19 @@ r3.prototype.addBezier = function(r, t, e, a, s, n, i, o) {
45649
45649
  var l = [r, t], u = [e, a], d = [s, n], c = [i, o];
45650
45650
  this.addPoint(r, t), this.addPoint(i, o);
45651
45651
  for (var g = 0; g <= 1; g++) {
45652
- var h = 6 * l[g] - 12 * u[g] + 6 * d[g], p = -3 * l[g] + 9 * u[g] - 9 * d[g] + 3 * c[g], f = 3 * u[g] - 3 * l[g];
45653
- if (p === 0) {
45652
+ var h = 6 * l[g] - 12 * u[g] + 6 * d[g], f = -3 * l[g] + 9 * u[g] - 9 * d[g] + 3 * c[g], p = 3 * u[g] - 3 * l[g];
45653
+ if (f === 0) {
45654
45654
  if (h === 0)
45655
45655
  continue;
45656
- var m = -f / h;
45656
+ var m = -p / h;
45657
45657
  0 < m && m < 1 && (g === 0 && this.addX(B3(l[g], u[g], d[g], c[g], m)), g === 1 && this.addY(B3(l[g], u[g], d[g], c[g], m)));
45658
45658
  continue;
45659
45659
  }
45660
- var v = Math.pow(h, 2) - 4 * f * p;
45660
+ var v = Math.pow(h, 2) - 4 * p * f;
45661
45661
  if (!(v < 0)) {
45662
- var y = (-h + Math.sqrt(v)) / (2 * p);
45662
+ var y = (-h + Math.sqrt(v)) / (2 * f);
45663
45663
  0 < y && y < 1 && (g === 0 && this.addX(B3(l[g], u[g], d[g], c[g], y)), g === 1 && this.addY(B3(l[g], u[g], d[g], c[g], y)));
45664
- var z = (-h - Math.sqrt(v)) / (2 * p);
45664
+ var z = (-h - Math.sqrt(v)) / (2 * f);
45665
45665
  0 < z && z < 1 && (g === 0 && this.addX(B3(l[g], u[g], d[g], c[g], z)), g === 1 && this.addY(B3(l[g], u[g], d[g], c[g], z)));
45666
45666
  }
45667
45667
  }
@@ -46639,8 +46639,8 @@ function b_(r, t, e, a, s) {
46639
46639
  var n;
46640
46640
  r.segCount = n = t.parseUShort() >> 1, t.skip("uShort", 3), r.glyphIndexMap = {};
46641
46641
  for (var i = new Y.Parser(e, a + s + 14), o = new Y.Parser(e, a + s + 16 + n * 2), l = new Y.Parser(e, a + s + 16 + n * 4), u = new Y.Parser(e, a + s + 16 + n * 6), d = a + s + 16 + n * 8, c = 0; c < n - 1; c += 1)
46642
- for (var g = void 0, h = i.parseUShort(), p = o.parseUShort(), f = l.parseShort(), m = u.parseUShort(), v = p; v <= h; v += 1)
46643
- m !== 0 ? (d = u.offset + u.relativeOffset - 2, d += m, d += (v - p) * 2, g = Y.getUShort(e, d), g !== 0 && (g = g + f & 65535)) : g = v + f & 65535, r.glyphIndexMap[v] = g;
46642
+ for (var g = void 0, h = i.parseUShort(), f = o.parseUShort(), p = l.parseShort(), m = u.parseUShort(), v = f; v <= h; v += 1)
46643
+ m !== 0 ? (d = u.offset + u.relativeOffset - 2, d += m, d += (v - f) * 2, g = Y.getUShort(e, d), g !== 0 && (g = g + p & 65535)) : g = v + p & 65535, r.glyphIndexMap[v] = g;
46644
46644
  }
46645
46645
  function y_(r, t) {
46646
46646
  var e = {};
@@ -46722,23 +46722,23 @@ function D_(r) {
46722
46722
  });
46723
46723
  }
46724
46724
  __(n);
46725
- var l = n.segments.length, u = 0, d = [], c = [], g = [], h = [], p = [], f = [];
46725
+ var l = n.segments.length, u = 0, d = [], c = [], g = [], h = [], f = [], p = [];
46726
46726
  for (e = 0; e < l; e += 1) {
46727
46727
  var m = n.segments[e];
46728
- m.end <= 65535 && m.start <= 65535 ? (d = d.concat({ name: "end_" + e, type: "USHORT", value: m.end }), c = c.concat({ name: "start_" + e, type: "USHORT", value: m.start }), g = g.concat({ name: "idDelta_" + e, type: "SHORT", value: m.delta }), h = h.concat({ name: "idRangeOffset_" + e, type: "USHORT", value: m.offset }), m.glyphId !== void 0 && (p = p.concat({ name: "glyph_" + e, type: "USHORT", value: m.glyphId }))) : u += 1, !t && m.glyphIndex !== void 0 && (f = f.concat({ name: "cmap12Start_" + e, type: "ULONG", value: m.start }), f = f.concat({ name: "cmap12End_" + e, type: "ULONG", value: m.end }), f = f.concat({ name: "cmap12Glyph_" + e, type: "ULONG", value: m.glyphIndex }));
46728
+ m.end <= 65535 && m.start <= 65535 ? (d = d.concat({ name: "end_" + e, type: "USHORT", value: m.end }), c = c.concat({ name: "start_" + e, type: "USHORT", value: m.start }), g = g.concat({ name: "idDelta_" + e, type: "SHORT", value: m.delta }), h = h.concat({ name: "idRangeOffset_" + e, type: "USHORT", value: m.offset }), m.glyphId !== void 0 && (f = f.concat({ name: "glyph_" + e, type: "USHORT", value: m.glyphId }))) : u += 1, !t && m.glyphIndex !== void 0 && (p = p.concat({ name: "cmap12Start_" + e, type: "ULONG", value: m.start }), p = p.concat({ name: "cmap12End_" + e, type: "ULONG", value: m.end }), p = p.concat({ name: "cmap12Glyph_" + e, type: "ULONG", value: m.glyphIndex }));
46729
46729
  }
46730
- if (n.segCountX2 = (l - u) * 2, n.searchRange = Math.pow(2, Math.floor(Math.log(l - u) / Math.log(2))) * 2, n.entrySelector = Math.log(n.searchRange / 2) / Math.log(2), n.rangeShift = n.segCountX2 - n.searchRange, n.fields = n.fields.concat(d), n.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), n.fields = n.fields.concat(c), n.fields = n.fields.concat(g), n.fields = n.fields.concat(h), n.fields = n.fields.concat(p), n.cmap4Length = 14 + // Subtable header
46730
+ if (n.segCountX2 = (l - u) * 2, n.searchRange = Math.pow(2, Math.floor(Math.log(l - u) / Math.log(2))) * 2, n.entrySelector = Math.log(n.searchRange / 2) / Math.log(2), n.rangeShift = n.segCountX2 - n.searchRange, n.fields = n.fields.concat(d), n.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), n.fields = n.fields.concat(c), n.fields = n.fields.concat(g), n.fields = n.fields.concat(h), n.fields = n.fields.concat(f), n.cmap4Length = 14 + // Subtable header
46731
46731
  d.length * 2 + 2 + // reservedPad
46732
- c.length * 2 + g.length * 2 + h.length * 2 + p.length * 2, !t) {
46732
+ c.length * 2 + g.length * 2 + h.length * 2 + f.length * 2, !t) {
46733
46733
  var v = 16 + // Subtable header
46734
- f.length * 4;
46734
+ p.length * 4;
46735
46735
  n.cmap12Offset = 20 + n.cmap4Length, n.fields = n.fields.concat([
46736
46736
  { name: "cmap12Format", type: "USHORT", value: 12 },
46737
46737
  { name: "cmap12Reserved", type: "USHORT", value: 0 },
46738
46738
  { name: "cmap12Length", type: "ULONG", value: v },
46739
46739
  { name: "cmap12Language", type: "ULONG", value: 0 },
46740
- { name: "cmap12nGroups", type: "ULONG", value: f.length / 3 }
46741
- ]), n.fields = n.fields.concat(f);
46740
+ { name: "cmap12nGroups", type: "ULONG", value: p.length / 3 }
46741
+ ]), n.fields = n.fields.concat(p);
46742
46742
  }
46743
46743
  return n;
46744
46744
  }
@@ -48063,10 +48063,10 @@ p2.prototype.draw = function(r, t, e, a, s) {
48063
48063
  this.getPath(t, e, a, s).draw(r);
48064
48064
  };
48065
48065
  p2.prototype.drawPoints = function(r, t, e, a) {
48066
- function s(c, g, h, p) {
48066
+ function s(c, g, h, f) {
48067
48067
  r.beginPath();
48068
- for (var f = 0; f < c.length; f += 1)
48069
- r.moveTo(g + c[f].x * p, h + c[f].y * p), r.arc(g + c[f].x * p, h + c[f].y * p, 2, 0, Math.PI * 2, !1);
48068
+ for (var p = 0; p < c.length; p += 1)
48069
+ r.moveTo(g + c[p].x * f, h + c[p].y * f), r.arc(g + c[p].x * f, h + c[p].y * f, 2, 0, Math.PI * 2, !1);
48070
48070
  r.closePath(), r.fill();
48071
48071
  }
48072
48072
  t = t !== void 0 ? t : 0, e = e !== void 0 ? e : 0, a = a !== void 0 ? a : 24;
@@ -48139,7 +48139,7 @@ function A_(r, t, e, a) {
48139
48139
  }, s;
48140
48140
  };
48141
48141
  }
48142
- var A2 = { GlyphSet: l6, glyphLoader: T_, ttfGlyphLoader: B_, cffGlyphLoader: A_ };
48142
+ var M2 = { GlyphSet: l6, glyphLoader: T_, ttfGlyphLoader: B_, cffGlyphLoader: A_ };
48143
48143
  function Mt(r, t) {
48144
48144
  if (r === t)
48145
48145
  return !0;
@@ -48363,12 +48363,12 @@ function U_(r, t, e) {
48363
48363
  return new fe(s, e);
48364
48364
  }
48365
48365
  function p5(r, t, e) {
48366
- var a, s, n, i, o = new S1(), l = [], u = 0, d = !1, c = !1, g = 0, h = 0, p, f, m, v;
48366
+ var a, s, n, i, o = new S1(), l = [], u = 0, d = !1, c = !1, g = 0, h = 0, f, p, m, v;
48367
48367
  if (r.isCIDFont) {
48368
48368
  var y = r.tables.cff.topDict._fdSelect[t.index], z = r.tables.cff.topDict._fdArray[y];
48369
- p = z._subrs, f = z._subrsBias, m = z._defaultWidthX, v = z._nominalWidthX;
48369
+ f = z._subrs, p = z._subrsBias, m = z._defaultWidthX, v = z._nominalWidthX;
48370
48370
  } else
48371
- p = r.tables.cff.topDict._subrs, f = r.tables.cff.topDict._subrsBias, m = r.tables.cff.topDict._defaultWidthX, v = r.tables.cff.topDict._nominalWidthX;
48371
+ f = r.tables.cff.topDict._subrs, p = r.tables.cff.topDict._subrsBias, m = r.tables.cff.topDict._defaultWidthX, v = r.tables.cff.topDict._nominalWidthX;
48372
48372
  var _ = m;
48373
48373
  function j(C, S) {
48374
48374
  c && o.closePath(), o.moveTo(C, S), c = !0;
@@ -48407,7 +48407,7 @@ function p5(r, t, e) {
48407
48407
  a = g + l.shift(), s = h + l.shift(), n = a + l.shift(), i = s + l.shift(), g = n + l.shift(), h = i + l.shift(), o.curveTo(a, s, n, i, g, h);
48408
48408
  break;
48409
48409
  case 10:
48410
- B = l.pop() + f, A = p[B], A && x(A);
48410
+ B = l.pop() + p, A = f[B], A && x(A);
48411
48411
  break;
48412
48412
  case 11:
48413
48413
  return;
@@ -48528,27 +48528,27 @@ function q_(r, t, e, a) {
48528
48528
  if (c === 0 || g === 0)
48529
48529
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
48530
48530
  c += t;
48531
- var h = Y2(r, c), p = m5(r, t, h.objects, o.objects);
48532
- d._fdArray = p, g += t, d._fdSelect = H_(r, g, e.numGlyphs, p.length);
48531
+ var h = Y2(r, c), f = m5(r, t, h.objects, o.objects);
48532
+ d._fdArray = f, g += t, d._fdSelect = H_(r, g, e.numGlyphs, f.length);
48533
48533
  }
48534
- var f = t + d.private[1], m = Pt(r, f, d.private[0], o.objects);
48534
+ var p = t + d.private[1], m = Pt(r, p, d.private[0], o.objects);
48535
48535
  if (e.defaultWidthX = m.defaultWidthX, e.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
48536
- var v = f + m.subrs, y = Y2(r, v);
48536
+ var v = p + m.subrs, y = Y2(r, v);
48537
48537
  e.subrs = y.objects, e.subrsBias = x4(e.subrs);
48538
48538
  } else
48539
48539
  e.subrs = [], e.subrsBias = 0;
48540
48540
  var z;
48541
48541
  a.lowMemory ? (z = M_(r, t + d.charStrings), e.nGlyphs = z.offsets.length) : (z = Y2(r, t + d.charStrings), e.nGlyphs = z.objects.length);
48542
48542
  var _ = $_(r, t + d.charset, e.nGlyphs, o.objects);
48543
- if (d.encoding === 0 ? e.cffEncoding = new fe(j_, _) : d.encoding === 1 ? e.cffEncoding = new fe(w_, _) : e.cffEncoding = U_(r, t + d.encoding, _), e.encoding = e.encoding || e.cffEncoding, e.glyphs = new A2.GlyphSet(e), a.lowMemory)
48543
+ if (d.encoding === 0 ? e.cffEncoding = new fe(j_, _) : d.encoding === 1 ? e.cffEncoding = new fe(w_, _) : e.cffEncoding = U_(r, t + d.encoding, _), e.encoding = e.encoding || e.cffEncoding, e.glyphs = new M2.GlyphSet(e), a.lowMemory)
48544
48544
  e._push = function(x) {
48545
48545
  var C = R_(x, z.offsets, r, t + d.charStrings);
48546
- e.glyphs.push(x, A2.cffGlyphLoader(e, x, p5, C));
48546
+ e.glyphs.push(x, M2.cffGlyphLoader(e, x, p5, C));
48547
48547
  };
48548
48548
  else
48549
48549
  for (var j = 0; j < e.nGlyphs; j += 1) {
48550
48550
  var w = z.objects[j];
48551
- e.glyphs.push(j, A2.cffGlyphLoader(e, j, p5, w));
48551
+ e.glyphs.push(j, M2.cffGlyphLoader(e, j, p5, w));
48552
48552
  }
48553
48553
  }
48554
48554
  function Nt(r, t) {
@@ -48636,8 +48636,8 @@ function K_(r) {
48636
48636
  else if (l.type === "L")
48637
48637
  i = Math.round(l.x - a), o = Math.round(l.y - s), t.push({ name: "dx", type: "NUMBER", value: i }), t.push({ name: "dy", type: "NUMBER", value: o }), t.push({ name: "rlineto", type: "OP", value: 5 }), a = Math.round(l.x), s = Math.round(l.y);
48638
48638
  else if (l.type === "C") {
48639
- var c = Math.round(l.x1 - a), g = Math.round(l.y1 - s), h = Math.round(l.x2 - l.x1), p = Math.round(l.y2 - l.y1);
48640
- i = Math.round(l.x - l.x2), o = Math.round(l.y - l.y2), t.push({ name: "dx1", type: "NUMBER", value: c }), t.push({ name: "dy1", type: "NUMBER", value: g }), t.push({ name: "dx2", type: "NUMBER", value: h }), t.push({ name: "dy2", type: "NUMBER", value: p }), t.push({ name: "dx", type: "NUMBER", value: i }), t.push({ name: "dy", type: "NUMBER", value: o }), t.push({ name: "rrcurveto", type: "OP", value: 8 }), a = Math.round(l.x), s = Math.round(l.y);
48639
+ var c = Math.round(l.x1 - a), g = Math.round(l.y1 - s), h = Math.round(l.x2 - l.x1), f = Math.round(l.y2 - l.y1);
48640
+ i = Math.round(l.x - l.x2), o = Math.round(l.y - l.y2), t.push({ name: "dx1", type: "NUMBER", value: c }), t.push({ name: "dy1", type: "NUMBER", value: g }), t.push({ name: "dx2", type: "NUMBER", value: h }), t.push({ name: "dy2", type: "NUMBER", value: f }), t.push({ name: "dx", type: "NUMBER", value: i }), t.push({ name: "dy", type: "NUMBER", value: o }), t.push({ name: "rrcurveto", type: "OP", value: 8 }), a = Math.round(l.x), s = Math.round(l.y);
48641
48641
  }
48642
48642
  }
48643
48643
  return t.push({ name: "endchar", type: "OP", value: 14 }), t;
@@ -49538,10 +49538,10 @@ function Zt(r, t, e) {
49538
49538
  }
49539
49539
  function pD(r, t, e) {
49540
49540
  for (var a = {}, s = new Y.Parser(r, t), n = s.parseUShort(), i = s.parseUShort(), o = s.offset + s.parseUShort(), l = 0; l < i; l++) {
49541
- var u = s.parseUShort(), d = s.parseUShort(), c = s.parseUShort(), g = s.parseUShort(), h = Xt[g] || g, p = s.parseUShort(), f = s.parseUShort(), m = hD(u, c, e), v = Zt(u, d, c);
49541
+ var u = s.parseUShort(), d = s.parseUShort(), c = s.parseUShort(), g = s.parseUShort(), h = Xt[g] || g, f = s.parseUShort(), p = s.parseUShort(), m = hD(u, c, e), v = Zt(u, d, c);
49542
49542
  if (v !== void 0 && m !== void 0) {
49543
49543
  var y = void 0;
49544
- if (v === C4 ? y = U3.UTF16(r, o + f, p) : y = U3.MACSTRING(r, o + f, p, v), y) {
49544
+ if (v === C4 ? y = U3.UTF16(r, o + p, f) : y = U3.MACSTRING(r, o + p, f, v), y) {
49545
49545
  var z = a[h];
49546
49546
  z === void 0 && (z = a[h] = {}), z[m] = y;
49547
49547
  }
@@ -49597,9 +49597,9 @@ function vD(r, t) {
49597
49597
  for (var l = Je(Vt), u = Je(Kt), d = [], c = [], g = 0; g < a.length; g++) {
49598
49598
  e = a[g];
49599
49599
  var h = s[e];
49600
- for (var p in h) {
49601
- var f = h[p], m = 1, v = l[p], y = cD[v], z = Zt(m, y, v), _ = q.MACSTRING(f, z);
49602
- _ === void 0 && (m = 0, v = t.indexOf(p), v < 0 && (v = t.length, t.push(p)), y = 4, _ = q.UTF16(f));
49600
+ for (var f in h) {
49601
+ var p = h[f], m = 1, v = l[f], y = cD[v], z = Zt(m, y, v), _ = q.MACSTRING(p, z);
49602
+ _ === void 0 && (m = 0, v = t.indexOf(f), v < 0 && (v = t.length, t.push(f)), y = 4, _ = q.UTF16(p));
49603
49603
  var j = y5(_, c);
49604
49604
  d.push(b5(
49605
49605
  m,
@@ -49609,9 +49609,9 @@ function vD(r, t) {
49609
49609
  _.length,
49610
49610
  j
49611
49611
  ));
49612
- var w = u[p];
49612
+ var w = u[f];
49613
49613
  if (w !== void 0) {
49614
- var x = q.UTF16(f), C = y5(x, c);
49614
+ var x = q.UTF16(p), C = y5(x, c);
49615
49615
  d.push(b5(
49616
49616
  3,
49617
49617
  1,
@@ -50314,10 +50314,10 @@ function ED(r) {
50314
50314
  return t / r.length;
50315
50315
  }
50316
50316
  function FD(r) {
50317
- for (var t = [], e = [], a = [], s = [], n = [], i = [], o = [], l, u = 0, d = 0, c = 0, g = 0, h = 0, p = 0; p < r.glyphs.length; p += 1) {
50318
- var f = r.glyphs.get(p), m = f.unicode | 0;
50319
- if (isNaN(f.advanceWidth))
50320
- throw new Error("Glyph " + f.name + " (" + p + "): advanceWidth is not a number.");
50317
+ for (var t = [], e = [], a = [], s = [], n = [], i = [], o = [], l, u = 0, d = 0, c = 0, g = 0, h = 0, f = 0; f < r.glyphs.length; f += 1) {
50318
+ var p = r.glyphs.get(f), m = p.unicode | 0;
50319
+ if (isNaN(p.advanceWidth))
50320
+ throw new Error("Glyph " + p.name + " (" + f + "): advanceWidth is not a number.");
50321
50321
  (l > m || l === void 0) && m > 0 && (l = m), u < m && (u = m);
50322
50322
  var v = F4.getUnicodeRange(m);
50323
50323
  if (v < 32)
@@ -50330,9 +50330,9 @@ function FD(r) {
50330
50330
  h |= 1 << v - 96;
50331
50331
  else
50332
50332
  throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
50333
- if (f.name !== ".notdef") {
50334
- var y = f.getMetrics();
50335
- t.push(y.xMin), e.push(y.yMin), a.push(y.xMax), s.push(y.yMax), i.push(y.leftSideBearing), o.push(y.rightSideBearing), n.push(f.advanceWidth);
50333
+ if (p.name !== ".notdef") {
50334
+ var y = p.getMetrics();
50335
+ t.push(y.xMin), e.push(y.yMin), a.push(y.xMax), s.push(y.yMax), i.push(y.leftSideBearing), o.push(y.rightSideBearing), n.push(p.advanceWidth);
50336
50336
  }
50337
50337
  }
50338
50338
  var z = {
@@ -50771,11 +50771,11 @@ a2.prototype.getLigatures = function(r, t, e) {
50771
50771
  for (var a = [], s = this.getLookupTables(t, e, r, 4), n = 0; n < s.length; n++)
50772
50772
  for (var i = s[n].subtables, o = 0; o < i.length; o++)
50773
50773
  for (var l = i[o], u = this.expandCoverage(l.coverage), d = l.ligatureSets, c = 0; c < u.length; c++)
50774
- for (var g = u[c], h = d[c], p = 0; p < h.length; p++) {
50775
- var f = h[p];
50774
+ for (var g = u[c], h = d[c], f = 0; f < h.length; f++) {
50775
+ var p = h[f];
50776
50776
  a.push({
50777
- sub: [g].concat(f.components),
50778
- by: f.ligGlyph
50777
+ sub: [g].concat(p.components),
50778
+ by: p.ligGlyph
50779
50779
  });
50780
50780
  }
50781
50781
  return a;
@@ -50899,14 +50899,14 @@ function r8(r, t, e) {
50899
50899
  for (var c = a.parseByte(), g = 0; g < c; g += 1)
50900
50900
  s.push(n), d += 1;
50901
50901
  if (r1.argument(s.length === u, "Bad flags."), i.length > 0) {
50902
- var h = [], p;
50902
+ var h = [], f;
50903
50903
  if (u > 0) {
50904
- for (var f = 0; f < u; f += 1)
50905
- n = s[f], p = {}, p.onCurve = !!(n & 1), p.lastPointOfContour = i.indexOf(f) >= 0, h.push(p);
50904
+ for (var p = 0; p < u; p += 1)
50905
+ n = s[p], f = {}, f.onCurve = !!(n & 1), f.lastPointOfContour = i.indexOf(p) >= 0, h.push(f);
50906
50906
  for (var m = 0, v = 0; v < u; v += 1)
50907
- n = s[v], p = h[v], p.x = x5(a, n, m, 2, 16), m = p.x;
50907
+ n = s[v], f = h[v], f.x = x5(a, n, m, 2, 16), m = f.x;
50908
50908
  for (var y = 0, z = 0; z < u; z += 1)
50909
- n = s[z], p = h[z], p.y = x5(a, n, y, 4, 32), y = p.y;
50909
+ n = s[z], f = h[z], f.y = x5(a, n, y, 4, 32), y = f.y;
50910
50910
  }
50911
50911
  r.points = h;
50912
50912
  } else
@@ -51006,17 +51006,17 @@ function n8(r, t) {
51006
51006
  return s8(t.points);
51007
51007
  }
51008
51008
  function RD(r, t, e, a) {
51009
- for (var s = new A2.GlyphSet(a), n = 0; n < e.length - 1; n += 1) {
51009
+ for (var s = new M2.GlyphSet(a), n = 0; n < e.length - 1; n += 1) {
51010
51010
  var i = e[n], o = e[n + 1];
51011
- i !== o ? s.push(n, A2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, A2.glyphLoader(a, n));
51011
+ i !== o ? s.push(n, M2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, M2.glyphLoader(a, n));
51012
51012
  }
51013
51013
  return s;
51014
51014
  }
51015
51015
  function OD(r, t, e, a) {
51016
- var s = new A2.GlyphSet(a);
51016
+ var s = new M2.GlyphSet(a);
51017
51017
  return a._push = function(n) {
51018
51018
  var i = e[n], o = e[n + 1];
51019
- i !== o ? s.push(n, A2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, A2.glyphLoader(a, n));
51019
+ i !== o ? s.push(n, M2.ttfGlyphLoader(a, n, r8, r, t + i, n8)) : s.push(n, M2.glyphLoader(a, n));
51020
51020
  }, s;
51021
51021
  }
51022
51022
  function ID(r, t, e, a, s) {
@@ -51049,7 +51049,7 @@ function UD(r) {
51049
51049
  var g8 = function(r) {
51050
51050
  var t = this.srPeriod, e = this.srPhase, a = this.srThreshold, s = 1;
51051
51051
  return r < 0 && (r = -r, s = -1), r += a - e, r = Math.trunc(r / t) * t, r += e, r < 0 ? e * s : r * s;
51052
- }, B2 = {
51052
+ }, A2 = {
51053
51053
  x: 1,
51054
51054
  y: 0,
51055
51055
  axis: "x",
@@ -51074,10 +51074,10 @@ var g8 = function(r) {
51074
51074
  return;
51075
51075
  }
51076
51076
  if (s = a.distance(r, t, !0, !0), n = a.distance(r, e, !0, !0), l = a.distance(t, t, !1, !0), u = a.distance(e, e, !1, !0), i = Math.abs(s), o = Math.abs(n), d = i + o, d === 0) {
51077
- B2.setRelative(r, r, (l + u) / 2, a, !0);
51077
+ A2.setRelative(r, r, (l + u) / 2, a, !0);
51078
51078
  return;
51079
51079
  }
51080
- B2.setRelative(r, r, (l * o + u * i) / d, a, !0);
51080
+ A2.setRelative(r, r, (l * o + u * i) / d, a, !0);
51081
51081
  },
51082
51082
  // Slope of line normal to this
51083
51083
  normalSlope: Number.NEGATIVE_INFINITY,
@@ -51178,13 +51178,13 @@ var g8 = function(r) {
51178
51178
  r.yTouched = !1;
51179
51179
  }
51180
51180
  };
51181
- Object.freeze(B2);
51181
+ Object.freeze(A2);
51182
51182
  Object.freeze($2);
51183
51183
  function j0(r, t) {
51184
51184
  this.x = r, this.y = t, this.axis = void 0, this.slope = t / r, this.normalSlope = -r / t, Object.freeze(this);
51185
51185
  }
51186
51186
  j0.prototype.distance = function(r, t, e, a) {
51187
- return this.x * B2.distance(r, t, e, a) + this.y * $2.distance(r, t, e, a);
51187
+ return this.x * A2.distance(r, t, e, a) + this.y * $2.distance(r, t, e, a);
51188
51188
  };
51189
51189
  j0.prototype.interpolate = function(r, t, e, a) {
51190
51190
  var s, n, i, o, l, u, d;
@@ -51204,7 +51204,7 @@ j0.prototype.touch = function(r) {
51204
51204
  };
51205
51205
  function w0(r, t) {
51206
51206
  var e = Math.sqrt(r * r + t * t);
51207
- return r /= e, t /= e, r === 1 && t === 0 ? B2 : r === 0 && t === 1 ? $2 : new j0(r, t);
51207
+ return r /= e, t /= e, r === 1 && t === 0 ? A2 : r === 0 && t === 1 ? $2 : new j0(r, t);
51208
51208
  }
51209
51209
  function U2(r, t, e, a) {
51210
51210
  this.x = this.xo = Math.round(r * 64) / 64, this.y = this.yo = Math.round(t * 64) / 64, this.lastPointOfContour = e, this.onCurve = a, this.prevPointOnContour = void 0, this.nextPointOnContour = void 0, this.xTouched = !1, this.yTouched = !1, Object.preventExtensions(this);
@@ -51236,7 +51236,7 @@ function Z2(r, t) {
51236
51236
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
51237
51237
  /* fall through */
51238
51238
  case "prep":
51239
- this.fv = this.pv = this.dpv = B2, this.round = d8;
51239
+ this.fv = this.pv = this.dpv = A2, this.round = d8;
51240
51240
  }
51241
51241
  }
51242
51242
  u8.prototype.exec = function(r, t) {
@@ -51288,14 +51288,14 @@ l8 = function(r, t) {
51288
51288
  for (var u = 0; u < s.length; u++) {
51289
51289
  var d = s[u], c = l.glyphs.get(d.glyphIndex);
51290
51290
  o = new Z2("glyf", c.instructions), exports.DEBUG && (console.log("---EXEC COMP " + u + "---"), o.step = -1), S4(c, o, e, a);
51291
- for (var g = Math.round(d.dx * e), h = Math.round(d.dy * a), p = o.gZone, f = o.contours, m = 0; m < p.length; m++) {
51292
- var v = p[m];
51291
+ for (var g = Math.round(d.dx * e), h = Math.round(d.dy * a), f = o.gZone, p = o.contours, m = 0; m < f.length; m++) {
51292
+ var v = f[m];
51293
51293
  v.xTouched = v.yTouched = !1, v.xo = v.x = v.x + g, v.yo = v.y = v.y + h;
51294
51294
  }
51295
51295
  var y = i.length;
51296
- i.push.apply(i, p);
51297
- for (var z = 0; z < f.length; z++)
51298
- n.push(f[z] + y);
51296
+ i.push.apply(i, f);
51297
+ for (var z = 0; z < p.length; z++)
51298
+ n.push(p[z] + y);
51299
51299
  }
51300
51300
  r.instructions && !o.inhibitGridFit && (o = new Z2("glyf", r.instructions), o.gZone = o.z0 = o.z1 = o.z2 = i, o.contours = n, i.push(
51301
51301
  new U2(0, 0),
@@ -51325,8 +51325,8 @@ S4 = function(r, t, e, a) {
51325
51325
  new U2(Math.round(r.advanceWidth * e), 0)
51326
51326
  ), D3(t), i.length -= 2, exports.DEBUG) {
51327
51327
  console.log("FINISHED GLYPH", t.stack);
51328
- for (var p = 0; p < n; p++)
51329
- console.log(p, i[p].x, i[p].y);
51328
+ for (var f = 0; f < n; f++)
51329
+ console.log(f, i[f].x, i[f].y);
51330
51330
  }
51331
51331
  }
51332
51332
  };
@@ -51410,8 +51410,8 @@ function XD(r) {
51410
51410
  function VD(r) {
51411
51411
  var t = r.stack, e = t.pop(), a = t.pop(), s = t.pop(), n = t.pop(), i = t.pop(), o = r.z0, l = r.z1, u = o[e], d = o[a], c = l[s], g = l[n], h = r.z2[i];
51412
51412
  exports.DEBUG && console.log("ISECT[], ", e, a, s, n, i);
51413
- var p = u.x, f = u.y, m = d.x, v = d.y, y = c.x, z = c.y, _ = g.x, j = g.y, w = (p - m) * (z - j) - (f - v) * (y - _), x = p * v - f * m, C = y * j - z * _;
51414
- h.x = (x * (y - _) - C * (p - m)) / w, h.y = (x * (z - j) - C * (f - v)) / w;
51413
+ var f = u.x, p = u.y, m = d.x, v = d.y, y = c.x, z = c.y, _ = g.x, j = g.y, w = (f - m) * (z - j) - (p - v) * (y - _), x = f * v - p * m, C = y * j - z * _;
51414
+ h.x = (x * (y - _) - C * (f - m)) / w, h.y = (x * (z - j) - C * (p - v)) / w;
51415
51415
  }
51416
51416
  function KD(r) {
51417
51417
  r.rp0 = r.stack.pop(), exports.DEBUG && console.log(r.step, "SRP0[]", r.rp0);
@@ -51764,10 +51764,10 @@ function a4(r, t) {
51764
51764
  for (var d = 0; d < a; d++) {
51765
51765
  var c = e.pop(), g = e.pop(), h = o + ((g & 240) >> 4);
51766
51766
  if (h === i) {
51767
- var p = (g & 15) - 8;
51768
- p >= 0 && p++, exports.DEBUG && console.log(t.step, "DELTAPFIX", c, "by", p * l);
51769
- var f = u[c];
51770
- s.setRelative(f, f, p * l, n);
51767
+ var f = (g & 15) - 8;
51768
+ f >= 0 && f++, exports.DEBUG && console.log(t.step, "DELTAPFIX", c, "by", f * l);
51769
+ var p = u[c];
51770
+ s.setRelative(p, p, f * l, n);
51771
51771
  }
51772
51772
  }
51773
51773
  }
@@ -51971,14 +51971,14 @@ function G2(r, t) {
51971
51971
  t.ip = e;
51972
51972
  }
51973
51973
  function W(r, t, e, a, s, n) {
51974
- var i = n.stack, o = r && i.pop(), l = i.pop(), u = n.rp0, d = n.z0[u], c = n.z1[l], g = n.minDis, h = n.fv, p = n.dpv, f, m, v, y;
51975
- m = f = p.distance(c, d, !0, !0), v = m >= 0 ? 1 : -1, m = Math.abs(m), r && (y = n.cvt[o], a && Math.abs(m - y) < n.cvCutIn && (m = y)), e && m < g && (m = g), a && (m = n.round(m)), h.setRelative(c, d, v * m, p), h.touch(c), exports.DEBUG && console.log(
51974
+ var i = n.stack, o = r && i.pop(), l = i.pop(), u = n.rp0, d = n.z0[u], c = n.z1[l], g = n.minDis, h = n.fv, f = n.dpv, p, m, v, y;
51975
+ m = p = f.distance(c, d, !0, !0), v = m >= 0 ? 1 : -1, m = Math.abs(m), r && (y = n.cvt[o], a && Math.abs(m - y) < n.cvCutIn && (m = y)), e && m < g && (m = g), a && (m = n.round(m)), h.setRelative(c, d, v * m, f), h.touch(c), exports.DEBUG && console.log(
51976
51976
  n.step,
51977
51977
  (r ? "MIRP[" : "MDRP[") + (t ? "M" : "m") + (e ? ">" : "_") + (a ? "R" : "_") + (s === 0 ? "Gr" : s === 1 ? "Bl" : s === 2 ? "Wh" : "") + "]",
51978
51978
  r ? o + "(" + n.cvt[o] + "," + y + ")" : "",
51979
51979
  l,
51980
51980
  "(d =",
51981
- f,
51981
+ p,
51982
51982
  "->",
51983
51983
  v * m,
51984
51984
  ")"
@@ -51988,15 +51988,15 @@ o8 = [
51988
51988
  /* 0x00 */
51989
51989
  C5.bind(void 0, $2),
51990
51990
  /* 0x01 */
51991
- C5.bind(void 0, B2),
51991
+ C5.bind(void 0, A2),
51992
51992
  /* 0x02 */
51993
51993
  E5.bind(void 0, $2),
51994
51994
  /* 0x03 */
51995
- E5.bind(void 0, B2),
51995
+ E5.bind(void 0, A2),
51996
51996
  /* 0x04 */
51997
51997
  F5.bind(void 0, $2),
51998
51998
  /* 0x05 */
51999
- F5.bind(void 0, B2),
51999
+ F5.bind(void 0, A2),
52000
52000
  /* 0x06 */
52001
52001
  S5.bind(void 0, 0),
52002
52002
  /* 0x07 */
@@ -52089,7 +52089,7 @@ o8 = [
52089
52089
  /* 0x30 */
52090
52090
  A5.bind(void 0, $2),
52091
52091
  /* 0x31 */
52092
- A5.bind(void 0, B2),
52092
+ A5.bind(void 0, A2),
52093
52093
  /* 0x32 */
52094
52094
  M5.bind(void 0, 0),
52095
52095
  /* 0x33 */
@@ -52859,7 +52859,7 @@ function vw(r, t) {
52859
52859
  ), c = a.length === t.inputCoverage.length && o.length === t.lookaheadCoverage.length && d.length === t.backtrackCoverage.length, g = [];
52860
52860
  if (c)
52861
52861
  for (var h = 0; h < t.lookupRecords.length; h++)
52862
- for (var p = t.lookupRecords[h], f = p.lookupListIndex, m = this.getLookupByIndex(f), v = 0; v < m.subtables.length; v++) {
52862
+ for (var f = t.lookupRecords[h], p = f.lookupListIndex, m = this.getLookupByIndex(p), v = 0; v < m.subtables.length; v++) {
52863
52863
  var y = m.subtables[v], z = this.getLookupMethod(m, y), _ = this.getSubstitutionType(m, y);
52864
52864
  if (_ === "12")
52865
52865
  for (var j = 0; j < a.length; j++) {
@@ -53427,7 +53427,7 @@ function v1(r) {
53427
53427
  usWidthClass: r.widthClass || this.usWidthClasses.MEDIUM,
53428
53428
  fsSelection: r.fsSelection || this.fsSelectionValues.REGULAR
53429
53429
  }, r.tables.os2)
53430
- })), this.supported = !0, this.glyphs = new A2.GlyphSet(this, r.glyphs || []), this.encoding = new Bt(this), this.position = new D0(this), this.substitution = new a2(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
53430
+ })), this.supported = !0, this.glyphs = new M2.GlyphSet(this, r.glyphs || []), this.encoding = new Bt(this), this.position = new D0(this), this.substitution = new a2(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
53431
53431
  get: function() {
53432
53432
  if (this._hinting)
53433
53433
  return this._hinting;
@@ -53700,8 +53700,8 @@ function Vw(r, t, e) {
53700
53700
  a.skip("uShort", 1);
53701
53701
  for (var i = a.parseUShort(), o = a.parseUShort(), l = a.parseUShort(), u = a.parseUShort(), d = [], c = 0; c < i; c++)
53702
53702
  d.push(Gw(r, t + n + c * o, e));
53703
- for (var g = [], h = t + n + i * o, p = 0; p < l; p++)
53704
- g.push(Yw(r, h + p * u, d, e));
53703
+ for (var g = [], h = t + n + i * o, f = 0; f < l; f++)
53704
+ g.push(Yw(r, h + f * u, d, e));
53705
53705
  return { axes: d, instances: g };
53706
53706
  }
53707
53707
  var Kw = { make: Xw, parse: Vw }, Zw = function() {
@@ -53944,7 +53944,7 @@ function mx(r, t) {
53944
53944
  i = Y.getUShort(n, 12), o = kx(n, i);
53945
53945
  } else
53946
53946
  throw new Error("Unsupported OpenType signature " + l);
53947
- for (var d, c, g, h, p, f, m, v, y, z, _, j, w = 0; w < i; w += 1) {
53947
+ for (var d, c, g, h, f, p, m, v, y, z, _, j, w = 0; w < i; w += 1) {
53948
53948
  var x = o[w], C = void 0;
53949
53949
  switch (x.tag) {
53950
53950
  case "cmap":
@@ -54002,10 +54002,10 @@ function mx(r, t) {
54002
54002
  h = x;
54003
54003
  break;
54004
54004
  case "GPOS":
54005
- p = x;
54005
+ f = x;
54006
54006
  break;
54007
54007
  case "GSUB":
54008
- f = x;
54008
+ p = x;
54009
54009
  break;
54010
54010
  case "meta":
54011
54011
  _ = x;
@@ -54031,12 +54031,12 @@ function mx(r, t) {
54031
54031
  var O = w1(n, h);
54032
54032
  s.tables.gdef = rx.parse(O.data, O.offset);
54033
54033
  }
54034
- if (p) {
54035
- var P = w1(n, p);
54034
+ if (f) {
54035
+ var P = w1(n, f);
54036
54036
  s.tables.gpos = ox.parse(P.data, P.offset), s.position.init();
54037
54037
  }
54038
- if (f) {
54039
- var N = w1(n, f);
54038
+ if (p) {
54039
+ var N = w1(n, p);
54040
54040
  s.tables.gsub = e8.parse(N.data, N.offset);
54041
54041
  }
54042
54042
  if (c) {
@@ -54095,7 +54095,7 @@ function fx(r) {
54095
54095
  }
54096
54096
  const W5 = /* @__PURE__ */ new Map(), i4 = /* @__PURE__ */ new Map();
54097
54097
  function T4(r, t, e, a, s) {
54098
- var f, m, v, y;
54098
+ var p, m, v, y;
54099
54099
  let n = 0, i = a[n];
54100
54100
  for (; e.has(i); )
54101
54101
  n++, i = a[n];
@@ -54112,42 +54112,42 @@ function T4(r, t, e, a, s) {
54112
54112
  e.add(i);
54113
54113
  const { font: o, buffer: l } = ge.findBestMatchFontByStyle({
54114
54114
  ff: i,
54115
- bl: (f = s.bl) != null ? f : t1.FALSE,
54115
+ bl: (p = s.bl) != null ? p : t1.FALSE,
54116
54116
  it: (m = s.it) != null ? m : t1.FALSE
54117
54117
  });
54118
54118
  let u = W5.get(o.fullName);
54119
54119
  u || (u = mx(l), W5.set(o.fullName, u));
54120
54120
  const d = [], c = u.stringToGlyphs(r), g = (v = r.match(/[\s\S]/gu)) != null ? v : [];
54121
- let h = 0, p = 0;
54121
+ let h = 0, f = 0;
54122
54122
  for (; h < c.length; ) {
54123
54123
  const z = c[h];
54124
54124
  if (z.index !== 0)
54125
54125
  d.push({
54126
54126
  char: g[h],
54127
- start: p + t,
54128
- end: p + t + g[h].length,
54127
+ start: f + t,
54128
+ end: f + t + g[h].length,
54129
54129
  glyph: z,
54130
54130
  font: u,
54131
54131
  kerning: 0,
54132
54132
  boundingBox: z.getBoundingBox()
54133
54133
  });
54134
54134
  else {
54135
- const _ = p, w = r.substring(_).match(c4);
54135
+ const _ = f, w = r.substring(_).match(c4);
54136
54136
  if (w) {
54137
54137
  let x = 0;
54138
54138
  do
54139
- x += g[h].length, p += g[h].length, h++;
54139
+ x += g[h].length, f += g[h].length, h++;
54140
54140
  while (x < w[0].length);
54141
54141
  d.push(...T4(r.slice(_, _ + w[0].length), t + _, e, a, s));
54142
54142
  continue;
54143
54143
  } else {
54144
54144
  let x = c[h + 1], C = g[h + 1];
54145
54145
  for (; (x == null ? void 0 : x.index) === 0 && !c4.test(C); )
54146
- p += g[h].length, h++, x = c[h + 1], C = g[h + 1];
54147
- d.push(...T4(r.slice(_, p + g[h].length), t + _, e, a, s));
54146
+ f += g[h].length, h++, x = c[h + 1], C = g[h + 1];
54147
+ d.push(...T4(r.slice(_, f + g[h].length), t + _, e, a, s));
54148
54148
  }
54149
54149
  }
54150
- p += (y = g[h]) == null ? void 0 : y.length, h++;
54150
+ f += (y = g[h]) == null ? void 0 : y.length, h++;
54151
54151
  }
54152
54152
  return e.delete(i), d;
54153
54153
  }
@@ -54189,7 +54189,7 @@ function yx(r, t, e, a, s, n) {
54189
54189
  const d = (u = l.match(/^[\s\S]/gu)) == null ? void 0 : u[0];
54190
54190
  if (d == null || Mv(d) || h4(t.substring(o)))
54191
54191
  break;
54192
- const c = f3(r + o, e, a, s, n), g = L2(d, c);
54192
+ const c = f3(r + o, e, a, s, n), g = P2(d, c);
54193
54193
  i.push(g), l = l.substring(d.length), o += d.length;
54194
54194
  }
54195
54195
  return {
@@ -54209,14 +54209,14 @@ function zx(r, t, e, a, s, n) {
54209
54209
  }
54210
54210
  return {
54211
54211
  step: l,
54212
- glyphGroup: [L2(o.join(""), i)]
54212
+ glyphGroup: [P2(o.join(""), i)]
54213
54213
  };
54214
54214
  }
54215
54215
  function _x(r, t, e, a, s, n) {
54216
54216
  const i = f3(r, e, a, s, n), o = t.match(c4);
54217
54217
  return {
54218
54218
  step: o[0].length,
54219
- glyphGroup: [L2(o[0], i)]
54219
+ glyphGroup: [P2(o[0], i)]
54220
54220
  };
54221
54221
  }
54222
54222
  function Dx(r, t, e, a, s, n) {
@@ -54266,12 +54266,12 @@ function Cx(r, t, e, a, s, n = !1) {
54266
54266
  drawings: u = {}
54267
54267
  } = s, d = [];
54268
54268
  let c = new J7(t);
54269
- const { endIndex: g } = a, h = e.getParagraph(g) || {}, { paragraphStyle: p = {} } = h, { snapToGrid: f = t1.TRUE } = p;
54269
+ const { endIndex: g } = a, h = e.getParagraph(g) || {}, { paragraphStyle: f = {} } = h, { snapToGrid: p = t1.TRUE } = f;
54270
54270
  let m = 0, v, y = 0;
54271
54271
  const { hyphen: z, languageDetector: _ } = r, j = px(e.getBody(), g);
54272
54272
  let w = [];
54273
54273
  n && (w = bx(j)), Yz(c), Gz(c), c = new qz(c);
54274
- const x = _.detect(t), C = xx(p, s), S = s.doNotHyphenateCaps === t1.TRUE;
54274
+ const x = _.detect(t), C = xx(f, s), S = s.doNotHyphenateCaps === t1.TRUE;
54275
54275
  for (x !== l1.UNKNOWN && C && (z.hasPattern(x) ? c = new Lz(c, z, x, S) : z.loadPattern(x)); v = c.nextBreakPoint(); ) {
54276
54276
  const R = t.slice(m, v.position), B = [];
54277
54277
  if (ge.isReady && n) {
@@ -54287,13 +54287,13 @@ function Cx(r, t, e, a, s, n = !1) {
54287
54287
  for (const P of I) {
54288
54288
  const { start: N, char: $ } = P, H = f3(N, e, a, s, h);
54289
54289
  if ($ === J.TAB) {
54290
- const X = le(o, l, i, f), Q = G6(H, X);
54290
+ const X = le(o, l, i, p), Q = G6(H, X);
54291
54291
  B.push(Q);
54292
54292
  } else if (h4($)) {
54293
- const X = L2($, H);
54293
+ const X = P2($, H);
54294
54294
  B.push(X);
54295
54295
  } else {
54296
- const X = L2($, H, void 0, P);
54296
+ const X = P2($, H, void 0, P);
54297
54297
  B.push(X);
54298
54298
  }
54299
54299
  }
@@ -54315,14 +54315,14 @@ function Cx(r, t, e, a, s, n = !1) {
54315
54315
  } else
54316
54316
  $ = W6(N, 0, 0, Q.drawingId);
54317
54317
  }
54318
- $ == null && ($ = L2(P, N)), B.push($), O += P.length, I = I.substring(P.length);
54318
+ $ == null && ($ = P2(P, N)), B.push($), O += P.length, I = I.substring(P.length);
54319
54319
  } else if (/\s/.test(P) || Ce(P)) {
54320
54320
  const N = f3(O, e, a, s, h);
54321
54321
  let $ = null;
54322
54322
  if (P === J.TAB) {
54323
- const H = le(o, l, i, f);
54323
+ const H = le(o, l, i, p);
54324
54324
  $ = G6(N, H);
54325
- } else P === J.PARAGRAPH && ((T = s.renderConfig) == null ? void 0 : T.zeroWidthParagraphBreak) === t1.TRUE ? $ = L2(P, N, 0) : $ = L2(P, N);
54325
+ } else P === J.PARAGRAPH && ((T = s.renderConfig) == null ? void 0 : T.zeroWidthParagraphBreak) === t1.TRUE ? $ = P2(P, N, 0) : $ = P2(P, N);
54326
54326
  B.push($), O += P.length, I = I.substring(P.length);
54327
54327
  } else if (h4(I)) {
54328
54328
  const { step: N, glyphGroup: $ } = _x(
@@ -54591,14 +54591,14 @@ const _e = class _e {
54591
54591
  if (!this._patterns.has(e))
54592
54592
  throw new Error(`Language pattern not found for ${e}, please load pattern before hyphenating`);
54593
54593
  const { levelsTable: s, pattern: n } = this._patterns.get(e), i = new Array(t.length + 1).fill(0), o = `.${t.toLocaleLowerCase()}.`.split(""), [l, u] = Mx(o);
54594
- let d, c, g, h, p, f, m = -1, v, y, z;
54594
+ let d, c, g, h, f, p, m = -1, v, y, z;
54595
54595
  for (; (d = l()).length > 0; )
54596
54596
  for (m++, u() && m--, g = n, v = Rx(d), y = v[0], z = v[1]; (c = y()) && g[c] !== void 0; )
54597
- if (h = g[c], g = h[0], p = h[1], g === void 0 && (g = {}, p = h), !z() && p !== void 0) {
54598
- f = s[p];
54599
- for (let w = 0; w < f.length; w++)
54597
+ if (h = g[c], g = h[0], f = h[1], g === void 0 && (g = {}, f = h), !z() && f !== void 0) {
54598
+ p = s[f];
54599
+ for (let w = 0; w < p.length; w++)
54600
54600
  i[m + w] = Math.max(
54601
- +f[w],
54601
+ +p[w],
54602
54602
  i[m + w]
54603
54603
  );
54604
54604
  }
@@ -55098,7 +55098,7 @@ class v3 extends Y8 {
55098
55098
  const s = e.parent, n = s == null ? void 0 : s.parent, i = n == null ? void 0 : n.parent, o = i == null ? void 0 : i.parent, l = o == null ? void 0 : o.parent, u = this.getSkeletonData();
55099
55099
  if (!s || !i || !o || !l || !u)
55100
55100
  return;
55101
- const d = l.type, c = s.glyphGroup.indexOf(e), g = n.divides.indexOf(s), h = i.lines.indexOf(n), p = o.columns.indexOf(i), f = l.sections.indexOf(o);
55101
+ const d = l.type, c = s.glyphGroup.indexOf(e), g = n.divides.indexOf(s), h = i.lines.indexOf(n), f = o.columns.indexOf(i), p = l.sections.indexOf(o);
55102
55102
  let m = -1;
55103
55103
  const v = X5(l);
55104
55104
  switch (d) {
@@ -55122,8 +55122,8 @@ class v3 extends Y8 {
55122
55122
  glyph: c,
55123
55123
  divide: g,
55124
55124
  line: h,
55125
- column: p,
55126
- section: f,
55125
+ column: f,
55126
+ section: p,
55127
55127
  page: m,
55128
55128
  segmentPage: a,
55129
55129
  pageType: d,
@@ -55150,7 +55150,7 @@ class v3 extends Y8 {
55150
55150
  const o = this.getSkeletonData();
55151
55151
  if (!o)
55152
55152
  return;
55153
- const l = o.pages, { glyph: u, divide: d, line: c, column: g, section: h, page: p, segmentPageIndex: f, pageType: m } = i, v = X5(p);
55153
+ const l = o.pages, { glyph: u, divide: d, line: c, column: g, section: h, page: f, segmentPageIndex: p, pageType: m } = i, v = X5(f);
55154
55154
  let y = -1;
55155
55155
  switch (m) {
55156
55156
  case c1.HEADER:
@@ -55159,7 +55159,7 @@ class v3 extends Y8 {
55159
55159
  break;
55160
55160
  }
55161
55161
  case c1.BODY: {
55162
- y = l.indexOf(p);
55162
+ y = l.indexOf(f);
55163
55163
  break;
55164
55164
  }
55165
55165
  case c1.CELL: {
@@ -55174,10 +55174,10 @@ class v3 extends Y8 {
55174
55174
  divide: c.divides.indexOf(d),
55175
55175
  line: g.lines.indexOf(c),
55176
55176
  column: h.columns.indexOf(g),
55177
- section: p.sections.indexOf(h),
55177
+ section: f.sections.indexOf(h),
55178
55178
  page: y,
55179
55179
  pageType: m,
55180
- segmentPage: f,
55180
+ segmentPage: p,
55181
55181
  isBack: a,
55182
55182
  path: v
55183
55183
  };
@@ -55193,8 +55193,8 @@ class v3 extends Y8 {
55193
55193
  const a = this.getSkeletonData();
55194
55194
  if (a == null)
55195
55195
  return;
55196
- const { pages: s, skeFooters: n, skeHeaders: i } = a, { divide: o, line: l, column: u, section: d, segmentPage: c, pageType: g, path: h, isBack: p } = e;
55197
- let { glyph: f } = e, m = null;
55196
+ const { pages: s, skeFooters: n, skeHeaders: i } = a, { divide: o, line: l, column: u, section: d, segmentPage: c, pageType: g, path: h, isBack: f } = e;
55197
+ let { glyph: p } = e, m = null;
55198
55198
  if (g === c1.HEADER || g === c1.FOOTER) {
55199
55199
  m = s[c];
55200
55200
  const { headerId: _, footerId: j, pageWidth: w } = m;
@@ -55214,7 +55214,7 @@ class v3 extends Y8 {
55214
55214
  if (m == null)
55215
55215
  return;
55216
55216
  const v = m.sections[d].columns[u].lines[l].divides[o].glyphGroup;
55217
- return f = Math.min(f, v.length - 1), v[f].glyphType === Q1.LIST && (f += 1), v[f];
55217
+ return p = Math.min(p, v.length - 1), v[p].glyphType === Q1.LIST && (p += 1), v[p];
55218
55218
  }
55219
55219
  findEditAreaByCoord(e, a, s, n) {
55220
55220
  const { x: i, y: o } = e;
@@ -55228,21 +55228,21 @@ class v3 extends Y8 {
55228
55228
  };
55229
55229
  this._findLiquid.reset();
55230
55230
  const { pages: g } = c;
55231
- for (let h = 0, p = g.length; h < p; h++) {
55232
- const f = g[h], { marginTop: m, marginBottom: v, pageWidth: y, pageHeight: z } = f;
55231
+ for (let h = 0, f = g.length; h < f; h++) {
55232
+ const p = g[h], { marginTop: m, marginBottom: v, pageWidth: y, pageHeight: z } = p;
55233
55233
  if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y && o < this._findLiquid.y + m) {
55234
- l = u3.HEADER, d = f, u = h;
55234
+ l = u3.HEADER, d = p, u = h;
55235
55235
  break;
55236
55236
  }
55237
55237
  if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y + m && o < this._findLiquid.y + z - v) {
55238
- l = u3.BODY, d = f, u = h;
55238
+ l = u3.BODY, d = p, u = h;
55239
55239
  break;
55240
55240
  }
55241
55241
  if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y + z - v && o < this._findLiquid.y + z) {
55242
- l = u3.FOOTER, d = f, u = h;
55242
+ l = u3.FOOTER, d = p, u = h;
55243
55243
  break;
55244
55244
  }
55245
- this._translatePage(f, a, s, n);
55245
+ this._translatePage(p, a, s, n);
55246
55246
  }
55247
55247
  return {
55248
55248
  editArea: l,
@@ -55258,12 +55258,12 @@ class v3 extends Y8 {
55258
55258
  const d = {
55259
55259
  nearestNodeList: [],
55260
55260
  nearestNodeDistanceList: []
55261
- }, { pages: c, skeHeaders: g, skeFooters: h } = u, p = this.findEditAreaByCoord(e, a, s, n).editArea, f = c.length;
55261
+ }, { pages: c, skeHeaders: g, skeFooters: h } = u, f = this.findEditAreaByCoord(e, a, s, n).editArea, p = c.length;
55262
55262
  if (this._findLiquid.reset(), i == null)
55263
- for (let w = 0; w < f; w++) {
55263
+ for (let w = 0; w < p; w++) {
55264
55264
  const x = c[w], { headerId: C, footerId: S, pageWidth: F } = x;
55265
55265
  let T = null;
55266
- if (p === u3.HEADER || p === u3.FOOTER) {
55266
+ if (f === u3.HEADER || f === u3.FOOTER) {
55267
55267
  const R = (m = g.get(C)) == null ? void 0 : m.get(F);
55268
55268
  R && (T = this._collectNearestNode(
55269
55269
  R,
@@ -55274,7 +55274,7 @@ class v3 extends Y8 {
55274
55274
  d,
55275
55275
  o,
55276
55276
  l,
55277
- f
55277
+ p
55278
55278
  ));
55279
55279
  const B = (v = h.get(S)) == null ? void 0 : v.get(F);
55280
55280
  B && (T = T != null ? T : this._collectNearestNode(
@@ -55286,7 +55286,7 @@ class v3 extends Y8 {
55286
55286
  d,
55287
55287
  o,
55288
55288
  l,
55289
- f
55289
+ p
55290
55290
  ));
55291
55291
  } else
55292
55292
  T = this._collectNearestNode(
@@ -55298,7 +55298,7 @@ class v3 extends Y8 {
55298
55298
  d,
55299
55299
  o,
55300
55300
  l,
55301
- f
55301
+ p
55302
55302
  );
55303
55303
  if (T)
55304
55304
  return T;
@@ -55308,7 +55308,7 @@ class v3 extends Y8 {
55308
55308
  const { segmentId: w, segmentPage: x, strict: C } = i;
55309
55309
  let S = null;
55310
55310
  if (C === !1)
55311
- for (let F = 0; F < f; F++) {
55311
+ for (let F = 0; F < p; F++) {
55312
55312
  const T = c[F], { headerId: R, footerId: B, pageWidth: A } = T;
55313
55313
  if (w !== "") {
55314
55314
  const L = (y = g.get(R)) == null ? void 0 : y.get(A);
@@ -55321,7 +55321,7 @@ class v3 extends Y8 {
55321
55321
  d,
55322
55322
  o,
55323
55323
  l,
55324
- f
55324
+ p
55325
55325
  ));
55326
55326
  const I = (z = h.get(B)) == null ? void 0 : z.get(A);
55327
55327
  I && (S = S != null ? S : this._collectNearestNode(
@@ -55333,7 +55333,7 @@ class v3 extends Y8 {
55333
55333
  d,
55334
55334
  o,
55335
55335
  l,
55336
- f
55336
+ p
55337
55337
  ));
55338
55338
  } else
55339
55339
  S = this._collectNearestNode(
@@ -55345,14 +55345,14 @@ class v3 extends Y8 {
55345
55345
  d,
55346
55346
  o,
55347
55347
  l,
55348
- f
55348
+ p
55349
55349
  );
55350
55350
  if (S)
55351
55351
  return S;
55352
55352
  this._translatePage(T, a, s, n);
55353
55353
  }
55354
55354
  else
55355
- for (let F = 0; F < f; F++) {
55355
+ for (let F = 0; F < p; F++) {
55356
55356
  const T = c[F];
55357
55357
  if (w) {
55358
55358
  if (x !== F) {
@@ -55369,7 +55369,7 @@ class v3 extends Y8 {
55369
55369
  d,
55370
55370
  o,
55371
55371
  l,
55372
- f
55372
+ p
55373
55373
  ));
55374
55374
  } else
55375
55375
  S = this._collectNearestNode(
@@ -55381,7 +55381,7 @@ class v3 extends Y8 {
55381
55381
  d,
55382
55382
  o,
55383
55383
  l,
55384
- f
55384
+ p
55385
55385
  );
55386
55386
  if (S)
55387
55387
  return S;
@@ -55394,8 +55394,8 @@ class v3 extends Y8 {
55394
55394
  var _, j, w, x, C, S, F, T, R;
55395
55395
  const { sections: g, skeTables: h } = e;
55396
55396
  this._findLiquid.translateSave();
55397
- const p = this._findLiquid.x, f = p + s.pageWidth, m = this._findLiquid.y + (a === c1.FOOTER ? s.pageHeight - e.pageHeight : 0), v = m + e.pageHeight;
55398
- let y = l >= p && l <= f && u >= m && u <= v;
55397
+ const f = this._findLiquid.x, p = f + s.pageWidth, m = this._findLiquid.y + (a === c1.FOOTER ? s.pageHeight - e.pageHeight : 0), v = m + e.pageHeight;
55398
+ let y = l >= f && l <= p && u >= m && u <= v;
55399
55399
  if (c === 0 && a === c1.BODY) {
55400
55400
  const B = i === 0, A = i === d - 1, L = s.originMarginTop / 2;
55401
55401
  B && A ? y = !0 : B ? y = u <= v + L : A ? y = u >= m - L : y = u >= m - L && u <= v + L;
@@ -55574,13 +55574,13 @@ class v3 extends Y8 {
55574
55574
  paragraphLineGapDefault: d,
55575
55575
  defaultTabStop: c,
55576
55576
  documentTextStyle: g
55577
- }, p = ez(), { skeHeaders: f, skeFooters: m, skeListLevel: v, drawingAnchor: y } = p;
55577
+ }, f = ez(), { skeHeaders: p, skeFooters: m, skeListLevel: v, drawingAnchor: y } = f;
55578
55578
  return {
55579
55579
  viewModel: e,
55580
55580
  dataModel: a,
55581
- skeleton: p,
55581
+ skeleton: f,
55582
55582
  skeletonResourceReference: {
55583
- skeHeaders: f,
55583
+ skeHeaders: p,
55584
55584
  skeFooters: m,
55585
55585
  skeListLevel: v,
55586
55586
  drawingAnchor: y
@@ -55633,18 +55633,18 @@ class v3 extends Y8 {
55633
55633
  const u = e.layoutStartPointer[""];
55634
55634
  if (e.layoutStartPointer[""] = null, u != null)
55635
55635
  for (let c = 0; c < s.getChildren().length; c++) {
55636
- const g = s.getChildren()[c], { endIndex: h, startIndex: p } = g;
55637
- if (u >= p && u <= h) {
55636
+ const g = s.getChildren()[c], { endIndex: h, startIndex: f } = g;
55637
+ if (u >= f && u <= h) {
55638
55638
  l = c;
55639
55639
  break;
55640
55640
  }
55641
55641
  }
55642
55642
  for (let c = l, g = s.getChildren().length; c < g; c++) {
55643
- const h = s.getChildren()[c], p = iz(e, c), { sectionType: f, columnProperties: m, columnSeparatorType: v, sectionTypeNext: y, pageNumberStart: z = 1 } = p;
55643
+ const h = s.getChildren()[c], f = iz(e, c), { sectionType: p, columnProperties: m, columnSeparatorType: v, sectionTypeNext: y, pageNumberStart: z = 1 } = f;
55644
55644
  let _ = $3(o), j = !1;
55645
- e.sectionBreakConfigCache.set(h.endIndex, p), f === ee.CONTINUOUS ? (ue(o), this._addNewSectionByContinuous(_, m, v), j = !0) : (u == null || _ == null) && (_ = _3(
55645
+ e.sectionBreakConfigCache.set(h.endIndex, f), p === ee.CONTINUOUS ? (ue(o), this._addNewSectionByContinuous(_, m, v), j = !0) : (u == null || _ == null) && (_ = _3(
55646
55646
  e,
55647
- p,
55647
+ f,
55648
55648
  i,
55649
55649
  (d = _ == null ? void 0 : _.pageNumber) != null ? d : z
55650
55650
  ));
@@ -55653,7 +55653,7 @@ class v3 extends Y8 {
55653
55653
  s,
55654
55654
  h,
55655
55655
  _,
55656
- p,
55656
+ f,
55657
55657
  u
55658
55658
  );
55659
55659
  if (y === ee.CONTINUOUS && m.length > 0, j && w.splice(0, 1), o.push(...w), e.isDirty)
@@ -55679,13 +55679,13 @@ class v3 extends Y8 {
55679
55679
  marginBottom: d,
55680
55680
  marginLeft: c,
55681
55681
  marginRight: g
55682
- } = e, h = o - c - g, p = l - u - d, f = ((i == null ? void 0 : i.top) || 0) + ((i == null ? void 0 : i.height) || 0), m = rt(
55682
+ } = e, h = o - c - g, f = l - u - d, p = ((i == null ? void 0 : i.top) || 0) + ((i == null ? void 0 : i.height) || 0), m = rt(
55683
55683
  a,
55684
55684
  s,
55685
- f,
55685
+ p,
55686
55686
  0,
55687
55687
  h,
55688
- p - f
55688
+ f - p
55689
55689
  );
55690
55690
  m.parent = e, n.push(m);
55691
55691
  }
@@ -55699,27 +55699,27 @@ class v3 extends Y8 {
55699
55699
  const g = i.indexOf(c);
55700
55700
  if (a && g !== s)
55701
55701
  continue;
55702
- const { pageWidth: h, skeTables: p } = c;
55703
- let f = c;
55702
+ const { pageWidth: h, skeTables: f } = c;
55703
+ let p = c;
55704
55704
  if (a) {
55705
55705
  const z = (u = l.get(a)) == null ? void 0 : u.get(h), _ = (d = o.get(a)) == null ? void 0 : d.get(h);
55706
55706
  if (z)
55707
- f = z;
55707
+ p = z;
55708
55708
  else if (_)
55709
- f = _;
55709
+ p = _;
55710
55710
  else
55711
55711
  continue;
55712
55712
  }
55713
55713
  if (a === "") {
55714
55714
  let z = !1;
55715
- for (const _ of p.values()) {
55715
+ for (const _ of f.values()) {
55716
55716
  const { rows: j } = _;
55717
55717
  for (const w of j) {
55718
55718
  const { cells: x } = w;
55719
55719
  for (const C of x) {
55720
55720
  const { st: S, ed: F } = C;
55721
55721
  if (e >= S && e <= F) {
55722
- f = C, z = !0;
55722
+ p = C, z = !0;
55723
55723
  break;
55724
55724
  }
55725
55725
  }
@@ -55730,7 +55730,7 @@ class v3 extends Y8 {
55730
55730
  break;
55731
55731
  }
55732
55732
  }
55733
- const { sections: m, st: v, ed: y } = f;
55733
+ const { sections: m, st: v, ed: y } = p;
55734
55734
  if (!(e < v || e > y))
55735
55735
  for (const z of m) {
55736
55736
  const { columns: _, st: j, ed: w } = z;
@@ -55749,8 +55749,8 @@ class v3 extends Y8 {
55749
55749
  for (const X of P)
55750
55750
  if (H -= X.count, H < 0)
55751
55751
  return {
55752
- page: f,
55753
- pageType: f.type,
55752
+ page: p,
55753
+ pageType: p.type,
55754
55754
  section: z,
55755
55755
  column: x,
55756
55756
  line: T,
@@ -55773,7 +55773,7 @@ function $0(r, t, e = {}) {
55773
55773
  verticalAlign: o = k2.UNSPECIFIED,
55774
55774
  wrapStrategy: l = T1.UNSPECIFIED,
55775
55775
  cellValueType: u
55776
- } = e, { t: d, r: c, b: g, l: h } = n || c2, { vertexAngle: p, centerAngle: f } = A3(s), m = {
55776
+ } = e, { t: d, r: c, b: g, l: h } = n || c2, { vertexAngle: f, centerAngle: p } = A3(s), m = {
55777
55777
  id: "d",
55778
55778
  body: {
55779
55779
  dataStream: `${r}${d7}`,
@@ -55808,8 +55808,8 @@ function $0(r, t, e = {}) {
55808
55808
  renderConfig: {
55809
55809
  horizontalAlign: i,
55810
55810
  verticalAlign: o,
55811
- centerAngle: f,
55812
- vertexAngle: p,
55811
+ centerAngle: p,
55812
+ vertexAngle: f,
55813
55813
  wrapStrategy: l,
55814
55814
  cellValueType: u
55815
55815
  }
@@ -56011,7 +56011,7 @@ let Z5 = class extends Z8 {
56011
56011
  if (!this._worksheetData || !this.rowHeightAccumulation || !this.columnWidthAccumulation) return;
56012
56012
  this.updateVisibleRange(t);
56013
56013
  const e = this._drawingRange, a = this.columnWidthAccumulation, { startRow: s, endRow: n, startColumn: i, endColumn: o } = e;
56014
- if (this._clearCacheOutOfVisibleRange(s, n, i, o), o === -1 || n === -1) return;
56014
+ if (o === -1 || n === -1) return;
56015
56015
  const l = this.getCurrentRowColumnSegmentMergeData(this._drawingRange);
56016
56016
  for (const c of l)
56017
56017
  this._setStylesCacheForOneCell(c.startRow, c.startColumn, {
@@ -56042,15 +56042,15 @@ let Z5 = class extends Z8 {
56042
56042
  return [];
56043
56043
  const a = [], { rowData: s } = this._worksheetData, n = s, i = /* @__PURE__ */ new Set(), o = this.worksheet.getRowCount();
56044
56044
  for (const c of t) {
56045
- const { startRow: g, endRow: h, startColumn: p, endColumn: f } = c, m = Math.min(h, o);
56045
+ const { startRow: g, endRow: h, startColumn: f, endColumn: p } = c, m = Math.min(h, o);
56046
56046
  for (let v = g; v <= m; v++) {
56047
56047
  if (i.has(v) || ((l = n[v]) == null ? void 0 : l.ia) === t1.FALSE)
56048
56048
  continue;
56049
- if (this._hasUnMergedCellInRow(v, p, f))
56049
+ if (this._hasUnMergedCellInRow(v, f, p))
56050
56050
  if (e) {
56051
56051
  const z = this.worksheet.getRowHeight(v);
56052
56052
  let _ = 0, j = 0;
56053
- for (let w = p; w <= f; w++) {
56053
+ for (let w = f; w <= p; w++) {
56054
56054
  const x = (u = e.getValue(v, w)) != null ? u : 0;
56055
56055
  _ = Math.max(_, x);
56056
56056
  const C = (d = this.calculateAutoHeightForCell(v, w)) != null ? d : this._worksheetData.defaultRowHeight;
@@ -56086,7 +56086,7 @@ let Z5 = class extends Z8 {
56086
56086
  }
56087
56087
  // eslint-disable-next-line max-lines-per-function, complexity
56088
56088
  calculateAutoHeightForCell(t, e) {
56089
- var h, p, f, m, v, y, z, _, j, w, x, C, S, F, T, R;
56089
+ var h, f, p, m, v, y, z, _, j, w, x, C, S, F, T, R;
56090
56090
  const { columnData: a, defaultColumnWidth: s } = this._worksheetData, n = this.worksheet.getCellInfoInMergeData(t, e);
56091
56091
  if (this._skipAutoHeightForMergedCells && (n.isMerged || n.isMergedMainCell))
56092
56092
  return;
@@ -56096,7 +56096,7 @@ let Z5 = class extends Z8 {
56096
56096
  if (B)
56097
56097
  return B;
56098
56098
  }
56099
- const l = ((p = (h = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : h.leftOffset) != null ? p : 0) + ((m = (f = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : f.rightOffset) != null ? m : 0), { vertexAngle: u, centerAngle: d } = A3((v = o == null ? void 0 : o.tr) != null ? v : { a: 0 }), c = (i == null ? void 0 : i.p) || u || d;
56099
+ const l = ((f = (h = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : h.leftOffset) != null ? f : 0) + ((m = (p = i == null ? void 0 : i.fontRenderExtension) == null ? void 0 : p.rightOffset) != null ? m : 0), { vertexAngle: u, centerAngle: d } = A3((v = o == null ? void 0 : o.tr) != null ? v : { a: 0 }), c = (i == null ? void 0 : i.p) || u || d;
56100
56100
  let g = (z = (y = a[e]) == null ? void 0 : y.w) != null ? z : s;
56101
56101
  if (n.isMergedMainCell) {
56102
56102
  const B = n.startColumn, A = n.endColumn;
@@ -56142,7 +56142,7 @@ let Z5 = class extends Z8 {
56142
56142
  g - B - A,
56143
56143
  1 / 0
56144
56144
  );
56145
- return O.calculate(), O.getTotalHeight();
56145
+ return O.calculate(), O.getTotalHeight() + L + I;
56146
56146
  } else {
56147
56147
  const O = F1.getMeasureText("A", d3(o).fontCache);
56148
56148
  return O.fontBoundingBoxAscent + O.fontBoundingBoxDescent + L + I;
@@ -56200,19 +56200,19 @@ let Z5 = class extends Z8 {
56200
56200
  const d = (y, z, _) => [...Array.from(
56201
56201
  { length: z - y + 1 },
56202
56202
  (w, x) => x + y
56203
- ), ..._], c = Math.max(0, n - m4), g = Math.min(o, i + m4), h = d(c, g, l), p = Math.max(0, t - 1);
56204
- let f = this.columnWidthAccumulation[t] - this.columnWidthAccumulation[p];
56205
- t === 0 && (f = this.columnWidthAccumulation[t]);
56203
+ ), ..._], c = Math.max(0, n - m4), g = Math.min(o, i + m4), h = d(c, g, l), f = Math.max(0, t - 1);
56204
+ let p = this.columnWidthAccumulation[t] - this.columnWidthAccumulation[f];
56205
+ t === 0 && (p = this.columnWidthAccumulation[t]);
56206
56206
  for (let y = 0; y < h.length; y++) {
56207
56207
  const z = h[y], { isMerged: _, isMergedMainCell: j } = this.worksheet.getCellInfoInMergeData(t, z);
56208
56208
  if (_ && !j || !this.worksheet.getRowVisible(z)) continue;
56209
56209
  const w = e.getCell(z, t);
56210
56210
  if (!w || w.p && (z + M6 <= n || z - M6 >= i))
56211
56211
  continue;
56212
- let x = this._getMeasuredWidthByCell(w, z, t, f);
56212
+ let x = this._getMeasuredWidthByCell(w, z, t, p);
56213
56213
  if (w.fontRenderExtension && (x += (((m = w.fontRenderExtension) == null ? void 0 : m.leftOffset) || 0) + (((v = w.fontRenderExtension) == null ? void 0 : v.rightOffset) || 0)), a = Math.max(a, x), a >= j6) return j6;
56214
56214
  }
56215
- return a === 0 ? f : Math.max(pa, a);
56215
+ return a === 0 ? p : Math.max(pa, a);
56216
56216
  }
56217
56217
  getColWidth(t) {
56218
56218
  const e = Math.max(0, t - 1);
@@ -56228,10 +56228,10 @@ let Z5 = class extends Z8 {
56228
56228
  * @returns {number} currColWidth
56229
56229
  */
56230
56230
  _getMeasuredWidthByCell(t, e, a, s) {
56231
- var h, p, f;
56231
+ var h, f, p;
56232
56232
  let n = 0;
56233
56233
  if ((h = t.fontRenderExtension) != null && h.isSkip && (t != null && t.interceptorAutoWidth)) {
56234
- const m = (p = t.interceptorAutoWidth) == null ? void 0 : p.call(t);
56234
+ const m = (f = t.interceptorAutoWidth) == null ? void 0 : f.call(t);
56235
56235
  if (m)
56236
56236
  return m;
56237
56237
  }
@@ -56244,7 +56244,7 @@ let Z5 = class extends Z8 {
56244
56244
  const d = new Q2(l), { vertexAngle: c } = A3(u);
56245
56245
  (i == null ? void 0 : i.tb) === T1.WRAP ? l.updateDocumentDataPageSize(s, 1 / 0) : l.updateDocumentDataPageSize(1 / 0, 1 / 0);
56246
56246
  const g = v3.create(d, this._localeService);
56247
- if (g.calculate(), n = ((f = r0(g, c)) != null ? f : { width: 0 }).width, g) {
56247
+ if (g.calculate(), n = ((p = r0(g, c)) != null ? p : { width: 0 }).width, g) {
56248
56248
  const m = g.getSkeletonData(), {
56249
56249
  marginTop: v,
56250
56250
  marginBottom: y,
@@ -56382,7 +56382,7 @@ let Z5 = class extends Z8 {
56382
56382
  */
56383
56383
  // eslint-disable-next-line complexity, max-lines-per-function
56384
56384
  _getCellDocumentModel(t, e = K5) {
56385
- var f;
56385
+ var p;
56386
56386
  const { isDeepClone: a, displayRawFormula: s, ignoreTextRotation: n } = {
56387
56387
  ...K5,
56388
56388
  ...e
@@ -56391,7 +56391,7 @@ let Z5 = class extends Z8 {
56391
56391
  let o, l = "document";
56392
56392
  const u = lC(i), d = n ? u2.tr : u.textRotation || u2.tr;
56393
56393
  let c = u.horizontalAlign || u2.ht;
56394
- const g = u.verticalAlign || u2.vt, h = u.wrapStrategy || u2.tb, p = u.paddingData || c2;
56394
+ const g = u.verticalAlign || u2.vt, h = u.wrapStrategy || u2.tb, f = u.paddingData || c2;
56395
56395
  if (t.f && s)
56396
56396
  o = $0(t.f.toString(), {}, { verticalAlign: g }), c = u2.ht;
56397
56397
  else if (t.p) {
@@ -56399,7 +56399,7 @@ let Z5 = class extends Z8 {
56399
56399
  o = this._updateConfigAndGetDocumentModel(
56400
56400
  a ? o1.deepClone(t.p) : t.p,
56401
56401
  c,
56402
- p,
56402
+ f,
56403
56403
  {
56404
56404
  horizontalAlign: c,
56405
56405
  verticalAlign: g,
@@ -56413,7 +56413,7 @@ let Z5 = class extends Z8 {
56413
56413
  const m = V5(i);
56414
56414
  l = d3(m).fontCache;
56415
56415
  let v = c7(t);
56416
- t.t === N2.FORCE_STRING && s && (v = `'${v}`), o = $0(v, m, {
56416
+ t.t === T2.FORCE_STRING && s && (v = `'${v}`), o = $0(v, m, {
56417
56417
  ...u,
56418
56418
  textRotation: d,
56419
56419
  cellValueType: t.t
@@ -56426,8 +56426,8 @@ let Z5 = class extends Z8 {
56426
56426
  wrapStrategy: h,
56427
56427
  verticalAlign: g,
56428
56428
  horizontalAlign: c,
56429
- paddingData: p,
56430
- fill: (f = i == null ? void 0 : i.bg) == null ? void 0 : f.rgb
56429
+ paddingData: f,
56430
+ fill: (p = i == null ? void 0 : i.bg) == null ? void 0 : p.rgb
56431
56431
  };
56432
56432
  }
56433
56433
  /**
@@ -56437,9 +56437,9 @@ let Z5 = class extends Z8 {
56437
56437
  */
56438
56438
  // eslint-disable-next-line complexity, max-lines-per-function
56439
56439
  _calculateOverflowCell(t, e, a) {
56440
- const { documentSkeleton: s, vertexAngle: n = 0, centerAngle: i = 0, horizontalAlign: o, wrapStrategy: l } = a, u = this._cellData.getValue(t, e), { t: d = N2.STRING } = u || {};
56440
+ const { documentSkeleton: s, vertexAngle: n = 0, centerAngle: i = 0, horizontalAlign: o, wrapStrategy: l } = a, u = this._cellData.getValue(t, e), { t: d = T2.STRING } = u || {};
56441
56441
  let c = o;
56442
- if (o === d1.UNSPECIFIED && (i === Z1 && n === Z1 ? c = d1.CENTER : (n > 0 && n !== Z1 || n === -Z1) && (c = d1.RIGHT)), (l === T1.OVERFLOW || l === T1.UNSPECIFIED) && d !== N2.NUMBER && d !== N2.BOOLEAN && o !== d1.JUSTIFIED) {
56442
+ if (o === d1.UNSPECIFIED && (i === Z1 && n === Z1 ? c = d1.CENTER : (n > 0 && n !== Z1 || n === -Z1) && (c = d1.RIGHT)), (l === T1.OVERFLOW || l === T1.UNSPECIFIED) && d !== T2.NUMBER && d !== T2.BOOLEAN && o !== d1.JUSTIFIED) {
56443
56443
  if (this.intersectMergeRange(t, e))
56444
56444
  return !0;
56445
56445
  let g;
@@ -56464,23 +56464,23 @@ let Z5 = class extends Z8 {
56464
56464
  height: j
56465
56465
  });
56466
56466
  }
56467
- const h = this.getOverflowPosition(g, c, t, e, this.getColumnCount()), { startColumn: p, endColumn: f } = h;
56468
- if (p === f)
56467
+ const h = this.getOverflowPosition(g, c, t, e, this.getColumnCount()), { startColumn: f, endColumn: p } = h;
56468
+ if (f === p)
56469
56469
  return !0;
56470
- this.appendToOverflowCache(t, e, p, f);
56470
+ this.appendToOverflowCache(t, e, f, p);
56471
56471
  } else if (l === T1.WRAP && n !== 0) {
56472
56472
  if (this.intersectMergeRange(t, e))
56473
56473
  return !0;
56474
56474
  const { startY: g, endY: h } = this.getCellWithCoordByIndex(
56475
56475
  t,
56476
56476
  e
56477
- ), p = h - g;
56478
- s.getViewModel().getDataModel().updateDocumentDataPageSize(p), s.calculate();
56479
- const f = r0(s, n);
56480
- if (!f)
56477
+ ), f = h - g;
56478
+ s.getViewModel().getDataModel().updateDocumentDataPageSize(f), s.calculate();
56479
+ const p = r0(s, n);
56480
+ if (!p)
56481
56481
  return !0;
56482
56482
  const { startColumn: m, endColumn: v } = this.getOverflowPosition(
56483
- f,
56483
+ p,
56484
56484
  c,
56485
56485
  t,
56486
56486
  e,
@@ -56587,16 +56587,16 @@ let Z5 = class extends Z8 {
56587
56587
  if (d) {
56588
56588
  const { documentModel: g } = d;
56589
56589
  if (g) {
56590
- const { fontString: h, wrapStrategy: p, verticalAlign: f, horizontalAlign: m } = d, v = new Q2(g);
56590
+ const { fontString: h, wrapStrategy: f, verticalAlign: p, horizontalAlign: m } = d, v = new Q2(g);
56591
56591
  if (v) {
56592
56592
  const y = v3.create(v, this._localeService);
56593
56593
  y.calculate(), n = {
56594
56594
  documentSkeleton: y,
56595
56595
  vertexAngle: o,
56596
56596
  centerAngle: l,
56597
- verticalAlign: f,
56597
+ verticalAlign: p,
56598
56598
  horizontalAlign: m,
56599
- wrapStrategy: p,
56599
+ wrapStrategy: f,
56600
56600
  imageCacheMap: this._imageCacheMap,
56601
56601
  cellData: a,
56602
56602
  fontString: h,
@@ -56605,14 +56605,14 @@ let Z5 = class extends Z8 {
56605
56605
  }
56606
56606
  }
56607
56607
  } else {
56608
- const g = d3(s != null ? s : void 0).fontCache, { vt: h, ht: p, tb: f } = s != null ? s : {};
56608
+ const g = d3(s != null ? s : void 0).fontCache, { vt: h, ht: f, tb: p } = s != null ? s : {};
56609
56609
  n = {
56610
56610
  documentSkeleton: void 0,
56611
56611
  vertexAngle: o,
56612
56612
  centerAngle: l,
56613
56613
  verticalAlign: h != null ? h : k2.UNSPECIFIED,
56614
- horizontalAlign: p != null ? p : d1.UNSPECIFIED,
56615
- wrapStrategy: f != null ? f : T1.OVERFLOW,
56614
+ horizontalAlign: f != null ? f : d1.UNSPECIFIED,
56615
+ wrapStrategy: p != null ? p : T1.OVERFLOW,
56616
56616
  imageCacheMap: this._imageCacheMap,
56617
56617
  cellData: a,
56618
56618
  fontString: g,
@@ -56656,10 +56656,10 @@ let Z5 = class extends Z8 {
56656
56656
  const h = this.worksheet.getCell(o, l);
56657
56657
  if (!h)
56658
56658
  break;
56659
- const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this.worksheet.getComposedCellStyleByCellData(o, l, h);
56660
- if (!f && !p)
56659
+ const f = (u = h.themeStyle) == null ? void 0 : u.bd, p = this.worksheet.getComposedCellStyleByCellData(o, l, h);
56660
+ if (!p && !f)
56661
56661
  break;
56662
- const m = (c = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? c : p == null ? void 0 : p[t];
56662
+ const m = (c = (d = p == null ? void 0 : p.bd) == null ? void 0 : d[t]) != null ? c : f == null ? void 0 : f[t];
56663
56663
  if (m) {
56664
56664
  const v = y3(m.cl) || z3;
56665
56665
  s.push({
@@ -56671,10 +56671,10 @@ let Z5 = class extends Z8 {
56671
56671
  }
56672
56672
  }
56673
56673
  s.forEach((g) => {
56674
- const { r: h, c: p, style: f, color: m } = g;
56675
- e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
56674
+ const { r: h, c: f, style: p, color: m } = g;
56675
+ e.border.getValue(h, f) || e.border.setValue(h, f, {}), e.border.getValue(h, f)[t] = {
56676
56676
  type: t,
56677
- style: f,
56677
+ style: p,
56678
56678
  color: m
56679
56679
  };
56680
56680
  });
@@ -56763,8 +56763,8 @@ function r0(r, t = 0) {
56763
56763
  let l = 0, u = 0;
56764
56764
  const d = [];
56765
56765
  Ky([n], (g) => {
56766
- const { lines: h, width: p, spaceWidth: f } = g, { rotatedHeight: m, rotatedWidth: v } = R7(h, p, a);
56767
- u += m, d.push({ rotatedWidth: v, spaceWidth: f });
56766
+ const { lines: h, width: f, spaceWidth: p } = g, { rotatedHeight: m, rotatedWidth: v } = R7(h, f, a);
56767
+ u += m, d.push({ rotatedWidth: v, spaceWidth: p });
56768
56768
  });
56769
56769
  const c = d.length;
56770
56770
  for (let g = 0; g < c; g++) {
@@ -56811,21 +56811,21 @@ class mC extends x3 {
56811
56811
  const { rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s;
56812
56812
  if (!d || !g || c === void 0 || h === void 0 || !l)
56813
56813
  return;
56814
- const p = this._getScale(a), { viewRanges: f = [], checkOutOfViewBound: m } = i, v = {
56814
+ const f = this._getScale(a), { viewRanges: p = [], checkOutOfViewBound: m } = i, v = {
56815
56815
  ctx: e,
56816
- scale: p,
56816
+ scale: f,
56817
56817
  // rowHeightAccumulation,
56818
56818
  columnTotalWidth: c,
56819
56819
  // columnWidthAccumulation,
56820
56820
  rowTotalHeight: h,
56821
- viewRanges: f,
56821
+ viewRanges: p,
56822
56822
  checkOutOfViewBound: m || !0,
56823
56823
  diffRanges: n,
56824
56824
  spreadsheetSkeleton: s
56825
56825
  };
56826
56826
  e.save();
56827
56827
  const y = [], z = /* @__PURE__ */ new Set(), _ = s.getRowCount() - 1, j = s.getColumnCount() - 1;
56828
- f.forEach((w) => {
56828
+ p.forEach((w) => {
56829
56829
  w.startColumn -= se, w.endColumn += se, w = Pv(w, _, j), s.worksheet.getMergedCellRange(w.startRow, w.startColumn, w.endRow, w.endColumn).forEach((C) => {
56830
56830
  const S = s.worksheet.getSpanModel().getMergeDataIndex(C.startRow, C.startColumn);
56831
56831
  z.has(S) || (z.add(S), y.push(C));
@@ -56842,15 +56842,15 @@ class mC extends x3 {
56842
56842
  }
56843
56843
  _renderFontEachCell(e, a, s, n) {
56844
56844
  var S, F;
56845
- const { ctx: i, viewRanges: o, diffRanges: l, spreadsheetSkeleton: u, cellInfo: d } = e, { startY: c, endY: g, startX: h, endX: p } = d, { isMerged: f, isMergedMainCell: m, mergeInfo: v } = d;
56846
- if (e.startX = h, e.startY = c, e.endX = p, e.endY = g, f && !m)
56845
+ const { ctx: i, viewRanges: o, diffRanges: l, spreadsheetSkeleton: u, cellInfo: d } = e, { startY: c, endY: g, startX: h, endX: f } = d, { isMerged: p, isMergedMainCell: m, mergeInfo: v } = d;
56846
+ if (e.startX = h, e.startY = c, e.endX = f, e.endY = g, p && !m)
56847
56847
  return !0;
56848
56848
  m && (e.startX = v.startX, e.startY = v.startY, e.endX = v.endX, e.endY = v.endY);
56849
56849
  const y = n.getValue(a, s);
56850
56850
  if (!y) return !0;
56851
56851
  e.fontCache = y;
56852
56852
  const z = u.overflowCache.getValue(a, s), _ = l && l.length > 0 ? l : o;
56853
- if (!z && (!m && !f) && !S7(_, a, s))
56853
+ if (!z && (!m && !p) && !S7(_, a, s))
56854
56854
  return !0;
56855
56855
  const w = u.worksheet.getRowVisible(a), x = u.worksheet.getColVisible(s);
56856
56856
  if (!w || !x) return !0;
@@ -56860,27 +56860,27 @@ class mC extends x3 {
56860
56860
  _renderImages(e, a, s, n, i, o) {
56861
56861
  var z;
56862
56862
  const { documentSkeleton: l, verticalAlign: u, horizontalAlign: d } = a, c = l.getSkeletonData().pages[0].height, g = l.getSkeletonData().pages[0].width, h = 2;
56863
- let p = s, f = n;
56863
+ let f = s, p = n;
56864
56864
  switch (u) {
56865
56865
  case k2.TOP:
56866
- f = n + h;
56866
+ p = n + h;
56867
56867
  break;
56868
56868
  case k2.MIDDLE:
56869
- f = (n + o) / 2 - c / 2;
56869
+ p = (n + o) / 2 - c / 2;
56870
56870
  break;
56871
56871
  default:
56872
- f = o - c - h;
56872
+ p = o - c - h;
56873
56873
  break;
56874
56874
  }
56875
56875
  switch (d) {
56876
56876
  case d1.RIGHT:
56877
- p = i - g - h;
56877
+ f = i - g - h;
56878
56878
  break;
56879
56879
  case d1.CENTER:
56880
- p = (s + i) / 2 - g / 2;
56880
+ f = (s + i) / 2 - g / 2;
56881
56881
  break;
56882
56882
  default:
56883
- p = s + h;
56883
+ f = s + h;
56884
56884
  break;
56885
56885
  }
56886
56886
  const v = l.getViewModel().getDataModel().getDrawings(), y = (z = l.getSkeletonData()) == null ? void 0 : z.pages[0].skeDrawings;
@@ -56898,7 +56898,7 @@ class mC extends x3 {
56898
56898
  var A;
56899
56899
  (A = this.parent) == null || A.makeDirty();
56900
56900
  }
56901
- ), x = p + _.aLeft, C = f + _.aTop, S = _.width, F = _.height, T = _.angle, { rotatedHeight: R, rotatedWidth: B } = kC(S, F, T);
56901
+ ), x = f + _.aLeft, C = p + _.aTop, S = _.width, F = _.height, T = _.angle, { rotatedHeight: R, rotatedWidth: B } = kC(S, F, T);
56902
56902
  if (w && w.complete) {
56903
56903
  const A = T * Math.PI / 180;
56904
56904
  if (e.save(), e.translate(x + B / 2, C + R / 2), e.rotate(A), w.getAttribute("data-error") === "true")
@@ -56925,12 +56925,12 @@ class mC extends x3 {
56925
56925
  var x, C, S, F, T, R;
56926
56926
  const { ctx: i, scale: o, overflowRectangle: l, fontCache: u } = e;
56927
56927
  let { startX: d, endX: c, startY: g, endY: h } = e;
56928
- const { horizontalAlign: p = 0, vertexAngle: f = 0, centerAngle: m = 0 } = u;
56929
- let v = p;
56930
- p === d1.UNSPECIFIED && (m === Z1 && f === Z1 ? v = d1.CENTER : (f > 0 && f !== Z1 || f === -Z1) && (v = d1.RIGHT));
56928
+ const { horizontalAlign: f = 0, vertexAngle: p = 0, centerAngle: m = 0 } = u;
56929
+ let v = f;
56930
+ f === d1.UNSPECIFIED && (m === Z1 && p === Z1 ? v = d1.CENTER : (p > 0 && p !== Z1 || p === -Z1) && (v = d1.RIGHT));
56931
56931
  const y = (S = (C = (x = u == null ? void 0 : u.cellData) == null ? void 0 : x.fontRenderExtension) == null ? void 0 : C.rightOffset) != null ? S : 0, z = (R = (T = (F = u == null ? void 0 : u.cellData) == null ? void 0 : F.fontRenderExtension) == null ? void 0 : T.leftOffset) != null ? R : 0;
56932
56932
  let _ = !0;
56933
- f === 0 && (d = d + z, c = c - y, (y !== 0 || z !== 0) && (_ = !1));
56933
+ p === 0 && (d = d + z, c = c - y, (y !== 0 || z !== 0) && (_ = !1));
56934
56934
  const j = c - d, w = h - g;
56935
56935
  if (l && _) {
56936
56936
  const { startColumn: B, startRow: A, endColumn: L, endRow: I } = l, { spreadsheetSkeleton: O } = e, { rowHeightAccumulation: P, columnWidthAccumulation: N } = O;
@@ -56978,22 +56978,22 @@ class mC extends x3 {
56978
56978
  var F, T, R, B, A, L, I, O, P, N, $, H;
56979
56979
  const { fontCache: o } = n;
56980
56980
  if (!o) return;
56981
- const l = (T = (F = o.style) == null ? void 0 : F.pd) != null ? T : c2, u = (R = l.l) != null ? R : c2.l, d = (B = l.r) != null ? B : c2.r, c = (A = l.t) != null ? A : c2.t, g = (L = l.b) != null ? L : c2.b, { vertexAngle: h = 0, wrapStrategy: p, cellData: f } = o;
56982
- if ((f == null ? void 0 : f.v) === void 0 || (f == null ? void 0 : f.v) === null) return;
56983
- const m = c7(f);
56981
+ const l = (T = (F = o.style) == null ? void 0 : F.pd) != null ? T : c2, u = (R = l.l) != null ? R : c2.l, d = (B = l.r) != null ? B : c2.r, c = (A = l.t) != null ? A : c2.t, g = (L = l.b) != null ? L : c2.b, { vertexAngle: h = 0, wrapStrategy: f, cellData: p } = o;
56982
+ if ((p == null ? void 0 : p.v) === void 0 || (p == null ? void 0 : p.v) === null) return;
56983
+ const m = c7(p);
56984
56984
  let { startX: v, startY: y, endX: z, endY: _ } = n, j = z - v - u - d;
56985
56985
  const w = _ - y - c - g, x = i.getValue(a, s);
56986
- if (!(p === T1.WRAP && h === 0) && x) {
56986
+ if (!(f === T1.WRAP && h === 0) && x) {
56987
56987
  const X = x.endColumn, Q = x.startColumn, g1 = x.startRow, u1 = x.endRow, a1 = n.spreadsheetSkeleton.getCellWithCoordByIndex(u1, X);
56988
56988
  z = a1.endX, _ = a1.endY;
56989
56989
  const i1 = n.spreadsheetSkeleton.getCellWithCoordByIndex(g1, Q);
56990
56990
  v = i1.startX, y = i1.startY, j = z - v - u - d;
56991
56991
  }
56992
56992
  let S = o.horizontalAlign;
56993
- o.horizontalAlign === d1.UNSPECIFIED && (f.t === N2.NUMBER ? S = d1.RIGHT : f.t === N2.BOOLEAN && (S = d1.CENTER)), Z4.drawWith(e, {
56993
+ o.horizontalAlign === d1.UNSPECIFIED && (p.t === T2.NUMBER || !o1.isDefine(p.t) && typeof p.v == "number" ? S = d1.RIGHT : p.t === T2.BOOLEAN && (S = d1.CENTER)), Z4.drawWith(e, {
56994
56994
  text: m,
56995
56995
  fontStyle: o.fontString,
56996
- warp: p === T1.WRAP && h === 0,
56996
+ warp: f === T1.WRAP && h === 0,
56997
56997
  hAlign: S,
56998
56998
  vAlign: o.verticalAlign,
56999
56999
  width: j,
@@ -57002,7 +57002,8 @@ class mC extends x3 {
57002
57002
  top: c,
57003
57003
  color: (O = (I = o.style) == null ? void 0 : I.cl) == null ? void 0 : O.rgb,
57004
57004
  strokeLine: !!((N = (P = o.style) == null ? void 0 : P.st) != null && N.s),
57005
- underline: !!((H = ($ = o.style) == null ? void 0 : $.ul) != null && H.s)
57005
+ underline: !!((H = ($ = o.style) == null ? void 0 : $.ul) != null && H.s),
57006
+ cellValueType: p.t
57006
57007
  });
57007
57008
  }
57008
57009
  _renderDocuments(e, a, s, n, i) {
@@ -57014,9 +57015,9 @@ class mC extends x3 {
57014
57015
  const { documentSkeleton: u, vertexAngle: d = 0, wrapStrategy: c } = l;
57015
57016
  if (!u) return;
57016
57017
  const g = u.getViewModel().getDataModel();
57017
- let { startX: h, startY: p, endX: f, endY: m } = n;
57018
- const v = f - h, y = m - p;
57019
- c === T1.WRAP && d === 0 ? (g.updateDocumentDataPageSize(f - h), u.calculate()) : g.updateDocumentDataPageSize(Number.POSITIVE_INFINITY);
57018
+ let { startX: h, startY: f, endX: p, endY: m } = n;
57019
+ const v = p - h, y = m - f;
57020
+ c === T1.WRAP && d === 0 ? (g.updateDocumentDataPageSize(p - h), u.calculate()) : g.updateDocumentDataPageSize(Number.POSITIVE_INFINITY);
57020
57021
  const z = i.getValue(a, s);
57021
57022
  if (!(c === T1.WRAP && d === 0) && z) {
57022
57023
  const w = r0(u), x = g.getSnapshot().documentStyle;
@@ -57025,13 +57026,13 @@ class mC extends x3 {
57025
57026
  u.getViewModel().getDataModel().updateDocumentDataPageSize(A + I + L), u.calculate();
57026
57027
  }
57027
57028
  const C = z.endColumn, S = z.startColumn, F = z.startRow, T = z.endRow, R = n.spreadsheetSkeleton.getCellWithCoordByIndex(T, C);
57028
- f = R.endX, m = R.endY;
57029
+ p = R.endX, m = R.endY;
57029
57030
  const B = n.spreadsheetSkeleton.getCellWithCoordByIndex(F, S);
57030
- h = B.startX, p = B.startY;
57031
+ h = B.startX, f = B.startY;
57031
57032
  }
57032
57033
  const j = {
57033
- right: f - h,
57034
- bottom: m - p
57034
+ right: p - h,
57035
+ bottom: m - f
57035
57036
  };
57036
57037
  u.makeDirty(!1), o.resize(v, y), o.changeSkeleton(u).render(e, {
57037
57038
  viewBound: {
@@ -57043,8 +57044,8 @@ class mC extends x3 {
57043
57044
  });
57044
57045
  }
57045
57046
  _clipRectangleForOverflow(e, a, s, n, i, o, l, u, d = 0) {
57046
- const c = l[a - 1] || 0, g = l[s] || l[l.length - 1], h = u[n - 1] || 0, p = u[i] || u[u.length - 1];
57047
- e.rectByPrecision(h + d, c + d, p - h - 2 * d, g - c - 2 * d), e.clip();
57047
+ const c = l[a - 1] || 0, g = l[s] || l[l.length - 1], h = u[n - 1] || 0, f = u[i] || u[u.length - 1];
57048
+ e.rectByPrecision(h + d, c + d, f - h - 2 * d, g - c - 2 * d), e.clip();
57048
57049
  }
57049
57050
  }
57050
57051
  G3.add(mC);
@@ -57071,19 +57072,19 @@ class bC extends x3 {
57071
57072
  if (!i.getRowVisible(u) || !i.getColVisible(d))
57072
57073
  return;
57073
57074
  let c = i.getCell(u, d);
57074
- const g = s.getCellWithCoordByIndex(u, d, !1), { isMerged: h, isMergedMainCell: p, mergeInfo: f } = g;
57075
+ const g = s.getCellWithCoordByIndex(u, d, !1), { isMerged: h, isMergedMainCell: f, mergeInfo: p } = g;
57075
57076
  let { startY: m, endY: v, startX: y, endX: z } = g;
57076
- if ((p || h) && (m = f.startY, v = f.endY, y = f.startX, z = f.endX), h) {
57077
+ if ((f || h) && (m = p.startY, v = p.endY, y = p.startX, z = p.endX), h) {
57077
57078
  const C = {
57078
- row: f.startRow,
57079
- col: f.startColumn
57079
+ row: p.startRow,
57080
+ col: p.startColumn
57080
57081
  };
57081
57082
  c = i.getCell(C.row, C.col);
57082
57083
  }
57083
- if (!this.isRenderDiffRangesByRow(f.startRow, f.endRow, n))
57084
+ if (!this.isRenderDiffRangesByRow(p.startRow, p.endRow, n))
57084
57085
  return !0;
57085
57086
  if (g.isMerged || g.isMergedMainCell) {
57086
- const C = vC(f);
57087
+ const C = vC(p);
57087
57088
  if (l.has(C))
57088
57089
  return;
57089
57090
  l.add(C);
@@ -57118,8 +57119,8 @@ const yC = "DefaultRowHeaderLayoutExtension", zC = {
57118
57119
  fontSize: 13,
57119
57120
  fontFamily: q3,
57120
57121
  fontColor: "#000000",
57121
- backgroundColor: M2([248, 249, 250]),
57122
- borderColor: M2([217, 217, 217]),
57122
+ backgroundColor: R2([248, 249, 250]),
57123
+ borderColor: R2([217, 217, 217]),
57123
57124
  textAlign: "center",
57124
57125
  textBaseline: "middle"
57125
57126
  };
@@ -57167,8 +57168,8 @@ class _C extends x3 {
57167
57168
  const { rowHeightAccumulation: u, columnTotalWidth: d, columnWidthAccumulation: c, rowTotalHeight: g, worksheet: h } = s;
57168
57169
  if (!u || !c || d === void 0 || g === void 0)
57169
57170
  return;
57170
- const p = this.getRowsCfg(h.getSheetId()), f = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
57171
- this.setStyleToCtx(e, f), e.save(), e.fillStyle = f.backgroundColor, e.fillRectByPrecision(0, 0, i, g), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(m2, m2);
57171
+ const f = this.getRowsCfg(h.getSheetId()), p = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
57172
+ this.setStyleToCtx(e, p), e.save(), e.fillStyle = p.backgroundColor, e.fillRectByPrecision(0, 0, i, g), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(m2, m2);
57172
57173
  let v = 0;
57173
57174
  const y = u.length;
57174
57175
  for (let _ = o - 1; _ <= l; _++) {
@@ -57184,7 +57185,7 @@ class _C extends x3 {
57184
57185
  bottom: j,
57185
57186
  width: i,
57186
57187
  height: j - v
57187
- }, [x, C] = this.getCfgOfCurrentRow(p, f, _);
57188
+ }, [x, C] = this.getCfgOfCurrentRow(f, p, _);
57188
57189
  C && x.backgroundColor && (e.save(), e.fillStyle = x.backgroundColor, e.fillRectByPrecision(w.left, w.top, w.width, w.height), e.restore()), e.beginPath(), e.moveToByPrecision(w.left, w.bottom), e.lineToByPrecision(w.right, w.bottom), e.stroke();
57189
57190
  const S = (() => {
57190
57191
  switch (x.textAlign) {
@@ -57291,8 +57292,8 @@ class y8 extends I7 {
57291
57292
  isSkipByDiffBounds(e, a, s, n) {
57292
57293
  if (n == null)
57293
57294
  return !1;
57294
- const { pageWidth: i, pageHeight: o, marginBottom: l, marginTop: u, marginLeft: d, marginRight: c } = e, g = s + i + d + c, h = a + o + l + u, { left: p, top: f, right: m, bottom: v } = n.viewBound;
57295
- return g < p || h < f || s > m && i !== Number.POSITIVE_INFINITY || a > v && o !== Number.POSITIVE_INFINITY;
57295
+ const { pageWidth: i, pageHeight: o, marginBottom: l, marginTop: u, marginLeft: d, marginRight: c } = e, g = s + i + d + c, h = a + o + l + u, { left: f, top: p, right: m, bottom: v } = n.viewBound;
57296
+ return g < f || h < p || s > m && i !== Number.POSITIVE_INFINITY || a > v && o !== Number.POSITIVE_INFINITY;
57296
57297
  }
57297
57298
  }
57298
57299
  var s0 = /* @__PURE__ */ ((r) => (r[r.SPAN = 0] = "SPAN", r[r.LINE = 1] = "LINE", r))(s0 || {});
@@ -57313,8 +57314,8 @@ class wC extends Me {
57313
57314
  k(this, "_preBackgroundColor", "");
57314
57315
  }
57315
57316
  draw(e, a, s) {
57316
- var p;
57317
- const n = (p = s.parent) == null ? void 0 : p.parent;
57317
+ var f;
57318
+ const n = (f = s.parent) == null ? void 0 : f.parent;
57318
57319
  if (n == null)
57319
57320
  return;
57320
57321
  const { contentHeight: i = 0 } = n, { ts: o, width: l, content: u } = s;
@@ -57338,8 +57339,8 @@ class CC extends Me {
57338
57339
  k(this, "_preBorderColor", "");
57339
57340
  }
57340
57341
  draw(e, a, s) {
57341
- var f;
57342
- const n = (f = s.parent) == null ? void 0 : f.parent;
57342
+ var p;
57343
+ const n = (p = s.parent) == null ? void 0 : p.parent;
57343
57344
  if (!n)
57344
57345
  return;
57345
57346
  const { asc: i = 0, lineHeight: o = 0 } = n, { ts: l, left: u, width: d } = s;
@@ -57350,17 +57351,17 @@ class CC extends Me {
57350
57351
  return;
57351
57352
  const g = this._getScale(e.getScale()), h = this._createBorderCache(c);
57352
57353
  e.save(), e.translateWithPrecisionRatio(m2, m2);
57353
- const { spanStartPoint: p = U.create(0, 0) } = this.extensionOffset;
57354
+ const { spanStartPoint: f = U.create(0, 0) } = this.extensionOffset;
57354
57355
  for (const m of h.keys()) {
57355
57356
  const v = h.get(m);
57356
57357
  if (!v)
57357
57358
  continue;
57358
57359
  const { s: y, cl: z } = v, _ = y3(z) || z3, j = M7(y);
57359
57360
  y !== this._preBorderStyle && (A7(e, y), e.setLineWidthByPrecision(j), this._preBorderStyle = y), _ !== this._preBorderColor && (e.strokeStyle = _, this._preBorderColor = _), c3(e, m, (j - 1) / 2 / g, {
57360
- startX: p.x,
57361
- startY: p.y,
57362
- endX: p.x + d,
57363
- endY: p.y + o
57361
+ startX: f.x,
57362
+ startY: f.y,
57363
+ endX: f.x + d,
57364
+ endY: f.y + o
57364
57365
  });
57365
57366
  }
57366
57367
  e.restore();
@@ -57510,13 +57511,13 @@ class _8 extends R1 {
57510
57511
  t.closePath(), this._renderPaintInOrder(t, e);
57511
57512
  }
57512
57513
  _draw(t, e) {
57513
- const { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: p } = this, f = this.getParent().transform, m = f.getMatrix()[4], v = f.getMatrix()[5], y = m + this.width, z = v + this.height, _ = { left: m, top: v, right: y, bottom: z };
57514
+ const { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: f } = this, p = this.getParent().transform, m = p.getMatrix()[4], v = p.getMatrix()[5], y = m + this.width, z = v + this.height, _ = { left: m, top: v, right: y, bottom: z };
57514
57515
  let { left: j, top: w, right: x, bottom: C } = _, S = x - j, F = C - w;
57515
57516
  if (e) {
57516
57517
  const T = M3.getIntersectionBetweenTwoRect(_, e.cacheBound);
57517
57518
  T && (j = T.left - m, w = T.top - v, x = T.right, C = T.bottom, S = T.width, F = T.height);
57518
57519
  }
57519
- _8.drawWith(t, { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: p, width: S, height: F, left: j, top: w });
57520
+ _8.drawWith(t, { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray: f, width: S, height: F, left: j, top: w });
57520
57521
  }
57521
57522
  }
57522
57523
  class $B {
@@ -57639,7 +57640,7 @@ let UB = class extends C3 {
57639
57640
  } = this;
57640
57641
  let { left: l, top: u, width: d, height: c } = this.calculateTransformWithSrcRect();
57641
57642
  if (this.angle !== 0) {
57642
- const g = (i + this.strokeWidth) / 2, h = (o + this.strokeWidth) / 2, p = d / 2 - e, f = c / 2 - a, m = W4(new U(g, h), this.angle, new U(l, u), new U(p, f));
57643
+ const g = (i + this.strokeWidth) / 2, h = (o + this.strokeWidth) / 2, f = d / 2 - e, p = c / 2 - a, m = W4(new U(g, h), this.angle, new U(l, u), new U(f, p));
57643
57644
  l = m.x, u = m.y;
57644
57645
  }
57645
57646
  this.transformByState({
@@ -57676,14 +57677,14 @@ let UB = class extends C3 {
57676
57677
  _updateSrcRectByTransform(e) {
57677
57678
  if (this.srcRect == null || !this._transformCalculateSrcRect)
57678
57679
  return;
57679
- const { width: a, height: s, left: n, top: i, angle: o } = this, { width: l = 0, height: u = 0, left: d = 0, top: c = 0, angle: g } = e.preValue, { left: h = 0, top: p = 0, right: f = 0, bottom: m = 0 } = this.srcRect;
57680
- let v = h, y = p, z = f, _ = m, j = !1;
57680
+ const { width: a, height: s, left: n, top: i, angle: o } = this, { width: l = 0, height: u = 0, left: d = 0, top: c = 0, angle: g } = e.preValue, { left: h = 0, top: f = 0, right: p = 0, bottom: m = 0 } = this.srcRect;
57681
+ let v = h, y = f, z = p, _ = m, j = !1;
57681
57682
  if (l !== 0 && l !== a) {
57682
- const w = h / l, x = f / l;
57683
+ const w = h / l, x = p / l;
57683
57684
  v = a * w, z = a * x, j = !0;
57684
57685
  }
57685
57686
  if (u !== 0 && u !== s) {
57686
- const w = p / u, x = m / u;
57687
+ const w = f / u, x = m / u;
57687
57688
  y = s * w, _ = s * x, j = !0;
57688
57689
  }
57689
57690
  j && this.setSrcRect({
@@ -57715,10 +57716,10 @@ class Y1 extends C3 {
57715
57716
  if (n === x1.resize || n === x1.all) {
57716
57717
  this._reCalculateCache = !0;
57717
57718
  const { left: o, top: l, width: u, height: d } = this._getSelfRect(), { width: c, height: g } = i;
57718
- let h, p;
57719
- c ? h = this.width - c : h = 0, g ? p = this.height - g : p = 0;
57720
- const f = h / u, m = p / d;
57721
- this.scaleX += f, this.scaleY += m, this.left = this.left - o * f, this.top = this.top - l * m, this._setTransForm();
57719
+ let h, f;
57720
+ c ? h = this.width - c : h = 0, g ? f = this.height - g : f = 0;
57721
+ const p = h / u, m = f / d;
57722
+ this.scaleX += p, this.scaleY += m, this.left = this.left - o * p, this.top = this.top - l * m, this._setTransForm();
57722
57723
  }
57723
57724
  });
57724
57725
  }
@@ -57745,8 +57746,8 @@ class Y1 extends C3 {
57745
57746
  e.quadraticCurveTo(o[0], o[1], o[2], o[3]);
57746
57747
  break;
57747
57748
  case "A": {
57748
- const l = o[0], u = o[1], d = o[2], c = o[3], g = o[4], h = o[5], p = o[6], f = o[7], m = d > c ? d : c, v = d > c ? 1 : d / c, y = d > c ? c / d : 1;
57749
- e.translate(l, u), e.rotate(p), e.scale(v, y), e.arc(0, 0, m, g, g + h, !!(1 - f)), e.scale(1 / v, 1 / y), e.rotate(-p), e.translate(-l, -u);
57749
+ const l = o[0], u = o[1], d = o[2], c = o[3], g = o[4], h = o[5], f = o[6], p = o[7], m = d > c ? d : c, v = d > c ? 1 : d / c, y = d > c ? c / d : 1;
57750
+ e.translate(l, u), e.rotate(f), e.scale(v, y), e.arc(0, 0, m, g, g + h, !!(1 - p)), e.scale(1 / v, 1 / y), e.rotate(-f), e.translate(-l, -u);
57750
57751
  break;
57751
57752
  }
57752
57753
  case "z":
@@ -57778,11 +57779,11 @@ class Y1 extends C3 {
57778
57779
  };
57779
57780
  else {
57780
57781
  const h = this.getLineLength(a, s, n, i);
57781
- let p = (o - a) * (n - a) + (l - s) * (i - s);
57782
- p /= h * h;
57783
- const f = a + p * (n - a), m = s + p * (i - s), v = this.getLineLength(o, l, f, m), y = Math.sqrt(e * e - v * v);
57782
+ let f = (o - a) * (n - a) + (l - s) * (i - s);
57783
+ f /= h * h;
57784
+ const p = a + f * (n - a), m = s + f * (i - s), v = this.getLineLength(o, l, p, m), y = Math.sqrt(e * e - v * v);
57784
57785
  d = Math.sqrt(y * y / (1 + u * u)), n < a && (d *= -1), c = u * d, g = {
57785
- x: f + d,
57786
+ x: p + d,
57786
57787
  y: m + c
57787
57788
  };
57788
57789
  }
@@ -57798,24 +57799,24 @@ class Y1 extends C3 {
57798
57799
  function h(v) {
57799
57800
  return 3 * v * (1 - v) * (1 - v);
57800
57801
  }
57801
- function p(v) {
57802
+ function f(v) {
57802
57803
  return (1 - v) * (1 - v) * (1 - v);
57803
57804
  }
57804
- const f = u * c(e) + o * g(e) + n * h(e) + a * p(e), m = d * c(e) + l * g(e) + i * h(e) + s * p(e);
57805
+ const p = u * c(e) + o * g(e) + n * h(e) + a * f(e), m = d * c(e) + l * g(e) + i * h(e) + s * f(e);
57805
57806
  return {
57806
- x: f,
57807
+ x: p,
57807
57808
  y: m
57808
57809
  };
57809
57810
  }
57810
57811
  static getPointOnQuadraticBezier(e, a, s, n, i, o, l) {
57811
- function u(p) {
57812
- return p * p;
57812
+ function u(f) {
57813
+ return f * f;
57813
57814
  }
57814
- function d(p) {
57815
- return 2 * p * (1 - p);
57815
+ function d(f) {
57816
+ return 2 * f * (1 - f);
57816
57817
  }
57817
- function c(p) {
57818
- return (1 - p) * (1 - p);
57818
+ function c(f) {
57819
+ return (1 - f) * (1 - f);
57819
57820
  }
57820
57821
  const g = o * u(e) + n * d(e) + a * c(e), h = l * u(e) + i * d(e) + s * c(e);
57821
57822
  return {
@@ -57853,8 +57854,8 @@ class Y1 extends C3 {
57853
57854
  const d = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;
57854
57855
  let c;
57855
57856
  for (let g = 1, h = n.length; g < h; g++) {
57856
- let p = n[g], f = p.charAt(0);
57857
- for (p = p.slice(1), o.length = 0; c = d.exec(p); )
57857
+ let f = n[g], p = f.charAt(0);
57858
+ for (f = f.slice(1), o.length = 0; c = d.exec(f); )
57858
57859
  o.push(c[0]);
57859
57860
  const m = [];
57860
57861
  for (let v = 0, y = o.length; v < y; v++) {
@@ -57869,7 +57870,7 @@ class Y1 extends C3 {
57869
57870
  let v, y = [];
57870
57871
  const z = l, _ = u;
57871
57872
  let j, w, x, C, S, F, T, R, B, A;
57872
- switch (f) {
57873
+ switch (p) {
57873
57874
  // Note: Keep the lineTo's above the moveTo's in this switch
57874
57875
  case "l":
57875
57876
  l += m.shift() || 0, u += m.shift() || 0, v = "L", y.push(l, u);
@@ -57887,11 +57888,11 @@ class Y1 extends C3 {
57887
57888
  break;
57888
57889
  }
57889
57890
  }
57890
- y.push(l, u), f = "l";
57891
+ y.push(l, u), p = "l";
57891
57892
  break;
57892
57893
  }
57893
57894
  case "M":
57894
- l = m.shift() || 0, u = m.shift() || 0, v = "M", y.push(l, u), f = "L";
57895
+ l = m.shift() || 0, u = m.shift() || 0, v = "M", y.push(l, u), p = "L";
57895
57896
  break;
57896
57897
  case "h":
57897
57898
  l += m.shift() || 0, v = "L", y.push(l, u);
@@ -57942,16 +57943,16 @@ class Y1 extends C3 {
57942
57943
  break;
57943
57944
  }
57944
57945
  i.push({
57945
- command: v || f,
57946
+ command: v || p,
57946
57947
  points: y,
57947
57948
  start: {
57948
57949
  x: z,
57949
57950
  y: _
57950
57951
  },
57951
- pathLength: this.calcLength(z, _, v || f, y)
57952
+ pathLength: this.calcLength(z, _, v || p, y)
57952
57953
  });
57953
57954
  }
57954
- (f === "z" || f === "Z") && i.push({
57955
+ (p === "z" || p === "Z") && i.push({
57955
57956
  command: "z",
57956
57957
  points: [],
57957
57958
  start: {
@@ -58000,12 +58001,12 @@ class Y1 extends C3 {
58000
58001
  case "A": {
58001
58002
  i = 0;
58002
58003
  const c = n[4], g = n[5], h = n[4] + g;
58003
- let p = Math.PI / 180;
58004
- if (Math.abs(c - h) < p && (p = Math.abs(c - h)), o = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], c, 0), g < 0)
58005
- for (u = c - p; u > h; u -= p)
58004
+ let f = Math.PI / 180;
58005
+ if (Math.abs(c - h) < f && (f = Math.abs(c - h)), o = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], c, 0), g < 0)
58006
+ for (u = c - f; u > h; u -= f)
58006
58007
  l = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], u, 0), i += d.getLineLength(o.x, o.y, l.x, l.y), o = l;
58007
58008
  else
58008
- for (u = c + p; u < h; u += p)
58009
+ for (u = c + f; u < h; u += f)
58009
58010
  l = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], u, 0), i += d.getLineLength(o.x, o.y, l.x, l.y), o = l;
58010
58011
  return l = d.getPointOnEllipticalArc(n[0], n[1], n[2], n[3], h, 0), i += d.getLineLength(o.x, o.y, l.x, l.y), i;
58011
58012
  }
@@ -58013,13 +58014,13 @@ class Y1 extends C3 {
58013
58014
  return 0;
58014
58015
  }
58015
58016
  static convertEndpointToCenterParameterization(e, a, s, n, i, o, l, u, d) {
58016
- const c = d * (Math.PI / 180), g = Math.cos(c) * (e - s) / 2 + Math.sin(c) * (a - n) / 2, h = -1 * Math.sin(c) * (e - s) / 2 + Math.cos(c) * (a - n) / 2, p = g * g / (l * l) + h * h / (u * u);
58017
- p > 1 && (l *= Math.sqrt(p), u *= Math.sqrt(p));
58018
- let f = Math.sqrt(
58017
+ const c = d * (Math.PI / 180), g = Math.cos(c) * (e - s) / 2 + Math.sin(c) * (a - n) / 2, h = -1 * Math.sin(c) * (e - s) / 2 + Math.cos(c) * (a - n) / 2, f = g * g / (l * l) + h * h / (u * u);
58018
+ f > 1 && (l *= Math.sqrt(f), u *= Math.sqrt(f));
58019
+ let p = Math.sqrt(
58019
58020
  (l * l * (u * u) - l * l * (h * h) - u * u * (g * g)) / (l * l * (h * h) + u * u * (g * g))
58020
58021
  );
58021
- i === o && (f *= -1), isNaN(f) && (f = 0);
58022
- const m = f * l * h / u, v = f * -u * g / l, y = (e + s) / 2 + Math.cos(c) * m - Math.sin(c) * v, z = (a + n) / 2 + Math.sin(c) * m + Math.cos(c) * v, _ = (T) => Math.sqrt(T[0] * T[0] + T[1] * T[1]), j = (T, R) => (T[0] * R[0] + T[1] * R[1]) / (_(T) * _(R)), w = (T, R) => (T[0] * R[1] < T[1] * R[0] ? -1 : 1) * Math.acos(j(T, R)), x = w([1, 0], [(g - m) / l, (h - v) / u]), C = [(g - m) / l, (h - v) / u], S = [(-1 * g - m) / l, (-1 * h - v) / u];
58022
+ i === o && (p *= -1), isNaN(p) && (p = 0);
58023
+ const m = p * l * h / u, v = p * -u * g / l, y = (e + s) / 2 + Math.cos(c) * m - Math.sin(c) * v, z = (a + n) / 2 + Math.sin(c) * m + Math.cos(c) * v, _ = (T) => Math.sqrt(T[0] * T[0] + T[1] * T[1]), j = (T, R) => (T[0] * R[0] + T[1] * R[1]) / (_(T) * _(R)), w = (T, R) => (T[0] * R[1] < T[1] * R[0] ? -1 : 1) * Math.acos(j(T, R)), x = w([1, 0], [(g - m) / l, (h - v) / u]), C = [(g - m) / l, (h - v) / u], S = [(-1 * g - m) / l, (-1 * h - v) / u];
58023
58024
  let F = w(C, S);
58024
58025
  return j(C, S) <= -1 && (F = Math.PI), j(C, S) >= 1 && (F = 0), o === 0 && F > 0 && (F -= 2 * Math.PI), o === 1 && F < 0 && (F += 2 * Math.PI), [y, z, l, u, x, F, c, o];
58025
58026
  }
@@ -58121,8 +58122,8 @@ class Y1 extends C3 {
58121
58122
  case "A": {
58122
58123
  const l = o[0], u = o[1], d = o[2], c = o[3];
58123
58124
  let g = o[4];
58124
- const h = o[5], p = o[6];
58125
- return g += h * e / i.pathLength, Y1.getPointOnEllipticalArc(l, u, d, c, g, p);
58125
+ const h = o[5], f = o[6];
58126
+ return g += h * e / i.pathLength, Y1.getPointOnEllipticalArc(l, u, d, c, g, f);
58126
58127
  }
58127
58128
  }
58128
58129
  return null;
@@ -58141,27 +58142,27 @@ class Y1 extends C3 {
58141
58142
  this.dataArray.forEach((d) => {
58142
58143
  if (d.command === "A") {
58143
58144
  const c = d.points[4], g = d.points[5], h = d.points[4] + g;
58144
- let p = Math.PI / 180;
58145
- if (Math.abs(c - h) < p && (p = Math.abs(c - h)), g < 0)
58146
- for (let f = c - p; f > h; f -= p) {
58145
+ let f = Math.PI / 180;
58146
+ if (Math.abs(c - h) < f && (f = Math.abs(c - h)), g < 0)
58147
+ for (let p = c - f; p > h; p -= f) {
58147
58148
  const m = Y1.getPointOnEllipticalArc(
58148
58149
  d.points[0],
58149
58150
  d.points[1],
58150
58151
  d.points[2],
58151
58152
  d.points[3],
58152
- f,
58153
+ p,
58153
58154
  0
58154
58155
  );
58155
58156
  e.push(m.x, m.y);
58156
58157
  }
58157
58158
  else
58158
- for (let f = c + p; f < h; f += p) {
58159
+ for (let p = c + f; p < h; p += f) {
58159
58160
  const m = Y1.getPointOnEllipticalArc(
58160
58161
  d.points[0],
58161
58162
  d.points[1],
58162
58163
  d.points[2],
58163
58164
  d.points[3],
58164
- f,
58165
+ p,
58165
58166
  0
58166
58167
  );
58167
58168
  e.push(m.x, m.y);
@@ -58884,16 +58885,16 @@ class OC extends Me {
58884
58885
  }
58885
58886
  const h = (d == null ? void 0 : d.fontString) || "";
58886
58887
  h && e.font !== this.actualFontMap[h] && (e.font = h, this.actualFontMap[h] = e.font);
58887
- const { cl: p, va: f } = l, m = y3(p) || z3;
58888
- this._preFontColor !== m && (e.fillStyle = m), f === m3.SUPERSCRIPT ? g.y += -c.spo : f === m3.SUBSCRIPT && (g.y += c.sbo), this._fillText(e, s, g);
58888
+ const { cl: f, va: p } = l, m = y3(f) || z3;
58889
+ this._preFontColor !== m && (e.fillStyle = m), p === m3.SUPERSCRIPT ? g.y += -c.spo : p === m3.SUBSCRIPT && (g.y += c.sbo), this._fillText(e, s, g);
58889
58890
  }
58890
58891
  _fillText(e, a, s) {
58891
58892
  var v, y;
58892
58893
  const { renderConfig: n, spanStartPoint: i, centerPoint: o } = this.extensionOffset, { content: l, width: u, bBox: d } = a, { aba: c, abd: g } = d;
58893
58894
  if (l == null || i == null || o == null)
58894
58895
  return;
58895
- const { vertexAngle: h, centerAngle: p } = n != null ? n : {}, f = 90;
58896
- if (h === f && p === f && !Ce(l))
58896
+ const { vertexAngle: h, centerAngle: f } = n != null ? n : {}, p = 90;
58897
+ if (h === p && f === p && !Ce(l))
58897
58898
  e.save(), e.translate(i.x + o.x, i.y + o.y), e.rotate(Math.PI / 2), e.translate(-u / 2, (c + g) / 2 - g), e.fillText(l, 0, 0), e.restore();
58898
58899
  else if ((l === "☐" || l === "☑") && a.glyphType === Q1.LIST) {
58899
58900
  const j = Math.ceil(((y = (v = a.ts) == null ? void 0 : v.fs) != null ? y : 12) * 1.2);
@@ -58925,22 +58926,22 @@ class PC extends Me {
58925
58926
  const n = (w = s.parent) == null ? void 0 : w.parent, { ts: i, bBox: o, content: l } = s;
58926
58927
  if (n == null || i == null || l === "\r")
58927
58928
  return;
58928
- const { asc: u, dsc: d } = n, { sp: c, spo: g, sbo: h, bd: p } = o, f = E7(a), m = 0.5, { ul: v, st: y, ol: z, va: _, bbl: j } = i;
58929
+ const { asc: u, dsc: d } = n, { sp: c, spo: g, sbo: h, bd: f } = o, p = E7(a), m = 0.5, { ul: v, st: y, ol: z, va: _, bbl: j } = i;
58929
58930
  if (v) {
58930
58931
  const x = u + d;
58931
- this._drawLine(e, s, v, x, f);
58932
+ this._drawLine(e, s, v, x, p);
58932
58933
  }
58933
58934
  if (j) {
58934
58935
  const x = u + d + 3;
58935
- this._drawLine(e, s, j, x, f, 2);
58936
+ this._drawLine(e, s, j, x, p, 2);
58936
58937
  }
58937
58938
  if (y) {
58938
- let x = u + p - c - m;
58939
- _ === m3.SUPERSCRIPT ? x -= g : _ === m3.SUBSCRIPT && (x += h), this._drawLine(e, s, y, x, f);
58939
+ let x = u + f - c - m;
58940
+ _ === m3.SUPERSCRIPT ? x -= g : _ === m3.SUBSCRIPT && (x += h), this._drawLine(e, s, y, x, p);
58940
58941
  }
58941
58942
  if (z) {
58942
58943
  const x = -ca - m;
58943
- this._drawLine(e, s, z, x, f);
58944
+ this._drawLine(e, s, z, x, p);
58944
58945
  }
58945
58946
  }
58946
58947
  clearCache() {
@@ -58955,19 +58956,19 @@ class PC extends Me {
58955
58956
  const {
58956
58957
  originTranslate: g = U.create(0, 0),
58957
58958
  alignOffset: h = U.create(0, 0),
58958
- renderConfig: p = {}
58959
- } = this.extensionOffset, { left: f, width: m } = a, { centerAngle: v = 0, vertexAngle: y = 0 } = p;
58959
+ renderConfig: f = {}
58960
+ } = this.extensionOffset, { left: p, width: m } = a, { centerAngle: v = 0, vertexAngle: y = 0 } = f;
58960
58961
  e.save();
58961
58962
  const z = (c === t1.TRUE ? y3((C = a.ts) == null ? void 0 : C.cl) : y3(u)) || z3;
58962
58963
  e.strokeStyle = z, e.lineWidth = o, this._setLineType(e, d || f2.SINGLE);
58963
58964
  const _ = J1(v), j = J1(y), w = v2(
58964
- g.addByPoint(f, n),
58965
+ g.addByPoint(p, n),
58965
58966
  U.create(0, 0),
58966
58967
  _,
58967
58968
  j,
58968
58969
  h
58969
58970
  ), x = v2(
58970
- g.addByPoint(f + m, n),
58971
+ g.addByPoint(p + m, n),
58971
58972
  U.create(0, 0),
58972
58973
  _,
58973
58974
  j,
@@ -59027,8 +59028,8 @@ class v0 extends y8 {
59027
59028
  this.draw(e, a);
59028
59029
  }
59029
59030
  draw(e, a) {
59030
- var p, f, m, v;
59031
- const s = (p = this.getSkeleton()) == null ? void 0 : p.getSkeletonData();
59031
+ var f, p, m, v;
59032
+ const s = (f = this.getSkeleton()) == null ? void 0 : f.getSkeletonData();
59032
59033
  if (s == null || this._drawLiquid == null)
59033
59034
  return;
59034
59035
  this._drawLiquid.reset();
@@ -59098,7 +59099,7 @@ class v0 extends y8 {
59098
59099
  L,
59099
59100
  l
59100
59101
  );
59101
- const p1 = (f = i.get(B)) == null ? void 0 : f.get(R), D1 = U.create(
59102
+ const p1 = (p = i.get(B)) == null ? void 0 : p.get(R), D1 = U.create(
59102
59103
  Q,
59103
59104
  (m = p1 == null ? void 0 : p1.marginTop) != null ? m : 0
59104
59105
  );
@@ -59120,9 +59121,9 @@ class v0 extends y8 {
59120
59121
  const { columns: C1 } = y1;
59121
59122
  this._drawLiquid.translateSection(y1);
59122
59123
  for (const I1 of C1) {
59123
- const { lines: H1, width: R2 } = I1;
59124
+ const { lines: H1, width: O2 } = I1;
59124
59125
  this._drawLiquid.translateSave(), this._drawLiquid.translateColumn(I1);
59125
- const O2 = H1.length;
59126
+ const I2 = H1.length;
59126
59127
  let q1 = u1, s2 = null;
59127
59128
  if (i1 !== 0) {
59128
59129
  const {
@@ -59132,7 +59133,7 @@ class v0 extends y8 {
59132
59133
  fixOffsetX: n2,
59133
59134
  fixOffsetY: i2,
59134
59135
  rotateTranslateY: s3
59135
- } = R7(H1, R2, i1);
59136
+ } = R7(H1, O2, i1);
59136
59137
  let H2 = L1;
59137
59138
  M1 > this.height && H !== T1.WRAP && (H === T1.OVERFLOW || i1 > 0) && (H2 = this.height / Math.tan(Math.abs(i1)));
59138
59139
  const E3 = this._horizontalHandler(
@@ -59150,8 +59151,8 @@ class v0 extends y8 {
59150
59151
  O
59151
59152
  ) - i2;
59152
59153
  M1 > this.height && (i1 < 0 ? o2 = this.height - (M1 + i2) : o2 = -i2), q1 = U.create(E3 + n2, o2), this._drawLiquid.translate(0, -s3), s2 = e2;
59153
- } else H === T1.WRAP && (P !== d1.UNSPECIFIED || X !== N2.NUMBER) && (q1.x = C);
59154
- for (let e2 = 0; e2 < O2; e2++) {
59154
+ } else H === T1.WRAP && (P !== d1.UNSPECIFIED || X !== T2.NUMBER) && (q1.x = C);
59155
+ for (let e2 = 0; e2 < I2; e2++) {
59155
59156
  const M1 = H1[e2], { divides: L1, asc: n2 = 0, type: i2, lineHeight: s3 = 0 } = M1, H2 = n2, E3 = H2 * Math.sin(a1), X3 = H2 * Math.cos(a1);
59156
59157
  if (i2 === P3.BLOCK)
59157
59158
  for (const o2 of u)
@@ -59256,13 +59257,13 @@ class v0 extends y8 {
59256
59257
  }
59257
59258
  }
59258
59259
  _drawTable(e, a, s, n, i, o, l, u, d, c, g) {
59259
- var h, p, f, m, v, y, z, _, j;
59260
+ var h, f, p, m, v, y, z, _, j;
59260
59261
  for (const [w, x] of s) {
59261
59262
  const { top: C, left: S, rows: F } = x;
59262
- (h = this._drawLiquid) == null || h.translateSave(), (p = this._drawLiquid) == null || p.translate(S, C);
59263
+ (h = this._drawLiquid) == null || h.translateSave(), (f = this._drawLiquid) == null || f.translate(S, C);
59263
59264
  for (const T of F) {
59264
59265
  const { top: R, cells: B } = T;
59265
- (f = this._drawLiquid) == null || f.translateSave(), (m = this._drawLiquid) == null || m.translate(0, R);
59266
+ (p = this._drawLiquid) == null || p.translateSave(), (m = this._drawLiquid) == null || m.translate(0, R);
59266
59267
  for (const A of B) {
59267
59268
  const { left: L } = A;
59268
59269
  (v = this._drawLiquid) == null || v.translateSave(), (y = this._drawLiquid) == null || y.translate(L, 0), this._drawTableCell(
@@ -59285,12 +59286,12 @@ class v0 extends y8 {
59285
59286
  }
59286
59287
  }
59287
59288
  _drawBorderBottom(e, a, s, n = 0, i = 0) {
59288
- var h, p, f, m;
59289
+ var h, f, p, m;
59289
59290
  if (this._drawLiquid == null)
59290
59291
  return;
59291
59292
  let { x: o, y: l } = this._drawLiquid;
59292
59293
  const { pageWidth: u, marginLeft: d, marginRight: c, marginTop: g } = a;
59293
- o += d + (n != null ? n : 0), l -= s.marginTop, l -= s.paddingTop, l += g + i + s.lineHeight + ((p = (h = s.borderBottom) == null ? void 0 : h.padding) != null ? p : 0), e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (m = (f = s.borderBottom) == null ? void 0 : f.color.rgb) != null ? m : "#CDD0D8", c3(e, K.BOTTOM, 0, {
59294
+ o += d + (n != null ? n : 0), l -= s.marginTop, l -= s.paddingTop, l += g + i + s.lineHeight + ((f = (h = s.borderBottom) == null ? void 0 : h.padding) != null ? f : 0), e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (m = (p = s.borderBottom) == null ? void 0 : p.color.rgb) != null ? m : "#CDD0D8", c3(e, K.BOTTOM, 0, {
59294
59295
  startX: o,
59295
59296
  startY: l,
59296
59297
  endX: o + u - d - c,
@@ -59302,8 +59303,8 @@ class v0 extends y8 {
59302
59303
  if (this._drawLiquid == null)
59303
59304
  return;
59304
59305
  this._drawTableCellBordersAndBg(e, a, s);
59305
- const { sections: h, marginLeft: p, marginTop: f } = s;
59306
- l = U.create(l.x + p, l.y + f), e.save();
59306
+ const { sections: h, marginLeft: f, marginTop: p } = s;
59307
+ l = U.create(l.x + f, l.y + p), e.save();
59307
59308
  const { x: m, y: v } = this._drawLiquid, { pageWidth: y, pageHeight: z } = s;
59308
59309
  e.beginPath(), e.rectByPrecision(m + a.marginLeft, v + a.marginTop, y, z), e.closePath(), e.clip();
59309
59310
  for (const _ of h) {
@@ -59386,14 +59387,14 @@ class v0 extends y8 {
59386
59387
  const { marginLeft: n, marginTop: i } = a, { pageWidth: o, pageHeight: l } = s, u = s.parent, d = u.cells.indexOf(s), c = u.rowSource.tableCells[d], {
59387
59388
  borderTop: g = W2,
59388
59389
  borderBottom: h = W2,
59389
- borderLeft: p = W2,
59390
- borderRight: f = W2,
59390
+ borderLeft: f = W2,
59391
+ borderRight: p = W2,
59391
59392
  backgroundColor: m
59392
59393
  } = c;
59393
59394
  if (this._drawLiquid == null)
59394
59395
  return;
59395
59396
  let { x: v, y } = this._drawLiquid;
59396
- v += n, y += i, m && m.rgb && (e.save(), e.fillStyle = m.rgb, e.fillRectByPrecision(v, y, o, l), e.restore()), e.save(), e.setLineWidthByPrecision(1), e.save(), e.strokeStyle = (z = p.color.rgb) != null ? z : W2.color.rgb, c3(e, K.LEFT, 0, {
59397
+ v += n, y += i, m && m.rgb && (e.save(), e.fillStyle = m.rgb, e.fillRectByPrecision(v, y, o, l), e.restore()), e.save(), e.setLineWidthByPrecision(1), e.save(), e.strokeStyle = (z = f.color.rgb) != null ? z : W2.color.rgb, c3(e, K.LEFT, 0, {
59397
59398
  startX: v,
59398
59399
  startY: y,
59399
59400
  endX: v + o,
@@ -59403,7 +59404,7 @@ class v0 extends y8 {
59403
59404
  startY: y,
59404
59405
  endX: v + o,
59405
59406
  endY: y + l
59406
- }), e.restore(), e.save(), e.strokeStyle = (j = f.color.rgb) != null ? j : W2.color.rgb, c3(e, K.RIGHT, 0, {
59407
+ }), e.restore(), e.save(), e.strokeStyle = (j = p.color.rgb) != null ? j : W2.color.rgb, c3(e, K.RIGHT, 0, {
59407
59408
  startX: v,
59408
59409
  startY: y,
59409
59410
  endX: v + o,
@@ -59418,8 +59419,8 @@ class v0 extends y8 {
59418
59419
  _drawHeaderFooter(e, a, s, n, i, o, l, u, d, c, g, h = !0) {
59419
59420
  if (this._drawLiquid == null)
59420
59421
  return;
59421
- const { sections: p } = e, { y: f } = this._drawLiquid;
59422
- for (const m of p) {
59422
+ const { sections: f } = e, { y: p } = this._drawLiquid;
59423
+ for (const m of f) {
59423
59424
  const { columns: v } = m;
59424
59425
  this._drawLiquid.translateSave(), this._drawLiquid.translateSection(m);
59425
59426
  for (const y of v) {
@@ -59438,11 +59439,11 @@ class v0 extends y8 {
59438
59439
  this._drawLiquid.translateSave(), this._drawLiquid.translateLine(x, !0, !0);
59439
59440
  const { y: L } = this._drawLiquid;
59440
59441
  if (h) {
59441
- if (L - f + j.y > (g.pageHeight - 100) / 2) {
59442
+ if (L - p + j.y > (g.pageHeight - 100) / 2) {
59442
59443
  this._drawLiquid.translateRestore();
59443
59444
  continue;
59444
59445
  }
59445
- } else if (L - f + j.y + T < (g.pageHeight - 100) / 2 + 100) {
59446
+ } else if (L - p + j.y + T < (g.pageHeight - 100) / 2 + 100) {
59446
59447
  this._drawLiquid.translateRestore();
59447
59448
  continue;
59448
59449
  }
@@ -59504,7 +59505,7 @@ class v0 extends y8 {
59504
59505
  }
59505
59506
  }
59506
59507
  _horizontalHandler(e, a, s, n, i = 0, o = 0, l) {
59507
- n === d1.UNSPECIFIED && (o === Z1 && i === Z1 ? n = d1.CENTER : i > 0 && i !== Z1 || i === -Z1 ? n = d1.RIGHT : l === N2.NUMBER ? n = d1.RIGHT : l === N2.BOOLEAN ? n = d1.CENTER : n = d1.LEFT);
59508
+ n === d1.UNSPECIFIED && (o === Z1 && i === Z1 ? n = d1.CENTER : i > 0 && i !== Z1 || i === -Z1 ? n = d1.RIGHT : l === T2.NUMBER ? n = d1.RIGHT : l === T2.BOOLEAN ? n = d1.CENTER : n = d1.LEFT);
59508
59509
  let u = 0;
59509
59510
  return n === d1.CENTER ? u = (this.width - e) / 2 : n === d1.RIGHT ? u = this.width - e - s : u = a, u;
59510
59511
  }
@@ -59652,9 +59653,9 @@ class GB extends $7 {
59652
59653
  this._dirtyBounds = e;
59653
59654
  }
59654
59655
  renderByViewports(e, a, s) {
59655
- const { diffBounds: n, diffX: i, diffY: o, viewPortPosition: l, cacheCanvas: u, leftOrigin: d, topOrigin: c, bufferEdgeX: g, bufferEdgeY: h, isDirty: p, isForceDirty: f } = a, { rowHeaderWidth: m, columnHeaderHeight: v } = s, { a: y = 1, d: z = 1 } = e.getTransform(), _ = g * y / window.devicePixelRatio, j = h * z / window.devicePixelRatio, w = u.getContext();
59656
+ const { diffBounds: n, diffX: i, diffY: o, viewPortPosition: l, cacheCanvas: u, leftOrigin: d, topOrigin: c, bufferEdgeX: g, bufferEdgeY: h, isDirty: f, isForceDirty: p } = a, { rowHeaderWidth: m, columnHeaderHeight: v } = s, { a: y = 1, d: z = 1 } = e.getTransform(), _ = g * y / window.devicePixelRatio, j = h * z / window.devicePixelRatio, w = u.getContext();
59656
59657
  w.save();
59657
- const x = f || this.isForceDirty(), C = p || this.isDirty();
59658
+ const x = p || this.isForceDirty(), C = f || this.isDirty();
59658
59659
  n.length === 0 || i === 0 && o === 0 || x || C ? (C || x) && (this.addRenderTagToScene("scrolling", !1), this.refreshCacheCanvas(a, { cacheCanvas: u, cacheCtx: w, mainCtx: e, topOrigin: c, leftOrigin: d, bufferEdgeX: g, bufferEdgeY: h })) : (n.length !== 0 || i !== 0 || o !== 0) && (this.addRenderTagToScene("scrolling", !0), this.paintNewAreaForScrolling(a, {
59659
59660
  cacheCanvas: u,
59660
59661
  cacheCtx: w,
@@ -59672,12 +59673,12 @@ class GB extends $7 {
59672
59673
  this._applyCache(u, e, S, F, L, I, T, R, L, I), w.restore();
59673
59674
  }
59674
59675
  paintNewAreaForScrolling(e, a) {
59675
- const { cacheCanvas: s, cacheCtx: n, mainCtx: i, topOrigin: o, leftOrigin: l, bufferEdgeX: u, bufferEdgeY: d, scaleX: c, scaleY: g, columnHeaderHeight: h, rowHeaderWidth: p } = a, { shouldCacheUpdate: f, diffCacheBounds: m, diffX: v, diffY: y } = e;
59676
+ const { cacheCanvas: s, cacheCtx: n, mainCtx: i, topOrigin: o, leftOrigin: l, bufferEdgeX: u, bufferEdgeY: d, scaleX: c, scaleY: g, columnHeaderHeight: h, rowHeaderWidth: f } = a, { shouldCacheUpdate: p, diffCacheBounds: m, diffX: v, diffY: y } = e;
59676
59677
  n.save(), n.setTransform(1, 0, 0, 1, 0, 0), n.globalCompositeOperation = "copy", n.drawImage(s.getCanvasEle(), v * c, y * g), n.restore(), this._refreshIncrementalState = !0;
59677
59678
  const z = i.getTransform();
59678
- if (n.setTransform(z.a, z.b, z.c, z.d, 0, 0), n.translateWithPrecision(z.e / z.a - l + u, z.f / z.d - o + d), f)
59679
+ if (n.setTransform(z.a, z.b, z.c, z.d, 0, 0), n.translateWithPrecision(z.e / z.a - l + u, z.f / z.d - o + d), p)
59679
59680
  for (const _ of m) {
59680
- const { left: j, right: w, bottom: x, top: C } = _, S = j - p, F = C - h, T = w - j, R = x - C;
59681
+ const { left: j, right: w, bottom: x, top: C } = _, S = j - f, F = C - h, T = w - j, R = x - C;
59681
59682
  n.clearRectByPrecision(S, F, T, R), n.save(), n.beginPath(), n.rectByPrecision(S, F, T, R), n.closePath(), n.clip(), this.draw(n, {
59682
59683
  ...e,
59683
59684
  diffBounds: [_]
@@ -59786,11 +59787,11 @@ class GB extends $7 {
59786
59787
  const { rowColumnSegment: s, overflowCache: n, showGridlines: i, gridlinesColor: o } = a, l = a.getCurrentRowColumnSegmentMergeData(s), { startRow: u, endRow: d, startColumn: c, endColumn: g } = s;
59787
59788
  if (!a || i === t1.FALSE || this._forceDisableGridlines)
59788
59789
  return;
59789
- const { rowHeightAccumulation: h, columnTotalWidth: p, columnWidthAccumulation: f, rowTotalHeight: m } = a;
59790
- if (!h || !f || p === void 0 || m === void 0)
59790
+ const { rowHeightAccumulation: h, columnTotalWidth: f, columnWidthAccumulation: p, rowTotalHeight: m } = a;
59791
+ if (!h || !p || f === void 0 || m === void 0)
59791
59792
  return;
59792
- e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (I = o != null ? o : e.renderConfig.gridlinesColor) != null ? I : M2([214, 216, 219]);
59793
- const v = f.length, y = h.length, z = 0.4, _ = d - u + 1, j = g - c + 1, w = Math.ceil(_ * z), x = Math.ceil(j * z), C = Math.max(Math.floor(u - w), 0), S = Math.min(Math.ceil(d + w), y - 1), F = Math.min(Math.ceil(g + x), v - 1), T = Math.max(Math.floor(c - x), 0), R = f[T - 1] || 0, B = h[C - 1] || 0, A = f[F], L = h[S];
59793
+ e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (I = o != null ? o : e.renderConfig.gridlinesColor) != null ? I : R2([214, 216, 219]);
59794
+ const v = p.length, y = h.length, z = 0.4, _ = d - u + 1, j = g - c + 1, w = Math.ceil(_ * z), x = Math.ceil(j * z), C = Math.max(Math.floor(u - w), 0), S = Math.min(Math.ceil(d + w), y - 1), F = Math.min(Math.ceil(g + x), v - 1), T = Math.max(Math.floor(c - x), 0), R = p[T - 1] || 0, B = h[C - 1] || 0, A = p[F], L = h[S];
59794
59795
  e.translateWithPrecisionRatio(m2, m2), e.beginPath(), e.moveToByPrecision(R, B), e.lineToByPrecision(A, B), e.moveToByPrecision(R, B), e.lineToByPrecision(R, L), e.closePathByEnv(), e.stroke();
59795
59796
  for (let O = C; O <= S; O++) {
59796
59797
  if (O < 0 || O > y - 1)
@@ -59801,10 +59802,10 @@ class GB extends $7 {
59801
59802
  for (let O = T; O <= F; O++) {
59802
59803
  if (O < 0 || O > v - 1)
59803
59804
  continue;
59804
- const P = f[O];
59805
+ const P = p[O];
59805
59806
  e.beginPath(), e.moveToByPrecision(P, B), e.lineToByPrecision(P, L), e.closePathByEnv(), e.stroke();
59806
59807
  }
59807
- this._clearRectangle(e, h, f, l), this._clearRectangle(e, h, f, n.toNativeArray()), e.restore();
59808
+ this._clearRectangle(e, h, p, l), this._clearRectangle(e, h, p, n.toNativeArray()), e.restore();
59808
59809
  }
59809
59810
  /**
59810
59811
  * Clear the guide lines within a range in the table, to make room for merged cells and overflow.
@@ -59813,23 +59814,23 @@ class GB extends $7 {
59813
59814
  var i, o, l, u;
59814
59815
  if (n != null)
59815
59816
  for (const d of n) {
59816
- const { startRow: c, endRow: g, startColumn: h, endColumn: p } = d, f = (i = a[c - 1]) != null ? i : 0, m = (o = a[g]) != null ? o : a[a.length - 1], v = (l = s[h - 1]) != null ? l : 0, y = (u = s[p]) != null ? u : s[s.length - 1];
59817
- e.clearRectByPrecision(v, f, y - v, m - f), e.beginPath(), e.moveToByPrecision(v, f), e.lineToByPrecision(y, f), e.lineToByPrecision(y, m), e.lineToByPrecision(v, m), e.lineToByPrecision(v, f), e.stroke(), e.closePath();
59817
+ const { startRow: c, endRow: g, startColumn: h, endColumn: f } = d, p = (i = a[c - 1]) != null ? i : 0, m = (o = a[g]) != null ? o : a[a.length - 1], v = (l = s[h - 1]) != null ? l : 0, y = (u = s[f]) != null ? u : s[s.length - 1];
59818
+ e.clearRectByPrecision(v, p, y - v, m - p), e.beginPath(), e.moveToByPrecision(v, p), e.lineToByPrecision(y, p), e.lineToByPrecision(y, m), e.lineToByPrecision(v, m), e.lineToByPrecision(v, p), e.stroke(), e.closePath();
59818
59819
  }
59819
59820
  }
59820
59821
  testShowRuler(e, a) {
59821
59822
  const { cacheBound: s } = a, n = this.getSkeleton(), { rowHeaderWidth: i, columnHeaderHeight: o } = n, { left: l, top: u, right: d, bottom: c } = s, g = (v) => {
59822
59823
  const y = v % 100;
59823
59824
  return v + (100 - y);
59824
- }, h = g(l), p = g(d), f = g(u), m = g(c);
59825
+ }, h = g(l), f = g(d), p = g(u), m = g(c);
59825
59826
  e.save(), e.beginPath(), e.strokeStyle = "#000000", e.fillStyle = "#000000", e.font = "16px Arial", e.lineWidth = 1, e.textAlign = "center", e.textBaseline = "middle";
59826
- for (let v = h; v <= p; v += 50)
59827
+ for (let v = h; v <= f; v += 50)
59827
59828
  e.beginPath(), e.strokeStyle = v % 100 === 0 ? "red" : "#aaa", e.moveTo(v - i, u - o), e.lineTo(v - i, c - o), e.stroke(), e.closePath();
59828
- for (let v = f; v <= m; v += 50)
59829
+ for (let v = p; v <= m; v += 50)
59829
59830
  e.beginPath(), e.strokeStyle = v % 100 === 0 ? "red" : "#aaa", e.moveTo(l - i, v - o), e.lineTo(d - i, v - o), e.stroke(), e.closePath();
59830
59831
  e.fillStyle = "#666";
59831
- for (let v = h; v <= p; v += 100)
59832
- for (let y = f; y <= m; y += 100)
59832
+ for (let v = h; v <= f; v += 100)
59833
+ for (let y = p; y <= m; y += 100)
59833
59834
  e.fillText(`${v},${y}`, v - i, y - o);
59834
59835
  e.closePath(), e.restore();
59835
59836
  }
@@ -59848,15 +59849,15 @@ function $C(r, t, e, a) {
59848
59849
  s === l0.UserInfo && n.userInfo ? UC(r, n.userInfo, a) : s === l0.Image && n.image ? qC(r, n.image, e) : s === l0.Text && n.text && HC(r, n.text);
59849
59850
  }
59850
59851
  function UC(r, t, e) {
59851
- const { x: a, y: s, repeat: n, spacingX: i, spacingY: o, rotate: l, opacity: u, name: d, fontSize: c, color: g, bold: h, italic: p, direction: f } = t;
59852
+ const { x: a, y: s, repeat: n, spacingX: i, spacingY: o, rotate: l, opacity: u, name: d, fontSize: c, color: g, bold: h, italic: f, direction: p } = t;
59852
59853
  if (!e)
59853
59854
  return;
59854
59855
  let m = "";
59855
59856
  if (d && (m += `${e.name} `), !m)
59856
59857
  return;
59857
- r.save(), r.globalAlpha = u, r.direction = f;
59858
+ r.save(), r.globalAlpha = u, r.direction = p;
59858
59859
  let v = "";
59859
- if (p && (v += "italic "), h && (v += "bold "), v += `${c}px Arial`, r.font = v, r.fillStyle = g, n) {
59860
+ if (f && (v += "italic "), h && (v += "bold "), v += `${c}px Arial`, r.font = v, r.fillStyle = g, n) {
59860
59861
  const y = r.canvas.width, z = r.canvas.height;
59861
59862
  for (let _ = s; _ < z; _ += c + o)
59862
59863
  for (let j = a; j < y; j += r.measureText(m).width + i)
@@ -59866,10 +59867,10 @@ function UC(r, t, e) {
59866
59867
  r.restore();
59867
59868
  }
59868
59869
  function HC(r, t) {
59869
- const { x: e, y: a, repeat: s, spacingX: n, spacingY: i, rotate: o, opacity: l, content: u, fontSize: d, color: c, bold: g, italic: h, direction: p } = t;
59870
- r.save(), r.globalAlpha = l, r.direction = p;
59871
- let f = "";
59872
- if (h && (f += "italic "), g && (f += "bold "), f += `${d}px Arial`, r.font = f, r.fillStyle = c, u)
59870
+ const { x: e, y: a, repeat: s, spacingX: n, spacingY: i, rotate: o, opacity: l, content: u, fontSize: d, color: c, bold: g, italic: h, direction: f } = t;
59871
+ r.save(), r.globalAlpha = l, r.direction = f;
59872
+ let p = "";
59873
+ if (h && (p += "italic "), g && (p += "bold "), p += `${d}px Arial`, r.font = p, r.fillStyle = c, u)
59873
59874
  if (s) {
59874
59875
  const m = r.canvas.width, v = r.canvas.height;
59875
59876
  for (let y = a; y < v; y += d + i)
@@ -59884,14 +59885,14 @@ function qC(r, t, e) {
59884
59885
  if (!(e != null && e.complete))
59885
59886
  return;
59886
59887
  r.save(), r.globalAlpha = u;
59887
- const p = d, f = g ? d / h : c;
59888
+ const f = d, p = g ? d / h : c;
59888
59889
  if (n) {
59889
59890
  const m = r.canvas.width, v = r.canvas.height;
59890
- for (let y = s; y < v; y += f + o)
59891
- for (let z = a; z < m; z += p + i)
59892
- r.save(), r.translate(z, y), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, p, f), r.restore();
59891
+ for (let y = s; y < v; y += p + o)
59892
+ for (let z = a; z < m; z += f + i)
59893
+ r.save(), r.translate(z, y), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, f, p), r.restore();
59893
59894
  } else
59894
- r.save(), r.translate(a, s), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, p, f), r.restore();
59895
+ r.save(), r.translate(a, s), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, f, p), r.restore();
59895
59896
  r.restore();
59896
59897
  }
59897
59898
  class j8 extends D2 {
@@ -60312,7 +60313,7 @@ class VB extends GC {
60312
60313
  });
60313
60314
  }
60314
60315
  _getArrowColor(e = !1) {
60315
- return e ? M2(y6.white, 0.8) : M2(y6.white, 0.5);
60316
+ return e ? R2(y6.white, 0.8) : R2(y6.white, 0.5);
60316
60317
  }
60317
60318
  }
60318
60319
  const YC = "rgba(198, 198, 198, 1)", XC = "rgba(255, 255, 255, 1)", VC = "rgba(158, 158, 158, 1)";
@@ -60337,10 +60338,10 @@ class w8 extends y8 {
60337
60338
  const { pages: o } = s;
60338
60339
  let l = 0, u = 0;
60339
60340
  for (let g = 0, h = o.length; g < h; g++) {
60340
- const p = o[g];
60341
- if (this.isSkipByDiffBounds(p, l, u, a)) {
60341
+ const f = o[g];
60342
+ if (this.isSkipByDiffBounds(f, l, u, a)) {
60342
60343
  const { x: R, y: B } = this._drawLiquid.translatePage(
60343
- p,
60344
+ f,
60344
60345
  this.pageLayoutType,
60345
60346
  this.pageMarginLeft,
60346
60347
  this.pageMarginTop
@@ -60348,10 +60349,10 @@ class w8 extends y8 {
60348
60349
  u += R, l += B;
60349
60350
  continue;
60350
60351
  }
60351
- const { width: f, pageWidth: m, height: v, pageHeight: y, originMarginTop: z, originMarginBottom: _, marginLeft: j, marginRight: w } = p;
60352
+ const { width: p, pageWidth: m, height: v, pageHeight: y, originMarginTop: z, originMarginBottom: _, marginLeft: j, marginRight: w } = f;
60352
60353
  e.save(), e.translate(u - 0.5, l - 0.5);
60353
60354
  const x = {
60354
- width: m != null ? m : f,
60355
+ width: m != null ? m : p,
60355
60356
  height: y != null ? y : v,
60356
60357
  strokeWidth: 1,
60357
60358
  stroke: YC,
@@ -60402,7 +60403,7 @@ class w8 extends y8 {
60402
60403
  };
60403
60404
  Y1.drawWith(e, S), e.restore();
60404
60405
  const { x: F, y: T } = this._drawLiquid.translatePage(
60405
- p,
60406
+ f,
60406
60407
  this.pageLayoutType,
60407
60408
  this.pageMarginLeft,
60408
60409
  this.pageMarginTop
@@ -60529,8 +60530,8 @@ function iE(r, t) {
60529
60530
  const { left: u, top: d, width: c, height: g } = r.getBoundingClientRect();
60530
60531
  if (o || t(), !c || !g)
60531
60532
  return;
60532
- const h = G0(d), p = G0(s.clientWidth - (u + c)), f = G0(s.clientHeight - (d + g)), m = G0(u), y = {
60533
- rootMargin: `${-h}px ${-p}px ${-f}px ${-m}px`,
60533
+ const h = G0(d), f = G0(s.clientWidth - (u + c)), p = G0(s.clientHeight - (d + g)), m = G0(u), y = {
60534
+ rootMargin: `${-h}px ${-f}px ${-p}px ${-m}px`,
60534
60535
  threshold: ZC(0, KC(1, l)) || 1
60535
60536
  };
60536
60537
  let z = !0;
@@ -61376,8 +61377,8 @@ const pE = "engine-render.config", n7 = {}, b2 = class b2 extends D2 {
61376
61377
  }
61377
61378
  // eslint-disable-next-line max-lines-per-function
61378
61379
  attachControl(e) {
61379
- var d, c, g, h, p, f;
61380
- const a = (d = e == null ? void 0 : e.enableDown) != null ? d : !0, s = (c = e == null ? void 0 : e.enableUp) != null ? c : !0, n = (g = e == null ? void 0 : e.enableMove) != null ? g : !0, i = (h = e == null ? void 0 : e.enableWheel) != null ? h : !0, o = (p = e == null ? void 0 : e.enableEnter) != null ? p : !0, l = (f = e == null ? void 0 : e.enableLeave) != null ? f : !0, u = this._scene.getEngine();
61380
+ var d, c, g, h, f, p;
61381
+ const a = (d = e == null ? void 0 : e.enableDown) != null ? d : !0, s = (c = e == null ? void 0 : e.enableUp) != null ? c : !0, n = (g = e == null ? void 0 : e.enableMove) != null ? g : !0, i = (h = e == null ? void 0 : e.enableWheel) != null ? h : !0, o = (f = e == null ? void 0 : e.enableEnter) != null ? f : !0, l = (p = e == null ? void 0 : e.enableLeave) != null ? p : !0, u = this._scene.getEngine();
61381
61382
  u && (this._onInput$ = u.onInputChanged$.subscribeEvent((m) => {
61382
61383
  const v = m;
61383
61384
  if (m.deviceType === d2.Keyboard)
@@ -61726,7 +61727,7 @@ class DE extends D2 {
61726
61727
  }
61727
61728
  // eslint-disable-next-line max-lines-per-function, complexity
61728
61729
  _getConfig(e) {
61729
- var O, P, N, $, H, X, Q, g1, u1, a1, i1, h1, p1, D1, m1, j1, $1, y1, C1, I1, H1, R2, O2, q1, s2, e2, M1, L1, n2;
61730
+ var O, P, N, $, H, X, Q, g1, u1, a1, i1, h1, p1, D1, m1, j1, $1, y1, C1, I1, H1, O2, I2, q1, s2, e2, M1, L1, n2;
61730
61731
  const a = e.transformerConfig;
61731
61732
  let {
61732
61733
  isCropper: s,
@@ -61739,8 +61740,8 @@ class DE extends D2 {
61739
61740
  rotationSnapTolerance: c,
61740
61741
  rotateAnchorOffset: g,
61741
61742
  rotateSize: h,
61742
- rotateCornerRadius: p,
61743
- borderEnabled: f,
61743
+ rotateCornerRadius: f,
61744
+ borderEnabled: p,
61744
61745
  borderStroke: m,
61745
61746
  borderStrokeWidth: v,
61746
61747
  borderDash: y,
@@ -61759,7 +61760,7 @@ class DE extends D2 {
61759
61760
  useSingleNodeRotation: L,
61760
61761
  shouldOverdrawWholeArea: I
61761
61762
  } = this;
61762
- return a != null && (s = (O = a.isCropper) != null ? O : s, n = (P = a.hoverEnabled) != null ? P : n, i = (N = a.hoverEnterFunc) != null ? N : i, o = ($ = a.hoverLeaveFunc) != null ? $ : o, l = (H = a.resizeEnabled) != null ? H : l, u = (X = a.rotateEnabled) != null ? X : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (g1 = a.rotationSnapTolerance) != null ? g1 : c, g = (u1 = a.rotateAnchorOffset) != null ? u1 : g, h = (a1 = a.rotateSize) != null ? a1 : h, p = (i1 = a.rotateCornerRadius) != null ? i1 : p, f = (h1 = a.borderEnabled) != null ? h1 : f, m = (p1 = a.borderStroke) != null ? p1 : m, v = (D1 = a.borderStrokeWidth) != null ? D1 : v, y = (m1 = a.borderDash) != null ? m1 : y, z = (j1 = a.borderSpacing) != null ? j1 : z, _ = ($1 = a.anchorFill) != null ? $1 : _, j = (y1 = a.anchorStroke) != null ? y1 : j, w = (C1 = a.anchorStrokeWidth) != null ? C1 : w, x = (I1 = a.anchorSize) != null ? I1 : x, C = (H1 = a.anchorCornerRadius) != null ? H1 : C, S = (R2 = a.keepRatio) != null ? R2 : S, F = (O2 = a.centeredScaling) != null ? O2 : F, T = (q1 = a.enabledAnchors) != null ? q1 : T, R = (s2 = a.flipEnabled) != null ? s2 : R, B = (e2 = a.ignoreStroke) != null ? e2 : B, A = (M1 = a.boundBoxFunc) != null ? M1 : A, L = (L1 = a.useSingleNodeRotation) != null ? L1 : L, I = (n2 = a.shouldOverdrawWholeArea) != null ? n2 : I), {
61763
+ return a != null && (s = (O = a.isCropper) != null ? O : s, n = (P = a.hoverEnabled) != null ? P : n, i = (N = a.hoverEnterFunc) != null ? N : i, o = ($ = a.hoverLeaveFunc) != null ? $ : o, l = (H = a.resizeEnabled) != null ? H : l, u = (X = a.rotateEnabled) != null ? X : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (g1 = a.rotationSnapTolerance) != null ? g1 : c, g = (u1 = a.rotateAnchorOffset) != null ? u1 : g, h = (a1 = a.rotateSize) != null ? a1 : h, f = (i1 = a.rotateCornerRadius) != null ? i1 : f, p = (h1 = a.borderEnabled) != null ? h1 : p, m = (p1 = a.borderStroke) != null ? p1 : m, v = (D1 = a.borderStrokeWidth) != null ? D1 : v, y = (m1 = a.borderDash) != null ? m1 : y, z = (j1 = a.borderSpacing) != null ? j1 : z, _ = ($1 = a.anchorFill) != null ? $1 : _, j = (y1 = a.anchorStroke) != null ? y1 : j, w = (C1 = a.anchorStrokeWidth) != null ? C1 : w, x = (I1 = a.anchorSize) != null ? I1 : x, C = (H1 = a.anchorCornerRadius) != null ? H1 : C, S = (O2 = a.keepRatio) != null ? O2 : S, F = (I2 = a.centeredScaling) != null ? I2 : F, T = (q1 = a.enabledAnchors) != null ? q1 : T, R = (s2 = a.flipEnabled) != null ? s2 : R, B = (e2 = a.ignoreStroke) != null ? e2 : B, A = (M1 = a.boundBoxFunc) != null ? M1 : A, L = (L1 = a.useSingleNodeRotation) != null ? L1 : L, I = (n2 = a.shouldOverdrawWholeArea) != null ? n2 : I), {
61763
61764
  isCropper: s,
61764
61765
  hoverEnabled: n,
61765
61766
  hoverEnterFunc: i,
@@ -61770,8 +61771,8 @@ class DE extends D2 {
61770
61771
  rotationSnapTolerance: c,
61771
61772
  rotateAnchorOffset: g,
61772
61773
  rotateSize: h,
61773
- rotateCornerRadius: p,
61774
- borderEnabled: f,
61774
+ rotateCornerRadius: f,
61775
+ borderEnabled: p,
61775
61776
  borderStroke: m,
61776
61777
  borderStrokeWidth: v,
61777
61778
  borderDash: y,
@@ -61815,14 +61816,14 @@ class DE extends D2 {
61815
61816
  type: 0
61816
61817
  /* MOVE_START */
61817
61818
  })), this._moveBufferSkip = !1;
61818
- const h = u.onPointerMove$.subscribeEvent((f) => {
61819
- const { offsetX: m, offsetY: v } = f;
61819
+ const h = u.onPointerMove$.subscribeEvent((p) => {
61820
+ const { offsetX: m, offsetY: v } = p;
61820
61821
  this._moving(m, v, d, l), !l && this._clearControlMap(), d.scrolling(m, v, () => {
61821
61822
  this._moving(m, v, d, l);
61822
61823
  });
61823
- }), p = u.onPointerUp$.subscribeEvent((f) => {
61824
- h == null || h.unsubscribe(), p == null || p.unsubscribe(), u.enableObjectsEvent(), !l && this.refreshControls(), d.dispose();
61825
- const { offsetX: m, offsetY: v } = f;
61824
+ }), f = u.onPointerUp$.subscribeEvent((p) => {
61825
+ h == null || h.unsubscribe(), f == null || f.unsubscribe(), u.enableObjectsEvent(), !l && this.refreshControls(), d.dispose();
61826
+ const { offsetX: m, offsetY: v } = p;
61826
61827
  l ? this._changeEnd$.next({
61827
61828
  objects: /* @__PURE__ */ new Map([[e.oKey, e]]),
61828
61829
  type: 2,
@@ -61866,7 +61867,7 @@ class DE extends D2 {
61866
61867
  }
61867
61868
  _moving(e, a, s, n = !1) {
61868
61869
  const { scrollX: i, scrollY: o } = B0(s), l = e - this._viewportScrollX + i, u = a - this._viewportScrollY + o, { ancestorScaleX: d, ancestorScaleY: c, ancestorLeft: g, ancestorTop: h } = this._scene;
61869
- let p = this._smoothAccuracy((l - this._startOffsetX) / d, n), f = this._smoothAccuracy((u - this._startOffsetY) / c, n);
61870
+ let f = this._smoothAccuracy((l - this._startOffsetX) / d, n), p = this._smoothAccuracy((u - this._startOffsetY) / c, n);
61870
61871
  if (this._moveBufferBlocker(e, a))
61871
61872
  return;
61872
61873
  const m = this._getTopScene();
@@ -61875,11 +61876,11 @@ class DE extends D2 {
61875
61876
  const { width: v, height: y } = m;
61876
61877
  if (n) {
61877
61878
  if (this._copperSelectedObject) {
61878
- const z = this._copperSelectedObject, _ = this._checkMoveBoundary(z, p, f, g, h, v, y);
61879
- p = _.moveLeft, f = _.moveTop, z.translate(p + z.left, f + z.top), this._changing$.next({
61879
+ const z = this._copperSelectedObject, _ = this._checkMoveBoundary(z, f, p, g, h, v, y);
61880
+ f = _.moveLeft, p = _.moveTop, z.translate(f + z.left, p + z.top), this._changing$.next({
61880
61881
  objects: /* @__PURE__ */ new Map([[z.oKey, z]]),
61881
- moveX: p,
61882
- moveY: f,
61882
+ moveX: f,
61883
+ moveY: p,
61883
61884
  type: 1,
61884
61885
  offsetX: e,
61885
61886
  offsetY: a
@@ -61890,21 +61891,21 @@ class DE extends D2 {
61890
61891
  for (let _ = 0; _ < z.length; _++) {
61891
61892
  const j = z[_], w = this._checkMoveBoundary(
61892
61893
  j,
61893
- p,
61894
61894
  f,
61895
+ p,
61895
61896
  g,
61896
61897
  h,
61897
61898
  v,
61898
61899
  y
61899
61900
  );
61900
- p = w.moveLeft, f = w.moveTop;
61901
+ f = w.moveLeft, p = w.moveTop;
61901
61902
  }
61902
61903
  this._selectedObjectMap.forEach((_) => {
61903
- _.translate(p + _.left, f + _.top);
61904
+ _.translate(f + _.left, p + _.top);
61904
61905
  }), this._changing$.next({
61905
61906
  objects: this._selectedObjectMap,
61906
- moveX: p,
61907
- moveY: f,
61907
+ moveX: f,
61908
+ moveY: p,
61908
61909
  type: 1,
61909
61910
  offsetX: e,
61910
61911
  offsetY: a
@@ -61925,8 +61926,8 @@ class DE extends D2 {
61925
61926
  type: 1,
61926
61927
  offsetX: a,
61927
61928
  offsetY: s
61928
- })) : (this._selectedObjectMap.forEach((p) => {
61929
- this._moveFunc(p, e, c, g, i, o, h);
61929
+ })) : (this._selectedObjectMap.forEach((f) => {
61930
+ this._moveFunc(f, e, c, g, i, o, h);
61930
61931
  }), this._changing$.next({
61931
61932
  objects: this._selectedObjectMap,
61932
61933
  type: 1,
@@ -61935,34 +61936,34 @@ class DE extends D2 {
61935
61936
  })), i && e !== "__SpreadsheetTransformerResizeCT__" && e !== "__SpreadsheetTransformerResizeCB__" && e !== "__SpreadsheetTransformerResizeLM__" && e !== "__SpreadsheetTransformerResizeRM__" && !h || (this._startOffsetX = c, this._startOffsetY = g);
61936
61937
  }
61937
61938
  _moveFunc(e, a, s, n, i, o = !1, l = !1) {
61938
- const { left: u, top: d, width: c, height: g, angle: h } = e, p = this._startStateMap.get(e.oKey) || {};
61939
- let f = {};
61939
+ const { left: u, top: d, width: c, height: g, angle: h } = e, f = this._startStateMap.get(e.oKey) || {};
61940
+ let p = {};
61940
61941
  const { moveLeft: m, moveTop: v } = this._getMovePoint(s, n, e);
61941
61942
  if (i && a !== "__SpreadsheetTransformerResizeCT__" && a !== "__SpreadsheetTransformerResizeCB__" && a !== "__SpreadsheetTransformerResizeLM__" && a !== "__SpreadsheetTransformerResizeRM__" && !l)
61942
61943
  switch (a) {
61943
61944
  case "__SpreadsheetTransformerResizeLT__":
61944
- f = this._resizeLeftTop(e, m, v, p);
61945
+ p = this._resizeLeftTop(e, m, v, f);
61945
61946
  break;
61946
61947
  case "__SpreadsheetTransformerResizeRT__":
61947
- f = this._resizeRightTop(e, m, v, p);
61948
+ p = this._resizeRightTop(e, m, v, f);
61948
61949
  break;
61949
61950
  case "__SpreadsheetTransformerResizeLB__":
61950
- f = this._resizeLeftBottom(e, m, v, p);
61951
+ p = this._resizeLeftBottom(e, m, v, f);
61951
61952
  break;
61952
61953
  case "__SpreadsheetTransformerResizeRB__":
61953
- f = this._resizeRightBottom(e, m, v, p);
61954
+ p = this._resizeRightBottom(e, m, v, f);
61954
61955
  break;
61955
61956
  }
61956
61957
  else
61957
- f = this._updateCloseKeepRatioState(a, u, d, c, g, m, v);
61958
- e.transformByState(this._applyRotationForResult(f, { left: u, top: d, width: c, height: g }, h, o));
61958
+ p = this._updateCloseKeepRatioState(a, u, d, c, g, m, v);
61959
+ e.transformByState(this._applyRotationForResult(p, { left: u, top: d, width: c, height: g }, h, o));
61959
61960
  }
61960
61961
  _getMovePoint(e, a, s) {
61961
- const { ancestorScaleX: n, ancestorScaleY: i } = this._scene, { left: o, top: l, width: u, height: d, angle: c } = s, g = o + u / 2, h = l + d / 2, p = new U(g, h), f = new U(e, a);
61962
- f.rotateByPoint(J1(-c), p);
61962
+ const { ancestorScaleX: n, ancestorScaleY: i } = this._scene, { left: o, top: l, width: u, height: d, angle: c } = s, g = o + u / 2, h = l + d / 2, f = new U(g, h), p = new U(e, a);
61963
+ p.rotateByPoint(J1(-c), f);
61963
61964
  const m = new U(this._startOffsetX, this._startOffsetY);
61964
- m.rotateByPoint(J1(-c), p);
61965
- const v = (f.x - m.x) / n, y = (f.y - m.y) / i;
61965
+ m.rotateByPoint(J1(-c), f);
61966
+ const v = (p.x - m.x) / n, y = (p.y - m.y) / i;
61966
61967
  return {
61967
61968
  moveLeft: v,
61968
61969
  moveTop: y
@@ -61974,7 +61975,7 @@ class DE extends D2 {
61974
61975
  _applyRotationForResult(e, a, s, n = !1) {
61975
61976
  if (s === 0)
61976
61977
  return e;
61977
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e, { left: d = 0, top: c = 0, width: g = 0, height: h = 0 } = a, p = g / 2, f = h / 2, m = l / 2 + i - d, v = u / 2 + o - c, y = W4(new U(p, f), s, new U(i, o), new U(m, v));
61978
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e, { left: d = 0, top: c = 0, width: g = 0, height: h = 0 } = a, f = g / 2, p = h / 2, m = l / 2 + i - d, v = u / 2 + o - c, y = W4(new U(f, p), s, new U(i, o), new U(m, v));
61978
61979
  return {
61979
61980
  width: this._smoothAccuracy(l, n),
61980
61981
  height: this._smoothAccuracy(u, n),
@@ -62021,8 +62022,8 @@ class DE extends D2 {
62021
62022
  };
62022
62023
  }
62023
62024
  _resizeLeftTop(e, a, s, n) {
62024
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLtRb(a, s, d, c, p);
62025
- let v = d - f, y = c - m;
62025
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLtRb(a, s, d, c, f);
62026
+ let v = d - p, y = c - m;
62026
62027
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62027
62028
  return v < z && (v = z), y < _ && (y = _), {
62028
62029
  left: i + l - v,
@@ -62032,8 +62033,8 @@ class DE extends D2 {
62032
62033
  };
62033
62034
  }
62034
62035
  _resizeRightBottom(e, a, s, n) {
62035
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLtRb(a, s, d, c, p);
62036
- let v = d + f, y = c + m;
62036
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLtRb(a, s, d, c, f);
62037
+ let v = d + p, y = c + m;
62037
62038
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62038
62039
  return v < z && (v = z), y < _ && (y = _), {
62039
62040
  left: i,
@@ -62043,8 +62044,8 @@ class DE extends D2 {
62043
62044
  };
62044
62045
  }
62045
62046
  _resizeLeftBottom(e, a, s, n) {
62046
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLbRt(a, s, d, c, p);
62047
- let v = d - f, y = c + m;
62047
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLbRt(a, s, d, c, f);
62048
+ let v = d - p, y = c + m;
62048
62049
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62049
62050
  return v < z && (v = z), y < _ && (y = _), {
62050
62051
  left: i + l - v,
@@ -62054,8 +62055,8 @@ class DE extends D2 {
62054
62055
  };
62055
62056
  }
62056
62057
  _resizeRightTop(e, a, s, n) {
62057
- const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, p = d / c, { moveLeft: f, moveTop: m } = this._fixMoveLbRt(a, s, d, c, p);
62058
- let v = d + f, y = c - m;
62058
+ const { left: i = 0, top: o = 0, width: l = 0, height: u = 0 } = e.getState(), { width: d = l, height: c = u, left: g = i, top: h = o } = n, f = d / c, { moveLeft: p, moveTop: m } = this._fixMoveLbRt(a, s, d, c, f);
62059
+ let v = d + p, y = c - m;
62059
62060
  const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
62060
62061
  return v < z && (v = z), y < _ && (y = _), {
62061
62062
  left: i,
@@ -62092,9 +62093,9 @@ class DE extends D2 {
62092
62093
  u.disableObjectsEvent();
62093
62094
  const g = ye.create(u);
62094
62095
  g.startScroll(o, l);
62095
- const { scrollX: h, scrollY: p } = B0(g);
62096
- this._viewportScrollX = h, this._viewportScrollY = p;
62097
- const { ancestorLeft: f, ancestorTop: m } = this._scene, { width: v, height: y } = u, z = this._getRotateAnchorCursor(a);
62096
+ const { scrollX: h, scrollY: f } = B0(g);
62097
+ this._viewportScrollX = h, this._viewportScrollY = f;
62098
+ const { ancestorLeft: p, ancestorTop: m } = this._scene, { width: v, height: y } = u, z = this._getRotateAnchorCursor(a);
62098
62099
  if (!c)
62099
62100
  this._clearControlMap(), this._changeStart$.next({
62100
62101
  objects: this._selectedObjectMap,
@@ -62122,12 +62123,12 @@ class DE extends D2 {
62122
62123
  var x, C;
62123
62124
  (x = this._topScenePointerMoveSub) == null || x.unsubscribe(), (C = this._topScenePointerUpSub) == null || C.unsubscribe(), u.enableObjectsEvent(), u.resetCursor(), g.dispose(), this._startStateMap.clear();
62124
62125
  const { offsetX: j, offsetY: w } = _;
62125
- c ? (this._recoverySizeBoundary([s], f, m, v, y), this._changeEnd$.next({
62126
+ c ? (this._recoverySizeBoundary([s], p, m, v, y), this._changeEnd$.next({
62126
62127
  objects: /* @__PURE__ */ new Map([[s.oKey, s]]),
62127
62128
  type: 2,
62128
62129
  offsetX: j,
62129
62130
  offsetY: w
62130
- })) : (this._recoverySizeBoundary(Array.from(this._selectedObjectMap.values()), f, m, v, y), this._changeEnd$.next({
62131
+ })) : (this._recoverySizeBoundary(Array.from(this._selectedObjectMap.values()), p, m, v, y), this._changeEnd$.next({
62131
62132
  objects: this._selectedObjectMap,
62132
62133
  type: 2,
62133
62134
  offsetX: j,
@@ -62159,7 +62160,7 @@ class DE extends D2 {
62159
62160
  const d = this._getRotateAnchorCursor(
62160
62161
  "__SpreadsheetTransformerRotateLine__"
62161
62162
  /* ROTATE_LINE */
62162
- ), { ancestorLeft: c, ancestorTop: g, width: h, height: p, angle: f } = a, m = h / 2 + c, v = p / 2 + g;
62163
+ ), { ancestorLeft: c, ancestorTop: g, width: h, height: f, angle: p } = a, m = h / 2 + c, v = f / 2 + g;
62163
62164
  this._clearControlMap(), this._changeStart$.next({
62164
62165
  objects: this._selectedObjectMap,
62165
62166
  type: 0
@@ -62167,7 +62168,7 @@ class DE extends D2 {
62167
62168
  }), this._moveBufferSkip = !1;
62168
62169
  const y = l.onPointerMove$.subscribeEvent((_) => {
62169
62170
  const { offsetX: j, offsetY: w } = _;
62170
- this._rotateMoving(j, w, m, v, f), l.setCursor(d);
62171
+ this._rotateMoving(j, w, m, v, p), l.setCursor(d);
62171
62172
  }), z = l.onPointerUp$.subscribeEvent((_) => {
62172
62173
  y == null || y.unsubscribe(), z == null || z.unsubscribe(), l.enableObjectsEvent(), l.resetCursor(), this.refreshControls();
62173
62174
  const { offsetX: j, offsetY: w } = _;
@@ -62324,7 +62325,7 @@ class DE extends D2 {
62324
62325
  };
62325
62326
  }
62326
62327
  _createResizeAnchor(e, a, s) {
62327
- const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorCornerRadius: g, anchorSize: h } = this._getConfig(a), { left: p, top: f } = this._getRotateAnchorPosition(e, n, i, a), m = this._getRotateAnchorCursor(e), v = new R1(`${e}_${s}`, {
62328
+ const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorCornerRadius: g, anchorSize: h } = this._getConfig(a), { left: f, top: p } = this._getRotateAnchorPosition(e, n, i, a), m = this._getRotateAnchorCursor(e), v = new R1(`${e}_${s}`, {
62328
62329
  zIndex: s - 1,
62329
62330
  fill: u,
62330
62331
  stroke: d,
@@ -62332,13 +62333,13 @@ class DE extends D2 {
62332
62333
  width: h,
62333
62334
  height: h,
62334
62335
  radius: g,
62335
- left: p,
62336
- top: f
62336
+ left: f,
62337
+ top: p
62337
62338
  });
62338
62339
  return this._attachHover(v, m, f1.DEFAULT), v;
62339
62340
  }
62340
62341
  _createCopperResizeAnchor(e, a, s) {
62341
- const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorSize: g } = this._getConfig(a), { left: h, top: p } = this._getCopperAnchorPosition(e, n, i, a), f = this._getRotateAnchorCursor(e);
62342
+ const { height: n = 0, width: i = 0, scaleX: o = 1, scaleY: l = 1 } = a.getState(), { anchorFill: u, anchorStroke: d, anchorStrokeWidth: c, anchorSize: g } = this._getConfig(a), { left: h, top: f } = this._getCopperAnchorPosition(e, n, i, a), p = this._getRotateAnchorCursor(e);
62342
62343
  let m;
62343
62344
  const v = `${e}_${s}`, y = {
62344
62345
  zIndex: s - 1,
@@ -62348,9 +62349,9 @@ class DE extends D2 {
62348
62349
  width: g,
62349
62350
  height: g,
62350
62351
  left: h,
62351
- top: p
62352
+ top: f
62352
62353
  }, z = g, _ = g / 4;
62353
- return f === f1.EAST_RESIZE ? (y.width = _, y.height = z, m = new R1(v, y)) : f === f1.WEST_RESIZE ? (y.width = _, y.height = z, m = new R1(v, y)) : f === f1.NORTH_RESIZE ? (y.width = z, y.height = _, m = new R1(v, y)) : f === f1.SOUTH_RESIZE ? (y.width = z, y.height = _, m = new R1(v, y)) : f === f1.NORTH_EAST_RESIZE ? (y.pointsGroup = this._getNorthEastPoints(z, _), m = new O3(v, y)) : f === f1.NORTH_WEST_RESIZE ? (y.pointsGroup = this._getNorthWestPoints(z, _), m = new O3(v, y)) : f === f1.SOUTH_EAST_RESIZE ? (y.pointsGroup = this._getSouthEastPoints(z, _), m = new O3(v, y)) : f === f1.SOUTH_WEST_RESIZE && (y.pointsGroup = this._getSouthWestPoints(z, _), m = new O3(v, y)), this._attachHover(m, f, f1.DEFAULT), m;
62354
+ return p === f1.EAST_RESIZE ? (y.width = _, y.height = z, m = new R1(v, y)) : p === f1.WEST_RESIZE ? (y.width = _, y.height = z, m = new R1(v, y)) : p === f1.NORTH_RESIZE ? (y.width = z, y.height = _, m = new R1(v, y)) : p === f1.SOUTH_RESIZE ? (y.width = z, y.height = _, m = new R1(v, y)) : p === f1.NORTH_EAST_RESIZE ? (y.pointsGroup = this._getNorthEastPoints(z, _), m = new O3(v, y)) : p === f1.NORTH_WEST_RESIZE ? (y.pointsGroup = this._getNorthWestPoints(z, _), m = new O3(v, y)) : p === f1.SOUTH_EAST_RESIZE ? (y.pointsGroup = this._getSouthEastPoints(z, _), m = new O3(v, y)) : p === f1.SOUTH_WEST_RESIZE && (y.pointsGroup = this._getSouthWestPoints(z, _), m = new O3(v, y)), this._attachHover(m, p, f1.DEFAULT), m;
62354
62355
  }
62355
62356
  _getNorthEastPoints(e, a) {
62356
62357
  const s = e - a;
@@ -62520,11 +62521,11 @@ class DE extends D2 {
62520
62521
  }), this._transformerControlMap.clear();
62521
62522
  }
62522
62523
  _createControl(e, a = !0) {
62523
- const { left: s = 0, top: n = 0, height: i = 0, width: o = 0 } = e.getState(), l = e.angle, { isCropper: u, resizeEnabled: d, rotateEnabled: c, rotateAnchorOffset: g, rotateSize: h, rotateCornerRadius: p, borderEnabled: f, borderStroke: m, borderStrokeWidth: v, borderSpacing: y, enabledAnchors: z } = this._getConfig(e);
62524
+ const { left: s = 0, top: n = 0, height: i = 0, width: o = 0 } = e.getState(), l = e.angle, { isCropper: u, resizeEnabled: d, rotateEnabled: c, rotateAnchorOffset: g, rotateSize: h, rotateCornerRadius: f, borderEnabled: p, borderStroke: m, borderStrokeWidth: v, borderSpacing: y, enabledAnchors: z } = this._getConfig(e);
62524
62525
  if (a && u)
62525
62526
  return;
62526
62527
  const _ = e.oKey, j = this._selectedObjectMap.size + e.maxZIndex + zE, w = e.getLayerIndex() || yE, x = [];
62527
- if (f && !u) {
62528
+ if (p && !u) {
62528
62529
  const F = new R1(`__SpreadsheetTransformerOutline___${j}`, {
62529
62530
  zIndex: j - 1,
62530
62531
  evented: !1,
@@ -62560,7 +62561,7 @@ class DE extends D2 {
62560
62561
  top: A,
62561
62562
  height: h,
62562
62563
  width: h,
62563
- radius: p,
62564
+ radius: f,
62564
62565
  strokeWidth: v * 2,
62565
62566
  stroke: m
62566
62567
  });
@@ -64234,7 +64235,7 @@ class QB {
64234
64235
  bottom: d.y
64235
64236
  };
64236
64237
  this._viewBound = c;
64237
- const g = this._preViewBound, h = this._diffViewBound(c, g), p = ((g == null ? void 0 : g.left) || 0) - c.left, f = ((g == null ? void 0 : g.top) || 0) - c.top, m = {
64238
+ const g = this._preViewBound, h = this._diffViewBound(c, g), f = ((g == null ? void 0 : g.left) || 0) - c.left, p = ((g == null ? void 0 : g.top) || 0) - c.top, m = {
64238
64239
  top: o,
64239
64240
  left: n,
64240
64241
  bottom: l,
@@ -64242,13 +64243,13 @@ class QB {
64242
64243
  }, v = this.expandBounds(c);
64243
64244
  this.cacheBound = v, this.preCacheBound || (this.preCacheBound = this.expandBounds(c));
64244
64245
  let y = [];
64245
- this._preCacheVisibleBound && (p < 0 ? this._preCacheVisibleBound.left -= p : p > 0 && (this._preCacheVisibleBound.right -= p), f < 0 ? this._preCacheVisibleBound.top -= f : f > 0 && (this._preCacheVisibleBound.bottom -= f));
64246
- const z = this.expandBounds(m), _ = this._calcCacheUpdate(c, this._preCacheVisibleBound, p, f);
64246
+ this._preCacheVisibleBound && (f < 0 ? this._preCacheVisibleBound.left -= f : f > 0 && (this._preCacheVisibleBound.right -= f), p < 0 ? this._preCacheVisibleBound.top -= p : p > 0 && (this._preCacheVisibleBound.bottom -= p));
64247
+ const z = this.expandBounds(m), _ = this._calcCacheUpdate(c, this._preCacheVisibleBound, f, p);
64247
64248
  return _ && (y = this._calcDiffCacheBound(this._preCacheBound, v)), {
64248
64249
  viewBound: c,
64249
64250
  diffBounds: h,
64250
- diffX: p,
64251
- diffY: f,
64251
+ diffX: f,
64252
+ diffY: p,
64252
64253
  viewPortPosition: m,
64253
64254
  viewportKey: this.viewportKey,
64254
64255
  isDirty: this.isDirty ? 2 : 0,
@@ -64491,7 +64492,7 @@ class QB {
64491
64492
  * @param isTrigger
64492
64493
  */
64493
64494
  _scrollToViewportPosCore(t, e = !0) {
64494
- var c, g, h, p, f;
64495
+ var c, g, h, f, p;
64495
64496
  if (this._scrollBar == null)
64496
64497
  return;
64497
64498
  let a = (c = t.viewportScrollX) != null ? c : this.viewportScrollX, s = (g = t.viewportScrollY) != null ? g : this.viewportScrollY;
@@ -64509,9 +64510,9 @@ class QB {
64509
64510
  rawScrollX: n.x,
64510
64511
  rawScrollY: n.y,
64511
64512
  limitX: (h = this._scrollBar) == null ? void 0 : h.limitX,
64512
- limitY: (p = this._scrollBar) == null ? void 0 : p.limitY
64513
+ limitY: (f = this._scrollBar) == null ? void 0 : f.limitY
64513
64514
  };
64514
- return (f = this._scrollBar) == null || f.makeDirty(!0), this.onScrollAfter$.emitEvent(d), this._emitScrollEnd$(d), i;
64515
+ return (p = this._scrollBar) == null || p.makeDirty(!0), this.onScrollAfter$.emitEvent(d), this._emitScrollEnd$(d), i;
64515
64516
  }
64516
64517
  expandBounds(t) {
64517
64518
  return {
@@ -66506,7 +66507,7 @@ export {
66506
66507
  NT as DRAWING_OBJECT_LOWER_LAYER_INDEX,
66507
66508
  UT as DRAWING_OBJECT_UPPER_LAYER_INDEX,
66508
66509
  _8 as DashedRect,
66509
- P2 as DataStreamTreeNode,
66510
+ N2 as DataStreamTreeNode,
66510
66511
  Xv as DeviceInputEventType,
66511
66512
  d2 as DeviceType,
66512
66513
  w8 as DocBackground,
@@ -66632,7 +66633,7 @@ export {
66632
66633
  sB as getCellByIndexWithMergeInfo,
66633
66634
  Ov as getCellPositionByIndex,
66634
66635
  le as getCharSpaceApply,
66635
- M2 as getColor,
66636
+ R2 as getColor,
66636
66637
  B0 as getCurrentScrollXY,
66637
66638
  RE as getCurrentTypeOfRenderer,
66638
66639
  Ee as getDPI,