@silurus/ooxml 0.85.3 → 0.86.1

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.
Files changed (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-D21h5TGR.js +10 -0
  3. package/dist/assets/render-worker-Dsfekaht.js +11 -0
  4. package/dist/assets/render-worker-DxU7IrKo.js +31 -0
  5. package/dist/bounded-raw-part-cache-BfbSxRIL.js +119 -0
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-DN5SqWGS.js} +329 -192
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-lXwVOgjW.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-uopDjRde.js} +4477 -4431
  13. package/dist/{docx-BYvm3TWw.js → docx-wPzeF76A.js} +519 -334
  14. package/dist/docx.mjs +7 -7
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-CswB9Tzi.js} +60 -57
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-BR1NCO7S.js} +954 -935
  18. package/dist/index.mjs +4 -4
  19. package/dist/{line-distribute-BsV4MVZ2.js → line-distribute-IsUGfHXm.js} +10 -10
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +266 -266
  22. package/dist/{pptx-BqpVTP8p.js → pptx-BxJ_RBSY.js} +173 -165
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-DeZpRCfx.js → render-DEiun_AH.js} +1 -1
  26. package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-BEfLZvSL.js} +1 -1
  27. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-Ba6Fchqr.js} +1 -1
  28. package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-C3xwtHnv.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-CclArDRs.js} +10 -10
  30. package/dist/{session-n2p5_jxV.js → session-BuJL_xcp.js} +87 -87
  31. package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-Ck8wfRT_.js} +1239 -1165
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -11
  34. package/dist/types/index.d.ts +38 -19
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-CAvuf22q.js} +72 -69
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-Bblm5r1h.js} +1752 -1592
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-D1O73gYW.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-V2wWYA4O.js +0 -11
  50. package/dist/bounded-raw-part-cache-C6ro6Ezf.js +0 -254
  51. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-CqejEuts.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
@@ -1,8 +1,8 @@
1
- import { t as e } from "./highlight-rect-DBcYVJDv.js";
2
- import { o as t } from "./source-key-BkBB3X82.js";
3
- import { n } from "./comments-Brfxa3hQ.js";
4
- import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-Cqu-Ir0C.js";
5
- import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-Mv_SAiHy.js";
1
+ import { t as e } from "./highlight-rect-FuUSmL3a.js";
2
+ import { o as t } from "./source-key-Ktb1GRE5.js";
3
+ import { n } from "./comments-CAn2A_Xh.js";
4
+ import { i as r, n as i, o as a, r as o, s, t as c } from "./read-only-comment-margin-plStyGfE.js";
5
+ import { i as l, n as u, r as d, t as f } from "./read-only-comment-decoration-BTnWEeo5.js";
6
6
  //#region packages/docx/src/comment-margin.ts
