This commit is contained in:
iriska-gri committed 2024-02-02 09:44:05 +03:00
1 parent cddd9a9982
commit 0a692990d5
57 files changed
+90 -57

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
var Ks=Object.defineProperty;var vs=(st,r,h)=>r in st?Ks(st,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):st[r]=h;var gl=(st,r,h)=>(vs(st,typeof r!="symbol"?r+"":r,h),h),Xe=(st,r,h)=>{if(!r.has(st))throw TypeError("Cannot "+h)};var bt=(st,r,h)=>(Xe(st,r,"read from private field"),h?h.call(st):r.get(st)),ll=(st,r,h)=>{if(r.has(st))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(st):r.set(st,h)},ul=(st,r,h,u)=>(Xe(st,r,"write to private field"),u?u.call(st,h):r.set(st,h),h);var Al=(st,r,h,u)=>({set _(T){ul(st,r,T,h)},get _(){return bt(st,r,u)}}),nl=(st,r,h)=>(Xe(st,r,"access private method"),h);import{b6 as commonjsGlobal$1,b7 as getAugmentedNamespace$1,s as shallowRef,al as watchEffect,l as onBeforeUnmount,b8 as defineComponent,b9 as toValue,r as ref,ak as toRef,c as computed,w as watch,D as openBlock,a0 as createElementBlock,a1 as Fragment,a2 as renderList,aS as renderSlot,W as createBaseVNode,a7 as createCommentVNode,aT as normalizeStyle,aZ as pagecounter,t as onBeforeMount,a8 as axiosApiInstance,E as createBlock,F as withCtx,M as VRow,G as createVNode,N as VCol,P as withDirectives,Q as vShow,T as VCard,R as VProgressLinear,x as unref,O as VCardActions,J as VBtn,H as createTextVNode,K as VCardTitle,a6 as toDisplayString,L as VCardText,ba as safetyURL}from"./index-f96028ce.js";import{b as VExpandTransition}from"./index-25008131.js";import{V as VContainer}from"./VContainer-9dd9a996.js";var FileSaver_min={exports:{}};(function(st,r){(function(h,u){u()})(commonjsGlobal$1,function(){function h(p,k){return typeof k>"u"?k={autoBom:!1}:typeof k!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),k={autoBom:!k}),k.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(p.type)?new Blob(["\uFEFF",p],{type:p.type}):p}function u(p,k,_){var J=new XMLHttpRequest;J.open("GET",p),J.responseType="blob",J.onload=function(){O(J.response,k,_)},J.onerror=function(){console.error("could not download file")},J.send()}function T(p){var k=new XMLHttpRequest;k.open("HEAD",p,!1);try{k.send()}catch{}return 200<=k.status&&299>=k.status}function B(p){try{p.dispatchEvent(new MouseEvent("click"))}catch{var k=document.createEvent("MouseEvents");k.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),p.dispatchEvent(k)}}var Q=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof commonjsGlobal$1=="object"&&commonjsGlobal$1.global===commonjsGlobal$1?commonjsGlobal$1:void 0,K=Q.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),O=Q.saveAs||(typeof window!="object"||window!==Q?function(){}:"download"in HTMLAnchorElement.prototype&&!K?function(p,k,_){var J=Q.URL||Q.webkitURL,f=document.createElement("a");k=k||p.name||"download",f.download=k,f.rel="noopener",typeof p=="string"?(f.href=p,f.origin===location.origin?B(f):T(f.href)?u(p,k,_):B(f,f.target="_blank")):(f.href=J.createObjectURL(p),setTimeout(function(){J.revokeObjectURL(f.href)},4e4),setTimeout(function(){B(f)},0))}:"msSaveOrOpenBlob"in navigator?function(p,k,_){if(k=k||p.name||"download",typeof p!="string")navigator.msSaveOrOpenBlob(h(p,_),k);else if(T(p))u(p,k,_);else{var J=document.createElement("a");J.href=p,J.target="_blank",setTimeout(function(){B(J)})}}:function(p,k,_,J){if(J=J||open("","_blank"),J&&(J.document.title=J.document.body.innerText="downloading..."),typeof p=="string")return u(p,k,_);var f=p.type==="application/octet-stream",S=/constructor/i.test(Q.HTMLElement)||Q.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||f&&S||K)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var U=L.result;U=g?U:U.replace(/^data:[^;]*;/,"data:attachment/file;"),J?J.location.href=U:location=U,J=null},L.readAsDataURL(p)}else{var j=Q.URL||Q.webkitURL,C=j.createObjectURL(p);J?J.location=C:location.href=C,J=null,setTimeout(function(){j.revokeObjectURL(C)},4e4)}});Q.saveAs=O.saveAs=O,st.exports=O})})(FileSaver_min);var FileSaver_minExports=FileSaver_min.exports;function commonjsRequire$1(st){throw new Error('Could not dynamically require "'+st+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pdf$1={exports:{}};const __viteBrowserExternal$2={},__viteBrowserExternal$3=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal$2},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace$1(__viteBrowserExternal$3);(function(module,exports){(function(r,h){module.exports=r.pdfjsLib=h()})(globalThis,()=>(()=>{var __webpack_modules__=[,(st,r)=>{var Vl;Object.defineProperty(r,"__esModule",{value:!0}),r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.RenderingIntentFlag=r.PromiseCapability=r.PermissionFlag=r.PasswordResponses=r.Line truncated
`);return wt.join("")}}r.StatTimer=U;function v(Ft,wt){try{const{protocol:pt}=wt?new URL(Ft,wt):new URL(Ft);return pt==="http:"||pt==="https:"}catch{return!1}}function M(Ft){Ft.preventDefault()}function m(Ft,wt=!1){return new Promise((pt,Ct)=>{const $t=document.createElement("script");$t.src=Ft,$t.onload=function(dl){wt&&$t.remove(),pt(dl)},$t.onerror=function(){Ct(new Error(`Cannot load script at: ${$t.src}`))},(document.head||document.documentElement).append($t)})}function q(Ft){console.log("Deprecated API usage: "+Ft)}let $;class P{static toDateObject(wt){if(!wt||typeof wt!="string")return null;$||($=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const pt=$.exec(wt);if(!pt)return null;const Ct=parseInt(pt[1],10);let $t=parseInt(pt[2],10);$t=$t>=1&&$t<=12?$t-1:0;let dl=parseInt(pt[3],10);dl=dl>=1&&dl<=31?dl:1;let rl=parseInt(pt[4],10);rl=rl>=0&&rl<=23?rl:0;let Yl=parseInt(pt[5],10);Yl=Yl>=0&&Yl<=59?Yl:0;let Xl=parseInt(pt[6],10);Xl=Xl>=0&&Xl<=59?Xl:0;const pl=pt[7]||"Z";let Ll=parseInt(pt[8],10);Ll=Ll>=0&&Ll<=23?Ll:0;let yl=parseInt(pt[9],10)||0;return yl=yl>=0&&yl<=59?yl:0,pl==="-"?(rl+=Ll,Yl+=yl):pl==="+"&&(rl-=Ll,Yl-=yl),new Date(Date.UTC(Ct,$t,dl,rl,Yl,Xl))}}r.PDFDateString=P;function Zt(Ft,{scale:wt=1,rotation:pt=0}){const{width:Ct,height:$t}=Ft.attributes.style,dl=[0,0,parseInt(Ct),parseInt($t)];return new f({viewBox:dl,scale:wt,rotation:pt})}function dt(Ft){if(Ft.startsWith("#")){const wt=parseInt(Ft.slice(1),16);return[(wt&16711680)>>16,(wt&65280)>>8,wt&255]}return Ft.startsWith("rgb(")?Ft.slice(4,-1).split(",").map(wt=>parseInt(wt)):Ft.startsWith("rgba(")?Ft.slice(5,-1).split(",").map(wt=>parseInt(wt)).slice(0,3):((0,T.warn)(`Not a valid color format: "${Ft}"`),[0,0,0])}function It(Ft){const wt=document.createElement("span");wt.style.visibility="hidden",document.body.append(wt);for(const pt of Ft.keys()){wt.style.color=pt;const Ct=window.getComputedStyle(wt).color;Ft.set(pt,dt(Ct))}wt.remove()}function xt(Ft){const{a:wt,b:pt,c:Ct,d:$t,e:dl,f:rl}=Ft.getTransform();return[wt,pt,Ct,$t,dl,rl]}function it(Ft){const{a:wt,b:pt,c:Ct,d:$t,e:dl,f:rl}=Ft.getTransform().invertSelf();return[wt,pt,Ct,$t,dl,rl]}function Xt(Ft,wt,pt=!1,Ct=!0){if(wt instanceof f){const{pageWidth:$t,pageHeight:dl}=wt.rawDims,{style:rl}=Ft,Yl=T.FeatureTest.isCSSRoundSupported,Xl=`var(--scale-factor) * ${$t}px`,pl=`var(--scale-factor) * ${dl}px`,Ll=Yl?`round(${Xl}, 1px)`:`calc(${Xl})`,yl=Yl?`round(${pl}, 1px)`:`calc(${pl})`;!pt||wt.rotation%180===0?(rl.width=Ll,rl.height=yl):(rl.width=yl,rl.height=Ll)}Ct&&Ft.setAttribute("data-main-rotation",wt.rotation)}},(st,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseFilterFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0;var u=h(1);class T{constructor(){this.constructor===T&&(0,u.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(k){return"none"}addHCMFilter(k,_){return"none"}addHighlightHCMFilter(k,_,J,f){return"none"}destroy(k=!1){}}r.BaseFilterFactory=T;class B{constructor(){this.constructor===B&&(0,u.unreachable)("Cannot initialize BaseCanvasFactory.")}create(k,_){if(k<=0||_<=0)throw new Error("Invalid canvas size");const J=this._createCanvas(k,_);return{canvas:J,context:J.getContext("2d")}}reset(k,_,J){if(!k.canvas)throw new Error("Canvas is not specified");if(_<=0||J<=0)throw new Error("Invalid canvas size");k.canvas.width=_,k.canvas.height=J}destroy(k){if(!k.canvas)throw new Error("Canvas is not specified");k.canvas.width=0,k.canvas.height=0,k.canvas=null,k.context=null}_createCanvas(k,_){(0,u.unreachable)("Abstract method `_createCanvas` called.")}}r.BaseCanvasFactory=B;class Q{constructor({baseUrl:k=null,isCompressed:_=!0}){this.constructor===Q&&(0,u.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=k,this.isCompressed=_}async fetch({name:k}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!k)throw new Error("CMap name must be specified.");const _=this.baseUrl+k+(this.isCompressed?".bcmap":""),J=this.isCompressed?u.CMapCompressionType.BINARY:u.CMapCompressionType.NONE;return this._fetchData(_,J).catch(f=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${_}`)})}_fetchData(k,_){(0,u.unreachable)("Abstract method `_fetchData` called.")}}r.BaseCMapReaderFactory=Q;class K{constructor({baseUrl:k=null}){this.constructor===K&&(0,u.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=k}async fetch({filename:k}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!k)throw new Error("Font filename must be specified.");const _=`${this.baseUrl}${k}`;return this._fetchData(_).catch(J=>{throw new Error(`Unable to load font data at: ${_}`)})}_fetchData(k){(0,u.unreachable)("Ab Line truncated
`)}return this.compiledGlyphs[p]=new Function("c","size",_.join(""))}return this.compiledGlyphs[p]=function(_,J){for(const f of k)f.cmd==="scale"&&(f.args=[J,-J]),_[f.cmd].apply(_,f.args)}}}r.FontFaceObject=B},(st,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.NodeStandardFontDataFactory=r.NodeFilterFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0;var u=h(7);h(1);const T=function(p){return new Promise((k,_)=>{require$$5.readFile(p,(f,S)=>{if(f||!S){_(new Error(f));return}k(new Uint8Array(S))})})};class B extends u.BaseFilterFactory{}r.NodeFilterFactory=B;class Q extends u.BaseCanvasFactory{_createCanvas(k,_){return require$$5.createCanvas(k,_)}}r.NodeCanvasFactory=Q;class K extends u.BaseCMapReaderFactory{_fetchData(k,_){return T(k).then(J=>({cMapData:J,compressionType:_}))}}r.NodeCMapReaderFactory=K;class O extends u.BaseStandardFontDataFactory{_fetchData(k){return T(k)}}r.NodeStandardFontDataFactory=O},(st,r,h)=>{var Nt,De,Vt,je;Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasGraphics=void 0;var u=h(1),T=h(6),B=h(12),Q=h(13);const K=16,O=100,p=4096,k=15,_=10,J=1e3,f=16;function S(at,R){if(at._removeMirroring)throw new Error("Context is already forwarding operations.");at.__originalSave=at.save,at.__originalRestore=at.restore,at.__originalRotate=at.rotate,at.__originalScale=at.scale,at.__originalTranslate=at.translate,at.__originalTransform=at.transform,at.__originalSetTransform=at.setTransform,at.__originalResetTransform=at.resetTransform,at.__originalClip=at.clip,at.__originalMoveTo=at.moveTo,at.__originalLineTo=at.lineTo,at.__originalBezierCurveTo=at.bezierCurveTo,at.__originalRect=at.rect,at.__originalClosePath=at.closePath,at.__originalBeginPath=at.beginPath,at._removeMirroring=()=>{at.save=at.__originalSave,at.restore=at.__originalRestore,at.rotate=at.__originalRotate,at.scale=at.__originalScale,at.translate=at.__originalTranslate,at.transform=at.__originalTransform,at.setTransform=at.__originalSetTransform,at.resetTransform=at.__originalResetTransform,at.clip=at.__originalClip,at.moveTo=at.__originalMoveTo,at.lineTo=at.__originalLineTo,at.bezierCurveTo=at.__originalBezierCurveTo,at.rect=at.__originalRect,at.closePath=at.__originalClosePath,at.beginPath=at.__originalBeginPath,delete at._removeMirroring},at.save=function(){R.save(),this.__originalSave()},at.restore=function(){R.restore(),this.__originalRestore()},at.translate=function(X,F){R.translate(X,F),this.__originalTranslate(X,F)},at.scale=function(X,F){R.scale(X,F),this.__originalScale(X,F)},at.transform=function(X,F,H,et,lt,Mt){R.transform(X,F,H,et,lt,Mt),this.__originalTransform(X,F,H,et,lt,Mt)},at.setTransform=function(X,F,H,et,lt,Mt){R.setTransform(X,F,H,et,lt,Mt),this.__originalSetTransform(X,F,H,et,lt,Mt)},at.resetTransform=function(){R.resetTransform(),this.__originalResetTransform()},at.rotate=function(X){R.rotate(X),this.__originalRotate(X)},at.clip=function(X){R.clip(X),this.__originalClip(X)},at.moveTo=function(w,X){R.moveTo(w,X),this.__originalMoveTo(w,X)},at.lineTo=function(w,X){R.lineTo(w,X),this.__originalLineTo(w,X)},at.bezierCurveTo=function(w,X,F,H,et,lt){R.bezierCurveTo(w,X,F,H,et,lt),this.__originalBezierCurveTo(w,X,F,H,et,lt)},at.rect=function(w,X,F,H){R.rect(w,X,F,H),this.__originalRect(w,X,F,H)},at.closePath=function(){R.closePath(),this.__originalClosePath()},at.beginPath=function(){R.beginPath(),this.__originalBeginPath()}}class g{constructor(R){this.canvasFactory=R,this.cache=Object.create(null)}getCanvas(R,w,X){let F;return this.cache[R]!==void 0?(F=this.cache[R],this.canvasFactory.reset(F,w,X)):(F=this.canvasFactory.create(w,X),this.cache[R]=F),F}delete(R){delete this.cache[R]}clear(){for(const R in this.cache){const w=this.cache[R];this.canvasFactory.destroy(w),delete this.cache[R]}}}function L(at,R,w,X,F,H,et,lt,Mt,Rt){const[gt,Jt,Dt,qt,vt,cl]=(0,T.getCurrentTransform)(at);if(Jt===0&&Dt===0){const Bt=et*gt+vt,Ft=Math.round(Bt),wt=lt*qt+cl,pt=Math.round(wt),Ct=(et+Mt)*gt+vt,$t=Math.abs(Math.round(Ct)-Ft)||1,dl=(lt+Rt)*qt+cl,rl=Math.abs(Math.round(dl)-pt)||1;return at.setTransform(Math.sign(gt),0,0,Math.sign(qt),Ft,pt),at.drawImage(R,w,X,F,H,0,0,$t,rl),at.setTransform(gt,Jt,Dt,qt,vt,cl),[$t,rl]}if(gt===0&&qt===0){const Bt=lt*Dt+vt,Ft=Math.round(Bt),wt=et*Jt+cl,pt=Math.round(wt),Ct=(lt+Rt)*Dt+vt,$t=Math.abs(Math.round(Ct)-Ft)||1,dl=(et+Mt)*Jt+cl,rl=Math.abs(Math.round(dl)-pt)||1;return at.setTransform(0,Math.sign(Jt),Math.sign(Dt),0,Ft,pt),at.drawImage(R,w,X,F,H,0,0,rl,$t),at.setTransform(gt,Jt,Dt,qt,vt,cl),[rl,$t]}at.drawImage(R,w,X,F,H,et,lt,Mt,Rt);const bl=Math.hypot(gt,Jt),il=Math.hypot(Dt,qt);return[bl*Mt,il*Rt]}function j(at){const{width:R,height:w}=at;if(R>J||w>J)return null;const X=1e3,F=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),H=R+1;let et=new Uint8Array(H*(w+1)),lt,Mt,Rt;const gt=R+7&-8;let Jt=new Uint8Array(gt*w),Dt=0;for(const il of at.data){let Bt=128;for(;Bt>0;)Jt[Dt++]=il&Bt?0:255,Bt>>=1}let qt=0;for(Dt=0,Jt[Dt]!==0&&(et[0]=1,++qt),Mt=1;Mt<R;Mt++)Jt[Dt]!==Jt[Dt+1 Line truncated
`}setFont(M){const m=this.current,q=this.commonObjs.get(M[0]);let $=M[1];m.font=q,this.embedFonts&&!q.missingFile&&!this.embeddedFonts[q.loadedName]&&(this.addFontStyle(q),this.embeddedFonts[q.loadedName]=q),m.fontMatrix=q.fontMatrix||T.FONT_IDENTITY_MATRIX;let P="normal";q.black?P="900":q.bold&&(P="bold");const Zt=q.italic?"italic":"normal";$<0?($=-$,m.fontDirection=-1):m.fontDirection=1,m.fontSize=$,m.fontFamily=q.loadedName,m.fontWeight=P,m.fontStyle=Zt,m.tspan=this.svgFactory.createElement("svg:tspan"),m.tspan.setAttributeNS(null,"y",S(-m.y)),m.xcoords=[],m.ycoords=[]}endText(){var m;const M=this.current;M.textRenderingMode&T.TextRenderingMode.ADD_TO_PATH_FLAG&&((m=M.txtElement)!=null&&m.hasChildNodes())&&(M.element=M.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(M){M>0&&(this.current.lineWidth=M)}setLineCap(M){this.current.lineCap=O[M]}setLineJoin(M){this.current.lineJoin=p[M]}setMiterLimit(M){this.current.miterLimit=M}setStrokeAlpha(M){this.current.strokeAlpha=M}setStrokeRGBColor(M,m,q){this.current.strokeColor=T.Util.makeHexColor(M,m,q)}setFillAlpha(M){this.current.fillAlpha=M}setFillRGBColor(M,m,q){this.current.fillColor=T.Util.makeHexColor(M,m,q),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(M){this.current.strokeColor=this._makeColorN_Pattern(M)}setFillColorN(M){this.current.fillColor=this._makeColorN_Pattern(M)}shadingFill(M){const{width:m,height:q}=this.viewport,$=T.Util.inverseTransform(this.transformMatrix),[P,Zt,dt,It]=T.Util.getAxialAlignedBoundingBox([0,0,m,q],$),xt=this.svgFactory.createElement("svg:rect");xt.setAttributeNS(null,"x",P),xt.setAttributeNS(null,"y",Zt),xt.setAttributeNS(null,"width",dt-P),xt.setAttributeNS(null,"height",It-Zt),xt.setAttributeNS(null,"fill",this._makeShadingPattern(M)),this.current.fillAlpha<1&&xt.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(xt)}_makeColorN_Pattern(M){return M[0]==="TilingPattern"?this._makeTilingPattern(M):this._makeShadingPattern(M)}_makeTilingPattern(M){const m=M[1],q=M[2],$=M[3]||T.IDENTITY_MATRIX,[P,Zt,dt,It]=M[4],xt=M[5],it=M[6],Xt=M[7],zt=`shading${C++}`,[Gt,Nt,Ut,Vt]=T.Util.normalizeRect([...T.Util.applyTransform([P,Zt],$),...T.Util.applyTransform([dt,It],$)]),[Ht,Pt]=T.Util.singularValueDecompose2dScale($),at=xt*Ht,R=it*Pt,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",zt),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",at),w.setAttributeNS(null,"height",R),w.setAttributeNS(null,"x",`${Gt}`),w.setAttributeNS(null,"y",`${Nt}`);const X=this.svg,F=this.transformMatrix,H=this.current.fillColor,et=this.current.strokeColor,lt=this.svgFactory.create(Ut-Gt,Vt-Nt);if(this.svg=lt,this.transformMatrix=$,Xt===2){const Mt=T.Util.makeHexColor(...m);this.current.fillColor=Mt,this.current.strokeColor=Mt}return this.executeOpTree(this.convertOpList(q)),this.svg=X,this.transformMatrix=F,this.current.fillColor=H,this.current.strokeColor=et,w.append(lt.childNodes[0]),this.defs.append(w),`url(#${zt})`}_makeShadingPattern(M){switch(typeof M=="string"&&(M=this.objs.get(M)),M[0]){case"RadialAxial":const m=`shading${C++}`,q=M[3];let $;switch(M[1]){case"axial":const P=M[4],Zt=M[5];$=this.svgFactory.createElement("svg:linearGradient"),$.setAttributeNS(null,"id",m),$.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),$.setAttributeNS(null,"x1",P[0]),$.setAttributeNS(null,"y1",P[1]),$.setAttributeNS(null,"x2",Zt[0]),$.setAttributeNS(null,"y2",Zt[1]);break;case"radial":const dt=M[4],It=M[5],xt=M[6],it=M[7];$=this.svgFactory.createElement("svg:radialGradient"),$.setAttributeNS(null,"id",m),$.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),$.setAttributeNS(null,"cx",It[0]),$.setAttributeNS(null,"cy",It[1]),$.setAttributeNS(null,"r",it),$.setAttributeNS(null,"fx",dt[0]),$.setAttributeNS(null,"fy",dt[1]),$.setAttributeNS(null,"fr",xt);break;default:throw new Error(`Unknown RadialAxial type: ${M[1]}`)}for(const P of q){const Zt=this.svgFactory.createElement("svg:stop");Zt.setAttributeNS(null,"offset",P[0]),Zt.setAttributeNS(null,"stop-color",P[1]),$.append(Zt)}return this.defs.append($),`url(#${m})`;case"Mesh":return(0,T.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${M[0]}`)}}setDash(M,m){this.current.dashArray=M,this.current.dashPhase=m}constructPath(M,m){const q=this.current;let $=q.x,P=q.y,Zt=[],dt=0;for(const It of M)switch(It|0){case T.OPS.rectangle:$=m[dt++],P=m[dt++];const xt=m[dt++],it=m[dt++],Xt=$+xt,zt=P+it;Zt.push("M",S($),S(P),"L",S(Xt),S(P),"L",S(Xt),S(zt),"L",S($),S(zt),"Z");break;case T.OPS.moveTo:$=m[dt++],P=m[dt++],Zt.push("M",S($),S(P));break;case T.OPS.lineTo:$=m[dt++],P=m[dt++],Zt.push("L",S($),S(P));break;case T.OPS.curveTo:$=m[dt+4],P=m[dt+5],Zt.push("C",S(m[dt]),S(m[dt+1]),S(m[dt+2]),S(m[dt+3]),S($),S(P)),dt+=6;break;case T.OPS.curveTo2:Zt.push("C",S($),S(P),S(m[dt]) Line truncated
`),position:et,pageIndex:lt-1,rect:w,rotation:X,id:F,deleted:!1}}const Pt=super.deserialize(Nt,Ut,Vt);return ul(Pt,g,Nt.fontSize),ul(Pt,J,u.Util.makeHexColor(...Nt.color)),ul(Pt,f,Nt.value),Pt.annotationElementId=Nt.id||null,ul(Pt,L,Ht),Pt}serialize(Nt=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const Ut=Xt._internalPadding*this.parentScale,Vt=this.getRect(Ut,Ut),Ht=B.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:bt(this,J)),Pt={annotationType:u.AnnotationEditorType.FREETEXT,color:Ht,fontSize:bt(this,g),value:bt(this,f),pageIndex:this.pageIndex,rect:Vt,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return Nt?Pt:this.annotationElementId&&!nl(this,dt,Ms).call(this,Pt)?null:(Pt.id=this.annotationElementId,Pt)}};O=new WeakMap,p=new WeakMap,k=new WeakMap,_=new WeakMap,J=new WeakMap,f=new WeakMap,S=new WeakMap,g=new WeakMap,L=new WeakMap,j=new WeakSet,us=function(Nt){const Ut=Ht=>{this.editorDiv.style.fontSize=`calc(${Ht}px * var(--scale-factor))`,this.translate(0,-(Ht-bt(this,g))*this.parentScale),ul(this,g,Ht),nl(this,q,le).call(this)},Vt=bt(this,g);this.addCommands({cmd:()=>{Ut(Nt)},undo:()=>{Ut(Vt)},mustExec:!0,type:u.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},U=new WeakSet,Ws=function(Nt){const Ut=bt(this,J);this.addCommands({cmd:()=>{ul(this,J,this.editorDiv.style.color=Nt)},undo:()=>{ul(this,J,this.editorDiv.style.color=Ut)},mustExec:!0,type:u.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},M=new WeakSet,Gs=function(){const Nt=this.editorDiv.getElementsByTagName("div");if(Nt.length===0)return this.editorDiv.innerText;const Ut=[];for(const Vt of Nt)Ut.push(Vt.innerText.replace(/\r\n?|\n/,""));return Ut.join(`
`)},q=new WeakSet,le=function(){const[Nt,Ut]=this.parentDimensions;let Vt;if(this.isAttachedToDOM)Vt=this.div.getBoundingClientRect();else{const{currentLayer:Ht,div:Pt}=this,at=Pt.style.display;Pt.style.display="hidden",Ht.div.append(this.div),Vt=Pt.getBoundingClientRect(),Pt.remove(),Pt.style.display=at}this.rotation%180===this.parentRotation%180?(this.width=Vt.width/Nt,this.height=Vt.height/Ut):(this.width=Vt.height/Nt,this.height=Vt.width/Ut),this.fixAndSetPosition()},P=new WeakSet,Ue=function(){if(this.editorDiv.replaceChildren(),!!bt(this,f))for(const Nt of bt(this,f).split(`
`)){const Ut=document.createElement("div");Ut.append(Nt?document.createTextNode(Nt):document.createElement("br")),this.editorDiv.append(Ut)}},dt=new WeakSet,Ms=function(Nt){const{value:Ut,fontSize:Vt,color:Ht,rect:Pt,pageIndex:at}=bt(this,L);return Nt.value!==Ut||Nt.fontSize!==Vt||Nt.rect.some((R,w)=>Math.abs(R-Pt[w])>=1)||Nt.color.some((R,w)=>R!==Ht[w])||Nt.pageIndex!==at},xt=new WeakSet,Ee=function(Nt=!1){if(!this.annotationElementId)return;if(nl(this,q,le).call(this),!Nt&&(this.width===0||this.height===0)){setTimeout(()=>nl(this,xt,Ee).call(this,!0),0);return}const Ut=Xt._internalPadding*this.parentScale;bt(this,L).rect=this.getRect(Ut,Ut)},gl(Xt,"_freeTextDefaultContent",""),gl(Xt,"_internalPadding",0),gl(Xt,"_defaultColor",null),gl(Xt,"_defaultFontSize",10),gl(Xt,"_type","freetext");let K=Xt;r.FreeTextEditor=K},(st,r,h)=>{var w,F,Kl,et,rs,Mt,Rt,gt,Jt,Dt,qt,vt,cl,bl,il,Bt,Ft,wt,pt,Ct,$t,dl,rl,Ns,Xl,oe,Ll,Ke,Vl,ve,ot,ut,Tt,jt,Ot,Lt,yt,Pe,tl,el,ol,Qt,Xs,hl,He;Object.defineProperty(r,"__esModule",{value:!0}),r.StampAnnotationElement=r.InkAnnotationElement=r.FreeTextAnnotationElement=r.AnnotationLayer=void 0;var u=h(1),T=h(6),B=h(3),Q=h(30),K=h(31),O=h(32);const p=1e3,k=9,_=new WeakSet;function J(Wl){return{width:Wl[2]-Wl[0],height:Wl[3]-Wl[1]}}class f{static create(nt){switch(nt.data.annotationType){case u.AnnotationType.LINK:return new g(nt);case u.AnnotationType.TEXT:return new L(nt);case u.AnnotationType.WIDGET:switch(nt.data.fieldType){case"Tx":return new C(nt);case"Btn":return nt.data.radioButton?new M(nt):nt.data.checkBox?new v(nt):new m(nt);case"Ch":return new q(nt);case"Sig":return new U(nt)}return new j(nt);case u.AnnotationType.POPUP:return new $(nt);case u.AnnotationType.FREETEXT:return new Zt(nt);case u.AnnotationType.LINE:return new dt(nt);case u.AnnotationType.SQUARE:return new It(nt);case u.AnnotationType.CIRCLE:return new xt(nt);case u.AnnotationType.POLYLINE:return new it(nt);case u.AnnotationType.CARET:return new zt(nt);case u.AnnotationType.INK:return new Gt(nt);case u.AnnotationType.POLYGON:return new Xt(nt);case u.AnnotationType.HIGHLIGHT:return new Nt(nt);case u.AnnotationType.UNDERLINE:return new Ut(nt);case u.AnnotationType.SQUIGGLY:return new Vt(nt);case u.AnnotationType.STRIKEOUT:return new Ht(nt);case u.AnnotationType.STAMP:return new Pt(nt);case u.AnnotationType.FILEATTACHMENT:return new at(nt);default:return new S(nt)}}}const X=class X{constructor(nt,{isRenderable:I=!1,ignoreBorder:ct=!1,createQuadrilaterals:Wt=!1}={}){ll(this,w,!1);this.isRenderable=I,this.data=nt.data,this.layer=nt.layer,this.linkService=nt.linkService,this.downloadManager=nt.downloadManager,this.imageResourcesPath=nt.imageResourcesPath,this.renderForms=nt.renderForms,this.svgFactory=nt.svgFactory,this.annotationStorage=nt.annotationStorage,this.enableScripting=nt.enableScripting,this.hasJSActions=nt.hasJSActions,this._fieldObjects=nt.fieldObjects,this.parent=nt.parent,I&&(this.container=this._createContainer(ct)),Wt&&this._createQuadrilaterals()}static _hasPopupData({titleObj:nt,contentsObj:I,richText:ct}){return!!(nt!=null&&nt.str||I!=null&&I.str||ct!=null&&ct.str)}get hasPopupData(){return X._hasPopupData(this.data)}_createContainer(nt){const{data:I,parent:{page:ct,viewport:Wt}}=this,Yt=document.createElement("section");Yt.setAttribute("data-annotation-id",I.id),this instanceof j||(Yt.tabIndex=p),Yt.style.zIndex=this.parent.zIndex++,this.data.popupRef&&Yt.setAttribute("aria-haspopup","dialog"),I.noRotate&&Yt.classList.add("norotate");const{pageWidth:kt,pageHeight:Et,pageX:sl,pageY:ml}=Wt.rawDims;if(!I.rect||this instanceof $){const{rotation:Tl}=I;return!I.hasOwnCanvas&&Tl!==0&&this.setRotation(Tl,Yt),Yt}const{width:al,height:zl}=J(I.rect),Gl=u.Util.normalizeRect([I.rect[0],ct.view[3]-I.rect[1]+ct.view[1],I.rect[2],ct.view[3]-I.rect[3]+ct.view[1]]);if(!nt&&I.borderStyle.width>0){Yt.style.borderWidth=`${I.borderStyle.width}px`;const Tl=I.borderStyle.horizontalCornerRadius,Rl=I.borderStyle.verticalCornerRadius;if(Tl>0||Rl>0){const wl=`calc(${Tl}px * var(--scale-factor)) / calc(${Rl}px * var(--scale-factor))`;Yt.style.borderRadius=wl}else if(this instanceof M){const wl=`calc(${al}px * var(--scale-factor)) / calc(${zl}px * var(--scale-factor))`;Yt.style.borderRadius=wl}switch(I.borderStyle.style){case u.AnnotationBorderStyleType.SOLID:Yt.style.borderStyle="solid";break;case u.AnnotationBorderStyleType.DASHED:Yt.style.borderStyle="dashed";break;case u.AnnotationBorderStyleType.BEVELED:(0,u.warn)("Unimplemented border style: beveled");break;case u.AnnotationBorderStyleType.INSET:(0,u.warn)("Unimplemented border style: inset");break;case u.AnnotationBorderStyleType.UNDERLINE:Yt.style.borderBottomStyle="solid";break}const Sl=I.borderColor||null;Sl?(ul(this,w,!0),Yt.style.borderColor=u.Util.makeHexColor(Sl[0]|0,Sl[1]|0,Sl[2]|0)):Yt.style.borderWidth=0}Yt.style.left=`${100*(Gl[0]-sl)/kt}%`,Yt.style.top=`${100*(Gl[1]-ml)/Et}%`;const{rotation:Nl}=I;return I.hasOwnCanvas||Nl===0?(Yt.style.width=`${100*al/kt}%`,Yt.style Line truncated
`))||null;ml&&this.data.comb&&(ml=ml.replaceAll(/\s+/g,""));const al={userValue:Et,formattedValue:ml,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(ct=document.createElement("textarea"),ct.textContent=ml??Et,this.data.doNotScroll&&(ct.style.overflowY="hidden")):(ct=document.createElement("input"),ct.type="text",ct.setAttribute("value",ml??Et),this.data.doNotScroll&&(ct.style.overflowX="hidden")),this.data.hasOwnCanvas&&(ct.hidden=!0),_.add(ct),ct.setAttribute("data-element-id",I),ct.disabled=this.data.readOnly,ct.name=this.data.fieldName,ct.tabIndex=p,this._setRequired(ct,this.data.required),sl&&(ct.maxLength=sl),ct.addEventListener("input",Gl=>{nt.setValue(I,{value:Gl.target.value}),this.setPropertyOnSiblings(ct,"value",Gl.target.value,"value"),al.formattedValue=null}),ct.addEventListener("resetform",Gl=>{const Nl=this.data.defaultFieldValue??"";ct.value=al.userValue=Nl,al.formattedValue=null});let zl=Gl=>{const{formattedValue:Nl}=al;Nl!=null&&(Gl.target.value=Nl),Gl.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){ct.addEventListener("focus",Nl=>{if(al.focused)return;const{target:Tl}=Nl;al.userValue&&(Tl.value=al.userValue),al.lastCommittedValue=Tl.value,al.commitKey=1,al.focused=!0}),ct.addEventListener("updatefromsandbox",Nl=>{this.showElementAndHideCanvas(Nl.target);const Tl={value(Rl){al.userValue=Rl.detail.value??"",nt.setValue(I,{value:al.userValue.toString()}),Rl.target.value=al.userValue},formattedValue(Rl){const{formattedValue:Sl}=Rl.detail;al.formattedValue=Sl,Sl!=null&&Rl.target!==document.activeElement&&(Rl.target.value=Sl),nt.setValue(I,{formattedValue:Sl})},selRange(Rl){Rl.target.setSelectionRange(...Rl.detail.selRange)},charLimit:Rl=>{var xl;const{charLimit:Sl}=Rl.detail,{target:wl}=Rl;if(Sl===0){wl.removeAttribute("maxLength");return}wl.setAttribute("maxLength",Sl);let kl=al.userValue;!kl||kl.length<=Sl||(kl=kl.slice(0,Sl),wl.value=al.userValue=kl,nt.setValue(I,{value:kl}),(xl=this.linkService.eventBus)==null||xl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:I,name:"Keystroke",value:kl,willCommit:!0,commitKey:1,selStart:wl.selectionStart,selEnd:wl.selectionEnd}}))}};this._dispatchEventFromSandbox(Tl,Nl)}),ct.addEventListener("keydown",Nl=>{var Sl;al.commitKey=1;let Tl=-1;if(Nl.key==="Escape"?Tl=0:Nl.key==="Enter"&&!this.data.multiLine?Tl=2:Nl.key==="Tab"&&(al.commitKey=3),Tl===-1)return;const{value:Rl}=Nl.target;al.lastCommittedValue!==Rl&&(al.lastCommittedValue=Rl,al.userValue=Rl,(Sl=this.linkService.eventBus)==null||Sl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:I,name:"Keystroke",value:Rl,willCommit:!0,commitKey:Tl,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}}))});const Gl=zl;zl=null,ct.addEventListener("blur",Nl=>{var Rl;if(!al.focused||!Nl.relatedTarget)return;al.focused=!1;const{value:Tl}=Nl.target;al.userValue=Tl,al.lastCommittedValue!==Tl&&((Rl=this.linkService.eventBus)==null||Rl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:I,name:"Keystroke",value:Tl,willCommit:!0,commitKey:al.commitKey,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}})),Gl(Nl)}),(Yt=this.data.actions)!=null&&Yt.Keystroke&&ct.addEventListener("beforeinput",Nl=>{var Cl;al.lastCommittedValue=null;const{data:Tl,target:Rl}=Nl,{value:Sl,selectionStart:wl,selectionEnd:kl}=Rl;let xl=wl,Dl=kl;switch(Nl.inputType){case"deleteWordBackward":{const jl=Sl.substring(0,wl).match(/\w*[^\w]*$/);jl&&(xl-=jl[0].length);break}case"deleteWordForward":{const jl=Sl.substring(wl).match(/^[^\w]*\w*/);jl&&(Dl+=jl[0].length);break}case"deleteContentBackward":wl===kl&&(xl-=1);break;case"deleteContentForward":wl===kl&&(Dl+=1);break}Nl.preventDefault(),(Cl=this.linkService.eventBus)==null||Cl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:I,name:"Keystroke",value:Sl,change:Tl||"",willCommit:!1,selStart:xl,selEnd:Dl}})}),this._setEventListeners(ct,al,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Nl=>Nl.target.value)}if(zl&&ct.addEventListener("blur",zl),this.data.comb){const Nl=(this.data.rect[2]-this.data.rect[0])/sl;ct.classList.add("comb"),ct.style.letterSpacing=`calc(${Nl}px * var(--scale-factor) - 1ch)`}}else ct=document.createElement("div"),ct.textContent=this.data.fieldValue,ct.style.verticalAlign="middle",ct.style.display="table-cell";return this._setTextStyle(ct),this._setBackgroundColor(ct),this._setDefaultPropertiesFromJS(ct),this.container.append(ct),this.container}}class U extends j{constructor(nt){super(nt,{isRenderable:!!nt.data.hasOwnCanvas})}}class v extends j{constructor(nt){super(nt,{isRenderable:nt.renderForms})}render(){const nt=this.annotationStorage,I=this.data,ct=I.id;let Wt=nt.getValue(ct,{value:I.exportValue===I.fieldValue}).value;typeof Wt=="string"&&(Wt=Wt!=="Off",nt.setValue(ct,{value:Wt})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const Yt=document.createElement("input");r Line truncated
`,"\\r":"\r","\\t":" "},J=/^[\da-f]{4}$/i,f=/^[\u0000-\u001F]$/;st.exports=function(S,g){for(var L=!0,j="";g<S.length;){var C=O(S,g);if(C==="\\"){var U=p(S,g,g+2);if(T(_,U))j+=_[U],g+=2;else if(U==="\\u"){g+=2;var v=p(S,g,g+4);if(!k(J,v))throw B("Bad Unicode escape at: "+g);j+=K(Q(v,16)),g+=4}else throw B('Unknown escape sequence: "'+U+'"')}else if(C==='"'){L=!1,g++;break}else{if(k(f,C))throw B("Bad control character in string literal at: "+g);j+=C,g++}}if(L)throw B("Unterminated string at: "+g);return{value:j,end:g}}},(st,r,h)=>{var u,T,B,Q,K,O,p,k,_,J,f,S,g,L,j,C,U,v,M,m,q,$,P,Zt,dt;Object.defineProperty(r,"__esModule",{value:!0}),r.StatTimer=r.RenderingCancelledException=r.PixelsPerInch=r.PageViewport=r.PDFDateString=r.DOMStandardFontDataFactory=r.DOMSVGFactory=r.DOMFilterFactory=r.DOMCanvasFactory=r.DOMCMapReaderFactory=void 0,r.deprecated=gt,r.getColorValues=cl,r.getCurrentTransform=bl,r.getCurrentTransformInverse=il,r.getFilenameFromUrl=F,r.getPdfFilenameFromUrl=H,r.getRGB=vt,r.getXfaPageViewport=qt,r.isDataScheme=w,r.isPdfFile=X,r.isValidFetchUrl=lt,r.loadScript=Rt,r.noContextMenu=Mt,r.setLayerDimensions=Bt,h(2),h(93),h(101),h(102),h(105),h(107),h(109),h(113),h(116),h(123),h(89),h(84),h(86),h(87);var It=h(169),xt=h(1);const it="http://www.w3.org/2000/svg",Xt=class{};tt(Xt,"CSS",96),tt(Xt,"PDF",72),tt(Xt,"PDF_TO_CSS_UNITS",Xt.CSS/Xt.PDF);let zt=Xt;r.PixelsPerInch=zt;class Gt extends It.BaseFilterFactory{constructor(){let{docId:wt,ownerDocument:pt=globalThis.document}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),E(this,S),E(this,L),E(this,C),E(this,v),E(this,m),E(this,$),E(this,Zt),E(this,u,void 0),E(this,T,void 0),E(this,B,void 0),E(this,Q,void 0),E(this,K,void 0),E(this,O,void 0),E(this,p,void 0),E(this,k,void 0),E(this,_,void 0),E(this,J,void 0),E(this,f,0),Zl(this,B,wt),Zl(this,Q,pt)}addFilter(wt){if(!wt)return"none";let pt=t(this,S,g).get(wt);if(pt)return pt;let Ct,$t,dl,rl;if(wt.length===1){const Ll=wt[0],yl=new Array(256);for(let Vl=0;Vl<256;Vl++)yl[Vl]=Ll[Vl]/255;rl=Ct=$t=dl=yl.join(",")}else{const[Ll,yl,Vl]=wt,_t=new Array(256),ot=new Array(256),ut=new Array(256);for(let Tt=0;Tt<256;Tt++)_t[Tt]=Ll[Tt]/255,ot[Tt]=yl[Tt]/255,ut[Tt]=Vl[Tt]/255;Ct=_t.join(","),$t=ot.join(","),dl=ut.join(","),rl=`${Ct}${$t}${dl}`}if(pt=t(this,S,g).get(rl),pt)return t(this,S,g).set(wt,pt),pt;const Yl=`g_${t(this,B)}_transfer_map_${mt(this,f)._++}`,Xl=`url(#${Yl})`;t(this,S,g).set(wt,Xl),t(this,S,g).set(rl,Xl);const pl=A(this,v,M).call(this,Yl);return A(this,$,P).call(this,Ct,$t,dl,pl),Xl}addHCMFilter(wt,pt){var Ct;const $t=`${wt}-${pt}`;if(t(this,O)===$t)return t(this,p);if(Zl(this,O,$t),Zl(this,p,"none"),(Ct=t(this,K))==null||Ct.remove(),!wt||!pt)return t(this,p);const dl=A(this,Zt,dt).call(this,wt);wt=xt.Util.makeHexColor(...dl);const rl=A(this,Zt,dt).call(this,pt);if(pt=xt.Util.makeHexColor(...rl),t(this,L,j).style.color="",wt==="#000000"&&pt==="#ffffff"||wt===pt)return t(this,p);const Yl=new Array(256);for(let Vl=0;Vl<=255;Vl++){const _t=Vl/255;Yl[Vl]=_t<=.03928?_t/12.92:((_t+.055)/1.055)**2.4}const Xl=Yl.join(","),pl=`g_${t(this,B)}_hcm_filter`,Ll=Zl(this,k,A(this,v,M).call(this,pl));A(this,$,P).call(this,Xl,Xl,Xl,Ll),A(this,C,U).call(this,Ll);const yl=(Vl,_t)=>{const ot=dl[Vl]/255,ut=rl[Vl]/255,Tt=new Array(_t+1);for(let jt=0;jt<=_t;jt++)Tt[jt]=ot+jt/_t*(ut-ot);return Tt.join(",")};return A(this,$,P).call(this,yl(0,5),yl(1,5),yl(2,5),Ll),Zl(this,p,`url(#${pl})`),t(this,p)}addHighlightHCMFilter(wt,pt,Ct,$t){var dl;const rl=`${wt}-${pt}-${Ct}-${$t}`;if(t(this,_)===rl)return t(this,J);if(Zl(this,_,rl),Zl(this,J,"none"),(dl=t(this,k))==null||dl.remove(),!wt||!pt)return t(this,J);const[Yl,Xl]=[wt,pt].map(A(this,Zt,dt).bind(this));let pl=Math.round(.2126*Yl[0]+.7152*Yl[1]+.0722*Yl[2]),Ll=Math.round(.2126*Xl[0]+.7152*Xl[1]+.0722*Xl[2]),[yl,Vl]=[Ct,$t].map(A(this,Zt,dt).bind(this));Ll<pl&&([pl,Ll,yl,Vl]=[Ll,pl,Vl,yl]),t(this,L,j).style.color="";const _t=(Tt,jt,Ot)=>{const Lt=new Array(256),yt=(Ll-pl)/Ot,Kt=Tt/255,tl=(jt-Tt)/(255*Ot);let el=0;for(let ol=0;ol<=Ot;ol++){const Qt=Math.round(pl+ol*yt),Ml=Kt+ol*tl;for(let hl=el;hl<=Qt;hl++)Lt[hl]=Ml;el=Qt+1}for(let ol=el;ol<256;ol++)Lt[ol]=Lt[el-1];return Lt.join(",")},ot=`g_${t(this,B)}_hcm_highlight_filter`,ut=Zl(this,k,A(this,v,M).call(this,ot));return A(this,C,U).call(this,ut),A(this,$,P).call(this,_t(yl[0],Vl[0],5),_t(yl[1],Vl[1],5),_t(yl[2],Vl[2],5),ut),Zl(this,J,`url(#${ot})`),t(this,J)}destroy(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&(t(this,p)||t(this,J))||(t(this,T)&&(t(this,T).parentNode.parentNode.remove(),Zl(this,T,null)),t(this,u)&&(t(this,u).clear(),Zl(this,u,null)),Zl(this,f,0))}}u=new WeakMap,T=new WeakMap,B=new WeakMap,Q=new WeakMap,K=new WeakMap,O=new WeakMap,p=new WeakMap,k=new WeakMap,_=new WeakMap,J=new WeakMap,f=new WeakMap,S=new WeakSet,g=function(){return t(this,u)||Zl(this,u,new Map)},L=new WeakSet,j=function(){if(!t(this,T)){const Ft=t(this,Q).createElement("div"),{style:wt}=Ft;wt.visibility="hidden",wt.cont Line truncated
`);return wt.join("")}}r.StatTimer=et;function lt(Ft,wt){try{const{protocol:pt}=wt?new URL(Ft,wt):new URL(Ft);return pt==="http:"||pt==="https:"}catch{return!1}}function Mt(Ft){Ft.preventDefault()}function Rt(Ft){let wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return new Promise((pt,Ct)=>{const $t=document.createElement("script");$t.src=Ft,$t.onload=function(dl){wt&&$t.remove(),pt(dl)},$t.onerror=function(){Ct(new Error(`Cannot load script at: ${$t.src}`))},(document.head||document.documentElement).append($t)})}function gt(Ft){console.log("Deprecated API usage: "+Ft)}let Jt;class Dt{static toDateObject(wt){if(!wt||typeof wt!="string")return null;Jt||(Jt=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const pt=Jt.exec(wt);if(!pt)return null;const Ct=parseInt(pt[1],10);let $t=parseInt(pt[2],10);$t=$t>=1&&$t<=12?$t-1:0;let dl=parseInt(pt[3],10);dl=dl>=1&&dl<=31?dl:1;let rl=parseInt(pt[4],10);rl=rl>=0&&rl<=23?rl:0;let Yl=parseInt(pt[5],10);Yl=Yl>=0&&Yl<=59?Yl:0;let Xl=parseInt(pt[6],10);Xl=Xl>=0&&Xl<=59?Xl:0;const pl=pt[7]||"Z";let Ll=parseInt(pt[8],10);Ll=Ll>=0&&Ll<=23?Ll:0;let yl=parseInt(pt[9],10)||0;return yl=yl>=0&&yl<=59?yl:0,pl==="-"?(rl+=Ll,Yl+=yl):pl==="+"&&(rl-=Ll,Yl-=yl),new Date(Date.UTC(Ct,$t,dl,rl,Yl,Xl))}}r.PDFDateString=Dt;function qt(Ft,wt){let{scale:pt=1,rotation:Ct=0}=wt;const{width:$t,height:dl}=Ft.attributes.style,rl=[0,0,parseInt($t),parseInt(dl)];return new at({viewBox:rl,scale:pt,rotation:Ct})}function vt(Ft){if(Ft.startsWith("#")){const wt=parseInt(Ft.slice(1),16);return[(wt&16711680)>>16,(wt&65280)>>8,wt&255]}return Ft.startsWith("rgb(")?Ft.slice(4,-1).split(",").map(wt=>parseInt(wt)):Ft.startsWith("rgba(")?Ft.slice(5,-1).split(",").map(wt=>parseInt(wt)).slice(0,3):((0,xt.warn)(`Not a valid color format: "${Ft}"`),[0,0,0])}function cl(Ft){const wt=document.createElement("span");wt.style.visibility="hidden",document.body.append(wt);for(const pt of Ft.keys()){wt.style.color=pt;const Ct=window.getComputedStyle(wt).color;Ft.set(pt,vt(Ct))}wt.remove()}function bl(Ft){const{a:wt,b:pt,c:Ct,d:$t,e:dl,f:rl}=Ft.getTransform();return[wt,pt,Ct,$t,dl,rl]}function il(Ft){const{a:wt,b:pt,c:Ct,d:$t,e:dl,f:rl}=Ft.getTransform().invertSelf();return[wt,pt,Ct,$t,dl,rl]}function Bt(Ft,wt){let pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ct=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(wt instanceof at){const{pageWidth:$t,pageHeight:dl}=wt.rawDims,{style:rl}=Ft,Yl=xt.FeatureTest.isCSSRoundSupported,Xl=`var(--scale-factor) * ${$t}px`,pl=`var(--scale-factor) * ${dl}px`,Ll=Yl?`round(${Xl}, 1px)`:`calc(${Xl})`,yl=Yl?`round(${pl}, 1px)`:`calc(${pl})`;!pt||wt.rotation%180===0?(rl.width=Ll,rl.height=yl):(rl.width=yl,rl.height=Ll)}Ct&&Ft.setAttribute("data-main-rotation",wt.rotation)}},(st,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseFilterFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0,h(2);var u=h(1);class T{constructor(){this.constructor===T&&(0,u.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(k){return"none"}addHCMFilter(k,_){return"none"}addHighlightHCMFilter(k,_,J,f){return"none"}destroy(){}}r.BaseFilterFactory=T;class B{constructor(){this.constructor===B&&(0,u.unreachable)("Cannot initialize BaseCanvasFactory.")}create(k,_){if(k<=0||_<=0)throw new Error("Invalid canvas size");const J=this._createCanvas(k,_);return{canvas:J,context:J.getContext("2d")}}reset(k,_,J){if(!k.canvas)throw new Error("Canvas is not specified");if(_<=0||J<=0)throw new Error("Invalid canvas size");k.canvas.width=_,k.canvas.height=J}destroy(k){if(!k.canvas)throw new Error("Canvas is not specified");k.canvas.width=0,k.canvas.height=0,k.canvas=null,k.context=null}_createCanvas(k,_){(0,u.unreachable)("Abstract method `_createCanvas` called.")}}r.BaseCanvasFactory=B;class Q{constructor(k){let{baseUrl:_=null,isCompressed:J=!0}=k;this.constructor===Q&&(0,u.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=_,this.isCompressed=J}async fetch(k){let{name:_}=k;if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!_)throw new Error("CMap name must be specified.");const J=this.baseUrl+_+(this.isCompressed?".bcmap":""),f=this.isCompressed?u.CMapCompressionType.BINARY:u.CMapCompressionType.NONE;return this._fetchData(J,f).catch(S=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${J}`)})}_fetchData(k,_){(0,u.unreachable)("Abstract method `_fetchData` called.")}}r.BaseCMapReaderFactory=Q;class K{constructor(k){let{baseUrl:_=null}=k;this.constructor===K&&(0,u.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=_}async fetch(k){let{filename:_}=k;if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is Line truncated
`)}return this.compiledGlyphs[p]=new Function("c","size",_.join(""))}return this.compiledGlyphs[p]=function(_,J){for(const f of k)f.cmd==="scale"&&(f.args=[J,-J]),_[f.cmd].apply(_,f.args)}}}r.FontFaceObject=Q},(st,r,h)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.NodeStandardFontDataFactory=r.NodeFilterFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0,h(2),h(93),h(101),h(102),h(105),h(107),h(109),h(113),h(116),h(123);var u=h(169),T=h(1);(function(){if(!(globalThis.DOMMatrix||!T.isNodeJS))try{globalThis.DOMMatrix=require$$6.DOMMatrix}catch(k){(0,T.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${k}".`)}})(),function(){if(!(globalThis.Path2D||!T.isNodeJS))try{const{CanvasRenderingContext2D:k}=require$$6,{polyfillPath2D:_}=requirePath2dPolyfill_esm();globalThis.CanvasRenderingContext2D=k,_(globalThis)}catch(k){(0,T.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${k}".`)}}();const B=function(k){return new Promise((_,J)=>{require$$6.readFile(k,(f,S)=>{if(f||!S){J(new Error(f));return}_(new Uint8Array(S))})})};class Q extends u.BaseFilterFactory{}r.NodeFilterFactory=Q;class K extends u.BaseCanvasFactory{_createCanvas(_,J){return require$$6.createCanvas(_,J)}}r.NodeCanvasFactory=K;class O extends u.BaseCMapReaderFactory{_fetchData(_,J){return B(_).then(f=>({cMapData:f,compressionType:J}))}}r.NodeCMapReaderFactory=O;class p extends u.BaseStandardFontDataFactory{_fetchData(_){return B(_)}}r.NodeStandardFontDataFactory=p},(st,r,h)=>{var u,T,B,Q;Object.defineProperty(r,"__esModule",{value:!0}),r.CanvasGraphics=void 0,h(2),h(93),h(101),h(102),h(105),h(107),h(109),h(113),h(116),h(123),h(89);var K=h(1),O=h(168),p=h(174),k=h(175);const _=16,J=100,f=4096,S=15,g=10,L=1e3,j=16;function C(at,R){if(at._removeMirroring)throw new Error("Context is already forwarding operations.");at.__originalSave=at.save,at.__originalRestore=at.restore,at.__originalRotate=at.rotate,at.__originalScale=at.scale,at.__originalTranslate=at.translate,at.__originalTransform=at.transform,at.__originalSetTransform=at.setTransform,at.__originalResetTransform=at.resetTransform,at.__originalClip=at.clip,at.__originalMoveTo=at.moveTo,at.__originalLineTo=at.lineTo,at.__originalBezierCurveTo=at.bezierCurveTo,at.__originalRect=at.rect,at.__originalClosePath=at.closePath,at.__originalBeginPath=at.beginPath,at._removeMirroring=()=>{at.save=at.__originalSave,at.restore=at.__originalRestore,at.rotate=at.__originalRotate,at.scale=at.__originalScale,at.translate=at.__originalTranslate,at.transform=at.__originalTransform,at.setTransform=at.__originalSetTransform,at.resetTransform=at.__originalResetTransform,at.clip=at.__originalClip,at.moveTo=at.__originalMoveTo,at.lineTo=at.__originalLineTo,at.bezierCurveTo=at.__originalBezierCurveTo,at.rect=at.__originalRect,at.closePath=at.__originalClosePath,at.beginPath=at.__originalBeginPath,delete at._removeMirroring},at.save=function(){R.save(),this.__originalSave()},at.restore=function(){R.restore(),this.__originalRestore()},at.translate=function(w,X){R.translate(w,X),this.__originalTranslate(w,X)},at.scale=function(w,X){R.scale(w,X),this.__originalScale(w,X)},at.transform=function(w,X,F,H,et,lt){R.transform(w,X,F,H,et,lt),this.__originalTransform(w,X,F,H,et,lt)},at.setTransform=function(w,X,F,H,et,lt){R.setTransform(w,X,F,H,et,lt),this.__originalSetTransform(w,X,F,H,et,lt)},at.resetTransform=function(){R.resetTransform(),this.__originalResetTransform()},at.rotate=function(w){R.rotate(w),this.__originalRotate(w)},at.clip=function(w){R.clip(w),this.__originalClip(w)},at.moveTo=function(w,X){R.moveTo(w,X),this.__originalMoveTo(w,X)},at.lineTo=function(w,X){R.lineTo(w,X),this.__originalLineTo(w,X)},at.bezierCurveTo=function(w,X,F,H,et,lt){R.bezierCurveTo(w,X,F,H,et,lt),this.__originalBezierCurveTo(w,X,F,H,et,lt)},at.rect=function(w,X,F,H){R.rect(w,X,F,H),this.__originalRect(w,X,F,H)},at.closePath=function(){R.closePath(),this.__originalClosePath()},at.beginPath=function(){R.beginPath(),this.__originalBeginPath()}}class U{constructor(R){this.canvasFactory=R,this.cache=Object.create(null)}getCanvas(R,w,X){let F;return this.cache[R]!==void 0?(F=this.cache[R],this.canvasFactory.reset(F,w,X)):(F=this.canvasFactory.create(w,X),this.cache[R]=F),F}delete(R){delete this.cache[R]}clear(){for(const R in this.cache){const w=this.cache[R];this.canvasFactory.destroy(w),delete this.cache[R]}}}function v(at,R,w,X,F,H,et,lt,Mt,Rt){const[gt,Jt,Dt,qt,vt,cl]=(0,O.getCurrentTransform)(at);if(Jt===0&&Dt===0){const Bt=et*gt+vt,Ft=Math.round(Bt),wt=lt*qt+cl,pt=Math.round(wt),Ct=(et+Mt)*gt+vt,$t=Math.abs(Math.round(Ct)-Ft)||1,dl=(lt+Rt)*qt+cl,rl=Math.abs(Math.round(dl)-pt)||1;return at.setTransform(Math.sign(gt),0,0,Math.sign(qt),Ft,pt),at.drawImage(R,w,X,F,H,0,0,$t,rl),at.setTransform(gt,Jt,Dt,qt,vt,cl),[$t,rl]}if(gt===0&&qt===0){const Bt=lt*Dt+vt,Ft=Math.round(Bt),wt=et*Jt+cl,pt=Math.round(wt),Ct=(lt+Rt)*Dt+vt,$t=Math.abs(Math.round(Ct)-Ft)||1,dl=(et+Mt)*Jt+cl,rl=Math.abs(Math.round(dl)-pt)||1;return aLine truncated
`}setFont(M){const m=this.current,q=this.commonObjs.get(M[0]);let $=M[1];m.font=q,this.embedFonts&&!q.missingFile&&!this.embeddedFonts[q.loadedName]&&(this.addFontStyle(q),this.embeddedFonts[q.loadedName]=q),m.fontMatrix=q.fontMatrix||T.FONT_IDENTITY_MATRIX;let P="normal";q.black?P="900":q.bold&&(P="bold");const Zt=q.italic?"italic":"normal";$<0?($=-$,m.fontDirection=-1):m.fontDirection=1,m.fontSize=$,m.fontFamily=q.loadedName,m.fontWeight=P,m.fontStyle=Zt,m.tspan=this.svgFactory.createElement("svg:tspan"),m.tspan.setAttributeNS(null,"y",S(-m.y)),m.xcoords=[],m.ycoords=[]}endText(){var M;const m=this.current;m.textRenderingMode&T.TextRenderingMode.ADD_TO_PATH_FLAG&&(M=m.txtElement)!=null&&M.hasChildNodes()&&(m.element=m.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(M){M>0&&(this.current.lineWidth=M)}setLineCap(M){this.current.lineCap=O[M]}setLineJoin(M){this.current.lineJoin=p[M]}setMiterLimit(M){this.current.miterLimit=M}setStrokeAlpha(M){this.current.strokeAlpha=M}setStrokeRGBColor(M,m,q){this.current.strokeColor=T.Util.makeHexColor(M,m,q)}setFillAlpha(M){this.current.fillAlpha=M}setFillRGBColor(M,m,q){this.current.fillColor=T.Util.makeHexColor(M,m,q),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(M){this.current.strokeColor=this._makeColorN_Pattern(M)}setFillColorN(M){this.current.fillColor=this._makeColorN_Pattern(M)}shadingFill(M){const{width:m,height:q}=this.viewport,$=T.Util.inverseTransform(this.transformMatrix),[P,Zt,dt,It]=T.Util.getAxialAlignedBoundingBox([0,0,m,q],$),xt=this.svgFactory.createElement("svg:rect");xt.setAttributeNS(null,"x",P),xt.setAttributeNS(null,"y",Zt),xt.setAttributeNS(null,"width",dt-P),xt.setAttributeNS(null,"height",It-Zt),xt.setAttributeNS(null,"fill",this._makeShadingPattern(M)),this.current.fillAlpha<1&&xt.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(xt)}_makeColorN_Pattern(M){return M[0]==="TilingPattern"?this._makeTilingPattern(M):this._makeShadingPattern(M)}_makeTilingPattern(M){const m=M[1],q=M[2],$=M[3]||T.IDENTITY_MATRIX,[P,Zt,dt,It]=M[4],xt=M[5],it=M[6],Xt=M[7],zt=`shading${C++}`,[Gt,Nt,Ut,Vt]=T.Util.normalizeRect([...T.Util.applyTransform([P,Zt],$),...T.Util.applyTransform([dt,It],$)]),[Ht,Pt]=T.Util.singularValueDecompose2dScale($),at=xt*Ht,R=it*Pt,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",zt),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",at),w.setAttributeNS(null,"height",R),w.setAttributeNS(null,"x",`${Gt}`),w.setAttributeNS(null,"y",`${Nt}`);const X=this.svg,F=this.transformMatrix,H=this.current.fillColor,et=this.current.strokeColor,lt=this.svgFactory.create(Ut-Gt,Vt-Nt);if(this.svg=lt,this.transformMatrix=$,Xt===2){const Mt=T.Util.makeHexColor(...m);this.current.fillColor=Mt,this.current.strokeColor=Mt}return this.executeOpTree(this.convertOpList(q)),this.svg=X,this.transformMatrix=F,this.current.fillColor=H,this.current.strokeColor=et,w.append(lt.childNodes[0]),this.defs.append(w),`url(#${zt})`}_makeShadingPattern(M){switch(typeof M=="string"&&(M=this.objs.get(M)),M[0]){case"RadialAxial":const m=`shading${C++}`,q=M[3];let $;switch(M[1]){case"axial":const P=M[4],Zt=M[5];$=this.svgFactory.createElement("svg:linearGradient"),$.setAttributeNS(null,"id",m),$.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),$.setAttributeNS(null,"x1",P[0]),$.setAttributeNS(null,"y1",P[1]),$.setAttributeNS(null,"x2",Zt[0]),$.setAttributeNS(null,"y2",Zt[1]);break;case"radial":const dt=M[4],It=M[5],xt=M[6],it=M[7];$=this.svgFactory.createElement("svg:radialGradient"),$.setAttributeNS(null,"id",m),$.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),$.setAttributeNS(null,"cx",It[0]),$.setAttributeNS(null,"cy",It[1]),$.setAttributeNS(null,"r",it),$.setAttributeNS(null,"fx",dt[0]),$.setAttributeNS(null,"fy",dt[1]),$.setAttributeNS(null,"fr",xt);break;default:throw new Error(`Unknown RadialAxial type: ${M[1]}`)}for(const P of q){const Zt=this.svgFactory.createElement("svg:stop");Zt.setAttributeNS(null,"offset",P[0]),Zt.setAttributeNS(null,"stop-color",P[1]),$.append(Zt)}return this.defs.append($),`url(#${m})`;case"Mesh":return(0,T.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${M[0]}`)}}setDash(M,m){this.current.dashArray=M,this.current.dashPhase=m}constructPath(M,m){const q=this.current;let $=q.x,P=q.y,Zt=[],dt=0;for(const It of M)switch(It|0){case T.OPS.rectangle:$=m[dt++],P=m[dt++];const xt=m[dt++],it=m[dt++],Xt=$+xt,zt=P+it;Zt.push("M",S($),S(P),"L",S(Xt),S(P),"L",S(Xt),S(zt),"L",S($),S(zt),"Z");break;case T.OPS.moveTo:$=m[dt++],P=m[dt++],Zt.push("M",S($),S(P));break;case T.OPS.lineTo:$=m[dt++],P=m[dt++],Zt.push("L",S($),S(P));break;case T.OPS.curveTo:$=m[dt+4],P=m[dt+5],Zt.push("C",S(m[dt]),S(m[dt+1]),S(m[dt+2]),S(m[dt+3]),S($),S(P)),dt+=6;break;case T.OPS.curveTo2:Zt.push("C",S($),S(P),S(m[dt]),S Line truncated
`),position:H,pageIndex:et-1,rect:R,rotation:w,id:X,deleted:!1}}const Ht=super.deserialize(Gt,Nt,Ut);return Zl(Ht,k,Gt.fontSize),Zl(Ht,K,Zt.Util.makeHexColor(...Gt.color)),Zl(Ht,O,Gt.value),Ht.annotationElementId=Gt.id||null,Zl(Ht,_,Vt),Ht}serialize(){let Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const Nt=Ol._internalPadding*this.parentScale,Ut=this.getRect(Nt,Nt),Vt=It.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:t(this,K)),Ht={annotationType:Zt.AnnotationEditorType.FREETEXT,color:Vt,fontSize:t(this,k),value:t(this,O),pageIndex:this.pageIndex,rect:Ut,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return Gt?Ht:this.annotationElementId&&!A(this,m,q).call(this,Ht)?null:(Ht.id=this.annotationElementId,Ht)}};u=new WeakMap,T=new WeakMap,B=new WeakMap,Q=new WeakMap,K=new WeakMap,O=new WeakMap,p=new WeakMap,k=new WeakMap,_=new WeakMap,J=new WeakSet,f=function(zt){const Gt=Ut=>{this.editorDiv.style.fontSize=`calc(${Ut}px * var(--scale-factor))`,this.translate(0,-(Ut-t(this,k))*this.parentScale),Zl(this,k,Ut),A(this,C,U).call(this)},Nt=t(this,k);this.addCommands({cmd:()=>{Gt(zt)},undo:()=>{Gt(Nt)},mustExec:!0,type:Zt.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},S=new WeakSet,g=function(zt){const Gt=t(this,K);this.addCommands({cmd:()=>{Zl(this,K,this.editorDiv.style.color=zt)},undo:()=>{Zl(this,K,this.editorDiv.style.color=Gt)},mustExec:!0,type:Zt.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},L=new WeakSet,j=function(){const zt=this.editorDiv.getElementsByTagName("div");if(zt.length===0)return this.editorDiv.innerText;const Gt=[];for(const Nt of zt)Gt.push(Nt.innerText.replace(/\r\n?|\n/,""));return Gt.join(`
`)},C=new WeakSet,U=function(){const[zt,Gt]=this.parentDimensions;let Nt;if(this.isAttachedToDOM)Nt=this.div.getBoundingClientRect();else{const{currentLayer:Ut,div:Vt}=this,Ht=Vt.style.display;Vt.style.display="hidden",Ut.div.append(this.div),Nt=Vt.getBoundingClientRect(),Vt.remove(),Vt.style.display=Ht}this.rotation%180===this.parentRotation%180?(this.width=Nt.width/zt,this.height=Nt.height/Gt):(this.width=Nt.height/zt,this.height=Nt.width/Gt),this.fixAndSetPosition()},v=new WeakSet,M=function(){if(this.editorDiv.replaceChildren(),!!t(this,O))for(const zt of t(this,O).split(`
`)){const Gt=document.createElement("div");Gt.append(zt?document.createTextNode(zt):document.createElement("br")),this.editorDiv.append(Gt)}},m=new WeakSet,q=function(zt){const{value:Gt,fontSize:Nt,color:Ut,rect:Vt,pageIndex:Ht}=t(this,_);return zt.value!==Gt||zt.fontSize!==Nt||zt.rect.some((Pt,at)=>Math.abs(Pt-Vt[at])>=1)||zt.color.some((Pt,at)=>Pt!==Ut[at])||zt.pageIndex!==Ht},$=new WeakSet,P=function(){let zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.annotationElementId)return;if(A(this,C,U).call(this),!zt&&(this.width===0||this.height===0)){setTimeout(()=>A(this,$,P).call(this,!0),0);return}const Gt=it._internalPadding*this.parentScale;t(this,_).rect=this.getRect(Gt,Gt)},tt(it,"_freeTextDefaultContent",""),tt(it,"_internalPadding",0),tt(it,"_defaultColor",null),tt(it,"_defaultFontSize",10),tt(it,"_type","freetext");let Xt=it;r.FreeTextEditor=Xt},(st,r,h)=>{var u,T,B,Q,K,O,p,k,_,J,f,S,g,L,j,C,U,v,M,m,q,$,P,Zt,dt,It,xt,it,Xt,zt,Gt,Nt,Ut,Vt,Ht,Pt,at,R,w,X,F,H,et,lt,Mt;Object.defineProperty(r,"__esModule",{value:!0}),r.StampAnnotationElement=r.InkAnnotationElement=r.FreeTextAnnotationElement=r.AnnotationLayer=void 0,h(89),h(125),h(136),h(138),h(141),h(143),h(145),h(147);var Rt=h(1),gt=h(168),Jt=h(163),Dt=h(199),qt=h(200),vt=h(201);const cl=1e3,bl=9,il=new WeakSet;function Bt(Wl){return{width:Wl[2]-Wl[0],height:Wl[3]-Wl[1]}}class Ft{static create(nt){switch(nt.data.annotationType){case Rt.AnnotationType.LINK:return new Ct(nt);case Rt.AnnotationType.TEXT:return new $t(nt);case Rt.AnnotationType.WIDGET:switch(nt.data.fieldType){case"Tx":return new rl(nt);case"Btn":return nt.data.radioButton?new pl(nt):nt.data.checkBox?new Xl(nt):new Ll(nt);case"Ch":return new yl(nt);case"Sig":return new Yl(nt)}return new dl(nt);case Rt.AnnotationType.POPUP:return new Vl(nt);case Rt.AnnotationType.FREETEXT:return new ot(nt);case Rt.AnnotationType.LINE:return new ut(nt);case Rt.AnnotationType.SQUARE:return new Tt(nt);case Rt.AnnotationType.CIRCLE:return new jt(nt);case Rt.AnnotationType.POLYLINE:return new Ot(nt);case Rt.AnnotationType.CARET:return new yt(nt);case Rt.AnnotationType.INK:return new Kt(nt);case Rt.AnnotationType.POLYGON:return new Lt(nt);case Rt.AnnotationType.HIGHLIGHT:return new tl(nt);case Rt.AnnotationType.UNDERLINE:return new el(nt);case Rt.AnnotationType.SQUIGGLY:return new ol(nt);case Rt.AnnotationType.STRIKEOUT:return new Qt(nt);case Rt.AnnotationType.STAMP:return new Ml(nt);case Rt.AnnotationType.FILEATTACHMENT:return new hl(nt);default:return new pt(nt)}}}const wt=class Us{constructor(nt){E(this,u,!1);let{isRenderable:I=!1,ignoreBorder:ct=!1,createQuadrilaterals:Wt=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.isRenderable=I,this.data=nt.data,this.layer=nt.layer,this.linkService=nt.linkService,this.downloadManager=nt.downloadManager,this.imageResourcesPath=nt.imageResourcesPath,this.renderForms=nt.renderForms,this.svgFactory=nt.svgFactory,this.annotationStorage=nt.annotationStorage,this.enableScripting=nt.enableScripting,this.hasJSActions=nt.hasJSActions,this._fieldObjects=nt.fieldObjects,this.parent=nt.parent,I&&(this.container=this._createContainer(ct)),Wt&&this._createQuadrilaterals()}static _hasPopupData(nt){let{titleObj:I,contentsObj:ct,richText:Wt}=nt;return!!(I!=null&&I.str||ct!=null&&ct.str||Wt!=null&&Wt.str)}get hasPopupData(){return Us._hasPopupData(this.data)}_createContainer(nt){const{data:I,parent:{page:ct,viewport:Wt}}=this,Yt=document.createElement("section");Yt.setAttribute("data-annotation-id",I.id),this instanceof dl||(Yt.tabIndex=cl),Yt.style.zIndex=this.parent.zIndex++,this.data.popupRef&&Yt.setAttribute("aria-haspopup","dialog"),I.noRotate&&Yt.classList.add("norotate");const{pageWidth:kt,pageHeight:Et,pageX:sl,pageY:ml}=Wt.rawDims;if(!I.rect||this instanceof Vl){const{rotation:Tl}=I;return!I.hasOwnCanvas&&Tl!==0&&this.setRotation(Tl,Yt),Yt}const{width:al,height:zl}=Bt(I.rect),Gl=Rt.Util.normalizeRect([I.rect[0],ct.view[3]-I.rect[1]+ct.view[1],I.rect[2],ct.view[3]-I.rect[3]+ct.view[1]]);if(!nt&&I.borderStyle.width>0){Yt.style.borderWidth=`${I.borderStyle.width}px`;const Tl=I.borderStyle.horizontalCornerRadius,Rl=I.borderStyle.verticalCornerRadius;if(Tl>0||Rl>0){const wl=`calc(${Tl}px * var(--scale-factor)) / calc(${Rl}px * var(--scale-factor))`;Yt.style.borderRadius=wl}else if(this instanceof pl){const wl=`calc(${al}px * var(--scale-factor)) / calc(${zl}px * var(--scale-factor))`;Yt.style.borderRadius=wl}switch(I.borderStyle.style){case Rt.AnnotationBorderStyleType.SOLID:Yt.style.borderStyle="solid";break;case Rt.AnnotationBorderStyleType.DASHED:Yt.style.borderStyle="dashed";break;case Rt.AnnotationBorderStyleType.BEVELED:(0,Rt.warn)("Unimplemented border style: beveled");break;case Rt.AnnotationBorderStyleType.INSET:(0,Rt.warn)("Unimplemented border style: inset");break;case Rt.AnnotationBorderStyleType.UNDERLINE:Yt.style.borderBottomStyle="solid";break}const Sl=I.borderColor||null;Sl?(Zl(this,u,!0),Yt.style.borderColor=Rt.Util.makeHexCol Line truncated
`))||null;ml&&this.data.comb&&(ml=ml.replaceAll(/\s+/g,""));const al={userValue:Et,formattedValue:ml,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(Yt=document.createElement("textarea"),Yt.textContent=ml??Et,this.data.doNotScroll&&(Yt.style.overflowY="hidden")):(Yt=document.createElement("input"),Yt.type="text",Yt.setAttribute("value",ml??Et),this.data.doNotScroll&&(Yt.style.overflowX="hidden")),this.data.hasOwnCanvas&&(Yt.hidden=!0),il.add(Yt),Yt.setAttribute("data-element-id",Wt),Yt.disabled=this.data.readOnly,Yt.name=this.data.fieldName,Yt.tabIndex=cl,this._setRequired(Yt,this.data.required),sl&&(Yt.maxLength=sl),Yt.addEventListener("input",Gl=>{ct.setValue(Wt,{value:Gl.target.value}),this.setPropertyOnSiblings(Yt,"value",Gl.target.value,"value"),al.formattedValue=null}),Yt.addEventListener("resetform",Gl=>{const Nl=this.data.defaultFieldValue??"";Yt.value=al.userValue=Nl,al.formattedValue=null});let zl=Gl=>{const{formattedValue:Nl}=al;Nl!=null&&(Gl.target.value=Nl),Gl.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){Yt.addEventListener("focus",Nl=>{if(al.focused)return;const{target:Tl}=Nl;al.userValue&&(Tl.value=al.userValue),al.lastCommittedValue=Tl.value,al.commitKey=1,al.focused=!0}),Yt.addEventListener("updatefromsandbox",Nl=>{this.showElementAndHideCanvas(Nl.target);const Tl={value(Rl){al.userValue=Rl.detail.value??"",ct.setValue(Wt,{value:al.userValue.toString()}),Rl.target.value=al.userValue},formattedValue(Rl){const{formattedValue:Sl}=Rl.detail;al.formattedValue=Sl,Sl!=null&&Rl.target!==document.activeElement&&(Rl.target.value=Sl),ct.setValue(Wt,{formattedValue:Sl})},selRange(Rl){Rl.target.setSelectionRange(...Rl.detail.selRange)},charLimit:Rl=>{var Sl;const{charLimit:wl}=Rl.detail,{target:kl}=Rl;if(wl===0){kl.removeAttribute("maxLength");return}kl.setAttribute("maxLength",wl);let xl=al.userValue;!xl||xl.length<=wl||(xl=xl.slice(0,wl),kl.value=al.userValue=xl,ct.setValue(Wt,{value:xl}),(Sl=this.linkService.eventBus)==null||Sl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:xl,willCommit:!0,commitKey:1,selStart:kl.selectionStart,selEnd:kl.selectionEnd}}))}};this._dispatchEventFromSandbox(Tl,Nl)}),Yt.addEventListener("keydown",Nl=>{var Tl;al.commitKey=1;let Rl=-1;if(Nl.key==="Escape"?Rl=0:Nl.key==="Enter"&&!this.data.multiLine?Rl=2:Nl.key==="Tab"&&(al.commitKey=3),Rl===-1)return;const{value:Sl}=Nl.target;al.lastCommittedValue!==Sl&&(al.lastCommittedValue=Sl,al.userValue=Sl,(Tl=this.linkService.eventBus)==null||Tl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:Sl,willCommit:!0,commitKey:Rl,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}}))});const Gl=zl;zl=null,Yt.addEventListener("blur",Nl=>{var Tl;if(!al.focused||!Nl.relatedTarget)return;al.focused=!1;const{value:Rl}=Nl.target;al.userValue=Rl,al.lastCommittedValue!==Rl&&((Tl=this.linkService.eventBus)==null||Tl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:Rl,willCommit:!0,commitKey:al.commitKey,selStart:Nl.target.selectionStart,selEnd:Nl.target.selectionEnd}})),Gl(Nl)}),(I=this.data.actions)!=null&&I.Keystroke&&Yt.addEventListener("beforeinput",Nl=>{var Tl;al.lastCommittedValue=null;const{data:Rl,target:Sl}=Nl,{value:wl,selectionStart:kl,selectionEnd:xl}=Sl;let Dl=kl,Cl=xl;switch(Nl.inputType){case"deleteWordBackward":{const jl=wl.substring(0,kl).match(/\w*[^\w]*$/);jl&&(Dl-=jl[0].length);break}case"deleteWordForward":{const jl=wl.substring(kl).match(/^[^\w]*\w*/);jl&&(Cl+=jl[0].length);break}case"deleteContentBackward":kl===xl&&(Dl-=1);break;case"deleteContentForward":kl===xl&&(Cl+=1);break}Nl.preventDefault(),(Tl=this.linkService.eventBus)==null||Tl.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Wt,name:"Keystroke",value:wl,change:Rl||"",willCommit:!1,selStart:Dl,selEnd:Cl}})}),this._setEventListeners(Yt,al,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Nl=>Nl.target.value)}if(zl&&Yt.addEventListener("blur",zl),this.data.comb){const Gl=(this.data.rect[2]-this.data.rect[0])/sl;Yt.classList.add("comb"),Yt.style.letterSpacing=`calc(${Gl}px * var(--scale-factor) - 1ch)`}}else Yt=document.createElement("div"),Yt.textContent=this.data.fieldValue,Yt.style.verticalAlign="middle",Yt.style.display="table-cell";return this._setTextStyle(Yt),this._setBackgroundColor(Yt),this._setDefaultPropertiesFromJS(Yt),this.container.append(Yt),this.container}}class Yl extends dl{constructor(nt){super(nt,{isRenderable:!!nt.data.hasOwnCanvas})}}class Xl extends dl{constructor(nt){super(nt,{isRenderable:nt.renderForms})}render(){const nt=this.annotationStorage,I=this.data,ct=I.id;let Wt=nt.getValue(ct,{value:I.exportValue===I.fieldValue}).value;typeof Wt=="string"&&(Wt=Wt!=="Off",nt.setValue(ct,{value:Wt})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const Yt=document.createEleme Line truncated
`),Rl=Tl?Yt.length-2:Yt.length;Wl=!0;let Sl=Rl;al+Il===((Gl=Kt[ol])==null?void 0:Gl[1])&&(Sl-=Kt[ol][0],++ol);for(let wl=1;wl<=Sl;wl++)el.push([al-1-Ml+wl,Ml-wl]);return Ml-=Sl,hl+=Sl,Tl?(al+=Rl-1,el.push([al-Ml+1,1+Ml]),Ml+=1,hl+=1,Il+=1,Yt.slice(0,Rl)):Yt}if(kt){const Tl=kt.length-2;return el.push([al-Ml+Tl,1+Ml]),Ml+=1,hl+=1,Il+=1,kt.slice(0,-2)}if(Et){const Tl=Et.length-1;return el.push([al-Ml+Tl,Ml]),hl+=1,Il+=1,Et.slice(0,-1)}if(sl)return el.push([al-Ml+1,Ml-1]),Ml-=1,hl+=1,Il+=1," ";if(al+Il===((Nl=Ot[Qt])==null?void 0:Nl[1])){const Tl=Ot[Qt][0]-1;++Qt;for(let Rl=1;Rl<=Tl;Rl++)el.push([al-(Ml-Rl),Ml-Rl]);Ml-=Tl,hl+=Tl}return ml}),el.push([tl.length,Ml]),[tl,el,Wl]}function ut(jt,Ot,Lt){if(!jt)return[Ot,Lt];const yt=Ot,Kt=Ot+Lt-1;let tl=(0,qt.binarySearchFirstItem)(jt,Ml=>Ml[0]>=yt);jt[tl][0]>yt&&--tl;let el=(0,qt.binarySearchFirstItem)(jt,Ml=>Ml[0]>=Kt,tl);jt[el][0]>Kt&&--el;const ol=yt+jt[tl][1],Qt=Kt+jt[el][1]+1-ol;return[ol,Qt]}class Tt{constructor({linkService:Ot,eventBus:Lt,updateMatchesCountOnProgress:yt=!0}){E(this,J),E(this,S),E(this,L),E(this,C),E(this,v),E(this,m),E(this,$),E(this,Zt),E(this,It),E(this,it),E(this,zt),E(this,Nt),E(this,Vt),E(this,Pt),E(this,R),E(this,X),E(this,H),E(this,lt),E(this,Rt),E(this,Jt),E(this,p,null),E(this,k,!0),E(this,_,0),this._linkService=Ot,this._eventBus=Lt,Zl(this,k,yt),this.onIsPageVisible=null,A(this,S,g).call(this),Lt._on("find",A(this,J,f).bind(this)),Lt._on("findbarclose",A(this,H,et).bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return t(this,p)}setDocument(Ot){this._pdfDocument&&A(this,S,g).call(this),Ot&&(this._pdfDocument=Ot,this._firstPageCapability.resolve())}scrollMatchIntoView({element:Ot=null,selectedLeft:Lt=0,pageIndex:yt=-1,matchIndex:Kt=-1}){if(!this._scrollMatches||!Ot||Kt===-1||Kt!==this._selected.matchIdx||yt===-1||yt!==this._selected.pageIdx)return;this._scrollMatches=!1;const tl={top:Bt,left:Lt+Ft};(0,qt.scrollIntoView)(Ot,tl,!0)}}p=new WeakMap,k=new WeakMap,_=new WeakMap,J=new WeakSet,f=function(jt){if(!jt)return;jt.phraseSearch===!1&&(console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead."),typeof jt.query=="string"&&(jt.query=jt.query.match(/\S+/g)));const Ot=this._pdfDocument,{type:Lt}=jt;(t(this,p)===null||A(this,C,U).call(this,jt))&&(this._dirtyMatch=!0),Zl(this,p,jt),Lt!=="highlightallchange"&&A(this,Jt,Dt).call(this,bl.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||Ot&&this._pdfDocument!==Ot)return;A(this,It,xt).call(this);const yt=!this._highlightMatches,Kt=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),Lt?this._dirtyMatch?A(this,Nt,Ut).call(this):Lt==="again"?(A(this,Nt,Ut).call(this),yt&&t(this,p).highlightAll&&A(this,zt,Gt).call(this)):Lt==="highlightallchange"?(Kt?A(this,Nt,Ut).call(this):this._highlightMatches=!0,A(this,zt,Gt).call(this)):A(this,Nt,Ut).call(this):this._findTimeout=setTimeout(()=>{A(this,Nt,Ut).call(this),this._findTimeout=null},il)})},S=new WeakSet,g=function(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],Zl(this,_,0),Zl(this,p,null),this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._pageDiffs=[],this._hasDiacritics=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=new Set,this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=new cl.PromiseCapability},L=new WeakSet,j=function(){const{query:jt}=t(this,p);return typeof jt=="string"?(jt!==this._rawQuery&&(this._rawQuery=jt,[this._normalizedQuery]=ot(jt)),this._normalizedQuery):(jt||[]).filter(Ot=>!!Ot).map(Ot=>ot(Ot)[0])},C=new WeakSet,U=function(jt){var Ot;const Lt=jt.query,yt=t(this,p).query,Kt=typeof Lt;if(Kt!==typeof yt)return!0;if(Kt==="string"){if(Lt!==yt)return!0}else if(JSON.stringify(Lt)!==JSON.stringify(yt))return!0;switch(jt.type){case"again":const tl=this._selected.pageIdx+1,el=this._linkService;return tl>=1&&tl<=el.pagesCount&&tl!==el.page&&!(((Ot=this.onIsPageVisible)==null?void 0:Ot.call(this,tl))??!0);case"highlightallchange":return!1}return!0},v=new WeakSet,M=function(jt,Ot,Lt){let yt=jt.slice(0,Ot).match(rl);if(yt){const Kt=jt.charCodeAt(Ot),tl=yt[1].charCodeAt(0);if((0,vt.getCharacterType)(Kt)===(0,vt.getCharacterType)(tl))return!1}if(yt=jt.slice(Ot+Lt).match(Yl),yt){const Kt=jt.charCodeAt(Ot+Lt-1),tl=yt[1].charCodeAt(0);if((0,vt.getCharacterType)(Kt)===(0,vt.getCharacterType)(tl))return!1}return!0},m=new WeakSet,q=function(jt,Ot,Lt,yt){const Kt=this._pageMatches[Lt]=[],tl=this._pageMatchesLength[Lt]=[];if(!jt)return;const el=this._pageDiffs[Lt];let ol;for(;(ol Line truncated
`);[this._pageContents[Lt],this._pageDiffs[Lt],this._hasDiacritics[Lt]]=ot(el.join("")),Kt.resolve()},tl=>{console.error(`Unable to get text content for page ${Lt+1}`,tl),this._pageContents[Lt]="",this._pageDiffs[Lt]=null,this._hasDiacritics[Lt]=!1,Kt.resolve()}))}},it=new WeakSet,Xt=function(jt){this._scrollMatches&&this._selected.pageIdx===jt&&(this._linkService.page=jt+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:jt})},zt=new WeakSet,Gt=function(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})},Nt=new WeakSet,Ut=function(){const jt=t(this,p).findPrevious,Ot=this._linkService.page-1,Lt=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=Ot,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,Zl(this,_,0),this._matchesCountTotal=0,A(this,zt,Gt).call(this);for(let Kt=0;Kt<Lt;Kt++)this._pendingFindMatches.has(Kt)||(this._pendingFindMatches.add(Kt),this._extractTextPromises[Kt].then(()=>{this._pendingFindMatches.delete(Kt),A(this,Zt,dt).call(this,Kt)}))}if(t(this,L,j).length===0){A(this,Jt,Dt).call(this,bl.FOUND);return}if(this._resumePageIdx)return;const yt=this._offset;if(this._pagesToSearch=Lt,yt.matchIdx!==null){const Kt=this._pageMatches[yt.pageIdx].length;if(!jt&&yt.matchIdx+1<Kt||jt&&yt.matchIdx>0){yt.matchIdx=jt?yt.matchIdx-1:yt.matchIdx+1,A(this,X,F).call(this,!0);return}A(this,R,w).call(this,jt)}A(this,Pt,at).call(this)},Vt=new WeakSet,Ht=function(jt){const Ot=this._offset,Lt=jt.length,yt=t(this,p).findPrevious;return Lt?(Ot.matchIdx=yt?Lt-1:0,A(this,X,F).call(this,!0),!0):(A(this,R,w).call(this,yt),Ot.wrapped&&(Ot.matchIdx=null,this._pagesToSearch<0)?(A(this,X,F).call(this,!1),!0):!1)},Pt=new WeakSet,at=function(){this._resumePageIdx!==null&&console.error("There can only be one pending page.");let jt=null;do{const Ot=this._offset.pageIdx;if(jt=this._pageMatches[Ot],!jt){this._resumePageIdx=Ot;break}}while(!A(this,Vt,Ht).call(this,jt))},R=new WeakSet,w=function(jt){const Ot=this._offset,Lt=this._linkService.pagesCount;Ot.pageIdx=jt?Ot.pageIdx-1:Ot.pageIdx+1,Ot.matchIdx=null,this._pagesToSearch--,(Ot.pageIdx>=Lt||Ot.pageIdx<0)&&(Ot.pageIdx=jt?Lt-1:0,Ot.wrapped=!0)},X=new WeakSet,F=function(jt=!1){let Ot=bl.NOT_FOUND;const Lt=this._offset.wrapped;if(this._offset.wrapped=!1,jt){const yt=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,Ot=Lt?bl.WRAPPED:bl.FOUND,yt!==-1&&yt!==this._selected.pageIdx&&A(this,it,Xt).call(this,yt)}A(this,Jt,Dt).call(this,Ot,t(this,p).findPrevious),this._selected.pageIdx!==-1&&(this._scrollMatches=!0,A(this,it,Xt).call(this,this._selected.pageIdx))},H=new WeakSet,et=function(jt){const Ot=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||Ot&&this._pdfDocument!==Ot||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),A(this,Jt,Dt).call(this,bl.FOUND),this._highlightMatches=!1,A(this,zt,Gt).call(this))})},lt=new WeakSet,Mt=function(){var jt;const{pageIdx:Ot,matchIdx:Lt}=this._selected;let yt=0,Kt=this._matchesCountTotal;if(Lt!==-1){for(let tl=0;tl<Ot;tl++)yt+=((jt=this._pageMatches[tl])==null?void 0:jt.length)||0;yt+=Lt+1}return(yt<1||yt>Kt)&&(yt=Kt=0),{current:yt,total:Kt}},Rt=new WeakSet,gt=function(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:A(this,lt,Mt).call(this)})},Jt=new WeakSet,Dt=function(jt,Ot=!1){var Lt;!t(this,k)&&(t(this,_)!==this._linkService.pagesCount||jt===bl.PENDING)||this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:jt,previous:Ot,matchesCount:A(this,lt,Mt).call(this),rawQuery:((Lt=t(this,p))==null?void 0:Lt.query)??null})},K.PDFFindController=Tt},(Q,K)=>{var O,p,k,_,J;Object.defineProperty(K,"__esModule",{value:!0}),K.animationStarted=K.VERTICAL_PADDING=K.UNKNOWN_SCALE=K.TextLayerMode=K.SpreadMode=K.SidebarView=K.ScrollMode=K.SCROLLBAR_PADDING=K.RenderingStates=K.ProgressBar=K.PresentationModeState=K.OutputScale=K.MIN_SCALE=K.MAX_SCALE=K.MAX_AUTO_SCALE=K.DEFAULT_SCALE_VALUE=K.DEFAULT_SCALE_DELTA=K.DEFAULT_SCALE=K.CursorTool=K.AutoPrintRegExp=void 0,K.apiPageLayoutToViewerModes=vt,K.apiPageModeToSidebarView=cl,K.approximateFraction=Ht,K.backtrackBeforeAllVisibleElements=R,K.binarySearchFirstItem=Vt,K.docStyle=void 0,K.getActiveOrFocusedElement=qt,K.getPageSizeInches=at,K.getVisibleElements=w,K.isPortraitOrientation=Mt,K.isValidRotation=H,K.isValidScrollMode=et,K.isValidSpreadMode=lt,K.normalizeWheelEventDelta=F,K.normalizeWheelEventDirection=X,K.parseQueryString=Gt,K.removeNullCharacters=Ut,K.roundToDivide=Pt,K.scrollIntoView=Xt,K.toggleCheckedBtn=bl,K.toggleExpandedBtn=il,K.watchScroll=zt;const f="auto";K.DEFAULT_SCALE_VALUE=f;const S=1;K.DEFAULT_SCALE=S;const g=1.1;K. Line truncated
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function Vt(Ht,Pt){var at={},R=/^\s*|\s*$/,w=/^\s*#|^\s*$/,X=/^\s*\[(.*)\]\s*$/,F=/^\s*@import\s+url\((.*)\)\s*$/i,H=/^([^=\s]*)\s*=\s*(.+)$/;function et(Mt,Rt,gt){var Jt=Mt.replace(R,"").split(/[\r\n]+/),Dt="*",qt=Xt.split("-",1)[0],vt=!1,cl="";function bl(){for(;;){if(!Jt.length){gt();return}var il=Jt.shift();if(!w.test(il)){if(Rt){if(cl=X.exec(il),cl){Dt=cl[1].toLowerCase(),vt=Dt!=="*"&&Dt!==Xt&&Dt!==qt;continue}else if(vt)continue;if(cl=F.exec(il),cl){lt(Nt+cl[1],bl);return}}var Bt=il.match(H);Bt&&Bt.length==3&&(at[Bt[1]]=Ut(Bt[2]))}}}bl()}function lt(Mt,Rt){U(Mt,function(gt){et(gt,!1,Rt)},function(){console.warn(Mt+" not found."),Rt()})}et(Ht,!0,function(){Pt(at)})}U(it,function(Ht){p+=Ht,Vt(Ht,function(Pt){for(var at in Pt){var R,w,X=at.lastIndexOf(".");X>0?(R=at.substring(0,X),w=at.substring(X+1)):(R=at,w=k),O[R]||(O[R]={}),O[R][w]=Pt[at]}zt&&zt()})},Gt)}function M(it,Xt){it&&(it=it.toLowerCase()),Xt=Xt||function(){},m(),_=it;var zt=g(),Gt=zt.length;if(Gt===0){var Nt=L();if(Nt&&Nt.locales&&Nt.default_locale){if(console.log("using the embedded JSON directory, early way out"),O=Nt.locales[it],!O){var Ut=Nt.default_locale.toLowerCase();for(var Vt in Nt.locales)if(Vt=Vt.toLowerCase(),Vt===it){O=Nt.locales[it];break}else Vt===Ut&&(O=Nt.locales[Ut])}Xt()}else console.log("no resource to load, early way out");f="complete";return}var Ht=null,Pt=0;Ht=function(){Pt++,Pt>=Gt&&(Xt(),f="complete")};function at(X){var F=X.href;this.load=function(H,et){v(F,H,et,function(){console.warn(F+" not found."),console.warn('"'+H+'" resource not found'),_="",et()})}}for(var R=0;R<Gt;R++){var w=new at(zt[R]);w.load(it,Ht)}}function m(){O={},p="",_=""}function q(it){var Xt={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3};function zt(Vt,Ht){return Ht.indexOf(Vt)!==-1}function Gt(Vt,Ht,Pt){return Ht<=Vt&&Vt<=Pt}var Nt={0:function(Vt){return"other"},1:function(Vt){return Gt(Vt%100,3,10)?"few":Vt===0?"zero":Gt(Vt%100,11,99)?"many":Vt==2?"two":Vt==1?"one":"other"},2:function(Vt){return Vt!==0&&Vt%10===0?"many":Vt==2?"two":Vt==1?"one":"other"},3:function(Vt){return Vt==1?"one":"other"},4:function(Vt){return Gt(Vt,0,1)?"one":"other"},5:function(Vt){return Gt(Vt,0,2)&&Vt!=2?"one":"other"},6:function(Vt){return Vt===0?"zero":Vt%10==1&&Vt%100!=11?"one":"other"},7:function(Vt){return Vt==2?"two":Vt==1?"one":"other"},8:function(Vt){return Gt(Vt,3,6)?"few":Gt(Vt,7,10)?"many":Vt==2?"two":Vt==1?"one":"other"},9:function(Vt){return Vt===0||Vt!=1&&Gt(Vt%100,1,19)?"few":Vt==1?"one":"other"},10:function(Vt){return Gt(Vt%10,2,9)&&!Gt(Vt%100,11,19)?"few":Vt%10==1&&!Gt(Vt%100,11,19)?"one":"other"},11:function(Vt){return Gt(Vt%10,2,4)&&!Gt(Vt%100,12,14)?"few":Vt%10===0||Gt(Vt%10,5,9)||Gt(Vt%100,11,14)?"many":Vt%10==1&&Vt%100!=11?"one":"other"},12:function(Vt){return Gt(Vt,2,4)?"few":Vt==1?"one":"other"},13:function(Vt){return Gt(Vt%10,2,4)&&!Gt(Vt%100,12,14)?"few":Vt!=1&&Gt(Vt%10,0,1)||Gt(Vt%10,5,9)||Gt(Vt%100,12,14)?"many":Vt==1?"one":"other"},14:function(Vt){return Gt(Vt%100,3,4)?"few":Vt%100==2?"two":Vt%100==1?"one":"other"},15:function(Vt){return Vt===0||Gt(Vt%100,2,10)?"few":Gt(Vt%100,11,19)?"many":Vt==1?"one":"other"},16:function(Vt){return Vt%10==1&&Vt!=11?"one":"other"},17:function(Vt){return Vt==3?"few":Vt===0?"zero":Vt==6?"many":Vt==2?"two":Vt==1?"one":"other"},18:function(Vt){return Vt===0?"zero":Gt(Vt,0,2)&&Vt!==0&&Vt!=2?"one":"other"},19:function(Vt){return Gt(Vt,2,10)?"few":Gt(Vt,0,1)?"one":"other"},20:function(Vt){return(Gt(Vt%10,3,4)||Vt%10==9)&&!(Gt(Vt%100,10,19)||Gt(Vt%100,70,79)||Gt(Vt%100,90,99))?"few":Vt%1e6===0&&Vt!==0?"many":Vt%10==2&&!zt(Vt%100,[12,72,92])?"two":Vt%10==1&&!zt(Vt%100,[11,71,91])?"one":"other"},21:function(Vt){return Vt===0?"zero":Vt==1?"one":"other"},22:function(Vt){return Gt(Vt,0,1)||Gt(Vt,11,99)?"one":"other"},23:function(Vt){return Gt(Vt%10,1,2)||Vt%20===0?"one":"other"},24:function(Vt){return Gt(Vt,3,10)||Gt(Vt,13,19)?"few":zt(Vt,[2,12])?"two":zt(Vt,[1,11])?"one":"other"}},Ut=Xt[it.replac Line truncated
`);ot.push((0,Ct.removeNullCharacters)(ut.join("")))}return ot.join(`
`)}setDocument(ot){var ut,Tt;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),(ut=this.findController)==null||ut.setDocument(null),(Tt=this._scriptingManager)==null||Tt.setDocument(null),t(this,L)&&(t(this,L).destroy(),Zl(this,L,null))),this.pdfDocument=ot,!ot)return;const jt=ot.numPages,Ot=ot.getPage(1),Lt=ot.getOptionalContentConfig(),yt=t(this,v)?ot.getPermissions():Promise.resolve();if(jt>pl.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");const Kt=this._scrollMode=Ct.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:Kt})}this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:jt})},()=>{}),this._onBeforeDraw=Kt=>{const tl=this._pages[Kt.pageNumber-1];tl&&t(this,f).push(tl)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=Kt=>{Kt.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:Kt.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,t(this,dt)&&(document.removeEventListener("visibilitychange",t(this,dt)),Zl(this,dt,null)))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([Ot,yt]).then(([Kt,tl])=>{var el,ol;if(ot!==this.pdfDocument)return;this._firstPageCapability.resolve(Kt),this._optionalContentConfigPromise=Lt;const{annotationEditorMode:Qt,annotationMode:Ml,textLayerMode:hl}=A(this,zt,Gt).call(this,tl);if(hl!==Ct.TextLayerMode.DISABLE){const Wt=Zl(this,m,document.createElement("div"));Wt.id="hiddenCopyElement",this.viewer.before(Wt)}if(Qt!==pt.AnnotationEditorType.DISABLE){const Wt=Qt;ot.isPureXfa?console.warn("Warning: XFA-editing is not implemented."):Ll(Wt)?(Zl(this,L,new pt.AnnotationEditorUIManager(this.container,this.viewer,t(this,S),this.eventBus,ot,this.pageColors)),Wt!==pt.AnnotationEditorType.NONE&&t(this,L).updateMode(Wt)):console.error(`Invalid AnnotationEditor mode: ${Wt}`)}const Il=A(this,it,Xt).bind(this),Wl=this._scrollMode===Ct.ScrollMode.PAGE?null:this.viewer,nt=this.currentScale,I=Kt.getViewport({scale:nt*pt.PixelsPerInch.PDF_TO_CSS_UNITS});this.viewer.style.setProperty("--scale-factor",I.scale),(((el=this.pageColors)==null?void 0:el.foreground)==="CanvasText"||((ol=this.pageColors)==null?void 0:ol.background)==="Canvas")&&this.viewer.style.setProperty("--hcm-highligh-filter",ot.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(let Wt=1;Wt<=jt;++Wt){const Yt=new dl.PDFPageView({container:Wl,eventBus:this.eventBus,id:Wt,scale:nt,defaultViewport:I.clone(),optionalContentConfigPromise:Lt,renderingQueue:this.renderingQueue,textLayerMode:hl,annotationMode:Ml,imageResourcesPath:this.imageResourcesPath,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n,layerProperties:Il});this._pages.push(Yt)}const ct=this._pages[0];ct&&(ct.setPdfPage(Kt),this.linkService.cachePageRef(1,Kt.ref)),this._scrollMode===Ct.ScrollMode.PAGE?A(this,Pt,at).call(this):this._spreadMode!==Ct.SpreadMode.NONE&&this._updateSpreadMode(),A(this,Nt,Ut).call(this).then(async()=>{var Wt,Yt;if((Wt=this.findController)==null||Wt.setDocument(ot),(Yt=this._scriptingManager)==null||Yt.setDocument(ot),t(this,m)&&(Zl(this,U,A(this,Vt,Ht).bind(this,hl)),document.addEventListener("copy",t(this,U))),t(this,L)&&this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:t(this,g)}),ot.loadingParams.disableAutoFetch||jt>pl.FORCE_LAZY_PAGE_INIT){this._pagesCapability.resolve();return}let kt=jt-1;if(kt<=0){this._pagesCapability.resolve();return}for(let Et=2;Et<=jt;++Et){const sl=ot.getPage(Et).then(ml=>{const al=this._pages[Et-1];al.pdfPage||al.setPdfPage(ml),this.linkService.cachePageRef(Et,ml.ref),--kt===0&&this._pagesCapability.resolve()},ml=>{console.error(`Unable to get page ${Et} to initialize viewer`,ml),--kt===0&&this._pagesCapability.resolve()});Et%pl.PAUSE_EAGER_PAGE_INIT===0&&await sl}}),this.eventBus.dispatch("pagesinit",{source:this}),ot.getMetadata().then(({info:Wt})=>{ot===this.pdfDocument&&Wt.Language&&(this.viewer.lang=Wt.Language)}),this.defaultRenderingQueue&&this.update()}).catch(Kt=>{console.error("Unable to initialize viewer",Kt),this._pagesCapability.reject(Kt)})}setPageLabels(ot){var ut;if(this.pdfDocument){ot?Array.isArray(ot)&&this.pdfDocument.numPages===ot.length?this._pageLabels=ot:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let Tt=0,jt=this._pages.length;Tt<jt;Tt++)this._pages[Tt].setPageLabel(((ut=this._pageLabels)==null?void 0:ut[Tt])??null)}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=Ct.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,Zl(this,f,new yl(Xl)),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromis Line truncated
@page {
margin: 0;
size: ${r}pt ${h}pt;
}
body {
margin: 0;
}
canvas {
width: 100%;
page-break-after: always;
page-break-before: avoid;
page-break-inside: avoid;
}
`,st.contentWindow.document.head.appendChild(u),st.contentWindow.document.body.style.width="100%"}function createPrintIframe(st){return new Promise(r=>{const h=document.createElement("iframe");h.width="0",h.height="0",h.style.position="absolute",h.style.top="0",h.style.left="0",h.style.border="none",h.style.overflow="hidden",h.onload=()=>r(h),st.appendChild(h)})}function downloadPdf(st,r){const h=URL.createObjectURL(new Blob([st],{type:"application/pdf"})),u=document.createElement("a");u.href=h,u.download=r,u.style.display="none",document.body.append(u),u.click(),setTimeout(()=>{URL.revokeObjectURL(h),document.body.removeChild(u)},1e3)}function emptyElement(st){for(;st!=null&&st.firstChild;)st.removeChild(st.firstChild)}function releaseChildCanvases(st){st==null||st.querySelectorAll("canvas").forEach(r=>{var h;r.width=1,r.height=1,(h=r.getContext("2d"))==null||h.clearRect(0,0,1,1)})}const _hoisted_1=["id"],_hoisted_2=["id"],_hoisted_3=createBaseVNode("canvas",null,null,-1),_hoisted_4={key:0,class:"textLayer"},_hoisted_5={key:1,class:"annotationLayer"},_sfc_main$1=defineComponent({__name:"VuePdfEmbed",props:{annotationLayer:{type:Boolean},height:{},id:{},imageResourcesPath:{},page:{},rotation:{default:0},scale:{},source:{},textLayer:{type:Boolean},width:{}},emits:["internal-link-clicked","loaded","loading-failed","password-requested","progress","rendered","rendering-failed"],setup(st,{expose:r,emit:h}){const u=st,T=shallowRef([]),B=shallowRef([]),Q=ref([]),K=shallowRef(null),{doc:O}=useVuePdfEmbed({onError:j=>{T.value=[],h("loading-failed",j)},onPasswordRequest({callback:j,isWrongPassword:C}){h("password-requested",{callback:j,isWrongPassword:C})},onProgress:j=>{h("progress",j)},source:toRef(u,"source")}),p=computed(()=>{if(!O.value||!u.annotationLayer)return null;const j=new pdf_viewerExports.PDFLinkService;return j.setDocument(O.value),j.setViewer({scrollPageIntoView:({pageNumber:C})=>{h("internal-link-clicked",C)}}),j}),k=async j=>{if(!O.value)return;const C=await O.value.getData(),U=await O.value.getMetadata(),v=j??U.contentDispositionFilename??"";downloadPdf(C,v)},_=j=>{let C,U;return u.height&&!u.width?(U=u.height,C=U/j):(C=u.width??K.value.clientWidth,U=C*j),[C,U]},J=async(j=300,C="",U=!1)=>{var v,M,m;if(!O.value)return;const q=j/72,$=96/72;let P,Zt,dt;try{P=window.document.createElement("div"),P.style.display="none",window.document.body.appendChild(P),Zt=await createPrintIframe(P);const It=u.page&&!U?[u.page]:[...Array(O.value.numPages+1).keys()].slice(1);await Promise.all(It.map(async(xt,it)=>{const Xt=await O.value.getPage(xt),zt=Xt.getViewport({scale:1,rotation:0});if(it===0){const Ut=zt.width*q/$,Vt=zt.height*q/$;addPrintStyles(Zt,Ut,Vt)}const Gt=window.document.createElement("canvas");Gt.width=zt.width*q,Gt.height=zt.height*q,P.appendChild(Gt);const Nt=Gt.cloneNode();Zt.contentWindow.document.body.appendChild(Nt),await Xt.render({canvasContext:Gt.getContext("2d"),intent:"print",transform:[q,0,0,q,0,0],viewport:zt}).promise,Nt.getContext("2d").drawImage(Gt,0,0)})),C&&(dt=window.document.title,window.document.title=C),(v=Zt.contentWindow)==null||v.focus(),(M=Zt.contentWindow)==null||M.print()}finally{dt&&(window.document.title=dt),releaseChildCanvases(P),(m=P.parentNode)==null||m.removeChild(P)}},f=async()=>{if(O.value)try{T.value=u.page?[u.page]:[...Array(O.value.numPages+1).keys()].slice(1),Q.value=Array(T.value.length).fill(1),await Promise.all(T.value.map(async(j,C)=>{const U=await O.value.getPage(j),v=((u.rotation%90===0?u.rotation:0)+U.rotate)%360,[M,m,q]=Array.from(B.value[C].children),$=!!(v/90%2),[P,Zt]=_($?U.view[2]/U.view[3]:U.view[3]/U.view[2]),dt=`${Math.floor(P)}px`,It=`${Math.floor(Zt)}px`,xt=$?U.view[3]:U.view[2],it=u.scale??P/xt,Xt=U.getViewport({scale:it,rotation:v});Q.value[C]=it,M.style.width=dt,M.style.height=It,m&&(m.style.width=$?It:dt,m.style.height=$?dt:It),q&&(q.style.width=$?It:dt,q.style.height=$?dt:It),await S(U,Xt,M),u.textLayer&&await L(U,Xt.clone({dontFlip:!0}),m),u.annotationLayer&&await g(U,Xt.clone({dontFlip:!0}),q||m)})),h("rendered")}catch(j){T.value=[],Q.value=[],h("rendering-failed",j)}},S=async(j,C,U)=>{U.width=C.width,U.height=C.height,await j.render({canvasContext:U.getContext("2d"),viewport:C}).promise},g=async(j,C,U)=>{emptyElement(U),new pdfExports.AnnotationLayer({accessibilityManager:null,annotationCanvasMap:null,div:U,l10n:null,page:j,viewport:C}).render({annotations:await j.getAnnotations(),div:U,downloadManager:null,imageResourcesPath:u.imageResourcesPath,linkService:p.value,page:j,renderForms:!1,viewport:C})},L=async(j,C,U)=>{emptyElement(U),await pdfExports.renderTextLayer({container:U,textContentSource:await j.getTextContent(),viewport:C}).promise};return watch(O,()=>{O.value&&h("loaded",O.value)},{immediate:!0}),watch(()=>u.source,()=>{releaseChildCanvases(K.value)}),watch(()=>[O.value,u.annotationLayer,u.height,u.imageResourcesPath,u.page,u.rotation,u.scale,u.textLayer,u.width],()=>{O.value&&f()},{immediate:!0}),onBeforeUnmount(()=>{release Line truncated