@evotecit/officeimo 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -51
- package/bundles/officeimo-canopyx.js +1553 -314
- package/bundles/officeimo-canopyx.mjs +1497 -269
- package/bundles/officeimo-csv.js +18 -15
- package/bundles/officeimo-csv.mjs +16 -13
- package/bundles/officeimo-datatables.js +463 -301
- package/bundles/officeimo-datatables.mjs +420 -259
- package/bundles/officeimo-pdf.js +148 -65
- package/bundles/officeimo-pdf.mjs +124 -41
- package/bundles/officeimo-xlsx.js +177 -101
- package/bundles/officeimo-xlsx.mjs +149 -74
- package/bundles/officeimo.js +461 -299
- package/bundles/officeimo.mjs +419 -258
- package/dist/csv/index.js +16 -13
- package/dist/integrations/canopyx/diagnostics.d.ts +3 -0
- package/dist/integrations/canopyx/diagnostics.js +17 -0
- package/dist/integrations/canopyx/grouping.d.ts +6 -0
- package/dist/integrations/canopyx/grouping.js +198 -0
- package/dist/integrations/canopyx/index.d.ts +2 -2
- package/dist/integrations/canopyx/index.js +89 -15
- package/dist/integrations/canopyx/metadata.d.ts +4 -0
- package/dist/integrations/canopyx/metadata.js +51 -0
- package/dist/integrations/canopyx/pdf-layout.d.ts +5 -0
- package/dist/integrations/canopyx/pdf-layout.js +97 -0
- package/dist/integrations/canopyx/pdf-number.d.ts +3 -0
- package/dist/integrations/canopyx/pdf-number.js +64 -0
- package/dist/integrations/canopyx/pivot.d.ts +15 -0
- package/dist/integrations/canopyx/pivot.js +67 -0
- package/dist/integrations/canopyx/presentation.d.ts +8 -0
- package/dist/integrations/canopyx/presentation.js +40 -0
- package/dist/integrations/canopyx/rule-predicates.d.ts +3 -0
- package/dist/integrations/canopyx/rule-predicates.js +110 -0
- package/dist/integrations/canopyx/rules.d.ts +6 -0
- package/dist/integrations/canopyx/rules.js +176 -0
- package/dist/integrations/canopyx/source.js +69 -31
- package/dist/integrations/canopyx/types.d.ts +134 -10
- package/dist/integrations/canopyx/workbook.d.ts +6 -0
- package/dist/integrations/canopyx/workbook.js +52 -0
- package/dist/opc/index.js +9 -0
- package/dist/pdf/font-resources.js +33 -14
- package/dist/pdf/pages.js +60 -14
- package/dist/pdf/table-band-flow.js +7 -2
- package/dist/pdf/table-band-plan.js +9 -1
- package/dist/pdf/table-layout.js +6 -2
- package/dist/pdf/table-structure.js +9 -8
- package/dist/xlsx/index.d.ts +1 -1
- package/dist/xlsx/options.js +1 -1
- package/dist/xlsx/outlines.d.ts +3 -0
- package/dist/xlsx/outlines.js +39 -0
- package/dist/xlsx/types.d.ts +9 -0
- package/dist/xlsx/values.js +11 -2
- package/dist/xlsx/workbook.js +2 -0
- package/dist/xlsx/worksheet.js +14 -6
- package/package.json +2 -2
package/bundles/officeimo.mjs
CHANGED
|
@@ -1596,7 +1596,16 @@ class OpcPackage {
|
|
|
1596
1596
|
throw new OfficeIMOError("INVALID_STATE", "OPC package is finalized."); }
|
|
1597
1597
|
reserve(uri, type) {
|
|
1598
1598
|
this.open();
|
|
1599
|
+
// OPC part names become ZIP entry names. Reject oversized and deeply nested
|
|
1600
|
+
// names before collecting every ancestor prefix.
|
|
1601
|
+
if (typeof uri === "string" && uri.length > 65536)
|
|
1602
|
+
throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the ZIP entry-name limit.");
|
|
1599
1603
|
uri = partUri(uri);
|
|
1604
|
+
let depth = 0;
|
|
1605
|
+
for (let index = 0; index < uri.length; index++) {
|
|
1606
|
+
if (uri[index] === "/" && ++depth > 64)
|
|
1607
|
+
throw new OfficeIMOError("RESOURCE_LIMIT", "OPC part name exceeds the directory-depth limit.");
|
|
1608
|
+
}
|
|
1600
1609
|
if (/\/_rels(?:\/|$)/i.test(uri) || uri.toLowerCase() === "/[content_types].xml")
|
|
1601
1610
|
throw new TypeError("Package metadata part names are reserved.");
|
|
1602
1611
|
const key = uri.toLowerCase();
|
|
@@ -2290,14 +2299,23 @@ function columnName(index) {
|
|
|
2290
2299
|
return name;
|
|
2291
2300
|
}
|
|
2292
2301
|
function clipName(text, length) { return text.slice(0, length).replace(/[\ud800-\udbff]$/, ""); }
|
|
2302
|
+
function trimSheetNameEdges(text) {
|
|
2303
|
+
let start = 0, end = text.length;
|
|
2304
|
+
const removable = (character) => character === "'" || /\s/u.test(character);
|
|
2305
|
+
while (start < end && removable(text[start]))
|
|
2306
|
+
start++;
|
|
2307
|
+
while (end > start && removable(text[end - 1]))
|
|
2308
|
+
end--;
|
|
2309
|
+
return text.slice(start, end);
|
|
2310
|
+
}
|
|
2293
2311
|
function sheetName(requested, names, policy, register = true) {
|
|
2294
2312
|
if (typeof requested !== "string")
|
|
2295
2313
|
throw new TypeError("Sheet name must be a string.");
|
|
2296
2314
|
// Validate and deduplicate the decoded literal value, before ST_Xstring attribute encoding.
|
|
2297
2315
|
// A requested _xHHHH_ token is literal text; the serializer protects its leading underscore.
|
|
2298
|
-
let base = cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_")
|
|
2316
|
+
let base = trimSheetNameEdges(cleanXml(requested, policy).replace(/[\[\]:*?/\\]/g, "_"));
|
|
2299
2317
|
// Clipping can expose an internal apostrophe or the reserved History name.
|
|
2300
|
-
base = clipName(base, 31)
|
|
2318
|
+
base = trimSheetNameEdges(clipName(base, 31));
|
|
2301
2319
|
if (!base)
|
|
2302
2320
|
base = "Sheet";
|
|
2303
2321
|
if (base.toLowerCase() === "history")
|
|
@@ -2328,6 +2346,51 @@ return _exports;
|
|
|
2328
2346
|
})();
|
|
2329
2347
|
|
|
2330
2348
|
const _m29 = (() => {
|
|
2349
|
+
const { captureFields } = _m10;
|
|
2350
|
+
|
|
2351
|
+
/** Capture bounded disjoint ranges before asynchronous serialization; absent columns stay visible. */
|
|
2352
|
+
function captureColumnOutlines(input, columns) {
|
|
2353
|
+
if (input === undefined)
|
|
2354
|
+
return undefined;
|
|
2355
|
+
if (!Array.isArray(input) || input.length > columns)
|
|
2356
|
+
throw new TypeError("Column outlines must be bounded, non-overlapping ranges.");
|
|
2357
|
+
let end = 0;
|
|
2358
|
+
return Object.freeze(input.map(range => {
|
|
2359
|
+
if (!range || typeof range !== "object")
|
|
2360
|
+
throw new TypeError("Column outlines require range metadata.");
|
|
2361
|
+
return captureFields(range, ["firstColumn", "columnCount", "level", "hidden", "collapsed"]);
|
|
2362
|
+
}).sort((a, b) => a.firstColumn - b.firstColumn).map(range => {
|
|
2363
|
+
const { firstColumn, columnCount, level = 0, hidden, collapsed } = range;
|
|
2364
|
+
if (!Number.isSafeInteger(firstColumn) || firstColumn < end || !Number.isSafeInteger(columnCount) || columnCount < 1 || firstColumn + columnCount > columns)
|
|
2365
|
+
throw new RangeError("Column outline ranges must be disjoint and within the declared columns.");
|
|
2366
|
+
if (!Number.isInteger(level) || level < 0 || level > 7)
|
|
2367
|
+
throw new RangeError("Column outline level must be from zero through seven.");
|
|
2368
|
+
for (const flag of [hidden, collapsed])
|
|
2369
|
+
if (flag !== undefined && typeof flag !== "boolean")
|
|
2370
|
+
throw new TypeError("Column outline flags must be booleans.");
|
|
2371
|
+
end = firstColumn + columnCount;
|
|
2372
|
+
return Object.freeze({ firstColumn, columnCount, level, ...(hidden === undefined ? {} : { hidden }), ...(collapsed === undefined ? {} : { collapsed }) });
|
|
2373
|
+
}));
|
|
2374
|
+
}
|
|
2375
|
+
/** @internal Positions are captured even when a sheet has only column outlines. */
|
|
2376
|
+
function validateOutlinePositions(options) {
|
|
2377
|
+
for (const flag of [options.outlineSummaryBelow, options.outlineSummaryRight])
|
|
2378
|
+
if (flag !== undefined && typeof flag !== "boolean")
|
|
2379
|
+
throw new TypeError("Outline summary positions must be booleans.");
|
|
2380
|
+
}
|
|
2381
|
+
/** @internal Resolve at most 16,384 columns once, without retaining any worksheet body. */
|
|
2382
|
+
function columnOutlineMap(ranges) {
|
|
2383
|
+
const result = new Map();
|
|
2384
|
+
for (const range of ranges ?? [])
|
|
2385
|
+
for (let index = range.firstColumn; index < range.firstColumn + range.columnCount; index++)
|
|
2386
|
+
result.set(index, range);
|
|
2387
|
+
return result;
|
|
2388
|
+
}
|
|
2389
|
+
const _exports = Object.freeze({ captureColumnOutlines: captureColumnOutlines, validateOutlinePositions: validateOutlinePositions, columnOutlineMap: columnOutlineMap });
|
|
2390
|
+
return _exports;
|
|
2391
|
+
})();
|
|
2392
|
+
|
|
2393
|
+
const _m30 = (() => {
|
|
2331
2394
|
const { assertExportValue } = _m5;
|
|
2332
2395
|
|
|
2333
2396
|
const { copyExportValue } = _m13;
|
|
@@ -2392,7 +2455,7 @@ const _exports = Object.freeze({ captureTableSpans: captureTableSpans, tableSpan
|
|
|
2392
2455
|
return _exports;
|
|
2393
2456
|
})();
|
|
2394
2457
|
|
|
2395
|
-
const
|
|
2458
|
+
const _m33 = (() => {
|
|
2396
2459
|
const { ChunkedTextSink } = _m3;
|
|
2397
2460
|
|
|
2398
2461
|
const { escapeXml, xmlDeclaration } = _m17;
|
|
@@ -2504,14 +2567,14 @@ const _exports = Object.freeze({ chartNamespace: chartNamespace, chartContentTyp
|
|
|
2504
2567
|
return _exports;
|
|
2505
2568
|
})();
|
|
2506
2569
|
|
|
2507
|
-
const
|
|
2570
|
+
const _m32 = (() => {
|
|
2508
2571
|
const { cleanXml, escapeXml, escapeOoxmlAttribute, xmlDeclaration } = _m17;
|
|
2509
2572
|
|
|
2510
2573
|
const { copyExportLink } = _m7;
|
|
2511
2574
|
|
|
2512
2575
|
const { officeRelationshipsNamespace } = _m18;
|
|
2513
2576
|
|
|
2514
|
-
const { chartAnchorXml } =
|
|
2577
|
+
const { chartAnchorXml } = _m33;
|
|
2515
2578
|
|
|
2516
2579
|
const { captureFields } = _m10;
|
|
2517
2580
|
|
|
@@ -2581,10 +2644,10 @@ const _exports = Object.freeze({ copyDrawingAnchor: copyDrawingAnchor, cellPosit
|
|
|
2581
2644
|
return _exports;
|
|
2582
2645
|
})();
|
|
2583
2646
|
|
|
2584
|
-
const
|
|
2647
|
+
const _m35 = (() => {
|
|
2585
2648
|
const { OfficeIMOError } = _m2;
|
|
2586
2649
|
|
|
2587
|
-
const { cellPosition } =
|
|
2650
|
+
const { cellPosition } = _m32;
|
|
2588
2651
|
|
|
2589
2652
|
function indexRows(regions) {
|
|
2590
2653
|
if (!regions.length)
|
|
@@ -2685,10 +2748,10 @@ const _exports = Object.freeze({ MergeRegions: MergeRegions });
|
|
|
2685
2748
|
return _exports;
|
|
2686
2749
|
})();
|
|
2687
2750
|
|
|
2688
|
-
const
|
|
2751
|
+
const _m36 = (() => {
|
|
2689
2752
|
const { ExportCell } = _m5;
|
|
2690
2753
|
|
|
2691
|
-
const { tableSpans } =
|
|
2754
|
+
const { tableSpans } = _m30;
|
|
2692
2755
|
|
|
2693
2756
|
const { copyValue, columnName } = _m27;
|
|
2694
2757
|
|
|
@@ -2721,7 +2784,7 @@ const _exports = Object.freeze({ StructuredRows: StructuredRows });
|
|
|
2721
2784
|
return _exports;
|
|
2722
2785
|
})();
|
|
2723
2786
|
|
|
2724
|
-
const
|
|
2787
|
+
const _m34 = (() => {
|
|
2725
2788
|
const { ExportCell } = _m5;
|
|
2726
2789
|
|
|
2727
2790
|
const { isDate } = _m6;
|
|
@@ -2732,13 +2795,13 @@ const { FormulaCell } = _m28;
|
|
|
2732
2795
|
|
|
2733
2796
|
const { escapeOoxmlAttribute } = _m17;
|
|
2734
2797
|
|
|
2735
|
-
const { MergeRegions } =
|
|
2798
|
+
const { MergeRegions } = _m35;
|
|
2736
2799
|
|
|
2737
2800
|
const { OfficeIMOError } = _m2;
|
|
2738
2801
|
|
|
2739
2802
|
const { createTotals } = _m12;
|
|
2740
2803
|
|
|
2741
|
-
const { StructuredRows } =
|
|
2804
|
+
const { StructuredRows } = _m36;
|
|
2742
2805
|
|
|
2743
2806
|
/** @internal A computed formula with a numeric cache; no public arbitrary-formula input. */
|
|
2744
2807
|
class ComputedTotal {
|
|
@@ -2921,7 +2984,7 @@ const _exports = Object.freeze({ ComputedTotal: ComputedTotal, ReportLayout: Rep
|
|
|
2921
2984
|
return _exports;
|
|
2922
2985
|
})();
|
|
2923
2986
|
|
|
2924
|
-
const
|
|
2987
|
+
const _m38 = (() => {
|
|
2925
2988
|
const { columnName } = _m27;
|
|
2926
2989
|
|
|
2927
2990
|
/** @internal Data-column selectors use stable keys or one-based worksheet columns. */
|
|
@@ -2951,7 +3014,7 @@ const _exports = Object.freeze({ resolveDataColumn: resolveDataColumn, qualified
|
|
|
2951
3014
|
return _exports;
|
|
2952
3015
|
})();
|
|
2953
3016
|
|
|
2954
|
-
const
|
|
3017
|
+
const _m39 = (() => {
|
|
2955
3018
|
const { OfficeIMOError } = _m2;
|
|
2956
3019
|
|
|
2957
3020
|
const { columnName } = _m27;
|
|
@@ -2997,18 +3060,18 @@ const _exports = Object.freeze({ retainDataRowRanges: retainDataRowRanges, dataR
|
|
|
2997
3060
|
return _exports;
|
|
2998
3061
|
})();
|
|
2999
3062
|
|
|
3000
|
-
const
|
|
3063
|
+
const _m37 = (() => {
|
|
3001
3064
|
const { cleanXml, escapeXml, escapeOoxmlAttribute } = _m17;
|
|
3002
3065
|
|
|
3003
|
-
const { cellPosition } =
|
|
3066
|
+
const { cellPosition } = _m32;
|
|
3004
3067
|
|
|
3005
3068
|
const { colorArgb } = _m25;
|
|
3006
3069
|
|
|
3007
3070
|
const { fields, optionalBoolean, differentialXml } = _m26;
|
|
3008
3071
|
|
|
3009
|
-
const { resolveDataColumn } =
|
|
3072
|
+
const { resolveDataColumn } = _m38;
|
|
3010
3073
|
|
|
3011
|
-
const { dataRowReference } =
|
|
3074
|
+
const { dataRowReference } = _m39;
|
|
3012
3075
|
|
|
3013
3076
|
function target(range, columns) {
|
|
3014
3077
|
if (typeof range === "string") {
|
|
@@ -3166,7 +3229,7 @@ const _exports = Object.freeze({ prepareConditionalFormats: prepareConditionalFo
|
|
|
3166
3229
|
return _exports;
|
|
3167
3230
|
})();
|
|
3168
3231
|
|
|
3169
|
-
const
|
|
3232
|
+
const _m40 = (() => {
|
|
3170
3233
|
const { OfficeIMOError } = _m2;
|
|
3171
3234
|
|
|
3172
3235
|
const { checkAbort } = _m4;
|
|
@@ -3175,9 +3238,9 @@ const { cleanXml, escapeOoxmlAttribute, escapeXml } = _m17;
|
|
|
3175
3238
|
|
|
3176
3239
|
const { fields, optionalBoolean } = _m26;
|
|
3177
3240
|
|
|
3178
|
-
const { resolveDataColumn } =
|
|
3241
|
+
const { resolveDataColumn } = _m38;
|
|
3179
3242
|
|
|
3180
|
-
const { dataRowReference } =
|
|
3243
|
+
const { dataRowReference } = _m39;
|
|
3181
3244
|
|
|
3182
3245
|
function message(value, maximum, name) {
|
|
3183
3246
|
if (value === undefined)
|
|
@@ -3269,7 +3332,7 @@ const _exports = Object.freeze({ prepareDataValidations: prepareDataValidations,
|
|
|
3269
3332
|
return _exports;
|
|
3270
3333
|
})();
|
|
3271
3334
|
|
|
3272
|
-
const
|
|
3335
|
+
const _m31 = (() => {
|
|
3273
3336
|
const { checkAbort, consumeRows, inputRows, pause, taskYieldDue } = _m4;
|
|
3274
3337
|
|
|
3275
3338
|
const { ChunkedTextSink, BlobByteSink } = _m3;
|
|
@@ -3290,25 +3353,27 @@ const { Cell, cellText, columnName, inlineText, excelDate, copyValue } = _m27;
|
|
|
3290
3353
|
|
|
3291
3354
|
const { spreadsheetNamespace, colorArgb, validateStylePatch, copyStylePatch } = _m24;
|
|
3292
3355
|
|
|
3293
|
-
const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } =
|
|
3356
|
+
const { copyHyperlink, copyImage, hyperlinksXml, cellPosition } = _m32;
|
|
3294
3357
|
|
|
3295
3358
|
const { ExportCell, assertScalar } = _m5;
|
|
3296
3359
|
|
|
3297
|
-
const { ReportLayout, ComputedTotal, printXml } =
|
|
3360
|
+
const { ReportLayout, ComputedTotal, printXml } = _m34;
|
|
3298
3361
|
|
|
3299
3362
|
const { cleanXml } = _m17;
|
|
3300
3363
|
|
|
3301
|
-
const { ConditionalFormats, prepareConditionalFormats } =
|
|
3364
|
+
const { ConditionalFormats, prepareConditionalFormats } = _m37;
|
|
3302
3365
|
|
|
3303
3366
|
const { isDate } = _m6;
|
|
3304
3367
|
|
|
3305
3368
|
const { FormulaCell, formulaXml, isSubtotalFormula } = _m28;
|
|
3306
3369
|
|
|
3307
|
-
const { prepareDataValidations, dataValidationsXml } =
|
|
3370
|
+
const { prepareDataValidations, dataValidationsXml } = _m40;
|
|
3308
3371
|
|
|
3309
|
-
const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } =
|
|
3372
|
+
const { qualifiedCell, qualifiedColumnRange, resolveDataColumn } = _m38;
|
|
3310
3373
|
|
|
3311
|
-
const { dataRowRanges, dataRowCount } =
|
|
3374
|
+
const { dataRowRanges, dataRowCount } = _m39;
|
|
3375
|
+
|
|
3376
|
+
const { captureColumnOutlines, columnOutlineMap, validateOutlinePositions } = _m29;
|
|
3312
3377
|
|
|
3313
3378
|
const maximumHyperlinks = 65530;
|
|
3314
3379
|
function checkHyperlinkCount(count) {
|
|
@@ -3440,6 +3505,8 @@ class Worksheet {
|
|
|
3440
3505
|
throw new TypeError("Row and style callbacks must be functions.");
|
|
3441
3506
|
if (options.maxOutlineLevel !== undefined && (!Number.isInteger(options.maxOutlineLevel) || options.maxOutlineLevel < 0 || options.maxOutlineLevel > 7))
|
|
3442
3507
|
throw new RangeError("Maximum outline level must be an integer from zero through seven.");
|
|
3508
|
+
validateOutlinePositions(options);
|
|
3509
|
+
captureColumnOutlines(options.columnOutlines, columns.length);
|
|
3443
3510
|
if (options.rowOutline && options.maxOutlineLevel === undefined)
|
|
3444
3511
|
throw new TypeError("A row outline callback requires maxOutlineLevel before streamed rows are written.");
|
|
3445
3512
|
if (!options.rowOutline && options.maxOutlineLevel !== undefined)
|
|
@@ -3724,17 +3791,22 @@ class Worksheet {
|
|
|
3724
3791
|
const buffer = this.buffer = new ChunkedTextSink(this.entry, this.book.settings.signal), opts = this.options;
|
|
3725
3792
|
const x = opts.freezeColumns ?? 0, y = opts.freezeHeader ? this.headerRows : 0;
|
|
3726
3793
|
const pane = x && y ? "bottomRight" : x ? "topRight" : "bottomLeft", cell = columnName(x + 1) + (y + 1);
|
|
3794
|
+
const outlines = columnOutlineMap(opts.columnOutlines), hasOutline = !!opts.rowOutline || outlines.size > 0;
|
|
3795
|
+
const maxColumnLevel = Math.max(0, ...Array.from(outlines.values(), value => value.level ?? 0));
|
|
3727
3796
|
await buffer.write(xmlDeclaration + '<worksheet xmlns="' + spreadsheetNamespace + '" xmlns:r="' + officeRelationshipsNamespace + '">' +
|
|
3728
|
-
(opts.print ||
|
|
3797
|
+
(opts.print || hasOutline ? '<sheetPr>' + (hasOutline ? '<outlinePr summaryBelow="' + (opts.outlineSummaryBelow === false ? "0" : "1") + '"' + (opts.outlineSummaryRight === undefined ? "" : ' summaryRight="' + (opts.outlineSummaryRight ? "1" : "0") + '"') + ' showOutlineSymbols="1"/>' : "") + (opts.print ? '<pageSetUpPr fitToPage="1"/>' : "") + '</sheetPr>' : "") + '<sheetViews><sheetView workbookViewId="0">' +
|
|
3729
3798
|
(x || y ? '<pane' + (x ? ' xSplit="' + x + '"' : "") + (y ? ' ySplit="' + y + '"' : "") + ' topLeftCell="' + cell + '" activePane="' + pane + '" state="frozen"/><selection pane="' + pane + '" activeCell="' + cell + '" sqref="' + cell + '"/>' : "") + '</sheetView></sheetViews>' +
|
|
3730
|
-
(
|
|
3799
|
+
(hasOutline ? '<sheetFormatPr defaultRowHeight="15"' + (opts.rowOutline ? ' outlineLevelRow="' + opts.maxOutlineLevel + '"' : "") + (outlines.size ? ' outlineLevelCol="' + maxColumnLevel + '"' : "") + '/>' : ""));
|
|
3731
3800
|
const defaultWidth = opts.defaultColumnWidth ?? (this.table ? 20 : undefined);
|
|
3732
|
-
if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined)) {
|
|
3801
|
+
if (this.columns.some((_, i) => this.layout.widths[i] !== undefined || defaultWidth !== undefined || outlines.has(i))) {
|
|
3733
3802
|
await buffer.write('<cols>');
|
|
3734
3803
|
for (let i = 0; i < this.columns.length; i++) {
|
|
3735
|
-
const width = this.layout.widths[i] ?? defaultWidth;
|
|
3736
|
-
if (width !== undefined)
|
|
3737
|
-
await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '"
|
|
3804
|
+
const width = this.layout.widths[i] ?? defaultWidth, outline = outlines.get(i);
|
|
3805
|
+
if (width !== undefined || outline)
|
|
3806
|
+
await buffer.write('<col min="' + (i + 1) + '" max="' + (i + 1) + '"' +
|
|
3807
|
+
(width === undefined ? "" : ' width="' + width + '" customWidth="1"') +
|
|
3808
|
+
(outline?.level ? ' outlineLevel="' + outline.level + '"' : "") + (outline?.hidden ? ' hidden="1"' : "") +
|
|
3809
|
+
(outline?.collapsed ? ' collapsed="1"' : "") + '/>');
|
|
3738
3810
|
}
|
|
3739
3811
|
await buffer.write('</cols>');
|
|
3740
3812
|
}
|
|
@@ -3995,7 +4067,7 @@ const _exports = Object.freeze({ Worksheet: Worksheet });
|
|
|
3995
4067
|
return _exports;
|
|
3996
4068
|
})();
|
|
3997
4069
|
|
|
3998
|
-
const
|
|
4070
|
+
const _m41 = (() => {
|
|
3999
4071
|
const { escapeOoxmlAttribute, escapeXml, xmlDeclaration } = _m17;
|
|
4000
4072
|
|
|
4001
4073
|
const { cellText, columnName } = _m27;
|
|
@@ -4006,7 +4078,7 @@ const { ExportCell } = _m5;
|
|
|
4006
4078
|
|
|
4007
4079
|
const { Cell } = _m27;
|
|
4008
4080
|
|
|
4009
|
-
const { totalFormula } =
|
|
4081
|
+
const { totalFormula } = _m34;
|
|
4010
4082
|
|
|
4011
4083
|
function defineTable(id, options, columns, policy) {
|
|
4012
4084
|
const name = options.name ?? "Table" + id;
|
|
@@ -4041,7 +4113,7 @@ const _exports = Object.freeze({ defineTable: defineTable, tableXml: tableXml })
|
|
|
4041
4113
|
return _exports;
|
|
4042
4114
|
})();
|
|
4043
4115
|
|
|
4044
|
-
const
|
|
4116
|
+
const _m42 = (() => {
|
|
4045
4117
|
const { OfficeIMOError } = _m2;
|
|
4046
4118
|
|
|
4047
4119
|
const { cleanXml } = _m17;
|
|
@@ -4108,13 +4180,13 @@ const _exports = Object.freeze({ TextOverflow: TextOverflow, clipText: clipText
|
|
|
4108
4180
|
return _exports;
|
|
4109
4181
|
})();
|
|
4110
4182
|
|
|
4111
|
-
const
|
|
4183
|
+
const _m43 = (() => {
|
|
4112
4184
|
const { captureFields } = _m10;
|
|
4113
4185
|
|
|
4114
4186
|
/** @internal The workbook owner captures these settings before validation or adapter merging. */
|
|
4115
4187
|
const workbookOptionFields = ["signal", "onProgress", "limits", "sink", "dateMode", "compression", "invalidCharacterPolicy", "appProperties", "cellValueWriters", "oversizedText", "creator", "title", "subject", "description", "created", "modified"];
|
|
4116
4188
|
/** @internal Worksheet settings also used by the portable sheet owner. */
|
|
4117
|
-
const sheetOptionFields = ["columns", "includeHeader", "headerRows", "freezeHeader", "autoFilter", "boldHeader", "headerFill", "headerStyle", "alternatingRowStyle", "rowStyle", "cellStyle", "rowOutline", "maxOutlineLevel", "rowHeight", "headerHeight", "defaultColumnWidth", "freezeColumns", "table", "autoSize", "footer", "print", "title", "mergedCells", "hyperlinks", "conditionalFormats", "dataValidation"];
|
|
4189
|
+
const sheetOptionFields = ["columns", "includeHeader", "headerRows", "freezeHeader", "autoFilter", "boldHeader", "headerFill", "headerStyle", "alternatingRowStyle", "rowStyle", "cellStyle", "rowOutline", "maxOutlineLevel", "outlineSummaryBelow", "outlineSummaryRight", "columnOutlines", "rowHeight", "headerHeight", "defaultColumnWidth", "freezeColumns", "table", "autoSize", "footer", "print", "title", "mergedCells", "hyperlinks", "conditionalFormats", "dataValidation"];
|
|
4118
4190
|
/** @internal Includes inherited format-specific ceilings before a wrapper combines stream settings. */
|
|
4119
4191
|
const workbookLimitFields = ["maxRows", "maxCells", "maxTextCharacters", "maxOutputBytes", "maxStyles", "maxSheets", "maxOverflowCharacters", "maxHyperlinks", "maxImageBytes", "maxBufferedCells", "maxBufferedCharacters", "maxMergedRanges", "maxConditionalFormats", "maxDifferentialStyles", "maxCharts", "maxChartPoints", "maxChartTextCharacters", "maxFormulaCharacters", "maxDataValidations", "maxValidationTextCharacters"];
|
|
4120
4192
|
/** @internal Capture the workbook's known ceilings without dropping supported prototype fields. */
|
|
@@ -4130,7 +4202,7 @@ const _exports = Object.freeze({ workbookOptionFields: workbookOptionFields, she
|
|
|
4130
4202
|
return _exports;
|
|
4131
4203
|
})();
|
|
4132
4204
|
|
|
4133
|
-
const
|
|
4205
|
+
const _m45 = (() => {
|
|
4134
4206
|
const { checkAbort } = _m4;
|
|
4135
4207
|
|
|
4136
4208
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
@@ -4261,18 +4333,18 @@ const _exports = Object.freeze({ captureChartRange: captureChartRange, prepareCh
|
|
|
4261
4333
|
return _exports;
|
|
4262
4334
|
})();
|
|
4263
4335
|
|
|
4264
|
-
const
|
|
4336
|
+
const _m44 = (() => {
|
|
4265
4337
|
const { checkAbort } = _m4;
|
|
4266
4338
|
|
|
4267
4339
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
4268
4340
|
|
|
4269
4341
|
const { cleanXml } = _m17;
|
|
4270
4342
|
|
|
4271
|
-
const { copyDrawingAnchor } =
|
|
4343
|
+
const { copyDrawingAnchor } = _m32;
|
|
4272
4344
|
|
|
4273
4345
|
const { captureFields } = _m10;
|
|
4274
4346
|
|
|
4275
|
-
const { captureChartRange, prepareChartBinding } =
|
|
4347
|
+
const { captureChartRange, prepareChartBinding } = _m45;
|
|
4276
4348
|
|
|
4277
4349
|
function fields(value, allowed, context) {
|
|
4278
4350
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
@@ -4454,25 +4526,27 @@ const { copyColumns } = _m11;
|
|
|
4454
4526
|
|
|
4455
4527
|
const { captureFields } = _m10;
|
|
4456
4528
|
|
|
4457
|
-
const {
|
|
4529
|
+
const { captureColumnOutlines } = _m29;
|
|
4530
|
+
|
|
4531
|
+
const { captureTableSpans } = _m30;
|
|
4458
4532
|
|
|
4459
4533
|
const { assertExportValue } = _m5;
|
|
4460
4534
|
|
|
4461
|
-
const { Worksheet } =
|
|
4535
|
+
const { Worksheet } = _m31;
|
|
4462
4536
|
|
|
4463
|
-
const { defineTable, tableXml } =
|
|
4537
|
+
const { defineTable, tableXml } = _m41;
|
|
4464
4538
|
|
|
4465
|
-
const { copyHyperlink, drawingXml, drawingContentType } =
|
|
4539
|
+
const { copyHyperlink, drawingXml, drawingContentType } = _m32;
|
|
4466
4540
|
|
|
4467
|
-
const { TextOverflow } =
|
|
4541
|
+
const { TextOverflow } = _m42;
|
|
4468
4542
|
|
|
4469
|
-
const { captureWorkbookOptions, sheetOptionFields } =
|
|
4543
|
+
const { captureWorkbookOptions, sheetOptionFields } = _m43;
|
|
4470
4544
|
|
|
4471
|
-
const { prepareChart } =
|
|
4545
|
+
const { prepareChart } = _m44;
|
|
4472
4546
|
|
|
4473
|
-
const { qualifiedColumnRange, resolveDataColumn } =
|
|
4547
|
+
const { qualifiedColumnRange, resolveDataColumn } = _m38;
|
|
4474
4548
|
|
|
4475
|
-
const { chartContentType, writeChartXml } =
|
|
4549
|
+
const { chartContentType, writeChartXml } = _m33;
|
|
4476
4550
|
|
|
4477
4551
|
const xlsxMime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
4478
4552
|
const formatType = (name) => "application/vnd.openxmlformats-officedocument.spreadsheetml." + name + "+xml";
|
|
@@ -4483,6 +4557,7 @@ function captureSheet(options, policy) {
|
|
|
4483
4557
|
const footer = captured.footer && captureFields(captured.footer, ["rows", "values", "totals", "style"]);
|
|
4484
4558
|
const print = captured.print && captureFields(captured.print, ["paper", "orientation", "fitToWidth", "fitToHeight", "repeatHeaders", "margins", "header", "footer"]);
|
|
4485
4559
|
return { ...captured, columns,
|
|
4560
|
+
...(captured.columnOutlines === undefined ? {} : { columnOutlines: captureColumnOutlines(captured.columnOutlines, columns.length) }),
|
|
4486
4561
|
...(captured.headerRows === undefined ? {} : { headerRows: captureTableSpans(captured.headerRows, columns.length) }),
|
|
4487
4562
|
...(footer ? { footer: { ...footer,
|
|
4488
4563
|
...(footer.rows === undefined ? {} : { rows: captureTableSpans(footer.rows, columns.length) }),
|
|
@@ -4912,10 +4987,10 @@ const _exports = Object.freeze({ Workbook: Workbook });
|
|
|
4912
4987
|
return _exports;
|
|
4913
4988
|
})();
|
|
4914
4989
|
|
|
4915
|
-
const
|
|
4990
|
+
const _m47 = (() => {
|
|
4916
4991
|
const { ExportCell, assertScalar } = _m5;
|
|
4917
4992
|
|
|
4918
|
-
const { captureWorkbookOptions, sheetOptionFields } =
|
|
4993
|
+
const { captureWorkbookOptions, sheetOptionFields } = _m43;
|
|
4919
4994
|
|
|
4920
4995
|
const { captureFields } = _m10;
|
|
4921
4996
|
|
|
@@ -4964,18 +5039,18 @@ const _exports = Object.freeze({ portableSheet: portableSheet, portableWorkbook:
|
|
|
4964
5039
|
return _exports;
|
|
4965
5040
|
})();
|
|
4966
5041
|
|
|
4967
|
-
const
|
|
5042
|
+
const _m46 = (() => {
|
|
4968
5043
|
const { withDestination } = _m3;
|
|
4969
5044
|
|
|
4970
5045
|
const { copyColumns } = _m11;
|
|
4971
5046
|
|
|
4972
5047
|
const { Workbook } = _m22;
|
|
4973
5048
|
|
|
4974
|
-
const { portableSheet, portableWorkbook } =
|
|
5049
|
+
const { portableSheet, portableWorkbook } = _m47;
|
|
4975
5050
|
|
|
4976
5051
|
const { captureFields } = _m10;
|
|
4977
5052
|
|
|
4978
|
-
const { sheetOptionFields, workbookOptionFields } =
|
|
5053
|
+
const { sheetOptionFields, workbookOptionFields } = _m43;
|
|
4979
5054
|
|
|
4980
5055
|
function prepare(options) {
|
|
4981
5056
|
options = captureFields(options, [...workbookOptionFields, "columns", "sheet"]);
|
|
@@ -5022,7 +5097,7 @@ const _exports = Object.freeze({ writeXlsx: writeXlsx, writeXlsxTo: writeXlsxTo
|
|
|
5022
5097
|
return _exports;
|
|
5023
5098
|
})();
|
|
5024
5099
|
|
|
5025
|
-
const
|
|
5100
|
+
const _m49 = (() => {
|
|
5026
5101
|
const { assertGroupedReportSource } = _m8;
|
|
5027
5102
|
|
|
5028
5103
|
const { captureFields } = _m10;
|
|
@@ -5031,11 +5106,11 @@ const { OfficeIMOError } = _m2;
|
|
|
5031
5106
|
|
|
5032
5107
|
const { fields } = _m26;
|
|
5033
5108
|
|
|
5034
|
-
const { sheetOptionFields } =
|
|
5109
|
+
const { sheetOptionFields } = _m43;
|
|
5035
5110
|
|
|
5036
|
-
const { portableSheet } =
|
|
5111
|
+
const { portableSheet } = _m47;
|
|
5037
5112
|
|
|
5038
|
-
const { resolveDataColumn } =
|
|
5113
|
+
const { resolveDataColumn } = _m38;
|
|
5039
5114
|
|
|
5040
5115
|
const { copyStylePatch } = _m24;
|
|
5041
5116
|
|
|
@@ -5114,7 +5189,7 @@ const _exports = Object.freeze({ groupedOptionFields: groupedOptionFields, prepa
|
|
|
5114
5189
|
return _exports;
|
|
5115
5190
|
})();
|
|
5116
5191
|
|
|
5117
|
-
const
|
|
5192
|
+
const _m48 = (() => {
|
|
5118
5193
|
const { groupedReportOperation } = _m8;
|
|
5119
5194
|
|
|
5120
5195
|
const { checkAbort, withAbort } = _m4;
|
|
@@ -5129,11 +5204,11 @@ const { FormulaCell } = _m28;
|
|
|
5129
5204
|
|
|
5130
5205
|
const { columnName } = _m27;
|
|
5131
5206
|
|
|
5132
|
-
const { captureWorkbookLimits, workbookOptionFields } =
|
|
5207
|
+
const { captureWorkbookLimits, workbookOptionFields } = _m43;
|
|
5133
5208
|
|
|
5134
|
-
const { retainDataRowRanges } =
|
|
5209
|
+
const { retainDataRowRanges } = _m39;
|
|
5135
5210
|
|
|
5136
|
-
const { groupedOptionFields, prepareGroupedSheet } =
|
|
5211
|
+
const { groupedOptionFields, prepareGroupedSheet } = _m49;
|
|
5137
5212
|
|
|
5138
5213
|
const subtotalOperations = { average: 1, count: 2, max: 4, min: 5, sum: 9 };
|
|
5139
5214
|
function label(value) {
|
|
@@ -5292,12 +5367,12 @@ return _exports;
|
|
|
5292
5367
|
|
|
5293
5368
|
const _m21 = (() => {
|
|
5294
5369
|
|
|
5295
|
-
const _exports = Object.freeze({ Workbook: _m22.Workbook, writeXlsx:
|
|
5370
|
+
const _exports = Object.freeze({ Workbook: _m22.Workbook, writeXlsx: _m46.writeXlsx, writeXlsxTo: _m46.writeXlsxTo, writeGroupedXlsx: _m48.writeGroupedXlsx, writeGroupedXlsxTo: _m48.writeGroupedXlsxTo, addGroupedXlsx: _m48.addGroupedXlsx, createGroupedReport: _m8.createGroupedReport, Worksheet: _m31.Worksheet, Cell: _m27.Cell, FormulaCell: _m28.FormulaCell, StyleRegistry: _m24.StyleRegistry, NumberFormats: _m24.NumberFormats, saveBlob: _m1.saveBlob, ExportCell: _m5.ExportCell });
|
|
5296
5371
|
return _exports;
|
|
5297
5372
|
})();
|
|
5298
5373
|
|
|
5299
|
-
const
|
|
5300
|
-
const { captureTableSpans, tableSpans } =
|
|
5374
|
+
const _m51 = (() => {
|
|
5375
|
+
const { captureTableSpans, tableSpans } = _m30;
|
|
5301
5376
|
|
|
5302
5377
|
/** Snapshot small report matrices; flattening is an explicit format decision, never inferred from labels. */
|
|
5303
5378
|
function csvStructuredRows(rows, columns, mode) {
|
|
@@ -5317,7 +5392,7 @@ const _exports = Object.freeze({ csvStructuredRows: csvStructuredRows });
|
|
|
5317
5392
|
return _exports;
|
|
5318
5393
|
})();
|
|
5319
5394
|
|
|
5320
|
-
const
|
|
5395
|
+
const _m52 = (() => {
|
|
5321
5396
|
/** Compatibility display policy; hosts can supply labels without changing typed source values. */
|
|
5322
5397
|
const defaultBooleanText = Object.freeze({ true: "True", false: "False" });
|
|
5323
5398
|
/** @internal Capture display policy once, before source iteration or asynchronous output. */
|
|
@@ -5335,7 +5410,7 @@ const _exports = Object.freeze({ defaultBooleanText: defaultBooleanText, capture
|
|
|
5335
5410
|
return _exports;
|
|
5336
5411
|
})();
|
|
5337
5412
|
|
|
5338
|
-
const
|
|
5413
|
+
const _m53 = (() => {
|
|
5339
5414
|
const { captureFields } = _m10;
|
|
5340
5415
|
|
|
5341
5416
|
/** @internal Share the format's capture policy with thin adapters before they compose options. */
|
|
@@ -5349,7 +5424,7 @@ const _exports = Object.freeze({ captureCsvOptions: captureCsvOptions });
|
|
|
5349
5424
|
return _exports;
|
|
5350
5425
|
})();
|
|
5351
5426
|
|
|
5352
|
-
const
|
|
5427
|
+
const _m50 = (() => {
|
|
5353
5428
|
const { beginTask, checkAbort, consumeRows, taskYieldDue, withAbort } = _m4;
|
|
5354
5429
|
|
|
5355
5430
|
const { BlobByteSink, ChunkedTextSink, withDestination } = _m3;
|
|
@@ -5364,39 +5439,42 @@ const { notifyProgress } = _m23;
|
|
|
5364
5439
|
|
|
5365
5440
|
const { copyColumns, createRowProjector } = _m11;
|
|
5366
5441
|
|
|
5367
|
-
const { csvStructuredRows } =
|
|
5442
|
+
const { csvStructuredRows } = _m51;
|
|
5368
5443
|
|
|
5369
|
-
const { captureBooleanText } =
|
|
5444
|
+
const { captureBooleanText } = _m52;
|
|
5370
5445
|
|
|
5371
|
-
const { captureCsvOptions } =
|
|
5446
|
+
const { captureCsvOptions } = _m53;
|
|
5372
5447
|
|
|
5373
5448
|
|
|
5374
5449
|
|
|
5375
5450
|
|
|
5376
5451
|
|
|
5377
|
-
function csvField(value, delimiter, protect, quote, booleanText
|
|
5378
|
-
|
|
5379
|
-
value = nullValue;
|
|
5452
|
+
function csvField(value, delimiter, protect, quote, booleanText) {
|
|
5453
|
+
const kind = typeof value;
|
|
5380
5454
|
let text;
|
|
5381
5455
|
if (value == null)
|
|
5382
5456
|
text = "";
|
|
5457
|
+
else if (kind === "string")
|
|
5458
|
+
text = value;
|
|
5459
|
+
else if (kind === "number") {
|
|
5460
|
+
text = Number.isFinite(value) ? String(value) : "";
|
|
5461
|
+
// Numeric text has no CSV delimiter, quote or line break to escape.
|
|
5462
|
+
return quote === "all" ? '"' + text + '"' : text;
|
|
5463
|
+
}
|
|
5464
|
+
else if (kind === "boolean")
|
|
5465
|
+
text = booleanText[value ? "true" : "false"];
|
|
5383
5466
|
else if (isDate(value))
|
|
5384
5467
|
text = Number.isFinite(value.getTime()) ? value.toISOString() : "";
|
|
5385
|
-
else if (typeof value === "boolean")
|
|
5386
|
-
text = booleanText[value ? "true" : "false"];
|
|
5387
|
-
else if (typeof value === "number")
|
|
5388
|
-
text = Number.isFinite(value) ? String(value) : "";
|
|
5389
|
-
else if (typeof value === "string")
|
|
5390
|
-
text = value;
|
|
5391
5468
|
else {
|
|
5392
5469
|
if (typeof value.then === "function")
|
|
5393
5470
|
void Promise.resolve(value).catch(() => { });
|
|
5394
5471
|
throw new TypeError("CSV cells and formatter results must be synchronous strings, numbers, booleans, Dates or null.");
|
|
5395
5472
|
}
|
|
5396
|
-
|
|
5473
|
+
// Only ASCII spaces, controls and markers through @ can begin the protected prefix.
|
|
5474
|
+
if (protect && (kind === "string" || kind === "boolean") && text.charCodeAt(0) <= 64 && /^ *[=+\-@\t\r\n]/.test(text))
|
|
5397
5475
|
text = "'" + text;
|
|
5398
|
-
return quote === "all" || (quote === "strings" &&
|
|
5399
|
-
? '"' + text.replace(/"/g, '""') + '"' : text;
|
|
5476
|
+
return quote === "all" || (quote === "strings" && kind === "string") || text.includes(delimiter) || /["\r\n]/.test(text)
|
|
5477
|
+
? '"' + (text.includes('"') ? text.replace(/"/g, '""') : text) + '"' : text;
|
|
5400
5478
|
}
|
|
5401
5479
|
async function writeCsvTo(rows, destination, configuration) {
|
|
5402
5480
|
const options = captureCsvOptions(configuration);
|
|
@@ -5448,7 +5526,7 @@ async function write(rows, sink, options) {
|
|
|
5448
5526
|
value = options.nullValue;
|
|
5449
5527
|
budget.cell(typeof value === "boolean" ? booleanText[value ? "true" : "false"] : value);
|
|
5450
5528
|
checkAbort(signal);
|
|
5451
|
-
text += (i ? delimiter : "") + csvField(value, delimiter, protect, quote, booleanText
|
|
5529
|
+
text += (i ? delimiter : "") + csvField(value, delimiter, protect, quote, booleanText);
|
|
5452
5530
|
if (text.length >= buffer.chunkSize || (i & 127) === 127 && taskYieldDue()) {
|
|
5453
5531
|
if (buffer.append(text))
|
|
5454
5532
|
return buffer.flush().then(() => record(values, header, i + 1, snapshot));
|
|
@@ -5499,7 +5577,7 @@ const _exports = Object.freeze({ saveBlob: _m1.saveBlob, ExportCell: _m5.ExportC
|
|
|
5499
5577
|
return _exports;
|
|
5500
5578
|
})();
|
|
5501
5579
|
|
|
5502
|
-
const
|
|
5580
|
+
const _m58 = (() => {
|
|
5503
5581
|
const { captureFields } = _m10;
|
|
5504
5582
|
|
|
5505
5583
|
/** Pure validation shared by document settings and named paragraph styles. */
|
|
@@ -5533,10 +5611,10 @@ const _exports = Object.freeze({ positive: positive, color: color, presentation:
|
|
|
5533
5611
|
return _exports;
|
|
5534
5612
|
})();
|
|
5535
5613
|
|
|
5536
|
-
const
|
|
5614
|
+
const _m57 = (() => {
|
|
5537
5615
|
const { OfficeIMOError } = _m2;
|
|
5538
5616
|
|
|
5539
|
-
const { positive, presentation } =
|
|
5617
|
+
const { positive, presentation } = _m58;
|
|
5540
5618
|
|
|
5541
5619
|
const fields = ["fontSize", "presentation", "keepTogether", "keepWithNext", "spaceBefore", "spaceAfter"];
|
|
5542
5620
|
const presentationFields = ["bold", "italic", "color", "alignment"];
|
|
@@ -5606,24 +5684,24 @@ const _exports = Object.freeze({ captureParagraphStyle: captureParagraphStyle, c
|
|
|
5606
5684
|
return _exports;
|
|
5607
5685
|
})();
|
|
5608
5686
|
|
|
5609
|
-
const
|
|
5687
|
+
const _m56 = (() => {
|
|
5610
5688
|
const { OfficeIMOError } = _m2;
|
|
5611
5689
|
|
|
5612
5690
|
const { ExportBudget } = _m9;
|
|
5613
5691
|
|
|
5614
5692
|
const { copyColumns } = _m11;
|
|
5615
5693
|
|
|
5616
|
-
const { captureTableSpans } =
|
|
5694
|
+
const { captureTableSpans } = _m30;
|
|
5617
5695
|
|
|
5618
5696
|
const { copyExportValue } = _m13;
|
|
5619
5697
|
|
|
5620
5698
|
const { captureFields } = _m10;
|
|
5621
5699
|
|
|
5622
|
-
const { captureParagraphStyles } =
|
|
5700
|
+
const { captureParagraphStyles } = _m57;
|
|
5623
5701
|
|
|
5624
|
-
const { captureBooleanText } =
|
|
5702
|
+
const { captureBooleanText } = _m52;
|
|
5625
5703
|
|
|
5626
|
-
const { positive, color, presentation } =
|
|
5704
|
+
const { positive, color, presentation } = _m58;
|
|
5627
5705
|
|
|
5628
5706
|
|
|
5629
5707
|
|
|
@@ -5813,11 +5891,11 @@ function settings(input, document = false) {
|
|
|
5813
5891
|
repeatedColumns: document ? Object.freeze([]) : repeatedColumns(options.wideTable, columns),
|
|
5814
5892
|
limits: { ...limits, ...(maxImageWorkingBytes === undefined ? {} : { maxImageWorkingBytes }) }, budget };
|
|
5815
5893
|
}
|
|
5816
|
-
const _exports = Object.freeze({ positive:
|
|
5894
|
+
const _exports = Object.freeze({ positive: _m58.positive, color: _m58.color, presentation: _m58.presentation, pdfOptionFields: pdfOptionFields, pdfLimitFields: pdfLimitFields, capturePdfOptions: capturePdfOptions, capturePdfLimits: capturePdfLimits, captureWideTable: captureWideTable, settings: settings });
|
|
5817
5895
|
return _exports;
|
|
5818
5896
|
})();
|
|
5819
5897
|
|
|
5820
|
-
const
|
|
5898
|
+
const _m61 = (() => {
|
|
5821
5899
|
/** @internal One type byte, an eight-byte offset/container number and a two-byte generation/index. */
|
|
5822
5900
|
const pdfXrefEntryBytes = 11;
|
|
5823
5901
|
function unsigned(bytes, offset, value, width) {
|
|
@@ -5852,12 +5930,12 @@ const _exports = Object.freeze({ pdfXrefEntryBytes: pdfXrefEntryBytes, pdfXrefCh
|
|
|
5852
5930
|
return _exports;
|
|
5853
5931
|
})();
|
|
5854
5932
|
|
|
5855
|
-
const
|
|
5933
|
+
const _m60 = (() => {
|
|
5856
5934
|
const { checkAbort, withAbort, pause, taskYieldDue } = _m4;
|
|
5857
5935
|
|
|
5858
5936
|
const { OfficeIMOError } = _m2;
|
|
5859
5937
|
|
|
5860
|
-
const { pdfXrefChunks, pdfXrefEntryBytes } =
|
|
5938
|
+
const { pdfXrefChunks, pdfXrefEntryBytes } = _m61;
|
|
5861
5939
|
|
|
5862
5940
|
const compactObjectCount = 256, compactObjectBytes = 32768;
|
|
5863
5941
|
const compactIndexChunkEntries = 4096;
|
|
@@ -6180,7 +6258,7 @@ const _exports = Object.freeze({ pdfNumber: pdfNumber, unicodeHex: unicodeHex, P
|
|
|
6180
6258
|
return _exports;
|
|
6181
6259
|
})();
|
|
6182
6260
|
|
|
6183
|
-
const
|
|
6261
|
+
const _m65 = (() => {
|
|
6184
6262
|
/** @internal Bounded big-endian reader used for caller-provided TrueType programs. */
|
|
6185
6263
|
class FontReader {
|
|
6186
6264
|
bytes;
|
|
@@ -6209,8 +6287,8 @@ const _exports = Object.freeze({ FontReader: FontReader, checksum: checksum, ali
|
|
|
6209
6287
|
return _exports;
|
|
6210
6288
|
})();
|
|
6211
6289
|
|
|
6212
|
-
const
|
|
6213
|
-
const { align4 } =
|
|
6290
|
+
const _m66 = (() => {
|
|
6291
|
+
const { align4 } = _m65;
|
|
6214
6292
|
|
|
6215
6293
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
6216
6294
|
|
|
@@ -6433,12 +6511,12 @@ const _exports = Object.freeze({ subsetTrueType: subsetTrueType, subsetTrueTypeC
|
|
|
6433
6511
|
return _exports;
|
|
6434
6512
|
})();
|
|
6435
6513
|
|
|
6436
|
-
const
|
|
6514
|
+
const _m64 = (() => {
|
|
6437
6515
|
const { NotSupportedError } = _m2;
|
|
6438
6516
|
|
|
6439
|
-
const { FontReader } =
|
|
6517
|
+
const { FontReader } = _m65;
|
|
6440
6518
|
|
|
6441
|
-
const { subsetTrueType, subsetTrueTypeCooperatively } =
|
|
6519
|
+
const { subsetTrueType, subsetTrueTypeCooperatively } = _m66;
|
|
6442
6520
|
|
|
6443
6521
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
6444
6522
|
|
|
@@ -6677,8 +6755,8 @@ const _exports = Object.freeze({ TrueTypeFont: TrueTypeFont });
|
|
|
6677
6755
|
return _exports;
|
|
6678
6756
|
})();
|
|
6679
6757
|
|
|
6680
|
-
const
|
|
6681
|
-
const { TrueTypeFont } =
|
|
6758
|
+
const _m63 = (() => {
|
|
6759
|
+
const { TrueTypeFont } = _m64;
|
|
6682
6760
|
|
|
6683
6761
|
const { beginTask, checkAbort } = _m4;
|
|
6684
6762
|
|
|
@@ -6740,7 +6818,7 @@ const _exports = Object.freeze({ fontProgram: fontProgram, PdfFont: PdfFont });
|
|
|
6740
6818
|
return _exports;
|
|
6741
6819
|
})();
|
|
6742
6820
|
|
|
6743
|
-
const
|
|
6821
|
+
const _m68 = (() => {
|
|
6744
6822
|
// Generated by scripts/pdf-widths.mjs from OfficeIMO.Pdf's Adobe AFM-derived metrics.
|
|
6745
6823
|
const helveticaWidths = new Map([
|
|
6746
6824
|
[32, [278, 278]],
|
|
@@ -7062,12 +7140,12 @@ const _exports = Object.freeze({ helveticaWidths: helveticaWidths });
|
|
|
7062
7140
|
return _exports;
|
|
7063
7141
|
})();
|
|
7064
7142
|
|
|
7065
|
-
const
|
|
7143
|
+
const _m67 = (() => {
|
|
7066
7144
|
const { OfficeIMOError } = _m2;
|
|
7067
7145
|
|
|
7068
|
-
const { PdfFont, fontProgram } =
|
|
7146
|
+
const { PdfFont, fontProgram } = _m63;
|
|
7069
7147
|
|
|
7070
|
-
const { helveticaWidths } =
|
|
7148
|
+
const { helveticaWidths } = _m68;
|
|
7071
7149
|
|
|
7072
7150
|
const winAnsiExtras = new Map([0x20ac, 0, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021, 0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0, 0x17d, 0, 0, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x2dc, 0x2122, 0x161, 0x203a, 0x153, 0, 0x17e, 0x178].map((cp, i) => [cp, i + 128]));
|
|
7073
7151
|
/** @internal Called after scalar support succeeds when encoding a standard-font run. */
|
|
@@ -7130,18 +7208,19 @@ const _exports = Object.freeze({ standardCode: standardCode, resolveScalar: reso
|
|
|
7130
7208
|
return _exports;
|
|
7131
7209
|
})();
|
|
7132
7210
|
|
|
7133
|
-
const
|
|
7211
|
+
const _m62 = (() => {
|
|
7134
7212
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
7135
7213
|
|
|
7136
|
-
const { fontProgram } =
|
|
7214
|
+
const { fontProgram } = _m63;
|
|
7137
7215
|
|
|
7138
|
-
const { resolveScalar, selectFont, standardCode, validateFonts } =
|
|
7216
|
+
const { resolveScalar, selectFont, standardCode, validateFonts } = _m67;
|
|
7139
7217
|
|
|
7140
|
-
const { pdfNumber, unicodeHex } =
|
|
7218
|
+
const { pdfNumber, unicodeHex } = _m60;
|
|
7141
7219
|
|
|
7142
7220
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
7143
7221
|
|
|
7144
|
-
const
|
|
7222
|
+
const hexBytes = Object.freeze(Array.from({ length: 256 }, (_, byte) => byte.toString(16).padStart(2, "0")));
|
|
7223
|
+
function cidHex(cid) { return hexBytes[cid >>> 8] + hexBytes[cid & 255]; }
|
|
7145
7224
|
class PdfFontResource {
|
|
7146
7225
|
index;
|
|
7147
7226
|
bold;
|
|
@@ -7172,12 +7251,16 @@ class PdfFontResource {
|
|
|
7172
7251
|
width(scalar) {
|
|
7173
7252
|
if (this.shared)
|
|
7174
7253
|
return this.shared.width(scalar);
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7254
|
+
if (this.program) {
|
|
7255
|
+
const existing = this.mappings.get(scalar);
|
|
7256
|
+
if (existing)
|
|
7257
|
+
return existing.width;
|
|
7258
|
+
}
|
|
7259
|
+
else {
|
|
7260
|
+
const standard = this.standardWidths.get(scalar);
|
|
7261
|
+
if (standard !== undefined)
|
|
7262
|
+
return standard;
|
|
7263
|
+
}
|
|
7181
7264
|
const resolved = resolveScalar(scalar, this.program, this.bold);
|
|
7182
7265
|
if (!resolved.supported) {
|
|
7183
7266
|
if (resolved.code === "unpaired-surrogate")
|
|
@@ -7190,7 +7273,8 @@ class PdfFontResource {
|
|
|
7190
7273
|
}
|
|
7191
7274
|
if (this.mappings.size >= 65535)
|
|
7192
7275
|
throw new OfficeIMOError("RESOURCE_LIMIT", "A PDF font supports at most 65,535 distinct Unicode scalars.");
|
|
7193
|
-
const
|
|
7276
|
+
const cid = this.mappings.size + 1;
|
|
7277
|
+
const mapping = { cid, hex: cidHex(cid), glyph: resolved.glyph, width: resolved.width, text: String.fromCodePoint(scalar) };
|
|
7194
7278
|
this.mappings.set(scalar, mapping);
|
|
7195
7279
|
return mapping.width;
|
|
7196
7280
|
}
|
|
@@ -7203,8 +7287,20 @@ class PdfFontResource {
|
|
|
7203
7287
|
let hex = "";
|
|
7204
7288
|
for (const char of text) {
|
|
7205
7289
|
const cp = char.codePointAt(0);
|
|
7206
|
-
this.
|
|
7207
|
-
|
|
7290
|
+
if (this.program) {
|
|
7291
|
+
let mapping = this.mappings.get(cp);
|
|
7292
|
+
// Layout normally registered the scalar already; validate only a newly painted scalar.
|
|
7293
|
+
if (!mapping) {
|
|
7294
|
+
this.width(cp);
|
|
7295
|
+
mapping = this.mappings.get(cp);
|
|
7296
|
+
}
|
|
7297
|
+
hex += mapping.hex;
|
|
7298
|
+
}
|
|
7299
|
+
else {
|
|
7300
|
+
if (!this.standardWidths.has(cp))
|
|
7301
|
+
this.width(cp);
|
|
7302
|
+
hex += hexBytes[standardCode(cp)];
|
|
7303
|
+
}
|
|
7208
7304
|
}
|
|
7209
7305
|
return "<" + hex + ">";
|
|
7210
7306
|
}
|
|
@@ -7219,10 +7315,11 @@ class PdfFontResource {
|
|
|
7219
7315
|
if (!mapping) {
|
|
7220
7316
|
if (this.mappings.size >= 65535)
|
|
7221
7317
|
throw new OfficeIMOError("RESOURCE_LIMIT", "A PDF font supports at most 65,535 distinct CID mappings.");
|
|
7222
|
-
|
|
7318
|
+
const cid = this.mappings.size + 1;
|
|
7319
|
+
mapping = { cid, hex: cidHex(cid), glyph, width: this.program.widths[glyph], text };
|
|
7223
7320
|
this.mappings.set(key, mapping);
|
|
7224
7321
|
}
|
|
7225
|
-
return "<" + mapping.
|
|
7322
|
+
return "<" + mapping.hex + ">";
|
|
7226
7323
|
}
|
|
7227
7324
|
async write(objects, compression) {
|
|
7228
7325
|
checkAbort(this.signal);
|
|
@@ -7271,7 +7368,7 @@ class PdfFontResource {
|
|
|
7271
7368
|
const batch = mapped.slice(i, i + 100);
|
|
7272
7369
|
cmap += batch.length + " beginbfchar\n";
|
|
7273
7370
|
for (const [, m] of batch)
|
|
7274
|
-
cmap += "<" + m.
|
|
7371
|
+
cmap += "<" + m.hex + "> <" + unicodeHex(m.text) + ">\n";
|
|
7275
7372
|
cmap += "endbfchar\n";
|
|
7276
7373
|
if (taskYieldDue())
|
|
7277
7374
|
await pause();
|
|
@@ -7322,7 +7419,7 @@ class PdfFontResources {
|
|
|
7322
7419
|
if (!found)
|
|
7323
7420
|
this.explicitSelections.set(explicit, selections);
|
|
7324
7421
|
}
|
|
7325
|
-
const key =
|
|
7422
|
+
const key = (bold ? 2 : 0) | (italic ? 1 : 0), existing = selections.get(key);
|
|
7326
7423
|
if (existing)
|
|
7327
7424
|
return existing;
|
|
7328
7425
|
const { font, syntheticBold, syntheticItalic } = explicit ? { font: explicit, syntheticBold: bold, syntheticItalic: italic } : selectFont(this.fonts, bold, italic);
|
|
@@ -7342,7 +7439,7 @@ const _exports = Object.freeze({ PdfFontResource: PdfFontResource, PdfFontResour
|
|
|
7342
7439
|
return _exports;
|
|
7343
7440
|
})();
|
|
7344
7441
|
|
|
7345
|
-
const
|
|
7442
|
+
const _m70 = (() => {
|
|
7346
7443
|
const { OfficeIMOError } = _m2;
|
|
7347
7444
|
|
|
7348
7445
|
const { ExportCell, assertExportValue } = _m5;
|
|
@@ -7351,7 +7448,7 @@ const { checkAbort, pause, taskYieldDue } = _m4;
|
|
|
7351
7448
|
|
|
7352
7449
|
const { isDate } = _m6;
|
|
7353
7450
|
|
|
7354
|
-
const { defaultBooleanText } =
|
|
7451
|
+
const { defaultBooleanText } = _m52;
|
|
7355
7452
|
|
|
7356
7453
|
/** @internal Charge displayed characters: tabs paint four spaces, while CR/LF only separate lines.
|
|
7357
7454
|
* Raw text remains authoritative for input limits and layout. Skip normalization when no text ceiling observes it. */
|
|
@@ -7453,7 +7550,7 @@ const _exports = Object.freeze({ pdfBudgetText: pdfBudgetText, synchronousText:
|
|
|
7453
7550
|
return _exports;
|
|
7454
7551
|
})();
|
|
7455
7552
|
|
|
7456
|
-
const
|
|
7553
|
+
const _m72 = (() => {
|
|
7457
7554
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
7458
7555
|
|
|
7459
7556
|
const { checkAbort, pause, taskYieldDue, withAbort } = _m4;
|
|
@@ -7665,20 +7762,20 @@ const _exports = Object.freeze({ wrapShapedPdfText: wrapShapedPdfText });
|
|
|
7665
7762
|
return _exports;
|
|
7666
7763
|
})();
|
|
7667
7764
|
|
|
7668
|
-
const
|
|
7765
|
+
const _m71 = (() => {
|
|
7669
7766
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
7670
7767
|
|
|
7671
7768
|
const { copyExportLink } = _m7;
|
|
7672
7769
|
|
|
7673
7770
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
7674
7771
|
|
|
7675
|
-
const { presentation, color } =
|
|
7772
|
+
const { presentation, color } = _m56;
|
|
7676
7773
|
|
|
7677
|
-
const { wrapShapedPdfText } =
|
|
7774
|
+
const { wrapShapedPdfText } = _m72;
|
|
7678
7775
|
|
|
7679
|
-
const { PdfFont } =
|
|
7776
|
+
const { PdfFont } = _m63;
|
|
7680
7777
|
|
|
7681
|
-
const { pdfBudgetText } =
|
|
7778
|
+
const { pdfBudgetText } = _m70;
|
|
7682
7779
|
|
|
7683
7780
|
/** @internal Callers supply an owned, validated, frozen base presentation. A run list is a PDF presentation value, never an alternate shared table value model. */
|
|
7684
7781
|
function capturePdfText(value, base, settings, fonts, countEmpty = true, reserveBudget = true) {
|
|
@@ -7860,10 +7957,10 @@ const _exports = Object.freeze({ capturePdfText: capturePdfText, wrapPdfText: wr
|
|
|
7860
7957
|
return _exports;
|
|
7861
7958
|
})();
|
|
7862
7959
|
|
|
7863
|
-
const
|
|
7960
|
+
const _m73 = (() => {
|
|
7864
7961
|
const { OfficeIMOError } = _m2;
|
|
7865
7962
|
|
|
7866
|
-
const { wrapPdfText } =
|
|
7963
|
+
const { wrapPdfText } = _m71;
|
|
7867
7964
|
|
|
7868
7965
|
/** Plan without opening a source. Exact column widths never shrink in band mode. */
|
|
7869
7966
|
function planTableBands(widths, settings) {
|
|
@@ -7908,6 +8005,14 @@ async function projectBandRows(rows, band, widths, settings, fonts) {
|
|
|
7908
8005
|
for (const row of rows) {
|
|
7909
8006
|
const cells = [];
|
|
7910
8007
|
for (const cell of row.cells) {
|
|
8008
|
+
// Ordinary data and leaf headings keep their captured width and lines in every band.
|
|
8009
|
+
// Look up their physical position without allocating another per-row column index.
|
|
8010
|
+
if (cell.span === 1) {
|
|
8011
|
+
const first = band.columns.indexOf(cell.first);
|
|
8012
|
+
if (first >= 0)
|
|
8013
|
+
cells.push({ ...cell, source: cell.source ?? cell, first });
|
|
8014
|
+
continue;
|
|
8015
|
+
}
|
|
7911
8016
|
for (let first = 0; first < band.columns.length;) {
|
|
7912
8017
|
const source = band.columns[first];
|
|
7913
8018
|
if (source < cell.first || source >= cell.first + cell.span) {
|
|
@@ -7918,7 +8023,7 @@ async function projectBandRows(rows, band, widths, settings, fonts) {
|
|
|
7918
8023
|
while (end < band.columns.length && band.columns[end] === band.columns[end - 1] + 1 && band.columns[end] < cell.first + cell.span)
|
|
7919
8024
|
end++;
|
|
7920
8025
|
const width = band.columns.slice(first, end).reduce((sum, index) => sum + widths[index], 0);
|
|
7921
|
-
const lines =
|
|
8026
|
+
const lines = await wrapPdfText(cell.captured, fonts, settings.fontSize, width - settings.padding * 2, settings, cell.style.wrapText !== false);
|
|
7922
8027
|
cells.push({ ...cell, source: cell.source ?? cell, first, span: end - first, width, lines,
|
|
7923
8028
|
lineHeight: lines.reduce((height, line) => Math.max(height, line.lineHeight), cell.font.lineHeight(settings.fontSize)) });
|
|
7924
8029
|
first = end;
|
|
@@ -7950,22 +8055,22 @@ const _exports = Object.freeze({ planTableBands: planTableBands, projectBandRows
|
|
|
7950
8055
|
return _exports;
|
|
7951
8056
|
})();
|
|
7952
8057
|
|
|
7953
|
-
const
|
|
8058
|
+
const _m69 = (() => {
|
|
7954
8059
|
const { ExportCell } = _m5;
|
|
7955
8060
|
|
|
7956
8061
|
const { copyExportLink } = _m7;
|
|
7957
8062
|
|
|
7958
|
-
const { tableSpans } =
|
|
8063
|
+
const { tableSpans } = _m30;
|
|
7959
8064
|
|
|
7960
8065
|
const { createTotals } = _m12;
|
|
7961
8066
|
|
|
7962
|
-
const { presentation, positive } =
|
|
8067
|
+
const { presentation, positive } = _m56;
|
|
7963
8068
|
|
|
7964
|
-
const { displayText, pdfBudgetText } =
|
|
8069
|
+
const { displayText, pdfBudgetText } = _m70;
|
|
7965
8070
|
|
|
7966
|
-
const { capturePdfText, wrapPdfText } =
|
|
8071
|
+
const { capturePdfText, wrapPdfText } = _m71;
|
|
7967
8072
|
|
|
7968
|
-
const { planTableBands, projectBandRows, alignBandBlocks } =
|
|
8073
|
+
const { planTableBands, projectBandRows, alignBandBlocks } = _m73;
|
|
7969
8074
|
|
|
7970
8075
|
class PdfTableLayout {
|
|
7971
8076
|
settings;
|
|
@@ -8070,8 +8175,12 @@ class PdfTableLayout {
|
|
|
8070
8175
|
lines };
|
|
8071
8176
|
}
|
|
8072
8177
|
row(cells) {
|
|
8073
|
-
|
|
8074
|
-
|
|
8178
|
+
let lines = 1, lineHeight = this.lineHeight;
|
|
8179
|
+
for (let index = 0; index < cells.length; index++) {
|
|
8180
|
+
const cell = cells[index];
|
|
8181
|
+
lines = Math.max(lines, cell.lines.length);
|
|
8182
|
+
lineHeight = Math.max(lineHeight, cell.lineHeight);
|
|
8183
|
+
}
|
|
8075
8184
|
return { cells, lines, lineHeight, height: lines * lineHeight + this.settings.padding * 2 };
|
|
8076
8185
|
}
|
|
8077
8186
|
async headers() {
|
|
@@ -8180,7 +8289,7 @@ const _exports = Object.freeze({ PdfTableLayout: PdfTableLayout });
|
|
|
8180
8289
|
return _exports;
|
|
8181
8290
|
})();
|
|
8182
8291
|
|
|
8183
|
-
const
|
|
8292
|
+
const _m75 = (() => {
|
|
8184
8293
|
const { OfficeIMOError } = _m2;
|
|
8185
8294
|
|
|
8186
8295
|
const { checkAbort } = _m4;
|
|
@@ -8224,7 +8333,7 @@ class PdfTableBandFlow {
|
|
|
8224
8333
|
await this.flush();
|
|
8225
8334
|
}
|
|
8226
8335
|
async row(row, allowFirstFragment = false) {
|
|
8227
|
-
const { padding, fontSize, options } = this.layout.settings, minimumLines = this.layout.minimumRowLines(row), minimumHeight =
|
|
8336
|
+
const { padding, fontSize, options } = this.layout.settings, minimumLines = this.layout.minimumRowLines(row), minimumHeight = minimumLines * row.lineHeight + padding * 2;
|
|
8228
8337
|
if (minimumHeight > this.painter.firstFullCapacity + .001 || minimumHeight > this.painter.continuationCapacity + .001)
|
|
8229
8338
|
throw new RangeError("Repeated PDF identifiers must fit intact below the first and continued band headings/context.");
|
|
8230
8339
|
// Keep ordinary rows intact when they fit fresh. A kept heading/caption can deliberately
|
|
@@ -8258,9 +8367,14 @@ class PdfTableBandFlow {
|
|
|
8258
8367
|
let remaining = false;
|
|
8259
8368
|
const cells = rows[0].cells.map(cell => {
|
|
8260
8369
|
const source = this.layout.bands[index].columns[cell.first];
|
|
8261
|
-
const repeated = this.layout.repeatedColumn(source),
|
|
8370
|
+
const repeated = this.layout.repeatedColumn(source), reusable = cell.span === 1 && (cell.source?.span ?? 1) === 1 && (cell.rowSpan ?? 1) === 1 &&
|
|
8371
|
+
cell.height === undefined && first === 0 && (repeated || lines >= cell.lines.length);
|
|
8372
|
+
const visible = repeated || reusable ? cell.lines : cell.lines.slice(first, first + lines);
|
|
8262
8373
|
if (!repeated && (visible.length > 0 || cell.link !== undefined))
|
|
8263
8374
|
remaining = true;
|
|
8375
|
+
// A complete first fragment already owns these lines and their maximum font metrics.
|
|
8376
|
+
if (reusable)
|
|
8377
|
+
return cell;
|
|
8264
8378
|
const { height: _height, ...plain } = cell;
|
|
8265
8379
|
return { ...plain, lines: visible,
|
|
8266
8380
|
lineHeight: visible.reduce((value, line) => Math.max(value, line.lineHeight), cell.font.lineHeight(fontSize)),
|
|
@@ -8316,7 +8430,7 @@ const _exports = Object.freeze({ PdfTableBandFlow: PdfTableBandFlow });
|
|
|
8316
8430
|
return _exports;
|
|
8317
8431
|
})();
|
|
8318
8432
|
|
|
8319
|
-
const
|
|
8433
|
+
const _m76 = (() => {
|
|
8320
8434
|
/** @internal Source-cell identities survive page fragments and horizontal band projections.
|
|
8321
8435
|
* Only column headers and still-owned row objects remain reachable from this table owner. */
|
|
8322
8436
|
class PdfTableStructure {
|
|
@@ -8368,30 +8482,31 @@ class PdfTableStructure {
|
|
|
8368
8482
|
return row.cells.map(cell => this.cells.get(cell));
|
|
8369
8483
|
const rowId = this.structure.element("TR", parent);
|
|
8370
8484
|
this.rows.set(row, rowId);
|
|
8371
|
-
const headers = row.cells.map((cell, index) => rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex);
|
|
8372
8485
|
// Allocate in source order, then resolve every row header before associating even earlier data cells.
|
|
8373
8486
|
// Generated summary labels override detail roles so numeric subtotal cells never become row headers.
|
|
8374
8487
|
const ids = row.cells.map((cell, index) => {
|
|
8375
|
-
const
|
|
8488
|
+
const header = rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex;
|
|
8489
|
+
const id = this.structure.element(header ? "TH" : "TD", rowId);
|
|
8376
8490
|
this.cells.set(cell, id);
|
|
8377
8491
|
return id;
|
|
8378
8492
|
});
|
|
8379
|
-
|
|
8493
|
+
let rowHeaders;
|
|
8380
8494
|
for (let index = 0; index < ids.length; index++)
|
|
8381
|
-
if (
|
|
8382
|
-
rowHeaders.push(await this.structure.identifier(ids[index]));
|
|
8495
|
+
if (rowHeaderIndex === undefined ? row.cells[index].rowHeader === true : index === rowHeaderIndex)
|
|
8496
|
+
(rowHeaders ??= []).push(await this.structure.identifier(ids[index]));
|
|
8383
8497
|
for (let index = 0; index < row.cells.length; index++) {
|
|
8384
8498
|
const cell = row.cells[index];
|
|
8385
|
-
if (!rowHeaders
|
|
8499
|
+
if (!rowHeaders && cell.span === 1 && (cell.rowSpan ?? 1) === 1) {
|
|
8386
8500
|
const attributes = this.ordinaryAttributes[cell.first] ??=
|
|
8387
8501
|
await this.structure.attributeReference(this.attributeDictionary(cell, this.associations(cell)));
|
|
8388
8502
|
this.structure.setAttributes(ids[index], attributes);
|
|
8389
8503
|
continue;
|
|
8390
8504
|
}
|
|
8391
8505
|
const associations = this.associations(cell);
|
|
8392
|
-
|
|
8506
|
+
const header = rowHeaderIndex === undefined ? cell.rowHeader === true : index === rowHeaderIndex;
|
|
8507
|
+
if (!header && rowHeaders)
|
|
8393
8508
|
associations.push(...rowHeaders);
|
|
8394
|
-
this.structure.setAttributes(ids[index], this.attributes(cell, associations,
|
|
8509
|
+
this.structure.setAttributes(ids[index], this.attributes(cell, associations, header ? "Row" : undefined));
|
|
8395
8510
|
}
|
|
8396
8511
|
return ids;
|
|
8397
8512
|
}
|
|
@@ -8429,10 +8544,10 @@ const _exports = Object.freeze({ PdfTableStructure: PdfTableStructure });
|
|
|
8429
8544
|
return _exports;
|
|
8430
8545
|
})();
|
|
8431
8546
|
|
|
8432
|
-
const
|
|
8547
|
+
const _m77 = (() => {
|
|
8433
8548
|
const { OfficeIMOError } = _m2;
|
|
8434
8549
|
|
|
8435
|
-
const { pdfNumber, unicodeHex } =
|
|
8550
|
+
const { pdfNumber, unicodeHex } = _m60;
|
|
8436
8551
|
|
|
8437
8552
|
const encoder = new TextEncoder();
|
|
8438
8553
|
/** @internal URI actions are byte strings; tooltips are Unicode PDF text strings. */
|
|
@@ -8474,10 +8589,10 @@ const _exports = Object.freeze({ linkAnnotation: linkAnnotation });
|
|
|
8474
8589
|
return _exports;
|
|
8475
8590
|
})();
|
|
8476
8591
|
|
|
8477
|
-
const
|
|
8592
|
+
const _m78 = (() => {
|
|
8478
8593
|
const { OfficeIMOError } = _m2;
|
|
8479
8594
|
|
|
8480
|
-
const { unicodeHex } =
|
|
8595
|
+
const { unicodeHex } = _m60;
|
|
8481
8596
|
|
|
8482
8597
|
const { captureFields } = _m10;
|
|
8483
8598
|
|
|
@@ -8522,8 +8637,8 @@ const _exports = Object.freeze({ captureBookmark: captureBookmark, captureSectio
|
|
|
8522
8637
|
return _exports;
|
|
8523
8638
|
})();
|
|
8524
8639
|
|
|
8525
|
-
const
|
|
8526
|
-
const { settings } =
|
|
8640
|
+
const _m79 = (() => {
|
|
8641
|
+
const { settings } = _m56;
|
|
8527
8642
|
|
|
8528
8643
|
/** @internal Every section derives from captured document defaults, never the preceding section. */
|
|
8529
8644
|
function sectionSettings(base, section) {
|
|
@@ -8540,28 +8655,28 @@ const _exports = Object.freeze({ sectionSettings: sectionSettings });
|
|
|
8540
8655
|
return _exports;
|
|
8541
8656
|
})();
|
|
8542
8657
|
|
|
8543
|
-
const
|
|
8658
|
+
const _m74 = (() => {
|
|
8544
8659
|
const { OfficeIMOError } = _m2;
|
|
8545
8660
|
|
|
8546
8661
|
const { checkAbort } = _m4;
|
|
8547
8662
|
|
|
8548
|
-
const { pdfNumber } =
|
|
8663
|
+
const { pdfNumber } = _m60;
|
|
8549
8664
|
|
|
8550
|
-
const { color } =
|
|
8665
|
+
const { color } = _m56;
|
|
8551
8666
|
|
|
8552
|
-
const { PdfTableBandFlow } =
|
|
8667
|
+
const { PdfTableBandFlow } = _m75;
|
|
8553
8668
|
|
|
8554
|
-
const { PdfTableStructure } =
|
|
8669
|
+
const { PdfTableStructure } = _m76;
|
|
8555
8670
|
|
|
8556
|
-
const { wrapText, wrapTextCooperatively, synchronousText, pdfBudgetText } =
|
|
8671
|
+
const { wrapText, wrapTextCooperatively, synchronousText, pdfBudgetText } = _m70;
|
|
8557
8672
|
|
|
8558
|
-
const { linkAnnotation } =
|
|
8673
|
+
const { linkAnnotation } = _m77;
|
|
8559
8674
|
|
|
8560
|
-
const { unicodeHex } =
|
|
8675
|
+
const { unicodeHex } = _m60;
|
|
8561
8676
|
|
|
8562
|
-
const { captureSection, captureBookmark } =
|
|
8677
|
+
const { captureSection, captureBookmark } = _m78;
|
|
8563
8678
|
|
|
8564
|
-
const { sectionSettings } =
|
|
8679
|
+
const { sectionSettings } = _m79;
|
|
8565
8680
|
|
|
8566
8681
|
/** @internal One page of drawing commands and O(page count) references, never the complete report body. */
|
|
8567
8682
|
class PdfPages {
|
|
@@ -8575,7 +8690,8 @@ class PdfPages {
|
|
|
8575
8690
|
outlines;
|
|
8576
8691
|
references = [];
|
|
8577
8692
|
current = 0;
|
|
8578
|
-
commands =
|
|
8693
|
+
commands = "";
|
|
8694
|
+
commandParts = [];
|
|
8579
8695
|
commandBytes = 0;
|
|
8580
8696
|
annotations = [];
|
|
8581
8697
|
hyperlinks = 0;
|
|
@@ -8593,6 +8709,12 @@ class PdfPages {
|
|
|
8593
8709
|
pendingBookmarks = [];
|
|
8594
8710
|
pageNumberWidth = 0;
|
|
8595
8711
|
colors = new Map();
|
|
8712
|
+
textFont;
|
|
8713
|
+
textSize = 0;
|
|
8714
|
+
textColor = "";
|
|
8715
|
+
textPrefix = "";
|
|
8716
|
+
rectangleLefts;
|
|
8717
|
+
rectangleColumns = [];
|
|
8596
8718
|
externalObjects = new Map();
|
|
8597
8719
|
bandFlow;
|
|
8598
8720
|
bandCellBudget = false;
|
|
@@ -8659,7 +8781,7 @@ class PdfPages {
|
|
|
8659
8781
|
}
|
|
8660
8782
|
add(command) {
|
|
8661
8783
|
this.retainPageBytes(command.length);
|
|
8662
|
-
this.commands
|
|
8784
|
+
this.commands += command;
|
|
8663
8785
|
}
|
|
8664
8786
|
retainPageBytes(length) {
|
|
8665
8787
|
this.commandBytes += length;
|
|
@@ -8679,9 +8801,17 @@ class PdfPages {
|
|
|
8679
8801
|
return this.structure ? "/Artifact << /Type /" + type + " >> BDC\n" + command + "EMC\n" : command;
|
|
8680
8802
|
}
|
|
8681
8803
|
text(text, font, size, x, baseline, foreground = "111827", element) {
|
|
8682
|
-
const n = pdfNumber
|
|
8683
|
-
|
|
8684
|
-
|
|
8804
|
+
const n = pdfNumber;
|
|
8805
|
+
if (font !== this.textFont || size !== this.textSize || foreground !== this.textColor) {
|
|
8806
|
+
const shear = font.syntheticItalic ? .213 : 0, rgb = this.rgb(foreground);
|
|
8807
|
+
// Keep one prefix, independent of report size. Resource identity includes synthetic styling.
|
|
8808
|
+
this.textPrefix = "q " + rgb + " rg " + rgb + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
|
|
8809
|
+
(font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ") + "1 0 " + n(shear) + " 1 ";
|
|
8810
|
+
this.textFont = font;
|
|
8811
|
+
this.textSize = size;
|
|
8812
|
+
this.textColor = foreground;
|
|
8813
|
+
}
|
|
8814
|
+
const command = this.textPrefix + n(x) + " " + n(baseline) + " Tm " + font.encode(text) + " Tj ET Q\n";
|
|
8685
8815
|
this.add(this.structure && element !== undefined ? this.structure.mark(element) + command + "EMC\n" : this.artifact(command, "Pagination"));
|
|
8686
8816
|
}
|
|
8687
8817
|
link(link, x, bottom, width, height, element) {
|
|
@@ -8711,8 +8841,8 @@ class PdfPages {
|
|
|
8711
8841
|
for (const segment of line.segments) {
|
|
8712
8842
|
const registered = marks?.get(segment), owner = registered?.owner ?? (segment.link && this.structure && element !== undefined ? this.structure.link(element, segment.link) : element);
|
|
8713
8843
|
if (segment.glyphs) {
|
|
8714
|
-
const font = segment.font, n = pdfNumber, shear = font.syntheticItalic ? .213 : 0;
|
|
8715
|
-
let cursor = x, command = "q " +
|
|
8844
|
+
const font = segment.font, n = pdfNumber, shear = font.syntheticItalic ? .213 : 0, rgb = this.rgb(segment.color ?? "111827");
|
|
8845
|
+
let cursor = x, command = "q " + rgb + " rg " + rgb + " RG\nBT /" + font.name + " " + n(size) + " Tf " +
|
|
8716
8846
|
(font.syntheticBold ? n(size * .025) + " w 2 Tr " : "0 Tr ");
|
|
8717
8847
|
for (const glyph of segment.glyphs) {
|
|
8718
8848
|
command += "1 0 " + n(shear) + " 1 " + n(cursor + (glyph.xOffset + shear * glyph.yOffset) * size / 1000) + " " + n(baseline + glyph.yOffset * size / 1000) + " Tm " + font.encodeGlyph(glyph.id, glyph.logicalText) + " Tj\n";
|
|
@@ -8760,7 +8890,8 @@ class PdfPages {
|
|
|
8760
8890
|
this.current = this.objects.reserve();
|
|
8761
8891
|
this.references.push(this.current);
|
|
8762
8892
|
}
|
|
8763
|
-
this.commands =
|
|
8893
|
+
this.commands = "";
|
|
8894
|
+
this.commandParts = [];
|
|
8764
8895
|
this.annotations = [];
|
|
8765
8896
|
this.commandBytes = 0;
|
|
8766
8897
|
this.bodyAdded = false;
|
|
@@ -8843,15 +8974,32 @@ class PdfPages {
|
|
|
8843
8974
|
if (!this.layout)
|
|
8844
8975
|
throw new Error("A table layout is required before drawing rows.");
|
|
8845
8976
|
this.bodyAdded = true;
|
|
8846
|
-
const { padding, fontSize } = this.settings, n = pdfNumber, height = lineCount * row.lineHeight + padding * 2;
|
|
8977
|
+
const { padding, fontSize } = this.settings, n = pdfNumber, height = lineCount * row.lineHeight + padding * 2, lefts = this.layout.lefts;
|
|
8978
|
+
// One geometry token per active physical column; table/band changes release the old tokens.
|
|
8979
|
+
if (this.rectangleLefts !== lefts) {
|
|
8980
|
+
this.rectangleLefts = lefts;
|
|
8981
|
+
this.rectangleColumns = [];
|
|
8982
|
+
}
|
|
8983
|
+
let rectangleHeight, rectangleBottom = "", rectangleHeightText = "";
|
|
8847
8984
|
for (const [index, cell] of row.cells.entries()) {
|
|
8848
8985
|
if (this.bandCellBudget)
|
|
8849
8986
|
this.settings.budget.cell(this.settings.budget.limits.maxTextCharacters === undefined ? "" :
|
|
8850
8987
|
(cell.height === undefined ? cell.lines.slice(firstLine, firstLine + lineCount) : cell.lines).map(line => line.text).join(""));
|
|
8851
|
-
const x =
|
|
8988
|
+
const x = lefts[cell.first], cellHeight = cell.height ?? height;
|
|
8989
|
+
if (cellHeight !== rectangleHeight) {
|
|
8990
|
+
rectangleBottom = n(this.y - cellHeight);
|
|
8991
|
+
rectangleHeightText = n(cellHeight);
|
|
8992
|
+
rectangleHeight = cellHeight;
|
|
8993
|
+
}
|
|
8994
|
+
let horizontal = this.rectangleColumns[cell.first];
|
|
8995
|
+
if (!horizontal || horizontal.x !== x || horizontal.width !== cell.width) {
|
|
8996
|
+
horizontal = { x, width: cell.width, left: n(x), widthText: n(cell.width) };
|
|
8997
|
+
this.rectangleColumns[cell.first] = horizontal;
|
|
8998
|
+
}
|
|
8999
|
+
const rectangle = horizontal.left + " " + rectangleBottom + " " + horizontal.widthText + " " + rectangleHeightText;
|
|
8852
9000
|
if (cell.style.background)
|
|
8853
|
-
this.add(this.artifact("q " + this.rgb(cell.style.background) + " rg " +
|
|
8854
|
-
this.add(this.artifact("q 0.82 0.85 0.89 RG 0.4 w " +
|
|
9001
|
+
this.add(this.artifact("q " + this.rgb(cell.style.background) + " rg " + rectangle + " re f Q\n"));
|
|
9002
|
+
this.add(this.artifact("q 0.82 0.85 0.89 RG 0.4 w " + rectangle + " re S Q\n"));
|
|
8855
9003
|
const element = elements?.[index], artifact = cell.semanticArtifact || repeated[index], owner = cell.link && this.structure && element !== undefined ? this.structure.link(element, cell.link) : element;
|
|
8856
9004
|
for (let line = firstLine; line < Math.min(cell.lines.length, cell.height ? cell.lines.length : firstLine + lineCount); line++) {
|
|
8857
9005
|
const text = cell.lines[line], left = cell.style.alignment === "right" ? cell.width - padding - text.width : cell.style.alignment === "center" ? (cell.width - text.width) / 2 : padding;
|
|
@@ -8861,6 +9009,7 @@ class PdfPages {
|
|
|
8861
9009
|
this.link(cell.link, x, this.y - cellHeight, cell.width, cellHeight, owner);
|
|
8862
9010
|
}
|
|
8863
9011
|
this.y -= row.structured ? row.height : height;
|
|
9012
|
+
this.sealCommands();
|
|
8864
9013
|
}
|
|
8865
9014
|
async block(rows) {
|
|
8866
9015
|
if (this.bandFlow)
|
|
@@ -9186,9 +9335,22 @@ class PdfPages {
|
|
|
9186
9335
|
marker: { line: item.marker, gap: item.markerGap, ...(label === undefined ? {} : { owner: label }) } });
|
|
9187
9336
|
await this.structure?.complete(li);
|
|
9188
9337
|
}
|
|
9338
|
+
sealCommands() {
|
|
9339
|
+
if (this.commands) {
|
|
9340
|
+
this.commandParts.push(this.commands);
|
|
9341
|
+
this.commands = "";
|
|
9342
|
+
}
|
|
9343
|
+
}
|
|
9344
|
+
takeCommands() {
|
|
9345
|
+
this.sealCommands();
|
|
9346
|
+
const content = this.commandParts.join("");
|
|
9347
|
+
// Encoding and awaited delivery own the page value; the next page starts independently.
|
|
9348
|
+
this.commandParts = [];
|
|
9349
|
+
return content;
|
|
9350
|
+
}
|
|
9189
9351
|
async finishPage() {
|
|
9190
9352
|
const contents = this.objects.reserve(), { page, options } = this.settings;
|
|
9191
|
-
await this.objects.stream(contents, this.
|
|
9353
|
+
await this.objects.stream(contents, this.takeCommands(), "", options.compression !== false);
|
|
9192
9354
|
const annotations = [];
|
|
9193
9355
|
for (const annotation of this.annotations) {
|
|
9194
9356
|
annotations.push(annotation.id);
|
|
@@ -9200,7 +9362,6 @@ class PdfPages {
|
|
|
9200
9362
|
(annotations.length ? " /Annots [" + annotations.map(id => id + " 0 R").join(" ") + "]" : "") + " >>");
|
|
9201
9363
|
if (this.structure)
|
|
9202
9364
|
await this.structure.finishPage();
|
|
9203
|
-
this.commands = [];
|
|
9204
9365
|
this.annotations = [];
|
|
9205
9366
|
this.commandBytes = 0;
|
|
9206
9367
|
this.current = 0;
|
|
@@ -9235,7 +9396,7 @@ const _exports = Object.freeze({ PdfPages: PdfPages });
|
|
|
9235
9396
|
return _exports;
|
|
9236
9397
|
})();
|
|
9237
9398
|
|
|
9238
|
-
const
|
|
9399
|
+
const _m81 = (() => {
|
|
9239
9400
|
/** @internal Incremental PDF number tree: at most 64 entries/children per retained level. */
|
|
9240
9401
|
class PdfParentTree {
|
|
9241
9402
|
objects;
|
|
@@ -9297,14 +9458,14 @@ const _exports = Object.freeze({ PdfParentTree: PdfParentTree });
|
|
|
9297
9458
|
return _exports;
|
|
9298
9459
|
})();
|
|
9299
9460
|
|
|
9300
|
-
const
|
|
9461
|
+
const _m80 = (() => {
|
|
9301
9462
|
const { OfficeIMOError } = _m2;
|
|
9302
9463
|
|
|
9303
9464
|
const { checkAbort } = _m4;
|
|
9304
9465
|
|
|
9305
|
-
const { unicodeHex } =
|
|
9466
|
+
const { unicodeHex } = _m60;
|
|
9306
9467
|
|
|
9307
|
-
const { PdfParentTree } =
|
|
9468
|
+
const { PdfParentTree } = _m81;
|
|
9308
9469
|
|
|
9309
9470
|
/** Same-page marked content uses integer K; cross-page MCR and annotation OBJR stay explicit. */
|
|
9310
9471
|
function structureChild(child) {
|
|
@@ -9608,12 +9769,12 @@ const _exports = Object.freeze({ PdfStructure: PdfStructure, graphicAlternative:
|
|
|
9608
9769
|
return _exports;
|
|
9609
9770
|
})();
|
|
9610
9771
|
|
|
9611
|
-
const
|
|
9772
|
+
const _m82 = (() => {
|
|
9612
9773
|
const { OfficeIMOError } = _m2;
|
|
9613
9774
|
|
|
9614
9775
|
const { checkAbort } = _m4;
|
|
9615
9776
|
|
|
9616
|
-
const { pdfNumber, unicodeHex } =
|
|
9777
|
+
const { pdfNumber, unicodeHex } = _m60;
|
|
9617
9778
|
|
|
9618
9779
|
/** @internal Bounded native bookmarks; destinations are captured only when their content is painted. */
|
|
9619
9780
|
class PdfOutlines {
|
|
@@ -9671,18 +9832,18 @@ const _exports = Object.freeze({ PdfOutlines: PdfOutlines });
|
|
|
9671
9832
|
return _exports;
|
|
9672
9833
|
})();
|
|
9673
9834
|
|
|
9674
|
-
const
|
|
9675
|
-
const { PdfObjects, unicodeHex } =
|
|
9835
|
+
const _m59 = (() => {
|
|
9836
|
+
const { PdfObjects, unicodeHex } = _m60;
|
|
9676
9837
|
|
|
9677
|
-
const { PdfFontResources } =
|
|
9838
|
+
const { PdfFontResources } = _m62;
|
|
9678
9839
|
|
|
9679
|
-
const { PdfTableLayout } =
|
|
9840
|
+
const { PdfTableLayout } = _m69;
|
|
9680
9841
|
|
|
9681
|
-
const { PdfPages } =
|
|
9842
|
+
const { PdfPages } = _m74;
|
|
9682
9843
|
|
|
9683
|
-
const { PdfStructure } =
|
|
9844
|
+
const { PdfStructure } = _m80;
|
|
9684
9845
|
|
|
9685
|
-
const { PdfOutlines } =
|
|
9846
|
+
const { PdfOutlines } = _m82;
|
|
9686
9847
|
|
|
9687
9848
|
/** One resource/catalog owner shared by table convenience exports and composed documents. */
|
|
9688
9849
|
class PdfWriteSession {
|
|
@@ -9737,7 +9898,7 @@ const _exports = Object.freeze({ PdfWriteSession: PdfWriteSession });
|
|
|
9737
9898
|
return _exports;
|
|
9738
9899
|
})();
|
|
9739
9900
|
|
|
9740
|
-
const
|
|
9901
|
+
const _m55 = (() => {
|
|
9741
9902
|
const { BlobByteSink, withDestination } = _m3;
|
|
9742
9903
|
|
|
9743
9904
|
const { beginTask, checkAbort, consumeRows, pause, taskYieldDue } = _m4;
|
|
@@ -9746,9 +9907,9 @@ const { notifyProgress } = _m23;
|
|
|
9746
9907
|
|
|
9747
9908
|
const { createRowProjector } = _m11;
|
|
9748
9909
|
|
|
9749
|
-
const { settings } =
|
|
9910
|
+
const { settings } = _m56;
|
|
9750
9911
|
|
|
9751
|
-
const { PdfWriteSession } =
|
|
9912
|
+
const { PdfWriteSession } = _m59;
|
|
9752
9913
|
|
|
9753
9914
|
async function writePdf(rows, configuration) {
|
|
9754
9915
|
const sink = new BlobByteSink();
|
|
@@ -9805,7 +9966,7 @@ const _exports = Object.freeze({ writePdf: writePdf, writePdfTo: writePdfTo });
|
|
|
9805
9966
|
return _exports;
|
|
9806
9967
|
})();
|
|
9807
9968
|
|
|
9808
|
-
const
|
|
9969
|
+
const _m86 = (() => {
|
|
9809
9970
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
9810
9971
|
|
|
9811
9972
|
const { checkAbort, pause, taskYieldDue, withAbort } = _m4;
|
|
@@ -10072,12 +10233,12 @@ const _exports = Object.freeze({ pngPixels: pngPixels });
|
|
|
10072
10233
|
return _exports;
|
|
10073
10234
|
})();
|
|
10074
10235
|
|
|
10075
|
-
const
|
|
10236
|
+
const _m85 = (() => {
|
|
10076
10237
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
10077
10238
|
|
|
10078
10239
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
10079
10240
|
|
|
10080
|
-
const { pngPixels } =
|
|
10241
|
+
const { pngPixels } = _m86;
|
|
10081
10242
|
|
|
10082
10243
|
/** Shared document image resources; source objects are captured on first consumption. */
|
|
10083
10244
|
class PdfDocumentImages {
|
|
@@ -10205,14 +10366,14 @@ const _exports = Object.freeze({ PdfDocumentImages: PdfDocumentImages });
|
|
|
10205
10366
|
return _exports;
|
|
10206
10367
|
})();
|
|
10207
10368
|
|
|
10208
|
-
const
|
|
10369
|
+
const _m87 = (() => {
|
|
10209
10370
|
const { OfficeIMOError } = _m2;
|
|
10210
10371
|
|
|
10211
10372
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
10212
10373
|
|
|
10213
|
-
const { color, positive } =
|
|
10374
|
+
const { color, positive } = _m56;
|
|
10214
10375
|
|
|
10215
|
-
const { pdfNumber: n } =
|
|
10376
|
+
const { pdfNumber: n } = _m60;
|
|
10216
10377
|
|
|
10217
10378
|
/** Capture and serialize one bounded display path, with no markup parser or resource loading. */
|
|
10218
10379
|
async function vectorCommands(block, settings, used) {
|
|
@@ -10291,14 +10452,14 @@ const _exports = Object.freeze({ vectorCommands: vectorCommands });
|
|
|
10291
10452
|
return _exports;
|
|
10292
10453
|
})();
|
|
10293
10454
|
|
|
10294
|
-
const
|
|
10455
|
+
const _m88 = (() => {
|
|
10295
10456
|
const { NotSupportedError, OfficeIMOError } = _m2;
|
|
10296
10457
|
|
|
10297
10458
|
const { checkAbort, pause, taskYieldDue } = _m4;
|
|
10298
10459
|
|
|
10299
|
-
const { color, positive } =
|
|
10460
|
+
const { color, positive } = _m56;
|
|
10300
10461
|
|
|
10301
|
-
const { pdfNumber: n } =
|
|
10462
|
+
const { pdfNumber: n } = _m60;
|
|
10302
10463
|
|
|
10303
10464
|
/** Portable drawings are an exact schema: unsupported data must never be silently discarded. */
|
|
10304
10465
|
function record(value, keys, name) {
|
|
@@ -10537,20 +10698,20 @@ const _exports = Object.freeze({ checkDrawingBlock: checkDrawingBlock, prepareDr
|
|
|
10537
10698
|
return _exports;
|
|
10538
10699
|
})();
|
|
10539
10700
|
|
|
10540
|
-
const
|
|
10701
|
+
const _m89 = (() => {
|
|
10541
10702
|
const { OfficeIMOError } = _m2;
|
|
10542
10703
|
|
|
10543
|
-
const { capturePdfText, wrapPdfText } =
|
|
10704
|
+
const { capturePdfText, wrapPdfText } = _m71;
|
|
10544
10705
|
|
|
10545
|
-
const { positive } =
|
|
10706
|
+
const { positive } = _m56;
|
|
10546
10707
|
|
|
10547
|
-
const { resolveParagraphStyle } =
|
|
10708
|
+
const { resolveParagraphStyle } = _m57;
|
|
10548
10709
|
|
|
10549
|
-
const { captureBookmark } =
|
|
10710
|
+
const { captureBookmark } = _m78;
|
|
10550
10711
|
|
|
10551
10712
|
const { captureFields } = _m10;
|
|
10552
10713
|
|
|
10553
|
-
const { pdfBudgetText } =
|
|
10714
|
+
const { pdfBudgetText } = _m70;
|
|
10554
10715
|
|
|
10555
10716
|
/** @internal Copy public paragraph input before any cooperative layout or source enumeration. */
|
|
10556
10717
|
function captureParagraph(block, settings, fonts, budgetOnPaint = false) {
|
|
@@ -10620,12 +10781,12 @@ const _exports = Object.freeze({ captureParagraph: captureParagraph, captureCapt
|
|
|
10620
10781
|
return _exports;
|
|
10621
10782
|
})();
|
|
10622
10783
|
|
|
10623
|
-
const
|
|
10624
|
-
const { capturePdfText, wrapPdfText } =
|
|
10784
|
+
const _m90 = (() => {
|
|
10785
|
+
const { capturePdfText, wrapPdfText } = _m71;
|
|
10625
10786
|
|
|
10626
|
-
const { captureParagraph, prepareParagraph } =
|
|
10787
|
+
const { captureParagraph, prepareParagraph } = _m89;
|
|
10627
10788
|
|
|
10628
|
-
const { resolveParagraphStyle } =
|
|
10789
|
+
const { resolveParagraphStyle } = _m57;
|
|
10629
10790
|
|
|
10630
10791
|
function captureListOptions(block, settings) {
|
|
10631
10792
|
const { items, ordered = false, start: inputStart, itemStyle, indent, markerGap } = block;
|
|
@@ -10677,14 +10838,14 @@ const _exports = Object.freeze({ captureListOptions: captureListOptions, prepare
|
|
|
10677
10838
|
return _exports;
|
|
10678
10839
|
})();
|
|
10679
10840
|
|
|
10680
|
-
const
|
|
10841
|
+
const _m92 = (() => {
|
|
10681
10842
|
const { assertGroupedReportSource } = _m8;
|
|
10682
10843
|
|
|
10683
10844
|
const { captureFields } = _m10;
|
|
10684
10845
|
|
|
10685
|
-
const { captureWideTable } =
|
|
10846
|
+
const { captureWideTable } = _m56;
|
|
10686
10847
|
|
|
10687
|
-
const { presentation } =
|
|
10848
|
+
const { presentation } = _m58;
|
|
10688
10849
|
|
|
10689
10850
|
/** @internal Capture schemas shared by the block factory and standalone convenience writers. */
|
|
10690
10851
|
const groupedPdfLabelFields = ["labelColumn", "subtotalLabel", "grandTotalLabel", "includeGrandTotal", "continuationLabel", "groupHeadingLevel"];
|
|
@@ -10726,22 +10887,22 @@ const _exports = Object.freeze({ groupedPdfLabelFields: groupedPdfLabelFields, g
|
|
|
10726
10887
|
return _exports;
|
|
10727
10888
|
})();
|
|
10728
10889
|
|
|
10729
|
-
const
|
|
10890
|
+
const _m91 = (() => {
|
|
10730
10891
|
const { assertGroupedReportSource, groupedReportOperation } = _m8;
|
|
10731
10892
|
|
|
10732
10893
|
const { consumeRows } = _m4;
|
|
10733
10894
|
|
|
10734
10895
|
const { ExportCell } = _m5;
|
|
10735
10896
|
|
|
10736
|
-
const { captureGroupedPdfTableOptions } =
|
|
10897
|
+
const { captureGroupedPdfTableOptions } = _m92;
|
|
10737
10898
|
|
|
10738
|
-
const { settings } =
|
|
10899
|
+
const { settings } = _m56;
|
|
10739
10900
|
|
|
10740
|
-
const { PdfTableLayout } =
|
|
10901
|
+
const { PdfTableLayout } = _m69;
|
|
10741
10902
|
|
|
10742
|
-
const { captureCaption, captureParagraph, prepareParagraph } =
|
|
10903
|
+
const { captureCaption, captureParagraph, prepareParagraph } = _m89;
|
|
10743
10904
|
|
|
10744
|
-
const { synchronousText } =
|
|
10905
|
+
const { synchronousText } = _m70;
|
|
10745
10906
|
|
|
10746
10907
|
/** @internal Render one analytical source in the existing document session. Retain one detail row and
|
|
10747
10908
|
* at most four closing subtotals. All captions, rows, pages, bytes and fonts use the document owners. */
|
|
@@ -10983,7 +11144,7 @@ const _exports = Object.freeze({ renderGroupedPdfTable: renderGroupedPdfTable })
|
|
|
10983
11144
|
return _exports;
|
|
10984
11145
|
})();
|
|
10985
11146
|
|
|
10986
|
-
const
|
|
11147
|
+
const _m84 = (() => {
|
|
10987
11148
|
const { BlobByteSink, withDestination } = _m3;
|
|
10988
11149
|
|
|
10989
11150
|
const { OfficeIMOError } = _m2;
|
|
@@ -10996,29 +11157,29 @@ const { copyColumns, createRowProjector } = _m11;
|
|
|
10996
11157
|
|
|
10997
11158
|
const { captureFields } = _m10;
|
|
10998
11159
|
|
|
10999
|
-
const { settings, captureWideTable } =
|
|
11160
|
+
const { settings, captureWideTable } = _m56;
|
|
11000
11161
|
|
|
11001
|
-
const { pdfNumber: n } =
|
|
11162
|
+
const { pdfNumber: n } = _m60;
|
|
11002
11163
|
|
|
11003
|
-
const { PdfTableLayout } =
|
|
11164
|
+
const { PdfTableLayout } = _m69;
|
|
11004
11165
|
|
|
11005
|
-
const { PdfWriteSession } =
|
|
11166
|
+
const { PdfWriteSession } = _m59;
|
|
11006
11167
|
|
|
11007
|
-
const { PdfDocumentImages } =
|
|
11168
|
+
const { PdfDocumentImages } = _m85;
|
|
11008
11169
|
|
|
11009
|
-
const { vectorCommands } =
|
|
11170
|
+
const { vectorCommands } = _m87;
|
|
11010
11171
|
|
|
11011
|
-
const { graphicAlternative } =
|
|
11172
|
+
const { graphicAlternative } = _m80;
|
|
11012
11173
|
|
|
11013
|
-
const { checkDrawingBlock, prepareDrawing } =
|
|
11174
|
+
const { checkDrawingBlock, prepareDrawing } = _m88;
|
|
11014
11175
|
|
|
11015
|
-
const { captureParagraph, captureCaption, prepareParagraph, checkParagraphBuffer, paragraphStartHeight } =
|
|
11176
|
+
const { captureParagraph, captureCaption, prepareParagraph, checkParagraphBuffer, paragraphStartHeight } = _m89;
|
|
11016
11177
|
|
|
11017
|
-
const { captureListOptions, prepareListItem } =
|
|
11178
|
+
const { captureListOptions, prepareListItem } = _m90;
|
|
11018
11179
|
|
|
11019
|
-
const { captureSection } =
|
|
11180
|
+
const { captureSection } = _m78;
|
|
11020
11181
|
|
|
11021
|
-
const { renderGroupedPdfTable } =
|
|
11182
|
+
const { renderGroupedPdfTable } = _m91;
|
|
11022
11183
|
|
|
11023
11184
|
const tableOptionFields = ["columns", "includeHeader", "headerRows", "footer", "headerPresentation", "footerPresentation", "alternateRowColor", "columnWidths", "wideTable", "formatValue", "formatRuns"];
|
|
11024
11185
|
/** Capture typed columns for a single-use table source in a composed document. */
|
|
@@ -11276,18 +11437,18 @@ const _exports = Object.freeze({ pdfTable: pdfTable, writePdfDocument: writePdfD
|
|
|
11276
11437
|
return _exports;
|
|
11277
11438
|
})();
|
|
11278
11439
|
|
|
11279
|
-
const
|
|
11440
|
+
const _m83 = (() => {
|
|
11280
11441
|
const { assertGroupedReportSource } = _m8;
|
|
11281
11442
|
|
|
11282
11443
|
const { BlobByteSink } = _m3;
|
|
11283
11444
|
|
|
11284
|
-
const { writePdfDocumentTo } =
|
|
11445
|
+
const { writePdfDocumentTo } = _m84;
|
|
11285
11446
|
|
|
11286
|
-
const { pdfOptionFields } =
|
|
11447
|
+
const { pdfOptionFields } = _m56;
|
|
11287
11448
|
|
|
11288
11449
|
const { captureFields } = _m10;
|
|
11289
11450
|
|
|
11290
|
-
const { pdfGroupedTable, groupedPdfLabelFields, groupedPdfTableFields } =
|
|
11451
|
+
const { pdfGroupedTable, groupedPdfLabelFields, groupedPdfTableFields } = _m92;
|
|
11291
11452
|
|
|
11292
11453
|
|
|
11293
11454
|
|
|
@@ -11321,14 +11482,14 @@ async function writeGroupedPdfTo(report, destination, configuration) {
|
|
|
11321
11482
|
delete documentOptions.footer;
|
|
11322
11483
|
return writePdfDocumentTo([pdfGroupedTable(report, tableOptions)], destination, documentOptions);
|
|
11323
11484
|
}
|
|
11324
|
-
const _exports = Object.freeze({ pdfGroupedTable:
|
|
11485
|
+
const _exports = Object.freeze({ pdfGroupedTable: _m92.pdfGroupedTable, writeGroupedPdf: writeGroupedPdf, writeGroupedPdfTo: writeGroupedPdfTo });
|
|
11325
11486
|
return _exports;
|
|
11326
11487
|
})();
|
|
11327
11488
|
|
|
11328
|
-
const
|
|
11329
|
-
const { fontProgram } =
|
|
11489
|
+
const _m93 = (() => {
|
|
11490
|
+
const { fontProgram } = _m63;
|
|
11330
11491
|
|
|
11331
|
-
const { resolveScalar, selectFont, validateFonts } =
|
|
11492
|
+
const { resolveScalar, selectFont, validateFonts } = _m67;
|
|
11332
11493
|
|
|
11333
11494
|
/**
|
|
11334
11495
|
* Check one text run against the writer's selected font and scalar-layout rules.
|
|
@@ -11364,15 +11525,15 @@ const _exports = Object.freeze({ preflightPdfText: preflightPdfText });
|
|
|
11364
11525
|
return _exports;
|
|
11365
11526
|
})();
|
|
11366
11527
|
|
|
11367
|
-
const
|
|
11528
|
+
const _m54 = (() => {
|
|
11368
11529
|
|
|
11369
|
-
const _exports = Object.freeze({ writePdf:
|
|
11530
|
+
const _exports = Object.freeze({ writePdf: _m55.writePdf, writePdfTo: _m55.writePdfTo, writeGroupedPdf: _m83.writeGroupedPdf, writeGroupedPdfTo: _m83.writeGroupedPdfTo, pdfGroupedTable: _m83.pdfGroupedTable, createGroupedReport: _m8.createGroupedReport, writePdfDocument: _m84.writePdfDocument, writePdfDocumentTo: _m84.writePdfDocumentTo, pdfTable: _m84.pdfTable, PdfFont: _m63.PdfFont, preflightPdfText: _m93.preflightPdfText, ExportCell: _m5.ExportCell, saveBlob: _m1.saveBlob });
|
|
11370
11531
|
return _exports;
|
|
11371
11532
|
})();
|
|
11372
11533
|
|
|
11373
11534
|
const _m0 = (() => {
|
|
11374
11535
|
|
|
11375
|
-
const _exports = Object.freeze({ core: _m1, zip: _m14, xml: _m17, opc: _m18, xlsx: _m21, csv:
|
|
11536
|
+
const _exports = Object.freeze({ core: _m1, zip: _m14, xml: _m17, opc: _m18, xlsx: _m21, csv: _m50, pdf: _m54, Workbook: _m21.Workbook, Worksheet: _m21.Worksheet, Cell: _m21.Cell, FormulaCell: _m21.FormulaCell, StyleRegistry: _m21.StyleRegistry, NumberFormats: _m21.NumberFormats, writeXlsx: _m21.writeXlsx, writeXlsxTo: _m21.writeXlsxTo, writeCsv: _m50.writeCsv, writeCsvTo: _m50.writeCsvTo, createGroupedReport: _m8.createGroupedReport, writeGroupedXlsx: _m48.writeGroupedXlsx, writeGroupedXlsxTo: _m48.writeGroupedXlsxTo, addGroupedXlsx: _m48.addGroupedXlsx, writeGroupedPdf: _m83.writeGroupedPdf, writeGroupedPdfTo: _m83.writeGroupedPdfTo, pdfGroupedTable: _m83.pdfGroupedTable, writePdf: _m54.writePdf, writePdfTo: _m54.writePdfTo, writePdfDocument: _m54.writePdfDocument, writePdfDocumentTo: _m54.writePdfDocumentTo, pdfTable: _m54.pdfTable, PdfFont: _m54.PdfFont, preflightPdfText: _m54.preflightPdfText, OfficeIMOError: _m1.OfficeIMOError, NotSupportedError: _m1.NotSupportedError, detectFeatures: _m1.detectFeatures, saveBlob: _m1.saveBlob, ExportCell: _m1.ExportCell });
|
|
11376
11537
|
return _exports;
|
|
11377
11538
|
})();
|
|
11378
11539
|
const { core, zip, xml, opc, xlsx, csv, pdf, Workbook, Worksheet, Cell, FormulaCell, StyleRegistry, NumberFormats, writeXlsx, writeXlsxTo, writeCsv, writeCsvTo, createGroupedReport, writeGroupedXlsx, writeGroupedXlsxTo, addGroupedXlsx, writeGroupedPdf, writeGroupedPdfTo, pdfGroupedTable, writePdf, writePdfTo, writePdfDocument, writePdfDocumentTo, pdfTable, PdfFont, preflightPdfText, OfficeIMOError, NotSupportedError, detectFeatures, saveBlob, ExportCell } = _m0;
|