@silurus/ooxml 0.65.0 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -658,6 +658,22 @@ export declare interface ImageRun {
658
658
  * image. Its MIME is always `image/svg+xml` and is owned by the SVG decoder.
659
659
  */
660
660
  svgImagePath?: string;
661
+ /**
662
+ * ECMA-376 §20.1.8.55 `<a:srcRect>` — the source-rectangle crop applied to
663
+ * the decoded bitmap before it is drawn into the display box. The four values
664
+ * are inset FRACTIONS 0..1 of the source bitmap measured inward from each
665
+ * edge (`l`/`t` from left/top, `r`/`b` from right/bottom); the visible source
666
+ * region is `[l, t, 1−r, 1−b]`. The parser converts the raw ST_Percentage
667
+ * (1000ths of a percent) to fractions, so the renderer crops in bitmap pixels
668
+ * (`sx = l*w`, `sy = t*h`, `sw = (1−l−r)*w`, `sh = (1−t−b)*h`) without unit
669
+ * knowledge. Absent / null when there is no crop (the full bitmap is drawn).
670
+ */
671
+ srcRect?: {
672
+ l: number;
673
+ t: number;
674
+ r: number;
675
+ b: number;
676
+ } | null;
661
677
  widthPt: number;
662
678
  heightPt: number;
663
679
  /** true = wp:anchor (absolute positioned), false/undefined = wp:inline (flows with text) */
@@ -1087,6 +1103,13 @@ export declare interface SectionProps {
1087
1103
  footerDistance: number;
1088
1104
  titlePage: boolean;
1089
1105
  evenAndOddHeaders: boolean;
1106
+ /** ECMA-376 §17.6.22 ST_SectionMark — the body (final) section's `<w:type>`
1107
+ * start type ("continuous" | "nextPage" | "oddPage" | "evenPage"). Governs
1108
+ * how the last section begins relative to the previous one; consumed by the
1109
+ * paginator at the boundary INTO the final section. Absent ⇒ "nextPage" (the
1110
+ * spec default). Non-final sections carry their start type on their own
1111
+ * SectionBreak marker. */
1112
+ sectionStart?: string | null;
1090
1113
  /** ECMA-376 §17.6.5 w:docGrid/@w:type — "default" | "lines" | "linesAndChars" | "snapToChars". */
1091
1114
  docGridType?: string | null;
1092
1115
  /** ECMA-376 §17.6.5 w:docGrid/@w:linePitch in pt. When docGridType is "lines" or
@@ -1830,6 +1830,22 @@ declare interface ImageRun {
1830
1830
  * image. Its MIME is always `image/svg+xml` and is owned by the SVG decoder.
1831
1831
  */
1832
1832
  svgImagePath?: string;
1833
+ /**
1834
+ * ECMA-376 §20.1.8.55 `<a:srcRect>` — the source-rectangle crop applied to
1835
+ * the decoded bitmap before it is drawn into the display box. The four values
1836
+ * are inset FRACTIONS 0..1 of the source bitmap measured inward from each
1837
+ * edge (`l`/`t` from left/top, `r`/`b` from right/bottom); the visible source
1838
+ * region is `[l, t, 1−r, 1−b]`. The parser converts the raw ST_Percentage
1839
+ * (1000ths of a percent) to fractions, so the renderer crops in bitmap pixels
1840
+ * (`sx = l*w`, `sy = t*h`, `sw = (1−l−r)*w`, `sh = (1−t−b)*h`) without unit
1841
+ * knowledge. Absent / null when there is no crop (the full bitmap is drawn).
1842
+ */
1843
+ srcRect?: {
1844
+ l: number;
1845
+ t: number;
1846
+ r: number;
1847
+ b: number;
1848
+ } | null;
1833
1849
  widthPt: number;
1834
1850
  heightPt: number;
1835
1851
  /** true = wp:anchor (absolute positioned), false/undefined = wp:inline (flows with text) */
@@ -3149,6 +3165,13 @@ declare interface SectionProps {
3149
3165
  footerDistance: number;
3150
3166
  titlePage: boolean;
3151
3167
  evenAndOddHeaders: boolean;
3168
+ /** ECMA-376 §17.6.22 ST_SectionMark — the body (final) section's `<w:type>`
3169
+ * start type ("continuous" | "nextPage" | "oddPage" | "evenPage"). Governs
3170
+ * how the last section begins relative to the previous one; consumed by the
3171
+ * paginator at the boundary INTO the final section. Absent ⇒ "nextPage" (the
3172
+ * spec default). Non-final sections carry their start type on their own
3173
+ * SectionBreak marker. */
3174
+ sectionStart?: string | null;
3152
3175
  /** ECMA-376 §17.6.5 w:docGrid/@w:type — "default" | "lines" | "linesAndChars" | "snapToChars". */
3153
3176
  docGridType?: string | null;
3154
3177
  /** ECMA-376 §17.6.5 w:docGrid/@w:linePitch in pt. When docGridType is "lines" or
@@ -1,7 +1,7 @@
1
- import { $ as e, B as t, G as n, K as r, L as i, N as a, Q as o, R as s, Z as c, _ as l, at as u, b as d, ct as f, d as p, dt as m, ft as h, g, h as _, i as v, it as y, l as b, o as x, ot as S, rt as C, s as w, st as T, u as E, ut as D, v as O, y as k, z as A } from "./src-BsVzeDyL.js";
1
+ import { $ as e, B as t, G as n, K as r, L as i, N as a, Q as o, R as s, Z as c, _ as l, at as u, b as d, ct as f, d as p, dt as m, ft as h, g, h as _, i as v, it as y, l as b, o as x, ot as S, rt as C, s as w, st as T, u as E, ut as D, v as O, y as k, z as A } from "./src-LzMutzSd.js";
2
2
  import { t as ee } from "./mathjax-Q1s8_eMq.js";
3
3
  //#region packages/xlsx/src/worker.ts?worker&inline
4
- var j = "function e(e,t,n){let r=d(e,y.__wbindgen_malloc),a=v,o=f(t,y.__wbindgen_malloc,y.__wbindgen_realloc),s=v,c=y.extract_image(r,a,o,s,!u(n),u(n)?BigInt(0):n);if(c[3])throw p(c[2]);var l=i(c[0],c[1]).slice();return y.__wbindgen_free(c[0],c[1]*1,1),l}function t(e,t,n,r){let i,a;try{let l=d(e,y.__wbindgen_malloc),m=v,h=f(n,y.__wbindgen_malloc,y.__wbindgen_realloc),g=v,_=y.parse_sheet(l,m,t,h,g,!u(r),u(r)?BigInt(0):r);var o=_[0],c=_[1];if(_[3])throw o=0,c=0,p(_[2]);return i=o,a=c,s(o,c)}finally{y.__wbindgen_free(i,a,1)}}function n(e,t){let n,r;try{let o=d(e,y.__wbindgen_malloc),c=v,l=y.parse_xlsx(o,c,!u(t),u(t)?BigInt(0):t);var i=l[0],a=l[1];if(l[3])throw i=0,a=0,p(l[2]);return n=i,r=a,s(i,a)}finally{y.__wbindgen_free(n,r,1)}}function r(){return{__proto__:null,\"./xlsx_parser_bg.js\":{__proto__:null,__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(s(e,t))}finally{y.__wbindgen_free(n,r,1)}},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=f(n,y.__wbindgen_malloc,y.__wbindgen_realloc),i=v;o().setInt32(e+4,i,!0),o().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return s(e,t)},__wbindgen_init_externref_table:function(){let e=y.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function i(e,t){return e>>>=0,l().subarray(e/1,e/1+t)}let a=null;function o(){return(a===null||a.buffer.detached===!0||a.buffer.detached===void 0&&a.buffer!==y.memory.buffer)&&(a=new DataView(y.memory.buffer)),a}function s(e,t){return e>>>=0,g(e,t)}let c=null;function l(){return(c===null||c.byteLength===0)&&(c=new Uint8Array(y.memory.buffer)),c}function u(e){return e==null}function d(e,t){let n=t(e.length*1,1)>>>0;return l().set(e,n/1),v=e.length,n}function f(e,t,n){if(n===void 0){let n=_.encode(e),r=t(n.length,1)>>>0;return l().subarray(r,r+n.length).set(n),v=n.length,r}let r=e.length,i=t(r,1)>>>0,a=l(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=l().subarray(i+o,i+r),a=_.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return v=o,i}function p(e){let t=y.__wbindgen_externrefs.get(e);return y.__externref_table_dealloc(e),t}let m=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});m.decode();let h=0;function g(e,t){return h+=t,h>=2146435072&&(m=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),m.decode(),h=t),m.decode(l().subarray(e,e+t))}const _=new TextEncoder;`encodeInto`in _||(_.encodeInto=function(e,t){let n=_.encode(e);return t.set(n),{read:e.length,written:n.length}});let v=0,y;function b(e,t){return y=e.exports,a=null,c=null,y.__wbindgen_start(),y}async function x(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function S(e){if(y!==void 0)return y;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`));let t=r();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:i}=await x(await e,t);return b(n,i)}const C=e=>`https://fonts.googleapis.com/css2?family=${e}:wght@400;700&display=swap`;C(`Noto+Sans+KR`),C(`Noto+Sans+SC`),C(`Noto+Sans+TC`),C(`Noto+Sans+JP`),C(`Noto+Serif+KR`),C(`Noto+Serif+SC`),C(`Noto+Serif+TC`),C(`Noto+Serif+JP`),C(`Noto+Sans`),C(`Noto+Serif`),C(`Noto+Sans+Devanagari`),C(`Noto+Sans+Thai`),C(`Noto+Sans+Hebrew`),C(`Noto+Serif+Hebrew`);const w={167:`♣`,168:`♦`,169:`♥`,170:`♠`,171:`↔`,172:`←`,173:`↑`,174:`→`,175:`↓`,183:`•`,184:`÷`,185:`≠`,180:`×`,176:`°`,177:`±`,163:`≤`,179:`≥`},T={33:`✏`,34:`✂`,36:`👓`,74:`☺`,75:`😐`,76:`☹`,118:`❖`,167:`▪`,108:`●`,110:`■`,116:`◆`,119:`◆`,251:`✗`,252:`✓`,253:`☒`,254:`☑`,223:`←`,224:`→`,225:`↑`,226:`↓`,227:`↖`,228:`↗`,229:`↙`,230:`↘`};function E(e){let t={};for(let n of Object.keys(e)){let r=Number(n);t[r]=e[r],t[61440+r]=e[r]}return t}E(w),E(T),Math.PI*2/216e5,Math.PI*2/216e5,35*Math.PI/180,12*Math.PI/180;function D(e){if(!e.startsWith(`data:`))return null;let t=e.indexOf(`,`);if(t===-1)return null;let n=atob(e.slice(t+1)),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}const O=[40,41,41,40,60,62,62,60,91,93,93,91,123,125,125,123,171,187,187,171,3898,3899,3899,3898,3900,3901,3901,3900,5787,5788,5788,5787,8249,8250,8250,8249,8261,8262,8262,8261,8317,8318,8318,8317,8333,8334,8334,8333,8712,8715,8713,8716,8714,8717,8715,8712,8716,8713,8717,8714,8725,10741,8735,11262,8736,10659,8737,10651,8738,10656,8740,10990,8764,8765,8765,8764,8771,8909,8773,8780,8780,8773,8786,8787,8787,8786,8788,8789,8789,8788,8804,8805,8805,8804,8806,8807,8807,8806,8808,8809,8809,8808,8810,8811,8811,8810,8814,8815,8815,8814,8816,8817,8817,8816,8818,8819,8819,8818,8820,8821,8821,8820,8822,8823,8823,8822,8824,8825,8825,8824,8826,8827,8827,8826,8828,8829,8829,8828,8830,8831,8831,8830,8832,8833,8833,8832,8834,8835,8835,8834,8836,8837,8837,8836,8838,8839,8839,8838,8840,8841,8841,8840,8842,8843,8843,8842,8847,8848,8848,8847,8849,8850,8850,8849,8856,10680,8866,8867,8867,8866,8870,10974,8872,10980,8873,10979,8875,10981,8880,8881,8881,8880,8882,8883,8883,8882,8884,8885,8885,8884,8886,8887,8887,8886,8888,10204,8905,8906,8906,8905,8907,8908,8908,8907,8909,8771,8912,8913,8913,8912,8918,8919,8919,8918,8920,8921,8921,8920,8922,8923,8923,8922,8924,8925,8925,8924,8926,8927,8927,8926,8928,8929,8929,8928,8930,8931,8931,8930,8932,8933,8933,8932,8934,8935,8935,8934,8936,8937,8937,8936,8938,8939,8939,8938,8940,8941,8941,8940,8944,8945,8945,8944,8946,8954,8947,8955,8948,8956,8950,8957,8951,8958,8954,8946,8955,8947,8956,8948,8957,8950,8958,8951,8968,8969,8969,8968,8970,8971,8971,8970,9001,9002,9002,9001,10088,10089,10089,10088,10090,10091,10091,10090,10092,10093,10093,10092,10094,10095,10095,10094,10096,10097,10097,10096,10098,10099,10099,10098,10100,10101,10101,10100,10179,10180,10180,10179,10181,10182,10182,10181,10184,10185,10185,10184,10187,10189,10189,10187,10197,10198,10198,10197,10204,8888,10205,10206,10206,10205,10210,10211,10211,10210,10212,10213,10213,10212,10214,10215,10215,10214,10216,10217,10217,10216,10218,10219,10219,10218,10220,10221,10221,10220,10222,10223,10223,10222,10627,10628,10628,10627,10629,10630,10630,10629,10631,10632,10632,10631,10633,10634,10634,10633,10635,10636,10636,10635,10637,10640,10638,10639,10639,10638,10640,10637,10641,10642,10642,10641,10643,10644,10644,10643,10645,10646,10646,10645,10647,10648,10648,10647,10651,8737,10656,8738,10659,8736,10660,10661,10661,10660,10664,10665,10665,10664,10666,10667,10667,10666,10668,10669,10669,10668,10670,10671,10671,10670,10680,8856,10688,10689,10689,10688,10692,10693,10693,10692,10703,10704,10704,10703,10705,10706,10706,10705,10708,10709,10709,10708,10712,10713,10713,10712,10714,10715,10715,10714,10728,10729,10729,10728,10741,8725,10744,10745,10745,10744,10748,10749,10749,10748,10795,10796,10796,10795,10797,10798,10798,10797,10804,10805,10805,10804,10812,10813,10813,10812,10852,10853,10853,10852,10873,10874,10874,10873,10875,10876,10876,10875,10877,10878,10878,10877,10879,10880,10880,10879,10881,10882,10882,10881,10883,10884,10884,10883,10885,10886,10886,10885,10887,10888,10888,10887,10889,10890,10890,10889,10891,10892,10892,10891,10893,10894,10894,10893,10895,10896,10896,10895,10897,10898,10898,10897,10899,10900,10900,10899,10901,10902,10902,10901,10903,10904,10904,10903,10905,10906,10906,10905,10907,10908,10908,10907,10909,10910,10910,10909,10911,10912,10912,10911,10913,10914,10914,10913,10918,10919,10919,10918,10920,10921,10921,10920,10922,10923,10923,10922,10924,10925,10925,10924,10927,10928,10928,10927,10929,10930,10930,10929,10931,10932,10932,10931,10933,10934,10934,10933,10935,10936,10936,10935,10937,10938,10938,10937,10939,10940,10940,10939,10941,10942,10942,10941,10943,10944,10944,10943,10945,10946,10946,10945,10947,10948,10948,10947,10949,10950,10950,10949,10951,10952,10952,10951,10953,10954,10954,10953,10955,10956,10956,10955,10957,10958,10958,10957,10959,10960,10960,10959,10961,10962,10962,10961,10963,10964,10964,10963,10965,10966,10966,10965,10974,8870,10979,8873,10980,8872,10981,8875,10988,10989,10989,10988,10990,8740,10999,11e3,11e3,10999,11001,11002,11002,11001,11262,8735,11778,11779,11779,11778,11780,11781,11781,11780,11785,11786,11786,11785,11788,11789,11789,11788,11804,11805,11805,11804,11808,11809,11809,11808,11810,11811,11811,11810,11812,11813,11813,11812,11814,11815,11815,11814,11816,11817,11817,11816,11861,11862,11862,11861,11863,11864,11864,11863,11865,11866,11866,11865,11867,11868,11868,11867,12296,12297,12297,12296,12298,12299,12299,12298,12300,12301,12301,12300,12302,12303,12303,12302,12304,12305,12305,12304,12308,12309,12309,12308,12310,12311,12311,12310,12312,12313,12313,12312,12314,12315,12315,12314,65113,65114,65114,65113,65115,65116,65116,65115,65117,65118,65118,65117,65124,65125,65125,65124,65288,65289,65289,65288,65308,65310,65310,65308,65339,65341,65341,65339,65371,65373,65373,65371,65375,65376,65376,65375,65378,65379,65379,65378],k=[40,41,0,41,40,1,91,93,0,93,91,1,123,125,0,125,123,1,3898,3899,0,3899,3898,1,3900,3901,0,3901,3900,1,5787,5788,0,5788,5787,1,8261,8262,0,8262,8261,1,8317,8318,0,8318,8317,1,8333,8334,0,8334,8333,1,8968,8969,0,8969,8968,1,8970,8971,0,8971,8970,1,9001,9002,0,9002,9001,1,10088,10089,0,10089,10088,1,10090,10091,0,10091,10090,1,10092,10093,0,10093,10092,1,10094,10095,0,10095,10094,1,10096,10097,0,10097,10096,1,10098,10099,0,10099,10098,1,10100,10101,0,10101,10100,1,10181,10182,0,10182,10181,1,10214,10215,0,10215,10214,1,10216,10217,0,10217,10216,1,10218,10219,0,10219,10218,1,10220,10221,0,10221,10220,1,10222,10223,0,10223,10222,1,10627,10628,0,10628,10627,1,10629,10630,0,10630,10629,1,10631,10632,0,10632,10631,1,10633,10634,0,10634,10633,1,10635,10636,0,10636,10635,1,10637,10640,0,10638,10639,1,10639,10638,0,10640,10637,1,10641,10642,0,10642,10641,1,10643,10644,0,10644,10643,1,10645,10646,0,10646,10645,1,10647,10648,0,10648,10647,1,10712,10713,0,10713,10712,1,10714,10715,0,10715,10714,1,10748,10749,0,10749,10748,1,11810,11811,0,11811,11810,1,11812,11813,0,11813,11812,1,11814,11815,0,11815,11814,1,11816,11817,0,11817,11816,1,11861,11862,0,11862,11861,1,11863,11864,0,11864,11863,1,11865,11866,0,11866,11865,1,11867,11868,0,11868,11867,1,12296,12297,0,12297,12296,1,12298,12299,0,12299,12298,1,12300,12301,0,12301,12300,1,12302,12303,0,12303,12302,1,12304,12305,0,12305,12304,1,12308,12309,0,12309,12308,1,12310,12311,0,12311,12310,1,12312,12313,0,12313,12312,1,12314,12315,0,12315,12314,1,65113,65114,0,65114,65113,1,65115,65116,0,65116,65115,1,65117,65118,0,65118,65117,1,65288,65289,0,65289,65288,1,65339,65341,0,65341,65339,1,65371,65373,0,65373,65371,1,65375,65376,0,65376,65375,1,65378,65379,0,65379,65378,1];(()=>{let e=new Map;for(let t=0;t<O.length;t+=2)e.set(O[t],O[t+1]);return e})(),(()=>{let e=new Map;for(let t=0;t<k.length;t+=3)e.set(k[t],{pair:k[t+1],type:k[t+2]===0?`o`:`c`});return e})();function A(e){let t=new Set;for(let n of e)t.add(n.codePointAt(0));return t}function j(e){return{enabled:e?.kinsoku!==!1,lineStartForbidden:A(e?.noLineBreaksBefore??`”’)〕]}〉》」』】〙〗〟⦆»、。,.・:;/?!‐ー゠–〜~ぁぃぅぇぉっゃゅょゎゕゖァィゥェォッャュョヮヵヶㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ゝゞヽヾ゛゜%‰℃°′″。」、・ー゙゚!),.:;?]}⦆`),lineEndForbidden:A(e?.noLineBreaksAfter??`“‘(〔[{〈《「『【〘〖〝⦅«$¥#£¢([{⦅`)}}j();let M=null,N=null,P;self.onmessage=async r=>{let i=r.data;if(i.type===`init`){M=S(D(i.wasmUrl)??i.wasmUrl);return}let a=i.id;try{if(await M,i.type===`parse`){P=typeof i.maxZipEntryBytes==`number`&&i.maxZipEntryBytes>0?BigInt(i.maxZipEntryBytes):void 0,N=new Uint8Array(i.data);let e=n(N,P),t={type:`parsed`,id:a,workbook:JSON.parse(e)};self.postMessage(t)}else if(i.type===`parseSheet`){let e=typeof i.maxZipEntryBytes==`number`&&i.maxZipEntryBytes>0?BigInt(i.maxZipEntryBytes):void 0,n=t(new Uint8Array(i.data),i.sheetIndex,i.sheetName,e),r={type:`parsedSheet`,id:a,worksheet:JSON.parse(n)};self.postMessage(r)}else if(i.type===`extractImage`){if(!N)throw Error(`No xlsx loaded`);let t=e(N,i.path,P),n=new Uint8Array(t).slice().buffer,r={type:`imageExtracted`,id:a,bytes:n};self.postMessage(r,[n])}}catch(e){let t={type:`error`,id:a,message:String(e)};self.postMessage(t)}};", te = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", j], { type: "text/javascript;charset=utf-8" });
4
+ var j = "function e(e,t,n){let r=d(e,y.__wbindgen_malloc),a=v,o=f(t,y.__wbindgen_malloc,y.__wbindgen_realloc),s=v,c=y.extract_image(r,a,o,s,!u(n),u(n)?BigInt(0):n);if(c[3])throw p(c[2]);var l=i(c[0],c[1]).slice();return y.__wbindgen_free(c[0],c[1]*1,1),l}function t(e,t,n,r){let i,a;try{let l=d(e,y.__wbindgen_malloc),m=v,h=f(n,y.__wbindgen_malloc,y.__wbindgen_realloc),g=v,_=y.parse_sheet(l,m,t,h,g,!u(r),u(r)?BigInt(0):r);var o=_[0],c=_[1];if(_[3])throw o=0,c=0,p(_[2]);return i=o,a=c,s(o,c)}finally{y.__wbindgen_free(i,a,1)}}function n(e,t){let n,r;try{let o=d(e,y.__wbindgen_malloc),c=v,l=y.parse_xlsx(o,c,!u(t),u(t)?BigInt(0):t);var i=l[0],a=l[1];if(l[3])throw i=0,a=0,p(l[2]);return n=i,r=a,s(i,a)}finally{y.__wbindgen_free(n,r,1)}}function r(){return{__proto__:null,\"./xlsx_parser_bg.js\":{__proto__:null,__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(s(e,t))}finally{y.__wbindgen_free(n,r,1)}},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=f(n,y.__wbindgen_malloc,y.__wbindgen_realloc),i=v;o().setInt32(e+4,i,!0),o().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return s(e,t)},__wbindgen_init_externref_table:function(){let e=y.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function i(e,t){return e>>>=0,l().subarray(e/1,e/1+t)}let a=null;function o(){return(a===null||a.buffer.detached===!0||a.buffer.detached===void 0&&a.buffer!==y.memory.buffer)&&(a=new DataView(y.memory.buffer)),a}function s(e,t){return e>>>=0,g(e,t)}let c=null;function l(){return(c===null||c.byteLength===0)&&(c=new Uint8Array(y.memory.buffer)),c}function u(e){return e==null}function d(e,t){let n=t(e.length*1,1)>>>0;return l().set(e,n/1),v=e.length,n}function f(e,t,n){if(n===void 0){let n=_.encode(e),r=t(n.length,1)>>>0;return l().subarray(r,r+n.length).set(n),v=n.length,r}let r=e.length,i=t(r,1)>>>0,a=l(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=l().subarray(i+o,i+r),a=_.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return v=o,i}function p(e){let t=y.__wbindgen_externrefs.get(e);return y.__externref_table_dealloc(e),t}let m=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});m.decode();let h=0;function g(e,t){return h+=t,h>=2146435072&&(m=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),m.decode(),h=t),m.decode(l().subarray(e,e+t))}const _=new TextEncoder;`encodeInto`in _||(_.encodeInto=function(e,t){let n=_.encode(e);return t.set(n),{read:e.length,written:n.length}});let v=0,y;function b(e,t){return y=e.exports,a=null,c=null,y.__wbindgen_start(),y}async function x(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.ok&&n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function S(e){if(y!==void 0)return y;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`));let t=r();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:i}=await x(await e,t);return b(n,i)}const C=e=>`https://fonts.googleapis.com/css2?family=${e}:wght@400;700&display=swap`;C(`Noto+Sans+KR`),C(`Noto+Sans+SC`),C(`Noto+Sans+TC`),C(`Noto+Sans+JP`),C(`Noto+Serif+KR`),C(`Noto+Serif+SC`),C(`Noto+Serif+TC`),C(`Noto+Serif+JP`),C(`Noto+Sans`),C(`Noto+Serif`),C(`Noto+Sans+Devanagari`),C(`Noto+Sans+Thai`),C(`Noto+Sans+Hebrew`),C(`Noto+Serif+Hebrew`);const w={167:`♣`,168:`♦`,169:`♥`,170:`♠`,171:`↔`,172:`←`,173:`↑`,174:`→`,175:`↓`,183:`•`,184:`÷`,185:`≠`,180:`×`,176:`°`,177:`±`,163:`≤`,179:`≥`},T={33:`✏`,34:`✂`,36:`👓`,74:`☺`,75:`😐`,76:`☹`,118:`❖`,167:`▪`,108:`●`,110:`■`,116:`◆`,119:`◆`,251:`✗`,252:`✓`,253:`☒`,254:`☑`,223:`←`,224:`→`,225:`↑`,226:`↓`,227:`↖`,228:`↗`,229:`↙`,230:`↘`};function E(e){let t={};for(let n of Object.keys(e)){let r=Number(n);t[r]=e[r],t[61440+r]=e[r]}return t}E(w),E(T);const D={WHITE_BRUSH:2147483648,LTGRAY_BRUSH:2147483649,GRAY_BRUSH:2147483650,DKGRAY_BRUSH:2147483651,BLACK_BRUSH:2147483652,NULL_BRUSH:2147483653,WHITE_PEN:2147483654,BLACK_PEN:2147483655,NULL_PEN:2147483656,DC_BRUSH:2147483666,DC_PEN:2147483662};D.WHITE_BRUSH,D.LTGRAY_BRUSH,D.GRAY_BRUSH,D.DKGRAY_BRUSH,D.BLACK_BRUSH,D.NULL_BRUSH,D.WHITE_PEN,D.BLACK_PEN,D.NULL_PEN,D.DC_PEN,Math.PI*2/216e5,Math.PI*2/216e5,35*Math.PI/180,12*Math.PI/180;function O(e){if(!e.startsWith(`data:`))return null;let t=e.indexOf(`,`);if(t===-1)return null;let n=atob(e.slice(t+1)),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}const k=[40,41,41,40,60,62,62,60,91,93,93,91,123,125,125,123,171,187,187,171,3898,3899,3899,3898,3900,3901,3901,3900,5787,5788,5788,5787,8249,8250,8250,8249,8261,8262,8262,8261,8317,8318,8318,8317,8333,8334,8334,8333,8712,8715,8713,8716,8714,8717,8715,8712,8716,8713,8717,8714,8725,10741,8735,11262,8736,10659,8737,10651,8738,10656,8740,10990,8764,8765,8765,8764,8771,8909,8773,8780,8780,8773,8786,8787,8787,8786,8788,8789,8789,8788,8804,8805,8805,8804,8806,8807,8807,8806,8808,8809,8809,8808,8810,8811,8811,8810,8814,8815,8815,8814,8816,8817,8817,8816,8818,8819,8819,8818,8820,8821,8821,8820,8822,8823,8823,8822,8824,8825,8825,8824,8826,8827,8827,8826,8828,8829,8829,8828,8830,8831,8831,8830,8832,8833,8833,8832,8834,8835,8835,8834,8836,8837,8837,8836,8838,8839,8839,8838,8840,8841,8841,8840,8842,8843,8843,8842,8847,8848,8848,8847,8849,8850,8850,8849,8856,10680,8866,8867,8867,8866,8870,10974,8872,10980,8873,10979,8875,10981,8880,8881,8881,8880,8882,8883,8883,8882,8884,8885,8885,8884,8886,8887,8887,8886,8888,10204,8905,8906,8906,8905,8907,8908,8908,8907,8909,8771,8912,8913,8913,8912,8918,8919,8919,8918,8920,8921,8921,8920,8922,8923,8923,8922,8924,8925,8925,8924,8926,8927,8927,8926,8928,8929,8929,8928,8930,8931,8931,8930,8932,8933,8933,8932,8934,8935,8935,8934,8936,8937,8937,8936,8938,8939,8939,8938,8940,8941,8941,8940,8944,8945,8945,8944,8946,8954,8947,8955,8948,8956,8950,8957,8951,8958,8954,8946,8955,8947,8956,8948,8957,8950,8958,8951,8968,8969,8969,8968,8970,8971,8971,8970,9001,9002,9002,9001,10088,10089,10089,10088,10090,10091,10091,10090,10092,10093,10093,10092,10094,10095,10095,10094,10096,10097,10097,10096,10098,10099,10099,10098,10100,10101,10101,10100,10179,10180,10180,10179,10181,10182,10182,10181,10184,10185,10185,10184,10187,10189,10189,10187,10197,10198,10198,10197,10204,8888,10205,10206,10206,10205,10210,10211,10211,10210,10212,10213,10213,10212,10214,10215,10215,10214,10216,10217,10217,10216,10218,10219,10219,10218,10220,10221,10221,10220,10222,10223,10223,10222,10627,10628,10628,10627,10629,10630,10630,10629,10631,10632,10632,10631,10633,10634,10634,10633,10635,10636,10636,10635,10637,10640,10638,10639,10639,10638,10640,10637,10641,10642,10642,10641,10643,10644,10644,10643,10645,10646,10646,10645,10647,10648,10648,10647,10651,8737,10656,8738,10659,8736,10660,10661,10661,10660,10664,10665,10665,10664,10666,10667,10667,10666,10668,10669,10669,10668,10670,10671,10671,10670,10680,8856,10688,10689,10689,10688,10692,10693,10693,10692,10703,10704,10704,10703,10705,10706,10706,10705,10708,10709,10709,10708,10712,10713,10713,10712,10714,10715,10715,10714,10728,10729,10729,10728,10741,8725,10744,10745,10745,10744,10748,10749,10749,10748,10795,10796,10796,10795,10797,10798,10798,10797,10804,10805,10805,10804,10812,10813,10813,10812,10852,10853,10853,10852,10873,10874,10874,10873,10875,10876,10876,10875,10877,10878,10878,10877,10879,10880,10880,10879,10881,10882,10882,10881,10883,10884,10884,10883,10885,10886,10886,10885,10887,10888,10888,10887,10889,10890,10890,10889,10891,10892,10892,10891,10893,10894,10894,10893,10895,10896,10896,10895,10897,10898,10898,10897,10899,10900,10900,10899,10901,10902,10902,10901,10903,10904,10904,10903,10905,10906,10906,10905,10907,10908,10908,10907,10909,10910,10910,10909,10911,10912,10912,10911,10913,10914,10914,10913,10918,10919,10919,10918,10920,10921,10921,10920,10922,10923,10923,10922,10924,10925,10925,10924,10927,10928,10928,10927,10929,10930,10930,10929,10931,10932,10932,10931,10933,10934,10934,10933,10935,10936,10936,10935,10937,10938,10938,10937,10939,10940,10940,10939,10941,10942,10942,10941,10943,10944,10944,10943,10945,10946,10946,10945,10947,10948,10948,10947,10949,10950,10950,10949,10951,10952,10952,10951,10953,10954,10954,10953,10955,10956,10956,10955,10957,10958,10958,10957,10959,10960,10960,10959,10961,10962,10962,10961,10963,10964,10964,10963,10965,10966,10966,10965,10974,8870,10979,8873,10980,8872,10981,8875,10988,10989,10989,10988,10990,8740,10999,11e3,11e3,10999,11001,11002,11002,11001,11262,8735,11778,11779,11779,11778,11780,11781,11781,11780,11785,11786,11786,11785,11788,11789,11789,11788,11804,11805,11805,11804,11808,11809,11809,11808,11810,11811,11811,11810,11812,11813,11813,11812,11814,11815,11815,11814,11816,11817,11817,11816,11861,11862,11862,11861,11863,11864,11864,11863,11865,11866,11866,11865,11867,11868,11868,11867,12296,12297,12297,12296,12298,12299,12299,12298,12300,12301,12301,12300,12302,12303,12303,12302,12304,12305,12305,12304,12308,12309,12309,12308,12310,12311,12311,12310,12312,12313,12313,12312,12314,12315,12315,12314,65113,65114,65114,65113,65115,65116,65116,65115,65117,65118,65118,65117,65124,65125,65125,65124,65288,65289,65289,65288,65308,65310,65310,65308,65339,65341,65341,65339,65371,65373,65373,65371,65375,65376,65376,65375,65378,65379,65379,65378],A=[40,41,0,41,40,1,91,93,0,93,91,1,123,125,0,125,123,1,3898,3899,0,3899,3898,1,3900,3901,0,3901,3900,1,5787,5788,0,5788,5787,1,8261,8262,0,8262,8261,1,8317,8318,0,8318,8317,1,8333,8334,0,8334,8333,1,8968,8969,0,8969,8968,1,8970,8971,0,8971,8970,1,9001,9002,0,9002,9001,1,10088,10089,0,10089,10088,1,10090,10091,0,10091,10090,1,10092,10093,0,10093,10092,1,10094,10095,0,10095,10094,1,10096,10097,0,10097,10096,1,10098,10099,0,10099,10098,1,10100,10101,0,10101,10100,1,10181,10182,0,10182,10181,1,10214,10215,0,10215,10214,1,10216,10217,0,10217,10216,1,10218,10219,0,10219,10218,1,10220,10221,0,10221,10220,1,10222,10223,0,10223,10222,1,10627,10628,0,10628,10627,1,10629,10630,0,10630,10629,1,10631,10632,0,10632,10631,1,10633,10634,0,10634,10633,1,10635,10636,0,10636,10635,1,10637,10640,0,10638,10639,1,10639,10638,0,10640,10637,1,10641,10642,0,10642,10641,1,10643,10644,0,10644,10643,1,10645,10646,0,10646,10645,1,10647,10648,0,10648,10647,1,10712,10713,0,10713,10712,1,10714,10715,0,10715,10714,1,10748,10749,0,10749,10748,1,11810,11811,0,11811,11810,1,11812,11813,0,11813,11812,1,11814,11815,0,11815,11814,1,11816,11817,0,11817,11816,1,11861,11862,0,11862,11861,1,11863,11864,0,11864,11863,1,11865,11866,0,11866,11865,1,11867,11868,0,11868,11867,1,12296,12297,0,12297,12296,1,12298,12299,0,12299,12298,1,12300,12301,0,12301,12300,1,12302,12303,0,12303,12302,1,12304,12305,0,12305,12304,1,12308,12309,0,12309,12308,1,12310,12311,0,12311,12310,1,12312,12313,0,12313,12312,1,12314,12315,0,12315,12314,1,65113,65114,0,65114,65113,1,65115,65116,0,65116,65115,1,65117,65118,0,65118,65117,1,65288,65289,0,65289,65288,1,65339,65341,0,65341,65339,1,65371,65373,0,65373,65371,1,65375,65376,0,65376,65375,1,65378,65379,0,65379,65378,1];(()=>{let e=new Map;for(let t=0;t<k.length;t+=2)e.set(k[t],k[t+1]);return e})(),(()=>{let e=new Map;for(let t=0;t<A.length;t+=3)e.set(A[t],{pair:A[t+1],type:A[t+2]===0?`o`:`c`});return e})();function j(e){let t=new Set;for(let n of e)t.add(n.codePointAt(0));return t}function M(e){return{enabled:e?.kinsoku!==!1,lineStartForbidden:j(e?.noLineBreaksBefore??`”’)〕]}〉》」』】〙〗〟⦆»、。,.・:;/?!‐ー゠–〜~ぁぃぅぇぉっゃゅょゎゕゖァィゥェォッャュョヮヵヶㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ゝゞヽヾ゛゜%‰℃°′″。」、・ー゙゚!),.:;?]}⦆`),lineEndForbidden:j(e?.noLineBreaksAfter??`“‘(〔[{〈《「『【〘〖〝⦅«$¥#£¢([{⦅`)}}M();let N=null,P=null,F;self.onmessage=async r=>{let i=r.data;if(i.type===`init`){N=S(O(i.wasmUrl)??i.wasmUrl);return}let a=i.id;try{if(await N,i.type===`parse`){F=typeof i.maxZipEntryBytes==`number`&&i.maxZipEntryBytes>0?BigInt(i.maxZipEntryBytes):void 0,P=new Uint8Array(i.data);let e=n(P,F),t={type:`parsed`,id:a,workbook:JSON.parse(e)};self.postMessage(t)}else if(i.type===`parseSheet`){let e=typeof i.maxZipEntryBytes==`number`&&i.maxZipEntryBytes>0?BigInt(i.maxZipEntryBytes):void 0,n=t(new Uint8Array(i.data),i.sheetIndex,i.sheetName,e),r={type:`parsedSheet`,id:a,worksheet:JSON.parse(n)};self.postMessage(r)}else if(i.type===`extractImage`){if(!P)throw Error(`No xlsx loaded`);let t=e(P,i.path,F),n=new Uint8Array(t).slice().buffer,r={type:`imageExtracted`,id:a,bytes:n};self.postMessage(r,[n])}}catch(e){let t={type:`error`,id:a,message:String(e)};self.postMessage(t)}};", te = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", j], { type: "text/javascript;charset=utf-8" });
5
5
  function M(e) {
6
6
  let t;
7
7
  try {
@@ -3026,7 +3026,7 @@ var rr = class e {
3026
3026
  static async load(t, n = {}) {
3027
3027
  let r = n.mode ?? "main";
3028
3028
  if (r === "worker" && (typeof Worker > "u" || typeof OffscreenCanvas > "u")) throw Error("mode: 'worker' requires Worker and OffscreenCanvas support");
3029
- let i = new e(r === "worker" ? (await import("./render-worker-host-DpvAEegl.js")).createRenderWorker() : new M(), r);
3029
+ let i = new e(r === "worker" ? (await import("./render-worker-host-4IbvpiUo.js")).createRenderWorker() : new M(), r);
3030
3030
  return await i._load(t, n), i;
3031
3031
  }
3032
3032
  async _load(e, t = {}) {
package/dist/xlsx.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { G as e } from "./src-BsVzeDyL.js";
2
- import { n as t, r as n } from "./xlsx-ClPv4Yee.js";
1
+ import { G as e } from "./src-LzMutzSd.js";
2
+ import { n as t, r as n } from "./xlsx-CO8NBW79.js";
3
3
  export { t as XlsxViewer, n as XlsxWorkbook, e as autoResize };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silurus/ooxml",
3
- "version": "0.65.0",
3
+ "version": "0.66.0",
4
4
  "description": "Browser-based OOXML viewer (docx/xlsx/pptx) — Rust/WASM parser + Canvas renderer",
5
5
  "license": "MIT",
6
6
  "author": "Yuki Yokotani <silurus.dev@gmail.com>",