ooxml-core 1.41.0 → 1.42.0
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/README.md +4 -0
- package/dist/PptxHandler-73QIJ6SD.cjs +14 -0
- package/dist/{PptxHandler-3AGIITR7.mjs → PptxHandler-A2J4PCOB.mjs} +2 -2
- package/dist/PptxHandler-OGLVLX2T.mjs +5 -0
- package/dist/{PresentationBuilder-MZBKYOYD.cjs → PresentationBuilder-6S5PJXXF.cjs} +6 -6
- package/dist/{PresentationBuilder-JNID4B4Z.mjs → PresentationBuilder-APJKCMVS.mjs} +2 -2
- package/dist/{PresentationBuilder-5DPKFUXP.mjs → PresentationBuilder-F3BWDERK.mjs} +3 -3
- package/dist/automation/index.cjs +75 -89
- package/dist/automation/index.mjs +75 -89
- package/dist/chart/index.cjs +5 -5
- package/dist/chart/index.mjs +5 -5
- package/dist/{chunk-LRBWCRQ3.cjs → chunk-3J6VIKLP.cjs} +3 -3
- package/dist/chunk-CODMW5KF.cjs +110 -0
- package/dist/{chunk-KKVD3R6O.mjs → chunk-CPSTCCRD.mjs} +4 -4
- package/dist/{chunk-P3WAKBVS.mjs → chunk-IPV3J3I5.mjs} +82 -90
- package/dist/{chunk-6LGRRQ3K.mjs → chunk-MXA67O7R.mjs} +1 -1
- package/dist/{chunk-JXR6YWBW.mjs → chunk-N6X5CJZP.mjs} +125 -126
- package/dist/chunk-O3YGBYGZ.mjs +104 -0
- package/dist/{chunk-75KBNUKS.cjs → chunk-QZPOPUI5.cjs} +82 -89
- package/dist/{chunk-UE23HF2N.mjs → chunk-VKFKEVHK.mjs} +1 -1
- package/dist/{chunk-DD7COXWR.mjs → chunk-VV724DWE.mjs} +19 -7
- package/dist/{chunk-HTELXT2N.mjs → chunk-XVB3CBNM.mjs} +19 -6
- package/dist/{chunk-3BIFRTU4.cjs → chunk-YNQRXFTC.cjs} +1283 -1270
- package/dist/{chunk-ZYCBJKAE.mjs → chunk-ZUEN4RQG.mjs} +1 -1
- package/dist/diagram/index.cjs +499 -370
- package/dist/diagram/index.d.ts +1 -0
- package/dist/diagram/index.d.ts.map +1 -1
- package/dist/diagram/index.mjs +495 -371
- package/dist/docx/embedded.cjs +67 -89
- package/dist/docx/embedded.mjs +67 -89
- package/dist/docx/index.cjs +118 -106
- package/dist/docx/index.mjs +118 -106
- package/dist/docx/layout/index.cjs +118 -106
- package/dist/docx/layout/index.mjs +118 -106
- package/dist/docx/load/index.cjs +67 -89
- package/dist/docx/load/index.mjs +67 -89
- package/dist/docx/shape-svg.d.ts.map +1 -1
- package/dist/docx/ui/index.cjs +72 -94
- package/dist/docx/ui/index.mjs +72 -94
- package/dist/drawingml/dash-pattern.d.ts +61 -0
- package/dist/drawingml/dash-pattern.d.ts.map +1 -0
- package/dist/drawingml/index.cjs +249 -43
- package/dist/drawingml/index.d.ts +3 -0
- package/dist/drawingml/index.d.ts.map +1 -1
- package/dist/drawingml/index.mjs +241 -44
- package/dist/drawingml/rect-path-gradient.d.ts +5 -0
- package/dist/drawingml/rect-path-gradient.d.ts.map +1 -1
- package/dist/drawingml/shape-path-gradient.d.ts +57 -0
- package/dist/drawingml/shape-path-gradient.d.ts.map +1 -0
- package/dist/geometry/index.cjs +68 -90
- package/dist/geometry/index.mjs +68 -90
- package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts +2 -2
- package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts.map +1 -1
- package/dist/geometry/preset-shape-definitions-exact-arrows.d.ts.map +1 -1
- package/dist/geometry/preset-shape-definitions-exact-scrolls.d.ts.map +1 -1
- package/dist/index.cjs +686 -489
- package/dist/index.mjs +686 -489
- package/dist/pptx/automation/index.cjs +355 -191
- package/dist/pptx/automation/index.d.ts +11 -17
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +156 -71
- package/dist/pptx/chunks/{elements-6BMEOo7i.d.ts → elements-PBugbKtv.d.ts} +3 -873
- package/dist/pptx/chunks/elements-PBugbKtv.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BbXLv6As.d.ts → index-BJuR8GLL.d.ts} +4 -4
- package/dist/pptx/chunks/{index-BbXLv6As.d.ts.map → index-BJuR8GLL.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DvN0TkJJ.d.ts → index-Rbvl2WaM.d.ts} +14 -10
- package/dist/pptx/chunks/index-Rbvl2WaM.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Dija_Wth.d.ts → index-xoJGYTgQ.d.ts} +5 -3
- package/dist/pptx/chunks/index-xoJGYTgQ.d.ts.map +1 -0
- package/dist/pptx/chunks/table-C7ITXL3Y.d.ts +875 -0
- package/dist/pptx/chunks/table-C7ITXL3Y.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-DorONr3h.d.ts → text-operations-BNJr7aGa.d.ts} +3 -2
- package/dist/pptx/chunks/text-operations-BNJr7aGa.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +169 -96
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +69 -91
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +5 -5
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/editor/render/table-layout.cjs +6 -6
- package/dist/pptx/editor/render/table-layout.d.ts +8 -37
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.mjs +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +214 -129
- package/dist/pptx/index.d.ts +6 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/teams/index.cjs +136 -91
- package/dist/teams/index.mjs +136 -91
- package/dist/text/font-metrics/design-advances.generated.d.ts +3 -1
- package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -1
- package/dist/text/index.cjs +8 -0
- package/dist/text/index.mjs +8 -0
- package/dist/visio/index.cjs +8 -0
- package/dist/visio/index.mjs +8 -0
- package/dist/visio/ui/index.cjs +8 -0
- package/dist/visio/ui/index.mjs +8 -0
- package/dist/xlsx/collab/index.cjs +67 -89
- package/dist/xlsx/collab/index.mjs +67 -89
- package/dist/xlsx/index.cjs +116 -108
- package/dist/xlsx/index.mjs +116 -108
- package/dist/xlsx/layout/shape-paint.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +67 -89
- package/dist/xlsx/load/index.mjs +67 -89
- package/dist/xlsx/ui/index.cjs +72 -94
- package/dist/xlsx/ui/index.mjs +72 -94
- package/package.json +1 -1
- package/dist/PptxHandler-EL4E4SPH.mjs +0 -5
- package/dist/PptxHandler-OIZ3R3DJ.cjs +0 -14
- package/dist/chunk-3IT6ZD7K.mjs +0 -213
- package/dist/chunk-FRUB573B.cjs +0 -219
- package/dist/pptx/chunks/elements-6BMEOo7i.d.ts.map +0 -1
- package/dist/pptx/chunks/index-Dija_Wth.d.ts.map +0 -1
- package/dist/pptx/chunks/index-DvN0TkJJ.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-DorONr3h.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1121,46 +1121,46 @@ __export(chart_exports, {
|
|
|
1121
1121
|
|
|
1122
1122
|
// chart/regression.ts
|
|
1123
1123
|
function computeLinearRegression(xVals, yVals) {
|
|
1124
|
-
const
|
|
1125
|
-
if (
|
|
1124
|
+
const n3 = xVals.length;
|
|
1125
|
+
if (n3 < 2) {
|
|
1126
1126
|
return { slope: 0, intercept: 0, rSquared: 0 };
|
|
1127
1127
|
}
|
|
1128
1128
|
let sumX = 0;
|
|
1129
1129
|
let sumY = 0;
|
|
1130
1130
|
let sumXY = 0;
|
|
1131
1131
|
let sumXX = 0;
|
|
1132
|
-
for (let i2 = 0; i2 <
|
|
1132
|
+
for (let i2 = 0; i2 < n3; i2++) {
|
|
1133
1133
|
sumX += xVals[i2];
|
|
1134
1134
|
sumY += yVals[i2];
|
|
1135
1135
|
sumXY += xVals[i2] * yVals[i2];
|
|
1136
1136
|
sumXX += xVals[i2] * xVals[i2];
|
|
1137
1137
|
}
|
|
1138
|
-
const denom =
|
|
1138
|
+
const denom = n3 * sumXX - sumX * sumX;
|
|
1139
1139
|
if (Math.abs(denom) < 1e-12) {
|
|
1140
|
-
return { slope: 0, intercept: sumY /
|
|
1140
|
+
return { slope: 0, intercept: sumY / n3, rSquared: 0 };
|
|
1141
1141
|
}
|
|
1142
|
-
const slope = (
|
|
1143
|
-
const intercept = (sumY - slope * sumX) /
|
|
1142
|
+
const slope = (n3 * sumXY - sumX * sumY) / denom;
|
|
1143
|
+
const intercept = (sumY - slope * sumX) / n3;
|
|
1144
1144
|
const ssRes = yVals.reduce((s2, y, i2) => s2 + (y - (slope * xVals[i2] + intercept)) ** 2, 0);
|
|
1145
|
-
const meanY = sumY /
|
|
1145
|
+
const meanY = sumY / n3;
|
|
1146
1146
|
const ssTot = yVals.reduce((s2, y) => s2 + (y - meanY) ** 2, 0);
|
|
1147
1147
|
const rSquared = ssTot > 0 ? 1 - ssRes / ssTot : 0;
|
|
1148
1148
|
return { slope, intercept, rSquared };
|
|
1149
1149
|
}
|
|
1150
1150
|
function fitPolynomial(xVals, yVals, order) {
|
|
1151
|
-
const
|
|
1151
|
+
const n3 = xVals.length;
|
|
1152
1152
|
const m = order + 1;
|
|
1153
1153
|
const matrix2 = Array.from({ length: m }, () => Array(m + 1).fill(0));
|
|
1154
1154
|
for (let i2 = 0; i2 < m; i2++) {
|
|
1155
1155
|
for (let j = 0; j < m; j++) {
|
|
1156
1156
|
let sum2 = 0;
|
|
1157
|
-
for (let k = 0; k <
|
|
1157
|
+
for (let k = 0; k < n3; k++) {
|
|
1158
1158
|
sum2 += xVals[k] ** (i2 + j);
|
|
1159
1159
|
}
|
|
1160
1160
|
matrix2[i2][j] = sum2;
|
|
1161
1161
|
}
|
|
1162
1162
|
let sum = 0;
|
|
1163
|
-
for (let k = 0; k <
|
|
1163
|
+
for (let k = 0; k < n3; k++) {
|
|
1164
1164
|
sum += yVals[k] * xVals[k] ** i2;
|
|
1165
1165
|
}
|
|
1166
1166
|
matrix2[i2][m] = sum;
|
|
@@ -1193,14 +1193,14 @@ function fitPolynomial(xVals, yVals, order) {
|
|
|
1193
1193
|
return matrix2.map((row2) => row2[m]);
|
|
1194
1194
|
}
|
|
1195
1195
|
function computeRSquared(xVals, yVals, evalFn) {
|
|
1196
|
-
const
|
|
1197
|
-
if (
|
|
1196
|
+
const n3 = xVals.length;
|
|
1197
|
+
if (n3 === 0) {
|
|
1198
1198
|
return 0;
|
|
1199
1199
|
}
|
|
1200
|
-
const meanY = yVals.reduce((s2, y) => s2 + y, 0) /
|
|
1200
|
+
const meanY = yVals.reduce((s2, y) => s2 + y, 0) / n3;
|
|
1201
1201
|
let ssRes = 0;
|
|
1202
1202
|
let ssTot = 0;
|
|
1203
|
-
for (let i2 = 0; i2 <
|
|
1203
|
+
for (let i2 = 0; i2 < n3; i2++) {
|
|
1204
1204
|
ssRes += (yVals[i2] - evalFn(xVals[i2])) ** 2;
|
|
1205
1205
|
ssTot += (yVals[i2] - meanY) ** 2;
|
|
1206
1206
|
}
|
|
@@ -2172,8 +2172,8 @@ function chartStylePresetOfColors(seriesColors) {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
|
|
2174
2174
|
// chart/quick-layouts.ts
|
|
2175
|
-
var L = (
|
|
2176
|
-
n:
|
|
2175
|
+
var L = (n3, flags, gapWidth, overlap) => ({
|
|
2176
|
+
n: n3,
|
|
2177
2177
|
title: false,
|
|
2178
2178
|
legend: null,
|
|
2179
2179
|
dataLabels: false,
|
|
@@ -2216,8 +2216,8 @@ var CHART_QUICK_LAYOUTS = [
|
|
|
2216
2216
|
L(10, { title: true, legend: "r", majorGridlines: true }, 75, 40),
|
|
2217
2217
|
L(11, { legend: "r", majorGridlines: true }, 150, 0)
|
|
2218
2218
|
];
|
|
2219
|
-
function findChartQuickLayout(
|
|
2220
|
-
return CHART_QUICK_LAYOUTS.find((layout) => layout.n ===
|
|
2219
|
+
function findChartQuickLayout(n3) {
|
|
2220
|
+
return CHART_QUICK_LAYOUTS.find((layout) => layout.n === n3);
|
|
2221
2221
|
}
|
|
2222
2222
|
var CHART_QUICK_LAYOUT_AXIS_TITLE = "Axis Title";
|
|
2223
2223
|
|
|
@@ -2518,8 +2518,8 @@ function chartErrorBarAmount(options2, values, displayIndex, sourceIndex, side)
|
|
|
2518
2518
|
|
|
2519
2519
|
// chart/radar-geometry.ts
|
|
2520
2520
|
function radarAngle(index, catCount) {
|
|
2521
|
-
const
|
|
2522
|
-
return Math.PI * 2 * index /
|
|
2521
|
+
const n3 = Math.max(catCount, 1);
|
|
2522
|
+
return Math.PI * 2 * index / n3 - Math.PI / 2;
|
|
2523
2523
|
}
|
|
2524
2524
|
function computeRadarPoints(values, maxVal, radius, cx, cy, catCount) {
|
|
2525
2525
|
const denom = maxVal > 0 ? maxVal : 1;
|
|
@@ -2529,9 +2529,9 @@ function computeRadarPoints(values, maxVal, radius, cx, cy, catCount) {
|
|
|
2529
2529
|
});
|
|
2530
2530
|
}
|
|
2531
2531
|
function radarRingPoints(cx, cy, rr, catCount) {
|
|
2532
|
-
const
|
|
2533
|
-
return Array.from({ length:
|
|
2534
|
-
const angle = radarAngle(i2,
|
|
2532
|
+
const n3 = Math.max(catCount, 1);
|
|
2533
|
+
return Array.from({ length: n3 }, (_, i2) => {
|
|
2534
|
+
const angle = radarAngle(i2, n3);
|
|
2535
2535
|
return `${(cx + rr * Math.cos(angle)).toFixed(2)},${(cy + rr * Math.sin(angle)).toFixed(2)}`;
|
|
2536
2536
|
}).join(" ");
|
|
2537
2537
|
}
|
|
@@ -2860,8 +2860,8 @@ var isLowSurrogate = (text3, at2) => {
|
|
|
2860
2860
|
const code = text3.charCodeAt(at2);
|
|
2861
2861
|
return code >= 56320 && code <= 57343;
|
|
2862
2862
|
};
|
|
2863
|
-
function shortestEdit(
|
|
2864
|
-
const max = Math.min(
|
|
2863
|
+
function shortestEdit(n3, m, same5, maxEdits) {
|
|
2864
|
+
const max = Math.min(n3 + m, maxEdits);
|
|
2865
2865
|
const offset = max + 1;
|
|
2866
2866
|
const v = new Int32Array(2 * max + 3);
|
|
2867
2867
|
const trace = [];
|
|
@@ -2870,20 +2870,20 @@ function shortestEdit(n2, m, same5, maxEdits) {
|
|
|
2870
2870
|
const down = k === -d || k !== d && v[offset + k - 1] < v[offset + k + 1];
|
|
2871
2871
|
let x = down ? v[offset + k + 1] : v[offset + k - 1] + 1;
|
|
2872
2872
|
let y = x - k;
|
|
2873
|
-
while (x <
|
|
2873
|
+
while (x < n3 && y < m && same5(x, y)) {
|
|
2874
2874
|
x++;
|
|
2875
2875
|
y++;
|
|
2876
2876
|
}
|
|
2877
2877
|
v[offset + k] = x;
|
|
2878
|
-
if (x >=
|
|
2878
|
+
if (x >= n3 && y >= m) return backtrack(trace, n3, m, d);
|
|
2879
2879
|
}
|
|
2880
2880
|
trace.push(v.slice(offset - d, offset + d + 1));
|
|
2881
2881
|
}
|
|
2882
2882
|
return void 0;
|
|
2883
2883
|
}
|
|
2884
|
-
function backtrack(trace,
|
|
2884
|
+
function backtrack(trace, n3, m, d) {
|
|
2885
2885
|
const edits = [];
|
|
2886
|
-
let x =
|
|
2886
|
+
let x = n3;
|
|
2887
2887
|
let y = m;
|
|
2888
2888
|
for (let step = d; step > 0; step--) {
|
|
2889
2889
|
const previous = trace[step - 1];
|
|
@@ -3335,15 +3335,15 @@ function* topLevelNodes(xml2, namespaces) {
|
|
|
3335
3335
|
const level4 = root.childNodes;
|
|
3336
3336
|
const stack = [root];
|
|
3337
3337
|
let top = root;
|
|
3338
|
-
const
|
|
3338
|
+
const n3 = source2.length;
|
|
3339
3339
|
let pos = 0;
|
|
3340
|
-
while (pos <
|
|
3340
|
+
while (pos < n3) {
|
|
3341
3341
|
if (level4.length && stack.length === 1) {
|
|
3342
3342
|
yield* level4;
|
|
3343
3343
|
level4.length = 0;
|
|
3344
3344
|
}
|
|
3345
3345
|
const lt = source2.indexOf("<", pos);
|
|
3346
|
-
const end = lt < 0 ?
|
|
3346
|
+
const end = lt < 0 ? n3 : lt;
|
|
3347
3347
|
if (end > pos) {
|
|
3348
3348
|
const text3 = decode(source2.slice(pos, end));
|
|
3349
3349
|
if (text3 === void 0) return false;
|
|
@@ -3399,10 +3399,10 @@ function skipCommentOrCdata(source2, lt, parent) {
|
|
|
3399
3399
|
return -1;
|
|
3400
3400
|
}
|
|
3401
3401
|
function startTag(source2, from, namespaces) {
|
|
3402
|
-
const
|
|
3402
|
+
const n3 = source2.length;
|
|
3403
3403
|
let i2 = from;
|
|
3404
3404
|
let colon = -1;
|
|
3405
|
-
while (i2 <
|
|
3405
|
+
while (i2 < n3) {
|
|
3406
3406
|
const code = source2.charCodeAt(i2);
|
|
3407
3407
|
if (isSpace(code) || code === 62 || code === 47) break;
|
|
3408
3408
|
if (code === 58) {
|
|
@@ -3422,8 +3422,8 @@ function startTag(source2, from, namespaces) {
|
|
|
3422
3422
|
ns || null
|
|
3423
3423
|
);
|
|
3424
3424
|
for (; ; ) {
|
|
3425
|
-
while (i2 <
|
|
3426
|
-
if (i2 >=
|
|
3425
|
+
while (i2 < n3 && isSpace(source2.charCodeAt(i2))) i2++;
|
|
3426
|
+
if (i2 >= n3) return void 0;
|
|
3427
3427
|
const code = source2.charCodeAt(i2);
|
|
3428
3428
|
if (code === 62) return { element: element4, selfClosing: false, end: i2 + 1 };
|
|
3429
3429
|
if (code === 47) {
|
|
@@ -3437,7 +3437,7 @@ function startTag(source2, from, namespaces) {
|
|
|
3437
3437
|
const attrPrefix = name2.includes(":") ? name2.slice(0, name2.indexOf(":")) : "";
|
|
3438
3438
|
if (attrPrefix && attrPrefix !== "xml" && !namespaces[attrPrefix]) return void 0;
|
|
3439
3439
|
let q = eq + 1;
|
|
3440
|
-
while (q <
|
|
3440
|
+
while (q < n3 && isSpace(source2.charCodeAt(q))) q++;
|
|
3441
3441
|
const quote = source2[q];
|
|
3442
3442
|
if (quote !== '"' && quote !== "'") return void 0;
|
|
3443
3443
|
const close = source2.indexOf(quote, q + 1);
|
|
@@ -3449,7 +3449,7 @@ function startTag(source2, from, namespaces) {
|
|
|
3449
3449
|
element4.attrs.push(name2, value);
|
|
3450
3450
|
i2 = close + 1;
|
|
3451
3451
|
const after = source2.charCodeAt(i2);
|
|
3452
|
-
if (i2 <
|
|
3452
|
+
if (i2 < n3 && !isSpace(after) && after !== 62 && after !== 47) return void 0;
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
3455
3455
|
var compiler = xpath__namespace;
|
|
@@ -3506,7 +3506,7 @@ function descendants(root, local) {
|
|
|
3506
3506
|
function orderedColorTransforms(channels, transforms) {
|
|
3507
3507
|
let { r, g: g3, b } = channels;
|
|
3508
3508
|
let alpha = 1;
|
|
3509
|
-
const
|
|
3509
|
+
const wrap3 = (value) => (value % 360 + 360) % 360;
|
|
3510
3510
|
for (const transform6 of transforms) {
|
|
3511
3511
|
const { name: name2, value } = transform6;
|
|
3512
3512
|
const fraction2 = parseDrawingFraction(value);
|
|
@@ -3524,14 +3524,14 @@ function orderedColorTransforms(channels, transforms) {
|
|
|
3524
3524
|
[r, g3, b] = [mix(r), mix(g3), mix(b)];
|
|
3525
3525
|
} else {
|
|
3526
3526
|
const hsl = rgbToHsl(r, g3, b);
|
|
3527
|
-
if (name2 === "comp") hsl.h =
|
|
3527
|
+
if (name2 === "comp") hsl.h = wrap3(hsl.h + 180);
|
|
3528
3528
|
else if (name2 === "hue") {
|
|
3529
3529
|
const hue = parseDrawingHueDegrees(value);
|
|
3530
|
-
if (hue !== void 0) hsl.h =
|
|
3530
|
+
if (hue !== void 0) hsl.h = wrap3(hue);
|
|
3531
3531
|
} else if (name2 === "hueOff") {
|
|
3532
3532
|
const hue = parseDrawingHueDegrees(value);
|
|
3533
|
-
if (hue !== void 0) hsl.h =
|
|
3534
|
-
} else if (name2 === "hueMod" && fraction2 !== void 0) hsl.h =
|
|
3533
|
+
if (hue !== void 0) hsl.h = wrap3(hsl.h + hue);
|
|
3534
|
+
} else if (name2 === "hueMod" && fraction2 !== void 0) hsl.h = wrap3(hsl.h * fraction2);
|
|
3535
3535
|
else if (name2 === "sat" && fraction2 !== void 0) hsl.s = clampUnitInterval(fraction2);
|
|
3536
3536
|
else if (name2 === "satMod" && fraction2 !== void 0) hsl.s *= fraction2;
|
|
3537
3537
|
else if (name2 === "satOff" && fraction2 !== void 0)
|
|
@@ -3689,13 +3689,13 @@ function resolveDrawingColor(color2, theme, options2) {
|
|
|
3689
3689
|
}
|
|
3690
3690
|
if (["hue", "hueMod", "hueOff", "sat", "satMod", "satOff", "lum", "lumMod", "lumOff"].some(has)) {
|
|
3691
3691
|
const hsl = rgbToHsl(r, g3, b);
|
|
3692
|
-
const
|
|
3692
|
+
const wrap3 = (degrees) => (degrees % 360 + 360) % 360;
|
|
3693
3693
|
const hueAbs = parseDrawingHueDegrees(find("hue"));
|
|
3694
|
-
if (hueAbs !== void 0) hsl.h =
|
|
3694
|
+
if (hueAbs !== void 0) hsl.h = wrap3(hueAbs);
|
|
3695
3695
|
const hueMod = parseDrawingFraction(find("hueMod"));
|
|
3696
|
-
if (hueMod !== void 0) hsl.h =
|
|
3696
|
+
if (hueMod !== void 0) hsl.h = wrap3(hsl.h * hueMod);
|
|
3697
3697
|
const hueOff = parseDrawingHueDegrees(find("hueOff"));
|
|
3698
|
-
if (hueOff !== void 0) hsl.h =
|
|
3698
|
+
if (hueOff !== void 0) hsl.h = wrap3(hsl.h + hueOff);
|
|
3699
3699
|
const satAbs = parseDrawingFraction(find("sat"));
|
|
3700
3700
|
if (satAbs !== void 0) hsl.s = clampUnitInterval(satAbs);
|
|
3701
3701
|
const satMod = parseDrawingFraction(find("satMod"));
|
|
@@ -3772,12 +3772,12 @@ var CHART_COLOR_PALETTES = [
|
|
|
3772
3772
|
function findChartColorPalette(id) {
|
|
3773
3773
|
return CHART_COLOR_PALETTES.find((palette) => palette.id === id);
|
|
3774
3774
|
}
|
|
3775
|
-
function withinLinearTransform(i2,
|
|
3776
|
-
if (
|
|
3775
|
+
function withinLinearTransform(i2, n3) {
|
|
3776
|
+
if (n3 <= 1) {
|
|
3777
3777
|
return {};
|
|
3778
3778
|
}
|
|
3779
|
-
const step = 140 / (
|
|
3780
|
-
const centre = (
|
|
3779
|
+
const step = 140 / (n3 + 1);
|
|
3780
|
+
const centre = (n3 - 1) / 2;
|
|
3781
3781
|
const value = 100 - step * Math.abs(i2 - centre);
|
|
3782
3782
|
if (i2 < centre) {
|
|
3783
3783
|
return { shade: Math.floor(value + 1e-9) * 1e3 };
|
|
@@ -3787,7 +3787,7 @@ function withinLinearTransform(i2, n2) {
|
|
|
3787
3787
|
}
|
|
3788
3788
|
return {};
|
|
3789
3789
|
}
|
|
3790
|
-
function chartPaletteSeriesColorChoice(palette, i2,
|
|
3790
|
+
function chartPaletteSeriesColorChoice(palette, i2, n3) {
|
|
3791
3791
|
let base;
|
|
3792
3792
|
let transform6;
|
|
3793
3793
|
if (palette.meth === "cycle") {
|
|
@@ -3795,9 +3795,9 @@ function chartPaletteSeriesColorChoice(palette, i2, n2) {
|
|
|
3795
3795
|
const round3 = Math.floor(i2 / palette.base.length);
|
|
3796
3796
|
transform6 = (palette.variations.length ? palette.variations[round3 % palette.variations.length] : {}) ?? {};
|
|
3797
3797
|
} else {
|
|
3798
|
-
const index = palette.meth === "withinLinearReversed" ?
|
|
3798
|
+
const index = palette.meth === "withinLinearReversed" ? n3 - 1 - i2 : i2;
|
|
3799
3799
|
base = palette.base[0];
|
|
3800
|
-
transform6 = withinLinearTransform(index,
|
|
3800
|
+
transform6 = withinLinearTransform(index, n3);
|
|
3801
3801
|
}
|
|
3802
3802
|
if (!base) throw new RangeError("A chart palette must have a base color");
|
|
3803
3803
|
return {
|
|
@@ -3806,12 +3806,12 @@ function chartPaletteSeriesColorChoice(palette, i2, n2) {
|
|
|
3806
3806
|
transforms: Object.entries(transform6).map(([name2, value]) => ({ name: name2, value: String(value) }))
|
|
3807
3807
|
};
|
|
3808
3808
|
}
|
|
3809
|
-
function chartPaletteSeriesColor(palette, i2,
|
|
3810
|
-
const choice = chartPaletteSeriesColorChoice(palette, i2,
|
|
3809
|
+
function chartPaletteSeriesColor(palette, i2, n3, scheme2) {
|
|
3810
|
+
const choice = chartPaletteSeriesColorChoice(palette, i2, n3);
|
|
3811
3811
|
return (resolveDrawingColor(choice, { scheme: (name2) => scheme2[name2] })?.hex ?? scheme2[choice.value]).toUpperCase();
|
|
3812
3812
|
}
|
|
3813
|
-
function chartPaletteColors(palette,
|
|
3814
|
-
return Array.from({ length:
|
|
3813
|
+
function chartPaletteColors(palette, n3, scheme2) {
|
|
3814
|
+
return Array.from({ length: n3 }, (_, i2) => chartPaletteSeriesColor(palette, i2, n3, scheme2));
|
|
3815
3815
|
}
|
|
3816
3816
|
|
|
3817
3817
|
// chart/color-style.ts
|
|
@@ -3988,12 +3988,12 @@ function parseArtisticPictureExtension(node) {
|
|
|
3988
3988
|
const key = ARTISTIC_PRIMARY_ATTRIBUTE[effect.localName];
|
|
3989
3989
|
if (!key) return void 0;
|
|
3990
3990
|
const raw2 = key ? effect.getAttribute(key) : null;
|
|
3991
|
-
const
|
|
3992
|
-
if (!Number.isFinite(
|
|
3991
|
+
const n3 = raw2 === null ? 0 : Number(raw2);
|
|
3992
|
+
if (!Number.isFinite(n3)) return void 0;
|
|
3993
3993
|
return {
|
|
3994
3994
|
kind: "artistic",
|
|
3995
3995
|
name: effect.localName,
|
|
3996
|
-
radius: effect.localName === "artisticBlur" ?
|
|
3996
|
+
radius: effect.localName === "artisticBlur" ? n3 : n3 / 1e3,
|
|
3997
3997
|
baked: true,
|
|
3998
3998
|
...unhandled.length ? { unhandled } : {}
|
|
3999
3999
|
};
|
|
@@ -4105,10 +4105,10 @@ function parseStandardPictureEffect(node) {
|
|
|
4105
4105
|
const raw2 = node.getAttribute(attribute2);
|
|
4106
4106
|
if (raw2 === null) continue;
|
|
4107
4107
|
const percent = raw2.endsWith("%");
|
|
4108
|
-
const
|
|
4109
|
-
if (!Number.isFinite(
|
|
4108
|
+
const n3 = Number(percent ? raw2.slice(0, -1) : raw2) / (key === "hue" ? 6e4 : key === "radiusEmu" ? 1 : percent ? 100 : 1e5);
|
|
4109
|
+
if (!Number.isFinite(n3) || key === "hue" && (n3 < 0 || n3 >= 360) || key === "threshold" && (n3 < 0 || n3 > 1) || key === "radiusEmu" && (!Number.isSafeInteger(n3) || n3 < 0) || ["saturation", "luminance", "amount"].includes(key) && name2 !== "alphaMod" && (n3 < (name2 === "alphaRepl" ? 0 : -1) || n3 > 1))
|
|
4110
4110
|
return void 0;
|
|
4111
|
-
values[key] =
|
|
4111
|
+
values[key] = n3;
|
|
4112
4112
|
}
|
|
4113
4113
|
if (["biLevel", "alphaBiLevel"].includes(name2) && values.threshold === void 0)
|
|
4114
4114
|
return void 0;
|
|
@@ -4118,9 +4118,9 @@ function parseStandardPictureEffect(node) {
|
|
|
4118
4118
|
const nested = cont ? elements(cont) : [];
|
|
4119
4119
|
if (nested.length !== 1 || nested[0]?.localName !== "alphaModFix") return void 0;
|
|
4120
4120
|
const raw2 = nested[0].getAttribute("amt") ?? "100000";
|
|
4121
|
-
const
|
|
4122
|
-
if (!Number.isFinite(
|
|
4123
|
-
values.amount =
|
|
4121
|
+
const n3 = Number(raw2.endsWith("%") ? raw2.slice(0, -1) : raw2) / (raw2.endsWith("%") ? 100 : 1e5);
|
|
4122
|
+
if (!Number.isFinite(n3) || n3 < 0) return void 0;
|
|
4123
|
+
values.amount = n3;
|
|
4124
4124
|
}
|
|
4125
4125
|
let colors = [];
|
|
4126
4126
|
if (name2 === "duotone") {
|
|
@@ -4216,8 +4216,8 @@ function picturePercentage(value) {
|
|
|
4216
4216
|
const text3 = String(value ?? "").trim();
|
|
4217
4217
|
if (!text3) return void 0;
|
|
4218
4218
|
const percent = text3.endsWith("%");
|
|
4219
|
-
const
|
|
4220
|
-
return Number.isFinite(
|
|
4219
|
+
const n3 = Number(percent ? text3.slice(0, -1) : text3) / (percent ? 100 : 1e5);
|
|
4220
|
+
return Number.isFinite(n3) ? n3 : void 0;
|
|
4221
4221
|
}
|
|
4222
4222
|
function readPictureEffect(name2, attribute2) {
|
|
4223
4223
|
if (name2 === "grayscl") return { kind: "grayscale" };
|
|
@@ -4377,16 +4377,16 @@ function parsePictureLayout(fill) {
|
|
|
4377
4377
|
["scaleX", "sx"],
|
|
4378
4378
|
["scaleY", "sy"]
|
|
4379
4379
|
]) {
|
|
4380
|
-
const
|
|
4381
|
-
if (
|
|
4380
|
+
const n3 = picturePercentage(tile.getAttribute(attr4));
|
|
4381
|
+
if (n3 !== void 0) value[key] = n3;
|
|
4382
4382
|
}
|
|
4383
4383
|
for (const [key, attr4] of [
|
|
4384
4384
|
["offsetXEmu", "tx"],
|
|
4385
4385
|
["offsetYEmu", "ty"]
|
|
4386
4386
|
]) {
|
|
4387
4387
|
const raw2 = tile.getAttribute(attr4);
|
|
4388
|
-
const
|
|
4389
|
-
if (Number.isSafeInteger(
|
|
4388
|
+
const n3 = raw2 === null ? NaN : Number(raw2);
|
|
4389
|
+
if (Number.isSafeInteger(n3)) value[key] = n3;
|
|
4390
4390
|
}
|
|
4391
4391
|
const alignment = tile.getAttribute("algn");
|
|
4392
4392
|
if (alignment) value.alignment = alignment;
|
|
@@ -4441,14 +4441,14 @@ function applyPictureLayout(fill, layout) {
|
|
|
4441
4441
|
["offsetXEmu", "tx"],
|
|
4442
4442
|
["offsetYEmu", "ty"]
|
|
4443
4443
|
]) {
|
|
4444
|
-
const
|
|
4445
|
-
if (
|
|
4444
|
+
const n3 = layout.tile[key];
|
|
4445
|
+
if (n3 !== void 0 && (!Number.isFinite(n3) || (name2 === "sx" || name2 === "sy" ? n3 <= 0 : !Number.isSafeInteger(n3))))
|
|
4446
4446
|
throw new RangeError("Invalid picture tile");
|
|
4447
|
-
if (
|
|
4447
|
+
if (n3 !== before.tile?.[key])
|
|
4448
4448
|
attr4(
|
|
4449
4449
|
tile,
|
|
4450
4450
|
name2,
|
|
4451
|
-
|
|
4451
|
+
n3 === void 0 ? void 0 : Math.round(n3 * (name2 === "sx" || name2 === "sy" ? 1e5 : 1)),
|
|
4452
4452
|
void 0
|
|
4453
4453
|
);
|
|
4454
4454
|
}
|
|
@@ -4465,11 +4465,11 @@ function applyPictureLayout(fill, layout) {
|
|
|
4465
4465
|
if (tile) fill.removeChild(tile);
|
|
4466
4466
|
const rect3 = make(make(fill, "stretch"), "fillRect");
|
|
4467
4467
|
for (const key of ["l", "t", "r", "b"]) {
|
|
4468
|
-
const
|
|
4469
|
-
if (
|
|
4468
|
+
const n3 = layout.fillRect?.[key];
|
|
4469
|
+
if (n3 !== void 0 && !Number.isFinite(n3))
|
|
4470
4470
|
throw new RangeError("Invalid picture fill rectangle");
|
|
4471
|
-
if (
|
|
4472
|
-
attr4(rect3, key,
|
|
4471
|
+
if (n3 !== before.fillRect?.[key])
|
|
4472
|
+
attr4(rect3, key, n3 === void 0 ? void 0 : Math.round(n3 * 1e5), void 0);
|
|
4473
4473
|
}
|
|
4474
4474
|
}
|
|
4475
4475
|
}
|
|
@@ -5344,7 +5344,7 @@ function lerpStops(a2, b, t) {
|
|
|
5344
5344
|
opacity: oa + (ob - oa) * t
|
|
5345
5345
|
};
|
|
5346
5346
|
}
|
|
5347
|
-
function
|
|
5347
|
+
function gradientColorAt(stops, position) {
|
|
5348
5348
|
const first2 = stops[0];
|
|
5349
5349
|
const last = stops[stops.length - 1];
|
|
5350
5350
|
if (position <= first2.position) {
|
|
@@ -5406,7 +5406,7 @@ function buildRectPathGradientSvg(stops, focalPoint, fillToRect, options2) {
|
|
|
5406
5406
|
if (!Number.isInteger(bands) || bands < 1) throw new RangeError("Invalid gradient band count");
|
|
5407
5407
|
for (let i2 = bands; i2 >= 0; i2 -= 1) {
|
|
5408
5408
|
const t = i2 / bands;
|
|
5409
|
-
const { color: color2, opacity } =
|
|
5409
|
+
const { color: color2, opacity } = gradientColorAt(sorted, t * 100);
|
|
5410
5410
|
const left = lerpEdge(inner.left, 0, t);
|
|
5411
5411
|
const top = lerpEdge(inner.top, 0, t);
|
|
5412
5412
|
const right = lerpEdge(inner.right, 100, t);
|
|
@@ -5431,10 +5431,10 @@ function buildRectPathGradientExactSvg(stops, focalPoint, fillToRect) {
|
|
|
5431
5431
|
}
|
|
5432
5432
|
const sorted = [...stops].sort((a2, b) => a2.position - b.position);
|
|
5433
5433
|
const { left, top, right, bottom } = resolveInnerRect(fillToRect, focalPoint);
|
|
5434
|
-
const
|
|
5435
|
-
const alpha = (opacity, attr4) => (opacity ?? 1) < 1 ? ` ${attr4}="${
|
|
5434
|
+
const n3 = (value) => String(Math.round(value * 1e3) / 1e3);
|
|
5435
|
+
const alpha = (opacity, attr4) => (opacity ?? 1) < 1 ? ` ${attr4}="${n3(Math.max(0, opacity ?? 1))}"` : "";
|
|
5436
5436
|
const stopMarkup = sorted.map(
|
|
5437
|
-
(stop) => `<stop offset="${
|
|
5437
|
+
(stop) => `<stop offset="${n3(Math.min(Math.max(stop.position, 0), 100) / 100)}" stop-color="${stop.color}"${alpha(stop.opacity, "stop-opacity")}/>`
|
|
5438
5438
|
).join("");
|
|
5439
5439
|
const sides = [
|
|
5440
5440
|
{ id: "t", pts: [0, 0, 100, 0, right, top, left, top], v: [0, top, 0, 0], size: top },
|
|
@@ -5453,15 +5453,15 @@ function buildRectPathGradientExactSvg(stops, focalPoint, fillToRect) {
|
|
|
5453
5453
|
}
|
|
5454
5454
|
].filter((side) => side.size > 1e-3);
|
|
5455
5455
|
const defs = sides.map(
|
|
5456
|
-
(side) => `<linearGradient id="${side.id}" gradientUnits="userSpaceOnUse" x1="${
|
|
5456
|
+
(side) => `<linearGradient id="${side.id}" gradientUnits="userSpaceOnUse" x1="${n3(side.v[0])}" y1="${n3(side.v[1])}" x2="${n3(side.v[2])}" y2="${n3(side.v[3])}">${stopMarkup}</linearGradient>`
|
|
5457
5457
|
).join("");
|
|
5458
5458
|
const polygons = sides.map((side) => {
|
|
5459
|
-
const points2 = side.pts.map(
|
|
5459
|
+
const points2 = side.pts.map(n3);
|
|
5460
5460
|
const pairs = [0, 2, 4, 6].map((i2) => `${points2[i2]},${points2[i2 + 1]}`).join(" ");
|
|
5461
5461
|
return `<polygon points="${pairs}" fill="url(#${side.id})"/>`;
|
|
5462
5462
|
}).join("");
|
|
5463
5463
|
const first2 = sorted[0];
|
|
5464
|
-
const plateau = right - left > 1e-3 && bottom - top > 1e-3 ? `<rect x="${
|
|
5464
|
+
const plateau = right - left > 1e-3 && bottom - top > 1e-3 ? `<rect x="${n3(left)}" y="${n3(top)}" width="${n3(right - left)}" height="${n3(bottom - top)}" fill="${first2.color}"${alpha(first2.opacity, "fill-opacity")}/>` : "";
|
|
5465
5465
|
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none" shape-rendering="crispEdges"><defs>${defs}</defs>${polygons}${plateau}</svg>`;
|
|
5466
5466
|
}
|
|
5467
5467
|
function buildRectPathGradientImage(stops, focalPoint, fillToRect) {
|
|
@@ -8330,8 +8330,8 @@ function chartDataSheetPasteEdits(sheet, anchor, block, parseNumber) {
|
|
|
8330
8330
|
const edits = [];
|
|
8331
8331
|
const lastSeries = anchor.col + width - 1;
|
|
8332
8332
|
const lastCategory = anchor.row + block.length - 1;
|
|
8333
|
-
for (let
|
|
8334
|
-
for (let
|
|
8333
|
+
for (let n3 = sheet.series.length; n3 < lastSeries; n3++) edits.push({ kind: "add-series" });
|
|
8334
|
+
for (let n3 = sheet.categories.length; n3 < lastCategory; n3++) edits.push({ kind: "add-category" });
|
|
8335
8335
|
block.forEach(
|
|
8336
8336
|
(cells, r) => cells.forEach((raw2, c2) => {
|
|
8337
8337
|
const edit = chartDataSheetCellEdit(
|
|
@@ -9257,9 +9257,9 @@ function chartExDataLayout(space3, sheetName) {
|
|
|
9257
9257
|
const data2 = values.map((value) => {
|
|
9258
9258
|
if (dimension2.kind !== "numDim") return value;
|
|
9259
9259
|
if (value === "") return null;
|
|
9260
|
-
const
|
|
9261
|
-
if (!Number.isFinite(
|
|
9262
|
-
return
|
|
9260
|
+
const n3 = Number(value);
|
|
9261
|
+
if (!Number.isFinite(n3)) throw new Error("Numeric chart data is invalid.");
|
|
9262
|
+
return n3;
|
|
9263
9263
|
});
|
|
9264
9264
|
columns.push([level4.name ?? `Data ${columns.length + 1}`, ...data2]);
|
|
9265
9265
|
}
|
|
@@ -9759,7 +9759,7 @@ function syncTable(table, doc, writes, shared) {
|
|
|
9759
9759
|
let column = list2[col - next.start.col];
|
|
9760
9760
|
const header = writes.get(ref) ?? column?.getAttribute("name") ?? cellText(doc, ref, shared);
|
|
9761
9761
|
let name2 = header.trim() || column && !writes.has(ref) ? header : `Column${col - next.start.col + 1}`;
|
|
9762
|
-
for (let
|
|
9762
|
+
for (let n3 = 2; used.has(name2.toLowerCase()); n3++) name2 = `${header}${n3}`;
|
|
9763
9763
|
used.add(name2.toLowerCase());
|
|
9764
9764
|
if (!column) {
|
|
9765
9765
|
column = table.ownerDocument.createElementNS(
|
|
@@ -10013,8 +10013,8 @@ async function appendChartWorkbookSheet(bytes, rowsForName, options2 = {}) {
|
|
|
10013
10013
|
if (!base.trim() || /[\\/?*\[\]:]/u.test(base) || base.startsWith("'") || base.endsWith("'"))
|
|
10014
10014
|
throw new RangeError("Invalid chart data sheet name.");
|
|
10015
10015
|
let sheetName = "";
|
|
10016
|
-
for (let
|
|
10017
|
-
const suffix = String(
|
|
10016
|
+
for (let n3 = 1; ; n3++) {
|
|
10017
|
+
const suffix = String(n3);
|
|
10018
10018
|
const candidate = `${base.slice(0, 31 - suffix.length)}${suffix}`;
|
|
10019
10019
|
if (!names.has(candidate.toLowerCase())) {
|
|
10020
10020
|
sheetName = candidate;
|
|
@@ -10030,8 +10030,8 @@ async function appendChartWorkbookSheet(bytes, rowsForName, options2 = {}) {
|
|
|
10030
10030
|
throw new RangeError("Chart workbook numbers must be finite.");
|
|
10031
10031
|
const taken = new Set(Object.keys(zip.files).map((name2) => name2.toLowerCase()));
|
|
10032
10032
|
let part = "";
|
|
10033
|
-
for (let
|
|
10034
|
-
const candidate = `xl/worksheets/sheet${
|
|
10033
|
+
for (let n3 = 1; ; n3++) {
|
|
10034
|
+
const candidate = `xl/worksheets/sheet${n3}.xml`;
|
|
10035
10035
|
if (!taken.has(candidate.toLowerCase())) {
|
|
10036
10036
|
part = candidate;
|
|
10037
10037
|
break;
|
|
@@ -10039,14 +10039,14 @@ async function appendChartWorkbookSheet(bytes, rowsForName, options2 = {}) {
|
|
|
10039
10039
|
}
|
|
10040
10040
|
const ids = new Set(children(rels, "Relationship", NS.rels).map((rel) => rel.getAttribute("Id")));
|
|
10041
10041
|
let id = "";
|
|
10042
|
-
for (let
|
|
10043
|
-
if (!ids.has(`rId${
|
|
10044
|
-
id = `rId${
|
|
10042
|
+
for (let n3 = 1; ; n3++) {
|
|
10043
|
+
if (!ids.has(`rId${n3}`)) {
|
|
10044
|
+
id = `rId${n3}`;
|
|
10045
10045
|
break;
|
|
10046
10046
|
}
|
|
10047
10047
|
}
|
|
10048
10048
|
const sheetIds = entries.map((sheet2) => Number(sheet2.getAttribute("sheetId")));
|
|
10049
|
-
if (sheetIds.some((
|
|
10049
|
+
if (sheetIds.some((n3) => !Number.isSafeInteger(n3) || n3 < 1))
|
|
10050
10050
|
throw new Error("The chart workbook has invalid sheet identifiers.");
|
|
10051
10051
|
const sheet = element(sheets, "sheet");
|
|
10052
10052
|
sheet.setAttribute("name", sheetName);
|
|
@@ -11680,8 +11680,8 @@ function chart3DLayout(model, inner, view) {
|
|
|
11680
11680
|
}
|
|
11681
11681
|
|
|
11682
11682
|
// chart/render/chart-3d-mesh.ts
|
|
11683
|
-
function faceKind(
|
|
11684
|
-
const [x, y, z] =
|
|
11683
|
+
function faceKind(n3) {
|
|
11684
|
+
const [x, y, z] = n3;
|
|
11685
11685
|
if (Math.abs(y) >= Math.abs(x) && Math.abs(y) >= Math.abs(z)) return y >= 0 ? "top" : "bottom";
|
|
11686
11686
|
if (Math.abs(x) >= Math.abs(z)) return x >= 0 ? "right" : "left";
|
|
11687
11687
|
return z < 0 ? "front" : "back";
|
|
@@ -12120,7 +12120,7 @@ function scatterAnalysis(model, px3, py, out) {
|
|
|
12120
12120
|
}
|
|
12121
12121
|
|
|
12122
12122
|
// chart/render/chart-scale.ts
|
|
12123
|
-
var clean = (
|
|
12123
|
+
var clean = (n3) => Number(n3.toPrecision(12));
|
|
12124
12124
|
function* units(raw2) {
|
|
12125
12125
|
let exp = Math.floor(Math.log10(raw2)) - 1;
|
|
12126
12126
|
for (; ; ) {
|
|
@@ -12368,8 +12368,8 @@ function findNonLiteral(tokens, index, step) {
|
|
|
12368
12368
|
}
|
|
12369
12369
|
return void 0;
|
|
12370
12370
|
}
|
|
12371
|
-
function pad(
|
|
12372
|
-
return String(
|
|
12371
|
+
function pad(n3, width) {
|
|
12372
|
+
return String(n3).padStart(width, "0");
|
|
12373
12373
|
}
|
|
12374
12374
|
function renderDatePart(part, count, date, twelveHour) {
|
|
12375
12375
|
switch (part) {
|
|
@@ -13012,9 +13012,14 @@ __export(drawingml_exports, {
|
|
|
13012
13012
|
booleanAttribute: () => booleanAttribute,
|
|
13013
13013
|
buildImageBiLevelTable: () => buildImageBiLevelTable,
|
|
13014
13014
|
buildImageLuminanceTransfer: () => buildImageLuminanceTransfer,
|
|
13015
|
+
buildOutlinePathGradientSvg: () => buildOutlinePathGradientSvg,
|
|
13015
13016
|
buildRectPathGradientExactSvg: () => buildRectPathGradientExactSvg,
|
|
13016
13017
|
buildRectPathGradientImage: () => buildRectPathGradientImage,
|
|
13017
13018
|
buildRectPathGradientSvg: () => buildRectPathGradientSvg,
|
|
13019
|
+
capCompensatedDashArray: () => capCompensatedDashArray,
|
|
13020
|
+
closedSubpaths: () => closedSubpaths,
|
|
13021
|
+
dashPatternUnits: () => dashPatternUnits,
|
|
13022
|
+
dashPenWidth: () => dashPenWidth,
|
|
13018
13023
|
descendants: () => descendants,
|
|
13019
13024
|
drawingColorBrightness: () => drawingColorBrightness,
|
|
13020
13025
|
drawingColorCss: () => drawingColorCss,
|
|
@@ -13032,9 +13037,11 @@ __export(drawingml_exports, {
|
|
|
13032
13037
|
drawingThemeFormatSchemeXml: () => drawingThemeFormatSchemeXml,
|
|
13033
13038
|
drawingThemeXml: () => drawingThemeXml,
|
|
13034
13039
|
fillElementOf: () => fillElementOf,
|
|
13040
|
+
gradientColorAt: () => gradientColorAt,
|
|
13035
13041
|
imageContentType: () => imageContentType,
|
|
13036
13042
|
inspectRasterImage: () => inspectRasterImage,
|
|
13037
13043
|
integerAttribute: () => integerAttribute,
|
|
13044
|
+
isDashedStroke: () => isDashedStroke,
|
|
13038
13045
|
isThemeColorSlot: () => isThemeColorSlot,
|
|
13039
13046
|
officeGradientPresetFill: () => officeGradientPresetFill,
|
|
13040
13047
|
officeGradientPresetId: () => officeGradientPresetId,
|
|
@@ -13092,7 +13099,9 @@ __export(drawingml_exports, {
|
|
|
13092
13099
|
resolveThemeEffectStyle: () => resolveThemeEffectStyle,
|
|
13093
13100
|
resolveThemeFillStyle: () => resolveThemeFillStyle,
|
|
13094
13101
|
resolveThemeLineStyle: () => resolveThemeLineStyle,
|
|
13102
|
+
scalePathAbout: () => scalePathAbout,
|
|
13095
13103
|
setDrawingFillXml: () => setDrawingFillXml,
|
|
13104
|
+
shapePathGradientField: () => shapePathGradientField,
|
|
13096
13105
|
stringAttribute: () => stringAttribute,
|
|
13097
13106
|
substituteDrawingPlaceholder: () => substituteDrawingPlaceholder,
|
|
13098
13107
|
svgDropShadowElement: () => svgDropShadowElement,
|
|
@@ -13484,7 +13493,7 @@ function parseCustomGeometry(custom, width, height) {
|
|
|
13484
13493
|
}
|
|
13485
13494
|
const pathWidth = path3.hasAttribute("w") ? Number(path3.getAttribute("w")) : contextWidth;
|
|
13486
13495
|
const pathHeight = path3.hasAttribute("h") ? Number(path3.getAttribute("h")) : contextHeight;
|
|
13487
|
-
if (![pathWidth, pathHeight].every((
|
|
13496
|
+
if (![pathWidth, pathHeight].every((n3) => Number.isFinite(n3) && n3 > 0)) return void 0;
|
|
13488
13497
|
paths.push({
|
|
13489
13498
|
commands,
|
|
13490
13499
|
width: pathWidth,
|
|
@@ -13919,6 +13928,152 @@ function officeGradientPresetId(fill) {
|
|
|
13919
13928
|
return index < 0 ? void 0 : index + 1;
|
|
13920
13929
|
}
|
|
13921
13930
|
|
|
13931
|
+
// drawingml/shape-path-gradient.ts
|
|
13932
|
+
var CIRCLE_FIELD_PRESETS = new Set(
|
|
13933
|
+
[
|
|
13934
|
+
"chevron",
|
|
13935
|
+
"rightArrow",
|
|
13936
|
+
"leftArrow",
|
|
13937
|
+
"upArrow",
|
|
13938
|
+
"downArrow",
|
|
13939
|
+
"stripedRightArrow",
|
|
13940
|
+
"notchedRightArrow",
|
|
13941
|
+
"bentUpArrow",
|
|
13942
|
+
"bentArrow",
|
|
13943
|
+
"uturnArrow",
|
|
13944
|
+
"leftRightArrow",
|
|
13945
|
+
"upDownArrow",
|
|
13946
|
+
"leftUpArrow",
|
|
13947
|
+
"leftRightUpArrow",
|
|
13948
|
+
"quadArrow",
|
|
13949
|
+
"curvedRightArrow",
|
|
13950
|
+
"curvedLeftArrow",
|
|
13951
|
+
"curvedUpArrow",
|
|
13952
|
+
"curvedDownArrow",
|
|
13953
|
+
"swooshArrow",
|
|
13954
|
+
"lightningBolt",
|
|
13955
|
+
"sun",
|
|
13956
|
+
"moon",
|
|
13957
|
+
"smileyFace",
|
|
13958
|
+
"ribbon",
|
|
13959
|
+
"ribbon2",
|
|
13960
|
+
"ellipseRibbon",
|
|
13961
|
+
"ellipseRibbon2",
|
|
13962
|
+
"leftRightRibbon",
|
|
13963
|
+
"verticalScroll",
|
|
13964
|
+
"horizontalScroll",
|
|
13965
|
+
"wave",
|
|
13966
|
+
"doubleWave",
|
|
13967
|
+
"flowChartDocument",
|
|
13968
|
+
"flowChartMultidocument",
|
|
13969
|
+
"flowChartPunchedTape",
|
|
13970
|
+
"flowChartMagneticDisk",
|
|
13971
|
+
"flowChartDisplay"
|
|
13972
|
+
].map((name2) => name2.toLowerCase())
|
|
13973
|
+
);
|
|
13974
|
+
var LEGACY_FIELD_PRESETS = new Set(
|
|
13975
|
+
[
|
|
13976
|
+
"donut",
|
|
13977
|
+
"noSmoking",
|
|
13978
|
+
"blockArc",
|
|
13979
|
+
"frame",
|
|
13980
|
+
"chord",
|
|
13981
|
+
"funnel",
|
|
13982
|
+
"mathDivide",
|
|
13983
|
+
"mathNotEqual",
|
|
13984
|
+
"cornerTabs",
|
|
13985
|
+
"squareTabs",
|
|
13986
|
+
"plaqueTabs",
|
|
13987
|
+
"circularArrow",
|
|
13988
|
+
"leftCircularArrow",
|
|
13989
|
+
"leftRightCircularArrow",
|
|
13990
|
+
"flowChartMagneticTape",
|
|
13991
|
+
"flowChartMagneticDrum"
|
|
13992
|
+
].map((name2) => name2.toLowerCase())
|
|
13993
|
+
);
|
|
13994
|
+
function shapePathGradientField(preset) {
|
|
13995
|
+
if (!preset || preset === "custom") return "circle";
|
|
13996
|
+
const key = preset.toLowerCase();
|
|
13997
|
+
if (CIRCLE_FIELD_PRESETS.has(key)) return "circle";
|
|
13998
|
+
if (LEGACY_FIELD_PRESETS.has(key)) return "legacy";
|
|
13999
|
+
return "outline";
|
|
14000
|
+
}
|
|
14001
|
+
var BAND_COUNT2 = 100;
|
|
14002
|
+
function n2(value) {
|
|
14003
|
+
return String(Math.round(value * 1e3) / 1e3);
|
|
14004
|
+
}
|
|
14005
|
+
var ARG_COUNT = { M: 2, L: 2, Q: 4, C: 6, A: 7, Z: 0 };
|
|
14006
|
+
function scalePathAbout(d, s2, fx, fy) {
|
|
14007
|
+
const tokens = d.match(/[A-Za-z]|-?\d*\.?\d+(?:e[-+]?\d+)?/gu);
|
|
14008
|
+
if (!tokens) return void 0;
|
|
14009
|
+
const out = [];
|
|
14010
|
+
let i2 = 0;
|
|
14011
|
+
while (i2 < tokens.length) {
|
|
14012
|
+
const command = tokens[i2++];
|
|
14013
|
+
const count = ARG_COUNT[command];
|
|
14014
|
+
if (count === void 0) return void 0;
|
|
14015
|
+
out.push(command);
|
|
14016
|
+
if (command === "Z") continue;
|
|
14017
|
+
const args = tokens.slice(i2, i2 + count).map(Number);
|
|
14018
|
+
i2 += count;
|
|
14019
|
+
if (args.length !== count || args.some((value) => !Number.isFinite(value))) return void 0;
|
|
14020
|
+
if (command === "A") {
|
|
14021
|
+
out.push(
|
|
14022
|
+
n2(args[0] * s2),
|
|
14023
|
+
n2(args[1] * s2),
|
|
14024
|
+
n2(args[2]),
|
|
14025
|
+
n2(args[3]),
|
|
14026
|
+
n2(args[4]),
|
|
14027
|
+
n2(fx + (args[5] - fx) * s2),
|
|
14028
|
+
n2(fy + (args[6] - fy) * s2)
|
|
14029
|
+
);
|
|
14030
|
+
continue;
|
|
14031
|
+
}
|
|
14032
|
+
for (let k = 0; k < count; k += 2) {
|
|
14033
|
+
out.push(n2(fx + (args[k] - fx) * s2), n2(fy + (args[k + 1] - fy) * s2));
|
|
14034
|
+
}
|
|
14035
|
+
}
|
|
14036
|
+
return out.join(" ");
|
|
14037
|
+
}
|
|
14038
|
+
function closedSubpaths(d) {
|
|
14039
|
+
const parts = d.split(/(?=M)/u).map((part) => part.trim()).filter((part) => part.endsWith("Z"));
|
|
14040
|
+
return parts.length > 0 ? parts.join(" ") : void 0;
|
|
14041
|
+
}
|
|
14042
|
+
function buildOutlinePathGradientSvg(stops, d, width, height, focusX, focusY) {
|
|
14043
|
+
if (stops.length === 0 || !(width > 0) || !(height > 0)) return void 0;
|
|
14044
|
+
if (scalePathAbout(d, 1, 0, 0) === void 0) return void 0;
|
|
14045
|
+
const sorted = [...stops].sort((a2, b) => a2.position - b.position);
|
|
14046
|
+
const fx = focusX * width;
|
|
14047
|
+
const fy = focusY * height;
|
|
14048
|
+
const translucent = sorted.some((stop) => (stop.opacity ?? 1) < 1);
|
|
14049
|
+
const body = [];
|
|
14050
|
+
if (translucent) {
|
|
14051
|
+
for (let i2 = BAND_COUNT2; i2 >= 1; i2 -= 1) {
|
|
14052
|
+
const outer = scalePathAbout(d, i2 / BAND_COUNT2, fx, fy);
|
|
14053
|
+
if (outer === void 0) return void 0;
|
|
14054
|
+
const inner = i2 > 1 ? scalePathAbout(d, (i2 - 1) / BAND_COUNT2, fx, fy) : void 0;
|
|
14055
|
+
const { color: color2, opacity } = gradientColorAt(sorted, (i2 - 0.5) / BAND_COUNT2 * 100);
|
|
14056
|
+
const alpha = opacity < 1 ? ` fill-opacity="${n2(Math.max(0, opacity))}"` : "";
|
|
14057
|
+
body.push(
|
|
14058
|
+
`<path d="${outer}${inner ? ` ${inner}` : ""}" fill="${color2}"${alpha} fill-rule="evenodd"/>`
|
|
14059
|
+
);
|
|
14060
|
+
}
|
|
14061
|
+
return wrap2(width, height, body.join(""));
|
|
14062
|
+
}
|
|
14063
|
+
body.push(`<defs><path id="p" d="${d}"/></defs>`);
|
|
14064
|
+
for (let i2 = BAND_COUNT2; i2 >= 1; i2 -= 1) {
|
|
14065
|
+
const s2 = i2 / BAND_COUNT2;
|
|
14066
|
+
const { color: color2 } = gradientColorAt(sorted, (i2 - 0.5) / BAND_COUNT2 * 100);
|
|
14067
|
+
body.push(
|
|
14068
|
+
`<use href="#p" transform="matrix(${n2(s2)} 0 0 ${n2(s2)} ${n2(fx * (1 - s2))} ${n2(fy * (1 - s2))})" fill="${color2}"/>`
|
|
14069
|
+
);
|
|
14070
|
+
}
|
|
14071
|
+
return wrap2(width, height, body.join(""));
|
|
14072
|
+
}
|
|
14073
|
+
function wrap2(width, height, body) {
|
|
14074
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n2(width)} ${n2(height)}" preserveAspectRatio="none">${body}</svg>`;
|
|
14075
|
+
}
|
|
14076
|
+
|
|
13922
14077
|
// drawingml/read-run-properties.ts
|
|
13923
14078
|
function outerXml(element4) {
|
|
13924
14079
|
return buildXml(element4);
|
|
@@ -14283,8 +14438,8 @@ var LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl",
|
|
|
14283
14438
|
// drawingml/read-3d-values.ts
|
|
14284
14439
|
var integer = (value) => {
|
|
14285
14440
|
if (value === void 0 || value === null || String(value).trim() === "") return void 0;
|
|
14286
|
-
const
|
|
14287
|
-
return Number.isSafeInteger(
|
|
14441
|
+
const n3 = Number(value);
|
|
14442
|
+
return Number.isSafeInteger(n3) ? n3 : void 0;
|
|
14288
14443
|
};
|
|
14289
14444
|
function readScene3DValues(node, read) {
|
|
14290
14445
|
const out = {};
|
|
@@ -15507,6 +15662,57 @@ function applyPictureHslPixels(data, effect) {
|
|
|
15507
15662
|
}
|
|
15508
15663
|
}
|
|
15509
15664
|
|
|
15665
|
+
// drawingml/dash-pattern.ts
|
|
15666
|
+
var PRESET_PATTERNS = {
|
|
15667
|
+
dash: [4, 3],
|
|
15668
|
+
dot: [1, 3],
|
|
15669
|
+
lgDash: [8, 3],
|
|
15670
|
+
dashDot: [4, 3, 1, 3],
|
|
15671
|
+
lgDashDot: [8, 3, 1, 3],
|
|
15672
|
+
lgDashDotDot: [8, 3, 1, 3, 1, 3],
|
|
15673
|
+
sysDash: [3, 1],
|
|
15674
|
+
sysDot: [1, 1],
|
|
15675
|
+
sysDashDot: [3, 1, 1, 1],
|
|
15676
|
+
sysDashDotDot: [3, 1, 1, 1, 1, 1]
|
|
15677
|
+
};
|
|
15678
|
+
var CUSTOM_DASH_UNIT = 1e5;
|
|
15679
|
+
var FALLBACK_CUSTOM_PATTERN = [3, 2];
|
|
15680
|
+
function dashPenWidth(strokeWidth) {
|
|
15681
|
+
if (!Number.isFinite(strokeWidth) || strokeWidth <= 1) return 1;
|
|
15682
|
+
return Math.max(1, Math.ceil(strokeWidth - 0.5));
|
|
15683
|
+
}
|
|
15684
|
+
function dashPatternUnits(dashType, customSegments) {
|
|
15685
|
+
if (!dashType || dashType === "solid") return void 0;
|
|
15686
|
+
if (dashType === "custom") {
|
|
15687
|
+
const pattern = (customSegments ?? []).flatMap((seg) => [
|
|
15688
|
+
Math.max(0, seg.dash) / CUSTOM_DASH_UNIT,
|
|
15689
|
+
Math.max(0, seg.space) / CUSTOM_DASH_UNIT
|
|
15690
|
+
]);
|
|
15691
|
+
return pattern.some((n3) => n3 > 0) ? pattern : FALLBACK_CUSTOM_PATTERN;
|
|
15692
|
+
}
|
|
15693
|
+
return PRESET_PATTERNS[dashType];
|
|
15694
|
+
}
|
|
15695
|
+
function isDashedStroke(dashType) {
|
|
15696
|
+
return dashType !== void 0 && dashType !== "solid" && dashType !== "";
|
|
15697
|
+
}
|
|
15698
|
+
function capCompensatedDashArray(pattern, strokeWidth, lineCap) {
|
|
15699
|
+
const pen = dashPenWidth(strokeWidth);
|
|
15700
|
+
const round3 = lineCap === "rnd";
|
|
15701
|
+
const out = [];
|
|
15702
|
+
for (let i2 = 0; i2 < pattern.length; i2 += 1) {
|
|
15703
|
+
const len = (pattern[i2] ?? 0) * pen;
|
|
15704
|
+
if (!round3) {
|
|
15705
|
+
out.push(len);
|
|
15706
|
+
} else if (i2 % 2 === 0) {
|
|
15707
|
+
out.push(Math.max(0, len - pen));
|
|
15708
|
+
} else {
|
|
15709
|
+
const dash = (pattern[i2 - 1] ?? 0) * pen;
|
|
15710
|
+
out.push(len + (dash - Math.max(0, dash - pen)));
|
|
15711
|
+
}
|
|
15712
|
+
}
|
|
15713
|
+
return out.map((n3) => Number(n3.toFixed(4))).join(" ");
|
|
15714
|
+
}
|
|
15715
|
+
|
|
15510
15716
|
// chart/region-map/value-color-positions.ts
|
|
15511
15717
|
function schemaPosition(node, end) {
|
|
15512
15718
|
for (const kind of ["number", "percent"]) {
|
|
@@ -15717,7 +15923,7 @@ function bubbleView(chart, model, evaluateRef) {
|
|
|
15717
15923
|
showNegativeBubbles: chart.bubble?.showNegativeBubbles === true
|
|
15718
15924
|
};
|
|
15719
15925
|
}
|
|
15720
|
-
var columnNumber = (letters) => [...letters].reduce((
|
|
15926
|
+
var columnNumber = (letters) => [...letters].reduce((n3, ch) => n3 * 26 + ch.charCodeAt(0) - 64, 0);
|
|
15721
15927
|
function refColumns(ref) {
|
|
15722
15928
|
const match = /\$?([A-Z]{1,3})\$?\d+:\$?([A-Z]{1,3})\$?\d+\s*$/i.exec(ref);
|
|
15723
15929
|
if (!match) return 1;
|
|
@@ -16012,7 +16218,7 @@ function chartSummaryView(chart, theme, options2 = {}) {
|
|
|
16012
16218
|
const rawCategories = [];
|
|
16013
16219
|
const collect = (cats) => void rawCategories.push(cats);
|
|
16014
16220
|
const extra = chart.extraGroups ?? [];
|
|
16015
|
-
const total = chart.series.length + extra.reduce((
|
|
16221
|
+
const total = chart.series.length + extra.reduce((n3, g3) => n3 + g3.series.length, 0);
|
|
16016
16222
|
const series2 = chart.series.map((s2, i2) => seriesView(ctx, s2, i2, total, collect));
|
|
16017
16223
|
const longest = Math.max(
|
|
16018
16224
|
0,
|
|
@@ -16981,7 +17187,7 @@ function formatRegionMapValue(value, cultureLanguage) {
|
|
|
16981
17187
|
}
|
|
16982
17188
|
}
|
|
16983
17189
|
function lerpColor(a2, b, t) {
|
|
16984
|
-
const clamp6 = (v) => Math.max(0, Math.min(255, Math.round(v))), ha = a2.replace("#", ""), hb = b.replace("#", ""), r1 = parseInt(ha.substring(0, 2), 16), g1 = parseInt(ha.substring(2, 4), 16), b1 = parseInt(ha.substring(4, 6), 16), r2 = parseInt(hb.substring(0, 2), 16), g22 = parseInt(hb.substring(2, 4), 16), b2 = parseInt(hb.substring(4, 6), 16), r = clamp6(r1 + (r2 - r1) * t), g3 = clamp6(g1 + (g22 - g1) * t), bl = clamp6(b1 + (b2 - b1) * t), toHex2 = (
|
|
17190
|
+
const clamp6 = (v) => Math.max(0, Math.min(255, Math.round(v))), ha = a2.replace("#", ""), hb = b.replace("#", ""), r1 = parseInt(ha.substring(0, 2), 16), g1 = parseInt(ha.substring(2, 4), 16), b1 = parseInt(ha.substring(4, 6), 16), r2 = parseInt(hb.substring(0, 2), 16), g22 = parseInt(hb.substring(2, 4), 16), b2 = parseInt(hb.substring(4, 6), 16), r = clamp6(r1 + (r2 - r1) * t), g3 = clamp6(g1 + (g22 - g1) * t), bl = clamp6(b1 + (b2 - b1) * t), toHex2 = (n3) => n3.toString(16).padStart(2, "0");
|
|
16985
17191
|
return `#${toHex2(r)}${toHex2(g3)}${toHex2(bl)}`;
|
|
16986
17192
|
}
|
|
16987
17193
|
function resolveValueColorStops(valueColors, valueColorPositions, minVal, maxVal) {
|
|
@@ -17412,10 +17618,10 @@ function projectGeoPoint(point, projection = "mercator") {
|
|
|
17412
17618
|
];
|
|
17413
17619
|
}
|
|
17414
17620
|
if (projection === "albers") {
|
|
17415
|
-
const
|
|
17416
|
-
const c2 = Math.cos(20 * RAD) ** 2 + 2 *
|
|
17417
|
-
const rho = Math.sqrt(Math.max(0, c2 - 2 *
|
|
17418
|
-
return [rho * Math.sin(
|
|
17621
|
+
const n3 = (Math.sin(20 * RAD) + Math.sin(50 * RAD)) / 2;
|
|
17622
|
+
const c2 = Math.cos(20 * RAD) ** 2 + 2 * n3 * Math.sin(20 * RAD);
|
|
17623
|
+
const rho = Math.sqrt(Math.max(0, c2 - 2 * n3 * Math.sin(lat))) / n3;
|
|
17624
|
+
return [rho * Math.sin(n3 * lon), rho * Math.cos(n3 * lon) - Math.sqrt(c2) / n3];
|
|
17419
17625
|
}
|
|
17420
17626
|
return void 0;
|
|
17421
17627
|
}
|
|
@@ -18074,7 +18280,7 @@ function sliceLabels(model, marks, out) {
|
|
|
18074
18280
|
);
|
|
18075
18281
|
for (const [id, item2] of items.entries()) {
|
|
18076
18282
|
const { mark, label, m } = item2;
|
|
18077
|
-
const nudge = nudges.find((
|
|
18283
|
+
const nudge = nudges.find((n3) => n3.id === id);
|
|
18078
18284
|
let point = { x: item2.x + (nudge?.dx ?? 0), y: item2.y + (nudge?.dy ?? 0) };
|
|
18079
18285
|
if (model.frameSize) point = applyLabelManualLayout(label.layout, model.frameSize, point);
|
|
18080
18286
|
const moved = point.x !== item2.x || point.y !== item2.y;
|
|
@@ -18217,7 +18423,7 @@ function radarSvg(model, area) {
|
|
|
18217
18423
|
}
|
|
18218
18424
|
|
|
18219
18425
|
// chart/render/chart-svg-hierarchy.ts
|
|
18220
|
-
var
|
|
18426
|
+
var colorAt = (model, index) => {
|
|
18221
18427
|
const first2 = model.series[0];
|
|
18222
18428
|
const colors = first2?.pointColors;
|
|
18223
18429
|
return (colors && colors.length > 0 ? colors[index % colors.length] : void 0) ?? first2?.color ?? "#4472C4";
|
|
@@ -18246,7 +18452,7 @@ function treemapSvg(model, area) {
|
|
|
18246
18452
|
}
|
|
18247
18453
|
out.push(`<g data-chart-series="${cell2.seriesIndex}" data-chart-point="${cell2.pointIndex}">`);
|
|
18248
18454
|
out.push(
|
|
18249
|
-
rect(cell2.x, cell2.y, cell2.w, cell2.h,
|
|
18455
|
+
rect(cell2.x, cell2.y, cell2.w, cell2.h, colorAt(model, cell2.colorIndex)).replace(
|
|
18250
18456
|
"/>",
|
|
18251
18457
|
' rx="2"/>'
|
|
18252
18458
|
)
|
|
@@ -18285,7 +18491,7 @@ function sunburstSvg(model, area) {
|
|
|
18285
18491
|
);
|
|
18286
18492
|
for (const arc3 of arcs)
|
|
18287
18493
|
out.push(
|
|
18288
|
-
`<path d="${arc3.d}" fill="${
|
|
18494
|
+
`<path d="${arc3.d}" fill="${colorAt(model, arc3.colorIndex)}" stroke="#FFFFFF" stroke-width="1.5"${arc3.pointIndex === void 0 ? "" : ` data-chart-series="0" data-chart-point="${arc3.pointIndex}"`}/>`
|
|
18289
18495
|
);
|
|
18290
18496
|
const flatLabels = levels.length > 1 || model.series.length !== 1 ? void 0 : model.categories;
|
|
18291
18497
|
for (const arc3 of model.hierarchy?.labels === false ? [] : arcs) {
|
|
@@ -20863,9 +21069,9 @@ function applyDataTable(draft, layout) {
|
|
|
20863
21069
|
showKeys: true
|
|
20864
21070
|
};
|
|
20865
21071
|
}
|
|
20866
|
-
function applyChartQuickLayout(space3,
|
|
20867
|
-
const layout = findChartQuickLayout(
|
|
20868
|
-
if (!layout) throw new RangeError(`No chart quick layout ${
|
|
21072
|
+
function applyChartQuickLayout(space3, n3, only = ALL_PARTS) {
|
|
21073
|
+
const layout = findChartQuickLayout(n3);
|
|
21074
|
+
if (!layout) throw new RangeError(`No chart quick layout ${n3}`);
|
|
20869
21075
|
if (!chartSupportsQuickLayout(space3))
|
|
20870
21076
|
throw new RangeError("Quick layouts apply to bar, column, line and area charts");
|
|
20871
21077
|
const parts = new Set(only);
|
|
@@ -23042,6 +23248,14 @@ function changeTextCaseRanges(text3, mode, boundaries = []) {
|
|
|
23042
23248
|
|
|
23043
23249
|
// text/font-metrics/design-advances.generated.ts
|
|
23044
23250
|
var DESIGN_ADVANCES = {
|
|
23251
|
+
aptos: {
|
|
23252
|
+
regular: "203.75 292.5 370 537.5 533.75 826.25 642.5 210 292.5 292.5 457.5 533.75 286.25 340 286.25 338.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 286.25 286.25 533.75 533.75 533.75 501.25 895 588.75 603.75 692.5 686.25 556.25 525 708.75 707.5 260 331.25 568.75 500 790 706.25 732.5 577.5 732.5 606.25 566.25 478.75 681.25 585 892.5 552.5 540 516.25 295 338.75 295 533.75 460 551.25 531.25 561.25 525 560 526.25 301.25 485 551.25 238.75 238.75 486.25 260 852.5 551.25 551.25 561.25 560 335 486.25 323.75 558.75 452.5 721.25 442.5 452.5 437.5 295 270 295 533.75",
|
|
23253
|
+
bold: "203.75 292.5 420 537.5 533.75 841.25 676.25 232.5 292.5 292.5 457.5 533.75 300 340 300 386.25 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 533.75 300 300 533.75 533.75 533.75 517.5 900 620 618.75 706.25 707.5 573.75 536.25 717.5 728.75 293.75 366.25 622.5 511.25 821.25 722.5 737.5 605 737.5 633.75 598.75 505 696.25 616.25 940 598.75 586.25 547.5 337.5 386.25 337.5 533.75 460 551.25 551.25 586.25 548.75 586.25 556.25 335 511.25 578.75 267.5 267.5 533.75 296.25 888.75 578.75 573.75 586.25 586.25 368.75 516.25 355 581.25 493.75 761.25 495 493.75 466.25 337.5 270 337.5 533.75"
|
|
23254
|
+
},
|
|
23255
|
+
"aptos display": {
|
|
23256
|
+
regular: "192.5 246.25 370 528.75 522.5 825 622.5 210 295 295 381.25 522.5 246.25 348.75 246.25 338.75 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 522.5 246.25 246.25 522.5 522.5 522.5 486.25 878.75 580 582.5 656.25 655 540 508.75 671.25 661.25 235 317.5 553.75 485 765 681.25 695 556.25 695 590 546.25 477.5 651.25 573.75 886.25 550 535 516.25 295 338.75 295 522.5 460 551.25 488.75 518.75 492.5 518.75 493.75 283.75 440 506.25 210 210 447.5 243.75 800 506.25 512.5 518.75 518.75 310 462.5 303.75 506.25 432.5 716.25 440 432.5 426.25 295 218.75 295 522.5",
|
|
23257
|
+
bold: "192.5 261.25 420 561.25 540 838.75 655 232.5 337.5 337.5 428.75 540 261.25 365 261.25 386.25 540 540 540 540 540 540 540 540 540 540 261.25 261.25 540 540 540 502.5 887.5 610 598.75 675 677.5 548.75 516.25 685 682.5 267.5 348.75 602.5 491.25 793.75 696.25 705 585 705 610 573.75 498.75 670 600 921.25 591.25 572.5 547.5 337.5 386.25 337.5 540 460 551.25 507.5 541.25 507.5 542.5 515 317.5 472.5 533.75 240 240 500 278.75 840 533.75 530 541.25 542.5 342.5 483.75 333.75 533.75 475 747.5 488.75 475 450 337.5 251.25 337.5 540"
|
|
23258
|
+
},
|
|
23045
23259
|
arial: {
|
|
23046
23260
|
regular: "277.83 277.83 354.98 556.15 556.15 889.16 666.99 190.92 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 277.83 277.83 583.98 583.98 583.98 556.15 1015.14 666.99 666.99 722.17 722.17 666.99 610.84 777.83 722.17 277.83 500 666.99 556.15 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 277.83 277.83 277.83 469.24 556.15 333.01 556.15 556.15 500 556.15 556.15 277.83 556.15 556.15 222.17 222.17 500 222.17 833.01 556.15 556.15 556.15 556.15 333.01 500 277.83 556.15 500 722.17 500 500 500 333.98 259.77 333.98 583.98",
|
|
23047
23261
|
bold: "277.83 333.01 474.12 556.15 556.15 889.16 722.17 237.79 333.01 333.01 389.16 583.98 277.83 333.01 277.83 277.83 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 556.15 333.01 333.01 583.98 583.98 583.98 610.84 975.1 722.17 722.17 722.17 722.17 666.99 610.84 777.83 722.17 277.83 556.15 722.17 610.84 833.01 722.17 777.83 666.99 777.83 722.17 666.99 610.84 722.17 666.99 943.85 666.99 666.99 610.84 333.01 277.83 333.01 583.98 556.15 333.01 556.15 610.84 556.15 610.84 556.15 333.01 610.84 610.84 277.83 277.83 556.15 277.83 889.16 610.84 610.84 610.84 610.84 389.16 556.15 333.01 610.84 556.15 777.83 556.15 556.15 500 389.16 279.79 389.16 583.98"
|
|
@@ -24022,7 +24236,7 @@ function parseTrueType(data) {
|
|
|
24022
24236
|
}
|
|
24023
24237
|
|
|
24024
24238
|
// text/truetype/subset.ts
|
|
24025
|
-
var pad4 = (
|
|
24239
|
+
var pad4 = (n3) => n3 + 3 & -4;
|
|
24026
24240
|
function checksum(bytes) {
|
|
24027
24241
|
let sum = 0;
|
|
24028
24242
|
for (let i2 = 0; i2 < bytes.length; i2 += 4)
|
|
@@ -25034,6 +25248,7 @@ __export(diagram_exports, {
|
|
|
25034
25248
|
buildFabricatedQuickStyleXml: () => buildFabricatedQuickStyleXml,
|
|
25035
25249
|
buildForest: () => buildForest,
|
|
25036
25250
|
buildGeneratedDiagramCache: () => buildGeneratedDiagramCache,
|
|
25251
|
+
buildOutlinePathGradientSvg: () => buildOutlinePathGradientSvg,
|
|
25037
25252
|
buildRectPathGradientExactSvg: () => buildRectPathGradientExactSvg,
|
|
25038
25253
|
buildRectPathGradientImage: () => buildRectPathGradientImage,
|
|
25039
25254
|
buildRectPathGradientSvg: () => buildRectPathGradientSvg,
|
|
@@ -25044,6 +25259,7 @@ __export(diagram_exports, {
|
|
|
25044
25259
|
chooseAlgorithmOfType: () => chooseAlgorithmOfType,
|
|
25045
25260
|
circleNode: () => circleNode,
|
|
25046
25261
|
clampByRules: () => clampByRules,
|
|
25262
|
+
closedSubpaths: () => closedSubpaths,
|
|
25047
25263
|
collectFoldedDescendants: () => collectFoldedDescendants,
|
|
25048
25264
|
collectTransitionText: () => collectTransitionText,
|
|
25049
25265
|
computeDiagramDrawingBounds: () => computeDiagramDrawingBounds,
|
|
@@ -25088,6 +25304,7 @@ __export(diagram_exports, {
|
|
|
25088
25304
|
formatDiagramSource: () => formatDiagramSource,
|
|
25089
25305
|
formatXsdDouble: () => formatXsdDouble,
|
|
25090
25306
|
generatedDrawingDigest: () => generatedDrawingDigest,
|
|
25307
|
+
gradientColorAt: () => gradientColorAt,
|
|
25091
25308
|
groupedChildren: () => groupedChildren,
|
|
25092
25309
|
interpretSmartArtLayout: () => interpretSmartArtLayout,
|
|
25093
25310
|
isDrawableDiagramShapeView: () => isDrawableDiagramShapeView,
|
|
@@ -25184,11 +25401,13 @@ __export(diagram_exports, {
|
|
|
25184
25401
|
ruleAttributes: () => ruleAttributes,
|
|
25185
25402
|
runEngineLayout: () => runEngineLayout,
|
|
25186
25403
|
runSmartArtEngine: () => runSmartArtEngine,
|
|
25404
|
+
scalePathAbout: () => scalePathAbout,
|
|
25187
25405
|
selectArrangedNodes: () => selectArrangedNodes,
|
|
25188
25406
|
selectConstraints: () => selectConstraints,
|
|
25189
25407
|
setDiagramNodeStyle: () => setDiagramNodeStyle,
|
|
25190
25408
|
setDiagramNodeText: () => setDiagramNodeText,
|
|
25191
25409
|
setDrawingFillXml: () => setDrawingFillXml,
|
|
25410
|
+
shapePathGradientField: () => shapePathGradientField,
|
|
25192
25411
|
smartArtChildrenOf: () => smartArtChildrenOf,
|
|
25193
25412
|
structuralChooseAlgDepth: () => structuralChooseAlgDepth,
|
|
25194
25413
|
styleContext: () => styleContext,
|
|
@@ -25361,24 +25580,24 @@ function isSpace2(ch) {
|
|
|
25361
25580
|
function parseAttributes(source2) {
|
|
25362
25581
|
const attrs2 = {};
|
|
25363
25582
|
let i2 = 0;
|
|
25364
|
-
const
|
|
25365
|
-
while (i2 <
|
|
25366
|
-
while (i2 <
|
|
25583
|
+
const n3 = source2.length;
|
|
25584
|
+
while (i2 < n3) {
|
|
25585
|
+
while (i2 < n3 && !isNameChar2(source2[i2])) {
|
|
25367
25586
|
i2++;
|
|
25368
25587
|
}
|
|
25369
25588
|
const nameStart = i2;
|
|
25370
|
-
while (i2 <
|
|
25589
|
+
while (i2 < n3 && isNameChar2(source2[i2])) {
|
|
25371
25590
|
i2++;
|
|
25372
25591
|
}
|
|
25373
25592
|
const name2 = source2.slice(nameStart, i2);
|
|
25374
|
-
while (i2 <
|
|
25593
|
+
while (i2 < n3 && isSpace2(source2[i2])) {
|
|
25375
25594
|
i2++;
|
|
25376
25595
|
}
|
|
25377
25596
|
if (!name2 || source2[i2] !== "=") {
|
|
25378
25597
|
continue;
|
|
25379
25598
|
}
|
|
25380
25599
|
i2++;
|
|
25381
|
-
while (i2 <
|
|
25600
|
+
while (i2 < n3 && isSpace2(source2[i2])) {
|
|
25382
25601
|
i2++;
|
|
25383
25602
|
}
|
|
25384
25603
|
const quote = source2[i2];
|
|
@@ -26175,12 +26394,12 @@ function cmds(src) {
|
|
|
26175
26394
|
let i2 = 0;
|
|
26176
26395
|
while (i2 < tokens.length) {
|
|
26177
26396
|
const op2 = tokens[i2++];
|
|
26178
|
-
const
|
|
26179
|
-
if (
|
|
26397
|
+
const n3 = ARITY2[op2];
|
|
26398
|
+
if (n3 === void 0) {
|
|
26180
26399
|
throw new Error(`Unknown path op ${op2}`);
|
|
26181
26400
|
}
|
|
26182
|
-
const a2 = tokens.slice(i2, i2 +
|
|
26183
|
-
i2 +=
|
|
26401
|
+
const a2 = tokens.slice(i2, i2 + n3);
|
|
26402
|
+
i2 += n3;
|
|
26184
26403
|
switch (op2) {
|
|
26185
26404
|
case "M":
|
|
26186
26405
|
out.push({ kind: "moveTo", x: a2[0], y: a2[1] });
|
|
@@ -26293,84 +26512,22 @@ var triangle = (g3, dir) => g3.poly([
|
|
|
26293
26512
|
[D * dir, 0],
|
|
26294
26513
|
[-D * dir, D]
|
|
26295
26514
|
]);
|
|
26296
|
-
var
|
|
26297
|
-
|
|
26298
|
-
|
|
26299
|
-
|
|
26300
|
-
|
|
26301
|
-
[
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
|
|
26305
|
-
|
|
26306
|
-
|
|
26307
|
-
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
[-8.5, -13.5],
|
|
26313
|
-
[-9.3, -17.2],
|
|
26314
|
-
[-7.8, -19.5],
|
|
26315
|
-
[-4, -22.5],
|
|
26316
|
-
[-3.3, -21.7],
|
|
26317
|
-
[-1.8, -21.7],
|
|
26318
|
-
[-1, -23.2],
|
|
26319
|
-
[0.5, -23.2],
|
|
26320
|
-
[1.2, -21.7],
|
|
26321
|
-
[2.7, -21.7],
|
|
26322
|
-
[3.5, -22.5],
|
|
26323
|
-
[8, -18.7],
|
|
26324
|
-
[8.7, -17.2],
|
|
26325
|
-
[8, -16.5],
|
|
26326
|
-
[8, -15],
|
|
26327
|
-
[9.5, -14.2],
|
|
26328
|
-
[9.5, -13.5],
|
|
26329
|
-
[8, -12.7],
|
|
26330
|
-
[8.7, -9.7],
|
|
26331
|
-
[5, -6],
|
|
26332
|
-
[2, -6],
|
|
26333
|
-
[-2.5, -2.2],
|
|
26334
|
-
[-3.3, 0.8],
|
|
26335
|
-
[-5.5, 2.3],
|
|
26336
|
-
[-4.8, 6.8],
|
|
26337
|
-
[-6.3, 7.5],
|
|
26338
|
-
[-6.3, 18],
|
|
26339
|
-
[-4.8, 18],
|
|
26340
|
-
[-4, 17.3],
|
|
26341
|
-
[4.2, 17.3],
|
|
26342
|
-
[4.2, 6.8],
|
|
26343
|
-
[6.5, 5.3],
|
|
26344
|
-
[6.5, 3.8],
|
|
26345
|
-
[8, 3],
|
|
26346
|
-
[8, 1.5],
|
|
26347
|
-
[8.7, 0.8],
|
|
26348
|
-
[13.2, 0],
|
|
26349
|
-
[17, -4.5],
|
|
26350
|
-
[18.5, -4.5],
|
|
26351
|
-
[18.5, -6],
|
|
26352
|
-
[17.7, -6.7],
|
|
26353
|
-
[18.5, -8.2],
|
|
26354
|
-
[18.5, -15],
|
|
26355
|
-
[20, -15.7],
|
|
26356
|
-
[20, -18],
|
|
26357
|
-
[17.7, -19.5],
|
|
26358
|
-
[17.7, -21],
|
|
26359
|
-
[15.5, -24.7],
|
|
26360
|
-
[15.5, -27],
|
|
26361
|
-
[14, -27],
|
|
26362
|
-
[13.2, -27.7],
|
|
26363
|
-
[13.2, -29.2],
|
|
26364
|
-
[9.5, -30],
|
|
26365
|
-
[8.7, -30.7],
|
|
26366
|
-
[8.7, -32.2],
|
|
26367
|
-
[5.7, -31.5],
|
|
26368
|
-
[4.2, -33.7],
|
|
26369
|
-
[2.7, -33.7],
|
|
26370
|
-
[2, -32.2],
|
|
26371
|
-
[-2.5, -32.2],
|
|
26372
|
-
[-3.3, -33.7]
|
|
26373
|
-
];
|
|
26515
|
+
var U = 90;
|
|
26516
|
+
var question = (g3) => {
|
|
26517
|
+
const x = (v) => g3.x(v * U);
|
|
26518
|
+
const y = (v) => g3.y(v * U);
|
|
26519
|
+
const r = (v) => g3.len(v * U);
|
|
26520
|
+
return [
|
|
26521
|
+
`M ${x(-0.214)} ${y(-0.162)} A ${r(0.214)} ${r(0.2125)} 10800000 10800000`,
|
|
26522
|
+
`A ${r(0.108)} ${r(0.162)} 0 5400000`,
|
|
26523
|
+
`A ${r(0.053)} ${r(0.085)} 16200000 -5400000`,
|
|
26524
|
+
`L ${x(0.053)} ${y(0.187)} L ${x(-0.053)} ${y(0.187)} L ${x(-0.053)} ${y(0.08)}`,
|
|
26525
|
+
`A ${r(0.108)} ${r(0.16)} 10800000 5400000`,
|
|
26526
|
+
`A ${r(0.052)} ${r(0.082)} 5400000 -5400000`,
|
|
26527
|
+
`A ${r(0.107)} ${r(0.1065)} 0 -10800000`,
|
|
26528
|
+
`L ${x(-0.214)} ${y(-0.162)} Z`
|
|
26529
|
+
].join(" ");
|
|
26530
|
+
};
|
|
26374
26531
|
var MOVIE = [
|
|
26375
26532
|
[-33.75, -16.5],
|
|
26376
26533
|
[-33.75, -3],
|
|
@@ -26477,8 +26634,8 @@ var buttons = {
|
|
|
26477
26634
|
)
|
|
26478
26635
|
]),
|
|
26479
26636
|
actionButtonHelp: build("actionButtonHelp", (g3) => [
|
|
26480
|
-
darken(g3
|
|
26481
|
-
darken(g3.circle(
|
|
26637
|
+
darken(question(g3)),
|
|
26638
|
+
darken(g3.circle(0, 0.295 * U, 0.08 * U))
|
|
26482
26639
|
]),
|
|
26483
26640
|
actionButtonInformation: build("actionButtonInformation", (g3) => [
|
|
26484
26641
|
darken(g3.circle(0, 0.4, 34)),
|
|
@@ -29801,12 +29958,46 @@ var leftRightUpArrow2 = exactDef(
|
|
|
29801
29958
|
)
|
|
29802
29959
|
]
|
|
29803
29960
|
);
|
|
29961
|
+
var swooshArrow3 = exactDef(
|
|
29962
|
+
"swooshArrow",
|
|
29963
|
+
{ adj1: 25e3, adj2: 16667 },
|
|
29964
|
+
[
|
|
29965
|
+
"a1 pin 1 adj1 75000",
|
|
29966
|
+
"maxAdj2 */ 70000 w ss",
|
|
29967
|
+
"a2 pin 0 adj2 maxAdj2",
|
|
29968
|
+
"ad1 */ h a1 100000",
|
|
29969
|
+
"ad2 */ ss a2 100000",
|
|
29970
|
+
"xB +- r 0 ad2",
|
|
29971
|
+
"yB +- t ssd8 0",
|
|
29972
|
+
"alfa */ cd4 1 14",
|
|
29973
|
+
"dx0 tan ssd8 alfa",
|
|
29974
|
+
"xC +- xB 0 dx0",
|
|
29975
|
+
"dx1 tan ad1 alfa",
|
|
29976
|
+
"yF +- yB ad1 0",
|
|
29977
|
+
"xF +- xB dx1 0",
|
|
29978
|
+
"xE +- xF dx0 0",
|
|
29979
|
+
"yE +- yF ssd8 0",
|
|
29980
|
+
"dy2 +- yE 0 t",
|
|
29981
|
+
"dy22 */ dy2 1 2",
|
|
29982
|
+
"dy3 */ h 1 20",
|
|
29983
|
+
"yD +- dy22 0 dy3",
|
|
29984
|
+
"dy4 */ hd6 1 1",
|
|
29985
|
+
"yP1 +- hd6 dy4 0",
|
|
29986
|
+
"xP1 val wd6",
|
|
29987
|
+
"dy5 */ hd6 1 2",
|
|
29988
|
+
"yP2 +- yF dy5 0",
|
|
29989
|
+
"xP2 val wd4"
|
|
29990
|
+
],
|
|
29991
|
+
"l t r b",
|
|
29992
|
+
[p("M l b Q xP1 yP1 xB yB L xC t L r yD L xE yE L xF yF Q xP2 yP2 l b Z")]
|
|
29993
|
+
);
|
|
29804
29994
|
var EXACT_ARROW_PRESET_DEFINITIONS = {
|
|
29805
29995
|
leftRightArrow: leftRightArrow2,
|
|
29806
29996
|
upDownArrow: upDownArrow2,
|
|
29807
29997
|
quadArrow: quadArrow2,
|
|
29808
29998
|
leftUpArrow: leftUpArrow2,
|
|
29809
|
-
leftRightUpArrow: leftRightUpArrow2
|
|
29999
|
+
leftRightUpArrow: leftRightUpArrow2,
|
|
30000
|
+
swooshArrow: swooshArrow3
|
|
29810
30001
|
};
|
|
29811
30002
|
|
|
29812
30003
|
// geometry/preset-shape-definitions-exact-circular.ts
|
|
@@ -29828,32 +30019,32 @@ function onEllipse(name2, rw, rh, ang) {
|
|
|
29828
30019
|
`${name2}y +- vc ${name2}dy 0`
|
|
29829
30020
|
];
|
|
29830
30021
|
}
|
|
29831
|
-
function head(
|
|
30022
|
+
function head(n3, baseAng, tipAng) {
|
|
29832
30023
|
const out = [
|
|
29833
|
-
...onEllipse(`${
|
|
29834
|
-
...onEllipse(`${
|
|
29835
|
-
`${
|
|
29836
|
-
`${
|
|
29837
|
-
`${
|
|
29838
|
-
`${
|
|
29839
|
-
`${
|
|
29840
|
-
`${
|
|
29841
|
-
`${
|
|
29842
|
-
`${
|
|
29843
|
-
`${
|
|
29844
|
-
`${
|
|
30024
|
+
...onEllipse(`${n3}H`, "rw3", "rh3", baseAng),
|
|
30025
|
+
...onEllipse(`${n3}A`, "rw3", "rh3", tipAng),
|
|
30026
|
+
`${n3}Gdx cos thh ${tipAng}`,
|
|
30027
|
+
`${n3}Gdy sin thh ${tipAng}`,
|
|
30028
|
+
`${n3}Gx +- ${n3}Hx ${n3}Gdx 0`,
|
|
30029
|
+
`${n3}Gy +- ${n3}Hy ${n3}Gdy 0`,
|
|
30030
|
+
`${n3}Bx +- ${n3}Hx 0 ${n3}Gdx`,
|
|
30031
|
+
`${n3}By +- ${n3}Hy 0 ${n3}Gdy`,
|
|
30032
|
+
`${n3}sx1 +- ${n3}Bx 0 hc`,
|
|
30033
|
+
`${n3}sy1 +- ${n3}By 0 vc`,
|
|
30034
|
+
`${n3}sx2 +- ${n3}Gx 0 hc`,
|
|
30035
|
+
`${n3}sy2 +- ${n3}Gy 0 vc`
|
|
29845
30036
|
];
|
|
29846
30037
|
for (const [k, rw, rh] of [
|
|
29847
30038
|
["F", "rw1", "rh1"],
|
|
29848
30039
|
["D", "rw2", "rh2"]
|
|
29849
30040
|
]) {
|
|
29850
|
-
const m = `${
|
|
30041
|
+
const m = `${n3}${k}`;
|
|
29851
30042
|
out.push(
|
|
29852
30043
|
`${m}r min ${rw} ${rh}`,
|
|
29853
|
-
`${m}x1 */ ${
|
|
29854
|
-
`${m}y1 */ ${
|
|
29855
|
-
`${m}x2 */ ${
|
|
29856
|
-
`${m}y2 */ ${
|
|
30044
|
+
`${m}x1 */ ${n3}sx1 ${m}r ${rw}`,
|
|
30045
|
+
`${m}y1 */ ${n3}sy1 ${m}r ${rh}`,
|
|
30046
|
+
`${m}x2 */ ${n3}sx2 ${m}r ${rw}`,
|
|
30047
|
+
`${m}y2 */ ${n3}sy2 ${m}r ${rh}`,
|
|
29857
30048
|
`${m}ex +- ${m}x2 0 ${m}x1`,
|
|
29858
30049
|
`${m}ey +- ${m}y2 0 ${m}y1`,
|
|
29859
30050
|
`${m}len mod ${m}ex ${m}ey 0`,
|
|
@@ -29907,7 +30098,7 @@ var BASE = [
|
|
|
29907
30098
|
"tAng at2 rI tq",
|
|
29908
30099
|
"hAng at2 Hdx Hdy"
|
|
29909
30100
|
];
|
|
29910
|
-
var headPath = (
|
|
30101
|
+
var headPath = (n3) => `L ${n3}Gx ${n3}Gy L ${n3}Ax ${n3}Ay L ${n3}Bx ${n3}By L ${n3}DX ${n3}DY`;
|
|
29911
30102
|
var circularArrow3 = exactDef(
|
|
29912
30103
|
"circularArrow",
|
|
29913
30104
|
{ adj1: 12500, adj2: 1142319, adj3: 20457681, adj4: 108e5, adj5: 12500 },
|
|
@@ -30526,19 +30717,19 @@ var EXACT_MISC_PRESET_DEFINITIONS = {
|
|
|
30526
30717
|
};
|
|
30527
30718
|
|
|
30528
30719
|
// geometry/preset-shape-definitions-exact-funnel.ts
|
|
30529
|
-
function newton(m,
|
|
30720
|
+
function newton(m, n3) {
|
|
30530
30721
|
return [
|
|
30531
|
-
`${
|
|
30532
|
-
`${
|
|
30533
|
-
`${
|
|
30534
|
-
`${
|
|
30535
|
-
`${
|
|
30536
|
-
`${
|
|
30537
|
-
`${
|
|
30538
|
-
`${
|
|
30539
|
-
`${
|
|
30540
|
-
`${
|
|
30541
|
-
`${
|
|
30722
|
+
`${n3}b1 */ ${m} b1 1`,
|
|
30723
|
+
`${n3}b2 */ ${m} b2 1`,
|
|
30724
|
+
`${n3}s1 mod a1 ${n3}b1 0`,
|
|
30725
|
+
`${n3}s2 mod a2 ${n3}b2 0`,
|
|
30726
|
+
`${n3}m1 */ ${m} dY 1`,
|
|
30727
|
+
`${n3}f0 +- ${n3}m1 ${n3}s2 ${n3}s1`,
|
|
30728
|
+
`${n3}t1 */ ${n3}b1 b1 ${n3}s1`,
|
|
30729
|
+
`${n3}t2 */ ${n3}b2 b2 ${n3}s2`,
|
|
30730
|
+
`${n3}d0 +- dY ${n3}t2 ${n3}t1`,
|
|
30731
|
+
`${n3}d1 */ ${n3}f0 1 ${n3}d0`,
|
|
30732
|
+
`${n3} +- ${m} 0 ${n3}d1`
|
|
30542
30733
|
];
|
|
30543
30734
|
}
|
|
30544
30735
|
var STEPS = ["mA", "mB", "mC", "mD", "mE", "mF"];
|
|
@@ -30555,7 +30746,7 @@ var funnel = exactDef(
|
|
|
30555
30746
|
"a1m +- a1 0 a2",
|
|
30556
30747
|
"m0 */ a1m 1 dY",
|
|
30557
30748
|
...newton("m0", "mA"),
|
|
30558
|
-
...STEPS.slice(1).flatMap((
|
|
30749
|
+
...STEPS.slice(1).flatMap((n3, i2) => newton(STEPS[i2], n3)),
|
|
30559
30750
|
"mb1 */ mF b1 1",
|
|
30560
30751
|
"mb2 */ mF b2 1",
|
|
30561
30752
|
"phi1 at2 a1 mb1",
|
|
@@ -30612,10 +30803,13 @@ var verticalScroll = exactDef(
|
|
|
30612
30803
|
p(
|
|
30613
30804
|
"M ch ch2 A ch2 ch2 10800000 5400000 L x6 t A ch2 ch2 16200000 10800000 L x4 ch L x4 y4 A ch2 ch2 0 5400000 L ch2 b A ch2 ch2 5400000 10800000 L ch y3 Z"
|
|
30614
30805
|
),
|
|
30615
|
-
p(
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30806
|
+
p(
|
|
30807
|
+
"M ch y4 A ch2 ch2 0 5400000 A ch2 ch2 5400000 10800000 A ch4 ch4 16200000 10800000 Z M x3b ch2 A ch2 ch2 0 5400000 A ch4 ch4 5400000 10800000 Z",
|
|
30808
|
+
{
|
|
30809
|
+
fill: "darkenLess",
|
|
30810
|
+
stroke: false
|
|
30811
|
+
}
|
|
30812
|
+
),
|
|
30619
30813
|
p(
|
|
30620
30814
|
"M x3 t A ch2 ch2 16200000 10800000 L x4 ch M ch2 y4 L ch y4 M x3b ch2 L x3 ch2 A ch4 ch4 16200000 -10800000",
|
|
30621
30815
|
{ fill: "none" }
|
|
@@ -30631,10 +30825,13 @@ var horizontalScroll = exactDef(
|
|
|
30631
30825
|
p(
|
|
30632
30826
|
"M ch2 ch A ch2 ch2 16200000 -5400000 L l x6 A ch2 ch2 10800000 -10800000 L ch x4 L y4 x4 A ch2 ch2 5400000 -5400000 L r ch2 A ch2 ch2 0 -10800000 L y3 ch Z"
|
|
30633
30827
|
),
|
|
30634
|
-
p(
|
|
30635
|
-
|
|
30636
|
-
|
|
30637
|
-
|
|
30828
|
+
p(
|
|
30829
|
+
"M y4 ch A ch2 ch2 5400000 -5400000 A ch2 ch2 0 -10800000 A ch4 ch4 10800000 -10800000 Z M ch2 x3b A ch2 ch2 5400000 -5400000 A ch4 ch4 0 -10800000 Z",
|
|
30830
|
+
{
|
|
30831
|
+
fill: "darkenLess",
|
|
30832
|
+
stroke: false
|
|
30833
|
+
}
|
|
30834
|
+
),
|
|
30638
30835
|
p(
|
|
30639
30836
|
"M l x3 A ch2 ch2 10800000 -10800000 L ch x4 M y4 ch2 L y4 ch M ch2 x3b L ch2 x3 A ch4 ch4 10800000 10800000",
|
|
30640
30837
|
{ fill: "none" }
|
|
@@ -30690,11 +30887,11 @@ var EXACT_LEFT_RIGHT_RIBBON_PRESET_DEFINITIONS = { leftRightRibbon };
|
|
|
30690
30887
|
|
|
30691
30888
|
// geometry/preset-shape-definitions-exact-ellipse-ribbons.ts
|
|
30692
30889
|
var AV = { adj1: 25e3, adj2: 5e4, adj3: 12500 };
|
|
30693
|
-
function para(
|
|
30694
|
-
return [`${
|
|
30890
|
+
function para(n3, x) {
|
|
30891
|
+
return [`${n3}q */ ${x} ${x} w`, `${n3}r +- ${x} 0 ${n3}q`, `${n3} */ f1 ${n3}r 1`];
|
|
30695
30892
|
}
|
|
30696
30893
|
function build2(name2, flip) {
|
|
30697
|
-
const y = (
|
|
30894
|
+
const y = (n3, off) => flip ? `${n3} +- b 0 ${off}` : `${n3} +- t ${off} 0`;
|
|
30698
30895
|
const gd17 = [
|
|
30699
30896
|
"a1 pin 0 adj1 100000",
|
|
30700
30897
|
"a2 pin 25000 adj2 75000",
|
|
@@ -31827,8 +32024,8 @@ function ray(baseX1, baseY1, baseX2, baseY2, apexX, apexY) {
|
|
|
31827
32024
|
]
|
|
31828
32025
|
};
|
|
31829
32026
|
}
|
|
31830
|
-
function starTrigTable(
|
|
31831
|
-
const total =
|
|
32027
|
+
function starTrigTable(n3) {
|
|
32028
|
+
const total = n3 * 2;
|
|
31832
32029
|
const step = Math.PI * 2 / total;
|
|
31833
32030
|
const start = -Math.PI / 2;
|
|
31834
32031
|
const result = [];
|
|
@@ -31841,8 +32038,8 @@ function starTrigTable(n2) {
|
|
|
31841
32038
|
}
|
|
31842
32039
|
return result;
|
|
31843
32040
|
}
|
|
31844
|
-
function buildStarN(
|
|
31845
|
-
const trig = starTrigTable(
|
|
32041
|
+
function buildStarN(n3, defaultAdj, hf, vf) {
|
|
32042
|
+
const trig = starTrigTable(n3);
|
|
31846
32043
|
const gdLst = [
|
|
31847
32044
|
gd9("a", `pin 0 adj 50000`),
|
|
31848
32045
|
gd9("swd2", hf === void 0 ? "*/ wd2 1 1" : "*/ wd2 hf 100000"),
|
|
@@ -31867,7 +32064,7 @@ function buildStarN(n2, defaultAdj, hf, vf) {
|
|
|
31867
32064
|
}
|
|
31868
32065
|
commands.push({ kind: "close" });
|
|
31869
32066
|
return {
|
|
31870
|
-
name: `star${
|
|
32067
|
+
name: `star${n3}`,
|
|
31871
32068
|
avLst: {
|
|
31872
32069
|
adj: defaultAdj,
|
|
31873
32070
|
...hf === void 0 ? {} : { hf },
|
|
@@ -38540,7 +38737,7 @@ function fontRule(node) {
|
|
|
38540
38737
|
}
|
|
38541
38738
|
function hasFontLength(node) {
|
|
38542
38739
|
return flattenEngineTree(node).some(
|
|
38543
|
-
(
|
|
38740
|
+
(n3) => n3.constraints.some((c2) => LENGTHS.has(c2.type) && FONT_TYPES.has(c2.refType))
|
|
38544
38741
|
);
|
|
38545
38742
|
}
|
|
38546
38743
|
function fontSearchPlan(node) {
|
|
@@ -38572,17 +38769,17 @@ function fits(node, context) {
|
|
|
38572
38769
|
if (!box) {
|
|
38573
38770
|
return true;
|
|
38574
38771
|
}
|
|
38575
|
-
for (const
|
|
38576
|
-
const b =
|
|
38577
|
-
if (!b ||
|
|
38772
|
+
for (const n3 of flattenEngineTree(node)) {
|
|
38773
|
+
const b = n3.box;
|
|
38774
|
+
if (!b || n3.alg.type === "conn" || !(b.w > 0) || !(b.h > 0)) {
|
|
38578
38775
|
continue;
|
|
38579
38776
|
}
|
|
38580
38777
|
if (b.x < box.x - SPILL_TOLERANCE_PT || b.y < box.y - SPILL_TOLERANCE_PT || b.x + b.w > box.x + box.w + SPILL_TOLERANCE_PT || b.y + b.h > box.y + box.h + SPILL_TOLERANCE_PT) {
|
|
38581
38778
|
return false;
|
|
38582
38779
|
}
|
|
38583
|
-
const font = layoutFontOf(
|
|
38584
|
-
const text3 = font === void 0 ? void 0 : context.textOf(
|
|
38585
|
-
if (font !== void 0 && text3 && !textFitsAt(
|
|
38780
|
+
const font = layoutFontOf(n3);
|
|
38781
|
+
const text3 = font === void 0 ? void 0 : context.textOf(n3);
|
|
38782
|
+
if (font !== void 0 && text3 && !textFitsAt(n3, text3, font, context.metrics, layoutFontOf)) {
|
|
38586
38783
|
return false;
|
|
38587
38784
|
}
|
|
38588
38785
|
}
|
|
@@ -38590,14 +38787,14 @@ function fits(node, context) {
|
|
|
38590
38787
|
}
|
|
38591
38788
|
function recordGrowth(node) {
|
|
38592
38789
|
const nodes = flattenEngineTree(node);
|
|
38593
|
-
for (const
|
|
38594
|
-
const grown2 =
|
|
38595
|
-
if (grown2 !== void 0 && canGrow(
|
|
38596
|
-
|
|
38790
|
+
for (const n3 of nodes) {
|
|
38791
|
+
const grown2 = n3.box?.h;
|
|
38792
|
+
if (grown2 !== void 0 && canGrow(n3, "h") && grown2 > (n3.growFloor?.h ?? -Infinity)) {
|
|
38793
|
+
n3.growFloor = { ...n3.growFloor, h: grown2 };
|
|
38597
38794
|
}
|
|
38598
38795
|
}
|
|
38599
|
-
for (const
|
|
38600
|
-
for (const group2 of
|
|
38796
|
+
for (const n3 of nodes) {
|
|
38797
|
+
for (const group2 of n3.groups) {
|
|
38601
38798
|
if (group2.type !== "h" && group2.type !== "w") {
|
|
38602
38799
|
continue;
|
|
38603
38800
|
}
|
|
@@ -38614,11 +38811,11 @@ function recordGrowth(node) {
|
|
|
38614
38811
|
}
|
|
38615
38812
|
}
|
|
38616
38813
|
function resetCandidate(node) {
|
|
38617
|
-
for (const
|
|
38618
|
-
|
|
38619
|
-
if (
|
|
38620
|
-
|
|
38621
|
-
|
|
38814
|
+
for (const n3 of flattenEngineTree(node)) {
|
|
38815
|
+
n3.growFloor = void 0;
|
|
38816
|
+
if (n3 !== node) {
|
|
38817
|
+
n3.minValues.clear();
|
|
38818
|
+
n3.maxValues.clear();
|
|
38622
38819
|
}
|
|
38623
38820
|
}
|
|
38624
38821
|
}
|
|
@@ -39386,10 +39583,10 @@ function arrangeCycle(node) {
|
|
|
39386
39583
|
}
|
|
39387
39584
|
const params = node.alg.params;
|
|
39388
39585
|
const hub = params.ctrShpMap === "fNode" ? groups.shift() : void 0;
|
|
39389
|
-
const
|
|
39586
|
+
const n3 = groups.length;
|
|
39390
39587
|
const cx0 = box.x + box.w / 2;
|
|
39391
39588
|
const cy0 = box.y + box.h / 2;
|
|
39392
|
-
if (
|
|
39589
|
+
if (n3 === 0) {
|
|
39393
39590
|
if (hub) {
|
|
39394
39591
|
placeGroup(hub, box.x, box.y, box.w, box.h);
|
|
39395
39592
|
}
|
|
@@ -39402,7 +39599,7 @@ function arrangeCycle(node) {
|
|
|
39402
39599
|
const parsedSpan = Number(params.spanAng);
|
|
39403
39600
|
const spanAng = Number.isFinite(parsedSpan) ? parsedSpan : 360;
|
|
39404
39601
|
const rotPath = params.rotPath === "alongPath";
|
|
39405
|
-
if (
|
|
39602
|
+
if (n3 === 1) {
|
|
39406
39603
|
const w0 = box.w;
|
|
39407
39604
|
const h0 = Math.min(box.h, box.w * heightOverWidth);
|
|
39408
39605
|
placeGroupCentered(groups[0], cx0, cy0, w0, h0);
|
|
@@ -39416,7 +39613,7 @@ function arrangeCycle(node) {
|
|
|
39416
39613
|
return;
|
|
39417
39614
|
}
|
|
39418
39615
|
const full = Math.abs(spanAng) >= 360;
|
|
39419
|
-
const step = full ? spanAng /
|
|
39616
|
+
const step = full ? spanAng / n3 : spanAng / (n3 - 1);
|
|
39420
39617
|
const halfStepRad = Math.abs(step) * DEG_TO_RAD / 2;
|
|
39421
39618
|
const sinHalf = Math.sin(halfStepRad);
|
|
39422
39619
|
const r0 = sinHalf > 1e-6 ? (1 + gap) / (2 * sinHalf) : 0;
|
|
@@ -39955,8 +40152,8 @@ function sanitizeLvlNode(lvlNode) {
|
|
|
39955
40152
|
function arrangePyra(node) {
|
|
39956
40153
|
const box = node.box;
|
|
39957
40154
|
const children2 = contentChildren(node);
|
|
39958
|
-
const
|
|
39959
|
-
if (!box ||
|
|
40155
|
+
const n3 = children2.length;
|
|
40156
|
+
if (!box || n3 === 0) {
|
|
39960
40157
|
return;
|
|
39961
40158
|
}
|
|
39962
40159
|
const lvlNodeName = node.alg.params.pyraLvlNode ?? "level";
|
|
@@ -39968,12 +40165,12 @@ function arrangePyra(node) {
|
|
|
39968
40165
|
}
|
|
39969
40166
|
const inverted = node.alg.params.linDir === "fromT";
|
|
39970
40167
|
const gap = Math.max(0, node.values.get("sibSp") ?? node.values.get("sp") ?? 0);
|
|
39971
|
-
const bandH = Math.max(0, (box.h - gap * (
|
|
40168
|
+
const bandH = Math.max(0, (box.h - gap * (n3 - 1)) / n3);
|
|
39972
40169
|
const bandCx = box.x + box.w / 2;
|
|
39973
40170
|
children2.forEach((child6, i2) => {
|
|
39974
40171
|
const top = box.y + i2 * (bandH + gap);
|
|
39975
|
-
const effectiveI = inverted ?
|
|
39976
|
-
const halfWide = box.w * (effectiveI + 1) /
|
|
40172
|
+
const effectiveI = inverted ? n3 - 1 - i2 : i2;
|
|
40173
|
+
const halfWide = box.w * (effectiveI + 1) / n3 / 2;
|
|
39977
40174
|
child6.box = { x: bandCx - halfWide, y: top, w: halfWide * 2, h: bandH };
|
|
39978
40175
|
});
|
|
39979
40176
|
}
|
|
@@ -39991,7 +40188,7 @@ function applyPyraAccentSplit(node) {
|
|
|
39991
40188
|
const txName = node.alg.params.pyraAcctTxNode ?? "acctTx";
|
|
39992
40189
|
const inverted = node.alg.params.linDir === "fromT";
|
|
39993
40190
|
const items = contentChildren(node);
|
|
39994
|
-
const
|
|
40191
|
+
const n3 = items.length;
|
|
39995
40192
|
const bandCx = box.x + box.w / 2;
|
|
39996
40193
|
items.forEach((item2, i2) => {
|
|
39997
40194
|
const itemBox = item2.box;
|
|
@@ -40019,8 +40216,8 @@ function applyPyraAccentSplit(node) {
|
|
|
40019
40216
|
h: descendant.box.h
|
|
40020
40217
|
};
|
|
40021
40218
|
}
|
|
40022
|
-
const effectiveI = inverted ?
|
|
40023
|
-
const halfNarrow = box.w * effectiveI /
|
|
40219
|
+
const effectiveI = inverted ? n3 - 1 - i2 : i2;
|
|
40220
|
+
const halfNarrow = box.w * effectiveI / n3 / 2;
|
|
40024
40221
|
const accentLeft = scaleFromAnchor(bandCx + halfNarrow, box.x, scale);
|
|
40025
40222
|
const accentRight = box.x + box.w;
|
|
40026
40223
|
for (const root of accentRoots) {
|
|
@@ -40090,8 +40287,8 @@ function measure3(node, box, cells, spacer, row2) {
|
|
|
40090
40287
|
);
|
|
40091
40288
|
return { cellW, cellH, along, across, cols };
|
|
40092
40289
|
}
|
|
40093
|
-
function fits2(fit2,
|
|
40094
|
-
const lines2 = Math.ceil(
|
|
40290
|
+
function fits2(fit2, n3, box, row2) {
|
|
40291
|
+
const lines2 = Math.ceil(n3 / fit2.cols);
|
|
40095
40292
|
const lineLen = fit2.cols * (row2 ? fit2.cellW : fit2.cellH) + (fit2.cols - 1) * fit2.along;
|
|
40096
40293
|
const across = lines2 * (row2 ? fit2.cellH : fit2.cellW) + (lines2 - 1) * fit2.across;
|
|
40097
40294
|
return row2 ? lineLen <= box.w + 1e-6 && across <= box.h + 1e-6 : lineLen <= box.h + 1e-6 && across <= box.w + 1e-6;
|
|
@@ -40171,19 +40368,19 @@ function gridSize(dims, m, row2) {
|
|
|
40171
40368
|
const acrossLen = lines2 * (row2 ? m.cellH : m.cellW) + (lines2 - 1) * m.across;
|
|
40172
40369
|
return row2 ? { w: alongLen, h: acrossLen } : { w: acrossLen, h: alongLen };
|
|
40173
40370
|
}
|
|
40174
|
-
function dimsFor(lineLen,
|
|
40175
|
-
const lines2 = Math.max(1, Math.ceil(
|
|
40371
|
+
function dimsFor(lineLen, n3, row2) {
|
|
40372
|
+
const lines2 = Math.max(1, Math.ceil(n3 / lineLen));
|
|
40176
40373
|
return row2 ? { cols: lineLen, rows: lines2 } : { cols: lines2, rows: lineLen };
|
|
40177
40374
|
}
|
|
40178
|
-
function chooseDims(node,
|
|
40375
|
+
function chooseDims(node, n3, m, box, row2) {
|
|
40179
40376
|
const fixed = node.values.get("bkPtFixedVal") ?? Number(node.alg.params.bkPtFixedVal);
|
|
40180
40377
|
if (node.alg.params.bkpt === "fixed" && Number.isFinite(fixed) && fixed > 0) {
|
|
40181
|
-
return dimsFor(Math.min(
|
|
40378
|
+
return dimsFor(Math.min(n3, Math.round(fixed)), n3, row2);
|
|
40182
40379
|
}
|
|
40183
|
-
let best = dimsFor(
|
|
40380
|
+
let best = dimsFor(n3, n3, row2);
|
|
40184
40381
|
let bestScale = -Infinity;
|
|
40185
|
-
for (let lineLen =
|
|
40186
|
-
const dims = dimsFor(lineLen,
|
|
40382
|
+
for (let lineLen = n3; lineLen >= 1; lineLen--) {
|
|
40383
|
+
const dims = dimsFor(lineLen, n3, row2);
|
|
40187
40384
|
const size = gridSize(dims, m, row2);
|
|
40188
40385
|
const scale = Math.min(box.w / Math.max(1e-9, size.w), box.h / Math.max(1e-9, size.h));
|
|
40189
40386
|
if (scale > bestScale + 1e-9) {
|
|
@@ -40193,7 +40390,7 @@ function chooseDims(node, n2, m, box, row2) {
|
|
|
40193
40390
|
}
|
|
40194
40391
|
if (node.alg.params.bkpt === "bal") {
|
|
40195
40392
|
const lines2 = row2 ? best.rows : best.cols;
|
|
40196
|
-
return dimsFor(Math.ceil(
|
|
40393
|
+
return dimsFor(Math.ceil(n3 / lines2), n3, row2);
|
|
40197
40394
|
}
|
|
40198
40395
|
return best;
|
|
40199
40396
|
}
|
|
@@ -40220,8 +40417,8 @@ function arrangeSnake(node) {
|
|
|
40220
40417
|
if (!(m.cellW > 0) || !(m.cellH > 0)) {
|
|
40221
40418
|
return;
|
|
40222
40419
|
}
|
|
40223
|
-
const
|
|
40224
|
-
const dims = ruled ? dimsFor(ruled.cols,
|
|
40420
|
+
const n3 = cells.length;
|
|
40421
|
+
const dims = ruled ? dimsFor(ruled.cols, n3, row2) : chooseDims(node, n3, m, box, row2);
|
|
40225
40422
|
const size = gridSize(dims, m, row2);
|
|
40226
40423
|
const scale = Math.min(1, box.w / size.w, box.h / size.h);
|
|
40227
40424
|
const cw = m.cellW * scale;
|
|
@@ -40237,7 +40434,7 @@ function arrangeSnake(node) {
|
|
|
40237
40434
|
const reverseAlternate = params.contDir === "revDir";
|
|
40238
40435
|
cells.forEach((cell2, i2) => {
|
|
40239
40436
|
const line4 = Math.floor(i2 / lineLen);
|
|
40240
|
-
const inLine = Math.min(lineLen,
|
|
40437
|
+
const inLine = Math.min(lineLen, n3 - line4 * lineLen);
|
|
40241
40438
|
const reversedLine = reverseAlternate && line4 % 2 === 1;
|
|
40242
40439
|
const pos = reversedLine ? lineLen - 1 - i2 % lineLen : i2 % lineLen;
|
|
40243
40440
|
const centre = params.off === "ctr" ? (lineLen - inLine) / 2 : 0;
|
|
@@ -40537,9 +40734,9 @@ function allNodes(entries) {
|
|
|
40537
40734
|
roots2.add(top);
|
|
40538
40735
|
}
|
|
40539
40736
|
const out = [];
|
|
40540
|
-
const visit = (
|
|
40541
|
-
out.push(
|
|
40542
|
-
|
|
40737
|
+
const visit = (n3) => {
|
|
40738
|
+
out.push(n3);
|
|
40739
|
+
n3.children.forEach(visit);
|
|
40543
40740
|
};
|
|
40544
40741
|
roots2.forEach(visit);
|
|
40545
40742
|
return out;
|
|
@@ -40808,7 +41005,7 @@ function isRenderable(node, presented, literalText) {
|
|
|
40808
41005
|
if (literalText && literalText.trim().length > 0) {
|
|
40809
41006
|
return true;
|
|
40810
41007
|
}
|
|
40811
|
-
return presented.some((
|
|
41008
|
+
return presented.some((n3) => (n3?.text ?? "").trim().length > 0);
|
|
40812
41009
|
}
|
|
40813
41010
|
|
|
40814
41011
|
// diagram/engine/engine-to-result.ts
|
|
@@ -40929,7 +41126,7 @@ function runEngineLayout(smartArtData, containerBounds, nodes, palette, style) {
|
|
|
40929
41126
|
if (!rawXmlText || !(widthPt > 0) || !(heightPt > 0)) {
|
|
40930
41127
|
return void 0;
|
|
40931
41128
|
}
|
|
40932
|
-
const nodeById = new Map(nodes.map((
|
|
41129
|
+
const nodeById = new Map(nodes.map((n3) => [n3.id, n3]));
|
|
40933
41130
|
const metrics = textMetricsFor(resolveFontTable(smartArtData.themeMinorFont));
|
|
40934
41131
|
const context = {
|
|
40935
41132
|
textOf: (node) => nodeTextFor(node, sourceIdsOf(node), transitionLabelOf(node), nodeById),
|
|
@@ -41472,11 +41669,11 @@ function navigateAxisHop(current, axis, nodes, childrenOf, parentOf, roots2) {
|
|
|
41472
41669
|
}
|
|
41473
41670
|
const excluded = new Set(
|
|
41474
41671
|
(axis === "follow" ? descendantsOf(node, childrenOf) : ancestorsOf(node, parentOf)).map(
|
|
41475
|
-
(
|
|
41672
|
+
(n3) => n3.id
|
|
41476
41673
|
)
|
|
41477
41674
|
);
|
|
41478
41675
|
const range2 = axis === "follow" ? nodes.slice(docIndex + 1) : nodes.slice(0, docIndex);
|
|
41479
|
-
addAll(range2.filter((
|
|
41676
|
+
addAll(range2.filter((n3) => !excluded.has(n3.id)));
|
|
41480
41677
|
break;
|
|
41481
41678
|
}
|
|
41482
41679
|
case "root": {
|
|
@@ -41508,7 +41705,7 @@ function selectRange(nodes, start, count) {
|
|
|
41508
41705
|
return nodes.slice(zeroBasedStart, zeroBasedStart + take);
|
|
41509
41706
|
}
|
|
41510
41707
|
function applyPointTypeAndRange(nodes, pointType2, start, count) {
|
|
41511
|
-
const filtered = pointType2 ? nodes.filter((
|
|
41708
|
+
const filtered = pointType2 ? nodes.filter((n3) => pointTypeMatches(n3, pointType2)) : nodes;
|
|
41512
41709
|
return selectRange(filtered, start, count);
|
|
41513
41710
|
}
|
|
41514
41711
|
function resolveAxisNodes(nodes, axis, pointTypes, start, count, context) {
|
|
@@ -41522,7 +41719,7 @@ function resolveAxisNodes(nodes, axis, pointTypes, start, count, context) {
|
|
|
41522
41719
|
if (axis[0] === "root" && axis.length > 1 && axis[1] !== "ch") {
|
|
41523
41720
|
return void 0;
|
|
41524
41721
|
}
|
|
41525
|
-
const byId = new Map(nodes.map((
|
|
41722
|
+
const byId = new Map(nodes.map((n3) => [n3.id, n3]));
|
|
41526
41723
|
const childrenOf = /* @__PURE__ */ new Map();
|
|
41527
41724
|
const parentOf = /* @__PURE__ */ new Map();
|
|
41528
41725
|
for (const node of nodes) {
|
|
@@ -41537,7 +41734,7 @@ function resolveAxisNodes(nodes, axis, pointTypes, start, count, context) {
|
|
|
41537
41734
|
}
|
|
41538
41735
|
}
|
|
41539
41736
|
}
|
|
41540
|
-
const roots2 = nodes.filter((
|
|
41737
|
+
const roots2 = nodes.filter((n3) => !n3.parentId || !byId.has(n3.parentId));
|
|
41541
41738
|
let current;
|
|
41542
41739
|
let nextHop;
|
|
41543
41740
|
if (axis[0] === "root" && axis.length > 1) {
|
|
@@ -41594,7 +41791,7 @@ function resolveAxisMaxDepth(nodes, axis, pointTypes, start, count, anchor) {
|
|
|
41594
41791
|
if (anchor.length === 0) {
|
|
41595
41792
|
return void 0;
|
|
41596
41793
|
}
|
|
41597
|
-
const byId = new Map(nodes.map((
|
|
41794
|
+
const byId = new Map(nodes.map((n3) => [n3.id, n3]));
|
|
41598
41795
|
let max = 0;
|
|
41599
41796
|
for (const anchorPoint of anchor) {
|
|
41600
41797
|
const resolved = resolveAxisNodes(nodes, axis, pointTypes, start, count, [anchorPoint]);
|
|
@@ -42775,14 +42972,14 @@ function selectArrangedNodes(node, flat, roots2) {
|
|
|
42775
42972
|
// diagram/layout/smartart-tree.ts
|
|
42776
42973
|
function buildForest(nodes) {
|
|
42777
42974
|
const map = /* @__PURE__ */ new Map();
|
|
42778
|
-
for (const
|
|
42779
|
-
map.set(
|
|
42975
|
+
for (const n3 of nodes) {
|
|
42976
|
+
map.set(n3.id, { node: n3, children: [] });
|
|
42780
42977
|
}
|
|
42781
42978
|
const roots2 = [];
|
|
42782
|
-
for (const
|
|
42783
|
-
const tn = map.get(
|
|
42784
|
-
if (
|
|
42785
|
-
map.get(
|
|
42979
|
+
for (const n3 of nodes) {
|
|
42980
|
+
const tn = map.get(n3.id);
|
|
42981
|
+
if (n3.parentId && map.has(n3.parentId)) {
|
|
42982
|
+
map.get(n3.parentId).children.push(tn);
|
|
42786
42983
|
} else {
|
|
42787
42984
|
roots2.push(tn);
|
|
42788
42985
|
}
|
|
@@ -42790,16 +42987,16 @@ function buildForest(nodes) {
|
|
|
42790
42987
|
return roots2;
|
|
42791
42988
|
}
|
|
42792
42989
|
function buildTree(nodes) {
|
|
42793
|
-
const hasNestedChildren = nodes.some((
|
|
42990
|
+
const hasNestedChildren = nodes.some((n3) => n3.children !== void 0 && n3.children.length > 0);
|
|
42794
42991
|
if (!hasNestedChildren) {
|
|
42795
42992
|
return buildForest(nodes);
|
|
42796
42993
|
}
|
|
42797
|
-
const toTreeNode = (
|
|
42798
|
-
node:
|
|
42799
|
-
children: (
|
|
42994
|
+
const toTreeNode = (n3) => ({
|
|
42995
|
+
node: n3,
|
|
42996
|
+
children: (n3.children ?? []).map(toTreeNode)
|
|
42800
42997
|
});
|
|
42801
|
-
const allIds = new Set(nodes.map((
|
|
42802
|
-
const roots2 = nodes.filter((
|
|
42998
|
+
const allIds = new Set(nodes.map((n3) => n3.id));
|
|
42999
|
+
const roots2 = nodes.filter((n3) => !n3.parentId || !allIds.has(n3.parentId));
|
|
42803
43000
|
return roots2.map(toTreeNode);
|
|
42804
43001
|
}
|
|
42805
43002
|
var MAX_TREE_DEPTH = 256;
|
|
@@ -43460,10 +43657,10 @@ function buildCycleHubBox(hubNode, ring, totalNodeCount, inputs, hubFontFit) {
|
|
|
43460
43657
|
}
|
|
43461
43658
|
|
|
43462
43659
|
// diagram/layout/smartart-layout-interpreter-cycle-connectors.ts
|
|
43463
|
-
function buildCycleRingConnectors(ring,
|
|
43660
|
+
function buildCycleRingConnectors(ring, n3, connectorCount, ringCentre, elementId) {
|
|
43464
43661
|
return Array.from({ length: connectorCount }, (_, i2) => {
|
|
43465
43662
|
const from = ring.centers[i2];
|
|
43466
|
-
const to = ring.centers[(i2 + 1) %
|
|
43663
|
+
const to = ring.centers[(i2 + 1) % n3];
|
|
43467
43664
|
const midX = (from.x + to.x) / 2;
|
|
43468
43665
|
const midY = (from.y + to.y) / 2;
|
|
43469
43666
|
const pullRadius = Math.max(ring.nodeWidth, ring.nodeHeight) / 2;
|
|
@@ -44018,9 +44215,9 @@ function resolveRingAxisOffset(dimension2, boundSize, scale, values) {
|
|
|
44018
44215
|
|
|
44019
44216
|
// diagram/layout/smartart-layout-interpreter-cycle-ring.ts
|
|
44020
44217
|
var DEG_TO_RAD4 = Math.PI / 180;
|
|
44021
|
-
function degenerateRingLayout(
|
|
44218
|
+
function degenerateRingLayout(n3, heightOverWidth, box) {
|
|
44022
44219
|
const boxCentre = { x: box.width / 2, y: box.height / 2 };
|
|
44023
|
-
if (
|
|
44220
|
+
if (n3 <= 0) {
|
|
44024
44221
|
return {
|
|
44025
44222
|
centers: [],
|
|
44026
44223
|
nodeWidth: 0,
|
|
@@ -44030,7 +44227,7 @@ function degenerateRingLayout(n2, heightOverWidth, box) {
|
|
|
44030
44227
|
hubHalfHeight: 0
|
|
44031
44228
|
};
|
|
44032
44229
|
}
|
|
44033
|
-
if (
|
|
44230
|
+
if (n3 === 1) {
|
|
44034
44231
|
const w0 = box.width;
|
|
44035
44232
|
const h0 = Math.min(box.height, box.width * Math.max(0.01, heightOverWidth));
|
|
44036
44233
|
return {
|
|
@@ -44044,8 +44241,8 @@ function degenerateRingLayout(n2, heightOverWidth, box) {
|
|
|
44044
44241
|
}
|
|
44045
44242
|
return void 0;
|
|
44046
44243
|
}
|
|
44047
|
-
function ringLayoutForGapFactor(
|
|
44048
|
-
if (
|
|
44244
|
+
function ringLayoutForGapFactor(n3, stAngDeg, spanDeg, gapFactor, heightOverWidth, box, hubGeometry, sibTransBulgeRatio, knownNodeWidthPx) {
|
|
44245
|
+
if (n3 === 1 && hubGeometry && knownNodeWidthPx !== void 0 && knownNodeWidthPx > 0) {
|
|
44049
44246
|
return nestedHubSatelliteRingLayout(
|
|
44050
44247
|
stAngDeg,
|
|
44051
44248
|
heightOverWidth,
|
|
@@ -44054,12 +44251,12 @@ function ringLayoutForGapFactor(n2, stAngDeg, spanDeg, gapFactor, heightOverWidt
|
|
|
44054
44251
|
knownNodeWidthPx
|
|
44055
44252
|
);
|
|
44056
44253
|
}
|
|
44057
|
-
const degenerate = degenerateRingLayout(
|
|
44254
|
+
const degenerate = degenerateRingLayout(n3, heightOverWidth, box);
|
|
44058
44255
|
if (degenerate) {
|
|
44059
44256
|
return degenerate;
|
|
44060
44257
|
}
|
|
44061
44258
|
const full = Math.abs(spanDeg) >= 360;
|
|
44062
|
-
const step = full ? spanDeg /
|
|
44259
|
+
const step = full ? spanDeg / n3 : spanDeg / (n3 - 1);
|
|
44063
44260
|
const halfStepRad = Math.abs(step) * DEG_TO_RAD4 / 2;
|
|
44064
44261
|
const clampedGap = Math.max(0, gapFactor);
|
|
44065
44262
|
const sinHalf = Math.sin(halfStepRad);
|
|
@@ -44069,7 +44266,7 @@ function ringLayoutForGapFactor(n2, stAngDeg, spanDeg, gapFactor, heightOverWidt
|
|
|
44069
44266
|
const r0Hub = hubHalfWidth + hubGeometry.gapRatio + 0.5;
|
|
44070
44267
|
r0 = Math.max(r0, r0Hub);
|
|
44071
44268
|
}
|
|
44072
|
-
const natural = Array.from({ length:
|
|
44269
|
+
const natural = Array.from({ length: n3 }, (_, i2) => {
|
|
44073
44270
|
const angleRad = (stAngDeg + i2 * step - 90) * DEG_TO_RAD4;
|
|
44074
44271
|
return { x: r0 * Math.cos(angleRad), y: r0 * Math.sin(angleRad) };
|
|
44075
44272
|
});
|
|
@@ -44098,10 +44295,10 @@ function ringLayoutForGapFactor(n2, stAngDeg, spanDeg, gapFactor, heightOverWidt
|
|
|
44098
44295
|
hubHalfHeight: naturalHubRadius * scaleY
|
|
44099
44296
|
};
|
|
44100
44297
|
}
|
|
44101
|
-
function computeCycleRingLayout(
|
|
44102
|
-
const nestedHubSatellite =
|
|
44298
|
+
function computeCycleRingLayout(n3, stAngDeg, spanDeg, minGapRatio, heightOverWidth, box, absoluteGapPx, hubGeometry, absoluteHubGapPx, sibTransBulgeRatio, knownNodeWidthPx) {
|
|
44299
|
+
const nestedHubSatellite = n3 === 1 && hubGeometry && knownNodeWidthPx !== void 0 && knownNodeWidthPx > 0;
|
|
44103
44300
|
if (!nestedHubSatellite) {
|
|
44104
|
-
const degenerate = degenerateRingLayout(
|
|
44301
|
+
const degenerate = degenerateRingLayout(n3, heightOverWidth, box);
|
|
44105
44302
|
if (degenerate) {
|
|
44106
44303
|
return degenerate;
|
|
44107
44304
|
}
|
|
@@ -44110,7 +44307,7 @@ function computeCycleRingLayout(n2, stAngDeg, spanDeg, minGapRatio, heightOverWi
|
|
|
44110
44307
|
const needsHubGapIteration = absoluteHubGapPx !== void 0 && absoluteHubGapPx > 0 && hubGeometry !== void 0;
|
|
44111
44308
|
if (!needsGapIteration && !needsHubGapIteration) {
|
|
44112
44309
|
return ringLayoutForGapFactor(
|
|
44113
|
-
|
|
44310
|
+
n3,
|
|
44114
44311
|
stAngDeg,
|
|
44115
44312
|
spanDeg,
|
|
44116
44313
|
minGapRatio,
|
|
@@ -44125,7 +44322,7 @@ function computeCycleRingLayout(n2, stAngDeg, spanDeg, minGapRatio, heightOverWi
|
|
|
44125
44322
|
let hub = hubGeometry;
|
|
44126
44323
|
for (let iteration = 0; iteration < 20; iteration += 1) {
|
|
44127
44324
|
const candidate = ringLayoutForGapFactor(
|
|
44128
|
-
|
|
44325
|
+
n3,
|
|
44129
44326
|
stAngDeg,
|
|
44130
44327
|
spanDeg,
|
|
44131
44328
|
gapFactor,
|
|
@@ -44147,7 +44344,7 @@ function computeCycleRingLayout(n2, stAngDeg, spanDeg, minGapRatio, heightOverWi
|
|
|
44147
44344
|
}
|
|
44148
44345
|
}
|
|
44149
44346
|
return ringLayoutForGapFactor(
|
|
44150
|
-
|
|
44347
|
+
n3,
|
|
44151
44348
|
stAngDeg,
|
|
44152
44349
|
spanDeg,
|
|
44153
44350
|
gapFactor,
|
|
@@ -44187,11 +44384,11 @@ function arrangeCycle2(plan, nodes, box, palette, style, elementId, index = EMPT
|
|
|
44187
44384
|
box,
|
|
44188
44385
|
sizeBox
|
|
44189
44386
|
);
|
|
44190
|
-
const
|
|
44387
|
+
const n3 = ringNodes.length;
|
|
44191
44388
|
const startDeg = numericParam(plan.node, "stAng", 0);
|
|
44192
44389
|
const spanDeg = numericParam(plan.node, "spanAng", 360);
|
|
44193
44390
|
const ring = computeCycleRingLayout(
|
|
44194
|
-
|
|
44391
|
+
n3,
|
|
44195
44392
|
startDeg,
|
|
44196
44393
|
spanDeg,
|
|
44197
44394
|
minGapRatio,
|
|
@@ -44204,12 +44401,12 @@ function arrangeCycle2(plan, nodes, box, palette, style, elementId, index = EMPT
|
|
|
44204
44401
|
knownNodeWidthPx
|
|
44205
44402
|
);
|
|
44206
44403
|
const full = Math.abs(spanDeg) >= 360;
|
|
44207
|
-
const connectorCount =
|
|
44208
|
-
const ringStepDeg =
|
|
44404
|
+
const connectorCount = n3 > 0 ? full ? n3 : Math.max(0, n3 - 1) : 0;
|
|
44405
|
+
const ringStepDeg = n3 > 0 ? full ? spanDeg / n3 : spanDeg / Math.max(1, n3 - 1) : 0;
|
|
44209
44406
|
const ringCentre = ring.hubCenter;
|
|
44210
44407
|
const connectors2 = buildCycleRingConnectors(
|
|
44211
44408
|
ring,
|
|
44212
|
-
|
|
44409
|
+
n3,
|
|
44213
44410
|
connectorCount,
|
|
44214
44411
|
ringCentre,
|
|
44215
44412
|
elementId
|
|
@@ -44387,12 +44584,12 @@ function buildHubRenderedNode(arranger, hubNode, box, palette, style, elementId,
|
|
|
44387
44584
|
|
|
44388
44585
|
// diagram/layout/smartart-node-tree-axis.ts
|
|
44389
44586
|
function topLevelSmartArtNodes(nodes) {
|
|
44390
|
-
const hasNestedChildren = nodes.some((
|
|
44587
|
+
const hasNestedChildren = nodes.some((n3) => n3.children !== void 0 && n3.children.length > 0);
|
|
44391
44588
|
if (hasNestedChildren) {
|
|
44392
44589
|
return nodes;
|
|
44393
44590
|
}
|
|
44394
|
-
const ids = new Set(nodes.map((
|
|
44395
|
-
return nodes.filter((
|
|
44591
|
+
const ids = new Set(nodes.map((n3) => n3.id));
|
|
44592
|
+
return nodes.filter((n3) => !n3.parentId || !ids.has(n3.parentId));
|
|
44396
44593
|
}
|
|
44397
44594
|
function smartArtDescendantsWithText(node, childrenOf) {
|
|
44398
44595
|
const out = [];
|
|
@@ -44415,15 +44612,15 @@ function smartArtDescendantsWithText(node, childrenOf) {
|
|
|
44415
44612
|
}
|
|
44416
44613
|
function smartArtChildrenOf(nodes, connections) {
|
|
44417
44614
|
const map = /* @__PURE__ */ new Map();
|
|
44418
|
-
for (const
|
|
44419
|
-
if (
|
|
44420
|
-
map.set(
|
|
44421
|
-
} else if (
|
|
44422
|
-
const list2 = map.get(
|
|
44615
|
+
for (const n3 of nodes) {
|
|
44616
|
+
if (n3.children && n3.children.length > 0) {
|
|
44617
|
+
map.set(n3.id, n3.children);
|
|
44618
|
+
} else if (n3.parentId) {
|
|
44619
|
+
const list2 = map.get(n3.parentId);
|
|
44423
44620
|
if (list2) {
|
|
44424
|
-
list2.push(
|
|
44621
|
+
list2.push(n3);
|
|
44425
44622
|
} else {
|
|
44426
|
-
map.set(
|
|
44623
|
+
map.set(n3.parentId, [n3]);
|
|
44427
44624
|
}
|
|
44428
44625
|
}
|
|
44429
44626
|
}
|
|
@@ -44547,7 +44744,7 @@ function applyCustomLayoutToNode(node, custom, box) {
|
|
|
44547
44744
|
}
|
|
44548
44745
|
}
|
|
44549
44746
|
function applyCustomLayoutOverrides(result, nodes, box) {
|
|
44550
|
-
const nodeById = new Map(nodes.map((
|
|
44747
|
+
const nodeById = new Map(nodes.map((n3) => [n3.id, n3]));
|
|
44551
44748
|
let changed = false;
|
|
44552
44749
|
const nodesOut = result.nodes.map((rendered) => {
|
|
44553
44750
|
const node = rendered.nodeId ? nodeById.get(rendered.nodeId) : void 0;
|
|
@@ -44731,8 +44928,8 @@ function resolveContentSizedExtents(texts, crossExtentPx, fontSizePx, table, lin
|
|
|
44731
44928
|
lines2 * fontSizePx * smartArtLineEm(table) * lineSpacingFactor + marginVerticalPx + 2 * cornerInsetPx
|
|
44732
44929
|
);
|
|
44733
44930
|
});
|
|
44734
|
-
const
|
|
44735
|
-
const gapTotal = Math.max(0,
|
|
44931
|
+
const n3 = natural.length;
|
|
44932
|
+
const gapTotal = Math.max(0, n3 - 1) * gap;
|
|
44736
44933
|
const total = natural.reduce((sum, extent) => sum + extent, 0) + gapTotal;
|
|
44737
44934
|
if (total <= usableMain || total - gapTotal <= 0) {
|
|
44738
44935
|
return natural;
|
|
@@ -45010,24 +45207,24 @@ function resolveMainAxisGap(index, role, mainAxisType, ceilingPx) {
|
|
|
45010
45207
|
}
|
|
45011
45208
|
return void 0;
|
|
45012
45209
|
}
|
|
45013
|
-
function resolveMainAxisLayout(constraints, index, role, mainAxisType, ceilingPx, usableMain, begPad, endPad,
|
|
45210
|
+
function resolveMainAxisLayout(constraints, index, role, mainAxisType, ceilingPx, usableMain, begPad, endPad, n3, clampRatio) {
|
|
45014
45211
|
const explicitSib = resolveRatioConstraint(constraints, index, role, ["sibSp", "sp"], Number.NaN);
|
|
45015
45212
|
if (!Number.isNaN(explicitSib)) {
|
|
45016
45213
|
const sib2 = clampRatio(explicitSib);
|
|
45017
|
-
const denom2 = begPad + endPad +
|
|
45018
|
-
const mainExtent2 =
|
|
45214
|
+
const denom2 = begPad + endPad + n3 + Math.max(0, n3 - 1) * sib2;
|
|
45215
|
+
const mainExtent2 = n3 > 0 ? usableMain / denom2 : usableMain;
|
|
45019
45216
|
return { mainExtent: mainExtent2, gap: sib2 * mainExtent2 };
|
|
45020
45217
|
}
|
|
45021
45218
|
const inferredGap = resolveMainAxisGap(index, role, mainAxisType, ceilingPx);
|
|
45022
45219
|
if (inferredGap && "absolutePx" in inferredGap) {
|
|
45023
45220
|
const gapAbs = Math.max(0, inferredGap.absolutePx);
|
|
45024
|
-
const denom2 = begPad + endPad +
|
|
45025
|
-
const mainExtent2 =
|
|
45221
|
+
const denom2 = begPad + endPad + n3;
|
|
45222
|
+
const mainExtent2 = n3 > 0 ? Math.max(0, usableMain - Math.max(0, n3 - 1) * gapAbs) / denom2 : usableMain;
|
|
45026
45223
|
return { mainExtent: mainExtent2, gap: gapAbs };
|
|
45027
45224
|
}
|
|
45028
45225
|
const sib = clampRatio(inferredGap && "relative" in inferredGap ? inferredGap.relative : 0.25);
|
|
45029
|
-
const denom = begPad + endPad +
|
|
45030
|
-
const mainExtent =
|
|
45226
|
+
const denom = begPad + endPad + n3 + Math.max(0, n3 - 1) * sib;
|
|
45227
|
+
const mainExtent = n3 > 0 ? usableMain / denom : usableMain;
|
|
45031
45228
|
return { mainExtent, gap: sib * mainExtent };
|
|
45032
45229
|
}
|
|
45033
45230
|
|
|
@@ -45074,15 +45271,15 @@ function arrangeRecursiveTable(view, plan, nodes, box, palette, style, elementId
|
|
|
45074
45271
|
const reversed = resolvedLinDir(view, plan.node, nodes.length, presLayoutVars, "fromT") === "fromB";
|
|
45075
45272
|
const rowChild = findRowChild(view, plan.node, presLayoutVars);
|
|
45076
45273
|
const colReversed = rowChild ? resolvedLinDir(view, rowChild, nodes.length, presLayoutVars, "fromL") === "fromR" : false;
|
|
45077
|
-
const byId = new Map(nodes.map((
|
|
45078
|
-
const childrenIn = (
|
|
45274
|
+
const byId = new Map(nodes.map((n3) => [n3.id, n3]));
|
|
45275
|
+
const childrenIn = (n3) => (childrenOf.get(n3.id) ?? []).filter((c2) => byId.has(c2.id));
|
|
45079
45276
|
const childIds = /* @__PURE__ */ new Set();
|
|
45080
|
-
for (const
|
|
45081
|
-
for (const c2 of childrenIn(
|
|
45277
|
+
for (const n3 of nodes) {
|
|
45278
|
+
for (const c2 of childrenIn(n3)) {
|
|
45082
45279
|
childIds.add(c2.id);
|
|
45083
45280
|
}
|
|
45084
45281
|
}
|
|
45085
|
-
const roots2 = nodes.filter((
|
|
45282
|
+
const roots2 = nodes.filter((n3) => !childIds.has(n3.id));
|
|
45086
45283
|
const depthOf2 = /* @__PURE__ */ new Map();
|
|
45087
45284
|
let maxDepth2 = 0;
|
|
45088
45285
|
const depthStack = roots2.map((r) => ({
|
|
@@ -45103,11 +45300,11 @@ function arrangeRecursiveTable(view, plan, nodes, box, palette, style, elementId
|
|
|
45103
45300
|
const rowGap = DEFAULT_GAP_RATIO2 * rowHeight;
|
|
45104
45301
|
const rowY = (depth) => (reversed ? generations - 1 - depth : depth) * (rowHeight + rowGap);
|
|
45105
45302
|
const splitAcross = (items, x, width) => {
|
|
45106
|
-
const
|
|
45107
|
-
if (
|
|
45303
|
+
const n3 = items.length;
|
|
45304
|
+
if (n3 === 0) {
|
|
45108
45305
|
return [];
|
|
45109
45306
|
}
|
|
45110
|
-
const denom =
|
|
45307
|
+
const denom = n3 + Math.max(0, n3 - 1) * DEFAULT_GAP_RATIO2;
|
|
45111
45308
|
const colWidth = width / denom;
|
|
45112
45309
|
const colGap = DEFAULT_GAP_RATIO2 * colWidth;
|
|
45113
45310
|
const ordered2 = colReversed ? [...items].reverse() : items;
|
|
@@ -45173,24 +45370,24 @@ function arrangeRecursiveTable(view, plan, nodes, box, palette, style, elementId
|
|
|
45173
45370
|
}
|
|
45174
45371
|
|
|
45175
45372
|
// diagram/layout/smartart-layout-snake-grid.ts
|
|
45176
|
-
function snakeGridDims(plan,
|
|
45373
|
+
function snakeGridDims(plan, n3, w, h2, flowDir) {
|
|
45177
45374
|
const bkpt = algorithmParam(plan.node, "bkpt");
|
|
45178
45375
|
const fixedVal = findConstraint(plan.node.constraints, "bkPtFixedVal")?.value;
|
|
45179
45376
|
if (bkpt === "fixed" && typeof fixedVal === "number" && fixedVal > 0) {
|
|
45180
|
-
const lineLength = Math.max(1, Math.min(
|
|
45377
|
+
const lineLength = Math.max(1, Math.min(n3, Math.round(fixedVal)));
|
|
45181
45378
|
if (flowDir === "col") {
|
|
45182
45379
|
const rows2 = lineLength;
|
|
45183
|
-
return { cols: Math.max(1, Math.ceil(
|
|
45380
|
+
return { cols: Math.max(1, Math.ceil(n3 / rows2)), rows: rows2 };
|
|
45184
45381
|
}
|
|
45185
45382
|
const cols2 = lineLength;
|
|
45186
|
-
return { cols: cols2, rows: Math.max(1, Math.ceil(
|
|
45383
|
+
return { cols: cols2, rows: Math.max(1, Math.ceil(n3 / cols2)) };
|
|
45187
45384
|
}
|
|
45188
45385
|
if (flowDir === "col") {
|
|
45189
|
-
const rows2 = Math.max(1, Math.round(Math.sqrt(
|
|
45190
|
-
return { cols: Math.max(1, Math.ceil(
|
|
45386
|
+
const rows2 = Math.max(1, Math.round(Math.sqrt(n3 * Math.max(0.2, h2 / Math.max(1, w)))));
|
|
45387
|
+
return { cols: Math.max(1, Math.ceil(n3 / rows2)), rows: rows2 };
|
|
45191
45388
|
}
|
|
45192
|
-
const cols = Math.max(1, Math.round(Math.sqrt(
|
|
45193
|
-
return { cols, rows: Math.max(1, Math.ceil(
|
|
45389
|
+
const cols = Math.max(1, Math.round(Math.sqrt(n3 * Math.max(0.2, w / Math.max(1, h2)))));
|
|
45390
|
+
return { cols, rows: Math.max(1, Math.ceil(n3 / cols)) };
|
|
45194
45391
|
}
|
|
45195
45392
|
function snakeCell(i2, dims, flowDir, sameDir, grDir) {
|
|
45196
45393
|
const primaryCount = flowDir === "col" ? dims.rows : dims.cols;
|
|
@@ -45214,7 +45411,7 @@ function snakeCell(i2, dims, flowDir, sameDir, grDir) {
|
|
|
45214
45411
|
function arrangeSnake2(plan, nodes, box, palette, style, elementId, index = EMPTY_CONSTRAINT_INDEX, childrenOf, fontName) {
|
|
45215
45412
|
const { width: w, height: h2 } = box;
|
|
45216
45413
|
const ctx = styleContext(style);
|
|
45217
|
-
const
|
|
45414
|
+
const n3 = nodes.length;
|
|
45218
45415
|
const sib = resolveRatioConstraint(
|
|
45219
45416
|
plan.node.constraints,
|
|
45220
45417
|
index,
|
|
@@ -45226,7 +45423,7 @@ function arrangeSnake2(plan, nodes, box, palette, style, elementId, index = EMPT
|
|
|
45226
45423
|
const grDirRaw = algorithmParam(plan.node, "grDir");
|
|
45227
45424
|
const grDir = grDirRaw === "tR" || grDirRaw === "bL" || grDirRaw === "bR" ? grDirRaw : "tL";
|
|
45228
45425
|
const sameDir = algorithmParam(plan.node, "contDir") === "sameDir";
|
|
45229
|
-
const { cols, rows: rows2 } = snakeGridDims(plan,
|
|
45426
|
+
const { cols, rows: rows2 } = snakeGridDims(plan, n3, w, h2, flowDir);
|
|
45230
45427
|
const usableW = w - INSET * 2;
|
|
45231
45428
|
const usableH = h2 - INSET * 2;
|
|
45232
45429
|
const mainCount = flowDir === "col" ? rows2 : cols;
|
|
@@ -45291,7 +45488,7 @@ function arrangeSnake2(plan, nodes, box, palette, style, elementId, index = EMPT
|
|
|
45291
45488
|
height: cellH,
|
|
45292
45489
|
node,
|
|
45293
45490
|
index: i2,
|
|
45294
|
-
total:
|
|
45491
|
+
total: n3,
|
|
45295
45492
|
palette,
|
|
45296
45493
|
style,
|
|
45297
45494
|
ctx,
|
|
@@ -45336,7 +45533,7 @@ function arrangeLinear2(view, plan, flow, nodes, box, palette, style, elementId,
|
|
|
45336
45533
|
const endPad = clampRatio(resolveRatioConstraint(constraints, index, role, ["endPad"], 0));
|
|
45337
45534
|
const aspect = itemAspect(view, plan, index, nodes.length, presLayoutVars);
|
|
45338
45535
|
const flow2 = ordered(nodes, flow);
|
|
45339
|
-
const
|
|
45536
|
+
const n3 = flow2.length;
|
|
45340
45537
|
const horizontal = flow.orientation === "horizontal";
|
|
45341
45538
|
const usableMain = (horizontal ? w : h2) - INSET * 2;
|
|
45342
45539
|
const usableCross = (horizontal ? h2 : w) - INSET * 2;
|
|
@@ -45350,7 +45547,7 @@ function arrangeLinear2(view, plan, flow, nodes, box, palette, style, elementId,
|
|
|
45350
45547
|
usableMain,
|
|
45351
45548
|
begPad,
|
|
45352
45549
|
endPad,
|
|
45353
|
-
|
|
45550
|
+
n3,
|
|
45354
45551
|
clampRatio
|
|
45355
45552
|
);
|
|
45356
45553
|
const itemTemplate = itemNode(plan.node);
|
|
@@ -45410,7 +45607,7 @@ function arrangeLinear2(view, plan, flow, nodes, box, palette, style, elementId,
|
|
|
45410
45607
|
height: horizontal ? itemH : itemMainExtent,
|
|
45411
45608
|
node,
|
|
45412
45609
|
index: i2,
|
|
45413
|
-
total:
|
|
45610
|
+
total: n3,
|
|
45414
45611
|
palette,
|
|
45415
45612
|
style,
|
|
45416
45613
|
ctx,
|
|
@@ -45918,7 +46115,7 @@ function resolveIterationRect(dims, box, iteration, iterationCount) {
|
|
|
45918
46115
|
|
|
45919
46116
|
// diagram/layout/smartart-layout-interpreter-composite-group-slots.ts
|
|
45920
46117
|
function contentSignature(content2) {
|
|
45921
|
-
return content2.map((
|
|
46118
|
+
return content2.map((n3) => n3.id).sort().join(" ");
|
|
45922
46119
|
}
|
|
45923
46120
|
function resolveGroupedSlots(candidates, box, index) {
|
|
45924
46121
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -46072,18 +46269,18 @@ function renderForEachBoundSlots(slots, flat, box, absX, absY, childrenOf, ctx,
|
|
|
46072
46269
|
// diagram/hierarchy/smartart-hierarchy-pitch.ts
|
|
46073
46270
|
var GENERATION_MARGIN_RATIO = 0.1675;
|
|
46074
46271
|
function computeAxisPitch(dimension2, margin, itemSize, count, fixedGapRatio) {
|
|
46075
|
-
const
|
|
46076
|
-
const gap =
|
|
46272
|
+
const n3 = Math.max(1, count);
|
|
46273
|
+
const gap = n3 <= 1 ? 0 : fixedGapRatio !== void 0 ? itemSize * Math.max(0, fixedGapRatio) : Math.max(0, (dimension2 - margin - n3 * itemSize) / (n3 - 1));
|
|
46077
46274
|
const pitch = itemSize + gap;
|
|
46078
|
-
const centeredShift = (dimension2 -
|
|
46079
|
-
const maxShift = dimension2 -
|
|
46275
|
+
const centeredShift = (dimension2 - n3 * pitch + margin) / 2;
|
|
46276
|
+
const maxShift = dimension2 - n3 * itemSize - gap * (n3 - 0.5);
|
|
46080
46277
|
return { pitch, shift: Math.min(centeredShift, maxShift) };
|
|
46081
46278
|
}
|
|
46082
46279
|
function centeredAxisPitch(dimension2, itemSize, gapRatio, count) {
|
|
46083
|
-
const
|
|
46084
|
-
const gap =
|
|
46280
|
+
const n3 = Math.max(1, count);
|
|
46281
|
+
const gap = n3 > 1 ? itemSize * Math.max(0, gapRatio) : 0;
|
|
46085
46282
|
const pitch = itemSize + gap;
|
|
46086
|
-
const span =
|
|
46283
|
+
const span = n3 * itemSize + Math.max(0, n3 - 1) * gap;
|
|
46087
46284
|
const shift = (dimension2 - span) / 2;
|
|
46088
46285
|
return { pitch, shift };
|
|
46089
46286
|
}
|
|
@@ -46618,7 +46815,7 @@ function findNamedNode(node, name2) {
|
|
|
46618
46815
|
function arrangePyramid(plan, nodes, box, palette, style, elementId, index = EMPTY_CONSTRAINT_INDEX, childrenOf, fontName) {
|
|
46619
46816
|
const { width: w, height: h2 } = box;
|
|
46620
46817
|
const ctx = styleContext(style);
|
|
46621
|
-
const
|
|
46818
|
+
const n3 = nodes.length;
|
|
46622
46819
|
const bandW = w - DEFAULT_INSET * 2;
|
|
46623
46820
|
const bandCx = DEFAULT_INSET + bandW / 2;
|
|
46624
46821
|
const gapRatio = resolveRatioConstraint(
|
|
@@ -46629,7 +46826,7 @@ function arrangePyramid(plan, nodes, box, palette, style, elementId, index = EMP
|
|
|
46629
46826
|
DEFAULT_GAP_RATIO3
|
|
46630
46827
|
);
|
|
46631
46828
|
const usableH = h2 - DEFAULT_INSET * 2;
|
|
46632
|
-
const bandH =
|
|
46829
|
+
const bandH = n3 > 0 ? usableH / (n3 + Math.max(0, n3 - 1) * gapRatio) : usableH;
|
|
46633
46830
|
const gap = gapRatio * bandH;
|
|
46634
46831
|
const lvlNodeName = algorithmParam(plan.node, "pyraLvlNode");
|
|
46635
46832
|
const lvlNode = lvlNodeName ? findNamedNode(plan.node, lvlNodeName) : void 0;
|
|
@@ -46643,9 +46840,9 @@ function arrangePyramid(plan, nodes, box, palette, style, elementId, index = EMP
|
|
|
46643
46840
|
const halfBandH = (slotBot - slotTop) * lvlHeightRatio / 2;
|
|
46644
46841
|
const yTop = slotMidY - halfBandH;
|
|
46645
46842
|
const yBot = slotMidY + halfBandH;
|
|
46646
|
-
const effectiveI = inverted ?
|
|
46647
|
-
const fTop = effectiveI /
|
|
46648
|
-
const fBot = (effectiveI + 1) /
|
|
46843
|
+
const effectiveI = inverted ? n3 - 1 - i2 : i2;
|
|
46844
|
+
const fTop = effectiveI / n3;
|
|
46845
|
+
const fBot = (effectiveI + 1) / n3;
|
|
46649
46846
|
const halfTop = bandW * fTop / 2 * lvlWidthRatio;
|
|
46650
46847
|
const halfBot = bandW * fBot / 2 * lvlWidthRatio;
|
|
46651
46848
|
return { node, yTop, yBot, halfTop, halfBot };
|
|
@@ -46682,7 +46879,7 @@ function arrangePyramid(plan, nodes, box, palette, style, elementId, index = EMP
|
|
|
46682
46879
|
fontHeight: bandH,
|
|
46683
46880
|
node,
|
|
46684
46881
|
index: i2,
|
|
46685
|
-
total:
|
|
46882
|
+
total: n3,
|
|
46686
46883
|
palette,
|
|
46687
46884
|
style,
|
|
46688
46885
|
ctx,
|
|
@@ -46832,7 +47029,7 @@ function resolveHierarchyItemNode(algorithmNode) {
|
|
|
46832
47029
|
return first2;
|
|
46833
47030
|
}
|
|
46834
47031
|
const allNames = new Set(
|
|
46835
|
-
candidates.map((c2) => c2.name).filter((
|
|
47032
|
+
candidates.map((c2) => c2.name).filter((n3) => n3 !== void 0)
|
|
46836
47033
|
);
|
|
46837
47034
|
const constraints = algorithmNode.allConstraints ?? algorithmNode.constraints ?? [];
|
|
46838
47035
|
for (const candidate of candidates) {
|
|
@@ -47986,11 +48183,11 @@ function transposeResult(result, realWidth, realHeight) {
|
|
|
47986
48183
|
// diagram/hierarchy/smartart-hierarchy-fit-item-box.ts
|
|
47987
48184
|
var ALL_CHILDREN_HANG_EXTRA_RATIO = 0.6587;
|
|
47988
48185
|
function fitItemBox(box, columns, levels, sibSpRatio, aspectRatio, generationGapRatio, marginXRatio, marginYRatio, maxHangDepth = 0, clampToNaturalAspect = true, maxHangRows = maxHangDepth, allChildrenHang = false, hangHeightRatio = HANG_HEIGHT_RATIO, compositeChainHeightRatio, hangingColumns = columns) {
|
|
47989
|
-
const
|
|
48186
|
+
const n3 = Math.max(1, columns);
|
|
47990
48187
|
const usableW = box.width - 2 * box.width * marginXRatio;
|
|
47991
48188
|
const allHangExtra = allChildrenHang ? ALL_CHILDREN_HANG_EXTRA_RATIO : 0;
|
|
47992
|
-
const hangColumnFraction =
|
|
47993
|
-
const widthFit = usableW / (
|
|
48189
|
+
const hangColumnFraction = n3 > 0 ? Math.min(1, Math.max(0, hangingColumns) / n3) : 0;
|
|
48190
|
+
const widthFit = usableW / (n3 + Math.max(0, n3 - 1) * sibSpRatio + maxHangDepth * HIER_TAIL_OFFSET_RATIO * hangColumnFraction + allHangExtra);
|
|
47994
48191
|
const generations = Math.max(1, levels);
|
|
47995
48192
|
const usableH = box.height - 2 * box.height * marginYRatio;
|
|
47996
48193
|
const heightFit = usableH / (generations + maxHangRows + Math.max(0, generations - 1) * generationGapRatio + maxHangRows * hangHeightRatio);
|
|
@@ -49086,17 +49283,17 @@ function resolvePyraAcctRatio(planNode, index) {
|
|
|
49086
49283
|
const constraints = planNode.allConstraints ?? planNode.constraints;
|
|
49087
49284
|
return resolveRatioConstraint(constraints, index, roleOf(planNode), ["pyraAcctRatio"], 0);
|
|
49088
49285
|
}
|
|
49089
|
-
function pyramidRowGeometry(i2,
|
|
49286
|
+
function pyramidRowGeometry(i2, n3, box, gapRatio, inverted) {
|
|
49090
49287
|
const bandW = box.width - DEFAULT_INSET * 2;
|
|
49091
49288
|
const bandCx = DEFAULT_INSET + bandW / 2;
|
|
49092
49289
|
const usableH = box.height - DEFAULT_INSET * 2;
|
|
49093
|
-
const bandH =
|
|
49290
|
+
const bandH = n3 > 0 ? usableH / (n3 + Math.max(0, n3 - 1) * gapRatio) : usableH;
|
|
49094
49291
|
const gap = gapRatio * bandH;
|
|
49095
49292
|
const slotTop = DEFAULT_INSET + i2 * (bandH + gap);
|
|
49096
49293
|
const slotBot = slotTop + bandH;
|
|
49097
|
-
const effectiveI = inverted ?
|
|
49098
|
-
const fTop = effectiveI /
|
|
49099
|
-
const fBot = (effectiveI + 1) /
|
|
49294
|
+
const effectiveI = inverted ? n3 - 1 - i2 : i2;
|
|
49295
|
+
const fTop = effectiveI / n3;
|
|
49296
|
+
const fBot = (effectiveI + 1) / n3;
|
|
49100
49297
|
const halfTop = bandW * fTop / 2;
|
|
49101
49298
|
const halfBot = bandW * fBot / 2;
|
|
49102
49299
|
return {
|
|
@@ -49114,7 +49311,7 @@ function repositionPyramidBands(result, box, planNode, topLevelIds, flatNodes, h
|
|
|
49114
49311
|
return result;
|
|
49115
49312
|
}
|
|
49116
49313
|
const scale = 1 - pyraAcctRatio;
|
|
49117
|
-
const
|
|
49314
|
+
const n3 = topLevelIds.length;
|
|
49118
49315
|
const rowIndexById = new Map(topLevelIds.map((id, i2) => [id, i2]));
|
|
49119
49316
|
const parentIdById = new Map(flatNodes.map((node) => [node.id, node.parentId]));
|
|
49120
49317
|
const gapRatio = resolveRatioConstraint(
|
|
@@ -49138,7 +49335,7 @@ function repositionPyramidBands(result, box, planNode, topLevelIds, flatNodes, h
|
|
|
49138
49335
|
if (rowIndex === void 0) {
|
|
49139
49336
|
return rendered;
|
|
49140
49337
|
}
|
|
49141
|
-
const row2 = pyramidRowGeometry(rowIndex,
|
|
49338
|
+
const row2 = pyramidRowGeometry(rowIndex, n3, box, gapRatio, inverted);
|
|
49142
49339
|
const scaledLeftTop = scale * row2.leftTop;
|
|
49143
49340
|
const scaledRightTop = scale * row2.rightTop;
|
|
49144
49341
|
const scaledLeftBot = scale * row2.leftBot;
|
|
@@ -49256,12 +49453,12 @@ function runArrangement(view, input) {
|
|
|
49256
49453
|
input.connections,
|
|
49257
49454
|
presLayoutVars
|
|
49258
49455
|
) : withNamedRule;
|
|
49259
|
-
const hasAccentSomewhere = arranged.some((node) => flat.some((
|
|
49456
|
+
const hasAccentSomewhere = arranged.some((node) => flat.some((n3) => n3.parentId === node.id));
|
|
49260
49457
|
const withPyramidBands = plan.kind === "pyramid" ? repositionPyramidBands(
|
|
49261
49458
|
withItemRoles,
|
|
49262
49459
|
box,
|
|
49263
49460
|
plan.node,
|
|
49264
|
-
arranged.map((
|
|
49461
|
+
arranged.map((n3) => n3.id),
|
|
49265
49462
|
flat,
|
|
49266
49463
|
hasAccentSomewhere,
|
|
49267
49464
|
constraintIndex
|
|
@@ -49681,12 +49878,12 @@ function findDiagramShapeIndex(shapes2, nodes, nodeId) {
|
|
|
49681
49878
|
}
|
|
49682
49879
|
}
|
|
49683
49880
|
if (shapes2.length === nodes.length) {
|
|
49684
|
-
const nodeIdx = nodes.findIndex((
|
|
49881
|
+
const nodeIdx = nodes.findIndex((n3) => n3.id === nodeId);
|
|
49685
49882
|
if (nodeIdx >= 0) {
|
|
49686
49883
|
return nodeIdx;
|
|
49687
49884
|
}
|
|
49688
49885
|
}
|
|
49689
|
-
const node = nodes.find((
|
|
49886
|
+
const node = nodes.find((n3) => n3.id === nodeId);
|
|
49690
49887
|
if (node?.text) {
|
|
49691
49888
|
const text3 = node.text.trim();
|
|
49692
49889
|
const matches2 = [];
|
|
@@ -49734,7 +49931,7 @@ function createOfficeGuid() {
|
|
|
49734
49931
|
// diagram/edit/node-ops.ts
|
|
49735
49932
|
var diagramModelId = (options2) => (options2?.createModelId ?? createOfficeGuid)();
|
|
49736
49933
|
function findDiagramRootParentId(nodes) {
|
|
49737
|
-
const nodeIds = new Set(nodes.map((
|
|
49934
|
+
const nodeIds = new Set(nodes.map((n3) => n3.id));
|
|
49738
49935
|
for (const node of nodes) {
|
|
49739
49936
|
if (node.parentId && !nodeIds.has(node.parentId)) {
|
|
49740
49937
|
return node.parentId;
|
|
@@ -49771,13 +49968,13 @@ function insertSibling(data, text3, siblingId, offset, options2) {
|
|
|
49771
49968
|
const newId = diagramModelId(options2);
|
|
49772
49969
|
let parentId;
|
|
49773
49970
|
if (siblingId) {
|
|
49774
|
-
const sibling = data.nodes.find((
|
|
49971
|
+
const sibling = data.nodes.find((n3) => n3.id === siblingId);
|
|
49775
49972
|
parentId = sibling?.parentId;
|
|
49776
49973
|
}
|
|
49777
49974
|
parentId ??= findDiagramRootParentId(data.nodes);
|
|
49778
49975
|
const newNode = { id: newId, text: text3, parentId };
|
|
49779
49976
|
const nodes = [...data.nodes];
|
|
49780
|
-
const siblingIndex = siblingId ? nodes.findIndex((
|
|
49977
|
+
const siblingIndex = siblingId ? nodes.findIndex((n3) => n3.id === siblingId) : -1;
|
|
49781
49978
|
if (siblingIndex >= 0) {
|
|
49782
49979
|
nodes.splice(siblingIndex + offset, 0, newNode);
|
|
49783
49980
|
} else {
|
|
@@ -49802,7 +49999,7 @@ function addDiagramNodeBelow(data, parentId, text3, options2) {
|
|
|
49802
49999
|
return withEditedStructure(data, nodes, connections);
|
|
49803
50000
|
}
|
|
49804
50001
|
function addDiagramNodeAbove(data, nodeId, text3, options2) {
|
|
49805
|
-
const target = data.nodes.find((
|
|
50002
|
+
const target = data.nodes.find((n3) => n3.id === nodeId);
|
|
49806
50003
|
if (!target) {
|
|
49807
50004
|
return data;
|
|
49808
50005
|
}
|
|
@@ -49829,13 +50026,13 @@ function addDiagramNodeAbove(data, nodeId, text3, options2) {
|
|
|
49829
50026
|
return withEditedStructure(data, nodes, connections);
|
|
49830
50027
|
}
|
|
49831
50028
|
function removeDiagramNode(data, nodeId) {
|
|
49832
|
-
const removedNode = data.nodes.find((
|
|
49833
|
-
const childIds = data.nodes.filter((
|
|
49834
|
-
const nodes = data.nodes.filter((
|
|
49835
|
-
if (
|
|
49836
|
-
return { ...
|
|
50029
|
+
const removedNode = data.nodes.find((n3) => n3.id === nodeId);
|
|
50030
|
+
const childIds = data.nodes.filter((n3) => n3.parentId === nodeId).map((n3) => n3.id);
|
|
50031
|
+
const nodes = data.nodes.filter((n3) => n3.id !== nodeId).map((n3) => {
|
|
50032
|
+
if (n3.parentId === nodeId) {
|
|
50033
|
+
return { ...n3, parentId: removedNode?.parentId };
|
|
49837
50034
|
}
|
|
49838
|
-
return { ...
|
|
50035
|
+
return { ...n3 };
|
|
49839
50036
|
});
|
|
49840
50037
|
const connections = (data.connections ?? []).filter((c2) => c2.sourceId !== nodeId && c2.destId !== nodeId).map((c2) => ({ ...c2 }));
|
|
49841
50038
|
const grandParentId = removedNode?.parentId;
|
|
@@ -49847,7 +50044,7 @@ function removeDiagramNode(data, nodeId) {
|
|
|
49847
50044
|
return withEditedStructure(data, nodes, connections);
|
|
49848
50045
|
}
|
|
49849
50046
|
function setDiagramNodeText(data, nodeId, newText) {
|
|
49850
|
-
const nodes = data.nodes.map((
|
|
50047
|
+
const nodes = data.nodes.map((n3) => n3.id === nodeId ? { ...n3, text: newText } : n3);
|
|
49851
50048
|
return {
|
|
49852
50049
|
...data,
|
|
49853
50050
|
nodes,
|
|
@@ -49861,12 +50058,12 @@ function setDiagramNodeText(data, nodeId, newText) {
|
|
|
49861
50058
|
|
|
49862
50059
|
// diagram/edit/node-order.ts
|
|
49863
50060
|
function moveDiagramNode(data, nodeId, direction) {
|
|
49864
|
-
const node = data.nodes.find((
|
|
50061
|
+
const node = data.nodes.find((n3) => n3.id === nodeId);
|
|
49865
50062
|
if (!node) {
|
|
49866
50063
|
return data;
|
|
49867
50064
|
}
|
|
49868
|
-
const siblings = data.nodes.filter((
|
|
49869
|
-
const currentIndex = siblings.findIndex((
|
|
50065
|
+
const siblings = data.nodes.filter((n3) => n3.parentId === node.parentId);
|
|
50066
|
+
const currentIndex = siblings.findIndex((n3) => n3.id === nodeId);
|
|
49870
50067
|
const targetIndex = currentIndex + direction;
|
|
49871
50068
|
const current = siblings[currentIndex];
|
|
49872
50069
|
const target = siblings[targetIndex];
|
|
@@ -49874,8 +50071,8 @@ function moveDiagramNode(data, nodeId, direction) {
|
|
|
49874
50071
|
return data;
|
|
49875
50072
|
}
|
|
49876
50073
|
const nodes = [...data.nodes];
|
|
49877
|
-
const currentGlobalIndex = nodes.findIndex((
|
|
49878
|
-
const targetGlobalIndex = nodes.findIndex((
|
|
50074
|
+
const currentGlobalIndex = nodes.findIndex((n3) => n3.id === current.id);
|
|
50075
|
+
const targetGlobalIndex = nodes.findIndex((n3) => n3.id === target.id);
|
|
49879
50076
|
if (currentGlobalIndex >= 0 && targetGlobalIndex >= 0) {
|
|
49880
50077
|
nodes[currentGlobalIndex] = target;
|
|
49881
50078
|
nodes[targetGlobalIndex] = current;
|
|
@@ -49883,12 +50080,12 @@ function moveDiagramNode(data, nodeId, direction) {
|
|
|
49883
50080
|
return withEditedStructure(data, nodes);
|
|
49884
50081
|
}
|
|
49885
50082
|
function moveDiagramNodeToIndex(data, nodeId, newIndex) {
|
|
49886
|
-
const node = data.nodes.find((
|
|
50083
|
+
const node = data.nodes.find((n3) => n3.id === nodeId);
|
|
49887
50084
|
if (!node) {
|
|
49888
50085
|
return data;
|
|
49889
50086
|
}
|
|
49890
|
-
const siblings = data.nodes.filter((
|
|
49891
|
-
const currentIndex = siblings.findIndex((
|
|
50087
|
+
const siblings = data.nodes.filter((n3) => n3.parentId === node.parentId);
|
|
50088
|
+
const currentIndex = siblings.findIndex((n3) => n3.id === nodeId);
|
|
49892
50089
|
if (currentIndex < 0) {
|
|
49893
50090
|
return data;
|
|
49894
50091
|
}
|
|
@@ -49902,21 +50099,21 @@ function moveDiagramNodeToIndex(data, nodeId, newIndex) {
|
|
|
49902
50099
|
const siblingIds = new Set(siblings.map((s2) => s2.id));
|
|
49903
50100
|
const nodes = [];
|
|
49904
50101
|
let sibIdx = 0;
|
|
49905
|
-
for (const
|
|
49906
|
-
nodes.push(siblingIds.has(
|
|
50102
|
+
for (const n3 of data.nodes) {
|
|
50103
|
+
nodes.push(siblingIds.has(n3.id) ? reorderedSiblings[sibIdx++] ?? n3 : n3);
|
|
49907
50104
|
}
|
|
49908
50105
|
return withEditedStructure(data, nodes);
|
|
49909
50106
|
}
|
|
49910
50107
|
function promoteDiagramNode(data, nodeId) {
|
|
49911
|
-
const node = data.nodes.find((
|
|
50108
|
+
const node = data.nodes.find((n3) => n3.id === nodeId);
|
|
49912
50109
|
if (!node || !node.parentId) {
|
|
49913
50110
|
return data;
|
|
49914
50111
|
}
|
|
49915
|
-
const parent = data.nodes.find((
|
|
50112
|
+
const parent = data.nodes.find((n3) => n3.id === node.parentId);
|
|
49916
50113
|
if (!parent) {
|
|
49917
50114
|
return data;
|
|
49918
50115
|
}
|
|
49919
|
-
const nodes = data.nodes.map((
|
|
50116
|
+
const nodes = data.nodes.map((n3) => n3.id === nodeId ? { ...n3, parentId: parent.parentId } : n3);
|
|
49920
50117
|
const connections = (data.connections ?? []).filter((c2) => !(c2.sourceId === node.parentId && c2.destId === nodeId)).map((c2) => ({ ...c2 }));
|
|
49921
50118
|
if (parent.parentId) {
|
|
49922
50119
|
connections.push({
|
|
@@ -49930,18 +50127,18 @@ function promoteDiagramNode(data, nodeId) {
|
|
|
49930
50127
|
return withEditedStructure(data, nodes, connections);
|
|
49931
50128
|
}
|
|
49932
50129
|
function demoteDiagramNode(data, nodeId) {
|
|
49933
|
-
const node = data.nodes.find((
|
|
50130
|
+
const node = data.nodes.find((n3) => n3.id === nodeId);
|
|
49934
50131
|
if (!node) {
|
|
49935
50132
|
return data;
|
|
49936
50133
|
}
|
|
49937
|
-
const siblings = data.nodes.filter((
|
|
49938
|
-
const currentIndex = siblings.findIndex((
|
|
50134
|
+
const siblings = data.nodes.filter((n3) => n3.parentId === node.parentId);
|
|
50135
|
+
const currentIndex = siblings.findIndex((n3) => n3.id === nodeId);
|
|
49939
50136
|
const previous = currentIndex > 0 ? siblings[currentIndex - 1] : void 0;
|
|
49940
50137
|
if (!previous) {
|
|
49941
50138
|
return data;
|
|
49942
50139
|
}
|
|
49943
50140
|
const newParentId = previous.id;
|
|
49944
|
-
const nodes = data.nodes.map((
|
|
50141
|
+
const nodes = data.nodes.map((n3) => n3.id === nodeId ? { ...n3, parentId: newParentId } : n3);
|
|
49945
50142
|
const connections = (data.connections ?? []).filter((c2) => !(c2.sourceId === node.parentId && c2.destId === nodeId)).map((c2) => ({ ...c2 }));
|
|
49946
50143
|
connections.push({
|
|
49947
50144
|
sourceId: newParentId,
|
|
@@ -50465,7 +50662,7 @@ function resolveDiagramReflowCategory(layoutType) {
|
|
|
50465
50662
|
|
|
50466
50663
|
// diagram/edit/reflow.ts
|
|
50467
50664
|
function diagramContentNodes(nodes) {
|
|
50468
|
-
return nodes.filter((
|
|
50665
|
+
return nodes.filter((n3) => n3.text.length > 0);
|
|
50469
50666
|
}
|
|
50470
50667
|
function reflowDiagramLayout(data, bounds2) {
|
|
50471
50668
|
const nodes = diagramContentNodes(data.nodes);
|
|
@@ -51597,7 +51794,7 @@ var IV = [
|
|
|
51597
51794
|
1541459225
|
|
51598
51795
|
];
|
|
51599
51796
|
var W = new Uint32Array(64);
|
|
51600
|
-
var rotr = (x,
|
|
51797
|
+
var rotr = (x, n3) => x >>> n3 | x << 32 - n3;
|
|
51601
51798
|
function compress(h2, view, offset) {
|
|
51602
51799
|
for (let i2 = 0; i2 < 16; i2++) W[i2] = view.getUint32(offset + i2 * 4);
|
|
51603
51800
|
for (let i2 = 16; i2 < 64; i2++) {
|
|
@@ -52660,7 +52857,7 @@ var PartPatch = class {
|
|
|
52660
52857
|
if (known !== void 0) return known;
|
|
52661
52858
|
const taken = new Set(this.prefixes.values());
|
|
52662
52859
|
let prefix = preferred;
|
|
52663
|
-
for (let
|
|
52860
|
+
for (let n3 = 1; taken.has(prefix); n3++) prefix = `${preferred}${n3}`;
|
|
52664
52861
|
this.prefixes.set(ns, prefix);
|
|
52665
52862
|
const at2 = this.root.openEnd - (this.root.selfClosing ? 2 : 1);
|
|
52666
52863
|
this.add(at2, at2, ` xmlns:${prefix}="${ns}"`);
|
|
@@ -55086,10 +55283,10 @@ function encodeBase64(bytes) {
|
|
|
55086
55283
|
const a2 = bytes[i2];
|
|
55087
55284
|
const b = bytes[i2 + 1];
|
|
55088
55285
|
const c2 = bytes[i2 + 2];
|
|
55089
|
-
const
|
|
55090
|
-
out += ALPHABET2[
|
|
55091
|
-
out += b === void 0 ? "=" : ALPHABET2[
|
|
55092
|
-
out += c2 === void 0 ? "=" : ALPHABET2[
|
|
55286
|
+
const n3 = a2 << 16 | (b ?? 0) << 8 | (c2 ?? 0);
|
|
55287
|
+
out += ALPHABET2[n3 >> 18] + ALPHABET2[n3 >> 12 & 63];
|
|
55288
|
+
out += b === void 0 ? "=" : ALPHABET2[n3 >> 6 & 63];
|
|
55289
|
+
out += c2 === void 0 ? "=" : ALPHABET2[n3 & 63];
|
|
55093
55290
|
}
|
|
55094
55291
|
return out;
|
|
55095
55292
|
}
|
|
@@ -55411,8 +55608,8 @@ function md2(message) {
|
|
|
55411
55608
|
}
|
|
55412
55609
|
|
|
55413
55610
|
// digest/bit-ops.ts
|
|
55414
|
-
function rotl32(x,
|
|
55415
|
-
return (x <<
|
|
55611
|
+
function rotl32(x, n3) {
|
|
55612
|
+
return (x << n3 | x >>> 32 - n3) >>> 0;
|
|
55416
55613
|
}
|
|
55417
55614
|
function add32(...values) {
|
|
55418
55615
|
let sum = 0;
|
|
@@ -55957,7 +56154,7 @@ function ripemd160(message) {
|
|
|
55957
56154
|
|
|
55958
56155
|
// digest/sha1.ts
|
|
55959
56156
|
var W2 = new Uint32Array(80);
|
|
55960
|
-
var rotl = (x,
|
|
56157
|
+
var rotl = (x, n3) => x << n3 | x >>> 32 - n3;
|
|
55961
56158
|
function compress2(h2, view, offset) {
|
|
55962
56159
|
for (let i2 = 0; i2 < 16; i2++) W2[i2] = view.getUint32(offset + i2 * 4);
|
|
55963
56160
|
for (let i2 = 16; i2 < 80; i2++) W2[i2] = rotl(W2[i2 - 3] ^ W2[i2 - 8] ^ W2[i2 - 14] ^ W2[i2 - 16], 1);
|
|
@@ -57593,11 +57790,11 @@ function getCalloutViewBoxBounds(width, height, geometry, padding = 2) {
|
|
|
57593
57790
|
}
|
|
57594
57791
|
|
|
57595
57792
|
// geometry/cloud-bezier-paths.ts
|
|
57596
|
-
function fmt(
|
|
57597
|
-
if (!Number.isFinite(
|
|
57793
|
+
function fmt(n3) {
|
|
57794
|
+
if (!Number.isFinite(n3)) {
|
|
57598
57795
|
return "0";
|
|
57599
57796
|
}
|
|
57600
|
-
const rounded = Math.round(
|
|
57797
|
+
const rounded = Math.round(n3 * 100) / 100;
|
|
57601
57798
|
if (Object.is(rounded, -0)) {
|
|
57602
57799
|
return "0";
|
|
57603
57800
|
}
|
|
@@ -58013,8 +58210,8 @@ function aStarOrthogonal(nodes, start, end, inflated) {
|
|
|
58013
58210
|
fScore.set(startKey, heuristic(start, end));
|
|
58014
58211
|
const openSet = /* @__PURE__ */ new Set([startKey]);
|
|
58015
58212
|
const nodeMap = /* @__PURE__ */ new Map();
|
|
58016
|
-
for (const
|
|
58017
|
-
nodeMap.set(pointKey(
|
|
58213
|
+
for (const n3 of nodes) {
|
|
58214
|
+
nodeMap.set(pointKey(n3), n3);
|
|
58018
58215
|
}
|
|
58019
58216
|
const getLowest = () => {
|
|
58020
58217
|
let best;
|
|
@@ -58859,7 +59056,7 @@ var MISC_ARROW_CONNECTION_SITES = {
|
|
|
58859
59056
|
gd16("dy2", "+- yE 0 t"),
|
|
58860
59057
|
gd16("dy22", "*/ dy2 1 2"),
|
|
58861
59058
|
gd16("dy3", "*/ h 1 20"),
|
|
58862
|
-
gd16("yD", "+-
|
|
59059
|
+
gd16("yD", "+- dy22 0 dy3")
|
|
58863
59060
|
],
|
|
58864
59061
|
sites: [
|
|
58865
59062
|
cxn("cd4", "l", "b"),
|
|
@@ -62217,8 +62414,8 @@ function cross2(o, a2, b) {
|
|
|
62217
62414
|
}
|
|
62218
62415
|
function signedArea2(poly) {
|
|
62219
62416
|
let area = 0;
|
|
62220
|
-
for (let i2 = 0,
|
|
62221
|
-
const j = (i2 + 1) %
|
|
62417
|
+
for (let i2 = 0, n3 = poly.length; i2 < n3; i2++) {
|
|
62418
|
+
const j = (i2 + 1) % n3;
|
|
62222
62419
|
area += at(poly, i2).x * at(poly, j).y;
|
|
62223
62420
|
area -= at(poly, j).x * at(poly, i2).y;
|
|
62224
62421
|
}
|
|
@@ -62248,8 +62445,8 @@ function dedupPoly(poly) {
|
|
|
62248
62445
|
}
|
|
62249
62446
|
return result;
|
|
62250
62447
|
}
|
|
62251
|
-
function fmtNum(
|
|
62252
|
-
const rounded = Math.round(
|
|
62448
|
+
function fmtNum(n3) {
|
|
62449
|
+
const rounded = Math.round(n3 * 1e4) / 1e4;
|
|
62253
62450
|
return String(rounded);
|
|
62254
62451
|
}
|
|
62255
62452
|
function pointInTriangle(p2, a2, b, c2) {
|
|
@@ -62262,8 +62459,8 @@ function pointInTriangle(p2, a2, b, c2) {
|
|
|
62262
62459
|
}
|
|
62263
62460
|
function pointInPolygon(pt2, poly) {
|
|
62264
62461
|
let inside = false;
|
|
62265
|
-
const
|
|
62266
|
-
for (let i2 = 0, j =
|
|
62462
|
+
const n3 = poly.length;
|
|
62463
|
+
for (let i2 = 0, j = n3 - 1; i2 < n3; j = i2++) {
|
|
62267
62464
|
const xi = at(poly, i2).x, yi = at(poly, i2).y;
|
|
62268
62465
|
const xj = at(poly, j).x, yj = at(poly, j).y;
|
|
62269
62466
|
if (yi > pt2.y !== yj > pt2.y && pt2.x < (xj - xi) * (pt2.y - yi) / (yj - yi) + xi) {
|
|
@@ -62319,15 +62516,15 @@ function sutherlandHodgman(subject, clip) {
|
|
|
62319
62516
|
return output;
|
|
62320
62517
|
}
|
|
62321
62518
|
function isConvex(poly) {
|
|
62322
|
-
const
|
|
62323
|
-
if (
|
|
62519
|
+
const n3 = poly.length;
|
|
62520
|
+
if (n3 < 3) {
|
|
62324
62521
|
return false;
|
|
62325
62522
|
}
|
|
62326
62523
|
let sign = 0;
|
|
62327
|
-
for (let i2 = 0; i2 <
|
|
62524
|
+
for (let i2 = 0; i2 < n3; i2++) {
|
|
62328
62525
|
const o = at(poly, i2);
|
|
62329
|
-
const a2 = at(poly, (i2 + 1) %
|
|
62330
|
-
const b = at(poly, (i2 + 2) %
|
|
62526
|
+
const a2 = at(poly, (i2 + 1) % n3);
|
|
62527
|
+
const b = at(poly, (i2 + 2) % n3);
|
|
62331
62528
|
const c2 = cross2(o, a2, b);
|
|
62332
62529
|
if (Math.abs(c2) < EPSILON) {
|
|
62333
62530
|
continue;
|
|
@@ -62348,17 +62545,17 @@ function triangulate(poly) {
|
|
|
62348
62545
|
while (remaining.length > 3 && maxIterations > 0) {
|
|
62349
62546
|
maxIterations--;
|
|
62350
62547
|
let earFound = false;
|
|
62351
|
-
const
|
|
62352
|
-
for (let i2 = 0; i2 <
|
|
62353
|
-
const prev = at(remaining, (i2 +
|
|
62548
|
+
const n3 = remaining.length;
|
|
62549
|
+
for (let i2 = 0; i2 < n3; i2++) {
|
|
62550
|
+
const prev = at(remaining, (i2 + n3 - 1) % n3);
|
|
62354
62551
|
const curr = at(remaining, i2);
|
|
62355
|
-
const next = at(remaining, (i2 + 1) %
|
|
62552
|
+
const next = at(remaining, (i2 + 1) % n3);
|
|
62356
62553
|
if (cross2(prev, curr, next) <= EPSILON) {
|
|
62357
62554
|
continue;
|
|
62358
62555
|
}
|
|
62359
62556
|
let isEar = true;
|
|
62360
|
-
for (let j = 0; j <
|
|
62361
|
-
if (j === (i2 +
|
|
62557
|
+
for (let j = 0; j < n3; j++) {
|
|
62558
|
+
if (j === (i2 + n3 - 1) % n3 || j === i2 || j === (i2 + 1) % n3) {
|
|
62362
62559
|
continue;
|
|
62363
62560
|
}
|
|
62364
62561
|
if (pointInTriangle(at(remaining, j), prev, curr, next)) {
|
|
@@ -63255,7 +63452,7 @@ function tokenize(d) {
|
|
|
63255
63452
|
for (const raw2 of matches2) {
|
|
63256
63453
|
const type = raw2.charAt(0);
|
|
63257
63454
|
const nums = raw2.slice(1).match(NUMBER_RE);
|
|
63258
|
-
tokens.push({ type, values: nums ? nums.map((
|
|
63455
|
+
tokens.push({ type, values: nums ? nums.map((n3) => Number.parseFloat(n3)) : [] });
|
|
63259
63456
|
}
|
|
63260
63457
|
return tokens;
|
|
63261
63458
|
}
|
|
@@ -64264,8 +64461,8 @@ function imageRectFromCrop(frame2, insets) {
|
|
|
64264
64461
|
height
|
|
64265
64462
|
};
|
|
64266
64463
|
}
|
|
64267
|
-
function round43(
|
|
64268
|
-
return Math.round(
|
|
64464
|
+
function round43(n3) {
|
|
64465
|
+
return Math.round(n3 * 1e4) / 1e4;
|
|
64269
64466
|
}
|
|
64270
64467
|
function cropUpdateFromRects(frame2, image) {
|
|
64271
64468
|
return {
|
|
@@ -64299,7 +64496,7 @@ function pictureTileAlignment(alignment) {
|
|
|
64299
64496
|
function pictureTileGeometry(frame2, source2, tile, dpi = 96) {
|
|
64300
64497
|
const width = source2.width * (tile.scaleX ?? 1) * 96 / dpi;
|
|
64301
64498
|
const height = source2.height * (tile.scaleY ?? 1) * 96 / dpi;
|
|
64302
|
-
if (![width, height].every((
|
|
64499
|
+
if (![width, height].every((n3) => Number.isFinite(n3) && n3 > 0)) return void 0;
|
|
64303
64500
|
const anchor = pictureTileAlignment(tile.alignment);
|
|
64304
64501
|
return {
|
|
64305
64502
|
width,
|