@nutrient-sdk/viewer 1.10.0-nightly.20251205 → 1.10.0-nightly.20251206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/ACKNOWLEDGEMENTS.md +271 -0
  2. package/dist/index.d.ts +30 -3
  3. package/dist/nutrient-viewer-lib/{chunk-848-181339cf58bae987.js → chunk-848-7365ea17ef07d817.js} +1 -1
  4. package/dist/nutrient-viewer-lib/{chunk-core-worker-660d08656d6dd822.js → chunk-core-worker-1c7ab9173916f352.js} +2 -2
  5. package/dist/nutrient-viewer-lib/chunk-gdpicture-340b14a472e42e91.js +13 -0
  6. package/dist/nutrient-viewer-lib/chunk-gdpicture-worker-da363be15a82d5fe.js +13 -0
  7. package/dist/nutrient-viewer-lib/{chunk-lazy-sha-623de5651bacc7de.js → chunk-lazy-sha-d78648d2412cbd57.js} +1 -1
  8. package/dist/nutrient-viewer-lib/{chunk-locale-ar-b26b4ddfa2052721.js → chunk-locale-ar-516c2e3ab7e2f944.js} +1 -1
  9. package/dist/nutrient-viewer-lib/{chunk-locale-cs-5418541253f2211a.js → chunk-locale-cs-b60a61d55774e128.js} +1 -1
  10. package/dist/nutrient-viewer-lib/{chunk-locale-cy-c4c4ee7f7d24588e.js → chunk-locale-cy-5fbebf566c45cf63.js} +1 -1
  11. package/dist/nutrient-viewer-lib/{chunk-locale-da-32b4dd4f1dea3f76.js → chunk-locale-da-01ca83d545769c09.js} +1 -1
  12. package/dist/nutrient-viewer-lib/{chunk-locale-de-75d728a503651d25.js → chunk-locale-de-fe0559fa9cbfe34e.js} +1 -1
  13. package/dist/nutrient-viewer-lib/{chunk-locale-el-762211dc67ef1df1.js → chunk-locale-el-cfd2c9f499cbd75a.js} +1 -1
  14. package/dist/nutrient-viewer-lib/{chunk-locale-en-GB-07ec59c1a02439f4.js → chunk-locale-en-GB-bccb22835ccbe7bd.js} +1 -1
  15. package/dist/nutrient-viewer-lib/{chunk-locale-es-96cdaa6bb6378886.js → chunk-locale-es-e1991d10cbeda796.js} +1 -1
  16. package/dist/nutrient-viewer-lib/{chunk-locale-fi-0bbe5ca1d3a453f5.js → chunk-locale-fi-3453a7f1e1037a0f.js} +1 -1
  17. package/dist/nutrient-viewer-lib/{chunk-locale-fr-a660096b1302ee5c.js → chunk-locale-fr-12fe1431d1bb10b0.js} +1 -1
  18. package/dist/nutrient-viewer-lib/{chunk-locale-fr-CA-287125760156c603.js → chunk-locale-fr-CA-2b8b7e04cb729dd1.js} +1 -1
  19. package/dist/nutrient-viewer-lib/{chunk-locale-he-2a8f76ebbb9ff611.js → chunk-locale-he-f2f13bfb6bc354e8.js} +1 -1
  20. package/dist/nutrient-viewer-lib/{chunk-locale-hr-5925cca27f96b9cd.js → chunk-locale-hr-3ac0b72939b4add4.js} +1 -1
  21. package/dist/nutrient-viewer-lib/{chunk-locale-id-33e606ed0d464458.js → chunk-locale-id-ff45ea675dea593b.js} +1 -1
  22. package/dist/nutrient-viewer-lib/{chunk-locale-it-edbfa81306437b87.js → chunk-locale-it-8dc3164807f75f3d.js} +1 -1
  23. package/dist/nutrient-viewer-lib/{chunk-locale-ja-85422e3599d06019.js → chunk-locale-ja-0b4ced4980f7ff98.js} +1 -1
  24. package/dist/nutrient-viewer-lib/{chunk-locale-ko-d5b2d37fa8a593d5.js → chunk-locale-ko-3ec7d018b0faa4b7.js} +1 -1
  25. package/dist/nutrient-viewer-lib/{chunk-locale-ms-2bde5dec6f8f948e.js → chunk-locale-ms-cc0da67b38ae4a6d.js} +1 -1
  26. package/dist/nutrient-viewer-lib/{chunk-locale-nb-NO-95cb841dc3996809.js → chunk-locale-nb-NO-cf29fa2f836e77cb.js} +1 -1
  27. package/dist/nutrient-viewer-lib/{chunk-locale-nl-8ec9b154d816bcff.js → chunk-locale-nl-c1ca6d605719659d.js} +1 -1
  28. package/dist/nutrient-viewer-lib/{chunk-locale-pl-12737c99abe6928b.js → chunk-locale-pl-140b67b253fa61f4.js} +1 -1
  29. package/dist/nutrient-viewer-lib/{chunk-locale-pt-0798a728c444f1cd.js → chunk-locale-pt-9099778273267853.js} +1 -1
  30. package/dist/nutrient-viewer-lib/{chunk-locale-pt-PT-575e90998f7973ea.js → chunk-locale-pt-PT-d243986a214f9be1.js} +1 -1
  31. package/dist/nutrient-viewer-lib/{chunk-locale-ru-e7cb8cb8f4ac54d4.js → chunk-locale-ru-ff4acc4117f88086.js} +1 -1
  32. package/dist/nutrient-viewer-lib/{chunk-locale-sk-aff50b20b1ba108a.js → chunk-locale-sk-9f32baffc5f76f77.js} +1 -1
  33. package/dist/nutrient-viewer-lib/{chunk-locale-sl-b09f8857f38a2c87.js → chunk-locale-sl-6c53ef2cbb442a51.js} +1 -1
  34. package/dist/nutrient-viewer-lib/{chunk-locale-sv-cb7d55039ee3432a.js → chunk-locale-sv-a8a0645e31bb6824.js} +1 -1
  35. package/dist/nutrient-viewer-lib/{chunk-locale-th-b7b7b603464ee1ea.js → chunk-locale-th-bf0325e92f30b1ef.js} +1 -1
  36. package/dist/nutrient-viewer-lib/{chunk-locale-tr-862abc5f6bd2d6f2.js → chunk-locale-tr-fe5628fe8de05cc1.js} +1 -1
  37. package/dist/nutrient-viewer-lib/{chunk-locale-uk-f028b73c6dff25b3.js → chunk-locale-uk-6fdf57ffca938e02.js} +1 -1
  38. package/dist/nutrient-viewer-lib/{chunk-locale-zh-Hans-dc694fe41ff1dd6c.js → chunk-locale-zh-Hans-9eb9f739b88e9560.js} +1 -1
  39. package/dist/nutrient-viewer-lib/{chunk-locale-zh-Hant-b0a19071e6d0adf4.js → chunk-locale-zh-Hant-dd87804e36d67c71.js} +1 -1
  40. package/dist/nutrient-viewer-lib/{chunk-offscreen-renderer-worker-023873d91c19f15c.js → chunk-offscreen-renderer-worker-60821d3ede791619.js} +2 -2
  41. package/dist/nutrient-viewer-lib/{chunk-server-8dfd5f2050dd1f00.js → chunk-server-fb7bfaf9aa90350a.js} +2 -2
  42. package/dist/nutrient-viewer-lib/{chunk-server-instant-c891d75b95e43ff1.js → chunk-server-instant-832919cb1b37f300.js} +1 -1
  43. package/dist/nutrient-viewer-lib/{chunk-server-rest-8c3a512b32ddb64e.js → chunk-server-rest-2bdbc777c09ce26a.js} +1 -1
  44. package/dist/nutrient-viewer-lib/{chunk-standalone-a9922a80beaf1909.js → chunk-standalone-278c2fc22f44c3ba.js} +2 -2
  45. package/dist/nutrient-viewer-lib/{chunk-standalone-server-786e68e302701159.js → chunk-standalone-server-94d1855f3fdc454b.js} +2 -2
  46. package/dist/nutrient-viewer-lib/core-worker.js +2 -2
  47. package/dist/nutrient-viewer-lib/dark-402cc98d3d69bff8.css +1 -1
  48. package/dist/nutrient-viewer-lib/gdpicture-worker.js +2 -2
  49. package/dist/nutrient-viewer-lib/{nutrient-viewer-1.10.0-4ce73af.css → nutrient-viewer-1.10.0-e6c760d.css} +1 -1
  50. package/dist/nutrient-viewer-lib/nutrient-viewer-9303291e7f6b26aa.wasm.js +1 -1
  51. package/dist/nutrient-viewer-lib/{nutrient-viewer-ab4786a6feb09ffe.wasm → nutrient-viewer-95fc066356500c55.wasm} +0 -0
  52. package/dist/nutrient-viewer-lib/offscreen-render-worker.js +1 -1
  53. package/dist/nutrient-viewer.js +2 -2
  54. package/package.json +1 -1
  55. package/dist/nutrient-viewer-lib/chunk-gdpicture-39aaf9cfcba51571.js +0 -13
  56. package/dist/nutrient-viewer-lib/chunk-gdpicture-worker-fc2b6e7e0204dc37.js +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutrient-sdk/viewer",
