@univerjs/engine-render 0.10.1 → 0.10.2-nightly.202508071209
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 +131 -128
- package/lib/index.js +131 -128
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
- package/LICENSE +0 -176
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var M8 = Object.defineProperty;
|
|
2
2
|
var R8 = (r, t, e) => t in r ? M8(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
3
|
var k = (r, t, e) => R8(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { Tools as o1, DEFAULT_STYLES as u2, FontStyleType as F0, BaselineOffset as m3, getCellInfoInMergeData as O8, Rectangle as M3, ColorKit as d4, Disposable as D2, EventSubject as s1, checkParagraphHasIndentByStyle as I8, DataStreamTreeTokenType as J, BorderStyleTypes as U1, BooleanNumber as t1, DisposableCollection as L8, toDisposable as V1, sortRules as g2, Registry as je, Range as H3, numberToABC as P8, HorizontalAlign as
|
|
4
|
+
import { Tools as o1, DEFAULT_STYLES as u2, FontStyleType as F0, BaselineOffset as m3, getCellInfoInMergeData as O8, Rectangle as M3, ColorKit as d4, Disposable as D2, EventSubject as s1, checkParagraphHasIndentByStyle as I8, DataStreamTreeTokenType as J, BorderStyleTypes as U1, BooleanNumber as t1, DisposableCollection as L8, toDisposable as V1, sortRules as g2, Registry as je, Range as H3, numberToABC as P8, HorizontalAlign as d1, VerticalAlign as k2, insertTextToContent as N8, horizontalLineSegmentsSubtraction as $8, deleteContent as U8, DataStreamTreeNodeType as X1, GridType as N1, BulletAlignment as Ie, TableTextWrapType as J0, PositionedObjectLayoutType as K1, WrapTextType as W0, ColumnSeparatorType as u0, TableRowHeightRule as n0, VerticalAlignmentType as X2, TableAlignmentType as Le, NAMED_STYLE_SPACE_MAP as H8, ObjectRelativeFromV as b1, SpacingRule as Q0, CustomDecorationType as q8, CustomRangeType as Pe, ObjectMatrix as W1, SectionType as ee, NumberUnitType as G8, DocumentFlavor as l7, WrapStrategy as T1, PageOrientType as N4, NAMED_STYLE_MAP as W8, mergeWith as v6, AlignTypeH as o3, ObjectRelativeFromH as z1, AlignTypeV as J3, ListGlyphType as S3, numberToListABC as u7, Skeleton as Y8, PRESET_LIST_TYPE as X8, DocumentDataModel as g4, DEFAULT_EMPTY_DOCUMENT_VALUE as d7, Inject as b3, LocaleService as V8, IContextService as K8, IConfigService as g7, Injector as we, SheetSkeleton as Z8, extractPureTextFromCell as c7, CellValueType as N2, addLinkToDocumentModel as J8, searchArray as S0, isNullCell as Q8, getColorStyle as y3, isWhiteColor as b6, TextDecoration as f2, requestImmediateMacroTask as h7, COLORS as y6, createIdentifier as $4, ThemeService as k7, invertColorByMatrix as ea, MOVE_BUFFER_VALUE as z6, sortRulesByDesc as _6, isClassDependencyItem as ta, IUniverInstanceService as aa, remove as D6, UniverInstanceType as ra, Plugin as sa, merge as na, registerDependencies as ia } from "@univerjs/core";
|
|
5
5
|
import { BehaviorSubject as I3, Subject as P1, startWith as oa, distinctUntilChanged as m7, Subscription as la, Observable as p7, shareReplay as ua, debounceTime as da } from "rxjs";
|
|
6
6
|
var f7 = /* @__PURE__ */ ((r) => (r.RECT = "rect", r.CIRCLE = "circle", r.PATH = "path", r))(f7 || {}), ga = /* @__PURE__ */ ((r) => (r[r.XY = 0] = "XY", r[r.X = 1] = "X", r[r.Y = 2] = "Y", r))(ga || {});
|
|
7
7
|
const L3 = 1, q3 = '"Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif', v7 = {
|
|
@@ -42033,7 +42033,7 @@ class Z4 extends C3 {
|
|
|
42033
42033
|
k(this, "hAlign");
|
|
42034
42034
|
k(this, "vAlign");
|
|
42035
42035
|
k(this, "skeleton");
|
|
42036
|
-
this.width = a.width, this.height = a.height, this.text = a.text, this.fontStyle = a.fontStyle, this.warp = (s = a.warp) != null ? s : !1, this.hAlign = (n = a.hAlign) != null ? n :
|
|
42036
|
+
this.width = a.width, this.height = a.height, this.text = a.text, this.fontStyle = a.fontStyle, this.warp = (s = a.warp) != null ? s : !1, this.hAlign = (n = a.hAlign) != null ? n : d1.LEFT, this.vAlign = (i = a.vAlign) != null ? i : k2.TOP, this.skeleton = new v4(
|
|
42037
42037
|
a.text,
|
|
42038
42038
|
a.fontStyle,
|
|
42039
42039
|
!!a.warp,
|
|
@@ -42047,7 +42047,7 @@ class Z4 extends C3 {
|
|
|
42047
42047
|
let y = h + v;
|
|
42048
42048
|
e.save(), e.font = i, e.fillStyle = (z = a.color) != null ? z : z3;
|
|
42049
42049
|
for (const _ of f) {
|
|
42050
|
-
const j = _.height, w = _.width, x = l ===
|
|
42050
|
+
const j = _.height, w = _.width, x = l === d1.LEFT || l === d1.UNSPECIFIED ? 0 : l === d1.CENTER ? (d - w) / 2 : d - w, C = y + _.baseline;
|
|
42051
42051
|
e.fillText(_.text, g + x, C), a.underline && this._drawTextDecoration(e, {
|
|
42052
42052
|
x: g + x,
|
|
42053
42053
|
y: y + j - 1,
|
|
@@ -43116,18 +43116,18 @@ function by(r, t, e, a, s) {
|
|
|
43116
43116
|
B.pageHeight = T;
|
|
43117
43117
|
const R = l.tableRows[_];
|
|
43118
43118
|
for (let B = 0; B < R.tableCells.length; B++) {
|
|
43119
|
-
const A = R.tableCells[B], L = x.cells[B], { vAlign: I =
|
|
43119
|
+
const A = R.tableCells[B], L = x.cells[B], { vAlign: I = X2.CONTENT_ALIGNMENT_UNSPECIFIED } = A, { pageHeight: O, height: P, originMarginTop: N, originMarginBottom: $ } = L;
|
|
43120
43120
|
let H = N;
|
|
43121
43121
|
switch (I) {
|
|
43122
|
-
case
|
|
43122
|
+
case X2.TOP: {
|
|
43123
43123
|
H = N;
|
|
43124
43124
|
break;
|
|
43125
43125
|
}
|
|
43126
|
-
case
|
|
43126
|
+
case X2.CENTER: {
|
|
43127
43127
|
H = (O - P) / 2;
|
|
43128
43128
|
break;
|
|
43129
43129
|
}
|
|
43130
|
-
case
|
|
43130
|
+
case X2.BOTTOM: {
|
|
43131
43131
|
H = O - P - $;
|
|
43132
43132
|
break;
|
|
43133
43133
|
}
|
|
@@ -43264,18 +43264,18 @@ function Dy(r, t) {
|
|
|
43264
43264
|
const a = t.tableCells[e], s = r.cells[e];
|
|
43265
43265
|
if (s == null)
|
|
43266
43266
|
continue;
|
|
43267
|
-
const { vAlign: n =
|
|
43267
|
+
const { vAlign: n = X2.CONTENT_ALIGNMENT_UNSPECIFIED } = a, { pageHeight: i, height: o, originMarginTop: l, originMarginBottom: u } = s;
|
|
43268
43268
|
let d = l;
|
|
43269
43269
|
switch (n) {
|
|
43270
|
-
case
|
|
43270
|
+
case X2.TOP: {
|
|
43271
43271
|
d = l;
|
|
43272
43272
|
break;
|
|
43273
43273
|
}
|
|
43274
|
-
case
|
|
43274
|
+
case X2.CENTER: {
|
|
43275
43275
|
d = (i - o) / 2;
|
|
43276
43276
|
break;
|
|
43277
43277
|
}
|
|
43278
|
-
case
|
|
43278
|
+
case X2.BOTTOM: {
|
|
43279
43279
|
d = i - o - u;
|
|
43280
43280
|
break;
|
|
43281
43281
|
}
|
|
@@ -43513,7 +43513,7 @@ function I2(r, t, e, a, s, n, i = O1.Normal, o) {
|
|
|
43513
43513
|
h0(r, t, e, a, s, n, i, o);
|
|
43514
43514
|
}
|
|
43515
43515
|
function h0(r, t, e, a, s, n, i = O1.Normal, o) {
|
|
43516
|
-
var s3,
|
|
43516
|
+
var s3, H2, E3, X3, o2, F3, V3, K3, l2;
|
|
43517
43517
|
let l = $3(e), u = oe(l);
|
|
43518
43518
|
if ((!u || !u.column) && (dt(r, t, e, a, s, !0, i), l = $3(e), u = oe(l)), !u) return;
|
|
43519
43519
|
const d = u.column;
|
|
@@ -43532,7 +43532,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
|
|
|
43532
43532
|
} = s, { namedStyleType: w } = f, x = w !== void 0 ? H8[w] : null, C = {
|
|
43533
43533
|
...f,
|
|
43534
43534
|
spaceAbove: (s3 = f.spaceAbove) != null ? s3 : x == null ? void 0 : x.spaceAbove,
|
|
43535
|
-
spaceBelow: (
|
|
43535
|
+
spaceBelow: (H2 = f.spaceBelow) != null ? H2 : x == null ? void 0 : x.spaceBelow
|
|
43536
43536
|
}, {
|
|
43537
43537
|
// direction,
|
|
43538
43538
|
spaceAbove: S,
|
|
@@ -43551,7 +43551,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
|
|
|
43551
43551
|
} = ht(
|
|
43552
43552
|
a,
|
|
43553
43553
|
s
|
|
43554
|
-
), { paddingTop: H, paddingBottom: X, contentHeight: Q, lineSpacingApply:
|
|
43554
|
+
), { paddingTop: H, paddingBottom: X, contentHeight: Q, lineSpacingApply: g1 } = gt(
|
|
43555
43555
|
p,
|
|
43556
43556
|
L,
|
|
43557
43557
|
I,
|
|
@@ -43561,7 +43561,7 @@ function h0(r, t, e, a, s, n, i = O1.Normal, o) {
|
|
|
43561
43561
|
N
|
|
43562
43562
|
), { marginTop: u1, spaceBelowApply: a1 } = Oy(
|
|
43563
43563
|
r,
|
|
43564
|
-
|
|
43564
|
+
g1,
|
|
43565
43565
|
S,
|
|
43566
43566
|
F,
|
|
43567
43567
|
n,
|
|
@@ -44140,11 +44140,11 @@ function ue(r, t = -1) {
|
|
|
44140
44140
|
for (let N = 0; N < O; N++) {
|
|
44141
44141
|
const $ = x[N], { glyphGroup: H } = $, X = B;
|
|
44142
44142
|
let Q = X;
|
|
44143
|
-
for (const
|
|
44144
|
-
const u1 =
|
|
44143
|
+
for (const g1 of H) {
|
|
44144
|
+
const u1 = g1.glyphType === Q1.LIST ? 0 : g1.count;
|
|
44145
44145
|
Q += u1;
|
|
44146
|
-
const a1 =
|
|
44147
|
-
L = Math.max(L, i1), I = Math.max(I, h1), N === O - 1 && (A +=
|
|
44146
|
+
const a1 = g1.bBox, { ba: i1, bd: h1 } = a1;
|
|
44147
|
+
L = Math.max(L, i1), I = Math.max(I, h1), N === O - 1 && (A += g1.width);
|
|
44148
44148
|
}
|
|
44149
44149
|
H.length !== 0 && (P = !0, H[0].xOffset !== 0 && N === O - 1 && (A -= H[0].xOffset), N === O - 1 && (A += $.left), $.st = X + 1, $.ed = Q >= $.st ? Q : $.st, B = $.ed);
|
|
44150
44150
|
}
|
|
@@ -44466,7 +44466,7 @@ function iz(r, t) {
|
|
|
44466
44466
|
consecutiveHyphenLimit: R = Number.POSITIVE_INFINITY,
|
|
44467
44467
|
hyphenationZone: B,
|
|
44468
44468
|
renderConfig: A = {
|
|
44469
|
-
horizontalAlign:
|
|
44469
|
+
horizontalAlign: d1.LEFT,
|
|
44470
44470
|
verticalAlign: k2.TOP,
|
|
44471
44471
|
centerAngle: 0,
|
|
44472
44472
|
vertexAngle: 0,
|
|
@@ -44485,7 +44485,7 @@ function iz(r, t) {
|
|
|
44485
44485
|
marginTop: H = _,
|
|
44486
44486
|
marginBottom: X = j,
|
|
44487
44487
|
marginRight: Q = w,
|
|
44488
|
-
marginLeft:
|
|
44488
|
+
marginLeft: g1 = x,
|
|
44489
44489
|
marginHeader: u1 = C,
|
|
44490
44490
|
marginFooter: a1 = S,
|
|
44491
44491
|
defaultHeaderId: i1 = g,
|
|
@@ -44513,7 +44513,7 @@ function iz(r, t) {
|
|
|
44513
44513
|
marginTop: H,
|
|
44514
44514
|
marginBottom: X,
|
|
44515
44515
|
marginRight: Q,
|
|
44516
|
-
marginLeft:
|
|
44516
|
+
marginLeft: g1,
|
|
44517
44517
|
marginHeader: u1,
|
|
44518
44518
|
marginFooter: a1,
|
|
44519
44519
|
headerIds: M1,
|
|
@@ -44607,7 +44607,7 @@ function _3(r, t, e, a = 1, s = g0.SECTION) {
|
|
|
44607
44607
|
N,
|
|
44608
44608
|
!1
|
|
44609
44609
|
), S.set(N, /* @__PURE__ */ new Map([[F, H]]))), n.footerId = N), n.originMarginTop = v, n.originMarginBottom = y, n.marginTop = t5(v, $, T), n.marginBottom = t5(y, H, T);
|
|
44610
|
-
const X = n.sections, Q = X[X.length - 1], { marginTop:
|
|
44610
|
+
const X = n.sections, Q = X[X.length - 1], { marginTop: g1, marginBottom: u1, marginLeft: a1, marginRight: i1 } = n, h1 = F - a1 - i1, p1 = T - g1 - u1;
|
|
44611
44611
|
let D1 = 0;
|
|
44612
44612
|
Q && (D1 = Q.top + Q.height);
|
|
44613
44613
|
const m1 = rt(
|
|
@@ -44853,14 +44853,14 @@ function fz(r, t) {
|
|
|
44853
44853
|
const d = hz(s), c = kz(s);
|
|
44854
44854
|
if (o < 0 && d > 0)
|
|
44855
44855
|
l = Math.max(o / d, -1), o = Math.min(o + d, 0);
|
|
44856
|
-
else if (t ===
|
|
44856
|
+
else if (t === d1.JUSTIFIED) {
|
|
44857
44857
|
c > 0 && (l = Math.min(o / c, 1), o = Math.max(o - c, 0));
|
|
44858
44858
|
const g = mz(s);
|
|
44859
44859
|
g > 0 && o > 0 && (u = o / g, o = 0);
|
|
44860
44860
|
}
|
|
44861
44861
|
(l !== 0 || u !== 0) && (pz(s, l, u), i = Q6(s));
|
|
44862
44862
|
}
|
|
44863
|
-
t ===
|
|
44863
|
+
t === d1.CENTER ? s.paddingLeft = (n - i) / 2 : t === d1.RIGHT && (s.paddingLeft = n - i), s.paddingLeft = Math.max(s.paddingLeft, 0);
|
|
44864
44864
|
}
|
|
44865
44865
|
}
|
|
44866
44866
|
}
|
|
@@ -44904,7 +44904,7 @@ function zz(r, t, e, a) {
|
|
|
44904
44904
|
de(r, (i) => {
|
|
44905
44905
|
if (i.paragraphIndex !== n.startIndex)
|
|
44906
44906
|
return;
|
|
44907
|
-
const { paragraphStyle: o = {} } = n, { horizontalAlign: l =
|
|
44907
|
+
const { paragraphStyle: o = {} } = n, { horizontalAlign: l = d1.UNSPECIFIED } = o;
|
|
44908
44908
|
bz(i), vz(i), yz(i, t, e, a, o), fz(i, l);
|
|
44909
44909
|
});
|
|
44910
44910
|
}
|
|
@@ -45395,9 +45395,11 @@ class Qz {
|
|
|
45395
45395
|
this._loadFontsToBook();
|
|
45396
45396
|
}
|
|
45397
45397
|
async _loadFontsToBook() {
|
|
45398
|
-
if (!(this.isReady || !await Jz()
|
|
45398
|
+
if (!(this.isReady || !await Jz() || !("queryLocalFonts" in window)) && !(typeof navigator == "object" && navigator.userAgent.includes("Electron")))
|
|
45399
45399
|
try {
|
|
45400
|
-
const e = await window.queryLocalFonts(
|
|
45400
|
+
const e = await window.queryLocalFonts({
|
|
45401
|
+
postscriptNames: []
|
|
45402
|
+
});
|
|
45401
45403
|
for (const a of e) {
|
|
45402
45404
|
const { family: s, style: n } = a;
|
|
45403
45405
|
let i = this._fontBook.get(s);
|
|
@@ -48155,7 +48157,7 @@ function x4(r) {
|
|
|
48155
48157
|
var t;
|
|
48156
48158
|
return r.length < 1240 ? t = 107 : r.length < 33900 ? t = 1131 : t = 32768, t;
|
|
48157
48159
|
}
|
|
48158
|
-
function
|
|
48160
|
+
function Y2(r, t, e) {
|
|
48159
48161
|
var a = [], s = [], n = Y.getCard16(r, t), i, o;
|
|
48160
48162
|
if (n !== 0) {
|
|
48161
48163
|
var l = Y.getByte(r, t + 2);
|
|
@@ -48313,7 +48315,7 @@ function m5(r, t, e, a) {
|
|
|
48313
48315
|
if (l !== 0 && u !== 0) {
|
|
48314
48316
|
var d = Pt(r, u + t, l, a);
|
|
48315
48317
|
if (o._defaultWidthX = d.defaultWidthX, o._nominalWidthX = d.nominalWidthX, d.subrs !== 0) {
|
|
48316
|
-
var c = u + d.subrs, g =
|
|
48318
|
+
var c = u + d.subrs, g = Y2(r, c + t);
|
|
48317
48319
|
o._subrs = g.objects, o._subrsBias = x4(o._subrs);
|
|
48318
48320
|
}
|
|
48319
48321
|
o._privateDict = d;
|
|
@@ -48515,7 +48517,7 @@ function H_(r, t, e, a) {
|
|
|
48515
48517
|
}
|
|
48516
48518
|
function q_(r, t, e, a) {
|
|
48517
48519
|
e.tables.cff = {};
|
|
48518
|
-
var s = P_(r, t), n =
|
|
48520
|
+
var s = P_(r, t), n = Y2(r, s.endOffset, Y.bytesToString), i = Y2(r, n.endOffset), o = Y2(r, i.endOffset, Y.bytesToString), l = Y2(r, o.endOffset);
|
|
48519
48521
|
e.gsubrs = l.objects, e.gsubrsBias = x4(e.gsubrs);
|
|
48520
48522
|
var u = m5(r, t, i.objects, o.objects);
|
|
48521
48523
|
if (u.length !== 1)
|
|
@@ -48526,17 +48528,17 @@ function q_(r, t, e, a) {
|
|
|
48526
48528
|
if (c === 0 || g === 0)
|
|
48527
48529
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
48528
48530
|
c += t;
|
|
48529
|
-
var h =
|
|
48531
|
+
var h = Y2(r, c), p = m5(r, t, h.objects, o.objects);
|
|
48530
48532
|
d._fdArray = p, g += t, d._fdSelect = H_(r, g, e.numGlyphs, p.length);
|
|
48531
48533
|
}
|
|
48532
48534
|
var f = t + d.private[1], m = Pt(r, f, d.private[0], o.objects);
|
|
48533
48535
|
if (e.defaultWidthX = m.defaultWidthX, e.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
|
|
48534
|
-
var v = f + m.subrs, y =
|
|
48536
|
+
var v = f + m.subrs, y = Y2(r, v);
|
|
48535
48537
|
e.subrs = y.objects, e.subrsBias = x4(e.subrs);
|
|
48536
48538
|
} else
|
|
48537
48539
|
e.subrs = [], e.subrsBias = 0;
|
|
48538
48540
|
var z;
|
|
48539
|
-
a.lowMemory ? (z = M_(r, t + d.charStrings), e.nGlyphs = z.offsets.length) : (z =
|
|
48541
|
+
a.lowMemory ? (z = M_(r, t + d.charStrings), e.nGlyphs = z.offsets.length) : (z = Y2(r, t + d.charStrings), e.nGlyphs = z.objects.length);
|
|
48540
48542
|
var _ = $_(r, t + d.charset, e.nGlyphs, o.objects);
|
|
48541
48543
|
if (d.encoding === 0 ? e.cffEncoding = new fe(j_, _) : d.encoding === 1 ? e.cffEncoding = new fe(w_, _) : e.cffEncoding = U_(r, t + d.encoding, _), e.encoding = e.encoding || e.cffEncoding, e.glyphs = new A2.GlyphSet(e), a.lowMemory)
|
|
48542
48544
|
e._push = function(x) {
|
|
@@ -50404,7 +50406,7 @@ function FD(r) {
|
|
|
50404
50406
|
fontBBox: [0, z.yMin, z.ascender, z.advanceWidthMax]
|
|
50405
50407
|
}), H = r.metas && Object.keys(r.metas).length > 0 ? t8.make(r.metas) : void 0, X = [_, j, w, x, O, S, N, $, C];
|
|
50406
50408
|
P && X.push(P), r.tables.gsub && X.push(e8.make(r.tables.gsub)), H && X.push(H);
|
|
50407
|
-
for (var Q = a8(X),
|
|
50409
|
+
for (var Q = a8(X), g1 = Q.encode(), u1 = u6(g1), a1 = Q.fields, i1 = !1, h1 = 0; h1 < a1.length; h1 += 1)
|
|
50408
50410
|
if (a1[h1].name === "head table") {
|
|
50409
50411
|
a1[h1].value.checkSumAdjustment = 2981146554 - u1, i1 = !0;
|
|
50410
50412
|
break;
|
|
@@ -51111,7 +51113,7 @@ var g8 = function(r) {
|
|
|
51111
51113
|
untouch: function(r) {
|
|
51112
51114
|
r.xTouched = !1;
|
|
51113
51115
|
}
|
|
51114
|
-
},
|
|
51116
|
+
}, $2 = {
|
|
51115
51117
|
x: 0,
|
|
51116
51118
|
y: 1,
|
|
51117
51119
|
axis: "y",
|
|
@@ -51136,10 +51138,10 @@ var g8 = function(r) {
|
|
|
51136
51138
|
return;
|
|
51137
51139
|
}
|
|
51138
51140
|
if (s = a.distance(r, t, !0, !0), n = a.distance(r, e, !0, !0), l = a.distance(t, t, !1, !0), u = a.distance(e, e, !1, !0), i = Math.abs(s), o = Math.abs(n), d = i + o, d === 0) {
|
|
51139
|
-
|
|
51141
|
+
$2.setRelative(r, r, (l + u) / 2, a, !0);
|
|
51140
51142
|
return;
|
|
51141
51143
|
}
|
|
51142
|
-
|
|
51144
|
+
$2.setRelative(r, r, (l * o + u * i) / d, a, !0);
|
|
51143
51145
|
},
|
|
51144
51146
|
// Slope of line normal to this.
|
|
51145
51147
|
normalSlope: 0,
|
|
@@ -51177,12 +51179,12 @@ var g8 = function(r) {
|
|
|
51177
51179
|
}
|
|
51178
51180
|
};
|
|
51179
51181
|
Object.freeze(B2);
|
|
51180
|
-
Object.freeze(
|
|
51182
|
+
Object.freeze($2);
|
|
51181
51183
|
function j0(r, t) {
|
|
51182
51184
|
this.x = r, this.y = t, this.axis = void 0, this.slope = t / r, this.normalSlope = -r / t, Object.freeze(this);
|
|
51183
51185
|
}
|
|
51184
51186
|
j0.prototype.distance = function(r, t, e, a) {
|
|
51185
|
-
return this.x * B2.distance(r, t, e, a) + this.y *
|
|
51187
|
+
return this.x * B2.distance(r, t, e, a) + this.y * $2.distance(r, t, e, a);
|
|
51186
51188
|
};
|
|
51187
51189
|
j0.prototype.interpolate = function(r, t, e, a) {
|
|
51188
51190
|
var s, n, i, o, l, u, d;
|
|
@@ -51202,22 +51204,22 @@ j0.prototype.touch = function(r) {
|
|
|
51202
51204
|
};
|
|
51203
51205
|
function w0(r, t) {
|
|
51204
51206
|
var e = Math.sqrt(r * r + t * t);
|
|
51205
|
-
return r /= e, t /= e, r === 1 && t === 0 ? B2 : r === 0 && t === 1 ?
|
|
51207
|
+
return r /= e, t /= e, r === 1 && t === 0 ? B2 : r === 0 && t === 1 ? $2 : new j0(r, t);
|
|
51206
51208
|
}
|
|
51207
|
-
function
|
|
51209
|
+
function U2(r, t, e, a) {
|
|
51208
51210
|
this.x = this.xo = Math.round(r * 64) / 64, this.y = this.yo = Math.round(t * 64) / 64, this.lastPointOfContour = e, this.onCurve = a, this.prevPointOnContour = void 0, this.nextPointOnContour = void 0, this.xTouched = !1, this.yTouched = !1, Object.preventExtensions(this);
|
|
51209
51211
|
}
|
|
51210
|
-
|
|
51212
|
+
U2.prototype.nextTouched = function(r) {
|
|
51211
51213
|
for (var t = this.nextPointOnContour; !r.touched(t) && t !== this; )
|
|
51212
51214
|
t = t.nextPointOnContour;
|
|
51213
51215
|
return t;
|
|
51214
51216
|
};
|
|
51215
|
-
|
|
51217
|
+
U2.prototype.prevTouched = function(r) {
|
|
51216
51218
|
for (var t = this.prevPointOnContour; !r.touched(t) && t !== this; )
|
|
51217
51219
|
t = t.prevPointOnContour;
|
|
51218
51220
|
return t;
|
|
51219
51221
|
};
|
|
51220
|
-
var f0 = Object.freeze(new
|
|
51222
|
+
var f0 = Object.freeze(new U2(0, 0)), HD = {
|
|
51221
51223
|
cvCutIn: 17 / 16,
|
|
51222
51224
|
// control value cut in
|
|
51223
51225
|
deltaBase: 9,
|
|
@@ -51296,15 +51298,15 @@ l8 = function(r, t) {
|
|
|
51296
51298
|
n.push(f[z] + y);
|
|
51297
51299
|
}
|
|
51298
51300
|
r.instructions && !o.inhibitGridFit && (o = new Z2("glyf", r.instructions), o.gZone = o.z0 = o.z1 = o.z2 = i, o.contours = n, i.push(
|
|
51299
|
-
new
|
|
51300
|
-
new
|
|
51301
|
+
new U2(0, 0),
|
|
51302
|
+
new U2(Math.round(r.advanceWidth * e), 0)
|
|
51301
51303
|
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1), D3(o), i.length -= 2);
|
|
51302
51304
|
}
|
|
51303
51305
|
return i;
|
|
51304
51306
|
};
|
|
51305
51307
|
S4 = function(r, t, e, a) {
|
|
51306
51308
|
for (var s = r.points || [], n = s.length, i = t.gZone = t.z0 = t.z1 = t.z2 = [], o = t.contours = [], l, u = 0; u < n; u++)
|
|
51307
|
-
l = s[u], i[u] = new
|
|
51309
|
+
l = s[u], i[u] = new U2(
|
|
51308
51310
|
l.x * e,
|
|
51309
51311
|
l.y * a,
|
|
51310
51312
|
l.lastPointOfContour,
|
|
@@ -51319,8 +51321,8 @@ S4 = function(r, t, e, a) {
|
|
|
51319
51321
|
console.log(h, i[h].x, i[h].y);
|
|
51320
51322
|
}
|
|
51321
51323
|
if (i.push(
|
|
51322
|
-
new
|
|
51323
|
-
new
|
|
51324
|
+
new U2(0, 0),
|
|
51325
|
+
new U2(Math.round(r.advanceWidth * e), 0)
|
|
51324
51326
|
), D3(t), i.length -= 2, exports.DEBUG) {
|
|
51325
51327
|
console.log("FINISHED GLYPH", t.stack);
|
|
51326
51328
|
for (var p = 0; p < n; p++)
|
|
@@ -51343,7 +51345,7 @@ D3 = function(r) {
|
|
|
51343
51345
|
};
|
|
51344
51346
|
function Be(r) {
|
|
51345
51347
|
for (var t = r.tZone = new Array(r.gZone.length), e = 0; e < t.length; e++)
|
|
51346
|
-
t[e] = new
|
|
51348
|
+
t[e] = new U2(0, 0);
|
|
51347
51349
|
}
|
|
51348
51350
|
function c8(r, t) {
|
|
51349
51351
|
var e = r.prog, a = r.ip, s = 1, n;
|
|
@@ -51952,14 +51954,14 @@ function cw(r) {
|
|
|
51952
51954
|
throw new Error("invalid INSTCTRL[] selector");
|
|
51953
51955
|
}
|
|
51954
51956
|
}
|
|
51955
|
-
function
|
|
51957
|
+
function q2(r, t) {
|
|
51956
51958
|
var e = t.stack, a = t.prog, s = t.ip;
|
|
51957
51959
|
exports.DEBUG && console.log(t.step, "PUSHB[" + r + "]");
|
|
51958
51960
|
for (var n = 0; n < r; n++)
|
|
51959
51961
|
e.push(a[++s]);
|
|
51960
51962
|
t.ip = s;
|
|
51961
51963
|
}
|
|
51962
|
-
function
|
|
51964
|
+
function G2(r, t) {
|
|
51963
51965
|
var e = t.ip, a = t.prog, s = t.stack;
|
|
51964
51966
|
exports.DEBUG && console.log(t.ip, "PUSHW[" + r + "]");
|
|
51965
51967
|
for (var n = 0; n < r; n++) {
|
|
@@ -51984,15 +51986,15 @@ function W(r, t, e, a, s, n) {
|
|
|
51984
51986
|
}
|
|
51985
51987
|
o8 = [
|
|
51986
51988
|
/* 0x00 */
|
|
51987
|
-
C5.bind(void 0,
|
|
51989
|
+
C5.bind(void 0, $2),
|
|
51988
51990
|
/* 0x01 */
|
|
51989
51991
|
C5.bind(void 0, B2),
|
|
51990
51992
|
/* 0x02 */
|
|
51991
|
-
E5.bind(void 0,
|
|
51993
|
+
E5.bind(void 0, $2),
|
|
51992
51994
|
/* 0x03 */
|
|
51993
51995
|
E5.bind(void 0, B2),
|
|
51994
51996
|
/* 0x04 */
|
|
51995
|
-
F5.bind(void 0,
|
|
51997
|
+
F5.bind(void 0, $2),
|
|
51996
51998
|
/* 0x05 */
|
|
51997
51999
|
F5.bind(void 0, B2),
|
|
51998
52000
|
/* 0x06 */
|
|
@@ -52085,7 +52087,7 @@ o8 = [
|
|
|
52085
52087
|
/* 0x2F */
|
|
52086
52088
|
B5.bind(void 0, 1),
|
|
52087
52089
|
/* 0x30 */
|
|
52088
|
-
A5.bind(void 0,
|
|
52090
|
+
A5.bind(void 0, $2),
|
|
52089
52091
|
/* 0x31 */
|
|
52090
52092
|
A5.bind(void 0, B2),
|
|
52091
52093
|
/* 0x32 */
|
|
@@ -52357,37 +52359,37 @@ o8 = [
|
|
|
52357
52359
|
/* 0xAF */
|
|
52358
52360
|
void 0,
|
|
52359
52361
|
/* 0xB0 */
|
|
52360
|
-
|
|
52362
|
+
q2.bind(void 0, 1),
|
|
52361
52363
|
/* 0xB1 */
|
|
52362
|
-
|
|
52364
|
+
q2.bind(void 0, 2),
|
|
52363
52365
|
/* 0xB2 */
|
|
52364
|
-
|
|
52366
|
+
q2.bind(void 0, 3),
|
|
52365
52367
|
/* 0xB3 */
|
|
52366
|
-
|
|
52368
|
+
q2.bind(void 0, 4),
|
|
52367
52369
|
/* 0xB4 */
|
|
52368
|
-
|
|
52370
|
+
q2.bind(void 0, 5),
|
|
52369
52371
|
/* 0xB5 */
|
|
52370
|
-
|
|
52372
|
+
q2.bind(void 0, 6),
|
|
52371
52373
|
/* 0xB6 */
|
|
52372
|
-
|
|
52374
|
+
q2.bind(void 0, 7),
|
|
52373
52375
|
/* 0xB7 */
|
|
52374
|
-
|
|
52376
|
+
q2.bind(void 0, 8),
|
|
52375
52377
|
/* 0xB8 */
|
|
52376
|
-
|
|
52378
|
+
G2.bind(void 0, 1),
|
|
52377
52379
|
/* 0xB9 */
|
|
52378
|
-
|
|
52380
|
+
G2.bind(void 0, 2),
|
|
52379
52381
|
/* 0xBA */
|
|
52380
|
-
|
|
52382
|
+
G2.bind(void 0, 3),
|
|
52381
52383
|
/* 0xBB */
|
|
52382
|
-
|
|
52384
|
+
G2.bind(void 0, 4),
|
|
52383
52385
|
/* 0xBC */
|
|
52384
|
-
|
|
52386
|
+
G2.bind(void 0, 5),
|
|
52385
52387
|
/* 0xBD */
|
|
52386
|
-
|
|
52388
|
+
G2.bind(void 0, 6),
|
|
52387
52389
|
/* 0xBE */
|
|
52388
|
-
|
|
52390
|
+
G2.bind(void 0, 7),
|
|
52389
52391
|
/* 0xBF */
|
|
52390
|
-
|
|
52392
|
+
G2.bind(void 0, 8),
|
|
52391
52393
|
/* 0xC0 */
|
|
52392
52394
|
W.bind(void 0, 0, 0, 0, 0, 0),
|
|
52393
52395
|
/* 0xC1 */
|
|
@@ -54308,7 +54310,7 @@ function Cx(r, t, e, a, s, n = !1) {
|
|
|
54308
54310
|
if (H != null) {
|
|
54309
54311
|
const { blockId: X } = H, Q = u[X];
|
|
54310
54312
|
if (Q.layoutType === K1.INLINE) {
|
|
54311
|
-
const { angle:
|
|
54313
|
+
const { angle: g1 } = Q.docTransform, { width: u1 = 0, height: a1 = 0 } = Q.docTransform.size, p1 = Se(g1, 0, u1, 0, a1);
|
|
54312
54314
|
$ = W6(N, p1.width, p1.height, Q.drawingId);
|
|
54313
54315
|
} else
|
|
54314
54316
|
$ = W6(N, 0, 0, Q.drawingId);
|
|
@@ -55429,7 +55431,7 @@ class v3 extends Y8 {
|
|
|
55429
55431
|
const N = O[P], { divides: $, type: H, lineHeight: X = 0 } = N;
|
|
55430
55432
|
if (H !== P3.BLOCK) {
|
|
55431
55433
|
this._findLiquid.translateSave(), this._findLiquid.translateLine(N);
|
|
55432
|
-
const { y: Q } = this._findLiquid,
|
|
55434
|
+
const { y: Q } = this._findLiquid, g1 = Q, u1 = Q + X, a1 = Math.abs(u - u1), i1 = $.length;
|
|
55433
55435
|
for (let h1 = 0; h1 < i1; h1++) {
|
|
55434
55436
|
const p1 = $[h1], { glyphGroup: D1 } = p1;
|
|
55435
55437
|
this._findLiquid.translateSave(), this._findLiquid.translateDivide(p1);
|
|
@@ -55438,21 +55440,21 @@ class v3 extends Y8 {
|
|
|
55438
55440
|
if (!j1.content || j1.content.length === 0)
|
|
55439
55441
|
continue;
|
|
55440
55442
|
const { width: $1, left: y1 } = j1, C1 = m1 + y1, I1 = m1 + y1 + $1, H1 = Math.abs(l - I1);
|
|
55441
|
-
if (u >=
|
|
55443
|
+
if (u >= g1 && u <= u1) {
|
|
55442
55444
|
if (l >= C1 && l <= I1)
|
|
55443
55445
|
return {
|
|
55444
55446
|
node: j1,
|
|
55445
55447
|
segmentPage: a === c1.BODY ? -1 : i,
|
|
55446
55448
|
segmentId: n,
|
|
55447
55449
|
ratioX: l / (C1 + I1),
|
|
55448
|
-
ratioY: u / (
|
|
55450
|
+
ratioY: u / (g1 + u1)
|
|
55449
55451
|
};
|
|
55450
55452
|
B !== Number.NEGATIVE_INFINITY && (o.nearestNodeList = [], o.nearestNodeDistanceList = []), o.nearestNodeList.push({
|
|
55451
55453
|
node: j1,
|
|
55452
55454
|
segmentPage: a === c1.BODY ? -1 : i,
|
|
55453
55455
|
segmentId: n,
|
|
55454
55456
|
ratioX: l / (C1 + I1),
|
|
55455
|
-
ratioY: u / (
|
|
55457
|
+
ratioY: u / (g1 + u1)
|
|
55456
55458
|
}), o.nearestNodeDistanceList.push({
|
|
55457
55459
|
coordInPage: y,
|
|
55458
55460
|
distance: H1,
|
|
@@ -55465,7 +55467,7 @@ class v3 extends Y8 {
|
|
|
55465
55467
|
segmentPage: a === c1.BODY ? -1 : i,
|
|
55466
55468
|
segmentId: n,
|
|
55467
55469
|
ratioX: l / (C1 + I1),
|
|
55468
|
-
ratioY: u / (
|
|
55470
|
+
ratioY: u / (g1 + u1)
|
|
55469
55471
|
}), o.nearestNodeDistanceList.push({
|
|
55470
55472
|
coordInPage: y,
|
|
55471
55473
|
distance: H1,
|
|
@@ -55767,7 +55769,7 @@ function $0(r, t, e = {}) {
|
|
|
55767
55769
|
const a = r.length, {
|
|
55768
55770
|
textRotation: s,
|
|
55769
55771
|
paddingData: n,
|
|
55770
|
-
horizontalAlign: i =
|
|
55772
|
+
horizontalAlign: i = d1.UNSPECIFIED,
|
|
55771
55773
|
verticalAlign: o = k2.UNSPECIFIED,
|
|
55772
55774
|
wrapStrategy: l = T1.UNSPECIFIED,
|
|
55773
55775
|
cellValueType: u
|
|
@@ -56122,10 +56124,10 @@ let Z5 = class extends Z8 {
|
|
|
56122
56124
|
const H = N.getSkeletonData(), {
|
|
56123
56125
|
marginTop: X,
|
|
56124
56126
|
marginBottom: Q,
|
|
56125
|
-
marginLeft:
|
|
56127
|
+
marginLeft: g1,
|
|
56126
56128
|
marginRight: u1
|
|
56127
56129
|
} = H.pages[H.pages.length - 1], a1 = Math.abs(J1(P));
|
|
56128
|
-
$ += X * Math.cos(a1) + u1 * Math.sin(a1) + Q * Math.cos(a1) +
|
|
56130
|
+
$ += X * Math.cos(a1) + u1 * Math.sin(a1) + Q * Math.cos(a1) + g1 * Math.sin(a1);
|
|
56129
56131
|
}
|
|
56130
56132
|
return $;
|
|
56131
56133
|
} else {
|
|
@@ -56282,7 +56284,7 @@ let Z5 = class extends Z8 {
|
|
|
56282
56284
|
var u;
|
|
56283
56285
|
const i = (u = t == null ? void 0 : t.width) != null ? u : 0;
|
|
56284
56286
|
let o = s, l = s;
|
|
56285
|
-
return e ===
|
|
56287
|
+
return e === d1.CENTER ? (o = this._getOverflowBound(a, s, 0, i / 2, e), l = this._getOverflowBound(a, s, n - 1, i / 2, e)) : e === d1.RIGHT ? o = this._getOverflowBound(a, s, 0, i) : l = this._getOverflowBound(a, s, n - 1, i), {
|
|
56286
56288
|
startColumn: o,
|
|
56287
56289
|
endColumn: l
|
|
56288
56290
|
};
|
|
@@ -56411,7 +56413,7 @@ let Z5 = class extends Z8 {
|
|
|
56411
56413
|
const m = V5(i);
|
|
56412
56414
|
l = d3(m).fontCache;
|
|
56413
56415
|
let v = c7(t);
|
|
56414
|
-
t.t ===
|
|
56416
|
+
t.t === N2.FORCE_STRING && s && (v = `'${v}`), o = $0(v, m, {
|
|
56415
56417
|
...u,
|
|
56416
56418
|
textRotation: d,
|
|
56417
56419
|
cellValueType: t.t
|
|
@@ -56435,9 +56437,9 @@ let Z5 = class extends Z8 {
|
|
|
56435
56437
|
*/
|
|
56436
56438
|
// eslint-disable-next-line complexity, max-lines-per-function
|
|
56437
56439
|
_calculateOverflowCell(t, e, a) {
|
|
56438
|
-
const { documentSkeleton: s, vertexAngle: n = 0, centerAngle: i = 0, horizontalAlign: o, wrapStrategy: l } = a, u = this._cellData.getValue(t, e), { t: d =
|
|
56440
|
+
const { documentSkeleton: s, vertexAngle: n = 0, centerAngle: i = 0, horizontalAlign: o, wrapStrategy: l } = a, u = this._cellData.getValue(t, e), { t: d = N2.STRING } = u || {};
|
|
56439
56441
|
let c = o;
|
|
56440
|
-
if (o ===
|
|
56442
|
+
if (o === d1.UNSPECIFIED && (i === Z1 && n === Z1 ? c = d1.CENTER : (n > 0 && n !== Z1 || n === -Z1) && (c = d1.RIGHT)), (l === T1.OVERFLOW || l === T1.UNSPECIFIED) && d !== N2.NUMBER && d !== N2.BOOLEAN && o !== d1.JUSTIFIED) {
|
|
56441
56443
|
if (this.intersectMergeRange(t, e))
|
|
56442
56444
|
return !0;
|
|
56443
56445
|
let g;
|
|
@@ -56609,7 +56611,7 @@ let Z5 = class extends Z8 {
|
|
|
56609
56611
|
vertexAngle: o,
|
|
56610
56612
|
centerAngle: l,
|
|
56611
56613
|
verticalAlign: h != null ? h : k2.UNSPECIFIED,
|
|
56612
|
-
horizontalAlign: p != null ? p :
|
|
56614
|
+
horizontalAlign: p != null ? p : d1.UNSPECIFIED,
|
|
56613
56615
|
wrapStrategy: f != null ? f : T1.OVERFLOW,
|
|
56614
56616
|
imageCacheMap: this._imageCacheMap,
|
|
56615
56617
|
cellData: a,
|
|
@@ -56871,10 +56873,10 @@ class mC extends x3 {
|
|
|
56871
56873
|
break;
|
|
56872
56874
|
}
|
|
56873
56875
|
switch (d) {
|
|
56874
|
-
case
|
|
56876
|
+
case d1.RIGHT:
|
|
56875
56877
|
p = i - g - h;
|
|
56876
56878
|
break;
|
|
56877
|
-
case
|
|
56879
|
+
case d1.CENTER:
|
|
56878
56880
|
p = (s + i) / 2 - g / 2;
|
|
56879
56881
|
break;
|
|
56880
56882
|
default:
|
|
@@ -56925,7 +56927,7 @@ class mC extends x3 {
|
|
|
56925
56927
|
let { startX: d, endX: c, startY: g, endY: h } = e;
|
|
56926
56928
|
const { horizontalAlign: p = 0, vertexAngle: f = 0, centerAngle: m = 0 } = u;
|
|
56927
56929
|
let v = p;
|
|
56928
|
-
p ===
|
|
56930
|
+
p === d1.UNSPECIFIED && (m === Z1 && f === Z1 ? v = d1.CENTER : (f > 0 && f !== Z1 || f === -Z1) && (v = d1.RIGHT));
|
|
56929
56931
|
const y = (S = (C = (x = u == null ? void 0 : u.cellData) == null ? void 0 : x.fontRenderExtension) == null ? void 0 : C.rightOffset) != null ? S : 0, z = (R = (T = (F = u == null ? void 0 : u.cellData) == null ? void 0 : F.fontRenderExtension) == null ? void 0 : T.leftOffset) != null ? R : 0;
|
|
56930
56932
|
let _ = !0;
|
|
56931
56933
|
f === 0 && (d = d + z, c = c - y, (y !== 0 || z !== 0) && (_ = !1));
|
|
@@ -56937,7 +56939,7 @@ class mC extends x3 {
|
|
|
56937
56939
|
g + 1 / o,
|
|
56938
56940
|
j - 2 / o,
|
|
56939
56941
|
w - 2 / o
|
|
56940
|
-
), i.clip()) : v ===
|
|
56942
|
+
), i.clip()) : v === d1.CENTER ? this._clipRectangleForOverflow(
|
|
56941
56943
|
i,
|
|
56942
56944
|
A,
|
|
56943
56945
|
I,
|
|
@@ -56947,7 +56949,7 @@ class mC extends x3 {
|
|
|
56947
56949
|
P,
|
|
56948
56950
|
N,
|
|
56949
56951
|
n
|
|
56950
|
-
) : v ===
|
|
56952
|
+
) : v === d1.RIGHT ? this._clipRectangleForOverflow(
|
|
56951
56953
|
i,
|
|
56952
56954
|
A,
|
|
56953
56955
|
a,
|
|
@@ -56973,33 +56975,34 @@ class mC extends x3 {
|
|
|
56973
56975
|
e.startX = d, e.startY = g, e.endX = c, e.endY = h;
|
|
56974
56976
|
}
|
|
56975
56977
|
_renderText(e, a, s, n, i) {
|
|
56976
|
-
var
|
|
56978
|
+
var F, T, R, B, A, L, I, O, P, N, $, H;
|
|
56977
56979
|
const { fontCache: o } = n;
|
|
56978
56980
|
if (!o) return;
|
|
56979
|
-
const l = (
|
|
56981
|
+
const l = (T = (F = o.style) == null ? void 0 : F.pd) != null ? T : c2, u = (R = l.l) != null ? R : c2.l, d = (B = l.r) != null ? B : c2.r, c = (A = l.t) != null ? A : c2.t, g = (L = l.b) != null ? L : c2.b, { vertexAngle: h = 0, wrapStrategy: p, cellData: f } = o;
|
|
56980
56982
|
if ((f == null ? void 0 : f.v) === void 0 || (f == null ? void 0 : f.v) === null) return;
|
|
56981
56983
|
const m = c7(f);
|
|
56982
56984
|
let { startX: v, startY: y, endX: z, endY: _ } = n, j = z - v - u - d;
|
|
56983
56985
|
const w = _ - y - c - g, x = i.getValue(a, s);
|
|
56984
56986
|
if (!(p === T1.WRAP && h === 0) && x) {
|
|
56985
|
-
const
|
|
56986
|
-
z =
|
|
56987
|
-
const
|
|
56988
|
-
v =
|
|
56987
|
+
const X = x.endColumn, Q = x.startColumn, g1 = x.startRow, u1 = x.endRow, a1 = n.spreadsheetSkeleton.getCellWithCoordByIndex(u1, X);
|
|
56988
|
+
z = a1.endX, _ = a1.endY;
|
|
56989
|
+
const i1 = n.spreadsheetSkeleton.getCellWithCoordByIndex(g1, Q);
|
|
56990
|
+
v = i1.startX, y = i1.startY, j = z - v - u - d;
|
|
56989
56991
|
}
|
|
56990
|
-
|
|
56992
|
+
let S = o.horizontalAlign;
|
|
56993
|
+
o.horizontalAlign === d1.UNSPECIFIED && (f.t === N2.NUMBER ? S = d1.RIGHT : f.t === N2.BOOLEAN && (S = d1.CENTER)), Z4.drawWith(e, {
|
|
56991
56994
|
text: m,
|
|
56992
56995
|
fontStyle: o.fontString,
|
|
56993
56996
|
warp: p === T1.WRAP && h === 0,
|
|
56994
|
-
hAlign:
|
|
56997
|
+
hAlign: S,
|
|
56995
56998
|
vAlign: o.verticalAlign,
|
|
56996
56999
|
width: j,
|
|
56997
57000
|
height: w,
|
|
56998
57001
|
left: u,
|
|
56999
57002
|
top: c,
|
|
57000
|
-
color: (
|
|
57001
|
-
strokeLine: !!((
|
|
57002
|
-
underline: !!((
|
|
57003
|
+
color: (O = (I = o.style) == null ? void 0 : I.cl) == null ? void 0 : O.rgb,
|
|
57004
|
+
strokeLine: !!((N = (P = o.style) == null ? void 0 : P.st) != null && N.s),
|
|
57005
|
+
underline: !!((H = ($ = o.style) == null ? void 0 : $.ul) != null && H.s)
|
|
57003
57006
|
});
|
|
57004
57007
|
}
|
|
57005
57008
|
_renderDocuments(e, a, s, n, i) {
|
|
@@ -58977,7 +58980,7 @@ class PC extends Me {
|
|
|
58977
58980
|
}
|
|
58978
58981
|
}
|
|
58979
58982
|
z0.add(new PC());
|
|
58980
|
-
const
|
|
58983
|
+
const W2 = {
|
|
58981
58984
|
color: {
|
|
58982
58985
|
rgb: "#dee0e3"
|
|
58983
58986
|
}
|
|
@@ -59051,7 +59054,7 @@ class v0 extends y8 {
|
|
|
59051
59054
|
} = _, {
|
|
59052
59055
|
verticalAlign: O = k2.TOP,
|
|
59053
59056
|
// Do not make changes, otherwise the document will not render.
|
|
59054
|
-
horizontalAlign: P =
|
|
59057
|
+
horizontalAlign: P = d1.LEFT,
|
|
59055
59058
|
// Do not make changes, otherwise the document will not render.
|
|
59056
59059
|
centerAngle: N = 0,
|
|
59057
59060
|
vertexAngle: $ = 0,
|
|
@@ -59066,12 +59069,12 @@ class v0 extends y8 {
|
|
|
59066
59069
|
$,
|
|
59067
59070
|
N,
|
|
59068
59071
|
X
|
|
59069
|
-
),
|
|
59072
|
+
), g1 = this._verticalHandler(
|
|
59070
59073
|
T,
|
|
59071
59074
|
w,
|
|
59072
59075
|
x,
|
|
59073
59076
|
O
|
|
59074
|
-
), u1 = U.create(Q,
|
|
59077
|
+
), u1 = U.create(Q, g1), a1 = J1(N), i1 = J1($), h1 = i1 - a1;
|
|
59075
59078
|
if (this.isSkipByDiffBounds(_, g, h, a)) {
|
|
59076
59079
|
const { x: y1, y: C1 } = this._drawLiquid.translatePage(
|
|
59077
59080
|
_,
|
|
@@ -59130,10 +59133,10 @@ class v0 extends y8 {
|
|
|
59130
59133
|
fixOffsetY: i2,
|
|
59131
59134
|
rotateTranslateY: s3
|
|
59132
59135
|
} = R7(H1, R2, i1);
|
|
59133
|
-
let
|
|
59134
|
-
M1 > this.height && H !== T1.WRAP && (H === T1.OVERFLOW || i1 > 0) && (
|
|
59136
|
+
let H2 = L1;
|
|
59137
|
+
M1 > this.height && H !== T1.WRAP && (H === T1.OVERFLOW || i1 > 0) && (H2 = this.height / Math.tan(Math.abs(i1)));
|
|
59135
59138
|
const E3 = this._horizontalHandler(
|
|
59136
|
-
|
|
59139
|
+
H2,
|
|
59137
59140
|
C,
|
|
59138
59141
|
S,
|
|
59139
59142
|
P,
|
|
@@ -59147,9 +59150,9 @@ class v0 extends y8 {
|
|
|
59147
59150
|
O
|
|
59148
59151
|
) - i2;
|
|
59149
59152
|
M1 > this.height && (i1 < 0 ? o2 = this.height - (M1 + i2) : o2 = -i2), q1 = U.create(E3 + n2, o2), this._drawLiquid.translate(0, -s3), s2 = e2;
|
|
59150
|
-
} else H === T1.WRAP && (P !==
|
|
59153
|
+
} else H === T1.WRAP && (P !== d1.UNSPECIFIED || X !== N2.NUMBER) && (q1.x = C);
|
|
59151
59154
|
for (let e2 = 0; e2 < O2; e2++) {
|
|
59152
|
-
const M1 = H1[e2], { divides: L1, asc: n2 = 0, type: i2, lineHeight: s3 = 0 } = M1,
|
|
59155
|
+
const M1 = H1[e2], { divides: L1, asc: n2 = 0, type: i2, lineHeight: s3 = 0 } = M1, H2 = n2, E3 = H2 * Math.sin(a1), X3 = H2 * Math.cos(a1);
|
|
59153
59156
|
if (i2 === P3.BLOCK)
|
|
59154
59157
|
for (const o2 of u)
|
|
59155
59158
|
o2.type === s0.LINE && (o2.extensionOffset = {
|
|
@@ -59327,7 +59330,7 @@ class v0 extends y8 {
|
|
|
59327
59330
|
for (const Q of X) {
|
|
59328
59331
|
if (!Q.content || Q.content.length === 0)
|
|
59329
59332
|
continue;
|
|
59330
|
-
const { width:
|
|
59333
|
+
const { width: g1, left: u1 } = Q, { x: a1, y: i1 } = this._drawLiquid, h1 = U.create(a1, i1), p1 = U.create(g1 / 2, L / 2), m1 = {
|
|
59331
59334
|
spanStartPoint: v2(
|
|
59332
59335
|
h1.addByPoint(u1, 0),
|
|
59333
59336
|
p1,
|
|
@@ -59341,7 +59344,7 @@ class v0 extends y8 {
|
|
|
59341
59344
|
for (const Q of X) {
|
|
59342
59345
|
if (!Q.content || Q.content.length === 0)
|
|
59343
59346
|
continue;
|
|
59344
|
-
const { width:
|
|
59347
|
+
const { width: g1, left: u1, xOffset: a1 } = Q, { x: i1, y: h1 } = this._drawLiquid, p1 = U.create(i1, h1), D1 = U.create(g1 / 2, L / 2), m1 = v2(
|
|
59345
59348
|
p1.addByPoint(u1 + a1, 0),
|
|
59346
59349
|
D1,
|
|
59347
59350
|
u,
|
|
@@ -59381,31 +59384,31 @@ class v0 extends y8 {
|
|
|
59381
59384
|
_drawTableCellBordersAndBg(e, a, s) {
|
|
59382
59385
|
var z, _, j, w;
|
|
59383
59386
|
const { marginLeft: n, marginTop: i } = a, { pageWidth: o, pageHeight: l } = s, u = s.parent, d = u.cells.indexOf(s), c = u.rowSource.tableCells[d], {
|
|
59384
|
-
borderTop: g =
|
|
59385
|
-
borderBottom: h =
|
|
59386
|
-
borderLeft: p =
|
|
59387
|
-
borderRight: f =
|
|
59387
|
+
borderTop: g = W2,
|
|
59388
|
+
borderBottom: h = W2,
|
|
59389
|
+
borderLeft: p = W2,
|
|
59390
|
+
borderRight: f = W2,
|
|
59388
59391
|
backgroundColor: m
|
|
59389
59392
|
} = c;
|
|
59390
59393
|
if (this._drawLiquid == null)
|
|
59391
59394
|
return;
|
|
59392
59395
|
let { x: v, y } = this._drawLiquid;
|
|
59393
|
-
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 :
|
|
59396
|
+
v += n, y += i, m && m.rgb && (e.save(), e.fillStyle = m.rgb, e.fillRectByPrecision(v, y, o, l), e.restore()), e.save(), e.setLineWidthByPrecision(1), e.save(), e.strokeStyle = (z = p.color.rgb) != null ? z : W2.color.rgb, c3(e, K.LEFT, 0, {
|
|
59394
59397
|
startX: v,
|
|
59395
59398
|
startY: y,
|
|
59396
59399
|
endX: v + o,
|
|
59397
59400
|
endY: y + l
|
|
59398
|
-
}), e.restore(), e.save(), e.strokeStyle = (_ = g.color.rgb) != null ? _ :
|
|
59401
|
+
}), e.restore(), e.save(), e.strokeStyle = (_ = g.color.rgb) != null ? _ : W2.color.rgb, c3(e, K.TOP, 0, {
|
|
59399
59402
|
startX: v,
|
|
59400
59403
|
startY: y,
|
|
59401
59404
|
endX: v + o,
|
|
59402
59405
|
endY: y + l
|
|
59403
|
-
}), e.restore(), e.save(), e.strokeStyle = (j = f.color.rgb) != null ? j :
|
|
59406
|
+
}), e.restore(), e.save(), e.strokeStyle = (j = f.color.rgb) != null ? j : W2.color.rgb, c3(e, K.RIGHT, 0, {
|
|
59404
59407
|
startX: v,
|
|
59405
59408
|
startY: y,
|
|
59406
59409
|
endX: v + o,
|
|
59407
59410
|
endY: y + l
|
|
59408
|
-
}), e.restore(), e.save(), e.strokeStyle = (w = h.color.rgb) != null ? w :
|
|
59411
|
+
}), e.restore(), e.save(), e.strokeStyle = (w = h.color.rgb) != null ? w : W2.color.rgb, c3(e, K.BOTTOM, 0, {
|
|
59409
59412
|
startX: v,
|
|
59410
59413
|
startY: y,
|
|
59411
59414
|
endX: v + o,
|
|
@@ -59450,7 +59453,7 @@ class v0 extends y8 {
|
|
|
59450
59453
|
for (const $ of N) {
|
|
59451
59454
|
if (!$.content || $.content.length === 0)
|
|
59452
59455
|
continue;
|
|
59453
|
-
const { width: H, left: X } = $, { x: Q, y:
|
|
59456
|
+
const { width: H, left: X } = $, { x: Q, y: g1 } = this._drawLiquid, u1 = U.create(Q, g1), a1 = U.create(H / 2, T / 2), h1 = {
|
|
59454
59457
|
spanStartPoint: v2(
|
|
59455
59458
|
u1.addByPoint(X, 0),
|
|
59456
59459
|
a1,
|
|
@@ -59464,7 +59467,7 @@ class v0 extends y8 {
|
|
|
59464
59467
|
for (const $ of N) {
|
|
59465
59468
|
if (!$.content || $.content.length === 0)
|
|
59466
59469
|
continue;
|
|
59467
|
-
const { width: H, left: X, xOffset: Q } = $, { x:
|
|
59470
|
+
const { width: H, left: X, xOffset: Q } = $, { x: g1, y: u1 } = this._drawLiquid, a1 = U.create(g1, u1), i1 = U.create(H / 2, T / 2), h1 = v2(
|
|
59468
59471
|
a1.addByPoint(X + Q, 0),
|
|
59469
59472
|
i1,
|
|
59470
59473
|
l,
|
|
@@ -59501,9 +59504,9 @@ class v0 extends y8 {
|
|
|
59501
59504
|
}
|
|
59502
59505
|
}
|
|
59503
59506
|
_horizontalHandler(e, a, s, n, i = 0, o = 0, l) {
|
|
59504
|
-
n ===
|
|
59507
|
+
n === d1.UNSPECIFIED && (o === Z1 && i === Z1 ? n = d1.CENTER : i > 0 && i !== Z1 || i === -Z1 ? n = d1.RIGHT : l === N2.NUMBER ? n = d1.RIGHT : l === N2.BOOLEAN ? n = d1.CENTER : n = d1.LEFT);
|
|
59505
59508
|
let u = 0;
|
|
59506
|
-
return n ===
|
|
59509
|
+
return n === d1.CENTER ? u = (this.width - e) / 2 : n === d1.RIGHT ? u = this.width - e - s : u = a, u;
|
|
59507
59510
|
}
|
|
59508
59511
|
_verticalHandler(e, a, s, n) {
|
|
59509
59512
|
let i = 0;
|
|
@@ -61723,7 +61726,7 @@ class DE extends D2 {
|
|
|
61723
61726
|
}
|
|
61724
61727
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
61725
61728
|
_getConfig(e) {
|
|
61726
|
-
var O, P, N, $, H, X, Q,
|
|
61729
|
+
var O, P, N, $, H, X, Q, g1, u1, a1, i1, h1, p1, D1, m1, j1, $1, y1, C1, I1, H1, R2, O2, q1, s2, e2, M1, L1, n2;
|
|
61727
61730
|
const a = e.transformerConfig;
|
|
61728
61731
|
let {
|
|
61729
61732
|
isCropper: s,
|
|
@@ -61756,7 +61759,7 @@ class DE extends D2 {
|
|
|
61756
61759
|
useSingleNodeRotation: L,
|
|
61757
61760
|
shouldOverdrawWholeArea: I
|
|
61758
61761
|
} = this;
|
|
61759
|
-
return a != null && (s = (O = a.isCropper) != null ? O : s, n = (P = a.hoverEnabled) != null ? P : n, i = (N = a.hoverEnterFunc) != null ? N : i, o = ($ = a.hoverLeaveFunc) != null ? $ : o, l = (H = a.resizeEnabled) != null ? H : l, u = (X = a.rotateEnabled) != null ? X : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (
|
|
61762
|
+
return a != null && (s = (O = a.isCropper) != null ? O : s, n = (P = a.hoverEnabled) != null ? P : n, i = (N = a.hoverEnterFunc) != null ? N : i, o = ($ = a.hoverLeaveFunc) != null ? $ : o, l = (H = a.resizeEnabled) != null ? H : l, u = (X = a.rotateEnabled) != null ? X : u, d = (Q = a.rotationSnaps) != null ? Q : d, c = (g1 = a.rotationSnapTolerance) != null ? g1 : c, g = (u1 = a.rotateAnchorOffset) != null ? u1 : g, h = (a1 = a.rotateSize) != null ? a1 : h, p = (i1 = a.rotateCornerRadius) != null ? i1 : p, f = (h1 = a.borderEnabled) != null ? h1 : f, m = (p1 = a.borderStroke) != null ? p1 : m, v = (D1 = a.borderStrokeWidth) != null ? D1 : v, y = (m1 = a.borderDash) != null ? m1 : y, z = (j1 = a.borderSpacing) != null ? j1 : z, _ = ($1 = a.anchorFill) != null ? $1 : _, j = (y1 = a.anchorStroke) != null ? y1 : j, w = (C1 = a.anchorStrokeWidth) != null ? C1 : w, x = (I1 = a.anchorSize) != null ? I1 : x, C = (H1 = a.anchorCornerRadius) != null ? H1 : C, S = (R2 = a.keepRatio) != null ? R2 : S, F = (O2 = a.centeredScaling) != null ? O2 : F, T = (q1 = a.enabledAnchors) != null ? q1 : T, R = (s2 = a.flipEnabled) != null ? s2 : R, B = (e2 = a.ignoreStroke) != null ? e2 : B, A = (M1 = a.boundBoxFunc) != null ? M1 : A, L = (L1 = a.useSingleNodeRotation) != null ? L1 : L, I = (n2 = a.shouldOverdrawWholeArea) != null ? n2 : I), {
|
|
61760
61763
|
isCropper: s,
|
|
61761
61764
|
hoverEnabled: n,
|
|
61762
61765
|
hoverEnterFunc: i,
|