@silurus/ooxml-legacy-office 0.89.12 → 0.90.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.
- package/dist/doc.mjs +1 -1
- package/dist/legacy-doc-source-module.mjs +1 -1
- package/dist/legacy-ppt-source-module.mjs +1 -1
- package/dist/{legacy-source-BGu8XZdz.js → legacy-source-DmlTJjiH.js} +59 -54
- package/dist/legacy-xls-source-module.mjs +1 -1
- package/dist/legacy_doc_direct_bg.wasm +0 -0
- package/dist/legacy_ppt_direct_bg.wasm +0 -0
- package/dist/legacy_xls_direct_bg.wasm +0 -0
- package/dist/ppt.mjs +1 -1
- package/dist/xls.mjs +1 -1
- package/package.json +4 -4
package/dist/doc.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./legacy-source-
|
|
1
|
+
import { n as e, r as t, t as n } from "./legacy-source-DmlTJjiH.js";
|
|
2
2
|
//#region src/wasm-direct-doc/legacy_doc_direct_bg.wasm?url
|
|
3
3
|
var r = new URL("legacy_doc_direct_bg.wasm", import.meta.url).href, i = new URL("legacy-doc-source-module.mjs", import.meta.url).href;
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function r(e,t){return typeof e==`string`?e.startsWith(`LEGACY_UNSUPPORTED_ENCRYPTION:`)?Error(`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`):e.startsWith(`UNSUPPORTED:`)?Error(`MODEL_SOURCE_UNSUPPORTED:${JSON.stringify({format:t,reason:`source-subset`})}`):Error(e):e}var i=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function a(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function o(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}const s=new WeakMap,c=new Set([`http:`,`https:`,`file:`,`blob:`,`data:`]);function l(e,t){if(typeof e!=`string`||e.length===0||e.trim()!==e)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);let n;try{n=new URL(e)}catch{throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`)}if(!c.has(n.protocol))throw TypeError(`${t} wasmUrl protocol is unsupported`);return e}function u(e){let t,n,c,u,d=()=>c??u?.failure,g=t=>{if(!a(t))throw h(t);let n=d()??new i(`${e.label} WASM runtime trapped and is unavailable`);if(u){u.failure??=n;for(let e of u.live)e.invalidate();u.live.clear()}else c=n;throw n},_=t=>{let n=d();if(n)throw n;try{return t()}catch(t){return g(e.format?r(t,e.format):t)}},v=r=>t?r===n?t:Promise.reject(Error(`${e.label} source engine is pinned to another WASM URL`)):(n=r,t=e.loadGlue().then(async t=>{if(u=s.get(t),u||(u={live:new Set},s.set(t,u)),u.failure)throw u.failure;try{let n=await e.resolveWasm(r);await t.default({module_or_path:n})}catch(e){return g(e)}return t}),t);return Object.freeze({async open(t,n,r){let i=d();if(i)throw i;let a=l(n,e.label);m(r,e.label);let c;try{c=await p(v(a),r,e.label)}catch(e){return g(e)}if(u=s.get(c),!u)throw Error(`${e.label} source runtime identity is unavailable`);if(u.failure)throw u.failure;m(r,e.label);let h;try{h=_(()=>e.construct(c,t)),m(r,e.label)}catch(t){if(h)try{f(h,e.closeNative,_)}catch{}throw t}let y=!1,b=h,x={invalidate(){let e=b;b=void 0,o(e)}};return u.live.add(x),{archive:new Proxy(h,{get(t,n){let r=b;if(!r)throw d()??Error(`${e.label} source archive is closed`);let i=_(()=>Reflect.get(r,n,r));return typeof i==`function`?(...t)=>{let r=b;if(!r)throw d()??Error(`${e.label} source archive is closed`);return _(()=>{let e=Reflect.get(r,n,r);return Reflect.apply(e,r,t)})}:i}}),sourceByteLength:t.byteLength,closeArchive(){if(y)return;y=!0,u?.live.delete(x);let t=b;b=void 0,t&&f(t,e.closeNative,_)}}}})}async function d(e){let t=new URL(e),n=globalThis.process;if(t.protocol===`file:`&&n?.versions?.node){let{readFile:e}=await import(`node:fs/promises`);return e(t)}return t}function f(e,t,n){let r,s=!1;try{n(()=>t(e))}catch(e){s=!0,r=e}if(a(r)||r instanceof i)o(e);else try{n(()=>e.free())}catch(t){s||(s=!0,r=t),(a(t)||t instanceof i)&&o(e)}if(s)throw r}function p(e,t,n){return t?(m(t,n),new Promise((r,i)=>{let a=()=>{o();try{m(t,n)}catch(e){i(e)}},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})})):e}function m(e,t){if(!e?.aborted)return;let n=Error(`${t} direct source was aborted`);throw n.name=`AbortError`,n}function h(e){return typeof e==`string`?Error(e):e}function g(e,t,n){if(n!==void 0&&(!Number.isSafeInteger(n)||n<=0||n>268435456))throw RangeError(`legacy DOC model budget is invalid`);return u({label:`legacy DOC`,format:`doc`,loadGlue:e,resolveWasm:t,construct:(e,t)=>new e.LegacyDocDocument(t,n),closeNative:e=>e.close_document_session()})}function _(e){return e.revision_markup_in_print?.()===!0&&e.has_revision_marks?.()===!0?{showTrackedChanges:!0}:{}}function v(e,t){if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} maxInputBytes is invalid`);return e}}function y(e,t){if(typeof e!=`object`||!e)throw TypeError(`${t} source module config must be an object`);let n=e;for(let e of Object.keys(n))if(e!==`wasmUrl`&&e!==`maxInputBytes`)throw TypeError(`${t} source module config has an unknown field`);let r=v(n.maxInputBytes,t);if(typeof n.wasmUrl!=`string`)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);return{wasmUrl:n.wasmUrl,...r===void 0?{}:{maxInputBytes:r}}}var b=n({LegacyDocDocument:()=>F,default:()=>N,initSync:()=>M,reinit:()=>P});function x(){return{__proto__:null,"./legacy_doc_direct_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(w(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(w(e,t))}finally{W.__wbindgen_free(n,r,1)}},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,n){Uint8Array.prototype.set.call(S(e,t),n)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=D(n,W.__wbindgen_malloc,W.__wbindgen_realloc),i=U;C().setInt32(e+4,i,!0),C().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return w(e,t)},__wbindgen_init_externref_table:function(){let e=W.__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 S(e,t){return e>>>=0,T().subarray(e/1,e/1+t)}function C(){return(L===null||L.buffer.detached===!0||L.buffer.detached===void 0&&L.buffer!==W.memory.buffer)&&(L=new DataView(W.memory.buffer)),L}function w(e,t){return e>>>=0,k(e,t)}function T(){return(R===null||R.byteLength===0)&&(R=new Uint8Array(W.memory.buffer)),R}function E(e){return e==null}function D(e,t,n){if(n===void 0){let n=H.encode(e),r=t(n.length,1)>>>0;return T().subarray(r,r+n.length).set(n),U=n.length,r}let r=e.length,i=t(r,1)>>>0,a=T(),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=T().subarray(i+o,i+r),a=H.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return U=o,i}function O(e){let t=W.__wbindgen_externrefs.get(e);return W.__externref_table_dealloc(e),t}function k(e,t){return V+=t,V>=B&&(z=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),z.decode(),V=t),z.decode(T().subarray(e,e+t))}function A(e,t){return W=e.exports,L=null,R=null,W.__wbindgen_start(),W}async function j(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}}function M(e){if(W!==void 0)return W;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=x();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),A(new WebAssembly.Instance(e,t),e)}async function N(e){if(W!==void 0)return W;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=x();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await j(await e,t);return A(n,r)}async function P(e){return W=void 0,L=null,R=null,N(e)}var F,I,L,R,z,B,V,H,U,W,G=t(()=>{F=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),e}free(){let e=this.__destroy_into_raw();W.__wbg_legacydocdocument_free(e,0)}acknowledge_document_chunk(e,t,n){let r=W.legacydocdocument_acknowledge_document_chunk(this.__wbg_ptr,e,t,n);if(r[1])throw O(r[0])}assert_healthy(){let e=W.legacydocdocument_assert_healthy(this.__wbg_ptr);if(e[1])throw O(e[0])}cancel_document_cursor(){let e=W.legacydocdocument_cancel_document_cursor(this.__wbg_ptr);if(e[1])throw O(e[0])}close_document_session(){W.legacydocdocument_close_document_session(this.__wbg_ptr)}document_chunk_done(){let e=W.legacydocdocument_document_chunk_done(this.__wbg_ptr);if(e[2])throw O(e[1]);return e[0]!==0}extract_image(e){let t=D(e,W.__wbindgen_malloc,W.__wbindgen_realloc),n=U,r=W.legacydocdocument_extract_image(this.__wbg_ptr,t,n);if(r[3])throw O(r[2]);var i=S(r[0],r[1]).slice();return W.__wbindgen_free(r[0],r[1]*1,1),i}has_revision_marks(){return W.legacydocdocument_has_revision_marks(this.__wbg_ptr)!==0}image_mime_type(e){let t,n;try{let a=D(e,W.__wbindgen_malloc,W.__wbindgen_realloc),o=U,s=W.legacydocdocument_image_mime_type(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,O(s[2]);return t=r,n=i,w(r,i)}finally{W.__wbindgen_free(t,n,1)}}constructor(e,t){let n=W.legacydocdocument_new(e,E(t)?4294967297:t>>>0);if(n[2])throw O(n[1]);return this.__wbg_ptr=n[0]>>>0,I.register(this,this.__wbg_ptr,this),this}open_document_cursor(e,t){let n=W.legacydocdocument_open_document_cursor(this.__wbg_ptr,e,t);if(n[1])throw O(n[0])}pull_document_chunk(e,t,n,r){let i=W.legacydocdocument_pull_document_chunk(this.__wbg_ptr,e,t,n,r);if(i[3])throw O(i[2]);var a=S(i[0],i[1]).slice();return W.__wbindgen_free(i[0],i[1]*1,1),a}revision_markup_in_print(){return W.legacydocdocument_revision_markup_in_print(this.__wbg_ptr)!==0}revision_markup_on_screen(){return W.legacydocdocument_revision_markup_on_screen(this.__wbg_ptr)!==0}},Symbol.dispose&&(F.prototype[Symbol.dispose]=F.prototype.free),I=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>W.__wbg_legacydocdocument_free(e>>>0,1)),L=null,R=null,z=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),z.decode(),B=2146435072,V=0,H=new TextEncoder,`encodeInto`in H||(H.encodeInto=function(e,t){let n=H.encode(e);return t.set(n),{read:e.length,written:n.length}}),U=0});const K=g(()=>Promise.resolve().then(()=>(G(),b)),d);async function q(e,t,n){let{wasmUrl:r,maxInputBytes:i}=y(t,`legacy DOC`);if(i!==void 0&&e.byteLength>i)throw RangeError(`legacy DOC input exceeds the configured size limit`);let a=await K.open(e,r,n);try{return Object.freeze({archive:a.archive,viewDefaults:_(a.archive),close:()=>a.closeArchive()})}catch(e){try{a.closeArchive()}catch{}throw e}}export{q as openModelSource};
|
|
1
|
+
var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},r=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function i(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function a(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}const o=new WeakMap,s=new Set([`http:`,`https:`,`file:`,`blob:`,`data:`]);function c(e,t){if(typeof e!=`string`||e.length===0||e.trim()!==e)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);let n;try{n=new URL(e)}catch{throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`)}if(!s.has(n.protocol))throw TypeError(`${t} wasmUrl protocol is unsupported`);return e}function l(e){let t,n,s,l,u=()=>s??l?.failure,h=t=>{if(!i(t))throw m(t);let n=u()??new r(`${e.label} WASM runtime trapped and is unavailable`);if(l){l.failure??=n;for(let e of l.live)e.invalidate();l.live.clear()}else s=n;throw n},g=t=>{let n=u();if(n)throw n;try{return t()}catch(t){return h(e.mapNativeError?e.mapNativeError(t):t)}},_=r=>t?r===n?t:Promise.reject(Error(`${e.label} source engine is pinned to another WASM URL`)):(n=r,t=e.loadGlue().then(async t=>{if(l=o.get(t),l||(l={live:new Set},o.set(t,l)),l.failure)throw l.failure;try{let n=await e.resolveWasm(r);await t.default({module_or_path:n})}catch(e){return h(e)}return t}),t);return Object.freeze({async open(t,n,r,i){let s=u();if(s)throw s;let m=c(n,e.label);p(r,e.label);let v;try{v=await f(_(m),r,e.label)}catch(e){return h(e)}if(l=o.get(v),!l)throw Error(`${e.label} source runtime identity is unavailable`);if(l.failure)throw l.failure;p(r,e.label);let y;try{y=g(()=>e.construct(v,t,i)),p(r,e.label)}catch(t){if(y)try{d(y,e.closeNative,g)}catch{}throw t}let b=!1,x=y,S={invalidate(){let e=x;x=void 0,a(e)}};return l.live.add(S),{archive:new Proxy(y,{get(t,n){let r=x;if(!r)throw u()??Error(`${e.label} source archive is closed`);let i=g(()=>Reflect.get(r,n,r));return typeof i==`function`?(...t)=>{let r=x;if(!r)throw u()??Error(`${e.label} source archive is closed`);return g(()=>{let e=Reflect.get(r,n,r);return Reflect.apply(e,r,t)})}:i}}),sourceByteLength:t.byteLength,closeArchive(){if(b)return;b=!0,l?.live.delete(S);let t=x;x=void 0,t&&d(t,e.closeNative,g)}}}})}async function u(e){let t=new URL(e),n=globalThis.process;if(t.protocol===`file:`&&n?.versions?.node){let{readFile:e}=await import(`node:fs/promises`);return e(t)}return t}function d(e,t,n){let o,s=!1;try{n(()=>t(e))}catch(e){s=!0,o=e}if(i(o)||o instanceof r)a(e);else try{n(()=>e.free())}catch(t){s||(s=!0,o=t),(i(t)||t instanceof r)&&a(e)}if(s)throw o}function f(e,t,n){return t?(p(t,n),new Promise((r,i)=>{let a=()=>{o();try{p(t,n)}catch(e){i(e)}},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})})):e}function p(e,t){if(!e?.aborted)return;let n=Error(`${t} direct source was aborted`);throw n.name=`AbortError`,n}function m(e){return typeof e==`string`?Error(e):e}function h(e,t){return typeof e==`string`?e.startsWith(`LEGACY_UNSUPPORTED_ENCRYPTION:`)?Error(`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`):e.startsWith(`UNSUPPORTED:`)?Error(`MODEL_SOURCE_UNSUPPORTED:${JSON.stringify({format:t,reason:`source-subset`})}`):Error(e):e}function g(e,t,n){if(n!==void 0&&(!Number.isSafeInteger(n)||n<=0||n>268435456))throw RangeError(`legacy DOC model budget is invalid`);return l({label:`legacy DOC`,mapNativeError:e=>h(e,`doc`),loadGlue:e,resolveWasm:t,construct:(e,t)=>new e.LegacyDocDocument(t,n),closeNative:e=>e.close_document_session()})}function _(e){return e.revision_markup_in_print?.()===!0&&e.has_revision_marks?.()===!0?{showTrackedChanges:!0}:{}}function v(e,t){if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} maxInputBytes is invalid`);return e}}function y(e,t){if(typeof e!=`object`||!e)throw TypeError(`${t} source module config must be an object`);let n=e;for(let e of Object.keys(n))if(e!==`wasmUrl`&&e!==`maxInputBytes`)throw TypeError(`${t} source module config has an unknown field`);let r=v(n.maxInputBytes,t);if(typeof n.wasmUrl!=`string`)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);return{wasmUrl:n.wasmUrl,...r===void 0?{}:{maxInputBytes:r}}}var b=n({LegacyDocDocument:()=>F,default:()=>N,initSync:()=>M,reinit:()=>P});function x(){return{__proto__:null,"./legacy_doc_direct_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(w(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(w(e,t))}finally{W.__wbindgen_free(n,r,1)}},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,n){Uint8Array.prototype.set.call(S(e,t),n)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=D(n,W.__wbindgen_malloc,W.__wbindgen_realloc),i=U;C().setInt32(e+4,i,!0),C().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return w(e,t)},__wbindgen_init_externref_table:function(){let e=W.__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 S(e,t){return e>>>=0,T().subarray(e/1,e/1+t)}function C(){return(L===null||L.buffer.detached===!0||L.buffer.detached===void 0&&L.buffer!==W.memory.buffer)&&(L=new DataView(W.memory.buffer)),L}function w(e,t){return e>>>=0,k(e,t)}function T(){return(R===null||R.byteLength===0)&&(R=new Uint8Array(W.memory.buffer)),R}function E(e){return e==null}function D(e,t,n){if(n===void 0){let n=H.encode(e),r=t(n.length,1)>>>0;return T().subarray(r,r+n.length).set(n),U=n.length,r}let r=e.length,i=t(r,1)>>>0,a=T(),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=T().subarray(i+o,i+r),a=H.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return U=o,i}function O(e){let t=W.__wbindgen_externrefs.get(e);return W.__externref_table_dealloc(e),t}function k(e,t){return V+=t,V>=B&&(z=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),z.decode(),V=t),z.decode(T().subarray(e,e+t))}function A(e,t){return W=e.exports,L=null,R=null,W.__wbindgen_start(),W}async function j(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}}function M(e){if(W!==void 0)return W;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=x();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),A(new WebAssembly.Instance(e,t),e)}async function N(e){if(W!==void 0)return W;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=x();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await j(await e,t);return A(n,r)}async function P(e){return W=void 0,L=null,R=null,N(e)}var F,I,L,R,z,B,V,H,U,W,G=t(()=>{F=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,I.unregister(this),e}free(){let e=this.__destroy_into_raw();W.__wbg_legacydocdocument_free(e,0)}acknowledge_document_chunk(e,t,n){let r=W.legacydocdocument_acknowledge_document_chunk(this.__wbg_ptr,e,t,n);if(r[1])throw O(r[0])}assert_healthy(){let e=W.legacydocdocument_assert_healthy(this.__wbg_ptr);if(e[1])throw O(e[0])}cancel_document_cursor(){let e=W.legacydocdocument_cancel_document_cursor(this.__wbg_ptr);if(e[1])throw O(e[0])}close_document_session(){W.legacydocdocument_close_document_session(this.__wbg_ptr)}document_chunk_done(){let e=W.legacydocdocument_document_chunk_done(this.__wbg_ptr);if(e[2])throw O(e[1]);return e[0]!==0}extract_image(e){let t=D(e,W.__wbindgen_malloc,W.__wbindgen_realloc),n=U,r=W.legacydocdocument_extract_image(this.__wbg_ptr,t,n);if(r[3])throw O(r[2]);var i=S(r[0],r[1]).slice();return W.__wbindgen_free(r[0],r[1]*1,1),i}has_revision_marks(){return W.legacydocdocument_has_revision_marks(this.__wbg_ptr)!==0}image_mime_type(e){let t,n;try{let a=D(e,W.__wbindgen_malloc,W.__wbindgen_realloc),o=U,s=W.legacydocdocument_image_mime_type(this.__wbg_ptr,a,o);var r=s[0],i=s[1];if(s[3])throw r=0,i=0,O(s[2]);return t=r,n=i,w(r,i)}finally{W.__wbindgen_free(t,n,1)}}constructor(e,t){let n=W.legacydocdocument_new(e,E(t)?4294967297:t>>>0);if(n[2])throw O(n[1]);return this.__wbg_ptr=n[0]>>>0,I.register(this,this.__wbg_ptr,this),this}open_document_cursor(e,t){let n=W.legacydocdocument_open_document_cursor(this.__wbg_ptr,e,t);if(n[1])throw O(n[0])}pull_document_chunk(e,t,n,r){let i=W.legacydocdocument_pull_document_chunk(this.__wbg_ptr,e,t,n,r);if(i[3])throw O(i[2]);var a=S(i[0],i[1]).slice();return W.__wbindgen_free(i[0],i[1]*1,1),a}revision_markup_in_print(){return W.legacydocdocument_revision_markup_in_print(this.__wbg_ptr)!==0}revision_markup_on_screen(){return W.legacydocdocument_revision_markup_on_screen(this.__wbg_ptr)!==0}},Symbol.dispose&&(F.prototype[Symbol.dispose]=F.prototype.free),I=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>W.__wbg_legacydocdocument_free(e>>>0,1)),L=null,R=null,z=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),z.decode(),B=2146435072,V=0,H=new TextEncoder,`encodeInto`in H||(H.encodeInto=function(e,t){let n=H.encode(e);return t.set(n),{read:e.length,written:n.length}}),U=0});const K=g(()=>Promise.resolve().then(()=>(G(),b)),u);async function q(e,t,n){let{wasmUrl:r,maxInputBytes:i}=y(t,`legacy DOC`);if(i!==void 0&&e.byteLength>i)throw RangeError(`legacy DOC input exceeds the configured size limit`);let a=await K.open(e,r,n);try{return Object.freeze({archive:a.archive,viewDefaults:_(a.archive),close:()=>a.closeArchive()})}catch(e){try{a.closeArchive()}catch{}throw e}}export{q as openModelSource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function r(e,t){return typeof e==`string`?e.startsWith(`LEGACY_UNSUPPORTED_ENCRYPTION:`)?Error(`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`):e.startsWith(`UNSUPPORTED:`)?Error(`MODEL_SOURCE_UNSUPPORTED:${JSON.stringify({format:t,reason:`source-subset`})}`):Error(e):e}var i=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function a(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function o(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}const s=new WeakMap,c=new Set([`http:`,`https:`,`file:`,`blob:`,`data:`]);function l(e,t){if(typeof e!=`string`||e.length===0||e.trim()!==e)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);let n;try{n=new URL(e)}catch{throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`)}if(!c.has(n.protocol))throw TypeError(`${t} wasmUrl protocol is unsupported`);return e}function u(e){let t,n,c,u,d=()=>c??u?.failure,g=t=>{if(!a(t))throw h(t);let n=d()??new i(`${e.label} WASM runtime trapped and is unavailable`);if(u){u.failure??=n;for(let e of u.live)e.invalidate();u.live.clear()}else c=n;throw n},_=t=>{let n=d();if(n)throw n;try{return t()}catch(t){return g(e.format?r(t,e.format):t)}},v=r=>t?r===n?t:Promise.reject(Error(`${e.label} source engine is pinned to another WASM URL`)):(n=r,t=e.loadGlue().then(async t=>{if(u=s.get(t),u||(u={live:new Set},s.set(t,u)),u.failure)throw u.failure;try{let n=await e.resolveWasm(r);await t.default({module_or_path:n})}catch(e){return g(e)}return t}),t);return Object.freeze({async open(t,n,r){let i=d();if(i)throw i;let a=l(n,e.label);m(r,e.label);let c;try{c=await p(v(a),r,e.label)}catch(e){return g(e)}if(u=s.get(c),!u)throw Error(`${e.label} source runtime identity is unavailable`);if(u.failure)throw u.failure;m(r,e.label);let h;try{h=_(()=>e.construct(c,t)),m(r,e.label)}catch(t){if(h)try{f(h,e.closeNative,_)}catch{}throw t}let y=!1,b=h,x={invalidate(){let e=b;b=void 0,o(e)}};return u.live.add(x),{archive:new Proxy(h,{get(t,n){let r=b;if(!r)throw d()??Error(`${e.label} source archive is closed`);let i=_(()=>Reflect.get(r,n,r));return typeof i==`function`?(...t)=>{let r=b;if(!r)throw d()??Error(`${e.label} source archive is closed`);return _(()=>{let e=Reflect.get(r,n,r);return Reflect.apply(e,r,t)})}:i}}),sourceByteLength:t.byteLength,closeArchive(){if(y)return;y=!0,u?.live.delete(x);let t=b;b=void 0,t&&f(t,e.closeNative,_)}}}})}async function d(e){let t=new URL(e),n=globalThis.process;if(t.protocol===`file:`&&n?.versions?.node){let{readFile:e}=await import(`node:fs/promises`);return e(t)}return t}function f(e,t,n){let r,s=!1;try{n(()=>t(e))}catch(e){s=!0,r=e}if(a(r)||r instanceof i)o(e);else try{n(()=>e.free())}catch(t){s||(s=!0,r=t),(a(t)||t instanceof i)&&o(e)}if(s)throw r}function p(e,t,n){return t?(m(t,n),new Promise((r,i)=>{let a=()=>{o();try{m(t,n)}catch(e){i(e)}},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})})):e}function m(e,t){if(!e?.aborted)return;let n=Error(`${t} direct source was aborted`);throw n.name=`AbortError`,n}function h(e){return typeof e==`string`?Error(e):e}function g(e,t){return u({label:`legacy PPT`,format:`ppt`,loadGlue:e,resolveWasm:t,construct:(e,t)=>new e.LegacyPptPresentation(t),closeNative:e=>e.close_presentation_session()})}function _(e,t){if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} maxInputBytes is invalid`);return e}}function v(e,t){if(typeof e!=`object`||!e)throw TypeError(`${t} source module config must be an object`);let n=e;for(let e of Object.keys(n))if(e!==`wasmUrl`&&e!==`maxInputBytes`)throw TypeError(`${t} source module config has an unknown field`);let r=_(n.maxInputBytes,t);if(typeof n.wasmUrl!=`string`)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);return{wasmUrl:n.wasmUrl,...r===void 0?{}:{maxInputBytes:r}}}var y=n({LegacyPptPresentation:()=>N,default:()=>j,initSync:()=>A,reinit:()=>M});function b(){return{__proto__:null,"./legacy_ppt_direct_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(C(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(C(e,t))}finally{H.__wbindgen_free(n,r,1)}},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,n){Uint8Array.prototype.set.call(x(e,t),n)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=T(n,H.__wbindgen_malloc,H.__wbindgen_realloc),i=V;S().setInt32(e+4,i,!0),S().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return C(e,t)},__wbindgen_init_externref_table:function(){let e=H.__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 x(e,t){return e>>>=0,w().subarray(e/1,e/1+t)}function S(){return(F===null||F.buffer.detached===!0||F.buffer.detached===void 0&&F.buffer!==H.memory.buffer)&&(F=new DataView(H.memory.buffer)),F}function C(e,t){return e>>>=0,D(e,t)}function w(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(H.memory.buffer)),I}function T(e,t,n){if(n===void 0){let n=B.encode(e),r=t(n.length,1)>>>0;return w().subarray(r,r+n.length).set(n),V=n.length,r}let r=e.length,i=t(r,1)>>>0,a=w(),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=w().subarray(i+o,i+r),a=B.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return V=o,i}function E(e){let t=H.__wbindgen_externrefs.get(e);return H.__externref_table_dealloc(e),t}function D(e,t){return z+=t,z>=R&&(L=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),L.decode(),z=t),L.decode(w().subarray(e,e+t))}function O(e,t){return H=e.exports,F=null,I=null,H.__wbindgen_start(),H}async function k(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}}function A(e){if(H!==void 0)return H;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=b();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),O(new WebAssembly.Instance(e,t),e)}async function j(e){if(H!==void 0)return H;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=b();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await k(await e,t);return O(n,r)}async function M(e){return H=void 0,F=null,I=null,j(e)}var N,P,F,I,L,R,z,B,V,H,U=t(()=>{N=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){let e=this.__destroy_into_raw();H.__wbg_legacypptpresentation_free(e,0)}acknowledge_slide(e,t){let n=H.legacypptpresentation_acknowledge_slide(this.__wbg_ptr,e,t);if(n[1])throw E(n[0])}assert_healthy(){let e=H.legacypptpresentation_assert_healthy(this.__wbg_ptr);if(e[1])throw E(e[0])}cancel_slide(){let e=H.legacypptpresentation_cancel_slide(this.__wbg_ptr);if(e[1])throw E(e[0])}close_presentation_session(){let e=H.legacypptpresentation_close_presentation_session(this.__wbg_ptr);if(e[1])throw E(e[0])}extract_image(e){let t=T(e,H.__wbindgen_malloc,H.__wbindgen_realloc),n=V,r=H.legacypptpresentation_extract_image(this.__wbg_ptr,t,n);if(r[3])throw E(r[2]);var i=x(r[0],r[1]).slice();return H.__wbindgen_free(r[0],r[1]*1,1),i}constructor(e){let t=H.legacypptpresentation_new(e);if(t[2])throw E(t[1]);return this.__wbg_ptr=t[0]>>>0,P.register(this,this.__wbg_ptr,this),this}presentation_bootstrap(){let e=H.legacypptpresentation_presentation_bootstrap(this.__wbg_ptr);if(e[3])throw E(e[2]);var t=x(e[0],e[1]).slice();return H.__wbindgen_free(e[0],e[1]*1,1),t}pull_slide(e,t,n,r){let i=H.legacypptpresentation_pull_slide(this.__wbg_ptr,e,t,n,r);if(i[3])throw E(i[2]);var a=x(i[0],i[1]).slice();return H.__wbindgen_free(i[0],i[1]*1,1),a}slide_cursor_resource_usage(){let e=H.legacypptpresentation_slide_cursor_resource_usage(this.__wbg_ptr);if(e[3])throw E(e[2]);var t=x(e[0],e[1]).slice();return H.__wbindgen_free(e[0],e[1]*1,1),t}},Symbol.dispose&&(N.prototype[Symbol.dispose]=N.prototype.free),P=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>H.__wbg_legacypptpresentation_free(e>>>0,1)),F=null,I=null,L=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),L.decode(),R=2146435072,z=0,B=new TextEncoder,`encodeInto`in B||(B.encodeInto=function(e,t){let n=B.encode(e);return t.set(n),{read:e.length,written:n.length}}),V=0});const W=g(()=>Promise.resolve().then(()=>(U(),y)),d);async function G(e,t,n){let{wasmUrl:r,maxInputBytes:i}=v(t,`legacy PPT`);if(i!==void 0&&e.byteLength>i)throw RangeError(`legacy PPT input exceeds the configured size limit`);let a=await W.open(e,r,n);return Object.freeze({archive:a.archive,close:()=>a.closeArchive()})}export{G as openModelSource};
|
|
1
|
+
var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},r=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function i(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function a(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}const o=new WeakMap,s=new Set([`http:`,`https:`,`file:`,`blob:`,`data:`]);function c(e,t){if(typeof e!=`string`||e.length===0||e.trim()!==e)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);let n;try{n=new URL(e)}catch{throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`)}if(!s.has(n.protocol))throw TypeError(`${t} wasmUrl protocol is unsupported`);return e}function l(e){let t,n,s,l,u=()=>s??l?.failure,h=t=>{if(!i(t))throw m(t);let n=u()??new r(`${e.label} WASM runtime trapped and is unavailable`);if(l){l.failure??=n;for(let e of l.live)e.invalidate();l.live.clear()}else s=n;throw n},g=t=>{let n=u();if(n)throw n;try{return t()}catch(t){return h(e.mapNativeError?e.mapNativeError(t):t)}},_=r=>t?r===n?t:Promise.reject(Error(`${e.label} source engine is pinned to another WASM URL`)):(n=r,t=e.loadGlue().then(async t=>{if(l=o.get(t),l||(l={live:new Set},o.set(t,l)),l.failure)throw l.failure;try{let n=await e.resolveWasm(r);await t.default({module_or_path:n})}catch(e){return h(e)}return t}),t);return Object.freeze({async open(t,n,r,i){let s=u();if(s)throw s;let m=c(n,e.label);p(r,e.label);let v;try{v=await f(_(m),r,e.label)}catch(e){return h(e)}if(l=o.get(v),!l)throw Error(`${e.label} source runtime identity is unavailable`);if(l.failure)throw l.failure;p(r,e.label);let y;try{y=g(()=>e.construct(v,t,i)),p(r,e.label)}catch(t){if(y)try{d(y,e.closeNative,g)}catch{}throw t}let b=!1,x=y,S={invalidate(){let e=x;x=void 0,a(e)}};return l.live.add(S),{archive:new Proxy(y,{get(t,n){let r=x;if(!r)throw u()??Error(`${e.label} source archive is closed`);let i=g(()=>Reflect.get(r,n,r));return typeof i==`function`?(...t)=>{let r=x;if(!r)throw u()??Error(`${e.label} source archive is closed`);return g(()=>{let e=Reflect.get(r,n,r);return Reflect.apply(e,r,t)})}:i}}),sourceByteLength:t.byteLength,closeArchive(){if(b)return;b=!0,l?.live.delete(S);let t=x;x=void 0,t&&d(t,e.closeNative,g)}}}})}async function u(e){let t=new URL(e),n=globalThis.process;if(t.protocol===`file:`&&n?.versions?.node){let{readFile:e}=await import(`node:fs/promises`);return e(t)}return t}function d(e,t,n){let o,s=!1;try{n(()=>t(e))}catch(e){s=!0,o=e}if(i(o)||o instanceof r)a(e);else try{n(()=>e.free())}catch(t){s||(s=!0,o=t),(i(t)||t instanceof r)&&a(e)}if(s)throw o}function f(e,t,n){return t?(p(t,n),new Promise((r,i)=>{let a=()=>{o();try{p(t,n)}catch(e){i(e)}},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})})):e}function p(e,t){if(!e?.aborted)return;let n=Error(`${t} direct source was aborted`);throw n.name=`AbortError`,n}function m(e){return typeof e==`string`?Error(e):e}function h(e,t){return typeof e==`string`?e.startsWith(`LEGACY_UNSUPPORTED_ENCRYPTION:`)?Error(`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`):e.startsWith(`UNSUPPORTED:`)?Error(`MODEL_SOURCE_UNSUPPORTED:${JSON.stringify({format:t,reason:`source-subset`})}`):Error(e):e}function g(e,t){return l({label:`legacy PPT`,mapNativeError:e=>h(e,`ppt`),loadGlue:e,resolveWasm:t,construct:(e,t)=>new e.LegacyPptPresentation(t),closeNative:e=>e.close_presentation_session()})}function _(e,t){if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} maxInputBytes is invalid`);return e}}function v(e,t){if(typeof e!=`object`||!e)throw TypeError(`${t} source module config must be an object`);let n=e;for(let e of Object.keys(n))if(e!==`wasmUrl`&&e!==`maxInputBytes`)throw TypeError(`${t} source module config has an unknown field`);let r=_(n.maxInputBytes,t);if(typeof n.wasmUrl!=`string`)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);return{wasmUrl:n.wasmUrl,...r===void 0?{}:{maxInputBytes:r}}}var y=n({LegacyPptPresentation:()=>N,default:()=>j,initSync:()=>A,reinit:()=>M});function b(){return{__proto__:null,"./legacy_ppt_direct_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(C(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(C(e,t))}finally{H.__wbindgen_free(n,r,1)}},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,n){Uint8Array.prototype.set.call(x(e,t),n)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=T(n,H.__wbindgen_malloc,H.__wbindgen_realloc),i=V;S().setInt32(e+4,i,!0),S().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return C(e,t)},__wbindgen_init_externref_table:function(){let e=H.__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 x(e,t){return e>>>=0,w().subarray(e/1,e/1+t)}function S(){return(F===null||F.buffer.detached===!0||F.buffer.detached===void 0&&F.buffer!==H.memory.buffer)&&(F=new DataView(H.memory.buffer)),F}function C(e,t){return e>>>=0,D(e,t)}function w(){return(I===null||I.byteLength===0)&&(I=new Uint8Array(H.memory.buffer)),I}function T(e,t,n){if(n===void 0){let n=B.encode(e),r=t(n.length,1)>>>0;return w().subarray(r,r+n.length).set(n),V=n.length,r}let r=e.length,i=t(r,1)>>>0,a=w(),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=w().subarray(i+o,i+r),a=B.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return V=o,i}function E(e){let t=H.__wbindgen_externrefs.get(e);return H.__externref_table_dealloc(e),t}function D(e,t){return z+=t,z>=R&&(L=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),L.decode(),z=t),L.decode(w().subarray(e,e+t))}function O(e,t){return H=e.exports,F=null,I=null,H.__wbindgen_start(),H}async function k(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}}function A(e){if(H!==void 0)return H;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=b();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),O(new WebAssembly.Instance(e,t),e)}async function j(e){if(H!==void 0)return H;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=b();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await k(await e,t);return O(n,r)}async function M(e){return H=void 0,F=null,I=null,j(e)}var N,P,F,I,L,R,z,B,V,H,U=t(()=>{N=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){let e=this.__destroy_into_raw();H.__wbg_legacypptpresentation_free(e,0)}acknowledge_slide(e,t){let n=H.legacypptpresentation_acknowledge_slide(this.__wbg_ptr,e,t);if(n[1])throw E(n[0])}assert_healthy(){let e=H.legacypptpresentation_assert_healthy(this.__wbg_ptr);if(e[1])throw E(e[0])}cancel_slide(){let e=H.legacypptpresentation_cancel_slide(this.__wbg_ptr);if(e[1])throw E(e[0])}close_presentation_session(){let e=H.legacypptpresentation_close_presentation_session(this.__wbg_ptr);if(e[1])throw E(e[0])}extract_image(e){let t=T(e,H.__wbindgen_malloc,H.__wbindgen_realloc),n=V,r=H.legacypptpresentation_extract_image(this.__wbg_ptr,t,n);if(r[3])throw E(r[2]);var i=x(r[0],r[1]).slice();return H.__wbindgen_free(r[0],r[1]*1,1),i}constructor(e){let t=H.legacypptpresentation_new(e);if(t[2])throw E(t[1]);return this.__wbg_ptr=t[0]>>>0,P.register(this,this.__wbg_ptr,this),this}presentation_bootstrap(){let e=H.legacypptpresentation_presentation_bootstrap(this.__wbg_ptr);if(e[3])throw E(e[2]);var t=x(e[0],e[1]).slice();return H.__wbindgen_free(e[0],e[1]*1,1),t}pull_slide(e,t,n,r){let i=H.legacypptpresentation_pull_slide(this.__wbg_ptr,e,t,n,r);if(i[3])throw E(i[2]);var a=x(i[0],i[1]).slice();return H.__wbindgen_free(i[0],i[1]*1,1),a}slide_cursor_resource_usage(){let e=H.legacypptpresentation_slide_cursor_resource_usage(this.__wbg_ptr);if(e[3])throw E(e[2]);var t=x(e[0],e[1]).slice();return H.__wbindgen_free(e[0],e[1]*1,1),t}},Symbol.dispose&&(N.prototype[Symbol.dispose]=N.prototype.free),P=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>H.__wbg_legacypptpresentation_free(e>>>0,1)),F=null,I=null,L=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),L.decode(),R=2146435072,z=0,B=new TextEncoder,`encodeInto`in B||(B.encodeInto=function(e,t){let n=B.encode(e);return t.set(n),{read:e.length,written:n.length}}),V=0});const W=g(()=>Promise.resolve().then(()=>(U(),y)),u);async function G(e,t,n){let{wasmUrl:r,maxInputBytes:i}=v(t,`legacy PPT`);if(i!==void 0&&e.byteLength>i)throw RangeError(`legacy PPT input exceeds the configured size limit`);let a=await W.open(e,r,n);return Object.freeze({archive:a.archive,close:()=>a.closeArchive()})}export{G as openModelSource};
|
|
@@ -1,73 +1,78 @@
|
|
|
1
1
|
import { MODEL_SOURCE_MODULE_PROTOCOL as e, assertCompanionRuntime as t } from "@silurus/ooxml/internal/companion";
|
|
2
2
|
//#region ../core/src/internal/bundled-asset-url.ts
|
|
3
|
-
function n(
|
|
4
|
-
|
|
3
|
+
function n() {
|
|
4
|
+
let e = globalThis, t = e.document?.baseURI ?? e.location?.href;
|
|
5
|
+
return typeof t == "string" ? t : void 0;
|
|
6
|
+
}
|
|
7
|
+
function r(e, t) {
|
|
8
|
+
let r = n();
|
|
9
|
+
if (e.startsWith("/") && r) {
|
|
5
10
|
let n;
|
|
6
11
|
try {
|
|
7
12
|
n = new URL("/", t);
|
|
8
13
|
} catch {}
|
|
9
14
|
if (!n || n.protocol === "file:") try {
|
|
10
|
-
return new URL(e,
|
|
15
|
+
return new URL(e, r).href;
|
|
11
16
|
} catch {}
|
|
12
17
|
}
|
|
13
18
|
return new URL(e, t).href;
|
|
14
19
|
}
|
|
15
20
|
//#endregion
|
|
16
21
|
//#region ../core/src/errors/cfb-read.ts
|
|
17
|
-
var
|
|
18
|
-
function
|
|
22
|
+
var i = 4294967290, a = 1e6;
|
|
23
|
+
function o(e, t) {
|
|
19
24
|
return (e + 1) * t;
|
|
20
25
|
}
|
|
21
|
-
function
|
|
22
|
-
return e >= 0 && e <=
|
|
26
|
+
function s(e) {
|
|
27
|
+
return e >= 0 && e <= i;
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
let { sectorSize: r } = n,
|
|
26
|
-
if (n.numFatSectors > l || n.numDifatSectors > l || n.numDifatSectors >
|
|
27
|
-
let u = 0, d = (e) => u++ >= n.numFatSectors ? !
|
|
29
|
+
function c(e, t, n) {
|
|
30
|
+
let { sectorSize: r } = n, i = [], c = /* @__PURE__ */ new Set(), l = Math.max(0, Math.floor(t / r) - 1);
|
|
31
|
+
if (n.numFatSectors > l || n.numDifatSectors > l || n.numDifatSectors > a) return null;
|
|
32
|
+
let u = 0, d = (e) => u++ >= n.numFatSectors ? !s(e) : !s(e) || e >= l || c.has(e) ? !1 : (c.add(e), i.push(e), !0);
|
|
28
33
|
for (let t = 0; t < 109; t++) if (!d(e.getUint32(76 + t * 4, !0))) return null;
|
|
29
34
|
let f = r / 4 - 1, p = n.firstDifatSector, m = /* @__PURE__ */ new Set(), h = 0;
|
|
30
|
-
for (;
|
|
35
|
+
for (; s(p) && h < n.numDifatSectors && (h++, !m.has(p));) {
|
|
31
36
|
m.add(p);
|
|
32
|
-
let n =
|
|
37
|
+
let n = o(p, r);
|
|
33
38
|
if (n < 0 || n + r > t) return null;
|
|
34
39
|
for (let t = 0; t < f; t++) if (!d(e.getUint32(n + t * 4, !0))) return null;
|
|
35
40
|
p = e.getUint32(n + f * 4, !0);
|
|
36
41
|
}
|
|
37
|
-
return h !== n.numDifatSectors ||
|
|
42
|
+
return h !== n.numDifatSectors || s(p) || i.length !== n.numFatSectors ? null : i;
|
|
38
43
|
}
|
|
39
|
-
function
|
|
40
|
-
let
|
|
44
|
+
function l(e, t, n, r, i) {
|
|
45
|
+
let a = n / 4, c = Math.floor(i / a), l = i % a;
|
|
41
46
|
if (c >= r.length) return null;
|
|
42
47
|
let u = r[c];
|
|
43
|
-
if (!
|
|
44
|
-
let d =
|
|
48
|
+
if (!s(u)) return null;
|
|
49
|
+
let d = o(u, n) + l * 4;
|
|
45
50
|
return d < 0 || d + 4 > t ? null : e.getUint32(d, !0);
|
|
46
51
|
}
|
|
47
52
|
//#endregion
|
|
48
53
|
//#region ../core/src/errors/cfb-sniff.ts
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
if (!
|
|
52
|
-
let a = /* @__PURE__ */ new Set(), o = Math.floor(n /
|
|
54
|
+
var u = 4294967290, d = 128, f = 4096, p = 8192;
|
|
55
|
+
function m(e, t, n, r, i) {
|
|
56
|
+
if (!_(r)) return null;
|
|
57
|
+
let a = /* @__PURE__ */ new Set(), o = Math.floor(n / d);
|
|
53
58
|
if (o < 1) return null;
|
|
54
|
-
let s = /* @__PURE__ */ new Set(),
|
|
55
|
-
for (;
|
|
56
|
-
s.add(
|
|
57
|
-
let r =
|
|
59
|
+
let s = /* @__PURE__ */ new Set(), c = r, u = 0, m = 0;
|
|
60
|
+
for (; _(c) && !(u++ > p || s.has(c));) {
|
|
61
|
+
s.add(c);
|
|
62
|
+
let r = g(c, n);
|
|
58
63
|
if (r < 0 || r + n > t) return null;
|
|
59
64
|
for (let t = 0; t < o; t++) {
|
|
60
|
-
if (
|
|
61
|
-
let n =
|
|
65
|
+
if (m++ > f) return a;
|
|
66
|
+
let n = h(e, r + t * d);
|
|
62
67
|
n && a.add(n);
|
|
63
68
|
}
|
|
64
|
-
let
|
|
65
|
-
if (
|
|
66
|
-
|
|
69
|
+
let u = l(e, t, n, i, c);
|
|
70
|
+
if (u === null) break;
|
|
71
|
+
c = u;
|
|
67
72
|
}
|
|
68
73
|
return a;
|
|
69
74
|
}
|
|
70
|
-
function
|
|
75
|
+
function h(e, t) {
|
|
71
76
|
let n = e.getUint16(t + 64, !0);
|
|
72
77
|
if (n < 2 || n > 64) return "";
|
|
73
78
|
let r = n / 2 - 1, i = "";
|
|
@@ -78,15 +83,15 @@ function m(e, t) {
|
|
|
78
83
|
}
|
|
79
84
|
return i;
|
|
80
85
|
}
|
|
81
|
-
function
|
|
86
|
+
function g(e, t) {
|
|
82
87
|
return (e + 1) * t;
|
|
83
88
|
}
|
|
84
|
-
function
|
|
85
|
-
return e >= 0 && e <=
|
|
89
|
+
function _(e) {
|
|
90
|
+
return e >= 0 && e <= u;
|
|
86
91
|
}
|
|
87
92
|
//#endregion
|
|
88
93
|
//#region ../core/src/source/cfb-directory-names.ts
|
|
89
|
-
var
|
|
94
|
+
var v = [
|
|
90
95
|
208,
|
|
91
96
|
207,
|
|
92
97
|
17,
|
|
@@ -96,25 +101,25 @@ var _ = [
|
|
|
96
101
|
26,
|
|
97
102
|
225
|
|
98
103
|
];
|
|
99
|
-
function
|
|
104
|
+
function y(e) {
|
|
100
105
|
if (e.length < 512) return null;
|
|
101
|
-
for (let t = 0; t <
|
|
106
|
+
for (let t = 0; t < v.length; t++) if (e[t] !== v[t]) return null;
|
|
102
107
|
let t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = t.getUint16(30, !0);
|
|
103
108
|
if (n !== 9 && n !== 12) return /* @__PURE__ */ new Set();
|
|
104
|
-
let r = 1 << n, i =
|
|
109
|
+
let r = 1 << n, i = c(t, e.length, {
|
|
105
110
|
sectorSize: r,
|
|
106
111
|
numFatSectors: t.getUint32(44, !0),
|
|
107
112
|
firstDifatSector: t.getUint32(68, !0),
|
|
108
113
|
numDifatSectors: t.getUint32(72, !0)
|
|
109
114
|
});
|
|
110
|
-
return i === null ? /* @__PURE__ */ new Set() :
|
|
115
|
+
return i === null ? /* @__PURE__ */ new Set() : m(t, e.length, r, t.getUint32(48, !0), i) ?? /* @__PURE__ */ new Set();
|
|
111
116
|
}
|
|
112
117
|
//#endregion
|
|
113
118
|
//#region ../../src/companion-version.ts
|
|
114
|
-
var
|
|
119
|
+
var b = "0.90.1";
|
|
115
120
|
//#endregion
|
|
116
121
|
//#region src/source-module-config.ts
|
|
117
|
-
function
|
|
122
|
+
function x(e, t) {
|
|
118
123
|
if (e !== void 0) {
|
|
119
124
|
if (typeof e != "number" || !Number.isSafeInteger(e) || e <= 0) throw RangeError(`${t} maxInputBytes is invalid`);
|
|
120
125
|
return e;
|
|
@@ -122,7 +127,7 @@ function b(e, t) {
|
|
|
122
127
|
}
|
|
123
128
|
//#endregion
|
|
124
129
|
//#region src/legacy-source.ts
|
|
125
|
-
var
|
|
130
|
+
var S = {
|
|
126
131
|
wasmUrl: new Set([
|
|
127
132
|
"http:",
|
|
128
133
|
"https:",
|
|
@@ -136,20 +141,20 @@ var x = {
|
|
|
136
141
|
"file:",
|
|
137
142
|
"blob:"
|
|
138
143
|
])
|
|
139
|
-
},
|
|
144
|
+
}, C = {
|
|
140
145
|
doc: "docx",
|
|
141
146
|
xls: "xlsx",
|
|
142
147
|
ppt: "pptx"
|
|
143
148
|
};
|
|
144
|
-
function
|
|
149
|
+
function w(e) {
|
|
145
150
|
let t = [];
|
|
146
151
|
return e.has("WordDocument") && t.push("doc"), (e.has("Workbook") || e.has("Book")) && t.push("xls"), e.has("PowerPoint Document") && t.push("ppt"), t.length === 1 ? t[0] : null;
|
|
147
152
|
}
|
|
148
|
-
function
|
|
149
|
-
t(
|
|
153
|
+
function T(n, r, i) {
|
|
154
|
+
t(b, "ooxml-model-source-module/v2");
|
|
150
155
|
let a = `legacy ${n.toUpperCase()} source`;
|
|
151
156
|
if (typeof r != "object" || !r) throw TypeError(`${a} options must be an object`);
|
|
152
|
-
let o =
|
|
157
|
+
let o = D(r.wasmUrl ?? i.wasmUrl, "wasmUrl", a), s = D(r.moduleUrl ?? i.moduleUrl, "moduleUrl", a), c = x(r.maxInputBytes, a), l = C[n], u = Object.freeze({
|
|
153
158
|
protocol: e,
|
|
154
159
|
target: l,
|
|
155
160
|
moduleUrl: s,
|
|
@@ -161,8 +166,8 @@ function w(n, r, i) {
|
|
|
161
166
|
return Object.freeze({
|
|
162
167
|
target: l,
|
|
163
168
|
claim(e) {
|
|
164
|
-
let t =
|
|
165
|
-
if (!t || t.has("EncryptionInfo") ||
|
|
169
|
+
let t = y(e);
|
|
170
|
+
if (!t || t.has("EncryptionInfo") || w(t) !== n) return !1;
|
|
166
171
|
if (c !== void 0 && e.byteLength > c) throw RangeError(`${a} input exceeds the configured size limit`);
|
|
167
172
|
return !0;
|
|
168
173
|
},
|
|
@@ -174,7 +179,7 @@ function w(n, r, i) {
|
|
|
174
179
|
}
|
|
175
180
|
});
|
|
176
181
|
}
|
|
177
|
-
function
|
|
182
|
+
function E(e, t) {
|
|
178
183
|
let n, r = () => n ??= t();
|
|
179
184
|
return Object.freeze({
|
|
180
185
|
target: e,
|
|
@@ -182,7 +187,7 @@ function T(e, t) {
|
|
|
182
187
|
beginLoad: () => r().beginLoad()
|
|
183
188
|
});
|
|
184
189
|
}
|
|
185
|
-
function
|
|
190
|
+
function D(e, t, n) {
|
|
186
191
|
if (typeof e != "string" || e.length === 0 || e.trim() !== e) throw TypeError(`${n} ${t} must be a nonempty absolute URL`);
|
|
187
192
|
let r;
|
|
188
193
|
try {
|
|
@@ -190,8 +195,8 @@ function E(e, t, n) {
|
|
|
190
195
|
} catch {
|
|
191
196
|
throw TypeError(`${n} ${t} must be a nonempty absolute URL`);
|
|
192
197
|
}
|
|
193
|
-
if (!
|
|
198
|
+
if (!S[t].has(r.protocol)) throw TypeError(`${n} ${t} protocol is unsupported`);
|
|
194
199
|
return e;
|
|
195
200
|
}
|
|
196
201
|
//#endregion
|
|
197
|
-
export {
|
|
202
|
+
export { E as n, r, T as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function r(e,t){return typeof e==`string`?e.startsWith(`LEGACY_UNSUPPORTED_ENCRYPTION:`)?Error(`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`):e.startsWith(`UNSUPPORTED:`)?Error(`MODEL_SOURCE_UNSUPPORTED:${JSON.stringify({format:t,reason:`source-subset`})}`):Error(e):e}var i=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function a(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function o(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}const s=new WeakMap,c=new Set([`http:`,`https:`,`file:`,`blob:`,`data:`]);function l(e,t){if(typeof e!=`string`||e.length===0||e.trim()!==e)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);let n;try{n=new URL(e)}catch{throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`)}if(!c.has(n.protocol))throw TypeError(`${t} wasmUrl protocol is unsupported`);return e}function u(e){let t,n,c,u,d=()=>c??u?.failure,g=t=>{if(!a(t))throw h(t);let n=d()??new i(`${e.label} WASM runtime trapped and is unavailable`);if(u){u.failure??=n;for(let e of u.live)e.invalidate();u.live.clear()}else c=n;throw n},_=t=>{let n=d();if(n)throw n;try{return t()}catch(t){return g(e.format?r(t,e.format):t)}},v=r=>t?r===n?t:Promise.reject(Error(`${e.label} source engine is pinned to another WASM URL`)):(n=r,t=e.loadGlue().then(async t=>{if(u=s.get(t),u||(u={live:new Set},s.set(t,u)),u.failure)throw u.failure;try{let n=await e.resolveWasm(r);await t.default({module_or_path:n})}catch(e){return g(e)}return t}),t);return Object.freeze({async open(t,n,r){let i=d();if(i)throw i;let a=l(n,e.label);m(r,e.label);let c;try{c=await p(v(a),r,e.label)}catch(e){return g(e)}if(u=s.get(c),!u)throw Error(`${e.label} source runtime identity is unavailable`);if(u.failure)throw u.failure;m(r,e.label);let h;try{h=_(()=>e.construct(c,t)),m(r,e.label)}catch(t){if(h)try{f(h,e.closeNative,_)}catch{}throw t}let y=!1,b=h,x={invalidate(){let e=b;b=void 0,o(e)}};return u.live.add(x),{archive:new Proxy(h,{get(t,n){let r=b;if(!r)throw d()??Error(`${e.label} source archive is closed`);let i=_(()=>Reflect.get(r,n,r));return typeof i==`function`?(...t)=>{let r=b;if(!r)throw d()??Error(`${e.label} source archive is closed`);return _(()=>{let e=Reflect.get(r,n,r);return Reflect.apply(e,r,t)})}:i}}),sourceByteLength:t.byteLength,closeArchive(){if(y)return;y=!0,u?.live.delete(x);let t=b;b=void 0,t&&f(t,e.closeNative,_)}}}})}async function d(e){let t=new URL(e),n=globalThis.process;if(t.protocol===`file:`&&n?.versions?.node){let{readFile:e}=await import(`node:fs/promises`);return e(t)}return t}function f(e,t,n){let r,s=!1;try{n(()=>t(e))}catch(e){s=!0,r=e}if(a(r)||r instanceof i)o(e);else try{n(()=>e.free())}catch(t){s||(s=!0,r=t),(a(t)||t instanceof i)&&o(e)}if(s)throw r}function p(e,t,n){return t?(m(t,n),new Promise((r,i)=>{let a=()=>{o();try{m(t,n)}catch(e){i(e)}},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})})):e}function m(e,t){if(!e?.aborted)return;let n=Error(`${t} direct source was aborted`);throw n.name=`AbortError`,n}function h(e){return typeof e==`string`?Error(e):e}function g(e,t){return u({label:`legacy XLS`,format:`xls`,loadGlue:e,resolveWasm:t,construct:(e,t)=>new e.LegacyXlsWorkbook(t),closeNative:e=>e.close_workbook_session()})}function _(e,t){if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} maxInputBytes is invalid`);return e}}function v(e,t){if(typeof e!=`object`||!e)throw TypeError(`${t} source module config must be an object`);let n=e;for(let e of Object.keys(n))if(e!==`wasmUrl`&&e!==`maxInputBytes`)throw TypeError(`${t} source module config has an unknown field`);let r=_(n.maxInputBytes,t);if(typeof n.wasmUrl!=`string`)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);return{wasmUrl:n.wasmUrl,...r===void 0?{}:{maxInputBytes:r}}}var y=n({LegacyXlsWorkbook:()=>P,default:()=>M,initSync:()=>j,reinit:()=>N});function b(){return{__proto__:null,"./legacy_xls_direct_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(C(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(C(e,t))}finally{U.__wbindgen_free(n,r,1)}},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,n){Uint8Array.prototype.set.call(x(e,t),n)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=E(n,U.__wbindgen_malloc,U.__wbindgen_realloc),i=H;S().setInt32(e+4,i,!0),S().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return C(e,t)},__wbindgen_init_externref_table:function(){let e=U.__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 x(e,t){return e>>>=0,w().subarray(e/1,e/1+t)}function S(){return(I===null||I.buffer.detached===!0||I.buffer.detached===void 0&&I.buffer!==U.memory.buffer)&&(I=new DataView(U.memory.buffer)),I}function C(e,t){return e>>>=0,O(e,t)}function w(){return(L===null||L.byteLength===0)&&(L=new Uint8Array(U.memory.buffer)),L}function T(e){return e==null}function E(e,t,n){if(n===void 0){let n=V.encode(e),r=t(n.length,1)>>>0;return w().subarray(r,r+n.length).set(n),H=n.length,r}let r=e.length,i=t(r,1)>>>0,a=w(),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=w().subarray(i+o,i+r),a=V.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return H=o,i}function D(e){let t=U.__wbindgen_externrefs.get(e);return U.__externref_table_dealloc(e),t}function O(e,t){return B+=t,B>=z&&(R=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),R.decode(),B=t),R.decode(w().subarray(e,e+t))}function k(e,t){return U=e.exports,I=null,L=null,U.__wbindgen_start(),U}async function A(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}}function j(e){if(U!==void 0)return U;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=b();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),k(new WebAssembly.Instance(e,t),e)}async function M(e){if(U!==void 0)return U;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=b();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await A(await e,t);return k(n,r)}async function N(e){return U=void 0,I=null,L=null,M(e)}var P,F,I,L,R,z,B,V,H,U,W=t(()=>{P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){let e=this.__destroy_into_raw();U.__wbg_legacyxlsworkbook_free(e,0)}acknowledge_sheet_cursor_terminal(){let e=U.legacyxlsworkbook_acknowledge_sheet_cursor_terminal(this.__wbg_ptr);if(e[1])throw D(e[0])}assert_healthy(){let e=U.legacyxlsworkbook_assert_healthy(this.__wbg_ptr);if(e[1])throw D(e[0])}cancel_sheet_cursor(){U.legacyxlsworkbook_cancel_sheet_cursor(this.__wbg_ptr)}close_sheet_cursor(){U.legacyxlsworkbook_close_sheet_cursor(this.__wbg_ptr)}close_workbook_session(){let e=U.legacyxlsworkbook_close_workbook_session(this.__wbg_ptr);if(e[1])throw D(e[0])}configure_host_layout(e){let t=U.legacyxlsworkbook_configure_host_layout(this.__wbg_ptr,!T(e),T(e)?0:e);if(t[1])throw D(t[0])}extract_image(e){let t=E(e,U.__wbindgen_malloc,U.__wbindgen_realloc),n=H,r=U.legacyxlsworkbook_extract_image(this.__wbg_ptr,t,n);if(r[3])throw D(r[2]);var i=x(r[0],r[1]).slice();return U.__wbindgen_free(r[0],r[1]*1,1),i}host_layout_request(){let e=U.legacyxlsworkbook_host_layout_request(this.__wbg_ptr);if(e[3])throw D(e[2]);var t=x(e[0],e[1]).slice();return U.__wbindgen_free(e[0],e[1]*1,1),t}constructor(e){let t=U.legacyxlsworkbook_new(e);if(t[2])throw D(t[1]);return this.__wbg_ptr=t[0]>>>0,F.register(this,this.__wbg_ptr,this),this}open_sheet_cursor(e,t){let n=E(t,U.__wbindgen_malloc,U.__wbindgen_realloc),r=H,i=U.legacyxlsworkbook_open_sheet_cursor(this.__wbg_ptr,e,n,r);if(i[1])throw D(i[0])}parse(){let e=U.legacyxlsworkbook_parse(this.__wbg_ptr);if(e[3])throw D(e[2]);var t=x(e[0],e[1]).slice();return U.__wbindgen_free(e[0],e[1]*1,1),t}pull_sheet_cursor(e){let t=U.legacyxlsworkbook_pull_sheet_cursor(this.__wbg_ptr,e);if(t[3])throw D(t[2]);var n=x(t[0],t[1]).slice();return U.__wbindgen_free(t[0],t[1]*1,1),n}sheet_cursor_pull_finished(){return U.legacyxlsworkbook_sheet_cursor_pull_finished(this.__wbg_ptr)!==0}},Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free),F=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>U.__wbg_legacyxlsworkbook_free(e>>>0,1)),I=null,L=null,R=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),R.decode(),z=2146435072,B=0,V=new TextEncoder,`encodeInto`in V||(V.encodeInto=function(e,t){let n=V.encode(e);return t.set(n),{read:e.length,written:n.length}}),H=0});const G=g(()=>Promise.resolve().then(()=>(W(),y)),d);async function K(e,t,n){let{wasmUrl:r,maxInputBytes:i}=v(t,`legacy XLS`);if(i!==void 0&&e.byteLength>i)throw RangeError(`legacy XLS input exceeds the configured size limit`);let a=await G.open(e,r,n);return Object.freeze({archive:a.archive,close:()=>a.closeArchive()})}export{K as openModelSource};
|
|
1
|
+
var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},r=class e extends Error{code=`parser-crashed`;constructor(t){super(t),this.name=`WasmTrapError`,Object.setPrototypeOf(this,e.prototype)}};function i(e){let t=globalThis.WebAssembly?.RuntimeError;return t&&e instanceof t||e instanceof RangeError?!0:e instanceof Error?e.name===`RuntimeError`||e.name===`CompileError`||e.name===`LinkError`||e.name===`InternalError`||e.name===`OOMError`:!1}function a(e){try{if((typeof e!=`object`||!e)&&typeof e!=`function`)return;let t=Reflect.get(e,`__destroy_into_raw`);typeof t==`function`&&Reflect.apply(t,e,[])}catch{}}const o=new WeakMap,s=new Set([`http:`,`https:`,`file:`,`blob:`,`data:`]);function c(e,t){if(typeof e!=`string`||e.length===0||e.trim()!==e)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);let n;try{n=new URL(e)}catch{throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`)}if(!s.has(n.protocol))throw TypeError(`${t} wasmUrl protocol is unsupported`);return e}function l(e){let t,n,s,l,u=()=>s??l?.failure,h=t=>{if(!i(t))throw m(t);let n=u()??new r(`${e.label} WASM runtime trapped and is unavailable`);if(l){l.failure??=n;for(let e of l.live)e.invalidate();l.live.clear()}else s=n;throw n},g=t=>{let n=u();if(n)throw n;try{return t()}catch(t){return h(e.mapNativeError?e.mapNativeError(t):t)}},_=r=>t?r===n?t:Promise.reject(Error(`${e.label} source engine is pinned to another WASM URL`)):(n=r,t=e.loadGlue().then(async t=>{if(l=o.get(t),l||(l={live:new Set},o.set(t,l)),l.failure)throw l.failure;try{let n=await e.resolveWasm(r);await t.default({module_or_path:n})}catch(e){return h(e)}return t}),t);return Object.freeze({async open(t,n,r,i){let s=u();if(s)throw s;let m=c(n,e.label);p(r,e.label);let v;try{v=await f(_(m),r,e.label)}catch(e){return h(e)}if(l=o.get(v),!l)throw Error(`${e.label} source runtime identity is unavailable`);if(l.failure)throw l.failure;p(r,e.label);let y;try{y=g(()=>e.construct(v,t,i)),p(r,e.label)}catch(t){if(y)try{d(y,e.closeNative,g)}catch{}throw t}let b=!1,x=y,S={invalidate(){let e=x;x=void 0,a(e)}};return l.live.add(S),{archive:new Proxy(y,{get(t,n){let r=x;if(!r)throw u()??Error(`${e.label} source archive is closed`);let i=g(()=>Reflect.get(r,n,r));return typeof i==`function`?(...t)=>{let r=x;if(!r)throw u()??Error(`${e.label} source archive is closed`);return g(()=>{let e=Reflect.get(r,n,r);return Reflect.apply(e,r,t)})}:i}}),sourceByteLength:t.byteLength,closeArchive(){if(b)return;b=!0,l?.live.delete(S);let t=x;x=void 0,t&&d(t,e.closeNative,g)}}}})}async function u(e){let t=new URL(e),n=globalThis.process;if(t.protocol===`file:`&&n?.versions?.node){let{readFile:e}=await import(`node:fs/promises`);return e(t)}return t}function d(e,t,n){let o,s=!1;try{n(()=>t(e))}catch(e){s=!0,o=e}if(i(o)||o instanceof r)a(e);else try{n(()=>e.free())}catch(t){s||(s=!0,o=t),(i(t)||t instanceof r)&&a(e)}if(s)throw o}function f(e,t,n){return t?(p(t,n),new Promise((r,i)=>{let a=()=>{o();try{p(t,n)}catch(e){i(e)}},o=()=>t.removeEventListener(`abort`,a);t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{o(),r(e)},e=>{o(),i(e)})})):e}function p(e,t){if(!e?.aborted)return;let n=Error(`${t} direct source was aborted`);throw n.name=`AbortError`,n}function m(e){return typeof e==`string`?Error(e):e}function h(e,t){return typeof e==`string`?e.startsWith(`LEGACY_UNSUPPORTED_ENCRYPTION:`)?Error(`OOXML_SOURCE_UNSUPPORTED_ENCRYPTION`):e.startsWith(`UNSUPPORTED:`)?Error(`MODEL_SOURCE_UNSUPPORTED:${JSON.stringify({format:t,reason:`source-subset`})}`):Error(e):e}function g(e,t){return l({label:`legacy XLS`,mapNativeError:e=>h(e,`xls`),loadGlue:e,resolveWasm:t,construct:(e,t)=>new e.LegacyXlsWorkbook(t),closeNative:e=>e.close_workbook_session()})}function _(e,t){if(e!==void 0){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<=0)throw RangeError(`${t} maxInputBytes is invalid`);return e}}function v(e,t){if(typeof e!=`object`||!e)throw TypeError(`${t} source module config must be an object`);let n=e;for(let e of Object.keys(n))if(e!==`wasmUrl`&&e!==`maxInputBytes`)throw TypeError(`${t} source module config has an unknown field`);let r=_(n.maxInputBytes,t);if(typeof n.wasmUrl!=`string`)throw TypeError(`${t} wasmUrl must be a nonempty absolute URL`);return{wasmUrl:n.wasmUrl,...r===void 0?{}:{maxInputBytes:r}}}var y=n({LegacyXlsWorkbook:()=>P,default:()=>M,initSync:()=>j,reinit:()=>N});function b(){return{__proto__:null,"./legacy_xls_direct_bg.js":{__proto__:null,__wbg___wbindgen_throw_6b64449b9b9ed33c:function(e,t){throw Error(C(e,t))},__wbg_error_a6fa202b58aa1cd3:function(e,t){let n,r;try{n=e,r=t,console.error(C(e,t))}finally{U.__wbindgen_free(n,r,1)}},__wbg_length_9f1775224cf1d815:function(e){return e.length},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(e,t,n){Uint8Array.prototype.set.call(x(e,t),n)},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=E(n,U.__wbindgen_malloc,U.__wbindgen_realloc),i=H;S().setInt32(e+4,i,!0),S().setInt32(e+0,r,!0)},__wbindgen_cast_0000000000000001:function(e,t){return C(e,t)},__wbindgen_init_externref_table:function(){let e=U.__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 x(e,t){return e>>>=0,w().subarray(e/1,e/1+t)}function S(){return(I===null||I.buffer.detached===!0||I.buffer.detached===void 0&&I.buffer!==U.memory.buffer)&&(I=new DataView(U.memory.buffer)),I}function C(e,t){return e>>>=0,O(e,t)}function w(){return(L===null||L.byteLength===0)&&(L=new Uint8Array(U.memory.buffer)),L}function T(e){return e==null}function E(e,t,n){if(n===void 0){let n=V.encode(e),r=t(n.length,1)>>>0;return w().subarray(r,r+n.length).set(n),H=n.length,r}let r=e.length,i=t(r,1)>>>0,a=w(),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=w().subarray(i+o,i+r),a=V.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return H=o,i}function D(e){let t=U.__wbindgen_externrefs.get(e);return U.__externref_table_dealloc(e),t}function O(e,t){return B+=t,B>=z&&(R=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),R.decode(),B=t),R.decode(w().subarray(e,e+t))}function k(e,t){return U=e.exports,I=null,L=null,U.__wbindgen_start(),U}async function A(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}}function j(e){if(U!==void 0)return U;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module:e}=e:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=b();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),k(new WebAssembly.Instance(e,t),e)}async function M(e){if(U!==void 0)return U;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=b();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await A(await e,t);return k(n,r)}async function N(e){return U=void 0,I=null,L=null,M(e)}var P,F,I,L,R,z,B,V,H,U,W=t(()=>{P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){let e=this.__destroy_into_raw();U.__wbg_legacyxlsworkbook_free(e,0)}acknowledge_sheet_cursor_terminal(){let e=U.legacyxlsworkbook_acknowledge_sheet_cursor_terminal(this.__wbg_ptr);if(e[1])throw D(e[0])}assert_healthy(){let e=U.legacyxlsworkbook_assert_healthy(this.__wbg_ptr);if(e[1])throw D(e[0])}cancel_sheet_cursor(){U.legacyxlsworkbook_cancel_sheet_cursor(this.__wbg_ptr)}close_sheet_cursor(){U.legacyxlsworkbook_close_sheet_cursor(this.__wbg_ptr)}close_workbook_session(){let e=U.legacyxlsworkbook_close_workbook_session(this.__wbg_ptr);if(e[1])throw D(e[0])}configure_host_layout(e){let t=U.legacyxlsworkbook_configure_host_layout(this.__wbg_ptr,!T(e),T(e)?0:e);if(t[1])throw D(t[0])}extract_image(e){let t=E(e,U.__wbindgen_malloc,U.__wbindgen_realloc),n=H,r=U.legacyxlsworkbook_extract_image(this.__wbg_ptr,t,n);if(r[3])throw D(r[2]);var i=x(r[0],r[1]).slice();return U.__wbindgen_free(r[0],r[1]*1,1),i}host_layout_request(){let e=U.legacyxlsworkbook_host_layout_request(this.__wbg_ptr);if(e[3])throw D(e[2]);var t=x(e[0],e[1]).slice();return U.__wbindgen_free(e[0],e[1]*1,1),t}constructor(e){let t=U.legacyxlsworkbook_new(e);if(t[2])throw D(t[1]);return this.__wbg_ptr=t[0]>>>0,F.register(this,this.__wbg_ptr,this),this}open_sheet_cursor(e,t){let n=E(t,U.__wbindgen_malloc,U.__wbindgen_realloc),r=H,i=U.legacyxlsworkbook_open_sheet_cursor(this.__wbg_ptr,e,n,r);if(i[1])throw D(i[0])}parse(){let e=U.legacyxlsworkbook_parse(this.__wbg_ptr);if(e[3])throw D(e[2]);var t=x(e[0],e[1]).slice();return U.__wbindgen_free(e[0],e[1]*1,1),t}pull_sheet_cursor(e){let t=U.legacyxlsworkbook_pull_sheet_cursor(this.__wbg_ptr,e);if(t[3])throw D(t[2]);var n=x(t[0],t[1]).slice();return U.__wbindgen_free(t[0],t[1]*1,1),n}sheet_cursor_pull_finished(){return U.legacyxlsworkbook_sheet_cursor_pull_finished(this.__wbg_ptr)!==0}},Symbol.dispose&&(P.prototype[Symbol.dispose]=P.prototype.free),F=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>U.__wbg_legacyxlsworkbook_free(e>>>0,1)),I=null,L=null,R=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),R.decode(),z=2146435072,B=0,V=new TextEncoder,`encodeInto`in V||(V.encodeInto=function(e,t){let n=V.encode(e);return t.set(n),{read:e.length,written:n.length}}),H=0});const G=g(()=>Promise.resolve().then(()=>(W(),y)),u);async function K(e,t,n){let{wasmUrl:r,maxInputBytes:i}=v(t,`legacy XLS`);if(i!==void 0&&e.byteLength>i)throw RangeError(`legacy XLS input exceeds the configured size limit`);let a=await G.open(e,r,n);return Object.freeze({archive:a.archive,close:()=>a.closeArchive()})}export{K as openModelSource};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/ppt.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./legacy-source-
|
|
1
|
+
import { n as e, r as t, t as n } from "./legacy-source-DmlTJjiH.js";
|
|
2
2
|
//#region src/wasm-direct-ppt/legacy_ppt_direct_bg.wasm?url
|
|
3
3
|
var r = new URL("legacy_ppt_direct_bg.wasm", import.meta.url).href, i = new URL("legacy-ppt-source-module.mjs", import.meta.url).href;
|
|
4
4
|
//#endregion
|
package/dist/xls.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./legacy-source-
|
|
1
|
+
import { n as e, r as t, t as n } from "./legacy-source-DmlTJjiH.js";
|
|
2
2
|
//#region src/wasm-direct-xls/legacy_xls_direct_bg.wasm?url
|
|
3
3
|
var r = new URL("legacy_xls_direct_bg.wasm", import.meta.url).href, i = new URL("legacy-xls-source-module.mjs", import.meta.url).href;
|
|
4
4
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silurus/ooxml-legacy-office",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.1",
|
|
4
4
|
"description": "Optional legacy Office (DOC/XLS/PPT) model sources for @silurus/ooxml",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Yuki Yokotani <silurus.dev@gmail.com>",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"typescript": "^7.0.2",
|
|
40
40
|
"vite": "^8.0.8",
|
|
41
41
|
"vitest": "^4.1.4",
|
|
42
|
-
"@silurus/ooxml-core": "0.
|
|
43
|
-
"@silurus/ooxml": "0.
|
|
42
|
+
"@silurus/ooxml-core": "0.90.1",
|
|
43
|
+
"@silurus/ooxml": "0.90.1"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"wasm"
|
|
62
62
|
],
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@silurus/ooxml": "0.
|
|
64
|
+
"@silurus/ooxml": "0.90.1"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"wasm:direct-doc": "cd parser && wasm-pack build --target web --out-dir ../src/wasm-direct-doc --out-name legacy_doc_direct --features direct-doc && node ../../../scripts/append-wasm-reinit.mjs ../src/wasm-direct-doc/legacy_doc_direct.js",
|