3
- "version": "1.10.0-nightly.20251205",
3
+ "version": "1.10.0-nightly.20251206",
4
4
  "description": "View and annotate PDF files in your web app. Full support for mobile and desktop. Runs in the browser using WASM.",
5
5
  "keywords": [
6
6
  "pdf",
@@ -1,13 +0,0 @@
1
- /*!
2
- * Nutrient Web SDK 1.10.0-4ce73af (https://www.nutrient.io/sdk/web)
3
- *
4
- * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
- *
6
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
7
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
8
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
9
- * This notice may not be removed from this file.
10
- *
11
- * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
12
- */
13
- "use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[860],{60919:(e,t,n)=>{n.r(t),n.d(t,{Conformance:()=>r,GdPicture:()=>w,GdPictureWorker:()=>b,getBrowserSpawner:()=>k});var o=n(85409),s=n(25030);let r=function(e){return e[e.pdf_a_1a=0]="pdf_a_1a",e[e.pdf_a_1b=1]="pdf_a_1b",e[e.pdf_a_2a=2]="pdf_a_2a",e[e.pdf_a_2u=3]="pdf_a_2u",e[e.pdf_a_2b=4]="pdf_a_2b",e[e.pdf_a_3a=5]="pdf_a_3a",e[e.pdf_a_3u=6]="pdf_a_3u",e[e.pdf_a_3b=7]="pdf_a_3b",e[e.pdf_a_4=8]="pdf_a_4",e[e.pdf_a_4e=9]="pdf_a_4e",e[e.pdf_a_4f=10]="pdf_a_4f",e}({});const a="/create.pdf",i="/save.pdf",l="/create.docx",d="/save.docx",u="/templateData.json",c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let p=null,f=null;function m(e){let t;(0,o.V1)(f,"GdPicture WebAssembly is not loaded.");for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];for(const e of s)t=Object.assign(s[0],e);const a=JSON.stringify({type:e,...t}),i=JSON.parse(f.CommandHandler(a));if(!i.success)throw new Error(i.errorReason+": "+i.errorMessage+"\n"+i.error);return i}class w{_mountCustomFonts(e,t){(0,o.V1)(p,"WebAssembly module not loaded."),p.FS.mkdir(t);{const n=c?p.FS.filesystems.WORKERFS:p.FS.filesystems.MEMFS;p.FS.mount(n,{blobs:e},t)}}async loadModule(e,t,n,o,r,a,i){const{Assemblies:l,Module:d}=await async function(e,t){if("string"==typeof e){const n="nutrient-viewer-lib/",o=`${n}gdpicture-174da64a/jit`,s=`${n}gdpicture-174da64a/aot`;let r,a;t?(r=`${e}${s}/initDotnet.js`,a=`${e}${s}`):(r=`${e}${o}/initDotnet.js`,a=`${e}${o}`);const{initDotnet:i}=await import(r);return i(a,((e,t,n,o,s)=>"blazor.boot.json"===t?fetch(n,{credentials:"same-origin"}):null))}throw new Error("GdPicture WASM loader not implemented")}(e,t);f=l.GdPictureWasm.API,p=d,m("gdpicture/setLicense",{origin:n},{licenseKey:o||"DEMO_PSPDFKIT_WEB"});const u=r?"/fonts":"";if(r&&!p.FS.analyzePath(u).exists&&(this._mountCustomFonts(r,u),m("gdpicture/setFonts",{fontPaths:[u]})),a){const e=await(0,s.sw)(a);m("gdpicture/setDynamicFontLoading",{baseUrl:a.split("/").slice(0,-1).join("/"),allowedFonts:e.availableFonts,v:1})}i&&m("gdpicture/setFontSubstitutions",{fontSubstitutions:i})}toPdf(e,t,n,o,s){let l=a;if(s&&"pdf"!==s)l+=`.${s}`;else if(o&&"application/pdf"!==o){const e=o.toLowerCase(),t=S.hasOwnProperty(e)&&S[e];t&&(l+=`.${t}`)}p.FS.writeFile(l,new Uint8Array(e));const d={file:i,format:"pdf",conformance:t&&t in r?t:void 0,officeConversionSettings:F(n)};try{return m("gdpicture/process",{input:{file:l},output:d}),p.FS.readFile(i).buffer}finally{try{p.FS.unlink(i),p.FS.unlink(l)}catch(e){}}}toOffice(e,t){p.FS.writeFile(a,new Uint8Array(e));const n=`/save.${t}`;try{return m("gdpicture/process",{input:{file:a},output:{file:n,format:t}}),p.FS.readFile(n).buffer}finally{try{p.FS.unlink(n),p.FS.unlink(a)}catch(e){console.log(e.message)}}}async populateDocumentTemplate(e,t){let n;p.FS.writeFile(l,new Uint8Array(e));try{n=JSON.stringify(t,null,2)}catch(e){throw new Error("Invalid config data")}p.FS.writeFile(u,n);try{return m("gdpicture/process-office-template",{inputFile:l,modelAndConfigFile:u,outputFile:d}),p.FS.readFile(d).buffer}finally{try{p.FS.unlink(d),p.FS.unlink(u),p.FS.unlink(l)}catch(e){console.log(e.message)}}}}const h={allMarkup:0,simpleMarkup:1,noMarkup:2,original:3},_=h.noMarkup,g={documentMarkupMode:_};function F(e){if(!e)return g;if(!e.documentMarkupMode)return{...e,documentMarkupMode:_};if(!(e.documentMarkupMode in h))throw new Error(`Invalid documentMarkupMode value: ${e.documentMarkupMode}. Allowed values are: ${Object.keys(h).join(", ")}`);return{...e,documentMarkupMode:h[e.documentMarkupMode]}}const S={"application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt"};var y=n(67136);const b=class{getModuleLoadPromise(){return this.moduleLoadPromise}constructor(e){let{baseUrl:t,aot:n,mainThreadOrigin:s,licenseKey:r,customFonts:a,dynamicFonts:i,fontSubstitutions:l,workerSpawner:d,wasmLoaderPath:u}=e;(0,y.A)(this,"requests",new Map),(0,y.A)(this,"nextRequestId",1),(0,y.A)(this,"handleMessage",(e=>{const t=e.data,n=this.requests.get(t.id);(0,o.V1)(n,`No request was made for id ${t.id}.`);const{resolve:s,reject:r}=n;if(this.requests.delete(t.id),t.error){const e=new o.uE(t.error);e.callArgs=t.callArgs,r(e)}else s(t.result)})),this.workerSpawner=d,this.workerSpawner.setMessageHandler(this.handleMessage),this.moduleLoadPromise=this.sendRequest("loadModule",[u?{baseUrl:t,wasmLoaderPath:u}:t,n,s,r,a,i,l])}toOffice(e,t){return this.sendRequest("toOffice",[e,t])}toPdf(e){let t,{document:n,conformance:o,officeConversionSettings:s,contentType:r,extension:a}=e;return o&&(t=o.replace("pdf","pdf_").replaceAll("-","_")),this.sendRequest("toPdf",[n,t,s,r,a])}async populateDocumentTemplate(e,t){return this.sendRequest("populateDocumentTemplate",[e,t])}destroy(){this.workerSpawner?.terminate(),this.workerSpawner=null}async sendRequest(e,t){(0,o.V1)(this.workerSpawner,"GdPictureClient has been destroyed"),this.moduleLoadPromise&&await this.moduleLoadPromise;const n=this.workerSpawner;return new Promise(((o,s)=>{const r=this.assignId(),a=[...t].filter((e=>e instanceof ArrayBuffer));n.postMessage({id:r,action:e,args:t},a),this.requests=this.requests.set(r,{resolve:o,reject:s})}))}assignId(){const e=this.nextRequestId;return this.nextRequestId=this.nextRequestId+1,e}};const k=async function(){let e;if(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]){const{default:t}=await n.e(11).then(n.bind(n,37979));e=new t}else e=new Worker(new URL(n.p+n.u(374),n.b));return{setMessageHandler(t){(0,o.V1)(e,"Worker is null"),e.onmessage=t},postMessage(t,n){e?.postMessage(t,n)},terminate(){e?.terminate(),e=null}}}}}]);
@@ -1,13 +0,0 @@
1
- /*!
2
- * Nutrient Web SDK 1.10.0-4ce73af (https://www.nutrient.io/sdk/web)
3
- *
4
- * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
- *
6
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
7
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
8
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
9
- * This notice may not be removed from this file.
10
- *
11
- * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
12
- */
13
- "use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[11],{37979:(t,e,n)=>{n.d(e,{default:()=>a});var o=n(55512),r=n.n(o);function a(){return r()('/*!\n * Nutrient Web SDK 1.10.0-4ce73af (https://www.nutrient.io/sdk/web)\n *\n * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.\n *\n * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW\n * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.\n * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.\n * This notice may not be removed from this file.\n *\n * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/\n */(()=>{"use strict";const t=function t(e){let n;return n=e instanceof Error?e:new Error(e),Object.setPrototypeOf(n,t.prototype),n};t.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const e=t;function n(t,n){if(!t)throw new e(`Assertion failed: ${n||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",\'[tabindex]:not([tabindex^="-"])\'].join(",");new WeakMap;async function o(t){const n=(await async function(t){try{const n=await fetch(t).catch((n=>{throw new e(`Error fetching dynamic fonts file ${t}. ${n}`)}));if(200!==n.status)throw new e(`Error fetching dynamic fonts file ${t}. Status code: ${n.status}`);return n}catch(t){throw t}}(t)).json().catch((n=>{throw new e(`Error parsing dynamic fonts file ${t}. ${n}`)}));return n}let r=function(t){return t[t.pdf_a_1a=0]="pdf_a_1a",t[t.pdf_a_1b=1]="pdf_a_1b",t[t.pdf_a_2a=2]="pdf_a_2a",t[t.pdf_a_2u=3]="pdf_a_2u",t[t.pdf_a_2b=4]="pdf_a_2b",t[t.pdf_a_3a=5]="pdf_a_3a",t[t.pdf_a_3u=6]="pdf_a_3u",t[t.pdf_a_3b=7]="pdf_a_3b",t[t.pdf_a_4=8]="pdf_a_4",t[t.pdf_a_4e=9]="pdf_a_4e",t[t.pdf_a_4f=10]="pdf_a_4f",t}({});const a="/create.pdf",i="/save.pdf",s="/create.docx",c="/save.docx",l="/templateData.json",d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let f=null,u=null;function p(t){let e;n(u,"GdPicture WebAssembly is not loaded.");for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];for(const t of r)e=Object.assign(r[0],t);const i=JSON.stringify({type:t,...e}),s=JSON.parse(u.CommandHandler(i));if(!s.success)throw new Error(s.errorReason+": "+s.errorMessage+"\\n"+s.error);return s}const m={allMarkup:0,simpleMarkup:1,noMarkup:2,original:3},y=m.noMarkup,_={documentMarkupMode:y};function w(t){if(!t)return _;if(!t.documentMarkupMode)return{...t,documentMarkupMode:y};if(!(t.documentMarkupMode in m))throw new Error(`Invalid documentMarkupMode value: ${t.documentMarkupMode}. Allowed values are: ${Object.keys(m).join(", ")}`);return{...t,documentMarkupMode:m[t.documentMarkupMode]}}const g={"application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt"},b=new class{_mountCustomFonts(t,e){n(f,"WebAssembly module not loaded."),f.FS.mkdir(e);{const n=d?f.FS.filesystems.WORKERFS:f.FS.filesystems.MEMFS;f.FS.mount(n,{blobs:t},e)}}async loadModule(t,e,n,r,a,i,s){const{Assemblies:c,Module:l}=await async function(t,e){if("string"==typeof t){const n="nutrient-viewer-lib/",o=`${n}gdpicture-174da64a/jit`,r=`${n}gdpicture-174da64a/aot`;let a,i;e?(a=`${t}${r}/initDotnet.js`,i=`${t}${r}`):(a=`${t}${o}/initDotnet.js`,i=`${t}${o}`);const{initDotnet:s}=await import(a);return s(i,((t,e,n,o,r)=>"blazor.boot.json"===e?fetch(n,{credentials:"same-origin"}):null))}throw new Error("GdPicture WASM loader not implemented")}(t,e);u=c.GdPictureWasm.API,f=l,p("gdpicture/setLicense",{origin:n},{licenseKey:r||"DEMO_PSPDFKIT_WEB"});const d=a?"/fonts":"";if(a&&!f.FS.analyzePath(d).exists&&(this._mountCustomFonts(a,d),p("gdpicture/setFonts",{fontPaths:[d]})),i){const t=await o(i);p("gdpicture/setDynamicFontLoading",{baseUrl:i.split("/").slice(0,-1).join("/"),allowedFonts:t.availableFonts,v:1})}s&&p("gdpicture/setFontSubstitutions",{fontSubstitutions:s})}toPdf(t,e,n,o,s){let c=a;if(s&&"pdf"!==s)c+=`.${s}`;else if(o&&"application/pdf"!==o){const t=o.toLowerCase(),e=g.hasOwnProperty(t)&&g[t];e&&(c+=`.${e}`)}f.FS.writeFile(c,new Uint8Array(t));const l={file:i,format:"pdf",conformance:e&&e in r?e:void 0,officeConversionSettings:w(n)};try{return p("gdpicture/process",{input:{file:c},output:l}),f.FS.readFile(i).buffer}finally{try{f.FS.unlink(i),f.FS.unlink(c)}catch(t){}}}toOffice(t,e){f.FS.writeFile(a,new Uint8Array(t));const n=`/save.${e}`;try{return p("gdpicture/process",{input:{file:a},output:{file:n,format:e}}),f.FS.readFile(n).buffer}finally{try{f.FS.unlink(n),f.FS.unlink(a)}catch(t){console.log(t.message)}}}async populateDocumentTemplate(t,e){let n;f.FS.writeFile(s,new Uint8Array(t));try{n=JSON.stringify(e,null,2)}catch(t){throw new Error("Invalid config data")}f.FS.writeFile(l,n);try{return p("gdpicture/process-office-template",{inputFile:s,modelAndConfigFile:l,outputFile:c}),f.FS.readFile(c).buffer}finally{try{f.FS.unlink(c),f.FS.unlink(l),f.FS.unlink(s)}catch(t){console.log(t.message)}}}},F=self;F.global=F,F.module={},F.onmessage=async t=>{let e,n,{data:o}=t;try{const t=await b[o.action](...o.args);if(e={id:o.id,result:t},Array.isArray(t)){const e=t.filter((t=>t instanceof ArrayBuffer));e.length>0&&(n=e)}t instanceof ArrayBuffer&&(n=[t])}catch(t){const r=[...o.args].filter((t=>t instanceof ArrayBuffer));r.length>0&&(n=r),e={id:o.id,error:t.message||t.toString(),callArgs:o.args}}F.postMessage(e,n)}})();',"Worker",void 0,void 0)}},55512:t=>{t.exports=function(t,e,n,o){var r=self||window;try{try{var a;try{a=new r.Blob([t])}catch(e){(a=new(r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder)).append(t),a=a.getBlob()}var i=r.URL||r.webkitURL,s=i.createObjectURL(a),c=new r[e](s,n);return i.revokeObjectURL(s),c}catch(o){return new r[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!o)throw Error("Inline worker is not supported");return new r[e](o,n)}}}}]);