@silurus/ooxml 0.89.2 → 0.89.3
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 -3
- package/dist/{abort-VrnK7mdP.js → abort-JztSoyw2.js} +0 -2
- package/dist/assets/render-worker-BUa1gyCE.js +15 -0
- package/dist/{bounded-raw-part-cache-C3daknU-.js → bounded-raw-part-cache-Bi_VqXmg.js} +7 -115
- package/dist/{bundled-asset-url-E2nXURF9.js → bundled-asset-url-BMJ8vNHP.js} +0 -2
- package/dist/{canvas-viewer-mechanics-SZWSnn6j.js → canvas-viewer-mechanics-ycCX6v-z.js} +3 -25
- package/dist/{cfb-guard-dNeUiANF.js → cfb-guard-BIaHdonq.js} +1 -13
- package/dist/chart-ex.mjs +4 -7
- package/dist/{chunk-Dy4uBu1J.js → chunk-D5OxutzX.js} +0 -2
- package/dist/{comment-overlay-controller-CHDxT0e7.js → comment-overlay-controller-CR5ySvki.js} +2 -22
- package/dist/{comment-ui-runtime-Dk2qrPy_.js → comment-ui-runtime-BWhLz4gq.js} +5 -7
- package/dist/comment-ui-runtime-BtP_TpvT.js +2 -0
- package/dist/{comment-ui-runtime-BcwaRnMR.js → comment-ui-runtime-CwTOCwA8.js} +5 -7
- package/dist/{delimited-text-worker-host-CikWU6_m.js → delimited-text-worker-host-RwvuSsP2.js} +0 -4
- package/dist/{document-model-source-BD2VSd2L.js → document-model-source-Csow9uxO.js} +9 -11
- package/dist/{document-pull-client-DhSGspvi.js → document-pull-client-CHpz0Q1p.js} +7572 -7285
- package/dist/{document-pull-worker-D-E0Iz3P.js → document-pull-worker-1ZJv9f9W.js} +3 -7
- package/dist/{docx-CXfILbzI.js → docx-D9E0vCq-.js} +12 -18
- package/dist/{docx-CCZBO1WQ.js → docx-GXxH0AwW.js} +13 -65
- package/dist/{docx-model-source-Ci6xb487.js → docx-model-source-aKx2gZH9.js} +7 -9
- package/dist/docx.mjs +6 -6
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{drawingml-shape-Bp0yEZHC.js → drawingml-shape-BwELUfNW.js} +2 -6
- package/dist/{duotone-DN8P4aXe.js → duotone-BI7CoghW.js} +2 -6
- package/dist/{emf-CGFQIz6c.js → emf-DgUBx9BU.js} +2 -4
- package/dist/{font-preload-demand-CGOB-MoE.js → font-preload-demand-BuMy4iJ1.js} +2 -8
- package/dist/{grid-geometry-C3IG20ut.js → grid-geometry-CqTDvpDr.js} +1 -6
- package/dist/{host-layout-DVMw8hDY.js → host-layout-Cz_lCuTZ.js} +0 -1
- package/dist/{host-layout-measure-BAysJILu.js → host-layout-measure-GU0oJ4Me.js} +1 -3
- package/dist/{in-process-pull-transport-DuXcPZng.js → in-process-pull-transport-BPJ7M0uC.js} +0 -2
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +3 -5
- package/dist/{line-distribute-DhQqysA2.js → line-distribute-C_CJisnJ.js} +2 -18
- package/dist/math.mjs +2 -8
- package/dist/{mathjax-BhwN6ilc.js → mathjax-DvwccQ8e.js} +0 -2
- package/dist/{model-source-kz_NkZqT.js → model-source-COXegBNA.js} +1 -3
- package/dist/{model-source-BkmyX_r-.js → model-source-DLXFe4_2.js} +3 -5
- package/dist/{model-source-session-CnPCTRDD.js → model-source-session-B3WVQCM5.js} +5 -9
- package/dist/{model-source-session-CF4iXav8.js → model-source-session-BVZBHZ04.js} +5 -11
- package/dist/{model-source-session-CJmkItIK.js → model-source-session-DfUgVpr1.js} +4 -8
- package/dist/node.mjs +6 -6
- package/dist/{pixel-budget-BpTYrepD.js → pixel-budget-DI82Hn3R.js} +0 -2
- package/dist/{plot-area-frame-Bs_j4uu7.js → plot-area-frame-D3JtHvov.js} +1 -167
- package/dist/{pptx-BhmLP_Ed.js → pptx-BD0jwWs6.js} +9 -11
- package/dist/{pptx-Bo9hCGQU.js → pptx-CLyebeF_.js} +16 -62
- package/dist/{pptx-model-source-J0SrVkO6.js → pptx-model-source-D_2mnSxI.js} +5 -7
- package/dist/pptx.mjs +7 -7
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{presentation-model-source-CebYmrOD.js → presentation-model-source-rWZ3Y-S_.js} +8 -10
- package/dist/{raster-target-YQ4G6rxo.js → raster-target-Ca3tyA0L.js} +0 -2
- package/dist/{read-only-comment-decoration-PidH0wnP.js → read-only-comment-decoration-B06YO2zk.js} +0 -4
- package/dist/{read-only-comment-margin-B52rDVKo.js → read-only-comment-margin-Ee9Y6vPg.js} +0 -2
- package/dist/region-map.mjs +4 -7
- package/dist/{render-hT2OVZUi.js → render-Cs1bgbEm.js} +3 -5
- package/dist/{render-worker-host-Desevuoc.js → render-worker-host-BR7n4xKy.js} +0 -4
- package/dist/render-worker-host-BxsA-yJo.js +5 -0
- package/dist/{render-worker-host-BmAQ-sWT.js → render-worker-host-CZC0WOn8.js} +0 -4
- package/dist/{renderer-CvZ4JmoL.js → renderer-DFDF48zw.js} +7 -55
- package/dist/{renderer-module-contract-CWM7jv6d.js → renderer-module-contract-BuTx2FWJ.js} +0 -2
- package/dist/{renderer-BFWqhLEt.js → renderer-xdugdcMd.js} +6 -70
- package/dist/{resource-measurement-DBiUwblM.js → resource-measurement-CTGrNAsD.js} +2 -18
- package/dist/{session-CWDKFWCh.js → session-B5CgMc2N.js} +7 -17
- package/dist/{slide-pull-client-BuBvXMyc.js → slide-pull-client-43mS9T70.js} +9 -63
- package/dist/{three-d-BKwNPAP4.js → three-d-ByHGsYrX.js} +1 -11
- package/dist/three-d.mjs +4 -17
- package/dist/{tiff-contract-C6M3QcPp.js → tiff-contract-DEd8CGuz.js} +0 -2
- package/dist/tiff.mjs +5 -8
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +12 -11
- package/dist/types/index.d.ts +16 -15
- package/dist/types/internal-companion.d.ts +1 -1
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +7 -6
- package/dist/types/pptx.d.ts +11 -11
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/tiff.d.ts +1 -1
- package/dist/types/xlsx.d.ts +11 -11
- package/dist/{visible-index-FeVA0mGE.js → visible-index-vN-4BNn7.js} +0 -2
- package/dist/{wasm-loader-rlgHmcSv.js → wasm-loader-KAOyLXzf.js} +0 -4
- package/dist/{wasm-runtime-generation-BWGfM44b.js → wasm-runtime-generation-BsWKRY7U.js} +1 -3
- package/dist/{workbook-model-source-Che8Zbjw.js → workbook-model-source-ChIQjX9a.js} +9 -11
- package/dist/{worker-source-UAi3GNcM.js → worker-source-C29EQNUj.js} +0 -2
- package/dist/{worker-source-SbudzjYL.js → worker-source-D3NwPe6l.js} +0 -2
- package/dist/{worker-source-DrwhR9fw.js → worker-source-ZQE9C1j6.js} +0 -2
- package/dist/{worksheet-pull-client-Cxzj6uuB.js → worksheet-pull-client-D5zAevQv.js} +4 -18
- package/dist/{xlsx-CUVUep5I.js → xlsx-DelYm4VZ.js} +17 -61
- package/dist/{xlsx-C5BSwMUd.js → xlsx-S6orTmKI.js} +8 -16
- package/dist/{xlsx-model-source-C3_PiPBo.js → xlsx-model-source-Cm9ocDgT.js} +8 -12
- package/dist/xlsx.mjs +7 -7
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +2 -2
- package/dist/assets/render-worker-D_SMt5nl.js +0 -15
- package/dist/comment-ui-runtime-B7ZvovcS.js +0 -2
- package/dist/render-worker-host-Cz224I38.js +0 -9
package/dist/{comment-overlay-controller-CHDxT0e7.js → comment-overlay-controller-CR5ySvki.js}
RENAMED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { An as e, En as t, Y as n, dn as r, jn as i, kn as a } from "./bounded-raw-part-cache-
|
|
2
|
-
import { C as o, S as s, _ as c, a as l, b as u, g as d, h as f, l as p, m, p as h, r as g, x as _, y as v } from "./canvas-viewer-mechanics-
|
|
3
|
-
//#region packages/core/src/fonts/embedded.ts
|
|
1
|
+
import { An as e, En as t, Y as n, dn as r, jn as i, kn as a } from "./bounded-raw-part-cache-Bi_VqXmg.js";
|
|
2
|
+
import { C as o, S as s, _ as c, a as l, b as u, g as d, h as f, l as p, m, p as h, r as g, x as _, y as v } from "./canvas-viewer-mechanics-ycCX6v-z.js";
|
|
4
3
|
function y(e, t = r) {
|
|
5
4
|
return e.byteLength > 0 && e.byteLength <= t;
|
|
6
5
|
}
|
|
@@ -57,8 +56,6 @@ async function S(n, o = r) {
|
|
|
57
56
|
function C(t) {
|
|
58
57
|
e(t);
|
|
59
58
|
}
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region packages/core/src/layout/virtual-scroll.ts
|
|
62
59
|
function w(e, t, n) {
|
|
63
60
|
return e < t ? t : e > n ? n : e;
|
|
64
61
|
}
|
|
@@ -121,8 +118,6 @@ function O(e, t, n, r, i, a, o) {
|
|
|
121
118
|
totalHeight: s + e * t + (e - 1) * n + c
|
|
122
119
|
};
|
|
123
120
|
}
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region packages/core/src/search/highlight-rect.ts
|
|
126
121
|
function k(e, t, n, r) {
|
|
127
122
|
let i = t <= 0 ? 0 : r(e.slice(0, t)), a = n >= e.length ? r(e) : r(e.slice(0, n));
|
|
128
123
|
return {
|
|
@@ -133,8 +128,6 @@ function k(e, t, n, r) {
|
|
|
133
128
|
function A(e, t) {
|
|
134
129
|
return t > 0 ? `${e / t * 100}%` : "0%";
|
|
135
130
|
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region packages/core/src/internal/selection-data.ts
|
|
138
131
|
function j(e, t, n) {
|
|
139
132
|
e.dataset ? n === void 0 ? delete e.dataset[t] : e.dataset[t] = n : n !== void 0 && e.setAttribute?.(`data-${t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`)}`, n);
|
|
140
133
|
}
|
|
@@ -143,8 +136,6 @@ function M(e) {
|
|
|
143
136
|
let t = Number(e);
|
|
144
137
|
return Number.isSafeInteger(t) ? t : null;
|
|
145
138
|
}
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region packages/core/src/viewer/find-controller.ts
|
|
148
139
|
var N = class {
|
|
149
140
|
_count;
|
|
150
141
|
_collectRuns;
|
|
@@ -277,8 +268,6 @@ var N = class {
|
|
|
277
268
|
console.error(`[ooxml] ${e} callback failed and was disabled:`, i);
|
|
278
269
|
}
|
|
279
270
|
};
|
|
280
|
-
//#endregion
|
|
281
|
-
//#region packages/core/src/internal/deferred.ts
|
|
282
271
|
function I() {
|
|
283
272
|
let e, t;
|
|
284
273
|
return {
|
|
@@ -289,8 +278,6 @@ function I() {
|
|
|
289
278
|
reject: t
|
|
290
279
|
};
|
|
291
280
|
}
|
|
292
|
-
//#endregion
|
|
293
|
-
//#region packages/core/src/internal/comment-context.ts
|
|
294
281
|
var L = 65536;
|
|
295
282
|
function R(e) {
|
|
296
283
|
if (e !== void 0 && (!Number.isFinite(e) || e < 0)) throw RangeError("maxTextCharacters must be a finite non-negative number.");
|
|
@@ -314,8 +301,6 @@ function z(e, t, n) {
|
|
|
314
301
|
maxTextCharacters: r
|
|
315
302
|
});
|
|
316
303
|
}
|
|
317
|
-
//#endregion
|
|
318
|
-
//#region packages/core/src/internal/dom-interaction-boundary.ts
|
|
319
304
|
function B(e, t) {
|
|
320
305
|
return e.dataset?.[t] !== void 0;
|
|
321
306
|
}
|
|
@@ -338,8 +323,6 @@ function V(e, t, n) {
|
|
|
338
323
|
}
|
|
339
324
|
return !1;
|
|
340
325
|
}
|
|
341
|
-
//#endregion
|
|
342
|
-
//#region packages/core/src/viewer/scroll-viewer-shell.ts
|
|
343
326
|
var H = class {
|
|
344
327
|
wrapper;
|
|
345
328
|
scrollHost;
|
|
@@ -589,8 +572,6 @@ function Z(e, t, n, r, i) {
|
|
|
589
572
|
decorationLayer: c
|
|
590
573
|
};
|
|
591
574
|
}
|
|
592
|
-
//#endregion
|
|
593
|
-
//#region packages/core/src/viewer/slot-layer-controller.ts
|
|
594
575
|
var Q = class {
|
|
595
576
|
hooks;
|
|
596
577
|
constructor(e) {
|
|
@@ -990,5 +971,4 @@ var Q = class {
|
|
|
990
971
|
this._frame !== null && this.hooks.ownerWindow()?.cancelAnimationFrame?.(this._frame), this._frame = null, this._scheduled = !1, this._pending.clear();
|
|
991
972
|
}
|
|
992
973
|
};
|
|
993
|
-
//#endregion
|
|
994
974
|
export { E as A, N as C, k as D, A as E, y as M, S as N, O, C as P, P as S, j as T, U as _, ie as a, I as b, ne as c, K as d, q as f, W as g, G as h, ae as i, b as j, D as k, $ as l, J as m, se as n, re as o, Z as p, oe as r, te as s, ce as t, Q as u, H as v, M as w, F as x, z as y };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { E as e } from "./comment-overlay-controller-
|
|
2
|
-
import { L as t } from "./document-pull-client-
|
|
3
|
-
import { f as n } from "./docx-
|
|
4
|
-
import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-
|
|
5
|
-
import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-
|
|
6
|
-
//#region packages/docx/src/comment-margin.ts
|
|
1
|
+
import { E as e } from "./comment-overlay-controller-CR5ySvki.js";
|
|
2
|
+
import { L as t } from "./document-pull-client-CHpz0Q1p.js";
|
|
3
|
+
import { f as n } from "./docx-GXxH0AwW.js";
|
|
4
|
+
import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-Ee9Y6vPg.js";
|
|
5
|
+
import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-B06YO2zk.js";
|
|
7
6
|
function p(e, r) {
|
|
8
7
|
let i = /* @__PURE__ */ new Set();
|
|
9
8
|
for (let e of r) e.source && i.add(t(e.source));
|
|
@@ -167,5 +166,4 @@ function y(e, t, n, a, o, u, d, f, y, b, x, S = !1, C, w) {
|
|
|
167
166
|
scrollTop: t?.scrollTop ?? 0
|
|
168
167
|
});
|
|
169
168
|
}
|
|
170
|
-
//#endregion
|
|
171
169
|
export { y as buildDocxCommentMargin, f as buildReadOnlyCommentDecoration, u as disposeReadOnlyCommentDecoration, o as disposeReadOnlyCommentMargin, a as previewReadOnlyCommentMargin, d as projectReadOnlyCommentMarginScroll };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Aa as e } from "./plot-area-frame-
|
|
2
|
-
import { E as t } from "./comment-overlay-controller-
|
|
3
|
-
import { r as n } from "./pptx-
|
|
4
|
-
import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-
|
|
5
|
-
import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-
|
|
6
|
-
//#region packages/pptx/src/comment-margin.ts
|
|
1
|
+
import { Aa as e } from "./plot-area-frame-D3JtHvov.js";
|
|
2
|
+
import { E as t } from "./comment-overlay-controller-CR5ySvki.js";
|
|
3
|
+
import { r as n } from "./pptx-CLyebeF_.js";
|
|
4
|
+
import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-Ee9Y6vPg.js";
|
|
5
|
+
import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-B06YO2zk.js";
|
|
7
6
|
function f(e, t, n) {
|
|
8
7
|
return {
|
|
9
8
|
messageKey: `${t}:reply:${e.id ?? n}`,
|
|
@@ -108,5 +107,4 @@ function p(a, o, l, u, d, p, m, h, g, _, v, y, b = !1, x, S) {
|
|
|
108
107
|
scrollTop: o?.scrollTop ?? 0
|
|
109
108
|
});
|
|
110
109
|
}
|
|
111
|
-
//#endregion
|
|
112
110
|
export { p as buildPptxCommentMargin, d as buildReadOnlyCommentDecoration, l as disposeReadOnlyCommentDecoration, o as disposeReadOnlyCommentMargin, a as previewReadOnlyCommentMargin, u as projectReadOnlyCommentMarginScroll };
|
package/dist/{delimited-text-worker-host-CikWU6_m.js → delimited-text-worker-host-RwvuSsP2.js}
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region packages/xlsx/src/delimited-text-worker.ts?worker&inline
|
|
2
1
|
var e = "var e=(e,t)=>()=>(e&&(t=e(e=0)),t),t,n,r=e((()=>{t=class e extends Error{code;details;constructor(t,n,r){super(n),this.name=`OoxmlError`,this.code=t,t===`unsupported-content`&&r&&(this.details=Object.freeze({format:r.format,reason:r.reason})),Object.setPrototypeOf(this,e.prototype)}},n=class e extends Error{code=`ooxml-resource-limit`;details;constructor(t,n){super(t),this.name=`OoxmlResourceLimitError`;let r=n.violation,i=Object.freeze({format:r.format,operation:r.operation,resource:r.resource,metric:r.metric,...r.part===void 0?{}:{part:r.part},limit:r.limit,observed:r.observed,configurable:r.configurable,usage:Object.freeze({archiveEntryCount:r.usage.archiveEntryCount,declaredInflatedBytes:r.usage.declaredInflatedBytes,...r.usage.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:r.usage.largestInflatedEntryBytes},distinctInflatedBytes:r.usage.distinctInflatedBytes,operationInflatedBytes:r.usage.operationInflatedBytes})});this.details=Object.freeze({stage:n.stage,violation:i}),Object.setPrototypeOf(this,e.prototype)}}}));function i(e){return e===`image-dimension`||e===`image-pixels`||e===`active-decoded-bytes`||e===`image-effect-count`||e===`image-effect-work`||e===`tiff-lzw-work`||e===`metafile-path-commands`||e===`metafile-record-points`||e===`metafile-record-polygons`||e===`metafile-record-rectangles`||e===`metafile-record-text-units`}function a(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function o(e){if(!(!e||typeof e!=`object`))try{let t=e,n=t.code,r=t.metric,o=t.limit,s=t.observed;return n!==`ooxml-decoded-image-limit`||!i(r)||!a(o)||!a(s)||s<=o?void 0:{metric:r,limit:o,observed:s}}catch{return}}var s,c,l,u,d,f=e((()=>{s=1<<25,c=1<<27,s*4,c*4,l=Math.floor(s/4),u=c,u/l,d=class e extends RangeError{metric;limit;observed;code=`ooxml-decoded-image-limit`;constructor(t,n,r){super(`OOXML decoded image limit exceeded: ${t} ${r} > ${n}`),this.metric=t,this.limit=n,this.observed=r,this.name=`OoxmlDecodedImageLimitError`,Object.setPrototypeOf(this,e.prototype)}}}));function p(e){if(!(typeof e!=`object`||!e))try{let t=e,n=t.code,r=t.message;return n===`ooxml-tiff-decode`&&typeof r==`string`?{message:r}:void 0}catch{return}}var m=e((()=>{}));function h(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function g(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return h(t.requiredBytes)&&h(t.offeredBytes)&&t.requiredBytes>t.offeredBytes}var _=class e extends RangeError{code=`ooxml-insufficient-credit`;requiredBytes;offeredBytes;constructor(t){super(`Pull unit requires ${t.requiredBytes} bytes but credit is ${t.offeredBytes}`),this.name=`PullSessionInsufficientCreditError`,this.requiredBytes=t.requiredBytes,this.offeredBytes=t.offeredBytes,Object.setPrototypeOf(this,e.prototype)}};function v(e){if(e instanceof _)return e;let t=e instanceof Error?e.message:String(e);if(!t.startsWith(`OOXML_INSUFFICIENT_CREDIT:`))return;let n;try{n=JSON.parse(t.slice(26))}catch{return}if(!n||typeof n!=`object`||Array.isArray(n))return;let r=n;if(!(r.code!==`ooxml-insufficient-credit`||!g(r)))return new _(r)}r(),f(),m();const y=`OOXML_RESOURCE_LIMIT:`;function b(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function x(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return b(t.archiveEntryCount)&&b(t.declaredInflatedBytes)&&(t.largestInflatedEntryBytes===void 0||b(t.largestInflatedEntryBytes))&&b(t.distinctInflatedBytes)&&b(t.operationInflatedBytes)}function S(e){return e===`docx`||e===`xlsx`||e===`pptx`}function ee(e){return e===`container`||e===`decompression`||e===`parsing`||e===`serialization`||e===`layout`||e===`rendering`||e===`worker`}function C(e,t){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\\u0000-\\u001f\\u007f]/u.test(e)}function w(e){return C(e,128)&&/^[a-z0-9][a-z0-9-]*$/u.test(e)}function T(e){return!C(e,4096)||e.startsWith(`/`)||e.startsWith(`\\\\`)||e.includes(`\\\\`)||e.includes(`?`)||e.includes(`#`)||e.includes(`://`)||/^[a-z]:/iu.test(e)?!1:e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`)}const E=new Map([[`archive-entry:declared-inflated-bytes`,{stage:`container`,part:`required`}],[`archive-entry:actual-inflated-bytes`,{stage:`decompression`,part:`required`}],[`archive:entry-count`,{stage:`container`,part:`forbidden`}],[`archive:central-directory-bytes`,{stage:`container`,part:`forbidden`,configurable:!1}],[`archive:distinct-inflated-bytes`,{stage:`decompression`,part:`required`}],[`xml-event:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`xml-context:bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`image-effect:work`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chartex-allocation:elements`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chartex-allocation:bytes`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chart-cache:points`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`numbering-marker:bytes`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`chart-style-formats:entries`,{stage:`parsing`,part:`required`,configurable:!1}],[`chart-custom-number-formats:entries`,{stage:`parsing`,part:`required`,configurable:!1}],[`chart-number-format-bytes:bytes`,{stage:`parsing`,part:`required`,configurable:!1}],[`xml-tree:depth`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-row:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`worksheet-shell:projected-bytes`,{stage:`parsing`,part:`optional`,configurable:!1}],[`theme-style-reparse:bytes`,{stage:`parsing`,part:`forbidden`,configurable:!1}],[`style-inheritance:depth`,{stage:`parsing`,part:`required`,configurable:!1}],[`complex-field:depth`,{stage:`parsing`,part:`forbidden`,configurable:!1}]]),D=new Set([...E.keys()].map(e=>e.slice(0,e.indexOf(`:`)))),O=new Set([...E.keys()].map(e=>e.slice(e.indexOf(`:`)+1)));function k(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!S(t.format)||!C(t.operation,256)||!w(t.resource)||!w(t.metric)||!b(t.limit)||!b(t.observed)||typeof t.configurable!=`boolean`||!x(t.usage)?!1:!(`part`in t)||T(t.part)}function A(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(!ee(t.stage)||!k(t.violation))return!1;let n=t.violation,r=E.get(`${n.resource}:${n.metric}`);return r?t.stage!==r.stage||r.configurable===!1&&n.configurable!==!1?!1:r.part===`required`?n.part!==void 0:r.part===`forbidden`?n.part===void 0:!0:!(D.has(n.resource)&&O.has(n.metric))}function j(e){return{archiveEntryCount:e.archiveEntryCount,declaredInflatedBytes:e.declaredInflatedBytes,...e.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:e.largestInflatedEntryBytes},distinctInflatedBytes:e.distinctInflatedBytes,operationInflatedBytes:e.operationInflatedBytes}}function M(e){if(!A(e))return;let t=e.violation,n={stage:e.stage,violation:{format:t.format,operation:t.operation,resource:t.resource,metric:t.metric,...t.part===void 0?{}:{part:t.part},limit:t.limit,observed:t.observed,configurable:t.configurable,usage:j(t.usage)}};return A(n)?n:void 0}function N(e){let t=e.violation;return`OOXML resource limit exceeded${t.part?` for ${t.part}`:``} (${t.resource}, ${e.stage}): ${t.metric} ${t.observed} > ${t.limit}`}function P(e){let t=e instanceof Error?e.message:String(e);if(!t.startsWith(y))return;let r;try{r=JSON.parse(t.slice(21))}catch{return}if(!r||typeof r!=`object`)return;let i=r;if(!(i.code!==`ooxml-resource-limit`||!A(i.details)))return new n(N(i.details),i.details)}function F(e){let n=e instanceof Error?e.message:String(e);if(n.startsWith(`OOXML_NOT_OOXML:`))return new t(`not-ooxml`,`This file is not an Office Open XML document: ${n.slice(16)}`)}function I(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n=t.format,r=t.reason;if(!(!w(n)||r!==`source-subset`))return{format:n,reason:r}}function L(e){return new t(`unsupported-content`,`Input is outside the source’s supported subset.`,e)}function te(e){let t=typeof e==`string`?e:e instanceof Error?e.message:``;if(!(!t.startsWith(`MODEL_SOURCE_UNSUPPORTED:`)||t.length>1024))try{let e=I(JSON.parse(t.slice(25)));return e?L(e):void 0}catch{return}}function ne(e){return e===`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`||e instanceof Error&&e.message===`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`?new t(`unsupported-encryption`,`The configured source cannot decrypt this input.`):te(e)??P(e)??F(e)}function re(e){let r=o(e);if(r){let e=new d(r.metric,r.limit,r.observed);return{message:e.message,errorName:e.name,code:e.code,decodedImage:r}}let i=p(e);if(i)return{message:i.message,errorName:`TiffDecodeError`,code:`ooxml-tiff-decode`};let a=v(e);if(a)return{message:a.message,errorName:a.name,code:a.code,insufficientCredit:{requiredBytes:a.requiredBytes,offeredBytes:a.offeredBytes}};let s=e instanceof t||e instanceof n?e:ne(e),c=s??e;if(s instanceof n||c&&typeof c==`object`&&c.code===`ooxml-resource-limit`){let e=c,t=M(e.details);return t?{message:typeof e.message==`string`?e.message:N(t),errorName:`OoxmlResourceLimitError`,code:`ooxml-resource-limit`,resourceLimit:t}:{message:`Invalid OOXML resource-limit error payload`,errorName:`Error`}}if(c&&typeof c==`object`&&c.code===`unsupported-content`){let e=I(c.details);return e?{message:L(e).message,code:`unsupported-content`,unsupportedContent:e}:{message:`Invalid unsupported-content error payload`,errorName:`Error`}}if(s instanceof t)return{message:typeof s.message==`string`?s.message:String(s.message),errorName:C(s.name,128)?s.name:`OoxmlError`,...w(s.code)?{code:s.code}:{}};let l=e instanceof Error?e.message:String(e);if(typeof l==`string`&&l.startsWith(y))return{message:`Invalid OOXML resource-limit payload`,errorName:`Error`};let u=e instanceof Error?e:Error(l),f=u;return{message:typeof u.message==`string`?u.message:String(u.message),errorName:C(u.name,128)?u.name:`Error`,...typeof f.code==`string`?{code:f.code}:{}}}function R(e){try{return re(e)}catch{return{message:`Worker operation failed with an unreadable error`,errorName:`Error`}}}const z=2**53-1-1;function B(e){return Object.freeze({maxRows:e.maxRows,maxCells:e.maxCells,maxOwnedUtf8Bytes:e.maxOwnedUtf8Bytes,maxJsonBytes:e.maxJsonBytes})}const V=Object.freeze({worksheet:B({maxRows:1e5,maxCells:25e4,maxOwnedUtf8Bytes:33554432,maxJsonBytes:67108864}),cache:B({maxRows:2e5,maxCells:5e5,maxOwnedUtf8Bytes:67108864,maxJsonBytes:134217728}),maxCoordinateIndexEntries:25e4});function H(e,t){let n=e[t];if(n===void 0)return V.worksheet[t];if(typeof n!=`number`)throw TypeError(`xlsxWorksheetLimits.${t} must be a number`);if(!Number.isSafeInteger(n)||n<=0||n>z)throw RangeError(`xlsxWorksheetLimits.${t} must be a positive safe integer no greater than ${z}`);return n}function U(e={}){let t=e.xlsxWorksheetLimits,n={};if(t!==void 0){if(typeof t!=`object`||!t||Array.isArray(t))throw TypeError(`xlsxWorksheetLimits must be a non-null, non-array object`);n=t}let r=B({maxRows:H(n,`maxRows`),maxCells:H(n,`maxCells`),maxOwnedUtf8Bytes:H(n,`maxOwnedUtf8Bytes`),maxJsonBytes:H(n,`maxJsonBytes`)}),i=V,a=B({maxRows:Math.max(i.cache.maxRows,r.maxRows),maxCells:Math.max(i.cache.maxCells,r.maxCells),maxOwnedUtf8Bytes:Math.max(i.cache.maxOwnedUtf8Bytes,r.maxOwnedUtf8Bytes),maxJsonBytes:Math.max(i.cache.maxJsonBytes,r.maxJsonBytes)});return Object.freeze({worksheet:r,cache:a,maxCoordinateIndexEntries:Math.max(i.maxCoordinateIndexEntries,r.maxCells)})}function W(e,t){if(!Number.isSafeInteger(e)||e<0)throw Error(`${t} must be a non-negative safe integer`)}function G(e,t,n){return W(e,`resource measurement`),W(t,`resource measurement`),W(n,`resource measurement limit`),e>n||t>n||t>n-e?n===2**53-1?n:n+1:e+t}function K(e,t=2**53-1){W(t,`resource measurement limit`);let n=0;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r),a;if(i<=127)a=1;else if(i<=2047)a=2;else if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343?(a=4,r+=1):a=3}else a=3;if(n=G(n,a,t),n>t)return n}return n}function q(e,t=2**53-1){W(t,`resource measurement limit`);let n=G(0,2,t);if(n>t)return n;for(let r=0;r<e.length;r+=1){let i=e.charCodeAt(r),a;if(i===34||i===92||i===8||i===9||i===10||i===12||i===13)a=2;else if(i<=31)a=6;else if(i<=127)a=1;else if(i<=2047)a=2;else if(i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);t>=56320&&t<=57343?(a=4,r+=1):a=6}else a=i>=55296&&i<=57343?6:3;if(n=G(n,a,t),n>t)return n}return n}function J(e,t){return G(0,e,t)}function Y(e,t=2**53-1,n=!1){if(W(t,`resource measurement limit`),e===null)return{jsonBytes:J(4,t),stringValueUtf8Bytes:0};if(typeof e==`string`)return{jsonBytes:q(e,t),stringValueUtf8Bytes:K(e,t)};if(typeof e==`boolean`)return{jsonBytes:J(e?4:5,t),stringValueUtf8Bytes:0};if(typeof e==`number`)return{jsonBytes:J((Number.isFinite(e)?String(Object.is(e,-0)?0:e):`null`).length,t),stringValueUtf8Bytes:0};if(typeof e==`bigint`)throw TypeError(`BigInt values cannot be serialized to JSON`);if(Array.isArray(e)){let n=J(2,t),r=0;for(let i=0;i<e.length;i+=1){i!==0&&(n=G(n,1,t));let a=Y(e[i],t,!0);n=G(n,a.jsonBytes,t),r=G(r,a.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}if(typeof e==`object`){let n=J(2,t),r=0,i=0;for(let[a,o]of Object.entries(e)){if(o===void 0||typeof o==`function`||typeof o==`symbol`)continue;i++!==0&&(n=G(n,1,t)),n=G(n,q(a,t),t),n=G(n,1,t);let e=Y(o,t);n=G(n,e.jsonBytes,t),r=G(r,e.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}return{jsonBytes:n?J(4,t):0,stringValueUtf8Bytes:0}}const ie=new WeakMap;function ae(e,t){ie.set(e,t)}r();const oe=Object.freeze({archiveEntryCount:0,declaredInflatedBytes:0,distinctInflatedBytes:0,operationInflatedBytes:0});function se(e,t=V){let{maxCells:n,maxOwnedUtf8Bytes:r}=t.worksheet,i=e.reduce((e,t)=>G(e,t.cells.length,n),0);return{rows:e.length,cells:i,ownedUtf8Bytes:e.reduce((e,t)=>t.cells.reduce((e,t)=>{let n=Y(t.value,r).stringValueUtf8Bytes;return G(e,G(n,t.formula===void 0?0:K(t.formula,r),r),r)},e),0)}}function X(e,t=V){return ce(e,se(e.rows,t),t)}function ce(e,t,n=V){let r=Y(e,n.worksheet.maxJsonBytes);return{...t,jsonBytes:r.jsonBytes}}function Z(e,t,r,i,a,o,s,c=r!==`delimited-text-source`){let l=r===`worksheet-json`?`serialization`:`parsing`;return new n(N({stage:l,violation:{part:t,resource:r,metric:i,observed:o,limit:a}}),{stage:l,violation:{format:`xlsx`,operation:e,resource:r,metric:i,...t===void 0?{}:{part:t},limit:a,observed:Math.min(o,a+1),configurable:c,usage:s??oe}})}function le(e,t,n,r,i=V){let a=i.worksheet,o=[[`rows`,e.rows,a.maxRows],[`cells`,e.cells,a.maxCells],[`owned-utf8-bytes`,e.ownedUtf8Bytes,a.maxOwnedUtf8Bytes]];for(let[e,i,a]of o)if(i>a)throw Z(t,n,e===`owned-utf8-bytes`?`worksheet-cell-content`:`worksheet-model`,e,a,i,r)}function ue(e,t,n,r,i=V){let a=i.worksheet.maxJsonBytes;if(e>a)throw Z(t,n,`worksheet-json`,`bytes`,a,e,r)}const Q=`load-delimited-text`,$=67108864;function de(e){if(e>$)throw Z(Q,void 0,`delimited-text-source`,`bytes`,$,e)}const fe=Object.freeze({fonts:[Object.freeze({bold:!1,italic:!1,underline:!1,strike:!1,size:11,color:null,name:`Calibri`})],fills:[Object.freeze({patternType:`none`,fgColor:null,bgColor:null})],borders:[Object.freeze({left:null,right:null,top:null,bottom:null})],cellXfs:[Object.freeze({fontId:0,fillId:0,borderId:0,numFmtId:0,alignH:null,alignV:null,wrapText:!1})],numFmts:[],dxfs:[]});function pe(e,t,n=V){de(e.byteLength);let r=n.worksheet,i;try{i=new TextDecoder(t.encoding,{fatal:!0}).decode(e)}catch(e){throw TypeError(`Delimited text could not be decoded as ${t.encoding}`,{cause:e})}let a=[],o=[],s=``,c,l=1,u=1,d=0,f=0,p=!1,m=!1,h=e=>{s+=e,s.length>=4096&&((c??=[]).push(s),s=``)},g=()=>{if(d=G(d,1,r.maxCells),d>r.maxCells)throw Z(Q,void 0,`worksheet-model`,`cells`,r.maxCells,d);if(u>16384)throw RangeError(`Delimited text row ${l} has more than 16384 columns`);let e=c?c.join(``)+s:s;if(e!==``){let t=r.maxOwnedUtf8Bytes;if(f=G(G(f,4,t),K(e,t+1),t),f>t)throw Z(Q,void 0,`worksheet-cell-content`,`owned-utf8-bytes`,t,f);o.push({row:l,col:u,value:{type:`text`,text:e}})}s=``,c=void 0,u++,m=!1},_=()=>{if(l>r.maxRows)throw Z(Q,void 0,`worksheet-model`,`rows`,r.maxRows,l);a.push({index:l,height:null,cells:o}),o=[],l++,u=1};for(let e=0;e<i.length;e++){let n=i[e];if(p){if(n!==`\"`){n===`\\r`?(h(`\n`),i[e+1]===`\n`&&e++):h(n);continue}i[e+1]===`\"`?(h(`\"`),e++):(p=!1,m=!0);continue}if(m){if(n!==t.delimiter&&n!==`\\r`&&n!==`\n`)throw SyntaxError(`Unexpected character after closing quote at row ${l}, column ${u}`)}else if(n===`\"`&&s===``&&c===void 0){p=!0;continue}if(n===t.delimiter){g();continue}if(n===`\\r`||n===`\n`){g(),_(),n===`\\r`&&i[e+1]===`\n`&&e++;continue}h(n)}if(p)throw SyntaxError(`Unterminated quoted field at row ${l}, column ${u}`);let v=i.endsWith(`\n`)||i.endsWith(`\\r`);i.length>0&&!v&&(g(),_());let y={name:t.sheetName,rows:a,colWidths:{},rowHeights:{},defaultColWidth:8.43,defaultRowHeight:15,mergeCells:[],freezeRows:0,freezeCols:0,conditionalFormats:[],images:[],charts:[],defaultFontFamily:`Calibri`,defaultFontSize:11},b=X(y,n);return le(b,Q,void 0,void 0,n),ue(b.jsonBytes,Q,void 0,void 0,n),ae(y,n),{workbook:{workbook:{sheets:[{name:t.sheetName,sheetId:1,rId:`rId1`}]},styles:fe,sharedStrings:[]},worksheet:y}}self.onmessage=e=>{let t=e.data;try{let e=U({xlsxWorksheetLimits:t.worksheetPolicy?.worksheet}),{workbook:n,worksheet:r}=pe(t.data,t.options,e),i=new TextEncoder().encode(JSON.stringify(r)).buffer,a={type:`delimitedTextParsed`,id:t.id,workbook:n,worksheetJson:i};self.postMessage(a,[i])}catch(e){let n={type:`error`,id:t.id,...R(e)};self.postMessage(n)}};", t = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", e], { type: "text/javascript;charset=utf-8" });
|
|
3
2
|
function n(n) {
|
|
4
3
|
let r;
|
|
@@ -18,10 +17,7 @@ function n(n) {
|
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region packages/xlsx/src/delimited-text-worker-host.ts
|
|
23
20
|
function r() {
|
|
24
21
|
return new n();
|
|
25
22
|
}
|
|
26
|
-
//#endregion
|
|
27
23
|
export { r as createDelimitedTextWorker };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Dn as e, N as t, On as n, Xt as r, j as i, qt as a } from "./bounded-raw-part-cache-
|
|
2
|
-
import { P as o, b as s } from "./comment-overlay-controller-
|
|
3
|
-
import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-
|
|
4
|
-
import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-
|
|
5
|
-
import { T as D } from "./canvas-viewer-mechanics-
|
|
6
|
-
import { n as O } from "./renderer-module-contract-
|
|
7
|
-
import { n as k, o as A, r as j } from "./model-source-
|
|
8
|
-
import { t as M } from "./bundled-asset-url-
|
|
9
|
-
//#region packages/docx/src/internal/document-model-source.ts
|
|
1
|
+
import { Dn as e, N as t, On as n, Xt as r, j as i, qt as a } from "./bounded-raw-part-cache-Bi_VqXmg.js";
|
|
2
|
+
import { P as o, b as s } from "./comment-overlay-controller-CR5ySvki.js";
|
|
3
|
+
import { N as c, _ as l, a as u, d, f, j as p, l as m, o as h, p as g, s as _, v, y } from "./document-pull-client-CHpz0Q1p.js";
|
|
4
|
+
import { _ as b, c as x, g as S, h as C, l as w, m as T, u as E } from "./docx-GXxH0AwW.js";
|
|
5
|
+
import { T as D } from "./canvas-viewer-mechanics-ycCX6v-z.js";
|
|
6
|
+
import { n as O } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
7
|
+
import { n as k, o as A, r as j } from "./model-source-COXegBNA.js";
|
|
8
|
+
import { t as M } from "./bundled-asset-url-BMJ8vNHP.js";
|
|
10
9
|
function N(e) {
|
|
11
10
|
let t = M(new URL("./docx-source-worker.mjs", import.meta.url).href, import.meta.url);
|
|
12
11
|
return e.transfer.length > 0 ? {
|
|
@@ -55,7 +54,7 @@ async function F(j, M = {}, N) {
|
|
|
55
54
|
let a = k(i, "docx");
|
|
56
55
|
try {
|
|
57
56
|
H.setSourceBytes(t.byteLength), H.checkpoint("container ready");
|
|
58
|
-
let i = V === "worker" ? (await import("./render-worker-host-
|
|
57
|
+
let i = V === "worker" ? (await import("./render-worker-host-BxsA-yJo.js")).createRenderWorker() : new (await (import("./worker-source-D3NwPe6l.js"))).default(), k, A, j = !1, U = () => {
|
|
59
58
|
j || !k || (j = !0, k.destroy());
|
|
60
59
|
}, W = I(i, a, M, (e) => {
|
|
61
60
|
k && P(k, e);
|
|
@@ -245,5 +244,4 @@ function I(e, t, n, r) {
|
|
|
245
244
|
}
|
|
246
245
|
});
|
|
247
246
|
}
|
|
248
|
-
//#endregion
|
|
249
247
|
export { F as loadDocxModelSource };
|