vendor: 71,571 bytes, line 1
1(self.webpackChunkmatrix=self.webpackChunkmatrix||[]).push([[9380],{85943:function(module,__unused_webpack_exports,__webpack_require__){var _asyncToGenerator=__webpack_require__(17156).default,D;D=()=>(()=>{"use strict";var __webpack_modules__=[,(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.VerbosityLevel=a.Util=a.UnknownErrorException=a.UnexpectedResponseException=a.UNSUPPORTED_FEATURES=a.TextRenderingMode=a.StreamType=a.RenderingIntentFlag=a.PermissionFlag=a.PasswordResponses=a.PasswordException=a.PageActionEventType=a.OPS=a.MissingPDFException=a.InvalidPDFException=a.ImageKind=a.IDENTITY_MATRIX=a.FormatError=a.FontType=a.FeatureTest=a.FONT_IDENTITY_MATRIX=a.DocumentActionEventType=a.CMapCompressionType=a.BaseException=a.AnnotationType=a.AnnotationStateModelType=a.AnnotationReviewState=a.AnnotationReplyType=a.AnnotationMode=a.AnnotationMarkedState=a.AnnotationFlag=a.AnnotationFieldFlag=a.AnnotationBorderStyleType=a.AnnotationActionEventType=a.AbortException=void 0,a.arrayByteLength=G,a.arraysToBytes=function q(ee){const $=ee.length;if(1===$&&ee[0]instanceof Uint8Array)return ee[0];let Y=0;for(let fe=0;fe<$;fe++)Y+=G(ee[fe]);let le=0;const ue=new Uint8Array(Y);for(let fe=0;fe<$;fe++){let ge=ee[fe];ge instanceof Uint8Array||(ge="string"==typeof ge?j(ge):new Uint8Array(ge));const Ce=ge.byteLength;ue.set(ge,le),le+=Ce}return ue},a.assert=function I(ee,$){ee||M($)},a.bytesToString=function U(ee){("object"!=typeof ee||null===ee||void 0===ee.length)&&M("Invalid argument for bytesToString");const $=ee.length,Y=8192;if($<Y)return String.fromCharCode.apply(null,ee);const le=[];for(let ue=0;ue<$;ue+=Y){const fe=Math.min(ue+Y,$),ge=ee.subarray(ue,fe);le.push(String.fromCharCode.apply(null,ge))}return le.join("")},a.createPromiseCapability=function we(){const ee=Object.create(null);let $=!1;return Object.defineProperty(ee,"settled",{get:()=>$}),ee.promise=new Promise(function(Y,le){ee.resolve=function(ue){$=!0,Y(ue)},ee.reject=function(ue){$=!0,le(ue)}}),ee},a.createValidAbsoluteUrl=function X(ee,$=null,Y=null){if(!ee)return null;try{if(Y&&"string"==typeof ee){if(Y.addDefaultProtocol&&ee.startsWith("www.")){const ue=ee.match(/\./g);ue&&ue.length>=2&&(ee=`http://${ee}`)}if(Y.tryConvertEncoding)try{ee=de(ee)}catch{}}const le=$?new URL(ee,$):new URL(ee);if(function V(ee){if(!ee)return!1;switch(ee.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(le))return le}catch{}return null},a.escapeString=function oe(ee){return ee.replace(/([()\\\n\r])/g,$=>"\n"===$?"\\n":"\r"===$?"\\r":`\\${$}`)},a.getModificationDate=function be(ee=new Date){return[ee.getUTCFullYear().toString(),(ee.getUTCMonth()+1).toString().padStart(2,"0"),ee.getUTCDate().toString().padStart(2,"0"),ee.getUTCHours().toString().padStart(2,"0"),ee.getUTCMinutes().toString().padStart(2,"0"),ee.getUTCSeconds().toString().padStart(2,"0")].join("")},a.getVerbosityLevel=function E(){return l},a.info=function O(ee){l>=f.INFOS&&console.log(`Info: ${ee}`)},a.isArrayBuffer=function ve(ee){return"object"==typeof ee&&null!==ee&&void 0!==ee.byteLength},a.isArrayEqual=function Se(ee,$){if(ee.length!==$.length)return!1;for(let Y=0,le=ee.length;Y<le;Y++)if(ee[Y]!==$[Y])return!1;return!0},a.isAscii=function pe(ee){return/^[\x00-\x7F]*$/.test(ee)},a.objectFromMap=function se(ee){const $=Object.create(null);for(const[Y,le]of ee)$[Y]=le;return $},a.objectSize=function ie(ee){return Object.keys(ee).length},a.setVerbosityLevel=function T(ee){Number.isInteger(ee)&&(l=ee)},a.shadow=J,a.string32=function K(ee){return String.fromCharCode(ee>>24&255,ee>>16&255,ee>>8&255,255&ee)},a.stringToBytes=j,a.stringToPDFString=function he(ee){if(ee[0]>="\xef"){let Y;if("\xfe"===ee[0]&&"\xff"===ee[1]?Y="utf-16be":"\xff"===ee[0]&&"\xfe"===ee[1]?Y="utf-16le":"\xef"===ee[0]&&"\xbb"===ee[1]&&"\xbf"===ee[2]&&(Y="utf-8"),Y)try{const le=new TextDecoder(Y,{fatal:!0}),ue=j(ee);return le.decode(ue)}catch(le){B(`stringToPDFString: "${le}".`)}}const $=[];for(let Y=0,le=ee.length;Y<le;Y++){const ue=ce[ee.charCodeAt(Y)];$.push(ue?String.fromCharCode(ue):ee.charAt(Y))}return $.join("")},a.stringToUTF16BEString=function _e(ee){const $=["\xfe\xff"];for(let Y=0,le=ee.length;Y<le;Y++){const ue=ee.charCodeAt(Y);$.push(String.fromCharCode(ue>>8&255),String.fromCharCode(255&ue))}return $.join("")},a.stringToUTF8String=de,a.unreachable=M,a.utf8StringToString=function me(ee){return unescape(encodeURIComponent(ee))},a.warn=B,D(2),a.IDENTITY_MATRIX=[1,0,0,1,0,0],a.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],a.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},a.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},a.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},a.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},a.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},a.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},a.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},a.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},a.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},a.AnnotationReplyType={GROUP:"Group",REPLY:"R"},a.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},a.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},a.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},a.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},a.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},a.PageActionEventType={O:"PageOpen",C:"PageClose"},a.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},a.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const f={ERRORS:0,WARNINGS:1,INFOS:5};a.VerbosityLevel=f,a.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},a.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},a.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"},a.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let l=f.WARNINGS;function B(ee){l>=f.WARNINGS&&console.log(`Warning: ${ee}`)}function M(ee){throw new Error(ee)}function J(ee,$,Y){return Object.defineProperty(ee,$,{value:Y,enumerable:!0,configurable:!0,writable:!1}),Y}const w=function(){function $(Y,le){this.constructor===$&&M("Cannot initialize BaseException."),this.message=Y,this.name=le}return $.prototype=new Error,$.constructor=$,$}();function j(ee){"string"!=typeof ee&&M("Invalid argument for stringToBytes");const $=ee.length,Y=new Uint8Array($);for(let le=0;le<$;++le)Y[le]=255&ee.charCodeAt(le);return Y}function G(ee){return void 0!==ee.length?ee.length:void 0!==ee.byteLength?ee.byteLength:void M("Invalid argument for arrayByteLength")}a.BaseException=w,a.PasswordException=class e extends w{constructor($,Y){super($,"PasswordException"),this.code=Y}},a.UnknownErrorException=class t extends w{constructor($,Y){super($,"UnknownErrorException"),this.details=Y}},a.InvalidPDFException=class o extends w{constructor($){super($,"InvalidPDFException")}},a.MissingPDFException=class b extends w{constructor($){super($,"MissingPDFException")}},a.UnexpectedResponseException=class d extends w{constructor($,Y){super($,"UnexpectedResponseException"),this.status=Y}},a.FormatError=class y extends w{constructor($){super($,"FormatError")}},a.AbortException=class L extends w{constructor($){super($,"AbortException")}},a.FeatureTest=class ae{static get isLittleEndian(){return J(this,"isLittleEndian",function Q(){const ee=new Uint8Array(4);return ee[0]=1,1===new Uint32Array(ee.buffer,0,1)[0]}())}static get isEvalSupported(){return J(this,"isEvalSupported",function Z(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return J(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}};const re=[...Array(256).keys()].map(ee=>ee.toString(16).padStart(2,"0"));class ne{static makeHexColor($,Y,le){return`#${re[$]}${re[Y]}${re[le]}`}static scaleMinMax($,Y){let le;$[0]?($[0]<0&&(le=Y[0],Y[0]=Y[1],Y[1]=le),Y[0]*=$[0],Y[1]*=$[0],$[3]<0&&(le=Y[2],Y[2]=Y[3],Y[3]=le),Y[2]*=$[3],Y[3]*=$[3]):(le=Y[0],Y[0]=Y[2],Y[2]=le,le=Y[1],Y[1]=Y[3],Y[3]=le,$[1]<0&&(le=Y[2],Y[2]=Y[3],Y[3]=le),Y[2]*=$[1],Y[3]*=$[1],$[2]<0&&(le=Y[0],Y[0]=Y[1],Y[1]=le),Y[0]*=$[2],Y[1]*=$[2]),Y[0]+=$[4],Y[1]+=$[4],Y[2]+=$[5],Y[3]+=$[5]}static transform($,Y){return[$[0]*Y[0]+$[2]*Y[1],$[1]*Y[0]+$[3]*Y[1],$[0]*Y[2]+$[2]*Y[3],$[1]*Y[2]+$[3]*Y[3],$[0]*Y[4]+$[2]*Y[5]+$[4],$[1]*Y[4]+$[3]*Y[5]+$[5]]}static applyTransform($,Y){return[$[0]*Y[0]+$[1]*Y[2]+Y[4],$[0]*Y[1]+$[1]*Y[3]+Y[5]]}static applyInverseTransform($,Y){const le=Y[0]*Y[3]-Y[1]*Y[2];return[($[0]*Y[3]-$[1]*Y[2]+Y[2]*Y[5]-Y[4]*Y[3])/le,(-$[0]*Y[1]+$[1]*Y[0]+Y[4]*Y[1]-Y[5]*Y[0])/le]}static getAxialAlignedBoundingBox($,Y){const le=ne.applyTransform($,Y),ue=ne.applyTransform($.slice(2,4),Y),fe=ne.applyTransform([$[0],$[3]],Y),ge=ne.applyTransform([$[2],$[1]],Y);return[Math.min(le[0],ue[0],fe[0],ge[0]),Math.min(le[1],ue[1],fe[1],ge[1]),Math.max(le[0],ue[0],fe[0],ge[0]),Math.max(le[1],ue[1],fe[1],ge[1])]}static inverseTransform($){const Y=$[0]*$[3]-$[1]*$[2];return[$[3]/Y,-$[1]/Y,-$[2]/Y,$[0]/Y,($[2]*$[5]-$[4]*$[3])/Y,($[4]*$[1]-$[5]*$[0])/Y]}static apply3dTransform($,Y){return[$[0]*Y[0]+$[1]*Y[1]+$[2]*Y[2],$[3]*Y[0]+$[4]*Y[1]+$[5]*Y[2],$[6]*Y[0]+$[7]*Y[1]+$[8]*Y[2]]}static singularValueDecompose2dScale($){const Y=[$[0],$[2],$[1],$[3]],le=$[0]*Y[0]+$[1]*Y[2],ge=$[2]*Y[1]+$[3]*Y[3],Ce=(le+ge)/2,xe=Math.sqrt((le+ge)**2-4*(le*ge-($[2]*Y[0]+$[3]*Y[2])*($[0]*Y[1]+$[1]*Y[3])))/2,ye=Ce-xe||1;return[Math.sqrt(Ce+xe||1),Math.sqrt(ye)]}static normalizeRect($){const Y=$.slice(0);return $[0]>$[2]&&(Y[0]=$[2],Y[2]=$[0]),$[1]>$[3]&&(Y[1]=$[3],Y[3]=$[1]),Y}static intersect($,Y){const le=Math.max(Math.min($[0],$[2]),Math.min(Y[0],Y[2])),ue=Math.min(Math.max($[0],$[2]),Math.max(Y[0],Y[2]));if(le>ue)return null;const fe=Math.max(Math.min($[1],$[3]),Math.min(Y[1],Y[3])),ge=Math.min(Math.max($[1],$[3]),Math.max(Y[1],Y[3]));return fe>ge?null:[le,fe,ue,ge]}static bezierBoundingBox($,Y,le,ue,fe,ge,Ce,xe){const Ee=[],ye=[[],[]];let Me,Te,Le,Ae,ke,Fe,De,Ie;for(let Ne=0;Ne<2;++Ne)if(0===Ne?(Te=6*$-12*le+6*fe,Me=-3*$+9*le-9*fe+3*Ce,Le=3*le-3*$):(Te=6*Y-12*ue+6*ge,Me=-3*Y+9*ue-9*ge+3*xe,Le=3*ue-3*Y),Math.abs(Me)<1e-12){if(Math.abs(Te)<1e-12)continue;Ae=-Le/Te,0<Ae&&Ae<1&&Ee.push(Ae)}else De=Te*Te-4*Le*Me,Ie=Math.sqrt(De),!(De<0)&&(ke=(-Te+Ie)/(2*Me),0<ke&&ke<1&&Ee.push(ke),Fe=(-Te-Ie)/(2*Me),0<Fe&&Fe<1&&Ee.push(Fe));let Pe,Re=Ee.length;const Oe=Re;for(;Re--;)Ae=Ee[Re],Pe=1-Ae,ye[0][Re]=Pe*Pe*Pe*$+3*Pe*Pe*Ae*le+3*Pe*Ae*Ae*fe+Ae*Ae*Ae*Ce,ye[1][Re]=Pe*Pe*Pe*Y+3*Pe*Pe*Ae*ue+3*Pe*Ae*Ae*ge+Ae*Ae*Ae*xe;return ye[0][Oe]=$,ye[1][Oe]=Y,ye[0][Oe+1]=Ce,ye[1][Oe+1]=xe,ye[0].length=ye[1].length=Oe+2,[Math.min(...ye[0]),Math.min(...ye[1]),Math.max(...ye[0]),Math.max(...ye[1])]}}a.Util=ne;const ce=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function de(ee){return decodeURIComponent(escape(ee))}},(te,a,D)=>{D(3)},(te,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isNodeJS=void 0;const D=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);a.isNodeJS=D},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.version=void 0;var _util=__w_pdfjs_require__(1),_display_utils=__w_pdfjs_require__(5),_font_loader=__w_pdfjs_require__(7),_annotation_storage=__w_pdfjs_require__(8),_canvas=__w_pdfjs_require__(10),_worker_options=__w_pdfjs_require__(13),_is_node=__w_pdfjs_require__(3),_message_handler=__w_pdfjs_require__(14),_metadata=__w_pdfjs_require__(15),_optional_content_config=__w_pdfjs_require__(16),_transport_stream=__w_pdfjs_require__(17),_xfa_text=__w_pdfjs_require__(18);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:te,NodeCMapReaderFactory:a,NodeStandardFontDataFactory:D}=__w_pdfjs_require__(19);exports.DefaultCanvasFactory=DefaultCanvasFactory=te,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=a,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=D}function setPDFNetworkStreamFactory(te){createPDFNetworkStream=te}function getDocument(te){const a=new PDFDocumentLoadingTask;let D;if("string"==typeof te||te instanceof URL)D={url:te};else if((0,_util.isArrayBuffer)(te))D={data:te};else if(te instanceof PDFDataRangeTransport)D={range:te};else{if("object"!=typeof te)throw new Error("Invalid parameter in getDocument, need either string, URL, Uint8Array, or parameter object.");if(!te.url&&!te.data&&!te.range)throw new Error("Invalid parameter object: need either .data, .range or .url");D=te}const r=Object.create(null);let H=null,N=null;for(const z in D){const R=D[z];switch(z){case"url":if(typeof window<"u")try{r[z]=new URL(R,window.location).href;continue}catch(s){(0,_util.warn)(`Cannot create valid URL: "${s}".`)}else if("string"==typeof R||R instanceof URL){r[z]=R.toString();continue}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");case"range":H=R;continue;case"worker":N=R;continue;case"data":if(_is_node.isNodeJS&&typeof Buffer<"u"&&R instanceof Buffer)r[z]=new Uint8Array(R);else{if(R instanceof Uint8Array)break;if("string"==typeof R)r[z]=(0,_util.stringToBytes)(R);else if("object"!=typeof R||null===R||isNaN(R.length)){if(!(0,_util.isArrayBuffer)(R))throw new Error("Invalid PDF binary data: either typed array, string, or array-like object is expected in the data property.");r[z]=new Uint8Array(R)}else r[z]=new Uint8Array(R)}continue}r[z]=R}if(r.CMapReaderFactory=r.CMapReaderFactory||DefaultCMapReaderFactory,r.StandardFontDataFactory=r.StandardFontDataFactory||DefaultStandardFontDataFactory,r.ignoreErrors=!0!==r.stopAtErrors,r.fontExtraProperties=!0===r.fontExtraProperties,r.pdfBug=!0===r.pdfBug,r.enableXfa=!0===r.enableXfa,(!Number.isInteger(r.rangeChunkSize)||r.rangeChunkSize<1)&&(r.rangeChunkSize=DEFAULT_RANGE_CHUNK_SIZE),("string"!=typeof r.docBaseUrl||(0,_display_utils.isDataScheme)(r.docBaseUrl))&&(r.docBaseUrl=null),(!Number.isInteger(r.maxImageSize)||r.maxImageSize<-1)&&(r.maxImageSize=-1),"string"!=typeof r.cMapUrl&&(r.cMapUrl=null),"string"!=typeof r.standardFontDataUrl&&(r.standardFontDataUrl=null),"boolean"!=typeof r.useWorkerFetch&&(r.useWorkerFetch=r.CMapReaderFactory===_display_utils.DOMCMapReaderFactory&&r.StandardFontDataFactory===_display_utils.DOMStandardFontDataFactory),"boolean"!=typeof r.isEvalSupported&&(r.isEvalSupported=!0),"boolean"!=typeof r.disableFontFace&&(r.disableFontFace=_is_node.isNodeJS),"boolean"!=typeof r.useSystemFonts&&(r.useSystemFonts=!_is_node.isNodeJS&&!r.disableFontFace),("object"!=typeof r.ownerDocument||null===r.ownerDocument)&&(r.ownerDocument=globalThis.document),"boolean"!=typeof r.disableRange&&(r.disableRange=!1),"boolean"!=typeof r.disableStream&&(r.disableStream=!1),"boolean"!=typeof r.disableAutoFetch&&(r.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(r.verbosity),!N){const z={verbosity:r.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};N=z.port?_PDFWorker.fromPort(z):new _PDFWorker(z),a._worker=N}const W=a.docId;return N.promise.then(function(){if(a.destroyed)throw new Error("Loading aborted");const z=_fetchDocument(N,r,H,W),R=new Promise(function(s){let P;H?P=new _transport_stream.PDFDataTransportStream({length:r.length,initialData:r.initialData,progressiveDone:r.progressiveDone,contentDispositionFilename:r.contentDispositionFilename,disableRange:r.disableRange,disableStream:r.disableStream},H):r.data||(P=createPDFNetworkStream({url:r.url,length:r.length,httpHeaders:r.httpHeaders,withCredentials:r.withCredentials,rangeChunkSize:r.rangeChunkSize,disableRange:r.disableRange,disableStream:r.disableStream})),s(P)});return Promise.all([z,R]).then(function([s,P]){if(a.destroyed)throw new Error("Loading aborted");const p=new _message_handler.MessageHandler(W,s,N.port),A=new WorkerTransport(p,a,P,r);a._transport=A,p.send("Ready",null)})}).catch(a._capability.reject),a}function _fetchDocument(te,a,D,r){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(function*(te,a,D,r){if(te.destroyed)throw new Error("Worker was destroyed");D&&(a.length=D.length,a.initialData=D.initialData,a.progressiveDone=D.progressiveDone,a.contentDispositionFilename=D.contentDispositionFilename);const H=yield te.messageHandler.sendWithPromise("GetDocRequest",{docId:r,apiVersion:"2.14.305",source:{data:a.data,url:a.url,password:a.password,disableAutoFetch:a.disableAutoFetch,rangeChunkSize:a.rangeChunkSize,length:a.length},maxImageSize:a.maxImageSize,disableFontFace:a.disableFontFace,docBaseUrl:a.docBaseUrl,ignoreErrors:a.ignoreErrors,isEvalSupported:a.isEvalSupported,fontExtraProperties:a.fontExtraProperties,enableXfa:a.enableXfa,useSystemFonts:a.useSystemFonts,cMapUrl:a.useWorkerFetch?a.cMapUrl:null,standardFontDataUrl:a.useWorkerFetch?a.standardFontDataUrl:null});if(te.destroyed)throw new Error("Worker was destroyed");return H})).apply(this,arguments)}class PDFDocumentLoadingTask{static#e=0;constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+PDFDocumentLoadingTask.#e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){var a=this;return _asyncToGenerator(function*(){a.destroyed=!0,yield a._transport?.destroy(),a._transport=null,a._worker&&(a._worker.destroy(),a._worker=null)})()}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(a,D,r=!1,H=null){this.length=a,this.initialData=D,this.progressiveDone=r,this.contentDispositionFilename=H,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(a){this._rangeListeners.push(a)}addProgressListener(a){this._progressListeners.push(a)}addProgressiveReadListener(a){this._progressiveReadListeners.push(a)}addProgressiveDoneListener(a){this._progressiveDoneListeners.push(a)}onDataRange(a,D){for(const r of this._rangeListeners)r(a,D)}onDataProgress(a,D){this._readyCapability.promise.then(()=>{for(const r of this._progressListeners)r(a,D)})}onDataProgressiveRead(a){this._readyCapability.promise.then(()=>{for(const D of this._progressiveReadListeners)D(a)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const a of this._progressiveDoneListeners)a()})}transportReady(){this._readyCapability.resolve()}requestDataRange(a,D){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(a,D){var H,r=this;this._pdfInfo=a,this._transport=D,Object.defineProperty(this,"fingerprint",{get(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, please use `PDFDocumentProxy.fingerprints` instead."),this.fingerprints[0]}}),Object.defineProperty(this,"getStats",{value:(H=_asyncToGenerator(function*(){return(0,_display_utils.deprecated)("`PDFDocumentProxy.getStats`, please use the `PDFDocumentProxy.stats`-getter instead."),r.stats||{streamTypes:{},fontTypes:{}}}),function(){return H.apply(this,arguments)})})}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get stats(){return this._transport.stats}get isPureXfa(){return!!this._transport._htmlForXfa}get allXfaHtml(){return this._transport._htmlForXfa}getPage(a){return this._transport.getPage(a)}getPageIndex(a){return this._transport.getPageIndex(a)}getDestinations(){return this._transport.getDestinations()}getDestination(a){return this._transport.getDestination(a)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(a=!1){return this._transport.startCleanup(a||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}saveDocument(){return this._transport.annotationStorage.size<=0&&(0,_display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this._transport.saveDocument()}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(a,D,r,H,N=!1){this._pageIndex=a,this._pageInfo=D,this._ownerDocument=H,this._transport=r,this._stats=N?new _display_utils.StatTimer:null,this._pdfBug=N,this.commonObjs=r.commonObjs,this.objs=new PDFObjects,this._bitmaps=new Set,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this._annotationPromises=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:a,rotation:D=this.rotate,offsetX:r=0,offsetY:H=0,dontFlip:N=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:a,rotation:D,offsetX:r,offsetY:H,dontFlip:N})}getAnnotations({intent:a="display"}={}){const D=this._transport.getRenderingIntent(a);let r=this._annotationPromises.get(D.cacheKey);return r||(r=this._transport.getAnnotations(this._pageIndex,D.renderingIntent),this._annotationPromises.set(D.cacheKey,r),r=r.then(H=>{for(const N of H)void 0!==N.titleObj&&Object.defineProperty(N,"title",{get:()=>((0,_display_utils.deprecated)("`title`-property on annotation, please use `titleObj` instead."),N.titleObj.str)}),void 0!==N.contentsObj&&Object.defineProperty(N,"contents",{get:()=>((0,_display_utils.deprecated)("`contents`-property on annotation, please use `contentsObj` instead."),N.contentsObj.str)});return H})),r}getJSActions(){return this._jsActionsPromise||=this._transport.getPageJSActions(this._pageIndex)}getXfa(){var a=this;return _asyncToGenerator(function*(){return a._transport._htmlForXfa?.children[a._pageIndex]||null})()}render({canvasContext:a,viewport:D,intent:r="display",annotationMode:H=_util.AnnotationMode.ENABLE,transform:N=null,imageLayer:W=null,canvasFactory:z=null,background:R=null,optionalContentConfigPromise:s=null,annotationCanvasMap:P=null,pageColors:p=null}){void 0!==arguments[0]?.renderInteractiveForms&&((0,_display_utils.deprecated)("render no longer accepts the `renderInteractiveForms`-option, please use the `annotationMode`-option instead."),!0===arguments[0].renderInteractiveForms&&H===_util.AnnotationMode.ENABLE&&(H=_util.AnnotationMode.ENABLE_FORMS)),void 0!==arguments[0]?.includeAnnotationStorage&&((0,_display_utils.deprecated)("render no longer accepts the `includeAnnotationStorage`-option, please use the `annotationMode`-option instead."),!0===arguments[0].includeAnnotationStorage&&H===_util.AnnotationMode.ENABLE&&(H=_util.AnnotationMode.ENABLE_STORAGE)),this._stats&&this._stats.time("Overall");const A=this._transport.getRenderingIntent(r,H);this.pendingCleanup=!1,s||(s=this._transport.getOptionalContentConfig());let C=this._intentStates.get(A.cacheKey);C||(C=Object.create(null),this._intentStates.set(A.cacheKey,C)),C.streamReaderCancelTimeout&&(clearTimeout(C.streamReaderCancelTimeout),C.streamReaderCancelTimeout=null);const F=z||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),_=!!(A.renderingIntent&_util.RenderingIntentFlag.PRINT);C.displayReadyCapability||(C.displayReadyCapability=(0,_util.createPromiseCapability)(),C.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(A));const c=m=>{C.renderTasks.delete(v),(this.cleanupAfterRender||_)&&(this.pendingCleanup=!0),this._tryCleanup(),m?(v.capability.reject(m),this._abortOperatorList({intentState:C,reason:m instanceof Error?m:new Error(m)})):v.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},v=new InternalRenderTask({callback:c,params:{canvasContext:a,viewport:D,transform:N,imageLayer:W,background:R},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:P,operatorList:C.operatorList,pageIndex:this._pageIndex,canvasFactory:F,useRequestAnimationFrame:!_,pdfBug:this._pdfBug,pageColors:p});(C.renderTasks||=new Set).add(v);const h=v.task;return Promise.all([C.displayReadyCapability.promise,s]).then(([m,g])=>{this.pendingCleanup?c():(this._stats&&this._stats.time("Rendering"),v.initializeGraphics({transparency:m,optionalContentConfig:g}),v.operatorListChanged())}).catch(c),h}getOperatorList({intent:a="display",annotationMode:D=_util.AnnotationMode.ENABLE}={}){const H=this._transport.getRenderingIntent(a,D,!0);let W,N=this._intentStates.get(H.cacheKey);return N||(N=Object.create(null),this._intentStates.set(H.cacheKey,N)),N.opListReadCapability||(W=Object.create(null),W.operatorListChanged=function r(){N.operatorList.lastChunk&&(N.opListReadCapability.resolve(N.operatorList),N.renderTasks.delete(W))},N.opListReadCapability=(0,_util.createPromiseCapability)(),(N.renderTasks||=new Set).add(W),N.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList(H)),N.opListReadCapability.promise}streamTextContent({disableCombineTextItems:a=!1,includeMarkedContent:D=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==a,includeMarkedContent:!0===D},{highWaterMark:100,size:H=>H.items.length})}getTextContent(a={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>_xfa_text.XfaText.textContent(r));const D=this.streamTextContent(a);return new Promise(function(r,H){const W=D.getReader(),z={items:[],styles:Object.create(null)};!function N(){W.read().then(function({value:R,done:s}){s?r(z):(Object.assign(z.styles,R.styles),z.items.push(...R.items),N())},H)}()})}getStructTree(){return this._structTreePromise||=this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const a=[];for(const D of this._intentStates.values())if(this._abortOperatorList({intentState:D,reason:new Error("Page was destroyed."),force:!0}),!D.opListReadCapability)for(const r of D.renderTasks)a.push(r.completed),r.cancel();this.objs.clear();for(const D of this._bitmaps)D.close();return this._bitmaps.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,this.pendingCleanup=!1,Promise.all(a)}cleanup(a=!1){return this.pendingCleanup=!0,this._tryCleanup(a)}_tryCleanup(a=!1){if(!this.pendingCleanup)return!1;for(const{renderTasks:D,operatorList:r}of this._intentStates.values())if(D.size>0||!r.lastChunk)return!1;this._intentStates.clear(),this.objs.clear(),this._annotationPromises.clear(),this._jsActionsPromise=null,this._structTreePromise=null,a&&this._stats&&(this._stats=new _display_utils.StatTimer);for(const D of this._bitmaps)D.close();return this._bitmaps.clear(),this.pendingCleanup=!1,!0}_startRenderPage(a,D){const r=this._intentStates.get(D);r&&(this._stats&&this._stats.timeEnd("Page Request"),r.displayReadyCapability&&r.displayReadyCapability.resolve(a))}_renderPageChunk(a,D){for(let r=0,H=a.length;r<H;r++)D.operatorList.fnArray.push(a.fnArray[r]),D.operatorList.argsArray.push(a.argsArray[r]);D.operatorList.lastChunk=a.lastChunk;for(const r of D.renderTasks)r.operatorListChanged();a.lastChunk&&this._tryCleanup()}_pumpOperatorList({renderingIntent:a,cacheKey:D}){const H=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:a,cacheKey:D,annotationStorage:a&_util.RenderingIntentFlag.ANNOTATIONS_STORAGE?this._transport.annotationStorage.serializable:null}).getReader(),N=this._intentStates.get(D);N.streamReader=H;const W=()=>{H.read().then(({value:z,done:R})=>{R?N.streamReader=null:this._transport.destroyed||(this._renderPageChunk(z,N),W())},z=>{if(N.streamReader=null,!this._transport.destroyed){if(N.operatorList){N.operatorList.lastChunk=!0;for(const R of N.renderTasks)R.operatorListChanged();this._tryCleanup()}if(N.displayReadyCapability)N.displayReadyCapability.reject(z);else{if(!N.opListReadCapability)throw z;N.opListReadCapability.reject(z)}}})};W()}_abortOperatorList({intentState:a,reason:D,force:r=!1}){if(a.streamReader){if(!r){if(a.renderTasks.size>0)return;if(D instanceof _display_utils.RenderingCancelledException)return void(a.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:a,reason:D,force:!0}),a.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}if(a.streamReader.cancel(new _util.AbortException(D.message)).catch(()=>{}),a.streamReader=null,!this._transport.destroyed){for(const[H,N]of this._intentStates)if(N===a){this._intentStates.delete(H);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){this._listeners=[],this._deferred=Promise.resolve()}postMessage(a,D){const r={data:structuredClone(a,D)};this._deferred.then(()=>{for(const H of this._listeners)H.call(this,r)})}addEventListener(a,D){this._listeners.push(D)}removeEventListener(a,D){const r=this._listeners.indexOf(D);this._listeners.splice(r,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const te=document?.currentScript?.src;te&&(PDFWorkerUtil.fallbackWorkerSrc=te.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(te,a){let D;try{if(D=new URL(te),!D.origin||"null"===D.origin)return!1}catch{return!1}const r=new URL(a,D);return D.origin===r.origin},PDFWorkerUtil.createCDNWrapper=function(te){return URL.createObjectURL(new Blob([`importScripts("${te}");`]))};class _PDFWorker{static#workerPorts=new WeakMap;constructor({name:te=null,port:a=null,verbosity:D=(0,_util.getVerbosityLevel)()}={}){if(a&&_PDFWorker.#workerPorts.has(a))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=te,this.destroyed=!1,this.verbosity=D,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,a)return _PDFWorker.#workerPorts.set(a,this),void this._initializeFromPort(a);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(te){this._port=te,this._messageHandler=new _message_handler.MessageHandler("main","worker",te),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()}_initialize(){if(typeof Worker<"u"&&!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let te=_PDFWorker.workerSrc;try{PDFWorkerUtil.isSameOrigin(window.location.href,te)||(te=PDFWorkerUtil.createCDNWrapper(new URL(te,window.location).href));const a=new Worker(te),D=new _message_handler.MessageHandler("main","worker",a),r=()=>{a.removeEventListener("error",H),D.destroy(),a.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},H=()=>{this._webWorker||r()};a.addEventListener("error",H),D.on("test",W=>{a.removeEventListener("error",H),this.destroyed?r():W?(this._messageHandler=D,this._port=a,this._webWorker=a,this._readyCapability.resolve(),D.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),D.destroy(),a.terminate())}),D.on("ready",W=>{if(a.removeEventListener("error",H),this.destroyed)r();else try{N()}catch{this._setupFakeWorker()}});const N=()=>{const W=new Uint8Array;D.send("test",W,[W.buffer])};return void N()}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(te=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const a=new LoopbackPort;this._port=a;const D="fake"+PDFWorkerUtil.fakeWorkerId++,r=new _message_handler.MessageHandler(D+"_worker",D,a);te.setup(r,a);const H=new _message_handler.MessageHandler(D,D+"_worker",a);this._messageHandler=H,this._readyCapability.resolve(),H.send("configure",{verbosity:this.verbosity})}).catch(te=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${te.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),_PDFWorker.#workerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(te){if(!te?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this.#workerPorts.has(te.port)?this.#workerPorts.get(te.port):new _PDFWorker(te)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){var _this4=this;const loader=function(){var _ref2=_asyncToGenerator(function*(){const mainWorkerMessageHandler=_this4._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(_this4.workerSrc);return worker.WorkerMessageHandler}return yield(0,_display_utils.loadScript)(_this4.workerSrc),window.pdfjsWorker.WorkerMessageHandler});return function te(){return _ref2.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=_PDFWorker,_PDFWorker.getWorkerSrc=function(){return(0,_display_utils.deprecated)("`PDFWorker.getWorkerSrc()`, please use `PDFWorker.workerSrc` instead."),this.workerSrc};class WorkerTransport{#e=null;#t=new Map;#n=new Map;#r=null;constructor(a,D,r,H){this.messageHandler=a,this.loadingTask=D,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:D.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:H.ownerDocument,styleElement:H.styleElement}),this._params=H,H.useWorkerFetch||(this.CMapReaderFactory=new H.CMapReaderFactory({baseUrl:H.cMapUrl,isCompressed:H.cMapPacked}),this.StandardFontDataFactory=new H.StandardFontDataFactory({baseUrl:H.standardFontDataUrl})),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}get stats(){return this.#e}getRenderingIntent(a,D=_util.AnnotationMode.ENABLE,r=!1){let H=_util.RenderingIntentFlag.DISPLAY,N="";switch(a){case"any":H=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":H=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${a}`)}switch(D){case _util.AnnotationMode.DISABLE:H+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:H+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:H+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,N=this.annotationStorage.hash;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${D}`)}return r&&(H+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:H,cacheKey:`${H}_${N}`}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const a=[];for(const r of this.#t.values())a.push(r._destroy());this.#t.clear(),this.#n.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const D=this.messageHandler.sendWithPromise("Terminate",null);return a.push(D),Promise.all(a).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#r=null,this._getFieldObjectsPromise=null,this._hasJSActionsPromise=null,this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:a,loadingTask:D}=this;a.on("GetReader",(r,H)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=N=>{this._lastProgress={loaded:N.loaded,total:N.total}},H.onPull=()=>{this._fullReader.read().then(function({value:N,done:W}){W?H.close():((0,_util.assert)((0,_util.isArrayBuffer)(N),"GetReader - expected an ArrayBuffer."),H.enqueue(new Uint8Array(N),1,[N]))}).catch(N=>{H.error(N)})},H.onCancel=N=>{this._fullReader.cancel(N),H.ready.catch(W=>{if(!this.destroyed)throw W})}}),a.on("ReaderHeadersReady",r=>{const H=(0,_util.createPromiseCapability)(),N=this._fullReader;return N.headersReady.then(()=>{(!N.isStreamingSupported||!N.isRangeSupported)&&(this._lastProgress&&D.onProgress?.(this._lastProgress),N.onProgress=W=>{D.onProgress?.({loaded:W.loaded,total:W.total})}),H.resolve({isStreamingSupported:N.isStreamingSupported,isRangeSupported:N.isRangeSupported,contentLength:N.contentLength})},H.reject),H.promise}),a.on("GetRangeReader",(r,H)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const N=this._networkStream.getRangeReader(r.begin,r.end);N?(H.onPull=()=>{N.read().then(function({value:W,done:z}){z?H.close():((0,_util.assert)((0,_util.isArrayBuffer)(W),"GetRangeReader - expected an ArrayBuffer."),H.enqueue(new Uint8Array(W),1,[W]))}).catch(W=>{H.error(W)})},H.onCancel=W=>{N.cancel(W),H.ready.catch(z=>{if(!this.destroyed)throw z})}):H.close()}),a.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,D._capability.resolve(new PDFDocumentProxy(r,this))}),a.on("DocException",function(r){let H;switch(r.name){case"PasswordException":H=new _util.PasswordException(r.message,r.code);break;case"InvalidPDFException":H=new _util.InvalidPDFException(r.message);break;case"MissingPDFException":H=new _util.MissingPDFException(r.message);break;case"UnexpectedResponseException":H=new _util.UnexpectedResponseException(r.message,r.status);break;case"UnknownErrorException":H=new _util.UnknownErrorException(r.message,r.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}D._capability.reject(H)}),a.on("PasswordRequest",r=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),D.onPassword){const H=N=>{N instanceof Error?this._passwordCapability.reject(N):this._passwordCapability.resolve({password:N})};try{D.onPassword(H,r.code)}catch(N){this._passwordCapability.reject(N)}}else this._passwordCapability.reject(new _util.PasswordException(r.message,r.code));return this._passwordCapability.promise}),a.on("DataLoaded",r=>{D.onProgress?.({loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),a.on("StartRenderPage",r=>{this.destroyed||this.#t.get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),a.on("commonobj",([r,H,N])=>{if(!this.destroyed&&!this.commonObjs.has(r))switch(H){case"Font":const W=this._params;if("error"in N){const s=N.error;(0,_util.warn)(`Error during font loading: ${s}`),this.commonObjs.resolve(r,s);break}let z=null;W.pdfBug&&globalThis.FontInspector?.enabled&&(z={registerFont(s,P){globalThis.FontInspector.fontAdded(s,P)}});const R=new _font_loader.FontFaceObject(N,{isEvalSupported:W.isEvalSupported,disableFontFace:W.disableFontFace,ignoreErrors:W.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:z});this.fontLoader.bind(R).catch(s=>a.sendWithPromise("FontFallback",{id:r})).finally(()=>{!W.fontExtraProperties&&R.data&&(R.data=null),this.commonObjs.resolve(r,R)});break;case"FontPath":case"Image":this.commonObjs.resolve(r,N);break;default:throw new Error(`Got unknown common object type ${H}`)}}),a.on("obj",([r,H,N,W])=>{if(this.destroyed)return;const z=this.#t.get(H);if(!z.objs.has(r))switch(N){case"Image":z.objs.resolve(r,W);const R=8e6;if(W){let s;if(W.bitmap){const{bitmap:P,width:p,height:A}=W;s=p*A*4,z._bitmaps.add(P)}else s=W.data?.length||0;s>R&&(z.cleanupAfterRender=!0)}break;case"Pattern":z.objs.resolve(r,W);break;default:throw new Error(`Got unknown object type ${N}`)}}),a.on("DocProgress",r=>{this.destroyed||D.onProgress?.({loaded:r.loaded,total:r.total})}),a.on("DocStats",r=>{this.destroyed||(this.#e=Object.freeze({streamTypes:Object.freeze(r.streamTypes),fontTypes:Object.freeze(r.fontTypes)}))}),a.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),a.on("FetchBuiltInCMap",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.CMapReaderFactory?this.CMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),a.on("FetchStandardFontData",r=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.StandardFontDataFactory?this.StandardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}_onUnsupportedFeature({featureId:a}){this.destroyed||this.loadingTask.onUnsupportedFeature?.(a)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(a){if(!Number.isInteger(a)||a<=0||a>this._numPages)return Promise.reject(new Error("Invalid page request."));const D=a-1,r=this.#n.get(D);if(r)return r;const H=this.messageHandler.sendWithPromise("GetPage",{pageIndex:D}).then(N=>{if(this.destroyed)throw new Error("Transport destroyed");const W=new PDFPageProxy(D,N,this,this._params.ownerDocument,this._params.pdfBug);return this.#t.set(D,W),W});return this.#n.set(D,H),H}getPageIndex(a){return"object"!=typeof a||null===a||!Number.isInteger(a.num)||a.num<0||!Number.isInteger(a.gen)||a.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:a.num,gen:a.gen})}getAnnotations(a,D){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:a,intent:D})}saveDocument(){return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:this._fullReader?.filename??null}).finally(()=>{this.annotationStorage.resetModified()})}getFieldObjects(){return this._getFieldObjectsPromise||=this.messageHandler.sendWithPromise("GetFieldObjects",null)}hasJSActions(){return this._hasJSActionsPromise||=this.messageHandler.sendWithPromise("HasJSActions",null)}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(a){return"string"!=typeof a?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:a})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(a){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:a})}getStructTree(a){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:a})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(a=>new _optional_content_config.OptionalContentConfig(a))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.#r||=this.messageHandler.sendWithPromise("GetMetadata",null).then(a=>({info:a[0],metadata:a[1]?new _metadata.Metadata(a[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}))}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}startCleanup(a=!1){var D=this;return _asyncToGenerator(function*(){if(yield D.messageHandler.sendWithPromise("Cleanup",null),!D.destroyed){for(const r of D.#t.values())if(!r.cleanup())throw new Error(`startCleanup: Page ${r.pageNumber} is currently rendering.`);D.commonObjs.clear(),a||D.fontLoader.clear(),D.#r=null,D._getFieldObjectsPromise=null,D._hasJSActionsPromise=null}})()}get loadingParams(){const a=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:a.disableAutoFetch,enableXfa:a.enableXfa})}}class PDFObjects{#e=Object.create(null);#t(a){return this.#e[a]||(this.#e[a]={capability:(0,_util.createPromiseCapability)(),data:null})}get(a,D=null){if(D){const H=this.#t(a);return H.capability.promise.then(()=>D(H.data)),null}const r=this.#e[a];if(!r?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${a}.`);return r.data}has(a){return this.#e[a]?.capability.settled||!1}resolve(a,D=null){const r=this.#t(a);r.data=D,r.capability.resolve()}clear(){this.#e=Object.create(null)}}class RenderTask{constructor(a){this._internalRenderTask=a,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}exports.RenderTask=RenderTask;class InternalRenderTask{static#e=new WeakSet;constructor({callback:a,params:D,objs:r,commonObjs:H,annotationCanvasMap:N,operatorList:W,pageIndex:z,canvasFactory:R,useRequestAnimationFrame:s=!1,pdfBug:P=!1,pageColors:p=null}){this.callback=a,this.params=D,this.objs=r,this.commonObjs=H,this.annotationCanvasMap=N,this.operatorListIdx=null,this.operatorList=W,this._pageIndex=z,this.canvasFactory=R,this._pdfBug=P,this.pageColors=p,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===s&&typeof window<"u",this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=D.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:a=!1,optionalContentConfig:D}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#e.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#e.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:H,transform:N,imageLayer:W,background:z}=this.params;this.gfx=new _canvas.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,W,D,this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:N,viewport:H,transparency:a,background:z}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(a=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&InternalRenderTask.#e.delete(this._canvas),this.callback(a||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),!this.running&&this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}_next(){var a=this;return _asyncToGenerator(function*(){a.cancelled||(a.operatorListIdx=a.gfx.executeOperatorList(a.operatorList,a.operatorListIdx,a._continueBound,a.stepper),a.operatorListIdx===a.operatorList.argsArray.length&&(a.running=!1,a.operatorList.lastChunk&&(a.gfx.endDrawing(),a._canvas&&InternalRenderTask.#e.delete(a._canvas),a.callback())))})()}}const version="2.14.305";exports.version=version;const build="eaaa8b4ad";exports.build=build},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.StatTimer=a.RenderingCancelledException=a.PixelsPerInch=a.PageViewport=a.PDFDateString=a.DOMStandardFontDataFactory=a.DOMSVGFactory=a.DOMCanvasFactory=a.DOMCMapReaderFactory=void 0,a.deprecated=function i(x){console.log("Deprecated API usage: "+x)},a.getFilenameFromUrl=function v(x){const k=x.indexOf("#"),l=x.indexOf("?"),T=Math.min(k>0?k:x.length,l>0?l:x.length);return x.substring(x.lastIndexOf("/",T)+1,T)},a.getPdfFilenameFromUrl=function h(x,k="document.pdf"){if("string"!=typeof x)return k;if(_(x))return(0,H.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),k;const T=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,E=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(x);let O=T.exec(E[1])||T.exec(E[2])||T.exec(E[3]);if(O&&(O=O[0],O.includes("%")))try{O=T.exec(decodeURIComponent(O))[0]}catch{}return O||k},a.getXfaPageViewport=function S(x,{scale:k=1,rotation:l=0}){const{width:T,height:E}=x.attributes.style,O=[0,0,parseInt(T),parseInt(E)];return new C({viewBox:O,scale:k,rotation:l})},a.isDataScheme=_,a.isPdfFile=function c(x){return"string"==typeof x&&/\.pdf$/i.test(x)},a.isValidFetchUrl=g,a.loadScript=function n(x,k=!1){return new Promise((l,T)=>{const E=document.createElement("script");E.src=x,E.onload=function(O){k&&E.remove(),l(O)},E.onerror=function(){T(new Error(`Cannot load script at: ${E.src}`))},(document.head||document.documentElement).appendChild(E)})};var r=D(6),H=D(1);function R(x){return s.apply(this,arguments)}function s(){return(s=_asyncToGenerator(function*(x,k=!1){if(g(x,document.baseURI)){const l=yield fetch(x);if(!l.ok)throw new Error(l.statusText);return k?new Uint8Array(yield l.arrayBuffer()):(0,H.stringToBytes)(yield l.text())}return new Promise((l,T)=>{const E=new XMLHttpRequest;E.open("GET",x,!0),k&&(E.responseType="arraybuffer"),E.onreadystatechange=()=>{if(E.readyState===XMLHttpRequest.DONE){if(200===E.status||0===E.status){let O;if(k&&E.response?O=new Uint8Array(E.response):!k&&E.responseText&&(O=(0,H.stringToBytes)(E.responseText)),O)return void l(O)}T(new Error(E.statusText))}},E.send(null)})})).apply(this,arguments)}a.PixelsPerInch=class W{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF},a.DOMCanvasFactory=class z extends r.BaseCanvasFactory{constructor({ownerDocument:k=globalThis.document}={}){super(),this._document=k}_createCanvas(k,l){const T=this._document.createElement("canvas");return T.width=k,T.height=l,T}},a.DOMCMapReaderFactory=class P extends r.BaseCMapReaderFactory{_fetchData(k,l){return R(k,this.isCompressed).then(T=>({cMapData:T,compressionType:l}))}},a.DOMStandardFontDataFactory=class p extends r.BaseStandardFontDataFactory{_fetchData(k){return R(k,!0)}},a.DOMSVGFactory=class A extends r.BaseSVGFactory{_createSVG(k){return document.createElementNS("http://www.w3.org/2000/svg",k)}};class C{constructor({viewBox:k,scale:l,rotation:T,offsetX:E=0,offsetY:O=0,dontFlip:B=!1}){this.viewBox=k,this.scale=l,this.rotation=T,this.offsetX=E,this.offsetY=O;const M=(k[2]+k[0])/2,I=(k[3]+k[1])/2;let V,X,J,w,e,t,o,b;switch((T%=360)<0&&(T+=360),T){case 180:V=-1,X=0,J=0,w=1;break;case 90:V=0,X=1,J=1,w=0;break;case 270:V=0,X=-1,J=-1,w=0;break;case 0:V=1,X=0,J=0,w=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}B&&(J=-J,w=-w),0===V?(e=Math.abs(I-k[1])*l+E,t=Math.abs(M-k[0])*l+O,o=Math.abs(k[3]-k[1])*l,b=Math.abs(k[2]-k[0])*l):(e=Math.abs(M-k[0])*l+E,t=Math.abs(I-k[1])*l+O,o=Math.abs(k[2]-k[0])*l,b=Math.abs(k[3]-k[1])*l),this.transform=[V*l,X*l,J*l,w*l,e-V*l*M-J*l*I,t-X*l*M-w*l*I],this.width=o,this.height=b}clone({scale:k=this.scale,rotation:l=this.rotation,offsetX:T=this.offsetX,offsetY:E=this.offsetY,dontFlip:O=!1}={}){return new C({viewBox:this.viewBox.slice(),scale:k,rotation:l,offsetX:T,offsetY:E,dontFlip:O})}convertToViewportPoint(k,l){return H.Util.applyTransform([k,l],this.transform)}convertToViewportRectangle(k){const l=H.Util.applyTransform([k[0],k[1]],this.transform),T=H.Util.applyTransform([k[2],k[3]],this.transform);return[l[0],l[1],T[0],T[1]]}convertToPdfPoint(k,l){return H.Util.applyInverseTransform([k,l],this.transform)}}function _(x){const k=x.length;let l=0;for(;l<k&&""===x[l].trim();)l++;return"data:"===x.substring(l,l+5).toLowerCase()}function g(x,k){try{const{protocol:l}=k?new URL(x,k):new URL(x);return"http:"===l||"https:"===l}catch{return!1}}let f;a.PageViewport=C,a.RenderingCancelledException=class F extends H.BaseException{constructor(k,l){super(k,"RenderingCancelledException"),this.type=l}},a.StatTimer=class m{constructor(){this.started=Object.create(null),this.times=[]}time(k){k in this.started&&(0,H.warn)(`Timer is already running for ${k}`),this.started[k]=Date.now()}timeEnd(k){k in this.started||(0,H.warn)(`Timer has not been started for ${k}`),this.times.push({name:k,start:this.started[k],end:Date.now()}),delete this.started[k]}toString(){const k=[];let l=0;for(const T of this.times){const E=T.name;E.length>l&&(l=E.length)}for(const T of this.times){const E=T.end-T.start;k.push(`${T.name.padEnd(l)} ${E}ms\n`)}return k.join("")}},a.PDFDateString=class u{static toDateObject(k){if(!k||"string"!=typeof k)return null;f||(f=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const l=f.exec(k);if(!l)return null;const T=parseInt(l[1],10);let E=parseInt(l[2],10);E=E>=1&&E<=12?E-1:0;let O=parseInt(l[3],10);O=O>=1&&O<=31?O:1;let B=parseInt(l[4],10);B=B>=0&&B<=23?B:0;let M=parseInt(l[5],10);M=M>=0&&M<=59?M:0;let I=parseInt(l[6],10);I=I>=0&&I<=59?I:0;const V=l[7]||"Z";let X=parseInt(l[8],10);X=X>=0&&X<=23?X:0;let J=parseInt(l[9],10)||0;return J=J>=0&&J<=59?J:0,"-"===V?(B+=X,M+=J):"+"===V&&(B-=X,M-=J),new Date(Date.UTC(T,E,O,B,M,I))}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseStandardFontDataFactory=a.BaseSVGFactory=a.BaseCanvasFactory=a.BaseCMapReaderFactory=void 0;var r=D(1);class H{constructor(){this.constructor===H&&(0,r.unreachable)("Cannot initialize BaseCanvasFactory.")}create(s,P){if(s<=0||P<=0)throw new Error("Invalid canvas size");const p=this._createCanvas(s,P);return{canvas:p,context:p.getContext("2d")}}reset(s,P,p){if(!s.canvas)throw new Error("Canvas is not specified");if(P<=0||p<=0)throw new Error("Invalid canvas size");s.canvas.width=P,s.canvas.height=p}destroy(s){if(!s.canvas)throw new Error("Canvas is not specified");s.canvas.width=0,s.canvas.height=0,s.canvas=null,s.context=null}_createCanvas(s,P){(0,r.unreachable)("Abstract method `_createCanvas` called.")}}a.BaseCanvasFactory=H;class N{constructor({baseUrl:s=null,isCompressed:P=!1}){this.constructor===N&&(0,r.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=s,this.isCompressed=P}fetch({name:s}){var P=this;return _asyncToGenerator(function*(){if(!P.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!s)throw new Error("CMap name must be specified.");const p=P.baseUrl+s+(P.isCompressed?".bcmap":"");return P._fetchData(p,P.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE).catch(C=>{throw new Error(`Unable to load ${P.isCompressed?"binary ":""}CMap at: ${p}`)})})()}_fetchData(s,P){(0,r.unreachable)("Abstract method `_fetchData` called.")}}a.BaseCMapReaderFactory=N;class W{constructor({baseUrl:s=null}){this.constructor===W&&(0,r.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=s}fetch({filename:s}){var P=this;return _asyncToGenerator(function*(){if(!P.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!s)throw new Error("Font filename must be specified.");const p=`${P.baseUrl}${s}`;return P._fetchData(p).catch(A=>{throw new Error(`Unable to load font data at: ${p}`)})})()}_fetchData(s){(0,r.unreachable)("Abstract method `_fetchData` called.")}}a.BaseStandardFontDataFactory=W;class z{constructor(){this.constructor===z&&(0,r.unreachable)("Cannot initialize BaseSVGFactory.")}create(s,P){if(s<=0||P<=0)throw new Error("Invalid SVG dimensions");const p=this._createSVG("svg:svg");return p.setAttribute("version","1.1"),p.setAttribute("width",`${s}px`),p.setAttribute("height",`${P}px`),p.setAttribute("preserveAspectRatio","none"),p.setAttribute("viewBox",`0 0 ${s} ${P}`),p}createElement(s){if("string"!=typeof s)throw new Error("Invalid SVG element type");return this._createSVG(s)}_createSVG(s){(0,r.unreachable)("Abstract method `_createSVG` called.")}}a.BaseSVGFactory=z},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FontLoader=a.FontFaceObject=void 0;var r=D(1);class H{constructor({docId:R,onUnsupportedFeature:s,ownerDocument:P=globalThis.document,styleElement:p=null}){this.constructor===H&&(0,r.unreachable)("Cannot initialize BaseFontLoader."),this.docId=R,this._onUnsupportedFeature=s,this._document=P,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(R){this.nativeFontFaces.push(R),this._document.fonts.add(R)}insertRule(R){let s=this.styleElement;s||(s=this.styleElement=this._document.createElement("style"),s.id=`PDFJS_FONT_STYLE_TAG_${this.docId}`,this._document.documentElement.getElementsByTagName("head")[0].appendChild(s));const P=s.sheet;P.insertRule(R,P.cssRules.length)}clear(){for(const R of this.nativeFontFaces)this._document.fonts.delete(R);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}bind(R){var s=this;return _asyncToGenerator(function*(){if(R.attached||R.missingFile)return;if(R.attached=!0,s.isFontLoadingAPISupported){const p=R.createNativeFontFace();if(p){s.addNativeFontFace(p);try{yield p.loaded}catch(A){throw s._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,r.warn)(`Failed to load font '${p.family}': '${A}'.`),R.disableFontFace=!0,A}}return}const P=R.createFontFaceRule();if(P){if(s.insertRule(P),s.isSyncFontLoadingSupported)return;yield new Promise(p=>{const A=s._queueLoadingCallback(p);s._prepareFontLoadEvent([P],[R],A)})}})()}_queueLoadingCallback(R){(0,r.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){return(0,r.shadow)(this,"isFontLoadingAPISupported",!!this._document?.fonts)}get isSyncFontLoadingSupported(){(0,r.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,r.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(R,s,P){(0,r.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let N;a.FontLoader=N,a.FontLoader=N=class extends H{constructor(R){super(R),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let R=!1;return(typeof navigator>"u"||/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent)?.[1]>=14)&&(R=!0),(0,r.shadow)(this,"isSyncFontLoadingSupported",R)}_queueLoadingCallback(R){const P=this.loadingContext,p={id:"pdfjs-font-loading-"+P.nextRequestId++,done:!1,complete:function s(){for((0,r.assert)(!p.done,"completeRequest() cannot be called twice."),p.done=!0;P.requests.length>0&&P.requests[0].done;){const A=P.requests.shift();setTimeout(A.callback,0)}},callback:R};return P.requests.push(p),p}get _loadTestFont(){return(0,r.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(R,s,P){function p(T,E){return T.charCodeAt(E)<<24|T.charCodeAt(E+1)<<16|T.charCodeAt(E+2)<<8|255&T.charCodeAt(E+3)}function A(T,E,O,B){return T.substring(0,E)+B+T.substring(E+O)}let C,F;const _=this._document.createElement("canvas");_.width=1,_.height=1;const c=_.getContext("2d");let v=0;const m=`lt${Date.now()}${this.loadTestFontId++}`;let g=this._loadTestFont;g=A(g,976,m.length,m);const f=1482184792;let u=p(g,16);for(C=0,F=m.length-3;C<F;C+=4)u=u-f+p(m,C)|0;C<m.length&&(u=u-f+p(m+"XXX",C)|0),g=A(g,16,4,(0,r.string32)(u));const S=`url(data:font/opentype;base64,${btoa(g)});`;this.insertRule(`@font-face {font-family:"${m}";src:${S}}`);const k=[];for(const T of s)k.push(T.loadedName);k.push(m);const l=this._document.createElement("div");l.style.visibility="hidden",l.style.width=l.style.height="10px",l.style.position="absolute",l.style.top=l.style.left="0px";for(const T of k){const E=this._document.createElement("span");E.textContent="Hi",E.style.fontFamily=T,l.appendChild(E)}this._document.body.appendChild(l),function h(T,E){if(v++,v>30)return(0,r.warn)("Load test font never loaded."),void E();c.font="30px "+T,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?E():setTimeout(h.bind(null,T,E))}(m,()=>{l.remove(),P.complete()})}},a.FontFaceObject=class W{constructor(R,{isEvalSupported:s=!0,disableFontFace:P=!1,ignoreErrors:p=!1,onUnsupportedFeature:A,fontRegistry:C=null}){this.compiledGlyphs=Object.create(null);for(const F in R)this[F]=R[F];this.isEvalSupported=!1!==s,this.disableFontFace=!0===P,this.ignoreErrors=!0===p,this._onUnsupportedFeature=A,this.fontRegistry=C}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let R;if(this.cssFontInfo){const s={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(s.style=`oblique ${this.cssFontInfo.italicAngle}deg`),R=new FontFace(this.cssFontInfo.fontFamily,this.data,s)}else R=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),R}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const R=(0,r.bytesToString)(this.data),s=`url(data:${this.mimetype};base64,${btoa(R)});`;let P;if(this.cssFontInfo){let p=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(p+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),P=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${p}src:${s}}`}else P=`@font-face {font-family:"${this.loadedName}";src:${s}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,s),P}getPathGenerator(R,s){if(void 0!==this.compiledGlyphs[s])return this.compiledGlyphs[s];let P;try{P=R.get(this.loadedName+"_path_"+s)}catch(p){if(!this.ignoreErrors)throw p;return this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,r.warn)(`getPathGenerator - ignoring character: "${p}".`),this.compiledGlyphs[s]=function(A,C){}}if(this.isEvalSupported&&r.FeatureTest.isEvalSupported){const p=[];for(const A of P){const C=void 0!==A.args?A.args.join(","):"";p.push("c.",A.cmd,"(",C,");\n")}return this.compiledGlyphs[s]=new Function("c","size",p.join(""))}return this.compiledGlyphs[s]=function(p,A){for(const C of P)"scale"===C.cmd&&(C.args=[A,-A]),p[C.cmd].apply(
1p,C.args)}}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AnnotationStorage=void 0;var r=D(9),H=D(1);a.AnnotationStorage=class N{constructor(){this._storage=new Map,this._modified=!1,this.onSetModified=null,this.onResetModified=null}getValue(z,R){const s=this._storage.get(z);return void 0===s?R:Object.assign(R,s)}getRawValue(z){return this._storage.get(z)}setValue(z,R){const s=this._storage.get(z);let P=!1;if(void 0!==s)for(const[p,A]of Object.entries(R))s[p]!==A&&(P=!0,s[p]=A);else P=!0,this._storage.set(z,R);P&&this._setModified()}getAll(){return this._storage.size>0?(0,H.objectFromMap)(this._storage):null}get size(){return this._storage.size}_setModified(){this._modified||(this._modified=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this._modified&&(this._modified=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get serializable(){return this._storage.size>0?this._storage:null}get hash(){const z=new r.MurmurHash3_64;for(const[R,s]of this._storage)z.update(`${R}:${JSON.stringify(s)}`);return z.hexdigest()}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.MurmurHash3_64=void 0;var r=D(1);const H=3285377520,N=4294901760,W=65535;a.MurmurHash3_64=class z{constructor(s){this.h1=s?4294967295&s:H,this.h2=s?4294967295&s:H}update(s){let P,p;if("string"==typeof s){P=new Uint8Array(2*s.length),p=0;for(let f=0,u=s.length;f<u;f++){const S=s.charCodeAt(f);S<=255?P[p++]=S:(P[p++]=S>>>8,P[p++]=255&S)}}else{if(!(0,r.isArrayBuffer)(s))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");P=s.slice(),p=P.byteLength}const A=p>>2,C=p-4*A,F=new Uint32Array(P.buffer,0,A);let _=0,c=0,v=this.h1,h=this.h2;const m=3432918353,g=461845907,n=m&W,i=g&W;for(let f=0;f<A;f++)1&f?(_=F[f],_=_*m&N|_*n&W,_=_<<15|_>>>17,_=_*g&N|_*i&W,v^=_,v=v<<13|v>>>19,v=5*v+3864292196):(c=F[f],c=c*m&N|c*n&W,c=c<<15|c>>>17,c=c*g&N|c*i&W,h^=c,h=h<<13|h>>>19,h=5*h+3864292196);switch(_=0,C){case 3:_^=P[4*A+2]<<16;case 2:_^=P[4*A+1]<<8;case 1:_^=P[4*A],_=_*m&N|_*n&W,_=_<<15|_>>>17,_=_*g&N|_*i&W,1&A?v^=_:h^=_}this.h1=v,this.h2=h}hexdigest(){let s=this.h1,P=this.h2;s^=P>>>1,s=3981806797*s&N|36045*s&W,P=4283543511*P&N|(2950163797*(P<<16|s>>>16)&N)>>>16,s^=P>>>1,s=444984403*s&N|60499*s&W,P=3301882366*P&N|(3120437893*(P<<16|s>>>16)&N)>>>16,s^=P>>>1;const p=(s>>>0).toString(16),A=(P>>>0).toString(16);return p.padStart(8,"0")+A.padStart(8,"0")}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CanvasGraphics=void 0;var r=D(1),H=D(11),N=D(12),W=D(3),z=D(5);const P=4096,_=16,c=1.000001;function h(w){if(w._transformStack&&(w._transformStack=[]),!w.mozCurrentTransform){w._originalSave=w.save,w._originalRestore=w.restore,w._originalRotate=w.rotate,w._originalScale=w.scale,w._originalTranslate=w.translate,w._originalTransform=w.transform,w._originalSetTransform=w.setTransform,w._originalResetTransform=w.resetTransform,w._transformMatrix=w._transformMatrix||[1,0,0,1,0,0],w._transformStack=[];try{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(w),"lineWidth");w._setLineWidth=e.set,w._getLineWidth=e.get,Object.defineProperty(w,"lineWidth",{set:function(o){this._setLineWidth(o*c)},get:function(){return this._getLineWidth()}})}catch{}Object.defineProperty(w,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(w,"mozCurrentTransformInverse",{get:function(){const[t,o,b,d,y,L]=this._transformMatrix,U=t*d-o*b,j=o*b-t*d;return[d/U,o/j,b/j,t/U,(d*y-b*L)/j,(o*y-t*L)/U]}}),w.save=function(){const t=this._transformMatrix;this._transformStack.push(t),this._transformMatrix=t.slice(0,6),this._originalSave()},w.restore=function(){0===this._transformStack.length&&(0,r.warn)("Tried to restore a ctx when the stack was already empty.");const t=this._transformStack.pop();t&&(this._transformMatrix=t,this._originalRestore())},w.translate=function(t,o){const b=this._transformMatrix;b[4]=b[0]*t+b[2]*o+b[4],b[5]=b[1]*t+b[3]*o+b[5],this._originalTranslate(t,o)},w.scale=function(t,o){const b=this._transformMatrix;b[0]*=t,b[1]*=t,b[2]*=o,b[3]*=o,this._originalScale(t,o)},w.transform=function(t,o,b,d,y,L){const U=this._transformMatrix;this._transformMatrix=[U[0]*t+U[2]*o,U[1]*t+U[3]*o,U[0]*b+U[2]*d,U[1]*b+U[3]*d,U[0]*y+U[2]*L+U[4],U[1]*y+U[3]*L+U[5]],w._originalTransform(t,o,b,d,y,L)},w.setTransform=function(t,o,b,d,y,L){this._transformMatrix=[t,o,b,d,y,L],w._originalSetTransform(t,o,b,d,y,L)},w.resetTransform=function(){this._transformMatrix=[1,0,0,1,0,0],w._originalResetTransform()},w.rotate=function(t){const o=Math.cos(t),b=Math.sin(t),d=this._transformMatrix;this._transformMatrix=[d[0]*o+d[2]*b,d[1]*o+d[3]*b,d[0]*-b+d[2]*o,d[1]*-b+d[3]*o,d[4],d[5]],this._originalRotate(t)}}}class m{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,o,b){let d;return void 0!==this.cache[e]?(d=this.cache[e],this.canvasFactory.reset(d,t,o),d.context.setTransform(1,0,0,1,0,0)):(d=this.canvasFactory.create(t,o),this.cache[e]=d),b&&h(d.c
vendor: 29,888 bytes, line 1
1ontext),d}delete(e){delete this.cache[e]}clear(){for(const e in this.cache)this.canvasFactory.destroy(this.cache[e]),delete this.cache[e]}}function g(w,e,t,o,b,d,y,L,U,j){const[G,q,K,ie,se,Q]=w.mozCurrentTransform;if(0===q&&0===K){const ne=Math.round(y*G+se),he=Math.round(L*ie+Q),pe=Math.abs(Math.round((y+U)*G+se)-ne)||1,de=Math.abs(Math.round((L+j)*ie+Q)-he)||1;return w.setTransform(Math.sign(G),0,0,Math.sign(ie),ne,he),w.drawImage(e,t,o,b,d,0,0,pe,de),w.setTransform(G,q,K,ie,se,Q),[pe,de]}if(0===G&&0===ie){const ne=Math.round(L*K+se),he=Math.round(y*q+Q),pe=Math.abs(Math.round((L+j)*K+se)-ne)||1,de=Math.abs(Math.round((y+U)*q+Q)-he)||1;return w.setTransform(0,Math.sign(q),Math.sign(K),0,ne,he),w.drawImage(e,t,o,b,d,0,0,de,pe),w.setTransform(G,q,K,ie,se,Q),[de,pe]}return w.drawImage(e,t,o,b,d,y,L,U,j),[Math.hypot(G,q)*U,Math.hypot(K,ie)*j]}class i{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=r.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=r.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps=null,this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,o){[t,o]=r.Util.applyTransform([t,o],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,o),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,o)}updateRectMinMax(e,t){const o=r.Util.applyTransform(t,e),b=r.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,o[0],b[0]),this.minY=Math.min(this.minY,o[1],b[1]),this.maxX=Math.max(this.maxX,o[0],b[0]),this.maxY=Math.max(this.maxY,o[1],b[1])}updateScalingPathMinMax(e,t){r.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,o,b,d,y,L,U,j,G){const q=r.Util.bezierBoundingBox(t,o,b,d,y,L,U,j);if(G)return G[0]=Math.min(G[0],q[0],q[2]),G[1]=Math.max(G[1],q[0],q[2]),G[2]=Math.min(G[2],q[1],q[3]),void(G[3]=Math.max(G[3],q[1],q[3]));this.updateRectMinMax(e,q)}getPathBoundingBox(e=H.PathType.FILL,t=null){const o=[this.minX,this.minY,this.maxX,this.maxY];if(e===H.PathType.STROKE){t||(0,r.unreachable)("Stroke bounding box must include transform.");const b=r.Util.singularValueDecompose2dScale(t),d=b[0]*this.lineWidth/2,y=b[1]*this.lineWidth/2;o[0]-=d,o[1]-=y,o[2]+=d,o[3]+=y}return o}updateClipFromPath(){const e=r.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=H.PathType.FILL,t=null){return r.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function f(w,e,t=null){if(typeof ImageData<"u"&&e instanceof ImageData)return void w.putImageData(e,0,0);const o=e.height,b=e.width,d=o%_,y=(o-d)/_,L=0===d?y:y+1,U=w.createImageData(b,_);let G,j=0;const q=e.data,K=U.data;let ie,se,Q,Z,ae,re,ne,ce;if(t)switch(t.length){case 1:ae=t[0],re=t[0],ne=t[0],ce=t[0];break;case 4:ae=t[0],re=t[1],ne=t[2],ce=t[3]}if(e.kind===r.ImageKind.GRAYSCALE_1BPP){const he=q.byteLength,oe=new Uint32Array(K.buffer,0,K.byteLength>>2),pe=oe.length,_e=b+7>>3;let de=4294967295,me=r.FeatureTest.isLittleEndian?4278190080:255;for(ce&&255===ce[0]&&0===ce[255]&&([de,me]=[me,de]),ie=0;ie<L;ie++){for(Q=ie<y?_:d,G=0,se=0;se<Q;se++){const ve=he-j;let Se=0;const be=ve>_e?b:8*ve-7,we=-8&be;let ee=0,$=0;for(;Se<we;Se+=8)$=q[j++],oe[G++]=128&$?de:me,oe[G++]=64&$?de:me,oe[G++]=32&$?de:me,oe[G++]=16&$?de:me,oe[G++]=8&$?de:me,oe[G++]=4&$?de:me,oe[G++]=2&$?de:me,oe[G++]=1&$?de:me;for(;Se<be;Se++)0===ee&&($=q[j++],ee=128),oe[G++]=$&ee?de:me,ee>>=1}for(;G<pe;)oe[G++]=0;w.putImageData(U,0,ie*_)}}else if(e.kind===r.ImageKind.RGBA_32BPP){const he=!!(ae||re||ne);for(se=0,Z=b*_*4,ie=0;ie<y;ie++){if(K.set(q.subarray(j,j+Z)),j+=Z,he)for(let oe=0;oe<Z;oe+=4)ae&&(K[oe+0]=ae[K[oe+0]]),re&&(K[oe+1]=re[K[oe+1]]),ne&&(K[oe+2]=ne[K[oe+2]]);w.putImageData(U,0,se),se+=_}if(ie<L){if(Z=b*d*4,K.set(q.subarray(j,j+Z)),he)for(let oe=0;oe<Z;oe+=4)ae&&(K[oe+0]=ae[K[oe+0]]),re&&(K[oe+1]=re[K[oe+1]]),ne&&(K[oe+2]=ne[K[oe+2]]);w.putImageData(U,0,se)}}else{if(e.kind!==r.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${e.kind}`);{const he=!!(ae||re||ne);for(Q=_,Z=b*Q,ie=0;ie<L;ie++){for(ie>=y&&(Q=d,Z=b*Q),G=0,se=Z;se--;)K[G++]=q[j++],K[G++]=q[j++],K[G++]=q[j++],K[G++]=255;if(he)for(let oe=0;oe<G;oe+=4)ae&&(K[oe+0]=ae[K[oe+0]]),re&&(K[oe+1]=re[K[oe+1]]),ne&&(K[oe+2]=ne[K[oe+2]]);w.putImageData(U,0,ie*_)}}}}function u(w,e){if(e.bitmap)return void w.drawImage(e.bitmap,0,0);const t=e.height,o=e.width,b=t%_,d=(t-b)/_,y=0===b?d:d+1,L=w.createImageData(o,_);let U=0;const j=e.data,G=L.data;for(let q=0;q<y;q++){const K=q<d?_:b;({srcPos:U}=(0,N.applyMaskImageData)({src:j,srcPos:U,dest:G,width:o,height:K})),w.putImageData(L,0,q*_)}}function S(w,e){const t=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"];for(let o=0,b=t.length;o<b;o++){const d=t[o];void 0!==w[d]&&(e[d]=w[d])}void 0!==w.setLineDash&&(e.setLineDash(w.getLineDash()),e.lineDashOffset=w.lineDashOffset)}function x(w,e){w.strokeStyle=w.fillStyle=e||"#000000",w.fillRule="nonzero",w.globalAlpha=1,w.lineWidth=1,w.lineCap="butt",w.lineJoin="miter",w.miterLimit=10,w.globalCompositeOperation="source-over",w.font="10px sans-serif",void 0!==w.setLineDash&&(w.setLineDash([]),w.lineDashOffset=0)}function k(w,e,t,o){const b=w.length;for(let d=3;d<b;d+=4){const y=w[d];if(0===y)w[d-3]=e,w[d-2]=t,w[d-1]=o;else if(y<255){const L=255-y;w[d-3]=w[d-3]*y+e*L>>8,w[d-2]=w[d-2]*y+t*L>>8,w[d-1]=w[d-1]*y+o*L>>8}}}function l(w,e,t){const o=w.length;for(let d=3;d<o;d+=4)e[d]=e[d]*(t?t[w[d]]:w[d])*.00392156862745098|0}function T(w,e,t){const o=w.length;for(let b=3;b<o;b+=4){const d=77*w[b-3]+152*w[b-2]+28*w[b-1];e[b]=t?e[b]*t[d>>8]>>8:e[b]*d>>16}}function B(w,e){const t=r.Util.singularValueDecompose2dScale(w);t[0]=Math.fround(t[0]),t[1]=Math.fround(t[1]);const o=Math.fround((globalThis.devicePixelRatio||1)*z.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==e?e:t[0]<=o||t[1]<=o}const M=["butt","round","square"],I=["miter","round","bevel"],V={},X={};class J{constructor(e,t,o,b,d,y,L,U){this.ctx=e,this.current=new i(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=o,this.canvasFactory=b,this.imageLayer=d,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=[],this.optionalContentConfig=y,this.cachedCanvases=new m(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=L,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.backgroundColor=U?.background||null,this.foregroundColor=U?.foreground||null,e&&h(e),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:o=!1,background:b=null}){const d=this.ctx.canvas.width,y=this.ctx.canvas.height,L=b||"#ffffff";if(this.ctx.save(),this.foregroundColor&&this.backgroundColor){this.ctx.fillStyle=this.foregroundColor;const U=this.foregroundColor=this.ctx.fillStyle;this.ctx.fillStyle=this.backgroundColor;const j=this.backgroundColor=this.ctx.fillStyle;let G=!0,q=L;if(this.ctx.fillStyle=L,q=this.ctx.fillStyle,G="string"==typeof q&&/^#[0-9A-Fa-f]{6}$/.test(q),"#000000"===U&&"#ffffff"===j||U===j||!G)this.foregroundColor=this.backgroundColor=null;else{const K=parseInt(q.slice(1),16),se=(K&&65280)>>8,Q=K&&255,Z=re=>(re/=255)<=.03928?re/12.92:((re+.055)/1.055)**2.4,ae=Math.round(.2126*Z((K&&16711680)>>16)+.7152*Z(se)+.0722*Z(Q));this.selectColor=(re,ne,ce)=>{const he=.2126*Z(re)+.7152*Z(ne)+.0722*Z(ce);return Math.round(he)===ae?j:U}}}if(this.ctx.fillStyle=this.backgroundColor||L,this.ctx.fillRect(0,0,d,y),this.ctx.restore(),o){const U=this.cachedCanvases.getCanvas("transparent",d,y,!0);this.compositeCtx=this.ctx,this.transparentCanvas=U.canvas,this.ctx=U.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),x(this.ctx,this.foregroundColor),e&&(this.ctx.transform.apply(this.ctx,e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform.apply(this.ctx,t.transform),this.viewportScale=t.scale,this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()}executeOperatorList(e,t,o,b){const d=e.argsArray,y=e.fnArray;let L=t||0;const U=d.length;if(U===L)return L;const j=U-L>10&&"function"==typeof o,G=j?Date.now()+15:0;let q=0;const K=this.commonObjs,ie=this.objs;let se;for(;;){if(void 0!==b&&L===b.nextBreakPoint)return b.breakIt(L,o),L;if(se=y[L],se!==r.OPS.dependency)this[se].apply(this,d[L]);else for(const Q of d[L]){const Z=Q.startsWith("g_")?K:ie;if(!Z.has(Q))return Z.get(Q,o),L}if(L++,L===U)return L;if(j&&++q>10){if(Date.now()>G)return o(),L;q=0}}}endDrawing(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.imageLayer&&this.imageLayer.endLayout()}_scaleImage(e,t){const o=e.width,b=e.height;let G,q,d=Math.max(Math.hypot(t[0],t[1]),1),y=Math.max(Math.hypot(t[2],t[3]),1),L=o,U=b,j="prescale1";for(;d>2&&L>1||y>2&&U>1;){let K=L,ie=U;d>2&&L>1&&(K=Math.ceil(L/2),d/=L/K),y>2&&U>1&&(ie=Math.ceil(U/2),y/=U/ie),G=this.cachedCanvases.getCanvas(j,K,ie,!1),q=G.context,q.clearRect(0,0,K,ie),q.drawImage(e,0,0,L,U,0,0,K,ie),e=G.canvas,L=K,U=ie,j="prescale1"===j?"prescale2":"prescale1"}return{img:e,paintWidth:L,paintHeight:U}}_createMaskCanvas(e){const t=this.ctx,{width:o,height:b}=e,d=this.current.fillColor,y=this.current.patternFill,L=t.mozCurrentTransform;let U,j,G,q;if((e.bitmap||e.data)&&e.count>1){const pe=e.bitmap||e.data.buffer,_e=L.slice(0,4);j=JSON.stringify(y?_e:[_e,d]),U=this._cachedBitmapsMap.get(pe),U||(U=new Map,this._cachedBitmapsMap.set(pe,U));const de=U.get(j);if(de&&!y)return{canvas:de,offsetX:Math.round(Math.min(L[0],L[2])+L[4]),offsetY:Math.round(Math.min(L[1],L[3])+L[5])};G=de}G||(q=this.cachedCanvases.getCanvas("maskCanvas",o,b,!1),u(q.context,e));let K=r.Util.transform(L,[1/o,0,0,-1/b,0,0]);K=r.Util.transform(K,[1,0,0,1,0,-b]);const ie=r.Util.applyTransform([0,0],K),se=r.Util.applyTransform([o,b],K),Q=r.Util.normalizeRect([ie[0],ie[1],se[0],se[1]]),Z=Math.round(Q[2]-Q[0])||1,ae=Math.round(Q[3]-Q[1])||1,re=this.cachedCanvases.getCanvas("fillCanvas",Z,ae,!0),ne=re.context,ce=Math.min(ie[0],se[0]),he=Math.min(ie[1],se[1]);ne.translate(-ce,-he),ne.transform.apply(ne,K),G||(G=this._scaleImage(q.canvas,ne.mozCurrentTransformInverse),G=G.img,U&&y&&U.set(j,G)),ne.imageSmoothingEnabled=B(ne.mozCurrentTransform,e.interpolate),g(ne,G,0,0,G.width,G.height,0,0,o,b),ne.globalCompositeOperation="source-in";const oe=r.Util.transform(ne.mozCurrentTransformInverse,[1,0,0,1,-ce,-he]);return ne.fillStyle=y?d.getPattern(t,this,oe,H.PathType.FILL):d,ne.fillRect(0,0,o,b),U&&!y&&(this.cachedCanvases.delete("fillCanvas"),U.set(j,re.canvas)),{canvas:re.canvas,offsetX:Math.round(ce),offsetY:Math.round(he)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=M[e]}setLineJoin(e){this.ctx.lineJoin=I[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const o=this.ctx;void 0!==o.setLineDash&&(o.setLineDash(e),o.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(let t=0,o=e.length;t<o;t++){const b=e[t],y=b[1];switch(b[0]){case"LW":this.setLineWidth(y);break;case"LC":this.setLineCap(y);break;case"LJ":this.setLineJoin(y);break;case"ML":this.setMiterLimit(y);break;case"D":this.setDash(y[0],y[1]);break;case"RI":this.setRenderingIntent(y);break;case"FL":this.setFlatness(y);break;case"Font":this.setFont(y[0],y[1]);break;case"CA":this.current.strokeAlpha=b[1];break;case"ca":this.current.fillAlpha=b[1],this.ctx.globalAlpha=b[1];break;case"BM":this.ctx.globalCompositeOperation=y;break;case"SMask":this.current.activeSMask=y?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=y}}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const b=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,this.ctx.canvas.width,this.ctx.canvas.height,!0);this.suspendedCtx=this.ctx,this.ctx=b.context;const d=this.ctx;d.setTransform.apply(d,this.suspendedCtx.mozCurrentTransform),S(this.suspendedCtx,d),function v(w,e){if(w._removeMirroring)throw new Error("Context is already forwarding operations.");w.__originalSave=w.save,w.__originalRestore=w.restore,w.__originalRotate=w.rotate,w.__originalScale=w.scale,w.__originalTranslate=w.translate,w.__originalTransform=w.transform,w.__originalSetTransform=w.setTransform,w.__originalResetTransform=w.resetTransform,w.__originalClip=w.clip,w.__originalMoveTo=w.moveTo,w.__originalLineTo=w.lineTo,w.__originalBezierCurveTo=w.bezierCurveTo,w.__originalRect=w.rect,w.__originalClosePath=w.closePath,w.__originalBeginPath=w.beginPath,w._removeMirroring=()=>{w.save=w.__originalSave,w.restore=w.__originalRestore,w.rotate=w.__originalRotate,w.scale=w.__originalScale,w.translate=w.__originalTranslate,w.transform=w.__originalTransform,w.setTransform=w.__originalSetTransform,w.resetTransform=w.__originalResetTransform,w.clip=w.__originalClip,w.moveTo=w.__originalMoveTo,w.lineTo=w.__originalLineTo,w.bezierCurveTo=w.__originalBezierCurveTo,w.rect=w.__originalRect,w.closePath=w.__originalClosePath,w.beginPath=w.__originalBeginPath,delete w._removeMirroring},w.save=function(){e.save(),this.__originalSave()},w.restore=function(){e.restore(),this.__originalRestore()},w.translate=function(o,b){e.translate(o,b),this.__originalTranslate(o,b)},w.scale=function(o,b){e.scale(o,b),this.__originalScale(o,b)},w.transform=function(o,b,d,y,L,U){e.transform(o,b,d,y,L,U),this.__originalTransform(o,b,d,y,L,U)},w.setTransform=function(o,b,d,y,L,U){e.setTransform(o,b,d,y,L,U),this.__originalSetTransform(o,b,d,y,L,U)},w.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},w.rotate=function(o){e.rotate(o),this.__originalRotate(o)},w.clip=function(o){e.clip(o),this.__originalClip(o)},w.moveTo=function(t,o){e.moveTo(t,o),this.__originalMoveTo(t,o)},w.lineTo=function(t,o){e.lineTo(t,o),this.__originalLineTo(t,o)},w.bezierCurveTo=function(t,o,b,d,y,L){e.bezierCurveTo(t,o,b,d,y,L),this.__originalBezierCurveTo(t,o,b,d,y,L)},w.rect=function(t,o,b,d){e.rect(t,o,b,d),this.__originalRect(t,o,b,d)},w.closePath=function(){e.closePath(),this.__originalClosePath()},w.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}(d,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),S(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){this.current.activeSMask&&(e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height],function O(w,e,t,o){const b=o[0],d=o[1],y=o[2]-b,L=o[3]-d;0===y||0===L||(function E(w,e,t,o,b,d,y,L,U,j,G){const q=!!d,K=q?d[0]:0,ie=q?d[1]:0,se=q?d[2]:0;let Q;Q="Luminosity"===b?T:l;const ae=Math.min(o,Math.ceil(1048576/t));for(let re=0;re<o;re+=ae){const ne=Math.min(ae,o-re),ce=w.getImageData(L-j,re+(U-G),t,ne),he=e.getImageData(L,re+U,t,ne);q&&k(ce.data,K,ie,se),Q(ce.data,he.data,y),e.putImageData(he,L,re+U)}}(e.context,t,y,L,e.subtype,e.backdrop,e.transferMap,b,d,e.offsetX,e.offsetY),w.save(),w.globalAlpha=1,w.globalCompositeOperation="source-over",w.setTransform(1,0,0,1,0,0),w.drawImage(t.canvas,0,0),w.restore())}(this.suspendedCtx,this.current.activeSMask,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore())}save(){this.inSMaskMode?(S(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),S(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null)}transform(e,t,o,b,d,y){this.ctx.transform(e,t,o,b,d,y),this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null}constructPath(e,t,o){const b=this.ctx,d=this.current;let U,j,y=d.x,L=d.y;const G=b.mozCurrentTransform,q=0===G[0]&&0===G[3]||0===G[1]&&0===G[2],K=q?o.slice(0):null;for(let ie=0,se=0,Q=e.length;ie<Q;ie++)switch(0|e[ie]){case r.OPS.rectangle:y=t[se++],L=t[se++];const Z=t[se++],ae=t[se++],re=y+Z,ne=L+ae;b.moveTo(y,L),0===Z||0===ae?b.lineTo(re,ne):(b.lineTo(re,L),b.lineTo(re,ne),b.lineTo(y,ne)),q||d.updateRectMinMax(G,[y,L,re,ne]),b.closePath();break;case r.OPS.moveTo:y=t[se++],L=t[se++],b.moveTo(y,L),q||d.updatePathMinMax(G,y,L);break;case r.OPS.lineTo:y=t[se++],L=t[se++],b.lineTo(y,L),q||d.updatePathMinMax(G,y,L);break;case r.OPS.curveTo:U=y,j=L,y=t[se+4],L=t[se+5],b.bezierCurveTo(t[se],t[se+1],t[se+2],t[se+3],y,L),d.updateCurvePathMinMax(G,U,j,t[se],t[se+1],t[se+2],t[se+3],y,L,K),se+=6;break;case r.OPS.curveTo2:U=y,j=L,b.bezierCurveTo(y,L,t[se],t[se+1],t[se+2],t[se+3]),d.updateCurvePathMinMax(G,U,j,y,L,t[se],t[se+1],t[se+2],t[se+3],K),y=t[se+2],L=t[se+3],se+=4;break;case r.OPS.curveTo3:U=y,j=L,y=t[se+2],L=t[se+3],b.bezierCurveTo(t[se],t[se+1],y,L,y,L),d.updateCurvePathMinMax(G,U,j,t[se],t[se+1],y,L,y,L,K),se+=4;break;case r.OPS.closePath:b.closePath()}q&&d.updateScalingPathMinMax(G,K),d.setCurrentPoint(y,L)}closePath(){this.ctx.closePath()}stroke(e){e=!(typeof e<"u")||e;const t=this.ctx,o=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof o&&o?.getPattern?(t.save(),t.strokeStyle=o.getPattern(t,this,t.mozCurrentTransformInverse,H.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e){e=!(typeof e<"u")||e;const t=this.ctx,o=this.current.fillColor;let d=!1;this.current.patternFill&&(t.save(),t.fillStyle=o.getPattern(t,this,t.mozCurrentTransformInverse,H.PathType.FILL),d=!0);const y=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==y&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),d&&t.restore(),e&&this.consumePath(y)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=V}eoClip(){this.pendingClip=X}beginText(){this.current.textMatrix=r.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(let o=0;o<e.length;o++){const b=e[o];t.setTransform.apply(t,b.transform),t.translate(b.x,b.y),b.addToPath(t,b.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const o=this.commonObjs.get(e),b=this.current;if(!o)throw new Error(`Can't find font for ${e}`);if(b.fontMatrix=o.fontMatrix||r.FONT_IDENTITY_MATRIX,(0===b.fontMatrix[0]||0===b.fontMatrix[3])&&(0,r.warn)("Invalid font matrix for font "+e),t<0?(t=-t,b.fontDirection=-1):b.fontDirection=1,this.current.font=o,this.current.fontSize=t,o.isType3Font)return;let y="normal";o.black?y="900":o.bold&&(y="bold");const L=o.italic?"italic":"normal",U=`"${o.loadedName||"sans-serif"}", ${o.fallbackName}`;let j=t;t<16?j=16:t>100&&(j=100),this.current.fontSizeScale=t/j,this.ctx.font=`${L} ${y} ${j}px ${U}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,o,b,d,y){this.current.textMatrix=[e,t,o,b,d,y],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,o,b){const d=this.ctx,y=this.current,L=y.font,U=y.textRenderingMode,j=y.fontSize/y.fontSizeScale,G=U&r.TextRenderingMode.FILL_STROKE_MASK,q=!!(U&r.TextRenderingMode.ADD_TO_PATH_FLAG),K=y.patternFill&&!L.missingFile;let ie;(L.disableFontFace||q||K)&&(ie=L.getPathGenerator(this.commonObjs,e)),L.disableFontFace||K?(d.save(),d.translate(t,o),d.beginPath(),ie(d,j),b&&d.setTransform.apply(d,b),(G===r.TextRenderingMode.FILL||G===r.TextRenderingMode.FILL_STROKE)&&d.fill(),(G===r.TextRenderingMode.STROKE||G===r.TextRenderingMode.FILL_STROKE)&&d.stroke(),d.restore()):((G===r.TextRenderingMode.FILL||G===r.TextRenderingMode.FILL_STROKE)&&d.fillText(e,t,o),(G===r.TextRenderingMode.STROKE||G===r.TextRenderingMode.FILL_STROKE)&&d.strokeText(e,t,o)),q&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:d.mozCurrentTransform,x:t,y:o,fontSize:j,addToPath:ie})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10,!1);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let o=!1;for(let b=3;b<t.length;b+=4)if(t[b]>0&&t[b]<255){o=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",o)}showText(e){const t=this.current,o=t.font;if(o.isType3Font)return this.showType3Text(e);const b=t.fontSize;if(0===b)return;const d=this.ctx,y=t.fontSizeScale,L=t.charSpacing,U=t.wordSpacing,j=t.fontDirection,G=t.textHScale*j,q=e.length,K=o.vertical,ie=K?1:-1,se=o.defaultVMetrics,Q=b*t.fontMatrix[0],Z=t.textRenderingMode===r.TextRenderingMode.FILL&&!o.disableFontFace&&!t.patternFill;let ae;if(d.save(),d.transform.apply(d,t.textMatrix),d.translate(t.x,t.y+t.textRise),d.scale(G,j>0?-1:1),t.patternFill){d.save();const oe=t.fillColor.getPattern(d,this,d.mozCurrentTransformInverse,H.PathType.FILL);ae=d.mozCurrentTransform,d.restore(),d.fillStyle=oe}let re=t.lineWidth;const ne=t.textMatrixScale;if(0===ne||0===re){const oe=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;(oe===r.TextRenderingMode.STROKE||oe===r.TextRenderingMode.FILL_STROKE)&&(re=this.getSinglePixelWidth())}else re/=ne;1!==y&&(d.scale(y,y),re/=y),d.lineWidth=re;let he,ce=0;for(he=0;he<q;++he){const oe=e[he];if("number"==typeof oe){ce+=ie*oe*b/1e3;continue}let pe=!1;const _e=(oe.isSpace?U:0)+L,de=oe.fontChar,me=oe.accent;let ve,Se,we,be=oe.width;if(K){const ee=oe.vmetric||se,$=-(oe.vmetric?ee[1]:.5*be)*Q;be=ee?-ee[0]:be,ve=$/y,Se=(ce+ee[2]*Q)/y}else ve=ce/y,Se=0;if(o.remeasure&&be>0){const ee=1e3*d.measureText(de).width/b*y;if(be<ee&&this.isFontSubpixelAAEnabled){const $=be/ee;pe=!0,d.save(),d.scale($,1),ve/=$}else be!==ee&&(ve+=(be-ee)/2e3*b/y)}this.contentVisible&&(oe.isInFont||o.missingFile)&&(Z&&!me?d.fillText(de,ve,Se):(this.paintChar(de,ve,Se,ae),me&&this.paintChar(me.fontChar,ve+b*me.offset.x/y,Se-b*me.offset.y/y,ae))),we=K?be*Q-_e*j:be*Q+_e*j,ce+=we,pe&&d.restore()}K?t.y-=ce:t.x+=ce*G,d.restore(),this.compose()}showType3Text(e){const t=this.ctx,o=this.current,b=o.font,d=o.fontSize,y=o.fontDirection,L=b.vertical?1:-1,U=o.charSpacing,j=o.wordSpacing,G=o.textHScale*y,q=o.fontMatrix||r.FONT_IDENTITY_MATRIX,K=e.length;let se,Q,Z,ae;if(o.textRenderingMode!==r.TextRenderingMode.INVISIBLE&&0!==d){for(this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,t.save(),t.transform.apply(t,o.textMatrix),t.translate(o.x,o.y),t.scale(G,y),se=0;se<K;++se){if(Q=e[se],"number"==typeof Q){ae=L*Q*d/1e3,this.ctx.translate(ae,0),o.x+=ae*G;continue}const re=(Q.isSpace?j:0)+U,ne=b.charProcOperatorList[Q.operatorListId];ne?(this.contentVisible&&(this.processingType3=Q,this.save(),t.scale(d,d),t.transform.apply(t,q),this.executeOperatorList(ne),this.restore()),Z=r.Util.applyTransform([Q.width,0],q)[0]*d+re,t.translate(Z,0),o.x+=Z*G):(0,r.warn)(`Type3 character "${Q.operatorListId}" is not available.`)}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,o,b,d,y){this.ctx.rect(o,b,d-o,y-b),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){const o=e[1],b=this.baseTransform||this.ctx.mozCurrentTransform.slice();t=new H.TilingPattern(e,o,this.ctx,{createCanvasGraphics:y=>new J(y,this.commonObjs,this.objs,this.canvasFactory)},b)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,o){const b=this.selectColor?.(e,t,o)||r.Util.makeHexColor(e,t,o);this.ctx.strokeStyle=b,this.current.strokeColor=b}setFillRGBColor(e,t,o){const b=this.selectColor?.(e,t,o)||r.Util.makeHexColor(e,t,o);this.ctx.fillStyle=b,this.current.fillColor=b,this.current.patternFill=!1}_getPattern(e,t=null){let o;return this.cachedPatterns.has(e)?o=this.cachedPatterns.get(e):(o=(0,H.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,o)),t&&(o.matrix=t),o}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const o=this._getPattern(e);t.fillStyle=o.getPattern(t,this,t.mozCurrentTransformInverse,H.PathType.SHADING);const b=t.mozCurrentTransformInverse;if(b){const d=t.canvas,y=d.width,L=d.height,U=r.Util.applyTransform([0,0],b),j=r.Util.applyTransform([0,L],b),G=r.Util.applyTransform([y,0],b),q=r.Util.applyTransform([y,L],b),K=Math.min(U[0],j[0],G[0],q[0]),ie=Math.min(U[1],j[1],G[1],q[1]),se=Math.max(U[0],j[0],G[0],q[0]),Q=Math.max(U[1],j[1],G[1],q[1]);this.ctx.fillRect(K,ie,se-K,Q-ie)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,r.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,r.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,t)&&(this.ctx.rect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.current.updateRectMinMax(this.ctx.mozCurrentTransform,t),this.clip(),this.endPath())}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||(0,r.info)("TODO: Support non-isolated groups."),e.knockout&&(0,r.warn)("Knockout groups not supported.");const o=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");let b=r.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform);b=r.Util.intersect(b,[0,0,t.canvas.width,t.canvas.height])||[0,0,0,0];const y=Math.floor(b[0]),L=Math.floor(b[1]);let U=Math.max(Math.ceil(b[2])-y,1),j=Math.max(Math.ceil(b[3])-L,1),G=1,q=1;U>P&&(G=U/P,U=P),j>P&&(q=j/P,j=P),this.current.startNewPathAndClipBox([0,0,U,j]);let K="groupAt"+this.groupLevel;e.smask&&(K+="_smask_"+this.smaskCounter++%2);const ie=this.cachedCanvases.getCanvas(K,U,j,!0),se=ie.context;se.scale(1/G,1/q),se.translate(-y,-L),se.transform.apply(se,o),e.smask?this.smaskStack.push({canvas:ie.canvas,context:se,offsetX:y,offsetY:L,scaleX:G,scaleY:q,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(y,L),t.scale(G,q),t.save()),S(t,se),this.ctx=se,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,o=this.groupStack.pop();if(this.ctx=o,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();
1else{this.ctx.restore();const b=this.ctx.mozCurrentTransform;this.restore(),this.ctx.save(),this.ctx.setTransform.apply(this.ctx,b);const d=r.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],b);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(d)}}beginAnnotations(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)}endAnnotations(){this.restore()}beginAnnotation(e,t,o,b,d){if(this.save(),Array.isArray(t)&&4===t.length){const y=t[2]-t[0],L=t[3]-t[1];if(d&&this.annotationCanvasMap){(o=o.slice())[4]-=t[0],o[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=y,t[3]=L;const[U,j]=r.Util.singularValueDecompose2dScale(this.ctx.mozCurrentTransform),{viewportScale:G}=this,q=Math.ceil(y*this.outputScaleX*G),K=Math.ceil(L*this.outputScaleY*G);this.annotationCanvas=this.canvasFactory.create(q,K);const{canvas:ie,context:se}=this.annotationCanvas,Q=`var(--zoom-factor) * ${z.PixelsPerInch.PDF_TO_CSS_UNITS}`;ie.style.width=`calc(${y}px * ${Q})`,ie.style.height=`calc(${L}px * ${Q})`,this.annotationCanvasMap.set(e,ie),this.annotationCanvas.savedCtx=this.ctx,this.ctx=se,this.ctx.setTransform(U,0,0,-j,0,L*j),h(this.ctx),x(this.ctx,this.foregroundColor)}else x(this.ctx,this.foregroundColor),this.ctx.rect(t[0],t[1],y,L),this.ctx.clip(),this.endPath()}this.current=new i(this.ctx.canvas.width,this.ctx.canvas.height),this.transform.apply(this,o),this.transform.apply(this,b)}endAnnotation(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas),this.restore()}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const o=this.ctx,b=this.processingType3;if(b&&(void 0===b.compiled&&(b.compiled=function n(w){const{width:e,height:t}=w;if(e>1e3||t>1e3)return null;const b=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),d=e+1;let L,U,j,y=new Uint8Array(d*(t+1));const G=e+7&-8;let q=new Uint8Array(G*t),K=0;for(const ne of w.data){let ce=128;for(;ce>0;)q[K++]=ne&ce?0:255,ce>>=1}let ie=0;for(K=0,0!==q[K]&&(y[0]=1,++ie),U=1;U<e;U++)q[K]!==q[K+1]&&(y[U]=q[K]?2:1,++ie),K++;for(0!==q[K]&&(y[U]=2,++ie),L=1;L<t;L++){K=L*G,j=L*d,q[K-G]!==q[K]&&(y[j]=q[K]?1:8,++ie);let ne=(q[K]?4:0)+(q[K-G]?8:0);for(U=1;U<e;U++)ne=(ne>>2)+(q[K+1]?4:0)+(q[K-G+1]?8:0),b[ne]&&(y[j+U]=b[ne],++ie),K++;if(q[K-G]!==q[K]&&(y[j+U]=q[K]?2:4,++ie),ie>1e3)return null}for(K=G*(t-1),j=L*d,0!==q[K]&&(y[j]=8,++ie),U=1;U<e;U++)q[K]!==q[K+1]&&(y[j+U]=q[K]?4:8,++ie),K++;if(0!==q[K]&&(y[j+U]=4,++ie),ie>1e3)return null;const se=new Int32Array([0,d,-1,0,-d,0,0,0,1]);let Q,Z,ae;for(W.isNodeJS?Z=[]:Q=new Path2D,L=0;ie&&L<=t;L++){let ne=L*d;const ce=ne+e;for(;ne<ce&&!y[ne];)ne++;if(ne===ce)continue;Q?Q.moveTo(ne%d,L):ae=[ne%d,L];const he=ne;let oe=y[ne];do{const pe=se[oe];do{ne+=pe}while(!y[ne]);const _e=y[ne];5!==_e&&10!==_e?(oe=_e,y[ne]=0):(oe=_e&51*oe>>4,y[ne]&=oe>>2|oe<<2),Q?Q.lineTo(ne%d,ne/d|0):ae.push(ne%d,ne/d|0),y[ne]||--ie}while(he!==ne);Q||Z.push(ae),--L}return q=null,y=null,function(ne){if(ne.save(),ne.scale(1/e,-1/t),ne.translate(0,-t),Q)ne.fill(Q);else{ne.beginPath();for(const ce of Z){ne.moveTo(ce[0],ce[1]);for(let he=2,oe=ce.length;he<oe;he+=2)ne.lineTo(ce[he],ce[he+1])}ne.fill()}ne.beginPath(),ne.restore()}}(e)),b.compiled))return void b.compiled(o);const d=this._createMaskCanvas(e),y=d.canvas;o.save(),o.setTransform(1,0,0,1,0,0),o.drawImage(y,d.offsetX,d.offsetY),o.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,o=0,b=0,d,y){if(!this.contentVisible)return;e=this.getObject(e.data,e);const L=this.ctx;L.save();const U=L.mozCurrentTransform;L.transform(t,o,b,d,0,0);const j=this._createMaskCanvas(e);L.setTransform(1,0,0,1,0,0);for(let G=0,q=y.length;G<q;G+=2){const K=r.Util.transform(U,[t,o,b,d,y[G],y[G+1]]),[ie,se]=r.Util.applyTransform([0,0],K);L.drawImage(j.canvas,ie,se)}L.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,o=this.current.fillColor,b=this.current.patternFill;for(let d=0,y=e.length;d<y;d++){const L=e[d],U=L.width,j=L.height,G=this.cachedCanvases.getCanvas("maskCanvas",U,j,!1),q=G.context;q.save(),u(q,L),q.globalCompositeOperation="source-in",q.fillStyle=b?o.getPattern(q,this,t.mozCurrentTransformInverse,H.PathType.FILL):o,q.fillRect(0,0,U,j),q.restore(
vendor: 30,428 bytes, line 1
1),t.save(),t.transform.apply(t,L.transform),t.scale(1,-1),g(t,G.canvas,0,0,U,j,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,r.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,o,b){if(!this.contentVisible)return;const d=this.getObject(e);if(!d)return void(0,r.warn)("Dependent image isn't ready yet");const y=d.width,L=d.height,U=[];for(let j=0,G=b.length;j<G;j+=2)U.push({transform:[t,0,0,o,b[j],b[j+1]],x:0,y:0,w:y,h:L});this.paintInlineImageXObjectGroup(d,U)}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,o=e.height,b=this.ctx;let d;if(this.save(),b.scale(1/t,-1/o),"function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)d=e;else{const j=this.cachedCanvases.getCanvas("inlineImage",t,o,!1);f(j.context,e,this.current.transferMaps),d=j.canvas}const y=this._scaleImage(d,b.mozCurrentTransformInverse);b.imageSmoothingEnabled=B(b.mozCurrentTransform,e.interpolate);const[L,U]=g(b,y.img,0,0,y.paintWidth,y.paintHeight,0,-o,t,o);if(this.imageLayer){const j=this.getCanvasPosition(0,-o);this.imageLayer.appendImage({imgData:e,left:j[0],top:j[1],width:L,height:U})}this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const o=this.ctx,b=e.width,d=e.height,y=this.cachedCanvases.getCanvas("inlineImage",b,d,!1);f(y.context,e,this.current.transferMaps);for(let U=0,j=t.length;U<j;U++){const G=t[U];if(o.save(),o.transform.apply(o,G.transform),o.scale(1,-1),g(o,y.canvas,G.x,G.y,G.w,G.h,0,-1,1,1),this.imageLayer){const q=this.getCanvasPosition(G.x,G.y);this.imageLayer.appendImage({imgData:e,left:q[0],top:q[1],width:b,height:d})}o.restore()}this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){this.markedContentStack.push("OC"===e?{visible:this.optionalContentConfig.isVisible(t)}:{visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const o=this.ctx;this.pendingClip&&(t||(this.pendingClip===X?o.clip("evenodd"):o.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),o.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=this.ctx.mozCurrentTransform;if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),o=Math.hypot(e[0],e[2]),b=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(o,b)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(!this._cachedScaleForStroking){const{lineWidth:e}=this.current,t=this.ctx.mozCurrentTransform;let o,b;if(0===t[1]&&0===t[2]){const d=Math.abs(t[0]),y=Math.abs(t[3]);if(0===e)o=1/d,b=1/y;else{const L=d*e,U=y*e;o=L<1?1/L:1,b=U<1?1/U:1}}else{const d=Math.abs(t[0]*t[3]-t[2]*t[1]),y=Math.hypot(t[0],t[1]),L=Math.hypot(t[2],t[3]);if(0===e)o=L/d,b=y/d;else{const U=e*d;o=L>U?L/U:1,b=y>U?y/U:1}}this._cachedScaleForStroking=[o,b]}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:o}=this.current,[b,d]=this.getScaleForStroking();if(t.lineWidth=o||1,1===b&&1===d)return void t.stroke();let y,L,U;e&&(y=t.mozCurrentTransform.slice(),L=t.getLineDash().slice(),U=t.lineDashOffset),t.scale(b,d);const j=Math.max(b,d);t.setLineDash(t.getLineDash().map(G=>G/j)),t.lineDashOffset/=j,t.stroke(),e&&(t.setTransform(...y),t.setLineDash(L),t.lineDashOffset=U)}getCanvasPosition(e,t){const o=this.ctx.mozCurrentTransform;return[o[0]*e+o[2]*t+o[4],o[1]*e+o[3]*t+o[5]]}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}a.CanvasGraphics=J;for(const w in r.OPS)void 0!==J.prototype[w]&&(J.prototype[r.OPS[w]]=J.prototype[w])},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TilingPattern=a.PathType=void 0,a.getShadingPattern=function C(c){switch(c[0]){case"RadialAxial":return new R(c);case"Mesh":return new p(c);case"Dummy":return new A}throw new Error(`Unknown IR type: ${c[0]}`)};var r=D(1),H=D(3);const N={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function W(c,v){if(!v||H.isNodeJS)return;const h=v[2]-v[0],m=v[3]-v[1],g=new Path2D;g.rect(v[0],v[1],h,m),c.clip(g)}a.PathType=N;class z{constructor(){this.constructor===z&&(0,r.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,r.unreachable)("Abstract method `getPattern` called.")}}class R extends z{constructor(v){super(),this._type=v[1],this._bbox=v[2],this._colorStops=v[3],this._p0=v[4],this._p1=v[5],this._r0=v[6],this._r1=v[7],this.matrix=null}_createGradient(v){let h;"axial"===this._type?h=v.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(h=v.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const m of this._colorStops)h.addColorStop(m[0],m[1]);return h}getPattern(v,h,m,g){let n;if(g===N.STROKE||g===N.FILL){const i=h.current.getClippedPathBoundingBox(g,v.mozCurrentTransform)||[0,0,0,0],f=Math.ceil(i[2]-i[0])||1,u=Math.ceil(i[3]-i[1])||1,S=h.cachedCanvases.getCanvas("pattern",f,u,!0),x=S.context;x.clearRect(0,0,x.canvas.width,x.canvas.height),x.beginPath(),x.rect(0,0,x.canvas.width,x.canvas.height),x.translate(-i[0],-i[1]),m=r.Util.transform(m,[1,0,0,1,i[0],i[1]]),x.transform.apply(x,h.baseTransform),this.matrix&&x.transform.apply(x,this.matrix),W(x,this._bbox),x.fillStyle=this._createGradient(x),x.fill(),n=v.createPattern(S.canvas,"no-repeat");const k=new DOMMatrix(m);try{n.setTransform(k)}catch(l){(0,r.warn)(`RadialAxialShadingPattern.getPattern: "${l?.message}".`)}}else W(v,this._bbox),n=this._createGradient(v);return n}}function s(c,v,h,m,g,n,i,f){const u=v.coords,S=v.colors,x=c.data,k=4*c.width;let l;u[h+1]>u[m+1]&&(l=h,h=m,m=l,l=n,n=i,i=l),u[m+1]>u[g+1]&&(l=m,m=g,g=l,l=i,i=f,f=l),u[h+1]>u[m+1]&&(l=h,h=m,m=l,l=n,n=i,i=l);const T=(u[h]+v.offsetX)*v.scaleX,E=(u[h+1]+v.offsetY)*v.scaleY,O=(u[m]+v.offsetX)*v.scaleX,B=(u[m+1]+v.offsetY)*v.scaleY,M=(u[g]+v.offsetX)*v.scaleX,I=(u[g+1]+v.offsetY)*v.scaleY;if(E>=I)return;const V=S[n],X=S[n+1],J=S[n+2],w=S[i],e=S[i+1],t=S[i+2],o=S[f],b=S[f+1],d=S[f+2],y=Math.round(E),L=Math.round(I);let U,j,G,q,K,ie,se,Q;for(let Z=y;Z<=L;Z++){if(Z<B){let he;he=Z<E?0:(E-Z)/(E-B),U=T-(T-O)*he,j=V-(V-w)*he,G=X-(X-e)*he,q=J-(J-t)*he}else{let he;he=Z>I?1:B===I?0:(B-Z)/(B-I),U=O-(O-M)*he,j=w-(w-o)*he,G=e-(e-b)*he,q=t-(t-d)*he}let ae;ae=Z<E?0:Z>I?1:(E-Z)/(E-I),K=T-(T-M)*ae,ie=V-(V-o)*ae,se=X-(X-b)*ae,Q=J-(J-d)*ae;const re=Math.round(Math.min(U,K)),ne=Math.round(Math.max(U,K));let ce=k*Z+4*re;for(let he=re;he<=ne;he++)ae=(U-he)/(U-K),ae<0?ae=0:ae>1&&(ae=1),x[ce++]=j-(j-ie)*ae|0,x[ce++]=G-(G-se)*ae|0,x[ce++]=q-(q-Q)*ae|0,x[ce++]=255}}function P(c,v,h){const m=v.coords,g=v.colors;let n,i;switch(v.type){case"lattice":const f=v.verticesPerRow,u=Math.floor(m.length/f)-1,S=f-1;for(n=0;n<u;n++){let x=n*f;for(let k=0;k<S;k++,x++)s(c,h,m[x],m[x+1],m[x+f],g[x],g[x+1],g[x+f]),s(c,h,m[x+f+1],m[x+1],m[x+f],g[x+f+1],g[x+1],g[x+f])}break;case"triangles":for(n=0,i=m.length;n<i;n+=3)s(c,h,m[n],m[n+1],m[n+2],g[n],g[n+1],g[n+2]);break;default:throw new Error("illegal figure")}}class p extends z{constructor(v){super(),this._coords=v[2],this._colors=v[3],this._figures=v[4],this._bounds=v[5],this._bbox=v[7],this._background=v[8],this.matrix=null}_createMeshCanvas(v,h,m){const f=Math.floor(this._bounds[0]),u=Math.floor(this._bounds[1]),S=Math.ceil(this._bounds[2])-f,x=Math.ceil(this._bounds[3])-u,k=Math.min(Math.ceil(Math.abs(S*v[0]*1.1)),3e3),l=Math.min(Math.ceil(Math.abs(x*v[1]*1.1)),3e3),T=S/k,E=x/l,O={coords:this._coords,colors:this._colors,offsetX:-f,offsetY:-u,scaleX:1/T,scaleY:1/E},I=m.getCanvas("mesh",k+4,l+4,!1),V=I.context,X=V.createImageData(k,l);if(h){const w=X.data;for(let e=0,t=w.length;e<t;e+=4)w[e]=h[0],w[e+1]=h[1],w[e+2]=h[2],w[e+3]=255}for(const w of this._figures)P(X,w,O);return V.putImageData(X,2,2),{canvas:I.canvas,offsetX:f-2*T,offsetY:u-2*E,scaleX:T,scaleY:E}}getPattern(v,h,m,g){let n;if(W(v,this._bbox),g===N.SHADING)n=r.Util.singularValueDecompose2dScale(v.mozCurrentTransform);else if(n=r.Util.singularValueDecompose2dScale(h.baseTransform),this.matrix){const f=r.Util.singularValueDecompose2dScale(this.matrix);n=[n[0]*f[0],n[1]*f[1]]}const i=this._createMeshCanvas(n,g===N.SHADING?null:this._background,h.cachedCanvases);return g!==N.SHADING&&(v.setTransform.apply(v,h.baseTransform),this.matrix&&v.transform.apply(v,this.matrix)),v.translate(i.offsetX,i.offsetY),v.scale(i.scaleX,i.scaleY),v.createPattern(i.canvas,"no-repeat")}}class A extends z{getPattern(){return"hotpink"}}class _{static get MAX_PATTERN_SIZE(){return(0,r.shadow)(this,"MAX_PATTERN_SIZE",3e3)}constructor(v,h,m,g,n){this.operatorList=v[2],this.matrix=v[3]||[1,0,0,1,0,0],this.bbox=v[4],this.xstep=v[5],this.ystep=v[6],this.paintType=v[7],this.tilingType=v[8],this.color=h,this.ctx=m,this.canvasGraphicsFactory=g,this.baseTransform=n}createPatternCanvas(v){const h=this.operatorList,m=this.bbox,g=this.xstep,n=this.ystep,i=this.paintType,u=this.color,S=this.canvasGraphicsFactory;(0,r.info)("TilingType: "+this.tilingType);const x=m[0],k=m[1],l=m[2],T=m[3],E=r.Util.singularValueDecompose2dScale(this.matrix),O=r.Util.singularValueDecompose2dScale(this.baseTransform),B=[E[0]*O[0],E[1]*O[1]],M=this.getSizeAndScale(g,this.ctx.canvas.width,B[0]),I=this.getSizeAndScale(n,this.ctx.canvas.height,B[1]),V=v.cachedCanvases.getCanvas("pattern",M.size,I.size,!0),X=V.context,J=S.createCanvasGraphics(X);J.groupLevel=v.groupLevel,this.setFillAndStrokeStyleToContext(J,i,u);let w=x,e=k,t=l,o=T;return x<0&&(w=0,t+=Math.abs(x)),k<0&&(e=0,o+=Math.abs(k)),X.translate(-M.scale*w,-I.scale*e),J.transform(M.scale,0,0,I.scale,0,0),X.save(),this.clipBbox(J,w,e,t,o),J.baseTransform=J.ctx.mozCurrentTransform.slice(),J.executeOperatorList(h),J.endDrawing(),{canvas:V.canvas,scaleX:M.scale,scaleY:I.scale,offsetX:w,offsetY:e}}getSizeAndScale(v,h,m){v=Math.abs(v);const g=Math.max(_.MAX_PATTERN_SIZE,h);let n=Math.ceil(v*m);return n>=g?n=g:m=n/v,{scale:m,size:n}}clipBbox(v,h,m,g,n){v.ctx.rect(h,m,g-h,n-m),v.current.updateRectMinMax(v.ctx.mozCurrentTransform,[h,m,g,n]),v.clip(),v.endPath()}setFillAndStrokeStyleToContext(v,h,m){const g=v.ctx,n=v.current;switch(h){case 1:const i=this.ctx;g.fillStyle=i.fillStyle,g.strokeStyle=i.strokeStyle,n.fillColor=i.fillStyle,n.strokeColor=i.strokeStyle;break;case 2:const f=r.Util.makeHexColor(m[0],m[1],m[2]);g.fillStyle=f,g.strokeStyle=f,n.fillColor=f,n.strokeColor=f;break;default:throw new r.FormatError(`Unsupported paint type: ${h}`)}}getPattern(v,h,m,g){let n=m;g!==N.SHADING&&(n=r.Util.transform(n,h.baseTransform),this.matrix&&(n=r.Util.transform(n,this.matrix)));const i=this.createPatternCanvas(h);let f=new DOMMatrix(n);f=f.translate(i.offsetX,i.offsetY),f=f.scale(1/i.scaleX,1/i.scaleY);const u=v.createPattern(i.canvas,"repeat");try{u.setTransform(f)}catch(S){(0,r.warn)(`TilingPattern.getPattern: "${S?.message}".`)}return u}}a.TilingPattern=_},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.applyMaskImageData=function H({src:N,srcPos:W=0,dest:z,destPos:R=0,width:s,height:P,inverseDecode:p=!1}){const A=r.FeatureTest.isLittleEndian?4278190080:255,[C,F]=p?[0,A]:[A,0],_=s>>3,c=7&s,v=N.length;z=new Uint32Array(z.buffer);for(let h=0;h<P;h++){for(const g=W+_;W<g;W++){const n=W<v?N[W]:255;z[R++]=128&n?F:C,z[R++]=64&n?F:C,z[R++]=32&n?F:C,z[R++]=16&n?F:C,z[R++]=8&n?F:C,z[R++]=4&n?F:C,z[R++]=2&n?F:C,z[R++]=1&n?F:C}if(0===c)continue;const m=W<v?N[W++]:255;for(let g=0;g<c;g++)z[R++]=m&1<<7-g?F:C}return{srcPos:W,destPos:R}};var r=D(1)},(te,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GlobalWorkerOptions=void 0;const D=Object.create(null);a.GlobalWorkerOptions=D,D.workerPort=void 0===D.workerPort?null:D.workerPort,D.workerSrc=void 0===D.workerSrc?"":D.workerSrc},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.MessageHandler=void 0;var r=D(1);function W(R){switch(R instanceof Error||"object"==typeof R&&null!==R||(0,r.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),R.name){case"AbortException":return new r.AbortException(R.message);case"MissingPDFException":return new r.MissingPDFException(R.message);case"PasswordException":return new r.PasswordException(R.message,R.code);case"UnexpectedResponseException":return new r.UnexpectedResponseException(R.message,R.status);case"UnknownErrorException":return new r.UnknownErrorException(R.message,R.details);default:return new r.UnknownErrorException(R.message,R.toString())}}a.MessageHandler=class z{constructor(s,P,p){this.sourceName=s,this.targetName=P,this.comObj=p,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=A=>{const C=A.data;if(C.targetName!==this.sourceName)return;if(C.stream)return void this._processStreamMessage(C);if(C.callback){const _=C.callbackId,c=this.callbackCapabilities[_];if(!c)throw new Error(`Cannot resolve callback ${_}`);if(delete this.callbackCapabilities[_],1===C.callback)c.resolve(C.data);else{if(2!==C.callback)throw new Error("Unexpected callback case");c.reject(W(C.reason))}return}const F=this.actionHandler[C.action];if(!F)throw new Error(`Unknown action from worker: ${C.action}`);if(C.callbackId){const _=this.sourceName,c=C.sourceName;new Promise(function(v){v(F(C.data))}).then(function(v){p.postMessage({sourceName:_,targetName:c,callback:1,callbackId:C.callbackId,data:v})},function(v){p.postMessage({sourceName:_,targetName:c,callback:2,callbackId:C.callbackId,reason:W(v)})})}else C.streamId?this._createStreamSink(C):F(C.data)},p.addEventListener("message",this._onComObjOnMessage)}on(s,P){const p=this.actionHandler;if(p[s])throw new Error(`There is already an actionName called "${s}"`);p[s]=P}send(s,P,p){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:s,data:P},p)}sendWithPromise(s,P,p){const A=this.callbackId++,C=(0,r.createPromiseCapability)();this.callbackCapabilities[A]=C;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:s,callbackId:A,data:P},p)}catch(F){C.reject(F)}return C.promise}sendWithStream(s,P,p,A){const C=this.streamId++,F=this.sourceName,_=this.targetName,c=this.comObj;return new ReadableStream({start:v=>{const h=(0,r.createPromiseCapability)();return this.streamControllers[C]={controller:v,startCall:h,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:F,targetName:_,action:s,streamId:C,data:P,desiredSize:v.desiredSize},A),h.promise},pull:v=>{const h=(0,r.createPromiseCapability)();return this.streamControllers[C].pullCall=h,c.postMessage({sourceName:F,targetName:_,stream:6,streamId:C,desiredSize:v.desiredSize}),h.promise},cancel:v=>{(0,r.assert)(v instanceof Error,"cancel must have a valid reason");const h=(0,r.createPromiseCapability)();return this.streamControllers[C].cancelCall=h,this.streamControllers[C].isClosed=!0,c.postMessage({sourceName:F,targetName:_,stream:1,streamId:C,reason:W(v)}),h.promise}},p)}_createStreamSink(s){const P=s.streamId,p=this.sourceName,A=s.sourceName,C=this.comObj,F=this,_=this.actionHandler[s.action],c={enqueue(v,h=1,m){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=h,g>0&&this.desiredSize<=0&&(this.sinkCapability=(0,r.createPromiseCapability)(),this.ready=this.sinkCapability.promise),C.postMessage({sourceName:p,targetName:A,stream:4,streamId:P,chunk:v},m)},close(){this.isCancelled||(this.isCancelled=!0,C.postMessage({sourceName:p,targetName:A,stream:3,streamId:P}),delete F.streamSinks[P])},error(v){(0,r.assert)(v instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,C.postMessage({sourceName:p,targetName:A,stream:5,streamId:P,reason:W(v)}))},sinkCapability:(0,r.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:s.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[P]=c,new Promise(function(v){v(_(s.data,c))}).then(function(){C.postMessage({sourceName:p,targetName:A,stream:8,streamId:P,success:!0})},function(v){C.postMessage({sourceName:p,targetName:A,stream:8,streamId:P,reason:W(v)})})}_processStreamMessage(s){const P=s.streamId,p=this.sourceName,A=s.sourceName,C=this.comObj,F=this.streamControllers[P],_=this.streamSinks[P];switch(s.stream){case 8:s.success?F.startCall.resolve():F.startCall.reject(W(s.reason));break;case 7:s.success?F.pullCall.resolve():F.pullCall.reject(W(s.reason));break;case 6:if(!_){C.postMessage({sourceName:p,targetName:A,stream:7,streamId:P,success:!0});break}_.desiredSize<=0&&s.desiredSize>0&&_.sinkCapability.resolve(),_.desiredSize=s.desiredSize,new Promise(function(c){c(_.onPull&&_.onPull())}).then(function(){C.postMessage({sourceName:p,targetName:A,stream:7,streamId:P,success:!0})},function(c){C.postMessage({sourceName:p,targetName:A,stream:7,streamId:P,reason:W(c)})});break;case 4:if((0,r.assert)(F,"enqueue should have stream controller"),F.isClosed)break;F.controller.enqueue(s.chunk);break;case 3:if((0,r.assert)(F,"close should have stream controller"),F.isClosed)break;F.isClosed=!0,F.controller.close(),this._deleteStreamController(F,P);break;case 5:(0,r.assert)(F,"error should have stream controller"),F.controller.error(W(s.reason)),this._deleteStreamController(F,P);break;case 2:s.success?F.cancelCall.resolve():F.cancelCall.reject(W(s.reason)),this._deleteStreamController(F,P);break;case 1:if(!_)break;new Promise(function(c){c(_.onCancel&&_.onCancel(W(s.reason)))}).then(function(){C.postMessage({sourceName:p,targetName:A,stream:2,streamId:P,success:!0})},function(c){C.postMessage({sourceName:p,targetName:A,stream:2,streamId:P,reason:W(c)})}),_.sinkCapability.reject(W(s.reason)),_.isCancelled=!0,delete this.streamSinks[P];break;default:throw new Error("Unexpected stream case")}}_deleteStreamController(s,P){var p=this;return _asyncToGenerator(function*(){yield Promise.allSettled([s.startCall&&s.startCall.promise,s.pullCall&&s.pullCall.promise,s.cancelCall&&s.cancelCall.promise]),delete p.streamControllers[P]})()}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Metadata=void 0;var r=D(1);a.Metadata=class H{#e;#t;constructor({parsedData:W,rawData:z}){this.#e=W,this.#t=z}getRaw(){return this.#t}get(W){return this.#e.get(W)??null}getAll(){return(0,r.objectFromMap)(this.#e)}has(W){return this.#e.has(W)}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionalContentConfig=void 0;var r=D(1);class H{constructor(z,R){this.visible=!0,this.name=z,this.intent=R}}a.OptionalContentConfig=class N{constructor(z){if(this.name=null,this.creator=null,this._order=null,this._groups=new Map,null!==z){this.name=z.name,this.creator=z.creator,this._order=z.order;for(const R of z.groups)this._groups.set(R.id,new H(R.name,R.intent));if("OFF"===z.baseState)for(const R of this._groups)R.visible=!1;for(const R of z.on)this._groups.get(R).visible=!0;for(const R of z.off)this._groups.get(R).visible=!1}}_evaluateVisibilityExpression(z){const R=z.length;if(R<2)return!0;const s=z[0];for(let P=1;P<R;P++){const p=z[P];let A;if(Array.isArray(p))A=this._evaluateVisibilityExpression(p);else{if(!this._groups.has(p))return(0,r.warn)(`Optional content group not found: ${p}`),!0;A=this._groups.get(p).visible}switch(s){case"And":if(!A)return!1;break;case"Or":if(A)return!0;break;case"Not":return!A;default:return!0}}return"And"===s}isVisible(z){if(0===this._groups.size)return!0;if(!z)return(0,r.warn)("Optional content group not defined."),!0;if("OCG"===z.type)return this._groups.has(z.id)?this._groups.get(z.id).visible:((0,r.warn)(`Optional content group not found: ${z.id}`),!0);if("OCMD"===z.type){if(z.expression)return this._evaluateVisibilityExpression(z.expression);if(!z.policy||"AnyOn"===z.policy){for(const R of z.ids){if(!this._groups.has(R))return(0,r.warn)(`Optional content group not found: ${R}`),!0;if(this._groups.get(R).visible)return!0}return!1}if("AllOn"===z.policy){for(const R of z.ids){if(!this._groups.has(R))return(0,r.warn)(`Optional content group not found: ${R}`),!0;if(!this._groups.get(R).visible)return!1}return!0}if("AnyOff"===z.policy){for(const R of z.ids){if(!this._groups.has(R))return(0,r.warn)(`Optional content group not found: ${R}`),!0;if(!this._groups.get(R).visible)return!0}return!1}if("AllOff"===z.policy){for(const R of z.ids){if(!this._groups.has(R))return(0,r.warn)(`Optional content group not found: ${R}`),!0;if(this._groups.get(R).visible)return!1}return!0}return(0,r.warn)(`Unknown optional content policy ${z.policy}.`),!0}return(0,r.warn)(`Unknown group type ${z.type}.`),!0}setVisibility(z,R=!0){this._groups.has(z)?this._groups.get(z).visible=!!R:(0,r.warn)(`Optional content group not found: ${z}`)}getOrder(){return this._groups.size?this._order?this._order.slice():Array.from(this._groups.keys()):null}getGroups(){return this._groups.size>0?(0,r.objectFromMap)(this._groups):null}getGroup(z){return this._groups.get(z)||null}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PDFDataTransportStream=void 0;var r=D(1),H=D(5);a.PDFDataTransportStream=class N{constructor(s,P){(0,r.assert)(P,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=s.progressiveDone||!1,this._contentDispositionFilename=s.contentDispositionFilename||null;const p=s.initialData;if(p?.length>0){const A=new Uint8Array(p).buffer;this._queuedChunks.push(A)}this._pdfDataRangeTransport=P,this._isStreamingSupported=!s.disableStream,this._isRangeSupported=!s.disableRange,this._contentLength=s.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((A,C)=>{this._onReceiveData({begin:A,chunk:C})}),this._pdfDataRangeTransport.addProgressListener((A,C)=>{this._onProgress({loaded:A,total:C})}),this._pdfDataRangeTransport.addProgressiveReadListener(A=>{this._onReceiveData({chunk:A})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(s){const P=new Uint8Array(s.chunk).buffer;if(void 0===s.begin)this._fullRequestReader?this._fullRequestReader._enqueue(P):this._queuedChunks.push(P);else{const p=this._rangeReaders.some(function(A){return A._begin===s.begin&&(A._enqueue(P),!0)});(0,r.assert)(p,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(s){if(void 0===s.total){const P=this._rangeReaders[0];P?.onProgress&&P.onProgress({loaded:s.loaded})}else{const P=this._fullRequestReader;P?.onProgress&&P.onProgress({loaded:s.loaded,total:s.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(s){const P=this._rangeReaders.indexOf(s);P>=0&&this._rangeReaders.splice(P,1)}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const s=this._queuedChunks;return this._queuedChunks=null,new W(this,s,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(s,P){if(P<=this._progressiveDataLength)return null;const p=new z(this,s,P);return this._pdfDataRangeTransport.requestDataRange(s,P),this._rangeReaders.push(p),p}cancelAllRequests(s){this._fullRequestReader&&this._fullRequestReader.cancel(s);for(const P of this._rangeReaders.slice(0))P.cancel(s);this._pdfDataRangeTransport.abort()}};class W{constructor(s,P,p=!1,A=null){this._stream=s,this._done=p||!1,this._filename=(0,H.isPdfFile)(A)?A:null,this._queuedChunks=P||[],this._loaded=0;for(const C of this._queuedChunks)this._loaded+=C.byteLength;this._requests=[],this._headersReady=Promise.resolve(),s._fullRequestReader=this,this.onProgress=null}_enqueue(s){this._done||(this._requests.length>0?this._requests.shift().resolve({value:s,done:!1}):this._queuedChunks.push(s),this._loaded+=s.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}read(){var s=this;return _asyncToGenerator(function*(){if(s._queuedChunks.length>0)return{value:s._queuedChunks.shift(),done:!1};if(s._done)return{value:void 0,done:!0};const P=(0,r.createPromiseCapability)();return s._requests.push(P),P.promise})()}cancel(s){this._done=!0;for(const P of this._requests)P.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class z{constructor(s,P,p){this._stream=s,this._begin=P,this._end=p,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(s){if(!this._done){if(0===this._requests.length)this._queuedChunk=s;else{this._requests.shift().resolve({value:s,done:!1});for(const p of this._requests)p.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}read(){var s=this;return _asyncToGenerator(function*(){if(s._queuedChunk){const p=s._queuedChunk;return s._queuedChunk=null,{value:p,done:!1}}if(s._done)return{value:void 0,done:!0};const P=(0,r.createPromiseCapability)();return s._requests.push(P),P.promise})()}cancel(s){this._done=!0;for(const P of this._requests)P.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(te,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.XfaText=void 0;class D{static textContent(H){const N=[],W={items:N,styles:Object.create(null)};return function z(R){if(!R)return;let s=null;const P=R.name;if("#text"===P)s=R.value;else{if(!D.shouldBuildText(P))return;R?.attributes?.textContent?s=R.attributes.textContent:R.value&&(s=R.value)}if(null!==s&&N.push({str:s}),R.children)for(const p of R.children)z(p)}(H),W}static shouldBuildText(H){return!("textarea"===H||"input"===H||"option"===H||"select"===H)}}a.XfaText=D},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.NodeStandardFontDataFactory=a.NodeCanvasFactory=a.NodeCMapReaderFactory=void 0;var r=D(6);const H=function(R){return new Promise((s,P)=>{__webpack_require__(22339).readFile(R,(A,C)=>{!A&&C?s(new Uint8Array(C)):P(new Error(A))})})};a.NodeCanvasFactory=class N extends r.BaseCanvasFactory{_createCanvas(s,P){return __webpack_require__(84069).createCanvas(s,P)}},a.NodeCMapReaderFactory=class W extends r.BaseCMapReaderFactory{_fetchData(s,P){return H(s).then(p=>({cMapData:p,compressionType:P}))}},a.NodeStandardFontDataFactory=class z extends r.BaseStandardFontDataFactory{_fetchData(s){return H(s)}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AnnotationLayer=void 0;var r=D(1),H=D(5),N=D(8),W=D(21),z=D(22);const R=1e3,s=new WeakSet;function P(w){return{width:w[2]-w[0],height:w[3]-w[1]}}class p{static create(e){switch(e.data.annotationType){case r.AnnotationType.LINK:return new C(e);case r.AnnotationType.TEXT:return new F(e);case r.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new c(e);case"Btn":return e.data.radioButton?new h(e):e.data.checkBox?new v(e):new m(e);case"Ch":return new g(e)}return new _(e);case r.AnnotationType.POPUP:return new n(e);case r.AnnotationType.FREETEXT:return new f(e);case r.AnnotationType.LINE:return new u(e);case r.AnnotationType.SQUARE:return new S(e);case r.AnnotationType.CIRCLE:return new x(e);case r.AnnotationType.POLYLINE:return new k(e);case r.AnnotationType.CARET:return new T(e);case r.AnnotationType.INK:return new E(e);case r.AnnotationType.POLYGON:return new l(e);case r.AnnotationType.HIGHLIGHT:return new O(e);case r.AnnotationType.UNDERLINE:return new B(e);case r.AnnotationType.SQUIGGLY:return new M(e);case r.AnnotationType.STRIKEOUT:return new I(e);case r.AnnotationType.STAMP:return new V(e);case r.AnnotationType.FILEATTACHMENT:return new X(e);default:return new A(e)}}}class A{constructor(e,{isRenderable:t=!1,ignoreBorder:o=!1,createQuadrilaterals:b=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this._mouseState=e.mouseState,t&&(this.container=this._createContainer(o)),b&&(this.quadrilaterals=this._createQuadrilaterals(o))}_createContainer(e=!1){const t=this.data,o=this.page,b=this.viewport,d=document.createElement("section");let{width:y,height:L}=P(t.rect);d.setAttribute("data-annotation-id",t.id);const U=r.Util.normalizeRect([t.rect[0],o.view[3]-t.rect[1]+o.view[1],t.rect[2],o.view[3]-t.rect[3]+o.view[1]]);if(t.hasOwnCanvas){const j=b.transform.slice(),[G,q]=r.Util.singularValueDecompose2dScale(j);y=Math.ceil(y*G),L=Math.ceil(L*q),U[0]*=G,U[1]*=q;for(let K=0;K<4;K++)j[K]=Math.sign(j[K]);d.style.transform=`matrix(${j.join(",")})`}else d.style.transform=`matrix(${b.transform.join(",")})`;if(d.style.transformOrigin=`${-U[0]}px ${-U[1]}px`,!e&&t.borderStyle.width>0){d.style.borderWidth=`${t.borderStyle.width}px`,t.borderStyle.style!==r.AnnotationBorderStyleType.UNDERLINE&&(y-=2*t.borderStyle.width,L-=2*t.borderStyle.width);const j=t.borderStyle.horizontalCornerRadius,G=t.borderStyle.verticalCornerRadius;switch((j>0||G>0)&&(d.style.borderRadius=`${j}px / ${G}px`),t.borderStyle.style){case r.AnnotationBorderStyleType.SOLID:d.style.borderStyle="solid";break;case r.AnnotationBorderStyleType.DASHED:d.style.borderStyle="dashed";break;case r.AnnotationBorderStyleType.BEVELED:(0,r.warn)("Unimplemented border style: beveled");break;
1case r.AnnotationBorderStyleType.INSET:(0,r.warn)("Unimplemented border style: inset");break;case r.AnnotationBorderStyleType.UNDERLINE:d.style.borderBottomStyle="solid"}t.borderColor||t.color?d.style.borderColor=r.Util.makeHexColor(0|t.color[0],0|t.color[1],0|t.color[2]):d.style.borderWidth=0}return d.style.left=`${U[0]}px`,d.style.top=`${U[1]}px`,t.hasOwnCanvas?d.style.width=d.style.height="auto":(d.style.width=`${y}px`,d.style.height=`${L}px`),d}get _commonActions(){const e=(t,o,b)=>{const d=b.detail[t];b.target.style[o]=W.ColorConverters[`${d[0]}_HTML`](d.slice(1))};return(0,r.shadow)(this,"_commonActions",{display:t=>{const o=t.detail.display%2==1;t.target.style.visibility=o?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:o,print:0===t.detail.display||3===t.detail.display})},print:t=>{this.annotationStorage.setValue(this.data.id,{print:t.detail.print})},hidden:t=>{t.target.style.visibility=t.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:t.detail.hidden})},focus:t=>{setTimeout(()=>t.target.focus({preventScroll:!1}),0)},userName:t=>{t.target.title=t.detail.userName},readonly:t=>{t.detail.readonly?t.target.setAttribute("readonly",""):t.target.removeAttribute("readonly")},required:t=>{t.detail.required?t.target.setAttribute("required",""):t.target.removeAttribute("required")},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)}})}_dispatchEventFromSandbox(e,t){const o=this._commonActions;for(const b of Object.keys(t.detail)){const d=e[b]||o[b];d&&d(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const o=this._commonActions;for(const[b,d]of Object.entries(t)){const y=o[b];y&&(y({detail:d,target:e}),delete t[b])}}_createQuadrilaterals(e=!1){if(!this.data.quadPoints)return null;const t=[],o=this.data.rect;for(const b of this.data.quadPoints)this.data.rect=[b[2].x,b[2].y,b[1].x,b[1].y],t.push(this._createContainer(e));return this.data.rect=o,t}_createPopup(e,t){let o=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,o=this.quadrilaterals[0]),e||((e=document.createElement("div")).style.height=o.style.height,e.style.width=o.style.width,o.appendChild(e));const d=new i({container:o,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();d.style.left=o.style.width,o.appendChild(d)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.className=e;return this.quadrilaterals}render(){(0,r.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const o=[];if(this._fieldObjects){const b=this._fieldObjects[e];if(b)for(const{page:d,id:y,exportValues:L}of b){if(-1===d||y===t)continue;const U="string"==typeof L?L:null,j=document.getElementById(y);!j||s.has(j)?o.push({id:y,exportValue:U,domElement:j}):(0,r.warn)(`_getElementsByName - element not allowed: ${y}`)}return o}for(const b of document.getElementsByName(e)){const{id:d,exportValue:y}=b;d!==t&&s.has(b)&&o.push({id:d,exportValue:y,domElement:b})}return o}static get platform(){const e=typeof navigator<"u"?navigator.platform:"";return(0,r.shadow)(this,"platform",{isWin:e.includes("Win"),isMac:e.includes("Mac")})}}class C extends A{constructor(e,t=null){super(e,{isRenderable:!!(e.data.url||e.data.dest||e.data.action||e.data.isTooltipOnly||e.data.resetForm||e.data.actions&&(e.data.actions.Action||e.data.actions["Mouse Up"]||e.data.actions["Mouse Down"])),ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0})}render(){const{data:e,linkService:t}=this,o=document.createElement("a");if(e.url)t.addLinkAttributes(o,e.url,e.newWindow);else if(e.action)this._bindNamedAction(o,e.action);else if(e.dest)this._bindLink(o,e.dest);else{let b=!1;e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(b=!0,this._bindJSAction(o,e)),e.resetForm?this._bindResetFormAction(o,e.resetForm):b||this._bindLink(o,"")}
vendor: 23,287 bytes, line 1
1return this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map((b,d)=>{const y=0===d?o:o.cloneNode();return b.appendChild(y),b}):(this.container.className="linkAnnotation",this.container.appendChild(o),this.container)}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&(e.className="internalLink")}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),e.className="internalLink"}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const o=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const b of Object.keys(t.actions)){const d=o.get(b);d&&(e[d]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:b}}),!1))}e.onclick||(e.onclick=()=>!1),e.className="internalLink"}_bindResetFormAction(e,t){const o=e.onclick;if(o||(e.href=this.linkService.getAnchorUrl("")),e.className="internalLink",!this._fieldObjects)return(0,r.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(o||(e.onclick=()=>!1));e.onclick=()=>{o&&o();const{fields:b,refs:d,include:y}=t,L=[];if(0!==b.length||0!==d.length){const G=new Set(d);for(const q of b){const K=this._fieldObjects[q]||[];for(const{id:ie}of K)G.add(ie)}for(const q of Object.values(this._fieldObjects))for(const K of q)G.has(K.id)===y&&L.push(K)}else for(const G of Object.values(this._fieldObjects))L.push(...G);const U=this.annotationStorage,j=[];for(const G of L){const{id:q}=G;switch(j.push(q),G.type){case"text":case"combobox":case"listbox":U.setValue(q,{value:G.defaultValue||""});break;case"checkbox":case"radiobutton":U.setValue(q,{value:G.defaultValue===G.exportValues});break;default:continue}const K=document.getElementById(q);!K||!s.has(K)||K.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:j,name:"ResetForm"}}),!1}}}class F extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str)})}render(){this.container.className="textAnnotation";const e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.appendChild(e),this.container}}class _ extends A{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(e){const{isWin:t,isMac:o}=A.platform;return t&&e.ctrlKey||o&&e.metaKey}_setEventListener(e,t,o,b){t.includes("mouse")?e.addEventListener(t,d=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:o,value:b(d),shift:d.shiftKey,modifier:this._getKeyModifier(d)}})}):e.addEventListener(t,d=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:o,value:b(d)}})})}_setEventListeners(e,t,o){for(const[b,d]of t)("Action"===d||this.data.actions?.[d])&&this._setEventListener(e,b,d,o)}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":r.Util.makeHexColor(t[0],t[1],t[2])}}class c extends _{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,o,b){const d=this.annotationStorage;for(const y of this._getElementsByName(e.name,e.id))y.domElement&&(y.domElement[t]=o),d.setValue(y.id,{[b]:o})}render(){const e=this.annotationStorage,t=this.data.id;this.container.className="textWidgetAnnotation";let o=null;if(this.renderForms){const b=e.getValue(t,{value:this.data.fieldValue}),d=b.formattedValue||b.value||"",y={userValue:null,formattedValue:null,valueOnFocus:""};this.data.multiLine?(o=document.createElement("textarea"),o.textContent=d):(o=document.createElement("input"),o.type="text",o.setAttribute("value",d)),s.add(o),o.disabled=this.data.readOnly,o.name=this.data.fieldName,o.tabIndex=R,y.userValue=d,o.setAttribute("id",t),o.addEventListener("input",U=>{e.setValue(t,{value:U.target.value}),this.setPropertyOnSiblings(o,"value",U.target.value,"value")}),o.addEventListener("resetform",U=>{o.value=y.userValue=this.data.defaultFieldValue??"",y.formattedValue=null});let L=U=>{const{formattedValue:j}=y;null!=j&&(U.target.value=j),U.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){o.addEventListener("focus",j=>{y.userValue&&(j.target.value=y.userValue),y.valueOnFocus=j.target.value}),o.addEventListener("updatefromsandbox",j=>{this._dispatchEventFromSandbox({value(q){y.userValue=q.detail.value??"",e.setValue(t,{value:y.userValue.toString()}),q.target.value=y.userValue},formattedValue(q){const{formattedValue:K}=q.detail;y.formattedValue=K,null!=K&&q.target!==document.activeElement&&(q.target.value=K),e.setValue(t,{formattedValue:K})},selRange(q){q.target.setSelectionRange(...q.detail.selRange)}},j)}),o.addEventListener("keydown",j=>{let G=-1;if("Escape"===j.key?G=0:"Enter"===j.key?G=2:"Tab"===j.key&&(G=3),-1===G)return;const{value:q}=j.target;y.valueOnFocus!==q&&(y.userValue=q,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:q,willCommit:!0,commitKey:G,selStart:j.target.selectionStart,selEnd:j.target.selectionEnd}}))});const U=L;L=null,o.addEventListener("blur",j=>{const{value:G}=j.target;y.userValue=G,this._mouseState.isDown&&y.valueOnFocus!==G&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:G,willCommit:!0,commitKey:1,selStart:j.target.selectionStart,selEnd:j.target.selectionEnd}}),U(j)}),this.data.actions?.Keystroke&&o.addEventListener("beforeinput",j=>{const{data:G,target:q}=j,{value:K,selectionStart:ie,selectionEnd:se}=q;let Q=ie,Z=se;switch(j.inputType){case"deleteWordBackward":{const ae=K.substring(0,ie).match(/\w*[^\w]*$/);ae&&(Q-=ae[0].length);break}case"deleteWordForward":{const ae=K.substring(ie).match(/^[^\w]*\w*/);ae&&(Z+=ae[0].length);break}case"deleteContentBackward":ie===se&&(Q-=1);break;case"deleteContentForward":ie===se&&(Z+=1)}j.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:K,change:G||"",willCommit:!1,selStart:Q,selEnd:Z}})}),this._setEventListeners(o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],j=>j.target.value)}if(L&&o.addEventListener("blur",L),null!==this.data.maxLen&&(o.maxLength=this.data.maxLen),this.data.comb){const j=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;o.classList.add("comb"),o.style.letterSpacing=`calc(${j}px - 1ch)`}}else o=document.createElement("div"),o.textContent=this.data.fieldValue,o.style.verticalAlign="middle",o.style.display="table-cell";return this._setTextStyle(o),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.appendChild(o),this.container}_setTextStyle(e){const{fontSize:o,fontColor:b}=this.data.defaultAppearanceData,d=e.style;o&&(d.fontSize=`${o}px`),d.color=r.Util.makeHexColor(b[0],b[1],b[2]),null!==this.data.textAlignment&&(d.textAlign=["left","center","right"][this.data.textAlignment])}}class v extends _{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,o=t.id;let b=e.getValue(o,{value:t.exportValue===t.fieldValue}).value;"string"==typeof b&&(b="Off"!==b,e.setValue(o,{value:b})),this.container.className="buttonWidgetAnnotation checkBox";const d=document.createElement("input");return s.add(d),d.disabled=t.readOnly,d.type="checkbox",d.name=t.fieldName,b&&d.setAttribute("checked",!0),d.setAttribute("id",o),d.setAttribute("exportValue",t.exportValue),d.tabIndex=R,d.addEventListener("change",y=>{const{name:L,checked:U}=y.target;for(const j of this._getElementsByName(L,o)){const G=U&&j.exportValue===t.exportValue;j.domElement&&(j.domElement.checked=G),e.setValue(j.id,{value:G})}e.setValue(o,{value:U})}),d.addEventListener("resetform",y=>{y.target.checked=(t.defaultFieldValue||"Off")===t.exportValue}),this.enableScripting&&this.hasJSActions&&(d.addEventListener("updatefromsandbox",y=>{this._dispatchEventFromSandbox({value(U){U.target.checked="Off"!==U.detail.value,e.setValue(o,{value:U.target.checked})}},y)}),this._setEventListeners(d,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],y=>y.target.checked)),this._setBackgroundColor(d),this._setDefaultPropertiesFromJS(d),this.container.appendChild(d),this.container}}class h extends _{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=this.annotationStorage,t=this.data,o=t.id;let b=e.getValue(o,{value:t.fieldValue===t.buttonValue}).value;"string"==typeof b&&(b=b!==t.buttonValue,e.setValue(o,{value:b}));const d=document.createElement("input");if(s.add(d),d.disabled=t.readOnly,d.type="radio",d.name=t.fieldName,b&&d.setAttribute("checked",!0),d.setAttribute("id",o),d.tabIndex=R,d.addEventListener("change",y=>{const{name:L,checked:U}=y.target;for(const j of this._getElementsByName(L,o))e.setValue(j.id,{value:!1});e.setValue(o,{value:U})}),d.addEventListener("resetform",y=>{const L=t.defaultFieldValue;y.target.checked=null!=L&&L===t.buttonValue}),this.enableScripting&&this.hasJSActions){const y=t.buttonValue;d.addEventListener("updatefromsandbox",L=>{this._dispatchEventFromSandbox({value:j=>{const G=y===j.detail.value;for(const q of this._getElementsByName(j.target.name)){const K=G&&q.id===o;q.domElement&&(q.domElement.checked=K),e.setValue(q.id,{value:K})}}},L)}),this._setEventListeners(d,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],L=>L.target.checked)}return this._setBackgroundColor(d),this._setDefaultPropertiesFromJS(d),this.container.appendChild(d),this.container}}class m extends C{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();return e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText),this._setDefaultPropertiesFromJS(e),e}}class g extends _{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const e=this.annotationStorage,t=this.data.id,o=e.getValue(t,{value:this.data.fieldValue});let{fontSize:b}=this.data.defaultAppearanceData;b||(b=9);const d=`calc(${b}px * var(--zoom-factor))`,y=document.createElement("select");s.add(y),y.disabled=this.data.readOnly,y.name=this.data.fieldName,y.setAttribute("id",t),y.tabIndex=R,y.style.fontSize=`${b}px`,this.data.combo||(y.size=this.data.options.length,this.data.multiSelect&&(y.multiple=!0)),y.addEventListener("resetform",j=>{const G=this.data.defaultFieldValue;for(const q of y.options)q.selected=q.value===G});for(const j of this.data.options){const G=document.createElement("option");G.textContent=j.displayValue,G.value=j.exportValue,this.data.combo&&(G.style.fontSize=d),o.value.includes(j.exportValue)&&G.setAttribute("selected",!0),y.appendChild(G)}const L=(j,G)=>{const q=G?"value":"textContent",K=j.target.options;return j.target.multiple?Array.prototype.filter.call(K,ie=>ie.selected).map(ie=>ie[q]):-1===K.selectedIndex?null:K[K.selectedIndex][q]},U=j=>Array.prototype.map.call(j.target.options,q=>({displayValue:q.textContent,exportValue:q.value}));return this.enableScripting&&this.hasJSActions?(y.addEventListener("updatefromsandbox",j=>{this._dispatchEventFromSandbox({value(q){const K=q.detail.value,ie=new Set(Array.isArray(K)?K:[K]);for(const se of y.options)se.selected=ie.has(se.value);e.setValue(t,{value:L(q,!0)})},multipleSelection(q){y.multiple=!0},remove(q){const K=y.options,ie=q.detail.remove;K[ie].selected=!1,y.remove(ie),K.length>0&&-1===Array.prototype.findIndex.call(K,Q=>Q.selected)&&(K[0].selected=!0),e.setValue(t,{value:L(q,!0),items:U(q)})},clear(q){for(;0!==y.length;)y.remove(0);e.setValue(t,{value:null,items:[]})},insert(q){const{index:K,displayValue:ie,exportValue:se}=q.detail.insert,Q=document.createElement("option");Q.textContent=ie,Q.value=se,y.insertBefore(Q,y.children[K]),e.setValue(t,{value:L(q,!0),items:U(q)})},items(q){const{items:K}=q.detail;for(;0!==y.length;)y.remove(0);for(const ie of K){const{displayValue:se,exportValue:Q}=ie,Z=document.createElement("option");Z.textContent=se,Z.value=Q,y.appendChild(Z)}y.options.length>0&&(y.options[0].selected=!0),e.setValue(t,{value:L(q,!0),items:U(q)})},indices(q){const K=new Set(q.detail.indices);for(const ie of q.target.options)ie.selected=K.has(ie.index);e.setValue(t,{value:L(q,!0)})},editable(q){q.target.disabled=!q.detail.editable}},j)}),y.addEventListener("input",j=>{const G=L(j,!0),q=L(j,!1);e.setValue(t,{value:G}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:q,changeEx:G,willCommit:!0,commitKey:1,keyDown:!1}})}),this._setEventListeners(y,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"]],j=>j.target.checked)):y.addEventListener("input",function(j){e.setValue(t,{value:L(j,!0)})}),this._setBackgroundColor(y),this._setDefaultPropertiesFromJS(y),this.container.appendChild(y),this.container}}class n extends A{constructor(e){super(e,{isRenderable:!!(e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str)})}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const o=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(0===o.length)return this.container;const b=new i({container:this.container,trigger:Array.from(o),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),d=this.page,y=r.Util.normalizeRect([this.data.parentRect[0],d.view[3]-this.data.parentRect[1]+d.view[1],this.data.parentRect[2],d.view[3]-this.data.parentRect[3]+d.view[1]]),L=y[0]+this.data.parentRect[2]-this.data.parentRect[0],U=y[1];return this.container.style.transformOrigin=`${-L}px ${-U}px`,this.container.style.left=`${L}px`,this.container.style.top=`${U}px`,this.container.appendChild(b.render()),this.container}}class i{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.titleObj=e.titleObj,this.modificationDate=e.modificationDate,this.contentsObj=e.contentsObj,this.richText=e.richText,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){const t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.hidden=!0;const o=document.createElement("div");o.className="popup";const b=this.color;b&&(o.style.backgroundColor=r.Util.makeHexColor(0|.7*(255-b[0])+b[0],0|.7*(255-b[1])+b[1],0|.7*(255-b[2])+b[2]));const d=document.createElement("h1");d.dir=this.titleObj.dir,d.textContent=this.titleObj.str,o.appendChild(d);const y=H.PDFDateString.toDateObject(this.modificationDate);if(y){const L=document.createElement("span");L.className="popupDate",L.textContent="{{date}}, {{time}}",L.dataset.l10nId="annotation_date_string",L.dataset.l10nArgs=JSON.stringify({date:y.toLocaleDateString(),time:y.toLocaleTimeString()}),o.appendChild(L)}if(!this.richText?.str||this.contentsObj?.str&&this.contentsObj.str!==this.richText.str){const L=this._formatContents(this.contentsObj);o.appendChild(L)}else z.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:o}),o.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const L of this.trigger)L.addEventListener("click",this._toggle.bind(this)),L.addEventListener("mouseover",this._show.bind(this,!1)),L.addEventListener("mouseout",this._hide.bind(this,!1));return o.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(o),t}_formatContents({str:e,dir:t}){const o=document.createElement("p");o.className="popupContent",o.dir=t;const b=e.split(/(?:\r\n?|\n)/);for(let d=0,y=b.length;d<y;++d)o.appendChild(document.createTextNode(b[d])),d<y-1&&o.appendChild(document.createElement("br"));return o}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(e=!1){e&&(this.pinned=!0),this.hideElement.hidden&&(this.hideElement.hidden=!1,this.container.style.zIndex+=1)}_hide(e=!0){e&&(this.pinned=!1),!this.hideElement.hidden&&!this.pinned&&(this.hideElement.hidden=!0,this.container.style.zIndex-=1)}}class f extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0})}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class u extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0})}render(){this.container.className="lineAnnotation";const e=this.data,{width:t,height:o}=P(e.rect),b=this.svgFactory.create(t,o),d=this.svgFactory.createElement("svg:line");return d.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),d.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),d.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),d.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),d.setAttribute("stroke-width",e.borderStyle.width||1),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),b.appendChild(d),this.container.append(b),this._createPopup(d,e),this.container}}class S extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0})}render(){this.container.className="squareAnnotation";const e=this.data,{width:t,height:o}=P(e.rect),b=this.svgFactory.create(t,o),d=e.borderStyle.width,y=this.svgFactory.createElement("svg:rect");return y.setAttribute("x",d/2),y.setAttribute("y",d/2),y.setAttribute("width",t-d),y.setAttribute("height",o-d),y.setAttribute("stroke-width",d||1),y.setAttribute("stroke","transparent"),y.setAttribute("fill","transparent"),b.appendChild(y),this.container.append(b),this._createPopup(y,e),this.container}}class x extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0})}render(){this.container.className="circleAnnotation";const e=this.data,{width:t,height:o}=P(e.rect),b=this.svgFactory.create(t,o),d=e.borderStyle.width,y=this.svgFactory.createElement("svg:ellipse");return y.setAttribute("cx",t/2),y.setAttribute("cy",o/2),y.setAttribute("rx",t/2-d/2),y.setAttribute("ry",o/2-d/2),y.setAttribute("stroke-width",d||1),y.setAttribute("stroke","transparent"),y.setAttribute("fill","transparent"),b.appendChild(y),this.container.append(b),this._createPopup(y,e),this.container}}class k extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,{width:t,height:o}=P(e.rect),b=this.svgFactory.create(t,o);let d=[];for(const L of e.vertices)d.push(L.x-e.rect[0]+","+(e.rect[3]-L.y));d=d.join(" ");const y=this.svgFactory.createElement(this.svgElementName);return y.setAttribute("points",d),y.setAttribute("stroke-width",e.borderStyle.width||1),y.setAttribute("stroke","transparent"),y.setAttribute("fill","transparent"),b.appendChild(y),this.container.append(b),this._createPopup(y,e),this.container}}class l extends k{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class T extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0})}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class E extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const e=this.data,{width:t,height:o}=P(e.rect),b=this.svgFactory.create(t,o);for(const d of e.inkLists){let y=[];for(const U of d)y.push(`${U.x-e.rect[0]},${e.rect[3]-U.y}`);y=y.join(" ");const L=this.svgFactory.createElement(this.svgElementName);L.setAttribute("points",y),L.setAttribute("stroke-width",e.borderStyle.width||1),L.setAttribute("stroke","transparent"),L.setAttribute("fill","transparent"),this._createPopup(L,e),b.appendChild(L)}return this.container.append(b),this.container}}class O extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("highlightAnnotation"):(this.container.className="highlightAnnotation",this.container)}}class B extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("underlineAnnotation"):(this.container.className="underlineAnnotation",this.container)}}class M extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("squigglyAnnotation"):(this.container.className="squigglyAnnotation",this.container)}}class I extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str),ignoreBorder:!0,createQuadrilaterals:!0})}render(){return this.data.hasPopup||this._createPopup(null,this.data),this.quadrilaterals?this._renderQuadrilaterals("strikeoutAnnotation"):(this.container.className="strikeoutAnnotation",this.container)}}class V extends A{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.r
1ichText?.str),ignoreBorder:!0})}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(null,this.data),this.container}}class X extends A{constructor(e){super(e,{isRenderable:!0});const{filename:t,content:o}=this.data.file;this.filename=(0,H.getFilenameFromUrl)(t),this.content=o,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,filename:t,content:o})}render(){this.container.className="fileAttachmentAnnotation";const e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),!this.data.hasPopup&&(this.data.titleObj?.str||this.data.contentsObj?.str||this.data.richText)&&this._createPopup(e,this.data),this.container.appendChild(e),this.container}_download(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}a.AnnotationLayer=class J{static render(e){const t=[],o=[];for(const d of e.annotations){if(!d)continue;const{width:y,height:L}=P(d.rect);if(!(y<=0||L<=0)){if(d.annotationType===r.AnnotationType.POPUP){o.push(d);continue}t.push(d)}}o.length&&t.push(...o);const b=e.div;for(const d of t){const y=p.create({data:d,layer:b,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new H.DOMSVGFactory,annotationStorage:e.annotationStorage||new N.AnnotationStorage,enableScripting:e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,mouseState:e.mouseState||{isDown:!1}});if(y.isRenderable){const L=y.render();if(d.hidden&&(L.style.visibility="hidden"),Array.isArray(L))for(const U of L)b.appendChild(U);else y instanceof n?b.prepend(L):b.appendChild(L)}}this.#e(b,e.annotationCanvasMap)}static update(e){const{page:t,viewport:o,annotations:b,annotationCanvasMap:d,div:y}=e,L=o.transform,U=`matrix(${L.join(",")})`;let j,G;for(const q of b){const K=y.querySelectorAll(`[data-annotation-id="${q.id}"]`);if(K)for(const ie of K)if(q.hasOwnCanvas){const se=r.Util.normalizeRect([q.rect[0],t.view[3]-q.rect[1]+t.view[1],q.rect[2],t.view[3]-q.rect[3]+t.view[1]]);if(!G){j=Math.abs(L[0]||L[1]);const ae=L.slice();for(let re=0;re<4;re++)ae[re]=Math.sign(ae[re]);G=`matrix(${ae.join(",")})`}const Q=se[0]*j,Z=se[1]*j;ie.style.left=`${Q}px`,ie.style.top=`${Z}px`,ie.style.transformOrigin=`${-Q}px ${-Z}px`,ie.style.transform=G}else ie.style.transform=U}this.#e(y,d),y.hidden=!1}static#e(e,t){if(t){for(const[o,b]of t){const d=e.querySelector(`[data-annotation-id="${o}"]`);if(!d)continue;const{firstChild:y}=d;"CANVAS"===y.nodeName?d.replaceChild(b,y):d.insertBefore(b,y)}t.clear()}}}},(te,a)=>{function D(H){return Math.floor(255*Math.max(0,Math.min(1,H))).toString(16).padStart(2,"0")}Object.defineProperty(a,"__esModule",{value:!0}),a.ColorConverters=void 0,a.ColorConverters=class r{static CMYK_G([N,W,z,R]){return["G",1-Math.min(1,.3*N+.59*z+.11*W+R)]}static G_CMYK([N]){return["CMYK",0,0,0,1-N]}static G_RGB([N]){return["RGB",N,N,N]}static G_HTML([N]){const W=D(N);return`#${W}${W}${W}`}static RGB_G([N,W,z]){return["G",.3*N+.59*W+.11*z]}static RGB_HTML([N,W,z]){return`#${D(N)}${D(W)}${D(z)}`}static T_HTML(){return"#00000000"}static CMYK_RGB([N,W,z,R]){return["RGB",1-Math.min(1,N+R),1-Math.min(1,z+R),1-Math.min(1,W+R)]}static CMYK_HTML(N){return this.RGB_HTML(this.CMYK_RGB(N))}static RGB_CMYK([N,W,z]){const R=1-N,s=1-W,P=1-z;return["CMYK",R,s,P,Math.min(R,s,P)]}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.XfaLayer=void 0;var r=D(18);a.XfaLayer=class H{static setupStorage(W,z,R,s,P){const p=s.getValue(z,{value:null});switch(R.name){case"textarea":if(null!==p.value&&(W.textContent=p.value),"print"===P)break;W.addEventListener("input",A=>{s.setValue(z,{value:A.target.value})});break;case"input":if("radio"===R.attributes.type||"checkbox"===R.attributes.type){if(p.value===R.attributes.xfaOn?W.setAttribute("checked",!0):p.value===R.attributes.xfaOff&&W.removeAttribute("checked"),"print"===P)break;W.addEventListener("change",A=>{s.setValue(z,{value:A.target.getAttribute(A.target.checked?"xfaOn":"xfaOff")})})}else{if(null!==p.value&&W.setAttribute("value",p.value),"print"===P)break;W.addEventListener("input",A=>{s.setValue(z,{value:A.target.value})})}break;case"select":if(null!==p.value)for(const A of R.children)A.attributes.value===p.value&&(A.attributes.selected=!0);W.addEventListener("input",A=>{const C=A.target.options;s.setValue(z,{value:-1===C.selectedIndex?"":C[C.selectedIndex].value})})}}static setAttributes({html:W,element:z,storage:R=null,intent:s,linkService:P}){const{attributes:p}=z,A=W instanceof HTMLAnchorElement;"radio"===p.type&&(p.name=`${p.name}-${s}`);for(const[C,F]of Object.entries(p))if(null!=F&&"dataId"!==C)if("style"!==C)if("textContent"===C)W.textContent=F;else if("class"===C)F.length&&W.setAttribute(C,F.join(" "));else{if(A&&("href"===C||"newWindow"===C))continue;W.setAttribute(C,F)}else Object.assign(W.style,F);A&&P.addLinkAttributes(W,p.href,p.newWindow),R&&p.dataId&&this.setupStorage(W,p.dataId,z,R)}static render(W){const z=W.annotationStorage,R=W.linkService,s=W.xfaHtml,P=W.intent||"display",p=document.createElement(s.name);s.attributes&&this.setAttributes({html:p,element:s,intent:P,linkService:R});const A=[[s,-1,p]],C=W.div;if(C.appendChild(p),W.viewport){const _=`matrix(${W.viewport.transform.join(",")})`;C.style.transform=_}
vendor: 41,300 bytes, line 1
1"richText"!==P&&C.setAttribute("class","xfaLayer xfaFont");const F=[];for(;A.length>0;){const[_,c,v]=A[A.length-1];if(c+1===_.children.length){A.pop();continue}const h=_.children[++A[A.length-1][1]];if(null===h)continue;const{name:m}=h;if("#text"===m){const n=document.createTextNode(h.value);F.push(n),v.appendChild(n);continue}let g;if(g=h?.attributes?.xmlns?document.createElementNS(h.attributes.xmlns,m):document.createElement(m),v.appendChild(g),h.attributes&&this.setAttributes({html:g,element:h,storage:z,intent:P,linkService:R}),h.children&&h.children.length>0)A.push([h,-1,g]);else if(h.value){const n=document.createTextNode(h.value);r.XfaText.shouldBuildText(m)&&F.push(n),g.appendChild(n)}}for(const _ of C.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))_.setAttribute("readOnly",!0);return{textDivs:F}}static update(W){const z=`matrix(${W.viewport.transform.join(",")})`;W.div.style.transform=z,W.div.hidden=!1}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.renderTextLayer=function v(h){const m=new c({textContent:h.textContent,textContentStream:h.textContentStream,container:h.container,viewport:h.viewport,textDivs:h.textDivs,textContentItemsStr:h.textContentItemsStr,enhanceTextSelection:h.enhanceTextSelection});return m._render(h.timeout),m};var r=D(1);const H=1e5,N=30,W=.8,z=new Map,R=/^\s+$/g;function P(h,m,g,n){const i=document.createElement("span"),f=h._enhanceTextSelection?{angle:0,canvasWidth:0,hasText:""!==m.str,hasEOL:m.hasEOL,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1}:{angle:0,canvasWidth:0,hasText:""!==m.str,hasEOL:m.hasEOL};h._textDivs.push(i);const u=r.Util.transform(h._viewport.transform,m.transform);let S=Math.atan2(u[1],u[0]);const x=g[m.fontName];x.vertical&&(S+=Math.PI/2);const k=Math.hypot(u[2],u[3]),l=k*function s(h,m){const g=z.get(h);if(g)return g;m.save(),m.font=`${N}px ${h}`;const n=m.measureText("");let i=n.fontBoundingBoxAscent,f=Math.abs(n.fontBoundingBoxDescent);if(i){m.restore();const S=i/(i+f);return z.set(h,S),S}m.strokeStyle="red",m.clearRect(0,0,N,N),m.strokeText("g",0,0);let u=m.getImageData(0,0,N,N).data;f=0;for(let S=u.length-1-3;S>=0;S-=4)if(u[S]>0){f=Math.ceil(S/4/N);break}m.clearRect(0,0,N,N),m.strokeText("A",0,N),u=m.getImageData(0,0,N,N).data,i=0;for(let S=0,x=u.length;S<x;S+=4)if(u[S]>0){i=N-Math.floor(S/4/N);break}if(m.restore(),i){const S=i/(i+f);return z.set(h,S),S}return z.set(h,W),W}(x.fontFamily,n);let T,E;0===S?(T=u[4],E=u[5]-l):(T=u[4]+l*Math.sin(S),E=u[5]-l*Math.cos(S)),i.style.left=`${T}px`,i.style.top=`${E}px`,i.style.fontSize=`${k}px`,i.style.fontFamily=x.fontFamily,i.setAttribute("role","presentation"),i.textContent=m.str,i.dir=m.dir,h._fontInspectorEnabled&&(i.dataset.fontName=m.fontName),0!==S&&(f.angle=S*(180/Math.PI));let O=!1;if(m.str.length>1||h._enhanceTextSelection&&R.test(m.str))O=!0;else if(" "!==m.str&&m.transform[0]!==m.transform[3]){const B=Math.abs(m.transform[0]),M=Math.abs(m.transform[3]);B!==M&&Math.max(B,M)/Math.min(B,M)>1.5&&(O=!0)}if(O&&(f.canvasWidth=x.vertical?m.height*h._viewport.scale:m.width*h._viewport.scale),h._textDivProperties.set(i,f),h._textContentStream&&h._layoutText(i),h._enhanceTextSelection&&f.hasText){let B=1,M=0;0!==S&&(B=Math.cos(S),M=Math.sin(S));const I=(x.vertical?m.height:m.width)*h._viewport.scale,V=k;let X,J;0!==S?(X=[B,M,-M,B,T,E],J=r.Util.getAxialAlignedBoundingBox([0,0,I,V],X)):J=[T,E,T+I,E+V],h._bounds.push({left:J[0],top:J[1],right:J[2],bottom:J[3],div:i,size:[I,V],m:X})}}function p(h){if(h._canceled)return;const m=h._textDivs,g=h._capability,n=m.length;if(n>H)return h._renderingDone=!0,void g.resolve();if(!h._textContentStream)for(let i=0;i<n;i++)h._layoutText(m[i]);h._renderingDone=!0,g.resolve()}function A(h,m,g){let n=0;for(let i=0;i<g;i++){const f=h[m++];f>0&&(n=n?Math.min(f,n):f)}return n}function _(h,m){m.sort(function(i,f){return i.x1-f.x1||i.index-f.index});const n=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];for(const i of m){let f=0;for(;f<n.length&&n[f].end<=i.y1;)f++;let u=n.length-1;for(;u>=0&&n[u].start>=i.y2;)u--;let S,x,k,l,T=-1/0;for(k=f;k<=u;k++){let B;S=n[k],x=S.boundary,B=x.x2>i.x1?x.index>i.index?x.x1New:i.x1:void 0===x.x2New?(x.x2+i.x1)/2:x.x2New,B>T&&(T=B)}for(i.x1New=T,k=f;k<=u;k++)S=n[k],x=S.boundary,void 0===x.x2New?x.x2>i.x1?x.index>i.index&&(x.x2New=x.x2):x.x2New=T:x.x2New>T&&(x.x2New=Math.max(T,x.x2));const E=[];let O=null;for(k=f;k<=u;k++){S=n[k],x=S.boundary;const B=x.x2>i.x2?x:i;O===B?E[E.length-1].end=S.end:(E.push({start:S.start,end:S.end,boundary:B}),O=B)}for(n[f].start<i.y1&&(E[0].start=i.y1,E.unshift({start:n[f].start,end:i.y1,boundary:n[f].boundary})),i.y2<n[u].end&&(E[E.length-1].end=i.y2,E.push({start:i.y2,end:n[u].end,boundary:n[u].boundary})),k=f;k<=u;k++){if(S=n[k],x=S.boundary,void 0!==x.x2New)continue;let B=!1;for(l=f-1;!B&&l>=0&&n[l].start>=x.y1;l--)B=n[l].boundary===x;for(l=u+1;!B&&l<n.length&&n[l].end<=x.y2;l++)B=n[l].boundary===x;for(l=0;!B&&l<E.length;l++)B=E[l].boundary===x;B||(x.x2New=T)}Array.prototype.splice.apply(n,[f,u-f+1].concat(E))}for(const i of n){const f=i.boundary;void 0===f.x2New&&(f.x2New=Math.max(h,f.x2))}}class c{constructor({textContent:m,textContentStream:g,container:n,viewport:i,textDivs:f,textContentItemsStr:u,enhanceTextSelection:S}){this._textContent=m,this._textContentStream=g,this._container=n,this._document=n.ownerDocument,this._viewport=i,this._textDivs=f||[],this._textContentItemsStr=u||[],this._enhanceTextSelection=!!S,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,r.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(()=>{this._enhanceTextSelection||(this._textDivProperties=null),this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))}_processItems(m,g){for(let n=0,i=m.length;n<i;n++)if(void 0!==m[n].str)this._textContentItemsStr.push(m[n].str),P(this,m[n],g,this._layoutTextCtx);else if("beginMarkedContentProps"===m[n].type||"beginMarkedContent"===m[n].type){const f=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==m[n].id&&this._container.setAttribute("id",`${m[n].id}`),f.appendChild(this._container)}else"endMarkedContent"===m[n].type&&(this._container=this._container.parentNode)}_layoutText(m){const g=this._textDivProperties.get(m);let n="";if(0!==g.canvasWidth&&g.hasText){const{fontSize:i,fontFamily:f}=m.style;(i!==this._layoutTextLastFontSize||f!==this._layoutTextLastFontFamily)&&(this._layoutTextCtx.font=`${i} ${f}`,this._layoutTextLastFontSize=i,this._layoutTextLastFontFamily=f);const{width:u}=this._layoutTextCtx.measureText(m.textContent);if(u>0){const S=g.canvasWidth/u;this._enhanceTextSelection&&(g.scale=S),n=`scaleX(${S})`}}if(0!==g.angle&&(n=`rotate(${g.angle}deg) ${n}`),n.length>0&&(this._enhanceTextSelection&&(g.originalTransform=n),m.style.transform=n),g.hasText&&this._container.appendChild(m),g.hasEOL){const i=document.createElement("br");i.setAttribute("role","presentation"),this._container.appendChild(i)}}_render(m=0){const g=(0,r.createPromiseCapability)();let n=Object.create(null);const i=this._document.createElement("canvas");if(i.height=i.width=N,this._layoutTextCtx=i.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),g.resolve();else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const f=()=>{this._reader.read().then(({value:u,done:S})=>{S?g.resolve():(Object.assign(n,u.styles),this._processItems(u.items,n),f())},g.reject)};this._reader=this._textContentStream.getReader(),f()}}g.promise.then(()=>{n=null,m?this._renderTimer=setTimeout(()=>{p(this),this._renderTimer=null},m):p(this)},this._capability.reject)}expandTextDivs(m=!1){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(function C(h){const m=h._bounds,g=h._viewport,n=function F(h,m,g){const n=g.map(function(f,u){return{x1:f.left,y1:f.top,x2:f.right,y2:f.bottom,index:u,x1New:void 0,x2New:void 0}});_(h,n);const i=new Array(g.length);for(const f of n)i[f.index]={left:f.x1New,top:0,right:f.x2New,bottom:0};g.map(function(f,u){const S=i[u],x=n[u];x.x1=f.top,x.y1=h-S.right,x.x2=f.bottom,x.y2=h-S.left,x.index=u,x.x1New=void 0,x.x2New=void 0}),_(m,n);for(const f of n){const u=f.index;i[u].top=f.x1New,i[u].bottom=f.x2New}return i}(g.width,g.height,m);for(let i=0;i<n.length;i++){const f=m[i].div,u=h._textDivProperties.get(f);if(0===u.angle){u.paddingLeft=m[i].left-n[i].left,u.paddingTop=m[i].top-n[i].top,u.paddingRight=n[i].right-m[i].right,u.paddingBottom=n[i].bottom-m[i].bottom,h._textDivProperties.set(f,u);continue}const S=n[i],x=m[i],k=x.m,l=k[0],T=k[1],E=[[0,0],[0,x.size[1]],[x.size[0],0],x.size],O=new Float64Array(64);for(let M=0,I=E.length;M<I;M++){const V=r.Util.applyTransform(E[M],k);O[M+0]=l&&(S.left-V[0])/l,O[M+4]=T&&(S.top-V[1])/T,O[M+8]=l&&(S.right-V[0])/l,O[M+12]=T&&(S.bottom-V[1])/T,O[M+16]=T&&(S.left-V[0])/-T,O[M+20]=l&&(S.top-V[1])/l,O[M+24]=T&&(S.right-V[0])/-T,O[M+28]=l&&(S.bottom-V[1])/l,O[M+32]=l&&(S.left-V[0])/-l,O[M+36]=T&&(S.top-V[1])/-T,O[M+40]=l&&(S.right-V[0])/-l,O[M+44]=T&&(S.bottom-V[1])/-T,O[M+48]=T&&(S.left-V[0])/T,O[M+52]=l&&(S.top-V[1])/-l,O[M+56]=T&&(S.right-V[0])/T,O[M+60]=l&&(S.bottom-V[1])/-l}const B=1+Math.min(Math.abs(l),Math.abs(T));u.paddingLeft=A(O,32,16)/B,u.paddingTop=A(O,48,16)/B,u.paddingRight=A(O,0,16)/B,u.paddingBottom=A(O,16,16)/B,h._textDivProperties.set(f,u)}}(this),this._bounds=null);const g=[],n=[];for(let i=0,f=this._textDivs.length;i<f;i++){const u=this._textDivs[i],S=this._textDivProperties.get(u);S.hasText&&(m?(g.length=0,n.length=0,S.originalTransform&&g.push(S.originalTransform),S.paddingTop>0?(n.push(`${S.paddingTop}px`),g.push(`translateY(${-S.paddingTop}px)`)):n.push(0),n.push(S.paddingRight>0?S.paddingRight/S.scale+"px":0),n.push(S.paddingBottom>0?`${S.paddingBottom}px`:0),S.paddingLeft>0?(n.push(S.paddingLeft/S.scale+"px"),g.push(`translateX(${-S.paddingLeft/S.scale}px)`)):n.push(0),u.style.padding=n.join(" "),g.length&&(u.style.transform=g.join(" "))):(u.style.padding=null,u.style.transform=S.originalTransform))}}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SVGGraphics=void 0;var r=D(1),H=D(5),N=D(3);let W=class{constructor(){(0,r.unreachable)("Not implemented: SVGGraphics")}};a.SVGGraphics=W;{let _=function(n){let i=[];const f=[];for(const u of n)"save"!==u.fn?"restore"===u.fn?i=f.pop():i.push(u):(i.push({fnId:92,fn:"group",items:[]}),f.push(i),i=i[i.length-1].items);return i},c=function(n){if(Number.isInteger(n))return n.toString();const i=n.toFixed(10);let f=i.length-1;if("0"!==i[f])return i;do{f--}while("0"===i[f]);return i.substring(0,"."===i[f]?f:f+1)},v=function(n){if(0===n[4]&&0===n[5]){if(0===n[1]&&0===n[2])return 1===n[0]&&1===n[3]?"":`scale(${c(n[0])} ${c(n[3])})`;if(n[0]===n[3]&&n[1]===-n[2]){const i=180*Math.acos(n[0])/Math.PI;return`rotate(${c(i)})`}}else if(1===n[0]&&0===n[1]&&0===n[2]&&1===n[3])return`translate(${c(n[4])} ${c(n[5])})`;return`matrix(${c(n[0])} ${c(n[1])} ${c(n[2])} ${c(n[3])} ${c(n[4])} ${c(n[5])})`};const z={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},R="http://www.w3.org/XML/1998/namespace",s="http://www.w3.org/1999/xlink",P=["butt","round","square"],p=["miter","round","bevel"],A=function(n,i="",f=!1){if(URL.createObjectURL&&typeof Blob<"u"&&!f)return URL.createObjectURL(new Blob([n],{type:i}));const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let S=`data:${i};base64,`;for(let x=0,k=n.length;x<k;x+=3){const l=255&n[x],T=255&n[x+1],E=255&n[x+2];S+=u[l>>2]+u[(3&l)<<4|T>>4]+u[x+1<k?(15&T)<<2|E>>6:64]+u[x+2<k?63&E:64]}return S},C=function(){const n=new Uint8Array([137,80,78,71,13,10,26,10]),i=12,f=new Int32Array(256);for(let E=0;E<256;E++){let O=E;for(let B=0;B<8;B++)O=1&O?3988292384^O>>1&2147483647:O>>1&2147483647;f[E]=O}function S(E,O,B,M){let I=M;const V=O.length;B[I]=V>>24&255,B[I+1]=V>>16&255,B[I+2]=V>>8&255,B[I+3]=255&V,I+=4,B[I]=255&E.charCodeAt(0),B[I+1]=255&E.charCodeAt(1),B[I+2]=255&E.charCodeAt(2),B[I+3]=255&E.charCodeAt(3),I+=4,B.set(O,I),I+=O.length;const X=function u(E,O,B){let M=-1;for(let I=O;I<B;I++)M=M>>>8^f[255&(M^E[I])];return-1^M}(B,M+4,I);B[I]=X>>24&255,B[I+1]=X>>16&255,B[I+2]=X>>8&255,B[I+3]=255&X}function l(E){let O=E.length;const B=65535,M=Math.ceil(O/B),I=new Uint8Array(2+O+5*M+4);let V=0;I[V++]=120,I[V++]=156;let X=0;for(;O>B;)I[V++]=0,I[V++]=255,I[V++]=255,I[V++]=0,I[V++]=0,I.set(E.subarray(X,X+B),V),V+=B,X+=B,O-=B;I[V++]=1,I[V++]=255&O,I[V++]=O>>8&255,I[V++]=255&~O,I[V++]=(65535&~O)>>8&255,I.set(E.subarray(X),V),V+=E.length-X;const J=function x(E,O,B){let M=1,I=0;for(let V=O;V<B;++V)M=(M+(255&E[V]))%65521,I=(I+M)%65521;return I<<16|M}(E,0,E.length);return I[V++]=J>>24&255,I[V++]=J>>16&255,I[V++]=J>>8&255,I[V++]=255&J,I}return function(O,B,M){return function T(E,O,B,M){const I=E.width,V=E.height;let X,J,w;const e=E.data;switch(O){case r.ImageKind.GRAYSCALE_1BPP:J=0,X=1,w=I+7>>3;break;case r.ImageKind.RGB_24BPP:J=2,X=8,w=3*I;break;case r.ImageKind.RGBA_32BPP:J=6,X=8,w=4*I;break;default:throw new Error("invalid format")}const t=new Uint8Array((1+w)*V);let o=0,b=0;for(let G=0;G<V;++G)t[o++]=0,t.set(e.subarray(b,b+w),o),b+=w,o+=w;if(O===r.ImageKind.GRAYSCALE_1BPP&&M){o=0;for(let G=0;G<V;G++){o++;for(let q=0;q<w;q++)t[o++]^=255}}const d=new Uint8Array([I>>24&255,I>>16&255,I>>8&255,255&I,V>>24&255,V>>16&255,V>>8&255,255&V,X,J,0,0,0]),y=function k(E){if(!N.isNodeJS)return l(E);try{let O;O=parseInt(process.versions.node)>=8?E:Buffer.from(E);const B=__webpack_require__(50372).deflateSync(O,{level:9});return B instanceof Uint8Array?B:new Uint8Array(B)}catch(O){(0,r.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+O)}return l(E)}(t),U=new Uint8Array(n.length+3*i+d.length+y.length);let j=0;return U.set(n,j),j+=n.length,S("IHDR",d,U,j),j+=i+d.length,S("IDATA",y,U,j),j+=i+y.length,S("IEND",new Uint8Array(0),U,j),A(U,"image/png",B)}(O,void 0===O.kind?r.ImageKind.GRAYSCALE_1BPP:O.kind,B,M)}}();class F{constructor(){this.fontSizeScale=1,this.fontWeight=z.fontWeight,this.fontSize=0,this.textMatrix=r.IDENTITY_MATRIX,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=r.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=z.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(i,f){this.x=i,this.y=f}}let h=0,m=0,g=0;a.SVGGraphics=W=class{constructor(n,i,f=!1){this.svgFactory=new H.DOMSVGFactory,this.current=new F,this.transformMatrix=r.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=n,this.objs=i,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!f,this._operatorIdMapping=[];for(const u in r.OPS)this._operatorIdMapping[r.OPS[u]]=u}save(){this.transformStack.push(this.transformMatrix);const n=this.current;this.extraStack.push(n),this.current=n.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(n){this.save(),this.executeOpTree(n),this.restore()}loadDependencies(n){const i=n.fnArray,f=n.argsArray;for(let u=0,S=i.length;u<S;u++)if(i[u]===r.OPS.dependency)for(const x of f[u]){const k=x.startsWith("g_")?this.commonObjs:this.objs,l=new Promise(T=>{k.get(x,T)});this.current.dependencies.push(l)}return Promise.all(this.current.dependencies)}transform(n,i,f,u,S,x){this.transformMatrix=r.Util.transform(this.transformMatrix,[n,i,f,u,S,x]),this.tgrp=null}getSVG(n,i){this.viewport=i;const f=this._initialize(i);return this.loadDependencies(n).then(()=>(this.transformMatrix=r.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(n)),f))}convertOpList(n){const i=this._operatorIdMapping,f=n.argsArray,u=n.fnArray,S=[];for(let x=0,k=u.length;x<k;x++){const l=u[x];S.push({fnId:l,fn:i[l],args:f[x]})}return _(S)}executeOpTree(n){for(const i of n){const f=i.fn,S=i.args;switch(0|i.fnId){case r.OPS.beginText:this.beginText();break;case r.OPS.dependency:break;case r.OPS.setLeading:this.setLeading(S);break;case r.OPS.setLeadingMoveText:this.setLeadingMoveText(S[0],S[1]);break;case r.OPS.setFont:this.setFont(S);break;case r.OPS.showText:case r.OPS.showSpacedText:this.showText(S[0]);break;case r.OPS.endText:this.endText();break;case r.OPS.moveText:this.moveText(S[0],S[1]);break;case r.OPS.setCharSpacing:this.setCharSpacing(S[0]);break;case r.OPS.setWordSpacing:this.setWordSpacing(S[0]);break;case r.OPS.setHScale:this.setHScale(S[0]);break;case r.OPS.setTextMatrix:this.setTextMatrix(S[0],S[1],S[2],S[3],S[4],S[5]);break;case r.OPS.setTextRise:this.setTextRise(S[0]);break;case r.OPS.setTextRenderingMode:this.setTextRenderingMode(S[0]);break;case r.OPS.setLineWidth:this.setLineWidth(S[0]);break;case r.OPS.setLineJoin:this.setLineJoin(S[0]);break;case r.OPS.setLineCap:this.setLineCap(S[0]);break;case r.OPS.setMiterLimit:this.setMiterLimit(S[0]);break;case r.OPS.setFillRGBColor:this.setFillRGBColor(S[0],S[1],S[2]);break;case r.OPS.setStrokeRGBColor:this.setStrokeRGBColor(S[0],S[1],S[2]);break;case r.OPS.setStrokeColorN:this.setStrokeColorN(S);break;case r.OPS.setFillColorN:this.setFillColorN(S);break;case r.OPS.shadingFill:this.shadingFill(S[0]);break;case r.OPS.setDash:this.setDash(S[0],S[1]);break;case r.OPS.setRenderingIntent:this.setRenderingIntent(S[0]);break;case r.OPS.setFlatness:this.setFlatness(S[0]);break;case r.OPS.setGState:this.setGState(S[0]);break;case r.OPS.fill:this.fill();break;case r.OPS.eoFill:this.eoFill();break;case r.OPS.stroke:this.stroke();break;case r.OPS.fillStroke:this.fillStroke();break;case r.OPS.eoFillStroke:this.eoFillStroke();break;case r.OPS.clip:this.clip("nonzero");break;case r.OPS.eoClip:this.clip("evenodd");break;case r.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case r.OPS.paintImageXObject:this.paintImageXObject(S[0]);break;case r.OPS.paintInlineImageXObject:this.paintInlineImageXObject(S[0]);break;case r.OPS.paintImageMaskXObject:this.paintImageMaskXObject(S[0]);break;case r.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(S[0],S[1]);break;case r.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case r.OPS.closePath:this.closePath();break;case r.OPS.closeStroke:this.closeStroke();break;case r.OPS.closeFillStroke:this.closeFillStroke();break;case r.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case r.OPS.nextLine:this.nextLine();break;case r.OPS.transform:this.transform(S[0],S[1],S[2],S[3],S[4],S[5]);break;case r.OPS.constructPath:this.constructPath(S[0],S[1]);break;case r.OPS.endPath:this.endPath();break;case 92:this.group(i.items);break;default:(0,r.warn)(`Unimplemented operator ${f}`)}}}setWordSpacing(n){this.current.wordSpacing=n}setCharSpacing(n){this.current.charSpacing=n}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(n,i,f,u,S,x){const k=this.current;k.textMatrix=k.lineMatrix=[n,i,f,u,S,x],k.textMatrixScale=Math.hypot(n,i),k.x=k.lineX=0,k.y=k.lineY=0,k.xcoords=[],k.ycoords=[],k.tspan=this.svgFactory.createElement("svg:tspan"),k.tspan.setAttributeNS(null,"font-family",k.fontFamily),k.tspan.setAttributeNS(null,"font-size",`${c(k.fontSize)}px`),k.tspan.setAttributeNS(null,"y",c(-k.y)),k.txtElement=this.svgFactory.createElement("svg:text"),k.txtElement.appendChild(k.tspan)}beginText(){const n=this.current;n.x=n.lineX=0,n.y=n.lineY=0,n.textMatrix=r.IDENTITY_MATRIX,n.lineMatrix=r.IDENTITY_MATRIX,n.textMatrixScale=1,n.tspan=this.svgFactory.createElement("svg:tspan"),n.txtElement=this.svgFactory.createElement("svg:text"),n.txtgrp=this.svgFactory.createElement("svg:g"),n.xcoords=[],n.ycoords=[]}moveText(n,i){const f=this.current;f.x=f.lineX+=n,f.y=f.lineY+=i,f.xcoords=[],f.ycoords=[],f.tspan=this.svgFactory.createElement("svg:tspan"),f.tspan.setAttributeNS(null,"font-family",f.fontFamily),f.tspan.setAttributeNS(null,"font-size",`${c(f.fontSize)}px`),f.tspan.setAttributeNS(null,"y",c(-f.y))}showText(n){const i=this.current,f=i.font,u=i.fontSize;if(0===u)return;const S=i.fontSizeScale,x=i.charSpacing,k=i.wordSpacing,l=i.fontDirection,T=i.textHScale*l,E=f.vertical,O=E?1:-1,B=f.defaultVMetrics,M=u*i.fontMatrix[0];let I=0;for(const J of n){if(null===J){I+=l*k;continue}if("number"==typeof J){I+=O*J*u/1e3;continue}const w=(J.isSpace?k:0)+x,e=J.fontChar;let t,o,d,b=J.width;if(E){let y;const L=J.vmetric||B;y=J.vmetric?L[1]:.5*b,y=-y*M,b=L?-L[0]:b,t=y/S,o=(I+L[2]*M)/S}else t=I/S,o=0;(J.isInFont||f.missingFile)&&(i.xcoords.push(i.x+t),E&&i.ycoords.push(-i.y+o),i.tspan.textContent+=e),d=E?b*M-w*l:b*M+w*l,I+=d}i.tspan.setAttributeNS(null,"x",i.xcoords.map(c).join(" ")),i.tspan.setAttributeNS(null,"y",E?i.ycoords.map(c).join(" "):c(-i.y)),E?i.y-=I:i.x+=I*T,i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",`${c(i.fontSize)}px`),i.fontStyle!==z.fontStyle&&i.tspan.setAttributeNS(null,"font-style",i.fontStyle),i.fontWeight!==z.fontWeight&&i.tspan.setAttributeNS(null,"font-weight",i.fontWeight);const V=i.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;V===r.TextRenderingMode.FILL||V===r.TextRenderingMode.FILL_STROKE?(i.fillColor!==z.fillColor&&i.tspan.setAttributeNS(null,"fill",i.fillColor),i.fillAlpha<1&&i.tspan.setAttributeNS(null,"fill-opacity",i.fillAlpha)):i.tspan.setAttributeNS(null,"fill",i.textRenderingMode===r.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(V===r.TextRenderingMode.STROKE||V===r.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(i.tspan,1/(i.textMatrixScale||1));let X=i.textMatrix;0!==i.textRise&&(X=X.slice(),X[5]+=i.textRise),i.txtElement.setAttributeNS(null,"transform",`${v(X)} scale(${c(T)}, -1)`),i.txtElement.setAttributeNS(R,"xml:space","preserve"),i.txtElement.appendChild(i.tspan),i.txtgrp.appendChild(i.txtElement),this._ensureTransformGroup().appendChild(i.txtElement)}setLeadingMoveText(n,i){this.setLeading(-i),this.moveText(n,i)}addFontStyle(n){if(!n.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));const i=A(n.data,n.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${n.loadedName}"; src: url(${i}); }\n`}setFont(n){const i=this.current,f=this.commonObjs.get(n[0]);let u=n[1];i.font=f,this.embedFonts&&!f.missingFile&&!this.embeddedFonts[f.loadedName]&&(this.addFontStyle(f),this.embeddedFonts[f.loadedName]=f),i.fontMatrix=f.fontMatrix||r.FONT_IDENTITY_MATRIX;let S="normal";f.black?S="900":f.bold&&(S="bold");const x=f.italic?"italic":"normal";u<0?(u=-u,i.fontDirection=-1):i.fontDirection=1,i.fontSize=u,i.fontFamily=f.loadedName,i.fontWeight=S,i.fontStyle=x,i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"y",c(-i.y)),i.xcoords=[],i.ycoords=[]}endText(){const n=this.current;n.textRenderingMode&r.TextRenderingMode.ADD_TO_PATH_FLAG&&n.txtElement?.hasChildNodes()&&(n.element=n.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(n){n>0&&(this.current.lineWidth=n)}setLineCap(n){this.current.lineCap=P[n]}setLineJoin(n){this.current.lineJoin=p[n]}setMiterLimit(n){this.current.miterLimit=n}setStrokeAlpha(n){this.current.strokeAlpha=n}setStrokeRGBColor(n,i,f){this.current.strokeColor=r.Util.makeHexColor(n,i,f)}setFillAlpha(n){this.current.fillAlpha=n}setFillRGBColor(n,i,f){this.current.fillColor=r.Util.makeHexColor(n,i,f),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(n){this.current.strokeColor=this._makeColorN_Pattern(n)}setFillColorN(n){this.current.fillColor=this._makeColorN_Pattern(n)}shadingFill(n){const i=this.viewport.width,f=this.viewport.height,u=r.Util.inverseTransform(this.transformMatrix),S=r.Util.applyTransform([0,0],u),x=r.Util.applyTransform([0,f],u),k=r.Util.applyTransform([i,0],u),l=r.Util.applyTransform([i,f],u),T=Math.min(S[0],x[0],k[0],l[0]),E=Math.min(S[1],x[1],k[1],l[1]),O=Math.max(S[0],x[0],k[0],l[0]),B=Math.max(S[1],x[1],k[1],l[1]),M=this.svgFactory.createElement("svg:rect");M.setAttributeNS(null,"x",T),M.setAttributeNS(null,"y",E),M.setAttributeNS(null,"width",O-T),M.setAttributeNS(null,"height",B-E),M.setAttributeNS(null,"fill",this._makeShadingPattern(n)),this.current.fillAlpha<1&&M.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(M)}_makeColorN_Pattern(n){return"TilingPattern"===n[0]?this._makeTilingPattern(n):this._makeShadingPattern(n)}_makeTilingPattern(n){const i=n[1],f=n[2],u=n[3]||r.IDENTITY_MATRIX,[S,x,k,l]=n[4],T=n[5],E=n[6],O=n[7],B="shading"+g++,[M,I,V,X]=r.Util.normalizeRect([...r.Util.applyTransform([S,x],u),...r.Util.applyTransform([k,l],u)]),[J,w]=r.Util.singularValueDecompose2dScale(u),e=T*J,t=E*w,o=this.svgFactory.createElement("svg:pattern");o.setAttributeNS(null,"id",B),o.setAttributeNS(null,"patternUnits","userSpaceOnUse"),o.setAttributeNS(null,"width",e),o.setAttributeNS(null,"height",t),o.setAttributeNS(null,"x",`${M}`),o.setAttributeNS(null,"y",`${I}`);const b=this.svg,d=this.transformMatrix,y=this.current.fillColor,L=this.current.strokeColor,U=this.svgFactory.create(V-M,X-I);if(this.svg=U,this.transformMatrix=u,2===O){const j=r.Util.makeHexColor(...i);this.current.fillColor=j,this.current.strokeColor=j}return this.executeOpTree(this.convertOpList(f)),this.svg=b,this.transformMatrix=d,this.current.fillColor=y,this.current.strokeColor=L,o.appendChild(U.childNodes[0]),this.defs.appendChild(o),`url(#${B})`}_makeShadingPattern(n){switch("string"==typeof n&&(n=this.objs.get(n)),n[0]){case"RadialAxial":const i="shading"+g++,f=n[3];let u;switch(n[1]){case"axial":const S=n[4],x=n[5];u=this.svgFactory.createElement("svg:linearGradient"),u.setAttributeNS(null,"id",i),u.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),u.setAttributeNS(null,"x1",S[0]),u.setAttributeNS(null,"y1",S[1]),u.setAttributeNS(null,"x2",x[0]),u.setAttributeNS(null,"y2",x[1]);break;case"radial":const k=n[4],l=n[5],T=n[6],E=n[7];u=this.svgFactory.createElement("svg:radialGradient"),u.setAttributeNS(null,"id",i),u.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),u.setAttributeNS(null,"cx",l[0]),u.setAttributeNS(null,"cy",l[1]),u.setAttributeNS(null,"r",E),u.setAttributeNS(null,"fx",k[0]),u.setAttributeNS(null,"fy",k[1]),u.setAttributeNS(null,"fr",T);break;default:throw new Error(`Unknown RadialAxial type: ${n[1]}`)}for(const S of f){const x=this.svgFactory.createElement("svg:stop");x.setAttributeNS(null,"offset",S[0]),x.setAttributeNS(null,"stop-color",S[1]),u.appendChild(x)}return this.defs.appendChild(u),`url(#${i})`;case"Mesh":return(0,r.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${n[0]}`)}}setDash(n,i){this.current.dashArray=n,this.current.dashPhase=i}constructPath(n,i){const f=this.current;let u=f.x,S=f.y,x=[],k=0;for(const l of n)switch(0|l){case r.OPS.rectangle:u=i[k++],S=i[k++];const O=u+i[k++],B=S+i[k++];x.push("M",c(u),c(S),"L",c(O),c(S),"L",c(O),c(B),"L",c(u),c(B),"Z");break;case r.OPS.moveTo:u=i[k++],S=i[k++],x.push("M",c(u),c(S));break;case r.OPS.lineTo:u=i[k++],S=i[k++],x.push("L",c(u),c(S));break;case r.OPS.curveTo:u=i[k+4],S=i[k+5],x.push("C",c(i[k]),c(i[k+1]),c(i[k+2]),c(i[k+3]),c(u),c(S)),k+=6;break;case r.OPS.curveTo2:x.push("C",c(u),c(S),c(i[k]),c(i[k+1]),c(i[k+2]),c(i[k+3])),u=i[k+2],S=i[k+3],k+=4;break;case r.OPS.curveTo3:u=i[k+2],S=i[k+3],x.push("C",c(i[k]),c(i[k+1]),c(u),c(S),c(u),c(S)),k+=4;break;case r.OPS.closePath:x.push("Z")}x=x.join(" "),f.path&&n.length>0&&n[0]!==r.OPS.rectangle&&n[0]!==r.OPS.moveTo?x=f.path.getAttributeNS(null,"d")+x:(f.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(f.path)),f.path.setAttributeNS(null,"d",x),f.path.setAttributeNS(null,"fill","none"),f.element=f.path,f.setCurrentPoint(u,S)}endPath(){const n=this.current;if(n.path=null,!this.pendingClip)return;if(!n.element)return void(this.pendingClip=null);const i="clippath"+h++,f=this.svgFactory.createElement("svg:clipPath");f.setAttributeNS(null,"id",i),f.setAttributeNS(null,"transform",v(this.transformMatrix));const u=n.element.cloneNode(!0);if(u.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,f.appendChild(u),this.defs.appendChild(f),n.activeClipUrl){n.clipGroup=null;for(const S of this.extraStack)S.clipGroup=null;f.setAttributeNS(null,"clip-path",n.activeClipUrl)}n.activeClipUrl=`url(#${i})`,this.tgrp=null}clip(n){this.pendingClip=n}closePath(){const n=this.current;if(n.path){const i=`${n.path.getAttributeNS(null,"d")}Z`;n.path.setAttributeNS(null,"d",i)}}setLeading(n){this.current.leading=-n}setTextRise(n){this.current.textRise=n}setTextRenderingMode(n){this.current.textRenderingMode=n}setHScale(n){this.current.textHScale=n/100}setRenderingIntent(n){}setFlatness(n){}setGState(n){for(const[i,f]of n)switch(i){case"LW":this.setLineWidth(f);break;case"LC":this.setLineCap(f);break;case"LJ":this.setLineJoin(f);break;case"ML":this.setMiterLimit(f);break;case"D":this.setDash(f[0],f[1]);break;case"RI":this.setRenderingIntent(f);break;case"FL":this.setFlatness(f);break;case"Font":this.setFont(f);break;case"CA":this.setStrokeAlpha(f);break;case"ca":this.setFillAlpha(f);break;default:(0,r.warn)(`Unimplemented graphic state operator ${i}`)}}fill(){const n=this.current;n.element&&(n.element.setAttributeNS(null,"fill",n.fillColor),n.element.setAttributeNS(null,"fill-opacity",n.fillAlpha),this.endPath())}stroke(){const n=this.current;n.element&&(this._setStrokeAttributes(n.element),n.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(n,i=1){const f=this.current;let u=f.dashArray;1!==i&&u.length>0&&(u=u.map(function(S){return i*S})),n.setAttributeNS(null,"stroke",f.strokeColor),n.setAttributeNS(null,"stroke-opacity",f.strokeAlpha),n.setAttributeNS(null,"stroke-miterlimit",c(f.miterLimit)),n.setAttributeNS(null,"stroke-linecap",f.lineCap),n.setAttributeNS(null,"stroke-linejoin",f.lineJoin),n.setAttributeNS(null,"stroke-width",c(i*f.lineWidth)+"px"),n.setAttributeNS(null,"stroke-dasharray",u.map(c).join(" ")),n.setAttributeNS(null,"stroke-dashoffset",c(i*f.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x","0"),n.setAttributeNS(null,"y","0"),n.setAttributeNS(null,"width","1px"),n.setAttributeNS(null,"height","1px"),n.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(n)}paintImageXObject(n){const i=n.startsWith("g_")?this.commonObjs.get(n):this.objs.get(n);i?this.paintInlineImageXObject(i):(0,r.warn)(`Dependent image with object ID ${n} is not ready yet`)}paintInlineImageXObject(n,i){const f=n.width,u=n.height,S=C(n,this.forceDataSchema,!!i),x=this.svgFactory.createElement("svg:rect");x.setAttributeNS(null,"x","0"),x.setAttributeNS(null,"y","0"),x.setAttributeNS(null,"width",c(f)),x.setAttributeNS(null,"height",c(u)),this.current.element=x,this.clip("nonzero");const k=this.svgFactory.createElement("svg:image");k.setAttributeNS(s,"xlink:href",S),k.setAttributeNS(null,"x","0"),k.setAttributeNS(null,"y",c(-u)),k.setAttributeNS(null,"width",c(f)+"px"),k.setAttributeNS(null,"height",c(u)+"px"),k.setAttributeNS(null,"transform",`scale(${c(1/f)} ${c(-1/u)})`),i?i.appendChild(k):this._ensureTransformGroup().appendChild(k)}paintImageMaskXObject(n){const i=this.current,f=n.width,u=n.height,S=i.fillColor;i.maskId="mask"+m++;const x=this.svgFactory.createElement("svg:mask");x.setAttributeNS(null,"id",i.maskId);const k=this.svgFactory.createElement("svg:rect");k.setAttributeNS(null,"x","0"),k.setAttributeNS(null,"y","0"),k.setAttributeNS(null,"width",c(f)),k.setAttributeNS(null,"height",c(u)),k.setAttributeNS(null,"fill",S),k.setAttributeNS(null,"mask",`url(#${i.maskId})`),this.defs.appendChild(x),this._ensureTransformGroup().appendChild(k),this.paintInlineImageXObject(n,x)}paintFormXObjectBegin(n,i){if(Array.isArray(n)&&6===n.length&&this.transform(n[0],n[1],n[2],n[3],n[4],n[5]),i){const f=i[2]-i[0],u=i[3]-i[1],S=this.svgFactory.createElement("svg:rect");S.setAttributeNS(null,"x",i[0]),S.setAttributeNS(null,"y",i[1]),S.setAttributeNS(null,"width",c(f)),S.setAttributeNS(null,"height",c(u)),this.current.element=S,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(n){const i=this.svgFactory.create(n.width,n.height),f=this.svgFactory.createElement("svg:defs");i.appendChild(f),this.defs=f;const u=this.svgFactory.createElement("svg:g");return u.setAttributeNS(null,"transform",v(n.transform)),i.appendChild(u),this.svg=u,i}_ensureClipGroup(){if(!this.current.clipGroup){const n=this.svgFactory.createElement("svg:g");n.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(n),this.current.clipGroup=n}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",v(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PDFNodeStream=void 0;var r=D(1),H=D(26);const N=__webpack_require__(22339),W=__webpack_require__(64828),z=__webpack_require__(27915),R=__webpack_require__(25598),s=/^file:\/\/\/[a-zA-Z]:\//;a.PDFNodeStream=class p{constructor(g){this.source=g,this.url=function P(m){const g=R.parse(m);return"file:"===g.protocol||g.host?g:/^[a-z]:[/\\]/i.test(m)?R.parse(`file:///${m}`):(g.host||(g.protocol="file:"),g)}(g.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&g.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new v(this):new _(this),this._fullRequestReader}getRangeReader(g,n){if(n<=this._progressiveDataLength)return null;const i=this.isFsUrl?new h(this,g,n):new c(this,g,n);return this._rangeRequestReaders.push(i),i}cancelAllRequests(g){this._fullRequestReader&&this._fullRequestReader.cancel(g);for(const n of this._rangeRequestReaders.slice(0))n.cancel(g)}};class A{constructor(g){this._url=g.url,this._done=!1,this._storedError=null,this.onProgress=null;const n=g.source;this._contentLength=n.length,this._loaded=0,this._filename=null,this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)(),this._headersCapability=(0,r.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){var g=this;return _asyncToGenerator(function*(){if(yield g._readCapability.promise,g._done)return{value:void 0,done:!0};if(g._storedError)throw g._storedError;const n=g._readableStream.read();return null===n?(g._readCapability=(0,r.createPromiseCapability)(),g.read()):(g._loaded+=n.length,g.onProgress&&g.onProgress({loaded:g._loaded,total:g._contentLength}),{value:new Uint8Array(n).buffer,done:!1})})()}cancel(g){this._readableStream?this._readableStream.destroy(g):this._error(g)}_error(g){this._storedError=g,this._readCapability.resolve()}_setReadableStream(g){this._readableStream=g,g.on("readable",()=>{this._readCapability.resolve()}),g.on("end",()=>{g.destroy(),this._done=!0,this._readCapability.resolve()}),g.on("error",n=>{this._error(n)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class C{constructor(g){this._url=g.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)(),this._isStreamingSupported=!g.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}read(){var g=this;return _asyncToGenerator(function*(){if(yield g._readCapability.promise,g._done)return{value:void 0,done:!0};if(g._storedError)throw g._storedError;const n=g._readableStream.read();return null===n?(g._readCapability=(0,r.createPromiseCapability)(),g.read()):(g._loaded+=n.length,g.onProgress&&g.onProgress({loaded:g._loaded}),{value:new Uint8Array(n).buffer,done:!1})})()}cancel(g){this._readableStream?this._readableStream.destroy(g):this._error(g)}_error(g){this._storedError=g,this._readCapability.resolve()}_setReadableStream(g){this._readableStream=g,g.on("readable",()=>{this._readCapability.resolve()}),g.on("end",()=>{g.destroy(),this._done=!0,this._readCapability.resolve()}),g.on("error",n=>{this._error(n)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function F(m,g){return{protocol:m.protocol,auth:m.auth,host:m.hostname,port:m.port,path:m.path,method:"GET",headers:g}}class _ extends A{constructor(g){super(g);const n=i=>{if(404===i.statusCode){const x=new r.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=x,void this._headersCapability.reject(x)}this._headersCapability.resolve(),this._setReadableStream(i);const f=x=>this._readableStream.headers[x.toLowerCase()],{allowRangeRequests:u,suggestedLength:S}=(0,H.validateRangeRequestCapabilities)({getResponseHeader:f,isHttp:g.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=u,this._contentLength=S||this._contentLength,this._filename=(0,H.extractFilenameFromHeader)(f)};this._request=null,this._request="http:"===this._url.protocol?W.request(F(this._url,g.httpHeaders),n):z.request(F(this._url,g.httpHeaders),n),this._request.on("error",i=>{this._storedError=i,this._headersCapability.reject(i)}),this._request.end()}}class c extends C{constructor(g,n,i){super(g),this._httpHeaders={};for(const u in g.httpHeaders){const S=g.httpHeaders[u];typeof S>"u"||(this._httpHeaders[u]=S)}this._httpHeaders.Range=`bytes=${n}-${i-1}`;const f=u=>{if(404!==u.statusCode)this._setReadableStream(u);else{const S=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=S}};this._request=null,this._request="http:"===this._url.protocol?W.request(F(this._url,this._httpHeaders),f):z.request(F(this._url,this._httpHeaders),f),this._request.on("error",u=>{this._storedError=u}),this._request.end()}}class v extends A{constructor(g){super(g);let n=decodeURIComponent(this._url.path);s.test(this._url.href)&&(n=n.replace(/^\//,"")),N.lstat(n,(i,f)=>{if(i)return"ENOENT"===i.code&&(i=new r.MissingPDFException(`Missing PDF "${n}".`)),this._storedError=i,void this._headersCapability.reject(i);this._contentLength=f.size,this._setReadableStream(N.createReadStream(n)),this._headersCapability.resolve()})}}class h extends C{constructor(g,n,i){super(g);let f=decodeURIComponent(this._url.path);s.test(this._url.href)&&(f=f.replace(/^\//,"")),this._setReadableStream(N.createReadStream(f,{start:n,end:i-1}))}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createResponseStatusError=function R(P,p){return 404===P||0===P&&p.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+p+'".'):new r.UnexpectedResponseException(`Unexpected server response
1(${P}) while retrieving PDF "${p}".`,P)},a.extractFilenameFromHeader=function z(P){const p=P("Content-Disposition");if(p){let A=(0,H.getFilenameFromContentDispositionHeader)(p);if(A.includes("%"))try{A=decodeURIComponent(A)}catch{}if((0,N.isPdfFile)(A))return A}return null},a.validateRangeRequestCapabilities=function W({getResponseHeader:P,isHttp:p,rangeChunkSize:A,disableRange:C}){const F={allowRangeRequests:!1,suggestedLength:void 0},_=parseInt(P("Content-Length"),10);return!Number.isInteger(_)||(F.suggestedLength=_,_<=2*A)||C||!p||"bytes"!==P("Accept-Ranges")||"identity"!==(P("Content-Encoding")||"identity")||(F.allowRangeRequests=!0),F},a.validateResponseStatus=function s(P){return 200===P||206===P};var r=D(1),H=D(27),N=D(5)},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getFilenameFromContentDispositionHeader=function H(N){let W=!0,z=R("filename\\*","i").exec(N);if(z){z=z[1];let _=A(z);return _=unescape(_),_=C(_),_=F(_),P(_)}if(z=function p(_){const c=[];let v;const h=R("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(v=h.exec(_));){let[,g,n,i]=v;if(g=parseInt(g,10),g in c){if(0===g)break}else c[g]=[n,i]}const m=[];for(let g=0;g<c.length&&g in c;++g){let[n,i]=c[g];i=A(i),n&&(i=unescape(i),0===g&&(i=C(i))),m.push(i)}return m.join("")}(N),z)return P(F(z));if(z=R("filename","i").exec(N),z){z=z[1];let _=A(z);return _=F(_),P(_)}function R(_,c){return new RegExp("(?:^|;)\\s*"+_+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',c)}function s(_,c){if(_){if(!/^[\x00-\xFF]+$/.test(c))return c;try{const v=new TextDecoder(_,{fatal:!0}),h=(0,r.stringToBytes)(c);c=v.decode(h),W=!1}catch{}}return c}function P(_){return W&&/[\x80-\xff]/.test(_)&&(_=s("utf-8",_),W&&(_=s("iso-8859-1",_))),_}function A(_){if(_.startsWith('"')){const c=_.slice(1).split('\\"');for(let v=0;v<c.length;++v){const h=c[v].indexOf('"');-1!==h&&(c[v]=c[v].slice(0,h),c.length=v+1),c[v]=c[v].replace(/\\(.)/g,"$1")}_=c.join('"')}return _}function C(_){const c=_.indexOf("'");return-1===c?_:s(_.slice(0,c),_.slice(c+1).replace(/^[^']*'/,""))}function F(_){return!_.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(_)?_:_.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(c,v,h,m){if("q"===h||"Q"===h)return s(v,m=(m=m.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,function(g,n){return String.fromCharCode(parseInt(n,16))}));try{m=atob(m)}catch{}return s(v,m)})}return""};var r=D(1)},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PDFNetworkStream=void 0;var r=D(1),H=D(26);class R{constructor(C,F={}){this.url=C,this.isHttp=/^https?:/i.test(C),this.httpHeaders=this.isHttp&&F.httpHeaders||Object.create(null),this.withCredentials=F.withCredentials||!1,this.getXhr=F.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(C,F,_){const c={begin:C,end:F};for(const v in _)c[v]=_[v];return this.request(c)}requestFull(C){return this.request(C)}request(C){const F=this.getXhr(),_=this.currXhrId++,c=this.pendingRequests[_]={xhr:F};F.open("GET",this.url),F.withCredentials=this.withCredentials;for(const v in this.httpHeaders){const h=this.httpHeaders[v];typeof h>"u"||F.setRequestHeader(v,h)}return this.isHttp&&"begin"in C&&"end"in C?(F.setRequestHeader("Range",`bytes=${C.begin}-${C.end-1}`),c.expectedStatus=206):c.expectedStatus=200,F.responseType="arraybuffer",C.onError&&(F.onerror=function(v){C.onError(F.status)}),F.onreadystatechange=this.onStateChange.bind(this,_),F.onprogress=this.onProgress.bind(this,_),c.onHeadersReceived=C.onHeadersReceived,c.onDone=C.onDone,c.onError=C.onError,c.onProgress=C.onProgress,F.send(null),_}onProgress(C,F){const _=this.pendingRequests[C];_&&_.onProgress?.(F)}onStateChange(C,F){const _=this.pendingRequests[C];if(!_)return;const c=_.xhr;if(c.readyState>=2&&_.onHeadersReceived&&(_.onHeadersReceived(),delete _.onHeadersReceived),4!==c.readyState||!(C in this.pendingRequests))return;if(delete this.pendingRequests[C],0===c.status&&this.isHttp)return void _.onError?.(c.status);const v=c.status||200;if((200!==v||206!==_.expectedStatus)&&v!==_.expectedStatus)return void _.onError?.(c.status);const m=function z(A){const C=A.response;return"string"!=typeof C?C:(0,r.stringToBytes)(C).buffer}(c);if(206===v){const g=c.getResponseHeader("Content-Range"),n=/bytes (\d+)-(\d+)\/(\d+)/.exec(g);_.onDone({begin:parseInt(n[1],10),chunk:m})}else m?_.onDone({begin:0,chunk:m}):_.onError?.(c.status)}getRequestXhr(C){return this.pendingRequests[C].xhr}isPendingRequest(C){return C in this.pendingRequests}
vendor: 9,533 bytes, line 1
1abortRequest(C){const F=this.pendingRequests[C].xhr;delete this.pendingRequests[C],F.abort()}}a.PDFNetworkStream=class s{constructor(C){this._source=C,this._manager=new R(C.url,{httpHeaders:C.httpHeaders,withCredentials:C.withCredentials}),this._rangeChunkSize=C.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(C){const F=this._rangeRequestReaders.indexOf(C);F>=0&&this._rangeRequestReaders.splice(F,1)}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new P(this._manager,this._source),this._fullRequestReader}getRangeReader(C,F){const _=new p(this._manager,C,F);return _.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(_),_}cancelAllRequests(C){this._fullRequestReader?.cancel(C);for(const F of this._rangeRequestReaders.slice(0))F.cancel(C)}};class P{constructor(C,F){this._manager=C;const _={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=F.url,this._fullRequestId=C.requestFull(_),this._headersReceivedCapability=(0,r.createPromiseCapability)(),this._disableRange=F.disableRange||!1,this._contentLength=F.length,this._rangeChunkSize=F.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const C=this._fullRequestId,F=this._manager.getRequestXhr(C),_=h=>F.getResponseHeader(h),{allowRangeRequests:c,suggestedLength:v}=(0,H.validateRangeRequestCapabilities)({getResponseHeader:_,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});c&&(this._isRangeSupported=!0),this._contentLength=v||this._contentLength,this._filename=(0,H.extractFilenameFromHeader)(_),this._isRangeSupported&&this._manager.abortRequest(C),this._headersReceivedCapability.resolve()}_onDone(C){if(C&&(this._requests.length>0?this._requests.shift().resolve({value:C.chunk,done:!1}):this._cachedChunks.push(C.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const F of this._requests)F.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(C){this._storedError=(0,H.createResponseStatusError)(C,this._url),this._headersReceivedCapability.reject(this._storedError);for(const F of this._requests)F.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(C){this.onProgress?.({loaded:C.loaded,total:C.lengthComputable?C.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}read(){var C=this;return _asyncToGenerator(function*(){if(C._storedError)throw C._storedError;if(C._cachedChunks.length>0)return{value:C._cachedChunks.shift(),done:!1};if(C._done)return{value:void 0,done:!0};const F=(0,r.createPromiseCapability)();return C._requests.push(F),F.promise})()}cancel(C){this._done=!0,this._headersReceivedCapability.reject(C);for(const F of this._requests)F.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class p{constructor(C,F,_){this._manager=C;const c={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=C.url,this._requestId=C.requestRange(F,_,c),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(C){const F=C.chunk;this._requests.length>0?this._requests.shift().resolve({value:F,done:!1}):this._queuedChunk=F,this._done=!0;for(const _ of this._requests)_.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(C){this._storedError=(0,H.createResponseStatusError)(C,this._url);for(const F of this._requests)F.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(C){this.isStreamingSupported||this.onProgress?.({loaded:C.loaded})}get isStreamingSupported(){return!1}read(){var C=this;return _asyncToGenerator(function*(){if(C._storedError)throw C._storedError;if(null!==C._queuedChunk){const _=C._queuedChunk;return C._queuedChunk=null,{value:_,done:!1}}if(C._done)return{value:void 0,done:!0};const F=(0,r.createPromiseCapability)();return C._requests.push(F),F.promise})()}cancel(C){this._done=!0;for(const F of this._requests)F.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(te,a,D)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PDFFetchStream=void 0;var r=D(1),H=D(26);function N(P,p,A){return{method:"GET",headers:P,signal:A?.signal,mode:"cors",credentials:p?"include":"same-origin",redirect:"follow"}}function W(P){const p=new Headers;for(const A in P){const C=P[A];typeof C>"u"||p.append(A,C)}return p}a.PDFFetchStream=class z{constructor(p){this.source=p,this.isHttp=/^https?:/i.test(p.url),this.httpHeaders=this.isHttp&&p.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new R(this),this._fullRequestReader}getRangeReader(p,A){if(A<=this._progressiveDataLength)return null;const C=new s(this,p,A);return this._rangeRequestReaders.push(C),C}cancelAllRequests(p){this._fullRequestReader&&this._fullRequestReader.cancel(p);for(const A of this._rangeRequestReaders.slice(0))A.cancel(p)}};class R{constructor(p){this._stream=p,this._reader=null,this._loaded=0,this._filename=null;const A=p.source;this._withCredentials=A.withCredentials||!1,this._contentLength=A.length,this._headersCapability=(0,r.createPromiseCapability)(),this._disableRange=A.disableRange||!1,this._rangeChunkSize=A.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),typeof AbortController<"u"&&(this._abortController=new AbortController),this._isStreamingSupported=!A.disableStream,this._isRangeSupported=!A.disableRange,this._headers=W(this._stream.httpHeaders);const C=A.url;fetch(C,N(this._headers,this._withCredentials,this._abortController)).then(F=>{if(!(0,H.validateResponseStatus)(F.status))throw(0,H.createResponseStatusError)(F.status,C);this._reader=F.body.getReader(),this._headersCapability.resolve();const _=h=>F.headers.get(h),{allowRangeRequests:c,suggestedLength:v}=(0,H.validateRangeRequestCapabilities)({getResponseHeader:_,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=c,this._contentLength=v||this._contentLength,this._filename=(0,H.extractFilenameFromHeader)(_),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new r.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}read(){var p=this;return _asyncToGenerator(function*(){yield p._headersCapability.promise;const{value:A,done:C}=yield p._reader.read();return C?{value:A,done:C}:(p._loaded+=A.byteLength,p.onProgress&&p.onProgress({loaded:p._loaded,total:p._contentLength}),{value:new Uint8Array(A).buffer,done:!1})})()}cancel(p){this._reader&&this._reader.cancel(p),this._abortController&&this._abortController.abort()}}class s{constructor(p,A,C){this._stream=p,this._reader=null,this._loaded=0;const F=p.source;this._withCredentials=F.withCredentials||!1,this._readCapability=(0,r.createPromiseCapability)(),this._isStreamingSupported=!F.disableStream,typeof AbortController<"u"&&(this._abortController=new AbortController),this._headers=W(this._stream.httpHeaders),this._headers.append("Range",`bytes=${A}-${C-1}`);const _=F.url;fetch(_,N(this._headers,this._withCredentials,this._abortController)).then(c=>{if(!(0,H.validateResponseStatus)(c.status))throw(0,H.createResponseStatusError)(c.status,_);this._readCapability.resolve(),this._reader=c.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}read(){var p=this;return _asyncToGenerator(function*(){yield p._readCapability.promise;const{value:A,done:C}=yield p._reader.read();return C?{value:A,done:C}:(p._loaded+=A.byteLength,p.onProgress&&p.onProgress({loaded:p._loaded}),{value:new Uint8Array(A).buffer,done:!1})})()}cancel(p){this._reader&&this._reader.cancel(p),this._abortController&&this._abortController.abort()}}}],__webpack_module_cache__={};function __w_pdfjs_require__(te){var a=__webpack_module_cache__[te];if(void 0!==a)return a.exports;var D=__webpack_module_cache__[te]={exports:{}};return __webpack_modules__[te](D,D.exports,__w_pdfjs_require__),D.exports}var __webpack_exports__={};return(()=>{var te=__webpack_exports__;
1Object.defineProperty(te,"__esModule",{value:!0}),Object.defineProperty(te,"AnnotationLayer",{enumerable:!0,get:function(){return H.AnnotationLayer}}),Object.defineProperty(te,"AnnotationMode",{enumerable:!0,get:function(){return a.AnnotationMode}}),Object.defineProperty(te,"CMapCompressionType",{enumerable:!0,get:function(){return a.CMapCompressionType}}),Object.defineProperty(te,"GlobalWorkerOptions",{enumerable:!0,get:function(){return N.GlobalWorkerOptions}}),Object.defineProperty(te,"InvalidPDFException",{enumerable:!0,get:function(){return a.InvalidPDFException}}),Object.defineProperty(te,"LoopbackPort",{enumerable:!0,get:function(){return D.LoopbackPort}}),Object.defineProperty(te,"MissingPDFException",{enumerable:!0,get:function(){return a.MissingPDFException}}),Object.defineProperty(te,"OPS",{enumerable:!0,get:function(){return a.OPS}}),Object.defineProperty(te,"PDFDataRangeTransport",{enumerable:!0,get:function(){return D.PDFDataRangeTransport}}),Object.defineProperty(te,"PDFDateString",{enumerable:!0,get:function(){return r.PDFDateString}}),Object.defineProperty(te,"PDFWorker",{enumerable:!0,get:function(){return D.PDFWorker}}),Object.defineProperty(te,"PasswordResponses",{enumerable:!0,get:function(){return a.PasswordResponses}}),Object.defineProperty(te,"PermissionFlag",{enumerable:!0,get:function(){return a.PermissionFlag}}),Object.defineProperty(te,"PixelsPerInch",{enumerable:!0,get:function(){return r.PixelsPerInch}}),Object.defineProperty(te,"RenderingCancelledException",{enumerable:!0,get:function(){return r.RenderingCancelledException}}),Object.defineProperty(te,"SVGGraphics",{enumerable:!0,get:function(){return R.SVGGraphics}}),Object.defineProperty(te,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return a.UNSUPPORTED_FEATURES}}),Object.defineProperty(te,"UnexpectedResponseException",{enumerable:!0,get:function(){return a.UnexpectedResponseException}}),Object.defineProperty(te,"Util",{enumerable:!0,get:function(){return a.Util}}),Object.defineProperty(te,"VerbosityLevel",{enumerable:!0,get:function(){return a.VerbosityLevel}}),Object.defineProperty(te,"XfaLayer",{enumerable:!0,get:function(){return s.XfaLayer}}),Object.defineProperty(te,"build",{enumerable:!0,get:function(){return D.build}}),Object.defineProperty(te,"createPromiseCapability",{enumerable:!0,get:function(){return a.createPromiseCapability}}),Object.defineProperty(te,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return a.createValidAbsoluteUrl}}),Object.defineProperty(te,"getDocument",{enumerable:!0,get:function(){return D.getDocument}}),Object.defineProperty(te,"getFilenameFromUrl",{enumerable:!0,get:function(){return r.getFilenameFromUrl}}),Object.defineProperty(te,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return r.getPdfFilenameFromUrl}}),Object.defineProperty(te,"getXfaPageViewport",{enumerable:!0,get:function(){return r.getXfaPageViewport}}),Object.defineProperty(te,"isPdfFile",{enumerable:!0,get:function(){return r.isPdfFile}}),Object.defineProperty(te,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(te,"renderTextLayer",{enumerable:!0,get:function(){return z.renderTextLayer}}),Object.defineProperty(te,"shadow",{enumerable:!0,get:function(){return a.shadow}}),Object.defineProperty(te,"version",{enumerable:!0,get:function(){return D.version}});var a=__w_pdfjs_require__(1),D=__w_pdfjs_require__(4),r=__w_pdfjs_require__(5),H=__w_pdfjs_require__(20),N=__w_pdfjs_require__(13),W=__w_pdfjs_require__(3),z=__w_pdfjs_require__(23),R=__w_pdfjs_require__(24),s=__w_pdfjs_require__(22);if(W.isNodeJS){const{PDFNodeStream:A}=__w_pdfjs_require__(25);(0,D.setPDFNetworkStreamFactory)(C=>new A(C))}else{const{PDFNetworkStream:A}=__w_pdfjs_require__(28),{PDFFetchStream:C}=__w_pdfjs_require__(29);(0,D.setPDFNetworkStreamFactory)(F=>(0,r.isValidFetchUrl)(F.url)?new C(F):new A(F))}})(),__webpack_exports__})(),module.exports=D()},45178:function(te,a,D){var W,r=D(17156).default;W=()=>(()=>{"use strict";var H=[,(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DefaultXfaLayerFactory=s.DefaultTextLayerFactory=s.DefaultStructTreeLayerFactory=s.DefaultAnnotationLayerFactory=void 0;var p=P(2),A=P(4),C=P(5),F=P(7),_=P(8),c=P(9);s.DefaultAnnotationLayerFactory=class v{createAnnotationLayerBuilder(i,f,u=null,S="",x=!0,k=A.NullL10n,l=!1,T=null,E=null,O=null,B=null){return new p.AnnotationLayerBuilder({pageDiv:i,pdfPage:f,imageResourcesPath:S,renderForms:x,linkService:new C.SimpleLinkService,l10n:k,annotationStorage:u,enableScripting:l,hasJSActionsProm
1ise:T,fieldObjectsPromise:O,mouseState:E,annotationCanvasMap:B})}},s.DefaultStructTreeLayerFactory=class h{createStructTreeLayerBuilder(i){return new F.StructTreeLayerBuilder({pdfPage:i})}},s.DefaultTextLayerFactory=class m{createTextLayerBuilder(i,f,u,S=!1,x,k){return new _.TextLayerBuilder({textLayerDiv:i,pageIndex:f,viewport:u,enhanceTextSelection:S,eventBus:x,highlighter:k})}},s.DefaultXfaLayerFactory=class g{createXfaLayerBuilder(i,f,u=null,S=null){return new c.XfaLayerBuilder({pageDiv:i,pdfPage:f,annotationStorage:u,linkService:new C.SimpleLinkService,xfaHtml:S})}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.AnnotationLayerBuilder=void 0;var p=P(3),A=P(4);s.AnnotationLayerBuilder=class C{constructor({pageDiv:_,pdfPage:c,linkService:v,downloadManager:h,annotationStorage:m=null,imageResourcesPath:g="",renderForms:n=!0,l10n:i=A.NullL10n,enableScripting:f=!1,hasJSActionsPromise:u=null,fieldObjectsPromise:S=null,mouseState:x=null,annotationCanvasMap:k=null}){this.pageDiv=_,this.pdfPage=c,this.linkService=v,this.downloadManager=h,this.imageResourcesPath=g,this.renderForms=n,this.l10n=i,this.annotationStorage=m,this.enableScripting=f,this._hasJSActionsPromise=u,this._fieldObjectsPromise=S,this._mouseState=x,this._annotationCanvasMap=k,this.div=null,this._cancelled=!1}render(_,c="display"){var v=this;return r(function*(){const[h,m=!1,g=null]=yield Promise.all([v.pdfPage.getAnnotations({intent:c}),v._hasJSActionsPromise,v._fieldObjectsPromise]);if(v._cancelled||0===h.length)return;const n={viewport:_.clone({dontFlip:!0}),div:v.div,annotations:h,page:v.pdfPage,imageResourcesPath:v.imageResourcesPath,renderForms:v.renderForms,linkService:v.linkService,downloadManager:v.downloadManager,annotationStorage:v.annotationStorage,enableScripting:v.enableScripting,hasJSActions:m,fieldObjects:g,mouseState:v._mouseState,annotationCanvasMap:v._annotationCanvasMap};v.div?p.AnnotationLayer.update(n):(v.div=document.createElement("div"),v.div.className="annotationLayer",v.pageDiv.appendChild(v.div),n.div=v.div,p.AnnotationLayer.render(n),v.l10n.translate(v.div))})()}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}},R=>{let s;s=typeof window<"u"&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:D(85943),R.exports=s},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.NullL10n=void 0,s.fixupLangCode=function C(c){return A[c?.toLowerCase()]||c},s.getL10nFallback=p;const P={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} \xd7 {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} \xd7 {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",print_progress_percent:"{{progress}}%","toggle_sidebar.title":"Toggle Sidebar","toggle_sidebar_notification2.title":"Toggle Sidebar (document contains outline/attachments/layers)",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",error_version_info:"PDF.js v{{version}} (build: {{build}})",error_message:"Message: {{message}}",error_stack:"Stack: {{stack}}",error_file:"File: {{file}}",error_line:"Line: {{line}}",rendering_error:"An error occurred while rendering the page.",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading:"Loading\u2026",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts."};function p(c,v){switch(c){case"find_match_count":c=`find_match_count[${1===v.total?"one":"other"}]`;break;case"find_match_count_limit":c=`find_match_count_limit[${1===v.limit?"one"
1:"other"}]`}return P[c]||""}const A={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};s.NullL10n={getLanguage:()=>r(function*(){return"en-us"})(),getDirection:()=>r(function*(){return"ltr"})(),get:(c,v=null,h=p(c,v))=>r(function*(){return function F(c,v){return v?c.replace(/\{\{\s*(\w+)\s*\}\}/g,(h,m)=>m in v?v[m]:"{{"+m+"}}"):c}(h,v)})(),translate:c=>r(function*(){})()}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SimpleLinkService=s.PDFLinkService=s.LinkTarget=void 0;var p=P(6);const A="noopener noreferrer nofollow",C={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function F(v,{url:h,target:m,rel:g,enabled:n=!0}={}){if(!h||"string"!=typeof h)throw new Error('A valid "url" parameter must provided.');const i=(0,p.removeNullCharacters)(h);n?v.href=v.title=i:(v.href="",v.title=`Disabled: ${i}`,v.onclick=()=>!1);let f="";switch(m){case C.NONE:break;case C.SELF:f="_self";break;case C.BLANK:f="_blank";break;case C.PARENT:f="_parent";break;case C.TOP:f="_top"}v.target=f,v.rel="string"==typeof g?g:A}s.LinkTarget=C;class _{#e=new Map;constructor({eventBus:h,externalLinkTarget:m=null,externalLinkRel:g=null,ignoreDestinationZoom:n=!1}={}){this.eventBus=h,this.externalLinkTarget=m,this.externalLinkRel=g,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=n,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null}setDocument(h,m=null){this.baseUrl=m,this.pdfDocument=h,this.#e.clear()}setViewer(h){this.pdfViewer=h}setHistory(h){this.pdfHistory=h}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(h){this.pdfViewer.currentPageNumber=h}get rotation(){return this.pdfViewer.pagesRotation}set rotation(h){this.pdfViewer.pagesRotation=h}#t(h,m=null,g){const n=g[0];let i;if("object"==typeof n&&null!==n){if(i=this._cachedPageNumber(n),!i)return void this.pdfDocument.getPageIndex(n).then(f=>{this.cachePageRef(f+1,n),this.#t(h,m,g)}).catch(()=>{console.error(`PDFLinkService.#goToDestinationHelper: "${n}" is not a valid page reference, for dest="${h}".`)})}else{if(!Number.isInteger(n))return void console.error(`PDFLinkService.#goToDestinationHelper: "${n}" is not a valid destination reference, for dest="${h}".`);i=n+1}!i||i<1||i>this.pagesCount?console.error(`PDFLinkService.#goToDestinationHelper: "${i}" is not a valid page number, for dest="${h}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:m,explicitDest:g,pageNumber:i})),this.pdfViewer.scrollPageIntoView({pageNumber:i,destArray:g,ignoreDestinationZoom:this._ignoreDestinationZoom}))}goToDestination(h){var m=this;return r(function*(){if(!m.pdfDocument)return;let g,n;"string"==typeof h?(g=h,n=yield m.pdfDocument.getDestination(h)):(g=null,n=yield h),Array.isArray(n)?m.#t(h,g,n):console.error(`PDFLinkService.goToDestination: "${n}" is not a valid destination array, for dest="${h}".`)})()}
vendor: 99,148 bytes, line 1
1goToPage(h){if(!this.pdfDocument)return;const m="string"==typeof h&&this.pdfViewer.pageLabelToPageNumber(h)||0|h;Number.isInteger(m)&&m>0&&m<=this.pagesCount?(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.pushPage(m)),this.pdfViewer.scrollPageIntoView({pageNumber:m})):console.error(`PDFLinkService.goToPage: "${h}" is not a valid page.`)}addLinkAttributes(h,m,g=!1){F(h,{url:m,target:g?C.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}getDestinationHash(h){if("string"==typeof h){if(h.length>0)return this.getAnchorUrl("#"+escape(h))}else if(Array.isArray(h)){const m=JSON.stringify(h);if(m.length>0)return this.getAnchorUrl("#"+escape(m))}return this.getAnchorUrl("")}getAnchorUrl(h){return(this.baseUrl||"")+h}setHash(h){if(!this.pdfDocument)return;let m,g;if(h.includes("=")){const n=(0,p.parseQueryString)(h);if(n.has("search")&&this.eventBus.dispatch("findfromurlhash",{source:this,query:n.get("search").replace(/"/g,""),phraseSearch:"true"===n.get("phrase")}),n.has("page")&&(m=0|n.get("page")||1),n.has("zoom")){const i=n.get("zoom").split(","),f=i[0],u=parseFloat(f);f.includes("Fit")?"Fit"===f||"FitB"===f?g=[null,{name:f}]:"FitH"===f||"FitBH"===f||"FitV"===f||"FitBV"===f?g=[null,{name:f},i.length>1?0|i[1]:null]:"FitR"===f?5!==i.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):g=[null,{name:f},0|i[1],0|i[2],0|i[3],0|i[4]]:console.error(`PDFLinkService.setHash: "${f}" is not a valid zoom value.`):g=[null,{name:"XYZ"},i.length>1?0|i[1]:null,i.length>2?0|i[2]:null,u?u/100:f]}g?this.pdfViewer.scrollPageIntoView({pageNumber:m||this.page,destArray:g,allowNegativeOffset:!0}):m&&(this.page=m),n.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:n.get("pagemode")}),n.has("nameddest")&&this.goToDestination(n.get("nameddest"))}else{g=unescape(h);try{g=JSON.parse(g),Array.isArray(g)||(g=g.toString())}catch{}if("string"==typeof g||_.#n(g))return void this.goToDestination(g);console.error(`PDFLinkService.setHash: "${unescape(h)}" is not a valid destination.`)}}executeNamedAction(h){switch(h){case"GoBack":this.pdfHistory?.back();break;case"GoForward":this.pdfHistory?.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:h})}cachePageRef(h,m){m&&this.#e.set(0===m.gen?`${m.num}R`:`${m.num}R${m.gen}`,h)}_cachedPageNumber(h){return h&&this.#e.get(0===h.gen?`${h.num}R`:`${h.num}R${h.gen}`)||null}isPageVisible(h){return this.pdfViewer.isPageVisible(h)}isPageCached(h){return this.pdfViewer.isPageCached(h)}static#n(h){if(!Array.isArray(h))return!1;const m=h.length;if(m<2)return!1;const g=h[0];if(!("object"==typeof g&&Number.isInteger(g.num)&&Number.isInteger(g.gen)||Number.isInteger(g)&&g>=0))return!1;const n=h[1];if("object"!=typeof n||"string"!=typeof n.name)return!1;let i=!0;switch(n.name){case"XYZ":if(5!==m)return!1;break;case"Fit":case"FitB":return 2===m;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==m)return!1;break;case"FitR":if(6!==m)return!1;i=!1;break;default:return!1}for(let f=2;f<m;f++){const u=h[f];if(!("number"==typeof u||i&&null===u))return!1}return!0}}s.PDFLinkService=_,s.SimpleLinkService=class c{constructor(){this.externalLinkEnabled=!0}get pagesCount(){return 0}get page(){return 0}set page(h){}get rotation(){return 0}set rotation(h){}goToDestination(h){return r(function*(){})()}goToPage(h){}addLinkAttributes(h,m,g=!1){F(h,{url:m,enabled:this.externalLinkEnabled})}getDestinationHash(h){return"#"}getAnchorUrl(h){return"#"}setHash(h){}executeNamedAction(h){}cachePageRef(h,m){}isPageVisible(h){return!0}isPageCached(h){return!0}}},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.animationStarted=s.VERTICAL_PADDING=s.UNKNOWN_SCALE=s.TextLayerMode=s.SpreadMode=s.SidebarView=s.ScrollMode=s.SCROLLBAR_PADDING=s.RenderingStates=s.RendererType=s.ProgressBar=s.PresentationModeState=s.OutputScale=s.MIN_SCALE=s.MAX_SCALE=s.MAX_AUTO_SCALE=s.DEFAULT_SCALE_VALUE=s.DEFAULT_SCALE_DELTA=s.DEFAULT_SCALE=s.AutoPrintRegExp=void 0,s.apiPageLayoutToViewerModes=function ie(Q){let Z=u.VERTICAL,ae=S.NONE;switch(Q){case"SinglePage":Z=u.PAGE;break;case"OneColumn":break;case"TwoPageLeft":Z=u.PAGE;case"TwoColumnLeft":ae=S.ODD;break;case"TwoPageRight":Z=u.PAGE;case"TwoColumnRight":ae=S.EVEN}return{scrollMode:Z,spreadMode:ae}},s.apiPageModeToSidebarView=function se(Q){switch(Q){case"UseNone":return n.NONE;case"UseThumbs":return n.THUMBS;case"UseOutlines":return n.OUTLINE;case"UseAttachments":return n.ATTACHMENTS;case"UseOC":return n.LAYERS}return n.NONE},s.approximateFraction=function V(Q){if(Math.floor(Q)===Q)return[Q,1];const Z=1/Q;if(Z>8)return[1,8];if(Math.floor(Z)===Z)return[1,Z];const re=Q>1?Z:Q;let pe,ne=0,ce=1,he=1,oe=1;for(;;){const _e=ne+he,de=ce+oe;if(de>8)break;re<=_e/de?(he=_e,oe=de):(ne=_e,ce=de)}return pe=re-ne/ce<he/oe-re?re===Q?[ne,ce]:[ce,ne]:re===Q?[he,oe]:[oe,he],pe},s.backtrackBeforeAllVisibleElements=w,s.binarySearchFirstItem=I,s.getActiveOrFocusedElement=function K(){let Q=document,Z=Q.activeElement||Q.querySelector(":focus");for(;Z?.shadowRoot;)Q=Z.shadowRoot,Z=Q.activeElement||Q.querySelector(":focus");return Z},s.getPageSizeInches=function J({view:Q,userUnit:Z,rotate:ae}){const[re,ne,ce,he]=Q,oe=ae%180!=0,pe=(ce-re)/72*Z,_e=(he-ne)/72*Z;return{width:oe?_e:pe,height:oe?pe:_e}},s.getVisibleElements=function e({scrollEl:Q,views:Z,sortByVisibility:ae=!1,horizontal:re=!1,rtl:ne=!1}){const ce=Q.scrollTop,he=ce+Q.clientHeight,oe=Q.scrollLeft,pe=oe+Q.clientWidth,me=[],ve=new Set,Se=Z.length;let be=I(Z,re?function de(Y){const le=Y.div,ue=le.offsetLeft+le.clientLeft;return ne?ue<pe:ue+le.clientWidth>oe}:function _e(Y){const le=Y.div;return le.offsetTop+le.clientTop+le.clientHeight>ce});be>0&&be<Se&&!re&&(be=w(be,Z,ce));let we=re?pe:-1;for(let Y=be;Y<Se;Y++){const le=Z[Y],ue=le.div,fe=ue.offsetLeft+ue.clientLeft,ge=ue.offsetTop+ue.clientTop,Ce=ue.clientWidth,xe=ue.clientHeight,Ee=fe+Ce,ye=ge+xe;if(-1===we)ye>=he&&(we=ye);else if((re?fe:ge)>we)break;if(ye<=ce||ge>=he||Ee<=oe||fe>=pe)continue;const Me=Math.max(0,ce-ge)+Math.max(0,ye-he),Ae=(Ce-(Math.max(0,oe-fe)+Math.max(0,Ee-pe)))/Ce;me.push({id:le.id,x:fe,y:ge,view:le,percent:(xe-Me)/xe*Ae*100|0,widthPercent:100*Ae|0}),ve.add(le.id)}const ee=me[0],$=me[me.length-1];return ae&&me.sort(function(Y,le){const ue=Y.percent-le.percent;return Math.abs(ue)>.001?-ue:Y.id-le.id}),{first:ee,last:$,views:me,ids:ve}},s.isPortraitOrientation=function U(Q){return Q.width<=Q.height},s.isValidRotation=function d(Q){return Number.isInteger(Q)&&Q%90==0},s.isValidScrollMode=function y(Q){return Number.isInteger(Q)&&Object.values(u).includes(Q)&&Q!==u.UNKNOWN},s.isValidSpreadMode=function L(Q){return Number.isInteger(Q)&&Object.values(S).includes(Q)&&Q!==S.UNKNOWN},s.noContextMenuHandler=function t(Q){Q.preventDefault()},s.normalizeWheelEventDelta=function b(Q){let Z=o(Q);return 0===Q.deltaMode?Z/=900:1===Q.deltaMode&&(Z/=30),Z},s.normalizeWheelEventDirection=o,s.parseQueryString=function E(Q){const Z=new Map;for(const[ae,re]of new URLSearchParams(Q))Z.set(ae.toLowerCase(),re);return Z},s.removeNullCharacters=function M(Q,Z=!1){return"string"!=typeof Q?(console.error("The argument must be a string."),Q):(Z&&(Q=Q.replace(B," ")),Q.replace(O,""))},s.roundToDivide=function X(Q,Z){const ae=Q%Z;return 0===ae?Q:Math.round(Q-ae+Z)},s.scrollIntoView=function l(Q,Z,ae=!1){let re=Q.offsetParent;if(!re)return void console.error("offsetParent is not set -- cannot scroll");let ne=Q.offsetTop+Q.clientTop,ce=Q.offsetLeft+Q.clientLeft;for(;re.clientHeight===re.scrollHeight&&re.clientWidth===re.scrollWidth||ae&&(re.classList.contains("markedContent")||"hidden"===getComputedStyle(re).overflow);)if(ne+=re.offsetTop,ce+=re.offsetLeft,re=re.offsetParent,!re)return;Z&&(void 0!==Z.top&&(ne+=Z.top),void 0!==Z.left&&(ce+=Z.left,re.scrollLeft=ce)),re.scrollTop=ne},s.watchScroll=function T(Q,Z){const ae=function(ce){ne||(ne=window.requestAnimationFrame(function(){ne=null;const oe=Q.scrollLeft,pe=re.lastX;oe!==pe&&(re.right=oe>pe),re.lastX=oe;const _e=Q.scrollTop,de=re.lastY;_e!==de&&(re.down=_e>de),re.lastY=_e,Z(re)}))},re={right:!0,down:!0,lastX:Q.scrollLeft,lastY:Q.scrollTop,_eventHandler:ae};let ne=null;return Q.addEventListener("scroll",ae,!0),re},s.DEFAULT_SCALE_VALUE="auto",s.DEFAULT_SCALE=1,s.DEFAULT_SCALE_DELTA=1.1,s.MIN_SCALE=.1,s.MAX_SCALE=10,s.UNKNOWN_SCALE=0,s.MAX_AUTO_SCALE=1.25,s.SCROLLBAR_PADDING=40,s.VERTICAL_PADDING=5,s.RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},s.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};const n={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4};s.SidebarView=n,s.RendererType={CANVAS:"canvas",SVG:"svg"},s.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};const u={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3};s.ScrollMode=u;const S={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};s.SpreadMode=S,s.AutoPrintRegExp=/\bprint\s*\(/,s.OutputScale=class k{constructor(){const Z=window.devicePixelRatio||1;this.sx=Z,this.sy=Z}get scaled(){return 1!==this.sx||1!==this.sy}};const O=/\x00/g,B=/[\x01-\x1F]/g;function I(Q,Z,ae=0){let re=ae,ne=Q.length-1;if(ne<0||!Z(Q[ne]))return Q.length;if(Z(Q[re]))return re;for(;re<ne;){const ce=re+ne>>1;Z(Q[ce])?ne=ce:re=ce+1}return re}function w(Q,Z,ae){if(Q<2)return Q;let re=Z[Q].div,ne=re.offsetTop+re.clientTop;ne>=ae&&(re=Z[Q-1].div,ne=re.offsetTop+re.clientTop);for(let ce=Q-2;ce>=0&&(re=Z[ce].div,!(re.offsetTop+re.clientTop+re.clientHeight<=ne));--ce)Q=ce;return Q}function o(Q){let Z=Math.hypot(Q.deltaX,Q.deltaY);const ae=Math.atan2(Q.deltaY,Q.deltaX);return-.25*Math.PI<ae&&ae<.75*Math.PI&&(Z=-Z),Z}const j=new Promise(function(Q){window.requestAnimationFrame(Q)});s.animationStarted=j,s.ProgressBar=class q{constructor(Z){if(arguments.length>1)throw new Error("ProgressBar no longer accepts any additional options, please use CSS rules to modify its appearance instead.");this.visible=!0,this.div=document.querySelector(Z+" .progress"),this.bar=this.div.parentNode,this.percent=0}#e(){this._indeterminate?this.div.classList.add("indeterminate"):(this.div.classList.remove("indeterminate"),document.documentElement.style.setProperty("--progressBar-percent",`${this._percent}%`))}get percent(){return this._percent}set percent(Z){this._indeterminate=isNaN(Z),this._percent=function G(Q,Z,ae){return Math.min(Math.max(Q,Z),ae)}(Z,0,100),this.#e()}setWidth(Z){if(!Z)return;const re=Z.parentNode.offsetWidth-Z.offsetWidth;re>0&&document.documentElement.style.setProperty("--progressBar-end-offset",`${re}px`)}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"))}show(){this.visible||(this.visible=!0,this.bar.classList.remove("hidden"))}}},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.StructTreeLayerBuilder=void 0;const P={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},p=/^H(\d+)$/;s.StructTreeLayerBuilder=class A{constructor({pdfPage:F}){this.pdfPage=F}render(F){return this._walk(F)}_setAttributes(F,_){void 0!==F.alt&&_.setAttribute("aria-label",F.alt),void 0!==F.id&&_.setAttribute("aria-owns",F.id),void 0!==F.lang&&_.setAttribute("lang",F.lang)}_walk(F){if(!F)return null;const _=document.createElement("span");if("role"in F){const{role:c}=F,v=c.match(p);v?(_.setAttribute("role","heading"),_.setAttribute("aria-level",v[1])):P[c]&&_.setAttribute("role",P[c])}if(this._setAttributes(F,_),F.children)if(1===F.children.length&&"id"in F.children[0])this._setAttributes(F.children[0],_);else for(const c of F.children)_.appendChild(this._walk(c));return _}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TextLayerBuilder=void 0;var p=P(3);s.TextLayerBuilder=class C{constructor({textLayerDiv:_,eventBus:c,pageIndex:v,viewport:h,highlighter:m=null,enhanceTextSelection:g=!1}){this.textLayerDiv=_,this.eventBus=c,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageNumber=v+1,this.viewport=h,this.textDivs=[],this.textLayerRenderTask=null,this.highlighter=m,this.enhanceTextSelection=g,this._bindMouse()}_finishRendering(){if(this.renderingDone=!0,!this.enhanceTextSelection){const _=document.createElement("div");_.className="endOfContent",this.textLayerDiv.appendChild(_)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(_=0){if(!this.textContent&&!this.textContentStream||this.renderingDone)return;this.cancel(),this.textDivs.length=0,this.highlighter?.setTextMapping(this.textDivs,this.textContentItemsStr);const c=document.createDocumentFragment();this.textLayerRenderTask=(0,p.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:c,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:_,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then(()=>{this.textLayerDiv.appendChild(c),this._finishRendering(),this.highlighter?.enable()},function(v){})}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this.highlighter?.disable()}setTextContentStream(_){this.cancel(),this.textContentStream=_}setTextContent(_){this.cancel(),this.textContent=_}_bindMouse(){const _=this.textLayerDiv;let c=null;_.addEventListener("mousedown",v=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return this.textLayerRenderTask.expandTextDivs(!0),void(c&&(clearTimeout(c),c=null));const h=_.querySelector(".endOfContent");if(!h)return;let m=v.target!==_;if(m=m&&"none"!==window.getComputedStyle(h).getPropertyValue("-moz-user-select"),m){const g=_.getBoundingClientRect(),n=Math.max(0,(v.pageY-g.top)/g.height);h.style.top=(100*n).toFixed(2)+"%"}h.classList.add("active")}),_.addEventListener("mouseup",()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return void(c=setTimeout(()=>{this.textLayerRenderTask&&this.textLayerRenderTask.expandTextDivs(!1),c=null},300));const v=_.querySelector(".endOfContent");v&&(v.style.top="",v.classList.remove("active"))})}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.XfaLayerBuilder=void 0;var p=P(3);s.XfaLayerBuilder=class A{constructor({pageDiv:F,pdfPage:_,annotationStorage:c=null,linkService:v,xfaHtml:h=null}){this.pageDiv=F,this.pdfPage=_,this.annotationStorage=c,this.linkService=v,this.xfaHtml=h,this.div=null,this._cancelled=!1}render(F,_="display"){if("print"===_){const c={viewport:F.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:_},v=document.createElement("div");this.pageDiv.appendChild(v),c.div=v;const h=p.XfaLayer.render(c);return Promise.resolve(h)}return this.pdfPage.getXfa().then(c=>{if(this._cancelled||!c)return{textDivs:[]};const v={viewport:F.clone({dontFlip:!0}),div:this.div,xfaHtml:c,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:_};return this.div?p.XfaLayer.update(v):(this.div=document.createElement("div"),this.pageDiv.appendChild(this.div),v.div=this.div,p.XfaLayer.render(v))}).catch(c=>{console.error(c)})}cancel(){this._cancelled=!0}hide(){this.div&&(this.div.hidden=!0)}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PDFViewer=s.PDFSinglePageViewer=void 0;var p=P(6),A=P(11);s.PDFViewer=class C extends A.BaseViewer{},s.PDFSinglePageViewer=class F extends A.BaseViewer{_resetView(){super._resetView(),this._scrollMode=p.ScrollMode.PAGE,this._spreadMode=p.SpreadMode.NONE}set scrollMode(c){}_updateScrollMode(){}set spreadMode(c){}_updateSpreadMode(){}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PagesCountLimit=s.PDFPageViewBuffer=s.BaseViewer=void 0;var p=P(3),A=P(6),C=P(2),F=P(4),_=P(12),c=P(14),v=P(5),h=P(7),m=P(15),g=P(8),n=P(9);const f="enablePermissions",u={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};s.PagesCountLimit=u;class S{#e=new Set;#t=0;constructor(l){this.#t=l}push(l){const T=this.#e;T.has(l)&&T.delete(l),T.add(l),T.size>this.#t&&this.#n()}resize(l,T=null){this.#t=l;const E=this.#e;if(T){const O=E.size;let B=1;for(const M of E)if(T.has(M.id)&&(E.delete(M),E.add(M)),++B>O)break}for(;E.size>this.#t;)this.#n()}has(l){return this.#e.has(l)}[Symbol.iterator](){return this.#e.keys()}#n(){const l=this.#e.keys().next().value;l?.destroy(),this.#e.delete(l)}}s.PDFPageViewBuffer=S;class x{#e=null;#t=p.AnnotationMode.ENABLE_FORMS;#n=null;#r=!1;#h=0;#l=null;#i=null;constructor(l){if(this.constructor===x)throw new Error("Cannot initialize BaseViewer.");const T="2.14.305";if(p.version!==T)throw new Error(`The API version "${p.version}" does not match the Viewer version "${T}".`);if(this.container=l.container,this.viewer=l.viewer||l.container.firstElementChild,"DIV"!==this.container?.tagName.toUpperCase()||"DIV"!==this.viewer?.tagName.toUpperCase())throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&"absolute"!==getComputedStyle(this.container).position)throw new Error("The `container` must be absolutely positioned.");this.eventBus=l.eventBus,this.linkService=l.linkService||new v.SimpleLinkService,this.downloadManager=l.downloadManager||null,this.findController=l.findController||null,this._scriptingManager=l.scriptingManager||null,this.removePageBorders=l.removePageBorders||!1,this.textLayerMode=l.textLayerMode??A.TextLayerMode.ENABLE,this.#t=l.annotationMode??p.AnnotationMode.ENABLE_FORMS,this.imageResourcesPath=l.imageResourcesPath||"",this.enablePrintAutoRotate=l.enablePrintAutoRotate||!1,this.renderer=l.renderer||A.RendererType.CANVAS,this.useOnlyCssZoom=l.useOnlyCssZoom||!1,this.maxCanvasPixels=l.maxCanvasPixels,this.l10n=l.l10n||F.NullL10n,this.#r=l.enablePermissions||!1,this.pageColors=l.pageColors||null,l.pageColors&&(!CSS.supports("color",l.pageColors.background)||!CSS.supports("color",l.pageColors.foreground))&&((l.pageColors.background||l.pageColors.foreground)&&console.warn("Ignoring `pageColors`-option, since the browser doesn't support the values used."),this.pageColors=null),this.defaultRenderingQueue=!l.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new c.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=l.renderingQueue,this._doc=document.documentElement,this.scroll=(0,A.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=A.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),this.updateContainerHeightCss(),Promise.resolve().then(()=>{this.eventBus.dispatch("baseviewerinit",{source:this})})}get pagesCount(){return this._pages.length}getPageView(l){return this._pages[l]}get pageViewsReady(){return!!this._pagesCapability.settled&&this._pages.every(function(l){return l?.pdfPage})}get renderForms(){return this.#t===p.AnnotationMode.ENABLE_FORMS}get enableScripting(){return!!this._scriptingManager}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(l){if(!Number.isInteger(l))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(l,!0)||console.error(`currentPageNumber: "${l}" is not a valid page.`))}_setCurrentPageNumber(l,T=!1){if(this._currentPageNumber===l)return T&&this.#u(),!0;if(!(0<l&&l<=this.pagesCount))return!1;const E=this._currentPageNumber;return this._currentPageNumber=l,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:l,pageLabel:this._pageLabels?.[l-1]??null,previous:E}),T&&this.#u(),!0}get currentPageLabel(){return this._pageLabels?.[this._currentPageNumber-1]??null}set currentPageLabel(l){if(!this.pdfDocument)return;let T=0|l;if(this._pageLabels){const E=this._pageLabels.indexOf(l);E>=0&&(T=E+1)}this._setCurrentPageNumber(T,!0)||console.error(`currentPageLabel: "${l}" is not a valid page.`)}get currentScale(){return this._currentScale!==A.UNKNOWN_SCALE?this._currentScale:A.DEFAULT_SCALE}set currentScale(l){if(isNaN(l))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(l,!1)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(l){this.pdfDocument&&this._setScale(l,!1)}get pagesRotation(){return this._pagesRotation}set pagesRotation(l){if(!(0,A.isValidRotation)(l))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument||((l%=360)<0&&(l+=360),this._pagesRotation===l))return;this._pagesRotation=l;const T=this._currentPageNumber,E={rotation:l};for(const O of this._pages)O.update(E);this._currentScaleValue&&this._setScale(this._currentScaleValue,!0),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:l,pageNumber:T}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}#g(l){l&&(l.includes(p.PermissionFlag.COPY)||this.viewer.classList.add(f),!l.includes(p.PermissionFlag.MODIFY_ANNOTATIONS)&&!l.includes(p.PermissionFlag.FILL_INTERACTIVE_FORMS)&&this.#t===p.AnnotationMode.ENABLE_FORMS&&(this.#n=this.#t,this.#t=p.AnnotationMode.ENABLE))}#_(){if("hidden"===document.visibilityState||!this.container.offsetParent||0===this._getVisiblePages().views.length)return Promise.resolve();const l=new Promise(T=>{this.#i=()=>{"hidden"===document.visibilityState&&(T(),document.removeEventListener("visibilitychange",this.#i),this.#i=null)},document.addEventListener("visibilitychange",this.#i)});return Promise.race([this._onePageRenderedCapability.promise,l])}setDocument(l){var T=this;if(this.pdfDocument&&(this.eventBus.dispatch("pagesdestroy",{source:this}),this._cancelRendering(),this._resetView(),this.findController&&this.findController.setDocument(null),this._scriptingManager&&this._scriptingManager.setDocument(null)),this.pdfDocument=l,!l)return;const E=l.isPureXfa,O=l.numPages,B=l.getPage(1),M=l.getOptionalContentConfig(),I=this.#r?l.getPermissions():Promise.resolve();if(O>u.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");const V=this._scrollMode=A.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:V})}this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:O})},()=>{}),this._onBeforeDraw=V=>{const X=this._pages[V.pageNumber-1];X&&this.#e.push(X)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=V=>{V.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve({timestamp:V.timestamp}),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null,this.#i&&(document.removeEventListener("visibilitychange",this.#i),this.#i=null))},this.eventBus._on("pagerendered",this._onAfterDraw),Promise.all([B,I]).then(([V,X])=>{if(l!==this.pdfDocument)return;this._firstPageCapability.resolve(V),this._optionalContentConfigPromise=M,this.#g(X);const J=this._scrollMode===A.ScrollMode.PAGE?null:this.viewer,w=this.currentScale,e=V.getViewport({scale:w*p.PixelsPerInch.PDF_TO_CSS_UNITS}),t=this.textLayerMode===A.TextLayerMode.DISABLE||E?null:this,o=this.#t!==p.AnnotationMode.DISABLE?this:null,b=E?this:null;for(let y=1;y<=O;++y){const L=new _.PDFPageView({container:J,eventBus:this.eventBus,id:y,scale:w,defaultViewport:e.clone(),optionalContentConfigPromise:M,renderingQueue:this.renderingQueue,textLayerFactory:t,textLayerMode:this.textLayerMode,annotationLayerFactory:o,annotationMode:this.#t,xfaLayerFactory:b,textHighlighterFactory:this,structTreeLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderer:this.renderer,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,pageColors:this.pageColors,l10n:this.l10n});this._pages.push(L)}const d=this._pages[0];d&&(d.setPdfPage(V),this.linkService.cachePageRef(1,V.ref)),this._scrollMode===A.ScrollMode.PAGE?this.#s():this._spreadMode!==A.SpreadMode.NONE&&this._updateSpreadMode(),this.#_().then(r(function*(){if(T.findController&&T.findController.setDocument(l),T._scriptingManager&&T._scriptingManager.setDocument(l),l.loadingParams.disableAutoFetch||O>u.FORCE_LAZY_PAGE_INIT)return void T._pagesCapability.resolve();let y=O-1;if(y<=0)T._pagesCapability.resolve();else for(let L=2;L<=O;++L){const U=l.getPage(L).then(j=>{const G=T._pages[L-1];G.pdfPage||G.setPdfPage(j),T.linkService.cachePageRef(L,j.ref),0==--y&&T._pagesCapability.resolve()},j=>{console.error(`Unable to get page ${L} to initialize viewer`,j),0==--y&&T._pagesCapability.resolve()});L%u.PAUSE_EAGER_PAGE_INIT==0&&(yield U)}})),this.eventBus.dispatch("pagesinit",{source:this}),l.getMetadata().then(({info:y})=>{l===this.pdfDocument&&y.Language&&(this.viewer.lang=y.Language)}),this.defaultRenderingQueue&&this.update()}).catch(V=>{console.error("Unable to initialize viewer",V),this._pagesCapability.reject(V)})}setPageLabels(l){if(this.pdfDocument){l?Array.isArray(l)&&this.pdfDocument.numPages===l.length?this._pageLabels=l:(this._pageLabels=null,console.error("setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let T=0,E=this._pages.length;T<E;T++)this._pages[T].setPageLabel(this._pageLabels?.[T]??null)}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=A.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,this.#e=new S(10),this._location=null,this._pagesRotation=0,this._optionalContentConfigPromise=null,this._firstPageCapability=(0,p.createPromiseCapability)(),this._onePageRenderedCapability=(0,p.createPromiseCapability)(),this._pagesCapability=(0,p.createPromiseCapability)(),this._scrollMode=A.ScrollMode.VERTICAL,this._previousScrollMode=A.ScrollMode.UNKNOWN,this._spreadMode=A.SpreadMode.NONE,this.#l={previousPageNumber:1,scrollDown:!0,pages:[]},this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),this.#i&&(document.removeEventListener("visibilitychange",this.#i),this.#i=null),this.viewer.textContent="",this._updateScrollMode(),this.viewer.removeAttribute("lang"),this.viewer.classList.remove(f),null!==this.#n&&(this.#t=this.#n,this.#n=null)}#s(){if(this._scrollMode!==A.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");const l=this._currentPageNumber,T=this.#l,E=this.viewer;if(E.textContent="",T.pages.length=0,this._spreadMode!==A.SpreadMode.NONE||this.isInPresentationMode){const O=new Set,B=this._spreadMode-1;-1===B?O.add(l-1):l%2!==B?(O.add(l-1),O.add(l)):(O.add(l-2),O.add(l-1));const M=document.createElement("div");if(M.className="spread",this.isInPresentationMode){const I=document.createElement("div");I.className="dummyPage",M.appendChild(I)}for(const I of O){const V=this._pages[I];V&&(M.appendChild(V.div),T.pages.push(V))}E.appendChild(M)}else{const O=this._pages[l-1];E.appendChild(O.div),T.pages.push(O)}T.scrollDown=l>=T.previousPageNumber,T.previousPageNumber=l}_scrollUpdate(){0!==this.pagesCount&&this.update()}#a(l,T=null){const{div:E,id:O}=l;if(this._scrollMode===A.ScrollMode.PAGE&&(this._setCurrentPageNumber(O),this.#s(),this.update()),!T&&!this.isInPresentationMode){const B=E.offsetLeft+E.clientLeft,M=B+E.clientWidth,{scrollLeft:I,clientWidth:V}=this.container;(this._scrollMode===A.ScrollMode.HORIZONTAL||B<I||M>I+V)&&(T={left:0,top:0})}(0,A.scrollIntoView)(E,T)}#o(l){return l===this._currentScale||Math.abs(l-this._currentScale)<1e-15}_setScaleUpdatePages(l,T,E=!1,O=!1){if(this._currentScaleValue=T.toString(),this.#o(l))return void(O&&this.eventBus.dispatch("scalechanging",{source:this,scale:l,presetValue:T}));this._doc.style.setProperty("--zoom-factor",l);const B={scale:l};for(const M of this._pages)M.update(B);if(this._currentScale=l,!E){let I,M=this._currentPageNumber;this._location&&!(this.isInPresentationMode||this.isChangingPresentationMode)&&(M=this._location.pageNumber,I=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:M,destArray:I,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:l,presetValue:O?T:void 0}),this.defaultRenderingQueue&&this.update(),this.updateContainerHeightCss()}get _pageWidthScaleFactor(){return this._spreadMode!==A.SpreadMode.NONE&&this._scrollMode!==A.ScrollMode.HORIZONTAL?2:1}_setScale(l,T=!1){let E=parseFloat(l);if(E>0)this._setScaleUpdatePages(E,l,T,!1);else{const O=this._pages[this._currentPageNumber-1];if(!O)return;let B=A.SCROLLBAR_PADDING,M=A.VERTICAL_PADDING;this.isInPresentationMode?B=M=4:this.removePageBorders?B=M=0:this._scrollMode===A.ScrollMode.HORIZONTAL&&([B,M]=[M,B]);const I=(this.container.clientWidth-B)/O.width*O.scale/this._pageWidthScaleFactor,V=(this.container.clientHeight-M)/O.height*O.scale;switch(l){case"page-actual":E=1;break;case"page-width":E=I;break;case"page-height":E=V;break;case"page-fit":E=Math.min(I,V);break;case"auto":const X=(0,A.isPortraitOrientation)(O)?I:Math.min(V,I);E=Math.min(A.MAX_AUTO_SCALE,X);break;default:return void console.error(`_setScale: "${l}" is an unknown zoom value.`)}this._setScaleUpdatePages(E,l,T,!0)}}#u(){const l=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0),this.#a(l)}pageLabelToPageNumber(l){if(!this._pageLabels)return null;const T=this._pageLabels.indexOf(l);return T<0?null:T+1}scrollPageIntoView({pageNumber:l,destArray:T=null,allowNegativeOffset:E=!1,ignoreDestinationZoom:O=!1}){if(!this.pdfDocument)return;const B=Number.isInteger(l)&&this._pages[l-1];if(!B)return void console.error(`scrollPageIntoView: "${l}" is not a valid pageNumber parameter.`);if(this.isInPresentationMode||!T)return void this._setCurrentPageNumber(l,!0);let J,w,M=0,I=0,V=0,X=0;const e=B.rotation%180!=0,t=(e?B.height:B.width)/B.scale/p.PixelsPerInch.PDF_TO_CSS_UNITS,o=(e?B.width:B.height)/B.scale/p.PixelsPerInch.PDF_TO_CSS_UNITS;let b=0;switch(T[1].name){case"XYZ":M=T[2],I=T[3],b=T[4],M=null!==M?M:0,I=null!==I?I:o;break;case"Fit":case"FitB":b="page-fit";break;case"FitH":case"FitBH":I=T[2],b="page-width",null===I&&this._location?(M=this._location.left,I=this._location.top):("number"!=typeof I||I<0)&&(I=o);break;case"FitV":case"FitBV":M=T[2],V=t,X=o,b="page-height";break;case"FitR":M=T[2],I=T[3],V=T[4]-M,X=T[5]-I,J=(this.container.clientWidth-(this.removePageBorders?0:A.SCROLLBAR_PADDING))/V/p.PixelsPerInch.PDF_TO_CSS_UNITS,w=(this.container.clientHeight-(this.removePageBorders?0:A.VERTICAL_PADDING))/X/p.PixelsPerInch.PDF_TO_CSS_UNITS,b=Math.min(Math.abs(J),Math.abs(w));break;default:return void console.error(`scrollPageIntoView: "${T[1].name}" is not a valid destination type.`)}if(O||(b&&b!==this._currentScale?this.currentScaleValue=b:this._currentScale===A.UNKNOWN_SCALE&&(this.currentScaleValue=A.DEFAULT_SCALE_VALUE)),"page-fit"===b&&!T[4])return void this.#a(B);const d=[B.viewport.convertToViewportPoint(M,I),B.viewport.convertToViewportPoint(M+V,I+X)];let y=Math.min(d[0][0],d[1][0]),L=Math.min(d[0][1],d[1][1]);E||(y=Math.max(y,0),L=Math.max(L,0)),this.#a(B,{left:y,top:L})}_updateLocation(l){const T=this._currentScale,E=this._currentScaleValue,O=parseFloat(E)===T?Math.round(1e4*T)/100:E,B=l.id,I=this.container,V=this._pages[B-1].getPagePoint(I.scrollLeft-l.x,I.scrollTop-l.y),X=Math.round(V[0]),J=Math.round(V[1]);let w=`#page=${B}`;this.isInPresentationMode||(w+=`&zoom=${O},${X},${J}`),this._location={pageNumber:B,scale:O,top:J,left:X,rotation:this._pagesRotation,pdfOpenParams:w}}update(){const l=this._getVisiblePages(),T=l.views,E=T.length;if(0===E)return;const O=Math.max(10,2*E+1);this.#e.resize(O,l.ids),this.renderingQueue.renderHighestPriority(l);const B=this._spreadMode===A.SpreadMode.NONE&&(this._scrollMode===A.ScrollMode.PAGE||this._scrollMode===A.ScrollMode.VERTICAL),M=this._currentPageNumber;let I=!1;for(const V of T){if(V.percent<100)break;if(V.id===M&&B){I=!0;break}}this._setCurrentPageNumber(I?M:T[0].id),this._updateLocation(l.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(l){return this.container.contains(l)}focus(){this.container.focus()}get _isContainerRtl(){return"rtl"===getComputedStyle(this.container).direction}get isInPresentationMode(){return this.presentationModeState===A.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===A.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getVisiblePages(){const l=this._scrollMode===A.ScrollMode.PAGE?this.#l.pages:this._pages,T=this._scrollMode===A.ScrollMode.HORIZONTAL;return(0,A.getVisibleElements)({scrollEl:this.container,views:l,sortByVisibility:!0,horizontal:T,rtl:T&&this._isContainerRtl})}isPageVisible(l){return!!this.pdfDocument&&(Number.isInteger(l)&&l>0&&l<=this.pagesCount?this._getVisiblePages().ids.has(l):(console.error(`isPageVisible: "${l}" is not a valid page.`),!1))}isPageCached(l){return!!this.pdfDocument&&(Number.isInteger(l)&&l>0&&l<=this.pagesCount?this.#e.has(this._pages[l-1]):(console.error(`isPageCached: "${l}" is not a valid page.`),!1))}cleanup(){for(const l of this._pages)l.renderingState!==A.RenderingStates.FINISHED&&l.reset()}_cancelRendering(){for(const l of this._pages)l.cancelRendering()}#d(l){var T=this;return r(function*(){if(l.pdfPage)return l.pdfPage;try{const E=yield T.pdfDocument.getPage(l.id);return l.pdfPage||l.setPdfPage(E),T.linkService._cachedPageNumber?.(E.ref)||T.linkService.cachePageRef(l.id,E.ref),E}catch(E){return console.error("Unable to get page for page view",E),null}})()}#f(l){if(1===l.first?.id)return!0;if(l.last?.id===this.pagesCount)return!1;switch(this._scrollMode){case A.ScrollMode.PAGE:return this.#l.scrollDown;case A.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}#c(l){for(const T of l)this._pages[T-1]?.toggleLoadingIconSpinner(!0);for(const T of this.#e)l.has(T.id)||T.toggleLoadingIconSpinner(!1)}forceRendering(l){const T=l||this._getVisiblePages(),E=this.#f(T),B=this.renderingQueue.getHighestPriority(T,this._pages,E,this._spreadMode!==A.SpreadMode.NONE&&this._scrollMode!==A.ScrollMode.HORIZONTAL);return this.#c(T.ids),!!B&&(this.#d(B).then(()=>{this.renderingQueue.renderView(B)}),!0)}createTextLayerBuilder(l,T,E,O=!1,B,M){return new g.TextLayerBuilder({textLayerDiv:l,eventBus:B,pageIndex:T,viewport:E,enhanceTextSelection:!this.isInPresentationMode&&O,highlighter:M})}createTextHighlighter(l,T){return new m.TextHighlighter({eventBus:T,pageIndex:l,findController:this.isInPresentationMode?null:this.findController})}createAnnotationLayerBuilder(l,T,E=null,O="",B=!0,M=F.NullL10n,I=null,V=null,X=null,J=null,w=null){return new C.AnnotationLayerBuilder({pageDiv:l,pdfPage:T,annotationStorage:E||this.pdfDocument?.annotationStorage,imageResourcesPath:O,renderForms:B,linkService:this.linkService,downloadManager:this.downloadManager,l10n:M,enableScripting:I??this.enableScripting,hasJSActionsPromise:V||this.pdfDocument?.hasJSActions(),fieldObjectsPromise:J||this.pdfDocument?.getFieldObjects(),mouseState:X||this._scriptingManager?.mouseState,annotationCanvasMap:w})}createXfaLayerBuilder(l,T,E=null){return new n.XfaLayerBuilder({pageDiv:l,pdfPage:T,annotationStorage:E||this.pdfDocument?.annotationStorage,linkService:this.linkService})}createStructTreeLayerBuilder(l){return new h.StructTreeLayerBuilder({pdfPage:l})}get hasEqualPageSizes(){const l=this._pages[0];for(let T=1,E=this._pages.length;T<E;++T){const O=this._pages[T];if(O.width!==l.width||O.height!==l.height)return!1}return!0}getPagesOverview(){return this._pages.map(l=>{const T=l.pdfPage.getViewport({scale:1});return!this.enablePrintAutoRotate||(0,A.isPortraitOrientation)(T)?{width:T.width,height:T.height,rotation:T.rotation}:{width:T.height,height:T.width,rotation:(T.rotation-90)%360}})}get optionalContentConfigPromise(){return this.pdfDocument?this._optionalContentConfigPromise?this._optionalContentConfigPromise:this.pdfDocument.getOptionalContentConfig():Promise.resolve(null)}set optionalContentConfigPromise(l){if(!(l instanceof Promise))throw new Error(`Invalid optionalContentConfigPromise: ${l}`);if(!this.pdfDocument||!this._optionalContentConfigPromise)return;this._optionalContentConfigPromise=l;const T={optionalContentConfigPromise:l};for(const E of this._pages)E.update(T);this.update(),this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:l})}get scrollMode(){return this._scrollMode}set scrollMode(l){if(this._scrollMode!==l){if(!(0,A.isValidScrollMode)(l))throw new Error(`Invalid scroll mode: ${l}`);this.pagesCount>u.FORCE_SCROLL_MODE_PAGE||(this._previousScrollMode=this._scrollMode,this._scrollMode=l,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:l}),this._updateScrollMode(this._currentPageNumber))}}_updateScrollMode(l=null){const T=this._scrollMode,E=this.viewer;E.classList.toggle("scrollHorizontal",T===A.ScrollMode.HORIZONTAL),E.classList.toggle("scrollWrapped",T===A.ScrollMode.WRAPPED),this.pdfDocument&&l&&(T===A.ScrollMode.PAGE?this.#s():this._previousScrollMode===A.ScrollMode.PAGE&&this._updateSpreadMode(),this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(l,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(l){if(this._spreadMode!==l){if(!(0,A.isValidSpreadMode)(l))throw new Error(`Invalid spread mode: ${l}`);this._spreadMode=l,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:l}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(l=null){if(!this.pdfDocument)return;const T=this.viewer,E=this._pages;if(this._scrollMode===A.ScrollMode.PAGE)this.#s();else if(T.textContent="",this._spreadMode===A.SpreadMode.NONE)for(const O of this._pages)T.appendChild(O.div);else{const O=this._spreadMode-1;let B=null;for(let M=0,I=E.length;M<I;++M)null===B?(B=document.createElement("div"),B.className="spread",T.appendChild(B)):M%2===O&&(B=B.cloneNode(!1),T.appendChild(B)),B.appendChild(E[M].div)}l&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(l,!0),this.update())}_getPageAdvance(l,T=!1){switch(this._scrollMode){case A.ScrollMode.WRAPPED:{const{views:E}=this._getVisiblePages(),O=new Map;for(const{id:B,y:M,percent:I,widthPercent:V}of E){if(0===I||V<100)continue;let X=O.get(M);X||O.set(M,X||=[]),X.push(B)}for(const B of O.values()){const M=B.indexOf(l);if(-1===M)continue;const I=B.length;if(1===I)break;if(T)for(let V=M-1,X=0;V>=X;V--){const w=B[V+1]-1;if(B[V]<w)return l-w}else for(let V=M+1,X=I;V<X;V++){const w=B[V-1]+1;if(B[V]>w)return w-l}if(T){const V=B[0];if(V<l)return l-V+1}else{const V=B[I-1];if(V>l)return V-l+1}break}break}case A.ScrollMode.HORIZONTAL:break;case A.ScrollMode.PAGE:case A.ScrollMode.VERTICAL:{if(this._spreadMode===A.SpreadMode.NONE)break;const E=this._spreadMode-1;if(T&&l%2!==E)break;if(!T&&l%2===E)break;const{views:O}=this._getVisiblePages(),B=T?l-1:l+1;for(const{id:M,percent:I,widthPercent:V}of O)if(M===B){if(I>0&&100===V)return 2;break}break}}return 1}nextPage(){const l=this._currentPageNumber,T=this.pagesCount;if(l>=T)return!1;const E=this._getPageAdvance(l,!1)||1;return this.currentPageNumber=Math.min(l+E,T),!0}previousPage(){const l=this._currentPageNumber;if(l<=1)return!1;const T=this._getPageAdvance(l,!0)||1;return this.currentPageNumber=Math.max(l-T,1),!0}increaseScale(l=1){let T=this._currentScale;do{T=(T*A.DEFAULT_SCALE_DELTA).toFixed(2),T=Math.ceil(10*T)/10,T=Math.min(A.MAX_SCALE,T)}while(--l>0&&T<A.MAX_SCALE);this.currentScaleValue=T}decreaseScale(l=1){let T=this._currentScale;do{T=(T/A.DEFAULT_SCALE_DELTA).toFixed(2),T=Math.floor(10*T)/10,T=Math.max(A.MIN_SCALE,T)}while(--l>0&&T>A.MIN_SCALE);this.currentScaleValue=T}updateContainerHeightCss(){const l=this.container.clientHeight;l!==this.#h&&(this.#h=l,this._doc.style.setProperty("--viewer-container-height",`${l}px`))}}s.BaseViewer=x},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PDFPageView=void 0;var p=P(3),A=P(6),C=P(13),F=P(4);const _=C.compatibilityParams.maxCanvasPixels||16777216;s.PDFPageView=class c{#e=p.AnnotationMode.ENABLE_FORMS;constructor(h){const m=h.container,g=h.defaultViewport;this.id=h.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=h.scale||A.DEFAULT_SCALE,this.viewport=g,this.pdfPageRotate=g.rotation,this._optionalContentConfigPromise=h.optionalContentConfigPromise||null,this.hasRestrictedScaling=!1,this.textLayerMode=h.textLayerMode??A.TextLayerMode.ENABLE,this.#e=h.annotationMode??p.AnnotationMode.ENABLE_FORMS,this.imageResourcesPath=h.imageResourcesPath||"",this.useOnlyCssZoom=h.useOnlyCssZoom||!1,this.maxCanvasPixels=h.maxCanvasPixels||_,this.pageColors=h.pageColors||null,this.eventBus=h.eventBus,this.renderingQueue=h.renderingQueue,this.textLayerFactory=h.textLayerFactory,this.annotationLayerFactory=h.annotationLayerFactory,this.xfaLayerFactory=h.xfaLayerFactory,this.textHighlighter=h.textHighlighterFactory?.createTextHighlighter(this.id-1,this.eventBus),this.structTreeLayerFactory=h.structTreeLayerFactory,this.renderer=h.renderer||A.RendererType.CANVAS,this.l10n=h.l10n||F.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=A.RenderingStates.INITIAL,this.resume=null,this._renderError=null,this._isStandalone=!this.renderingQueue?.hasViewer(),this._annotationCanvasMap=null,this.annotationLayer=null,this.textLayer=null,this.zoomLayer=null,this.xfaLayer=null,this.structTreeLayer=null;const n=document.createElement("div");n.className="page",n.style.width=Math.floor(this.viewport.width)+"px",n.style.height=Math.floor(this.viewport.height)+"px",n.setAttribute("data-page-number",this.id),n.setAttribute("role","region"),this.l10n.get("page_landmark",{page:this.id}).then(i=>{n.setAttribute("aria-label",i)}),this.div=n,m?.appendChild(n)}setPdfPage(h){this.pdfPage=h,this.pdfPageRotate=h.rotate,this.viewport=h.getViewport({scale:this.scale*p.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this.reset()}destroy(){this.reset(),this.pdfPage&&this.pdfPage.cleanup()}_renderAnnotationLayer(){var h=this;return r(function*(){let m=null;try{yield h.annotationLayer.render(h.viewport,"display")}catch(g){m=g}finally{h.eventBus.dispatch("annotationlayerrendered",{source:h,pageNumber:h.id,error:m})}})()}_renderXfaLayer(){var h=this;return r(function*(){let m=null;try{const g=yield h.xfaLayer.render(h.viewport,"display");h.textHighlighter&&h._buildXfaTextContentItems(g.textDivs)}catch(g){m=g}finally{h.eventBus.dispatch("xfalayerrendered",{source:h,pageNumber:h.id,error:m})}})()}_buildXfaTextContentItems(h){var m=this;return r(function*(){const g=yield m.pdfPage.getTextContent(),n=[];for(const i of g.items)n.push(i.str);m.textHighlighter.setTextMapping(h,n),m.textHighlighter.enable()})()}_resetZoomLayer(h=!1){if(!this.zoomLayer)return;const m=this.zoomLayer.firstChild;this.paintedViewportMap.delete(m),m.width=0,m.height=0,h&&this.zoomLayer.remove(),this.zoomLayer=null}reset({keepZoomLayer:h=!1,keepAnnotationLayer:m=!1,keepXfaLayer:g=!1}={}){this.cancelRendering({keepAnnotationLayer:m,keepXfaLayer:g}),this.renderingState=A.RenderingStates.INITIAL;const n=this.div;n.style.width=Math.floor(this.viewport.width)+"px",n.style.height=Math.floor(this.viewport.height)+"px";const i=n.childNodes,f=h&&this.zoomLayer||null,u=m&&this.annotationLayer?.div||null,S=g&&this.xfaLayer?.div||null;for(let x=i.length-1;x>=0;x--){const k=i[x];switch(k){case f:case u:case S:continue}k.remove()}n.removeAttribute("data-loaded"),u&&this.annotationLayer.hide(),S&&this.xfaLayer.hide(),f||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon notVisible",this._isStandalone&&this.toggleLoadingIconSpinner(!0),this.loadingIconDiv.setAttribute("role","img"),this.l10n.get("loading").then(x=>{this.loadingIconDiv?.setAttribute("aria-label",x)}),n.appendChild(this.loadingIconDiv)}update({scale:h=0,rotation:m=null,optionalContentConfigPromise:g=null}){if(this.scale=h||this.scale,"number"==typeof m&&(this.rotation=m),g instanceof Promise&&(this._optionalContentConfigPromise=g),this.viewport=this.viewport.clone({scale:this.scale*p.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this._isStandalone){const{style:f}=document.documentElement;f.setProperty("--zoom-factor",this.scale)}if(this.svg)return this.cssTransform({target:this.svg,redrawAnnotationLayer:!0,redrawXfaLayer:!0}),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});let i=!1;if(this.canvas&&this.maxCanvasPixels>0){const f=this.outputScale;(Math.floor(this.viewport.width)*f.sx|0)*(Math.floor(this.viewport.height)*f.sy|0)>this.maxCanvasPixels&&(i=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&i)return this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawXfaLayer:!0}),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:this._renderError});!this.zoomLayer&&!this.canvas.hidden&&(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild}),this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepXfaLayer:!0})}cancelRendering({keepAnnotationLayer:h=!1,keepXfaLayer:m=!1}={}){this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),this.annotationLayer&&(!h||!this.annotationLayer.div)&&(this.annotationLayer.cancel(),this.annotationLayer=null,this._annotationCanvasMap=null),this.xfaLayer&&(!m||!this.xfaLayer.div)&&(this.xfaLayer.cancel(),this.xfaLayer=null,this.textHighlighter?.disable()),this._onTextLayerRendered&&(this.eventBus._off("textlayerrendered",this._onTextLayerRendered),this._onTextLayerRendered=null)}cssTransform({target:h,redrawAnnotationLayer:m=!1,redrawXfaLayer:g=!1}){const n=this.viewport.width,i=this.viewport.height,f=this.div;h.style.width=h.parentNode.style.width=f.style.width=Math.floor(n)+"px",h.style.height=h.parentNode.style.height=f.style.height=Math.floor(i)+"px";const u=this.viewport.rotation-this.paintedViewportMap.get(h).rotation,S=Math.abs(u);let x=1,k=1;if((90===S||270===S)&&(x=i/n,k=n/i),h.style.transform=`rotate(${u}deg) scale(${x}, ${k})`,this.textLayer){const l=this.textLayer.viewport,E=Math.abs(this.viewport.rotation-l.rotation);let O=n/l.width;(90===E||270===E)&&(O=n/l.height);const B=this.textLayer.textLayerDiv;let M,I;switch(E){case 0:M=I=0;break;case 90:M=0,I="-"+B.style.height;break;case 180:M="-"+B.style.width,I="-"+B.style.height;break;case 270:M="-"+B.style.width,I=0;break;default:console.error("Bad rotation value.")}B.style.transform=`rotate(${E}deg) scale(${O}) translate(${M}, ${I})`,B.style.transformOrigin="0% 0%"}m&&this.annotationLayer&&this._renderAnnotationLayer(),g&&this.xfaLayer&&this._renderXfaLayer()}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(h,m){return this.viewport.convertToPdfPoint(h,m)}toggleLoadingIconSpinner(h=!1){this.loadingIconDiv?.classList.toggle("notVisible",!h)}draw(){var h=this;this.renderingState!==A.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:m,pdfPage:g}=this;if(!g)return this.renderingState=A.RenderingStates.FINISHED,this.loadingIconDiv&&(this.loadingIconDiv.remove(),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=A.RenderingStates.RUNNING;const n=document.createElement("div");n.style.width=m.style.width,n.style.height=m.style.height,n.classList.add("canvasWrapper"),this.annotationLayer?.div?m.insertBefore(n,this.annotationLayer.div):m.appendChild(n);let i=null;if(this.textLayerMode!==A.TextLayerMode.DISABLE&&this.textLayerFactory){const k=document.createElement("div");k.className="textLayer",k.style.width=n.style.width,k.style.height=n.style.height,this.annotationLayer?.div?m.insertBefore(k,this.annotationLayer.div):m.appendChild(k),i=this.textLayerFactory.createTextLayerBuilder(k,this.id-1,this.viewport,this.textLayerMode===A.TextLayerMode.ENABLE_ENHANCE,this.eventBus,this.textHighlighter)}this.textLayer=i,this.#e!==p.AnnotationMode.DISABLE&&this.annotationLayerFactory&&(this._annotationCanvasMap||=new Map,this.annotationLayer||=this.annotationLayerFactory.createAnnotationLayerBuilder(m,g,null,this.imageResourcesPath,this.#e===p.AnnotationMode.ENABLE_FORMS,this.l10n,null,null,null,null,this._annotationCanvasMap)),this.xfaLayer?.div&&m.appendChild(this.xfaLayer.div);let f=null;this.renderingQueue&&(f=k=>{if(!this.renderingQueue.isHighestPriority(this))return this.renderingState=A.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=A.RenderingStates.RUNNING,k()});k()});const u=function(){var k=r(function*(l=null){if(S===h.paintTask&&(h.paintTask=null),l instanceof p.RenderingCancelledException)h._renderError=null;else if(h._renderError=l,h.renderingState=A.RenderingStates.FINISHED,h.loadingIconDiv&&(h.loadingIconDiv.remove(),delete h.loadingIconDiv),h._resetZoomLayer(!0),h.eventBus.dispatch("pagerendered",{source:h,pageNumber:h.id,cssTransform:!1,timestamp:performance.now(),error:h._renderError}),l)throw l});return function(){return k.apply(this,arguments)}}(),S=this.renderer===A.RendererType.SVG?this.paintOnSvg(n):this.paintOnCanvas(n);S.onRenderContinue=f,this.paintTask=S;const x=S.promise.then(()=>u(null).then(()=>{if(i){const k=g.streamTextContent({includeMarkedContent:!0});i.setTextContentStream(k),i.render()}this.annotationLayer&&this._renderAnnotationLayer()}),function(k){return u(k)});return this.xfaLayerFactory&&(this.xfaLayer||(this.xfaLayer=this.xfaLayerFactory.createXfaLayerBuilder(m,g,null)),this._renderXfaLayer()),this.structTreeLayerFactory&&this.textLayer&&this.canvas&&(this._onTextLayerRendered=k=>{k.pageNumber===this.id&&(this.eventBus._off("textlayerrendered",this._onTextLayerRendered),this._onTextLayerRendered=null,this.canvas&&this.pdfPage.getStructTree().then(l=>{if(!l||!this.canvas)return;const T=this.structTreeLayer.render(l);T.classList.add("structTree"),this.canvas.appendChild(T)}))},this.eventBus._on("textlayerrendered",this._onTextLayerRendered),this.structTreeLayer=this.structTreeLayerFactory.createStructTreeLayerBuilder(g)),m.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),x}paintOnCanvas(h){const m=(0,p.createPromiseCapability)(),g={promise:m.promise,onRenderContinue(B){B()},cancel(){O.cancel()}},n=this.viewport,i=document.createElement("canvas");i.hidden=!0;let f=!0;const u=function(){f&&(i.hidden=!1,f=!1)};h.appendChild(i),this.canvas=i;const S=i.getContext("2d",{alpha:!1}),x=this.outputScale=new A.OutputScale;if(this.useOnlyCssZoom){const B=n.clone({scale:p.PixelsPerInch.PDF_TO_CSS_UNITS});x.sx*=B.width/n.width,x.sy*=B.height/n.height}if(this.maxCanvasPixels>0){const M=Math.sqrt(this.maxCanvasPixels/(n.width*n.height));x.sx>M||x.sy>M?(x.sx=M,x.sy=M,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}const k=(0,A.approximateFraction)(x.sx),l=(0,A.approximateFraction)(x.sy);i.width=(0,A.roundToDivide)(n.width*x.sx,k[0]),i.height=(0,A.roundToDivide)(n.height*x.sy,l[0]),i.style.width=(0,A.roundToDivide)(n.width,k[1])+"px",i.style.height=(0,A.roundToDivide)(n.height,l[1])+"px",this.paintedViewportMap.set(i,n);const E={canvasContext:S,transform:x.scaled?[x.sx,0,0,x.sy,0,0]:null,viewport:this.viewport,annotationMode:this.#e,optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:this.pageColors},O=this.pdfPage.render(E);return O.onContinue=function(B){u(),g.onRenderContinue?g.onRenderContinue(B):B()},O.promise.then(function(){u(),m.resolve()},function(B){u(),m.reject(B)}),g}paintOnSvg(h){let m=!1;const g=()=>{if(m)throw new p.RenderingCancelledException(`Rendering cancelled, page ${this.id}`,"svg")},n=this.pdfPage,i=this.viewport.clone({scale:p.PixelsPerInch.PDF_TO_CSS_UNITS});return{promise:n.getOperatorList({annotationMode:this.#e}).then(u=>(g(),new p.SVGGraphics(n.commonObjs,n.objs).getSVG(u,i).then(x=>{g(),this.svg=x,this.paintedViewportMap.set(x,i),x.style.width=h.style.width,x.style.height=h.style.height,this.renderingState=A.RenderingStates.FINISHED,h.appendChild(x)}))),onRenderContinue(u){u()},cancel(){m=!0}}}setPageLabel(h){this.pageLabel="string"==typeof h?h:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}}},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.compatibilityParams=s.OptionKind=s.AppOptions=void 0;const P=Object.create(null);s.compatibilityParams=P;{const _=navigator.userAgent||"",c=navigator.platform||"",v=navigator.maxTouchPoints||1,h=/Android/.test(_);(/\b(iPad|iPhone|iPod)(?=;)/.test(_)||"MacIntel"===c&&v>1||h)&&(P.maxCanvasPixels=5242880)}const p={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};s.OptionKind=p;const A={annotationMode:{value:2,kind:p.VIEWER+p.PREFERENCE},cursorToolOnLoad:{value:0,kind:p.VIEWER+p.PREFERENCE},defaultUrl:{value:"compressed.tracemonkey-pldi-09.pdf",kind:p.VIEWER},defaultZoomValue:{value:"",kind:p.VIEWER+p.PREFERENCE},disableHistory:{value:!1,kind:p.VIEWER},disablePageLabels:{value:!1,kind:p.VIEWER+p.PREFERENCE},enablePermissions:{value:!1,kind:p.VIEWER+p.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:p.VIEWER+p.PREFERENCE},enableScripting:{value:!0,kind:p.VIEWER+p.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:p.VIEWER},externalLinkTarget:{value:0,kind:p.VIEWER+p.PREFERENCE},historyUpdateUrl:{value:!1,kind:p.VIEWER+p.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:p.VIEWER+p.PREFERENCE},imageResourcesPath:{value:"./images/",kind:p.VIEWER},maxCanvasPixels:{value:16777216,compatibility:P.maxCanvasPixels,kind:p.VIEWER},pageColorsBackground:{value:"Canvas",kind:p.VIEWER+p.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:p.VIEWER+p.PREFERENCE},pdfBugEnabled:{value:!1,kind:p.VIEWER+p.PREFERENCE},printResolution:{value:150,kind:p.VIEWER},renderer:{value:"canvas",kind:p.VIEWER},sidebarViewOnLoad:{value:-1,kind:p.VIEWER+p.PREFERENCE},scrollModeOnLoad:{value:-1,kind:p.VIEWER+p.PREFERENCE},spreadModeOnLoad:{value:-1,kind:p.VIEWER+p.PREFERENCE},textLayerMode:{value:1,kind:p.VIEWER+p.PREFERENCE},useOnlyCssZoom:{value:!1,kind:p.VIEWER+p.PREFERENCE},viewerCssTheme:{value:0,kind:p.VIEWER+p.PREFERENCE},viewOnLoad:{value:0,kind:p.VIEWER+p.PREFERENCE},cMapPacked:{value:!0,kind:p.API},cMapUrl:{value:"../web/cmaps/",kind:p.API},disableAutoFetch:{value:!1,kind:p.API+p.PREFERENCE},disableFontFace:{value:!1,kind:p.API+p.PREFERENCE},disableRange:{value:!1,kind:p.API+p.PREFERENCE},disableStream:{value:!1,kind:p.API+p.PREFERENCE},docBaseUrl:{value:"",kind:p.API},enableXfa:{value:!0,kind:p.API+p.PREFERENCE},fontExtraProperties:{value:!1,kind:p.API},isEvalSupported:{value:!0,kind:p.API},maxImageSize:{value:-1,kind:p.API},pdfBug:{value:!1,kind:p.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:p.API},verbosity:{value:1,kind:p.API},workerPort:{value:null,kind:p.WORKER},workerSrc:{value:"../build/pdf.worker.js",kind:p.WORKER}};A.disablePreferences={value:!1,kind:p.VIEWER},A.locale={value:navigator.language||"en-US",kind:p.VIEWER},A.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:p.VIEWER},A.renderer.kind+=p.PREFERENCE;const C=Object.create(null);s.AppOptions=class F{constructor(){throw new Error("Cannot initialize AppOptions.")}static get(c){const v=C[c];if(void 0!==v)return v;const h=A[c];return void 0!==h?h.compatibility??h.value:void 0}static getAll(c=null){const v=Object.create(null);for(const h in A){const m=A[h];if(c){if(!(c&m.kind))continue;if(c===p.PREFERENCE){const n=m.value,i=typeof n;if("boolean"===i||"string"===i||"number"===i&&Number.isInteger(n)){v[h]=n;continue}throw new Error(`Invalid type for preference: ${h}`)}}const g=C[h];v[h]=void 0!==g?g:m.compatibility??m.value}return v}static set(c,v){C[c]=v}static setAll(c){for(const v in c)C[v]=c[v]}static remove(c){delete C[c]}static _hasUserOptions(){return Object.keys(C).length>0}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PDFRenderingQueue=void 0;var p=P(3),A=P(6);s.PDFRenderingQueue=class F{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(c){this.pdfViewer=c}setThumbnailViewer(c){this.pdfThumbnailViewer=c}isHighestPriority(c){return this.highestPriorityPage===c.renderingId}hasViewer(){return!!this.pdfViewer}renderHighestPriority(c){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),!this.pdfViewer.forceRendering(c)&&(this.isThumbnailViewEnabled&&this.pdfThumbnailViewer?.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4)))}getHighestPriority(c,v,h,m=!1){const g=c.views,n=g.length;if(0===n)return null;for(let x=0;x<n;x++){const k=g[x].view;if(!this.isViewFinished(k))return k}const i=c.first.id,f=c.last.id;if(f-i+1>n){const x=c.ids;for(let k=1,l=f-i;k<l;k++){const T=h?i+k:f-k;if(x.has(T))continue;const E=v[T-1];if(!this.isViewFinished(E))return E}}let u=h?f:i-2,S=v[u];return S&&!this.isViewFinished(S)||m&&(u+=h?1:-1,S=v[u],S&&!this.isViewFinished(S))?S:null}isViewFinished(c){return c.renderingState===A.RenderingStates.FINISHED}renderView(c){switch(c.renderingState){case A.RenderingStates.FINISHED:return!1;case A.RenderingStates.PAUSED:this.highestPriorityPage=c.renderingId,c.resume();break;case A.RenderingStates.RUNNING:this.highestPriorityPage=c.renderingId;break;case A.RenderingStates.INITIAL:this.highestPriorityPage=c.renderingId,c.draw().finally(()=>{this.renderHighestPriority()}).catch(v=>{v instanceof p.RenderingCancelledException||console.error(`renderView: "${v}"`)})}return!0}}},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.TextHighlighter=void 0,s.TextHighlighter=class P{constructor({findController:A,eventBus:C,pageIndex:F}){this.findController=A,this.matches=[],this.eventBus=C,this.pageIdx=F,this._onUpdateTextLayerMatches=null,this.textDivs=null,this.textContentItemsStr=null,this.enabled=!1}setTextMapping(A,C){this.textDivs=A,this.textContentItemsStr=C}enable(){if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(this.enabled)throw new Error("TextHighlighter is already enabled.");this.enabled=!0,this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=A=>{(A.pageIndex===this.pageIdx||-1===A.pageIndex)&&this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)),this._updateMatches()}disable(){this.enabled&&(this.enabled=!1,this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null))}_convertMatches(A,C){if(!A)return[];const{textContentItemsStr:F}=this;let _=0,c=0;const v=F.length-1,h=[];for(let m=0,g=A.length;m<g;m++){let n=A[m];for(;_!==v&&n>=c+F[_].length;)c+=F[_].length,_++;_===F.length&&console.error("Could not find a matching mapping");const i={begin:{divIdx:_,offset:n-c}};for(n+=C[m];_!==v&&n>c+F[_].length;)c+=F[_].length,_++;i.end={divIdx:_,offset:n-c},h.push(i)}return h}_renderMatches(A){if(0===A.length)return;const{findController:C,pageIdx:F}=this,{textContentItemsStr:_,textDivs:c}=this,v=F===C.selected.pageIdx,h=C.selected.matchIdx;let g=null;function i(x,k){const l=x.divIdx;return c[l].textContent="",f(l,0,x.offset,k)}function f(x,k,l,T){let E=c[x];if(E.nodeType===Node.TEXT_NODE){const M=document.createElement("span");E.parentNode.insertBefore(M,E),M.appendChild(E),c[x]=M,E=M}const O=_[x].substring(k,l),B=document.createTextNode(O);if(T){const M=document.createElement("span");return M.className=`${T} appended`,M.appendChild(B),E.appendChild(M),T.includes("selected")?M.offsetLeft:0}return E.appendChild(B),0}let u=h,S=u+1;if(C.state.highlightAll)u=0,S=A.length;else if(!v)return;for(let x=u;x<S;x++){const k=A[x],l=k.begin,T=k.end,E=v&&x===h,O=E?" selected":"";let B=0;if(g&&l.divIdx===g.divIdx?f(g.divIdx,g.offset,l.offset):(null!==g&&f(g.divIdx,g.offset,undefined),i(l)),l.divIdx===T.divIdx)B=f(l.divIdx,l.offset,T.offset,"highlight"+O);else{B=f(l.divIdx,l.offset,undefined,"highlight begin"+O);for(let M=l.divIdx+1,I=T.divIdx;M<I;M++)c[M].className="highlight middle"+O;i(T,"highlight end"+O)}g=T,E&&C.scrollMatchIntoView({element:c[l.divIdx],selectedLeft:B,pageIndex:F,matchIndex:h})}g&&f(g.divIdx,g.offset,undefined)}_updateMatches(){if(!this.enabled)return;const{findController:A,matches:C,pageIdx:F}=this,{textContentItemsStr:_,textDivs:c}=this;let v=-1;for(let g=0,n=C.length;g<n;g++){const i=C[g];for(let u=Math.max(v,i.begin.divIdx),S=i.end.divIdx;u<=S;u++){const x=c[u];x.textContent=_[u],x.className=""}v=i.end.divIdx+1}A?.highlightMatches&&(this.matches=this._convertMatches(A.pageMatches[F]||null,A.pageMatchesLength[F]||null),this._renderMatches(this.matches))}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DownloadManager=void 0;var p=P(3);function A(F,_){const c=document.createElement("a");if(!c.click)throw new Error('DownloadManager: "a.click()" is not supported.');c.href=F,c.target="_parent","download"in c&&(c.download=_),(document.body||document.documentElement).appendChild(c),c.click(),c.remove()}s.DownloadManager=class C{constructor(){this._openBlobUrls=new WeakMap}downloadUrl(_,c){(0,p.createValidAbsoluteUrl)(_,"http://example.com")?A(_+"#pdfjs.action=download",c):console.error(`downloadUrl - not a valid URL: ${_}`)}downloadData(_,c,v){A(URL.createObjectURL(new Blob([_],{type:v})),c)}openOrDownloadData(_,c,v){const h=(0,p.isPdfFile)(v),m=h?"application/pdf":"";if(h){let n,g=this._openBlobUrls.get(_);g||(g=URL.createObjectURL(new Blob([c],{type:m})),this._openBlobUrls.set(_,g)),n="?file="+encodeURIComponent(g+"#"+v);try{return window.open(n),!0}catch(i){console.error(`openOrDownloadData: ${i}`),URL.revokeObjectURL(g),this._openBlobUrls.delete(_)}}return this.downloadData(c,v,m),!1}download(_,c,v,h="download"){A(URL.createObjectURL(_),v)}}},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WaitOnType=s.EventBus=s.AutomationEventBus=void 0,s.waitOnEventOrTimeout=function p({target:F,name:_,delay:c=0}){return new Promise(function(v,h){if("object"!=typeof F||!_||"string"!=typeof _||!(Number.isInteger(c)&&c>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function m(f){F instanceof A?F._off(_,g):F.removeEventListener(_,g),i&&clearTimeout(i),v(f)}const g=m.bind(null,P.EVENT);F instanceof A?F._on(_,g):F.addEventListener(_,g);const n=m.bind(null,P.TIMEOUT),i=setTimeout(n,c)})};const P={EVENT:"event",TIMEOUT:"timeout"};s.WaitOnType=P;class A{constructor(){this._listeners=Object.create(null)}on(_,c,v=null){this._on(_,c,{external:!0,once:v?.once})}off(_,c,v=null){this._off(_,c,{external:!0,once:v?.once})}dispatch(_,c){const v=this._listeners[_];if(!v||0===v.length)return;let h;for(const{listener:m,external:g,once:n}of v.slice(0))n&&this._off(_,m),g?(h||=[]).push(m):m(c);if(h){for(const m of h)m(c);h=null}}_on(_,c,v=null){(this._listeners[_]||=[]).push({listener:c,external:!0===v?.external,once:!0===v?.once})}_off(_,c,v=null){const h=this._listeners[_];if(h)for(let m=0,g=h.length;m<g;m++)if(h[m].listener===c)return void h.splice(m,1)}}s.EventBus=A,s.AutomationEventBus=class C extends A{dispatch(_,c){throw new Error("Not implemented: AutomationEventBus.dispatch")}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.GenericL10n=void 0,P(19);var p=P(4);const A=document.webL10n;s.GenericL10n=class C{constructor(_){this._lang=_,this._ready=new Promise((c,v)=>{A.setLanguage((0,p.fixupLangCode)(_),()=>{c(A)})})}getLanguage(){var _=this;return r(function*(){return(yield _._ready).getLanguage()})()}getDirection(){var _=this;return r(function*(){return(yield _._ready).getDirection()})()}get(_,c=null,v=(0,p.getL10nFallback)(_,c)){var h=this;return r(function*(){return(yield h._ready).get(_,c,v)})()}translate(_){var c=this;return r(function*(){return(yield c._ready).translate(_)})()}}},()=>{document.webL10n=function(R,s,P){var p={},A="",C="textContent",F="",_={},c="loading",v=!0;function i(M,I,V){I=I||function(w){},V=V||function(){};var X=new XMLHttpRequest;X.open("GET",M,v),X.overrideMimeType&&X.overrideMimeType("text/plain; charset=utf-8"),X.onreadystatechange=function(){4==X.readyState&&(200==X.status||0===X.status?I(X.responseText):V())},X.onerror=V,X.ontimeout=V;try{X.send(null)}catch{V()}}function u(M,I){M&&(M=M.toLowerCase()),I=I||function(){},function S(){p={},A="",F=""}(),F=M;var V=function h(){return s.querySelectorAll('link[type="application/l10n"]')}(),X=V.length;if(0!==X){var t,o=0;t=function(){++o>=X&&(I(),c="complete")};for(var d=0;d<X;d++)new b(V[d]).load(M,t)}else{var J=function m(){var M=s.querySelector('script[type="application/l10n"]');return M?JSON.parse(M.innerHTML):null}();if(J&&J.locales&&J.default_locale){if(console.log("using the embedded JSON directory, early way out"),!(p=J.locales[M])){var w=J.default_locale.toLowerCase();for(var e in J.locales){if((e=e.toLowerCase())===M){p=J.locales[M];break}e===w&&(p=J.locales[w])}}I()}else console.log("no resource to load, early way out");c="complete"}function b(L){var U=L.href;this.load=function(j,G){!function f(M,I,V,X){var J=M.replace(/[^\/]*$/,"")||"./";function w(t){return t.lastIndexOf("\\")<0?t:t.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}i(M,function(t){A+=t,function e(t,o){var b={},d=/^\s*|\s*$/,y=/^\s*#|^\s*$/,L=/^\s*\[(.*)\]\s*$/,U=/^\s*@import\s+url\((.*)\)\s*$/i,j=/^([^=\s]*)\s*=\s*(.+)$/;function G(K,ie,se){var Q=K.replace(d,"").split(/[\r\n]+/),Z="*",ae=I.split("-",1)[0],re=!1,ne="";!function ce(){for(;;){if(!Q.length)return void se();var he=Q.shift();if(!y.test(he)){if(ie){if(ne=L.exec(he)){Z=ne[1].toLowerCase(),re="*"!==Z&&Z!==I&&Z!==ae;continue}if(re)continue;if(ne=U.exec(he))return void q(J+ne[1],ce)}var oe=he.match(j);oe&&3==oe.length&&(b[oe[1]]=w(oe[2]))}}}()}function q(K,ie){i(K,function(se){G(se,!1,ie)},function(){console.warn(K+" not found."),ie()})}G(t,!0,function(){o(b)})}(t,function(o){for(var b in o){var d,y,L=b.lastIndexOf(".");L>0?(d=b.substring(0,L),y=b.substring(L+1)):(d=b,y=C),p[d]||(p[d]={}),p[d][y]=o[b]}V&&V()})},X)}(U,j,G,function(){console.warn(U+" not found."),console.warn('"'+j+'" resource not found'),F="",G()})}}}function k(M,I,V){var X=p[M];if(!X){if(console.warn("#"+M+" is undefined."),!V)return null;X=V}var J={};for(var w in X){var e=X[w];e=T(e=l(e,I,M,w),I,M),J[w]=e}return J}function l(M,I,V,X){var w=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(M);if(!w||!w.length)return M;var o,e=w[1],t=w[2];return I&&t in I?o=I[t]:t in p&&(o=p[t]),e in _&&(M=(0,_[e])(M,o,V,X)),M}function T(M,I,V){return M.replace(/\{\{\s*(.+?)\s*\}\}/g,function(J,w){return I&&w in I?I[w]:w in p?p[w]:(console.log("argument {{"+w+"}} for #"+V+" is undefined."),J)})}function E(M){var I=function n(M){if(!M)return{};var I=M.getAttribute("data-l10n-id"),V=M.getAttribute("data-l10n-args"),X={};if(V)try{X=JSON.parse(V)}catch{console.warn("could not parse arguments for #"+I)}return{id:I,args:X}}(M);if(I.id){var V=k(I.id,I.args);if(!V)return void console.warn("#"+I.id+" is undefined.");if(V[C]){if(0===function O(M){if(M.children)return M.children.length;if(typeof M.childElementCount<"u")return M.childElementCount;for(var I=0,V=0;V<M.childNodes.length;V++)I+=1===M.nodeType?1:0;return I}(M))M[C]=V[C];else{for(var X=M.childNodes,J=!1,w=0,e=X.length;w<e;w++)3===X[w].nodeType&&/\S/.test(X[w].nodeValue)&&(J?X[w].nodeValue="":(X[w].nodeValue=V[C],J=!0));if(!J){var t=s.createTextNode(V[C]);M.insertBefore(t,M.firstChild)}}delete V[C]}for(var o in V)M[o]=V[o]}}return _.plural=function(M,I,V,X){var J=parseFloat(I);if(isNaN(J)||X!=C)return M;_._pluralRules||(_._pluralRules=function x(M){function V(e,t){return-1!==t.indexOf(e)}function X(e,t,o){return t<=e&&e<=o}var J={0:function(e){return"other"},1:function(e){return X(e%100,3,10)?"few":0===e?"zero":X(e%100,11,99)?"many":2==e?"two":1==e?"one":"other"},2:function(e){return 0!==e&&e%10==0?"many":2==e?"two":1==e?"one":"other"},3:function(e){return 1==e?"one":"other"},4:function(e){return X(e,0,1)?"one":"other"},5:function(e){return X(e,0,2)&&2!=e?"one":"other"},6:function(e){return 0===e?"zero":e%10==1&&e%100!=11?"one":"other"},7:function(e){return 2==e?"two":1==e?"one":"other"},8:function(e){return X(e,3,6)?"few":X(e,7,10)?"many":2==e?"two":1==e?"one":"other"},9:function(e){return 0===e||1!=e&&X(e%100,1,19)?"few":1==e?"one":"other"},10:function(e){return X(e%10,2,9)&&!X(e%100,11,19)?"few":e%10!=1||X(e%100,11,19)?"other":"one"},11:function(e){return X(e%10,2,4)&&!X(e%100,12,14)?"few":e%10==0||X(e%10,5,9)||X(e%100,11,14)?"many":e%10==1&&e%100!=11?"one":"other"},12:function(e){return X(e,2,4)?"few":1==e?"one":"other"},13:function(e){return X(e%10,2,4)&&!X(e%100,12,14)?"few":1!=e&&X(e%10,0,1)||X(e%10,5,9)||X(e%100,12,14)?"many":1==e?"one":"other"},14:function(e){return X(e%100,3,4)?"few":e%100==2?"two":e%100==1?"one":"other"},15:function(e){return 0===e||X(e%100,2,10)?"few":X(e%100,11,19)?"many":1==e?"one":"other"},16:function(e){return e%10==1&&11!=e?"one":"other"},17:function(e){return 3==e?"few":0===e?"zero":6==e?"many":2==e?"two":1==e?"one":"other"},18:function(e){return 0===e?"zero":X(e,0,2)&&0!==e&&2!=e?"one":"other"},19:function(e){return X(e,2,10)?"few":X(e,0,1)?"one":"other"},20:function(e){return!X(e%10,3,4)&&e%10!=9||X(e%100,10,19)||X(e%100,70,79)||X(e%100,90,99)?e%1e6==0&&0!==e?"many":e%10!=2||V(e%100,[12,72,92])?e%10!=1||V(e%100,[11,71,91])?"other":"one":"two":"few"},21:function(e){return 0===e?"zero":1==e?"one":"other"},22:function(e){return X(e,0,1)||X(e,11,99)?"one":"other"},23:function(e){return X(e%10,1,2)||e%20==0?"one":"other"},24:function(e){return X(e,3,10)||X(e,13,19)?"few":V(e,[2,12])?"two":V(e,[1,11])?"one":"other"}},w={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}[M.replace(/-.*$/,"")];return w in J?J[w]:(console.warn("plural form unknown for ["+M+"]"),function(){return"other"})}(F));var w="["+_._pluralRules(J)+"]";return 0===J&&V+"[zero]"in p?M=p[V+"[zero]"][X]:1==J&&V+"[one]"in p?M=p[V+"[one]"][X]:2==J&&V+"[two]"in p?M=p[V+"[two]"][X]:V+w in p?M=p[V+w][X]:V+"[other]"in p&&(M=p[V+"[other]"][X]),M},{get:function(M,I,V){var w,X=M.lastIndexOf("."),J=C;X>0&&(J=M.substring(X+1),M=M.substring(0,X)),V&&((w={})[J]=V);var e=k(M,I,w);return e&&J in e?e[J]:"{{"+M+"}}"},getData:function(){return p},getText:function(){return A},getLanguage:function(){return F},setLanguage:function(M,I){u(M,function(){I&&I()})},getDirection:function(){var I=F.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(I)>=0?"rtl":"ltr"},translate:function B(M){for(var I=function g(M){return M?M.querySelectorAll("*[data-l10n-id]"):[]}(M=M||s.documentElement),V=I.length,X=0;X<V;X++)E(I[X]);E(M)},getReadyState:function(){return c},ready:function(M){M&&("complete"==c||"interactive"==c?R.setTimeout(function(){M()}):s.addEventListener&&s.addEventListener("localized",function I(){s.removeEventListener("localized",I),M()}))}}}(window,document)},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PDFFindController=s.FindState=void 0;var p=P(6),A=P(3),C=P(21);const F={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};s.FindState=F;const h={"\u2010":"-","\u2018":"'","\u2019":"'","\u201a":"'","\u201b":"'","\u201c":'"',"\u201d":'"',"\u201e":'"',"\u201f":'"',"\xbc":"1/4","\xbd":"1/2","\xbe":"3/4"},m=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]),g=[...m.values()].map(T=>String.fromCharCode(T)).join(""),n=/\p{M}+/gu,i=/([.*+?^${}()|[\]\\])|(\p{P})|(\s+)|(\p{M})|(\p{L})/gu,f=/([^\p{M}])\p{M}*$/u,u=/^\p{M}*([^\p{M}])/u;let S=null;function x(T){if(!S){const e=Object.keys(h).join("");S=new RegExp(`([${e}])|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|(\\n)`,"gum")}const E=[];let O;for(;null!==(O=n.exec(T));)E.push([O[0].length,O.index]);let B=T.normalize("NFD");const M=[[0,0]];let I=0,V=0,X=0,J=0,w=!1;return B=B.replace(S,(e,t,o,b,d,y)=>{if(y-=X,t){const L=h[e],U=L.length;for(let j=1;j<U;j++)M.push([y-V+j,V-j]);return V-=U-1,L}if(o){const L=o.endsWith("\n"),U=L?o.length-2:o.length;w=!0;let j=U;y+J===E[I]?.[1]&&(j-=E[I][0],++I);for(let G=1;G<j+1;G++)M.push([y-1-V+G,V-G]);return V-=j,X+=j,L?(M.push([(y+=U-1)-V+1,1+V]),V+=1,X+=1,J+=1,o.slice(0,U)):o}return b?(M.push([y-V+1,1+V]),V+=1,X+=1,J+=1,b.charAt(0)):(M.push([y-V+1,V-1]),V-=1,X+=1,J+=1," ")}),M.push([B.length,V]),[B,M,w]}function k(T,E,O){if(!T)return[E,O];const B=E,M=E+O;let I=(0,p.binarySearchFirstItem)(T,X=>X[0]>=B);T[I][0]>B&&--I;let V=(0,p.binarySearchFirstItem)(T,X=>X[0]>=M,I);return T[V][0]>M&&--V,[B+T[I][1],O+T[V][1]-T[I][1]]}s.PDFFindController=class l{constructor({linkService:E,eventBus:O}){this._linkService=E,this._eventBus=O,this.#t(),O._on("find",this.#e.bind(this)),O._on("findbarclose",this.#b.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 this._state}setDocument(E){this._pdfDocument&&this.#t(),E&&(this._pdfDocument=E,this._firstPageCapability.resolve())}#e(E){if(!E)return;const O=this._pdfDocument,{type:B}=E;(null===this._state||this.#r(E))&&(this._dirtyMatch=!0),this._state=E,"highlightallchange"!==B&&this.#p(F.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||O&&this._pdfDocument!==O)return;this.#_();const M=!this._highlightMatches,I=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),B?this._dirtyMatch?this.#o():"again"===B?(this.#o(),M&&this._state.highlightAll&&this.#a()):"highlightallchange"===B?(I?this.#o():this._highlightMatches=!0,this.#a()):this.#o():this._findTimeout=setTimeout(()=>{this.#o(),this._findTimeout=null},250)})}scrollMatchIntoView({element:E=null,selectedLeft:O=0,pageIndex:B=-1,matchIndex:M=-1}){this._scrollMatches&&E&&-1!==M&&M===this._selected.matchIdx&&-1!==B&&B===this._selected.pageIdx&&(this._scrollMatches=!1,(0,p.scrollIntoView)(E,{top:-50,left:O+-400},!0))}#t(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=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=(0,A.createPromiseCapability)()}get#n(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,[this._normalizedQuery]=x(this._state.query)),this._normalizedQuery}#r(E){if(E.query!==this._state.query)return!0;switch(E.type){case"again":const O=this._selected.pageIdx+1,B=this._linkService;return O>=1&&O<=B.pagesCount&&O!==B.page&&!B.isPageVisible(O);case"highlightallchange":return!1}return!0}#h(E,O,B){let M=E.slice(0,O).match(f);if(M){const I=E.charCodeAt(O),V=M[1].charCodeAt(0);if((0,C.getCharacterType)(I)===(0,C.getCharacterType)(V))return!1}if(M=E.slice(O+B).match(u),M){const I=E.charCodeAt(O+B-1),V=M[1].charCodeAt(0);if((0,C.getCharacterType)(I)===(0,C.getCharacterType)(V))return!1}return!0}#l(E,O,B,M){const I=[],V=[],X=this._pageDiffs[B];let J;for(;null!==(J=E.exec(M));){if(O&&!this.#h(M,J.index,J[0].length))continue;const[w,e]=k(X,J.index,J[0].length);e&&(I.push(w),V.push(e))}this._pageMatches[B]=I,this._pageMatchesLength[B]=V}#i(E,O){const{matchDiacritics:B}=this._state;let M=!1;const I="[ ]*";return(E=E.replace(i,(V,X,J,w,e,t)=>X?`[ ]*\\${X}[ ]*`:J?`[ ]*${J}[ ]*`:w?"[ ]+":B?e||t:e?m.has(e.charCodeAt(0))?e:"":O?(M=!0,`${t}\\p{M}*`):t)).endsWith(I)&&(E=E.slice(0,E.length-I.length)),B&&O&&(M=!0,E=`${E}(?=[${g}]|[^\\p{M}]|$)`),[M,E]}#g(E){let O=this.#n;if(0===O.length)return;const{caseSensitive:B,entireWord:M,phraseSearch:I}=this._state,V=this._pageContents[E],X=this._hasDiacritics[E];let J=!1;if(I)[J,O]=this.#i(O,X);else{const t=O.match(/\S+/g);t&&(O=t.sort().reverse().map(o=>{const[b,d]=this.#i(o,X);return J||=b,`(${d})`}).join("|"))}O=new RegExp(O,`g${J?"u":""}${B?"":"i"}`),this.#l(O,M,E,V),this._state.highlightAll&&this.#s(E),this._resumePageIdx===E&&(this._resumePageIdx=null,this.#d());const e=this._pageMatches[E].length;e>0&&(this._matchesCountTotal+=e,this.#A())}#_(){if(this._extractTextPromises.length>0)return;let E=Promise.resolve();for(let O=0,B=this._linkService.pagesCount;O<B;O++){const M=(0,A.createPromiseCapability)();this._extractTextPromises[O]=M.promise,E=E.then(()=>this._pdfDocument.getPage(O+1).then(I=>I.getTextContent()).then(I=>{const V=[];for(const X of I.items)V.push(X.str),X.hasEOL&&V.push("\n");[this._pageContents[O],this._pageDiffs[O],this._hasDiacritics[O]]=x(V.join("")),M.resolve()},I=>{console.error(`Unable to get text content for page ${O+1}`,I),this._pageContents[O]="",this._pageDiffs[O]=null,this._hasDiacritics[O]=!1,M.resolve()}))}}#s(E){this._scrollMatches&&this._selected.pageIdx===E&&(this._linkService.page=E+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:E})}#a(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}#o(){const E=this._state.findPrevious,O=this._linkService.page-1,B=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=O,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,this.#a();for(let I=0;I<B;I++)this._pendingFindMatches.has(I)||(this._pendingFindMatches.add(I),this._extractTextPromises[I].then(()=>{this._pendingFindMatches.delete(I),this.#g(I)}))}if(""===this.#n)return void this.#p(F.FOUND);if(this._resumePageIdx)return;const M=this._offset;if(this._pagesToSearch=B,null!==M.matchIdx){if(!E&&M.matchIdx+1<this._pageMatches[M.pageIdx].length||E&&M.matchIdx>0)return M.matchIdx=E?M.matchIdx-1:M.matchIdx+1,void this.#c(!0);this.#f(E)}this.#d()}#u(E){const O=this._offset,B=E.length,M=this._state.findPrevious;return B?(O.matchIdx=M?B-1:0,this.#c(!0),!0):(this.#f(M),!!(O.wrapped&&(O.matchIdx=null,this._pagesToSearch<0))&&(this.#c(!1),!0))}#d(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");let E=null;do{const O=this._offset.pageIdx;if(E=this._pageMatches[O],!E){this._resumePageIdx=O;break}}while(!this.#u(E))}#f(E){const O=this._offset,B=this._linkService.pagesCount;O.pageIdx=E?O.pageIdx-1:O.pageIdx+1,O.matchIdx=null,this._pagesToSearch--,(O.pageIdx>=B||O.pageIdx<0)&&(O.pageIdx=E?B-1:0,O.wrapped=!0)}#c(E=!1){let O=F.NOT_FOUND;const B=this._offset.wrapped;if(this._offset.wrapped=!1,E){const M=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,O=B?F.WRAPPED:F.FOUND,-1!==M&&M!==this._selected.pageIdx&&this.#s(M)}this.#p(O,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this.#s(this._selected.pageIdx))}#b(E){const O=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||O&&this._pdfDocument!==O||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this.#p(F.FOUND),this._highlightMatches=!1,this.#a())})}#m(){const{pageIdx:E,matchIdx:O}=this._selected;let B=0,M=this._matchesCountTotal;if(-1!==O){for(let I=0;I<E;I++)B+=this._pageMatches[I]?.length||0;B+=O+1}return(B<1||B>M)&&(B=M=0),{current:B,total:M}}#A(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this.#m()})}#p(E,O=!1){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:E,previous:O,matchesCount:this.#m(),rawQuery:this._state?.query??null})}}},(R,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CharacterType=void 0,s.getCharacterType=function n(i){return function p(i){return i<11904}(i)?function A(i){return 0==(65408&i)}(i)?function _(i){return 32===i||9===i||13===i||10===i}(i)?P.SPACE:function C(i){return i>=97&&i<=122||i>=65&&i<=90}(i)||function F(i){return i>=48&&i<=57}(i)||95===i?P.ALPHA_LETTER:P.PUNCT:function g(i){return 3584==(65408&i)}(i)?P.THAI_LETTER:160===i?P.SPACE:P.ALPHA_LETTER:function c(i){return i>=13312&&i<=40959||i>=63744&&i<=64255}(i)?P.HAN_LETTER:function v(i){return i>=12448&&i<=12543}(i)?P.KATAKANA_LETTER:function h(i){return i>=12352&&i<=12447}(i)?P.HIRAGANA_LETTER:function m(i){return i>=65376&&i<=65439}(i)?P.HALFWIDTH_KATAKANA_LETTER:P.ALPHA_LETTER};const P={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};s.CharacterType=P},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PDFHistory=void 0,s.isDestArraysEqual=m,s.isDestHashesEqual=h;var p=P(6),A=P(17);function c(){return document.location.hash}function h(g,n){return"string"==typeof g&&"string"==typeof n&&(g===n||(0,p.parseQueryString)(g).get("nameddest")===n)}function m(g,n){function i(f,u){if(typeof f!=typeof u||Array.isArray(f)||Array.isArray(u))return!1;if(null!==f&&"object"==typeof f&&null!==u){if(Object.keys(f).length!==Object.keys(u).length)return!1;for(const S in f)if(!i(f[S],u[S]))return!1;return!0}return f===u||Number.isNaN(f)&&Number.isNaN(u)}if(!Array.isArray(g)||!Array.isArray(n)||g.length!==n.length)return!1;for(let f=0,u=g.length;f<u;f++)if(!i(g[f],n[f]))return!1;return!0}s.PDFHistory=class v{constructor({linkService:n,eventBus:i}){this.linkService=n,this.eventBus=i,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1,this.eventBus._on("pagesloaded",f=>{this._isPagesLoaded=!!f.pagesCount},{once:!0})})}initialize({fingerprint:n,resetHistory:i=!1,updateUrl:f=!1}){if(!n||"string"!=typeof n)return void console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');this._initialized&&this.reset();const u=""!==this._fingerprint&&this._fingerprint!==n;this._fingerprint=n,this._updateUrl=!0===f,this._initialized=!0,this._bindEvents();const S=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=c(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(S,!0)||i){const{hash:k,page:l,rotation:T}=this._parseCurrentHash(!0);return!k||u||i?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:k,page:l,rotation:T},!0)}const x=S.destination;this._updateInternalState(x,S.uid,!0),void 0!==x.rotation&&(this._initialRotation=x.rotation),x.dest?(this._initialBookmark=JSON.stringify(x.dest),this._destination.page=null):x.hash?this._initialBookmark=x.hash:x.page&&(this._initialBookmark=`page=${x.page}`)}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:n=null,explicitDest:i,pageNumber:f}){if(!this._initialized)return;if(n&&"string"!=typeof n)return void console.error(`PDFHistory.push: "${n}" is not a valid namedDest parameter.`);if(!Array.isArray(i))return void console.error(`PDFHistory.push: "${i}" is not a valid explicitDest parameter.`);if(!this._isValidPage(f)&&(null!==f||this._destination))return void console.error(`PDFHistory.push: "${f}" is not a valid pageNumber parameter.`);const u=n||JSON.stringify(i);if(!u)return;let S=!1;if(this._destination&&(h(this._destination.hash,u)||m(this._destination.dest,i))){if(this._destination.page)return;S=!0}this._popStateInProgress&&!S||(this._pushOrReplaceState({dest:i,hash:u,page:f,rotation:this.linkService.rotation},S),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushPage(n){if(this._initialized){if(!this._isValidPage(n))return void console.error(`PDFHistory.pushPage: "${n}" is not a valid page number.`);this._destination?.page!==n&&(this._popStateInProgress||(this._pushOrReplaceState({dest:null,hash:`page=${n}`,page:n,rotation:this.linkService.rotation}),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1}))))}}pushCurrentPosition(){!this._initialized||this._popStateInProgress||this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const n=window.history.state;this._isValidState(n)&&n.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const n=window.history.state;this._isValidState(n)&&n.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(n,i=!1){const f=i||!this._destination,u={fingerprint:this._fingerprint,uid:f?this._uid:this._uid+1,destination:n};let S;if(this._updateInternalState(n,u.uid),this._updateUrl&&n?.hash){const x=document.location.href.split("#")[0];x.startsWith("file://")||(S=`${x}#${n.hash}`)}f?window.history.replaceState(u,"",S):window.history.pushState(u,"",S)}_tryPushCurrentPosition(n=!1){if(!this._position)return;let i=this._position;if(n&&(i=Object.assign(Object.create(null),this._position),i.temporary=!0),!this._destination)return void this._pushOrReplaceState(i);if(this._destination.temporary)return void this._pushOrReplaceState(i,!0);if(this._destination.hash===i.hash||!this._destination.page&&this._numPositionUpdates<=50)return;let f=!1;if(this._destination.page>=i.first&&this._destination.page<=i.page){if(void 0!==this._destination.dest||!this._destination.first)return;f=!0}this._pushOrReplaceState(i,f)}_isValidPage(n){return Number.isInteger(n)&&n>0&&n<=this.linkService.pagesCount}_isValidState(n,i=!1){if(!n)return!1;if(n.fingerprint!==this._fingerprint){if(!i)return!1;{if("string"!=typeof n.fingerprint||n.fingerprint.length!==this._fingerprint.length)return!1;const[f]=performance.getEntriesByType("navigation");if("reload"!==f?.type)return!1}}return!(!Number.isInteger(n.uid)||n.uid<0||null===n.destination||"object"!=typeof n.destination)}_updateInternalState(n,i,f=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),f&&n?.temporary&&delete n.temporary,this._destination=n,this._uid=i,this._maxUid=Math.max(this._maxUid,i),this._numPositionUpdates=0}_parseCurrentHash(n=!1){const i=unescape(c()).substring(1),f=(0,p.parseQueryString)(i),u=f.get("nameddest")||"";let S=0|f.get("page");return(!this._isValidPage(S)||n&&u.length>0)&&(S=null),{hash:i,page:S,rotation:this.linkService.rotation}}_updateViewarea({location:n}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:n.pdfOpenParams.substring(1),page:this.linkService.page,first:n.pageNumber,rotation:n.rotation},!this._popStateInProgress&&(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},1e3))}_popState({state:n}){const i=c(),f=this._currentHash!==i;if(this._currentHash=i,!n){this._uid++;const{hash:S,page:x,rotation:k}=this._parseCurrentHash();return void this._pushOrReplaceState({hash:S,page:x,rotation:k},!0)}if(!this._isValidState(n))return;this._popStateInProgress=!0,f&&(this._blockHashChange++,(0,A.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then(()=>{this._blockHashChange--}));const u=n.destination;this._updateInternalState(u,n.uid,!0),(0,p.isValidRotation)(u.rotation)&&(this.linkService.rotation=u.rotation),u.dest?this.linkService.goToDestination(u.dest):u.hash?this.linkService.setHash(u.hash):u.page&&(this.linkService.page=u.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})}_pageHide(){(!this._destination||this._destination.temporary)&&this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PDFScriptingManager=void 0;var p=P(6),A=P(3);s.PDFScriptingManager=class C{constructor({eventBus:_,sandboxBundleSrc:c=null,scriptingFactory:v=null,docPropertiesLookup:h=null}){this._pdfDocument=null,this._pdfViewer=null,this._closeCapability=null,this._destroyCapability=null,this._scripting=null,this._mouseState=Object.create(null),this._ready=!1,this._eventBus=_,this._sandboxBundleSrc=c,this._scriptingFactory=v,this._docPropertiesLookup=h,this._scriptingFactory||window.addEventListener("updatefromsandbox",m=>{this._eventBus.dispatch("updatefromsandbox",{source:window,detail:m.detail})})}setViewer(_){this._pdfViewer=_}setDocument(_){var c=this;return r(function*(){if(c._pdfDocument&&(yield c._destroyScripting()),c._pdfDocument=_,!_)return;const[v,h,m]=yield Promise.all([_.getFieldObjects(),_.getCalculationOrderIds(),_.getJSActions()]);if(v||m){if(_===c._pdfDocument){try{c._scripting=c._createScripting()}catch(g){return console.error(`PDFScriptingManager.setDocument: "${g?.message}".`),void(yield c._destroyScripting())}c._internalEvents.set("updatefromsandbox",g=>{g?.source===window&&c._updateFromSandbox(g.detail)}),c._internalEvents.set("dispatcheventinsandbox",g=>{c._scripting?.dispatchEventInSandbox(g.detail)}),c._internalEvents.set("pagechanging",({pageNumber:g,previous:n})=>{g!==n&&(c._dispatchPageClose(n),c._dispatchPageOpen(g))}),c._internalEvents.set("pagerendered",({pageNumber:g})=>{c._pageOpenPending.has(g)&&g===c._pdfViewer.currentPageNumber&&c._dispatchPageOpen(g)}),c._internalEvents.set("pagesdestroy",function(){var g=r(function*(n){yield c._dispatchPageClose(c._pdfViewer.currentPageNumber),yield c._scripting?.dispatchEventInSandbox({id:"doc",name:"WillClose"}),c._closeCapability?.resolve()});return function(n){return g.apply(this,arguments)}}()),c._domEvents.set("mousedown",g=>{c._mouseState.isDown=!0}),c._domEvents.set("mouseup",g=>{c._mouseState.isDown=!1});for(const[g,n]of c._internalEvents)c._eventBus._on(g,n);for(const[g,n]of c._domEvents)window.addEventListener(g,n,!0);try{const g=yield c._getDocProperties();if(_!==c._pdfDocument)return;yield c._scripting.createSandbox({objects:v,calculationOrder:h,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:{...g,actions:m}}),c._eventBus.dispatch("sandboxcreated",{source:c})}catch(g){return console.error(`PDFScriptingManager.setDocument: "${g?.message}".`),void(yield c._destroyScripting())}yield c._scripting?.dispatchEventInSandbox({id:"doc",name:"Open"}),yield c._dispatchPageOpen(c._pdfViewer.currentPageNumber,!0),Promise.resolve().then(()=>{_===c._pdfDocument&&(c._ready=!0)})}}else yield c._destroyScripting()})()}dispatchWillSave(_){var c=this;return r(function*(){return c._scripting?.dispatchEventInSandbox({id:"doc",name:"WillSave"})})()}dispatchDidSave(_){var c=this;return r(function*(){return c._scripting?.dispatchEventInSandbox({id:"doc",name:"DidSave"})})()}dispatchWillPrint(_){var c=this;return r(function*(){return c._scripting?.dispatchEventInSandbox({id:"doc",name:"WillPrint"})})()}dispatchDidPrint(_){var c=this;return r(function*(){return c._scripting?.dispatchEventInSandbox({id:"doc",name:"DidPrint"})})()}get mouseState(){return this._mouseState}get destroyPromise(){return this._destroyCapability?.promise||null}get ready(){return this._ready}get _internalEvents(){return(0,A.shadow)(this,"_internalEvents",new Map)}get _domEvents(){return(0,A.shadow)(this,"_domEvents",new Map)}get _pageOpenPending(){return(0,A.shadow)(this,"_pageOpenPending",new Set)}get _visitedPages(){return(0,A.shadow)(this,"_visitedPages",new Map)}_updateFromSandbox(_){var c=this;return r(function*(){const v=c._pdfViewer.isInPresentationMode||c._pdfViewer.isChangingPresentationMode,{id:h,siblings:m,command:g,value:n}=_;if(!h){switch(g){case"clear":console.clear();break;case"error":console.error(n);break;case"layout":if(v)return;const f=(0,p.apiPageLayoutToViewerModes)(n);c._pdfViewer.spreadMode=f.spreadMode;break;case"page-num":c._pdfViewer.currentPageNumber=n+1;break;case"print":yield c._pdfViewer.pagesPromise,c._eventBus.dispatch("print",{source:c});break;case"println":console.log(n);break;case"zoom":if(v)return;c._pdfViewer.currentScaleValue=n;break;case"SaveAs":c._eventBus.dispatch("save",{source:c});break;case"FirstPage":c._pdfViewer.currentPageNumber=1;break;case"LastPage":c._pdfViewer.currentPageNumber=c._pdfViewer.pagesCount;break;case"NextPage":c._pdfViewer.nextPage();break;case"PrevPage":c._pdfViewer.previousPage();break;case"ZoomViewIn":if(v)return;c._pdfViewer.increaseScale();break;case"ZoomViewOut":if(v)return;c._pdfViewer.decreaseScale()}return}if(v&&_.focus)return;delete _.id,delete _.siblings;const i=m?[h,...m]:[h];for(const f of i){const u=document.getElementById(f);u?u.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:_})):c._pdfDocument?.annotationStorage.setValue(f,_)}})()}_dispatchPageOpen(_,c=!1){var v=this;return r(function*(){const h=v._pdfDocument,m=v._visitedPages;if(c&&(v._closeCapability=(0,A.createPromiseCapability)()),!v._closeCapability)return;const g=v._pdfViewer.getPageView(_-1);if(g?.renderingState!==p.RenderingStates.FINISHED)return void v._pageOpenPending.add(_);v._pageOpenPending.delete(_);const n=r(function*(){const i=yield m.has(_)?null:g.pdfPage?.getJSActions();h===v._pdfDocument&&(yield v._scripting?.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:_,actions:i}))})();m.set(_,n)})()}_dispatchPageClose(_){var c=this;return r(function*(){const v=c._pdfDocument,h=c._visitedPages;if(!c._closeCapability||c._pageOpenPending.has(_))return;const m=h.get(_);m&&(h.set(_,null),yield m,v===c._pdfDocument&&(yield c._scripting?.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:_})))})()}_getDocProperties(){var _=this;return r(function*(){if(_._docPropertiesLookup)return _._docPropertiesLookup(_._pdfDocument);const{docPropertiesLookup:c}=P(24);return c(_._pdfDocument)})()}_createScripting(){if(this._destroyCapability=(0,A.createPromiseCapability)(),this._scripting)throw new Error("_createScripting: Scripting already exists.");if(this._scriptingFactory)return this._scriptingFactory.createScripting({sandboxBundleSrc:this._sandboxBundleSrc});const{GenericScripting:_}=P(24);return new _(this._sandboxBundleSrc)}_destroyScripting(){var _=this;return r(function*(){if(!_._scripting)return _._pdfDocument=null,void _._destroyCapability?.resolve();_._closeCapability&&(yield Promise.race([_._closeCapability.promise,new Promise(c=>{setTimeout(c,1e3)})]).catch(c=>{}),_._closeCapability=null),_._pdfDocument=null;try{yield _._scripting.destroySandbox()}catch{}for(const[c,v]of _._internalEvents)_._eventBus._off(c,v);_._internalEvents.clear();for(const[c,v]of _._domEvents)window.removeEventListener(c,v,!0);_._domEvents.clear(),_._pageOpenPending.clear(),_._visitedPages.clear(),_._scripting=null,delete _._mouseState.isDown,_._ready=!1,_._destroyCapability?.resolve()})()}}},(R,s,P)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.GenericScripting=void 0,s.docPropertiesLookup=function A(_){return C.apply(this,arguments)};var p=P(3);function C(){return(C=r(function*(_){const v="".split("#")[0];let{info:h,metadata:m,contentDispositionFilename:g,contentLength:n}=yield _.getMetadata();if(!n){const{length:i}=yield _.getDownloadInfo();n=i}return{...h,baseURL:v,filesize:n,filename:g||(0,p.getPdfFilenameFromUrl)(""),metadata:m?.getRaw(),authors:m?.get("dc:creator"),numPages:_.numPages,URL:""}})).apply(this,arguments)}s.GenericScripting=class F{constructor(c){this._ready=(0,p.loadScript)(c,!0).then(()=>
1window.pdfjsSandbox.QuickJSSandbox())}createSandbox(c){var v=this;return r(function*(){(yield v._ready).create(c)})()}dispatchEventInSandbox(c){var v=this;return r(function*(){const h=yield v._ready;setTimeout(()=>h.dispatchEvent(c),0)})()}destroySandbox(){var c=this;return r(function*(){(yield c._ready).nukeSandbox()})()}}}],N={};function W(R){var s=N[R];if(void 0!==s)return s.exports;var P=N[R]={exports:{}};return H[R](P,P.exports,W),P.exports}var z={};return(()=>{var R=z;Object.defineProperty(R,"__esModule",{value:!0}),Object.defineProperty(R,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return C.AnnotationLayerBuilder}}),Object.defineProperty(R,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return s.DefaultAnnotationLayerFactory}}),Object.defineProperty(R,"DefaultStructTreeLayerFactory",{enumerable:!0,get:function(){return s.DefaultStructTreeLayerFactory}}),Object.defineProperty(R,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return s.DefaultTextLayerFactory}}),Object.defineProperty(R,"DefaultXfaLayerFactory",{enumerable:!0,get:function(){return s.DefaultXfaLayerFactory}}),Object.defineProperty(R,"DownloadManager",{enumerable:!0,get:function(){return F.DownloadManager}}),Object.defineProperty(R,"EventBus",{enumerable:!0,get:function(){return _.EventBus}}),Object.defineProperty(R,"GenericL10n",{enumerable:!0,get:function(){return c.GenericL10n}}),Object.defineProperty(R,"LinkTarget",{enumerable:!0,get:function(){return P.LinkTarget}}),Object.defineProperty(R,"NullL10n",{enumerable:!0,get:function(){return v.NullL10n}}),Object.defineProperty(R,"PDFFindController",{enumerable:!0,get:function(){return h.PDFFindController}}),Object.defineProperty(R,"PDFHistory",{enumerable:!0,get:function(){return m.PDFHistory}}),Object.defineProperty(R,"PDFLinkService",{enumerable:!0,get:function(){return P.PDFLinkService}}),Object.defineProperty(R,"PDFPageView",{enumerable:!0,get:function(){return g.PDFPageView}}),Object.defineProperty(R,"PDFScriptingManager",{enumerable:!0,get:function(){return n.PDFScriptingManager}}),Object.defineProperty(R,"PDFSinglePageViewer",{enumerable:!0,get:function(){return A.PDFSinglePageViewer}}),Object.defineProperty(R,"PDFViewer",{enumerable:!0,get:function(){return A.PDFViewer}}),Object.defineProperty(R,"ProgressBar",{enumerable:!0,get:function(){return p.ProgressBar}}),Object.defineProperty(R,"SimpleLinkService",{enumerable:!0,get:function(){return P.SimpleLinkService}}),Object.defineProperty(R,"StructTreeLayerBuilder",{enumerable:!0,get:function(){return i.StructTreeLayerBuilder}}),Object.defineProperty(R,"TextLayerBuilder",{enumerable:!0,get:function(){return f.TextLayerBuilder}}),Object.defineProperty(R,"XfaLayerBuilder",{enumerable:!0,get:function(){return u.XfaLayerBuilder}}),Object.defineProperty(R,"parseQueryString",{enumerable:!0,get:function(){return p.parseQueryString}});var s=W(1),P=W(5),p=W(6),A=W(10),C=W(2),F=W(16),_=W(17),c=W(18),v=W(4),h=W(20),m=W(22),g=W(12),n=W(23),i=W(7),f=W(8),u=W(9)})(),z})(),te.exports=W()},54968:(te,a,D)=>{"use strict";D.d(a,{R:()=>A});var r=D(38421),H=D(69751),N=D(86099),W=D(81144),z=D(30576),R=D(83268);const s=["addListener","removeListener"],P=["addEventListener","removeEventListener"],p=["on","off"];function A(v,h,m,g){if((0,z.m)(m)&&(g=m,m=void 0),g)return A(v,h,m).pipe((0,R.Z)(g));const[n,i]=function c(v){return(0,z.m)(v.addEventListener)&&(0,z.m)(v.removeEventListener)}(v)?P.map(f=>u=>v[f](h,u,m)):function F(v){return(0,z.m)(v.addListener)&&(0,z.m)(v.removeListener)}(v)?s.map(C(v,h)):function _(v){return(0,z.m)(v.on)&&(0,z.m)(v.off)}(v)?p.map(C(v,h)):[];if(!n&&(0,W.z)(v))return(0,N.z)(f=>A(f,h,m))((0,r.Xf)(v));if(!n)throw new TypeError("Invalid event target");return new H.y(f=>{const u=(...S)=>f.next(1<S.length?S:S[0]);return n(u),()=>i(u)})}function C(v,h){return m=>g=>v[m](h,g)}},84069:()=>{},22339:()=>{},64828:()=>{},27915:()=>{},25598:()=>{},50372:()=>{},17156:te=>{function a(r,H,N,W,z,R,s){try{var P=r[R](s),p=P.value}catch(A){return void N(A)}P.done?H(p):Promise.resolve(p).then(W,z)}te.exports=function D(r){return function(){var H=this,N=arguments;return new Promise(function(W,z){var R=r.apply(H,N);function s(p){a(R,W,z,s,P,"next",p)}function P(p){a(R,W,z,s,P,"throw",p)}s(void 0)})}},te.exports.__esModule=!0,te.exports.default=te.exports},89380:(te,a,D)=>{"use strict";var r,H;D.d(a,{rQ:()=>g,xC:()=>n});var N=D(94650),W=D(54968),z=D(77579),R=D(32076),s=D(82722),P=D(78372),p=D(39300),A=D(85943),C=D(45178);const F=["pdfViewerContainer"];function v(i,f,u){i[f]=u}function h(){return typeof window>"u"}h()||v(r||(r=D.t(A,2)),"verbosity",A.VerbosityLevel.INFOS);var m=(()=>{return(i=m||(m={}))[i.DISABLED=0]="DISABLED",i[i.ENABLED=1]="ENABLED",i[i.ENHANCED=2]="ENHANCED",m;var i})();let g=(()=>{class i{constructor(u,S){if(this.element=u,this.ngZone=S,this.isVisible=!1,this._cMapsUrl=typeof(r||(r=D.t(A,2)))<"u"?`https://unpkg.com/pdfjs-dist@${A.version}/cmaps/`:null,this._imageResourcesPath=typeof(r||(r=D.t(A,2)))<"u"?`https://unpkg.com/pdfjs-dist@${A.version}/web/images/`:null,this._renderText=!0,this._renderTextMode=m.ENABLED,this._stickToPage=!1,this._originalSize=!0,this._page=1,this._zoom=1,this._zoomScale="page-width",this._rotation=0,this._showAll=!0,this._canAutoResize=!0,this._fitToPage=!1,this._externalLinkTarget="blank",this._showBorders=!1,this.resizeTimeout=null,this.pageScrollTimeout=null,this.isInitialized=!1,this.destroy$=new z.x,this.afterLoadComplete=new N.vpe,this.pageRendered=new N.vpe,this.pageInitialized=new N.vpe,this.textLayerRendered=new N.vpe,this.onError=ne
1w N.vpe,this.onProgress=new N.vpe,this.pageChange=new N.vpe(!0),h())return;let x;const k=A.version;x=window[`pdfWorkerSrc${k}`]||(window.hasOwnProperty("pdfWorkerSrc")&&"string"==typeof window.pdfWorkerSrc&&window.pdfWorkerSrc?window.pdfWorkerSrc:`https://cdn.jsdelivr.net/npm/pdfjs-dist@${k}/legacy/build/pdf.worker.min.js`),v(A.GlobalWorkerOptions,"workerSrc",x)}set cMapsUrl(u){this._cMapsUrl=u}set page(u){const S=u=parseInt(u,10)||1;this._pdf&&(u=this.getValidPageNumber(u)),this._page=u,S!==u&&this.pageChange.emit(u)}set renderText(u){this._renderText=u}set renderTextMode(u){this._renderTextMode=u}set originalSize(u){this._originalSize=u}set showAll(u){this._showAll=u}set stickToPage(u){this._stickToPage=u}set zoom(u){u<=0||(this._zoom=u)}get zoom(){return this._zoom}set zoomScale(u){this._zoomScale=u}get zoomScale(){return this._zoomScale}set rotation(u){"number"==typeof u&&u%90==0?this._rotation=u:console.warn("Invalid pages rotation angle.")}set externalLinkTarget(u){this._externalLinkTarget=u}set autoresize(u){this._canAutoResize=Boolean(u)}set fitToPage(u){this._fitToPage=Boolean(u)}set showBorders(u){this._showBorders=Boolean(u)}static getLinkTarget(u){switch(u){case"blank":return C.LinkTarget.BLANK;case"none":return C.LinkTarget.NONE;case"self":return C.LinkTarget.SELF;case"parent":return C.LinkTarget.PARENT;case"top":return C.LinkTarget.TOP}return null}ngAfterViewChecked(){if(this.isInitialized)return;const u=this.pdfViewerContainer.nativeElement.offsetParent;!0!==this.isVisible||null!=u?!1===this.isVisible&&null!=u&&(this.isVisible=!0,setTimeout(()=>{this.initialize(),this.ngOnChanges({src:this.src})})):this.isVisible=!1}ngOnInit(){this.initialize(),this.setupResizeListener()}ngOnDestroy(){this.clear(),this.destroy$.next(),this.loadingTask=null}ngOnChanges(u){if(!h()&&this.isVisible)if("src"in u)this.loadPDF();else if(this._pdf){if("renderText"in u?(this.pdfViewer.textLayerMode=this._renderText?this._renderTextMode:m.DISABLED,this.resetPdfDocument()):"showAll"in u&&(this.setupViewer(),this.resetPdfDocument()),"page"in u){const{page:S}=u;if(S.currentValue===this._latestScrolledPage)return;this.pdfViewer.scrollPageIntoView({pageNumber:this._page})}this.update()}}updateSize(){(0,R.D)(this._pdf.getPage(this.pdfViewer.currentPageNumber)).pipe((0,s.R)(this.destroy$)).subscribe({next:u=>{const S=this._rotation+u.rotate,x=u.getViewport({scale:this._zoom,rotation:S}).width*i.CSS_UNITS;let k=this._zoom,l=!0;if(!this._originalSize||this._fitToPage&&x>this.pdfViewerContainer.nativeElement.clientWidth){const T=u.getViewport({scale:1,rotation:S}
1);k=this.getScale(T.width,T.height),l=!this._stickToPage}this.pdfViewer._setScale(k,l)}})}clear(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._latestScrolledPage=0,this._pdf.destroy(),this._pdf=null,this.pdfViewer.setDocument(null),this.pdfLinkService.setDocument(null,null),this.pdfFindController.setDocument(null))}getPDFLinkServiceConfig(){const u=i.getLinkTarget(this._externalLinkTarget);return u?{externalLinkTarget:u}:{}}initEventBus(){this.eventBus=function _(i,f){const u=new i.EventBus;return function c(i,f){(0,W.R)(i,"documentload").pipe((0,s.R)(f)).subscribe(()=>{const u=document.createEvent("CustomEvent");u.initCustomEvent("documentload",!0,!0,{}),window.dispatchEvent(u)}),(0,W.R)(i,"pagerendered").pipe((0,s.R)(f)).subscribe(({pageNumber:u,cssTransform:S,source:x})=>{const k=document.createEvent("CustomEvent");k.initCustomEvent("pagerendered",!0,!0,{pageNumber:u,cssTransform:S}),x.div.dispatchEvent(k)}),(0,W.R)(i,"textlayerrendered").pipe((0,s.R)(f)).subscribe(({pageNumber:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("textlayerrendered",!0,!0,{pageNumber:u}),S.textLayerDiv.dispatchEvent(x)}),(0,W.R)(i,"pagechanging").pipe((0,s.R)(f)).subscribe(({pageNumber:u,source:S})=>{const x=document.createEvent("UIEvents");x.initEvent("pagechanging",!0,!0),x.pageNumber=u,S.container.dispatchEvent(x)}),(0,W.R)(i,"pagesinit").pipe((0,s.R)(f)).subscribe(({source:u})=>{const S=document.createEvent("CustomEvent");S.initCustomEvent("pagesinit",!0,!0,null),u.container.dispatchEvent(S)}),(0,W.R)(i,"pagesloaded").pipe((0,s.R)(f)).subscribe(({pagesCount:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("pagesloaded",!0,!0,{pagesCount:u}),S.container.dispatchEvent(x)}),(0,W.R)(i,"scalechange").pipe((0,s.R)(f)).subscribe(({scale:u,presetValue:S,source:x})=>{const k=document.createEvent("UIEvents");k.initEvent("scalechange",!0,!0),k.scale=u,k.presetValue=S,x.container.dispatchEvent(k)}),(0,W.R)(i,"updateviewarea").pipe((0,s.R)(f)).subscribe(({location:u,source:S})=>{const x=document.createEvent("UIEvents");x.initEvent("updateviewarea",!0,!0),x.location=u,S.container.dispatchEvent(x)}),(0,W.R)(i,"find").pipe((0,s.R)(f)).subscribe(({source:u,type:S,query:x,phraseSearch:k,caseSensitive:l,highlightAll:T,findPrevious:E})=>{if(u===window)return;const O=document.createEvent("CustomEvent");O.initCustomEvent("find"+S,!0,!0,{query:x,phraseSearch:k,caseSensitive:l,highlightAll:T,findPrevious:E}),window.dispatchEvent(O)}),(0,W.R)(i,"attachmentsloaded").pipe((0,s.R)(f)).subscribe(({attachmentsCount:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("attachmentsloaded",!0,!0,{attachmentsCount:u}),S.container.dispatchEvent(x)}),(0,W.R)(i,"sidebarviewchanged").pipe((0,s.R)(f)).subscribe(({view:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("sidebarviewchanged",!0,!0,{view:u}),S.outerContainer.dispatchEvent(x)}),(0,W.R)(i,"pagemode").pipe((0,s.R)(f)).subscribe(({mode:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("pagemode",!0,!0,{mode:u}),S.pdfViewer.container.dispatchEvent(x)}),(0,W.R)(i,"namedaction").pipe((0,s.R)(f)).subscribe(({action:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("namedaction",!0,!0,{action:u}),S.pdfViewer.container.dispatchEvent(x)}),(0,W.R)(i,"presentationmodechanged").pipe((0,s.R)(f)).subscribe(({active:u,switchInProgress:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("presentationmodechanged",!0,!0,{active:u,switchInProgress:S}),window.dispatchEvent(x)}),(0,W.R)(i,"outlineloaded").pipe((0,s.R)(f)).subscribe(({outlineCount:u,source:S})=>{const x=document.createEvent("CustomEvent");x.initCustomEvent("outlineloaded",!0,!0,{outlineCount:u}),S.container.dispatchEvent(x)})}(u,f),u}(H||(H=D.t(C,2)),this.destroy$),(0,W.R)(this.eventBus,"pagerendered").pipe((0,s.R)(this.destroy$)).subscribe(u=>{this.pageRendered.emit(u)}),(0,W.R)(this.eventBus,"pagesinit").pipe((0,s.R)(this.destroy$)).subscribe(u=>{this.pageInitialized.emit(u)}),(0,W.R)(this.eventBus,"pagechanging").pipe((0,s.R)(this.destroy$)).subscribe(({pageNumber:u})=>{this.pageScrollTimeout&&clearTimeout(this.pageScrollTimeout),this.pageScrollTimeout=window.setTimeout(()=>{this._latestScrolledPage=u,this.pageChange.emit(u)},100)}),(0,W.R)(this.eventBus,"textlayerrendered").pipe((0,s.R)(this.destroy$)).subscribe(u=>{this.textLayerRendered.emit(u)})}initPDFServices(){this.pdfLinkService=new C.PDFLinkService({eventBus:this.eventBus,...this.getPDFLinkServiceConfig()}),this.pdfFindController=new C.PDFFindController({eventBus:this.eventBus,linkService:this.pdfLinkService})}getPDFOptions(){return{eventBus:this.eventBus,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfLinkService,textLayerMode:this._renderText?this._renderTextMode:m.DISABLED,findController:this.pdfFindController,renderer:"canvas",l10n:void 0,imageResourcesPath:this._imageResourcesPath}}setupViewer(){v(r||(r=D.t(A,2)),"disableTextLayer",!this._renderText),this.initPDFServices(),this.pdfViewer=this._showAll?new C.PDFViewer(this.getPDFOptions()):new C.PDFSinglePageViewer(this.getPDFOptions()),this.pdfLinkService.setViewer(this.pdfViewer),this.pdfViewer._currentPageNumber=this._page}getValidPageNumber(u){return u<1?1:u>this._pdf.numPages?this._pdf.numPages:u}
1getDocumentParams(){const u=typeof this.src;if(!this._cMapsUrl)return this.src;const S={cMapUrl:this._cMapsUrl,cMapPacked:!0,enableXfa:!0};return"string"===u?S.url=this.src:"object"===u&&(void 0!==this.src.byteLength?S.data=this.src:Object.assign(S,this.src)),S}loadPDF(){if(!this.src)return;if(this.lastLoaded===this.src)return void this.update();this.clear(),this.setupViewer(),this.loadingTask=A.getDocument(this.getDocumentParams()),this.loadingTask.onProgress=S=>{this.onProgress.emit(S)};const u=this.src;(0,R.D)(this.loadingTask.promise).pipe((0,s.R)(this.destroy$)).subscribe({next:S=>{this._pdf=S,this.lastLoaded=u,this.afterLoadComplete.emit(S),this.resetPdfDocument(),this.update()},error:S=>{this.lastLoaded=null,this.onError.emit(S)}})}update(){this.page=this._page,this.render()}render(){this._page=this.getValidPageNumber(this._page),(0!==this._rotation||this.pdfViewer.pagesRotation!==this._rotation)&&setTimeout(()=>{this.pdfViewer.pagesRotation=this._rotation}),this._stickToPage&&setTimeout(()=>{this.pdfViewer.currentPageNumber=this._page}),this.updateSize()}getScale(u,S){const x=this._showBorders?2*i.BORDER_WIDTH:0,k=this.pdfViewerContainer.nativeElement.clientWidth-x,l=this.pdfViewerContainer.nativeElement.clientHeight-x;if(0===l||0===S||0===k||0===u)return 1;let T=1;switch(this._zoomScale){case"page-fit":T=Math.min(l/S,k/u);break;case"page-height":T=l/S;break;default:T=k/u}return this._zoom*T/i.CSS_UNITS}resetPdfDocument(){this.pdfLinkService.setDocument(this._pdf,null),this.pdfFindController.setDocument(this._pdf),this.pdfViewer.setDocument(this._pdf)}initialize(){h()||!this.isVisible||(this.isInitialized=!0,this.initEventBus(),this.setupViewer())}setupResizeListener(){h()||this.ngZone.runOutsideAngular(()=>{(0,W.R)(window,"resize").pipe((0,P.b)(100),(0,p.h)(()=>this._canAutoResize&&!!this._pdf),(0,s.R)(this.destroy$)).subscribe(()=>{this.updateSize()})})}}return i.CSS_UNITS=96/72,i.BORDER_WIDTH=9,i.\u0275fac=function(u){return new(u||i)(N.Y36(N.SBq),N.Y36(N.R0b))},i.\u0275cmp=N.Xpm({type:i,selectors:[["pdf-viewer"]],viewQuery:function(u,S){if(1&u&&N.Gf(F,5),2&u){let x;N.iGM(x=N.CRH())&&(S.pdfViewerContainer=x.first)}},inputs:{src:"src",cMapsUrl:["c-maps-url","cMapsUrl"],page:"page",renderText:["render-text","renderText"],renderTextMode:["render-text-mode","renderTextMode"],originalSize:["original-size","originalSize"],showAll:["show-all","showAll"],stickToPage:["stick-to-page","stickToPage"],zoom:"zoom",zoomScale:["zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:["external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:["fit-to-page","fitToPage"],showBorders:["show-borders","showBorders"]},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",pageInitialized:"pages-initialized",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},features:[N.TTD],decls:3,vars:0,consts:[[1,"ng2-pdf-viewer-container"],["pdfViewerContainer",""],[1,"pdfViewer"]],template:function(u,S){1&u&&(N.TgZ(0,"div",0,1),N._UZ(2,"div",2),N.qZA())},styles:[".ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:absolute;height:100%;width:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%]{display:block;position:relative}[_nghost-%COMP%] {--pdfViewer-padding-bottom: 0;--page-margin: 1px auto -8px;--page-border: 9px solid transparent;--spreadHorizontalWrapped-margin-LR: -3.5px;--zoom-factor: 1;--viewport-scale-factor: 1;--shadow: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAA1ElEQVQ4jbWUWw6EIAxFy2NFs/8NzR4UJhpqLsdi5mOmSSMUOfYWqv3S0gMr4XlYH/64gZa/gN3ANYA7KAXALt4ktoQ5MI9YxqaG8bWmsIysMuT6piSQCa4whZThCu8CM4zP9YJaKci9jicPq3NcBWYoPMGUlhG7ivtkB+gVyFY75wXghOvh8t5mto1Mdim6e+MBqH6XsY+YAwjpq3vGF7weTWQptLEDVCZvPTMl5JZZsdh47FHW6qFMyvLYqjcnmdFfY9Xk/KDOlzCusX2mi/ofM7MPkzBcSp4Q1/wAAAAASUVORK5CYII=);--viewer-container-height: 0;--annotation-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\");--xfa-unfocused-field-background: url(\"data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>\")}@media screen and (forced-colors: active){[_nghost-%COMP%] {--pdfViewer-padding-bottom: 9px;--page-margin: 9px auto 0;--page-border: none;--spreadHorizontalWrapped-margin-LR: 4.5px}}[_nghost-%COMP%] .textLayer{position:absolute;text-align:initial;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.2;line-height:1;-webkit-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none}[_nghost-%COMP%] .textLayer span, [_nghost-%COMP%] .textLayer br{color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%}[_nghost-%COMP%] .textLayer span.markedContent{top:0;height:0}[_nghost-%COMP%] .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%] .textLayer .highlight.appended{position:initial}[_nghost-%COMP%] .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%] .textLayer ::selection{background:blue}[_nghost-%COMP%] .textLayer br::selection{background:transparent}[_nghost-%COMP%] .textLayer .endOfContent{display:block;position:absolute;
1left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .textLayer .endOfContent.active{top:0}[_nghost-%COMP%] .annotationLayer section{position:absolute;text-align:initial}[_nghost-%COMP%] .annotationLayer .linkAnnotation>a, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>canvas{position:relative;top:0;left:0;z-index:-1}[_nghost-%COMP%] .annotationLayer .linkAnnotation>a:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover{opacity:.2;background:yellow;box-shadow:0 2px 10px #ff0}[_nghost-%COMP%] .annotationLayer .textAnnotation img{position:absolute;cursor:pointer}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{background-image:var(--annotation-unfocused-field-background);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{font:message-box;font-size:9px;resize:none}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea[disabled], [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:none;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:hover, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:1px solid black}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:focus, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input :focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea :focus, [_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select :focus, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox :focus, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton :focus{background-image:none;background-color:transparent;outline:auto}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:#000;content:\"\";display:block;position:absolute}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}[_nghost-%COMP%] .annotationLayer .popupWrapper{position:absolute;width:20em}[_nghost-%COMP%] .annotationLayer .popup{position:absolute;z-index:200;max-width:20em;background-color:#ff9;box-shadow:0 2px 5px #888;border-radius:2px;padding:6px;margin-left:5px;cursor:pointer;font:message-box;font-size:9px;white-space:normal;word-wrap:break-word}[_nghost-%COMP%] .annotationLayer .popup>*{font-size:9px}
1[_nghost-%COMP%] .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%] .annotationLayer .popupDate{display:inline-block;margin-left:5px}[_nghost-%COMP%] .annotationLayer .popupContent{border-top:1px solid #333333;margin-top:2px;padding-top:2px}[_nghost-%COMP%] .annotationLayer .richText>*{white-space:pre-wrap}[_nghost-%COMP%] .annotationLayer .highlightAnnotation, [_nghost-%COMP%] .annotationLayer .underlineAnnotation, [_nghost-%COMP%] .annotationLayer .squigglyAnnotation, [_nghost-%COMP%] .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%] .annotationLayer .freeTextAnnotation, [_nghost-%COMP%] .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%] .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%] .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%] .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%] .annotationLayer .caretAnnotation, [_nghost-%COMP%] .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .stampAnnotation, [_nghost-%COMP%] .annotationLayer .fileAttachmentAnnotation{cursor:pointer}[_nghost-%COMP%] .xfaLayer .highlight{margin:-1px;padding:1px;background-color:#efcbed;border-radius:4px}[_nghost-%COMP%] .xfaLayer .highlight.appended{position:initial}[_nghost-%COMP%] .xfaLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .xfaLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .xfaLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .xfaLayer .highlight.selected{background-color:#cbdfcb}[_nghost-%COMP%] .xfaLayer ::selection{background:blue}[_nghost-%COMP%] .xfaPage{overflow:hidden;position:relative}[_nghost-%COMP%] .xfaContentarea{position:absolute}[_nghost-%COMP%] .xfaPrintOnly{display:none}[_nghost-%COMP%] .xfaLayer{position:absolute;text-align:initial;top:0;left:0;transform-origin:0 0;line-height:1.2}[_nghost-%COMP%] .xfaLayer *{color:inherit;font:inherit;font-style:inherit;font-weight:inherit;font-feature-settings:inherit;font-kerning:inherit;letter-spacing:-.01px;text-align:inherit;text-decoration:inherit;box-sizing:border-box;background-color:transparent;padding:0;margin:0;pointer-events:auto;line-height:inherit}[_nghost-%COMP%] .xfaLayer div{pointer-events:none}[_nghost-%COMP%] .xfaLayer svg{pointer-events:none}[_nghost-%COMP%] .xfaLayer svg *{pointer-events:none}[_nghost-%COMP%] .xfaLayer a{color:#00f}[_nghost-%COMP%] .xfaRich li{margin-left:3em}[_nghost-%COMP%] .xfaFont{color:#000;font-weight:400;font-feature-settings:\"kern\" off;font-kerning:none;font-size:10px;font-style:normal;letter-spacing:0;text-decoration:none;vertical-align:0}[_nghost-%COMP%] .xfaCaption{overflow:hidden;flex:0 0 auto}[_nghost-%COMP%] .xfaCaptionForCheckButton{overflow:hidden;flex:1 1 auto}[_nghost-%COMP%] .xfaLabel{height:100%;width:100%}[_nghost-%COMP%] .xfaLeft{display:flex;flex-direction:row;align-items:center}[_nghost-%COMP%] .xfaRight{display:flex;flex-direction:row-reverse;align-items:center}[_nghost-%COMP%] .xfaLeft>.xfaCaption, [_nghost-%COMP%] .xfaLeft>.xfaCaptionForCheckButton, [_nghost-%COMP%] .xfaRight>.xfaCaption, [_nghost-%COMP%] .xfaRight>.xfaCaptionForCheckButton{max-height:100%}[_nghost-%COMP%] .xfaTop{display:flex;flex-direction:column;align-items:flex-start}[_nghost-%COMP%] .xfaBottom{display:flex;flex-direction:column-reverse;align-items:flex-start}[_nghost-%COMP%] .xfaTop>.xfaCaption, [_nghost-%COMP%] .xfaTop>.xfaCaptionForCheckButton, [_nghost-%COMP%] .xfaBottom>.xfaCaption, [_nghost-%COMP%] .xfaBottom>.xfaCaptionForCheckButton{width:100%}[_nghost-%COMP%] .xfaBorder{background-color:transparent;position:absolute;pointer-events:none}[_nghost-%COMP%] .xfaWrapped{width:100%;height:100%}[_nghost-%COMP%] .xfaTextfield:focus, [_nghost-%COMP%] .xfaSelect:focus{background-image:none;background-color:transparent;outline:auto;outline-offset:-1px}[_nghost-%COMP%] .xfaCheckbox:focus, [_nghost-%COMP%] .xfaRadio:focus{outline:auto}[_nghost-%COMP%] .xfaTextfield, [_nghost-%COMP%] .xfaSelect{height:100%;width:100%;flex:1 1 auto;border:none;resize:none;background-image:var(--xfa-unfocused-field-background)}[_nghost-%COMP%] .xfaTop>.xfaTextfield, [_nghost-%COMP%] .xfaTop>.xfaSelect, [_nghost-%COMP%] .xfaBottom>.xfaTextfield, [_nghost-%COMP%] .xfaBottom>.xfaSelect{flex:0 1 auto}
1[_nghost-%COMP%] .xfaButton{cursor:pointer;width:100%;height:100%;border:none;text-align:center}[_nghost-%COMP%] .xfaLink{width:100%;height:100%;position:absolute;top:0;left:0}[_nghost-%COMP%] .xfaCheckbox, [_nghost-%COMP%] .xfaRadio{width:100%;height:100%;flex:0 0 auto;border:none}[_nghost-%COMP%] .xfaRich{white-space:pre-wrap;width:100%;height:100%}[_nghost-%COMP%] .xfaImage{object-position:left top;object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .xfaLrTb, [_nghost-%COMP%] .xfaRlTb, [_nghost-%COMP%] .xfaTb{display:flex;flex-direction:column;align-items:stretch}[_nghost-%COMP%] .xfaLr{display:flex;flex-direction:row;align-items:stretch}[_nghost-%COMP%] .xfaRl{display:flex;flex-direction:row-reverse;align-items:stretch}[_nghost-%COMP%] .xfaTb>div{justify-content:left}[_nghost-%COMP%] .xfaPosition{position:relative}[_nghost-%COMP%] .xfaArea{position:relative}[_nghost-%COMP%] .xfaValignMiddle{display:flex;align-items:center}[_nghost-%COMP%] .xfaTable{display:flex;flex-direction:column;align-items:stretch}[_nghost-%COMP%] .xfaTable .xfaRow{display:flex;flex-direction:row;align-items:stretch}[_nghost-%COMP%] .xfaTable .xfaRlRow{display:flex;flex-direction:row-reverse;align-items:stretch;flex:1}[_nghost-%COMP%] .xfaTable .xfaRlRow>div{flex:1}[_nghost-%COMP%] .xfaNonInteractive input, [_nghost-%COMP%] .xfaNonInteractive textarea, [_nghost-%COMP%] .xfaDisabled input, [_nghost-%COMP%] .xfaDisabled textarea, [_nghost-%COMP%] .xfaReadOnly input, [_nghost-%COMP%] .xfaReadOnly textarea{background:initial}@media print{[_nghost-%COMP%] .xfaTextfield, [_nghost-%COMP%] .xfaSelect{background:transparent}[_nghost-%COMP%] .xfaSelect{-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:1px;text-overflow:\"\"}}[_nghost-%COMP%] .pdfViewer{padding-bottom:var(--pdfViewer-padding-bottom)}[_nghost-%COMP%] .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%] .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:var(--page-margin);position:relative;overflow:visible;border:var(--page-border);background-clip:content-box;border-image:var(--shadow) 9 9 repeat;background-color:#fff}[_nghost-%COMP%] .pdfViewer .dummyPage{position:relative;width:0;height:var(--viewer-container-height)}[_nghost-%COMP%] .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%] .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%] .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .pdfViewer.scrollWrapped, [_nghost-%COMP%] .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .spread{white-space:nowrap}[_nghost-%COMP%] .pdfViewer.removePageBorders, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%] .spread .page, [_nghost-%COMP%] .spread .dummyPage, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}[_nghost-%COMP%] .spread .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page{margin-left:var(--spreadHorizontalWrapped-margin-LR);margin-right:var(--spreadHorizontalWrapped-margin-LR)}[_nghost-%COMP%] .pdfViewer.removePageBorders .spread .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%] .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%] .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%] .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0;background:url(data:image/gif;base64,R0lGODlhGAAYAPQQAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/ilPcHRpbWl6ZWQgd2l0aCBodHRwczovL2V6Z2lmLmNvbS9vcHRpbWl6ZQAh+QQJBwAQACwAAAAAGAAYAAAFmiAkjiTkOGVaBgjZNGSgkgKjjM8zLoI8iy+BKCdiCX8iBeMAhEEIPRXLxViYUE9CbCQoFAzFhHY3zkaT3oPvBz1zE4UBsr1eWZH4vAowOBwGAHk8AoQLfH6Agm0Ed3qOAXWOIgQKiWyFJQgDgJEpdG+WEACNEFNFmKVlVzJQk6qdkwqBoi1mebJ3ALNGeIZHtGSwNDS1RZKueCEAIfkECQcAEAAsAAAAABgAGAAABZcgJI4kpChlWgYCWRQkEKgjURgjw4zOg9CjVwuiEyEeO6CxkBC9nA+HiuUqLEyoBZI0Mx4SAF
1FgQCDZuguBoGv6Dtg0gvpqdhxQQDkBzuUr/4A1JwMKP39pc2mDhYCIc4GQYn6QCwCMeY91l0p6dBAEJ0OfcFRimZ91Mwt0alxxAIZyRmuAsKxDLKKvZbM1tJxmvGKRpn8hACH5BAkHABAALAAAAAAYABgAAAWhICSOJGQYZVoGAnkcJBKoI3EAY1GMCtPSosSBINKJBIwGkHdwBGGQA0OhYpEGQxNqkYzNIITBACEKKBaxxNfBeOCO4vMy0Hg8nDHFeCktkKtfNAtoS4UqAicKBj9zBAKPC4iKi4aRkISGmWWBmjUIAIyHkCUEAKCVo2WmREecVqoCgZhgP4NHrGWCj7e3szSpuxAsoVWxnp6cVV4kyZW+KSEAIfkECQcAEAAsAAAAABgAGAAABZkgJI4kBABlWgYEOQykEKgjMSDjcYxG0dKi108nEhQKQN4rCIMkCgbawjWYnSCLY2yGVSgEooBhWqsGGwxc0RtNBgoMhmJ1QgETjANYFeBKyUmBKQQIdT9JDmgPDQ6EhoKJD4sOgpWWgiwChyqEBH5hmptSoSOZgJ4kLKWkYTF7C2SaqaM/hEWygay4mYG8t6uffFuzl1iANCEAIfkECQcAEAAsAAAAABgAGAAABZ0gJI4khCBlmhKkopBCoI6LIozDMAIHO4uuBVBnOiR+I4FrCDwAZsKdQnaCLIwwmRUA8JmioprWUCjcwlwUMnAoG0qL03k2KCS8cC0UjOzDCQKBfHQFDAwFU4CCfgqFhy9+kZJWgzSKSAcPZn+BfQENDw8OljGWJAFeDoZPYTBnC1GdSXqnsoBolSulX2GyP6hgvnG0KrS3NJNhuSQhACH5BAkHABAALAAAAAAYABgAAAWaICSOJCQIZZoupGGQRKCOC0CMijIiwz2LABtQZxoMfjQhxAXszWQ7gOwECRhh0MCJJRJARTUoIHFAgbfI6uBwAJS01J/i4PClVYHvfV8lbLlIBmwFbQt+aGmChG18jXeGT4dICQxlb4g/AQUMDER9XjR6BAdiDQwINDBmkAsPDVh4cX4imw53iLKuaVqAcUsPqEiidkt6j4AzIQAh+QQJBwAQACwAAAAAGAAYAAAFmSAkjiREEGWaBiSCtCoZCMsIAKOg1LEo0KKbaKFQ9EYLoOkFuQlirNxzCQkUW9GZ0hQd4nyDAWr4G/esYSbyZFYZwu3jqiuvr8u8I2BwOAwASXh1e31/doeHC3klWnElfAlTd46MfQUGk2stCVEGBQWSdCciDg5VDAVYKoEiDQ0iBwxGcj9RDw8+qHIzebc2DJJQJK6qiKVyIQAh+QQJBwAQACwAAAAAGAAYAAAFmSAkjiS0LGWaBiRBtCoZCKgoCCMB1DF0sz6cCQDo5W62l28XAyZFpyECBv3lnCbhUqHMIo0Qg4Jbmn1jRCa4iV27TzfXGjEecOFWMN1OdvvfPGUuXSoKBw6EXokrAwcHRVU0UAeEBANAAAmUI1gNDyhjJgUHLW0iDg8FIqOnBQZrDA9TELE2rEYIDw4jta2LMpCrqld/YQpgIQAh+QQJBwAQACwAAAAAGAAYAAAFmyAkjiS0LGWaBiRBkKw6BgIqCsJcyyMe4yJajhcEml5H26o1PN2QQd3uFiv2AADlAgflIbDdZLgkABOJgep5LfWty4p4zeU+w+XsvJWXliEKDwdEBgMKYQ4PDw1qK3EDCCMAiQ5BCV0LCj+FSDQkgCgGBiYHAy2MIgoMghAHqw4HAGsNDEMFBTekdgwKI7aRB2MwkL2rVHoQoWchACH5BAkHABAALAAAAAAYABgAAAWWICSOJLQsZZoGJEGQrDoGAioKwlzLIx7jIlqOFwSaXkfbqjU83ZBB3e4WK0qrCxyU55peid0qcUwuixyNx6PhILsAcAJazXYj4lvz2MkLiFsHDAlEcABKZwwMBX8pBgoKQxAIigpBA1sLBj+PSDQkB4uSACYDlTMyBgWDEKVnl2QFBUigN61gBQYjtLV5JZ4jtlR6omMhACH5BAkHABAALAAAAAAYABgAAAWaICSOJLQsZZoGJEGQrDoGAioKwlzLIx7jIlqOFwSaXkdbidYanm7I4AjwYDh6saJuJ3JUG1mZi9srPA7EcRimJLrfJYWZUVC8TziXnEG3u/E+cIJaPAFrPQl1aQAIbRAGBZGHJQiMUQKRBkEKbQsAPZaEXQcslSYKmjMyAAdXj34ACkNEiUgDA5t+PAQHn6Ogjkuzry2DNwhuIQAh+QQFBwAQACwAAAAAGAAYAAAFnCAkjiS0LGVaBgBJEGSguo8zCsK4CPIsMg+ECCcKEH0ix6MwhJl4KiOp8UCdmrEbo6EoHpxF8A6aBBZ6vhf5dmAkkGr0CoWs21WGQ2FvsI9xC3l7B311fy93iWGKJQQOhHCAJQB6A3IqcWwJLU90i2FkUiMKlhBELEI6MwgDXRAGhQgAYD6tTqRFAJxpA6mvrqazSKJJhUWMpjlIIQA7) center no-repeat}[_nghost-%COMP%] .pdfViewer .page .loadingIcon.notVisible{background:none}[_nghost-%COMP%] .pdfViewer.enablePermissions .textLayer span{-webkit-user-select:none!important;user-select:none!important;cursor:not-allowed}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer{padding-bottom:0}[_nghost-%COMP%] .pdfPresentationMode .spread{margin:0}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page{margin:0 auto;border:2px solid transparent}"]}),i})(),n=(()=>{class i{}return i.\u0275fac=function(u){return new(u||i)},i.\u0275mod=N.oAB({type:i}),i.\u0275inj=N.cJS({}),i})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.