"use strict";exports.id=4645,exports.ids=[4645],exports.modules={64645:(t,e,s)=>{let a,i;s.d(e,{extractText:()=>f,getDocumentProxy:()=>n});let r=globalThis.process?.release?.name==="node";async function n(t,e={}){let{getDocument:s}=await o(),a={};if(r)try{let t=({}).resolve("pdfjs-dist/package.json");a={disableFontFace:!0,standardFontDataUrl:new URL("./standard_fonts/",t).href}}catch{}return await s({data:t,isEvalSupported:!1,useSystemFonts:!0,...a,...e}).promise}async function o(){return a||await c(),a}async function c(t,{reload:e=!1}={}){if(!a||e){if(void 0===globalThis.DOMMatrix&&(globalThis.DOMMatrix=class{a;b;c;d;e;f;constructor(t){Array.isArray(t)&&6===t.length?(this.a=t[0],this.b=t[1],this.c=t[2],this.d=t[3],this.e=t[4],this.f=t[5]):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}translateSelf(t,e=0){return this.e=this.a*t+this.c*e+this.e,this.f=this.b*t+this.d*e+this.f,this}scaleSelf(t,e=t){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this}}),t)try{a=await h(t());return}catch(t){throw Error(`PDF.js could not be resolved: ${t}`)}try{a=await s.e(3607).then(s.bind(s,83607))}catch(t){throw Error(`Serverless PDF.js bundle could not be resolved: ${t}`)}}}async function h(t){let e=await t;return e.default||e}class l{#t=!1;constructor({enableHWA:t=!1}={}){this.#t=t}create(t,e){let s=this._createCanvas(t,e);return{canvas:s,context:s.getContext("2d",{willReadFrequently:!this.#t})}}reset({canvas:t},e,s){if(!t)throw Error("Canvas is not specified");t.width=e,t.height=s}destroy(t){if(!t.canvas)throw Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=void 0,t.context=void 0}_createCanvas(t,e){throw Error("Not implemented")}}async function d(t,e={}){let{mergePages:s=!1}=e,a="object"==typeof t&&null!==t&&"_pdfInfo"in t?t:await n(t),i=await Promise.all(Array.from({length:a.numPages},(t,e)=>u(a,e+1)));return{totalPages:a.numPages,text:s?i.join("\n").replace(/\s+/g," "):i}}async function u(t,e){let s=await t.getPage(e);return(await s.getTextContent()).items.filter(t=>null!=t.str).map(t=>t.str+(t.hasEOL?"\n":"")).join("")}let f=async(...t)=>(await c(),await d(...t))}};