7
7
  function p(e, r) {
8
8
  let i = /* @__PURE__ */ new Set();
@@ -0,0 +1,2 @@
1
+ import { a as e } from "./read-only-comment-margin-plStyGfE.js";
2
+ export { e as paintReadOnlyCommentCard };
@@ -1,8 +1,8 @@
1
1
  import { i as e } from "./units-EJdC96r6.js";
2
- import { t } from "./highlight-rect-DBcYVJDv.js";
3
- import { t as n } from "./comment-occurrence-tj54AXXB.js";
4
- import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-Cqu-Ir0C.js";
5
- import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-Mv_SAiHy.js";
2
+ import { t } from "./highlight-rect-FuUSmL3a.js";
3
+ import { t as n } from "./comment-occurrence-CqejEuts.js";
4
+ import { i as r, n as i, o as a, r as o, t as s } from "./read-only-comment-margin-plStyGfE.js";
5
+ import { i as c, n as l, r as u, t as d } from "./read-only-comment-decoration-BTnWEeo5.js";
6
6
  //#region packages/pptx/src/comment-margin.ts
7
7
  function f(e, t, n) {
8
8
  return {
@@ -1,4 +1,4 @@
1
- import { o as e } from "./source-key-BkBB3X82.js";
1
+ import { o as e } from "./source-key-Ktb1GRE5.js";
2
2
  //#region packages/docx/src/review-id.ts
3
3
  function t(e) {
4
4
  if (e === void 0) return;
@@ -0,0 +1,27 @@
1
+ //#region packages/xlsx/src/delimited-text-worker.ts?worker&inline
2
+ var e = "var e=(e,t)=>()=>(e&&(t=e(e=0)),t),t=class e extends Error{code;constructor(t,n){super(n),this.name=`OoxmlError`,this.code=t,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 r(e){return e===`image-dimension`||e===`image-pixels`||e===`active-decoded-bytes`}function i(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function a(e){if(!(!e||typeof e!=`object`))try{let t=e,n=t.code,a=t.metric,o=t.limit,s=t.observed;return n!==`ooxml-decoded-image-limit`||!r(a)||!i(o)||!i(s)||s<=o?void 0:{metric:a,limit:o,observed:s}}catch{return}}var o,s,c,l=e((()=>{o=1<<25,s=1<<27,o*4,s*4,c=class e extends RangeError{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 u(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 d=e((()=>{}));function f(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}function p(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return f(t.requiredBytes)&&f(t.offeredBytes)&&t.requiredBytes>t.offeredBytes}var m=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 h(e){if(e instanceof m)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`||!p(r)))return new m(r)}l(),d();const g=`OOXML_RESOURCE_LIMIT:`;function _(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function v(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return _(t.archiveEntryCount)&&_(t.declaredInflatedBytes)&&(t.largestInflatedEntryBytes===void 0||_(t.largestInflatedEntryBytes))&&_(t.distinctInflatedBytes)&&_(t.operationInflatedBytes)}function y(e){return e===`docx`||e===`xlsx`||e===`pptx`}function b(e){return e===`container`||e===`decompression`||e===`parsing`||e===`serialization`||e===`layout`||e===`rendering`||e===`worker`}function x(e,t){return typeof e==`string`&&e.length>0&&e.length<=t&&!/[\\u0000-\\u001f\\u007f]/u.test(e)}function S(e){return x(e,128)&&/^[a-z0-9][a-z0-9-]*$/u.test(e)}function C(e){return!x(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 w=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}],[`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}]]),T=new Set([...w.keys()].map(e=>e.slice(0,e.indexOf(`:`)))),E=new Set([...w.keys()].map(e=>e.slice(e.indexOf(`:`)+1)));function D(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!y(t.format)||!x(t.operation,256)||!S(t.resource)||!S(t.metric)||!_(t.limit)||!_(t.observed)||typeof t.configurable!=`boolean`||!v(t.usage)?!1:!(`part`in t)||C(t.part)}function O(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(!b(t.stage)||!D(t.violation))return!1;let n=t.violation,r=w.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:!(T.has(n.resource)&&E.has(n.metric))}function k(e){return{archiveEntryCount:e.archiveEntryCount,declaredInflatedBytes:e.declaredInflatedBytes,...e.largestInflatedEntryBytes===void 0?{}:{largestInflatedEntryBytes:e.largestInflatedEntryBytes},distinctInflatedBytes:e.distinctInflatedBytes,operationInflatedBytes:e.operationInflatedBytes}}function A(e){if(!O(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:k(t.usage)}};return O(n)?n:void 0}function j(e){let t=e.violation;return`OOXML resource limit exceeded${t.part?` for ${t.part}`:``}: ${t.metric} ${t.observed} > ${t.limit}`}function M(e){let t=e instanceof Error?e.message:String(e);if(!t.startsWith(g))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`||!O(i.details)))return new n(j(i.details),i.details)}function N(e){let r=a(e);if(r){let e=new c(r.metric,r.limit,r.observed);return{message:e.message,errorName:e.name,code:e.code,decodedImage:r}}let i=u(e);if(i)return{message:i.message,errorName:`TiffDecodeError`,code:`ooxml-tiff-decode`};let o=h(e);if(o)return{message:o.message,errorName:o.name,code:o.code,insufficientCredit:{requiredBytes:o.requiredBytes,offeredBytes:o.offeredBytes}};let s=e instanceof t||e instanceof n?e:M(e);if(s instanceof n){let e=A(s.details);return e?{message:typeof s.message==`string`?s.message:j(e),errorName:`OoxmlResourceLimitError`,code:`ooxml-resource-limit`,resourceLimit:e}:{message:`Invalid OOXML resource-limit error payload`,errorName:`Error`}}if(s instanceof t)return{message:typeof s.message==`string`?s.message:String(s.message),errorName:x(s.name,128)?s.name:`OoxmlError`,...S(s.code)?{code:s.code}:{}};let l=e instanceof Error?e.message:String(e);if(typeof l==`string`&&l.startsWith(g))return{message:`Invalid OOXML resource-limit payload`,errorName:`Error`};let d=e instanceof Error?e:Error(l),f=d;return{message:typeof d.message==`string`?d.message:String(d.message),errorName:x(d.name,128)?d.name:`Error`,...typeof f.code==`string`?{code:f.code}:{}}}function P(e){try{return N(e)}catch{return{message:`Worker operation failed with an unreadable error`,errorName:`Error`}}}function F(e,t){if(!Number.isSafeInteger(e)||e<0)throw Error(`${t} must be a non-negative safe integer`)}function I(e,t,n){return F(e,`resource measurement`),F(t,`resource measurement`),F(n,`resource measurement limit`),e>n||t>n||t>n-e?n===2**53-1?n:n+1:e+t}function L(e,t=2**53-1){F(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=I(n,a,t),n>t)return n}return n}function R(e,t=2**53-1){F(t,`resource measurement limit`);let n=I(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=I(n,a,t),n>t)return n}return n}function z(e,t){return I(0,e,t)}function B(e,t=2**53-1,n=!1){if(F(t,`resource measurement limit`),e===null)return{jsonBytes:z(4,t),stringValueUtf8Bytes:0};if(typeof e==`string`)return{jsonBytes:R(e,t),stringValueUtf8Bytes:L(e,t)};if(typeof e==`boolean`)return{jsonBytes:z(e?4:5,t),stringValueUtf8Bytes:0};if(typeof e==`number`)return{jsonBytes:z((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=z(2,t),r=0;for(let i=0;i<e.length;i+=1){i!==0&&(n=I(n,1,t));let a=B(e[i],t,!0);n=I(n,a.jsonBytes,t),r=I(r,a.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}if(typeof e==`object`){let n=z(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=I(n,1,t)),n=I(n,R(a,t),t),n=I(n,1,t);let e=B(o,t);n=I(n,e.jsonBytes,t),r=I(r,e.stringValueUtf8Bytes,t)}return{jsonBytes:n,stringValueUtf8Bytes:r}}return{jsonBytes:n?z(4,t):0,stringValueUtf8Bytes:0}}const V=1e5,H=25e4,U=33554432,W=67108864,G=Object.freeze({archiveEntryCount:0,declaredInflatedBytes:0,distinctInflatedBytes:0,operationInflatedBytes:0});function K(e){let t=e.reduce((e,t)=>I(e,t.cells.length,H),0);return{rows:e.length,cells:t,ownedUtf8Bytes:e.reduce((e,t)=>t.cells.reduce((e,t)=>{let n=B(t.value,U).stringValueUtf8Bytes;return I(e,I(n,t.formula===void 0?0:L(t.formula,U),U),U)},e),0)}}function q(e){return J(e,K(e.rows))}function J(e,t){let n=B(e,67108864);return{...t,jsonBytes:n.jsonBytes}}function Y(e,t,r,i,a,o,s){let c=r===`worksheet-json`?`serialization`:`parsing`;return new n(`OOXML resource limit exceeded${t?` for ${t}`:``}: ${i} ${o} > ${a}`,{stage:c,violation:{format:`xlsx`,operation:e,resource:r,metric:i,...t===void 0?{}:{part:t},limit:a,observed:Math.min(o,a+1),configurable:!1,usage:s??G}})}function X(e,t,n,r){let i=[[`rows`,e.rows,V],[`cells`,e.cells,H],[`owned-utf8-bytes`,e.ownedUtf8Bytes,U]];for(let[e,a,o]of i)if(a>o)throw Y(t,n,e===`owned-utf8-bytes`?`worksheet-cell-content`:`worksheet-model`,e,o,a,r)}function Z(e,t,n,r){if(e>W)throw Y(t,n,`worksheet-json`,`bytes`,W,e,r)}const Q=`load-delimited-text`,$=W;function ee(e){if(e>$)throw Y(Q,void 0,`delimited-text-source`,`bytes`,$,e)}const te=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 ne(e,t){ee(e.byteLength);let n;try{n=new TextDecoder(t.encoding,{fatal:!0}).decode(e)}catch(e){throw TypeError(`Delimited text could not be decoded as ${t.encoding}`,{cause:e})}let r=[],i=[],a=``,o,s=1,c=1,l=0,u=0,d=!1,f=!1,p=e=>{a+=e,a.length>=4096&&((o??=[]).push(a),a=``)},m=()=>{if(l++,l>H)throw Y(Q,void 0,`worksheet-model`,`cells`,H,l);if(c>16384)throw RangeError(`Delimited text row ${s} has more than 16384 columns`);let e=o?o.join(``)+a:a;if(e!==``){if(u+=L(e,U+1),u>U)throw Y(Q,void 0,`worksheet-cell-content`,`owned-utf8-bytes`,U,u);i.push({row:s,col:c,value:{type:`text`,text:e}})}a=``,o=void 0,c++,f=!1},h=()=>{if(s>V)throw Y(Q,void 0,`worksheet-model`,`rows`,V,s);r.push({index:s,height:null,cells:i}),i=[],s++,c=1};for(let e=0;e<n.length;e++){let r=n[e];if(d){if(r!==`\"`){r===`\\r`?(p(`\n`),n[e+1]===`\n`&&e++):p(r);continue}n[e+1]===`\"`?(p(`\"`),e++):(d=!1,f=!0);continue}if(f){if(r!==t.delimiter&&r!==`\\r`&&r!==`\n`)throw SyntaxError(`Unexpected character after closing quote at row ${s}, column ${c}`)}else if(r===`\"`&&a===``&&o===void 0){d=!0;continue}if(r===t.delimiter){m();continue}if(r===`\\r`||r===`\n`){m(),h(),r===`\\r`&&n[e+1]===`\n`&&e++;continue}p(r)}if(d)throw SyntaxError(`Unterminated quoted field at row ${s}, column ${c}`);let g=n.endsWith(`\n`)||n.endsWith(`\\r`);n.length>0&&!g&&(m(),h());let _={name:t.sheetName,rows:r,colWidths:{},rowHeights:{},defaultColWidth:8.43,defaultRowHeight:15,mergeCells:[],freezeRows:0,freezeCols:0,conditionalFormats:[],images:[],charts:[],defaultFontFamily:`Calibri`,defaultFontSize:11},v=q(_);return X(v,Q,void 0),Z(v.jsonBytes,Q,void 0),{workbook:{workbook:{sheets:[{name:t.sheetName,sheetId:1,rId:`rId1`}]},styles:te,sharedStrings:[]},worksheet:_}}self.onmessage=e=>{let t=e.data;try{let{workbook:e,worksheet:n}=ne(t.data,t.options),r=new TextEncoder().encode(JSON.stringify(n)).buffer,i={type:`delimitedTextParsed`,id:t.id,workbook:e,worksheetJson:r};self.postMessage(i,[r])}catch(e){let n={type:`error`,id:t.id,...P(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
+ function n(n) {
4
+ let r;
5
+ try {
6
+ if (r = t && (self.URL || self.webkitURL).createObjectURL(t), !r) throw "";
7
+ let e = new Worker(r, {
8
+ type: "module",
9
+ name: n?.name
10
+ });
11
+ return e.addEventListener("error", () => {
12
+ (self.URL || self.webkitURL).revokeObjectURL(r);
13
+ }), e;
14
+ } catch {
15
+ return new Worker("data:text/javascript;charset=utf-8," + encodeURIComponent(e), {
16
+ type: "module",
17
+ name: n?.name
18
+ });
19
+ }
20
+ }
21
+ //#endregion
22
+ //#region packages/xlsx/src/delimited-text-worker-host.ts
23
+ function r() {
24
+ return new n();
25
+ }
26
+ //#endregion
27
+ export { r as createDelimitedTextWorker };