@univerjs/engine-render 0.10.9 → 0.10.10
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/cjs/index.js +1 -1
- package/lib/es/index.js +644 -652
- package/lib/index.js +644 -652
- package/lib/umd/index.js +1 -1
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -32677,10 +32677,10 @@ class S1 {
|
|
|
32677
32677
|
subscriptSizeRatio: c,
|
|
32678
32678
|
subscriptOffset: g,
|
|
32679
32679
|
superscriptSizeRatio: h,
|
|
32680
|
-
superscriptOffset:
|
|
32681
|
-
hdmxData:
|
|
32680
|
+
superscriptOffset: p,
|
|
32681
|
+
hdmxData: f,
|
|
32682
32682
|
glyphHorizonMap: m
|
|
32683
|
-
} = s, v =
|
|
32683
|
+
} = s, v = f == null ? void 0 : f.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 S1 {
|
|
|
32696
32696
|
sbr: c,
|
|
32697
32697
|
sbo: g * e,
|
|
32698
32698
|
spr: h,
|
|
32699
|
-
spo:
|
|
32699
|
+
spo: p * e
|
|
32700
32700
|
};
|
|
32701
32701
|
}
|
|
32702
32702
|
static _calculateBoundingBoxByMeasureText(t, e) {
|
|
@@ -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:
|
|
32922
|
-
let
|
|
32921
|
+
const { isMerged: u, isMergedMainCell: d, startRow: c, startColumn: g, endRow: h, endColumn: p } = s;
|
|
32922
|
+
let f = {
|
|
32923
32923
|
startRow: c,
|
|
32924
32924
|
startColumn: g,
|
|
32925
32925
|
endRow: h,
|
|
32926
|
-
endColumn:
|
|
32926
|
+
endColumn: p,
|
|
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[
|
|
32935
|
-
|
|
32936
|
-
...
|
|
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,
|
|
32937
32937
|
startY: y,
|
|
32938
32938
|
endY: z,
|
|
32939
32939
|
startX: _,
|
|
32940
32940
|
endX: j
|
|
32941
32941
|
};
|
|
32942
|
-
} else if (!u && h !== -1 &&
|
|
32943
|
-
const y = e[h] || e[m], z = a[
|
|
32944
|
-
|
|
32945
|
-
...
|
|
32942
|
+
} else if (!u && h !== -1 && p !== -1) {
|
|
32943
|
+
const y = e[h] || e[m], z = a[p] || a[v];
|
|
32944
|
+
f = {
|
|
32945
|
+
...f,
|
|
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:
|
|
32961
|
+
mergeInfo: f
|
|
32962
32962
|
};
|
|
32963
32963
|
}
|
|
32964
32964
|
const iB = Iv;
|
|
@@ -34479,13 +34479,13 @@ function Uv(r, t, e) {
|
|
|
34479
34479
|
}
|
|
34480
34480
|
function Hv(r, t, e) {
|
|
34481
34481
|
let a = 0, s = 0, n = 0, i = 0, o = 0, l = 0, u = 0, d = 0;
|
|
34482
|
-
const { startX: c, startY: g, endX: h, endY:
|
|
34482
|
+
const { startX: c, startY: g, endX: h, endY: p } = e;
|
|
34483
34483
|
switch (t) {
|
|
34484
34484
|
case X.TL_BR:
|
|
34485
|
-
a = c, s = g + 1.5, n = h - 1.5, i =
|
|
34485
|
+
a = c, s = g + 1.5, n = h - 1.5, i = p, o = c + 1.5, l = g, u = h, d = p - 1.5;
|
|
34486
34486
|
break;
|
|
34487
34487
|
case X.BL_TR:
|
|
34488
|
-
a = c, s =
|
|
34488
|
+
a = c, s = p - 1.5, n = h - 1.5, i = g, o = c + 1.5, l = p, u = h, d = g + 1.5;
|
|
34489
34489
|
break;
|
|
34490
34490
|
}
|
|
34491
34491
|
r.beginPath(), r.moveToByPrecision(a, s), r.lineToByPrecision(n, i), r.closePathByEnv(), r.stroke(), r.beginPath(), r.moveToByPrecision(o, l), r.lineToByPrecision(u, d), r.closePathByEnv(), r.stroke();
|
|
@@ -34534,29 +34534,29 @@ function Yv(r) {
|
|
|
34534
34534
|
return r > 0 ? t0.DOWN : t0.UP;
|
|
34535
34535
|
}
|
|
34536
34536
|
function M7(r, t, e) {
|
|
34537
|
-
var
|
|
34537
|
+
var p;
|
|
34538
34538
|
const a = [];
|
|
34539
34539
|
let s = 0, n = 0, i = 0, o = 0, l = 0;
|
|
34540
34540
|
const u = Yv(e), d = r.length;
|
|
34541
34541
|
e = Math.abs(e);
|
|
34542
34542
|
const c = Math.tan(e), g = Math.sin(e), h = Math.cos(e);
|
|
34543
34543
|
if (u === t0.UP) {
|
|
34544
|
-
let
|
|
34544
|
+
let f = 0;
|
|
34545
34545
|
for (let m = 0; m < d; m++) {
|
|
34546
34546
|
const v = r[m], { lineHeight: y = 0 } = v;
|
|
34547
|
-
|
|
34547
|
+
f += m === 0 ? 0 : y;
|
|
34548
34548
|
const z = t * g + y * h;
|
|
34549
|
-
a.push(
|
|
34549
|
+
a.push(f / c), z > n && (n = z), m === 0 && (i += y * g, l += y * h);
|
|
34550
34550
|
}
|
|
34551
|
-
i +=
|
|
34551
|
+
i += f / g + t * h, l -= n;
|
|
34552
34552
|
} else {
|
|
34553
|
-
let
|
|
34553
|
+
let f = 0, m = -1;
|
|
34554
34554
|
const v = [];
|
|
34555
34555
|
for (let _ = d - 1; _ >= 0; _--) {
|
|
34556
34556
|
const j = r[_], { lineHeight: w = 0 } = j, C = w / c, x = (t + C) * g;
|
|
34557
|
-
v.unshift(w / c), x > n && (n = x,
|
|
34557
|
+
v.unshift(w / c), x > n && (n = x, f = C, m = _), _ === 0 ? i += w * g : _ === d - 1 ? i += t * h + w / g : i += w / g;
|
|
34558
34558
|
}
|
|
34559
|
-
let y = ((
|
|
34559
|
+
let y = ((p = r[m]) == null ? void 0 : p.lineHeight) || 0, z = 0;
|
|
34560
34560
|
for (let _ = m + 1; _ <= d - 1; _++) {
|
|
34561
34561
|
const j = r[_], { lineHeight: w = 0 } = j;
|
|
34562
34562
|
y += w, z += v[_] || 0, a[_] = -z;
|
|
@@ -34566,7 +34566,7 @@ function M7(r, t, e) {
|
|
|
34566
34566
|
const j = r[_], { lineHeight: w = 0 } = j;
|
|
34567
34567
|
z += v[_ + 1] || 0, a[_] = z, s += w;
|
|
34568
34568
|
}
|
|
34569
|
-
a[m] = 0, d === 1 && (i += t * h), o = y / g -
|
|
34569
|
+
a[m] = 0, d === 1 && (i += t * h), o = y / g - f * h;
|
|
34570
34570
|
}
|
|
34571
34571
|
return {
|
|
34572
34572
|
rotateTranslateXList: a,
|
|
@@ -34606,7 +34606,7 @@ function Xv(r, t, e) {
|
|
|
34606
34606
|
};
|
|
34607
34607
|
}
|
|
34608
34608
|
function Vv(r, t, e, a) {
|
|
34609
|
-
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,
|
|
34609
|
+
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));
|
|
34610
34610
|
return {
|
|
34611
34611
|
left: y.x,
|
|
34612
34612
|
top: y.y,
|
|
@@ -35882,13 +35882,13 @@ let hb = class extends C3 {
|
|
|
35882
35882
|
}
|
|
35883
35883
|
// eslint-disable-next-line max-lines-per-function
|
|
35884
35884
|
draw(e, a, s, n, { viewRanges: i, checkOutOfViewBound: o }) {
|
|
35885
|
-
const { stylesCache: l, worksheet: u, rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s, { background:
|
|
35886
|
-
if (!u || !
|
|
35885
|
+
const { stylesCache: l, worksheet: u, rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s, { background: p, backgroundPositions: f } = l;
|
|
35886
|
+
if (!u || !p || !d || !g || c === void 0 || h === void 0)
|
|
35887
35887
|
return;
|
|
35888
35888
|
e.save();
|
|
35889
35889
|
const { scaleX: m, scaleY: v } = e.getScale(), y = {
|
|
35890
35890
|
ctx: e,
|
|
35891
|
-
backgroundPositions:
|
|
35891
|
+
backgroundPositions: f,
|
|
35892
35892
|
scaleX: m,
|
|
35893
35893
|
scaleY: v,
|
|
35894
35894
|
checkOutOfViewBound: o,
|
|
@@ -35901,7 +35901,7 @@ let hb = class extends C3 {
|
|
|
35901
35901
|
z.push(...x);
|
|
35902
35902
|
});
|
|
35903
35903
|
const _ = (C) => {
|
|
35904
|
-
const x =
|
|
35904
|
+
const x = p[C], S = (B, A, L) => {
|
|
35905
35905
|
if (s.worksheet.getSpanModel().getMergeDataIndex(B, A) !== -1)
|
|
35906
35906
|
return;
|
|
35907
35907
|
const O = s.getCellByIndexWithNoHeader(B, A);
|
|
@@ -35916,7 +35916,7 @@ let hb = class extends C3 {
|
|
|
35916
35916
|
H3.foreach(B, S);
|
|
35917
35917
|
}) : x.forValue(S), e.fill(F), e.closePath();
|
|
35918
35918
|
}, j = (C) => {
|
|
35919
|
-
const x =
|
|
35919
|
+
const x = p[C];
|
|
35920
35920
|
e.fillStyle = C || M2([255, 255, 255]);
|
|
35921
35921
|
const S = new Path2D();
|
|
35922
35922
|
y.backgroundPaths = S, e.beginPath(), z.forEach((F) => {
|
|
@@ -35926,7 +35926,7 @@ let hb = class extends C3 {
|
|
|
35926
35926
|
y.cellInfo = M, this.renderBGByCell(y, F.startRow, F.startColumn);
|
|
35927
35927
|
}
|
|
35928
35928
|
}), e.fill(S), e.closePath();
|
|
35929
|
-
}, w = Object.keys(
|
|
35929
|
+
}, w = Object.keys(p);
|
|
35930
35930
|
for (let C = 0; C < w.length; C++) {
|
|
35931
35931
|
const x = w[C];
|
|
35932
35932
|
_(x), j(x);
|
|
@@ -35935,9 +35935,9 @@ let hb = class extends C3 {
|
|
|
35935
35935
|
}
|
|
35936
35936
|
renderBGByCell(e, a, s) {
|
|
35937
35937
|
const { spreadsheetSkeleton: n, backgroundPaths: i, scaleX: o, scaleY: l, viewRanges: u, diffRanges: d, cellInfo: c } = e;
|
|
35938
|
-
let { startY: g, endY: h, startX:
|
|
35938
|
+
let { startY: g, endY: h, startX: p, endX: f } = c;
|
|
35939
35939
|
const { isMerged: m, isMergedMainCell: v, mergeInfo: y } = c, z = d && d.length > 0 ? d : u;
|
|
35940
|
-
if (g = y.startY, h = y.endY,
|
|
35940
|
+
if (g = y.startY, h = y.endY, p = y.startX, f = y.endX, !m && !v && !S7(z, a, s))
|
|
35941
35941
|
return !0;
|
|
35942
35942
|
if (!m && !v) {
|
|
35943
35943
|
if (!n.worksheet.getRowVisible(a) || !n.worksheet.getColVisible(s)) return !0;
|
|
@@ -35957,7 +35957,7 @@ let hb = class extends C3 {
|
|
|
35957
35957
|
}
|
|
35958
35958
|
if (S) return !0;
|
|
35959
35959
|
}
|
|
35960
|
-
const _ = Z(
|
|
35960
|
+
const _ = Z(p, o), j = Z(g, l), w = Z(f, o), C = Z(h, l);
|
|
35961
35961
|
i.rect(_, j, w - _, C - j);
|
|
35962
35962
|
}
|
|
35963
35963
|
};
|
|
@@ -35976,11 +35976,11 @@ let pb = class extends C3 {
|
|
|
35976
35976
|
if (!u || !d || !g || c === void 0 || h === void 0)
|
|
35977
35977
|
return;
|
|
35978
35978
|
e.save(), e.translateWithPrecisionRatio(p2, p2);
|
|
35979
|
-
const
|
|
35980
|
-
if (!
|
|
35979
|
+
const p = this._getScale(e.getScale()), { border: f } = o;
|
|
35980
|
+
if (!f) return;
|
|
35981
35981
|
const m = {
|
|
35982
35982
|
ctx: e,
|
|
35983
|
-
precisionScale:
|
|
35983
|
+
precisionScale: p,
|
|
35984
35984
|
overflowCache: l,
|
|
35985
35985
|
diffRanges: n,
|
|
35986
35986
|
viewRanges: i,
|
|
@@ -35988,20 +35988,20 @@ let pb = class extends C3 {
|
|
|
35988
35988
|
};
|
|
35989
35989
|
e.beginPath(), i.forEach((v) => {
|
|
35990
35990
|
H3.foreach(v, (y, z) => {
|
|
35991
|
-
const _ =
|
|
35991
|
+
const _ = f.getValue(y, z);
|
|
35992
35992
|
_ && this.renderBorderByCell(m, y, z, _);
|
|
35993
35993
|
});
|
|
35994
35994
|
}), e.closePath(), e.restore();
|
|
35995
35995
|
}
|
|
35996
35996
|
renderBorderByCell(e, a, s, n) {
|
|
35997
|
-
const { ctx: i, precisionScale: o, overflowCache: l, spreadsheetSkeleton: u, diffRanges: d } = e, c = u.getCellWithCoordByIndex(a, s, !1), { startY: g, endY: h, startX:
|
|
35997
|
+
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;
|
|
35998
35998
|
if (!m && (!u.worksheet.getRowVisible(a) || !u.worksheet.getColVisible(s)) || !this.isRenderDiffRangesByRow(y.startRow, y.endRow, d))
|
|
35999
35999
|
return !0;
|
|
36000
36000
|
for (const z in n) {
|
|
36001
36001
|
const { type: _, style: j, color: w } = n[z];
|
|
36002
36002
|
if (j === M1.NONE)
|
|
36003
36003
|
continue;
|
|
36004
|
-
let C = g, x = h, S =
|
|
36004
|
+
let C = g, x = h, S = p, F = f;
|
|
36005
36005
|
if (_ !== X.TOP && _ !== X.BOTTOM && _ !== X.LEFT && _ !== X.RIGHT) {
|
|
36006
36006
|
if (m)
|
|
36007
36007
|
return !0;
|
|
@@ -36093,8 +36093,8 @@ class bb extends C3 {
|
|
|
36093
36093
|
const { rowHeightAccumulation: u, columnTotalWidth: d, columnWidthAccumulation: c, rowTotalHeight: g, worksheet: h } = s;
|
|
36094
36094
|
if (!u || !c || d === void 0 || g === void 0)
|
|
36095
36095
|
return;
|
|
36096
|
-
const
|
|
36097
|
-
this.setStyleToCtx(e,
|
|
36096
|
+
const p = this.getColumnsCfg(h.getSheetId()), f = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
|
|
36097
|
+
this.setStyleToCtx(e, f), e.save(), e.fillStyle = f.backgroundColor, e.fillRectByPrecision(0, 0, d, i), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(p2, p2);
|
|
36098
36098
|
let v = 0;
|
|
36099
36099
|
for (let z = o - 1; z <= l; z++) {
|
|
36100
36100
|
if (z < 0 || z > c.length - 1)
|
|
@@ -36102,7 +36102,7 @@ class bb extends C3 {
|
|
|
36102
36102
|
const _ = c[z];
|
|
36103
36103
|
if (v === _)
|
|
36104
36104
|
continue;
|
|
36105
|
-
const j = { left: v, top: 0, right: _, width: _ - v, height: i }, [w, C] = this.getCfgOfCurrentColumn(
|
|
36105
|
+
const j = { left: v, top: 0, right: _, width: _ - v, height: i }, [w, C] = this.getCfgOfCurrentColumn(p, f, z);
|
|
36106
36106
|
C && 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();
|
|
36107
36107
|
const x = (() => {
|
|
36108
36108
|
switch (w.textAlign) {
|
|
@@ -36141,40 +36141,32 @@ class Db extends C3 {
|
|
|
36141
36141
|
H3.foreach(o, (d, c) => {
|
|
36142
36142
|
if (!i.getRowVisible(d) || !i.getColVisible(c))
|
|
36143
36143
|
return;
|
|
36144
|
-
let g =
|
|
36145
|
-
|
|
36144
|
+
let g = s.getCellWithCoordByIndex(d, c, !1);
|
|
36145
|
+
const { mergeInfo: h } = g;
|
|
36146
|
+
let p = i.getCell(d, c);
|
|
36147
|
+
if (g.isMerged && (p = i.getCell(h.startRow, h.startColumn)), !(p != null && p.customRender))
|
|
36146
36148
|
return;
|
|
36147
|
-
|
|
36148
|
-
const { mergeInfo: f } = h;
|
|
36149
|
-
if (!this.isRenderDiffRangesByRow(f.startRow, f.endRow, n))
|
|
36149
|
+
if (!this.isRenderDiffRangesByRow(h.startRow, h.endRow, n))
|
|
36150
36150
|
return !0;
|
|
36151
|
-
if (
|
|
36152
|
-
const v = _b(
|
|
36151
|
+
if (g.isMerged || g.isMergedMainCell) {
|
|
36152
|
+
const v = _b(h);
|
|
36153
36153
|
if (l.has(v))
|
|
36154
36154
|
return;
|
|
36155
36155
|
l.add(v);
|
|
36156
36156
|
}
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
|
|
36160
|
-
|
|
36161
|
-
|
|
36162
|
-
if (g = i.getCell(v.row, v.col), !(g != null && g.customRender))
|
|
36163
|
-
return;
|
|
36164
|
-
h = s.getCellWithCoordByIndex(v.row, v.col, !1);
|
|
36165
|
-
}
|
|
36166
|
-
const p = {
|
|
36167
|
-
data: g,
|
|
36168
|
-
style: s.getStyles().getStyleByCell(g),
|
|
36169
|
-
primaryWithCoord: h,
|
|
36157
|
+
g.isMerged && (g = s.getCellWithCoordByIndex(h.startRow, h.startColumn, !1));
|
|
36158
|
+
const f = {
|
|
36159
|
+
data: p,
|
|
36160
|
+
style: s.getStyles().getStyleByCell(p),
|
|
36161
|
+
primaryWithCoord: g,
|
|
36170
36162
|
subUnitId: u,
|
|
36171
36163
|
row: d,
|
|
36172
36164
|
col: c,
|
|
36173
36165
|
worksheet: i,
|
|
36174
36166
|
unitId: i.unitId
|
|
36175
|
-
}, m =
|
|
36167
|
+
}, m = p.customRender.sort(c2);
|
|
36176
36168
|
e.save(), m.forEach((v) => {
|
|
36177
|
-
v.drawWith(e,
|
|
36169
|
+
v.drawWith(e, f, s, this.parent);
|
|
36178
36170
|
}), e.restore();
|
|
36179
36171
|
});
|
|
36180
36172
|
}
|
|
@@ -41778,23 +41770,23 @@ class v4 {
|
|
|
41778
41770
|
for (; l.length > 0; ) {
|
|
41779
41771
|
let u = 0, d = "", c = 0, g = Math.min(this._lastBreakLength, l.length);
|
|
41780
41772
|
g === 0 && (g = Math.min(10, l.length));
|
|
41781
|
-
let h = l.slice(0, g),
|
|
41782
|
-
if (
|
|
41773
|
+
let h = l.slice(0, g), p = S1.getMeasureText(h, this._fontStyle);
|
|
41774
|
+
if (p.width + e.width <= this._width) {
|
|
41783
41775
|
u = g;
|
|
41784
|
-
for (let
|
|
41785
|
-
u =
|
|
41776
|
+
for (let f = g + 1; f <= l.length && (h = l.slice(0, f), p = S1.getMeasureText(h, this._fontStyle), p.width + e.width <= this._width); f++)
|
|
41777
|
+
u = f;
|
|
41786
41778
|
} else {
|
|
41787
41779
|
u = 0;
|
|
41788
|
-
for (let
|
|
41789
|
-
if (h = l.slice(0,
|
|
41790
|
-
u =
|
|
41780
|
+
for (let f = g - 1; f >= 1; f--)
|
|
41781
|
+
if (h = l.slice(0, f), p = S1.getMeasureText(h, this._fontStyle), p.width + e.width <= this._width) {
|
|
41782
|
+
u = f;
|
|
41791
41783
|
break;
|
|
41792
41784
|
}
|
|
41793
41785
|
}
|
|
41794
41786
|
if (u > 0 && (this._lastBreakLength = u), u > 0 && (d = l.slice(0, u), c = S1.getMeasureText(d, this._fontStyle).width), u === 0 && e.text.length === 0 && (u = 1, d = l[0], c = S1.getMeasureText(d, this._fontStyle).width), u > 0) {
|
|
41795
41787
|
e.text += d, e.width += c;
|
|
41796
|
-
const
|
|
41797
|
-
if (e.height =
|
|
41788
|
+
const f = S1.getMeasureText(e.text, this._fontStyle);
|
|
41789
|
+
if (e.height = f.fontBoundingBoxAscent + f.fontBoundingBoxDescent, e.baseline = f.fontBoundingBoxAscent, l = l.slice(u), l.length > 0) {
|
|
41798
41790
|
if (this._lines.push(e), a += e.height, a > this._height)
|
|
41799
41791
|
break;
|
|
41800
41792
|
e = {
|
|
@@ -42076,13 +42068,13 @@ class Z4 extends x3 {
|
|
|
42076
42068
|
}
|
|
42077
42069
|
static drawWith(e, a, s) {
|
|
42078
42070
|
var _, j;
|
|
42079
|
-
const { text: n, fontStyle: i, warp: o, hAlign: l, vAlign: u, width: d, height: c, left: g = 0, top: h = 0, cellValueType:
|
|
42071
|
+
const { text: n, fontStyle: i, warp: o, hAlign: l, vAlign: u, width: d, height: c, left: g = 0, top: h = 0, cellValueType: p } = a, f = s != null ? s : new v4(n, i, !!o, d, u === m2.TOP ? c : 1 / 0), m = f.calculate(), v = f.getTotalHeight(), y = u === m2.TOP ? 0 : u === m2.MIDDLE ? (c - v) / 2 : c - v;
|
|
42080
42072
|
let z = h + y;
|
|
42081
42073
|
e.save(), e.font = i, e.fillStyle = (_ = a.color) != null ? _ : z3;
|
|
42082
42074
|
for (const w of m) {
|
|
42083
42075
|
const C = w.height, x = w.width;
|
|
42084
42076
|
let S = 0;
|
|
42085
|
-
if (!(!o && d < x &&
|
|
42077
|
+
if (!(!o && d < x && p === T2.NUMBER))
|
|
42086
42078
|
switch (l) {
|
|
42087
42079
|
case d1.CENTER:
|
|
42088
42080
|
S = (d - x) / 2;
|
|
@@ -42368,22 +42360,22 @@ class N2 {
|
|
|
42368
42360
|
c.parent = a, c.setIndexRange(o, l - 1);
|
|
42369
42361
|
const g = i.slice(u), h = N2.create(n, g);
|
|
42370
42362
|
h.parent = a, h.setIndexRange(u, u + g.length - 1);
|
|
42371
|
-
const
|
|
42363
|
+
const p = [], f = [];
|
|
42372
42364
|
for (const m of e) {
|
|
42373
42365
|
const { startIndex: v } = m;
|
|
42374
42366
|
if (m.exclude(t))
|
|
42375
|
-
t < v ?
|
|
42367
|
+
t < v ? p.push(m) : f.push(m);
|
|
42376
42368
|
else {
|
|
42377
42369
|
const y = m.split(t);
|
|
42378
42370
|
if (y == null) {
|
|
42379
|
-
|
|
42371
|
+
p.push(m);
|
|
42380
42372
|
continue;
|
|
42381
42373
|
}
|
|
42382
42374
|
const { firstNode: z, lastNode: _ } = y;
|
|
42383
|
-
|
|
42375
|
+
p.push(z), p.push(_);
|
|
42384
42376
|
}
|
|
42385
42377
|
}
|
|
42386
|
-
return c.children =
|
|
42378
|
+
return c.children = p, h.children = f, c._resetBlocks(), h._resetBlocks(), {
|
|
42387
42379
|
firstNode: c,
|
|
42388
42380
|
lastNode: h
|
|
42389
42381
|
};
|
|
@@ -42441,46 +42433,46 @@ function G6(r, t) {
|
|
|
42441
42433
|
const h = r[g];
|
|
42442
42434
|
if (h === J.PARAGRAPH) {
|
|
42443
42435
|
e += J.PARAGRAPH;
|
|
42444
|
-
const
|
|
42445
|
-
if (
|
|
42446
|
-
if (Q3(
|
|
42447
|
-
const m = t.find((v) => v.startIndex ===
|
|
42448
|
-
m && n.set(m.tableId, { table:
|
|
42436
|
+
const p = N2.create(V1.PARAGRAPH, e), f = l[l.length - 1];
|
|
42437
|
+
if (f && f.isFinished) {
|
|
42438
|
+
if (Q3(p, [f.table], V1.PARAGRAPH), t) {
|
|
42439
|
+
const m = t.find((v) => v.startIndex === f.table.startIndex && v.endIndex === f.table.endIndex + 1);
|
|
42440
|
+
m && n.set(m.tableId, { table: f.table });
|
|
42449
42441
|
}
|
|
42450
42442
|
l.pop();
|
|
42451
42443
|
}
|
|
42452
|
-
|
|
42444
|
+
p.setIndexRange(g - e.length + 1, g), p.addBlocks(c), c.length = 0, e = "", d.length > 0 ? o.push(p) : i.push(p);
|
|
42453
42445
|
} else if (h === J.SECTION_BREAK) {
|
|
42454
|
-
const
|
|
42455
|
-
Q3(
|
|
42456
|
-
const m =
|
|
42446
|
+
const p = N2.create(V1.SECTION_BREAK), f = d.length > 0 ? o : i;
|
|
42447
|
+
Q3(p, f);
|
|
42448
|
+
const m = f[f.length - 1];
|
|
42457
42449
|
if (m && m.content && (m.content += J.SECTION_BREAK), d.length > 0) {
|
|
42458
42450
|
const v = d[d.length - 1];
|
|
42459
|
-
Q3(v, [
|
|
42451
|
+
Q3(v, [p], V1.TABLE_CELL);
|
|
42460
42452
|
} else
|
|
42461
|
-
s.push(
|
|
42462
|
-
|
|
42453
|
+
s.push(p);
|
|
42454
|
+
f.length = 0;
|
|
42463
42455
|
} else if (h === J.TABLE_START) {
|
|
42464
|
-
const
|
|
42456
|
+
const p = N2.create(V1.TABLE);
|
|
42465
42457
|
l.push({
|
|
42466
|
-
table:
|
|
42458
|
+
table: p,
|
|
42467
42459
|
isFinished: !1
|
|
42468
42460
|
});
|
|
42469
42461
|
} else if (h === J.TABLE_ROW_START) {
|
|
42470
|
-
const
|
|
42471
|
-
u.push(
|
|
42462
|
+
const p = N2.create(V1.TABLE_ROW);
|
|
42463
|
+
u.push(p);
|
|
42472
42464
|
} else if (h === J.TABLE_CELL_START) {
|
|
42473
|
-
const
|
|
42474
|
-
d.push(
|
|
42465
|
+
const p = N2.create(V1.TABLE_CELL);
|
|
42466
|
+
d.push(p);
|
|
42475
42467
|
} else if (h === J.TABLE_END) {
|
|
42476
|
-
const
|
|
42477
|
-
|
|
42468
|
+
const p = l[l.length - 1];
|
|
42469
|
+
p.isFinished = !0, e = "";
|
|
42478
42470
|
} else if (h === J.TABLE_ROW_END) {
|
|
42479
|
-
const
|
|
42480
|
-
Q3(
|
|
42471
|
+
const p = u.pop(), f = l[l.length - 1];
|
|
42472
|
+
Q3(f.table, [p], V1.TABLE);
|
|
42481
42473
|
} else if (h === J.TABLE_CELL_END) {
|
|
42482
|
-
const
|
|
42483
|
-
Q3(
|
|
42474
|
+
const p = d.pop(), f = u[u.length - 1];
|
|
42475
|
+
Q3(f, [p], V1.TABLE_ROW);
|
|
42484
42476
|
} else h === J.CUSTOM_BLOCK && c.push(g), e += h;
|
|
42485
42477
|
}
|
|
42486
42478
|
return { sectionList: s, tableNodeCache: n };
|
|
@@ -42781,24 +42773,24 @@ function F0(r, t, e, a, s) {
|
|
|
42781
42773
|
t === J.PARAGRAPH && (c = J.PARAGRAPH);
|
|
42782
42774
|
let g = null, h = 0;
|
|
42783
42775
|
s && s.boundingBox && s.font ? g = S1.getBBoxFromGlyphInfo(s, n) : g = S1.getTextSize(t, n);
|
|
42784
|
-
const { width:
|
|
42785
|
-
let
|
|
42786
|
-
if (ct(l, u) && (
|
|
42776
|
+
const { width: p = 0 } = g;
|
|
42777
|
+
let f = a != null ? a : p;
|
|
42778
|
+
if (ct(l, u) && (f = p + (x0(t) ? o : o / 2), l === U1.SNAP_TO_CHARS && (h = (f - p) / 2)), s && s.kerning !== 0 && s.font) {
|
|
42787
42779
|
const m = c3(n.fontSize) / s.font.unitsPerEm, v = s.kerning * m;
|
|
42788
|
-
|
|
42780
|
+
f += v, h += v;
|
|
42789
42781
|
}
|
|
42790
42782
|
return {
|
|
42791
42783
|
content: t,
|
|
42792
42784
|
ts: i,
|
|
42793
42785
|
fontStyle: n,
|
|
42794
|
-
width:
|
|
42786
|
+
width: f,
|
|
42795
42787
|
bBox: g,
|
|
42796
42788
|
xOffset: h,
|
|
42797
42789
|
left: 0,
|
|
42798
42790
|
glyphType: r,
|
|
42799
42791
|
streamType: c,
|
|
42800
42792
|
isJustifiable: et(t),
|
|
42801
|
-
adjustability: n0(t,
|
|
42793
|
+
adjustability: n0(t, f),
|
|
42802
42794
|
count: t.length,
|
|
42803
42795
|
raw: t
|
|
42804
42796
|
};
|
|
@@ -42869,13 +42861,13 @@ function gy(r, t, e, a, s = 0, n = !1, i, o, l, u) {
|
|
|
42869
42861
|
lineTop: c = 0,
|
|
42870
42862
|
contentHeight: g = 0,
|
|
42871
42863
|
paddingLeft: h = 0,
|
|
42872
|
-
paddingRight:
|
|
42873
|
-
paddingTop:
|
|
42864
|
+
paddingRight: p = 0,
|
|
42865
|
+
paddingTop: f = 0,
|
|
42874
42866
|
paddingBottom: m = 0,
|
|
42875
42867
|
marginTop: v = 0,
|
|
42876
42868
|
spaceBelowApply: y = 0
|
|
42877
42869
|
} = e, { skeTablesInParagraph: z } = i, _ = (T = o.skeDrawings) != null ? T : /* @__PURE__ */ new Map(), j = (M = o.skeTables) != null ? M : /* @__PURE__ */ new Map(), w = l == null ? void 0 : l.skeDrawings, C = u == null ? void 0 : u.skeDrawings, x = by(t, r);
|
|
42878
|
-
if (x.lineIndex = s, x.paragraphStart = n, x.contentHeight = g, x.top = c, x.lineHeight = d, x.paddingTop =
|
|
42870
|
+
if (x.lineIndex = s, x.paragraphStart = n, x.contentHeight = g, x.top = c, x.lineHeight = d, x.paddingTop = f, x.paddingBottom = m, x.marginTop = v, x.spaceBelowApply = y, n && Array.isArray(z) && z.length > 0) {
|
|
42879
42871
|
const B = z[z.length - 1].tableId;
|
|
42880
42872
|
x.isBehindTable = !0, x.tableId = B;
|
|
42881
42873
|
}
|
|
@@ -42885,7 +42877,7 @@ function gy(r, t, e, a, s = 0, n = !1, i, o, l, u) {
|
|
|
42885
42877
|
c,
|
|
42886
42878
|
a,
|
|
42887
42879
|
h,
|
|
42888
|
-
|
|
42880
|
+
p,
|
|
42889
42881
|
o,
|
|
42890
42882
|
l,
|
|
42891
42883
|
u,
|
|
@@ -42925,8 +42917,8 @@ function X0(r, t, e) {
|
|
|
42925
42917
|
if (u !== Z1.WRAP_TOP_AND_BOTTOM)
|
|
42926
42918
|
return;
|
|
42927
42919
|
if (o === 0) {
|
|
42928
|
-
const
|
|
42929
|
-
return
|
|
42920
|
+
const p = a - d, f = d + s + c;
|
|
42921
|
+
return p + f < e || p > t + e ? void 0 : p + f;
|
|
42930
42922
|
}
|
|
42931
42923
|
let { top: g = 0, height: h = 0 } = S0(o, n, i, a, s);
|
|
42932
42924
|
if (g -= d, h += c, !(g + h < e || g > t + e))
|
|
@@ -42944,16 +42936,16 @@ function ky(r, t, e, a, s, n, i, o, l, u, d, c) {
|
|
|
42944
42936
|
width: s
|
|
42945
42937
|
}
|
|
42946
42938
|
), i && u && u.forEach((h) => {
|
|
42947
|
-
const
|
|
42948
|
-
|
|
42939
|
+
const p = i0(h, i, n, !0), f = V0(p, r, t, e);
|
|
42940
|
+
f && g.push(f);
|
|
42949
42941
|
}), o && d && d.forEach((h) => {
|
|
42950
|
-
const
|
|
42951
|
-
p && g.push(p);
|
|
42952
|
-
}), l == null || l.forEach((h) => {
|
|
42953
|
-
const f = V0(h, r, t, e);
|
|
42942
|
+
const p = i0(h, o, n, !1), f = V0(p, r, t, e);
|
|
42954
42943
|
f && g.push(f);
|
|
42944
|
+
}), l == null || l.forEach((h) => {
|
|
42945
|
+
const p = V0(h, r, t, e);
|
|
42946
|
+
p && g.push(p);
|
|
42955
42947
|
}), c && c.size > 0 && c.forEach((h) => {
|
|
42956
|
-
const { left:
|
|
42948
|
+
const { left: p, top: f, width: m, height: v, tableSource: y } = h, { dist: z } = y, _ = b4(f, v, p, m, t, r, e, z);
|
|
42957
42949
|
_ && g.push(_);
|
|
42958
42950
|
}), vy(e, g);
|
|
42959
42951
|
}
|
|
@@ -42990,9 +42982,9 @@ function V0(r, t, e, a) {
|
|
|
42990
42982
|
}
|
|
42991
42983
|
return X6(_, e, t, a);
|
|
42992
42984
|
}
|
|
42993
|
-
const { distL: c = 0, distT: g = 0, distB: h = 0, distR:
|
|
42985
|
+
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 };
|
|
42994
42986
|
if (l === 0)
|
|
42995
|
-
return b4(s, n, i, o, e, t, a, m, d,
|
|
42987
|
+
return b4(s, n, i, o, e, t, a, m, d, f);
|
|
42996
42988
|
const v = S0(l, i, o, s, n);
|
|
42997
42989
|
if (d === Z1.WRAP_SQUARE) {
|
|
42998
42990
|
const { left: y, width: z, top: _, height: j } = v;
|
|
@@ -43006,7 +42998,7 @@ function V0(r, t, e, a) {
|
|
|
43006
42998
|
a,
|
|
43007
42999
|
m,
|
|
43008
43000
|
d,
|
|
43009
|
-
|
|
43001
|
+
f
|
|
43010
43002
|
);
|
|
43011
43003
|
}
|
|
43012
43004
|
return X6(v.points, e, t, a);
|
|
@@ -43053,8 +43045,8 @@ function b4(r, t, e, a, s, n, i, o, l = Z1.WRAP_SQUARE, u = We.BOTH_SIDES) {
|
|
|
43053
43045
|
distR: c = 0,
|
|
43054
43046
|
distT: g = 0,
|
|
43055
43047
|
distB: h = 0
|
|
43056
|
-
} = o,
|
|
43057
|
-
if (
|
|
43048
|
+
} = o, p = r - (l === Z1.WRAP_SQUARE ? g : 0), f = t + (l === Z1.WRAP_SQUARE ? h + g : 0);
|
|
43049
|
+
if (p + f <= s || p >= n + s)
|
|
43058
43050
|
return;
|
|
43059
43051
|
let m = e - d, v = a + d + c;
|
|
43060
43052
|
const y = fy(u, m, v, i);
|
|
@@ -43200,8 +43192,8 @@ function K0(r, t, e, a) {
|
|
|
43200
43192
|
};
|
|
43201
43193
|
}
|
|
43202
43194
|
function zy(r, t, e, a, s) {
|
|
43203
|
-
var
|
|
43204
|
-
const { startIndex: n, endIndex: i, children: o } = a, l = (
|
|
43195
|
+
var f;
|
|
43196
|
+
const { startIndex: n, endIndex: i, children: o } = a, l = (f = e.getTableByStartIndex(n)) == null ? void 0 : f.tableSource;
|
|
43205
43197
|
if (l == null)
|
|
43206
43198
|
throw new Error("Table not found");
|
|
43207
43199
|
const u = e6(n, i, l);
|
|
@@ -43248,8 +43240,8 @@ function zy(r, t, e, a, s) {
|
|
|
43248
43240
|
C.height = T, C.top = d, d += T, c = Math.max(c, F);
|
|
43249
43241
|
}
|
|
43250
43242
|
u.width = c, u.height = d;
|
|
43251
|
-
const { pageWidth: g, marginLeft: h = 0, marginRight:
|
|
43252
|
-
return u.left = it(g - h -
|
|
43243
|
+
const { pageWidth: g, marginLeft: h = 0, marginRight: p = 0 } = t;
|
|
43244
|
+
return u.left = it(g - h - p, c, l.align, l.indent), u;
|
|
43253
43245
|
}
|
|
43254
43246
|
function _y(r, t) {
|
|
43255
43247
|
const { startIndex: e, endIndex: a } = t;
|
|
@@ -43260,8 +43252,8 @@ function _y(r, t) {
|
|
|
43260
43252
|
}
|
|
43261
43253
|
}
|
|
43262
43254
|
function Dy(r, t, e, a, s, n) {
|
|
43263
|
-
var
|
|
43264
|
-
const i = [], { startIndex: o, endIndex: l, children: u } = a, d = (
|
|
43255
|
+
var f;
|
|
43256
|
+
const i = [], { startIndex: o, endIndex: l, children: u } = a, d = (f = e.getTableByStartIndex(o)) == null ? void 0 : f.tableSource;
|
|
43265
43257
|
if (d == null)
|
|
43266
43258
|
throw new Error("Table not found when creating table skeletons");
|
|
43267
43259
|
const c = d.tableRows[0].repeatHeaderRow === t1.TRUE, g = e6(o, l, d), h = {
|
|
@@ -43287,10 +43279,10 @@ function Dy(r, t, e, a, s, n) {
|
|
|
43287
43279
|
);
|
|
43288
43280
|
}
|
|
43289
43281
|
jy(h, t, i, d);
|
|
43290
|
-
const
|
|
43282
|
+
const p = i[0].height <= n;
|
|
43291
43283
|
return {
|
|
43292
43284
|
skeTables: i,
|
|
43293
|
-
fromCurrentPage:
|
|
43285
|
+
fromCurrentPage: p
|
|
43294
43286
|
};
|
|
43295
43287
|
}
|
|
43296
43288
|
function jy(r, t, e, a) {
|
|
@@ -43308,7 +43300,7 @@ function Me(r, t, e) {
|
|
|
43308
43300
|
return e && (i -= t.repeatRowHeight), i;
|
|
43309
43301
|
}
|
|
43310
43302
|
function nt(r, t, e, a, s, n, i, o, l, u = !1) {
|
|
43311
|
-
const d = Me(t, l, !1), c = Me(t, l, !0), { children: g, startIndex: h, endIndex:
|
|
43303
|
+
const d = Me(t, l, !1), c = Me(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 === ne.AUTO, w = 72, C = l.remainHeight <= w;
|
|
43312
43304
|
let x = K6(e);
|
|
43313
43305
|
const S = [0];
|
|
43314
43306
|
for (const F of g) {
|
|
@@ -43324,7 +43316,7 @@ function nt(r, t, e, a, s, n, i, o, l, u = !1) {
|
|
|
43324
43316
|
d
|
|
43325
43317
|
);
|
|
43326
43318
|
for (; y.length < M.length; ) {
|
|
43327
|
-
const B = ot(h,
|
|
43319
|
+
const B = ot(h, p, i, f, u), A = g.length;
|
|
43328
43320
|
B.cells = [...new Array(A)].map((L, I) => {
|
|
43329
43321
|
const O = vt(
|
|
43330
43322
|
r,
|
|
@@ -43353,10 +43345,10 @@ function nt(r, t, e, a, s, n, i, o, l, u = !1) {
|
|
|
43353
43345
|
}
|
|
43354
43346
|
i === 0 && l.repeatRow && (l.repeatRowHeight = S[S.length - 1]);
|
|
43355
43347
|
for (const F of y)
|
|
43356
|
-
wy(F,
|
|
43348
|
+
wy(F, f);
|
|
43357
43349
|
for (; y.length > 0; ) {
|
|
43358
43350
|
const F = y.shift(), T = x.rows[x.rows.length - 1];
|
|
43359
|
-
(l.remainHeight < w || l.remainHeight < F.height) && (l.remainHeight = Me(t, l, i !== 0 && F.index !== T.index), l.rowTop = 0, x.rows.length > 0 && (x = e6(h,
|
|
43351
|
+
(l.remainHeight < w || l.remainHeight < F.height) && (l.remainHeight = Me(t, l, i !== 0 && F.index !== T.index), l.rowTop = 0, x.rows.length > 0 && (x = e6(h, p, o), e.push(x), l.repeatRow && u === !1 && i !== 0 && F.index !== T.index && (l.remainHeight = Me(t, l, !1), nt(
|
|
43360
43352
|
r,
|
|
43361
43353
|
t,
|
|
43362
43354
|
e,
|
|
@@ -43450,8 +43442,8 @@ function OB(r) {
|
|
|
43450
43442
|
function xy(r, t, e, a, s, n, i = L1.Normal) {
|
|
43451
43443
|
if (n)
|
|
43452
43444
|
if (s.bulletSkeleton) {
|
|
43453
|
-
const { bulletSkeleton: o, paragraphStyle: l = {} } = s, { gridType: u = U1.LINES, charSpace: d = 0, defaultTabStop: c = 10.5 } = a, { snapToGrid: g = t1.TRUE } = l, h = l0(d, c, u, g),
|
|
43454
|
-
s.paragraphStyle = uz(s.paragraphStyle, { ...
|
|
43445
|
+
const { bulletSkeleton: o, paragraphStyle: l = {} } = s, { gridType: u = U1.LINES, charSpace: d = 0, defaultTabStop: c = 10.5 } = a, { snapToGrid: g = t1.TRUE } = l, h = l0(d, c, u, g), p = uy(t[0], o, h), f = o.paragraphProperties || {};
|
|
43446
|
+
s.paragraphStyle = uz(s.paragraphStyle, { ...f, hanging: { v: p.width } }), he(r, [p, ...t], e, a, s, n, i);
|
|
43455
43447
|
} else
|
|
43456
43448
|
he(r, t, e, a, s, n, i);
|
|
43457
43449
|
else
|
|
@@ -43507,7 +43499,7 @@ function L2(r, t, e, a, s, n, i = L1.Normal, o) {
|
|
|
43507
43499
|
var d;
|
|
43508
43500
|
const l = $3(e), u = Vy(l);
|
|
43509
43501
|
if (u) {
|
|
43510
|
-
const c = J6(t), { divide: g, isLast: h } = u,
|
|
43502
|
+
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;
|
|
43511
43503
|
if (v + c > g.width) {
|
|
43512
43504
|
Re(g, {
|
|
43513
43505
|
isFull: !0
|
|
@@ -43632,18 +43624,18 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
|
|
|
43632
43624
|
console.error("The column width is less than 0, need to adjust page width to make it great than 0");
|
|
43633
43625
|
return;
|
|
43634
43626
|
}
|
|
43635
|
-
const c = Xy(d), g = Math.max(...t.map((F1) => F1.bBox.ba)), h = Math.max(...t.map((F1) => F1.bBox.bd)),
|
|
43636
|
-
paragraphStyle:
|
|
43627
|
+
const c = Xy(d), g = Math.max(...t.map((F1) => F1.bBox.ba)), h = Math.max(...t.map((F1) => F1.bBox.bd)), p = o || g + h, {
|
|
43628
|
+
paragraphStyle: f = {},
|
|
43637
43629
|
paragraphNonInlineSkeDrawings: m,
|
|
43638
43630
|
skeTablesInParagraph: v,
|
|
43639
43631
|
skeHeaders: y,
|
|
43640
43632
|
skeFooters: z,
|
|
43641
43633
|
pDrawingAnchor: _,
|
|
43642
43634
|
paragraphIndex: j
|
|
43643
|
-
} = s, { namedStyleType: w } =
|
|
43644
|
-
...
|
|
43645
|
-
spaceAbove: (n3 =
|
|
43646
|
-
spaceBelow: (H2 =
|
|
43635
|
+
} = s, { namedStyleType: w } = f, C = w !== void 0 ? H8[w] : null, x = {
|
|
43636
|
+
...f,
|
|
43637
|
+
spaceAbove: (n3 = f.spaceAbove) != null ? n3 : C == null ? void 0 : C.spaceAbove,
|
|
43638
|
+
spaceBelow: (H2 = f.spaceBelow) != null ? H2 : C == null ? void 0 : C.spaceBelow
|
|
43647
43639
|
}, {
|
|
43648
43640
|
// direction,
|
|
43649
43641
|
spaceAbove: S,
|
|
@@ -43663,7 +43655,7 @@ function he(r, t, e, a, s, n, i = L1.Normal, o) {
|
|
|
43663
43655
|
a,
|
|
43664
43656
|
s
|
|
43665
43657
|
), { paddingTop: H, paddingBottom: K, contentHeight: Q, lineSpacingApply: h1 } = gt(
|
|
43666
|
-
|
|
43658
|
+
p,
|
|
43667
43659
|
L,
|
|
43668
43660
|
I,
|
|
43669
43661
|
$,
|
|
@@ -43779,12 +43771,12 @@ function Z6(r, t, e, a, s, n, i, o) {
|
|
|
43779
43771
|
const c = d.drawingOrigin.layoutType;
|
|
43780
43772
|
return c !== Z1.INLINE && c !== Z1.WRAP_NONE;
|
|
43781
43773
|
}).map((d) => {
|
|
43782
|
-
const { drawingOrigin: c, drawingId: g, aTop: h, aLeft:
|
|
43774
|
+
const { drawingOrigin: c, drawingId: g, aTop: h, aLeft: p, width: f, height: m, angle: v } = d, y = c.docTransform.positionV;
|
|
43783
43775
|
return {
|
|
43784
43776
|
id: g,
|
|
43785
43777
|
top: h,
|
|
43786
|
-
left:
|
|
43787
|
-
width:
|
|
43778
|
+
left: p,
|
|
43779
|
+
width: f,
|
|
43788
43780
|
height: m,
|
|
43789
43781
|
angle: v,
|
|
43790
43782
|
type: a6.IMAGE,
|
|
@@ -43800,7 +43792,7 @@ function By(r, t, e, a, s, n, i) {
|
|
|
43800
43792
|
const o = Ay(t, s, e, a, i);
|
|
43801
43793
|
if (o == null)
|
|
43802
43794
|
return;
|
|
43803
|
-
const { tableId: l, width: u, height: d, tableSource: c } = t, { left: g, top: h } = o,
|
|
43795
|
+
const { tableId: l, width: u, height: d, tableSource: c } = t, { left: g, top: h } = o, p = {
|
|
43804
43796
|
id: l,
|
|
43805
43797
|
top: h,
|
|
43806
43798
|
left: g,
|
|
@@ -43810,14 +43802,14 @@ function By(r, t, e, a, s, n, i) {
|
|
|
43810
43802
|
type: a6.TABLE,
|
|
43811
43803
|
positionV: c.position.positionV
|
|
43812
43804
|
};
|
|
43813
|
-
lt(r, [
|
|
43805
|
+
lt(r, [p], s, n), t.top = h, t.left = g;
|
|
43814
43806
|
}
|
|
43815
43807
|
function Ay(r, t, e, a, s) {
|
|
43816
|
-
var
|
|
43817
|
-
const n = (
|
|
43808
|
+
var p, f, m;
|
|
43809
|
+
const n = (p = t.parent) == null ? void 0 : p.parent;
|
|
43818
43810
|
if (n == null)
|
|
43819
43811
|
return;
|
|
43820
|
-
const i = t6(t), { tableSource: o, width: l, height: u } = r, { positionH: d, positionV: c } = o.position, g = (
|
|
43812
|
+
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(
|
|
43821
43813
|
c,
|
|
43822
43814
|
n,
|
|
43823
43815
|
e,
|
|
@@ -43856,10 +43848,10 @@ function Ry(r, t, e, a, s, n, i, o, l, u) {
|
|
|
43856
43848
|
default:
|
|
43857
43849
|
throw new Error(`Unsupported table text wrap type: ${h.textWrap}`);
|
|
43858
43850
|
}
|
|
43859
|
-
const { top:
|
|
43860
|
-
if (!r.isDirty &&
|
|
43851
|
+
const { top: p, left: f, height: m } = g;
|
|
43852
|
+
if (!r.isDirty && p + m > n.height && d.isSlideTable === !1) {
|
|
43861
43853
|
i.pop();
|
|
43862
|
-
const v = n.height -
|
|
43854
|
+
const v = n.height - p, { segmentId: y } = a, z = r.viewModel.getSelfOrHeaderFooterViewModel(y), _ = d.tableNode;
|
|
43863
43855
|
_y(r.skeletonResourceReference.skeListLevel, _);
|
|
43864
43856
|
const {
|
|
43865
43857
|
fromCurrentPage: j,
|
|
@@ -43873,7 +43865,7 @@ function Ry(r, t, e, a, s, n, i, o, l, u) {
|
|
|
43873
43865
|
v
|
|
43874
43866
|
);
|
|
43875
43867
|
if (w.forEach((C, x) => {
|
|
43876
|
-
C.top = x === 0 && j ?
|
|
43868
|
+
C.top = x === 0 && j ? p : 0, C.left = f;
|
|
43877
43869
|
}), j) {
|
|
43878
43870
|
const C = w.shift();
|
|
43879
43871
|
a.skeTables.set(C.tableId, C), C.parent = a, i.push({
|
|
@@ -43908,22 +43900,22 @@ function lt(r, t, e, a) {
|
|
|
43908
43900
|
return;
|
|
43909
43901
|
let n = !1;
|
|
43910
43902
|
for (const h of t) {
|
|
43911
|
-
const
|
|
43912
|
-
if (
|
|
43903
|
+
const p = r.floatObjectsCache.get(h.id);
|
|
43904
|
+
if (p == null || p.page.segmentId !== s.segmentId)
|
|
43913
43905
|
continue;
|
|
43914
|
-
const
|
|
43915
|
-
|
|
43906
|
+
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;
|
|
43907
|
+
p.page && f && m && f !== m && (p.page.skeDrawings.delete(h.id), r.floatObjectsCache.delete(h.id), d0([p.page], (v) => {
|
|
43916
43908
|
var x;
|
|
43917
43909
|
const { lineHeight: y, top: z } = v, _ = v.parent;
|
|
43918
43910
|
if (n || _ == null)
|
|
43919
43911
|
return;
|
|
43920
43912
|
const { width: j, left: w } = _;
|
|
43921
|
-
Y6(
|
|
43913
|
+
Y6(p.floatObject, y, z, w, j) && (n = !0, r.isDirty = !0, r.layoutStartPointer[p.page.segmentId] = Math.min(v.paragraphIndex, (x = r.layoutStartPointer[p.page.segmentId]) != null ? x : Number.POSITIVE_INFINITY), r.paragraphsOpenNewPage.add(a));
|
|
43922
43914
|
}));
|
|
43923
43915
|
}
|
|
43924
43916
|
n = !1, d0([s], (h) => {
|
|
43925
43917
|
var y, z;
|
|
43926
|
-
const { lineHeight:
|
|
43918
|
+
const { lineHeight: p, top: f } = h, { width: m, left: v } = e;
|
|
43927
43919
|
if (!n)
|
|
43928
43920
|
for (const _ of t.values()) {
|
|
43929
43921
|
let j = _;
|
|
@@ -43936,7 +43928,7 @@ function lt(r, t, e, a) {
|
|
|
43936
43928
|
else
|
|
43937
43929
|
continue;
|
|
43938
43930
|
}
|
|
43939
|
-
if (Y6(j,
|
|
43931
|
+
if (Y6(j, p, f, v, m)) {
|
|
43940
43932
|
n = !0, r.isDirty = !0, r.layoutStartPointer[s.segmentId] = Math.min(h.paragraphIndex, (z = r.layoutStartPointer[s.segmentId]) != null ? z : Number.POSITIVE_INFINITY);
|
|
43941
43933
|
let C = r.floatObjectsCache.get(_.id);
|
|
43942
43934
|
C == null && (C = {
|
|
@@ -44026,16 +44018,16 @@ function Py(r, t, e) {
|
|
|
44026
44018
|
return;
|
|
44027
44019
|
const n = t6(a), i = /* @__PURE__ */ new Map(), { top: o, lineHeight: l, marginBottom: u = 0 } = r;
|
|
44028
44020
|
for (const h of r.divides)
|
|
44029
|
-
for (const
|
|
44030
|
-
if (
|
|
44031
|
-
const { drawingId:
|
|
44032
|
-
if (
|
|
44021
|
+
for (const p of h.glyphGroup)
|
|
44022
|
+
if (p.streamType === J.CUSTOM_BLOCK && p.width !== 0) {
|
|
44023
|
+
const { drawingId: f } = p;
|
|
44024
|
+
if (f == null)
|
|
44033
44025
|
continue;
|
|
44034
|
-
const m = t == null ? void 0 : t.get(
|
|
44026
|
+
const m = t == null ? void 0 : t.get(f), v = m == null ? void 0 : m.drawingOrigin;
|
|
44035
44027
|
if (v == null || m == null)
|
|
44036
44028
|
continue;
|
|
44037
|
-
const { docTransform: y } = v, { size: z, angle: _ } = y, { width: j = 0, height: w = 0 } = z, C =
|
|
44038
|
-
m.aLeft = h.left + h.paddingLeft +
|
|
44029
|
+
const { docTransform: y } = v, { size: z, angle: _ } = y, { width: j = 0, height: w = 0 } = z, C = p.bBox.bd + p.bBox.ba;
|
|
44030
|
+
m.aLeft = h.left + h.paddingLeft + p.left + 0.5 * p.width - 0.5 * j || 0, m.aTop = o + l - 0.5 * C - 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);
|
|
44039
44031
|
}
|
|
44040
44032
|
const d = new Map([...s.skeDrawings, ...i]);
|
|
44041
44033
|
s.skeDrawings = d;
|
|
@@ -44051,8 +44043,8 @@ function Ny(r, t, e, a, s, n = []) {
|
|
|
44051
44043
|
const { drawingOrigin: h } = g;
|
|
44052
44044
|
if (!h)
|
|
44053
44045
|
continue;
|
|
44054
|
-
const { docTransform:
|
|
44055
|
-
g.aLeft = (d = kt(
|
|
44046
|
+
const { docTransform: p } = h, { positionH: f, positionV: m, size: v, angle: y } = p, { width: z = 0, height: _ = 0 } = v;
|
|
44047
|
+
g.aLeft = (d = kt(f, e, i, z, l)) != null ? d : 0, g.aTop = (c = mt(
|
|
44056
44048
|
m,
|
|
44057
44049
|
i,
|
|
44058
44050
|
r,
|
|
@@ -44233,7 +44225,7 @@ function u0(r, t = -1) {
|
|
|
44233
44225
|
let o = i, l = Number.NEGATIVE_INFINITY, u = 0;
|
|
44234
44226
|
for (const d of s) {
|
|
44235
44227
|
const { columns: c } = d, g = o;
|
|
44236
|
-
let h = g,
|
|
44228
|
+
let h = g, p = Number.NEGATIVE_INFINITY, f = 0;
|
|
44237
44229
|
for (const m of c) {
|
|
44238
44230
|
const { lines: v } = m, y = h;
|
|
44239
44231
|
let z = y, _ = 0, j = Number.NEGATIVE_INFINITY;
|
|
@@ -44261,9 +44253,9 @@ function u0(r, t = -1) {
|
|
|
44261
44253
|
}
|
|
44262
44254
|
w.st = P ? M + 1 : M, 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;
|
|
44263
44255
|
}
|
|
44264
|
-
m.st = y + 1, m.ed = z >= m.st ? z : m.st, m.height = _, m.width = j,
|
|
44256
|
+
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;
|
|
44265
44257
|
}
|
|
44266
|
-
d.st = g + 1, d.ed = h >= d.st ? h : d.st, d.height =
|
|
44258
|
+
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;
|
|
44267
44259
|
}
|
|
44268
44260
|
for (const d of n.values()) {
|
|
44269
44261
|
const { ed: c } = d;
|
|
@@ -44274,13 +44266,13 @@ function u0(r, t = -1) {
|
|
|
44274
44266
|
}
|
|
44275
44267
|
function Ve(r, t) {
|
|
44276
44268
|
d0(t, (e, a, s, n) => {
|
|
44277
|
-
var c, g, h,
|
|
44278
|
-
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 = (
|
|
44269
|
+
var c, g, h, p;
|
|
44270
|
+
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);
|
|
44279
44271
|
l && l.size > 0 && Py(e, l, u == null ? void 0 : u.top);
|
|
44280
44272
|
const d = o == null ? void 0 : o.paragraphStyle;
|
|
44281
44273
|
if (e.divides.length > 0) {
|
|
44282
|
-
const
|
|
44283
|
-
|
|
44274
|
+
const f = e.divides[e.divides.length - 1];
|
|
44275
|
+
f.glyphGroup[f.glyphGroup.length - 1].streamType === J.PARAGRAPH && (d != null && d.borderBottom) && (e.borderBottom = d.borderBottom);
|
|
44284
44276
|
}
|
|
44285
44277
|
});
|
|
44286
44278
|
}
|
|
@@ -44295,8 +44287,8 @@ function LB(r, t) {
|
|
|
44295
44287
|
const { divides: u } = l, d = u.length;
|
|
44296
44288
|
for (let c = 0; c < d; c++) {
|
|
44297
44289
|
const g = u[c], { glyphGroup: h } = g;
|
|
44298
|
-
for (const
|
|
44299
|
-
t && H4(t) && t(
|
|
44290
|
+
for (const p of h)
|
|
44291
|
+
t && H4(t) && t(p, g, l, i, s, e);
|
|
44300
44292
|
}
|
|
44301
44293
|
}
|
|
44302
44294
|
}
|
|
@@ -44463,7 +44455,7 @@ function f3(r, t, e, a, s) {
|
|
|
44463
44455
|
marginLeft: d = 0,
|
|
44464
44456
|
// localeService,
|
|
44465
44457
|
renderConfig: c = {}
|
|
44466
|
-
} = a, { paragraphStyle: g = {}, bullet: h } = s, { isRenderStyle:
|
|
44458
|
+
} = 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 ? qy(y) : null, j = t.getCustomRange(r + f), w = j && j.show !== !1, C = w ? Wy(j) : null, x = w || z || !!h || (g == null ? void 0 : g.namedStyleType), { st: S, ed: F } = v;
|
|
44467
44459
|
let { ts: T = {} } = v;
|
|
44468
44460
|
const M = y4.getValue(S, F);
|
|
44469
44461
|
if (M && !x && m)
|
|
@@ -44560,8 +44552,8 @@ function lz(r, t) {
|
|
|
44560
44552
|
pageOrient: c = N4.PORTRAIT,
|
|
44561
44553
|
defaultHeaderId: g,
|
|
44562
44554
|
defaultFooterId: h,
|
|
44563
|
-
evenPageHeaderId:
|
|
44564
|
-
evenPageFooterId:
|
|
44555
|
+
evenPageHeaderId: p,
|
|
44556
|
+
evenPageFooterId: f,
|
|
44565
44557
|
firstPageHeaderId: m,
|
|
44566
44558
|
firstPageFooterId: v,
|
|
44567
44559
|
useFirstPageHeaderFooter: y,
|
|
@@ -44601,8 +44593,8 @@ function lz(r, t) {
|
|
|
44601
44593
|
marginFooter: n1 = S,
|
|
44602
44594
|
defaultHeaderId: l1 = g,
|
|
44603
44595
|
defaultFooterId: k1 = h,
|
|
44604
|
-
evenPageHeaderId: f1 =
|
|
44605
|
-
evenPageFooterId: j1 =
|
|
44596
|
+
evenPageHeaderId: f1 = p,
|
|
44597
|
+
evenPageFooterId: j1 = f,
|
|
44606
44598
|
firstPageHeaderId: p1 = m,
|
|
44607
44599
|
firstPageFooterId: w1 = v,
|
|
44608
44600
|
useFirstPageHeaderFooter: H1 = y,
|
|
@@ -44687,8 +44679,8 @@ function _3(r, t, e, a = 1, s = ge.SECTION) {
|
|
|
44687
44679
|
useFirstPageHeaderFooter: c,
|
|
44688
44680
|
evenAndOddHeaders: g,
|
|
44689
44681
|
footerTreeMap: h,
|
|
44690
|
-
headerTreeMap:
|
|
44691
|
-
columnProperties:
|
|
44682
|
+
headerTreeMap: p,
|
|
44683
|
+
columnProperties: f = [],
|
|
44692
44684
|
columnSeparatorType: m,
|
|
44693
44685
|
marginTop: v = 0,
|
|
44694
44686
|
marginBottom: y = 0,
|
|
@@ -44703,9 +44695,9 @@ function _3(r, t, e, a = 1, s = ge.SECTION) {
|
|
|
44703
44695
|
let P = M != null ? M : "", N = L != null ? L : "";
|
|
44704
44696
|
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 : "");
|
|
44705
44697
|
let $, H;
|
|
44706
|
-
P && ((w1 = x.get(P)) != null && w1.has(F) ? $ = (H1 = x.get(P)) == null ? void 0 : H1.get(F) :
|
|
44698
|
+
P && ((w1 = x.get(P)) != null && w1.has(F) ? $ = (H1 = x.get(P)) == null ? void 0 : H1.get(F) : p && p.has(P) && ($ = z4(
|
|
44707
44699
|
r,
|
|
44708
|
-
|
|
44700
|
+
p.get(P),
|
|
44709
44701
|
t,
|
|
44710
44702
|
e,
|
|
44711
44703
|
P,
|
|
@@ -44722,7 +44714,7 @@ function _3(r, t, e, a = 1, s = ge.SECTION) {
|
|
|
44722
44714
|
let j1 = 0;
|
|
44723
44715
|
Q && (j1 = Q.top + Q.height);
|
|
44724
44716
|
const p1 = rt(
|
|
44725
|
-
|
|
44717
|
+
f,
|
|
44726
44718
|
m,
|
|
44727
44719
|
j1,
|
|
44728
44720
|
0,
|
|
@@ -44771,8 +44763,8 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
|
|
|
44771
44763
|
localeService: c,
|
|
44772
44764
|
pageSize: g,
|
|
44773
44765
|
drawings: h,
|
|
44774
|
-
marginLeft:
|
|
44775
|
-
marginRight:
|
|
44766
|
+
marginLeft: p = 0,
|
|
44767
|
+
marginRight: f = 0,
|
|
44776
44768
|
marginHeader: m = 0,
|
|
44777
44769
|
marginFooter: v = 0
|
|
44778
44770
|
} = e, y = (g == null ? void 0 : g.width) || Number.POSITIVE_INFINITY, z = (g == null ? void 0 : g.height) || Number.POSITIVE_INFINITY, _ = {
|
|
@@ -44780,7 +44772,7 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
|
|
|
44780
44772
|
footerTreeMap: u,
|
|
44781
44773
|
headerTreeMap: d,
|
|
44782
44774
|
pageSize: {
|
|
44783
|
-
width: y -
|
|
44775
|
+
width: y - p - f,
|
|
44784
44776
|
height: ft(z) - (n ? m : v) - 5
|
|
44785
44777
|
},
|
|
44786
44778
|
localeService: c,
|
|
@@ -44818,12 +44810,12 @@ function z4(r, t, e, a, s, n = !0, i, o = 0) {
|
|
|
44818
44810
|
}
|
|
44819
44811
|
function vt(r, t, e, a, s, n = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY) {
|
|
44820
44812
|
var F, T;
|
|
44821
|
-
const { lists: o, footerTreeMap: l, headerTreeMap: u, localeService: d, drawings: c } = t, { skeletonResourceReference: g } = r, { cellMargin: h, tableRows:
|
|
44813
|
+
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], {
|
|
44822
44814
|
start: y = { v: 10 },
|
|
44823
44815
|
end: z = { v: 10 },
|
|
44824
44816
|
top: _ = { v: 5 },
|
|
44825
44817
|
bottom: j = { v: 5 }
|
|
44826
|
-
} = (T = (F = v.margin) != null ? F : h) != null ? T : {}, w =
|
|
44818
|
+
} = (T = (F = v.margin) != null ? F : h) != null ? T : {}, w = f[s].size.width.v, C = i, x = {
|
|
44827
44819
|
lists: o,
|
|
44828
44820
|
footerTreeMap: l,
|
|
44829
44821
|
headerTreeMap: u,
|
|
@@ -45136,18 +45128,18 @@ function Bz(r, t, e, a, s, n) {
|
|
|
45136
45128
|
glyphType: d,
|
|
45137
45129
|
glyphSymbol: c
|
|
45138
45130
|
} = i, g = { ...s, ...u }, h = g3(g);
|
|
45139
|
-
let
|
|
45140
|
-
c ?
|
|
45141
|
-
const
|
|
45131
|
+
let p;
|
|
45132
|
+
c ? p = c : p = Az(l, t, e, a);
|
|
45133
|
+
const f = (v = (m = a == null ? void 0 : a[t]) == null ? void 0 : m.startIndexItem) != null ? v : 1;
|
|
45142
45134
|
return {
|
|
45143
45135
|
listId: r,
|
|
45144
|
-
symbol:
|
|
45136
|
+
symbol: p,
|
|
45145
45137
|
// symbol 列表的内容
|
|
45146
45138
|
ts: g,
|
|
45147
45139
|
// 文字样式
|
|
45148
45140
|
fontStyle: h,
|
|
45149
45141
|
//
|
|
45150
|
-
startIndexItem:
|
|
45142
|
+
startIndexItem: f + 1,
|
|
45151
45143
|
// bBox,
|
|
45152
45144
|
nestingLevel: i,
|
|
45153
45145
|
bulletAlign: o,
|
|
@@ -45240,9 +45232,9 @@ function Lz(r, t, e, a, s, n, i) {
|
|
|
45240
45232
|
lists: l,
|
|
45241
45233
|
drawings: u = {},
|
|
45242
45234
|
localeService: d
|
|
45243
|
-
} = n, { endIndex: c, blocks: g = [], children: h } = s, { segmentId:
|
|
45244
|
-
let x = j == null ? void 0 : j.get(
|
|
45245
|
-
x == null && (x = /* @__PURE__ */ new Map(), j == null || j.set(
|
|
45235
|
+
} = 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(), C = /* @__PURE__ */ new Map();
|
|
45236
|
+
let x = j == null ? void 0 : j.get(p);
|
|
45237
|
+
x == null && (x = /* @__PURE__ */ new Map(), j == null || j.set(p, x));
|
|
45246
45238
|
const S = {
|
|
45247
45239
|
paragraphIndex: c,
|
|
45248
45240
|
// TODO optimize this deepClone
|
|
@@ -45262,13 +45254,13 @@ function Lz(r, t, e, a, s, n, i) {
|
|
|
45262
45254
|
skeFooters: z,
|
|
45263
45255
|
pDrawingAnchor: x
|
|
45264
45256
|
};
|
|
45265
|
-
let F = r.paragraphConfigCache.get(
|
|
45266
|
-
if (F == null && (F = /* @__PURE__ */ new Map(), r.paragraphConfigCache.set(
|
|
45257
|
+
let F = r.paragraphConfigCache.get(p);
|
|
45258
|
+
if (F == null && (F = /* @__PURE__ */ new Map(), r.paragraphConfigCache.set(p, F)), F.has(c)) {
|
|
45267
45259
|
const A = (B = F.get(c)) == null ? void 0 : B.bulletSkeleton;
|
|
45268
45260
|
S.bulletSkeleton = A;
|
|
45269
45261
|
} else {
|
|
45270
45262
|
const A = Oz(v, _), L = Tz(v, l, A);
|
|
45271
|
-
Iz(
|
|
45263
|
+
Iz(f, v, L, _), S.bulletSkeleton = L;
|
|
45272
45264
|
}
|
|
45273
45265
|
for (let A = 0, L = g.length; A < L; A++) {
|
|
45274
45266
|
const I = g[A], O = t.getCustomBlock(I);
|
|
@@ -45760,19 +45752,19 @@ s3.prototype.addBezier = function(r, t, e, a, s, n, i, o) {
|
|
|
45760
45752
|
var l = [r, t], u = [e, a], d = [s, n], c = [i, o];
|
|
45761
45753
|
this.addPoint(r, t), this.addPoint(i, o);
|
|
45762
45754
|
for (var g = 0; g <= 1; g++) {
|
|
45763
|
-
var h = 6 * l[g] - 12 * u[g] + 6 * d[g],
|
|
45764
|
-
if (
|
|
45755
|
+
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];
|
|
45756
|
+
if (p === 0) {
|
|
45765
45757
|
if (h === 0)
|
|
45766
45758
|
continue;
|
|
45767
|
-
var m = -
|
|
45759
|
+
var m = -f / h;
|
|
45768
45760
|
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)));
|
|
45769
45761
|
continue;
|
|
45770
45762
|
}
|
|
45771
|
-
var v = Math.pow(h, 2) - 4 *
|
|
45763
|
+
var v = Math.pow(h, 2) - 4 * f * p;
|
|
45772
45764
|
if (!(v < 0)) {
|
|
45773
|
-
var y = (-h + Math.sqrt(v)) / (2 *
|
|
45765
|
+
var y = (-h + Math.sqrt(v)) / (2 * p);
|
|
45774
45766
|
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)));
|
|
45775
|
-
var z = (-h - Math.sqrt(v)) / (2 *
|
|
45767
|
+
var z = (-h - Math.sqrt(v)) / (2 * p);
|
|
45776
45768
|
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)));
|
|
45777
45769
|
}
|
|
45778
45770
|
}
|
|
@@ -46750,8 +46742,8 @@ function z_(r, t, e, a, s) {
|
|
|
46750
46742
|
var n;
|
|
46751
46743
|
r.segCount = n = t.parseUShort() >> 1, t.skip("uShort", 3), r.glyphIndexMap = {};
|
|
46752
46744
|
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)
|
|
46753
|
-
for (var g = void 0, h = i.parseUShort(),
|
|
46754
|
-
m !== 0 ? (d = u.offset + u.relativeOffset - 2, d += m, d += (v -
|
|
46745
|
+
for (var g = void 0, h = i.parseUShort(), p = o.parseUShort(), f = l.parseShort(), m = u.parseUShort(), v = p; v <= h; v += 1)
|
|
46746
|
+
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;
|
|
46755
46747
|
}
|
|
46756
46748
|
function __(r, t) {
|
|
46757
46749
|
var e = {};
|
|
@@ -46833,23 +46825,23 @@ function w_(r) {
|
|
|
46833
46825
|
});
|
|
46834
46826
|
}
|
|
46835
46827
|
j_(n);
|
|
46836
|
-
var l = n.segments.length, u = 0, d = [], c = [], g = [], h = [],
|
|
46828
|
+
var l = n.segments.length, u = 0, d = [], c = [], g = [], h = [], p = [], f = [];
|
|
46837
46829
|
for (e = 0; e < l; e += 1) {
|
|
46838
46830
|
var m = n.segments[e];
|
|
46839
|
-
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 && (
|
|
46831
|
+
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 }));
|
|
46840
46832
|
}
|
|
46841
|
-
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(
|
|
46833
|
+
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
|
|
46842
46834
|
d.length * 2 + 2 + // reservedPad
|
|
46843
|
-
c.length * 2 + g.length * 2 + h.length * 2 +
|
|
46835
|
+
c.length * 2 + g.length * 2 + h.length * 2 + p.length * 2, !t) {
|
|
46844
46836
|
var v = 16 + // Subtable header
|
|
46845
|
-
|
|
46837
|
+
f.length * 4;
|
|
46846
46838
|
n.cmap12Offset = 20 + n.cmap4Length, n.fields = n.fields.concat([
|
|
46847
46839
|
{ name: "cmap12Format", type: "USHORT", value: 12 },
|
|
46848
46840
|
{ name: "cmap12Reserved", type: "USHORT", value: 0 },
|
|
46849
46841
|
{ name: "cmap12Length", type: "ULONG", value: v },
|
|
46850
46842
|
{ name: "cmap12Language", type: "ULONG", value: 0 },
|
|
46851
|
-
{ name: "cmap12nGroups", type: "ULONG", value:
|
|
46852
|
-
]), n.fields = n.fields.concat(
|
|
46843
|
+
{ name: "cmap12nGroups", type: "ULONG", value: f.length / 3 }
|
|
46844
|
+
]), n.fields = n.fields.concat(f);
|
|
46853
46845
|
}
|
|
46854
46846
|
return n;
|
|
46855
46847
|
}
|
|
@@ -48174,10 +48166,10 @@ f2.prototype.draw = function(r, t, e, a, s) {
|
|
|
48174
48166
|
this.getPath(t, e, a, s).draw(r);
|
|
48175
48167
|
};
|
|
48176
48168
|
f2.prototype.drawPoints = function(r, t, e, a) {
|
|
48177
|
-
function s(c, g, h,
|
|
48169
|
+
function s(c, g, h, p) {
|
|
48178
48170
|
r.beginPath();
|
|
48179
|
-
for (var
|
|
48180
|
-
r.moveTo(g + c[
|
|
48171
|
+
for (var f = 0; f < c.length; f += 1)
|
|
48172
|
+
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);
|
|
48181
48173
|
r.closePath(), r.fill();
|
|
48182
48174
|
}
|
|
48183
48175
|
t = t !== void 0 ? t : 0, e = e !== void 0 ? e : 0, a = a !== void 0 ? a : 24;
|
|
@@ -48474,12 +48466,12 @@ function G_(r, t, e) {
|
|
|
48474
48466
|
return new f0(s, e);
|
|
48475
48467
|
}
|
|
48476
48468
|
function p5(r, t, e) {
|
|
48477
|
-
var a, s, n, i, o = new T1(), l = [], u = 0, d = !1, c = !1, g = 0, h = 0,
|
|
48469
|
+
var a, s, n, i, o = new T1(), l = [], u = 0, d = !1, c = !1, g = 0, h = 0, p, f, m, v;
|
|
48478
48470
|
if (r.isCIDFont) {
|
|
48479
48471
|
var y = r.tables.cff.topDict._fdSelect[t.index], z = r.tables.cff.topDict._fdArray[y];
|
|
48480
|
-
|
|
48472
|
+
p = z._subrs, f = z._subrsBias, m = z._defaultWidthX, v = z._nominalWidthX;
|
|
48481
48473
|
} else
|
|
48482
|
-
|
|
48474
|
+
p = r.tables.cff.topDict._subrs, f = r.tables.cff.topDict._subrsBias, m = r.tables.cff.topDict._defaultWidthX, v = r.tables.cff.topDict._nominalWidthX;
|
|
48483
48475
|
var _ = m;
|
|
48484
48476
|
function j(x, S) {
|
|
48485
48477
|
c && o.closePath(), o.moveTo(x, S), c = !0;
|
|
@@ -48518,7 +48510,7 @@ function p5(r, t, e) {
|
|
|
48518
48510
|
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);
|
|
48519
48511
|
break;
|
|
48520
48512
|
case 10:
|
|
48521
|
-
B = l.pop() +
|
|
48513
|
+
B = l.pop() + f, A = p[B], A && C(A);
|
|
48522
48514
|
break;
|
|
48523
48515
|
case 11:
|
|
48524
48516
|
return;
|
|
@@ -48639,12 +48631,12 @@ function W_(r, t, e, a) {
|
|
|
48639
48631
|
if (c === 0 || g === 0)
|
|
48640
48632
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
48641
48633
|
c += t;
|
|
48642
|
-
var h = Y2(r, c),
|
|
48643
|
-
d._fdArray =
|
|
48634
|
+
var h = Y2(r, c), p = m5(r, t, h.objects, o.objects);
|
|
48635
|
+
d._fdArray = p, g += t, d._fdSelect = q_(r, g, e.numGlyphs, p.length);
|
|
48644
48636
|
}
|
|
48645
|
-
var
|
|
48637
|
+
var f = t + d.private[1], m = Pt(r, f, d.private[0], o.objects);
|
|
48646
48638
|
if (e.defaultWidthX = m.defaultWidthX, e.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
|
|
48647
|
-
var v =
|
|
48639
|
+
var v = f + m.subrs, y = Y2(r, v);
|
|
48648
48640
|
e.subrs = y.objects, e.subrsBias = C4(e.subrs);
|
|
48649
48641
|
} else
|
|
48650
48642
|
e.subrs = [], e.subrsBias = 0;
|
|
@@ -48747,8 +48739,8 @@ function J_(r) {
|
|
|
48747
48739
|
else if (l.type === "L")
|
|
48748
48740
|
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);
|
|
48749
48741
|
else if (l.type === "C") {
|
|
48750
|
-
var c = Math.round(l.x1 - a), g = Math.round(l.y1 - s), h = Math.round(l.x2 - l.x1),
|
|
48751
|
-
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:
|
|
48742
|
+
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);
|
|
48743
|
+
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);
|
|
48752
48744
|
}
|
|
48753
48745
|
}
|
|
48754
48746
|
return t.push({ name: "endchar", type: "OP", value: 14 }), t;
|
|
@@ -49649,10 +49641,10 @@ function Zt(r, t, e) {
|
|
|
49649
49641
|
}
|
|
49650
49642
|
function vD(r, t, e) {
|
|
49651
49643
|
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++) {
|
|
49652
|
-
var u = s.parseUShort(), d = s.parseUShort(), c = s.parseUShort(), g = s.parseUShort(), h = Xt[g] || g,
|
|
49644
|
+
var u = s.parseUShort(), d = s.parseUShort(), c = s.parseUShort(), g = s.parseUShort(), h = Xt[g] || g, p = s.parseUShort(), f = s.parseUShort(), m = mD(u, c, e), v = Zt(u, d, c);
|
|
49653
49645
|
if (v !== void 0 && m !== void 0) {
|
|
49654
49646
|
var y = void 0;
|
|
49655
|
-
if (v === x4 ? y = U3.UTF16(r, o +
|
|
49647
|
+
if (v === x4 ? y = U3.UTF16(r, o + f, p) : y = U3.MACSTRING(r, o + f, p, v), y) {
|
|
49656
49648
|
var z = a[h];
|
|
49657
49649
|
z === void 0 && (z = a[h] = {}), z[m] = y;
|
|
49658
49650
|
}
|
|
@@ -49708,9 +49700,9 @@ function yD(r, t) {
|
|
|
49708
49700
|
for (var l = J0(Vt), u = J0(Kt), d = [], c = [], g = 0; g < a.length; g++) {
|
|
49709
49701
|
e = a[g];
|
|
49710
49702
|
var h = s[e];
|
|
49711
|
-
for (var
|
|
49712
|
-
var
|
|
49713
|
-
_ === void 0 && (m = 0, v = t.indexOf(
|
|
49703
|
+
for (var p in h) {
|
|
49704
|
+
var f = h[p], m = 1, v = l[p], y = kD[v], z = Zt(m, y, v), _ = G.MACSTRING(f, z);
|
|
49705
|
+
_ === void 0 && (m = 0, v = t.indexOf(p), v < 0 && (v = t.length, t.push(p)), y = 4, _ = G.UTF16(f));
|
|
49714
49706
|
var j = y5(_, c);
|
|
49715
49707
|
d.push(b5(
|
|
49716
49708
|
m,
|
|
@@ -49720,9 +49712,9 @@ function yD(r, t) {
|
|
|
49720
49712
|
_.length,
|
|
49721
49713
|
j
|
|
49722
49714
|
));
|
|
49723
|
-
var w = u[
|
|
49715
|
+
var w = u[p];
|
|
49724
49716
|
if (w !== void 0) {
|
|
49725
|
-
var C = G.UTF16(
|
|
49717
|
+
var C = G.UTF16(f), x = y5(C, c);
|
|
49726
49718
|
d.push(b5(
|
|
49727
49719
|
3,
|
|
49728
49720
|
1,
|
|
@@ -50425,10 +50417,10 @@ function SD(r) {
|
|
|
50425
50417
|
return t / r.length;
|
|
50426
50418
|
}
|
|
50427
50419
|
function TD(r) {
|
|
50428
|
-
for (var t = [], e = [], a = [], s = [], n = [], i = [], o = [], l, u = 0, d = 0, c = 0, g = 0, h = 0,
|
|
50429
|
-
var
|
|
50430
|
-
if (isNaN(
|
|
50431
|
-
throw new Error("Glyph " +
|
|
50420
|
+
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) {
|
|
50421
|
+
var f = r.glyphs.get(p), m = f.unicode | 0;
|
|
50422
|
+
if (isNaN(f.advanceWidth))
|
|
50423
|
+
throw new Error("Glyph " + f.name + " (" + p + "): advanceWidth is not a number.");
|
|
50432
50424
|
(l > m || l === void 0) && m > 0 && (l = m), u < m && (u = m);
|
|
50433
50425
|
var v = F4.getUnicodeRange(m);
|
|
50434
50426
|
if (v < 32)
|
|
@@ -50441,9 +50433,9 @@ function TD(r) {
|
|
|
50441
50433
|
h |= 1 << v - 96;
|
|
50442
50434
|
else
|
|
50443
50435
|
throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
|
|
50444
|
-
if (
|
|
50445
|
-
var y =
|
|
50446
|
-
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(
|
|
50436
|
+
if (f.name !== ".notdef") {
|
|
50437
|
+
var y = f.getMetrics();
|
|
50438
|
+
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);
|
|
50447
50439
|
}
|
|
50448
50440
|
}
|
|
50449
50441
|
var z = {
|
|
@@ -50882,11 +50874,11 @@ r2.prototype.getLigatures = function(r, t, e) {
|
|
|
50882
50874
|
for (var a = [], s = this.getLookupTables(t, e, r, 4), n = 0; n < s.length; n++)
|
|
50883
50875
|
for (var i = s[n].subtables, o = 0; o < i.length; o++)
|
|
50884
50876
|
for (var l = i[o], u = this.expandCoverage(l.coverage), d = l.ligatureSets, c = 0; c < u.length; c++)
|
|
50885
|
-
for (var g = u[c], h = d[c],
|
|
50886
|
-
var
|
|
50877
|
+
for (var g = u[c], h = d[c], p = 0; p < h.length; p++) {
|
|
50878
|
+
var f = h[p];
|
|
50887
50879
|
a.push({
|
|
50888
|
-
sub: [g].concat(
|
|
50889
|
-
by:
|
|
50880
|
+
sub: [g].concat(f.components),
|
|
50881
|
+
by: f.ligGlyph
|
|
50890
50882
|
});
|
|
50891
50883
|
}
|
|
50892
50884
|
return a;
|
|
@@ -51010,14 +51002,14 @@ function r8(r, t, e) {
|
|
|
51010
51002
|
for (var c = a.parseByte(), g = 0; g < c; g += 1)
|
|
51011
51003
|
s.push(n), d += 1;
|
|
51012
51004
|
if (a1.argument(s.length === u, "Bad flags."), i.length > 0) {
|
|
51013
|
-
var h = [],
|
|
51005
|
+
var h = [], p;
|
|
51014
51006
|
if (u > 0) {
|
|
51015
|
-
for (var
|
|
51016
|
-
n = s[
|
|
51007
|
+
for (var f = 0; f < u; f += 1)
|
|
51008
|
+
n = s[f], p = {}, p.onCurve = !!(n & 1), p.lastPointOfContour = i.indexOf(f) >= 0, h.push(p);
|
|
51017
51009
|
for (var m = 0, v = 0; v < u; v += 1)
|
|
51018
|
-
n = s[v],
|
|
51010
|
+
n = s[v], p = h[v], p.x = C5(a, n, m, 2, 16), m = p.x;
|
|
51019
51011
|
for (var y = 0, z = 0; z < u; z += 1)
|
|
51020
|
-
n = s[z],
|
|
51012
|
+
n = s[z], p = h[z], p.y = C5(a, n, y, 4, 32), y = p.y;
|
|
51021
51013
|
}
|
|
51022
51014
|
r.points = h;
|
|
51023
51015
|
} else
|
|
@@ -51399,14 +51391,14 @@ l8 = function(r, t) {
|
|
|
51399
51391
|
for (var u = 0; u < s.length; u++) {
|
|
51400
51392
|
var d = s[u], c = l.glyphs.get(d.glyphIndex);
|
|
51401
51393
|
o = new J2("glyf", c.instructions), exports.DEBUG && (console.log("---EXEC COMP " + u + "---"), o.step = -1), S4(c, o, e, a);
|
|
51402
|
-
for (var g = Math.round(d.dx * e), h = Math.round(d.dy * a),
|
|
51403
|
-
var v =
|
|
51394
|
+
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++) {
|
|
51395
|
+
var v = p[m];
|
|
51404
51396
|
v.xTouched = v.yTouched = !1, v.xo = v.x = v.x + g, v.yo = v.y = v.y + h;
|
|
51405
51397
|
}
|
|
51406
51398
|
var y = i.length;
|
|
51407
|
-
i.push.apply(i,
|
|
51408
|
-
for (var z = 0; z <
|
|
51409
|
-
n.push(
|
|
51399
|
+
i.push.apply(i, p);
|
|
51400
|
+
for (var z = 0; z < f.length; z++)
|
|
51401
|
+
n.push(f[z] + y);
|
|
51410
51402
|
}
|
|
51411
51403
|
r.instructions && !o.inhibitGridFit && (o = new J2("glyf", r.instructions), o.gZone = o.z0 = o.z1 = o.z2 = i, o.contours = n, i.push(
|
|
51412
51404
|
new U2(0, 0),
|
|
@@ -51436,8 +51428,8 @@ S4 = function(r, t, e, a) {
|
|
|
51436
51428
|
new U2(Math.round(r.advanceWidth * e), 0)
|
|
51437
51429
|
), D3(t), i.length -= 2, exports.DEBUG) {
|
|
51438
51430
|
console.log("FINISHED GLYPH", t.stack);
|
|
51439
|
-
for (var
|
|
51440
|
-
console.log(
|
|
51431
|
+
for (var p = 0; p < n; p++)
|
|
51432
|
+
console.log(p, i[p].x, i[p].y);
|
|
51441
51433
|
}
|
|
51442
51434
|
}
|
|
51443
51435
|
};
|
|
@@ -51521,8 +51513,8 @@ function KD(r) {
|
|
|
51521
51513
|
function ZD(r) {
|
|
51522
51514
|
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];
|
|
51523
51515
|
exports.DEBUG && console.log("ISECT[], ", e, a, s, n, i);
|
|
51524
|
-
var
|
|
51525
|
-
h.x = (C * (y - _) - x * (
|
|
51516
|
+
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 - _), C = p * v - f * m, x = y * j - z * _;
|
|
51517
|
+
h.x = (C * (y - _) - x * (p - m)) / w, h.y = (C * (z - j) - x * (f - v)) / w;
|
|
51526
51518
|
}
|
|
51527
51519
|
function JD(r) {
|
|
51528
51520
|
r.rp0 = r.stack.pop(), exports.DEBUG && console.log(r.step, "SRP0[]", r.rp0);
|
|
@@ -51875,10 +51867,10 @@ function a4(r, t) {
|
|
|
51875
51867
|
for (var d = 0; d < a; d++) {
|
|
51876
51868
|
var c = e.pop(), g = e.pop(), h = o + ((g & 240) >> 4);
|
|
51877
51869
|
if (h === i) {
|
|
51878
|
-
var
|
|
51879
|
-
|
|
51880
|
-
var
|
|
51881
|
-
s.setRelative(
|
|
51870
|
+
var p = (g & 15) - 8;
|
|
51871
|
+
p >= 0 && p++, exports.DEBUG && console.log(t.step, "DELTAPFIX", c, "by", p * l);
|
|
51872
|
+
var f = u[c];
|
|
51873
|
+
s.setRelative(f, f, p * l, n);
|
|
51882
51874
|
}
|
|
51883
51875
|
}
|
|
51884
51876
|
}
|
|
@@ -52082,14 +52074,14 @@ function q2(r, t) {
|
|
|
52082
52074
|
t.ip = e;
|
|
52083
52075
|
}
|
|
52084
52076
|
function W(r, t, e, a, s, n) {
|
|
52085
|
-
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,
|
|
52086
|
-
m =
|
|
52077
|
+
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;
|
|
52078
|
+
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(
|
|
52087
52079
|
n.step,
|
|
52088
52080
|
(r ? "MIRP[" : "MDRP[") + (t ? "M" : "m") + (e ? ">" : "_") + (a ? "R" : "_") + (s === 0 ? "Gr" : s === 1 ? "Bl" : s === 2 ? "Wh" : "") + "]",
|
|
52089
52081
|
r ? o + "(" + n.cvt[o] + "," + y + ")" : "",
|
|
52090
52082
|
l,
|
|
52091
52083
|
"(d =",
|
|
52092
|
-
|
|
52084
|
+
f,
|
|
52093
52085
|
"->",
|
|
52094
52086
|
v * m,
|
|
52095
52087
|
")"
|
|
@@ -52970,7 +52962,7 @@ function yw(r, t) {
|
|
|
52970
52962
|
), c = a.length === t.inputCoverage.length && o.length === t.lookaheadCoverage.length && d.length === t.backtrackCoverage.length, g = [];
|
|
52971
52963
|
if (c)
|
|
52972
52964
|
for (var h = 0; h < t.lookupRecords.length; h++)
|
|
52973
|
-
for (var
|
|
52965
|
+
for (var p = t.lookupRecords[h], f = p.lookupListIndex, m = this.getLookupByIndex(f), v = 0; v < m.subtables.length; v++) {
|
|
52974
52966
|
var y = m.subtables[v], z = this.getLookupMethod(m, y), _ = this.getSubstitutionType(m, y);
|
|
52975
52967
|
if (_ === "12")
|
|
52976
52968
|
for (var j = 0; j < a.length; j++) {
|
|
@@ -53811,8 +53803,8 @@ function Zw(r, t, e) {
|
|
|
53811
53803
|
a.skip("uShort", 1);
|
|
53812
53804
|
for (var i = a.parseUShort(), o = a.parseUShort(), l = a.parseUShort(), u = a.parseUShort(), d = [], c = 0; c < i; c++)
|
|
53813
53805
|
d.push(Yw(r, t + n + c * o, e));
|
|
53814
|
-
for (var g = [], h = t + n + i * o,
|
|
53815
|
-
g.push(Vw(r, h +
|
|
53806
|
+
for (var g = [], h = t + n + i * o, p = 0; p < l; p++)
|
|
53807
|
+
g.push(Vw(r, h + p * u, d, e));
|
|
53816
53808
|
return { axes: d, instances: g };
|
|
53817
53809
|
}
|
|
53818
53810
|
var Jw = { make: Kw, parse: Zw }, Qw = function() {
|
|
@@ -54055,7 +54047,7 @@ function fC(r, t) {
|
|
|
54055
54047
|
i = Y.getUShort(n, 12), o = pC(n, i);
|
|
54056
54048
|
} else
|
|
54057
54049
|
throw new Error("Unsupported OpenType signature " + l);
|
|
54058
|
-
for (var d, c, g, h,
|
|
54050
|
+
for (var d, c, g, h, p, f, m, v, y, z, _, j, w = 0; w < i; w += 1) {
|
|
54059
54051
|
var C = o[w], x = void 0;
|
|
54060
54052
|
switch (C.tag) {
|
|
54061
54053
|
case "cmap":
|
|
@@ -54113,10 +54105,10 @@ function fC(r, t) {
|
|
|
54113
54105
|
h = C;
|
|
54114
54106
|
break;
|
|
54115
54107
|
case "GPOS":
|
|
54116
|
-
|
|
54108
|
+
p = C;
|
|
54117
54109
|
break;
|
|
54118
54110
|
case "GSUB":
|
|
54119
|
-
|
|
54111
|
+
f = C;
|
|
54120
54112
|
break;
|
|
54121
54113
|
case "meta":
|
|
54122
54114
|
_ = C;
|
|
@@ -54142,12 +54134,12 @@ function fC(r, t) {
|
|
|
54142
54134
|
var O = C1(n, h);
|
|
54143
54135
|
s.tables.gdef = nC.parse(O.data, O.offset);
|
|
54144
54136
|
}
|
|
54145
|
-
if (
|
|
54146
|
-
var P = C1(n,
|
|
54137
|
+
if (p) {
|
|
54138
|
+
var P = C1(n, p);
|
|
54147
54139
|
s.tables.gpos = uC.parse(P.data, P.offset), s.position.init();
|
|
54148
54140
|
}
|
|
54149
|
-
if (
|
|
54150
|
-
var N = C1(n,
|
|
54141
|
+
if (f) {
|
|
54142
|
+
var N = C1(n, f);
|
|
54151
54143
|
s.tables.gsub = e8.parse(N.data, N.offset);
|
|
54152
54144
|
}
|
|
54153
54145
|
if (c) {
|
|
@@ -54206,7 +54198,7 @@ function bC(r) {
|
|
|
54206
54198
|
}
|
|
54207
54199
|
const W5 = /* @__PURE__ */ new Map(), i4 = /* @__PURE__ */ new Map();
|
|
54208
54200
|
function T4(r, t, e, a, s) {
|
|
54209
|
-
var
|
|
54201
|
+
var f, m, v, y;
|
|
54210
54202
|
let n = 0, i = a[n];
|
|
54211
54203
|
for (; e.has(i); )
|
|
54212
54204
|
n++, i = a[n];
|
|
@@ -54223,42 +54215,42 @@ function T4(r, t, e, a, s) {
|
|
|
54223
54215
|
e.add(i);
|
|
54224
54216
|
const { font: o, buffer: l } = g0.findBestMatchFontByStyle({
|
|
54225
54217
|
ff: i,
|
|
54226
|
-
bl: (
|
|
54218
|
+
bl: (f = s.bl) != null ? f : t1.FALSE,
|
|
54227
54219
|
it: (m = s.it) != null ? m : t1.FALSE
|
|
54228
54220
|
});
|
|
54229
54221
|
let u = W5.get(o.fullName);
|
|
54230
54222
|
u || (u = fC(l), W5.set(o.fullName, u));
|
|
54231
54223
|
const d = [], c = u.stringToGlyphs(r), g = (v = r.match(/[\s\S]/gu)) != null ? v : [];
|
|
54232
|
-
let h = 0,
|
|
54224
|
+
let h = 0, p = 0;
|
|
54233
54225
|
for (; h < c.length; ) {
|
|
54234
54226
|
const z = c[h];
|
|
54235
54227
|
if (z.index !== 0)
|
|
54236
54228
|
d.push({
|
|
54237
54229
|
char: g[h],
|
|
54238
|
-
start:
|
|
54239
|
-
end:
|
|
54230
|
+
start: p + t,
|
|
54231
|
+
end: p + t + g[h].length,
|
|
54240
54232
|
glyph: z,
|
|
54241
54233
|
font: u,
|
|
54242
54234
|
kerning: 0,
|
|
54243
54235
|
boundingBox: z.getBoundingBox()
|
|
54244
54236
|
});
|
|
54245
54237
|
else {
|
|
54246
|
-
const _ =
|
|
54238
|
+
const _ = p, w = r.substring(_).match(c4);
|
|
54247
54239
|
if (w) {
|
|
54248
54240
|
let C = 0;
|
|
54249
54241
|
do
|
|
54250
|
-
C += g[h].length,
|
|
54242
|
+
C += g[h].length, p += g[h].length, h++;
|
|
54251
54243
|
while (C < w[0].length);
|
|
54252
54244
|
d.push(...T4(r.slice(_, _ + w[0].length), t + _, e, a, s));
|
|
54253
54245
|
continue;
|
|
54254
54246
|
} else {
|
|
54255
54247
|
let C = c[h + 1], x = g[h + 1];
|
|
54256
54248
|
for (; (C == null ? void 0 : C.index) === 0 && !c4.test(x); )
|
|
54257
|
-
|
|
54258
|
-
d.push(...T4(r.slice(_,
|
|
54249
|
+
p += g[h].length, h++, C = c[h + 1], x = g[h + 1];
|
|
54250
|
+
d.push(...T4(r.slice(_, p + g[h].length), t + _, e, a, s));
|
|
54259
54251
|
}
|
|
54260
54252
|
}
|
|
54261
|
-
|
|
54253
|
+
p += (y = g[h]) == null ? void 0 : y.length, h++;
|
|
54262
54254
|
}
|
|
54263
54255
|
return e.delete(i), d;
|
|
54264
54256
|
}
|
|
@@ -54377,12 +54369,12 @@ function FC(r, t, e, a, s, n = !1) {
|
|
|
54377
54369
|
drawings: u = {}
|
|
54378
54370
|
} = s, d = [];
|
|
54379
54371
|
let c = new J7(t);
|
|
54380
|
-
const { endIndex: g } = a, h = e.getParagraph(g) || {}, { paragraphStyle:
|
|
54372
|
+
const { endIndex: g } = a, h = e.getParagraph(g) || {}, { paragraphStyle: p = {} } = h, { snapToGrid: f = t1.TRUE } = p;
|
|
54381
54373
|
let m = 0, v, y = 0;
|
|
54382
54374
|
const { hyphen: z, languageDetector: _ } = r, j = vC(e.getBody(), g);
|
|
54383
54375
|
let w = [];
|
|
54384
54376
|
n && (w = zC(j)), Vz(c), Yz(c), c = new Wz(c);
|
|
54385
|
-
const C = _.detect(t), x = EC(
|
|
54377
|
+
const C = _.detect(t), x = EC(p, s), S = s.doNotHyphenateCaps === t1.TRUE;
|
|
54386
54378
|
for (C !== u1.UNKNOWN && x && (z.hasPattern(C) ? c = new Nz(c, z, C, S) : z.loadPattern(C)); v = c.nextBreakPoint(); ) {
|
|
54387
54379
|
const M = t.slice(m, v.position), B = [];
|
|
54388
54380
|
if (g0.isReady && n) {
|
|
@@ -54398,7 +54390,7 @@ function FC(r, t, e, a, s, n = !1) {
|
|
|
54398
54390
|
for (const P of I) {
|
|
54399
54391
|
const { start: N, char: $ } = P, H = f3(N, e, a, s, h);
|
|
54400
54392
|
if ($ === J.TAB) {
|
|
54401
|
-
const K = l0(o, l, i,
|
|
54393
|
+
const K = l0(o, l, i, f), Q = q6(H, K);
|
|
54402
54394
|
B.push(Q);
|
|
54403
54395
|
} else if (h4($)) {
|
|
54404
54396
|
const K = P2($, H);
|
|
@@ -54431,7 +54423,7 @@ function FC(r, t, e, a, s, n = !1) {
|
|
|
54431
54423
|
const N = f3(O, e, a, s, h);
|
|
54432
54424
|
let $ = null;
|
|
54433
54425
|
if (P === J.TAB) {
|
|
54434
|
-
const H = l0(o, l, i,
|
|
54426
|
+
const H = l0(o, l, i, f);
|
|
54435
54427
|
$ = q6(N, H);
|
|
54436
54428
|
} else P === J.PARAGRAPH && ((T = s.renderConfig) == null ? void 0 : T.zeroWidthParagraphBreak) === t1.TRUE ? $ = P2(P, N, 0) : $ = P2(P, N);
|
|
54437
54429
|
B.push($), O += P.length, I = I.substring(P.length);
|
|
@@ -54702,14 +54694,14 @@ const _0 = class _0 {
|
|
|
54702
54694
|
if (!this._patterns.has(e))
|
|
54703
54695
|
throw new Error(`Language pattern not found for ${e}, please load pattern before hyphenating`);
|
|
54704
54696
|
const { levelsTable: s, pattern: n } = this._patterns.get(e), i = new Array(t.length + 1).fill(0), o = `.${t.toLocaleLowerCase()}.`.split(""), [l, u] = OC(o);
|
|
54705
|
-
let d, c, g, h,
|
|
54697
|
+
let d, c, g, h, p, f, m = -1, v, y, z;
|
|
54706
54698
|
for (; (d = l()).length > 0; )
|
|
54707
54699
|
for (m++, u() && m--, g = n, v = IC(d), y = v[0], z = v[1]; (c = y()) && g[c] !== void 0; )
|
|
54708
|
-
if (h = g[c], g = h[0],
|
|
54709
|
-
|
|
54710
|
-
for (let w = 0; w <
|
|
54700
|
+
if (h = g[c], g = h[0], p = h[1], g === void 0 && (g = {}, p = h), !z() && p !== void 0) {
|
|
54701
|
+
f = s[p];
|
|
54702
|
+
for (let w = 0; w < f.length; w++)
|
|
54711
54703
|
i[m + w] = Math.max(
|
|
54712
|
-
+
|
|
54704
|
+
+f[w],
|
|
54713
54705
|
i[m + w]
|
|
54714
54706
|
);
|
|
54715
54707
|
}
|
|
@@ -55213,7 +55205,7 @@ class v3 extends Y8 {
|
|
|
55213
55205
|
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();
|
|
55214
55206
|
if (!s || !i || !o || !l || !u)
|
|
55215
55207
|
return;
|
|
55216
|
-
const d = l.type, c = s.glyphGroup.indexOf(e), g = n.divides.indexOf(s), h = i.lines.indexOf(n),
|
|
55208
|
+
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);
|
|
55217
55209
|
let m = -1;
|
|
55218
55210
|
const v = X5(l);
|
|
55219
55211
|
switch (d) {
|
|
@@ -55237,8 +55229,8 @@ class v3 extends Y8 {
|
|
|
55237
55229
|
glyph: c,
|
|
55238
55230
|
divide: g,
|
|
55239
55231
|
line: h,
|
|
55240
|
-
column:
|
|
55241
|
-
section:
|
|
55232
|
+
column: p,
|
|
55233
|
+
section: f,
|
|
55242
55234
|
page: m,
|
|
55243
55235
|
segmentPage: a,
|
|
55244
55236
|
pageType: d,
|
|
@@ -55265,7 +55257,7 @@ class v3 extends Y8 {
|
|
|
55265
55257
|
const o = this.getSkeletonData();
|
|
55266
55258
|
if (!o)
|
|
55267
55259
|
return;
|
|
55268
|
-
const l = o.pages, { glyph: u, divide: d, line: c, column: g, section: h, page:
|
|
55260
|
+
const l = o.pages, { glyph: u, divide: d, line: c, column: g, section: h, page: p, segmentPageIndex: f, pageType: m } = i, v = X5(p);
|
|
55269
55261
|
let y = -1;
|
|
55270
55262
|
switch (m) {
|
|
55271
55263
|
case c1.HEADER:
|
|
@@ -55274,7 +55266,7 @@ class v3 extends Y8 {
|
|
|
55274
55266
|
break;
|
|
55275
55267
|
}
|
|
55276
55268
|
case c1.BODY: {
|
|
55277
|
-
y = l.indexOf(
|
|
55269
|
+
y = l.indexOf(p);
|
|
55278
55270
|
break;
|
|
55279
55271
|
}
|
|
55280
55272
|
case c1.CELL: {
|
|
@@ -55289,10 +55281,10 @@ class v3 extends Y8 {
|
|
|
55289
55281
|
divide: c.divides.indexOf(d),
|
|
55290
55282
|
line: g.lines.indexOf(c),
|
|
55291
55283
|
column: h.columns.indexOf(g),
|
|
55292
|
-
section:
|
|
55284
|
+
section: p.sections.indexOf(h),
|
|
55293
55285
|
page: y,
|
|
55294
55286
|
pageType: m,
|
|
55295
|
-
segmentPage:
|
|
55287
|
+
segmentPage: f,
|
|
55296
55288
|
isBack: a,
|
|
55297
55289
|
path: v
|
|
55298
55290
|
};
|
|
@@ -55308,8 +55300,8 @@ class v3 extends Y8 {
|
|
|
55308
55300
|
const a = this.getSkeletonData();
|
|
55309
55301
|
if (a == null)
|
|
55310
55302
|
return;
|
|
55311
|
-
const { pages: s, skeFooters: n, skeHeaders: i } = a, { divide: o, line: l, column: u, section: d, segmentPage: c, pageType: g, path: h, isBack:
|
|
55312
|
-
let { glyph:
|
|
55303
|
+
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;
|
|
55304
|
+
let { glyph: f } = e, m = null;
|
|
55313
55305
|
if (g === c1.HEADER || g === c1.FOOTER) {
|
|
55314
55306
|
m = s[c];
|
|
55315
55307
|
const { headerId: _, footerId: j, pageWidth: w } = m;
|
|
@@ -55329,7 +55321,7 @@ class v3 extends Y8 {
|
|
|
55329
55321
|
if (m == null)
|
|
55330
55322
|
return;
|
|
55331
55323
|
const v = m.sections[d].columns[u].lines[l].divides[o].glyphGroup;
|
|
55332
|
-
return
|
|
55324
|
+
return f = Math.min(f, v.length - 1), v[f].glyphType === e2.LIST && (f += 1), v[f];
|
|
55333
55325
|
}
|
|
55334
55326
|
findEditAreaByCoord(e, a, s, n) {
|
|
55335
55327
|
const { x: i, y: o } = e;
|
|
@@ -55343,21 +55335,21 @@ class v3 extends Y8 {
|
|
|
55343
55335
|
};
|
|
55344
55336
|
this._findLiquid.reset();
|
|
55345
55337
|
const { pages: g } = c;
|
|
55346
|
-
for (let h = 0,
|
|
55347
|
-
const
|
|
55338
|
+
for (let h = 0, p = g.length; h < p; h++) {
|
|
55339
|
+
const f = g[h], { marginTop: m, marginBottom: v, pageWidth: y, pageHeight: z } = f;
|
|
55348
55340
|
if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y && o < this._findLiquid.y + m) {
|
|
55349
|
-
l = d3.HEADER, d =
|
|
55341
|
+
l = d3.HEADER, d = f, u = h;
|
|
55350
55342
|
break;
|
|
55351
55343
|
}
|
|
55352
55344
|
if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y + m && o < this._findLiquid.y + z - v) {
|
|
55353
|
-
l = d3.BODY, d =
|
|
55345
|
+
l = d3.BODY, d = f, u = h;
|
|
55354
55346
|
break;
|
|
55355
55347
|
}
|
|
55356
55348
|
if (i > this._findLiquid.x && i < this._findLiquid.x + y && o > this._findLiquid.y + z - v && o < this._findLiquid.y + z) {
|
|
55357
|
-
l = d3.FOOTER, d =
|
|
55349
|
+
l = d3.FOOTER, d = f, u = h;
|
|
55358
55350
|
break;
|
|
55359
55351
|
}
|
|
55360
|
-
this._translatePage(
|
|
55352
|
+
this._translatePage(f, a, s, n);
|
|
55361
55353
|
}
|
|
55362
55354
|
return {
|
|
55363
55355
|
editArea: l,
|
|
@@ -55373,12 +55365,12 @@ class v3 extends Y8 {
|
|
|
55373
55365
|
const d = {
|
|
55374
55366
|
nearestNodeList: [],
|
|
55375
55367
|
nearestNodeDistanceList: []
|
|
55376
|
-
}, { pages: c, skeHeaders: g, skeFooters: h } = u,
|
|
55368
|
+
}, { pages: c, skeHeaders: g, skeFooters: h } = u, p = this.findEditAreaByCoord(e, a, s, n).editArea, f = c.length;
|
|
55377
55369
|
if (this._findLiquid.reset(), i == null)
|
|
55378
|
-
for (let w = 0; w <
|
|
55370
|
+
for (let w = 0; w < f; w++) {
|
|
55379
55371
|
const C = c[w], { headerId: x, footerId: S, pageWidth: F } = C;
|
|
55380
55372
|
let T = null;
|
|
55381
|
-
if (
|
|
55373
|
+
if (p === d3.HEADER || p === d3.FOOTER) {
|
|
55382
55374
|
const M = (m = g.get(x)) == null ? void 0 : m.get(F);
|
|
55383
55375
|
M && (T = this._collectNearestNode(
|
|
55384
55376
|
M,
|
|
@@ -55389,7 +55381,7 @@ class v3 extends Y8 {
|
|
|
55389
55381
|
d,
|
|
55390
55382
|
o,
|
|
55391
55383
|
l,
|
|
55392
|
-
|
|
55384
|
+
f
|
|
55393
55385
|
));
|
|
55394
55386
|
const B = (v = h.get(S)) == null ? void 0 : v.get(F);
|
|
55395
55387
|
B && (T = T != null ? T : this._collectNearestNode(
|
|
@@ -55401,7 +55393,7 @@ class v3 extends Y8 {
|
|
|
55401
55393
|
d,
|
|
55402
55394
|
o,
|
|
55403
55395
|
l,
|
|
55404
|
-
|
|
55396
|
+
f
|
|
55405
55397
|
));
|
|
55406
55398
|
} else
|
|
55407
55399
|
T = this._collectNearestNode(
|
|
@@ -55413,7 +55405,7 @@ class v3 extends Y8 {
|
|
|
55413
55405
|
d,
|
|
55414
55406
|
o,
|
|
55415
55407
|
l,
|
|
55416
|
-
|
|
55408
|
+
f
|
|
55417
55409
|
);
|
|
55418
55410
|
if (T)
|
|
55419
55411
|
return T;
|
|
@@ -55423,7 +55415,7 @@ class v3 extends Y8 {
|
|
|
55423
55415
|
const { segmentId: w, segmentPage: C, strict: x } = i;
|
|
55424
55416
|
let S = null;
|
|
55425
55417
|
if (x === !1)
|
|
55426
|
-
for (let F = 0; F <
|
|
55418
|
+
for (let F = 0; F < f; F++) {
|
|
55427
55419
|
const T = c[F], { headerId: M, footerId: B, pageWidth: A } = T;
|
|
55428
55420
|
if (w !== "") {
|
|
55429
55421
|
const L = (y = g.get(M)) == null ? void 0 : y.get(A);
|
|
@@ -55436,7 +55428,7 @@ class v3 extends Y8 {
|
|
|
55436
55428
|
d,
|
|
55437
55429
|
o,
|
|
55438
55430
|
l,
|
|
55439
|
-
|
|
55431
|
+
f
|
|
55440
55432
|
));
|
|
55441
55433
|
const I = (z = h.get(B)) == null ? void 0 : z.get(A);
|
|
55442
55434
|
I && (S = S != null ? S : this._collectNearestNode(
|
|
@@ -55448,7 +55440,7 @@ class v3 extends Y8 {
|
|
|
55448
55440
|
d,
|
|
55449
55441
|
o,
|
|
55450
55442
|
l,
|
|
55451
|
-
|
|
55443
|
+
f
|
|
55452
55444
|
));
|
|
55453
55445
|
} else
|
|
55454
55446
|
S = this._collectNearestNode(
|
|
@@ -55460,14 +55452,14 @@ class v3 extends Y8 {
|
|
|
55460
55452
|
d,
|
|
55461
55453
|
o,
|
|
55462
55454
|
l,
|
|
55463
|
-
|
|
55455
|
+
f
|
|
55464
55456
|
);
|
|
55465
55457
|
if (S)
|
|
55466
55458
|
return S;
|
|
55467
55459
|
this._translatePage(T, a, s, n);
|
|
55468
55460
|
}
|
|
55469
55461
|
else
|
|
55470
|
-
for (let F = 0; F <
|
|
55462
|
+
for (let F = 0; F < f; F++) {
|
|
55471
55463
|
const T = c[F];
|
|
55472
55464
|
if (w) {
|
|
55473
55465
|
if (C !== F) {
|
|
@@ -55484,7 +55476,7 @@ class v3 extends Y8 {
|
|
|
55484
55476
|
d,
|
|
55485
55477
|
o,
|
|
55486
55478
|
l,
|
|
55487
|
-
|
|
55479
|
+
f
|
|
55488
55480
|
));
|
|
55489
55481
|
} else
|
|
55490
55482
|
S = this._collectNearestNode(
|
|
@@ -55496,7 +55488,7 @@ class v3 extends Y8 {
|
|
|
55496
55488
|
d,
|
|
55497
55489
|
o,
|
|
55498
55490
|
l,
|
|
55499
|
-
|
|
55491
|
+
f
|
|
55500
55492
|
);
|
|
55501
55493
|
if (S)
|
|
55502
55494
|
return S;
|
|
@@ -55509,8 +55501,8 @@ class v3 extends Y8 {
|
|
|
55509
55501
|
var _, j, w, C, x, S, F, T, M;
|
|
55510
55502
|
const { sections: g, skeTables: h } = e;
|
|
55511
55503
|
this._findLiquid.translateSave();
|
|
55512
|
-
const
|
|
55513
|
-
let y = l >=
|
|
55504
|
+
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;
|
|
55505
|
+
let y = l >= p && l <= f && u >= m && u <= v;
|
|
55514
55506
|
if (c === 0 && a === c1.BODY) {
|
|
55515
55507
|
const B = i === 0, A = i === d - 1, L = s.originMarginTop / 2;
|
|
55516
55508
|
B && A ? y = !0 : B ? y = u <= v + L : A ? y = u >= m - L : y = u >= m - L && u <= v + L;
|
|
@@ -55689,13 +55681,13 @@ class v3 extends Y8 {
|
|
|
55689
55681
|
paragraphLineGapDefault: d,
|
|
55690
55682
|
defaultTabStop: c,
|
|
55691
55683
|
documentTextStyle: g
|
|
55692
|
-
},
|
|
55684
|
+
}, p = az(), { skeHeaders: f, skeFooters: m, skeListLevel: v, drawingAnchor: y } = p;
|
|
55693
55685
|
return {
|
|
55694
55686
|
viewModel: e,
|
|
55695
55687
|
dataModel: a,
|
|
55696
|
-
skeleton:
|
|
55688
|
+
skeleton: p,
|
|
55697
55689
|
skeletonResourceReference: {
|
|
55698
|
-
skeHeaders:
|
|
55690
|
+
skeHeaders: f,
|
|
55699
55691
|
skeFooters: m,
|
|
55700
55692
|
skeListLevel: v,
|
|
55701
55693
|
drawingAnchor: y
|
|
@@ -55748,18 +55740,18 @@ class v3 extends Y8 {
|
|
|
55748
55740
|
const u = e.layoutStartPointer[""];
|
|
55749
55741
|
if (e.layoutStartPointer[""] = null, u != null)
|
|
55750
55742
|
for (let c = 0; c < s.getChildren().length; c++) {
|
|
55751
|
-
const g = s.getChildren()[c], { endIndex: h, startIndex:
|
|
55752
|
-
if (u >=
|
|
55743
|
+
const g = s.getChildren()[c], { endIndex: h, startIndex: p } = g;
|
|
55744
|
+
if (u >= p && u <= h) {
|
|
55753
55745
|
l = c;
|
|
55754
55746
|
break;
|
|
55755
55747
|
}
|
|
55756
55748
|
}
|
|
55757
55749
|
for (let c = l, g = s.getChildren().length; c < g; c++) {
|
|
55758
|
-
const h = s.getChildren()[c],
|
|
55750
|
+
const h = s.getChildren()[c], p = lz(e, c), { sectionType: f, columnProperties: m, columnSeparatorType: v, sectionTypeNext: y, pageNumberStart: z = 1 } = p;
|
|
55759
55751
|
let _ = $3(o), j = !1;
|
|
55760
|
-
e.sectionBreakConfigCache.set(h.endIndex,
|
|
55752
|
+
e.sectionBreakConfigCache.set(h.endIndex, p), f === e0.CONTINUOUS ? (u0(o), this._addNewSectionByContinuous(_, m, v), j = !0) : (u == null || _ == null) && (_ = _3(
|
|
55761
55753
|
e,
|
|
55762
|
-
|
|
55754
|
+
p,
|
|
55763
55755
|
i,
|
|
55764
55756
|
(d = _ == null ? void 0 : _.pageNumber) != null ? d : z
|
|
55765
55757
|
));
|
|
@@ -55768,7 +55760,7 @@ class v3 extends Y8 {
|
|
|
55768
55760
|
s,
|
|
55769
55761
|
h,
|
|
55770
55762
|
_,
|
|
55771
|
-
|
|
55763
|
+
p,
|
|
55772
55764
|
u
|
|
55773
55765
|
);
|
|
55774
55766
|
if (y === e0.CONTINUOUS && m.length > 0, j && w.splice(0, 1), o.push(...w), e.isDirty)
|
|
@@ -55794,13 +55786,13 @@ class v3 extends Y8 {
|
|
|
55794
55786
|
marginBottom: d,
|
|
55795
55787
|
marginLeft: c,
|
|
55796
55788
|
marginRight: g
|
|
55797
|
-
} = e, h = o - c - g,
|
|
55789
|
+
} = 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(
|
|
55798
55790
|
a,
|
|
55799
55791
|
s,
|
|
55800
|
-
|
|
55792
|
+
f,
|
|
55801
55793
|
0,
|
|
55802
55794
|
h,
|
|
55803
|
-
|
|
55795
|
+
p - f
|
|
55804
55796
|
);
|
|
55805
55797
|
m.parent = e, n.push(m);
|
|
55806
55798
|
}
|
|
@@ -55814,27 +55806,27 @@ class v3 extends Y8 {
|
|
|
55814
55806
|
const g = i.indexOf(c);
|
|
55815
55807
|
if (a && g !== s)
|
|
55816
55808
|
continue;
|
|
55817
|
-
const { pageWidth: h, skeTables:
|
|
55818
|
-
let
|
|
55809
|
+
const { pageWidth: h, skeTables: p } = c;
|
|
55810
|
+
let f = c;
|
|
55819
55811
|
if (a) {
|
|
55820
55812
|
const z = (u = l.get(a)) == null ? void 0 : u.get(h), _ = (d = o.get(a)) == null ? void 0 : d.get(h);
|
|
55821
55813
|
if (z)
|
|
55822
|
-
|
|
55814
|
+
f = z;
|
|
55823
55815
|
else if (_)
|
|
55824
|
-
|
|
55816
|
+
f = _;
|
|
55825
55817
|
else
|
|
55826
55818
|
continue;
|
|
55827
55819
|
}
|
|
55828
55820
|
if (a === "") {
|
|
55829
55821
|
let z = !1;
|
|
55830
|
-
for (const _ of
|
|
55822
|
+
for (const _ of p.values()) {
|
|
55831
55823
|
const { rows: j } = _;
|
|
55832
55824
|
for (const w of j) {
|
|
55833
55825
|
const { cells: C } = w;
|
|
55834
55826
|
for (const x of C) {
|
|
55835
55827
|
const { st: S, ed: F } = x;
|
|
55836
55828
|
if (e >= S && e <= F) {
|
|
55837
|
-
|
|
55829
|
+
f = x, z = !0;
|
|
55838
55830
|
break;
|
|
55839
55831
|
}
|
|
55840
55832
|
}
|
|
@@ -55845,7 +55837,7 @@ class v3 extends Y8 {
|
|
|
55845
55837
|
break;
|
|
55846
55838
|
}
|
|
55847
55839
|
}
|
|
55848
|
-
const { sections: m, st: v, ed: y } =
|
|
55840
|
+
const { sections: m, st: v, ed: y } = f;
|
|
55849
55841
|
if (!(e < v || e > y))
|
|
55850
55842
|
for (const z of m) {
|
|
55851
55843
|
const { columns: _, st: j, ed: w } = z;
|
|
@@ -55864,8 +55856,8 @@ class v3 extends Y8 {
|
|
|
55864
55856
|
for (const K of P)
|
|
55865
55857
|
if (H -= K.count, H < 0)
|
|
55866
55858
|
return {
|
|
55867
|
-
page:
|
|
55868
|
-
pageType:
|
|
55859
|
+
page: f,
|
|
55860
|
+
pageType: f.type,
|
|
55869
55861
|
section: z,
|
|
55870
55862
|
column: C,
|
|
55871
55863
|
line: T,
|
|
@@ -55888,7 +55880,7 @@ function $e(r, t, e = {}) {
|
|
|
55888
55880
|
verticalAlign: o = m2.UNSPECIFIED,
|
|
55889
55881
|
wrapStrategy: l = O1.UNSPECIFIED,
|
|
55890
55882
|
cellValueType: u
|
|
55891
|
-
} = e, { t: d, r: c, b: g, l: h } = n || h2, { vertexAngle:
|
|
55883
|
+
} = e, { t: d, r: c, b: g, l: h } = n || h2, { vertexAngle: p, centerAngle: f } = A3(s), m = {
|
|
55892
55884
|
id: "d",
|
|
55893
55885
|
body: {
|
|
55894
55886
|
dataStream: `${r}${d7}`,
|
|
@@ -55923,8 +55915,8 @@ function $e(r, t, e = {}) {
|
|
|
55923
55915
|
renderConfig: {
|
|
55924
55916
|
horizontalAlign: i,
|
|
55925
55917
|
verticalAlign: o,
|
|
55926
|
-
centerAngle:
|
|
55927
|
-
vertexAngle:
|
|
55918
|
+
centerAngle: f,
|
|
55919
|
+
vertexAngle: p,
|
|
55928
55920
|
wrapStrategy: l,
|
|
55929
55921
|
cellValueType: u
|
|
55930
55922
|
}
|
|
@@ -56157,15 +56149,15 @@ let Z5 = class extends Z8 {
|
|
|
56157
56149
|
return [];
|
|
56158
56150
|
const a = [], { rowData: s } = this._worksheetData, n = s, i = /* @__PURE__ */ new Set(), o = this.worksheet.getRowCount();
|
|
56159
56151
|
for (const c of t) {
|
|
56160
|
-
const { startRow: g, endRow: h, startColumn:
|
|
56152
|
+
const { startRow: g, endRow: h, startColumn: p, endColumn: f } = c, m = Math.min(h, o);
|
|
56161
56153
|
for (let v = g; v <= m; v++) {
|
|
56162
56154
|
if (i.has(v) || ((l = n[v]) == null ? void 0 : l.ia) === t1.FALSE)
|
|
56163
56155
|
continue;
|
|
56164
|
-
if (this._hasUnMergedCellInRow(v,
|
|
56156
|
+
if (this._hasUnMergedCellInRow(v, p, f))
|
|
56165
56157
|
if (e) {
|
|
56166
56158
|
const z = this.worksheet.getRowHeight(v);
|
|
56167
56159
|
let _ = 0, j = 0;
|
|
56168
|
-
for (let w =
|
|
56160
|
+
for (let w = p; w <= f; w++) {
|
|
56169
56161
|
const C = (u = e.getValue(v, w)) != null ? u : 0;
|
|
56170
56162
|
_ = Math.max(_, C);
|
|
56171
56163
|
const x = (d = this.calculateAutoHeightForCell(v, w)) != null ? d : this._worksheetData.defaultRowHeight;
|
|
@@ -56201,7 +56193,7 @@ let Z5 = class extends Z8 {
|
|
|
56201
56193
|
}
|
|
56202
56194
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
56203
56195
|
calculateAutoHeightForCell(t, e) {
|
|
56204
|
-
var h,
|
|
56196
|
+
var h, p, f, m, v, y, z, _, j, w, C, x, S, F, T, M;
|
|
56205
56197
|
const { columnData: a, defaultColumnWidth: s } = this._worksheetData, n = this.worksheet.getCellInfoInMergeData(t, e);
|
|
56206
56198
|
if (this._skipAutoHeightForMergedCells && (n.isMerged || n.isMergedMainCell))
|
|
56207
56199
|
return;
|
|
@@ -56211,7 +56203,7 @@ let Z5 = class extends Z8 {
|
|
|
56211
56203
|
if (B)
|
|
56212
56204
|
return B;
|
|
56213
56205
|
}
|
|
56214
|
-
const l = ((
|
|
56206
|
+
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;
|
|
56215
56207
|
let g = (z = (y = a[e]) == null ? void 0 : y.w) != null ? z : s;
|
|
56216
56208
|
if (n.isMergedMainCell) {
|
|
56217
56209
|
const B = n.startColumn, A = n.endColumn;
|
|
@@ -56315,19 +56307,19 @@ let Z5 = class extends Z8 {
|
|
|
56315
56307
|
const d = (y, z, _) => [...Array.from(
|
|
56316
56308
|
{ length: z - y + 1 },
|
|
56317
56309
|
(w, C) => C + y
|
|
56318
|
-
), ..._], c = Math.max(0, n - m4), g = Math.min(o, i + m4), h = d(c, g, l),
|
|
56319
|
-
let
|
|
56320
|
-
t === 0 && (
|
|
56310
|
+
), ..._], c = Math.max(0, n - m4), g = Math.min(o, i + m4), h = d(c, g, l), p = Math.max(0, t - 1);
|
|
56311
|
+
let f = this.columnWidthAccumulation[t] - this.columnWidthAccumulation[p];
|
|
56312
|
+
t === 0 && (f = this.columnWidthAccumulation[t]);
|
|
56321
56313
|
for (let y = 0; y < h.length; y++) {
|
|
56322
56314
|
const z = h[y], { isMerged: _, isMergedMainCell: j } = this.worksheet.getCellInfoInMergeData(t, z);
|
|
56323
56315
|
if (_ && !j || !this.worksheet.getRowVisible(z)) continue;
|
|
56324
56316
|
const w = e.getCell(z, t);
|
|
56325
56317
|
if (!w || w.p && (z + R6 <= n || z - R6 >= i))
|
|
56326
56318
|
continue;
|
|
56327
|
-
let C = this._getMeasuredWidthByCell(w, z, t,
|
|
56319
|
+
let C = this._getMeasuredWidthByCell(w, z, t, f);
|
|
56328
56320
|
if (w.fontRenderExtension && (C += (((m = w.fontRenderExtension) == null ? void 0 : m.leftOffset) || 0) + (((v = w.fontRenderExtension) == null ? void 0 : v.rightOffset) || 0)), a = Math.max(a, C), a >= j6) return j6;
|
|
56329
56321
|
}
|
|
56330
|
-
return a === 0 ?
|
|
56322
|
+
return a === 0 ? f : Math.max(pa, a);
|
|
56331
56323
|
}
|
|
56332
56324
|
getColWidth(t) {
|
|
56333
56325
|
const e = Math.max(0, t - 1);
|
|
@@ -56343,10 +56335,10 @@ let Z5 = class extends Z8 {
|
|
|
56343
56335
|
* @returns {number} currColWidth
|
|
56344
56336
|
*/
|
|
56345
56337
|
_getMeasuredWidthByCell(t, e, a, s) {
|
|
56346
|
-
var h,
|
|
56338
|
+
var h, p, f;
|
|
56347
56339
|
let n = 0;
|
|
56348
56340
|
if ((h = t.fontRenderExtension) != null && h.isSkip && (t != null && t.interceptorAutoWidth)) {
|
|
56349
|
-
const m = (
|
|
56341
|
+
const m = (p = t.interceptorAutoWidth) == null ? void 0 : p.call(t);
|
|
56350
56342
|
if (m)
|
|
56351
56343
|
return m;
|
|
56352
56344
|
}
|
|
@@ -56359,7 +56351,7 @@ let Z5 = class extends Z8 {
|
|
|
56359
56351
|
const d = new e3(l), { vertexAngle: c } = A3(u);
|
|
56360
56352
|
(i == null ? void 0 : i.tb) === O1.WRAP ? l.updateDocumentDataPageSize(s, 1 / 0) : l.updateDocumentDataPageSize(1 / 0, 1 / 0);
|
|
56361
56353
|
const g = v3.create(d, this._localeService);
|
|
56362
|
-
if (g.calculate(), n = ((
|
|
56354
|
+
if (g.calculate(), n = ((f = re(g, c)) != null ? f : { width: 0 }).width, g) {
|
|
56363
56355
|
const m = g.getSkeletonData(), {
|
|
56364
56356
|
marginTop: v,
|
|
56365
56357
|
marginBottom: y,
|
|
@@ -56497,7 +56489,7 @@ let Z5 = class extends Z8 {
|
|
|
56497
56489
|
*/
|
|
56498
56490
|
// eslint-disable-next-line complexity, max-lines-per-function
|
|
56499
56491
|
_getCellDocumentModel(t, e = K5) {
|
|
56500
|
-
var
|
|
56492
|
+
var f;
|
|
56501
56493
|
const { isDeepClone: a, displayRawFormula: s, ignoreTextRotation: n } = {
|
|
56502
56494
|
...K5,
|
|
56503
56495
|
...e
|
|
@@ -56506,7 +56498,7 @@ let Z5 = class extends Z8 {
|
|
|
56506
56498
|
let o, l = "document";
|
|
56507
56499
|
const u = dx(i), d = n ? d2.tr : u.textRotation || d2.tr;
|
|
56508
56500
|
let c = u.horizontalAlign || d2.ht;
|
|
56509
|
-
const g = u.verticalAlign || d2.vt, h = u.wrapStrategy || d2.tb,
|
|
56501
|
+
const g = u.verticalAlign || d2.vt, h = u.wrapStrategy || d2.tb, p = u.paddingData || h2;
|
|
56510
56502
|
if (t.f && s)
|
|
56511
56503
|
o = $e(t.f.toString(), {}, { verticalAlign: g }), c = d2.ht;
|
|
56512
56504
|
else if (t.p) {
|
|
@@ -56514,7 +56506,7 @@ let Z5 = class extends Z8 {
|
|
|
56514
56506
|
o = this._updateConfigAndGetDocumentModel(
|
|
56515
56507
|
a ? o1.deepClone(t.p) : t.p,
|
|
56516
56508
|
c,
|
|
56517
|
-
|
|
56509
|
+
p,
|
|
56518
56510
|
{
|
|
56519
56511
|
horizontalAlign: c,
|
|
56520
56512
|
verticalAlign: g,
|
|
@@ -56541,8 +56533,8 @@ let Z5 = class extends Z8 {
|
|
|
56541
56533
|
wrapStrategy: h,
|
|
56542
56534
|
verticalAlign: g,
|
|
56543
56535
|
horizontalAlign: c,
|
|
56544
|
-
paddingData:
|
|
56545
|
-
fill: (
|
|
56536
|
+
paddingData: p,
|
|
56537
|
+
fill: (f = i == null ? void 0 : i.bg) == null ? void 0 : f.rgb
|
|
56546
56538
|
};
|
|
56547
56539
|
}
|
|
56548
56540
|
/**
|
|
@@ -56579,23 +56571,23 @@ let Z5 = class extends Z8 {
|
|
|
56579
56571
|
height: j
|
|
56580
56572
|
});
|
|
56581
56573
|
}
|
|
56582
|
-
const h = this.getOverflowPosition(g, c, t, e, this.getColumnCount()), { startColumn:
|
|
56583
|
-
if (
|
|
56574
|
+
const h = this.getOverflowPosition(g, c, t, e, this.getColumnCount()), { startColumn: p, endColumn: f } = h;
|
|
56575
|
+
if (p === f)
|
|
56584
56576
|
return !0;
|
|
56585
|
-
this.appendToOverflowCache(t, e,
|
|
56577
|
+
this.appendToOverflowCache(t, e, p, f);
|
|
56586
56578
|
} else if (l === O1.WRAP && n !== 0) {
|
|
56587
56579
|
if (this.intersectMergeRange(t, e))
|
|
56588
56580
|
return !0;
|
|
56589
56581
|
const { startY: g, endY: h } = this.getCellWithCoordByIndex(
|
|
56590
56582
|
t,
|
|
56591
56583
|
e
|
|
56592
|
-
),
|
|
56593
|
-
s.getViewModel().getDataModel().updateDocumentDataPageSize(
|
|
56594
|
-
const
|
|
56595
|
-
if (!
|
|
56584
|
+
), p = h - g;
|
|
56585
|
+
s.getViewModel().getDataModel().updateDocumentDataPageSize(p), s.calculate();
|
|
56586
|
+
const f = re(s, n);
|
|
56587
|
+
if (!f)
|
|
56596
56588
|
return !0;
|
|
56597
56589
|
const { startColumn: m, endColumn: v } = this.getOverflowPosition(
|
|
56598
|
-
|
|
56590
|
+
f,
|
|
56599
56591
|
c,
|
|
56600
56592
|
t,
|
|
56601
56593
|
e,
|
|
@@ -56707,16 +56699,16 @@ let Z5 = class extends Z8 {
|
|
|
56707
56699
|
if (d) {
|
|
56708
56700
|
const { documentModel: g } = d;
|
|
56709
56701
|
if (g) {
|
|
56710
|
-
const { fontString: h, wrapStrategy:
|
|
56702
|
+
const { fontString: h, wrapStrategy: p, verticalAlign: f, horizontalAlign: m } = d, v = new e3(g);
|
|
56711
56703
|
if (v) {
|
|
56712
56704
|
const y = v3.create(v, this._localeService);
|
|
56713
56705
|
y.calculate(), n = {
|
|
56714
56706
|
documentSkeleton: y,
|
|
56715
56707
|
vertexAngle: o,
|
|
56716
56708
|
centerAngle: l,
|
|
56717
|
-
verticalAlign:
|
|
56709
|
+
verticalAlign: f,
|
|
56718
56710
|
horizontalAlign: m,
|
|
56719
|
-
wrapStrategy:
|
|
56711
|
+
wrapStrategy: p,
|
|
56720
56712
|
imageCacheMap: this._imageCacheMap,
|
|
56721
56713
|
cellData: a,
|
|
56722
56714
|
fontString: h,
|
|
@@ -56725,14 +56717,14 @@ let Z5 = class extends Z8 {
|
|
|
56725
56717
|
}
|
|
56726
56718
|
}
|
|
56727
56719
|
} else {
|
|
56728
|
-
const g = g3(s != null ? s : void 0).fontCache, { vt: h, ht:
|
|
56720
|
+
const g = g3(s != null ? s : void 0).fontCache, { vt: h, ht: p, tb: f } = s != null ? s : {};
|
|
56729
56721
|
n = {
|
|
56730
56722
|
documentSkeleton: void 0,
|
|
56731
56723
|
vertexAngle: o,
|
|
56732
56724
|
centerAngle: l,
|
|
56733
56725
|
verticalAlign: h != null ? h : m2.UNSPECIFIED,
|
|
56734
|
-
horizontalAlign:
|
|
56735
|
-
wrapStrategy:
|
|
56726
|
+
horizontalAlign: p != null ? p : d1.UNSPECIFIED,
|
|
56727
|
+
wrapStrategy: f != null ? f : O1.OVERFLOW,
|
|
56736
56728
|
imageCacheMap: this._imageCacheMap,
|
|
56737
56729
|
cellData: a,
|
|
56738
56730
|
fontString: g,
|
|
@@ -56776,10 +56768,10 @@ let Z5 = class extends Z8 {
|
|
|
56776
56768
|
const h = this.worksheet.getCell(o, l);
|
|
56777
56769
|
if (!h)
|
|
56778
56770
|
break;
|
|
56779
|
-
const
|
|
56780
|
-
if (!
|
|
56771
|
+
const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this.worksheet.getComposedCellStyleByCellData(o, l, h);
|
|
56772
|
+
if (!f && !p)
|
|
56781
56773
|
break;
|
|
56782
|
-
const m = (c = (d =
|
|
56774
|
+
const m = (c = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? c : p == null ? void 0 : p[t];
|
|
56783
56775
|
if (m) {
|
|
56784
56776
|
const v = y3(m.cl) || z3;
|
|
56785
56777
|
s.push({
|
|
@@ -56791,10 +56783,10 @@ let Z5 = class extends Z8 {
|
|
|
56791
56783
|
}
|
|
56792
56784
|
}
|
|
56793
56785
|
s.forEach((g) => {
|
|
56794
|
-
const { r: h, c:
|
|
56795
|
-
e.border.getValue(h,
|
|
56786
|
+
const { r: h, c: p, style: f, color: m } = g;
|
|
56787
|
+
e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
|
|
56796
56788
|
type: t,
|
|
56797
|
-
style:
|
|
56789
|
+
style: f,
|
|
56798
56790
|
color: m
|
|
56799
56791
|
};
|
|
56800
56792
|
});
|
|
@@ -56883,8 +56875,8 @@ function re(r, t = 0) {
|
|
|
56883
56875
|
let l = 0, u = 0;
|
|
56884
56876
|
const d = [];
|
|
56885
56877
|
Jy([n], (g) => {
|
|
56886
|
-
const { lines: h, width:
|
|
56887
|
-
u += m, d.push({ rotatedWidth: v, spaceWidth:
|
|
56878
|
+
const { lines: h, width: p, spaceWidth: f } = g, { rotatedHeight: m, rotatedWidth: v } = M7(h, p, a);
|
|
56879
|
+
u += m, d.push({ rotatedWidth: v, spaceWidth: f });
|
|
56888
56880
|
});
|
|
56889
56881
|
const c = d.length;
|
|
56890
56882
|
for (let g = 0; g < c; g++) {
|
|
@@ -56931,21 +56923,21 @@ class fx extends C3 {
|
|
|
56931
56923
|
const { rowHeightAccumulation: d, columnTotalWidth: c, columnWidthAccumulation: g, rowTotalHeight: h } = s;
|
|
56932
56924
|
if (!d || !g || c === void 0 || h === void 0 || !l)
|
|
56933
56925
|
return;
|
|
56934
|
-
const
|
|
56926
|
+
const p = this._getScale(a), { viewRanges: f = [], checkOutOfViewBound: m } = i, v = {
|
|
56935
56927
|
ctx: e,
|
|
56936
|
-
scale:
|
|
56928
|
+
scale: p,
|
|
56937
56929
|
// rowHeightAccumulation,
|
|
56938
56930
|
columnTotalWidth: c,
|
|
56939
56931
|
// columnWidthAccumulation,
|
|
56940
56932
|
rowTotalHeight: h,
|
|
56941
|
-
viewRanges:
|
|
56933
|
+
viewRanges: f,
|
|
56942
56934
|
checkOutOfViewBound: m || !0,
|
|
56943
56935
|
diffRanges: n,
|
|
56944
56936
|
spreadsheetSkeleton: s
|
|
56945
56937
|
};
|
|
56946
56938
|
e.save();
|
|
56947
56939
|
const y = [], z = /* @__PURE__ */ new Set(), _ = s.getRowCount() - 1, j = s.getColumnCount() - 1;
|
|
56948
|
-
|
|
56940
|
+
f.forEach((w) => {
|
|
56949
56941
|
w.startColumn -= s0, w.endColumn += s0, w = Pv(w, _, j), s.worksheet.getMergedCellRange(w.startRow, w.startColumn, w.endRow, w.endColumn).forEach((x) => {
|
|
56950
56942
|
const S = s.worksheet.getSpanModel().getMergeDataIndex(x.startRow, x.startColumn);
|
|
56951
56943
|
z.has(S) || (z.add(S), y.push(x));
|
|
@@ -56962,14 +56954,14 @@ class fx extends C3 {
|
|
|
56962
56954
|
}
|
|
56963
56955
|
_renderFontEachCell(e, a, s, n) {
|
|
56964
56956
|
var C, x;
|
|
56965
|
-
const { ctx: i, viewRanges: o, diffRanges: l, spreadsheetSkeleton: u, cellInfo: d } = e, { startY: c, endY: g, startX: h, endX:
|
|
56966
|
-
if (e.startX = h, e.startY = c, e.endX =
|
|
56957
|
+
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;
|
|
56958
|
+
if (e.startX = h, e.startY = c, e.endX = p, e.endY = g, f && !m)
|
|
56967
56959
|
return !0;
|
|
56968
56960
|
m && (e.startX = v.startX, e.startY = v.startY, e.endX = v.endX, e.endY = v.endY);
|
|
56969
56961
|
const y = n.getValue(a, s);
|
|
56970
56962
|
if (!y) return !0;
|
|
56971
56963
|
e.fontCache = y;
|
|
56972
|
-
const z = u.overflowCache.getValue(a, s), _ = l && l.length > 0 ? l : o, j = !m && !
|
|
56964
|
+
const z = u.overflowCache.getValue(a, s), _ = l && l.length > 0 ? l : o, j = !m && !f;
|
|
56973
56965
|
if (!z && j && !S7(_, a, s))
|
|
56974
56966
|
return !0;
|
|
56975
56967
|
if (j) {
|
|
@@ -56996,27 +56988,27 @@ class fx extends C3 {
|
|
|
56996
56988
|
_renderImages(e, a, s, n, i, o) {
|
|
56997
56989
|
var z;
|
|
56998
56990
|
const { documentSkeleton: l, verticalAlign: u, horizontalAlign: d } = a, c = l.getSkeletonData().pages[0].height, g = l.getSkeletonData().pages[0].width, h = 2;
|
|
56999
|
-
let
|
|
56991
|
+
let p = s, f = n;
|
|
57000
56992
|
switch (u) {
|
|
57001
56993
|
case m2.TOP:
|
|
57002
|
-
|
|
56994
|
+
f = n + h;
|
|
57003
56995
|
break;
|
|
57004
56996
|
case m2.MIDDLE:
|
|
57005
|
-
|
|
56997
|
+
f = (n + o) / 2 - c / 2;
|
|
57006
56998
|
break;
|
|
57007
56999
|
default:
|
|
57008
|
-
|
|
57000
|
+
f = o - c - h;
|
|
57009
57001
|
break;
|
|
57010
57002
|
}
|
|
57011
57003
|
switch (d) {
|
|
57012
57004
|
case d1.RIGHT:
|
|
57013
|
-
|
|
57005
|
+
p = i - g - h;
|
|
57014
57006
|
break;
|
|
57015
57007
|
case d1.CENTER:
|
|
57016
|
-
|
|
57008
|
+
p = (s + i) / 2 - g / 2;
|
|
57017
57009
|
break;
|
|
57018
57010
|
default:
|
|
57019
|
-
|
|
57011
|
+
p = s + h;
|
|
57020
57012
|
break;
|
|
57021
57013
|
}
|
|
57022
57014
|
const v = l.getViewModel().getDataModel().getDrawings(), y = (z = l.getSkeletonData()) == null ? void 0 : z.pages[0].skeDrawings;
|
|
@@ -57034,7 +57026,7 @@ class fx extends C3 {
|
|
|
57034
57026
|
var A;
|
|
57035
57027
|
(A = this.parent) == null || A.makeDirty();
|
|
57036
57028
|
}
|
|
57037
|
-
), C =
|
|
57029
|
+
), C = p + _.aLeft, x = f + _.aTop, S = _.width, F = _.height, T = _.angle, { rotatedHeight: M, rotatedWidth: B } = px(S, F, T);
|
|
57038
57030
|
if (w && w.complete) {
|
|
57039
57031
|
const A = T * Math.PI / 180;
|
|
57040
57032
|
if (e.save(), e.translate(C + B / 2, x + M / 2), e.rotate(A), w.getAttribute("data-error") === "true")
|
|
@@ -57061,12 +57053,12 @@ class fx extends C3 {
|
|
|
57061
57053
|
var C, x, S, F, T, M;
|
|
57062
57054
|
const { ctx: i, scale: o, overflowRectangle: l, fontCache: u } = e;
|
|
57063
57055
|
let { startX: d, endX: c, startY: g, endY: h } = e;
|
|
57064
|
-
const { horizontalAlign:
|
|
57065
|
-
let v =
|
|
57066
|
-
|
|
57056
|
+
const { horizontalAlign: p = 0, vertexAngle: f = 0, centerAngle: m = 0 } = u;
|
|
57057
|
+
let v = p;
|
|
57058
|
+
p === d1.UNSPECIFIED && (m === J1 && f === J1 ? v = d1.CENTER : (f > 0 && f !== J1 || f === -J1) && (v = d1.RIGHT));
|
|
57067
57059
|
const y = (S = (x = (C = u == null ? void 0 : u.cellData) == null ? void 0 : C.fontRenderExtension) == null ? void 0 : x.rightOffset) != null ? S : 0, z = (M = (T = (F = u == null ? void 0 : u.cellData) == null ? void 0 : F.fontRenderExtension) == null ? void 0 : T.leftOffset) != null ? M : 0;
|
|
57068
57060
|
let _ = !0;
|
|
57069
|
-
|
|
57061
|
+
f === 0 && (d = d + z, c = c - y, (y !== 0 || z !== 0) && (_ = !1));
|
|
57070
57062
|
const j = c - d, w = h - g;
|
|
57071
57063
|
if (l && _) {
|
|
57072
57064
|
const { startColumn: B, startRow: A, endColumn: L, endRow: I } = l, { spreadsheetSkeleton: O } = e, { rowHeightAccumulation: P, columnWidthAccumulation: N } = O;
|
|
@@ -57114,14 +57106,14 @@ class fx extends C3 {
|
|
|
57114
57106
|
var x, S, F, T, M, B, A, L, I, O, P, N, $, H;
|
|
57115
57107
|
const { fontCache: o } = n;
|
|
57116
57108
|
if (!o) return;
|
|
57117
|
-
const l = (S = (x = o.style) == null ? void 0 : x.pd) != null ? S : h2, u = (F = l.l) != null ? F : h2.l, d = (T = l.r) != null ? T : h2.r, c = (M = l.t) != null ? M : h2.t, g = (B = l.b) != null ? B : h2.b, { vertexAngle: h = 0, wrapStrategy:
|
|
57118
|
-
if ((
|
|
57119
|
-
const m = c7(
|
|
57109
|
+
const l = (S = (x = o.style) == null ? void 0 : x.pd) != null ? S : h2, u = (F = l.l) != null ? F : h2.l, d = (T = l.r) != null ? T : h2.r, c = (M = l.t) != null ? M : h2.t, g = (B = l.b) != null ? B : h2.b, { vertexAngle: h = 0, wrapStrategy: p, cellData: f } = o;
|
|
57110
|
+
if ((f == null ? void 0 : f.v) === void 0 || (f == null ? void 0 : f.v) === null) return;
|
|
57111
|
+
const m = c7(f), { startX: v, startY: y, endX: z, endY: _ } = n, j = z - v - u - d, w = _ - y - c - g;
|
|
57120
57112
|
let C = o.horizontalAlign;
|
|
57121
|
-
o.horizontalAlign === d1.UNSPECIFIED && (
|
|
57113
|
+
o.horizontalAlign === d1.UNSPECIFIED && (f.t === T2.NUMBER || !o1.isDefine(f.t) && typeof f.v == "number" ? C = d1.RIGHT : f.t === T2.BOOLEAN && (C = d1.CENTER)), Z4.drawWith(e, {
|
|
57122
57114
|
text: m,
|
|
57123
57115
|
fontStyle: o.fontString,
|
|
57124
|
-
warp:
|
|
57116
|
+
warp: p === O1.WRAP && h === 0,
|
|
57125
57117
|
hAlign: C,
|
|
57126
57118
|
vAlign: o.verticalAlign,
|
|
57127
57119
|
width: j,
|
|
@@ -57132,7 +57124,7 @@ class fx extends C3 {
|
|
|
57132
57124
|
strokeLine: !!((O = (I = o.style) == null ? void 0 : I.st) != null && O.s),
|
|
57133
57125
|
underline: !!((N = (P = o.style) == null ? void 0 : P.ul) != null && N.s),
|
|
57134
57126
|
underlineType: (H = ($ = o.style) == null ? void 0 : $.ul) == null ? void 0 : H.t,
|
|
57135
|
-
cellValueType:
|
|
57127
|
+
cellValueType: f.t
|
|
57136
57128
|
});
|
|
57137
57129
|
}
|
|
57138
57130
|
_renderDocuments(e, a, s, n, i) {
|
|
@@ -57144,9 +57136,9 @@ class fx extends C3 {
|
|
|
57144
57136
|
const { documentSkeleton: u, vertexAngle: d = 0, wrapStrategy: c } = l;
|
|
57145
57137
|
if (!u) return;
|
|
57146
57138
|
const g = u.getViewModel().getDataModel();
|
|
57147
|
-
let { startX: h, startY:
|
|
57148
|
-
const v =
|
|
57149
|
-
c === O1.WRAP && d === 0 ? (g.updateDocumentDataPageSize(
|
|
57139
|
+
let { startX: h, startY: p, endX: f, endY: m } = n;
|
|
57140
|
+
const v = f - h, y = m - p;
|
|
57141
|
+
c === O1.WRAP && d === 0 ? (g.updateDocumentDataPageSize(f - h), u.calculate()) : g.updateDocumentDataPageSize(Number.POSITIVE_INFINITY);
|
|
57150
57142
|
const z = i.getValue(a, s);
|
|
57151
57143
|
if (!(c === O1.WRAP && d === 0) && z) {
|
|
57152
57144
|
const w = re(u), C = g.getSnapshot().documentStyle;
|
|
@@ -57155,13 +57147,13 @@ class fx extends C3 {
|
|
|
57155
57147
|
u.getViewModel().getDataModel().updateDocumentDataPageSize(A + I + L), u.calculate();
|
|
57156
57148
|
}
|
|
57157
57149
|
const x = z.endColumn, S = z.startColumn, F = z.startRow, T = z.endRow, M = n.spreadsheetSkeleton.getCellWithCoordByIndex(T, x);
|
|
57158
|
-
|
|
57150
|
+
f = M.endX, m = M.endY;
|
|
57159
57151
|
const B = n.spreadsheetSkeleton.getCellWithCoordByIndex(F, S);
|
|
57160
|
-
h = B.startX,
|
|
57152
|
+
h = B.startX, p = B.startY;
|
|
57161
57153
|
}
|
|
57162
57154
|
const j = {
|
|
57163
|
-
right:
|
|
57164
|
-
bottom: m -
|
|
57155
|
+
right: f - h,
|
|
57156
|
+
bottom: m - p
|
|
57165
57157
|
};
|
|
57166
57158
|
u.makeDirty(!1), o.resize(v, y), o.changeSkeleton(u).render(e, {
|
|
57167
57159
|
viewBound: {
|
|
@@ -57173,8 +57165,8 @@ class fx extends C3 {
|
|
|
57173
57165
|
});
|
|
57174
57166
|
}
|
|
57175
57167
|
_clipRectangleForOverflow(e, a, s, n, i, o, l, u, d = 0) {
|
|
57176
|
-
const c = l[a - 1] || 0, g = l[s] || l[l.length - 1], h = u[n - 1] || 0,
|
|
57177
|
-
e.rectByPrecision(h + d, c + d,
|
|
57168
|
+
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];
|
|
57169
|
+
e.rectByPrecision(h + d, c + d, p - h - 2 * d, g - c - 2 * d), e.clip();
|
|
57178
57170
|
}
|
|
57179
57171
|
}
|
|
57180
57172
|
q3.add(fx);
|
|
@@ -57201,19 +57193,19 @@ class zx extends C3 {
|
|
|
57201
57193
|
if (!i.getRowVisible(u) || !i.getColVisible(d))
|
|
57202
57194
|
return;
|
|
57203
57195
|
let c = i.getCell(u, d);
|
|
57204
|
-
const g = s.getCellWithCoordByIndex(u, d, !1), { isMerged: h, isMergedMainCell:
|
|
57196
|
+
const g = s.getCellWithCoordByIndex(u, d, !1), { isMerged: h, isMergedMainCell: p, mergeInfo: f } = g;
|
|
57205
57197
|
let { startY: m, endY: v, startX: y, endX: z } = g;
|
|
57206
|
-
if ((
|
|
57198
|
+
if ((p || h) && (m = f.startY, v = f.endY, y = f.startX, z = f.endX), h) {
|
|
57207
57199
|
const x = {
|
|
57208
|
-
row:
|
|
57209
|
-
col:
|
|
57200
|
+
row: f.startRow,
|
|
57201
|
+
col: f.startColumn
|
|
57210
57202
|
};
|
|
57211
57203
|
c = i.getCell(x.row, x.col);
|
|
57212
57204
|
}
|
|
57213
|
-
if (!this.isRenderDiffRangesByRow(
|
|
57205
|
+
if (!this.isRenderDiffRangesByRow(f.startRow, f.endRow, n))
|
|
57214
57206
|
return !0;
|
|
57215
57207
|
if (g.isMerged || g.isMergedMainCell) {
|
|
57216
|
-
const x = yx(
|
|
57208
|
+
const x = yx(f);
|
|
57217
57209
|
if (l.has(x))
|
|
57218
57210
|
return;
|
|
57219
57211
|
l.add(x);
|
|
@@ -57297,8 +57289,8 @@ class jx extends C3 {
|
|
|
57297
57289
|
const { rowHeightAccumulation: u, columnTotalWidth: d, columnWidthAccumulation: c, rowTotalHeight: g, worksheet: h } = s;
|
|
57298
57290
|
if (!u || !c || d === void 0 || g === void 0)
|
|
57299
57291
|
return;
|
|
57300
|
-
const
|
|
57301
|
-
this.setStyleToCtx(e,
|
|
57292
|
+
const p = this.getRowsCfg(h.getSheetId()), f = this.getHeaderStyle(h.getSheetId()), m = this._getScale(a);
|
|
57293
|
+
this.setStyleToCtx(e, f), e.save(), e.fillStyle = f.backgroundColor, e.fillRectByPrecision(0, 0, i, g), e.restore(), e.setLineWidthByPrecision(1), e.translateWithPrecisionRatio(p2, p2);
|
|
57302
57294
|
let v = 0;
|
|
57303
57295
|
const y = u.length;
|
|
57304
57296
|
for (let _ = o - 1; _ <= l; _++) {
|
|
@@ -57314,7 +57306,7 @@ class jx extends C3 {
|
|
|
57314
57306
|
bottom: j,
|
|
57315
57307
|
width: i,
|
|
57316
57308
|
height: j - v
|
|
57317
|
-
}, [C, x] = this.getCfgOfCurrentRow(
|
|
57309
|
+
}, [C, x] = this.getCfgOfCurrentRow(p, f, _);
|
|
57318
57310
|
x && C.backgroundColor && (e.save(), e.fillStyle = C.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();
|
|
57319
57311
|
const S = (() => {
|
|
57320
57312
|
switch (C.textAlign) {
|
|
@@ -57421,8 +57413,8 @@ class y8 extends I7 {
|
|
|
57421
57413
|
isSkipByDiffBounds(e, a, s, n) {
|
|
57422
57414
|
if (n == null)
|
|
57423
57415
|
return !1;
|
|
57424
|
-
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:
|
|
57425
|
-
return g <
|
|
57416
|
+
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;
|
|
57417
|
+
return g < p || h < f || s > m && i !== Number.POSITIVE_INFINITY || a > v && o !== Number.POSITIVE_INFINITY;
|
|
57426
57418
|
}
|
|
57427
57419
|
}
|
|
57428
57420
|
var se = /* @__PURE__ */ ((r) => (r[r.SPAN = 0] = "SPAN", r[r.LINE = 1] = "LINE", r))(se || {});
|
|
@@ -57443,8 +57435,8 @@ class xx extends R0 {
|
|
|
57443
57435
|
k(this, "_preBackgroundColor", "");
|
|
57444
57436
|
}
|
|
57445
57437
|
draw(e, a, s) {
|
|
57446
|
-
var
|
|
57447
|
-
const n = (
|
|
57438
|
+
var p;
|
|
57439
|
+
const n = (p = s.parent) == null ? void 0 : p.parent;
|
|
57448
57440
|
if (n == null)
|
|
57449
57441
|
return;
|
|
57450
57442
|
const { contentHeight: i = 0 } = n, { ts: o, width: l, content: u } = s;
|
|
@@ -57468,8 +57460,8 @@ class Fx extends R0 {
|
|
|
57468
57460
|
k(this, "_preBorderColor", "");
|
|
57469
57461
|
}
|
|
57470
57462
|
draw(e, a, s) {
|
|
57471
|
-
var
|
|
57472
|
-
const n = (
|
|
57463
|
+
var f;
|
|
57464
|
+
const n = (f = s.parent) == null ? void 0 : f.parent;
|
|
57473
57465
|
if (!n)
|
|
57474
57466
|
return;
|
|
57475
57467
|
const { asc: i = 0, lineHeight: o = 0 } = n, { ts: l, left: u, width: d } = s;
|
|
@@ -57480,17 +57472,17 @@ class Fx extends R0 {
|
|
|
57480
57472
|
return;
|
|
57481
57473
|
const g = this._getScale(e.getScale()), h = this._createBorderCache(c);
|
|
57482
57474
|
e.save(), e.translateWithPrecisionRatio(p2, p2);
|
|
57483
|
-
const { spanStartPoint:
|
|
57475
|
+
const { spanStartPoint: p = U.create(0, 0) } = this.extensionOffset;
|
|
57484
57476
|
for (const m of h.keys()) {
|
|
57485
57477
|
const v = h.get(m);
|
|
57486
57478
|
if (!v)
|
|
57487
57479
|
continue;
|
|
57488
57480
|
const { s: y, cl: z } = v, _ = y3(z) || z3, j = R7(y);
|
|
57489
57481
|
y !== this._preBorderStyle && (A7(e, y), e.setLineWidthByPrecision(j), this._preBorderStyle = y), _ !== this._preBorderColor && (e.strokeStyle = _, this._preBorderColor = _), X2(e, m, (j - 1) / 2 / g, {
|
|
57490
|
-
startX:
|
|
57491
|
-
startY:
|
|
57492
|
-
endX:
|
|
57493
|
-
endY:
|
|
57482
|
+
startX: p.x,
|
|
57483
|
+
startY: p.y,
|
|
57484
|
+
endX: p.x + d,
|
|
57485
|
+
endY: p.y + o
|
|
57494
57486
|
});
|
|
57495
57487
|
}
|
|
57496
57488
|
e.restore();
|
|
@@ -57640,13 +57632,13 @@ class _8 extends I1 {
|
|
|
57640
57632
|
t.closePath(), this._renderPaintInOrder(t, e);
|
|
57641
57633
|
}
|
|
57642
57634
|
_draw(t, e) {
|
|
57643
|
-
const { radius: a, paintFirst: s, stroke: n, strokeWidth: i, fill: o, strokeScaleEnabled: l, fillRule: u, strokeLineCap: d, strokeDashOffset: c, strokeLineJoin: g, strokeMiterLimit: h, strokeDashArray:
|
|
57635
|
+
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 };
|
|
57644
57636
|
let { left: j, top: w, right: C, bottom: x } = _, S = C - j, F = x - w;
|
|
57645
57637
|
if (e) {
|
|
57646
57638
|
const T = R3.getIntersectionBetweenTwoRect(_, e.cacheBound);
|
|
57647
57639
|
T && (j = T.left - m, w = T.top - v, C = T.right, x = T.bottom, S = T.width, F = T.height);
|
|
57648
57640
|
}
|
|
57649
|
-
_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:
|
|
57641
|
+
_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 });
|
|
57650
57642
|
}
|
|
57651
57643
|
}
|
|
57652
57644
|
class HB {
|
|
@@ -57769,7 +57761,7 @@ let GB = class extends x3 {
|
|
|
57769
57761
|
} = this;
|
|
57770
57762
|
let { left: l, top: u, width: d, height: c } = this.calculateTransformWithSrcRect();
|
|
57771
57763
|
if (this.angle !== 0) {
|
|
57772
|
-
const g = (i + this.strokeWidth) / 2, h = (o + this.strokeWidth) / 2,
|
|
57764
|
+
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));
|
|
57773
57765
|
l = m.x, u = m.y;
|
|
57774
57766
|
}
|
|
57775
57767
|
this.transformByState({
|
|
@@ -57806,14 +57798,14 @@ let GB = class extends x3 {
|
|
|
57806
57798
|
_updateSrcRectByTransform(e) {
|
|
57807
57799
|
if (this.srcRect == null || !this._transformCalculateSrcRect)
|
|
57808
57800
|
return;
|
|
57809
|
-
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:
|
|
57810
|
-
let v = h, y =
|
|
57801
|
+
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;
|
|
57802
|
+
let v = h, y = p, z = f, _ = m, j = !1;
|
|
57811
57803
|
if (l !== 0 && l !== a) {
|
|
57812
|
-
const w = h / l, C =
|
|
57804
|
+
const w = h / l, C = f / l;
|
|
57813
57805
|
v = a * w, z = a * C, j = !0;
|
|
57814
57806
|
}
|
|
57815
57807
|
if (u !== 0 && u !== s) {
|
|
57816
|
-
const w =
|
|
57808
|
+
const w = p / u, C = m / u;
|
|
57817
57809
|
y = s * w, _ = s * C, j = !0;
|
|
57818
57810
|
}
|
|
57819
57811
|
j && this.setSrcRect({
|
|
@@ -57845,10 +57837,10 @@ class X1 extends x3 {
|
|
|
57845
57837
|
if (n === x1.resize || n === x1.all) {
|
|
57846
57838
|
this._reCalculateCache = !0;
|
|
57847
57839
|
const { left: o, top: l, width: u, height: d } = this._getSelfRect(), { width: c, height: g } = i;
|
|
57848
|
-
let h,
|
|
57849
|
-
c ? h = this.width - c : h = 0, g ?
|
|
57850
|
-
const
|
|
57851
|
-
this.scaleX +=
|
|
57840
|
+
let h, p;
|
|
57841
|
+
c ? h = this.width - c : h = 0, g ? p = this.height - g : p = 0;
|
|
57842
|
+
const f = h / u, m = p / d;
|
|
57843
|
+
this.scaleX += f, this.scaleY += m, this.left = this.left - o * f, this.top = this.top - l * m, this._setTransForm();
|
|
57852
57844
|
}
|
|
57853
57845
|
});
|
|
57854
57846
|
}
|
|
@@ -57875,8 +57867,8 @@ class X1 extends x3 {
|
|
|
57875
57867
|
e.quadraticCurveTo(o[0], o[1], o[2], o[3]);
|
|
57876
57868
|
break;
|
|
57877
57869
|
case "A": {
|
|
57878
|
-
const l = o[0], u = o[1], d = o[2], c = o[3], g = o[4], h = o[5],
|
|
57879
|
-
e.translate(l, u), e.rotate(
|
|
57870
|
+
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;
|
|
57871
|
+
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);
|
|
57880
57872
|
break;
|
|
57881
57873
|
}
|
|
57882
57874
|
case "z":
|
|
@@ -57908,11 +57900,11 @@ class X1 extends x3 {
|
|
|
57908
57900
|
};
|
|
57909
57901
|
else {
|
|
57910
57902
|
const h = this.getLineLength(a, s, n, i);
|
|
57911
|
-
let
|
|
57912
|
-
|
|
57913
|
-
const
|
|
57903
|
+
let p = (o - a) * (n - a) + (l - s) * (i - s);
|
|
57904
|
+
p /= h * h;
|
|
57905
|
+
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);
|
|
57914
57906
|
d = Math.sqrt(y * y / (1 + u * u)), n < a && (d *= -1), c = u * d, g = {
|
|
57915
|
-
x:
|
|
57907
|
+
x: f + d,
|
|
57916
57908
|
y: m + c
|
|
57917
57909
|
};
|
|
57918
57910
|
}
|
|
@@ -57928,24 +57920,24 @@ class X1 extends x3 {
|
|
|
57928
57920
|
function h(v) {
|
|
57929
57921
|
return 3 * v * (1 - v) * (1 - v);
|
|
57930
57922
|
}
|
|
57931
|
-
function
|
|
57923
|
+
function p(v) {
|
|
57932
57924
|
return (1 - v) * (1 - v) * (1 - v);
|
|
57933
57925
|
}
|
|
57934
|
-
const
|
|
57926
|
+
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);
|
|
57935
57927
|
return {
|
|
57936
|
-
x:
|
|
57928
|
+
x: f,
|
|
57937
57929
|
y: m
|
|
57938
57930
|
};
|
|
57939
57931
|
}
|
|
57940
57932
|
static getPointOnQuadraticBezier(e, a, s, n, i, o, l) {
|
|
57941
|
-
function u(
|
|
57942
|
-
return
|
|
57933
|
+
function u(p) {
|
|
57934
|
+
return p * p;
|
|
57943
57935
|
}
|
|
57944
|
-
function d(
|
|
57945
|
-
return 2 *
|
|
57936
|
+
function d(p) {
|
|
57937
|
+
return 2 * p * (1 - p);
|
|
57946
57938
|
}
|
|
57947
|
-
function c(
|
|
57948
|
-
return (1 -
|
|
57939
|
+
function c(p) {
|
|
57940
|
+
return (1 - p) * (1 - p);
|
|
57949
57941
|
}
|
|
57950
57942
|
const g = o * u(e) + n * d(e) + a * c(e), h = l * u(e) + i * d(e) + s * c(e);
|
|
57951
57943
|
return {
|
|
@@ -57983,8 +57975,8 @@ class X1 extends x3 {
|
|
|
57983
57975
|
const d = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;
|
|
57984
57976
|
let c;
|
|
57985
57977
|
for (let g = 1, h = n.length; g < h; g++) {
|
|
57986
|
-
let
|
|
57987
|
-
for (
|
|
57978
|
+
let p = n[g], f = p.charAt(0);
|
|
57979
|
+
for (p = p.slice(1), o.length = 0; c = d.exec(p); )
|
|
57988
57980
|
o.push(c[0]);
|
|
57989
57981
|
const m = [];
|
|
57990
57982
|
for (let v = 0, y = o.length; v < y; v++) {
|
|
@@ -57999,7 +57991,7 @@ class X1 extends x3 {
|
|
|
57999
57991
|
let v, y = [];
|
|
58000
57992
|
const z = l, _ = u;
|
|
58001
57993
|
let j, w, C, x, S, F, T, M, B, A;
|
|
58002
|
-
switch (
|
|
57994
|
+
switch (f) {
|
|
58003
57995
|
// Note: Keep the lineTo's above the moveTo's in this switch
|
|
58004
57996
|
case "l":
|
|
58005
57997
|
l += m.shift() || 0, u += m.shift() || 0, v = "L", y.push(l, u);
|
|
@@ -58017,11 +58009,11 @@ class X1 extends x3 {
|
|
|
58017
58009
|
break;
|
|
58018
58010
|
}
|
|
58019
58011
|
}
|
|
58020
|
-
y.push(l, u),
|
|
58012
|
+
y.push(l, u), f = "l";
|
|
58021
58013
|
break;
|
|
58022
58014
|
}
|
|
58023
58015
|
case "M":
|
|
58024
|
-
l = m.shift() || 0, u = m.shift() || 0, v = "M", y.push(l, u),
|
|
58016
|
+
l = m.shift() || 0, u = m.shift() || 0, v = "M", y.push(l, u), f = "L";
|
|
58025
58017
|
break;
|
|
58026
58018
|
case "h":
|
|
58027
58019
|
l += m.shift() || 0, v = "L", y.push(l, u);
|
|
@@ -58072,16 +58064,16 @@ class X1 extends x3 {
|
|
|
58072
58064
|
break;
|
|
58073
58065
|
}
|
|
58074
58066
|
i.push({
|
|
58075
|
-
command: v ||
|
|
58067
|
+
command: v || f,
|
|
58076
58068
|
points: y,
|
|
58077
58069
|
start: {
|
|
58078
58070
|
x: z,
|
|
58079
58071
|
y: _
|
|
58080
58072
|
},
|
|
58081
|
-
pathLength: this.calcLength(z, _, v ||
|
|
58073
|
+
pathLength: this.calcLength(z, _, v || f, y)
|
|
58082
58074
|
});
|
|
58083
58075
|
}
|
|
58084
|
-
(
|
|
58076
|
+
(f === "z" || f === "Z") && i.push({
|
|
58085
58077
|
command: "z",
|
|
58086
58078
|
points: [],
|
|
58087
58079
|
start: {
|
|
@@ -58130,12 +58122,12 @@ class X1 extends x3 {
|
|
|
58130
58122
|
case "A": {
|
|
58131
58123
|
i = 0;
|
|
58132
58124
|
const c = n[4], g = n[5], h = n[4] + g;
|
|
58133
|
-
let
|
|
58134
|
-
if (Math.abs(c - h) <
|
|
58135
|
-
for (u = c -
|
|
58125
|
+
let p = Math.PI / 180;
|
|
58126
|
+
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)
|
|
58127
|
+
for (u = c - p; u > h; u -= p)
|
|
58136
58128
|
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;
|
|
58137
58129
|
else
|
|
58138
|
-
for (u = c +
|
|
58130
|
+
for (u = c + p; u < h; u += p)
|
|
58139
58131
|
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;
|
|
58140
58132
|
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;
|
|
58141
58133
|
}
|
|
@@ -58143,13 +58135,13 @@ class X1 extends x3 {
|
|
|
58143
58135
|
return 0;
|
|
58144
58136
|
}
|
|
58145
58137
|
static convertEndpointToCenterParameterization(e, a, s, n, i, o, l, u, d) {
|
|
58146
|
-
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,
|
|
58147
|
-
|
|
58148
|
-
let
|
|
58138
|
+
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);
|
|
58139
|
+
p > 1 && (l *= Math.sqrt(p), u *= Math.sqrt(p));
|
|
58140
|
+
let f = Math.sqrt(
|
|
58149
58141
|
(l * l * (u * u) - l * l * (h * h) - u * u * (g * g)) / (l * l * (h * h) + u * u * (g * g))
|
|
58150
58142
|
);
|
|
58151
|
-
i === o && (
|
|
58152
|
-
const m =
|
|
58143
|
+
i === o && (f *= -1), isNaN(f) && (f = 0);
|
|
58144
|
+
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, M) => (T[0] * M[0] + T[1] * M[1]) / (_(T) * _(M)), w = (T, M) => (T[0] * M[1] < T[1] * M[0] ? -1 : 1) * Math.acos(j(T, M)), C = w([1, 0], [(g - m) / l, (h - v) / u]), x = [(g - m) / l, (h - v) / u], S = [(-1 * g - m) / l, (-1 * h - v) / u];
|
|
58153
58145
|
let F = w(x, S);
|
|
58154
58146
|
return j(x, S) <= -1 && (F = Math.PI), j(x, S) >= 1 && (F = 0), o === 0 && F > 0 && (F -= 2 * Math.PI), o === 1 && F < 0 && (F += 2 * Math.PI), [y, z, l, u, C, F, c, o];
|
|
58155
58147
|
}
|
|
@@ -58251,8 +58243,8 @@ class X1 extends x3 {
|
|
|
58251
58243
|
case "A": {
|
|
58252
58244
|
const l = o[0], u = o[1], d = o[2], c = o[3];
|
|
58253
58245
|
let g = o[4];
|
|
58254
|
-
const h = o[5],
|
|
58255
|
-
return g += h * e / i.pathLength, X1.getPointOnEllipticalArc(l, u, d, c, g,
|
|
58246
|
+
const h = o[5], p = o[6];
|
|
58247
|
+
return g += h * e / i.pathLength, X1.getPointOnEllipticalArc(l, u, d, c, g, p);
|
|
58256
58248
|
}
|
|
58257
58249
|
}
|
|
58258
58250
|
return null;
|
|
@@ -58271,27 +58263,27 @@ class X1 extends x3 {
|
|
|
58271
58263
|
this.dataArray.forEach((d) => {
|
|
58272
58264
|
if (d.command === "A") {
|
|
58273
58265
|
const c = d.points[4], g = d.points[5], h = d.points[4] + g;
|
|
58274
|
-
let
|
|
58275
|
-
if (Math.abs(c - h) <
|
|
58276
|
-
for (let
|
|
58266
|
+
let p = Math.PI / 180;
|
|
58267
|
+
if (Math.abs(c - h) < p && (p = Math.abs(c - h)), g < 0)
|
|
58268
|
+
for (let f = c - p; f > h; f -= p) {
|
|
58277
58269
|
const m = X1.getPointOnEllipticalArc(
|
|
58278
58270
|
d.points[0],
|
|
58279
58271
|
d.points[1],
|
|
58280
58272
|
d.points[2],
|
|
58281
58273
|
d.points[3],
|
|
58282
|
-
|
|
58274
|
+
f,
|
|
58283
58275
|
0
|
|
58284
58276
|
);
|
|
58285
58277
|
e.push(m.x, m.y);
|
|
58286
58278
|
}
|
|
58287
58279
|
else
|
|
58288
|
-
for (let
|
|
58280
|
+
for (let f = c + p; f < h; f += p) {
|
|
58289
58281
|
const m = X1.getPointOnEllipticalArc(
|
|
58290
58282
|
d.points[0],
|
|
58291
58283
|
d.points[1],
|
|
58292
58284
|
d.points[2],
|
|
58293
58285
|
d.points[3],
|
|
58294
|
-
|
|
58286
|
+
f,
|
|
58295
58287
|
0
|
|
58296
58288
|
);
|
|
58297
58289
|
e.push(m.x, m.y);
|
|
@@ -59006,7 +58998,7 @@ class Lx extends R0 {
|
|
|
59006
58998
|
if (!((v = s.parent) == null ? void 0 : v.parent))
|
|
59007
58999
|
return;
|
|
59008
59000
|
const { ts: l, content: u, fontStyle: d, bBox: c } = s, { spanPointWithFont: g = U.create(0, 0) } = this.extensionOffset;
|
|
59009
|
-
if (
|
|
59001
|
+
if (u == null)
|
|
59010
59002
|
return;
|
|
59011
59003
|
if (!l) {
|
|
59012
59004
|
this._fillText(e, s, g);
|
|
@@ -59014,16 +59006,16 @@ class Lx extends R0 {
|
|
|
59014
59006
|
}
|
|
59015
59007
|
const h = (d == null ? void 0 : d.fontString) || "";
|
|
59016
59008
|
h && e.font !== this.actualFontMap[h] && (e.font = h, this.actualFontMap[h] = e.font);
|
|
59017
|
-
const { cl:
|
|
59018
|
-
this._preFontColor !== m && (e.fillStyle = m),
|
|
59009
|
+
const { cl: p, va: f } = l, m = y3(p) || z3;
|
|
59010
|
+
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);
|
|
59019
59011
|
}
|
|
59020
59012
|
_fillText(e, a, s) {
|
|
59021
59013
|
var v, y;
|
|
59022
59014
|
const { renderConfig: n, spanStartPoint: i, centerPoint: o } = this.extensionOffset, { content: l, width: u, bBox: d } = a, { aba: c, abd: g } = d;
|
|
59023
59015
|
if (l == null || i == null || o == null)
|
|
59024
59016
|
return;
|
|
59025
|
-
const { vertexAngle: h, centerAngle:
|
|
59026
|
-
if (h ===
|
|
59017
|
+
const { vertexAngle: h, centerAngle: p } = n != null ? n : {}, f = 90;
|
|
59018
|
+
if (h === f && p === f && !x0(l))
|
|
59027
59019
|
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();
|
|
59028
59020
|
else if ((l === "☐" || l === "☑") && a.glyphType === e2.LIST) {
|
|
59029
59021
|
const j = Math.ceil(((y = (v = a.ts) == null ? void 0 : v.fs) != null ? y : 12) * 1.2);
|
|
@@ -59055,22 +59047,22 @@ class $x extends R0 {
|
|
|
59055
59047
|
const n = (w = s.parent) == null ? void 0 : w.parent, { ts: i, bBox: o, content: l } = s;
|
|
59056
59048
|
if (n == null || i == null || l === "\r")
|
|
59057
59049
|
return;
|
|
59058
|
-
const { asc: u, dsc: d } = n, { sp: c, spo: g, sbo: h, bd:
|
|
59050
|
+
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;
|
|
59059
59051
|
if (v) {
|
|
59060
59052
|
const C = u + d;
|
|
59061
|
-
this._drawLine(e, s, v, C,
|
|
59053
|
+
this._drawLine(e, s, v, C, f);
|
|
59062
59054
|
}
|
|
59063
59055
|
if (j) {
|
|
59064
59056
|
const C = u + d + 3;
|
|
59065
|
-
this._drawLine(e, s, j, C,
|
|
59057
|
+
this._drawLine(e, s, j, C, f, 2);
|
|
59066
59058
|
}
|
|
59067
59059
|
if (y) {
|
|
59068
|
-
let C = u +
|
|
59069
|
-
_ === m3.SUPERSCRIPT ? C -= g : _ === m3.SUBSCRIPT && (C += h), this._drawLine(e, s, y, C,
|
|
59060
|
+
let C = u + p - c - m;
|
|
59061
|
+
_ === m3.SUPERSCRIPT ? C -= g : _ === m3.SUBSCRIPT && (C += h), this._drawLine(e, s, y, C, f);
|
|
59070
59062
|
}
|
|
59071
59063
|
if (z) {
|
|
59072
59064
|
const C = -ca - m;
|
|
59073
|
-
this._drawLine(e, s, z, C,
|
|
59065
|
+
this._drawLine(e, s, z, C, f);
|
|
59074
59066
|
}
|
|
59075
59067
|
}
|
|
59076
59068
|
clearCache() {
|
|
@@ -59085,19 +59077,19 @@ class $x extends R0 {
|
|
|
59085
59077
|
const {
|
|
59086
59078
|
originTranslate: g = U.create(0, 0),
|
|
59087
59079
|
alignOffset: h = U.create(0, 0),
|
|
59088
|
-
renderConfig:
|
|
59089
|
-
} = this.extensionOffset, { left:
|
|
59080
|
+
renderConfig: p = {}
|
|
59081
|
+
} = this.extensionOffset, { left: f, width: m } = a, { centerAngle: v = 0, vertexAngle: y = 0 } = p;
|
|
59090
59082
|
e.save();
|
|
59091
59083
|
const z = (c === t1.TRUE ? y3((x = a.ts) == null ? void 0 : x.cl) : y3(u)) || z3;
|
|
59092
59084
|
e.strokeStyle = z, this._setLineType(e, d != null ? d : i1.SINGLE, o), n += this._isDouble(d) ? -0.8 : 0;
|
|
59093
59085
|
const _ = Q1(v), j = Q1(y), w = v2(
|
|
59094
|
-
g.addByPoint(
|
|
59086
|
+
g.addByPoint(f, n),
|
|
59095
59087
|
U.create(0, 0),
|
|
59096
59088
|
_,
|
|
59097
59089
|
j,
|
|
59098
59090
|
h
|
|
59099
59091
|
), C = v2(
|
|
59100
|
-
g.addByPoint(
|
|
59092
|
+
g.addByPoint(f + m, n),
|
|
59101
59093
|
U.create(0, 0),
|
|
59102
59094
|
_,
|
|
59103
59095
|
j,
|
|
@@ -59217,8 +59209,8 @@ class ve extends y8 {
|
|
|
59217
59209
|
this.draw(e, a);
|
|
59218
59210
|
}
|
|
59219
59211
|
draw(e, a) {
|
|
59220
|
-
var
|
|
59221
|
-
const s = (
|
|
59212
|
+
var p, f, m, v;
|
|
59213
|
+
const s = (p = this.getSkeleton()) == null ? void 0 : p.getSkeletonData();
|
|
59222
59214
|
if (s == null || this._drawLiquid == null)
|
|
59223
59215
|
return;
|
|
59224
59216
|
this._drawLiquid.reset();
|
|
@@ -59288,7 +59280,7 @@ class ve extends y8 {
|
|
|
59288
59280
|
L,
|
|
59289
59281
|
l
|
|
59290
59282
|
);
|
|
59291
|
-
const f1 = (
|
|
59283
|
+
const f1 = (f = i.get(B)) == null ? void 0 : f.get(M), j1 = U.create(
|
|
59292
59284
|
Q,
|
|
59293
59285
|
(m = f1 == null ? void 0 : f1.marginTop) != null ? m : 0
|
|
59294
59286
|
);
|
|
@@ -59446,13 +59438,13 @@ class ve extends y8 {
|
|
|
59446
59438
|
}
|
|
59447
59439
|
}
|
|
59448
59440
|
_drawTable(e, a, s, n, i, o, l, u, d, c, g) {
|
|
59449
|
-
var h,
|
|
59441
|
+
var h, p, f, m, v, y, z, _, j;
|
|
59450
59442
|
for (const [w, C] of s) {
|
|
59451
59443
|
const { top: x, left: S, rows: F } = C;
|
|
59452
|
-
(h = this._drawLiquid) == null || h.translateSave(), (
|
|
59444
|
+
(h = this._drawLiquid) == null || h.translateSave(), (p = this._drawLiquid) == null || p.translate(S, x);
|
|
59453
59445
|
for (const T of F) {
|
|
59454
59446
|
const { top: M, cells: B } = T;
|
|
59455
|
-
(
|
|
59447
|
+
(f = this._drawLiquid) == null || f.translateSave(), (m = this._drawLiquid) == null || m.translate(0, M);
|
|
59456
59448
|
for (const A of B) {
|
|
59457
59449
|
const { left: L } = A;
|
|
59458
59450
|
(v = this._drawLiquid) == null || v.translateSave(), (y = this._drawLiquid) == null || y.translate(L, 0), this._drawTableCell(
|
|
@@ -59475,12 +59467,12 @@ class ve extends y8 {
|
|
|
59475
59467
|
}
|
|
59476
59468
|
}
|
|
59477
59469
|
_drawBorderBottom(e, a, s, n = 0, i = 0) {
|
|
59478
|
-
var h,
|
|
59470
|
+
var h, p, f, m;
|
|
59479
59471
|
if (this._drawLiquid == null)
|
|
59480
59472
|
return;
|
|
59481
59473
|
let { x: o, y: l } = this._drawLiquid;
|
|
59482
59474
|
const { pageWidth: u, marginLeft: d, marginRight: c, marginTop: g } = a;
|
|
59483
|
-
o += d + (n != null ? n : 0), l -= s.marginTop, l -= s.paddingTop, l += g + i + s.lineHeight + ((
|
|
59475
|
+
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", X2(e, X.BOTTOM, 0, {
|
|
59484
59476
|
startX: o,
|
|
59485
59477
|
startY: l,
|
|
59486
59478
|
endX: o + u - d - c,
|
|
@@ -59492,8 +59484,8 @@ class ve extends y8 {
|
|
|
59492
59484
|
if (this._drawLiquid == null)
|
|
59493
59485
|
return;
|
|
59494
59486
|
this._drawTableCellBordersAndBg(e, a, s);
|
|
59495
|
-
const { sections: h, marginLeft:
|
|
59496
|
-
l = U.create(l.x +
|
|
59487
|
+
const { sections: h, marginLeft: p, marginTop: f } = s;
|
|
59488
|
+
l = U.create(l.x + p, l.y + f), e.save();
|
|
59497
59489
|
const { x: m, y: v } = this._drawLiquid, { pageWidth: y, pageHeight: z } = s;
|
|
59498
59490
|
e.beginPath(), e.rectByPrecision(m + a.marginLeft, v + a.marginTop, y, z), e.closePath(), e.clip();
|
|
59499
59491
|
for (const _ of h) {
|
|
@@ -59576,14 +59568,14 @@ class ve extends y8 {
|
|
|
59576
59568
|
const { marginLeft: n, marginTop: i } = a, { pageWidth: o, pageHeight: l } = s, u = s.parent, d = u.cells.indexOf(s), c = u.rowSource.tableCells[d], {
|
|
59577
59569
|
borderTop: g = W2,
|
|
59578
59570
|
borderBottom: h = W2,
|
|
59579
|
-
borderLeft:
|
|
59580
|
-
borderRight:
|
|
59571
|
+
borderLeft: p = W2,
|
|
59572
|
+
borderRight: f = W2,
|
|
59581
59573
|
backgroundColor: m
|
|
59582
59574
|
} = c;
|
|
59583
59575
|
if (this._drawLiquid == null)
|
|
59584
59576
|
return;
|
|
59585
59577
|
let { x: v, y } = this._drawLiquid;
|
|
59586
|
-
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 =
|
|
59578
|
+
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, X2(e, X.LEFT, 0, {
|
|
59587
59579
|
startX: v,
|
|
59588
59580
|
startY: y,
|
|
59589
59581
|
endX: v + o,
|
|
@@ -59593,7 +59585,7 @@ class ve extends y8 {
|
|
|
59593
59585
|
startY: y,
|
|
59594
59586
|
endX: v + o,
|
|
59595
59587
|
endY: y + l
|
|
59596
|
-
}), e.restore(), e.save(), e.strokeStyle = (j =
|
|
59588
|
+
}), e.restore(), e.save(), e.strokeStyle = (j = f.color.rgb) != null ? j : W2.color.rgb, X2(e, X.RIGHT, 0, {
|
|
59597
59589
|
startX: v,
|
|
59598
59590
|
startY: y,
|
|
59599
59591
|
endX: v + o,
|
|
@@ -59608,8 +59600,8 @@ class ve extends y8 {
|
|
|
59608
59600
|
_drawHeaderFooter(e, a, s, n, i, o, l, u, d, c, g, h = !0) {
|
|
59609
59601
|
if (this._drawLiquid == null)
|
|
59610
59602
|
return;
|
|
59611
|
-
const { sections:
|
|
59612
|
-
for (const m of
|
|
59603
|
+
const { sections: p } = e, { y: f } = this._drawLiquid;
|
|
59604
|
+
for (const m of p) {
|
|
59613
59605
|
const { columns: v } = m;
|
|
59614
59606
|
this._drawLiquid.translateSave(), this._drawLiquid.translateSection(m);
|
|
59615
59607
|
for (const y of v) {
|
|
@@ -59628,11 +59620,11 @@ class ve extends y8 {
|
|
|
59628
59620
|
this._drawLiquid.translateSave(), this._drawLiquid.translateLine(C, !0, !0);
|
|
59629
59621
|
const { y: L } = this._drawLiquid;
|
|
59630
59622
|
if (h) {
|
|
59631
|
-
if (L -
|
|
59623
|
+
if (L - f + j.y > (g.pageHeight - 100) / 2) {
|
|
59632
59624
|
this._drawLiquid.translateRestore();
|
|
59633
59625
|
continue;
|
|
59634
59626
|
}
|
|
59635
|
-
} else if (L -
|
|
59627
|
+
} else if (L - f + j.y + T < (g.pageHeight - 100) / 2 + 100) {
|
|
59636
59628
|
this._drawLiquid.translateRestore();
|
|
59637
59629
|
continue;
|
|
59638
59630
|
}
|
|
@@ -59842,9 +59834,9 @@ class YB extends $7 {
|
|
|
59842
59834
|
this._dirtyBounds = e;
|
|
59843
59835
|
}
|
|
59844
59836
|
renderByViewports(e, a, s) {
|
|
59845
|
-
const { diffBounds: n, diffX: i, diffY: o, viewPortPosition: l, cacheCanvas: u, leftOrigin: d, topOrigin: c, bufferEdgeX: g, bufferEdgeY: h, isDirty:
|
|
59837
|
+
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();
|
|
59846
59838
|
w.save();
|
|
59847
|
-
const C =
|
|
59839
|
+
const C = f || this.isForceDirty(), x = p || this.isDirty();
|
|
59848
59840
|
n.length === 0 || i === 0 && o === 0 || C || x ? (x || C) && (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, {
|
|
59849
59841
|
cacheCanvas: u,
|
|
59850
59842
|
cacheCtx: w,
|
|
@@ -59862,12 +59854,12 @@ class YB extends $7 {
|
|
|
59862
59854
|
this._applyCache(u, e, S, F, L, I, T, M, L, I), w.restore();
|
|
59863
59855
|
}
|
|
59864
59856
|
paintNewAreaForScrolling(e, a) {
|
|
59865
|
-
const { cacheCanvas: s, cacheCtx: n, mainCtx: i, topOrigin: o, leftOrigin: l, bufferEdgeX: u, bufferEdgeY: d, scaleX: c, scaleY: g, columnHeaderHeight: h, rowHeaderWidth:
|
|
59857
|
+
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;
|
|
59866
59858
|
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;
|
|
59867
59859
|
const z = i.getTransform();
|
|
59868
|
-
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),
|
|
59860
|
+
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)
|
|
59869
59861
|
for (const _ of m) {
|
|
59870
|
-
const { left: j, right: w, bottom: C, top: x } = _, S = j -
|
|
59862
|
+
const { left: j, right: w, bottom: C, top: x } = _, S = j - p, F = x - h, T = w - j, M = C - x;
|
|
59871
59863
|
n.clearRectByPrecision(S, F, T, M), n.save(), n.beginPath(), n.rectByPrecision(S, F, T, M), n.closePath(), n.clip(), this.draw(n, {
|
|
59872
59864
|
...e,
|
|
59873
59865
|
diffBounds: [_]
|
|
@@ -59976,11 +59968,11 @@ class YB extends $7 {
|
|
|
59976
59968
|
const { rowColumnSegment: s, overflowCache: n, showGridlines: i, gridlinesColor: o } = a, l = a.getCurrentRowColumnSegmentMergeData(s), { startRow: u, endRow: d, startColumn: c, endColumn: g } = s;
|
|
59977
59969
|
if (!a || i === t1.FALSE || this._forceDisableGridlines)
|
|
59978
59970
|
return;
|
|
59979
|
-
const { rowHeightAccumulation: h, columnTotalWidth:
|
|
59980
|
-
if (!h || !
|
|
59971
|
+
const { rowHeightAccumulation: h, columnTotalWidth: p, columnWidthAccumulation: f, rowTotalHeight: m } = a;
|
|
59972
|
+
if (!h || !f || p === void 0 || m === void 0)
|
|
59981
59973
|
return;
|
|
59982
59974
|
e.save(), e.setLineWidthByPrecision(1), e.strokeStyle = (I = o != null ? o : e.renderConfig.gridlinesColor) != null ? I : M2([214, 216, 219]);
|
|
59983
|
-
const v =
|
|
59975
|
+
const v = f.length, y = h.length, z = 0.4, _ = d - u + 1, j = g - c + 1, w = Math.ceil(_ * z), C = Math.ceil(j * z), x = Math.max(Math.floor(u - w), 0), S = Math.min(Math.ceil(d + w), y - 1), F = Math.min(Math.ceil(g + C), v - 1), T = Math.max(Math.floor(c - C), 0), M = f[T - 1] || 0, B = h[x - 1] || 0, A = f[F], L = h[S];
|
|
59984
59976
|
e.translateWithPrecisionRatio(p2, p2), e.beginPath(), e.moveToByPrecision(M, B), e.lineToByPrecision(A, B), e.moveToByPrecision(M, B), e.lineToByPrecision(M, L), e.closePathByEnv(), e.stroke();
|
|
59985
59977
|
for (let O = x; O <= S; O++) {
|
|
59986
59978
|
if (O < 0 || O > y - 1)
|
|
@@ -59991,10 +59983,10 @@ class YB extends $7 {
|
|
|
59991
59983
|
for (let O = T; O <= F; O++) {
|
|
59992
59984
|
if (O < 0 || O > v - 1)
|
|
59993
59985
|
continue;
|
|
59994
|
-
const P =
|
|
59986
|
+
const P = f[O];
|
|
59995
59987
|
e.beginPath(), e.moveToByPrecision(P, B), e.lineToByPrecision(P, L), e.closePathByEnv(), e.stroke();
|
|
59996
59988
|
}
|
|
59997
|
-
this._clearRectangle(e, h,
|
|
59989
|
+
this._clearRectangle(e, h, f, l), this._clearRectangle(e, h, f, n.toNativeArray()), e.restore();
|
|
59998
59990
|
}
|
|
59999
59991
|
/**
|
|
60000
59992
|
* Clear the guide lines within a range in the table, to make room for merged cells and overflow.
|
|
@@ -60003,23 +59995,23 @@ class YB extends $7 {
|
|
|
60003
59995
|
var i, o, l, u;
|
|
60004
59996
|
if (n != null)
|
|
60005
59997
|
for (const d of n) {
|
|
60006
|
-
const { startRow: c, endRow: g, startColumn: h, endColumn:
|
|
60007
|
-
e.clearRectByPrecision(v,
|
|
59998
|
+
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];
|
|
59999
|
+
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();
|
|
60008
60000
|
}
|
|
60009
60001
|
}
|
|
60010
60002
|
testShowRuler(e, a) {
|
|
60011
60003
|
const { cacheBound: s } = a, n = this.getSkeleton(), { rowHeaderWidth: i, columnHeaderHeight: o } = n, { left: l, top: u, right: d, bottom: c } = s, g = (v) => {
|
|
60012
60004
|
const y = v % 100;
|
|
60013
60005
|
return v + (100 - y);
|
|
60014
|
-
}, h = g(l),
|
|
60006
|
+
}, h = g(l), p = g(d), f = g(u), m = g(c);
|
|
60015
60007
|
e.save(), e.beginPath(), e.strokeStyle = "#000000", e.fillStyle = "#000000", e.font = "16px Arial", e.lineWidth = 1, e.textAlign = "center", e.textBaseline = "middle";
|
|
60016
|
-
for (let v = h; v <=
|
|
60008
|
+
for (let v = h; v <= p; v += 50)
|
|
60017
60009
|
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();
|
|
60018
|
-
for (let v =
|
|
60010
|
+
for (let v = f; v <= m; v += 50)
|
|
60019
60011
|
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();
|
|
60020
60012
|
e.fillStyle = "#666";
|
|
60021
|
-
for (let v = h; v <=
|
|
60022
|
-
for (let y =
|
|
60013
|
+
for (let v = h; v <= p; v += 100)
|
|
60014
|
+
for (let y = f; y <= m; y += 100)
|
|
60023
60015
|
e.fillText(`${v},${y}`, v - i, y - o);
|
|
60024
60016
|
e.closePath(), e.restore();
|
|
60025
60017
|
}
|
|
@@ -60038,15 +60030,15 @@ function Hx(r, t, e, a) {
|
|
|
60038
60030
|
s === le.UserInfo && n.userInfo ? Gx(r, n.userInfo, a) : s === le.Image && n.image ? Wx(r, n.image, e) : s === le.Text && n.text && qx(r, n.text);
|
|
60039
60031
|
}
|
|
60040
60032
|
function Gx(r, t, e) {
|
|
60041
|
-
const { x: a, y: s, repeat: n, spacingX: i, spacingY: o, rotate: l, opacity: u, name: d, fontSize: c, color: g, bold: h, italic:
|
|
60033
|
+
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;
|
|
60042
60034
|
if (!e)
|
|
60043
60035
|
return;
|
|
60044
60036
|
let m = "";
|
|
60045
60037
|
if (d && (m += `${e.name} `), !m)
|
|
60046
60038
|
return;
|
|
60047
|
-
r.save(), r.globalAlpha = u, r.direction =
|
|
60039
|
+
r.save(), r.globalAlpha = u, r.direction = f;
|
|
60048
60040
|
let v = "";
|
|
60049
|
-
if (
|
|
60041
|
+
if (p && (v += "italic "), h && (v += "bold "), v += `${c}px Arial`, r.font = v, r.fillStyle = g, n) {
|
|
60050
60042
|
const y = r.canvas.width, z = r.canvas.height;
|
|
60051
60043
|
for (let _ = s; _ < z; _ += c + o)
|
|
60052
60044
|
for (let j = a; j < y; j += r.measureText(m).width + i)
|
|
@@ -60056,10 +60048,10 @@ function Gx(r, t, e) {
|
|
|
60056
60048
|
r.restore();
|
|
60057
60049
|
}
|
|
60058
60050
|
function qx(r, t) {
|
|
60059
|
-
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:
|
|
60060
|
-
r.save(), r.globalAlpha = l, r.direction =
|
|
60061
|
-
let
|
|
60062
|
-
if (h && (
|
|
60051
|
+
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;
|
|
60052
|
+
r.save(), r.globalAlpha = l, r.direction = p;
|
|
60053
|
+
let f = "";
|
|
60054
|
+
if (h && (f += "italic "), g && (f += "bold "), f += `${d}px Arial`, r.font = f, r.fillStyle = c, u)
|
|
60063
60055
|
if (s) {
|
|
60064
60056
|
const m = r.canvas.width, v = r.canvas.height;
|
|
60065
60057
|
for (let y = a; y < v; y += d + i)
|
|
@@ -60074,14 +60066,14 @@ function Wx(r, t, e) {
|
|
|
60074
60066
|
if (!(e != null && e.complete))
|
|
60075
60067
|
return;
|
|
60076
60068
|
r.save(), r.globalAlpha = u;
|
|
60077
|
-
const
|
|
60069
|
+
const p = d, f = g ? d / h : c;
|
|
60078
60070
|
if (n) {
|
|
60079
60071
|
const m = r.canvas.width, v = r.canvas.height;
|
|
60080
|
-
for (let y = s; y < v; y +=
|
|
60081
|
-
for (let z = a; z < m; z +=
|
|
60082
|
-
r.save(), r.translate(z, y), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0,
|
|
60072
|
+
for (let y = s; y < v; y += f + o)
|
|
60073
|
+
for (let z = a; z < m; z += p + i)
|
|
60074
|
+
r.save(), r.translate(z, y), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, p, f), r.restore();
|
|
60083
60075
|
} else
|
|
60084
|
-
r.save(), r.translate(a, s), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0,
|
|
60076
|
+
r.save(), r.translate(a, s), r.rotate(Math.PI / 180 * l), r.drawImage(e, 0, 0, p, f), r.restore();
|
|
60085
60077
|
r.restore();
|
|
60086
60078
|
}
|
|
60087
60079
|
class j8 extends D2 {
|
|
@@ -60527,10 +60519,10 @@ class w8 extends y8 {
|
|
|
60527
60519
|
const { pages: o } = s;
|
|
60528
60520
|
let l = 0, u = 0;
|
|
60529
60521
|
for (let g = 0, h = o.length; g < h; g++) {
|
|
60530
|
-
const
|
|
60531
|
-
if (this.isSkipByDiffBounds(
|
|
60522
|
+
const p = o[g];
|
|
60523
|
+
if (this.isSkipByDiffBounds(p, l, u, a)) {
|
|
60532
60524
|
const { x: M, y: B } = this._drawLiquid.translatePage(
|
|
60533
|
-
|
|
60525
|
+
p,
|
|
60534
60526
|
this.pageLayoutType,
|
|
60535
60527
|
this.pageMarginLeft,
|
|
60536
60528
|
this.pageMarginTop
|
|
@@ -60538,10 +60530,10 @@ class w8 extends y8 {
|
|
|
60538
60530
|
u += M, l += B;
|
|
60539
60531
|
continue;
|
|
60540
60532
|
}
|
|
60541
|
-
const { width:
|
|
60533
|
+
const { width: f, pageWidth: m, height: v, pageHeight: y, originMarginTop: z, originMarginBottom: _, marginLeft: j, marginRight: w } = p;
|
|
60542
60534
|
e.save(), e.translate(u - 0.5, l - 0.5);
|
|
60543
60535
|
const C = {
|
|
60544
|
-
width: m != null ? m :
|
|
60536
|
+
width: m != null ? m : f,
|
|
60545
60537
|
height: y != null ? y : v,
|
|
60546
60538
|
strokeWidth: 1,
|
|
60547
60539
|
stroke: Vx,
|
|
@@ -60592,7 +60584,7 @@ class w8 extends y8 {
|
|
|
60592
60584
|
};
|
|
60593
60585
|
X1.drawWith(e, S), e.restore();
|
|
60594
60586
|
const { x: F, y: T } = this._drawLiquid.translatePage(
|
|
60595
|
-
|
|
60587
|
+
p,
|
|
60596
60588
|
this.pageLayoutType,
|
|
60597
60589
|
this.pageMarginLeft,
|
|
60598
60590
|
this.pageMarginTop
|
|
@@ -60719,8 +60711,8 @@ function lE(r, t) {
|
|
|
60719
60711
|
const { left: u, top: d, width: c, height: g } = r.getBoundingClientRect();
|
|
60720
60712
|
if (o || t(), !c || !g)
|
|
60721
60713
|
return;
|
|
60722
|
-
const h = qe(d),
|
|
60723
|
-
rootMargin: `${-h}px ${-
|
|
60714
|
+
const h = qe(d), p = qe(s.clientWidth - (u + c)), f = qe(s.clientHeight - (d + g)), m = qe(u), y = {
|
|
60715
|
+
rootMargin: `${-h}px ${-p}px ${-f}px ${-m}px`,
|
|
60724
60716
|
threshold: Qx(0, Jx(1, l)) || 1
|
|
60725
60717
|
};
|
|
60726
60718
|
let z = !0;
|
|
@@ -61566,8 +61558,8 @@ const vE = "engine-render.config", n7 = {}, b2 = class b2 extends D2 {
|
|
|
61566
61558
|
}
|
|
61567
61559
|
// eslint-disable-next-line max-lines-per-function
|
|
61568
61560
|
attachControl(e) {
|
|
61569
|
-
var d, c, g, h,
|
|
61570
|
-
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 = (
|
|
61561
|
+
var d, c, g, h, p, f;
|
|
61562
|
+
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();
|
|
61571
61563
|
u && (this._onInput$ = u.onInputChanged$.subscribeEvent((m) => {
|
|
61572
61564
|
const v = m;
|
|
61573
61565
|
if (m.deviceType === g2.Keyboard)
|
|
@@ -61929,8 +61921,8 @@ class wE extends D2 {
|
|
|
61929
61921
|
rotationSnapTolerance: c,
|
|
61930
61922
|
rotateAnchorOffset: g,
|
|
61931
61923
|
rotateSize: h,
|
|
61932
|
-
rotateCornerRadius:
|
|
61933
|
-
borderEnabled:
|
|
61924
|
+
rotateCornerRadius: p,
|
|
61925
|
+
borderEnabled: f,
|
|
61934
61926
|
borderStroke: m,
|
|
61935
61927
|
borderStrokeWidth: v,
|
|
61936
61928
|
borderDash: y,
|
|
@@ -61949,7 +61941,7 @@ class wE extends D2 {
|
|
|
61949
61941
|
useSingleNodeRotation: L,
|
|
61950
61942
|
shouldOverdrawWholeArea: I
|
|
61951
61943
|
} = this;
|
|
61952
|
-
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 = (K = a.rotateEnabled) != null ? K : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (h1 = a.rotationSnapTolerance) != null ? h1 : c, g = (g1 = a.rotateAnchorOffset) != null ? g1 : g, h = (n1 = a.rotateSize) != null ? n1 : h,
|
|
61944
|
+
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 = (K = a.rotateEnabled) != null ? K : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (h1 = a.rotationSnapTolerance) != null ? h1 : c, g = (g1 = a.rotateAnchorOffset) != null ? g1 : g, h = (n1 = a.rotateSize) != null ? n1 : h, p = (l1 = a.rotateCornerRadius) != null ? l1 : p, f = (k1 = a.borderEnabled) != null ? k1 : f, m = (f1 = a.borderStroke) != null ? f1 : m, v = (j1 = a.borderStrokeWidth) != null ? j1 : v, y = (p1 = a.borderDash) != null ? p1 : y, z = (w1 = a.borderSpacing) != null ? w1 : z, _ = (H1 = a.anchorFill) != null ? H1 : _, j = (z1 = a.anchorStroke) != null ? z1 : j, w = (E1 = a.anchorStrokeWidth) != null ? E1 : w, C = (P1 = a.anchorSize) != null ? P1 : C, x = (G1 = a.anchorCornerRadius) != null ? G1 : x, S = (O2 = a.keepRatio) != null ? O2 : S, F = (I2 = a.centeredScaling) != null ? I2 : F, T = (q1 = a.enabledAnchors) != null ? q1 : T, M = (n2 = a.flipEnabled) != null ? n2 : M, B = (t2 = a.ignoreStroke) != null ? t2 : B, A = (R1 = a.boundBoxFunc) != null ? R1 : A, L = (N1 = a.useSingleNodeRotation) != null ? N1 : L, I = (i2 = a.shouldOverdrawWholeArea) != null ? i2 : I), {
|
|
61953
61945
|
isCropper: s,
|
|
61954
61946
|
hoverEnabled: n,
|
|
61955
61947
|
hoverEnterFunc: i,
|
|
@@ -61960,8 +61952,8 @@ class wE extends D2 {
|
|
|
61960
61952
|
rotationSnapTolerance: c,
|
|
61961
61953
|
rotateAnchorOffset: g,
|
|
61962
61954
|
rotateSize: h,
|
|
61963
|
-
rotateCornerRadius:
|
|
61964
|
-
borderEnabled:
|
|
61955
|
+
rotateCornerRadius: p,
|
|
61956
|
+
borderEnabled: f,
|
|
61965
61957
|
borderStroke: m,
|
|
61966
61958
|
borderStrokeWidth: v,
|
|
61967
61959
|
borderDash: y,
|
|
@@ -62005,14 +61997,14 @@ class wE extends D2 {
|
|
|
62005
61997
|
type: 0
|
|
62006
61998
|
/* MOVE_START */
|
|
62007
61999
|
})), this._moveBufferSkip = !1;
|
|
62008
|
-
const h = u.onPointerMove$.subscribeEvent((
|
|
62009
|
-
const { offsetX: m, offsetY: v } =
|
|
62000
|
+
const h = u.onPointerMove$.subscribeEvent((f) => {
|
|
62001
|
+
const { offsetX: m, offsetY: v } = f;
|
|
62010
62002
|
this._moving(m, v, d, l), !l && this._clearControlMap(), d.scrolling(m, v, () => {
|
|
62011
62003
|
this._moving(m, v, d, l);
|
|
62012
62004
|
});
|
|
62013
|
-
}),
|
|
62014
|
-
h == null || h.unsubscribe(),
|
|
62015
|
-
const { offsetX: m, offsetY: v } =
|
|
62005
|
+
}), p = u.onPointerUp$.subscribeEvent((f) => {
|
|
62006
|
+
h == null || h.unsubscribe(), p == null || p.unsubscribe(), u.enableObjectsEvent(), !l && this.refreshControls(), d.dispose();
|
|
62007
|
+
const { offsetX: m, offsetY: v } = f;
|
|
62016
62008
|
l ? this._changeEnd$.next({
|
|
62017
62009
|
objects: /* @__PURE__ */ new Map([[e.oKey, e]]),
|
|
62018
62010
|
type: 2,
|
|
@@ -62056,7 +62048,7 @@ class wE extends D2 {
|
|
|
62056
62048
|
}
|
|
62057
62049
|
_moving(e, a, s, n = !1) {
|
|
62058
62050
|
const { scrollX: i, scrollY: o } = Be(s), l = e - this._viewportScrollX + i, u = a - this._viewportScrollY + o, { ancestorScaleX: d, ancestorScaleY: c, ancestorLeft: g, ancestorTop: h } = this._scene;
|
|
62059
|
-
let
|
|
62051
|
+
let p = this._smoothAccuracy((l - this._startOffsetX) / d, n), f = this._smoothAccuracy((u - this._startOffsetY) / c, n);
|
|
62060
62052
|
if (this._moveBufferBlocker(e, a))
|
|
62061
62053
|
return;
|
|
62062
62054
|
const m = this._getTopScene();
|
|
@@ -62065,11 +62057,11 @@ class wE extends D2 {
|
|
|
62065
62057
|
const { width: v, height: y } = m;
|
|
62066
62058
|
if (n) {
|
|
62067
62059
|
if (this._copperSelectedObject) {
|
|
62068
|
-
const z = this._copperSelectedObject, _ = this._checkMoveBoundary(z,
|
|
62069
|
-
|
|
62060
|
+
const z = this._copperSelectedObject, _ = this._checkMoveBoundary(z, p, f, g, h, v, y);
|
|
62061
|
+
p = _.moveLeft, f = _.moveTop, z.translate(p + z.left, f + z.top), this._changing$.next({
|
|
62070
62062
|
objects: /* @__PURE__ */ new Map([[z.oKey, z]]),
|
|
62071
|
-
moveX:
|
|
62072
|
-
moveY:
|
|
62063
|
+
moveX: p,
|
|
62064
|
+
moveY: f,
|
|
62073
62065
|
type: 1,
|
|
62074
62066
|
offsetX: e,
|
|
62075
62067
|
offsetY: a
|
|
@@ -62080,21 +62072,21 @@ class wE extends D2 {
|
|
|
62080
62072
|
for (let _ = 0; _ < z.length; _++) {
|
|
62081
62073
|
const j = z[_], w = this._checkMoveBoundary(
|
|
62082
62074
|
j,
|
|
62083
|
-
f,
|
|
62084
62075
|
p,
|
|
62076
|
+
f,
|
|
62085
62077
|
g,
|
|
62086
62078
|
h,
|
|
62087
62079
|
v,
|
|
62088
62080
|
y
|
|
62089
62081
|
);
|
|
62090
|
-
|
|
62082
|
+
p = w.moveLeft, f = w.moveTop;
|
|
62091
62083
|
}
|
|
62092
62084
|
this._selectedObjectMap.forEach((_) => {
|
|
62093
|
-
_.translate(
|
|
62085
|
+
_.translate(p + _.left, f + _.top);
|
|
62094
62086
|
}), this._changing$.next({
|
|
62095
62087
|
objects: this._selectedObjectMap,
|
|
62096
|
-
moveX:
|
|
62097
|
-
moveY:
|
|
62088
|
+
moveX: p,
|
|
62089
|
+
moveY: f,
|
|
62098
62090
|
type: 1,
|
|
62099
62091
|
offsetX: e,
|
|
62100
62092
|
offsetY: a
|
|
@@ -62115,8 +62107,8 @@ class wE extends D2 {
|
|
|
62115
62107
|
type: 1,
|
|
62116
62108
|
offsetX: a,
|
|
62117
62109
|
offsetY: s
|
|
62118
|
-
})) : (this._selectedObjectMap.forEach((
|
|
62119
|
-
this._moveFunc(
|
|
62110
|
+
})) : (this._selectedObjectMap.forEach((p) => {
|
|
62111
|
+
this._moveFunc(p, e, c, g, i, o, h);
|
|
62120
62112
|
}), this._changing$.next({
|
|
62121
62113
|
objects: this._selectedObjectMap,
|
|
62122
62114
|
type: 1,
|
|
@@ -62125,34 +62117,34 @@ class wE extends D2 {
|
|
|
62125
62117
|
})), i && e !== "__SpreadsheetTransformerResizeCT__" && e !== "__SpreadsheetTransformerResizeCB__" && e !== "__SpreadsheetTransformerResizeLM__" && e !== "__SpreadsheetTransformerResizeRM__" && !h || (this._startOffsetX = c, this._startOffsetY = g);
|
|
62126
62118
|
}
|
|
62127
62119
|
_moveFunc(e, a, s, n, i, o = !1, l = !1) {
|
|
62128
|
-
const { left: u, top: d, width: c, height: g, angle: h } = e,
|
|
62129
|
-
let
|
|
62120
|
+
const { left: u, top: d, width: c, height: g, angle: h } = e, p = this._startStateMap.get(e.oKey) || {};
|
|
62121
|
+
let f = {};
|
|
62130
62122
|
const { moveLeft: m, moveTop: v } = this._getMovePoint(s, n, e);
|
|
62131
62123
|
if (i && a !== "__SpreadsheetTransformerResizeCT__" && a !== "__SpreadsheetTransformerResizeCB__" && a !== "__SpreadsheetTransformerResizeLM__" && a !== "__SpreadsheetTransformerResizeRM__" && !l)
|
|
62132
62124
|
switch (a) {
|
|
62133
62125
|
case "__SpreadsheetTransformerResizeLT__":
|
|
62134
|
-
|
|
62126
|
+
f = this._resizeLeftTop(e, m, v, p);
|
|
62135
62127
|
break;
|
|
62136
62128
|
case "__SpreadsheetTransformerResizeRT__":
|
|
62137
|
-
|
|
62129
|
+
f = this._resizeRightTop(e, m, v, p);
|
|
62138
62130
|
break;
|
|
62139
62131
|
case "__SpreadsheetTransformerResizeLB__":
|
|
62140
|
-
|
|
62132
|
+
f = this._resizeLeftBottom(e, m, v, p);
|
|
62141
62133
|
break;
|
|
62142
62134
|
case "__SpreadsheetTransformerResizeRB__":
|
|
62143
|
-
|
|
62135
|
+
f = this._resizeRightBottom(e, m, v, p);
|
|
62144
62136
|
break;
|
|
62145
62137
|
}
|
|
62146
62138
|
else
|
|
62147
|
-
|
|
62148
|
-
e.transformByState(this._applyRotationForResult(
|
|
62139
|
+
f = this._updateCloseKeepRatioState(a, u, d, c, g, m, v);
|
|
62140
|
+
e.transformByState(this._applyRotationForResult(f, { left: u, top: d, width: c, height: g }, h, o));
|
|
62149
62141
|
}
|
|
62150
62142
|
_getMovePoint(e, a, s) {
|
|
62151
|
-
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,
|
|
62152
|
-
|
|
62143
|
+
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);
|
|
62144
|
+
f.rotateByPoint(Q1(-c), p);
|
|
62153
62145
|
const m = new U(this._startOffsetX, this._startOffsetY);
|
|
62154
|
-
m.rotateByPoint(Q1(-c),
|
|
62155
|
-
const v = (
|
|
62146
|
+
m.rotateByPoint(Q1(-c), p);
|
|
62147
|
+
const v = (f.x - m.x) / n, y = (f.y - m.y) / i;
|
|
62156
62148
|
return {
|
|
62157
62149
|
moveLeft: v,
|
|
62158
62150
|
moveTop: y
|
|
@@ -62164,7 +62156,7 @@ class wE extends D2 {
|
|
|
62164
62156
|
_applyRotationForResult(e, a, s, n = !1) {
|
|
62165
62157
|
if (s === 0)
|
|
62166
62158
|
return e;
|
|
62167
|
-
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,
|
|
62159
|
+
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));
|
|
62168
62160
|
return {
|
|
62169
62161
|
width: this._smoothAccuracy(l, n),
|
|
62170
62162
|
height: this._smoothAccuracy(u, n),
|
|
@@ -62211,8 +62203,8 @@ class wE extends D2 {
|
|
|
62211
62203
|
};
|
|
62212
62204
|
}
|
|
62213
62205
|
_resizeLeftTop(e, a, s, n) {
|
|
62214
|
-
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,
|
|
62215
|
-
let v = d -
|
|
62206
|
+
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);
|
|
62207
|
+
let v = d - f, y = c - m;
|
|
62216
62208
|
const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
|
|
62217
62209
|
return v < z && (v = z), y < _ && (y = _), {
|
|
62218
62210
|
left: i + l - v,
|
|
@@ -62222,8 +62214,8 @@ class wE extends D2 {
|
|
|
62222
62214
|
};
|
|
62223
62215
|
}
|
|
62224
62216
|
_resizeRightBottom(e, a, s, n) {
|
|
62225
|
-
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,
|
|
62226
|
-
let v = d +
|
|
62217
|
+
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);
|
|
62218
|
+
let v = d + f, y = c + m;
|
|
62227
62219
|
const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
|
|
62228
62220
|
return v < z && (v = z), y < _ && (y = _), {
|
|
62229
62221
|
left: i,
|
|
@@ -62233,8 +62225,8 @@ class wE extends D2 {
|
|
|
62233
62225
|
};
|
|
62234
62226
|
}
|
|
62235
62227
|
_resizeLeftBottom(e, a, s, n) {
|
|
62236
|
-
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,
|
|
62237
|
-
let v = d -
|
|
62228
|
+
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);
|
|
62229
|
+
let v = d - f, y = c + m;
|
|
62238
62230
|
const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
|
|
62239
62231
|
return v < z && (v = z), y < _ && (y = _), {
|
|
62240
62232
|
left: i + l - v,
|
|
@@ -62244,8 +62236,8 @@ class wE extends D2 {
|
|
|
62244
62236
|
};
|
|
62245
62237
|
}
|
|
62246
62238
|
_resizeRightTop(e, a, s, n) {
|
|
62247
|
-
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,
|
|
62248
|
-
let v = d +
|
|
62239
|
+
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);
|
|
62240
|
+
let v = d + f, y = c - m;
|
|
62249
62241
|
const { limitWidth: z, limitHeight: _ } = this._getLimitedSize(d, c);
|
|
62250
62242
|
return v < z && (v = z), y < _ && (y = _), {
|
|
62251
62243
|
left: i,
|
|
@@ -62282,9 +62274,9 @@ class wE extends D2 {
|
|
|
62282
62274
|
u.disableObjectsEvent();
|
|
62283
62275
|
const g = y0.create(u);
|
|
62284
62276
|
g.startScroll(o, l);
|
|
62285
|
-
const { scrollX: h, scrollY:
|
|
62286
|
-
this._viewportScrollX = h, this._viewportScrollY =
|
|
62287
|
-
const { ancestorLeft:
|
|
62277
|
+
const { scrollX: h, scrollY: p } = Be(g);
|
|
62278
|
+
this._viewportScrollX = h, this._viewportScrollY = p;
|
|
62279
|
+
const { ancestorLeft: f, ancestorTop: m } = this._scene, { width: v, height: y } = u, z = this._getRotateAnchorCursor(a);
|
|
62288
62280
|
if (!c)
|
|
62289
62281
|
this._clearControlMap(), this._changeStart$.next({
|
|
62290
62282
|
objects: this._selectedObjectMap,
|
|
@@ -62312,12 +62304,12 @@ class wE extends D2 {
|
|
|
62312
62304
|
var C, x;
|
|
62313
62305
|
(C = this._topScenePointerMoveSub) == null || C.unsubscribe(), (x = this._topScenePointerUpSub) == null || x.unsubscribe(), u.enableObjectsEvent(), u.resetCursor(), g.dispose(), this._startStateMap.clear();
|
|
62314
62306
|
const { offsetX: j, offsetY: w } = _;
|
|
62315
|
-
c ? (this._recoverySizeBoundary([s],
|
|
62307
|
+
c ? (this._recoverySizeBoundary([s], f, m, v, y), this._changeEnd$.next({
|
|
62316
62308
|
objects: /* @__PURE__ */ new Map([[s.oKey, s]]),
|
|
62317
62309
|
type: 2,
|
|
62318
62310
|
offsetX: j,
|
|
62319
62311
|
offsetY: w
|
|
62320
|
-
})) : (this._recoverySizeBoundary(Array.from(this._selectedObjectMap.values()),
|
|
62312
|
+
})) : (this._recoverySizeBoundary(Array.from(this._selectedObjectMap.values()), f, m, v, y), this._changeEnd$.next({
|
|
62321
62313
|
objects: this._selectedObjectMap,
|
|
62322
62314
|
type: 2,
|
|
62323
62315
|
offsetX: j,
|
|
@@ -62349,7 +62341,7 @@ class wE extends D2 {
|
|
|
62349
62341
|
const d = this._getRotateAnchorCursor(
|
|
62350
62342
|
"__SpreadsheetTransformerRotateLine__"
|
|
62351
62343
|
/* ROTATE_LINE */
|
|
62352
|
-
), { ancestorLeft: c, ancestorTop: g, width: h, height:
|
|
62344
|
+
), { ancestorLeft: c, ancestorTop: g, width: h, height: p, angle: f } = a, m = h / 2 + c, v = p / 2 + g;
|
|
62353
62345
|
this._clearControlMap(), this._changeStart$.next({
|
|
62354
62346
|
objects: this._selectedObjectMap,
|
|
62355
62347
|
type: 0
|
|
@@ -62357,7 +62349,7 @@ class wE extends D2 {
|
|
|
62357
62349
|
}), this._moveBufferSkip = !1;
|
|
62358
62350
|
const y = l.onPointerMove$.subscribeEvent((_) => {
|
|
62359
62351
|
const { offsetX: j, offsetY: w } = _;
|
|
62360
|
-
this._rotateMoving(j, w, m, v,
|
|
62352
|
+
this._rotateMoving(j, w, m, v, f), l.setCursor(d);
|
|
62361
62353
|
}), z = l.onPointerUp$.subscribeEvent((_) => {
|
|
62362
62354
|
y == null || y.unsubscribe(), z == null || z.unsubscribe(), l.enableObjectsEvent(), l.resetCursor(), this.refreshControls();
|
|
62363
62355
|
const { offsetX: j, offsetY: w } = _;
|
|
@@ -62514,7 +62506,7 @@ class wE extends D2 {
|
|
|
62514
62506
|
};
|
|
62515
62507
|
}
|
|
62516
62508
|
_createResizeAnchor(e, a, s) {
|
|
62517
|
-
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:
|
|
62509
|
+
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 I1(`${e}_${s}`, {
|
|
62518
62510
|
zIndex: s - 1,
|
|
62519
62511
|
fill: u,
|
|
62520
62512
|
stroke: d,
|
|
@@ -62522,13 +62514,13 @@ class wE extends D2 {
|
|
|
62522
62514
|
width: h,
|
|
62523
62515
|
height: h,
|
|
62524
62516
|
radius: g,
|
|
62525
|
-
left:
|
|
62526
|
-
top:
|
|
62517
|
+
left: p,
|
|
62518
|
+
top: f
|
|
62527
62519
|
});
|
|
62528
62520
|
return this._attachHover(v, m, v1.DEFAULT), v;
|
|
62529
62521
|
}
|
|
62530
62522
|
_createCopperResizeAnchor(e, a, s) {
|
|
62531
|
-
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:
|
|
62523
|
+
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);
|
|
62532
62524
|
let m;
|
|
62533
62525
|
const v = `${e}_${s}`, y = {
|
|
62534
62526
|
zIndex: s - 1,
|
|
@@ -62538,9 +62530,9 @@ class wE extends D2 {
|
|
|
62538
62530
|
width: g,
|
|
62539
62531
|
height: g,
|
|
62540
62532
|
left: h,
|
|
62541
|
-
top:
|
|
62533
|
+
top: p
|
|
62542
62534
|
}, z = g, _ = g / 4;
|
|
62543
|
-
return
|
|
62535
|
+
return f === v1.EAST_RESIZE ? (y.width = _, y.height = z, m = new I1(v, y)) : f === v1.WEST_RESIZE ? (y.width = _, y.height = z, m = new I1(v, y)) : f === v1.NORTH_RESIZE ? (y.width = z, y.height = _, m = new I1(v, y)) : f === v1.SOUTH_RESIZE ? (y.width = z, y.height = _, m = new I1(v, y)) : f === v1.NORTH_EAST_RESIZE ? (y.pointsGroup = this._getNorthEastPoints(z, _), m = new O3(v, y)) : f === v1.NORTH_WEST_RESIZE ? (y.pointsGroup = this._getNorthWestPoints(z, _), m = new O3(v, y)) : f === v1.SOUTH_EAST_RESIZE ? (y.pointsGroup = this._getSouthEastPoints(z, _), m = new O3(v, y)) : f === v1.SOUTH_WEST_RESIZE && (y.pointsGroup = this._getSouthWestPoints(z, _), m = new O3(v, y)), this._attachHover(m, f, v1.DEFAULT), m;
|
|
62544
62536
|
}
|
|
62545
62537
|
_getNorthEastPoints(e, a) {
|
|
62546
62538
|
const s = e - a;
|
|
@@ -62710,11 +62702,11 @@ class wE extends D2 {
|
|
|
62710
62702
|
}), this._transformerControlMap.clear();
|
|
62711
62703
|
}
|
|
62712
62704
|
_createControl(e, a = !0) {
|
|
62713
|
-
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:
|
|
62705
|
+
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);
|
|
62714
62706
|
if (a && u)
|
|
62715
62707
|
return;
|
|
62716
62708
|
const _ = e.oKey, j = this._selectedObjectMap.size + e.maxZIndex + DE, w = e.getLayerIndex() || _E, C = [];
|
|
62717
|
-
if (
|
|
62709
|
+
if (f && !u) {
|
|
62718
62710
|
const F = new I1(`__SpreadsheetTransformerOutline___${j}`, {
|
|
62719
62711
|
zIndex: j - 1,
|
|
62720
62712
|
evented: !1,
|
|
@@ -62750,7 +62742,7 @@ class wE extends D2 {
|
|
|
62750
62742
|
top: A,
|
|
62751
62743
|
height: h,
|
|
62752
62744
|
width: h,
|
|
62753
|
-
radius:
|
|
62745
|
+
radius: p,
|
|
62754
62746
|
strokeWidth: v * 2,
|
|
62755
62747
|
stroke: m
|
|
62756
62748
|
});
|
|
@@ -64424,7 +64416,7 @@ class tA {
|
|
|
64424
64416
|
bottom: d.y
|
|
64425
64417
|
};
|
|
64426
64418
|
this._viewBound = c;
|
|
64427
|
-
const g = this._preViewBound, h = this._diffViewBound(c, g),
|
|
64419
|
+
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 = {
|
|
64428
64420
|
top: o,
|
|
64429
64421
|
left: n,
|
|
64430
64422
|
bottom: l,
|
|
@@ -64432,13 +64424,13 @@ class tA {
|
|
|
64432
64424
|
}, v = this.expandBounds(c);
|
|
64433
64425
|
this.cacheBound = v, this.preCacheBound || (this.preCacheBound = this.expandBounds(c));
|
|
64434
64426
|
let y = [];
|
|
64435
|
-
this._preCacheVisibleBound && (
|
|
64436
|
-
const z = this.expandBounds(m), _ = this._calcCacheUpdate(c, this._preCacheVisibleBound,
|
|
64427
|
+
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));
|
|
64428
|
+
const z = this.expandBounds(m), _ = this._calcCacheUpdate(c, this._preCacheVisibleBound, p, f);
|
|
64437
64429
|
return _ && (y = this._calcDiffCacheBound(this._preCacheBound, v)), {
|
|
64438
64430
|
viewBound: c,
|
|
64439
64431
|
diffBounds: h,
|
|
64440
|
-
diffX:
|
|
64441
|
-
diffY:
|
|
64432
|
+
diffX: p,
|
|
64433
|
+
diffY: f,
|
|
64442
64434
|
viewPortPosition: m,
|
|
64443
64435
|
viewportKey: this.viewportKey,
|
|
64444
64436
|
isDirty: this.isDirty ? 2 : 0,
|
|
@@ -64681,7 +64673,7 @@ class tA {
|
|
|
64681
64673
|
* @param isTrigger
|
|
64682
64674
|
*/
|
|
64683
64675
|
_scrollToViewportPosCore(t, e = !0) {
|
|
64684
|
-
var c, g, h,
|
|
64676
|
+
var c, g, h, p, f;
|
|
64685
64677
|
if (this._scrollBar == null)
|
|
64686
64678
|
return;
|
|
64687
64679
|
let a = (c = t.viewportScrollX) != null ? c : this.viewportScrollX, s = (g = t.viewportScrollY) != null ? g : this.viewportScrollY;
|
|
@@ -64699,9 +64691,9 @@ class tA {
|
|
|
64699
64691
|
rawScrollX: n.x,
|
|
64700
64692
|
rawScrollY: n.y,
|
|
64701
64693
|
limitX: (h = this._scrollBar) == null ? void 0 : h.limitX,
|
|
64702
|
-
limitY: (
|
|
64694
|
+
limitY: (p = this._scrollBar) == null ? void 0 : p.limitY
|
|
64703
64695
|
};
|
|
64704
|
-
return (
|
|
64696
|
+
return (f = this._scrollBar) == null || f.makeDirty(!0), this.onScrollAfter$.emitEvent(d), this._emitScrollEnd$(d), i;
|
|
64705
64697
|
}
|
|
64706
64698
|
expandBounds(t) {
|
|
64707
64699
|
return {
|