/*! * PSPDFKit for Web 2023.4.0 (https://pspdfkit.com/web) * * Copyright (c) 2016-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. * This notice may not be removed from this file. * * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/ */ (self.webpackChunkPSPDFKit=self.webpackChunkPSPDFKit||[]).push([[4516],{14516:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Conformance:()=>a,GdPicture:()=>_,GdPictureClientNative:()=>O,GdPictureWorker:()=>P});var n=r(84121),o=r(50974);const s="pspdfkit-lib/gdpicture-7a46d8716af33da4a74d2750fe22e8fe32214715",i=`${s}/initDotnet.js`;let a;function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t1?r-1:0),s=1;s{const t=e.data,r=this.requests.get(t.id);(0,o.kG)(r,`No request was made for id ${t.id}.`);const{resolve:n,reject:s}=r;if(this.requests=this.requests.delete(t.id),t.error){const e=new o.p2(t.error);e.callArgs=t.callArgs,s(e)}else n(t.result)})),this.worker=new(h()),this.worker.onmessage=this.handleMessage,this.moduleLoadPromise=this.sendRequest("loadModule",[t,r,s,i])}toPdf(e,t){let r;return t&&(r=t.replace("pdf","pdf_").replaceAll("-","_")),this.sendRequest("toPdf",[e,r])}destroy(){var e;null===(e=this.worker)||void 0===e||e.terminate(),this.worker=null}async sendRequest(e,t){(0,o.kG)(this.worker,"GdPictureClient has been destroyed"),this.moduleLoadPromise&&await this.moduleLoadPromise;const r=this.worker;return new Promise(((n,o)=>{const s=this.assignId(),i=[...t].filter((e=>e instanceof ArrayBuffer));r.postMessage({id:s,action:e,args:t},i),this.requests=this.requests.set(s,{resolve:n,reject:o})}))}assignId(){const e=this.nextRequestId;return this.nextRequestId=this.nextRequestId+1,e}};const O=class{constructor(e){let{baseUrl:t,mainThreadOrigin:r,licenseKey:n,customFonts:o}=e;this.gdPicture=new _,this.moduleLoadPromise=this.gdPicture.loadModule(t,r,n,o)}async toPdf(e,t){let r;return this.moduleLoadPromise&&await this.moduleLoadPromise,t&&(r=t.replace("pdf","pdf_").replaceAll("-","_")),this.gdPicture.toPdf(e,r)}destroy(){}}},81414:(e,t,r)=>{e.exports=function(){return r(69855)('/*!\n * PSPDFKit for Web 2023.4.0 (https://pspdfkit.com/web)\n *\n * Copyright (c) 2016-2023 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://pspdfkit.com/acknowledgements/web/\n */(()=>{"use strict";const e=function e(t){let r;return r=t instanceof Error?t:new Error(t),Object.setPrototypeOf(r,e.prototype),r};e.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const t=e;function r(e,r){if(!e)throw new t(`Assertion failed: ${r||"Condition not met"}\\n\\nFor further assistance, please go to: https://pspdfkit.com/support/request`)}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}function a(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}["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;const i="pspdfkit-lib/gdpicture-7a46d8716af33da4a74d2750fe22e8fe32214715",s=`${i}/initDotnet.js`;let f;function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t1?n-1:0),a=1;a{let t,r,{data:n}=e;try{const e=await m[n.action](...n.args);if(t={id:n.id,result:e},Array.isArray(e)){const t=e.filter((e=>e instanceof ArrayBuffer));t.length>0&&(r=t)}e instanceof ArrayBuffer&&(r=[e])}catch(e){const o=[...n.args].filter((e=>e instanceof ArrayBuffer));o.length>0&&(r=o),t={id:n.id,error:e.message||e.toString(),callArgs:n.args}}g.postMessage(t,r)}})();',null)}}}]);