var Ka=Object.defineProperty;var Ya=(at,Ce,Ve)=>Ce in at?Ka(at,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):at[Ce]=Ve;var Rt=(at,Ce,Ve)=>(Ya(at,typeof Ce!="symbol"?Ce+"":Ce,Ve),Ve),di=(at,Ce,Ve)=>{if(!Ce.has(at))throw TypeError("Cannot "+Ve)};var le=(at,Ce,Ve)=>(di(at,Ce,"read from private field"),Ve?Ve.call(at):Ce.get(at)),Ee=(at,Ce,Ve)=>{if(Ce.has(at))throw TypeError("Cannot add the same private member more than once");Ce instanceof WeakSet?Ce.add(at):Ce.set(at,Ve)},$e=(at,Ce,Ve,we)=>(di(at,Ce,"write to private field"),we?we.call(at,Ve):Ce.set(at,Ve),Ve);var wn=(at,Ce,Ve,we)=>({set _(Pe){$e(at,Ce,Pe,Ve)},get _(){return le(at,Ce,we)}}),Me=(at,Ce,Ve)=>(di(at,Ce,"access private method"),Ve);import{Z as requestOptions,ay as getAugmentedNamespace,_ as _export_sfc,a as ref,E as onMounted,y as watch,J as onUnmounted,o as openBlock,c as createElementBlock,r as renderSlot,d as createBaseVNode,t as toDisplayString,az as authHeader}from"./index-4e8c1b57.js";import{c as commonjsRequire}from"./pluralize-53ef695a.js";const participateStudyAPI=(at,Ce)=>fetch(requestOptions(`/api/participations/sessions/${at}`,"POST",Ce)),updateParticipationAPI=(at,Ce)=>fetch(requestOptions(`/api/participations/sessions/${at}`,"PUT",Ce));var pdf={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){(function(Ce,Ve){module.exports=Ce.pdfjsLib=Ve()})(globalThis,()=>(()=>{var __webpack_modules__=[,(at,Ce)=>{var ve;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.VerbosityLevel=Ce.Util=Ce.UnknownErrorException=Ce.UnexpectedResponseException=Ce.TextRenderingMode=Ce.RenderingIntentFlag=Ce.PromiseCapability=Ce.PermissionFlag=Ce.PasswordResponses=Ce.PasswordException=Ce.PageActionEventType=Ce.OPS=Ce.MissingPDFException=Ce.MAX_IMAGE_SIZE_TO_CACHE=Ce.LINE_FACTOR=Ce.LINE_DESCENT_FACTOR=Ce.InvalidPDFException=Ce.ImageKind=Ce.IDENTITY_MATRIX=Ce.FormatError=Ce.FeatureTest=Ce.FONT_IDENTITY_MATRIX=Ce.DocumentActionEventType=Ce.CMapCompressionType=Ce.BaseException=Ce.BASELINE_FACTOR=Ce.AnnotationType=Ce.AnnotationReplyType=Ce.AnnotationPrefix=Ce.AnnotationMode=Ce.AnnotationFlag=Ce.AnnotationFieldFlag=Ce.AnnotationEditorType=Ce.AnnotationEditorPrefix=Ce.AnnotationEditorParamsType=Ce.AnnotationBorderStyleType=Ce.AnnotationActionEventType=Ce.AbortException=void 0,Ce.assert=u,Ce.bytesToString=D,Ce.createValidAbsoluteUrl=U,Ce.getModificationDate=se,Ce.getUuid=de,Ce.getVerbosityLevel=l,Ce.info=g,Ce.isArrayBuffer=ee,Ce.isArrayEqual=z,Ce.isNodeJS=void 0,Ce.normalizeUnicode=ce,Ce.objectFromMap=K,Ce.objectSize=re,Ce.setVerbosityLevel=E,Ce.shadow=O,Ce.string32=q,Ce.stringToBytes=X,Ce.stringToPDFString=W,Ce.stringToUTF8String=G,Ce.unreachable=s,Ce.utf8StringToString=Q,Ce.warn=N;const Ve=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");Ce.isNodeJS=Ve;const we=[1,0,0,1,0,0];Ce.IDENTITY_MATRIX=we;const Pe=[.001,0,0,.001,0,0];Ce.FONT_IDENTITY_MATRIX=Pe;const qe=1e7;Ce.MAX_IMAGE_SIZE_TO_CACHE=qe;const ke=1.35;Ce.LINE_FACTOR=ke;const P=.35;Ce.LINE_DESCENT_FACTOR=P;const ie=P/ke;Ce.BASELINE_FACTOR=ie;const n={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};Ce.RenderingIntentFlag=n;const k={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};Ce.AnnotationMode=k;const R="pdfjs_internal_editor_";Ce.AnnotationEditorPrefix=R;const e={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};Ce.AnnotationEditorType=e;const t={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};Ce.AnnotationEditorParamsType=t;const o={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};Ce.PermissionFlag=o;const $={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};Ce.TextRenderingMode=$;const L={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};Ce.ImageKind=L;const I={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};Ce.AnnotationType=I;const T={GROUP:"Group",REPLY:"R"};Ce.AnnotationReplyType=T;const d={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};Ce.AnnotationFlag=d;const f={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};Ce.AnnotationFieldFlag=f;const i={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};Ce.AnnotationBorderStyleType=i;const S={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"};Ce.AnnotationActionEventType=S;const w={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};Ce.DocumentActionEventType=w;const v={O:"PageOpen",C:"PageClose"};Ce.PageActionEventType=v;const b={ERRORS:0,WARNINGS:1,INFOS:5};Ce.VerbosityLevel=b;const M={NONE:0,BINARY:1};Ce.CMapCompressionType=M;const _={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,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};Ce.OPS=_;const H={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};Ce.PasswordResponses=H;let A=b.WARNINGS;function E(pe){Number.isInteger(pe)&&(A=pe)}function l(){return A}function g(pe){A>=b.INFOS&&console.log(`Info: ${pe}`)}function N(pe){A>=b.WARNINGS&&console.log(`Warning: ${pe}`)}function s(pe){throw new Error(pe)}function u(pe,ge){pe||s(ge)}function F(pe){switch(pe==null?void 0:pe.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function U(pe,ge=null,fe=null){if(!pe)return null;try{if(fe&&typeof pe=="string"){if(fe.addDefaultProtocol&&pe.startsWith("www.")){const Te=pe.match(/\./g);(Te==null?void 0:Te.length)>=2&&(pe=`http://${pe}`)}if(fe.tryConvertEncoding)try{pe=G(pe)}catch{}}const xe=ge?new URL(pe,ge):new URL(pe);if(F(xe))return xe}catch{}return null}function O(pe,ge,fe,xe=!1){return Object.defineProperty(pe,ge,{value:fe,enumerable:!xe,configurable:!0,writable:!1}),fe}const m=function(){function ge(fe,xe){this.constructor===ge&&s("Cannot initialize BaseException."),this.message=fe,this.name=xe}return ge.prototype=new Error,ge.constructor=ge,ge}();Ce.BaseException=m;class x extends m{constructor(ge,fe){super(ge,"PasswordException"),this.code=fe}}Ce.PasswordException=x;class y extends m{constructor(ge,fe){super(ge,"UnknownErrorException"),this.details=fe}}Ce.UnknownErrorException=y;class r extends m{constructor(ge){super(ge,"InvalidPDFException")}}Ce.InvalidPDFException=r;class p extends m{constructor(ge){super(ge,"MissingPDFException")}}Ce.MissingPDFException=p;class c extends m{constructor(ge,fe){super(ge,"UnexpectedResponseException"),this.status=fe}}Ce.UnexpectedResponseException=c;class h extends m{constructor(ge){super(ge,"FormatError")}}Ce.FormatError=h;class C extends m{constructor(ge){super(ge,"AbortException")}}Ce.AbortException=C;function D(pe){(typeof pe!="object"||(pe==null?void 0:pe.length)===void 0)&&s("Invalid argument for bytesToString");const ge=pe.length,fe=8192;if(ge<fe)return String.fromCharCode.apply(null,pe);const xe=[];for(let Te=0;Te<ge;Te+=fe){const Le=Math.min(Te+fe,ge),Ie=pe.subarray(Te,Le);xe.push(String.fromCharCode.apply(null,Ie))}return xe.join("")}function X(pe){typeof pe!="string"&&s("Invalid argument for stringToBytes");const ge=pe.length,fe=new Uint8Array(ge);for(let xe=0;xe<ge;++xe)fe[xe]=pe.charCodeAt(xe)&255;return fe}function q(pe){return String.fromCharCode(pe>>24&255,pe>>16&255,pe>>8&255,pe&255)}function re(pe){return Object.keys(pe).length}function K(pe){const ge=Object.create(null);for(const[fe,xe]of pe)ge[fe]=xe;return ge}function oe(){const pe=new Uint8Array(4);return pe[0]=1,new Uint32Array(pe.buffer,0,1)[0]===1}function J(){try{return new Function(""),!0}catch{return!1}}class te{static get isLittleEndian(){return O(this,"isLittleEndian",oe())}static get isEvalSupported(){return O(this,"isEvalSupported",J())}static get isOffscreenCanvasSupported(){return O(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?O(this,"platform",{isWin:!1,isMac:!1}):O(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var ge,fe;return O(this,"isCSSRoundSupported",(fe=(ge=globalThis.CSS)==null?void 0:ge.supports)==null?void 0:fe.call(ge,"width: round(1.5px, 1px)"))}}Ce.FeatureTest=te;const B=[...Array(256).keys()].map(pe=>pe.toString(16).padStart(2,"0"));class j{static makeHexColor(ge,fe,xe){return`#${B[ge]}${B[fe]}${B[xe]}`}static scaleMinMax(ge,fe){let xe;ge[0]?(ge[0]<0&&(xe=fe[0],fe[0]=fe[1],fe[1]=xe),fe[0]*=ge[0],fe[1]*=ge[0],ge[3]<0&&(xe=fe[2],fe[2]=fe[3],fe[3]=xe),fe[2]*=ge[3],fe[3]*=ge[3]):(xe=fe[0],fe[0]=fe[2],fe[2]=xe,xe=fe[1],fe[1]=fe[3],fe[3]=xe,ge[1]<0&&(xe=fe[2],fe[2]=fe[3],fe[3]=xe),fe[2]*=ge[1],fe[3]*=ge[1],ge[2]<0&&(xe=fe[0],fe[0]=fe[1],fe[1]=xe),fe[0]*=ge[2],fe[1]*=ge[2]),fe[0]+=ge[4],fe[1]+=ge[4],fe[2]+=ge[5],fe[3]+=ge[5]}static transform(ge,fe){return[ge[0]*fe[0]+ge[2]*fe[1],ge[1]*fe[0]+ge[3]*fe[1],ge[0]*fe[2]+ge[2]*fe[3],ge[1]*fe[2]+ge[3]*fe[3],ge[0]*fe[4]+ge[2]*fe[5]+ge[4],ge[1]*fe[4]+ge[3]*fe[5]+ge[5]]}static applyTransform(ge,fe){const xe=ge[0]*fe[0]+ge[1]*fe[2]+fe[4],Te=ge[0]*fe[1]+ge[1]*fe[3]+fe[5];return[xe,Te]}static applyInverseTransform(ge,fe){const xe=fe[0]*fe[3]-fe[1]*fe[2],Te=(ge[0]*fe[3]-ge[1]*fe[2]+fe[2]*fe[5]-fe[4]*fe[3])/xe,Le=(-ge[0]*fe[1]+ge[1]*fe[0]+fe[4]*fe[1]-fe[5]*fe[0])/xe;return[Te,Le]}static getAxialAlignedBoundingBox(ge,fe){const xe=this.applyTransform(ge,fe),Te=this.applyTransform(ge.slice(2,4),fe),Le=this.applyTransform([ge[0],ge[3]],fe),Ie=this.applyTransform([ge[2],ge[1]],fe);return[Math.min(xe[0],Te[0],Le[0],Ie[0]),Math.min(xe[1],Te[1],Le[1],Ie[1]),Math.max(xe[0],Te[0],Le[0],Ie[0]),Math.max(xe[1],Te[1],Le[1],Ie[1])]}static inverseTransform(ge){const fe=ge[0]*ge[3]-ge[1]*ge[2];return[ge[3]/fe,-ge[1]/fe,-ge[2]/fe,ge[0]/fe,(ge[2]*ge[5]-ge[4]*ge[3])/fe,(ge[4]*ge[1]-ge[5]*ge[0])/fe]}static singularValueDecompose2dScale(ge){const fe=[ge[0],ge[2],ge[1],ge[3]],xe=ge[0]*fe[0]+ge[1]*fe[2],Te=ge[0]*fe[1]+ge[1]*fe[3],Le=ge[2]*fe[0]+ge[3]*fe[2],Ie=ge[2]*fe[1]+ge[3]*fe[3],ue=(xe+Ie)/2,me=Math.sqrt((xe+Ie)**2-4*(xe*Ie-Le*Te))/2,De=ue+me||1,Fe=ue-me||1;return[Math.sqrt(De),Math.sqrt(Fe)]}static normalizeRect(ge){const fe=ge.slice(0);return ge[0]>ge[2]&&(fe[0]=ge[2],fe[2]=ge[0]),ge[1]>ge[3]&&(fe[1]=ge[3],fe[3]=ge[1]),fe}static intersect(ge,fe){const xe=Math.max(Math.min(ge[0],ge[2]),Math.min(fe[0],fe[2])),Te=Math.min(Math.max(ge[0],ge[2]),Math.max(fe[0],fe[2]));if(xe>Te)return null;const Le=Math.max(Math.min(ge[1],ge[3]),Math.min(fe[1],fe[3])),Ie=Math.min(Math.max(ge[1],ge[3]),Math.max(fe[1],fe[3]));return Le>Ie?null:[xe,Le,Te,Ie]}static bezierBoundingBox(ge,fe,xe,Te,Le,Ie,ue,me){const De=[],Fe=[[],[]];let je,Ue,ht,_e,st,Je,be,he;for(let Re=0;Re<2;++Re){if(Re===0?(Ue=6*ge-12*xe+6*Le,je=-3*ge+9*xe-9*Le+3*ue,ht=3*xe-3*ge):(Ue=6*fe-12*Te+6*Ie,je=-3*fe+9*Te-9*Ie+3*me,ht=3*Te-3*fe),Math.abs(je)<1e-12){if(Math.abs(Ue)<1e-12)continue;_e=-ht/Ue,0<_e&&_e<1&&De.push(_e);continue}be=Ue*Ue-4*ht*je,he=Math.sqrt(be),!(be<0)&&(st=(-Ue+he)/(2*je),0<st&&st<1&&De.push(st),Je=(-Ue-he)/(2*je),0<Je&&Je<1&&De.push(Je))}let ye=De.length,Se;const Oe=ye;for(;ye--;)_e=De[ye],Se=1-_e,Fe[0][ye]=Se*Se*Se*ge+3*Se*Se*_e*xe+3*Se*_e*_e*Le+_e*_e*_e*ue,Fe[1][ye]=Se*Se*Se*fe+3*Se*Se*_e*Te+3*Se*_e*_e*Ie+_e*_e*_e*me;return Fe[0][Oe]=ge,Fe[1][Oe]=fe,Fe[0][Oe+1]=ue,Fe[1][Oe+1]=me,Fe[0].length=Fe[1].length=Oe+2,[Math.min(...Fe[0]),Math.min(...Fe[1]),Math.max(...Fe[0]),Math.max(...Fe[1])]}}Ce.Util=j;const Y=[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 W(pe){if(pe[0]>="ï"){let fe;if(pe[0]==="þ"&&pe[1]==="ÿ"?fe="utf-16be":pe[0]==="ÿ"&&pe[1]==="þ"?fe="utf-16le":pe[0]==="ï"&&pe[1]==="»"&&pe[2]==="¿"&&(fe="utf-8"),fe)try{const xe=new TextDecoder(fe,{fatal:!0}),Te=X(pe);return xe.decode(Te)}catch(xe){N(`stringToPDFString: "${xe}".`)}}const ge=[];for(let fe=0,xe=pe.length;fe<xe;fe++){const Te=Y[pe.charCodeAt(fe)];ge.push(Te?String.fromCharCode(Te):pe.charAt(fe))}return ge.join("")}function G(pe){return decodeURIComponent(escape(pe))}function Q(pe){return unescape(encodeURIComponent(pe))}function ee(pe){return typeof pe=="object"&&(pe==null?void 0:pe.byteLength)!==void 0}function z(pe,ge){if(pe.length!==ge.length)return!1;for(let fe=0,xe=pe.length;fe<xe;fe++)if(pe[fe]!==ge[fe])return!1;return!0}function se(pe=new Date){return[pe.getUTCFullYear().toString(),(pe.getUTCMonth()+1).toString().padStart(2,"0"),pe.getUTCDate().toString().padStart(2,"0"),pe.getUTCHours().toString().padStart(2,"0"),pe.getUTCMinutes().toString().padStart(2,"0"),pe.getUTCSeconds().toString().padStart(2,"0")].join("")}class ne{constructor(){Ee(this,ve,!1);this.promise=new Promise((ge,fe)=>{this.resolve=xe=>{$e(this,ve,!0),ge(xe)},this.reject=xe=>{$e(this,ve,!0),fe(xe)}})}get settled(){return le(this,ve)}}ve=new WeakMap,Ce.PromiseCapability=ne;let V=null,ae=null;function ce(pe){return V||(V=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,ae=new Map([["ſt","ſt"]])),pe.replaceAll(V,(ge,fe,xe)=>fe?fe.normalize("NFKC"):ae.get(xe))}function de(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const pe=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(pe);else for(let ge=0;ge<32;ge++)pe[ge]=Math.floor(Math.random()*255);return D(pe)}const Ae="pdfjs_internal_id_";Ce.AnnotationPrefix=Ae},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var at,Ve,we,Pe,cn,ke,Mn,ie,n,k,R,e,t,o,$,L,_n,T,d,fi,i,S;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(v){if(typeof v=="string"||v instanceof URL?v={url:v}:(0,_util.isArrayBuffer)(v)&&(v={data:v}),typeof v!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!v.url&&!v.data&&!v.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const b=new PDFDocumentLoadingTask,{docId:M}=b,_=v.url?getUrlProp(v.url):null,H=v.data?getDataProp(v.data):null,A=v.httpHeaders||null,E=v.withCredentials===!0,l=v.password??null,g=v.range instanceof PDFDataRangeTransport?v.range:null,N=Number.isInteger(v.rangeChunkSize)&&v.rangeChunkSize>0?v.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let s=v.worker instanceof PDFWorker?v.worker:null;const u=v.verbosity,F=typeof v.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(v.docBaseUrl)?v.docBaseUrl:null,U=typeof v.cMapUrl=="string"?v.cMapUrl:null,O=v.cMapPacked!==!1,m=v.CMapReaderFactory||DefaultCMapReaderFactory,x=typeof v.standardFontDataUrl=="string"?v.standardFontDataUrl:null,y=v.StandardFontDataFactory||DefaultStandardFontDataFactory,r=v.stopAtErrors!==!0,p=Number.isInteger(v.maxImageSize)&&v.maxImageSize>-1?v.maxImageSize:-1,c=v.isEvalSupported!==!1,h=typeof v.isOffscreenCanvasSupported=="boolean"?v.isOffscreenCanvasSupported:!_util.isNodeJS,C=Number.isInteger(v.canvasMaxAreaInBytes)?v.canvasMaxAreaInBytes:-1,D=typeof v.disableFontFace=="boolean"?v.disableFontFace:_util.isNodeJS,X=v.fontExtraProperties===!0,q=v.enableXfa===!0,re=v.ownerDocument||globalThis.document,K=v.disableRange===!0,oe=v.disableStream===!0,J=v.disableAutoFetch===!0,te=v.pdfBug===!0,B=g?g.length:v.length??NaN,j=typeof v.useSystemFonts=="boolean"?v.useSystemFonts:!_util.isNodeJS&&!D,Y=typeof v.useWorkerFetch=="boolean"?v.useWorkerFetch:m===_display_utils.DOMCMapReaderFactory&&y===_display_utils.DOMStandardFontDataFactory&&U&&x&&(0,_display_utils.isValidFetchUrl)(U,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(x,document.baseURI),W=v.canvasFactory||new DefaultCanvasFactory({ownerDocument:re}),G=v.filterFactory||new DefaultFilterFactory({docId:M,ownerDocument:re}),Q=null;(0,_util.setVerbosityLevel)(u);const ee={canvasFactory:W,filterFactory:G};if(Y||(ee.cMapReaderFactory=new m({baseUrl:U,isCompressed:O}),ee.standardFontDataFactory=new y({baseUrl:x})),!s){const ne={verbosity:u,port:_worker_options.GlobalWorkerOptions.workerPort};s=ne.port?PDFWorker.fromPort(ne):new PDFWorker(ne),b._worker=s}const z={docId:M,apiVersion:"3.11.174",data:H,password:l,disableAutoFetch:J,rangeChunkSize:N,length:B,docBaseUrl:F,enableXfa:q,evaluatorOptions:{maxImageSize:p,disableFontFace:D,ignoreErrors:r,isEvalSupported:c,isOffscreenCanvasSupported:h,canvasMaxAreaInBytes:C,fontExtraProperties:X,useSystemFonts:j,cMapUrl:Y?U:null,standardFontDataUrl:Y?x:null}},se={ignoreErrors:r,isEvalSupported:c,disableFontFace:D,fontExtraProperties:X,enableXfa:q,ownerDocument:re,disableAutoFetch:J,pdfBug:te,styleElement:Q};return s.promise.then(function(){if(b.destroyed)throw new Error("Loading aborted");const ne=_fetchDocument(s,z),V=new Promise(function(ae){let ce;g?ce=new _transport_stream.PDFDataTransportStream({length:B,initialData:g.initialData,progressiveDone:g.progressiveDone,contentDispositionFilename:g.contentDispositionFilename,disableRange:K,disableStream:oe},g):H||(ce=(Ae=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(Ae):(0,_display_utils.isValidFetchUrl)(Ae.url)?new _displayFetch_stream.PDFFetchStream(Ae):new _displayNetwork.PDFNetworkStream(Ae))({url:_,length:B,httpHeaders:A,withCredentials:E,rangeChunkSize:N,disableRange:K,disableStream:oe})),ae(ce)});return Promise.all([ne,V]).then(function([ae,ce]){if(b.destroyed)throw new Error("Loading aborted");const de=new _message_handler.MessageHandler(M,ae,s.port),Ae=new WorkerTransport(de,b,ce,se,ee);b._transport=Ae,de.send("Ready",null)})}).catch(b._capability.reject),b}async function _fetchDocument(v,b){if(v.destroyed)throw new Error("Worker was destroyed");const M=await v.messageHandler.sendWithPromise("GetDocRequest",b,b.data?[b.data.buffer]:null);if(v.destroyed)throw new Error("Worker was destroyed");return M}function getUrlProp(v){if(v instanceof URL)return v.href;try{return new URL(v,window.location).href}catch{if(_util.isNodeJS&&typeof v=="string")return v}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(v){if(_util.isNodeJS&&typeof Buffer<"u"&&v instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(v instanceof Uint8Array&&v.byteLength===v.buffer.byteLength)return v;if(typeof v=="string")return(0,_util.stringToBytes)(v);if(typeof v=="object"&&!isNaN(v==null?void 0:v.length)||(0,_util.isArrayBuffer)(v))return new Uint8Array(v);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const Ce=class Ce{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${wn(Ce,at)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var b,M,_;this.destroyed=!0;try{(b=this._worker)!=null&&b.port&&(this._worker._pendingDestroy=!0),await((M=this._transport)==null?void 0:M.destroy())}catch(H){throw(_=this._worker)!=null&&_.port&&delete this._worker._pendingDestroy,H}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};at=new WeakMap,Ee(Ce,at,0);let PDFDocumentLoadingTask=Ce;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(b,M,_=!1,H=null){this.length=b,this.initialData=M,this.progressiveDone=_,this.contentDispositionFilename=H,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(b){this._rangeListeners.push(b)}addProgressListener(b){this._progressListeners.push(b)}addProgressiveReadListener(b){this._progressiveReadListeners.push(b)}addProgressiveDoneListener(b){this._progressiveDoneListeners.push(b)}onDataRange(b,M){for(const _ of this._rangeListeners)_(b,M)}onDataProgress(b,M){this._readyCapability.promise.then(()=>{for(const _ of this._progressListeners)_(b,M)})}onDataProgressiveRead(b){this._readyCapability.promise.then(()=>{for(const M of this._progressiveReadListeners)M(b)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const b of this._progressiveDoneListeners)b()})}transportReady(){this._readyCapability.resolve()}requestDataRange(b,M){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(b,M){this._pdfInfo=b,this._transport=M,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(_=>{if(!_)return _;const H=[];for(const A in _)H.push(..._[A]);return H}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(b){return this._transport.getPage(b)}getPageIndex(b){return this._transport.getPageIndex(b)}getDestinations(){return this._transport.getDestinations()}getDestination(b){return this._transport.getDestination(b)}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()}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()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(b=!1){return this._transport.startCleanup(b||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(b,M,_,H=!1){Ee(this,Pe);Ee(this,ke);Ee(this,Ve,null);Ee(this,we,!1);this._pageIndex=b,this._pageInfo=M,this._transport=_,this._stats=H?new _display_utils.StatTimer:null,this._pdfBug=H,this.commonObjs=_.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=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:b,rotation:M=this.rotate,offsetX:_=0,offsetY:H=0,dontFlip:A=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:b,rotation:M,offsetX:_,offsetY:H,dontFlip:A})}getAnnotations({intent:b="display"}={}){const M=this._transport.getRenderingIntent(b);return this._transport.getAnnotations(this._pageIndex,M.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var b;return((b=this._transport._htmlForXfa)==null?void 0:b.children[this._pageIndex])||null}render({canvasContext:b,viewport:M,intent:_="display",annotationMode:H=_util.AnnotationMode.ENABLE,transform:A=null,background:E=null,optionalContentConfigPromise:l=null,annotationCanvasMap:g=null,pageColors:N=null,printAnnotationStorage:s=null}){var y,r;(y=this._stats)==null||y.time("Overall");const u=this._transport.getRenderingIntent(_,H,s);$e(this,we,!1),Me(this,ke,Mn).call(this),l||(l=this._transport.getOptionalContentConfig());let F=this._intentStates.get(u.cacheKey);F||(F=Object.create(null),this._intentStates.set(u.cacheKey,F)),F.streamReaderCancelTimeout&&(clearTimeout(F.streamReaderCancelTimeout),F.streamReaderCancelTimeout=null);const U=!!(u.renderingIntent&_util.RenderingIntentFlag.PRINT);F.displayReadyCapability||(F.displayReadyCapability=new _util.PromiseCapability,F.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(r=this._stats)==null||r.time("Page Request"),this._pumpOperatorList(u));const O=p=>{var c,h;F.renderTasks.delete(m),(this._maybeCleanupAfterRender||U)&&$e(this,we,!0),Me(this,Pe,cn).call(this,!U),p?(m.capability.reject(p),this._abortOperatorList({intentState:F,reason:p instanceof Error?p:new Error(p)})):m.capability.resolve(),(c=this._stats)==null||c.timeEnd("Rendering"),(h=this._stats)==null||h.timeEnd("Overall")},m=new InternalRenderTask({callback:O,params:{canvasContext:b,viewport:M,transform:A,background:E},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:g,operatorList:F.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!U,pdfBug:this._pdfBug,pageColors:N});(F.renderTasks||(F.renderTasks=new Set)).add(m);const x=m.task;return Promise.all([F.displayReadyCapability.promise,l]).then(([p,c])=>{var h;if(this.destroyed){O();return}(h=this._stats)==null||h.time("Rendering"),m.initializeGraphics({transparency:p,optionalContentConfig:c}),m.operatorListChanged()}).catch(O),x}getOperatorList({intent:b="display",annotationMode:M=_util.AnnotationMode.ENABLE,printAnnotationStorage:_=null}={}){var g;function H(){E.operatorList.lastChunk&&(E.opListReadCapability.resolve(E.operatorList),E.renderTasks.delete(l))}const A=this._transport.getRenderingIntent(b,M,_,!0);let E=this._intentStates.get(A.cacheKey);E||(E=Object.create(null),this._intentStates.set(A.cacheKey,E));let l;return E.opListReadCapability||(l=Object.create(null),l.operatorListChanged=H,E.opListReadCapability=new _util.PromiseCapability,(E.renderTasks||(E.renderTasks=new Set)).add(l),E.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(g=this._stats)==null||g.time("Page Request"),this._pumpOperatorList(A)),E.opListReadCapability.promise}streamTextContent({includeMarkedContent:b=!1,disableNormalization:M=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:b===!0,disableNormalization:M===!0},{highWaterMark:100,size(H){return H.items.length}})}getTextContent(b={}){if(this._transport._htmlForXfa)return this.getXfa().then(_=>_xfa_text.XfaText.textContent(_));const M=this.streamTextContent(b);return new Promise(function(_,H){function A(){E.read().then(function({value:g,done:N}){if(N){_(l);return}Object.assign(l.styles,g.styles),l.items.push(...g.items),A()},H)}const E=M.getReader(),l={items:[],styles:Object.create(null)};A()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const b=[];for(const M of this._intentStates.values())if(this._abortOperatorList({intentState:M,reason:new Error("Page was destroyed."),force:!0}),!M.opListReadCapability)for(const _ of M.renderTasks)b.push(_.completed),_.cancel();return this.objs.clear(),$e(this,we,!1),Me(this,ke,Mn).call(this),Promise.all(b)}cleanup(b=!1){$e(this,we,!0);const M=Me(this,Pe,cn).call(this,!1);return b&&M&&this._stats&&(this._stats=new _display_utils.StatTimer),M}_startRenderPage(b,M){var H,A;const _=this._intentStates.get(M);_&&((H=this._stats)==null||H.timeEnd("Page Request"),(A=_.displayReadyCapability)==null||A.resolve(b))}_renderPageChunk(b,M){for(let _=0,H=b.length;_<H;_++)M.operatorList.fnArray.push(b.fnArray[_]),M.operatorList.argsArray.push(b.argsArray[_]);M.operatorList.lastChunk=b.lastChunk,M.operatorList.separateAnnots=b.separateAnnots;for(const _ of M.renderTasks)_.operatorListChanged();b.lastChunk&&Me(this,Pe,cn).call(this,!0)}_pumpOperatorList({renderingIntent:b,cacheKey:M,annotationStorageSerializable:_}){const{map:H,transfers:A}=_,l=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:b,cacheKey:M,annotationStorage:H},A).getReader(),g=this._intentStates.get(M);g.streamReader=l;const N=()=>{l.read().then(({value:s,done:u})=>{if(u){g.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(s,g),N())},s=>{if(g.streamReader=null,!this._transport.destroyed){if(g.operatorList){g.operatorList.lastChunk=!0;for(const u of g.renderTasks)u.operatorListChanged();Me(this,Pe,cn).call(this,!0)}if(g.displayReadyCapability)g.displayReadyCapability.reject(s);else if(g.opListReadCapability)g.opListReadCapability.reject(s);else throw s}})};N()}_abortOperatorList({intentState:b,reason:M,force:_=!1}){if(b.streamReader){if(b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null),!_){if(b.renderTasks.size>0)return;if(M instanceof _display_utils.RenderingCancelledException){let H=RENDERING_CANCELLED_TIMEOUT;M.extraDelay>0&&M.extraDelay<1e3&&(H+=M.extraDelay),b.streamReaderCancelTimeout=setTimeout(()=>{b.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:b,reason:M,force:!0})},H);return}}if(b.streamReader.cancel(new _util.AbortException(M.message)).catch(()=>{}),b.streamReader=null,!this._transport.destroyed){for(const[H,A]of this._intentStates)if(A===b){this._intentStates.delete(H);break}this.cleanup()}}}get stats(){return this._stats}}Ve=new WeakMap,we=new WeakMap,Pe=new WeakSet,cn=function(b=!1){if(Me(this,ke,Mn).call(this),!le(this,we)||this.destroyed)return!1;if(b)return $e(this,Ve,setTimeout(()=>{$e(this,Ve,null),Me(this,Pe,cn).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:M,operatorList:_}of this._intentStates.values())if(M.size>0||!_.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),$e(this,we,!1),!0},ke=new WeakSet,Mn=function(){le(this,Ve)&&(clearTimeout(le(this,Ve)),$e(this,Ve,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){Ee(this,ie,new Set);Ee(this,n,Promise.resolve())}postMessage(b,M){const _={data:structuredClone(b,M?{transfer:M}:null)};le(this,n).then(()=>{for(const H of le(this,ie))H.call(this,_)})}addEventListener(b,M){le(this,ie).add(M)}removeEventListener(b,M){le(this,ie).delete(M)}terminate(){le(this,ie).clear()}}ie=new WeakMap,n=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const v=(k=document==null?void 0:document.currentScript)==null?void 0:k.src;v&&(PDFWorkerUtil.fallbackWorkerSrc=v.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(v,b){let M;try{if(M=new URL(v),!M.origin||M.origin==="null")return!1}catch{return!1}const _=new URL(b,M);return M.origin===_.origin},PDFWorkerUtil.createCDNWrapper=function(v){const b=`importScripts("${v}");`;return URL.createObjectURL(new Blob([b]))}}const _PDFWorker=class _PDFWorker{constructor({name:v=null,port:b=null,verbosity:M=(0,_util.getVerbosityLevel)()}={}){var _;if(this.name=v,this.destroyed=!1,this.verbosity=M,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,b){if((_=le(_PDFWorker,R))!=null&&_.has(b))throw new Error("Cannot use more than one PDFWorker per port.");(le(_PDFWorker,R)||$e(_PDFWorker,R,new WeakMap)).set(b,this),this._initializeFromPort(b);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(v){this._port=v,this._messageHandler=new _message_handler.MessageHandler("main","worker",v),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:v}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,v)||(v=PDFWorkerUtil.createCDNWrapper(new URL(v,window.location).href));const b=new Worker(v),M=new _message_handler.MessageHandler("main","worker",b),_=()=>{b.removeEventListener("error",H),M.destroy(),b.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},H=()=>{this._webWorker||_()};b.addEventListener("error",H),M.on("test",E=>{if(b.removeEventListener("error",H),this.destroyed){_();return}E?(this._messageHandler=M,this._port=b,this._webWorker=b,this._readyCapability.resolve(),M.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),M.destroy(),b.terminate())}),M.on("ready",E=>{if(b.removeEventListener("error",H),this.destroyed){_();return}try{A()}catch{this._setupFakeWorker()}});const A=()=>{const E=new Uint8Array;M.send("test",E,[E.buffer])};A();return}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(v=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const b=new LoopbackPort;this._port=b;const M=`fake${PDFWorkerUtil.fakeWorkerId++}`,_=new _message_handler.MessageHandler(M+"_worker",M,b);v.setup(_,b);const H=new _message_handler.MessageHandler(M,M+"_worker",b);this._messageHandler=H,this._readyCapability.resolve(),H.send("configure",{verbosity:this.verbosity})}).catch(v=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${v.message}".`))})}destroy(){var v;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(v=le(_PDFWorker,R))==null||v.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(v){var M;if(!(v!=null&&v.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const b=(M=le(this,R))==null?void 0:M.get(v.port);if(b){if(b._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return b}return new _PDFWorker(v)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var v;try{return((v=globalThis.pdfjsWorker)==null?void 0:v.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};R=new WeakMap,Ee(_PDFWorker,R,void 0);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(b,M,_,H,A){Ee(this,L);Ee(this,e,new Map);Ee(this,t,new Map);Ee(this,o,new Map);Ee(this,$,null);this.messageHandler=b,this.loadingTask=M,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:H.ownerDocument,styleElement:H.styleElement}),this._params=H,this.canvasFactory=A.canvasFactory,this.filterFactory=A.filterFactory,this.cMapReaderFactory=A.cMapReaderFactory,this.standardFontDataFactory=A.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=_,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(b,M=_util.AnnotationMode.ENABLE,_=null,H=!1){let A=_util.RenderingIntentFlag.DISPLAY,E=_annotation_storage.SerializableEmpty;switch(b){case"any":A=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":A=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${b}`)}switch(M){case _util.AnnotationMode.DISABLE:A+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:A+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:A+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,E=(A&_util.RenderingIntentFlag.PRINT&&_ instanceof _annotation_storage.PrintAnnotationStorage?_:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${M}`)}return H&&(A+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:A,cacheKey:`${A}_${E.hash}`,annotationStorageSerializable:E}}destroy(){var _;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(_=le(this,$))==null||_.reject(new Error("Worker was destroyed during onPassword callback"));const b=[];for(const H of le(this,t).values())b.push(H._destroy());le(this,t).clear(),le(this,o).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const M=this.messageHandler.sendWithPromise("Terminate",null);return b.push(M),Promise.all(b).then(()=>{var H;this.commonObjs.clear(),this.fontLoader.clear(),le(this,e).clear(),this.filterFactory.destroy(),(H=this._networkStream)==null||H.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:b,loadingTask:M}=this;b.on("GetReader",(_,H)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=A=>{this._lastProgress={loaded:A.loaded,total:A.total}},H.onPull=()=>{this._fullReader.read().then(function({value:A,done:E}){if(E){H.close();return}(0,_util.assert)(A instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),H.enqueue(new Uint8Array(A),1,[A])}).catch(A=>{H.error(A)})},H.onCancel=A=>{this._fullReader.cancel(A),H.ready.catch(E=>{if(!this.destroyed)throw E})}}),b.on("ReaderHeadersReady",_=>{const H=new _util.PromiseCapability,A=this._fullReader;return A.headersReady.then(()=>{var E;(!A.isStreamingSupported||!A.isRangeSupported)&&(this._lastProgress&&((E=M.onProgress)==null||E.call(M,this._lastProgress)),A.onProgress=l=>{var g;(g=M.onProgress)==null||g.call(M,{loaded:l.loaded,total:l.total})}),H.resolve({isStreamingSupported:A.isStreamingSupported,isRangeSupported:A.isRangeSupported,contentLength:A.contentLength})},H.reject),H.promise}),b.on("GetRangeReader",(_,H)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const A=this._networkStream.getRangeReader(_.begin,_.end);if(!A){H.close();return}H.onPull=()=>{A.read().then(function({value:E,done:l}){if(l){H.close();return}(0,_util.assert)(E instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),H.enqueue(new Uint8Array(E),1,[E])}).catch(E=>{H.error(E)})},H.onCancel=E=>{A.cancel(E),H.ready.catch(l=>{if(!this.destroyed)throw l})}}),b.on("GetDoc",({pdfInfo:_})=>{this._numPages=_.numPages,this._htmlForXfa=_.htmlForXfa,delete _.htmlForXfa,M._capability.resolve(new PDFDocumentProxy(_,this))}),b.on("DocException",function(_){let H;switch(_.name){case"PasswordException":H=new _util.PasswordException(_.message,_.code);break;case"InvalidPDFException":H=new _util.InvalidPDFException(_.message);break;case"MissingPDFException":H=new _util.MissingPDFException(_.message);break;case"UnexpectedResponseException":H=new _util.UnexpectedResponseException(_.message,_.status);break;case"UnknownErrorException":H=new _util.UnknownErrorException(_.message,_.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}M._capability.reject(H)}),b.on("PasswordRequest",_=>{if($e(this,$,new _util.PromiseCapability),M.onPassword){const H=A=>{A instanceof Error?le(this,$).reject(A):le(this,$).resolve({password:A})};try{M.onPassword(H,_.code)}catch(A){le(this,$).reject(A)}}else le(this,$).reject(new _util.PasswordException(_.message,_.code));return le(this,$).promise}),b.on("DataLoaded",_=>{var H;(H=M.onProgress)==null||H.call(M,{loaded:_.length,total:_.length}),this.downloadInfoCapability.resolve(_)}),b.on("StartRenderPage",_=>{if(this.destroyed)return;le(this,t).get(_.pageIndex)._startRenderPage(_.transparency,_.cacheKey)}),b.on("commonobj",([_,H,A])=>{var E;if(!this.destroyed&&!this.commonObjs.has(_))switch(H){case"Font":const l=this._params;if("error"in A){const s=A.error;(0,_util.warn)(`Error during font loading: ${s}`),this.commonObjs.resolve(_,s);break}const g=l.pdfBug&&((E=globalThis.FontInspector)!=null&&E.enabled)?(s,u)=>globalThis.FontInspector.fontAdded(s,u):null,N=new _font_loader.FontFaceObject(A,{isEvalSupported:l.isEvalSupported,disableFontFace:l.disableFontFace,ignoreErrors:l.ignoreErrors,inspectFont:g});this.fontLoader.bind(N).catch(s=>b.sendWithPromise("FontFallback",{id:_})).finally(()=>{!l.fontExtraProperties&&N.data&&(N.data=null),this.commonObjs.resolve(_,N)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(_,A);break;default:throw new Error(`Got unknown common object type ${H}`)}}),b.on("obj",([_,H,A,E])=>{var g;if(this.destroyed)return;const l=le(this,t).get(H);if(!l.objs.has(_))switch(A){case"Image":if(l.objs.resolve(_,E),E){let N;if(E.bitmap){const{width:s,height:u}=E;N=s*u*4}else N=((g=E.data)==null?void 0:g.length)||0;N>_util.MAX_IMAGE_SIZE_TO_CACHE&&(l._maybeCleanupAfterRender=!0)}break;case"Pattern":l.objs.resolve(_,E);break;default:throw new Error(`Got unknown object type ${A}`)}}),b.on("DocProgress",_=>{var H;this.destroyed||(H=M.onProgress)==null||H.call(M,{loaded:_.loaded,total:_.total})}),b.on("FetchBuiltInCMap",_=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(_):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),b.on("FetchStandardFontData",_=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(_):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var _;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:b,transfers:M}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:b,filename:((_=this._fullReader)==null?void 0:_.filename)??null},M).finally(()=>{this.annotationStorage.resetModified()})}getPage(b){if(!Number.isInteger(b)||b<=0||b>this._numPages)return Promise.reject(new Error("Invalid page request."));const M=b-1,_=le(this,o).get(M);if(_)return _;const H=this.messageHandler.sendWithPromise("GetPage",{pageIndex:M}).then(A=>{if(this.destroyed)throw new Error("Transport destroyed");const E=new PDFPageProxy(M,A,this,this._params.pdfBug);return le(this,t).set(M,E),E});return le(this,o).set(M,H),H}getPageIndex(b){return typeof b!="object"||b===null||!Number.isInteger(b.num)||b.num<0||!Number.isInteger(b.gen)||b.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:b.num,gen:b.gen})}getAnnotations(b,M){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:b,intent:M})}getFieldObjects(){return Me(this,L,_n).call(this,"GetFieldObjects")}hasJSActions(){return Me(this,L,_n).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(b){return typeof b!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:b})}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)}getDocJSActions(){return Me(this,L,_n).call(this,"GetDocJSActions")}getPageJSActions(b){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:b})}getStructTree(b){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:b})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(b=>new _optional_content_config.OptionalContentConfig(b))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const b="GetMetadata",M=le(this,e).get(b);if(M)return M;const _=this.messageHandler.sendWithPromise(b,null).then(H=>{var A,E;return{info:H[0],metadata:H[1]?new _metadata.Metadata(H[1]):null,contentDispositionFilename:((A=this._fullReader)==null?void 0:A.filename)??null,contentLength:((E=this._fullReader)==null?void 0:E.contentLength)??null}});return le(this,e).set(b,_),_}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(b=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const M of le(this,t).values())if(!M.cleanup())throw new Error(`startCleanup: Page ${M.pageNumber} is currently rendering.`);this.commonObjs.clear(),b||this.fontLoader.clear(),le(this,e).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:b,enableXfa:M}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:b,enableXfa:M})}}e=new WeakMap,t=new WeakMap,o=new WeakMap,$=new WeakMap,L=new WeakSet,_n=function(b,M=null){const _=le(this,e).get(b);if(_)return _;const H=this.messageHandler.sendWithPromise(b,M);return le(this,e).set(b,H),H};class PDFObjects{constructor(){Ee(this,d);Ee(this,T,Object.create(null))}get(b,M=null){if(M){const H=Me(this,d,fi).call(this,b);return H.capability.promise.then(()=>M(H.data)),null}const _=le(this,T)[b];if(!(_!=null&&_.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${b}.`);return _.data}has(b){const M=le(this,T)[b];return(M==null?void 0:M.capability.settled)||!1}resolve(b,M=null){const _=Me(this,d,fi).call(this,b);_.data=M,_.capability.resolve()}clear(){var b;for(const M in le(this,T)){const{data:_}=le(this,T)[M];(b=_==null?void 0:_.bitmap)==null||b.close()}$e(this,T,Object.create(null))}}T=new WeakMap,d=new WeakSet,fi=function(b){var M;return(M=le(this,T))[b]||(M[b]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(b){Ee(this,i,null);$e(this,i,b),this.onContinue=null}get promise(){return le(this,i).capability.promise}cancel(b=0){le(this,i).cancel(null,b)}get separateAnnots(){const{separateAnnots:b}=le(this,i).operatorList;if(!b)return!1;const{annotationCanvasMap:M}=le(this,i);return b.form||b.canvas&&(M==null?void 0:M.size)>0}}i=new WeakMap,exports.RenderTask=RenderTask;const w=class w{constructor({callback:b,params:M,objs:_,commonObjs:H,annotationCanvasMap:A,operatorList:E,pageIndex:l,canvasFactory:g,filterFactory:N,useRequestAnimationFrame:s=!1,pdfBug:u=!1,pageColors:F=null}){this.callback=b,this.params=M,this.objs=_,this.commonObjs=H,this.annotationCanvasMap=A,this.operatorListIdx=null,this.operatorList=E,this._pageIndex=l,this.canvasFactory=g,this.filterFactory=N,this._pdfBug=u,this.pageColors=F,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=s===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,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=M.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:b=!1,optionalContentConfig:M}){var l,g;if(this.cancelled)return;if(this._canvas){if(le(w,S).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.");le(w,S).add(this._canvas)}this._pdfBug&&((l=globalThis.StepperManager)!=null&&l.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:_,viewport:H,transform:A,background:E}=this.params;this.gfx=new _canvas.CanvasGraphics(_,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:M},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:A,viewport:H,transparency:b,background:E}),this.operatorListIdx=0,this.graphicsReady=!0,(g=this.graphicsReadyCallback)==null||g.call(this)}cancel(b=null,M=0){var _;this.running=!1,this.cancelled=!0,(_=this.gfx)==null||_.endDrawing(),le(w,S).delete(this._canvas),this.callback(b||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,M))}operatorListChanged(){var b;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(b=this.stepper)==null||b.updateOperatorList(this.operatorList),!this.running&&this._continue()}_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)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),le(w,S).delete(this._canvas),this.callback())))}};S=new WeakMap,Ee(w,S,new WeakSet);let InternalRenderTask=w;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(at,Ce,Ve)=>{var n,k,R,na,t;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.SerializableEmpty=Ce.PrintAnnotationStorage=Ce.AnnotationStorage=void 0;var we=Ve(1),Pe=Ve(4),qe=Ve(8);const ke=Object.freeze({map:null,hash:"",transfers:void 0});Ce.SerializableEmpty=ke;class P{constructor(){Ee(this,R);Ee(this,n,!1);Ee(this,k,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue($,L){const I=le(this,k).get($);return I===void 0?L:Object.assign(L,I)}getRawValue($){return le(this,k).get($)}remove($){if(le(this,k).delete($),le(this,k).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const L of le(this,k).values())if(L instanceof Pe.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue($,L){const I=le(this,k).get($);let T=!1;if(I!==void 0)for(const[d,f]of Object.entries(L))I[d]!==f&&(T=!0,I[d]=f);else T=!0,le(this,k).set($,L);T&&Me(this,R,na).call(this),L instanceof Pe.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(L.constructor._type)}has($){return le(this,k).has($)}getAll(){return le(this,k).size>0?(0,we.objectFromMap)(le(this,k)):null}setAll($){for(const[L,I]of Object.entries($))this.setValue(L,I)}get size(){return le(this,k).size}resetModified(){le(this,n)&&($e(this,n,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new ie(this)}get serializable(){if(le(this,k).size===0)return ke;const $=new Map,L=new qe.MurmurHash3_64,I=[],T=Object.create(null);let d=!1;for(const[f,i]of le(this,k)){const S=i instanceof Pe.AnnotationEditor?i.serialize(!1,T):i;S&&($.set(f,S),L.update(`${f}:${JSON.stringify(S)}`),d||(d=!!S.bitmap))}if(d)for(const f of $.values())f.bitmap&&I.push(f.bitmap);return $.size>0?{map:$,hash:L.hexdigest(),transfers:I}:ke}}n=new WeakMap,k=new WeakMap,R=new WeakSet,na=function(){le(this,n)||($e(this,n,!0),typeof this.onSetModified=="function"&&this.onSetModified())},Ce.AnnotationStorage=P;class ie extends P{constructor(L){super();Ee(this,t,void 0);const{map:I,hash:T,transfers:d}=L.serializable,f=structuredClone(I,d?{transfer:d}:null);$e(this,t,{map:f,hash:T,transfers:d})}get print(){(0,we.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return le(this,t)}}t=new WeakMap,Ce.PrintAnnotationStorage=ie},(at,Ce,Ve)=>{var ie,n,k,R,e,t,o,$,L,I,T,d,f,i,S,gi,v,pi,M,mi,H,xi,E,ia,g,aa,s,sa,F,bi,O,ra;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.AnnotationEditor=void 0;var we=Ve(5),Pe=Ve(1),qe=Ve(6);const x=class x{constructor(r){Ee(this,S);Ee(this,v);Ee(this,H);Ee(this,E);Ee(this,g);Ee(this,s);Ee(this,F);Ee(this,O);Ee(this,ie,"");Ee(this,n,!1);Ee(this,k,null);Ee(this,R,null);Ee(this,e,null);Ee(this,t,!1);Ee(this,o,null);Ee(this,$,this.focusin.bind(this));Ee(this,L,this.focusout.bind(this));Ee(this,I,!1);Ee(this,T,!1);Ee(this,d,!1);Rt(this,"_initialOptions",Object.create(null));Rt(this,"_uiManager",null);Rt(this,"_focusEventsAllowed",!0);Rt(this,"_l10nPromise",null);Ee(this,f,!1);Ee(this,i,x._zIndex++);this.constructor===x&&(0,Pe.unreachable)("Cannot initialize AnnotationEditor."),this.parent=r.parent,this.id=r.id,this.width=this.height=null,this.pageIndex=r.parent.pageIndex,this.name=r.name,this.div=null,this._uiManager=r.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=r.isCentered,this._structTreeParentId=null;const{rotation:p,rawDims:{pageWidth:c,pageHeight:h,pageX:C,pageY:D}}=this.parent.viewport;this.rotation=p,this.pageRotation=(360+p-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[c,h],this.pageTranslation=[C,D];const[X,q]=this.parentDimensions;this.x=r.x/X,this.y=r.y/q,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,Pe.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(r){const p=new P({id:r.parent.getNextId(),parent:r.parent,uiManager:r._uiManager});p.annotationElementId=r.annotationElementId,p.deleted=!0,p._uiManager.addToAnnotationStorage(p)}static initialize(r,p=null){if(x._l10nPromise||(x._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(h=>[h,r.get(h)]))),p!=null&&p.strings)for(const h of p.strings)x._l10nPromise.set(h,r.get(h));if(x._borderLineWidth!==-1)return;const c=getComputedStyle(document.documentElement);x._borderLineWidth=parseFloat(c.getPropertyValue("--outline-width"))||0}static updateDefaultParams(r,p){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(r){return!1}static paste(r,p){(0,Pe.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return le(this,f)}set _isDraggable(r){var p;$e(this,f,r),(p=this.div)==null||p.classList.toggle("draggable",r)}center(){const[r,p]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*p/(r*2),this.y+=this.width*r/(p*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*p/(r*2),this.y-=this.width*r/(p*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(r){this._uiManager.addCommands(r)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=le(this,i)}setParent(r){r!==null&&(this.pageIndex=r.pageIndex,this.pageDimensions=r.pageDimensions),this.parent=r}focusin(r){this._focusEventsAllowed&&(le(this,I)?$e(this,I,!1):this.parent.setSelected(this))}focusout(r){var c;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const p=r.relatedTarget;p!=null&&p.closest(`#${this.id}`)||(r.preventDefault(),(c=this.parent)!=null&&c.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(r,p,c,h){const[C,D]=this.parentDimensions;[c,h]=this.screenToPageTranslation(c,h),this.x=(r+c)/C,this.y=(p+h)/D,this.fixAndSetPosition()}translate(r,p){Me(this,S,gi).call(this,this.parentDimensions,r,p)}translateInPage(r,p){Me(this,S,gi).call(this,this.pageDimensions,r,p),this.div.scrollIntoView({block:"nearest"})}drag(r,p){const[c,h]=this.parentDimensions;if(this.x+=r/c,this.y+=p/h,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:re,y:K}=this.div.getBoundingClientRect();this.parent.findNewParent(this,re,K)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:C,y:D}=this;const[X,q]=Me(this,v,pi).call(this);C+=X,D+=q,this.div.style.left=`${(100*C).toFixed(2)}%`,this.div.style.top=`${(100*D).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[r,p]=this.pageDimensions;let{x:c,y:h,width:C,height:D}=this;switch(C*=r,D*=p,c*=r,h*=p,this.rotation){case 0:c=Math.max(0,Math.min(r-C,c)),h=Math.max(0,Math.min(p-D,h));break;case 90:c=Math.max(0,Math.min(r-D,c)),h=Math.min(p,Math.max(C,h));break;case 180:c=Math.min(r,Math.max(C,c)),h=Math.min(p,Math.max(D,h));break;case 270:c=Math.min(r,Math.max(D,c)),h=Math.max(0,Math.min(p-C,h));break}this.x=c/=r,this.y=h/=p;const[X,q]=Me(this,v,pi).call(this);c+=X,h+=q;const{style:re}=this.div;re.left=`${(100*c).toFixed(2)}%`,re.top=`${(100*h).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(r,p){var c;return Me(c=x,M,mi).call(c,r,p,this.parentRotation)}pageTranslationToScreen(r,p){var c;return Me(c=x,M,mi).call(c,r,p,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:r,pageDimensions:[p,c]}=this,h=p*r,C=c*r;return Pe.FeatureTest.isCSSRoundSupported?[Math.round(h),Math.round(C)]:[h,C]}setDims(r,p){var C;const[c,h]=this.parentDimensions;this.div.style.width=`${(100*r/c).toFixed(2)}%`,le(this,t)||(this.div.style.height=`${(100*p/h).toFixed(2)}%`),(C=le(this,k))==null||C.classList.toggle("small",r<x.SMALL_EDITOR_SIZE||p<x.SMALL_EDITOR_SIZE)}fixDims(){const{style:r}=this.div,{height:p,width:c}=r,h=c.endsWith("%"),C=!le(this,t)&&p.endsWith("%");if(h&&C)return;const[D,X]=this.parentDimensions;h||(r.width=`${(100*parseFloat(c)/D).toFixed(2)}%`),!le(this,t)&&!C&&(r.height=`${(100*parseFloat(p)/X).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}async addAltTextButton(){if(le(this,k))return;const r=$e(this,k,document.createElement("button"));r.className="altText";const p=await x._l10nPromise.get("editor_alt_text_button_label");r.textContent=p,r.setAttribute("aria-label",p),r.tabIndex="0",r.addEventListener("contextmenu",qe.noContextMenu),r.addEventListener("pointerdown",c=>c.stopPropagation()),r.addEventListener("click",c=>{c.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),r.addEventListener("keydown",c=>{c.target===r&&c.key==="Enter"&&(c.preventDefault(),this._uiManager.editAltText(this))}),Me(this,F,bi).call(this),this.div.append(r),x.SMALL_EDITOR_SIZE||(x.SMALL_EDITOR_SIZE=Math.min(128,Math.round(r.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:le(this,ie),decorative:le(this,n)}}set altTextData({altText:r,decorative:p}){le(this,ie)===r&&le(this,n)===p||($e(this,ie,r),$e(this,n,p),Me(this,F,bi).call(this))}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",le(this,$)),this.div.addEventListener("focusout",le(this,L));const[r,p]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*p/r).toFixed(2)}%`,this.div.style.maxHeight=`${(100*r/p).toFixed(2)}%`);const[c,h]=this.getInitialTranslation();return this.translate(c,h),(0,we.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(r){const{isMac:p}=Pe.FeatureTest.platform;if(r.button!==0||r.ctrlKey&&p){r.preventDefault();return}$e(this,I,!0),Me(this,O,ra).call(this,r)}moveInDOM(){var r;(r=this.parent)==null||r.moveEditorInDOM(this)}_setParentAndPosition(r,p,c){r.changeParent(this),this.x=p,this.y=c,this.fixAndSetPosition()}getRect(r,p){const c=this.parentScale,[h,C]=this.pageDimensions,[D,X]=this.pageTranslation,q=r/c,re=p/c,K=this.x*h,oe=this.y*C,J=this.width*h,te=this.height*C;switch(this.rotation){case 0:return[K+q+D,C-oe-re-te+X,K+q+J+D,C-oe-re+X];case 90:return[K+re+D,C-oe+q+X,K+re+te+D,C-oe+q+J+X];case 180:return[K-q-J+D,C-oe+re+X,K-q+D,C-oe+re+te+X];case 270:return[K-re-te+D,C-oe-q-J+X,K-re+D,C-oe-q+X];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(r,p){const[c,h,C,D]=r,X=C-c,q=D-h;switch(this.rotation){case 0:return[c,p-D,X,q];case 90:return[c,p-h,q,X];case 180:return[C,p-h,X,q];case 270:return[C,p-D,q,X];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){$e(this,d,!0)}disableEditMode(){$e(this,d,!1)}isInEditMode(){return le(this,d)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var r,p;(r=this.div)==null||r.addEventListener("focusin",le(this,$)),(p=this.div)==null||p.addEventListener("focusout",le(this,L))}serialize(r=!1,p=null){(0,Pe.unreachable)("An editor must be serializable")}static deserialize(r,p,c){const h=new this.prototype.constructor({parent:p,id:p.getNextId(),uiManager:c});h.rotation=r.rotation;const[C,D]=h.pageDimensions,[X,q,re,K]=h.getRectInCurrentCoords(r.rect,D);return h.x=X/C,h.y=q/D,h.width=re/C,h.height=K/D,h}remove(){var r;this.div.removeEventListener("focusin",le(this,$)),this.div.removeEventListener("focusout",le(this,L)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(r=le(this,k))==null||r.remove(),$e(this,k,null),$e(this,R,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(Me(this,E,ia).call(this),le(this,o).classList.remove("hidden"))}select(){var r;this.makeResizable(),(r=this.div)==null||r.classList.add("selectedEditor")}unselect(){var r,p,c;(r=le(this,o))==null||r.classList.add("hidden"),(p=this.div)==null||p.classList.remove("selectedEditor"),(c=this.div)!=null&&c.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(r,p){}disableEditing(){le(this,k)&&(le(this,k).hidden=!0)}enableEditing(){le(this,k)&&(le(this,k).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return le(this,T)}set isEditing(r){$e(this,T,r),this.parent&&(r?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(r,p){$e(this,t,!0);const c=r/p,{style:h}=this.div;h.aspectRatio=c,h.height="auto"}static get MIN_SIZE(){return 16}};ie=new WeakMap,n=new WeakMap,k=new WeakMap,R=new WeakMap,e=new WeakMap,t=new WeakMap,o=new WeakMap,$=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,d=new WeakMap,f=new WeakMap,i=new WeakMap,S=new WeakSet,gi=function([r,p],c,h){[c,h]=this.screenToPageTranslation(c,h),this.x+=c/r,this.y+=h/p,this.fixAndSetPosition()},v=new WeakSet,pi=function(){const[r,p]=this.parentDimensions,{_borderLineWidth:c}=x,h=c/r,C=c/p;switch(this.rotation){case 90:return[-h,C];case 180:return[h,C];case 270:return[h,-C];default:return[-h,-C]}},M=new WeakSet,mi=function(r,p,c){switch(c){case 90:return[p,-r];case 180:return[-r,-p];case 270:return[-p,r];default:return[r,p]}},H=new WeakSet,xi=function(r){switch(r){case 90:{const[p,c]=this.pageDimensions;return[0,-p/c,c/p,0]}case 180:return[-1,0,0,-1];case 270:{const[p,c]=this.pageDimensions;return[0,p/c,-c/p,0]}default:return[1,0,0,1]}},E=new WeakSet,ia=function(){if(le(this,o))return;$e(this,o,document.createElement("div")),le(this,o).classList.add("resizers");const r=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||r.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const p of r){const c=document.createElement("div");le(this,o).append(c),c.classList.add("resizer",p),c.addEventListener("pointerdown",Me(this,g,aa).bind(this,p)),c.addEventListener("contextmenu",qe.noContextMenu)}this.div.prepend(le(this,o))},g=new WeakSet,aa=function(r,p){p.preventDefault();const{isMac:c}=Pe.FeatureTest.platform;if(p.button!==0||p.ctrlKey&&c)return;const h=Me(this,s,sa).bind(this,r),C=this._isDraggable;this._isDraggable=!1;const D={passive:!0,capture:!0};window.addEventListener("pointermove",h,D);const X=this.x,q=this.y,re=this.width,K=this.height,oe=this.parent.div.style.cursor,J=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(p.target).cursor;const te=()=>{this._isDraggable=C,window.removeEventListener("pointerup",te),window.removeEventListener("blur",te),window.removeEventListener("pointermove",h,D),this.parent.div.style.cursor=oe,this.div.style.cursor=J;const B=this.x,j=this.y,Y=this.width,W=this.height;B===X&&j===q&&Y===re&&W===K||this.addCommands({cmd:()=>{this.width=Y,this.height=W,this.x=B,this.y=j;const[G,Q]=this.parentDimensions;this.setDims(G*Y,Q*W),this.fixAndSetPosition()},undo:()=>{this.width=re,this.height=K,this.x=X,this.y=q;const[G,Q]=this.parentDimensions;this.setDims(G*re,Q*K),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",te),window.addEventListener("blur",te)},s=new WeakSet,sa=function(r,p){const[c,h]=this.parentDimensions,C=this.x,D=this.y,X=this.width,q=this.height,re=x.MIN_SIZE/c,K=x.MIN_SIZE/h,oe=xe=>Math.round(xe*1e4)/1e4,J=Me(this,H,xi).call(this,this.rotation),te=(xe,Te)=>[J[0]*xe+J[2]*Te,J[1]*xe+J[3]*Te],B=Me(this,H,xi).call(this,360-this.rotation),j=(xe,Te)=>[B[0]*xe+B[2]*Te,B[1]*xe+B[3]*Te];let Y,W,G=!1,Q=!1;switch(r){case"topLeft":G=!0,Y=(xe,Te)=>[0,0],W=(xe,Te)=>[xe,Te];break;case"topMiddle":Y=(xe,Te)=>[xe/2,0],W=(xe,Te)=>[xe/2,Te];break;case"topRight":G=!0,Y=(xe,Te)=>[xe,0],W=(xe,Te)=>[0,Te];break;case"middleRight":Q=!0,Y=(xe,Te)=>[xe,Te/2],W=(xe,Te)=>[0,Te/2];break;case"bottomRight":G=!0,Y=(xe,Te)=>[xe,Te],W=(xe,Te)=>[0,0];break;case"bottomMiddle":Y=(xe,Te)=>[xe/2,Te],W=(xe,Te)=>[xe/2,0];break;case"bottomLeft":G=!0,Y=(xe,Te)=>[0,Te],W=(xe,Te)=>[xe,0];break;case"middleLeft":Q=!0,Y=(xe,Te)=>[0,Te/2],W=(xe,Te)=>[xe,Te/2];break}const ee=Y(X,q),z=W(X,q);let se=te(...z);const ne=oe(C+se[0]),V=oe(D+se[1]);let ae=1,ce=1,[de,Ae]=this.screenToPageTranslation(p.movementX,p.movementY);if([de,Ae]=j(de/c,Ae/h),G){const xe=Math.hypot(X,q);ae=ce=Math.max(Math.min(Math.hypot(z[0]-ee[0]-de,z[1]-ee[1]-Ae)/xe,1/X,1/q),re/X,K/q)}else Q?ae=Math.max(re,Math.min(1,Math.abs(z[0]-ee[0]-de)))/X:ce=Math.max(K,Math.min(1,Math.abs(z[1]-ee[1]-Ae)))/q;const ve=oe(X*ae),pe=oe(q*ce);se=te(...W(ve,pe));const ge=ne-se[0],fe=V-se[1];this.width=ve,this.height=pe,this.x=ge,this.y=fe,this.setDims(c*ve,h*pe),this.fixAndSetPosition()},F=new WeakSet,bi=async function(){var c;const r=le(this,k);if(!r)return;if(!le(this,ie)&&!le(this,n)){r.classList.remove("done"),(c=le(this,R))==null||c.remove();return}x._l10nPromise.get("editor_alt_text_edit_button_label").then(h=>{r.setAttribute("aria-label",h)});let p=le(this,R);if(!p){$e(this,R,p=document.createElement("span")),p.className="tooltip",p.setAttribute("role","tooltip");const h=p.id=`alt-text-tooltip-${this.id}`;r.setAttribute("aria-describedby",h);const C=100;r.addEventListener("mouseenter",()=>{$e(this,e,setTimeout(()=>{$e(this,e,null),le(this,R).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},C))}),r.addEventListener("mouseleave",()=>{var D;clearTimeout(le(this,e)),$e(this,e,null),(D=le(this,R))==null||D.classList.remove("show")})}r.classList.add("done"),p.innerText=le(this,n)?await x._l10nPromise.get("editor_alt_text_decorative_tooltip"):le(this,ie),p.parentNode||r.append(p)},O=new WeakSet,ra=function(r){if(!this._isDraggable)return;const p=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let c,h;p&&(c={passive:!0,capture:!0},h=D=>{const[X,q]=this.screenToPageTranslation(D.movementX,D.movementY);this._uiManager.dragSelectedEditors(X,q)},window.addEventListener("pointermove",h,c));const C=()=>{if(window.removeEventListener("pointerup",C),window.removeEventListener("blur",C),p&&window.removeEventListener("pointermove",h,c),$e(this,I,!1),!this._uiManager.endDragSession()){const{isMac:D}=Pe.FeatureTest.platform;r.ctrlKey&&!D||r.shiftKey||r.metaKey&&D?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",C),window.addEventListener("blur",C)},Ee(x,M),Rt(x,"_borderLineWidth",-1),Rt(x,"_colorManager",new we.ColorManager),Rt(x,"_zIndex",1),Rt(x,"SMALL_EDITOR_SIZE",0);let ke=x;Ce.AnnotationEditor=ke;class P extends ke{constructor(r){super(r),this.annotationElementId=r.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(at,Ce,Ve)=>{var t,o,$,L,I,yi,f,i,S,w,v,oa,_,H,A,E,l,g,N,s,u,F,U,O,m,x,y,r,p,c,h,C,D,X,q,re,K,oe,J,te,B,j,Y,W,G,Q,ee,ca,se,wi,V,Ai,ce,Rn,Ae,Si,pe,vi,fe,Jt,Te,An,Ie,la,me,ha,Fe,Ci,Ue,Sn,_e,ki;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.KeyboardManager=Ce.CommandManager=Ce.ColorManager=Ce.AnnotationEditorUIManager=void 0,Ce.bindEvents=qe,Ce.opacityToHex=ke;var we=Ve(1),Pe=Ve(6);function qe(be,he,ye){for(const Se of ye)he.addEventListener(Se,be[Se].bind(be))}function ke(be){return Math.round(Math.min(255,Math.max(1,255*be))).toString(16).padStart(2,"0")}class P{constructor(){Ee(this,t,0)}getId(){return`${we.AnnotationEditorPrefix}${wn(this,t)._++}`}}t=new WeakMap;const d=class d{constructor(){Ee(this,I);Ee(this,o,(0,we.getUuid)());Ee(this,$,0);Ee(this,L,null)}static get _isSVGFittingCanvas(){const he='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',Se=new OffscreenCanvas(1,3).getContext("2d"),Oe=new Image;Oe.src=he;const Re=Oe.decode().then(()=>(Se.drawImage(Oe,0,0,1,1,0,0,1,3),new Uint32Array(Se.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,we.shadow)(this,"_isSVGFittingCanvas",Re)}async getFromFile(he){const{lastModified:ye,name:Se,size:Oe,type:Re}=he;return Me(this,I,yi).call(this,`${ye}_${Se}_${Oe}_${Re}`,he)}async getFromUrl(he){return Me(this,I,yi).call(this,he,he)}async getFromId(he){le(this,L)||$e(this,L,new Map);const ye=le(this,L).get(he);return ye?ye.bitmap?(ye.refCounter+=1,ye):ye.file?this.getFromFile(ye.file):this.getFromUrl(ye.url):null}getSvgUrl(he){const ye=le(this,L).get(he);return ye!=null&&ye.isSvg?ye.svgUrl:null}deleteId(he){le(this,L)||$e(this,L,new Map);const ye=le(this,L).get(he);ye&&(ye.refCounter-=1,ye.refCounter===0&&(ye.bitmap=null))}isValidId(he){return he.startsWith(`image_${le(this,o)}_`)}};o=new WeakMap,$=new WeakMap,L=new WeakMap,I=new WeakSet,yi=async function(he,ye){le(this,L)||$e(this,L,new Map);let Se=le(this,L).get(he);if(Se===null)return null;if(Se!=null&&Se.bitmap)return Se.refCounter+=1,Se;try{Se||(Se={bitmap:null,id:`image_${le(this,o)}_${wn(this,$)._++}`,refCounter:0,isSvg:!1});let Oe;if(typeof ye=="string"){Se.url=ye;const Re=await fetch(ye);if(!Re.ok)throw new Error(Re.statusText);Oe=await Re.blob()}else Oe=Se.file=ye;if(Oe.type==="image/svg+xml"){const Re=d._isSVGFittingCanvas,Ne=new FileReader,Ye=new Image,Ge=new Promise((ze,Qe)=>{Ye.onload=()=>{Se.bitmap=Ye,Se.isSvg=!0,ze()},Ne.onload=async()=>{const tt=Se.svgUrl=Ne.result;Ye.src=await Re?`${tt}#svgView(preserveAspectRatio(none))`:tt},Ye.onerror=Ne.onerror=Qe});Ne.readAsDataURL(Oe),await Ge}else Se.bitmap=await createImageBitmap(Oe);Se.refCounter=1}catch(Oe){console.error(Oe),Se=null}return le(this,L).set(he,Se),Se&&le(this,L).set(Se.id,Se),Se};let ie=d;class n{constructor(he=128){Ee(this,f,[]);Ee(this,i,!1);Ee(this,S,void 0);Ee(this,w,-1);$e(this,S,he)}add({cmd:he,undo:ye,mustExec:Se,type:Oe=NaN,overwriteIfSameType:Re=!1,keepUndo:Ne=!1}){if(Se&&he(),le(this,i))return;const Ye={cmd:he,undo:ye,type:Oe};if(le(this,w)===-1){le(this,f).length>0&&(le(this,f).length=0),$e(this,w,0),le(this,f).push(Ye);return}if(Re&&le(this,f)[le(this,w)].type===Oe){Ne&&(Ye.undo=le(this,f)[le(this,w)].undo),le(this,f)[le(this,w)]=Ye;return}const Ge=le(this,w)+1;Ge===le(this,S)?le(this,f).splice(0,1):($e(this,w,Ge),Ge<le(this,f).length&&le(this,f).splice(Ge)),le(this,f).push(Ye)}undo(){le(this,w)!==-1&&($e(this,i,!0),le(this,f)[le(this,w)].undo(),$e(this,i,!1),$e(this,w,le(this,w)-1))}redo(){le(this,w)<le(this,f).length-1&&($e(this,w,le(this,w)+1),$e(this,i,!0),le(this,f)[le(this,w)].cmd(),$e(this,i,!1))}hasSomethingToUndo(){return le(this,w)!==-1}hasSomethingToRedo(){return le(this,w)<le(this,f).length-1}destroy(){$e(this,f,null)}}f=new WeakMap,i=new WeakMap,S=new WeakMap,w=new WeakMap,Ce.CommandManager=n;class k{constructor(he){Ee(this,v);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:ye}=we.FeatureTest.platform;for(const[Se,Oe,Re={}]of he)for(const Ne of Se){const Ye=Ne.startsWith("mac+");ye&&Ye?(this.callbacks.set(Ne.slice(4),{callback:Oe,options:Re}),this.allKeys.add(Ne.split("+").at(-1))):!ye&&!Ye&&(this.callbacks.set(Ne,{callback:Oe,options:Re}),this.allKeys.add(Ne.split("+").at(-1)))}}exec(he,ye){if(!this.allKeys.has(ye.key))return;const Se=this.callbacks.get(Me(this,v,oa).call(this,ye));if(!Se)return;const{callback:Oe,options:{bubbles:Re=!1,args:Ne=[],checker:Ye=null}}=Se;Ye&&!Ye(he,ye)||(Oe.bind(he,...Ne)(),Re||(ye.stopPropagation(),ye.preventDefault()))}}v=new WeakSet,oa=function(he){he.altKey&&this.buffer.push("alt"),he.ctrlKey&&this.buffer.push("ctrl"),he.metaKey&&this.buffer.push("meta"),he.shiftKey&&this.buffer.push("shift"),this.buffer.push(he.key);const ye=this.buffer.join("+");return this.buffer.length=0,ye},Ce.KeyboardManager=k;const M=class M{get _colors(){const he=new Map([["CanvasText",null],["Canvas",null]]);return(0,Pe.getColorValues)(he),(0,we.shadow)(this,"_colors",he)}convert(he){const ye=(0,Pe.getRGB)(he);if(!window.matchMedia("(forced-colors: active)").matches)return ye;for(const[Se,Oe]of this._colors)if(Oe.every((Re,Ne)=>Re===ye[Ne]))return M._colorsMapping.get(Se);return ye}getHexCode(he){const ye=this._colors.get(he);return ye?we.Util.makeHexColor(...ye):he}};Rt(M,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let R=M;Ce.ColorManager=R;const Je=class Je{constructor(he,ye,Se,Oe,Re,Ne){Ee(this,ee);Ee(this,se);Ee(this,V);Ee(this,ce);Ee(this,Ae);Ee(this,pe);Ee(this,fe);Ee(this,Te);Ee(this,Ie);Ee(this,me);Ee(this,Fe);Ee(this,Ue);Ee(this,_e);Ee(this,_,null);Ee(this,H,new Map);Ee(this,A,new Map);Ee(this,E,null);Ee(this,l,null);Ee(this,g,new n);Ee(this,N,0);Ee(this,s,new Set);Ee(this,u,null);Ee(this,F,null);Ee(this,U,new Set);Ee(this,O,null);Ee(this,m,new P);Ee(this,x,!1);Ee(this,y,!1);Ee(this,r,null);Ee(this,p,we.AnnotationEditorType.NONE);Ee(this,c,new Set);Ee(this,h,null);Ee(this,C,this.blur.bind(this));Ee(this,D,this.focus.bind(this));Ee(this,X,this.copy.bind(this));Ee(this,q,this.cut.bind(this));Ee(this,re,this.paste.bind(this));Ee(this,K,this.keydown.bind(this));Ee(this,oe,this.onEditingAction.bind(this));Ee(this,J,this.onPageChanging.bind(this));Ee(this,te,this.onScaleChanging.bind(this));Ee(this,B,this.onRotationChanging.bind(this));Ee(this,j,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1});Ee(this,Y,[0,0]);Ee(this,W,null);Ee(this,G,null);Ee(this,Q,null);$e(this,G,he),$e(this,Q,ye),$e(this,E,Se),this._eventBus=Oe,this._eventBus._on("editingaction",le(this,oe)),this._eventBus._on("pagechanging",le(this,J)),this._eventBus._on("scalechanging",le(this,te)),this._eventBus._on("rotationchanging",le(this,B)),$e(this,l,Re.annotationStorage),$e(this,O,Re.filterFactory),$e(this,h,Ne),this.viewParameters={realScale:Pe.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const he=Je.prototype,ye=Re=>{const{activeElement:Ne}=document;return Ne&&le(Re,G).contains(Ne)&&Re.hasSomethingToControl()},Se=this.TRANSLATE_SMALL,Oe=this.TRANSLATE_BIG;return(0,we.shadow)(this,"_keyboardManager",new k([[["ctrl+a","mac+meta+a"],he.selectAll],[["ctrl+z","mac+meta+z"],he.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],he.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],he.delete],[["Escape","mac+Escape"],he.unselectAll],[["ArrowLeft","mac+ArrowLeft"],he.translateSelectedEditors,{args:[-Se,0],checker:ye}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],he.translateSelectedEditors,{args:[-Oe,0],checker:ye}],[["ArrowRight","mac+ArrowRight"],he.translateSelectedEditors,{args:[Se,0],checker:ye}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],he.translateSelectedEditors,{args:[Oe,0],checker:ye}],[["ArrowUp","mac+ArrowUp"],he.translateSelectedEditors,{args:[0,-Se],checker:ye}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],he.translateSelectedEditors,{args:[0,-Oe],checker:ye}],[["ArrowDown","mac+ArrowDown"],he.translateSelectedEditors,{args:[0,Se],checker:ye}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],he.translateSelectedEditors,{args:[0,Oe],checker:ye}]]))}destroy(){Me(this,ce,Rn).call(this),Me(this,se,wi).call(this),this._eventBus._off("editingaction",le(this,oe)),this._eventBus._off("pagechanging",le(this,J)),this._eventBus._off("scalechanging",le(this,te)),this._eventBus._off("rotationchanging",le(this,B));for(const he of le(this,A).values())he.destroy();le(this,A).clear(),le(this,H).clear(),le(this,U).clear(),$e(this,_,null),le(this,c).clear(),le(this,g).destroy(),le(this,E).destroy()}get hcmFilter(){return(0,we.shadow)(this,"hcmFilter",le(this,h)?le(this,O).addHCMFilter(le(this,h).foreground,le(this,h).background):"none")}get direction(){return(0,we.shadow)(this,"direction",getComputedStyle(le(this,G)).direction)}editAltText(he){var ye;(ye=le(this,E))==null||ye.editAltText(this,he)}onPageChanging({pageNumber:he}){$e(this,N,he-1)}focusMainContainer(){le(this,G).focus()}findParent(he,ye){for(const Se of le(this,A).values()){const{x:Oe,y:Re,width:Ne,height:Ye}=Se.div.getBoundingClientRect();if(he>=Oe&&he<=Oe+Ne&&ye>=Re&&ye<=Re+Ye)return Se}return null}disableUserSelect(he=!1){le(this,Q).classList.toggle("noUserSelect",he)}addShouldRescale(he){le(this,U).add(he)}removeShouldRescale(he){le(this,U).delete(he)}onScaleChanging({scale:he}){this.commitOrRemove(),this.viewParameters.realScale=he*Pe.PixelsPerInch.PDF_TO_CSS_UNITS;for(const ye of le(this,U))ye.onScaleChanging()}onRotationChanging({pagesRotation:he}){this.commitOrRemove(),this.viewParameters.rotation=he}addToAnnotationStorage(he){!he.isEmpty()&&le(this,l)&&!le(this,l).has(he.id)&&le(this,l).setValue(he.id,he)}blur(){if(!this.hasSelection)return;const{activeElement:he}=document;for(const ye of le(this,c))if(ye.div.contains(he)){$e(this,r,[ye,he]),ye._focusEventsAllowed=!1;break}}focus(){if(!le(this,r))return;const[he,ye]=le(this,r);$e(this,r,null),ye.addEventListener("focusin",()=>{he._focusEventsAllowed=!0},{once:!0}),ye.focus()}addEditListeners(){Me(this,V,Ai).call(this),Me(this,Ae,Si).call(this)}removeEditListeners(){Me(this,ce,Rn).call(this),Me(this,pe,vi).call(this)}copy(he){var Se;if(he.preventDefault(),(Se=le(this,_))==null||Se.commitOrRemove(),!this.hasSelection)return;const ye=[];for(const Oe of le(this,c)){const Re=Oe.serialize(!0);Re&&ye.push(Re)}ye.length!==0&&he.clipboardData.setData("application/pdfjs",JSON.stringify(ye))}cut(he){this.copy(he),this.delete()}paste(he){he.preventDefault();const{clipboardData:ye}=he;for(const Re of ye.items)for(const Ne of le(this,F))if(Ne.isHandlingMimeForPasting(Re.type)){Ne.paste(Re,this.currentLayer);return}let Se=ye.getData("application/pdfjs");if(!Se)return;try{Se=JSON.parse(Se)}catch(Re){(0,we.warn)(`paste: "${Re.message}".`);return}if(!Array.isArray(Se))return;this.unselectAll();const Oe=this.currentLayer;try{const Re=[];for(const Ge of Se){const ze=Oe.deserialize(Ge);if(!ze)return;Re.push(ze)}const Ne=()=>{for(const Ge of Re)Me(this,Fe,Ci).call(this,Ge);Me(this,_e,ki).call(this,Re)},Ye=()=>{for(const Ge of Re)Ge.remove()};this.addCommands({cmd:Ne,undo:Ye,mustExec:!0})}catch(Re){(0,we.warn)(`paste: "${Re.message}".`)}}keydown(he){var ye;(ye=this.getActive())!=null&&ye.shouldGetKeyboardEvents()||Je._keyboardManager.exec(this,he)}onEditingAction(he){["undo","redo","delete","selectAll"].includes(he.name)&&this[he.name]()}setEditingState(he){he?(Me(this,ee,ca).call(this),Me(this,V,Ai).call(this),Me(this,Ae,Si).call(this),Me(this,fe,Jt).call(this,{isEditing:le(this,p)!==we.AnnotationEditorType.NONE,isEmpty:Me(this,Ue,Sn).call(this),hasSomethingToUndo:le(this,g).hasSomethingToUndo(),hasSomethingToRedo:le(this,g).hasSomethingToRedo(),hasSelectedEditor:!1})):(Me(this,se,wi).call(this),Me(this,ce,Rn).call(this),Me(this,pe,vi).call(this),Me(this,fe,Jt).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(he){if(!le(this,F)){$e(this,F,he);for(const ye of le(this,F))Me(this,Te,An).call(this,ye.defaultPropertiesToUpdate)}}getId(){return le(this,m).getId()}get currentLayer(){return le(this,A).get(le(this,N))}getLayer(he){return le(this,A).get(he)}get currentPageIndex(){return le(this,N)}addLayer(he){le(this,A).set(he.pageIndex,he),le(this,x)?he.enable():he.disable()}removeLayer(he){le(this,A).delete(he.pageIndex)}updateMode(he,ye=null){if(le(this,p)!==he){if($e(this,p,he),he===we.AnnotationEditorType.NONE){this.setEditingState(!1),Me(this,me,ha).call(this);return}this.setEditingState(!0),Me(this,Ie,la).call(this),this.unselectAll();for(const Se of le(this,A).values())Se.updateMode(he);if(ye){for(const Se of le(this,H).values())if(Se.annotationElementId===ye){this.setSelected(Se),Se.enterInEditMode();break}}}}updateToolbar(he){he!==le(this,p)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:he})}updateParams(he,ye){if(le(this,F)){if(he===we.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(he);return}for(const Se of le(this,c))Se.updateParams(he,ye);for(const Se of le(this,F))Se.updateDefaultParams(he,ye)}}enableWaiting(he=!1){if(le(this,y)!==he){$e(this,y,he);for(const ye of le(this,A).values())he?ye.disableClick():ye.enableClick(),ye.div.classList.toggle("waiting",he)}}getEditors(he){const ye=[];for(const Se of le(this,H).values())Se.pageIndex===he&&ye.push(Se);return ye}getEditor(he){return le(this,H).get(he)}addEditor(he){le(this,H).set(he.id,he)}removeEditor(he){var ye;le(this,H).delete(he.id),this.unselect(he),(!he.annotationElementId||!le(this,s).has(he.annotationElementId))&&((ye=le(this,l))==null||ye.remove(he.id))}addDeletedAnnotationElement(he){le(this,s).add(he.annotationElementId),he.deleted=!0}isDeletedAnnotationElement(he){return le(this,s).has(he)}removeDeletedAnnotationElement(he){le(this,s).delete(he.annotationElementId),he.deleted=!1}setActiveEditor(he){le(this,_)!==he&&($e(this,_,he),he&&Me(this,Te,An).call(this,he.propertiesToUpdate))}toggleSelected(he){if(le(this,c).has(he)){le(this,c).delete(he),he.unselect(),Me(this,fe,Jt).call(this,{hasSelectedEditor:this.hasSelection});return}le(this,c).add(he),he.select(),Me(this,Te,An).call(this,he.propertiesToUpdate),Me(this,fe,Jt).call(this,{hasSelectedEditor:!0})}setSelected(he){for(const ye of le(this,c))ye!==he&&ye.unselect();le(this,c).clear(),le(this,c).add(he),he.select(),Me(this,Te,An).call(this,he.propertiesToUpdate),Me(this,fe,Jt).call(this,{hasSelectedEditor:!0})}isSelected(he){return le(this,c).has(he)}unselect(he){he.unselect(),le(this,c).delete(he),Me(this,fe,Jt).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return le(this,c).size!==0}undo(){le(this,g).undo(),Me(this,fe,Jt).call(this,{hasSomethingToUndo:le(this,g).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Me(this,Ue,Sn).call(this)})}redo(){le(this,g).redo(),Me(this,fe,Jt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:le(this,g).hasSomethingToRedo(),isEmpty:Me(this,Ue,Sn).call(this)})}addCommands(he){le(this,g).add(he),Me(this,fe,Jt).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Me(this,Ue,Sn).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const he=[...le(this,c)],ye=()=>{for(const Oe of he)Oe.remove()},Se=()=>{for(const Oe of he)Me(this,Fe,Ci).call(this,Oe)};this.addCommands({cmd:ye,undo:Se,mustExec:!0})}commitOrRemove(){var he;(he=le(this,_))==null||he.commitOrRemove()}hasSomethingToControl(){return le(this,_)||this.hasSelection}selectAll(){for(const he of le(this,c))he.commit();Me(this,_e,ki).call(this,le(this,H).values())}unselectAll(){if(le(this,_)){le(this,_).commitOrRemove();return}if(this.hasSelection){for(const he of le(this,c))he.unselect();le(this,c).clear(),Me(this,fe,Jt).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(he,ye,Se=!1){if(Se||this.commitOrRemove(),!this.hasSelection)return;le(this,Y)[0]+=he,le(this,Y)[1]+=ye;const[Oe,Re]=le(this,Y),Ne=[...le(this,c)],Ye=1e3;le(this,W)&&clearTimeout(le(this,W)),$e(this,W,setTimeout(()=>{$e(this,W,null),le(this,Y)[0]=le(this,Y)[1]=0,this.addCommands({cmd:()=>{for(const Ge of Ne)le(this,H).has(Ge.id)&&Ge.translateInPage(Oe,Re)},undo:()=>{for(const Ge of Ne)le(this,H).has(Ge.id)&&Ge.translateInPage(-Oe,-Re)},mustExec:!1})},Ye));for(const Ge of Ne)Ge.translateInPage(he,ye)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),$e(this,u,new Map);for(const he of le(this,c))le(this,u).set(he,{savedX:he.x,savedY:he.y,savedPageIndex:he.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!le(this,u))return!1;this.disableUserSelect(!1);const he=le(this,u);$e(this,u,null);let ye=!1;for(const[{x:Oe,y:Re,pageIndex:Ne},Ye]of he)Ye.newX=Oe,Ye.newY=Re,Ye.newPageIndex=Ne,ye||(ye=Oe!==Ye.savedX||Re!==Ye.savedY||Ne!==Ye.savedPageIndex);if(!ye)return!1;const Se=(Oe,Re,Ne,Ye)=>{if(le(this,H).has(Oe.id)){const Ge=le(this,A).get(Ye);Ge?Oe._setParentAndPosition(Ge,Re,Ne):(Oe.pageIndex=Ye,Oe.x=Re,Oe.y=Ne)}};return this.addCommands({cmd:()=>{for(const[Oe,{newX:Re,newY:Ne,newPageIndex:Ye}]of he)Se(Oe,Re,Ne,Ye)},undo:()=>{for(const[Oe,{savedX:Re,savedY:Ne,savedPageIndex:Ye}]of he)Se(Oe,Re,Ne,Ye)},mustExec:!0}),!0}dragSelectedEditors(he,ye){if(le(this,u))for(const Se of le(this,u).keys())Se.drag(he,ye)}rebuild(he){if(he.parent===null){const ye=this.getLayer(he.pageIndex);ye?(ye.changeParent(he),ye.addOrRebuild(he)):(this.addEditor(he),this.addToAnnotationStorage(he),he.rebuild())}else he.parent.addOrRebuild(he)}isActive(he){return le(this,_)===he}getActive(){return le(this,_)}getMode(){return le(this,p)}get imageManager(){return(0,we.shadow)(this,"imageManager",new ie)}};_=new WeakMap,H=new WeakMap,A=new WeakMap,E=new WeakMap,l=new WeakMap,g=new WeakMap,N=new WeakMap,s=new WeakMap,u=new WeakMap,F=new WeakMap,U=new WeakMap,O=new WeakMap,m=new WeakMap,x=new WeakMap,y=new WeakMap,r=new WeakMap,p=new WeakMap,c=new WeakMap,h=new WeakMap,C=new WeakMap,D=new WeakMap,X=new WeakMap,q=new WeakMap,re=new WeakMap,K=new WeakMap,oe=new WeakMap,J=new WeakMap,te=new WeakMap,B=new WeakMap,j=new WeakMap,Y=new WeakMap,W=new WeakMap,G=new WeakMap,Q=new WeakMap,ee=new WeakSet,ca=function(){window.addEventListener("focus",le(this,D)),window.addEventListener("blur",le(this,C))},se=new WeakSet,wi=function(){window.removeEventListener("focus",le(this,D)),window.removeEventListener("blur",le(this,C))},V=new WeakSet,Ai=function(){window.addEventListener("keydown",le(this,K),{capture:!0})},ce=new WeakSet,Rn=function(){window.removeEventListener("keydown",le(this,K),{capture:!0})},Ae=new WeakSet,Si=function(){document.addEventListener("copy",le(this,X)),document.addEventListener("cut",le(this,q)),document.addEventListener("paste",le(this,re))},pe=new WeakSet,vi=function(){document.removeEventListener("copy",le(this,X)),document.removeEventListener("cut",le(this,q)),document.removeEventListener("paste",le(this,re))},fe=new WeakSet,Jt=function(he){Object.entries(he).some(([Se,Oe])=>le(this,j)[Se]!==Oe)&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(le(this,j),he)})},Te=new WeakSet,An=function(he){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:he})},Ie=new WeakSet,la=function(){if(!le(this,x)){$e(this,x,!0);for(const he of le(this,A).values())he.enable()}},me=new WeakSet,ha=function(){if(this.unselectAll(),le(this,x)){$e(this,x,!1);for(const he of le(this,A).values())he.disable()}},Fe=new WeakSet,Ci=function(he){const ye=le(this,A).get(he.pageIndex);ye?ye.addOrRebuild(he):this.addEditor(he)},Ue=new WeakSet,Sn=function(){if(le(this,H).size===0)return!0;if(le(this,H).size===1)for(const he of le(this,H).values())return he.isEmpty();return!1},_e=new WeakSet,ki=function(he){le(this,c).clear();for(const ye of he)ye.isEmpty()||(le(this,c).add(ye),ye.select());Me(this,fe,Jt).call(this,{hasSelectedEditor:!0})},Rt(Je,"TRANSLATE_SMALL",1),Rt(Je,"TRANSLATE_BIG",10);let e=Je;Ce.AnnotationEditorUIManager=e},(at,Ce,Ve)=>{var N,s,u,F,U,O,m,x,y,r,p,c,ln,C,hn,X,Fi,re,Dn,oe,Ln,te,vn,j,Cn;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.StatTimer=Ce.RenderingCancelledException=Ce.PixelsPerInch=Ce.PageViewport=Ce.PDFDateString=Ce.DOMStandardFontDataFactory=Ce.DOMSVGFactory=Ce.DOMFilterFactory=Ce.DOMCanvasFactory=Ce.DOMCMapReaderFactory=void 0,Ce.deprecated=w,Ce.getColorValues=H,Ce.getCurrentTransform=A,Ce.getCurrentTransformInverse=E,Ce.getFilenameFromUrl=I,Ce.getPdfFilenameFromUrl=T,Ce.getRGB=_,Ce.getXfaPageViewport=M,Ce.isDataScheme=$,Ce.isPdfFile=L,Ce.isValidFetchUrl=f,Ce.loadScript=S,Ce.noContextMenu=i,Ce.setLayerDimensions=l;var we=Ve(7),Pe=Ve(1);const qe="http://www.w3.org/2000/svg",g=class g{};Rt(g,"CSS",96),Rt(g,"PDF",72),Rt(g,"PDF_TO_CSS_UNITS",g.CSS/g.PDF);let ke=g;Ce.PixelsPerInch=ke;class P extends we.BaseFilterFactory{constructor({docId:Q,ownerDocument:ee=globalThis.document}={}){super();Ee(this,c);Ee(this,C);Ee(this,X);Ee(this,re);Ee(this,oe);Ee(this,te);Ee(this,j);Ee(this,N,void 0);Ee(this,s,void 0);Ee(this,u,void 0);Ee(this,F,void 0);Ee(this,U,void 0);Ee(this,O,void 0);Ee(this,m,void 0);Ee(this,x,void 0);Ee(this,y,void 0);Ee(this,r,void 0);Ee(this,p,0);$e(this,u,Q),$e(this,F,ee)}addFilter(Q){if(!Q)return"none";let ee=le(this,c,ln).get(Q);if(ee)return ee;let z,se,ne,V;if(Q.length===1){const Ae=Q[0],ve=new Array(256);for(let pe=0;pe<256;pe++)ve[pe]=Ae[pe]/255;V=z=se=ne=ve.join(",")}else{const[Ae,ve,pe]=Q,ge=new Array(256),fe=new Array(256),xe=new Array(256);for(let Te=0;Te<256;Te++)ge[Te]=Ae[Te]/255,fe[Te]=ve[Te]/255,xe[Te]=pe[Te]/255;z=ge.join(","),se=fe.join(","),ne=xe.join(","),V=`${z}${se}${ne}`}if(ee=le(this,c,ln).get(V),ee)return le(this,c,ln).set(Q,ee),ee;const ae=`g_${le(this,u)}_transfer_map_${wn(this,p)._++}`,ce=`url(#${ae})`;le(this,c,ln).set(Q,ce),le(this,c,ln).set(V,ce);const de=Me(this,re,Dn).call(this,ae);return Me(this,te,vn).call(this,z,se,ne,de),ce}addHCMFilter(Q,ee){var ve;const z=`${Q}-${ee}`;if(le(this,O)===z)return le(this,m);if($e(this,O,z),$e(this,m,"none"),(ve=le(this,U))==null||ve.remove(),!Q||!ee)return le(this,m);const se=Me(this,j,Cn).call(this,Q);Q=Pe.Util.makeHexColor(...se);const ne=Me(this,j,Cn).call(this,ee);if(ee=Pe.Util.makeHexColor(...ne),le(this,C,hn).style.color="",Q==="#000000"&&ee==="#ffffff"||Q===ee)return le(this,m);const V=new Array(256);for(let pe=0;pe<=255;pe++){const ge=pe/255;V[pe]=ge<=.03928?ge/12.92:((ge+.055)/1.055)**2.4}const ae=V.join(","),ce=`g_${le(this,u)}_hcm_filter`,de=$e(this,x,Me(this,re,Dn).call(this,ce));Me(this,te,vn).call(this,ae,ae,ae,de),Me(this,X,Fi).call(this,de);const Ae=(pe,ge)=>{const fe=se[pe]/255,xe=ne[pe]/255,Te=new Array(ge+1);for(let Le=0;Le<=ge;Le++)Te[Le]=fe+Le/ge*(xe-fe);return Te.join(",")};return Me(this,te,vn).call(this,Ae(0,5),Ae(1,5),Ae(2,5),de),$e(this,m,`url(#${ce})`),le(this,m)}addHighlightHCMFilter(Q,ee,z,se){var xe;const ne=`${Q}-${ee}-${z}-${se}`;if(le(this,y)===ne)return le(this,r);if($e(this,y,ne),$e(this,r,"none"),(xe=le(this,x))==null||xe.remove(),!Q||!ee)return le(this,r);const[V,ae]=[Q,ee].map(Me(this,j,Cn).bind(this));let ce=Math.round(.2126*V[0]+.7152*V[1]+.0722*V[2]),de=Math.round(.2126*ae[0]+.7152*ae[1]+.0722*ae[2]),[Ae,ve]=[z,se].map(Me(this,j,Cn).bind(this));de<ce&&([ce,de,Ae,ve]=[de,ce,ve,Ae]),le(this,C,hn).style.color="";const pe=(Te,Le,Ie)=>{const ue=new Array(256),me=(de-ce)/Ie,De=Te/255,Fe=(Le-Te)/(255*Ie);let je=0;for(let Ue=0;Ue<=Ie;Ue++){const ht=Math.round(ce+Ue*me),_e=De+Ue*Fe;for(let st=je;st<=ht;st++)ue[st]=_e;je=ht+1}for(let Ue=je;Ue<256;Ue++)ue[Ue]=ue[je-1];return ue.join(",")},ge=`g_${le(this,u)}_hcm_highlight_filter`,fe=$e(this,x,Me(this,re,Dn).call(this,ge));return Me(this,X,Fi).call(this,fe),Me(this,te,vn).call(this,pe(Ae[0],ve[0],5),pe(Ae[1],ve[1],5),pe(Ae[2],ve[2],5),fe),$e(this,r,`url(#${ge})`),le(this,r)}destroy(Q=!1){Q&&(le(this,m)||le(this,r))||(le(this,s)&&(le(this,s).parentNode.parentNode.remove(),$e(this,s,null)),le(this,N)&&(le(this,N).clear(),$e(this,N,null)),$e(this,p,0))}}N=new WeakMap,s=new WeakMap,u=new WeakMap,F=new WeakMap,U=new WeakMap,O=new WeakMap,m=new WeakMap,x=new WeakMap,y=new WeakMap,r=new WeakMap,p=new WeakMap,c=new WeakSet,ln=function(){return le(this,N)||$e(this,N,new Map)},C=new WeakSet,hn=function(){if(!le(this,s)){const Q=le(this,F).createElement("div"),{style:ee}=Q;ee.visibility="hidden",ee.contain="strict",ee.width=ee.height=0,ee.position="absolute",ee.top=ee.left=0,ee.zIndex=-1;const z=le(this,F).createElementNS(qe,"svg");z.setAttribute("width",0),z.setAttribute("height",0),$e(this,s,le(this,F).createElementNS(qe,"defs")),Q.append(z),z.append(le(this,s)),le(this,F).body.append(Q)}return le(this,s)},X=new WeakSet,Fi=function(Q){const ee=le(this,F).createElementNS(qe,"feColorMatrix");ee.setAttribute("type","matrix"),ee.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),Q.append(ee)},re=new WeakSet,Dn=function(Q){const ee=le(this,F).createElementNS(qe,"filter");return ee.setAttribute("color-interpolation-filters","sRGB"),ee.setAttribute("id",Q),le(this,C,hn).append(ee),ee},oe=new WeakSet,Ln=function(Q,ee,z){const se=le(this,F).createElementNS(qe,ee);se.setAttribute("type","discrete"),se.setAttribute("tableValues",z),Q.append(se)},te=new WeakSet,vn=function(Q,ee,z,se){const ne=le(this,F).createElementNS(qe,"feComponentTransfer");se.append(ne),Me(this,oe,Ln).call(this,ne,"feFuncR",Q),Me(this,oe,Ln).call(this,ne,"feFuncG",ee),Me(this,oe,Ln).call(this,ne,"feFuncB",z)},j=new WeakSet,Cn=function(Q){return le(this,C,hn).style.color=Q,_(getComputedStyle(le(this,C,hn)).getPropertyValue("color"))},Ce.DOMFilterFactory=P;class ie extends we.BaseCanvasFactory{constructor({ownerDocument:G=globalThis.document}={}){super(),this._document=G}_createCanvas(G,Q){const ee=this._document.createElement("canvas");return ee.width=G,ee.height=Q,ee}}Ce.DOMCanvasFactory=ie;async function n(W,G=!1){if(f(W,document.baseURI)){const Q=await fetch(W);if(!Q.ok)throw new Error(Q.statusText);return G?new Uint8Array(await Q.arrayBuffer()):(0,Pe.stringToBytes)(await Q.text())}return new Promise((Q,ee)=>{const z=new XMLHttpRequest;z.open("GET",W,!0),G&&(z.responseType="arraybuffer"),z.onreadystatechange=()=>{if(z.readyState===XMLHttpRequest.DONE){if(z.status===200||z.status===0){let se;if(G&&z.response?se=new Uint8Array(z.response):!G&&z.responseText&&(se=(0,Pe.stringToBytes)(z.responseText)),se){Q(se);return}}ee(new Error(z.statusText))}},z.send(null)})}class k extends we.BaseCMapReaderFactory{_fetchData(G,Q){return n(G,this.isCompressed).then(ee=>({cMapData:ee,compressionType:Q}))}}Ce.DOMCMapReaderFactory=k;class R extends we.BaseStandardFontDataFactory{_fetchData(G){return n(G,!0)}}Ce.DOMStandardFontDataFactory=R;class e extends we.BaseSVGFactory{_createSVG(G){return document.createElementNS(qe,G)}}Ce.DOMSVGFactory=e;class t{constructor({viewBox:G,scale:Q,rotation:ee,offsetX:z=0,offsetY:se=0,dontFlip:ne=!1}){this.viewBox=G,this.scale=Q,this.rotation=ee,this.offsetX=z,this.offsetY=se;const V=(G[2]+G[0])/2,ae=(G[3]+G[1])/2;let ce,de,Ae,ve;switch(ee%=360,ee<0&&(ee+=360),ee){case 180:ce=-1,de=0,Ae=0,ve=1;break;case 90:ce=0,de=1,Ae=1,ve=0;break;case 270:ce=0,de=-1,Ae=-1,ve=0;break;case 0:ce=1,de=0,Ae=0,ve=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ne&&(Ae=-Ae,ve=-ve);let pe,ge,fe,xe;ce===0?(pe=Math.abs(ae-G[1])*Q+z,ge=Math.abs(V-G[0])*Q+se,fe=(G[3]-G[1])*Q,xe=(G[2]-G[0])*Q):(pe=Math.abs(V-G[0])*Q+z,ge=Math.abs(ae-G[1])*Q+se,fe=(G[2]-G[0])*Q,xe=(G[3]-G[1])*Q),this.transform=[ce*Q,de*Q,Ae*Q,ve*Q,pe-ce*Q*V-Ae*Q*ae,ge-de*Q*V-ve*Q*ae],this.width=fe,this.height=xe}get rawDims(){const{viewBox:G}=this;return(0,Pe.shadow)(this,"rawDims",{pageWidth:G[2]-G[0],pageHeight:G[3]-G[1],pageX:G[0],pageY:G[1]})}clone({scale:G=this.scale,rotation:Q=this.rotation,offsetX:ee=this.offsetX,offsetY:z=this.offsetY,dontFlip:se=!1}={}){return new t({viewBox:this.viewBox.slice(),scale:G,rotation:Q,offsetX:ee,offsetY:z,dontFlip:se})}convertToViewportPoint(G,Q){return Pe.Util.applyTransform([G,Q],this.transform)}convertToViewportRectangle(G){const Q=Pe.Util.applyTransform([G[0],G[1]],this.transform),ee=Pe.Util.applyTransform([G[2],G[3]],this.transform);return[Q[0],Q[1],ee[0],ee[1]]}convertToPdfPoint(G,Q){return Pe.Util.applyInverseTransform([G,Q],this.transform)}}Ce.PageViewport=t;class o extends Pe.BaseException{constructor(G,Q=0){super(G,"RenderingCancelledException"),this.extraDelay=Q}}Ce.RenderingCancelledException=o;function $(W){const G=W.length;let Q=0;for(;Q<G&&W[Q].trim()==="";)Q++;return W.substring(Q,Q+5).toLowerCase()==="data:"}function L(W){return typeof W=="string"&&/\.pdf$/i.test(W)}function I(W,G=!1){return G||([W]=W.split(/[#?]/,1)),W.substring(W.lastIndexOf("/")+1)}function T(W,G="document.pdf"){if(typeof W!="string")return G;if($(W))return(0,Pe.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),G;const Q=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,ee=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,z=Q.exec(W);let se=ee.exec(z[1])||ee.exec(z[2])||ee.exec(z[3]);if(se&&(se=se[0],se.includes("%")))try{se=ee.exec(decodeURIComponent(se))[0]}catch{}return se||G}class d{constructor(){Rt(this,"started",Object.create(null));Rt(this,"times",[])}time(G){G in this.started&&(0,Pe.warn)(`Timer is already running for ${G}`),this.started[G]=Date.now()}timeEnd(G){G in this.started||(0,Pe.warn)(`Timer has not been started for ${G}`),this.times.push({name:G,start:this.started[G],end:Date.now()}),delete this.started[G]}toString(){const G=[];let Q=0;for(const{name:ee}of this.times)Q=Math.max(ee.length,Q);for(const{name:ee,start:z,end:se}of this.times)G.push(`${ee.padEnd(Q)} ${se-z}ms
`);return G.join("")}}Ce.StatTimer=d;function f(W,G){try{const{protocol:Q}=G?new URL(W,G):new URL(W);return Q==="http:"||Q==="https:"}catch{return!1}}function i(W){W.preventDefault()}function S(W,G=!1){return new Promise((Q,ee)=>{const z=document.createElement("script");z.src=W,z.onload=function(se){G&&z.remove(),Q(se)},z.onerror=function(){ee(new Error(`Cannot load script at: ${z.src}`))},(document.head||document.documentElement).append(z)})}function w(W){console.log("Deprecated API usage: "+W)}let v;class b{static toDateObject(G){if(!G||typeof G!="string")return null;v||(v=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const Q=v.exec(G);if(!Q)return null;const ee=parseInt(Q[1],10);let z=parseInt(Q[2],10);z=z>=1&&z<=12?z-1:0;let se=parseInt(Q[3],10);se=se>=1&&se<=31?se:1;let ne=parseInt(Q[4],10);ne=ne>=0&&ne<=23?ne:0;let V=parseInt(Q[5],10);V=V>=0&&V<=59?V:0;let ae=parseInt(Q[6],10);ae=ae>=0&&ae<=59?ae:0;const ce=Q[7]||"Z";let de=parseInt(Q[8],10);de=de>=0&&de<=23?de:0;let Ae=parseInt(Q[9],10)||0;return Ae=Ae>=0&&Ae<=59?Ae:0,ce==="-"?(ne+=de,V+=Ae):ce==="+"&&(ne-=de,V-=Ae),new Date(Date.UTC(ee,z,se,ne,V,ae))}}Ce.PDFDateString=b;function M(W,{scale:G=1,rotation:Q=0}){const{width:ee,height:z}=W.attributes.style,se=[0,0,parseInt(ee),parseInt(z)];return new t({viewBox:se,scale:G,rotation:Q})}function _(W){if(W.startsWith("#")){const G=parseInt(W.slice(1),16);return[(G&16711680)>>16,(G&65280)>>8,G&255]}return W.startsWith("rgb(")?W.slice(4,-1).split(",").map(G=>parseInt(G)):W.startsWith("rgba(")?W.slice(5,-1).split(",").map(G=>parseInt(G)).slice(0,3):((0,Pe.warn)(`Not a valid color format: "${W}"`),[0,0,0])}function H(W){const G=document.createElement("span");G.style.visibility="hidden",document.body.append(G);for(const Q of W.keys()){G.style.color=Q;const ee=window.getComputedStyle(G).color;W.set(Q,_(ee))}G.remove()}function A(W){const{a:G,b:Q,c:ee,d:z,e:se,f:ne}=W.getTransform();return[G,Q,ee,z,se,ne]}function E(W){const{a:G,b:Q,c:ee,d:z,e:se,f:ne}=W.getTransform().invertSelf();return[G,Q,ee,z,se,ne]}function l(W,G,Q=!1,ee=!0){if(G instanceof t){const{pageWidth:z,pageHeight:se}=G.rawDims,{style:ne}=W,V=Pe.FeatureTest.isCSSRoundSupported,ae=`var(--scale-factor) * ${z}px`,ce=`var(--scale-factor) * ${se}px`,de=V?`round(${ae}, 1px)`:`calc(${ae})`,Ae=V?`round(${ce}, 1px)`:`calc(${ce})`;!Q||G.rotation%180===0?(ne.width=de,ne.height=Ae):(ne.width=Ae,ne.height=de)}ee&&W.setAttribute("data-main-rotation",G.rotation)}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.BaseStandardFontDataFactory=Ce.BaseSVGFactory=Ce.BaseFilterFactory=Ce.BaseCanvasFactory=Ce.BaseCMapReaderFactory=void 0;var we=Ve(1);class Pe{constructor(){this.constructor===Pe&&(0,we.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(k){return"none"}addHCMFilter(k,R){return"none"}addHighlightHCMFilter(k,R,e,t){return"none"}destroy(k=!1){}}Ce.BaseFilterFactory=Pe;class qe{constructor(){this.constructor===qe&&(0,we.unreachable)("Cannot initialize BaseCanvasFactory.")}create(k,R){if(k<=0||R<=0)throw new Error("Invalid canvas size");const e=this._createCanvas(k,R);return{canvas:e,context:e.getContext("2d")}}reset(k,R,e){if(!k.canvas)throw new Error("Canvas is not specified");if(R<=0||e<=0)throw new Error("Invalid canvas size");k.canvas.width=R,k.canvas.height=e}destroy(k){if(!k.canvas)throw new Error("Canvas is not specified");k.canvas.width=0,k.canvas.height=0,k.canvas=null,k.context=null}_createCanvas(k,R){(0,we.unreachable)("Abstract method `_createCanvas` called.")}}Ce.BaseCanvasFactory=qe;class ke{constructor({baseUrl:k=null,isCompressed:R=!0}){this.constructor===ke&&(0,we.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=k,this.isCompressed=R}async fetch({name:k}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!k)throw new Error("CMap name must be specified.");const R=this.baseUrl+k+(this.isCompressed?".bcmap":""),e=this.isCompressed?we.CMapCompressionType.BINARY:we.CMapCompressionType.NONE;return this._fetchData(R,e).catch(t=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${R}`)})}_fetchData(k,R){(0,we.unreachable)("Abstract method `_fetchData` called.")}}Ce.BaseCMapReaderFactory=ke;class P{constructor({baseUrl:k=null}){this.constructor===P&&(0,we.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=k}async fetch({filename:k}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!k)throw new Error("Font filename must be specified.");const R=`${this.baseUrl}${k}`;return this._fetchData(R).catch(e=>{throw new Error(`Unable to load font data at: ${R}`)})}_fetchData(k){(0,we.unreachable)("Abstract method `_fetchData` called.")}}Ce.BaseStandardFontDataFactory=P;class ie{constructor(){this.constructor===ie&&(0,we.unreachable)("Cannot initialize BaseSVGFactory.")}create(k,R,e=!1){if(k<=0||R<=0)throw new Error("Invalid SVG dimensions");const t=this._createSVG("svg:svg");return t.setAttribute("version","1.1"),e||(t.setAttribute("width",`${k}px`),t.setAttribute("height",`${R}px`)),t.setAttribute("preserveAspectRatio","none"),t.setAttribute("viewBox",`0 0 ${k} ${R}`),t}createElement(k){if(typeof k!="string")throw new Error("Invalid SVG element type");return this._createSVG(k)}_createSVG(k){(0,we.unreachable)("Abstract method `_createSVG` called.")}}Ce.BaseSVGFactory=ie},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.MurmurHash3_64=void 0;var we=Ve(1);const Pe=3285377520,qe=4294901760,ke=65535;class P{constructor(n){this.h1=n?n&4294967295:Pe,this.h2=n?n&4294967295:Pe}update(n){let k,R;if(typeof n=="string"){k=new Uint8Array(n.length*2),R=0;for(let w=0,v=n.length;w<v;w++){const b=n.charCodeAt(w);b<=255?k[R++]=b:(k[R++]=b>>>8,k[R++]=b&255)}}else if((0,we.isArrayBuffer)(n))k=n.slice(),R=k.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const e=R>>2,t=R-e*4,o=new Uint32Array(k.buffer,0,e);let $=0,L=0,I=this.h1,T=this.h2;const d=3432918353,f=461845907,i=d&ke,S=f&ke;for(let w=0;w<e;w++)w&1?($=o[w],$=$*d&qe|$*i&ke,$=$<<15|$>>>17,$=$*f&qe|$*S&ke,I^=$,I=I<<13|I>>>19,I=I*5+3864292196):(L=o[w],L=L*d&qe|L*i&ke,L=L<<15|L>>>17,L=L*f&qe|L*S&ke,T^=L,T=T<<13|T>>>19,T=T*5+3864292196);switch($=0,t){case 3:$^=k[e*4+2]<<16;case 2:$^=k[e*4+1]<<8;case 1:$^=k[e*4],$=$*d&qe|$*i&ke,$=$<<15|$>>>17,$=$*f&qe|$*S&ke,e&1?I^=$:T^=$}this.h1=I,this.h2=T}hexdigest(){let n=this.h1,k=this.h2;return n^=k>>>1,n=n*3981806797&qe|n*36045&ke,k=k*4283543511&qe|((k<<16|n>>>16)*2950163797&qe)>>>16,n^=k>>>1,n=n*444984403&qe|n*60499&ke,k=k*3301882366&qe|((k<<16|n>>>16)*3120437893&qe)>>>16,n^=k>>>1,(n>>>0).toString(16).padStart(8,"0")+(k>>>0).toString(16).padStart(8,"0")}}Ce.MurmurHash3_64=P},(at,Ce,Ve)=>{var ke;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.FontLoader=Ce.FontFaceObject=void 0;var we=Ve(1);class Pe{constructor({ownerDocument:ie=globalThis.document,styleElement:n=null}){Ee(this,ke,new Set);this._document=ie,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(ie){this.nativeFontFaces.add(ie),this._document.fonts.add(ie)}removeNativeFontFace(ie){this.nativeFontFaces.delete(ie),this._document.fonts.delete(ie)}insertRule(ie){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const n=this.styleElement.sheet;n.insertRule(ie,n.cssRules.length)}clear(){for(const ie of this.nativeFontFaces)this._document.fonts.delete(ie);this.nativeFontFaces.clear(),le(this,ke).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(ie){if(!(!ie||le(this,ke).has(ie.loadedName))){if((0,we.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:n,src:k,style:R}=ie,e=new FontFace(n,k,R);this.addNativeFontFace(e);try{await e.load(),le(this,ke).add(n)}catch{(0,we.warn)(`Cannot load system font: ${ie.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(e)}return}(0,we.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(ie){if(ie.attached||ie.missingFile&&!ie.systemFontInfo)return;if(ie.attached=!0,ie.systemFontInfo){await this.loadSystemFont(ie.systemFontInfo);return}if(this.isFontLoadingAPISupported){const k=ie.createNativeFontFace();if(k){this.addNativeFontFace(k);try{await k.loaded}catch(R){throw(0,we.warn)(`Failed to load font '${k.family}': '${R}'.`),ie.disableFontFace=!0,R}}return}const n=ie.createFontFaceRule();if(n){if(this.insertRule(n),this.isSyncFontLoadingSupported)return;await new Promise(k=>{const R=this._queueLoadingCallback(k);this._prepareFontLoadEvent(ie,R)})}}get isFontLoadingAPISupported(){var n;const ie=!!((n=this._document)!=null&&n.fonts);return(0,we.shadow)(this,"isFontLoadingAPISupported",ie)}get isSyncFontLoadingSupported(){let ie=!1;return(we.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(ie=!0),(0,we.shadow)(this,"isSyncFontLoadingSupported",ie)}_queueLoadingCallback(ie){function n(){for((0,we.assert)(!R.done,"completeRequest() cannot be called twice."),R.done=!0;k.length>0&&k[0].done;){const e=k.shift();setTimeout(e.callback,0)}}const{loadingRequests:k}=this,R={done:!1,complete:n,callback:ie};return k.push(R),R}get _loadTestFont(){const ie=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,we.shadow)(this,"_loadTestFont",ie)}_prepareFontLoadEvent(ie,n){function k(_,H){return _.charCodeAt(H)<<24|_.charCodeAt(H+1)<<16|_.charCodeAt(H+2)<<8|_.charCodeAt(H+3)&255}function R(_,H,A,E){const l=_.substring(0,H),g=_.substring(H+A);return l+E+g}let e,t;const o=this._document.createElement("canvas");o.width=1,o.height=1;const $=o.getContext("2d");let L=0;function I(_,H){if(++L>30){(0,we.warn)("Load test font never loaded."),H();return}if($.font="30px "+_,$.fillText(".",0,20),$.getImageData(0,0,1,1).data[3]>0){H();return}setTimeout(I.bind(null,_,H))}const T=`lt${Date.now()}${this.loadTestFontId++}`;let d=this._loadTestFont;d=R(d,976,T.length,T);const i=16,S=1482184792;let w=k(d,i);for(e=0,t=T.length-3;e<t;e+=4)w=w-S+k(T,e)|0;e<T.length&&(w=w-S+k(T+"XXX",e)|0),d=R(d,i,4,(0,we.string32)(w));const v=`url(data:font/opentype;base64,${btoa(d)});`,b=`@font-face {font-family:"${T}";src:${v}}`;this.insertRule(b);const M=this._document.createElement("div");M.style.visibility="hidden",M.style.width=M.style.height="10px",M.style.position="absolute",M.style.top=M.style.left="0px";for(const _ of[ie.loadedName,T]){const H=this._document.createElement("span");H.textContent="Hi",H.style.fontFamily=_,M.append(H)}this._document.body.append(M),I(T,()=>{M.remove(),n.complete()})}}ke=new WeakMap,Ce.FontLoader=Pe;class qe{constructor(ie,{isEvalSupported:n=!0,disableFontFace:k=!1,ignoreErrors:R=!1,inspectFont:e=null}){this.compiledGlyphs=Object.create(null);for(const t in ie)this[t]=ie[t];this.isEvalSupported=n!==!1,this.disableFontFace=k===!0,this.ignoreErrors=R===!0,this._inspectFont=e}createNativeFontFace(){var n;if(!this.data||this.disableFontFace)return null;let ie;if(!this.cssFontInfo)ie=new FontFace(this.loadedName,this.data,{});else{const k={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(k.style=`oblique ${this.cssFontInfo.italicAngle}deg`),ie=new FontFace(this.cssFontInfo.fontFamily,this.data,k)}return(n=this._inspectFont)==null||n.call(this,this),ie}createFontFaceRule(){var R;if(!this.data||this.disableFontFace)return null;const ie=(0,we.bytesToString)(this.data),n=`url(data:${this.mimetype};base64,${btoa(ie)});`;let k;if(!this.cssFontInfo)k=`@font-face {font-family:"${this.loadedName}";src:${n}}`;else{let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),k=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${n}}`}return(R=this._inspectFont)==null||R.call(this,this,n),k}getPathGenerator(ie,n){if(this.compiledGlyphs[n]!==void 0)return this.compiledGlyphs[n];let k;try{k=ie.get(this.loadedName+"_path_"+n)}catch(R){if(!this.ignoreErrors)throw R;return(0,we.warn)(`getPathGenerator - ignoring character: "${R}".`),this.compiledGlyphs[n]=function(e,t){}}if(this.isEvalSupported&&we.FeatureTest.isEvalSupported){const R=[];for(const e of k){const t=e.args!==void 0?e.args.join(","):"";R.push("c.",e.cmd,"(",t,`);
`)}return this.compiledGlyphs[n]=new Function("c","size",R.join(""))}return this.compiledGlyphs[n]=function(R,e){for(const t of k)t.cmd==="scale"&&(t.args=[e,-e]),R[t.cmd].apply(R,t.args)}}}Ce.FontFaceObject=qe},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.NodeStandardFontDataFactory=Ce.NodeFilterFactory=Ce.NodeCanvasFactory=Ce.NodeCMapReaderFactory=void 0;var we=Ve(7);Ve(1);const Pe=function(n){return new Promise((k,R)=>{require$$5.readFile(n,(t,o)=>{if(t||!o){R(new Error(t));return}k(new Uint8Array(o))})})};class qe extends we.BaseFilterFactory{}Ce.NodeFilterFactory=qe;class ke extends we.BaseCanvasFactory{_createCanvas(k,R){return require$$5.createCanvas(k,R)}}Ce.NodeCanvasFactory=ke;class P extends we.BaseCMapReaderFactory{_fetchData(k,R){return Pe(k).then(e=>({cMapData:e,compressionType:R}))}}Ce.NodeCMapReaderFactory=P;class ie extends we.BaseStandardFontDataFactory{_fetchData(k){return Pe(k)}}Ce.NodeStandardFontDataFactory=ie},(at,Ce,Ve)=>{var s,Ti,F,Ei;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.CanvasGraphics=void 0;var we=Ve(1),Pe=Ve(6),qe=Ve(12),ke=Ve(13);const P=16,ie=100,n=4096,k=15,R=10,e=1e3,t=16;function o(m,x){if(m._removeMirroring)throw new Error("Context is already forwarding operations.");m.__originalSave=m.save,m.__originalRestore=m.restore,m.__originalRotate=m.rotate,m.__originalScale=m.scale,m.__originalTranslate=m.translate,m.__originalTransform=m.transform,m.__originalSetTransform=m.setTransform,m.__originalResetTransform=m.resetTransform,m.__originalClip=m.clip,m.__originalMoveTo=m.moveTo,m.__originalLineTo=m.lineTo,m.__originalBezierCurveTo=m.bezierCurveTo,m.__originalRect=m.rect,m.__originalClosePath=m.closePath,m.__originalBeginPath=m.beginPath,m._removeMirroring=()=>{m.save=m.__originalSave,m.restore=m.__originalRestore,m.rotate=m.__originalRotate,m.scale=m.__originalScale,m.translate=m.__originalTranslate,m.transform=m.__originalTransform,m.setTransform=m.__originalSetTransform,m.resetTransform=m.__originalResetTransform,m.clip=m.__originalClip,m.moveTo=m.__originalMoveTo,m.lineTo=m.__originalLineTo,m.bezierCurveTo=m.__originalBezierCurveTo,m.rect=m.__originalRect,m.closePath=m.__originalClosePath,m.beginPath=m.__originalBeginPath,delete m._removeMirroring},m.save=function(){x.save(),this.__originalSave()},m.restore=function(){x.restore(),this.__originalRestore()},m.translate=function(r,p){x.translate(r,p),this.__originalTranslate(r,p)},m.scale=function(r,p){x.scale(r,p),this.__originalScale(r,p)},m.transform=function(r,p,c,h,C,D){x.transform(r,p,c,h,C,D),this.__originalTransform(r,p,c,h,C,D)},m.setTransform=function(r,p,c,h,C,D){x.setTransform(r,p,c,h,C,D),this.__originalSetTransform(r,p,c,h,C,D)},m.resetTransform=function(){x.resetTransform(),this.__originalResetTransform()},m.rotate=function(r){x.rotate(r),this.__originalRotate(r)},m.clip=function(r){x.clip(r),this.__originalClip(r)},m.moveTo=function(y,r){x.moveTo(y,r),this.__originalMoveTo(y,r)},m.lineTo=function(y,r){x.lineTo(y,r),this.__originalLineTo(y,r)},m.bezierCurveTo=function(y,r,p,c,h,C){x.bezierCurveTo(y,r,p,c,h,C),this.__originalBezierCurveTo(y,r,p,c,h,C)},m.rect=function(y,r,p,c){x.rect(y,r,p,c),this.__originalRect(y,r,p,c)},m.closePath=function(){x.closePath(),this.__originalClosePath()},m.beginPath=function(){x.beginPath(),this.__originalBeginPath()}}class ${constructor(x){this.canvasFactory=x,this.cache=Object.create(null)}getCanvas(x,y,r){let p;return this.cache[x]!==void 0?(p=this.cache[x],this.canvasFactory.reset(p,y,r)):(p=this.canvasFactory.create(y,r),this.cache[x]=p),p}delete(x){delete this.cache[x]}clear(){for(const x in this.cache){const y=this.cache[x];this.canvasFactory.destroy(y),delete this.cache[x]}}}function L(m,x,y,r,p,c,h,C,D,X){const[q,re,K,oe,J,te]=(0,Pe.getCurrentTransform)(m);if(re===0&&K===0){const Y=h*q+J,W=Math.round(Y),G=C*oe+te,Q=Math.round(G),ee=(h+D)*q+J,z=Math.abs(Math.round(ee)-W)||1,se=(C+X)*oe+te,ne=Math.abs(Math.round(se)-Q)||1;return m.setTransform(Math.sign(q),0,0,Math.sign(oe),W,Q),m.drawImage(x,y,r,p,c,0,0,z,ne),m.setTransform(q,re,K,oe,J,te),[z,ne]}if(q===0&&oe===0){const Y=C*K+J,W=Math.round(Y),G=h*re+te,Q=Math.round(G),ee=(C+X)*K+J,z=Math.abs(Math.round(ee)-W)||1,se=(h+D)*re+te,ne=Math.abs(Math.round(se)-Q)||1;return m.setTransform(0,Math.sign(re),Math.sign(K),0,W,Q),m.drawImage(x,y,r,p,c,0,0,ne,z),m.setTransform(q,re,K,oe,J,te),[ne,z]}m.drawImage(x,y,r,p,c,h,C,D,X);const B=Math.hypot(q,re),j=Math.hypot(K,oe);return[B*D,j*X]}function I(m){const{width:x,height:y}=m;if(x>e||y>e)return null;const r=1e3,p=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=x+1;let h=new Uint8Array(c*(y+1)),C,D,X;const q=x+7&-8;let re=new Uint8Array(q*y),K=0;for(const j of m.data){let Y=128;for(;Y>0;)re[K++]=j&Y?0:255,Y>>=1}let oe=0;for(K=0,re[K]!==0&&(h[0]=1,++oe),D=1;D<x;D++)re[K]!==re[K+1]&&(h[D]=re[K]?2:1,++oe),K++;for(re[K]!==0&&(h[D]=2,++oe),C=1;C<y;C++){K=C*q,X=C*c,re[K-q]!==re[K]&&(h[X]=re[K]?1:8,++oe);let j=(re[K]?4:0)+(re[K-q]?8:0);for(D=1;D<x;D++)j=(j>>2)+(re[K+1]?4:0)+(re[K-q+1]?8:0),p[j]&&(h[X+D]=p[j],++oe),K++;if(re[K-q]!==re[K]&&(h[X+D]=re[K]?2:4,++oe),oe>r)return null}for(K=q*(y-1),X=C*c,re[K]!==0&&(h[X]=8,++oe),D=1;D<x;D++)re[K]!==re[K+1]&&(h[X+D]=re[K]?4:8,++oe),K++;if(re[K]!==0&&(h[X+D]=4,++oe),oe>r)return null;const J=new Int32Array([0,c,-1,0,-c,0,0,0,1]),te=new Path2D;for(C=0;oe&&C<=y;C++){let j=C*c;const Y=j+x;for(;j<Y&&!h[j];)j++;if(j===Y)continue;te.moveTo(j%c,C);const W=j;let G=h[j];do{const Q=J[G];do j+=Q;while(!h[j]);const ee=h[j];ee!==5&&ee!==10?(G=ee,h[j]=0):(G=ee&51*G>>4,h[j]&=G>>2|G<<2),te.lineTo(j%c,j/c|0),h[j]||--oe}while(W!==j);--C}return re=null,h=null,function(j){j.save(),j.scale(1/x,-1/y),j.translate(0,-y),j.fill(te),j.beginPath(),j.restore()}}class T{constructor(x,y){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=we.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=we.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=we.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="none",this.startNewPathAndClipBox([0,0,x,y])}clone(){const x=Object.create(this);return x.clipBox=this.clipBox.slice(),x}setCurrentPoint(x,y){this.x=x,this.y=y}updatePathMinMax(x,y,r){[y,r]=we.Util.applyTransform([y,r],x),this.minX=Math.min(this.minX,y),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,y),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(x,y){const r=we.Util.applyTransform(y,x),p=we.Util.applyTransform(y.slice(2),x);this.minX=Math.min(this.minX,r[0],p[0]),this.minY=Math.min(this.minY,r[1],p[1]),this.maxX=Math.max(this.maxX,r[0],p[0]),this.maxY=Math.max(this.maxY,r[1],p[1])}updateScalingPathMinMax(x,y){we.Util.scaleMinMax(x,y),this.minX=Math.min(this.minX,y[0]),this.maxX=Math.max(this.maxX,y[1]),this.minY=Math.min(this.minY,y[2]),this.maxY=Math.max(this.maxY,y[3])}updateCurvePathMinMax(x,y,r,p,c,h,C,D,X,q){const re=we.Util.bezierBoundingBox(y,r,p,c,h,C,D,X);if(q){q[0]=Math.min(q[0],re[0],re[2]),q[1]=Math.max(q[1],re[0],re[2]),q[2]=Math.min(q[2],re[1],re[3]),q[3]=Math.max(q[3],re[1],re[3]);return}this.updateRectMinMax(x,re)}getPathBoundingBox(x=qe.PathType.FILL,y=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(x===qe.PathType.STROKE){y||(0,we.unreachable)("Stroke bounding box must include transform.");const p=we.Util.singularValueDecompose2dScale(y),c=p[0]*this.lineWidth/2,h=p[1]*this.lineWidth/2;r[0]-=c,r[1]-=h,r[2]+=c,r[3]+=h}return r}updateClipFromPath(){const x=we.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(x||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(x){this.clipBox=x,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(x=qe.PathType.FILL,y=null){return we.Util.intersect(this.clipBox,this.getPathBoundingBox(x,y))}}function d(m,x){if(typeof ImageData<"u"&&x instanceof ImageData){m.putImageData(x,0,0);return}const y=x.height,r=x.width,p=y%t,c=(y-p)/t,h=p===0?c:c+1,C=m.createImageData(r,t);let D=0,X;const q=x.data,re=C.data;let K,oe,J,te;if(x.kind===we.ImageKind.GRAYSCALE_1BPP){const B=q.byteLength,j=new Uint32Array(re.buffer,0,re.byteLength>>2),Y=j.length,W=r+7>>3,G=4294967295,Q=we.FeatureTest.isLittleEndian?4278190080:255;for(K=0;K<h;K++){for(J=K<c?t:p,X=0,oe=0;oe<J;oe++){const ee=B-D;let z=0;const se=ee>W?r:ee*8-7,ne=se&-8;let V=0,ae=0;for(;z<ne;z+=8)ae=q[D++],j[X++]=ae&128?G:Q,j[X++]=ae&64?G:Q,j[X++]=ae&32?G:Q,j[X++]=ae&16?G:Q,j[X++]=ae&8?G:Q,j[X++]=ae&4?G:Q,j[X++]=ae&2?G:Q,j[X++]=ae&1?G:Q;for(;z<se;z++)V===0&&(ae=q[D++],V=128),j[X++]=ae&V?G:Q,V>>=1}for(;X<Y;)j[X++]=0;m.putImageData(C,0,K*t)}}else if(x.kind===we.ImageKind.RGBA_32BPP){for(oe=0,te=r*t*4,K=0;K<c;K++)re.set(q.subarray(D,D+te)),D+=te,m.putImageData(C,0,oe),oe+=t;K<h&&(te=r*p*4,re.set(q.subarray(D,D+te)),m.putImageData(C,0,oe))}else if(x.kind===we.ImageKind.RGB_24BPP)for(J=t,te=r*J,K=0;K<h;K++){for(K>=c&&(J=p,te=r*J),X=0,oe=te;oe--;)re[X++]=q[D++],re[X++]=q[D++],re[X++]=q[D++],re[X++]=255;m.putImageData(C,0,K*t)}else throw new Error(`bad image kind: ${x.kind}`)}function f(m,x){if(x.bitmap){m.drawImage(x.bitmap,0,0);return}const y=x.height,r=x.width,p=y%t,c=(y-p)/t,h=p===0?c:c+1,C=m.createImageData(r,t);let D=0;const X=x.data,q=C.data;for(let re=0;re<h;re++){const K=re<c?t:p;({srcPos:D}=(0,ke.convertBlackAndWhiteToRGBA)({src:X,srcPos:D,dest:q,width:r,height:K,nonBlackColor:0})),m.putImageData(C,0,re*t)}}function i(m,x){const y=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const r of y)m[r]!==void 0&&(x[r]=m[r]);m.setLineDash!==void 0&&(x.setLineDash(m.getLineDash()),x.lineDashOffset=m.lineDashOffset)}function S(m){if(m.strokeStyle=m.fillStyle="#000000",m.fillRule="nonzero",m.globalAlpha=1,m.lineWidth=1,m.lineCap="butt",m.lineJoin="miter",m.miterLimit=10,m.globalCompositeOperation="source-over",m.font="10px sans-serif",m.setLineDash!==void 0&&(m.setLineDash([]),m.lineDashOffset=0),!we.isNodeJS){const{filter:x}=m;x!=="none"&&x!==""&&(m.filter="none")}}function w(m,x,y,r){const p=m.length;for(let c=3;c<p;c+=4){const h=m[c];if(h===0)m[c-3]=x,m[c-2]=y,m[c-1]=r;else if(h<255){const C=255-h;m[c-3]=m[c-3]*h+x*C>>8,m[c-2]=m[c-2]*h+y*C>>8,m[c-1]=m[c-1]*h+r*C>>8}}}function v(m,x,y){const r=m.length,p=1/255;for(let c=3;c<r;c+=4){const h=y?y[m[c]]:m[c];x[c]=x[c]*h*p|0}}function b(m,x,y){const r=m.length;for(let p=3;p<r;p+=4){const c=m[p-3]*77+m[p-2]*152+m[p-1]*28;x[p]=y?x[p]*y[c>>8]>>8:x[p]*c>>16}}function M(m,x,y,r,p,c,h,C,D,X,q){const re=!!c,K=re?c[0]:0,oe=re?c[1]:0,J=re?c[2]:0,te=p==="Luminosity"?b:v,j=Math.min(r,Math.ceil(1048576/y));for(let Y=0;Y<r;Y+=j){const W=Math.min(j,r-Y),G=m.getImageData(C-X,Y+(D-q),y,W),Q=x.getImageData(C,Y+D,y,W);re&&w(G.data,K,oe,J),te(G.data,Q.data,h),x.putImageData(Q,C,Y+D)}}function _(m,x,y,r){const p=r[0],c=r[1],h=r[2]-p,C=r[3]-c;h===0||C===0||(M(x.context,y,h,C,x.subtype,x.backdrop,x.transferMap,p,c,x.offsetX,x.offsetY),m.save(),m.globalAlpha=1,m.globalCompositeOperation="source-over",m.setTransform(1,0,0,1,0,0),m.drawImage(y.canvas,0,0),m.restore())}function H(m,x){const y=we.Util.singularValueDecompose2dScale(m);y[0]=Math.fround(y[0]),y[1]=Math.fround(y[1]);const r=Math.fround((globalThis.devicePixelRatio||1)*Pe.PixelsPerInch.PDF_TO_CSS_UNITS);return x!==void 0?x:y[0]<=r||y[1]<=r}const A=["butt","round","square"],E=["miter","round","bevel"],l={},g={},O=class O{constructor(x,y,r,p,c,{optionalContentConfig:h,markedContentStack:C=null},D,X){Ee(this,s);Ee(this,F);this.ctx=x,this.current=new T(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=y,this.objs=r,this.canvasFactory=p,this.filterFactory=c,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=C||[],this.optionalContentConfig=h,this.cachedCanvases=new $(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=D,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=X,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(x,y=null){return typeof x=="string"?x.startsWith("g_")?this.commonObjs.get(x):this.objs.get(x):y}beginDrawing({transform:x,viewport:y,transparency:r=!1,background:p=null}){const c=this.ctx.canvas.width,h=this.ctx.canvas.height,C=this.ctx.fillStyle;if(this.ctx.fillStyle=p||"#ffffff",this.ctx.fillRect(0,0,c,h),this.ctx.fillStyle=C,r){const D=this.cachedCanvases.getCanvas("transparent",c,h);this.compositeCtx=this.ctx,this.transparentCanvas=D.canvas,this.ctx=D.context,this.ctx.save(),this.ctx.transform(...(0,Pe.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),S(this.ctx),x&&(this.ctx.transform(...x),this.outputScaleX=x[0],this.outputScaleY=x[0]),this.ctx.transform(...y.transform),this.viewportScale=y.scale,this.baseTransform=(0,Pe.getCurrentTransform)(this.ctx)}executeOperatorList(x,y,r,p){const c=x.argsArray,h=x.fnArray;let C=y||0;const D=c.length;if(D===C)return C;const X=D-C>R&&typeof r=="function",q=X?Date.now()+k:0;let re=0;const K=this.commonObjs,oe=this.objs;let J;for(;;){if(p!==void 0&&C===p.nextBreakPoint)return p.breakIt(C,r),C;if(J=h[C],J!==we.OPS.dependency)this[J].apply(this,c[C]);else for(const te of c[C]){const B=te.startsWith("g_")?K:oe;if(!B.has(te))return B.get(te,r),C}if(C++,C===D)return C;if(X&&++re>R){if(Date.now()>q)return r(),C;re=0}}}endDrawing(){Me(this,s,Ti).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const x of this._cachedBitmapsMap.values()){for(const y of x.values())typeof HTMLCanvasElement<"u"&&y instanceof HTMLCanvasElement&&(y.width=y.height=0);x.clear()}this._cachedBitmapsMap.clear(),Me(this,F,Ei).call(this)}_scaleImage(x,y){const r=x.width,p=x.height;let c=Math.max(Math.hypot(y[0],y[1]),1),h=Math.max(Math.hypot(y[2],y[3]),1),C=r,D=p,X="prescale1",q,re;for(;c>2&&C>1||h>2&&D>1;){let K=C,oe=D;c>2&&C>1&&(K=C>=16384?Math.floor(C/2)-1||1:Math.ceil(C/2),c/=C/K),h>2&&D>1&&(oe=D>=16384?Math.floor(D/2)-1||1:Math.ceil(D)/2,h/=D/oe),q=this.cachedCanvases.getCanvas(X,K,oe),re=q.context,re.clearRect(0,0,K,oe),re.drawImage(x,0,0,C,D,0,0,K,oe),x=q.canvas,C=K,D=oe,X=X==="prescale1"?"prescale2":"prescale1"}return{img:x,paintWidth:C,paintHeight:D}}_createMaskCanvas(x){const y=this.ctx,{width:r,height:p}=x,c=this.current.fillColor,h=this.current.patternFill,C=(0,Pe.getCurrentTransform)(y);let D,X,q,re;if((x.bitmap||x.data)&&x.count>1){const z=x.bitmap||x.data.buffer;X=JSON.stringify(h?C:[C.slice(0,4),c]),D=this._cachedBitmapsMap.get(z),D||(D=new Map,this._cachedBitmapsMap.set(z,D));const se=D.get(X);if(se&&!h){const ne=Math.round(Math.min(C[0],C[2])+C[4]),V=Math.round(Math.min(C[1],C[3])+C[5]);return{canvas:se,offsetX:ne,offsetY:V}}q=se}q||(re=this.cachedCanvases.getCanvas("maskCanvas",r,p),f(re.context,x));let K=we.Util.transform(C,[1/r,0,0,-1/p,0,0]);K=we.Util.transform(K,[1,0,0,1,0,-p]);const oe=we.Util.applyTransform([0,0],K),J=we.Util.applyTransform([r,p],K),te=we.Util.normalizeRect([oe[0],oe[1],J[0],J[1]]),B=Math.round(te[2]-te[0])||1,j=Math.round(te[3]-te[1])||1,Y=this.cachedCanvases.getCanvas("fillCanvas",B,j),W=Y.context,G=Math.min(oe[0],J[0]),Q=Math.min(oe[1],J[1]);W.translate(-G,-Q),W.transform(...K),q||(q=this._scaleImage(re.canvas,(0,Pe.getCurrentTransformInverse)(W)),q=q.img,D&&h&&D.set(X,q)),W.imageSmoothingEnabled=H((0,Pe.getCurrentTransform)(W),x.interpolate),L(W,q,0,0,q.width,q.height,0,0,r,p),W.globalCompositeOperation="source-in";const ee=we.Util.transform((0,Pe.getCurrentTransformInverse)(W),[1,0,0,1,-G,-Q]);return W.fillStyle=h?c.getPattern(y,this,ee,qe.PathType.FILL):c,W.fillRect(0,0,r,p),D&&!h&&(this.cachedCanvases.delete("fillCanvas"),D.set(X,Y.canvas)),{canvas:Y.canvas,offsetX:Math.round(G),offsetY:Math.round(Q)}}setLineWidth(x){x!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=x,this.ctx.lineWidth=x}setLineCap(x){this.ctx.lineCap=A[x]}setLineJoin(x){this.ctx.lineJoin=E[x]}setMiterLimit(x){this.ctx.miterLimit=x}setDash(x,y){const r=this.ctx;r.setLineDash!==void 0&&(r.setLineDash(x),r.lineDashOffset=y)}setRenderingIntent(x){}setFlatness(x){}setGState(x){for(const[y,r]of x)switch(y){case"LW":this.setLineWidth(r);break;case"LC":this.setLineCap(r);break;case"LJ":this.setLineJoin(r);break;case"ML":this.setMiterLimit(r);break;case"D":this.setDash(r[0],r[1]);break;case"RI":this.setRenderingIntent(r);break;case"FL":this.setFlatness(r);break;case"Font":this.setFont(r[0],r[1]);break;case"CA":this.current.strokeAlpha=r;break;case"ca":this.current.fillAlpha=r,this.ctx.globalAlpha=r;break;case"BM":this.ctx.globalCompositeOperation=r;break;case"SMask":this.current.activeSMask=r?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(r);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const x=this.inSMaskMode;this.current.activeSMask&&!x?this.beginSMaskMode():!this.current.activeSMask&&x&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const x=this.ctx.canvas.width,y=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,p=this.cachedCanvases.getCanvas(r,x,y);this.suspendedCtx=this.ctx,this.ctx=p.context;const c=this.ctx;c.setTransform(...(0,Pe.getCurrentTransform)(this.suspendedCtx)),i(this.suspendedCtx,c),o(c,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(),i(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(x){if(!this.current.activeSMask)return;x?(x[0]=Math.floor(x[0]),x[1]=Math.floor(x[1]),x[2]=Math.ceil(x[2]),x[3]=Math.ceil(x[3])):x=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const y=this.current.activeSMask,r=this.suspendedCtx;_(r,y,this.ctx,x),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?(i(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const x=this.current;this.stateStack.push(x),this.current=x.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),i(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(x,y,r,p,c,h){this.ctx.transform(x,y,r,p,c,h),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(x,y,r){const p=this.ctx,c=this.current;let h=c.x,C=c.y,D,X;const q=(0,Pe.getCurrentTransform)(p),re=q[0]===0&&q[3]===0||q[1]===0&&q[2]===0,K=re?r.slice(0):null;for(let oe=0,J=0,te=x.length;oe<te;oe++)switch(x[oe]|0){case we.OPS.rectangle:h=y[J++],C=y[J++];const B=y[J++],j=y[J++],Y=h+B,W=C+j;p.moveTo(h,C),B===0||j===0?p.lineTo(Y,W):(p.lineTo(Y,C),p.lineTo(Y,W),p.lineTo(h,W)),re||c.updateRectMinMax(q,[h,C,Y,W]),p.closePath();break;case we.OPS.moveTo:h=y[J++],C=y[J++],p.moveTo(h,C),re||c.updatePathMinMax(q,h,C);break;case we.OPS.lineTo:h=y[J++],C=y[J++],p.lineTo(h,C),re||c.updatePathMinMax(q,h,C);break;case we.OPS.curveTo:D=h,X=C,h=y[J+4],C=y[J+5],p.bezierCurveTo(y[J],y[J+1],y[J+2],y[J+3],h,C),c.updateCurvePathMinMax(q,D,X,y[J],y[J+1],y[J+2],y[J+3],h,C,K),J+=6;break;case we.OPS.curveTo2:D=h,X=C,p.bezierCurveTo(h,C,y[J],y[J+1],y[J+2],y[J+3]),c.updateCurvePathMinMax(q,D,X,h,C,y[J],y[J+1],y[J+2],y[J+3],K),h=y[J+2],C=y[J+3],J+=4;break;case we.OPS.curveTo3:D=h,X=C,h=y[J+2],C=y[J+3],p.bezierCurveTo(y[J],y[J+1],h,C,h,C),c.updateCurvePathMinMax(q,D,X,y[J],y[J+1],h,C,h,C,K),J+=4;break;case we.OPS.closePath:p.closePath();break}re&&c.updateScalingPathMinMax(q,K),c.setCurrentPoint(h,C)}closePath(){this.ctx.closePath()}stroke(x=!0){const y=this.ctx,r=this.current.strokeColor;y.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof r=="object"&&(r!=null&&r.getPattern)?(y.save(),y.strokeStyle=r.getPattern(y,this,(0,Pe.getCurrentTransformInverse)(y),qe.PathType.STROKE),this.rescaleAndStroke(!1),y.restore()):this.rescaleAndStroke(!0)),x&&this.consumePath(this.current.getClippedPathBoundingBox()),y.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(x=!0){const y=this.ctx,r=this.current.fillColor,p=this.current.patternFill;let c=!1;p&&(y.save(),y.fillStyle=r.getPattern(y,this,(0,Pe.getCurrentTransformInverse)(y),qe.PathType.FILL),c=!0);const h=this.current.getClippedPathBoundingBox();this.contentVisible&&h!==null&&(this.pendingEOFill?(y.fill("evenodd"),this.pendingEOFill=!1):y.fill()),c&&y.restore(),x&&this.consumePath(h)}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=l}eoClip(){this.pendingClip=g}beginText(){this.current.textMatrix=we.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const x=this.pendingTextPaths,y=this.ctx;if(x===void 0){y.beginPath();return}y.save(),y.beginPath();for(const r of x)y.setTransform(...r.transform),y.translate(r.x,r.y),r.addToPath(y,r.fontSize);y.restore(),y.clip(),y.beginPath(),delete this.pendingTextPaths}setCharSpacing(x){this.current.charSpacing=x}setWordSpacing(x){this.current.wordSpacing=x}setHScale(x){this.current.textHScale=x/100}setLeading(x){this.current.leading=-x}setFont(x,y){var q;const r=this.commonObjs.get(x),p=this.current;if(!r)throw new Error(`Can't find font for ${x}`);if(p.fontMatrix=r.fontMatrix||we.FONT_IDENTITY_MATRIX,(p.fontMatrix[0]===0||p.fontMatrix[3]===0)&&(0,we.warn)("Invalid font matrix for font "+x),y<0?(y=-y,p.fontDirection=-1):p.fontDirection=1,this.current.font=r,this.current.fontSize=y,r.isType3Font)return;const c=r.loadedName||"sans-serif",h=((q=r.systemFontInfo)==null?void 0:q.css)||`"${c}", ${r.fallbackName}`;let C="normal";r.black?C="900":r.bold&&(C="bold");const D=r.italic?"italic":"normal";let X=y;y<P?X=P:y>ie&&(X=ie),this.current.fontSizeScale=y/X,this.ctx.font=`${D} ${C} ${X}px ${h}`}setTextRenderingMode(x){this.current.textRenderingMode=x}setTextRise(x){this.current.textRise=x}moveText(x,y){this.current.x=this.current.lineX+=x,this.current.y=this.current.lineY+=y}setLeadingMoveText(x,y){this.setLeading(-y),this.moveText(x,y)}setTextMatrix(x,y,r,p,c,h){this.current.textMatrix=[x,y,r,p,c,h],this.current.textMatrixScale=Math.hypot(x,y),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(x,y,r,p){const c=this.ctx,h=this.current,C=h.font,D=h.textRenderingMode,X=h.fontSize/h.fontSizeScale,q=D&we.TextRenderingMode.FILL_STROKE_MASK,re=!!(D&we.TextRenderingMode.ADD_TO_PATH_FLAG),K=h.patternFill&&!C.missingFile;let oe;(C.disableFontFace||re||K)&&(oe=C.getPathGenerator(this.commonObjs,x)),C.disableFontFace||K?(c.save(),c.translate(y,r),c.beginPath(),oe(c,X),p&&c.setTransform(...p),(q===we.TextRenderingMode.FILL||q===we.TextRenderingMode.FILL_STROKE)&&c.fill(),(q===we.TextRenderingMode.STROKE||q===we.TextRenderingMode.FILL_STROKE)&&c.stroke(),c.restore()):((q===we.TextRenderingMode.FILL||q===we.TextRenderingMode.FILL_STROKE)&&c.fillText(x,y,r),(q===we.TextRenderingMode.STROKE||q===we.TextRenderingMode.FILL_STROKE)&&c.strokeText(x,y,r)),re&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,Pe.getCurrentTransform)(c),x:y,y:r,fontSize:X,addToPath:oe})}get isFontSubpixelAAEnabled(){const{context:x}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);x.scale(1.5,1),x.fillText("I",0,10);const y=x.getImageData(0,0,10,10).data;let r=!1;for(let p=3;p<y.length;p+=4)if(y[p]>0&&y[p]<255){r=!0;break}return(0,we.shadow)(this,"isFontSubpixelAAEnabled",r)}showText(x){const y=this.current,r=y.font;if(r.isType3Font)return this.showType3Text(x);const p=y.fontSize;if(p===0)return;const c=this.ctx,h=y.fontSizeScale,C=y.charSpacing,D=y.wordSpacing,X=y.fontDirection,q=y.textHScale*X,re=x.length,K=r.vertical,oe=K?1:-1,J=r.defaultVMetrics,te=p*y.fontMatrix[0],B=y.textRenderingMode===we.TextRenderingMode.FILL&&!r.disableFontFace&&!y.patternFill;c.save(),c.transform(...y.textMatrix),c.translate(y.x,y.y+y.textRise),X>0?c.scale(q,-1):c.scale(q,1);let j;if(y.patternFill){c.save();const ee=y.fillColor.getPattern(c,this,(0,Pe.getCurrentTransformInverse)(c),qe.PathType.FILL);j=(0,Pe.getCurrentTransform)(c),c.restore(),c.fillStyle=ee}let Y=y.lineWidth;const W=y.textMatrixScale;if(W===0||Y===0){const ee=y.textRenderingMode&we.TextRenderingMode.FILL_STROKE_MASK;(ee===we.TextRenderingMode.STROKE||ee===we.TextRenderingMode.FILL_STROKE)&&(Y=this.getSinglePixelWidth())}else Y/=W;if(h!==1&&(c.scale(h,h),Y/=h),c.lineWidth=Y,r.isInvalidPDFjsFont){const ee=[];let z=0;for(const se of x)ee.push(se.unicode),z+=se.width;c.fillText(ee.join(""),0,0),y.x+=z*te*q,c.restore(),this.compose();return}let G=0,Q;for(Q=0;Q<re;++Q){const ee=x[Q];if(typeof ee=="number"){G+=oe*ee*p/1e3;continue}let z=!1;const se=(ee.isSpace?D:0)+C,ne=ee.fontChar,V=ee.accent;let ae,ce,de=ee.width;if(K){const ve=ee.vmetric||J,pe=-(ee.vmetric?ve[1]:de*.5)*te,ge=ve[2]*te;de=ve?-ve[0]:de,ae=pe/h,ce=(G+ge)/h}else ae=G/h,ce=0;if(r.remeasure&&de>0){const ve=c.measureText(ne).width*1e3/p*h;if(de<ve&&this.isFontSubpixelAAEnabled){const pe=de/ve;z=!0,c.save(),c.scale(pe,1),ae/=pe}else de!==ve&&(ae+=(de-ve)/2e3*p/h)}if(this.contentVisible&&(ee.isInFont||r.missingFile)){if(B&&!V)c.fillText(ne,ae,ce);else if(this.paintChar(ne,ae,ce,j),V){const ve=ae+p*V.offset.x/h,pe=ce-p*V.offset.y/h;this.paintChar(V.fontChar,ve,pe,j)}}const Ae=K?de*te-se*X:de*te+se*X;G+=Ae,z&&c.restore()}K?y.y-=G:y.x+=G*q,c.restore(),this.compose()}showType3Text(x){const y=this.ctx,r=this.current,p=r.font,c=r.fontSize,h=r.fontDirection,C=p.vertical?1:-1,D=r.charSpacing,X=r.wordSpacing,q=r.textHScale*h,re=r.fontMatrix||we.FONT_IDENTITY_MATRIX,K=x.length,oe=r.textRenderingMode===we.TextRenderingMode.INVISIBLE;let J,te,B,j;if(!(oe||c===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,y.save(),y.transform(...r.textMatrix),y.translate(r.x,r.y),y.scale(q,h),J=0;J<K;++J){if(te=x[J],typeof te=="number"){j=C*te*c/1e3,this.ctx.translate(j,0),r.x+=j*q;continue}const Y=(te.isSpace?X:0)+D,W=p.charProcOperatorList[te.operatorListId];if(!W){(0,we.warn)(`Type3 character "${te.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=te,this.save(),y.scale(c,c),y.transform(...re),this.executeOperatorList(W),this.restore()),B=we.Util.applyTransform([te.width,0],re)[0]*c+Y,y.translate(B,0),r.x+=B*q}y.restore(),this.processingType3=null}}setCharWidth(x,y){}setCharWidthAndBounds(x,y,r,p,c,h){this.ctx.rect(r,p,c-r,h-p),this.ctx.clip(),this.endPath()}getColorN_Pattern(x){let y;if(x[0]==="TilingPattern"){const r=x[1],p=this.baseTransform||(0,Pe.getCurrentTransform)(this.ctx),c={createCanvasGraphics:h=>new O(h,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};y=new qe.TilingPattern(x,r,this.ctx,c,p)}else y=this._getPattern(x[1],x[2]);return y}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(x,y,r){const p=we.Util.makeHexColor(x,y,r);this.ctx.strokeStyle=p,this.current.strokeColor=p}setFillRGBColor(x,y,r){const p=we.Util.makeHexColor(x,y,r);this.ctx.fillStyle=p,this.current.fillColor=p,this.current.patternFill=!1}_getPattern(x,y=null){let r;return this.cachedPatterns.has(x)?r=this.cachedPatterns.get(x):(r=(0,qe.getShadingPattern)(this.getObject(x)),this.cachedPatterns.set(x,r)),y&&(r.matrix=y),r}shadingFill(x){if(!this.contentVisible)return;const y=this.ctx;this.save();const r=this._getPattern(x);y.fillStyle=r.getPattern(y,this,(0,Pe.getCurrentTransformInverse)(y),qe.PathType.SHADING);const p=(0,Pe.getCurrentTransformInverse)(y);if(p){const{width:c,height:h}=y.canvas,[C,D,X,q]=we.Util.getAxialAlignedBoundingBox([0,0,c,h],p);this.ctx.fillRect(C,D,X-C,q-D)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,we.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,we.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(x,y){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(x)&&x.length===6&&this.transform(...x),this.baseTransform=(0,Pe.getCurrentTransform)(this.ctx),y)){const r=y[2]-y[0],p=y[3]-y[1];this.ctx.rect(y[0],y[1],r,p),this.current.updateRectMinMax((0,Pe.getCurrentTransform)(this.ctx),y),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(x){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const y=this.ctx;x.isolated||(0,we.info)("TODO: Support non-isolated groups."),x.knockout&&(0,we.warn)("Knockout groups not supported.");const r=(0,Pe.getCurrentTransform)(y);if(x.matrix&&y.transform(...x.matrix),!x.bbox)throw new Error("Bounding box is required.");let p=we.Util.getAxialAlignedBoundingBox(x.bbox,(0,Pe.getCurrentTransform)(y));const c=[0,0,y.canvas.width,y.canvas.height];p=we.Util.intersect(p,c)||[0,0,0,0];const h=Math.floor(p[0]),C=Math.floor(p[1]);let D=Math.max(Math.ceil(p[2])-h,1),X=Math.max(Math.ceil(p[3])-C,1),q=1,re=1;D>n&&(q=D/n,D=n),X>n&&(re=X/n,X=n),this.current.startNewPathAndClipBox([0,0,D,X]);let K="groupAt"+this.groupLevel;x.smask&&(K+="_smask_"+this.smaskCounter++%2);const oe=this.cachedCanvases.getCanvas(K,D,X),J=oe.context;J.scale(1/q,1/re),J.translate(-h,-C),J.transform(...r),x.smask?this.smaskStack.push({canvas:oe.canvas,context:J,offsetX:h,offsetY:C,scaleX:q,scaleY:re,subtype:x.smask.subtype,backdrop:x.smask.backdrop,transferMap:x.smask.transferMap||null,startTransformInverse:null}):(y.setTransform(1,0,0,1,0,0),y.translate(h,C),y.scale(q,re),y.save()),i(y,J),this.ctx=J,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(y),this.groupLevel++}endGroup(x){if(!this.contentVisible)return;this.groupLevel--;const y=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,x.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const p=(0,Pe.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...p);const c=we.Util.getAxialAlignedBoundingBox([0,0,y.canvas.width,y.canvas.height],p);this.ctx.drawImage(y.canvas,0,0),this.ctx.restore(),this.compose(c)}}beginAnnotation(x,y,r,p,c){if(Me(this,s,Ti).call(this),S(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(y)&&y.length===4){const h=y[2]-y[0],C=y[3]-y[1];if(c&&this.annotationCanvasMap){r=r.slice(),r[4]-=y[0],r[5]-=y[1],y=y.slice(),y[0]=y[1]=0,y[2]=h,y[3]=C;const[D,X]=we.Util.singularValueDecompose2dScale((0,Pe.getCurrentTransform)(this.ctx)),{viewportScale:q}=this,re=Math.ceil(h*this.outputScaleX*q),K=Math.ceil(C*this.outputScaleY*q);this.annotationCanvas=this.canvasFactory.create(re,K);const{canvas:oe,context:J}=this.annotationCanvas;this.annotationCanvasMap.set(x,oe),this.annotationCanvas.savedCtx=this.ctx,this.ctx=J,this.ctx.save(),this.ctx.setTransform(D,0,0,-X,0,C*X),S(this.ctx)}else S(this.ctx),this.ctx.rect(y[0],y[1],h,C),this.ctx.clip(),this.endPath()}this.current=new T(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...p)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),Me(this,F,Ei).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(x){if(!this.contentVisible)return;const y=x.count;x=this.getObject(x.data,x),x.count=y;const r=this.ctx,p=this.processingType3;if(p&&(p.compiled===void 0&&(p.compiled=I(x)),p.compiled)){p.compiled(r);return}const c=this._createMaskCanvas(x),h=c.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(h,c.offsetX,c.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(x,y,r=0,p=0,c,h){if(!this.contentVisible)return;x=this.getObject(x.data,x);const C=this.ctx;C.save();const D=(0,Pe.getCurrentTransform)(C);C.transform(y,r,p,c,0,0);const X=this._createMaskCanvas(x);C.setTransform(1,0,0,1,X.offsetX-D[4],X.offsetY-D[5]);for(let q=0,re=h.length;q<re;q+=2){const K=we.Util.transform(D,[y,r,p,c,h[q],h[q+1]]),[oe,J]=we.Util.applyTransform([0,0],K);C.drawImage(X.canvas,oe,J)}C.restore(),this.compose()}paintImageMaskXObjectGroup(x){if(!this.contentVisible)return;const y=this.ctx,r=this.current.fillColor,p=this.current.patternFill;for(const c of x){const{data:h,width:C,height:D,transform:X}=c,q=this.cachedCanvases.getCanvas("maskCanvas",C,D),re=q.context;re.save();const K=this.getObject(h,c);f(re,K),re.globalCompositeOperation="source-in",re.fillStyle=p?r.getPattern(re,this,(0,Pe.getCurrentTransformInverse)(y),qe.PathType.FILL):r,re.fillRect(0,0,C,D),re.restore(),y.save(),y.transform(...X),y.scale(1,-1),L(y,q.canvas,0,0,C,D,0,-1,1,1),y.restore()}this.compose()}paintImageXObject(x){if(!this.contentVisible)return;const y=this.getObject(x);if(!y){(0,we.warn)("Dependent image isn't ready yet");return}this.paintInlineImageXObject(y)}paintImageXObjectRepeat(x,y,r,p){if(!this.contentVisible)return;const c=this.getObject(x);if(!c){(0,we.warn)("Dependent image isn't ready yet");return}const h=c.width,C=c.height,D=[];for(let X=0,q=p.length;X<q;X+=2)D.push({transform:[y,0,0,r,p[X],p[X+1]],x:0,y:0,w:h,h:C});this.paintInlineImageXObjectGroup(c,D)}applyTransferMapsToCanvas(x){return this.current.transferMaps!=="none"&&(x.filter=this.current.transferMaps,x.drawImage(x.canvas,0,0),x.filter="none"),x.canvas}applyTransferMapsToBitmap(x){if(this.current.transferMaps==="none")return x.bitmap;const{bitmap:y,width:r,height:p}=x,c=this.cachedCanvases.getCanvas("inlineImage",r,p),h=c.context;return h.filter=this.current.transferMaps,h.drawImage(y,0,0),h.filter="none",c.canvas}paintInlineImageXObject(x){if(!this.contentVisible)return;const y=x.width,r=x.height,p=this.ctx;if(this.save(),!we.isNodeJS){const{filter:C}=p;C!=="none"&&C!==""&&(p.filter="none")}p.scale(1/y,-1/r);let c;if(x.bitmap)c=this.applyTransferMapsToBitmap(x);else if(typeof HTMLElement=="function"&&x instanceof HTMLElement||!x.data)c=x;else{const D=this.cachedCanvases.getCanvas("inlineImage",y,r).context;d(D,x),c=this.applyTransferMapsToCanvas(D)}const h=this._scaleImage(c,(0,Pe.getCurrentTransformInverse)(p));p.imageSmoothingEnabled=H((0,Pe.getCurrentTransform)(p),x.interpolate),L(p,h.img,0,0,h.paintWidth,h.paintHeight,0,-r,y,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(x,y){if(!this.contentVisible)return;const r=this.ctx;let p;if(x.bitmap)p=x.bitmap;else{const c=x.width,h=x.height,D=this.cachedCanvases.getCanvas("inlineImage",c,h).context;d(D,x),p=this.applyTransferMapsToCanvas(D)}for(const c of y)r.save(),r.transform(...c.transform),r.scale(1,-1),L(r,p,c.x,c.y,c.w,c.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(x){}markPointProps(x,y){}beginMarkedContent(x){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(x,y){x==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(y)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(x){const y=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(x);const r=this.ctx;this.pendingClip&&(y||(this.pendingClip===g?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const x=(0,Pe.getCurrentTransform)(this.ctx);if(x[1]===0&&x[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(x[0]),Math.abs(x[3]));else{const y=Math.abs(x[0]*x[3]-x[2]*x[1]),r=Math.hypot(x[0],x[2]),p=Math.hypot(x[1],x[3]);this._cachedGetSinglePixelWidth=Math.max(r,p)/y}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:x}=this.current,{a:y,b:r,c:p,d:c}=this.ctx.getTransform();let h,C;if(r===0&&p===0){const D=Math.abs(y),X=Math.abs(c);if(D===X)if(x===0)h=C=1/D;else{const q=D*x;h=C=q<1?1/q:1}else if(x===0)h=1/D,C=1/X;else{const q=D*x,re=X*x;h=q<1?1/q:1,C=re<1?1/re:1}}else{const D=Math.abs(y*c-r*p),X=Math.hypot(y,r),q=Math.hypot(p,c);if(x===0)h=q/D,C=X/D;else{const re=x*D;h=q>re?q/re:1,C=X>re?X/re:1}}this._cachedScaleForStroking[0]=h,this._cachedScaleForStroking[1]=C}return this._cachedScaleForStroking}rescaleAndStroke(x){const{ctx:y}=this,{lineWidth:r}=this.current,[p,c]=this.getScaleForStroking();if(y.lineWidth=r||1,p===1&&c===1){y.stroke();return}const h=y.getLineDash();if(x&&y.save(),y.scale(p,c),h.length>0){const C=Math.max(p,c);y.setLineDash(h.map(D=>D/C)),y.lineDashOffset/=C}y.stroke(),x&&y.restore()}isContentVisible(){for(let x=this.markedContentStack.length-1;x>=0;x--)if(!this.markedContentStack[x].visible)return!1;return!0}};s=new WeakSet,Ti=function(){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)},F=new WeakSet,Ei=function(){if(this.pageColors){const x=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(x!=="none"){const y=this.ctx.filter;this.ctx.filter=x,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=y}}};let N=O;Ce.CanvasGraphics=N;for(const m in we.OPS)N.prototype[m]!==void 0&&(N.prototype[we.OPS[m]]=N.prototype[m])},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.TilingPattern=Ce.PathType=void 0,Ce.getShadingPattern=t;var we=Ve(1),Pe=Ve(6);const qe={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};Ce.PathType=qe;function ke(I,T){if(!T)return;const d=T[2]-T[0],f=T[3]-T[1],i=new Path2D;i.rect(T[0],T[1],d,f),I.clip(i)}class P{constructor(){this.constructor===P&&(0,we.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,we.unreachable)("Abstract method `getPattern` called.")}}class ie extends P{constructor(T){super(),this._type=T[1],this._bbox=T[2],this._colorStops=T[3],this._p0=T[4],this._p1=T[5],this._r0=T[6],this._r1=T[7],this.matrix=null}_createGradient(T){let d;this._type==="axial"?d=T.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(d=T.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const f of this._colorStops)d.addColorStop(f[0],f[1]);return d}getPattern(T,d,f,i){let S;if(i===qe.STROKE||i===qe.FILL){const w=d.current.getClippedPathBoundingBox(i,(0,Pe.getCurrentTransform)(T))||[0,0,0,0],v=Math.ceil(w[2]-w[0])||1,b=Math.ceil(w[3]-w[1])||1,M=d.cachedCanvases.getCanvas("pattern",v,b,!0),_=M.context;_.clearRect(0,0,_.canvas.width,_.canvas.height),_.beginPath(),_.rect(0,0,_.canvas.width,_.canvas.height),_.translate(-w[0],-w[1]),f=we.Util.transform(f,[1,0,0,1,w[0],w[1]]),_.transform(...d.baseTransform),this.matrix&&_.transform(...this.matrix),ke(_,this._bbox),_.fillStyle=this._createGradient(_),_.fill(),S=T.createPattern(M.canvas,"no-repeat");const H=new DOMMatrix(f);S.setTransform(H)}else ke(T,this._bbox),S=this._createGradient(T);return S}}function n(I,T,d,f,i,S,w,v){const b=T.coords,M=T.colors,_=I.data,H=I.width*4;let A;b[d+1]>b[f+1]&&(A=d,d=f,f=A,A=S,S=w,w=A),b[f+1]>b[i+1]&&(A=f,f=i,i=A,A=w,w=v,v=A),b[d+1]>b[f+1]&&(A=d,d=f,f=A,A=S,S=w,w=A);const E=(b[d]+T.offsetX)*T.scaleX,l=(b[d+1]+T.offsetY)*T.scaleY,g=(b[f]+T.offsetX)*T.scaleX,N=(b[f+1]+T.offsetY)*T.scaleY,s=(b[i]+T.offsetX)*T.scaleX,u=(b[i+1]+T.offsetY)*T.scaleY;if(l>=u)return;const F=M[S],U=M[S+1],O=M[S+2],m=M[w],x=M[w+1],y=M[w+2],r=M[v],p=M[v+1],c=M[v+2],h=Math.round(l),C=Math.round(u);let D,X,q,re,K,oe,J,te;for(let B=h;B<=C;B++){if(B<N){const Q=B<l?0:(l-B)/(l-N);D=E-(E-g)*Q,X=F-(F-m)*Q,q=U-(U-x)*Q,re=O-(O-y)*Q}else{let Q;B>u?Q=1:N===u?Q=0:Q=(N-B)/(N-u),D=g-(g-s)*Q,X=m-(m-r)*Q,q=x-(x-p)*Q,re=y-(y-c)*Q}let j;B<l?j=0:B>u?j=1:j=(l-B)/(l-u),K=E-(E-s)*j,oe=F-(F-r)*j,J=U-(U-p)*j,te=O-(O-c)*j;const Y=Math.round(Math.min(D,K)),W=Math.round(Math.max(D,K));let G=H*B+Y*4;for(let Q=Y;Q<=W;Q++)j=(D-Q)/(D-K),j<0?j=0:j>1&&(j=1),_[G++]=X-(X-oe)*j|0,_[G++]=q-(q-J)*j|0,_[G++]=re-(re-te)*j|0,_[G++]=255}}function k(I,T,d){const f=T.coords,i=T.colors;let S,w;switch(T.type){case"lattice":const v=T.verticesPerRow,b=Math.floor(f.length/v)-1,M=v-1;for(S=0;S<b;S++){let _=S*v;for(let H=0;H<M;H++,_++)n(I,d,f[_],f[_+1],f[_+v],i[_],i[_+1],i[_+v]),n(I,d,f[_+v+1],f[_+1],f[_+v],i[_+v+1],i[_+1],i[_+v])}break;case"triangles":for(S=0,w=f.length;S<w;S+=3)n(I,d,f[S],f[S+1],f[S+2],i[S],i[S+1],i[S+2]);break;default:throw new Error("illegal figure")}}class R extends P{constructor(T){super(),this._coords=T[2],this._colors=T[3],this._figures=T[4],this._bounds=T[5],this._bbox=T[7],this._background=T[8],this.matrix=null}_createMeshCanvas(T,d,f){const v=Math.floor(this._bounds[0]),b=Math.floor(this._bounds[1]),M=Math.ceil(this._bounds[2])-v,_=Math.ceil(this._bounds[3])-b,H=Math.min(Math.ceil(Math.abs(M*T[0]*1.1)),3e3),A=Math.min(Math.ceil(Math.abs(_*T[1]*1.1)),3e3),E=M/H,l=_/A,g={coords:this._coords,colors:this._colors,offsetX:-v,offsetY:-b,scaleX:1/E,scaleY:1/l},N=H+2*2,s=A+2*2,u=f.getCanvas("mesh",N,s,!1),F=u.context,U=F.createImageData(H,A);if(d){const m=U.data;for(let x=0,y=m.length;x<y;x+=4)m[x]=d[0],m[x+1]=d[1],m[x+2]=d[2],m[x+3]=255}for(const m of this._figures)k(U,m,g);return F.putImageData(U,2,2),{canvas:u.canvas,offsetX:v-2*E,offsetY:b-2*l,scaleX:E,scaleY:l}}getPattern(T,d,f,i){ke(T,this._bbox);let S;if(i===qe.SHADING)S=we.Util.singularValueDecompose2dScale((0,Pe.getCurrentTransform)(T));else if(S=we.Util.singularValueDecompose2dScale(d.baseTransform),this.matrix){const v=we.Util.singularValueDecompose2dScale(this.matrix);S=[S[0]*v[0],S[1]*v[1]]}const w=this._createMeshCanvas(S,i===qe.SHADING?null:this._background,d.cachedCanvases);return i!==qe.SHADING&&(T.setTransform(...d.baseTransform),this.matrix&&T.transform(...this.matrix)),T.translate(w.offsetX,w.offsetY),T.scale(w.scaleX,w.scaleY),T.createPattern(w.canvas,"no-repeat")}}class e extends P{getPattern(){return"hotpink"}}function t(I){switch(I[0]){case"RadialAxial":return new ie(I);case"Mesh":return new R(I);case"Dummy":return new e}throw new Error(`Unknown IR type: ${I[0]}`)}const o={COLORED:1,UNCOLORED:2},L=class L{constructor(T,d,f,i,S){this.operatorList=T[2],this.matrix=T[3]||[1,0,0,1,0,0],this.bbox=T[4],this.xstep=T[5],this.ystep=T[6],this.paintType=T[7],this.tilingType=T[8],this.color=d,this.ctx=f,this.canvasGraphicsFactory=i,this.baseTransform=S}createPatternCanvas(T){const d=this.operatorList,f=this.bbox,i=this.xstep,S=this.ystep,w=this.paintType,v=this.tilingType,b=this.color,M=this.canvasGraphicsFactory;(0,we.info)("TilingType: "+v);const _=f[0],H=f[1],A=f[2],E=f[3],l=we.Util.singularValueDecompose2dScale(this.matrix),g=we.Util.singularValueDecompose2dScale(this.baseTransform),N=[l[0]*g[0],l[1]*g[1]],s=this.getSizeAndScale(i,this.ctx.canvas.width,N[0]),u=this.getSizeAndScale(S,this.ctx.canvas.height,N[1]),F=T.cachedCanvases.getCanvas("pattern",s.size,u.size,!0),U=F.context,O=M.createCanvasGraphics(U);O.groupLevel=T.groupLevel,this.setFillAndStrokeStyleToContext(O,w,b);let m=_,x=H,y=A,r=E;return _<0&&(m=0,y+=Math.abs(_)),H<0&&(x=0,r+=Math.abs(H)),U.translate(-(s.scale*m),-(u.scale*x)),O.transform(s.scale,0,0,u.scale,0,0),U.save(),this.clipBbox(O,m,x,y,r),O.baseTransform=(0,Pe.getCurrentTransform)(O.ctx),O.executeOperatorList(d),O.endDrawing(),{canvas:F.canvas,scaleX:s.scale,scaleY:u.scale,offsetX:m,offsetY:x}}getSizeAndScale(T,d,f){T=Math.abs(T);const i=Math.max(L.MAX_PATTERN_SIZE,d);let S=Math.ceil(T*f);return S>=i?S=i:f=S/T,{scale:f,size:S}}clipBbox(T,d,f,i,S){const w=i-d,v=S-f;T.ctx.rect(d,f,w,v),T.current.updateRectMinMax((0,Pe.getCurrentTransform)(T.ctx),[d,f,i,S]),T.clip(),T.endPath()}setFillAndStrokeStyleToContext(T,d,f){const i=T.ctx,S=T.current;switch(d){case o.COLORED:const w=this.ctx;i.fillStyle=w.fillStyle,i.strokeStyle=w.strokeStyle,S.fillColor=w.fillStyle,S.strokeColor=w.strokeStyle;break;case o.UNCOLORED:const v=we.Util.makeHexColor(f[0],f[1],f[2]);i.fillStyle=v,i.strokeStyle=v,S.fillColor=v,S.strokeColor=v;break;default:throw new we.FormatError(`Unsupported paint type: ${d}`)}}getPattern(T,d,f,i){let S=f;i!==qe.SHADING&&(S=we.Util.transform(S,d.baseTransform),this.matrix&&(S=we.Util.transform(S,this.matrix)));const w=this.createPatternCanvas(d);let v=new DOMMatrix(S);v=v.translate(w.offsetX,w.offsetY),v=v.scale(1/w.scaleX,1/w.scaleY);const b=T.createPattern(w.canvas,"repeat");return b.setTransform(v),b}};Rt(L,"MAX_PATTERN_SIZE",3e3);let $=L;Ce.TilingPattern=$},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.convertBlackAndWhiteToRGBA=qe,Ce.convertToRGBA=Pe,Ce.grayToRGBA=P;var we=Ve(1);function Pe(ie){switch(ie.kind){case we.ImageKind.GRAYSCALE_1BPP:return qe(ie);case we.ImageKind.RGB_24BPP:return ke(ie)}return null}function qe({src:ie,srcPos:n=0,dest:k,width:R,height:e,nonBlackColor:t=4294967295,inverseDecode:o=!1}){const $=we.FeatureTest.isLittleEndian?4278190080:255,[L,I]=o?[t,$]:[$,t],T=R>>3,d=R&7,f=ie.length;k=new Uint32Array(k.buffer);let i=0;for(let S=0;S<e;S++){for(const v=n+T;n<v;n++){const b=n<f?ie[n]:255;k[i++]=b&128?I:L,k[i++]=b&64?I:L,k[i++]=b&32?I:L,k[i++]=b&16?I:L,k[i++]=b&8?I:L,k[i++]=b&4?I:L,k[i++]=b&2?I:L,k[i++]=b&1?I:L}if(d===0)continue;const w=n<f?ie[n++]:255;for(let v=0;v<d;v++)k[i++]=w&1<<7-v?I:L}return{srcPos:n,destPos:i}}function ke({src:ie,srcPos:n=0,dest:k,destPos:R=0,width:e,height:t}){let o=0;const $=ie.length>>2,L=new Uint32Array(ie.buffer,n,$);if(we.FeatureTest.isLittleEndian){for(;o<$-2;o+=3,R+=4){const I=L[o],T=L[o+1],d=L[o+2];k[R]=I|4278190080,k[R+1]=I>>>24|T<<8|4278190080,k[R+2]=T>>>16|d<<16|4278190080,k[R+3]=d>>>8|4278190080}for(let I=o*4,T=ie.length;I<T;I+=3)k[R++]=ie[I]|ie[I+1]<<8|ie[I+2]<<16|4278190080}else{for(;o<$-2;o+=3,R+=4){const I=L[o],T=L[o+1],d=L[o+2];k[R]=I|255,k[R+1]=I<<24|T>>>8|255,k[R+2]=T<<16|d>>>16|255,k[R+3]=d<<8|255}for(let I=o*4,T=ie.length;I<T;I+=3)k[R++]=ie[I]<<24|ie[I+1]<<16|ie[I+2]<<8|255}return{srcPos:n,destPos:R}}function P(ie,n){if(we.FeatureTest.isLittleEndian)for(let k=0,R=ie.length;k<R;k++)n[k]=ie[k]*65793|4278190080;else for(let k=0,R=ie.length;k<R;k++)n[k]=ie[k]*16843008|255}},(at,Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.GlobalWorkerOptions=void 0;const Ve=Object.create(null);Ce.GlobalWorkerOptions=Ve,Ve.workerPort=null,Ve.workerSrc=""},(at,Ce,Ve)=>{var ie,ua,k,da,e,Nn;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.MessageHandler=void 0;var we=Ve(1);const Pe={UNKNOWN:0,DATA:1,ERROR:2},qe={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function ke(o){switch(o instanceof Error||typeof o=="object"&&o!==null||(0,we.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),o.name){case"AbortException":return new we.AbortException(o.message);case"MissingPDFException":return new we.MissingPDFException(o.message);case"PasswordException":return new we.PasswordException(o.message,o.code);case"UnexpectedResponseException":return new we.UnexpectedResponseException(o.message,o.status);case"UnknownErrorException":return new we.UnknownErrorException(o.message,o.details);default:return new we.UnknownErrorException(o.message,o.toString())}}class P{constructor($,L,I){Ee(this,ie);Ee(this,k);Ee(this,e);this.sourceName=$,this.targetName=L,this.comObj=I,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=T=>{const d=T.data;if(d.targetName!==this.sourceName)return;if(d.stream){Me(this,k,da).call(this,d);return}if(d.callback){const i=d.callbackId,S=this.callbackCapabilities[i];if(!S)throw new Error(`Cannot resolve callback ${i}`);if(delete this.callbackCapabilities[i],d.callback===Pe.DATA)S.resolve(d.data);else if(d.callback===Pe.ERROR)S.reject(ke(d.reason));else throw new Error("Unexpected callback case");return}const f=this.actionHandler[d.action];if(!f)throw new Error(`Unknown action from worker: ${d.action}`);if(d.callbackId){const i=this.sourceName,S=d.sourceName;new Promise(function(w){w(f(d.data))}).then(function(w){I.postMessage({sourceName:i,targetName:S,callback:Pe.DATA,callbackId:d.callbackId,data:w})},function(w){I.postMessage({sourceName:i,targetName:S,callback:Pe.ERROR,callbackId:d.callbackId,reason:ke(w)})});return}if(d.streamId){Me(this,ie,ua).call(this,d);return}f(d.data)},I.addEventListener("message",this._onComObjOnMessage)}on($,L){const I=this.actionHandler;if(I[$])throw new Error(`There is already an actionName called "${$}"`);I[$]=L}send($,L,I){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:$,data:L},I)}sendWithPromise($,L,I){const T=this.callbackId++,d=new we.PromiseCapability;this.callbackCapabilities[T]=d;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:$,callbackId:T,data:L},I)}catch(f){d.reject(f)}return d.promise}sendWithStream($,L,I,T){const d=this.streamId++,f=this.sourceName,i=this.targetName,S=this.comObj;return new ReadableStream({start:w=>{const v=new we.PromiseCapability;return this.streamControllers[d]={controller:w,startCall:v,pullCall:null,cancelCall:null,isClosed:!1},S.postMessage({sourceName:f,targetName:i,action:$,streamId:d,data:L,desiredSize:w.desiredSize},T),v.promise},pull:w=>{const v=new we.PromiseCapability;return this.streamControllers[d].pullCall=v,S.postMessage({sourceName:f,targetName:i,stream:qe.PULL,streamId:d,desiredSize:w.desiredSize}),v.promise},cancel:w=>{(0,we.assert)(w instanceof Error,"cancel must have a valid reason");const v=new we.PromiseCapability;return this.streamControllers[d].cancelCall=v,this.streamControllers[d].isClosed=!0,S.postMessage({sourceName:f,targetName:i,stream:qe.CANCEL,streamId:d,reason:ke(w)}),v.promise}},I)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}ie=new WeakSet,ua=function($){const L=$.streamId,I=this.sourceName,T=$.sourceName,d=this.comObj,f=this,i=this.actionHandler[$.action],S={enqueue(w,v=1,b){if(this.isCancelled)return;const M=this.desiredSize;this.desiredSize-=v,M>0&&this.desiredSize<=0&&(this.sinkCapability=new we.PromiseCapability,this.ready=this.sinkCapability.promise),d.postMessage({sourceName:I,targetName:T,stream:qe.ENQUEUE,streamId:L,chunk:w},b)},close(){this.isCancelled||(this.isCancelled=!0,d.postMessage({sourceName:I,targetName:T,stream:qe.CLOSE,streamId:L}),delete f.streamSinks[L])},error(w){(0,we.assert)(w instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,d.postMessage({sourceName:I,targetName:T,stream:qe.ERROR,streamId:L,reason:ke(w)}))},sinkCapability:new we.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:$.desiredSize,ready:null};S.sinkCapability.resolve(),S.ready=S.sinkCapability.promise,this.streamSinks[L]=S,new Promise(function(w){w(i($.data,S))}).then(function(){d.postMessage({sourceName:I,targetName:T,stream:qe.START_COMPLETE,streamId:L,success:!0})},function(w){d.postMessage({sourceName:I,targetName:T,stream:qe.START_COMPLETE,streamId:L,reason:ke(w)})})},k=new WeakSet,da=function($){const L=$.streamId,I=this.sourceName,T=$.sourceName,d=this.comObj,f=this.streamControllers[L],i=this.streamSinks[L];switch($.stream){case qe.START_COMPLETE:$.success?f.startCall.resolve():f.startCall.reject(ke($.reason));break;case qe.PULL_COMPLETE:$.success?f.pullCall.resolve():f.pullCall.reject(ke($.reason));break;case qe.PULL:if(!i){d.postMessage({sourceName:I,targetName:T,stream:qe.PULL_COMPLETE,streamId:L,success:!0});break}i.desiredSize<=0&&$.desiredSize>0&&i.sinkCapability.resolve(),i.desiredSize=$.desiredSize,new Promise(function(S){var w;S((w=i.onPull)==null?void 0:w.call(i))}).then(function(){d.postMessage({sourceName:I,targetName:T,stream:qe.PULL_COMPLETE,streamId:L,success:!0})},function(S){d.postMessage({sourceName:I,targetName:T,stream:qe.PULL_COMPLETE,streamId:L,reason:ke(S)})});break;case qe.ENQUEUE:if((0,we.assert)(f,"enqueue should have stream controller"),f.isClosed)break;f.controller.enqueue($.chunk);break;case qe.CLOSE:if((0,we.assert)(f,"close should have stream controller"),f.isClosed)break;f.isClosed=!0,f.controller.close(),Me(this,e,Nn).call(this,f,L);break;case qe.ERROR:(0,we.assert)(f,"error should have stream controller"),f.controller.error(ke($.reason)),Me(this,e,Nn).call(this,f,L);break;case qe.CANCEL_COMPLETE:$.success?f.cancelCall.resolve():f.cancelCall.reject(ke($.reason)),Me(this,e,Nn).call(this,f,L);break;case qe.CANCEL:if(!i)break;new Promise(function(S){var w;S((w=i.onCancel)==null?void 0:w.call(i,ke($.reason)))}).then(function(){d.postMessage({sourceName:I,targetName:T,stream:qe.CANCEL_COMPLETE,streamId:L,success:!0})},function(S){d.postMessage({sourceName:I,targetName:T,stream:qe.CANCEL_COMPLETE,streamId:L,reason:ke(S)})}),i.sinkCapability.reject(ke($.reason)),i.isCancelled=!0,delete this.streamSinks[L];break;default:throw new Error("Unexpected stream case")}},e=new WeakSet,Nn=async function($,L){var I,T,d;await Promise.allSettled([(I=$.startCall)==null?void 0:I.promise,(T=$.pullCall)==null?void 0:T.promise,(d=$.cancelCall)==null?void 0:d.promise]),delete this.streamControllers[L]},Ce.MessageHandler=P},(at,Ce,Ve)=>{var qe,ke;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.Metadata=void 0;var we=Ve(1);class Pe{constructor({parsedData:ie,rawData:n}){Ee(this,qe,void 0);Ee(this,ke,void 0);$e(this,qe,ie),$e(this,ke,n)}getRaw(){return le(this,ke)}get(ie){return le(this,qe).get(ie)??null}getAll(){return(0,we.objectFromMap)(le(this,qe))}has(ie){return le(this,qe).has(ie)}}qe=new WeakMap,ke=new WeakMap,Ce.Metadata=Pe},(at,Ce,Ve)=>{var ie,n,k,R,e,t,Ii;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.OptionalContentConfig=void 0;var we=Ve(1),Pe=Ve(8);const qe=Symbol("INTERNAL");class ke{constructor(L,I){Ee(this,ie,!0);this.name=L,this.intent=I}get visible(){return le(this,ie)}_setVisible(L,I){L!==qe&&(0,we.unreachable)("Internal method `_setVisible` called."),$e(this,ie,I)}}ie=new WeakMap;class P{constructor(L){Ee(this,t);Ee(this,n,null);Ee(this,k,new Map);Ee(this,R,null);Ee(this,e,null);if(this.name=null,this.creator=null,L!==null){this.name=L.name,this.creator=L.creator,$e(this,e,L.order);for(const I of L.groups)le(this,k).set(I.id,new ke(I.name,I.intent));if(L.baseState==="OFF")for(const I of le(this,k).values())I._setVisible(qe,!1);for(const I of L.on)le(this,k).get(I)._setVisible(qe,!0);for(const I of L.off)le(this,k).get(I)._setVisible(qe,!1);$e(this,R,this.getHash())}}isVisible(L){if(le(this,k).size===0)return!0;if(!L)return(0,we.warn)("Optional content group not defined."),!0;if(L.type==="OCG")return le(this,k).has(L.id)?le(this,k).get(L.id).visible:((0,we.warn)(`Optional content group not found: ${L.id}`),!0);if(L.type==="OCMD"){if(L.expression)return Me(this,t,Ii).call(this,L.expression);if(!L.policy||L.policy==="AnyOn"){for(const I of L.ids){if(!le(this,k).has(I))return(0,we.warn)(`Optional content group not found: ${I}`),!0;if(le(this,k).get(I).visible)return!0}return!1}else if(L.policy==="AllOn"){for(const I of L.ids){if(!le(this,k).has(I))return(0,we.warn)(`Optional content group not found: ${I}`),!0;if(!le(this,k).get(I).visible)return!1}return!0}else if(L.policy==="AnyOff"){for(const I of L.ids){if(!le(this,k).has(I))return(0,we.warn)(`Optional content group not found: ${I}`),!0;if(!le(this,k).get(I).visible)return!0}return!1}else if(L.policy==="AllOff"){for(const I of L.ids){if(!le(this,k).has(I))return(0,we.warn)(`Optional content group not found: ${I}`),!0;if(le(this,k).get(I).visible)return!1}return!0}return(0,we.warn)(`Unknown optional content policy ${L.policy}.`),!0}return(0,we.warn)(`Unknown group type ${L.type}.`),!0}setVisibility(L,I=!0){if(!le(this,k).has(L)){(0,we.warn)(`Optional content group not found: ${L}`);return}le(this,k).get(L)._setVisible(qe,!!I),$e(this,n,null)}get hasInitialVisibility(){return le(this,R)===null||this.getHash()===le(this,R)}getOrder(){return le(this,k).size?le(this,e)?le(this,e).slice():[...le(this,k).keys()]:null}getGroups(){return le(this,k).size>0?(0,we.objectFromMap)(le(this,k)):null}getGroup(L){return le(this,k).get(L)||null}getHash(){if(le(this,n)!==null)return le(this,n);const L=new Pe.MurmurHash3_64;for(const[I,T]of le(this,k))L.update(`${I}:${T.visible}`);return $e(this,n,L.hexdigest())}}n=new WeakMap,k=new WeakMap,R=new WeakMap,e=new WeakMap,t=new WeakSet,Ii=function(L){const I=L.length;if(I<2)return!0;const T=L[0];for(let d=1;d<I;d++){const f=L[d];let i;if(Array.isArray(f))i=Me(this,t,Ii).call(this,f);else if(le(this,k).has(f))i=le(this,k).get(f).visible;else return(0,we.warn)(`Optional content group not found: ${f}`),!0;switch(T){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return T==="And"},Ce.OptionalContentConfig=P},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.PDFDataTransportStream=void 0;var we=Ve(1),Pe=Ve(6);class qe{constructor({length:n,initialData:k,progressiveDone:R=!1,contentDispositionFilename:e=null,disableRange:t=!1,disableStream:o=!1},$){if((0,we.assert)($,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=R,this._contentDispositionFilename=e,(k==null?void 0:k.length)>0){const L=k instanceof Uint8Array&&k.byteLength===k.buffer.byteLength?k.buffer:new Uint8Array(k).buffer;this._queuedChunks.push(L)}this._pdfDataRangeTransport=$,this._isStreamingSupported=!o,this._isRangeSupported=!t,this._contentLength=n,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((L,I)=>{this._onReceiveData({begin:L,chunk:I})}),this._pdfDataRangeTransport.addProgressListener((L,I)=>{this._onProgress({loaded:L,total:I})}),this._pdfDataRangeTransport.addProgressiveReadListener(L=>{this._onReceiveData({chunk:L})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:n,chunk:k}){const R=k instanceof Uint8Array&&k.byteLength===k.buffer.byteLength?k.buffer:new Uint8Array(k).buffer;if(n===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(R):this._queuedChunks.push(R);else{const e=this._rangeReaders.some(function(t){return t._begin!==n?!1:(t._enqueue(R),!0)});(0,we.assert)(e,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var n;return((n=this._fullRequestReader)==null?void 0:n._loaded)??0}_onProgress(n){var k,R,e,t;n.total===void 0?(R=(k=this._rangeReaders[0])==null?void 0:k.onProgress)==null||R.call(k,{loaded:n.loaded}):(t=(e=this._fullRequestReader)==null?void 0:e.onProgress)==null||t.call(e,{loaded:n.loaded,total:n.total})}_onProgressiveDone(){var n;(n=this._fullRequestReader)==null||n.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(n){const k=this._rangeReaders.indexOf(n);k>=0&&this._rangeReaders.splice(k,1)}getFullReader(){(0,we.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const n=this._queuedChunks;return this._queuedChunks=null,new ke(this,n,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(n,k){if(k<=this._progressiveDataLength)return null;const R=new P(this,n,k);return this._pdfDataRangeTransport.requestDataRange(n,k),this._rangeReaders.push(R),R}cancelAllRequests(n){var k;(k=this._fullRequestReader)==null||k.cancel(n);for(const R of this._rangeReaders.slice(0))R.cancel(n);this._pdfDataRangeTransport.abort()}}Ce.PDFDataTransportStream=qe;class ke{constructor(n,k,R=!1,e=null){this._stream=n,this._done=R||!1,this._filename=(0,Pe.isPdfFile)(e)?e:null,this._queuedChunks=k||[],this._loaded=0;for(const t of this._queuedChunks)this._loaded+=t.byteLength;this._requests=[],this._headersReady=Promise.resolve(),n._fullRequestReader=this,this.onProgress=null}_enqueue(n){this._done||(this._requests.length>0?this._requests.shift().resolve({value:n,done:!1}):this._queuedChunks.push(n),this._loaded+=n.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}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const n=new we.PromiseCapability;return this._requests.push(n),n.promise}cancel(n){this._done=!0;for(const k of this._requests)k.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class P{constructor(n,k,R){this._stream=n,this._begin=k,this._end=R,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(n){if(!this._done){if(this._requests.length===0)this._queuedChunk=n;else{this._requests.shift().resolve({value:n,done:!1});for(const R of this._requests)R.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const k=this._queuedChunk;return this._queuedChunk=null,{value:k,done:!1}}if(this._done)return{value:void 0,done:!0};const n=new we.PromiseCapability;return this._requests.push(n),n.promise}cancel(n){this._done=!0;for(const k of this._requests)k.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.PDFFetchStream=void 0;var we=Ve(1),Pe=Ve(20);function qe(R,e,t){return{method:"GET",headers:R,signal:t.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function ke(R){const e=new Headers;for(const t in R){const o=R[t];o!==void 0&&e.append(t,o)}return e}function P(R){return R instanceof Uint8Array?R.buffer:R instanceof ArrayBuffer?R:((0,we.warn)(`getArrayBuffer - unexpected data format: ${R}`),new Uint8Array(R).buffer)}class ie{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var e;return((e=this._fullRequestReader)==null?void 0:e._loaded)??0}getFullReader(){return(0,we.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new n(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const o=new k(this,e,t);return this._rangeRequestReaders.push(o),o}cancelAllRequests(e){var t;(t=this._fullRequestReader)==null||t.cancel(e);for(const o of this._rangeRequestReaders.slice(0))o.cancel(e)}}Ce.PDFFetchStream=ie;class n{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=new we.PromiseCapability,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=ke(this._stream.httpHeaders);const o=t.url;fetch(o,qe(this._headers,this._withCredentials,this._abortController)).then($=>{if(!(0,Pe.validateResponseStatus)($.status))throw(0,Pe.createResponseStatusError)($.status,o);this._reader=$.body.getReader(),this._headersCapability.resolve();const L=d=>$.headers.get(d),{allowRangeRequests:I,suggestedLength:T}=(0,Pe.validateRangeRequestCapabilities)({getResponseHeader:L,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=I,this._contentLength=T||this._contentLength,this._filename=(0,Pe.extractFilenameFromHeader)(L),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new we.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}async read(){var o;await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(o=this.onProgress)==null||o.call(this,{loaded:this._loaded,total:this._contentLength}),{value:P(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}class k{constructor(e,t,o){this._stream=e,this._reader=null,this._loaded=0;const $=e.source;this._withCredentials=$.withCredentials||!1,this._readCapability=new we.PromiseCapability,this._isStreamingSupported=!$.disableStream,this._abortController=new AbortController,this._headers=ke(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${o-1}`);const L=$.url;fetch(L,qe(this._headers,this._withCredentials,this._abortController)).then(I=>{if(!(0,Pe.validateResponseStatus)(I.status))throw(0,Pe.createResponseStatusError)(I.status,L);this._readCapability.resolve(),this._reader=I.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var o;await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,(o=this.onProgress)==null||o.call(this,{loaded:this._loaded}),{value:P(e),done:!1})}cancel(e){var t;(t=this._reader)==null||t.cancel(e),this._abortController.abort()}}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createResponseStatusError=ie,Ce.extractFilenameFromHeader=P,Ce.validateRangeRequestCapabilities=ke,Ce.validateResponseStatus=n;var we=Ve(1),Pe=Ve(21),qe=Ve(6);function ke({getResponseHeader:k,isHttp:R,rangeChunkSize:e,disableRange:t}){const o={allowRangeRequests:!1,suggestedLength:void 0},$=parseInt(k("Content-Length"),10);return!Number.isInteger($)||(o.suggestedLength=$,$<=2*e)||t||!R||k("Accept-Ranges")!=="bytes"||(k("Content-Encoding")||"identity")!=="identity"||(o.allowRangeRequests=!0),o}function P(k){const R=k("Content-Disposition");if(R){let e=(0,Pe.getFilenameFromContentDispositionHeader)(R);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if((0,qe.isPdfFile)(e))return e}return null}function ie(k,R){return k===404||k===0&&R.startsWith("file:")?new we.MissingPDFException('Missing PDF "'+R+'".'):new we.UnexpectedResponseException(`Unexpected server response (${k}) while retrieving PDF "${R}".`,k)}function n(k){return k===200||k===206}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.getFilenameFromContentDispositionHeader=Pe;var we=Ve(1);function Pe(qe){let ke=!0,P=ie("filename\\*","i").exec(qe);if(P){P=P[1];let $=e(P);return $=unescape($),$=t($),$=o($),k($)}if(P=R(qe),P){const $=o(P);return k($)}if(P=ie("filename","i").exec(qe),P){P=P[1];let $=e(P);return $=o($),k($)}function ie($,L){return new RegExp("(?:^|;)\\s*"+$+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',L)}function n($,L){if($){if(!/^[\x00-\xFF]+$/.test(L))return L;try{const I=new TextDecoder($,{fatal:!0}),T=(0,we.stringToBytes)(L);L=I.decode(T),ke=!1}catch{}}return L}function k($){return ke&&/[\x80-\xff]/.test($)&&($=n("utf-8",$),ke&&($=n("iso-8859-1",$))),$}function R($){const L=[];let I;const T=ie("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(I=T.exec($))!==null;){let[,f,i,S]=I;if(f=parseInt(f,10),f in L){if(f===0)break;continue}L[f]=[i,S]}const d=[];for(let f=0;f<L.length&&f in L;++f){let[i,S]=L[f];S=e(S),i&&(S=unescape(S),f===0&&(S=t(S))),d.push(S)}return d.join("")}function e($){if($.startsWith('"')){const L=$.slice(1).split('\\"');for(let I=0;I<L.length;++I){const T=L[I].indexOf('"');T!==-1&&(L[I]=L[I].slice(0,T),L.length=I+1),L[I]=L[I].replaceAll(/\\(.)/g,"$1")}$=L.join('"')}return $}function t($){const L=$.indexOf("'");if(L===-1)return $;const I=$.slice(0,L),d=$.slice(L+1).replace(/^[^']*'/,"");return n(I,d)}function o($){return!$.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test($)?$:$.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(L,I,T,d){if(T==="q"||T==="Q")return d=d.replaceAll("_"," "),d=d.replaceAll(/=([0-9a-fA-F]{2})/g,function(f,i){return String.fromCharCode(parseInt(i,16))}),n(I,d);try{d=atob(d)}catch{}return n(I,d)})}return""}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.PDFNetworkStream=void 0;var we=Ve(1),Pe=Ve(20);const qe=200,ke=206;function P(e){const t=e.response;return typeof t!="string"?t:(0,we.stringToBytes)(t).buffer}class ie{constructor(t,o={}){this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&o.httpHeaders||Object.create(null),this.withCredentials=o.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,o,$){const L={begin:t,end:o};for(const I in $)L[I]=$[I];return this.request(L)}requestFull(t){return this.request(t)}request(t){const o=new XMLHttpRequest,$=this.currXhrId++,L=this.pendingRequests[$]={xhr:o};o.open("GET",this.url),o.withCredentials=this.withCredentials;for(const I in this.httpHeaders){const T=this.httpHeaders[I];T!==void 0&&o.setRequestHeader(I,T)}return this.isHttp&&"begin"in t&&"end"in t?(o.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),L.expectedStatus=ke):L.expectedStatus=qe,o.responseType="arraybuffer",t.onError&&(o.onerror=function(I){t.onError(o.status)}),o.onreadystatechange=this.onStateChange.bind(this,$),o.onprogress=this.onProgress.bind(this,$),L.onHeadersReceived=t.onHeadersReceived,L.onDone=t.onDone,L.onError=t.onError,L.onProgress=t.onProgress,o.send(null),$}onProgress(t,o){var L;const $=this.pendingRequests[t];$&&((L=$.onProgress)==null||L.call($,o))}onStateChange(t,o){var f,i,S;const $=this.pendingRequests[t];if(!$)return;const L=$.xhr;if(L.readyState>=2&&$.onHeadersReceived&&($.onHeadersReceived(),delete $.onHeadersReceived),L.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],L.status===0&&this.isHttp){(f=$.onError)==null||f.call($,L.status);return}const I=L.status||qe;if(!(I===qe&&$.expectedStatus===ke)&&I!==$.expectedStatus){(i=$.onError)==null||i.call($,L.status);return}const d=P(L);if(I===ke){const w=L.getResponseHeader("Content-Range"),v=/bytes (\d+)-(\d+)\/(\d+)/.exec(w);$.onDone({begin:parseInt(v[1],10),chunk:d})}else d?$.onDone({begin:0,chunk:d}):(S=$.onError)==null||S.call($,L.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const o=this.pendingRequests[t].xhr;delete this.pendingRequests[t],o.abort()}}class n{constructor(t){this._source=t,this._manager=new ie(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const o=this._rangeRequestReaders.indexOf(t);o>=0&&this._rangeRequestReaders.splice(o,1)}getFullReader(){return(0,we.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new k(this._manager,this._source),this._fullRequestReader}getRangeReader(t,o){const $=new R(this._manager,t,o);return $.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push($),$}cancelAllRequests(t){var o;(o=this._fullRequestReader)==null||o.cancel(t);for(const $ of this._rangeRequestReaders.slice(0))$.cancel(t)}}Ce.PDFNetworkStream=n;class k{constructor(t,o){this._manager=t;const $={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=o.url,this._fullRequestId=t.requestFull($),this._headersReceivedCapability=new we.PromiseCapability,this._disableRange=o.disableRange||!1,this._contentLength=o.length,this._rangeChunkSize=o.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 t=this._fullRequestId,o=this._manager.getRequestXhr(t),$=T=>o.getResponseHeader(T),{allowRangeRequests:L,suggestedLength:I}=(0,Pe.validateRangeRequestCapabilities)({getResponseHeader:$,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});L&&(this._isRangeSupported=!0),this._contentLength=I||this._contentLength,this._filename=(0,Pe.extractFilenameFromHeader)($),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const o of this._requests)o.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=(0,Pe.createResponseStatusError)(t,this._url),this._headersReceivedCapability.reject(this._storedError);for(const o of this._requests)o.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){var o;(o=this.onProgress)==null||o.call(this,{loaded:t.loaded,total:t.lengthComputable?t.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}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=new we.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t);for(const o of this._requests)o.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class R{constructor(t,o,$){this._manager=t;const L={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(o,$,L),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var t;(t=this.onClosed)==null||t.call(this,this)}_onDone(t){const o=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:o,done:!1}):this._queuedChunk=o,this._done=!0;for(const $ of this._requests)$.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=(0,Pe.createResponseStatusError)(t,this._url);for(const o of this._requests)o.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){var o;this.isStreamingSupported||(o=this.onProgress)==null||o.call(this,{loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const o=this._queuedChunk;return this._queuedChunk=null,{value:o,done:!1}}if(this._done)return{value:void 0,done:!0};const t=new we.PromiseCapability;return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const o of this._requests)o.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.PDFNodeStream=void 0;var we=Ve(1),Pe=Ve(20);const qe=/^file:\/\/\/[a-zA-Z]:\//;function ke($){const L=require$$5,I=L.parse($);return I.protocol==="file:"||I.host?I:/^[a-z]:[/\\]/i.test($)?L.parse(`file:///${$}`):(I.host||(I.protocol="file:"),I)}class P{constructor(L){this.source=L,this.url=ke(L.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&L.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var L;return((L=this._fullRequestReader)==null?void 0:L._loaded)??0}getFullReader(){return(0,we.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new t(this):new R(this),this._fullRequestReader}getRangeReader(L,I){if(I<=this._progressiveDataLength)return null;const T=this.isFsUrl?new o(this,L,I):new e(this,L,I);return this._rangeRequestReaders.push(T),T}cancelAllRequests(L){var I;(I=this._fullRequestReader)==null||I.cancel(L);for(const T of this._rangeRequestReaders.slice(0))T.cancel(L)}}Ce.PDFNodeStream=P;class ie{constructor(L){this._url=L.url,this._done=!1,this._storedError=null,this.onProgress=null;const I=L.source;this._contentLength=I.length,this._loaded=0,this._filename=null,this._disableRange=I.disableRange||!1,this._rangeChunkSize=I.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!I.disableStream,this._isRangeSupported=!I.disableRange,this._readableStream=null,this._readCapability=new we.PromiseCapability,this._headersCapability=new we.PromiseCapability}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}async read(){var T;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const L=this._readableStream.read();return L===null?(this._readCapability=new we.PromiseCapability,this.read()):(this._loaded+=L.length,(T=this.onProgress)==null||T.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(L).buffer,done:!1})}cancel(L){if(!this._readableStream){this._error(L);return}this._readableStream.destroy(L)}_error(L){this._storedError=L,this._readCapability.resolve()}_setReadableStream(L){this._readableStream=L,L.on("readable",()=>{this._readCapability.resolve()}),L.on("end",()=>{L.destroy(),this._done=!0,this._readCapability.resolve()}),L.on("error",I=>{this._error(I)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new we.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class n{constructor(L){this._url=L.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new we.PromiseCapability;const I=L.source;this._isStreamingSupported=!I.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var T;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const L=this._readableStream.read();return L===null?(this._readCapability=new we.PromiseCapability,this.read()):(this._loaded+=L.length,(T=this.onProgress)==null||T.call(this,{loaded:this._loaded}),{value:new Uint8Array(L).buffer,done:!1})}cancel(L){if(!this._readableStream){this._error(L);return}this._readableStream.destroy(L)}_error(L){this._storedError=L,this._readCapability.resolve()}_setReadableStream(L){this._readableStream=L,L.on("readable",()=>{this._readCapability.resolve()}),L.on("end",()=>{L.destroy(),this._done=!0,this._readCapability.resolve()}),L.on("error",I=>{this._error(I)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function k($,L){return{protocol:$.protocol,auth:$.auth,host:$.hostname,port:$.port,path:$.path,method:"GET",headers:L}}class R extends ie{constructor(L){super(L);const I=T=>{if(T.statusCode===404){const S=new we.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=S,this._headersCapability.reject(S);return}this._headersCapability.resolve(),this._setReadableStream(T);const d=S=>this._readableStream.headers[S.toLowerCase()],{allowRangeRequests:f,suggestedLength:i}=(0,Pe.validateRangeRequestCapabilities)({getResponseHeader:d,isHttp:L.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=f,this._contentLength=i||this._contentLength,this._filename=(0,Pe.extractFilenameFromHeader)(d)};if(this._request=null,this._url.protocol==="http:"){const T=require$$5;this._request=T.request(k(this._url,L.httpHeaders),I)}else{const T=require$$5;this._request=T.request(k(this._url,L.httpHeaders),I)}this._request.on("error",T=>{this._storedError=T,this._headersCapability.reject(T)}),this._request.end()}}class e extends n{constructor(L,I,T){super(L),this._httpHeaders={};for(const f in L.httpHeaders){const i=L.httpHeaders[f];i!==void 0&&(this._httpHeaders[f]=i)}this._httpHeaders.Range=`bytes=${I}-${T-1}`;const d=f=>{if(f.statusCode===404){const i=new we.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=i;return}this._setReadableStream(f)};if(this._request=null,this._url.protocol==="http:"){const f=require$$5;this._request=f.request(k(this._url,this._httpHeaders),d)}else{const f=require$$5;this._request=f.request(k(this._url,this._httpHeaders),d)}this._request.on("error",f=>{this._storedError=f}),this._request.end()}}class t extends ie{constructor(L){super(L);let I=decodeURIComponent(this._url.path);qe.test(this._url.href)&&(I=I.replace(/^\//,""));const T=require$$5;T.lstat(I,(d,f)=>{if(d){d.code==="ENOENT"&&(d=new we.MissingPDFException(`Missing PDF "${I}".`)),this._storedError=d,this._headersCapability.reject(d);return}this._contentLength=f.size,this._setReadableStream(T.createReadStream(I)),this._headersCapability.resolve()})}}class o extends n{constructor(L,I,T){super(L);let d=decodeURIComponent(this._url.path);qe.test(this._url.href)&&(d=d.replace(/^\//,""));const f=require$$5;this._setReadableStream(f.createReadStream(d,{start:I,end:T-1}))}}},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.SVGGraphics=void 0;var we=Ve(6),Pe=Ve(1);const qe={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ke="http://www.w3.org/XML/1998/namespace",P="http://www.w3.org/1999/xlink",ie=["butt","round","square"],n=["miter","round","bevel"],k=function(f,i="",S=!1){if(URL.createObjectURL&&typeof Blob<"u"&&!S)return URL.createObjectURL(new Blob([f],{type:i}));const w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let v=`data:${i};base64,`;for(let b=0,M=f.length;b<M;b+=3){const _=f[b]&255,H=f[b+1]&255,A=f[b+2]&255,E=_>>2,l=(_&3)<<4|H>>4,g=b+1<M?(H&15)<<2|A>>6:64,N=b+2<M?A&63:64;v+=w[E]+w[l]+w[g]+w[N]}return v},R=function(){const f=new Uint8Array([137,80,78,71,13,10,26,10]),i=12,S=new Int32Array(256);for(let A=0;A<256;A++){let E=A;for(let l=0;l<8;l++)E=E&1?3988292384^E>>1&2147483647:E>>1&2147483647;S[A]=E}function w(A,E,l){let g=-1;for(let N=E;N<l;N++){const s=(g^A[N])&255,u=S[s];g=g>>>8^u}return g^-1}function v(A,E,l,g){let N=g;const s=E.length;l[N]=s>>24&255,l[N+1]=s>>16&255,l[N+2]=s>>8&255,l[N+3]=s&255,N+=4,l[N]=A.charCodeAt(0)&255,l[N+1]=A.charCodeAt(1)&255,l[N+2]=A.charCodeAt(2)&255,l[N+3]=A.charCodeAt(3)&255,N+=4,l.set(E,N),N+=E.length;const u=w(l,g+4,N);l[N]=u>>24&255,l[N+1]=u>>16&255,l[N+2]=u>>8&255,l[N+3]=u&255}function b(A,E,l){let g=1,N=0;for(let s=E;s<l;++s)g=(g+(A[s]&255))%65521,N=(N+g)%65521;return N<<16|g}function M(A){if(!Pe.isNodeJS)return _(A);try{const E=parseInt(process.versions.node)>=8?A:Buffer.from(A),l=require$$5.deflateSync(E,{level:9});return l instanceof Uint8Array?l:new Uint8Array(l)}catch(E){(0,Pe.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+E)}return _(A)}function _(A){let E=A.length;const l=65535,g=Math.ceil(E/l),N=new Uint8Array(2+E+g*5+4);let s=0;N[s++]=120,N[s++]=156;let u=0;for(;E>l;)N[s++]=0,N[s++]=255,N[s++]=255,N[s++]=0,N[s++]=0,N.set(A.subarray(u,u+l),s),s+=l,u+=l,E-=l;N[s++]=1,N[s++]=E&255,N[s++]=E>>8&255,N[s++]=~E&65535&255,N[s++]=(~E&65535)>>8&255,N.set(A.subarray(u),s),s+=A.length-u;const F=b(A,0,A.length);return N[s++]=F>>24&255,N[s++]=F>>16&255,N[s++]=F>>8&255,N[s++]=F&255,N}function H(A,E,l,g){const N=A.width,s=A.height;let u,F,U;const O=A.data;switch(E){case Pe.ImageKind.GRAYSCALE_1BPP:F=0,u=1,U=N+7>>3;break;case Pe.ImageKind.RGB_24BPP:F=2,u=8,U=N*3;break;case Pe.ImageKind.RGBA_32BPP:F=6,u=8,U=N*4;break;default:throw new Error("invalid format")}const m=new Uint8Array((1+U)*s);let x=0,y=0;for(let D=0;D<s;++D)m[x++]=0,m.set(O.subarray(y,y+U),x),y+=U,x+=U;if(E===Pe.ImageKind.GRAYSCALE_1BPP&&g){x=0;for(let D=0;D<s;D++){x++;for(let X=0;X<U;X++)m[x++]^=255}}const r=new Uint8Array([N>>24&255,N>>16&255,N>>8&255,N&255,s>>24&255,s>>16&255,s>>8&255,s&255,u,F,0,0,0]),p=M(m),c=f.length+i*3+r.length+p.length,h=new Uint8Array(c);let C=0;return h.set(f,C),C+=f.length,v("IHDR",r,h,C),C+=i+r.length,v("IDATA",p,h,C),C+=i+p.length,v("IEND",new Uint8Array(0),h,C),k(h,"image/png",l)}return function(E,l,g){const N=E.kind===void 0?Pe.ImageKind.GRAYSCALE_1BPP:E.kind;return H(E,N,l,g)}}();class e{constructor(){this.fontSizeScale=1,this.fontWeight=qe.fontWeight,this.fontSize=0,this.textMatrix=Pe.IDENTITY_MATRIX,this.fontMatrix=Pe.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=Pe.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=qe.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,S){this.x=i,this.y=S}}function t(f){let i=[];const S=[];for(const w of f){if(w.fn==="save"){i.push({fnId:92,fn:"group",items:[]}),S.push(i),i=i.at(-1).items;continue}w.fn==="restore"?i=S.pop():i.push(w)}return i}function o(f){if(Number.isInteger(f))return f.toString();const i=f.toFixed(10);let S=i.length-1;if(i[S]!=="0")return i;do S--;while(i[S]==="0");return i.substring(0,i[S]==="."?S:S+1)}function $(f){if(f[4]===0&&f[5]===0){if(f[1]===0&&f[2]===0)return f[0]===1&&f[3]===1?"":`scale(${o(f[0])} ${o(f[3])})`;if(f[0]===f[3]&&f[1]===-f[2]){const i=Math.acos(f[0])*180/Math.PI;return`rotate(${o(i)})`}}else if(f[0]===1&&f[1]===0&&f[2]===0&&f[3]===1)return`translate(${o(f[4])} ${o(f[5])})`;return`matrix(${o(f[0])} ${o(f[1])} ${o(f[2])} ${o(f[3])} ${o(f[4])} ${o(f[5])})`}let L=0,I=0,T=0;class d{constructor(i,S,w=!1){(0,we.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new we.DOMSVGFactory,this.current=new e,this.transformMatrix=Pe.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=i,this.objs=S,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!w,this._operatorIdMapping=[];for(const v in Pe.OPS)this._operatorIdMapping[Pe.OPS[v]]=v}getObject(i,S=null){return typeof i=="string"?i.startsWith("g_")?this.commonObjs.get(i):this.objs.get(i):S}save(){this.transformStack.push(this.transformMatrix);const i=this.current;this.extraStack.push(i),this.current=i.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(i){this.save(),this.executeOpTree(i),this.restore()}loadDependencies(i){const S=i.fnArray,w=i.argsArray;for(let v=0,b=S.length;v<b;v++)if(S[v]===Pe.OPS.dependency)for(const M of w[v]){const _=M.startsWith("g_")?this.commonObjs:this.objs,H=new Promise(A=>{_.get(M,A)});this.current.dependencies.push(H)}return Promise.all(this.current.dependencies)}transform(i,S,w,v,b,M){const _=[i,S,w,v,b,M];this.transformMatrix=Pe.Util.transform(this.transformMatrix,_),this.tgrp=null}getSVG(i,S){this.viewport=S;const w=this._initialize(S);return this.loadDependencies(i).then(()=>(this.transformMatrix=Pe.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(i)),w))}convertOpList(i){const S=this._operatorIdMapping,w=i.argsArray,v=i.fnArray,b=[];for(let M=0,_=v.length;M<_;M++){const H=v[M];b.push({fnId:H,fn:S[H],args:w[M]})}return t(b)}executeOpTree(i){for(const S of i){const w=S.fn,v=S.fnId,b=S.args;switch(v|0){case Pe.OPS.beginText:this.beginText();break;case Pe.OPS.dependency:break;case Pe.OPS.setLeading:this.setLeading(b);break;case Pe.OPS.setLeadingMoveText:this.setLeadingMoveText(b[0],b[1]);break;case Pe.OPS.setFont:this.setFont(b);break;case Pe.OPS.showText:this.showText(b[0]);break;case Pe.OPS.showSpacedText:this.showText(b[0]);break;case Pe.OPS.endText:this.endText();break;case Pe.OPS.moveText:this.moveText(b[0],b[1]);break;case Pe.OPS.setCharSpacing:this.setCharSpacing(b[0]);break;case Pe.OPS.setWordSpacing:this.setWordSpacing(b[0]);break;case Pe.OPS.setHScale:this.setHScale(b[0]);break;case Pe.OPS.setTextMatrix:this.setTextMatrix(b[0],b[1],b[2],b[3],b[4],b[5]);break;case Pe.OPS.setTextRise:this.setTextRise(b[0]);break;case Pe.OPS.setTextRenderingMode:this.setTextRenderingMode(b[0]);break;case Pe.OPS.setLineWidth:this.setLineWidth(b[0]);break;case Pe.OPS.setLineJoin:this.setLineJoin(b[0]);break;case Pe.OPS.setLineCap:this.setLineCap(b[0]);break;case Pe.OPS.setMiterLimit:this.setMiterLimit(b[0]);break;case Pe.OPS.setFillRGBColor:this.setFillRGBColor(b[0],b[1],b[2]);break;case Pe.OPS.setStrokeRGBColor:this.setStrokeRGBColor(b[0],b[1],b[2]);break;case Pe.OPS.setStrokeColorN:this.setStrokeColorN(b);break;case Pe.OPS.setFillColorN:this.setFillColorN(b);break;case Pe.OPS.shadingFill:this.shadingFill(b[0]);break;case Pe.OPS.setDash:this.setDash(b[0],b[1]);break;case Pe.OPS.setRenderingIntent:this.setRenderingIntent(b[0]);break;case Pe.OPS.setFlatness:this.setFlatness(b[0]);break;case Pe.OPS.setGState:this.setGState(b[0]);break;case Pe.OPS.fill:this.fill();break;case Pe.OPS.eoFill:this.eoFill();break;case Pe.OPS.stroke:this.stroke();break;case Pe.OPS.fillStroke:this.fillStroke();break;case Pe.OPS.eoFillStroke:this.eoFillStroke();break;case Pe.OPS.clip:this.clip("nonzero");break;case Pe.OPS.eoClip:this.clip("evenodd");break;case Pe.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case Pe.OPS.paintImageXObject:this.paintImageXObject(b[0]);break;case Pe.OPS.paintInlineImageXObject:this.paintInlineImageXObject(b[0]);break;case Pe.OPS.paintImageMaskXObject:this.paintImageMaskXObject(b[0]);break;case Pe.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(b[0],b[1]);break;case Pe.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case Pe.OPS.closePath:this.closePath();break;case Pe.OPS.closeStroke:this.closeStroke();break;case Pe.OPS.closeFillStroke:this.closeFillStroke();break;case Pe.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case Pe.OPS.nextLine:this.nextLine();break;case Pe.OPS.transform:this.transform(b[0],b[1],b[2],b[3],b[4],b[5]);break;case Pe.OPS.constructPath:this.constructPath(b[0],b[1]);break;case Pe.OPS.endPath:this.endPath();break;case 92:this.group(S.items);break;default:(0,Pe.warn)(`Unimplemented operator ${w}`);break}}}setWordSpacing(i){this.current.wordSpacing=i}setCharSpacing(i){this.current.charSpacing=i}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(i,S,w,v,b,M){const _=this.current;_.textMatrix=_.lineMatrix=[i,S,w,v,b,M],_.textMatrixScale=Math.hypot(i,S),_.x=_.lineX=0,_.y=_.lineY=0,_.xcoords=[],_.ycoords=[],_.tspan=this.svgFactory.createElement("svg:tspan"),_.tspan.setAttributeNS(null,"font-family",_.fontFamily),_.tspan.setAttributeNS(null,"font-size",`${o(_.fontSize)}px`),_.tspan.setAttributeNS(null,"y",o(-_.y)),_.txtElement=this.svgFactory.createElement("svg:text"),_.txtElement.append(_.tspan)}beginText(){const i=this.current;i.x=i.lineX=0,i.y=i.lineY=0,i.textMatrix=Pe.IDENTITY_MATRIX,i.lineMatrix=Pe.IDENTITY_MATRIX,i.textMatrixScale=1,i.tspan=this.svgFactory.createElement("svg:tspan"),i.txtElement=this.svgFactory.createElement("svg:text"),i.txtgrp=this.svgFactory.createElement("svg:g"),i.xcoords=[],i.ycoords=[]}moveText(i,S){const w=this.current;w.x=w.lineX+=i,w.y=w.lineY+=S,w.xcoords=[],w.ycoords=[],w.tspan=this.svgFactory.createElement("svg:tspan"),w.tspan.setAttributeNS(null,"font-family",w.fontFamily),w.tspan.setAttributeNS(null,"font-size",`${o(w.fontSize)}px`),w.tspan.setAttributeNS(null,"y",o(-w.y))}showText(i){const S=this.current,w=S.font,v=S.fontSize;if(v===0)return;const b=S.fontSizeScale,M=S.charSpacing,_=S.wordSpacing,H=S.fontDirection,A=S.textHScale*H,E=w.vertical,l=E?1:-1,g=w.defaultVMetrics,N=v*S.fontMatrix[0];let s=0;for(const U of i){if(U===null){s+=H*_;continue}else if(typeof U=="number"){s+=l*U*v/1e3;continue}const O=(U.isSpace?_:0)+M,m=U.fontChar;let x,y,r=U.width;if(E){let c;const h=U.vmetric||g;c=U.vmetric?h[1]:r*.5,c=-c*N;const C=h[2]*N;r=h?-h[0]:r,x=c/b,y=(s+C)/b}else x=s/b,y=0;(U.isInFont||w.missingFile)&&(S.xcoords.push(S.x+x),E&&S.ycoords.push(-S.y+y),S.tspan.textContent+=m);const p=E?r*N-O*H:r*N+O*H;s+=p}S.tspan.setAttributeNS(null,"x",S.xcoords.map(o).join(" ")),E?S.tspan.setAttributeNS(null,"y",S.ycoords.map(o).join(" ")):S.tspan.setAttributeNS(null,"y",o(-S.y)),E?S.y-=s:S.x+=s*A,S.tspan.setAttributeNS(null,"font-family",S.fontFamily),S.tspan.setAttributeNS(null,"font-size",`${o(S.fontSize)}px`),S.fontStyle!==qe.fontStyle&&S.tspan.setAttributeNS(null,"font-style",S.fontStyle),S.fontWeight!==qe.fontWeight&&S.tspan.setAttributeNS(null,"font-weight",S.fontWeight);const u=S.textRenderingMode&Pe.TextRenderingMode.FILL_STROKE_MASK;if(u===Pe.TextRenderingMode.FILL||u===Pe.TextRenderingMode.FILL_STROKE?(S.fillColor!==qe.fillColor&&S.tspan.setAttributeNS(null,"fill",S.fillColor),S.fillAlpha<1&&S.tspan.setAttributeNS(null,"fill-opacity",S.fillAlpha)):S.textRenderingMode===Pe.TextRenderingMode.ADD_TO_PATH?S.tspan.setAttributeNS(null,"fill","transparent"):S.tspan.setAttributeNS(null,"fill","none"),u===Pe.TextRenderingMode.STROKE||u===Pe.TextRenderingMode.FILL_STROKE){const U=1/(S.textMatrixScale||1);this._setStrokeAttributes(S.tspan,U)}let F=S.textMatrix;S.textRise!==0&&(F=F.slice(),F[5]+=S.textRise),S.txtElement.setAttributeNS(null,"transform",`${$(F)} scale(${o(A)}, -1)`),S.txtElement.setAttributeNS(ke,"xml:space","preserve"),S.txtElement.append(S.tspan),S.txtgrp.append(S.txtElement),this._ensureTransformGroup().append(S.txtElement)}setLeadingMoveText(i,S){this.setLeading(-S),this.moveText(i,S)}addFontStyle(i){if(!i.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.append(this.cssStyle));const S=k(i.data,i.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${i.loadedName}"; src: url(${S}); }
`}setFont(i){const S=this.current,w=this.commonObjs.get(i[0]);let v=i[1];S.font=w,this.embedFonts&&!w.missingFile&&!this.embeddedFonts[w.loadedName]&&(this.addFontStyle(w),this.embeddedFonts[w.loadedName]=w),S.fontMatrix=w.fontMatrix||Pe.FONT_IDENTITY_MATRIX;let b="normal";w.black?b="900":w.bold&&(b="bold");const M=w.italic?"italic":"normal";v<0?(v=-v,S.fontDirection=-1):S.fontDirection=1,S.fontSize=v,S.fontFamily=w.loadedName,S.fontWeight=b,S.fontStyle=M,S.tspan=this.svgFactory.createElement("svg:tspan"),S.tspan.setAttributeNS(null,"y",o(-S.y)),S.xcoords=[],S.ycoords=[]}endText(){var S;const i=this.current;i.textRenderingMode&Pe.TextRenderingMode.ADD_TO_PATH_FLAG&&((S=i.txtElement)!=null&&S.hasChildNodes())&&(i.element=i.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(i){i>0&&(this.current.lineWidth=i)}setLineCap(i){this.current.lineCap=ie[i]}setLineJoin(i){this.current.lineJoin=n[i]}setMiterLimit(i){this.current.miterLimit=i}setStrokeAlpha(i){this.current.strokeAlpha=i}setStrokeRGBColor(i,S,w){this.current.strokeColor=Pe.Util.makeHexColor(i,S,w)}setFillAlpha(i){this.current.fillAlpha=i}setFillRGBColor(i,S,w){this.current.fillColor=Pe.Util.makeHexColor(i,S,w),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(i){this.current.strokeColor=this._makeColorN_Pattern(i)}setFillColorN(i){this.current.fillColor=this._makeColorN_Pattern(i)}shadingFill(i){const{width:S,height:w}=this.viewport,v=Pe.Util.inverseTransform(this.transformMatrix),[b,M,_,H]=Pe.Util.getAxialAlignedBoundingBox([0,0,S,w],v),A=this.svgFactory.createElement("svg:rect");A.setAttributeNS(null,"x",b),A.setAttributeNS(null,"y",M),A.setAttributeNS(null,"width",_-b),A.setAttributeNS(null,"height",H-M),A.setAttributeNS(null,"fill",this._makeShadingPattern(i)),this.current.fillAlpha<1&&A.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(A)}_makeColorN_Pattern(i){return i[0]==="TilingPattern"?this._makeTilingPattern(i):this._makeShadingPattern(i)}_makeTilingPattern(i){const S=i[1],w=i[2],v=i[3]||Pe.IDENTITY_MATRIX,[b,M,_,H]=i[4],A=i[5],E=i[6],l=i[7],g=`shading${T++}`,[N,s,u,F]=Pe.Util.normalizeRect([...Pe.Util.applyTransform([b,M],v),...Pe.Util.applyTransform([_,H],v)]),[U,O]=Pe.Util.singularValueDecompose2dScale(v),m=A*U,x=E*O,y=this.svgFactory.createElement("svg:pattern");y.setAttributeNS(null,"id",g),y.setAttributeNS(null,"patternUnits","userSpaceOnUse"),y.setAttributeNS(null,"width",m),y.setAttributeNS(null,"height",x),y.setAttributeNS(null,"x",`${N}`),y.setAttributeNS(null,"y",`${s}`);const r=this.svg,p=this.transformMatrix,c=this.current.fillColor,h=this.current.strokeColor,C=this.svgFactory.create(u-N,F-s);if(this.svg=C,this.transformMatrix=v,l===2){const D=Pe.Util.makeHexColor(...S);this.current.fillColor=D,this.current.strokeColor=D}return this.executeOpTree(this.convertOpList(w)),this.svg=r,this.transformMatrix=p,this.current.fillColor=c,this.current.strokeColor=h,y.append(C.childNodes[0]),this.defs.append(y),`url(#${g})`}_makeShadingPattern(i){switch(typeof i=="string"&&(i=this.objs.get(i)),i[0]){case"RadialAxial":const S=`shading${T++}`,w=i[3];let v;switch(i[1]){case"axial":const b=i[4],M=i[5];v=this.svgFactory.createElement("svg:linearGradient"),v.setAttributeNS(null,"id",S),v.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),v.setAttributeNS(null,"x1",b[0]),v.setAttributeNS(null,"y1",b[1]),v.setAttributeNS(null,"x2",M[0]),v.setAttributeNS(null,"y2",M[1]);break;case"radial":const _=i[4],H=i[5],A=i[6],E=i[7];v=this.svgFactory.createElement("svg:radialGradient"),v.setAttributeNS(null,"id",S),v.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),v.setAttributeNS(null,"cx",H[0]),v.setAttributeNS(null,"cy",H[1]),v.setAttributeNS(null,"r",E),v.setAttributeNS(null,"fx",_[0]),v.setAttributeNS(null,"fy",_[1]),v.setAttributeNS(null,"fr",A);break;default:throw new Error(`Unknown RadialAxial type: ${i[1]}`)}for(const b of w){const M=this.svgFactory.createElement("svg:stop");M.setAttributeNS(null,"offset",b[0]),M.setAttributeNS(null,"stop-color",b[1]),v.append(M)}return this.defs.append(v),`url(#${S})`;case"Mesh":return(0,Pe.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${i[0]}`)}}setDash(i,S){this.current.dashArray=i,this.current.dashPhase=S}constructPath(i,S){const w=this.current;let v=w.x,b=w.y,M=[],_=0;for(const H of i)switch(H|0){case Pe.OPS.rectangle:v=S[_++],b=S[_++];const A=S[_++],E=S[_++],l=v+A,g=b+E;M.push("M",o(v),o(b),"L",o(l),o(b),"L",o(l),o(g),"L",o(v),o(g),"Z");break;case Pe.OPS.moveTo:v=S[_++],b=S[_++],M.push("M",o(v),o(b));break;case Pe.OPS.lineTo:v=S[_++],b=S[_++],M.push("L",o(v),o(b));break;case Pe.OPS.curveTo:v=S[_+4],b=S[_+5],M.push("C",o(S[_]),o(S[_+1]),o(S[_+2]),o(S[_+3]),o(v),o(b)),_+=6;break;case Pe.OPS.curveTo2:M.push("C",o(v),o(b),o(S[_]),o(S[_+1]),o(S[_+2]),o(S[_+3])),v=S[_+2],b=S[_+3],_+=4;break;case Pe.OPS.curveTo3:v=S[_+2],b=S[_+3],M.push("C",o(S[_]),o(S[_+1]),o(v),o(b),o(v),o(b)),_+=4;break;case Pe.OPS.closePath:M.push("Z");break}M=M.join(" "),w.path&&i.length>0&&i[0]!==Pe.OPS.rectangle&&i[0]!==Pe.OPS.moveTo?M=w.path.getAttributeNS(null,"d")+M:(w.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(w.path)),w.path.setAttributeNS(null,"d",M),w.path.setAttributeNS(null,"fill","none"),w.element=w.path,w.setCurrentPoint(v,b)}endPath(){const i=this.current;if(i.path=null,!this.pendingClip)return;if(!i.element){this.pendingClip=null;return}const S=`clippath${L++}`,w=this.svgFactory.createElement("svg:clipPath");w.setAttributeNS(null,"id",S),w.setAttributeNS(null,"transform",$(this.transformMatrix));const v=i.element.cloneNode(!0);if(this.pendingClip==="evenodd"?v.setAttributeNS(null,"clip-rule","evenodd"):v.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,w.append(v),this.defs.append(w),i.activeClipUrl){i.clipGroup=null;for(const b of this.extraStack)b.clipGroup=null;w.setAttributeNS(null,"clip-path",i.activeClipUrl)}i.activeClipUrl=`url(#${S})`,this.tgrp=null}clip(i){this.pendingClip=i}closePath(){const i=this.current;if(i.path){const S=`${i.path.getAttributeNS(null,"d")}Z`;i.path.setAttributeNS(null,"d",S)}}setLeading(i){this.current.leading=-i}setTextRise(i){this.current.textRise=i}setTextRenderingMode(i){this.current.textRenderingMode=i}setHScale(i){this.current.textHScale=i/100}setRenderingIntent(i){}setFlatness(i){}setGState(i){for(const[S,w]of i)switch(S){case"LW":this.setLineWidth(w);break;case"LC":this.setLineCap(w);break;case"LJ":this.setLineJoin(w);break;case"ML":this.setMiterLimit(w);break;case"D":this.setDash(w[0],w[1]);break;case"RI":this.setRenderingIntent(w);break;case"FL":this.setFlatness(w);break;case"Font":this.setFont(w);break;case"CA":this.setStrokeAlpha(w);break;case"ca":this.setFillAlpha(w);break;default:(0,Pe.warn)(`Unimplemented graphic state operator ${S}`);break}}fill(){const i=this.current;i.element&&(i.element.setAttributeNS(null,"fill",i.fillColor),i.element.setAttributeNS(null,"fill-opacity",i.fillAlpha),this.endPath())}stroke(){const i=this.current;i.element&&(this._setStrokeAttributes(i.element),i.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(i,S=1){const w=this.current;let v=w.dashArray;S!==1&&v.length>0&&(v=v.map(function(b){return S*b})),i.setAttributeNS(null,"stroke",w.strokeColor),i.setAttributeNS(null,"stroke-opacity",w.strokeAlpha),i.setAttributeNS(null,"stroke-miterlimit",o(w.miterLimit)),i.setAttributeNS(null,"stroke-linecap",w.lineCap),i.setAttributeNS(null,"stroke-linejoin",w.lineJoin),i.setAttributeNS(null,"stroke-width",o(S*w.lineWidth)+"px"),i.setAttributeNS(null,"stroke-dasharray",v.map(o).join(" ")),i.setAttributeNS(null,"stroke-dashoffset",o(S*w.dashPhase)+"px")}eoFill(){var i;(i=this.current.element)==null||i.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var i;(i=this.current.element)==null||i.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width","1px"),i.setAttributeNS(null,"height","1px"),i.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(i)}paintImageXObject(i){const S=this.getObject(i);if(!S){(0,Pe.warn)(`Dependent image with object ID ${i} is not ready yet`);return}this.paintInlineImageXObject(S)}paintInlineImageXObject(i,S){const w=i.width,v=i.height,b=R(i,this.forceDataSchema,!!S),M=this.svgFactory.createElement("svg:rect");M.setAttributeNS(null,"x","0"),M.setAttributeNS(null,"y","0"),M.setAttributeNS(null,"width",o(w)),M.setAttributeNS(null,"height",o(v)),this.current.element=M,this.clip("nonzero");const _=this.svgFactory.createElement("svg:image");_.setAttributeNS(P,"xlink:href",b),_.setAttributeNS(null,"x","0"),_.setAttributeNS(null,"y",o(-v)),_.setAttributeNS(null,"width",o(w)+"px"),_.setAttributeNS(null,"height",o(v)+"px"),_.setAttributeNS(null,"transform",`scale(${o(1/w)} ${o(-1/v)})`),S?S.append(_):this._ensureTransformGroup().append(_)}paintImageMaskXObject(i){const S=this.getObject(i.data,i);if(S.bitmap){(0,Pe.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const w=this.current,v=S.width,b=S.height,M=w.fillColor;w.maskId=`mask${I++}`;const _=this.svgFactory.createElement("svg:mask");_.setAttributeNS(null,"id",w.maskId);const H=this.svgFactory.createElement("svg:rect");H.setAttributeNS(null,"x","0"),H.setAttributeNS(null,"y","0"),H.setAttributeNS(null,"width",o(v)),H.setAttributeNS(null,"height",o(b)),H.setAttributeNS(null,"fill",M),H.setAttributeNS(null,"mask",`url(#${w.maskId})`),this.defs.append(_),this._ensureTransformGroup().append(H),this.paintInlineImageXObject(S,_)}paintFormXObjectBegin(i,S){if(Array.isArray(i)&&i.length===6&&this.transform(i[0],i[1],i[2],i[3],i[4],i[5]),S){const w=S[2]-S[0],v=S[3]-S[1],b=this.svgFactory.createElement("svg:rect");b.setAttributeNS(null,"x",S[0]),b.setAttributeNS(null,"y",S[1]),b.setAttributeNS(null,"width",o(w)),b.setAttributeNS(null,"height",o(v)),this.current.element=b,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(i){const S=this.svgFactory.create(i.width,i.height),w=this.svgFactory.createElement("svg:defs");S.append(w),this.defs=w;const v=this.svgFactory.createElement("svg:g");return v.setAttributeNS(null,"transform",$(i.transform)),S.append(v),this.svg=v,S}_ensureClipGroup(){if(!this.current.clipGroup){const i=this.svgFactory.createElement("svg:g");i.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(i),this.current.clipGroup=i}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",$(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}Ce.SVGGraphics=d},(at,Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.XfaText=void 0;class Ve{static textContent(Pe){const qe=[],ke={items:qe,styles:Object.create(null)};function P(ie){var R;if(!ie)return;let n=null;const k=ie.name;if(k==="#text")n=ie.value;else if(Ve.shouldBuildText(k))(R=ie==null?void 0:ie.attributes)!=null&&R.textContent?n=ie.attributes.textContent:ie.value&&(n=ie.value);else return;if(n!==null&&qe.push({str:n}),!!ie.children)for(const e of ie.children)P(e)}return P(Pe),ke}static shouldBuildText(Pe){return!(Pe==="textarea"||Pe==="input"||Pe==="option"||Pe==="select")}}Ce.XfaText=Ve},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.TextLayerRenderTask=void 0,Ce.renderTextLayer=$,Ce.updateTextLayer=L;var we=Ve(1),Pe=Ve(6);const qe=1e5,ke=30,P=.8,ie=new Map;function n(I,T){let d;if(T&&we.FeatureTest.isOffscreenCanvasSupported)d=new OffscreenCanvas(I,I).getContext("2d",{alpha:!1});else{const f=document.createElement("canvas");f.width=f.height=I,d=f.getContext("2d",{alpha:!1})}return d}function k(I,T){const d=ie.get(I);if(d)return d;const f=n(ke,T);f.font=`${ke}px ${I}`;const i=f.measureText("");let S=i.fontBoundingBoxAscent,w=Math.abs(i.fontBoundingBoxDescent);if(S){const b=S/(S+w);return ie.set(I,b),f.canvas.width=f.canvas.height=0,b}f.strokeStyle="red",f.clearRect(0,0,ke,ke),f.strokeText("g",0,0);let v=f.getImageData(0,0,ke,ke).data;w=0;for(let b=v.length-1-3;b>=0;b-=4)if(v[b]>0){w=Math.ceil(b/4/ke);break}f.clearRect(0,0,ke,ke),f.strokeText("A",0,ke),v=f.getImageData(0,0,ke,ke).data,S=0;for(let b=0,M=v.length;b<M;b+=4)if(v[b]>0){S=ke-Math.floor(b/4/ke);break}if(f.canvas.width=f.canvas.height=0,S){const b=S/(S+w);return ie.set(I,b),b}return ie.set(I,P),P}function R(I,T,d){const f=document.createElement("span"),i={angle:0,canvasWidth:0,hasText:T.str!=="",hasEOL:T.hasEOL,fontSize:0};I._textDivs.push(f);const S=we.Util.transform(I._transform,T.transform);let w=Math.atan2(S[1],S[0]);const v=d[T.fontName];v.vertical&&(w+=Math.PI/2);const b=Math.hypot(S[2],S[3]),M=b*k(v.fontFamily,I._isOffscreenCanvasSupported);let _,H;w===0?(_=S[4],H=S[5]-M):(_=S[4]+M*Math.sin(w),H=S[5]-M*Math.cos(w));const A="calc(var(--scale-factor)*",E=f.style;I._container===I._rootContainer?(E.left=`${(100*_/I._pageWidth).toFixed(2)}%`,E.top=`${(100*H/I._pageHeight).toFixed(2)}%`):(E.left=`${A}${_.toFixed(2)}px)`,E.top=`${A}${H.toFixed(2)}px)`),E.fontSize=`${A}${b.toFixed(2)}px)`,E.fontFamily=v.fontFamily,i.fontSize=b,f.setAttribute("role","presentation"),f.textContent=T.str,f.dir=T.dir,I._fontInspectorEnabled&&(f.dataset.fontName=T.fontName),w!==0&&(i.angle=w*(180/Math.PI));let l=!1;if(T.str.length>1)l=!0;else if(T.str!==" "&&T.transform[0]!==T.transform[3]){const g=Math.abs(T.transform[0]),N=Math.abs(T.transform[3]);g!==N&&Math.max(g,N)/Math.min(g,N)>1.5&&(l=!0)}l&&(i.canvasWidth=v.vertical?T.height:T.width),I._textDivProperties.set(f,i),I._isReadableStream&&I._layoutText(f)}function e(I){const{div:T,scale:d,properties:f,ctx:i,prevFontSize:S,prevFontFamily:w}=I,{style:v}=T;let b="";if(f.canvasWidth!==0&&f.hasText){const{fontFamily:M}=v,{canvasWidth:_,fontSize:H}=f;(S!==H||w!==M)&&(i.font=`${H*d}px ${M}`,I.prevFontSize=H,I.prevFontFamily=M);const{width:A}=i.measureText(T.textContent);A>0&&(b=`scaleX(${_*d/A})`)}f.angle!==0&&(b=`rotate(${f.angle}deg) ${b}`),b.length>0&&(v.transform=b)}function t(I){if(I._canceled)return;const T=I._textDivs,d=I._capability;if(T.length>qe){d.resolve();return}if(!I._isReadableStream)for(const i of T)I._layoutText(i);d.resolve()}class o{constructor({textContentSource:T,container:d,viewport:f,textDivs:i,textDivProperties:S,textContentItemsStr:w,isOffscreenCanvasSupported:v}){var A;this._textContentSource=T,this._isReadableStream=T instanceof ReadableStream,this._container=this._rootContainer=d,this._textDivs=i||[],this._textContentItemsStr=w||[],this._isOffscreenCanvasSupported=v,this._fontInspectorEnabled=!!((A=globalThis.FontInspector)!=null&&A.enabled),this._reader=null,this._textDivProperties=S||new WeakMap,this._canceled=!1,this._capability=new we.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:f.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:n(0,v)};const{pageWidth:b,pageHeight:M,pageX:_,pageY:H}=f.rawDims;this._transform=[1,0,0,-1,-_,H+M],this._pageWidth=b,this._pageHeight=M,(0,Pe.setLayerDimensions)(d,f),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new we.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new we.AbortException("TextLayer task cancelled."))}_processItems(T,d){for(const f of T){if(f.str===void 0){if(f.type==="beginMarkedContentProps"||f.type==="beginMarkedContent"){const i=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),f.id!==null&&this._container.setAttribute("id",`${f.id}`),i.append(this._container)}else f.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(f.str),R(this,f,d)}}_layoutText(T){const d=this._layoutTextParams.properties=this._textDivProperties.get(T);if(this._layoutTextParams.div=T,e(this._layoutTextParams),d.hasText&&this._container.append(T),d.hasEOL){const f=document.createElement("br");f.setAttribute("role","presentation"),this._container.append(f)}}_render(){const T=new we.PromiseCapability;let d=Object.create(null);if(this._isReadableStream){const f=()=>{this._reader.read().then(({value:i,done:S})=>{if(S){T.resolve();return}Object.assign(d,i.styles),this._processItems(i.items,d),f()},T.reject)};this._reader=this._textContentSource.getReader(),f()}else if(this._textContentSource){const{items:f,styles:i}=this._textContentSource;this._processItems(f,i),T.resolve()}else throw new Error('No "textContentSource" parameter specified.');T.promise.then(()=>{d=null,t(this)},this._capability.reject)}}Ce.TextLayerRenderTask=o;function $(I){!I.textContentSource&&(I.textContent||I.textContentStream)&&((0,Pe.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),I.textContentSource=I.textContent||I.textContentStream);const{container:T,viewport:d}=I,f=getComputedStyle(T),i=f.getPropertyValue("visibility"),S=parseFloat(f.getPropertyValue("--scale-factor"));i==="visible"&&(!S||Math.abs(S-d.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const w=new o(I);return w._render(),w}function L({container:I,viewport:T,textDivs:d,textDivProperties:f,isOffscreenCanvasSupported:i,mustRotate:S=!0,mustRescale:w=!0}){if(S&&(0,Pe.setLayerDimensions)(I,{rotation:T.rotation}),w){const v=n(0,i),M={prevFontSize:null,prevFontFamily:null,div:null,scale:T.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:v};for(const _ of d)M.properties=f.get(_),M.div=_,e(M)}}},(at,Ce,Ve)=>{var k,R,e,t,o,$,L,I,T,d,f,Oi,S,Bn,v,Pi,M,Mi;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.AnnotationEditorLayer=void 0;var we=Ve(1),Pe=Ve(4),qe=Ve(28),ke=Ve(33),P=Ve(6),ie=Ve(34);const H=class H{constructor({uiManager:E,pageIndex:l,div:g,accessibilityManager:N,annotationLayer:s,viewport:u,l10n:F}){Ee(this,f);Ee(this,S);Ee(this,v);Ee(this,M);Ee(this,k,void 0);Ee(this,R,!1);Ee(this,e,null);Ee(this,t,this.pointerup.bind(this));Ee(this,o,this.pointerdown.bind(this));Ee(this,$,new Map);Ee(this,L,!1);Ee(this,I,!1);Ee(this,T,!1);Ee(this,d,void 0);const U=[qe.FreeTextEditor,ke.InkEditor,ie.StampEditor];if(!H._initialized){H._initialized=!0;for(const O of U)O.initialize(F)}E.registerEditorTypes(U),$e(this,d,E),this.pageIndex=l,this.div=g,$e(this,k,N),$e(this,e,s),this.viewport=u,le(this,d).addLayer(this)}get isEmpty(){return le(this,$).size===0}updateToolbar(E){le(this,d).updateToolbar(E)}updateMode(E=le(this,d).getMode()){Me(this,M,Mi).call(this),E===we.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),E!==we.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",E===we.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",E===we.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",E===we.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(E){if(!E&&le(this,d).getMode()!==we.AnnotationEditorType.INK)return;if(!E){for(const g of le(this,$).values())if(g.isEmpty()){g.setInBackground();return}}Me(this,S,Bn).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(E){le(this,d).setEditingState(E)}addCommands(E){le(this,d).addCommands(E)}enable(){this.div.style.pointerEvents="auto";const E=new Set;for(const g of le(this,$).values())g.enableEditing(),g.annotationElementId&&E.add(g.annotationElementId);if(!le(this,e))return;const l=le(this,e).getEditableAnnotations();for(const g of l){if(g.hide(),le(this,d).isDeletedAnnotationElement(g.data.id)||E.has(g.data.id))continue;const N=this.deserialize(g);N&&(this.addOrRebuild(N),N.enableEditing())}}disable(){var l;$e(this,T,!0),this.div.style.pointerEvents="none";const E=new Set;for(const g of le(this,$).values()){if(g.disableEditing(),!g.annotationElementId||g.serialize()!==null){E.add(g.annotationElementId);continue}(l=this.getEditableAnnotation(g.annotationElementId))==null||l.show(),g.remove()}if(le(this,e)){const g=le(this,e).getEditableAnnotations();for(const N of g){const{id:s}=N.data;E.has(s)||le(this,d).isDeletedAnnotationElement(s)||N.show()}}Me(this,M,Mi).call(this),this.isEmpty&&(this.div.hidden=!0),$e(this,T,!1)}getEditableAnnotation(E){var l;return((l=le(this,e))==null?void 0:l.getEditableAnnotation(E))||null}setActiveEditor(E){le(this,d).getActive()!==E&&le(this,d).setActiveEditor(E)}enableClick(){this.div.addEventListener("pointerdown",le(this,o)),this.div.addEventListener("pointerup",le(this,t))}disableClick(){this.div.removeEventListener("pointerdown",le(this,o)),this.div.removeEventListener("pointerup",le(this,t))}attach(E){le(this,$).set(E.id,E);const{annotationElementId:l}=E;l&&le(this,d).isDeletedAnnotationElement(l)&&le(this,d).removeDeletedAnnotationElement(E)}detach(E){var l;le(this,$).delete(E.id),(l=le(this,k))==null||l.removePointerInTextLayer(E.contentDiv),!le(this,T)&&E.annotationElementId&&le(this,d).addDeletedAnnotationElement(E)}remove(E){this.detach(E),le(this,d).removeEditor(E),E.div.contains(document.activeElement)&&setTimeout(()=>{le(this,d).focusMainContainer()},0),E.div.remove(),E.isAttachedToDOM=!1,le(this,I)||this.addInkEditorIfNeeded(!1)}changeParent(E){var l;E.parent!==this&&(E.annotationElementId&&(le(this,d).addDeletedAnnotationElement(E.annotationElementId),Pe.AnnotationEditor.deleteAnnotationElement(E),E.annotationElementId=null),this.attach(E),(l=E.parent)==null||l.detach(E),E.setParent(this),E.div&&E.isAttachedToDOM&&(E.div.remove(),this.div.append(E.div)))}add(E){if(this.changeParent(E),le(this,d).addEditor(E),this.attach(E),!E.isAttachedToDOM){const l=E.render();this.div.append(l),E.isAttachedToDOM=!0}E.fixAndSetPosition(),E.onceAdded(),le(this,d).addToAnnotationStorage(E)}moveEditorInDOM(E){var g;if(!E.isAttachedToDOM)return;const{activeElement:l}=document;E.div.contains(l)&&(E._focusEventsAllowed=!1,setTimeout(()=>{E.div.contains(document.activeElement)?E._focusEventsAllowed=!0:(E.div.addEventListener("focusin",()=>{E._focusEventsAllowed=!0},{once:!0}),l.focus())},0)),E._structTreeParentId=(g=le(this,k))==null?void 0:g.moveElementInDOM(this.div,E.div,E.contentDiv,!0)}addOrRebuild(E){E.needsToBeRebuilt()?E.rebuild():this.add(E)}addUndoableEditor(E){const l=()=>E._uiManager.rebuild(E),g=()=>{E.remove()};this.addCommands({cmd:l,undo:g,mustExec:!1})}getNextId(){return le(this,d).getId()}pasteEditor(E,l){le(this,d).updateToolbar(E),le(this,d).updateMode(E);const{offsetX:g,offsetY:N}=Me(this,v,Pi).call(this),s=this.getNextId(),u=Me(this,f,Oi).call(this,{parent:this,id:s,x:g,y:N,uiManager:le(this,d),isCentered:!0,...l});u&&this.add(u)}deserialize(E){switch(E.annotationType??E.annotationEditorType){case we.AnnotationEditorType.FREETEXT:return qe.FreeTextEditor.deserialize(E,this,le(this,d));case we.AnnotationEditorType.INK:return ke.InkEditor.deserialize(E,this,le(this,d));case we.AnnotationEditorType.STAMP:return ie.StampEditor.deserialize(E,this,le(this,d))}return null}addNewEditor(){Me(this,S,Bn).call(this,Me(this,v,Pi).call(this),!0)}setSelected(E){le(this,d).setSelected(E)}toggleSelected(E){le(this,d).toggleSelected(E)}isSelected(E){return le(this,d).isSelected(E)}unselect(E){le(this,d).unselect(E)}pointerup(E){const{isMac:l}=we.FeatureTest.platform;if(!(E.button!==0||E.ctrlKey&&l)&&E.target===this.div&&le(this,L)){if($e(this,L,!1),!le(this,R)){$e(this,R,!0);return}if(le(this,d).getMode()===we.AnnotationEditorType.STAMP){le(this,d).unselectAll();return}Me(this,S,Bn).call(this,E,!1)}}pointerdown(E){if(le(this,L)){$e(this,L,!1);return}const{isMac:l}=we.FeatureTest.platform;if(E.button!==0||E.ctrlKey&&l||E.target!==this.div)return;$e(this,L,!0);const g=le(this,d).getActive();$e(this,R,!g||g.isEmpty())}findNewParent(E,l,g){const N=le(this,d).findParent(l,g);return N===null||N===this?!1:(N.changeParent(E),!0)}destroy(){var E,l;((E=le(this,d).getActive())==null?void 0:E.parent)===this&&(le(this,d).commitOrRemove(),le(this,d).setActiveEditor(null));for(const g of le(this,$).values())(l=le(this,k))==null||l.removePointerInTextLayer(g.contentDiv),g.setParent(null),g.isAttachedToDOM=!1,g.div.remove();this.div=null,le(this,$).clear(),le(this,d).removeLayer(this)}render({viewport:E}){this.viewport=E,(0,P.setLayerDimensions)(this.div,E);for(const l of le(this,d).getEditors(this.pageIndex))this.add(l);this.updateMode()}update({viewport:E}){le(this,d).commitOrRemove(),this.viewport=E,(0,P.setLayerDimensions)(this.div,{rotation:E.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:E,pageHeight:l}=this.viewport.rawDims;return[E,l]}};k=new WeakMap,R=new WeakMap,e=new WeakMap,t=new WeakMap,o=new WeakMap,$=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,d=new WeakMap,f=new WeakSet,Oi=function(E){switch(le(this,d).getMode()){case we.AnnotationEditorType.FREETEXT:return new qe.FreeTextEditor(E);case we.AnnotationEditorType.INK:return new ke.InkEditor(E);case we.AnnotationEditorType.STAMP:return new ie.StampEditor(E)}return null},S=new WeakSet,Bn=function(E,l){const g=this.getNextId(),N=Me(this,f,Oi).call(this,{parent:this,id:g,x:E.offsetX,y:E.offsetY,uiManager:le(this,d),isCentered:l});return N&&this.add(N),N},v=new WeakSet,Pi=function(){const{x:E,y:l,width:g,height:N}=this.div.getBoundingClientRect(),s=Math.max(0,E),u=Math.max(0,l),F=Math.min(window.innerWidth,E+g),U=Math.min(window.innerHeight,l+N),O=(s+F)/2-E,m=(u+U)/2-l,[x,y]=this.viewport.rotation%180===0?[O,m]:[m,O];return{offsetX:x,offsetY:y}},M=new WeakSet,Mi=function(){$e(this,I,!0);for(const E of le(this,$).values())E.isEmpty()&&E.remove();$e(this,I,!1)},Rt(H,"_initialized",!1);let n=H;Ce.AnnotationEditorLayer=n},(at,Ce,Ve)=>{var ie,n,k,R,e,t,o,$,L,I,fa,d,ga,i,pa,w,kn,b,_i,_,ma,A,Ri;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.FreeTextEditor=void 0;var we=Ve(1),Pe=Ve(5),qe=Ve(4),ke=Ve(29);const l=class l extends qe.AnnotationEditor{constructor(s){super({...s,name:"freeTextEditor"});Ee(this,I);Ee(this,d);Ee(this,i);Ee(this,w);Ee(this,b);Ee(this,_);Ee(this,A);Ee(this,ie,this.editorDivBlur.bind(this));Ee(this,n,this.editorDivFocus.bind(this));Ee(this,k,this.editorDivInput.bind(this));Ee(this,R,this.editorDivKeydown.bind(this));Ee(this,e,void 0);Ee(this,t,"");Ee(this,o,`${this.id}-editor`);Ee(this,$,void 0);Ee(this,L,null);$e(this,e,s.color||l._defaultColor||qe.AnnotationEditor._defaultLineColor),$e(this,$,s.fontSize||l._defaultFontSize)}static get _keyboardManager(){const s=l.prototype,u=O=>O.isEmpty(),F=Pe.AnnotationEditorUIManager.TRANSLATE_SMALL,U=Pe.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,we.shadow)(this,"_keyboardManager",new Pe.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],s.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],s.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],s._translateEmpty,{args:[-F,0],checker:u}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],s._translateEmpty,{args:[-U,0],checker:u}],[["ArrowRight","mac+ArrowRight"],s._translateEmpty,{args:[F,0],checker:u}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],s._translateEmpty,{args:[U,0],checker:u}],[["ArrowUp","mac+ArrowUp"],s._translateEmpty,{args:[0,-F],checker:u}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],s._translateEmpty,{args:[0,-U],checker:u}],[["ArrowDown","mac+ArrowDown"],s._translateEmpty,{args:[0,F],checker:u}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],s._translateEmpty,{args:[0,U],checker:u}]]))}static initialize(s){qe.AnnotationEditor.initialize(s,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const u=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(u.getPropertyValue("--freetext-padding"))}static updateDefaultParams(s,u){switch(s){case we.AnnotationEditorParamsType.FREETEXT_SIZE:l._defaultFontSize=u;break;case we.AnnotationEditorParamsType.FREETEXT_COLOR:l._defaultColor=u;break}}updateParams(s,u){switch(s){case we.AnnotationEditorParamsType.FREETEXT_SIZE:Me(this,I,fa).call(this,u);break;case we.AnnotationEditorParamsType.FREETEXT_COLOR:Me(this,d,ga).call(this,u);break}}static get defaultPropertiesToUpdate(){return[[we.AnnotationEditorParamsType.FREETEXT_SIZE,l._defaultFontSize],[we.AnnotationEditorParamsType.FREETEXT_COLOR,l._defaultColor||qe.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[we.AnnotationEditorParamsType.FREETEXT_SIZE,le(this,$)],[we.AnnotationEditorParamsType.FREETEXT_COLOR,le(this,e)]]}_translateEmpty(s,u){this._uiManager.translateSelectedEditors(s,u,!0)}getInitialTranslation(){const s=this.parentScale;return[-l._internalPadding*s,-(l._internalPadding+le(this,$))*s]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(we.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",le(this,R)),this.editorDiv.addEventListener("focus",le(this,n)),this.editorDiv.addEventListener("blur",le(this,ie)),this.editorDiv.addEventListener("input",le(this,k)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",le(this,o)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",le(this,R)),this.editorDiv.removeEventListener("focus",le(this,n)),this.editorDiv.removeEventListener("blur",le(this,ie)),this.editorDiv.removeEventListener("input",le(this,k)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(s){this._focusEventsAllowed&&(super.focusin(s),s.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var s;if(this.width){Me(this,A,Ri).call(this);return}this.enableEditMode(),this.editorDiv.focus(),(s=this._initialOptions)!=null&&s.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const s=le(this,t),u=$e(this,t,Me(this,i,pa).call(this).trimEnd());if(s===u)return;const F=U=>{if($e(this,t,U),!U){this.remove();return}Me(this,b,_i).call(this),this._uiManager.rebuild(this),Me(this,w,kn).call(this)};this.addCommands({cmd:()=>{F(u)},undo:()=>{F(s)},mustExec:!1}),Me(this,w,kn).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(s){this.enterInEditMode()}keydown(s){s.target===this.div&&s.key==="Enter"&&(this.enterInEditMode(),s.preventDefault())}editorDivKeydown(s){l._keyboardManager.exec(this,s)}editorDivFocus(s){this.isEditing=!0}editorDivBlur(s){this.isEditing=!1}editorDivInput(s){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let s,u;this.width&&(s=this.x,u=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",le(this,o)),this.enableEditing(),qe.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(U=>{var O;return(O=this.editorDiv)==null?void 0:O.setAttribute("aria-label",U)}),qe.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(U=>{var O;return(O=this.editorDiv)==null?void 0:O.setAttribute("default-content",U)}),this.editorDiv.contentEditable=!0;const{style:F}=this.editorDiv;if(F.fontSize=`calc(${le(this,$)}px * var(--scale-factor))`,F.color=le(this,e),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,Pe.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[U,O]=this.parentDimensions;if(this.annotationElementId){const{position:m}=le(this,L);let[x,y]=this.getInitialTranslation();[x,y]=this.pageTranslationToScreen(x,y);const[r,p]=this.pageDimensions,[c,h]=this.pageTranslation;let C,D;switch(this.rotation){case 0:C=s+(m[0]-c)/r,D=u+this.height-(m[1]-h)/p;break;case 90:C=s+(m[0]-c)/r,D=u-(m[1]-h)/p,[x,y]=[y,-x];break;case 180:C=s-this.width+(m[0]-c)/r,D=u-(m[1]-h)/p,[x,y]=[-x,-y];break;case 270:C=s+(m[0]-c-this.height*p)/r,D=u+(m[1]-h-this.width*r)/p,[x,y]=[-y,x];break}this.setAt(C*U,D*O,x,y)}else this.setAt(s*U,u*O,this.width*U,this.height*O);Me(this,b,_i).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(s,u,F){let U=null;if(s instanceof ke.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:m,fontColor:x},rect:y,rotation:r,id:p},textContent:c,textPosition:h,parent:{page:{pageNumber:C}}}=s;if(!c||c.length===0)return null;U=s={annotationType:we.AnnotationEditorType.FREETEXT,color:Array.from(x),fontSize:m,value:c.join(`
`),position:h,pageIndex:C-1,rect:y,rotation:r,id:p,deleted:!1}}const O=super.deserialize(s,u,F);return $e(O,$,s.fontSize),$e(O,e,we.Util.makeHexColor(...s.color)),$e(O,t,s.value),O.annotationElementId=s.id||null,$e(O,L,U),O}serialize(s=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const u=l._internalPadding*this.parentScale,F=this.getRect(u,u),U=qe.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:le(this,e)),O={annotationType:we.AnnotationEditorType.FREETEXT,color:U,fontSize:le(this,$),value:le(this,t),pageIndex:this.pageIndex,rect:F,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return s?O:this.annotationElementId&&!Me(this,_,ma).call(this,O)?null:(O.id=this.annotationElementId,O)}};ie=new WeakMap,n=new WeakMap,k=new WeakMap,R=new WeakMap,e=new WeakMap,t=new WeakMap,o=new WeakMap,$=new WeakMap,L=new WeakMap,I=new WeakSet,fa=function(s){const u=U=>{this.editorDiv.style.fontSize=`calc(${U}px * var(--scale-factor))`,this.translate(0,-(U-le(this,$))*this.parentScale),$e(this,$,U),Me(this,w,kn).call(this)},F=le(this,$);this.addCommands({cmd:()=>{u(s)},undo:()=>{u(F)},mustExec:!0,type:we.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})},d=new WeakSet,ga=function(s){const u=le(this,e);this.addCommands({cmd:()=>{$e(this,e,this.editorDiv.style.color=s)},undo:()=>{$e(this,e,this.editorDiv.style.color=u)},mustExec:!0,type:we.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})},i=new WeakSet,pa=function(){const s=this.editorDiv.getElementsByTagName("div");if(s.length===0)return this.editorDiv.innerText;const u=[];for(const F of s)u.push(F.innerText.replace(/\r\n?|\n/,""));return u.join(`
`)},w=new WeakSet,kn=function(){const[s,u]=this.parentDimensions;let F;if(this.isAttachedToDOM)F=this.div.getBoundingClientRect();else{const{currentLayer:U,div:O}=this,m=O.style.display;O.style.display="hidden",U.div.append(this.div),F=O.getBoundingClientRect(),O.remove(),O.style.display=m}this.rotation%180===this.parentRotation%180?(this.width=F.width/s,this.height=F.height/u):(this.width=F.height/s,this.height=F.width/u),this.fixAndSetPosition()},b=new WeakSet,_i=function(){if(this.editorDiv.replaceChildren(),!!le(this,t))for(const s of le(this,t).split(`
`)){const u=document.createElement("div");u.append(s?document.createTextNode(s):document.createElement("br")),this.editorDiv.append(u)}},_=new WeakSet,ma=function(s){const{value:u,fontSize:F,color:U,rect:O,pageIndex:m}=le(this,L);return s.value!==u||s.fontSize!==F||s.rect.some((x,y)=>Math.abs(x-O[y])>=1)||s.color.some((x,y)=>x!==U[y])||s.pageIndex!==m},A=new WeakSet,Ri=function(s=!1){if(!this.annotationElementId)return;if(Me(this,w,kn).call(this),!s&&(this.width===0||this.height===0)){setTimeout(()=>Me(this,A,Ri).call(this,!0),0);return}const u=l._internalPadding*this.parentScale;le(this,L).rect=this.getRect(u,u)},Rt(l,"_freeTextDefaultContent",""),Rt(l,"_internalPadding",0),Rt(l,"_defaultColor",null),Rt(l,"_defaultFontSize",10),Rt(l,"_type","freetext");let P=l;Ce.FreeTextEditor=P},(at,Ce,Ve)=>{var y,p,an,h,xa,D,X,q,re,K,oe,J,te,B,j,Y,W,G,Q,ee,z,se,ne,ba,ae,$n,de,Di,ve,Li,ge,fe,xe,Te,Le,Ie,ue,Ni,De,Fe,je,Ue,ya,_e,Bi;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.StampAnnotationElement=Ce.InkAnnotationElement=Ce.FreeTextAnnotationElement=Ce.AnnotationLayer=void 0;var we=Ve(1),Pe=Ve(6),qe=Ve(3),ke=Ve(30),P=Ve(31),ie=Ve(32);const n=1e3,k=9,R=new WeakSet;function e(Je){return{width:Je[2]-Je[0],height:Je[3]-Je[1]}}class t{static create(be){switch(be.data.annotationType){case we.AnnotationType.LINK:return new $(be);case we.AnnotationType.TEXT:return new L(be);case we.AnnotationType.WIDGET:switch(be.data.fieldType){case"Tx":return new T(be);case"Btn":return be.data.radioButton?new i(be):be.data.checkBox?new f(be):new S(be);case"Ch":return new w(be);case"Sig":return new d(be)}return new I(be);case we.AnnotationType.POPUP:return new v(be);case we.AnnotationType.FREETEXT:return new M(be);case we.AnnotationType.LINE:return new _(be);case we.AnnotationType.SQUARE:return new H(be);case we.AnnotationType.CIRCLE:return new A(be);case we.AnnotationType.POLYLINE:return new E(be);case we.AnnotationType.CARET:return new g(be);case we.AnnotationType.INK:return new N(be);case we.AnnotationType.POLYGON:return new l(be);case we.AnnotationType.HIGHLIGHT:return new s(be);case we.AnnotationType.UNDERLINE:return new u(be);case we.AnnotationType.SQUIGGLY:return new F(be);case we.AnnotationType.STRIKEOUT:return new U(be);case we.AnnotationType.STAMP:return new O(be);case we.AnnotationType.FILEATTACHMENT:return new m(be);default:return new o(be)}}}const r=class r{constructor(be,{isRenderable:he=!1,ignoreBorder:ye=!1,createQuadrilaterals:Se=!1}={}){Ee(this,y,!1);this.isRenderable=he,this.data=be.data,this.layer=be.layer,this.linkService=be.linkService,this.downloadManager=be.downloadManager,this.imageResourcesPath=be.imageResourcesPath,this.renderForms=be.renderForms,this.svgFactory=be.svgFactory,this.annotationStorage=be.annotationStorage,this.enableScripting=be.enableScripting,this.hasJSActions=be.hasJSActions,this._fieldObjects=be.fieldObjects,this.parent=be.parent,he&&(this.container=this._createContainer(ye)),Se&&this._createQuadrilaterals()}static _hasPopupData({titleObj:be,contentsObj:he,richText:ye}){return!!(be!=null&&be.str||he!=null&&he.str||ye!=null&&ye.str)}get hasPopupData(){return r._hasPopupData(this.data)}_createContainer(be){const{data:he,parent:{page:ye,viewport:Se}}=this,Oe=document.createElement("section");Oe.setAttribute("data-annotation-id",he.id),this instanceof I||(Oe.tabIndex=n),Oe.style.zIndex=this.parent.zIndex++,this.data.popupRef&&Oe.setAttribute("aria-haspopup","dialog"),he.noRotate&&Oe.classList.add("norotate");const{pageWidth:Re,pageHeight:Ne,pageX:Ye,pageY:Ge}=Se.rawDims;if(!he.rect||this instanceof v){const{rotation:ut}=he;return!he.hasOwnCanvas&&ut!==0&&this.setRotation(ut,Oe),Oe}const{width:ze,height:Qe}=e(he.rect),tt=we.Util.normalizeRect([he.rect[0],ye.view[3]-he.rect[1]+ye.view[1],he.rect[2],ye.view[3]-he.rect[3]+ye.view[1]]);if(!be&&he.borderStyle.width>0){Oe.style.borderWidth=`${he.borderStyle.width}px`;const ut=he.borderStyle.horizontalCornerRadius,ot=he.borderStyle.verticalCornerRadius;if(ut>0||ot>0){const Et=`calc(${ut}px * var(--scale-factor)) / calc(${ot}px * var(--scale-factor))`;Oe.style.borderRadius=Et}else if(this instanceof i){const Et=`calc(${ze}px * var(--scale-factor)) / calc(${Qe}px * var(--scale-factor))`;Oe.style.borderRadius=Et}switch(he.borderStyle.style){case we.AnnotationBorderStyleType.SOLID:Oe.style.borderStyle="solid";break;case we.AnnotationBorderStyleType.DASHED:Oe.style.borderStyle="dashed";break;case we.AnnotationBorderStyleType.BEVELED:(0,we.warn)("Unimplemented border style: beveled");break;case we.AnnotationBorderStyleType.INSET:(0,we.warn)("Unimplemented border style: inset");break;case we.AnnotationBorderStyleType.UNDERLINE:Oe.style.borderBottomStyle="solid";break}const yt=he.borderColor||null;yt?($e(this,y,!0),Oe.style.borderColor=we.Util.makeHexColor(yt[0]|0,yt[1]|0,yt[2]|0)):Oe.style.borderWidth=0}Oe.style.left=`${100*(tt[0]-Ye)/Re}%`,Oe.style.top=`${100*(tt[1]-Ge)/Ne}%`;const{rotation:rt}=he;return he.hasOwnCanvas||rt===0?(Oe.style.width=`${100*ze/Re}%`,Oe.style.height=`${100*Qe/Ne}%`):this.setRotation(rt,Oe),Oe}setRotation(be,he=this.container){if(!this.data.rect)return;const{pageWidth:ye,pageHeight:Se}=this.parent.viewport.rawDims,{width:Oe,height:Re}=e(this.data.rect);let Ne,Ye;be%180===0?(Ne=100*Oe/ye,Ye=100*Re/Se):(Ne=100*Re/ye,Ye=100*Oe/Se),he.style.width=`${Ne}%`,he.style.height=`${Ye}%`,he.setAttribute("data-main-rotation",(360-be)%360)}get _commonActions(){const be=(he,ye,Se)=>{const Oe=Se.detail[he],Re=Oe[0],Ne=Oe.slice(1);Se.target.style[ye]=ke.ColorConverters[`${Re}_HTML`](Ne),this.annotationStorage.setValue(this.data.id,{[ye]:ke.ColorConverters[`${Re}_rgb`](Ne)})};return(0,we.shadow)(this,"_commonActions",{display:he=>{const{display:ye}=he.detail,Se=ye%2===1;this.container.style.visibility=Se?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:Se,noPrint:ye===1||ye===2})},print:he=>{this.annotationStorage.setValue(this.data.id,{noPrint:!he.detail.print})},hidden:he=>{const{hidden:ye}=he.detail;this.container.style.visibility=ye?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:ye,noView:ye})},focus:he=>{setTimeout(()=>he.target.focus({preventScroll:!1}),0)},userName:he=>{he.target.title=he.detail.userName},readonly:he=>{he.target.disabled=he.detail.readonly},required:he=>{this._setRequired(he.target,he.detail.required)},bgColor:he=>{be("bgColor","backgroundColor",he)},fillColor:he=>{be("fillColor","backgroundColor",he)},fgColor:he=>{be("fgColor","color",he)},textColor:he=>{be("textColor","color",he)},borderColor:he=>{be("borderColor","borderColor",he)},strokeColor:he=>{be("strokeColor","borderColor",he)},rotation:he=>{const ye=he.detail.rotation;this.setRotation(ye),this.annotationStorage.setValue(this.data.id,{rotation:ye})}})}_dispatchEventFromSandbox(be,he){const ye=this._commonActions;for(const Se of Object.keys(he.detail)){const Oe=be[Se]||ye[Se];Oe==null||Oe(he)}}_setDefaultPropertiesFromJS(be){if(!this.enableScripting)return;const he=this.annotationStorage.getRawValue(this.data.id);if(!he)return;const ye=this._commonActions;for(const[Se,Oe]of Object.entries(he)){const Re=ye[Se];if(Re){const Ne={detail:{[Se]:Oe},target:be};Re(Ne),delete he[Se]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:be}=this.data;if(!be)return;const[he,ye,Se,Oe]=this.data.rect;if(be.length===1){const[,{x:ot,y:yt},{x:Et,y:We}]=be[0];if(Se===ot&&Oe===yt&&he===Et&&ye===We)return}const{style:Re}=this.container;let Ne;if(le(this,y)){const{borderColor:ot,borderWidth:yt}=Re;Re.borderWidth=0,Ne=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${ot}" stroke-width="${yt}">`],this.container.classList.add("hasBorder")}const Ye=Se-he,Ge=Oe-ye,{svgFactory:ze}=this,Qe=ze.createElement("svg");Qe.classList.add("quadrilateralsContainer"),Qe.setAttribute("width",0),Qe.setAttribute("height",0);const tt=ze.createElement("defs");Qe.append(tt);const rt=ze.createElement("clipPath"),ut=`clippath_${this.data.id}`;rt.setAttribute("id",ut),rt.setAttribute("clipPathUnits","objectBoundingBox"),tt.append(rt);for(const[,{x:ot,y:yt},{x:Et,y:We}]of be){const Xe=ze.createElement("rect"),Ze=(Et-he)/Ye,it=(Oe-yt)/Ge,ct=(ot-Et)/Ye,xt=(yt-We)/Ge;Xe.setAttribute("x",Ze),Xe.setAttribute("y",it),Xe.setAttribute("width",ct),Xe.setAttribute("height",xt),rt.append(Xe),Ne==null||Ne.push(`<rect vector-effect="non-scaling-stroke" x="${Ze}" y="${it}" width="${ct}" height="${xt}"/>`)}le(this,y)&&(Ne.push("</g></svg>')"),Re.backgroundImage=Ne.join("")),this.container.append(Qe),this.container.style.clipPath=`url(#${ut})`}_createPopup(){const{container:be,data:he}=this;be.setAttribute("aria-haspopup","dialog");const ye=new v({data:{color:he.color,titleObj:he.titleObj,modificationDate:he.modificationDate,contentsObj:he.contentsObj,richText:he.richText,parentRect:he.rect,borderStyle:0,id:`popup_${he.id}`,rotation:he.rotation},parent:this.parent,elements:[this]});this.parent.div.append(ye.render())}render(){(0,we.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(be,he=null){const ye=[];if(this._fieldObjects){const Se=this._fieldObjects[be];if(Se)for(const{page:Oe,id:Re,exportValues:Ne}of Se){if(Oe===-1||Re===he)continue;const Ye=typeof Ne=="string"?Ne:null,Ge=document.querySelector(`[data-element-id="${Re}"]`);if(Ge&&!R.has(Ge)){(0,we.warn)(`_getElementsByName - element not allowed: ${Re}`);continue}ye.push({id:Re,exportValue:Ye,domElement:Ge})}return ye}for(const Se of document.getElementsByName(be)){const{exportValue:Oe}=Se,Re=Se.getAttribute("data-element-id");Re!==he&&R.has(Se)&&ye.push({id:Re,exportValue:Oe,domElement:Se})}return ye}show(){var be;this.container&&(this.container.hidden=!1),(be=this.popup)==null||be.maybeShow()}hide(){var be;this.container&&(this.container.hidden=!0),(be=this.popup)==null||be.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const be=this.getElementsToTriggerPopup();if(Array.isArray(be))for(const he of be)he.classList.add("highlightArea");else be.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:be,data:{id:he}}=this;this.container.addEventListener("dblclick",()=>{var ye;(ye=this.linkService.eventBus)==null||ye.dispatch("switchannotationeditormode",{source:this,mode:be,editId:he})})}};y=new WeakMap;let o=r;class $ extends o{constructor(he,ye=null){super(he,{isRenderable:!0,ignoreBorder:!!(ye!=null&&ye.ignoreBorder),createQuadrilaterals:!0});Ee(this,p);Ee(this,h);this.isTooltipOnly=he.data.isTooltipOnly}render(){const{data:he,linkService:ye}=this,Se=document.createElement("a");Se.setAttribute("data-element-id",he.id);let Oe=!1;return he.url?(ye.addLinkAttributes(Se,he.url,he.newWindow),Oe=!0):he.action?(this._bindNamedAction(Se,he.action),Oe=!0):he.attachment?(this._bindAttachment(Se,he.attachment),Oe=!0):he.setOCGState?(Me(this,h,xa).call(this,Se,he.setOCGState),Oe=!0):he.dest?(this._bindLink(Se,he.dest),Oe=!0):(he.actions&&(he.actions.Action||he.actions["Mouse Up"]||he.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(Se,he),Oe=!0),he.resetForm?(this._bindResetFormAction(Se,he.resetForm),Oe=!0):this.isTooltipOnly&&!Oe&&(this._bindLink(Se,""),Oe=!0)),this.container.classList.add("linkAnnotation"),Oe&&this.container.append(Se),this.container}_bindLink(he,ye){he.href=this.linkService.getDestinationHash(ye),he.onclick=()=>(ye&&this.linkService.goToDestination(ye),!1),(ye||ye==="")&&Me(this,p,an).call(this)}_bindNamedAction(he,ye){he.href=this.linkService.getAnchorUrl(""),he.onclick=()=>(this.linkService.executeNamedAction(ye),!1),Me(this,p,an).call(this)}_bindAttachment(he,ye){he.href=this.linkService.getAnchorUrl(""),he.onclick=()=>{var Se;return(Se=this.downloadManager)==null||Se.openOrDownloadData(this.container,ye.content,ye.filename),!1},Me(this,p,an).call(this)}_bindJSAction(he,ye){he.href=this.linkService.getAnchorUrl("");const Se=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const Oe of Object.keys(ye.actions)){const Re=Se.get(Oe);Re&&(he[Re]=()=>{var Ne;return(Ne=this.linkService.eventBus)==null||Ne.dispatch("dispatcheventinsandbox",{source:this,detail:{id:ye.id,name:Oe}}),!1})}he.onclick||(he.onclick=()=>!1),Me(this,p,an).call(this)}_bindResetFormAction(he,ye){const Se=he.onclick;if(Se||(he.href=this.linkService.getAnchorUrl("")),Me(this,p,an).call(this),!this._fieldObjects){(0,we.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),Se||(he.onclick=()=>!1);return}he.onclick=()=>{var Qe;Se==null||Se();const{fields:Oe,refs:Re,include:Ne}=ye,Ye=[];if(Oe.length!==0||Re.length!==0){const tt=new Set(Re);for(const rt of Oe){const ut=this._fieldObjects[rt]||[];for(const{id:ot}of ut)tt.add(ot)}for(const rt of Object.values(this._fieldObjects))for(const ut of rt)tt.has(ut.id)===Ne&&Ye.push(ut)}else for(const tt of Object.values(this._fieldObjects))Ye.push(...tt);const Ge=this.annotationStorage,ze=[];for(const tt of Ye){const{id:rt}=tt;switch(ze.push(rt),tt.type){case"text":{const ot=tt.defaultValue||"";Ge.setValue(rt,{value:ot});break}case"checkbox":case"radiobutton":{const ot=tt.defaultValue===tt.exportValues;Ge.setValue(rt,{value:ot});break}case"combobox":case"listbox":{const ot=tt.defaultValue||"";Ge.setValue(rt,{value:ot});break}default:continue}const ut=document.querySelector(`[data-element-id="${rt}"]`);if(ut){if(!R.has(ut)){(0,we.warn)(`_bindResetFormAction - element not allowed: ${rt}`);continue}}else continue;ut.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((Qe=this.linkService.eventBus)==null||Qe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:ze,name:"ResetForm"}})),!1}}}p=new WeakSet,an=function(){this.container.setAttribute("data-internal-link","")},h=new WeakSet,xa=function(he,ye){he.href=this.linkService.getAnchorUrl(""),he.onclick=()=>(this.linkService.executeSetOCGState(ye),!1),Me(this,p,an).call(this)};class L extends o{constructor(be){super(be,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const be=document.createElement("img");return be.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",be.alt="[{{type}} Annotation]",be.dataset.l10nId="text_annotation_type",be.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(be),this.container}}class I extends o{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(be){var he;this.data.hasOwnCanvas&&(((he=be.previousSibling)==null?void 0:he.nodeName)==="CANVAS"&&(be.previousSibling.hidden=!0),be.hidden=!1)}_getKeyModifier(be){const{isWin:he,isMac:ye}=we.FeatureTest.platform;return he&&be.ctrlKey||ye&&be.metaKey}_setEventListener(be,he,ye,Se,Oe){ye.includes("mouse")?be.addEventListener(ye,Re=>{var Ne;(Ne=this.linkService.eventBus)==null||Ne.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:Se,value:Oe(Re),shift:Re.shiftKey,modifier:this._getKeyModifier(Re)}})}):be.addEventListener(ye,Re=>{var Ne;if(ye==="blur"){if(!he.focused||!Re.relatedTarget)return;he.focused=!1}else if(ye==="focus"){if(he.focused)return;he.focused=!0}Oe&&((Ne=this.linkService.eventBus)==null||Ne.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:Se,value:Oe(Re)}}))})}_setEventListeners(be,he,ye,Se){var Oe,Re,Ne;for(const[Ye,Ge]of ye)(Ge==="Action"||(Oe=this.data.actions)!=null&&Oe[Ge])&&((Ge==="Focus"||Ge==="Blur")&&(he||(he={focused:!1})),this._setEventListener(be,he,Ye,Ge,Se),Ge==="Focus"&&!((Re=this.data.actions)!=null&&Re.Blur)?this._setEventListener(be,he,"blur","Blur",null):Ge==="Blur"&&!((Ne=this.data.actions)!=null&&Ne.Focus)&&this._setEventListener(be,he,"focus","Focus",null))}_setBackgroundColor(be){const he=this.data.backgroundColor||null;be.style.backgroundColor=he===null?"transparent":we.Util.makeHexColor(he[0],he[1],he[2])}_setTextStyle(be){const he=["left","center","right"],{fontColor:ye}=this.data.defaultAppearanceData,Se=this.data.defaultAppearanceData.fontSize||k,Oe=be.style;let Re;const Ne=2,Ye=Ge=>Math.round(10*Ge)/10;if(this.data.multiLine){const Ge=Math.abs(this.data.rect[3]-this.data.rect[1]-Ne),ze=Math.round(Ge/(we.LINE_FACTOR*Se))||1,Qe=Ge/ze;Re=Math.min(Se,Ye(Qe/we.LINE_FACTOR))}else{const Ge=Math.abs(this.data.rect[3]-this.data.rect[1]-Ne);Re=Math.min(Se,Ye(Ge/we.LINE_FACTOR))}Oe.fontSize=`calc(${Re}px * var(--scale-factor))`,Oe.color=we.Util.makeHexColor(ye[0],ye[1],ye[2]),this.data.textAlignment!==null&&(Oe.textAlign=he[this.data.textAlignment])}_setRequired(be,he){he?be.setAttribute("required",!0):be.removeAttribute("required"),be.setAttribute("aria-required",he)}}class T extends I{constructor(be){const he=be.renderForms||!be.data.hasAppearance&&!!be.data.fieldValue;super(be,{isRenderable:he})}setPropertyOnSiblings(be,he,ye,Se){const Oe=this.annotationStorage;for(const Re of this._getElementsByName(be.name,be.id))Re.domElement&&(Re.domElement[he]=ye),Oe.setValue(Re.id,{[Se]:ye})}render(){var Se,Oe;const be=this.annotationStorage,he=this.data.id;this.container.classList.add("textWidgetAnnotation");let ye=null;if(this.renderForms){const Re=be.getValue(he,{value:this.data.fieldValue});let Ne=Re.value||"";const Ye=be.getValue(he,{charLimit:this.data.maxLen}).charLimit;Ye&&Ne.length>Ye&&(Ne=Ne.slice(0,Ye));let Ge=Re.formattedValue||((Se=this.data.textContent)==null?void 0:Se.join(`
`))||null;Ge&&this.data.comb&&(Ge=Ge.replaceAll(/\s+/g,""));const ze={userValue:Ne,formattedValue:Ge,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(ye=document.createElement("textarea"),ye.textContent=Ge??Ne,this.data.doNotScroll&&(ye.style.overflowY="hidden")):(ye=document.createElement("input"),ye.type="text",ye.setAttribute("value",Ge??Ne),this.data.doNotScroll&&(ye.style.overflowX="hidden")),this.data.hasOwnCanvas&&(ye.hidden=!0),R.add(ye),ye.setAttribute("data-element-id",he),ye.disabled=this.data.readOnly,ye.name=this.data.fieldName,ye.tabIndex=n,this._setRequired(ye,this.data.required),Ye&&(ye.maxLength=Ye),ye.addEventListener("input",tt=>{be.setValue(he,{value:tt.target.value}),this.setPropertyOnSiblings(ye,"value",tt.target.value,"value"),ze.formattedValue=null}),ye.addEventListener("resetform",tt=>{const rt=this.data.defaultFieldValue??"";ye.value=ze.userValue=rt,ze.formattedValue=null});let Qe=tt=>{const{formattedValue:rt}=ze;rt!=null&&(tt.target.value=rt),tt.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){ye.addEventListener("focus",rt=>{if(ze.focused)return;const{target:ut}=rt;ze.userValue&&(ut.value=ze.userValue),ze.lastCommittedValue=ut.value,ze.commitKey=1,ze.focused=!0}),ye.addEventListener("updatefromsandbox",rt=>{this.showElementAndHideCanvas(rt.target);const ut={value(ot){ze.userValue=ot.detail.value??"",be.setValue(he,{value:ze.userValue.toString()}),ot.target.value=ze.userValue},formattedValue(ot){const{formattedValue:yt}=ot.detail;ze.formattedValue=yt,yt!=null&&ot.target!==document.activeElement&&(ot.target.value=yt),be.setValue(he,{formattedValue:yt})},selRange(ot){ot.target.setSelectionRange(...ot.detail.selRange)},charLimit:ot=>{var Xe;const{charLimit:yt}=ot.detail,{target:Et}=ot;if(yt===0){Et.removeAttribute("maxLength");return}Et.setAttribute("maxLength",yt);let We=ze.userValue;!We||We.length<=yt||(We=We.slice(0,yt),Et.value=ze.userValue=We,be.setValue(he,{value:We}),(Xe=this.linkService.eventBus)==null||Xe.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he,name:"Keystroke",value:We,willCommit:!0,commitKey:1,selStart:Et.selectionStart,selEnd:Et.selectionEnd}}))}};this._dispatchEventFromSandbox(ut,rt)}),ye.addEventListener("keydown",rt=>{var yt;ze.commitKey=1;let ut=-1;if(rt.key==="Escape"?ut=0:rt.key==="Enter"&&!this.data.multiLine?ut=2:rt.key==="Tab"&&(ze.commitKey=3),ut===-1)return;const{value:ot}=rt.target;ze.lastCommittedValue!==ot&&(ze.lastCommittedValue=ot,ze.userValue=ot,(yt=this.linkService.eventBus)==null||yt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he,name:"Keystroke",value:ot,willCommit:!0,commitKey:ut,selStart:rt.target.selectionStart,selEnd:rt.target.selectionEnd}}))});const tt=Qe;Qe=null,ye.addEventListener("blur",rt=>{var ot;if(!ze.focused||!rt.relatedTarget)return;ze.focused=!1;const{value:ut}=rt.target;ze.userValue=ut,ze.lastCommittedValue!==ut&&((ot=this.linkService.eventBus)==null||ot.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he,name:"Keystroke",value:ut,willCommit:!0,commitKey:ze.commitKey,selStart:rt.target.selectionStart,selEnd:rt.target.selectionEnd}})),tt(rt)}),(Oe=this.data.actions)!=null&&Oe.Keystroke&&ye.addEventListener("beforeinput",rt=>{var it;ze.lastCommittedValue=null;const{data:ut,target:ot}=rt,{value:yt,selectionStart:Et,selectionEnd:We}=ot;let Xe=Et,Ze=We;switch(rt.inputType){case"deleteWordBackward":{const ct=yt.substring(0,Et).match(/\w*[^\w]*$/);ct&&(Xe-=ct[0].length);break}case"deleteWordForward":{const ct=yt.substring(Et).match(/^[^\w]*\w*/);ct&&(Ze+=ct[0].length);break}case"deleteContentBackward":Et===We&&(Xe-=1);break;case"deleteContentForward":Et===We&&(Ze+=1);break}rt.preventDefault(),(it=this.linkService.eventBus)==null||it.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he,name:"Keystroke",value:yt,change:ut||"",willCommit:!1,selStart:Xe,selEnd:Ze}})}),this._setEventListeners(ye,ze,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],rt=>rt.target.value)}if(Qe&&ye.addEventListener("blur",Qe),this.data.comb){const rt=(this.data.rect[2]-this.data.rect[0])/Ye;ye.classList.add("comb"),ye.style.letterSpacing=`calc(${rt}px * var(--scale-factor) - 1ch)`}}else ye=document.createElement("div"),ye.textContent=this.data.fieldValue,ye.style.verticalAlign="middle",ye.style.display="table-cell";return this._setTextStyle(ye),this._setBackgroundColor(ye),this._setDefaultPropertiesFromJS(ye),this.container.append(ye),this.container}}class d extends I{constructor(be){super(be,{isRenderable:!!be.data.hasOwnCanvas})}}class f extends I{constructor(be){super(be,{isRenderable:be.renderForms})}render(){const be=this.annotationStorage,he=this.data,ye=he.id;let Se=be.getValue(ye,{value:he.exportValue===he.fieldValue}).value;typeof Se=="string"&&(Se=Se!=="Off",be.setValue(ye,{value:Se})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const Oe=document.createElement("input");return R.add(Oe),Oe.setAttribute("data-element-id",ye),Oe.disabled=he.readOnly,this._setRequired(Oe,this.data.required),Oe.type="checkbox",Oe.name=he.fieldName,Se&&Oe.setAttribute("checked",!0),Oe.setAttribute("exportValue",he.exportValue),Oe.tabIndex=n,Oe.addEventListener("change",Re=>{const{name:Ne,checked:Ye}=Re.target;for(const Ge of this._getElementsByName(Ne,ye)){const ze=Ye&&Ge.exportValue===he.exportValue;Ge.domElement&&(Ge.domElement.checked=ze),be.setValue(Ge.id,{value:ze})}be.setValue(ye,{value:Ye})}),Oe.addEventListener("resetform",Re=>{const Ne=he.defaultFieldValue||"Off";Re.target.checked=Ne===he.exportValue}),this.enableScripting&&this.hasJSActions&&(Oe.addEventListener("updatefromsandbox",Re=>{const Ne={value(Ye){Ye.target.checked=Ye.detail.value!=="Off",be.setValue(ye,{value:Ye.target.checked})}};this._dispatchEventFromSandbox(Ne,Re)}),this._setEventListeners(Oe,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Re=>Re.target.checked)),this._setBackgroundColor(Oe),this._setDefaultPropertiesFromJS(Oe),this.container.append(Oe),this.container}}class i extends I{constructor(be){super(be,{isRenderable:be.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const be=this.annotationStorage,he=this.data,ye=he.id;let Se=be.getValue(ye,{value:he.fieldValue===he.buttonValue}).value;typeof Se=="string"&&(Se=Se!==he.buttonValue,be.setValue(ye,{value:Se}));const Oe=document.createElement("input");if(R.add(Oe),Oe.setAttribute("data-element-id",ye),Oe.disabled=he.readOnly,this._setRequired(Oe,this.data.required),Oe.type="radio",Oe.name=he.fieldName,Se&&Oe.setAttribute("checked",!0),Oe.tabIndex=n,Oe.addEventListener("change",Re=>{const{name:Ne,checked:Ye}=Re.target;for(const Ge of this._getElementsByName(Ne,ye))be.setValue(Ge.id,{value:!1});be.setValue(ye,{value:Ye})}),Oe.addEventListener("resetform",Re=>{const Ne=he.defaultFieldValue;Re.target.checked=Ne!=null&&Ne===he.buttonValue}),this.enableScripting&&this.hasJSActions){const Re=he.buttonValue;Oe.addEventListener("updatefromsandbox",Ne=>{const Ye={value:Ge=>{const ze=Re===Ge.detail.value;for(const Qe of this._getElementsByName(Ge.target.name)){const tt=ze&&Qe.id===ye;Qe.domElement&&(Qe.domElement.checked=tt),be.setValue(Qe.id,{value:tt})}}};this._dispatchEventFromSandbox(Ye,Ne)}),this._setEventListeners(Oe,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],Ne=>Ne.target.checked)}return this._setBackgroundColor(Oe),this._setDefaultPropertiesFromJS(Oe),this.container.append(Oe),this.container}}class S extends ${constructor(be){super(be,{ignoreBorder:be.data.hasAppearance})}render(){const be=super.render();be.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(be.title=this.data.alternativeText);const he=be.lastChild;return this.enableScripting&&this.hasJSActions&&he&&(this._setDefaultPropertiesFromJS(he),he.addEventListener("updatefromsandbox",ye=>{this._dispatchEventFromSandbox({},ye)})),be}}class w extends I{constructor(be){super(be,{isRenderable:be.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const be=this.annotationStorage,he=this.data.id,ye=be.getValue(he,{value:this.data.fieldValue}),Se=document.createElement("select");R.add(Se),Se.setAttribute("data-element-id",he),Se.disabled=this.data.readOnly,this._setRequired(Se,this.data.required),Se.name=this.data.fieldName,Se.tabIndex=n;let Oe=this.data.combo&&this.data.options.length>0;this.data.combo||(Se.size=this.data.options.length,this.data.multiSelect&&(Se.multiple=!0)),Se.addEventListener("resetform",ze=>{const Qe=this.data.defaultFieldValue;for(const tt of Se.options)tt.selected=tt.value===Qe});for(const ze of this.data.options){const Qe=document.createElement("option");Qe.textContent=ze.displayValue,Qe.value=ze.exportValue,ye.value.includes(ze.exportValue)&&(Qe.setAttribute("selected",!0),Oe=!1),Se.append(Qe)}let Re=null;if(Oe){const ze=document.createElement("option");ze.value=" ",ze.setAttribute("hidden",!0),ze.setAttribute("selected",!0),Se.prepend(ze),Re=()=>{ze.remove(),Se.removeEventListener("input",Re),Re=null},Se.addEventListener("input",Re)}const Ne=ze=>{const Qe=ze?"value":"textContent",{options:tt,multiple:rt}=Se;return rt?Array.prototype.filter.call(tt,ut=>ut.selected).map(ut=>ut[Qe]):tt.selectedIndex===-1?null:tt[tt.selectedIndex][Qe]};let Ye=Ne(!1);const Ge=ze=>{const Qe=ze.target.options;return Array.prototype.map.call(Qe,tt=>({displayValue:tt.textContent,exportValue:tt.value}))};return this.enableScripting&&this.hasJSActions?(Se.addEventListener("updatefromsandbox",ze=>{const Qe={value(tt){Re==null||Re();const rt=tt.detail.value,ut=new Set(Array.isArray(rt)?rt:[rt]);for(const ot of Se.options)ot.selected=ut.has(ot.value);be.setValue(he,{value:Ne(!0)}),Ye=Ne(!1)},multipleSelection(tt){Se.multiple=!0},remove(tt){const rt=Se.options,ut=tt.detail.remove;rt[ut].selected=!1,Se.remove(ut),rt.length>0&&Array.prototype.findIndex.call(rt,yt=>yt.selected)===-1&&(rt[0].selected=!0),be.setValue(he,{value:Ne(!0),items:Ge(tt)}),Ye=Ne(!1)},clear(tt){for(;Se.length!==0;)Se.remove(0);be.setValue(he,{value:null,items:[]}),Ye=Ne(!1)},insert(tt){const{index:rt,displayValue:ut,exportValue:ot}=tt.detail.insert,yt=Se.children[rt],Et=document.createElement("option");Et.textContent=ut,Et.value=ot,yt?yt.before(Et):Se.append(Et),be.setValue(he,{value:Ne(!0),items:Ge(tt)}),Ye=Ne(!1)},items(tt){const{items:rt}=tt.detail;for(;Se.length!==0;)Se.remove(0);for(const ut of rt){const{displayValue:ot,exportValue:yt}=ut,Et=document.createElement("option");Et.textContent=ot,Et.value=yt,Se.append(Et)}Se.options.length>0&&(Se.options[0].selected=!0),be.setValue(he,{value:Ne(!0),items:Ge(tt)}),Ye=Ne(!1)},indices(tt){const rt=new Set(tt.detail.indices);for(const ut of tt.target.options)ut.selected=rt.has(ut.index);be.setValue(he,{value:Ne(!0)}),Ye=Ne(!1)},editable(tt){tt.target.disabled=!tt.detail.editable}};this._dispatchEventFromSandbox(Qe,ze)}),Se.addEventListener("input",ze=>{var tt;const Qe=Ne(!0);be.setValue(he,{value:Qe}),ze.preventDefault(),(tt=this.linkService.eventBus)==null||tt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:he,name:"Keystroke",value:Ye,changeEx:Qe,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(Se,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],ze=>ze.target.value)):Se.addEventListener("input",function(ze){be.setValue(he,{value:Ne(!0)})}),this.data.combo&&this._setTextStyle(Se),this._setBackgroundColor(Se),this._setDefaultPropertiesFromJS(Se),this.container.append(Se),this.container}}class v extends o{constructor(be){const{data:he,elements:ye}=be;super(be,{isRenderable:o._hasPopupData(he)}),this.elements=ye}render(){this.container.classList.add("popupAnnotation");const be=new b({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),he=[];for(const ye of this.elements)ye.popup=be,he.push(ye.data.id),ye.addHighlightArea();return this.container.setAttribute("aria-controls",he.map(ye=>`${we.AnnotationPrefix}${ye}`).join(",")),this.container}}class b{constructor({container:be,color:he,elements:ye,titleObj:Se,modificationDate:Oe,contentsObj:Re,richText:Ne,parent:Ye,rect:Ge,parentRect:ze,open:Qe}){Ee(this,ne);Ee(this,ae);Ee(this,de);Ee(this,ve);Ee(this,D,null);Ee(this,X,Me(this,ne,ba).bind(this));Ee(this,q,Me(this,ve,Li).bind(this));Ee(this,re,Me(this,de,Di).bind(this));Ee(this,K,Me(this,ae,$n).bind(this));Ee(this,oe,null);Ee(this,J,null);Ee(this,te,null);Ee(this,B,null);Ee(this,j,null);Ee(this,Y,null);Ee(this,W,!1);Ee(this,G,null);Ee(this,Q,null);Ee(this,ee,null);Ee(this,z,null);Ee(this,se,!1);var rt;$e(this,J,be),$e(this,z,Se),$e(this,te,Re),$e(this,ee,Ne),$e(this,j,Ye),$e(this,oe,he),$e(this,Q,Ge),$e(this,Y,ze),$e(this,B,ye);const tt=Pe.PDFDateString.toDateObject(Oe);tt&&$e(this,D,Ye.l10n.get("annotation_date_string",{date:tt.toLocaleDateString(),time:tt.toLocaleTimeString()})),this.trigger=ye.flatMap(ut=>ut.getElementsToTriggerPopup());for(const ut of this.trigger)ut.addEventListener("click",le(this,K)),ut.addEventListener("mouseenter",le(this,re)),ut.addEventListener("mouseleave",le(this,q)),ut.classList.add("popupTriggerArea");for(const ut of ye)(rt=ut.container)==null||rt.addEventListener("keydown",le(this,X));le(this,J).hidden=!0,Qe&&Me(this,ae,$n).call(this)}render(){if(le(this,G))return;const{page:{view:be},viewport:{rawDims:{pageWidth:he,pageHeight:ye,pageX:Se,pageY:Oe}}}=le(this,j),Re=$e(this,G,document.createElement("div"));if(Re.className="popup",le(this,oe)){const Xe=Re.style.outlineColor=we.Util.makeHexColor(...le(this,oe));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Re.style.backgroundColor=`color-mix(in srgb, ${Xe} 30%, white)`:Re.style.backgroundColor=we.Util.makeHexColor(...le(this,oe).map(it=>Math.floor(.7*(255-it)+it)))}const Ne=document.createElement("span");Ne.className="header";const Ye=document.createElement("h1");if(Ne.append(Ye),{dir:Ye.dir,str:Ye.textContent}=le(this,z),Re.append(Ne),le(this,D)){const Xe=document.createElement("span");Xe.classList.add("popupDate"),le(this,D).then(Ze=>{Xe.textContent=Ze}),Ne.append(Xe)}const Ge=le(this,te),ze=le(this,ee);if(ze!=null&&ze.str&&(!(Ge!=null&&Ge.str)||Ge.str===ze.str))ie.XfaLayer.render({xfaHtml:ze.html,intent:"richText",div:Re}),Re.lastChild.classList.add("richText","popupContent");else{const Xe=this._formatContents(Ge);Re.append(Xe)}let Qe=!!le(this,Y),tt=Qe?le(this,Y):le(this,Q);for(const Xe of le(this,B))if(!tt||we.Util.intersect(Xe.data.rect,tt)!==null){tt=Xe.data.rect,Qe=!0;break}const rt=we.Util.normalizeRect([tt[0],be[3]-tt[1]+be[1],tt[2],be[3]-tt[3]+be[1]]),ut=5,ot=Qe?tt[2]-tt[0]+ut:0,yt=rt[0]+ot,Et=rt[1],{style:We}=le(this,J);We.left=`${100*(yt-Se)/he}%`,We.top=`${100*(Et-Oe)/ye}%`,le(this,J).append(Re)}_formatContents({str:be,dir:he}){const ye=document.createElement("p");ye.classList.add("popupContent"),ye.dir=he;const Se=be.split(/(?:\r\n?|\n)/);for(let Oe=0,Re=Se.length;Oe<Re;++Oe){const Ne=Se[Oe];ye.append(document.createTextNode(Ne)),Oe<Re-1&&ye.append(document.createElement("br"))}return ye}forceHide(){$e(this,se,this.isVisible),le(this,se)&&(le(this,J).hidden=!0)}maybeShow(){le(this,se)&&($e(this,se,!1),le(this,J).hidden=!1)}get isVisible(){return le(this,J).hidden===!1}}D=new WeakMap,X=new WeakMap,q=new WeakMap,re=new WeakMap,K=new WeakMap,oe=new WeakMap,J=new WeakMap,te=new WeakMap,B=new WeakMap,j=new WeakMap,Y=new WeakMap,W=new WeakMap,G=new WeakMap,Q=new WeakMap,ee=new WeakMap,z=new WeakMap,se=new WeakMap,ne=new WeakSet,ba=function(be){be.altKey||be.shiftKey||be.ctrlKey||be.metaKey||(be.key==="Enter"||be.key==="Escape"&&le(this,W))&&Me(this,ae,$n).call(this)},ae=new WeakSet,$n=function(){$e(this,W,!le(this,W)),le(this,W)?(Me(this,de,Di).call(this),le(this,J).addEventListener("click",le(this,K)),le(this,J).addEventListener("keydown",le(this,X))):(Me(this,ve,Li).call(this),le(this,J).removeEventListener("click",le(this,K)),le(this,J).removeEventListener("keydown",le(this,X)))},de=new WeakSet,Di=function(){le(this,G)||this.render(),this.isVisible?le(this,W)&&le(this,J).classList.add("focused"):(le(this,J).hidden=!1,le(this,J).style.zIndex=parseInt(le(this,J).style.zIndex)+1e3)},ve=new WeakSet,Li=function(){le(this,J).classList.remove("focused"),!(le(this,W)||!this.isVisible)&&(le(this,J).hidden=!0,le(this,J).style.zIndex=parseInt(le(this,J).style.zIndex)-1e3)};class M extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0}),this.textContent=be.data.textContent,this.textPosition=be.data.textPosition,this.annotationEditorType=we.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const be=document.createElement("div");be.classList.add("annotationTextContent"),be.setAttribute("role","comment");for(const he of this.textContent){const ye=document.createElement("span");ye.textContent=he,be.append(ye)}this.container.append(be)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}Ce.FreeTextAnnotationElement=M;class _ extends o{constructor(he){super(he,{isRenderable:!0,ignoreBorder:!0});Ee(this,ge,null)}render(){this.container.classList.add("lineAnnotation");const he=this.data,{width:ye,height:Se}=e(he.rect),Oe=this.svgFactory.create(ye,Se,!0),Re=$e(this,ge,this.svgFactory.createElement("svg:line"));return Re.setAttribute("x1",he.rect[2]-he.lineCoordinates[0]),Re.setAttribute("y1",he.rect[3]-he.lineCoordinates[1]),Re.setAttribute("x2",he.rect[2]-he.lineCoordinates[2]),Re.setAttribute("y2",he.rect[3]-he.lineCoordinates[3]),Re.setAttribute("stroke-width",he.borderStyle.width||1),Re.setAttribute("stroke","transparent"),Re.setAttribute("fill","transparent"),Oe.append(Re),this.container.append(Oe),!he.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return le(this,ge)}addHighlightArea(){this.container.classList.add("highlightArea")}}ge=new WeakMap;class H extends o{constructor(he){super(he,{isRenderable:!0,ignoreBorder:!0});Ee(this,fe,null)}render(){this.container.classList.add("squareAnnotation");const he=this.data,{width:ye,height:Se}=e(he.rect),Oe=this.svgFactory.create(ye,Se,!0),Re=he.borderStyle.width,Ne=$e(this,fe,this.svgFactory.createElement("svg:rect"));return Ne.setAttribute("x",Re/2),Ne.setAttribute("y",Re/2),Ne.setAttribute("width",ye-Re),Ne.setAttribute("height",Se-Re),Ne.setAttribute("stroke-width",Re||1),Ne.setAttribute("stroke","transparent"),Ne.setAttribute("fill","transparent"),Oe.append(Ne),this.container.append(Oe),!he.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return le(this,fe)}addHighlightArea(){this.container.classList.add("highlightArea")}}fe=new WeakMap;class A extends o{constructor(he){super(he,{isRenderable:!0,ignoreBorder:!0});Ee(this,xe,null)}render(){this.container.classList.add("circleAnnotation");const he=this.data,{width:ye,height:Se}=e(he.rect),Oe=this.svgFactory.create(ye,Se,!0),Re=he.borderStyle.width,Ne=$e(this,xe,this.svgFactory.createElement("svg:ellipse"));return Ne.setAttribute("cx",ye/2),Ne.setAttribute("cy",Se/2),Ne.setAttribute("rx",ye/2-Re/2),Ne.setAttribute("ry",Se/2-Re/2),Ne.setAttribute("stroke-width",Re||1),Ne.setAttribute("stroke","transparent"),Ne.setAttribute("fill","transparent"),Oe.append(Ne),this.container.append(Oe),!he.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return le(this,xe)}addHighlightArea(){this.container.classList.add("highlightArea")}}xe=new WeakMap;class E extends o{constructor(he){super(he,{isRenderable:!0,ignoreBorder:!0});Ee(this,Te,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const he=this.data,{width:ye,height:Se}=e(he.rect),Oe=this.svgFactory.create(ye,Se,!0);let Re=[];for(const Ye of he.vertices){const Ge=Ye.x-he.rect[0],ze=he.rect[3]-Ye.y;Re.push(Ge+","+ze)}Re=Re.join(" ");const Ne=$e(this,Te,this.svgFactory.createElement(this.svgElementName));return Ne.setAttribute("points",Re),Ne.setAttribute("stroke-width",he.borderStyle.width||1),Ne.setAttribute("stroke","transparent"),Ne.setAttribute("fill","transparent"),Oe.append(Ne),this.container.append(Oe),!he.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return le(this,Te)}addHighlightArea(){this.container.classList.add("highlightArea")}}Te=new WeakMap;class l extends E{constructor(be){super(be),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class g extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class N extends o{constructor(he){super(he,{isRenderable:!0,ignoreBorder:!0});Ee(this,Le,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=we.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const he=this.data,{width:ye,height:Se}=e(he.rect),Oe=this.svgFactory.create(ye,Se,!0);for(const Re of he.inkLists){let Ne=[];for(const Ge of Re){const ze=Ge.x-he.rect[0],Qe=he.rect[3]-Ge.y;Ne.push(`${ze},${Qe}`)}Ne=Ne.join(" ");const Ye=this.svgFactory.createElement(this.svgElementName);le(this,Le).push(Ye),Ye.setAttribute("points",Ne),Ye.setAttribute("stroke-width",he.borderStyle.width||1),Ye.setAttribute("stroke","transparent"),Ye.setAttribute("fill","transparent"),!he.popupRef&&this.hasPopupData&&this._createPopup(),Oe.append(Ye)}return this.container.append(Oe),this.container}getElementsToTriggerPopup(){return le(this,Le)}addHighlightArea(){this.container.classList.add("highlightArea")}}Le=new WeakMap,Ce.InkAnnotationElement=N;class s extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class u extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class F extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class U extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class O extends o{constructor(be){super(be,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}Ce.StampAnnotationElement=O;class m extends o{constructor(he){var Oe;super(he,{isRenderable:!0});Ee(this,ue);Ee(this,Ie,null);const{filename:ye,content:Se}=this.data.file;this.filename=(0,Pe.getFilenameFromUrl)(ye,!0),this.content=Se,(Oe=this.linkService.eventBus)==null||Oe.dispatch("fileattachmentannotation",{source:this,filename:ye,content:Se})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:he,data:ye}=this;let Se;ye.hasAppearance||ye.fillAlpha===0?Se=document.createElement("div"):(Se=document.createElement("img"),Se.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(ye.name)?"paperclip":"pushpin"}.svg`,ye.fillAlpha&&ye.fillAlpha<1&&(Se.style=`filter: opacity(${Math.round(ye.fillAlpha*100)}%);`)),Se.addEventListener("dblclick",Me(this,ue,Ni).bind(this)),$e(this,Ie,Se);const{isMac:Oe}=we.FeatureTest.platform;return he.addEventListener("keydown",Re=>{Re.key==="Enter"&&(Oe?Re.metaKey:Re.ctrlKey)&&Me(this,ue,Ni).call(this)}),!ye.popupRef&&this.hasPopupData?this._createPopup():Se.classList.add("popupTriggerArea"),he.append(Se),he}getElementsToTriggerPopup(){return le(this,Ie)}addHighlightArea(){this.container.classList.add("highlightArea")}}Ie=new WeakMap,ue=new WeakSet,Ni=function(){var he;(he=this.downloadManager)==null||he.openOrDownloadData(this.container,this.content,this.filename)};class x{constructor({div:be,accessibilityManager:he,annotationCanvasMap:ye,l10n:Se,page:Oe,viewport:Re}){Ee(this,Ue);Ee(this,_e);Ee(this,De,null);Ee(this,Fe,null);Ee(this,je,new Map);this.div=be,$e(this,De,he),$e(this,Fe,ye),this.l10n=Se,this.page=Oe,this.viewport=Re,this.zIndex=0,this.l10n||(this.l10n=P.NullL10n)}async render(be){const{annotations:he}=be,ye=this.div;(0,Pe.setLayerDimensions)(ye,this.viewport);const Se=new Map,Oe={data:null,layer:ye,linkService:be.linkService,downloadManager:be.downloadManager,imageResourcesPath:be.imageResourcesPath||"",renderForms:be.renderForms!==!1,svgFactory:new Pe.DOMSVGFactory,annotationStorage:be.annotationStorage||new qe.AnnotationStorage,enableScripting:be.enableScripting===!0,hasJSActions:be.hasJSActions,fieldObjects:be.fieldObjects,parent:this,elements:null};for(const Re of he){if(Re.noHTML)continue;const Ne=Re.annotationType===we.AnnotationType.POPUP;if(Ne){const ze=Se.get(Re.id);if(!ze)continue;Oe.elements=ze}else{const{width:ze,height:Qe}=e(Re.rect);if(ze<=0||Qe<=0)continue}Oe.data=Re;const Ye=t.create(Oe);if(!Ye.isRenderable)continue;if(!Ne&&Re.popupRef){const ze=Se.get(Re.popupRef);ze?ze.push(Ye):Se.set(Re.popupRef,[Ye])}Ye.annotationEditorType>0&&le(this,je).set(Ye.data.id,Ye);const Ge=Ye.render();Re.hidden&&(Ge.style.visibility="hidden"),Me(this,Ue,ya).call(this,Ge,Re.id)}Me(this,_e,Bi).call(this),await this.l10n.translate(ye)}update({viewport:be}){const he=this.div;this.viewport=be,(0,Pe.setLayerDimensions)(he,{rotation:be.rotation}),Me(this,_e,Bi).call(this),he.hidden=!1}getEditableAnnotations(){return Array.from(le(this,je).values())}getEditableAnnotation(be){return le(this,je).get(be)}}De=new WeakMap,Fe=new WeakMap,je=new WeakMap,Ue=new WeakSet,ya=function(be,he){var Se;const ye=be.firstChild||be;ye.id=`${we.AnnotationPrefix}${he}`,this.div.append(be),(Se=le(this,De))==null||Se.moveElementInDOM(this.div,be,ye,!1)},_e=new WeakSet,Bi=function(){if(!le(this,Fe))return;const be=this.div;for(const[he,ye]of le(this,Fe)){const Se=be.querySelector(`[data-annotation-id="${he}"]`);if(!Se)continue;const{firstChild:Oe}=Se;Oe?Oe.nodeName==="CANVAS"?Oe.replaceWith(ye):Oe.before(ye):Se.append(ye)}le(this,Fe).clear()},Ce.AnnotationLayer=x},(at,Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.ColorConverters=void 0;function Ve(qe){return Math.floor(Math.max(0,Math.min(1,qe))*255).toString(16).padStart(2,"0")}function we(qe){return Math.max(0,Math.min(255,255*qe))}class Pe{static CMYK_G([ke,P,ie,n]){return["G",1-Math.min(1,.3*ke+.59*ie+.11*P+n)]}static G_CMYK([ke]){return["CMYK",0,0,0,1-ke]}static G_RGB([ke]){return["RGB",ke,ke,ke]}static G_rgb([ke]){return ke=we(ke),[ke,ke,ke]}static G_HTML([ke]){const P=Ve(ke);return`#${P}${P}${P}`}static RGB_G([ke,P,ie]){return["G",.3*ke+.59*P+.11*ie]}static RGB_rgb(ke){return ke.map(we)}static RGB_HTML(ke){return`#${ke.map(Ve).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([ke,P,ie,n]){return["RGB",1-Math.min(1,ke+n),1-Math.min(1,ie+n),1-Math.min(1,P+n)]}static CMYK_rgb([ke,P,ie,n]){return[we(1-Math.min(1,ke+n)),we(1-Math.min(1,ie+n)),we(1-Math.min(1,P+n))]}static CMYK_HTML(ke){const P=this.CMYK_RGB(ke).slice(1);return this.RGB_HTML(P)}static RGB_CMYK([ke,P,ie]){const n=1-ke,k=1-P,R=1-ie,e=Math.min(n,k,R);return["CMYK",n,k,R,e]}}Ce.ColorConverters=Pe},(at,Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.NullL10n=void 0,Ce.getL10nFallback=we;const Ve={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}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",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",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_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.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",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.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative"};Ve.print_progress_percent="{{progress}}%";function we(ke,P){switch(ke){case"find_match_count":ke=`find_match_count[${P.total===1?"one":"other"}]`;break;case"find_match_count_limit":ke=`find_match_count_limit[${P.limit===1?"one":"other"}]`;break}return Ve[ke]||""}function Pe(ke,P){return P?ke.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(ie,n)=>n in P?P[n]:"{{"+n+"}}"):ke}const qe={async getLanguage(){return"en-us"},async getDirection(){return"ltr"},async get(ke,P=null,ie=we(ke,P)){return Pe(ie,P)},async translate(ke){}};Ce.NullL10n=qe},(at,Ce,Ve)=>{Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.XfaLayer=void 0;var we=Ve(25);class Pe{static setupStorage(ke,P,ie,n,k){const R=n.getValue(P,{value:null});switch(ie.name){case"textarea":if(R.value!==null&&(ke.textContent=R.value),k==="print")break;ke.addEventListener("input",e=>{n.setValue(P,{value:e.target.value})});break;case"input":if(ie.attributes.type==="radio"||ie.attributes.type==="checkbox"){if(R.value===ie.attributes.xfaOn?ke.setAttribute("checked",!0):R.value===ie.attributes.xfaOff&&ke.removeAttribute("checked"),k==="print")break;ke.addEventListener("change",e=>{n.setValue(P,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})})}else{if(R.value!==null&&ke.setAttribute("value",R.value),k==="print")break;ke.addEventListener("input",e=>{n.setValue(P,{value:e.target.value})})}break;case"select":if(R.value!==null){ke.setAttribute("value",R.value);for(const e of ie.children)e.attributes.value===R.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}ke.addEventListener("input",e=>{const t=e.target.options,o=t.selectedIndex===-1?"":t[t.selectedIndex].value;n.setValue(P,{value:o})});break}}static setAttributes({html:ke,element:P,storage:ie=null,intent:n,linkService:k}){const{attributes:R}=P,e=ke instanceof HTMLAnchorElement;R.type==="radio"&&(R.name=`${R.name}-${n}`);for(const[t,o]of Object.entries(R))if(o!=null)switch(t){case"class":o.length&&ke.setAttribute(t,o.join(" "));break;case"dataId":break;case"id":ke.setAttribute("data-element-id",o);break;case"style":Object.assign(ke.style,o);break;case"textContent":ke.textContent=o;break;default:(!e||t!=="href"&&t!=="newWindow")&&ke.setAttribute(t,o)}e&&k.addLinkAttributes(ke,R.href,R.newWindow),ie&&R.dataId&&this.setupStorage(ke,R.dataId,P,ie)}static render(ke){var $;const P=ke.annotationStorage,ie=ke.linkService,n=ke.xfaHtml,k=ke.intent||"display",R=document.createElement(n.name);n.attributes&&this.setAttributes({html:R,element:n,intent:k,linkService:ie});const e=[[n,-1,R]],t=ke.div;if(t.append(R),ke.viewport){const L=`matrix(${ke.viewport.transform.join(",")})`;t.style.transform=L}k!=="richText"&&t.setAttribute("class","xfaLayer xfaFont");const o=[];for(;e.length>0;){const[L,I,T]=e.at(-1);if(I+1===L.children.length){e.pop();continue}const d=L.children[++e.at(-1)[1]];if(d===null)continue;const{name:f}=d;if(f==="#text"){const S=document.createTextNode(d.value);o.push(S),T.append(S);continue}const i=($=d==null?void 0:d.attributes)!=null&&$.xmlns?document.createElementNS(d.attributes.xmlns,f):document.createElement(f);if(T.append(i),d.attributes&&this.setAttributes({html:i,element:d,storage:P,intent:k,linkService:ie}),d.children&&d.children.length>0)e.push([d,-1,i]);else if(d.value){const S=document.createTextNode(d.value);we.XfaText.shouldBuildText(f)&&o.push(S),i.append(S)}}for(const L of t.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))L.setAttribute("readOnly",!0);return{textDivs:o}}static update(ke){const P=`matrix(${ke.viewport.transform.join(",")})`;ke.div.style.transform=P,ke.div.hidden=!1}}Ce.XfaLayer=Pe},(at,Ce,Ve)=>{var n,k,R,e,t,o,$,L,I,T,d,f,i,S,w,wa,b,Aa,_,Sa,A,va,l,$i,N,Ca,u,ji,U,ka,m,Fa,y,Ta,p,Ea,h,Ia,D,en,q,Ui,K,jn,J,Un,B,un,Y,Hi,G,Hn,ee,Oa,se,Xi,V,Pa,ce,Ma,Ae,zi,pe,Xn,fe,dn;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.InkEditor=void 0;var we=Ve(1),Pe=Ve(4),qe=Ve(29),ke=Ve(6),P=Ve(5);const Te=class Te extends Pe.AnnotationEditor{constructor(ue){super({...ue,name:"inkEditor"});Ee(this,w);Ee(this,b);Ee(this,_);Ee(this,A);Ee(this,l);Ee(this,N);Ee(this,u);Ee(this,U);Ee(this,m);Ee(this,y);Ee(this,p);Ee(this,h);Ee(this,D);Ee(this,q);Ee(this,K);Ee(this,J);Ee(this,B);Ee(this,Y);Ee(this,G);Ee(this,ce);Ee(this,Ae);Ee(this,pe);Ee(this,fe);Ee(this,n,0);Ee(this,k,0);Ee(this,R,this.canvasPointermove.bind(this));Ee(this,e,this.canvasPointerleave.bind(this));Ee(this,t,this.canvasPointerup.bind(this));Ee(this,o,this.canvasPointerdown.bind(this));Ee(this,$,new Path2D);Ee(this,L,!1);Ee(this,I,!1);Ee(this,T,!1);Ee(this,d,null);Ee(this,f,0);Ee(this,i,0);Ee(this,S,null);this.color=ue.color||null,this.thickness=ue.thickness||null,this.opacity=ue.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(ue){Pe.AnnotationEditor.initialize(ue,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(ue,me){switch(ue){case we.AnnotationEditorParamsType.INK_THICKNESS:Te._defaultThickness=me;break;case we.AnnotationEditorParamsType.INK_COLOR:Te._defaultColor=me;break;case we.AnnotationEditorParamsType.INK_OPACITY:Te._defaultOpacity=me/100;break}}updateParams(ue,me){switch(ue){case we.AnnotationEditorParamsType.INK_THICKNESS:Me(this,w,wa).call(this,me);break;case we.AnnotationEditorParamsType.INK_COLOR:Me(this,b,Aa).call(this,me);break;case we.AnnotationEditorParamsType.INK_OPACITY:Me(this,_,Sa).call(this,me);break}}static get defaultPropertiesToUpdate(){return[[we.AnnotationEditorParamsType.INK_THICKNESS,Te._defaultThickness],[we.AnnotationEditorParamsType.INK_COLOR,Te._defaultColor||Pe.AnnotationEditor._defaultLineColor],[we.AnnotationEditorParamsType.INK_OPACITY,Math.round(Te._defaultOpacity*100)]]}get propertiesToUpdate(){return[[we.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||Te._defaultThickness],[we.AnnotationEditorParamsType.INK_COLOR,this.color||Te._defaultColor||Pe.AnnotationEditor._defaultLineColor],[we.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??Te._defaultOpacity))]]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.canvas||(Me(this,K,jn).call(this),Me(this,J,Un).call(this)),this.isAttachedToDOM||(this.parent.add(this),Me(this,B,un).call(this)),Me(this,fe,dn).call(this)))}remove(){this.canvas!==null&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,le(this,d).disconnect(),$e(this,d,null),super.remove())}setParent(ue){!this.parent&&ue?this._uiManager.removeShouldRescale(this):this.parent&&ue===null&&this._uiManager.addShouldRescale(this),super.setParent(ue)}onScaleChanging(){const[ue,me]=this.parentDimensions,De=this.width*ue,Fe=this.height*me;this.setDimensions(De,Fe)}enableEditMode(){le(this,L)||this.canvas===null||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",le(this,o)))}disableEditMode(){!this.isInEditMode()||this.canvas===null||(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",le(this,o)))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return this.paths.length===0||this.paths.length===1&&this.paths[0].length===0}commit(){le(this,L)||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),$e(this,L,!0),this.div.classList.add("disabled"),Me(this,fe,dn).call(this,!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(ue){this._focusEventsAllowed&&(super.focusin(ue),this.enableEditMode())}canvasPointerdown(ue){ue.button!==0||!this.isInEditMode()||le(this,L)||(this.setInForeground(),ue.preventDefault(),ue.type!=="mouse"&&this.div.focus(),Me(this,N,Ca).call(this,ue.offsetX,ue.offsetY))}canvasPointermove(ue){ue.preventDefault(),Me(this,u,ji).call(this,ue.offsetX,ue.offsetY)}canvasPointerup(ue){ue.preventDefault(),Me(this,q,Ui).call(this,ue)}canvasPointerleave(ue){Me(this,q,Ui).call(this,ue)}get isResizable(){return!this.isEmpty()&&le(this,L)}render(){if(this.div)return this.div;let ue,me;this.width&&(ue=this.x,me=this.y),super.render(),Pe.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(ht=>{var _e;return(_e=this.div)==null?void 0:_e.setAttribute("aria-label",ht)});const[De,Fe,je,Ue]=Me(this,A,va).call(this);if(this.setAt(De,Fe,0,0),this.setDims(je,Ue),Me(this,K,jn).call(this),this.width){const[ht,_e]=this.parentDimensions;this.setAspectRatio(this.width*ht,this.height*_e),this.setAt(ue*ht,me*_e,this.width*ht,this.height*_e),$e(this,T,!0),Me(this,B,un).call(this),this.setDims(this.width*ht,this.height*_e),Me(this,D,en).call(this),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return Me(this,J,Un).call(this),this.div}setDimensions(ue,me){const De=Math.round(ue),Fe=Math.round(me);if(le(this,f)===De&&le(this,i)===Fe)return;$e(this,f,De),$e(this,i,Fe),this.canvas.style.visibility="hidden";const[je,Ue]=this.parentDimensions;this.width=ue/je,this.height=me/Ue,this.fixAndSetPosition(),le(this,L)&&Me(this,Y,Hi).call(this,ue,me),Me(this,B,un).call(this),Me(this,D,en).call(this),this.canvas.style.visibility="visible",this.fixDims()}static deserialize(ue,me,De){var Oe,Re,Ne;if(ue instanceof qe.InkAnnotationElement)return null;const Fe=super.deserialize(ue,me,De);Fe.thickness=ue.thickness,Fe.color=we.Util.makeHexColor(...ue.color),Fe.opacity=ue.opacity;const[je,Ue]=Fe.pageDimensions,ht=Fe.width*je,_e=Fe.height*Ue,st=Fe.parentScale,Je=ue.thickness/2;$e(Fe,L,!0),$e(Fe,f,Math.round(ht)),$e(Fe,i,Math.round(_e));const{paths:be,rect:he,rotation:ye}=ue;for(let{bezier:Ye}of be){Ye=Me(Oe=Te,V,Pa).call(Oe,Ye,he,ye);const Ge=[];Fe.paths.push(Ge);let ze=st*(Ye[0]-Je),Qe=st*(Ye[1]-Je);for(let rt=2,ut=Ye.length;rt<ut;rt+=6){const ot=st*(Ye[rt]-Je),yt=st*(Ye[rt+1]-Je),Et=st*(Ye[rt+2]-Je),We=st*(Ye[rt+3]-Je),Xe=st*(Ye[rt+4]-Je),Ze=st*(Ye[rt+5]-Je);Ge.push([[ze,Qe],[ot,yt],[Et,We],[Xe,Ze]]),ze=Xe,Qe=Ze}const tt=Me(this,ee,Oa).call(this,Ge);Fe.bezierPath2D.push(tt)}const Se=Me(Re=Fe,Ae,zi).call(Re);return $e(Fe,k,Math.max(Pe.AnnotationEditor.MIN_SIZE,Se[2]-Se[0])),$e(Fe,n,Math.max(Pe.AnnotationEditor.MIN_SIZE,Se[3]-Se[1])),Me(Ne=Fe,Y,Hi).call(Ne,ht,_e),Fe}serialize(){if(this.isEmpty())return null;const ue=this.getRect(0,0),me=Pe.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:we.AnnotationEditorType.INK,color:me,thickness:this.thickness,opacity:this.opacity,paths:Me(this,ce,Ma).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,ue),pageIndex:this.pageIndex,rect:ue,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}};n=new WeakMap,k=new WeakMap,R=new WeakMap,e=new WeakMap,t=new WeakMap,o=new WeakMap,$=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakMap,d=new WeakMap,f=new WeakMap,i=new WeakMap,S=new WeakMap,w=new WeakSet,wa=function(ue){const me=this.thickness;this.addCommands({cmd:()=>{this.thickness=ue,Me(this,fe,dn).call(this)},undo:()=>{this.thickness=me,Me(this,fe,dn).call(this)},mustExec:!0,type:we.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})},b=new WeakSet,Aa=function(ue){const me=this.color;this.addCommands({cmd:()=>{this.color=ue,Me(this,D,en).call(this)},undo:()=>{this.color=me,Me(this,D,en).call(this)},mustExec:!0,type:we.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})},_=new WeakSet,Sa=function(ue){ue/=100;const me=this.opacity;this.addCommands({cmd:()=>{this.opacity=ue,Me(this,D,en).call(this)},undo:()=>{this.opacity=me,Me(this,D,en).call(this)},mustExec:!0,type:we.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})},A=new WeakSet,va=function(){const{parentRotation:ue,parentDimensions:[me,De]}=this;switch(ue){case 90:return[0,De,De,me];case 180:return[me,De,me,De];case 270:return[me,0,De,me];default:return[0,0,me,De]}},l=new WeakSet,$i=function(){const{ctx:ue,color:me,opacity:De,thickness:Fe,parentScale:je,scaleFactor:Ue}=this;ue.lineWidth=Fe*je/Ue,ue.lineCap="round",ue.lineJoin="round",ue.miterLimit=10,ue.strokeStyle=`${me}${(0,P.opacityToHex)(De)}`},N=new WeakSet,Ca=function(ue,me){this.canvas.addEventListener("contextmenu",ke.noContextMenu),this.canvas.addEventListener("pointerleave",le(this,e)),this.canvas.addEventListener("pointermove",le(this,R)),this.canvas.addEventListener("pointerup",le(this,t)),this.canvas.removeEventListener("pointerdown",le(this,o)),this.isEditing=!0,le(this,T)||($e(this,T,!0),Me(this,B,un).call(this),this.thickness||(this.thickness=Te._defaultThickness),this.color||(this.color=Te._defaultColor||Pe.AnnotationEditor._defaultLineColor),this.opacity??(this.opacity=Te._defaultOpacity)),this.currentPath.push([ue,me]),$e(this,I,!1),Me(this,l,$i).call(this),$e(this,S,()=>{Me(this,y,Ta).call(this),le(this,S)&&window.requestAnimationFrame(le(this,S))}),window.requestAnimationFrame(le(this,S))},u=new WeakSet,ji=function(ue,me){const[De,Fe]=this.currentPath.at(-1);if(this.currentPath.length>1&&ue===De&&me===Fe)return;const je=this.currentPath;let Ue=le(this,$);if(je.push([ue,me]),$e(this,I,!0),je.length<=2){Ue.moveTo(...je[0]),Ue.lineTo(ue,me);return}je.length===3&&($e(this,$,Ue=new Path2D),Ue.moveTo(...je[0])),Me(this,p,Ea).call(this,Ue,...je.at(-3),...je.at(-2),ue,me)},U=new WeakSet,ka=function(){if(this.currentPath.length===0)return;const ue=this.currentPath.at(-1);le(this,$).lineTo(...ue)},m=new WeakSet,Fa=function(ue,me){$e(this,S,null),ue=Math.min(Math.max(ue,0),this.canvas.width),me=Math.min(Math.max(me,0),this.canvas.height),Me(this,u,ji).call(this,ue,me),Me(this,U,ka).call(this);let De;if(this.currentPath.length!==1)De=Me(this,h,Ia).call(this);else{const _e=[ue,me];De=[[_e,_e.slice(),_e.slice(),_e]]}const Fe=le(this,$),je=this.currentPath;this.currentPath=[],$e(this,$,new Path2D);const Ue=()=>{this.allRawPaths.push(je),this.paths.push(De),this.bezierPath2D.push(Fe),this.rebuild()},ht=()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),this.paths.length===0?this.remove():(this.canvas||(Me(this,K,jn).call(this),Me(this,J,Un).call(this)),Me(this,fe,dn).call(this))};this.addCommands({cmd:Ue,undo:ht,mustExec:!0})},y=new WeakSet,Ta=function(){if(!le(this,I))return;$e(this,I,!1);const ue=Math.ceil(this.thickness*this.parentScale),me=this.currentPath.slice(-3),De=me.map(Ue=>Ue[0]),Fe=me.map(Ue=>Ue[1]);Math.min(...De)-ue,Math.max(...De)+ue,Math.min(...Fe)-ue,Math.max(...Fe)+ue;const{ctx:je}=this;je.save(),je.clearRect(0,0,this.canvas.width,this.canvas.height);for(const Ue of this.bezierPath2D)je.stroke(Ue);je.stroke(le(this,$)),je.restore()},p=new WeakSet,Ea=function(ue,me,De,Fe,je,Ue,ht){const _e=(me+Fe)/2,st=(De+je)/2,Je=(Fe+Ue)/2,be=(je+ht)/2;ue.bezierCurveTo(_e+2*(Fe-_e)/3,st+2*(je-st)/3,Je+2*(Fe-Je)/3,be+2*(je-be)/3,Je,be)},h=new WeakSet,Ia=function(){const ue=this.currentPath;if(ue.length<=2)return[[ue[0],ue[0],ue.at(-1),ue.at(-1)]];const me=[];let De,[Fe,je]=ue[0];for(De=1;De<ue.length-2;De++){const[he,ye]=ue[De],[Se,Oe]=ue[De+1],Re=(he+Se)/2,Ne=(ye+Oe)/2,Ye=[Fe+2*(he-Fe)/3,je+2*(ye-je)/3],Ge=[Re+2*(he-Re)/3,Ne+2*(ye-Ne)/3];me.push([[Fe,je],Ye,Ge,[Re,Ne]]),[Fe,je]=[Re,Ne]}const[Ue,ht]=ue[De],[_e,st]=ue[De+1],Je=[Fe+2*(Ue-Fe)/3,je+2*(ht-je)/3],be=[_e+2*(Ue-_e)/3,st+2*(ht-st)/3];return me.push([[Fe,je],Je,be,[_e,st]]),me},D=new WeakSet,en=function(){if(this.isEmpty()){Me(this,G,Hn).call(this);return}Me(this,l,$i).call(this);const{canvas:ue,ctx:me}=this;me.setTransform(1,0,0,1,0,0),me.clearRect(0,0,ue.width,ue.height),Me(this,G,Hn).call(this);for(const De of this.bezierPath2D)me.stroke(De)},q=new WeakSet,Ui=function(ue){this.canvas.removeEventListener("pointerleave",le(this,e)),this.canvas.removeEventListener("pointermove",le(this,R)),this.canvas.removeEventListener("pointerup",le(this,t)),this.canvas.addEventListener("pointerdown",le(this,o)),setTimeout(()=>{this.canvas.removeEventListener("contextmenu",ke.noContextMenu)},10),Me(this,m,Fa).call(this,ue.offsetX,ue.offsetY),this.addToAnnotationStorage(),this.setInBackground()},K=new WeakSet,jn=function(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",Pe.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(ue=>{var me;return(me=this.canvas)==null?void 0:me.setAttribute("aria-label",ue)}),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")},J=new WeakSet,Un=function(){$e(this,d,new ResizeObserver(ue=>{const me=ue[0].contentRect;me.width&&me.height&&this.setDimensions(me.width,me.height)})),le(this,d).observe(this.div)},B=new WeakSet,un=function(){if(!le(this,T))return;const[ue,me]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*ue),this.canvas.height=Math.ceil(this.height*me),Me(this,G,Hn).call(this)},Y=new WeakSet,Hi=function(ue,me){const De=Me(this,pe,Xn).call(this),Fe=(ue-De)/le(this,k),je=(me-De)/le(this,n);this.scaleFactor=Math.min(Fe,je)},G=new WeakSet,Hn=function(){const ue=Me(this,pe,Xn).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+ue,this.translationY*this.scaleFactor+ue)},ee=new WeakSet,Oa=function(ue){const me=new Path2D;for(let De=0,Fe=ue.length;De<Fe;De++){const[je,Ue,ht,_e]=ue[De];De===0&&me.moveTo(...je),me.bezierCurveTo(Ue[0],Ue[1],ht[0],ht[1],_e[0],_e[1])}return me},se=new WeakSet,Xi=function(ue,me,De){const[Fe,je,Ue,ht]=me;switch(De){case 0:for(let _e=0,st=ue.length;_e<st;_e+=2)ue[_e]+=Fe,ue[_e+1]=ht-ue[_e+1];break;case 90:for(let _e=0,st=ue.length;_e<st;_e+=2){const Je=ue[_e];ue[_e]=ue[_e+1]+Fe,ue[_e+1]=Je+je}break;case 180:for(let _e=0,st=ue.length;_e<st;_e+=2)ue[_e]=Ue-ue[_e],ue[_e+1]+=je;break;case 270:for(let _e=0,st=ue.length;_e<st;_e+=2){const Je=ue[_e];ue[_e]=Ue-ue[_e+1],ue[_e+1]=ht-Je}break;default:throw new Error("Invalid rotation")}return ue},V=new WeakSet,Pa=function(ue,me,De){const[Fe,je,Ue,ht]=me;switch(De){case 0:for(let _e=0,st=ue.length;_e<st;_e+=2)ue[_e]-=Fe,ue[_e+1]=ht-ue[_e+1];break;case 90:for(let _e=0,st=ue.length;_e<st;_e+=2){const Je=ue[_e];ue[_e]=ue[_e+1]-je,ue[_e+1]=Je-Fe}break;case 180:for(let _e=0,st=ue.length;_e<st;_e+=2)ue[_e]=Ue-ue[_e],ue[_e+1]-=je;break;case 270:for(let _e=0,st=ue.length;_e<st;_e+=2){const Je=ue[_e];ue[_e]=ht-ue[_e+1],ue[_e+1]=Ue-Je}break;default:throw new Error("Invalid rotation")}return ue},ce=new WeakSet,Ma=function(ue,me,De,Fe){var st,Je;const je=[],Ue=this.thickness/2,ht=ue*me+Ue,_e=ue*De+Ue;for(const be of this.paths){const he=[],ye=[];for(let Se=0,Oe=be.length;Se<Oe;Se++){const[Re,Ne,Ye,Ge]=be[Se],ze=ue*Re[0]+ht,Qe=ue*Re[1]+_e,tt=ue*Ne[0]+ht,rt=ue*Ne[1]+_e,ut=ue*Ye[0]+ht,ot=ue*Ye[1]+_e,yt=ue*Ge[0]+ht,Et=ue*Ge[1]+_e;Se===0&&(he.push(ze,Qe),ye.push(ze,Qe)),he.push(tt,rt,ut,ot,yt,Et),ye.push(tt,rt),Se===Oe-1&&ye.push(yt,Et)}je.push({bezier:Me(st=Te,se,Xi).call(st,he,Fe,this.rotation),points:Me(Je=Te,se,Xi).call(Je,ye,Fe,this.rotation)})}return je},Ae=new WeakSet,zi=function(){let ue=1/0,me=-1/0,De=1/0,Fe=-1/0;for(const je of this.paths)for(const[Ue,ht,_e,st]of je){const Je=we.Util.bezierBoundingBox(...Ue,...ht,..._e,...st);ue=Math.min(ue,Je[0]),De=Math.min(De,Je[1]),me=Math.max(me,Je[2]),Fe=Math.max(Fe,Je[3])}return[ue,De,me,Fe]},pe=new WeakSet,Xn=function(){return le(this,L)?Math.ceil(this.thickness*this.parentScale):0},fe=new WeakSet,dn=function(ue=!1){if(this.isEmpty())return;if(!le(this,L)){Me(this,D,en).call(this);return}const me=Me(this,Ae,zi).call(this),De=Me(this,pe,Xn).call(this);$e(this,k,Math.max(Pe.AnnotationEditor.MIN_SIZE,me[2]-me[0])),$e(this,n,Math.max(Pe.AnnotationEditor.MIN_SIZE,me[3]-me[1]));const Fe=Math.ceil(De+le(this,k)*this.scaleFactor),je=Math.ceil(De+le(this,n)*this.scaleFactor),[Ue,ht]=this.parentDimensions;this.width=Fe/Ue,this.height=je/ht,this.setAspectRatio(Fe,je);const _e=this.translationX,st=this.translationY;this.translationX=-me[0],this.translationY=-me[1],Me(this,B,un).call(this),Me(this,D,en).call(this),$e(this,f,Fe),$e(this,i,je),this.setDims(Fe,je);const Je=ue?De/this.scaleFactor/2:0;this.translate(_e-this.translationX-Je,st-this.translationY-Je)},Ee(Te,ee),Ee(Te,se),Ee(Te,V),Rt(Te,"_defaultColor",null),Rt(Te,"_defaultOpacity",1),Rt(Te,"_defaultThickness",1),Rt(Te,"_type","ink");let ie=Te;Ce.InkEditor=ie},(at,Ce,Ve)=>{var ie,n,k,R,e,t,o,$,L,I,T,Fn,f,Tn,S,zn,v,Gi,M,_a,H,Ra,E,Wi,g,Gn,s,Da;Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.StampEditor=void 0;var we=Ve(1),Pe=Ve(4),qe=Ve(6),ke=Ve(29);const F=class F extends Pe.AnnotationEditor{constructor(m){super({...m,name:"stampEditor"});Ee(this,T);Ee(this,f);Ee(this,S);Ee(this,v);Ee(this,M);Ee(this,H);Ee(this,E);Ee(this,g);Ee(this,s);Ee(this,ie,null);Ee(this,n,null);Ee(this,k,null);Ee(this,R,null);Ee(this,e,null);Ee(this,t,null);Ee(this,o,null);Ee(this,$,null);Ee(this,L,!1);Ee(this,I,!1);$e(this,R,m.bitmapUrl),$e(this,e,m.bitmapFile)}static initialize(m){Pe.AnnotationEditor.initialize(m)}static get supportedTypes(){const m=["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"];return(0,we.shadow)(this,"supportedTypes",m.map(x=>`image/${x}`))}static get supportedTypesStr(){return(0,we.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(m){return this.supportedTypes.includes(m)}static paste(m,x){x.pasteEditor(we.AnnotationEditorType.STAMP,{bitmapFile:m.getAsFile()})}remove(){var m,x;le(this,n)&&($e(this,ie,null),this._uiManager.imageManager.deleteId(le(this,n)),(m=le(this,t))==null||m.remove(),$e(this,t,null),(x=le(this,o))==null||x.disconnect(),$e(this,o,null)),super.remove()}rebuild(){if(!this.parent){le(this,n)&&Me(this,S,zn).call(this);return}super.rebuild(),this.div!==null&&(le(this,n)&&Me(this,S,zn).call(this),this.isAttachedToDOM||this.parent.add(this))}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(le(this,k)||le(this,ie)||le(this,R)||le(this,e))}get isResizable(){return!0}render(){if(this.div)return this.div;let m,x;if(this.width&&(m=this.x,x=this.y),super.render(),this.div.hidden=!0,le(this,ie)?Me(this,v,Gi).call(this):Me(this,S,zn).call(this),this.width){const[y,r]=this.parentDimensions;this.setAt(m*y,x*r,this.width*y,this.height*r)}return this.div}static deserialize(m,x,y){if(m instanceof ke.StampAnnotationElement)return null;const r=super.deserialize(m,x,y),{rect:p,bitmapUrl:c,bitmapId:h,isSvg:C,accessibilityData:D}=m;h&&y.imageManager.isValidId(h)?$e(r,n,h):$e(r,R,c),$e(r,L,C);const[X,q]=r.pageDimensions;return r.width=(p[2]-p[0])/X,r.height=(p[3]-p[1])/q,D&&(r.altTextData=D),r}serialize(m=!1,x=null){if(this.isEmpty())return null;const y={annotationType:we.AnnotationEditorType.STAMP,bitmapId:le(this,n),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:le(this,L),structTreeParentId:this._structTreeParentId};if(m)return y.bitmapUrl=Me(this,g,Gn).call(this,!0),y.accessibilityData=this.altTextData,y;const{decorative:r,altText:p}=this.altTextData;if(!r&&p&&(y.accessibilityData={type:"Figure",alt:p}),x===null)return y;x.stamps||(x.stamps=new Map);const c=le(this,L)?(y.rect[2]-y.rect[0])*(y.rect[3]-y.rect[1]):null;if(!x.stamps.has(le(this,n)))x.stamps.set(le(this,n),{area:c,serialized:y}),y.bitmap=Me(this,g,Gn).call(this,!1);else if(le(this,L)){const h=x.stamps.get(le(this,n));c>h.area&&(h.area=c,h.serialized.bitmap.close(),h.serialized.bitmap=Me(this,g,Gn).call(this,!1))}return y}};ie=new WeakMap,n=new WeakMap,k=new WeakMap,R=new WeakMap,e=new WeakMap,t=new WeakMap,o=new WeakMap,$=new WeakMap,L=new WeakMap,I=new WeakMap,T=new WeakSet,Fn=function(m,x=!1){if(!m){this.remove();return}$e(this,ie,m.bitmap),x||($e(this,n,m.id),$e(this,L,m.isSvg)),Me(this,v,Gi).call(this)},f=new WeakSet,Tn=function(){$e(this,k,null),this._uiManager.enableWaiting(!1),le(this,t)&&this.div.focus()},S=new WeakSet,zn=function(){if(le(this,n)){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(le(this,n)).then(x=>Me(this,T,Fn).call(this,x,!0)).finally(()=>Me(this,f,Tn).call(this));return}if(le(this,R)){const x=le(this,R);$e(this,R,null),this._uiManager.enableWaiting(!0),$e(this,k,this._uiManager.imageManager.getFromUrl(x).then(y=>Me(this,T,Fn).call(this,y)).finally(()=>Me(this,f,Tn).call(this)));return}if(le(this,e)){const x=le(this,e);$e(this,e,null),this._uiManager.enableWaiting(!0),$e(this,k,this._uiManager.imageManager.getFromFile(x).then(y=>Me(this,T,Fn).call(this,y)).finally(()=>Me(this,f,Tn).call(this)));return}const m=document.createElement("input");m.type="file",m.accept=F.supportedTypesStr,$e(this,k,new Promise(x=>{m.addEventListener("change",async()=>{if(!m.files||m.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const y=await this._uiManager.imageManager.getFromFile(m.files[0]);Me(this,T,Fn).call(this,y)}x()}),m.addEventListener("cancel",()=>{this.remove(),x()})}).finally(()=>Me(this,f,Tn).call(this))),m.click()},v=new WeakSet,Gi=function(){const{div:m}=this;let{width:x,height:y}=le(this,ie);const[r,p]=this.pageDimensions,c=.75;if(this.width)x=this.width*r,y=this.height*p;else if(x>c*r||y>c*p){const X=Math.min(c*r/x,c*p/y);x*=X,y*=X}const[h,C]=this.parentDimensions;this.setDims(x*h/r,y*C/p),this._uiManager.enableWaiting(!1);const D=$e(this,t,document.createElement("canvas"));m.append(D),m.hidden=!1,Me(this,E,Wi).call(this,x,y),Me(this,s,Da).call(this),le(this,I)||(this.parent.addUndoableEditor(this),$e(this,I,!0)),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()},M=new WeakSet,_a=function(m,x){var c;const[y,r]=this.parentDimensions;this.width=m/y,this.height=x/r,this.setDims(m,x),(c=this._initialOptions)!=null&&c.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,le(this,$)!==null&&clearTimeout(le(this,$)),$e(this,$,setTimeout(()=>{$e(this,$,null),Me(this,E,Wi).call(this,m,x)},200))},H=new WeakSet,Ra=function(m,x){const{width:y,height:r}=le(this,ie);let p=y,c=r,h=le(this,ie);for(;p>2*m||c>2*x;){const C=p,D=c;p>2*m&&(p=p>=16384?Math.floor(p/2)-1:Math.ceil(p/2)),c>2*x&&(c=c>=16384?Math.floor(c/2)-1:Math.ceil(c/2));const X=new OffscreenCanvas(p,c);X.getContext("2d").drawImage(h,0,0,C,D,0,0,p,c),h=X.transferToImageBitmap()}return h},E=new WeakSet,Wi=function(m,x){m=Math.ceil(m),x=Math.ceil(x);const y=le(this,t);if(!y||y.width===m&&y.height===x)return;y.width=m,y.height=x;const r=le(this,L)?le(this,ie):Me(this,H,Ra).call(this,m,x),p=y.getContext("2d");p.filter=this._uiManager.hcmFilter,p.drawImage(r,0,0,r.width,r.height,0,0,m,x)},g=new WeakSet,Gn=function(m){if(m){if(le(this,L)){const r=this._uiManager.imageManager.getSvgUrl(le(this,n));if(r)return r}const x=document.createElement("canvas");return{width:x.width,height:x.height}=le(this,ie),x.getContext("2d").drawImage(le(this,ie),0,0),x.toDataURL()}if(le(this,L)){const[x,y]=this.pageDimensions,r=Math.round(this.width*x*qe.PixelsPerInch.PDF_TO_CSS_UNITS),p=Math.round(this.height*y*qe.PixelsPerInch.PDF_TO_CSS_UNITS),c=new OffscreenCanvas(r,p);return c.getContext("2d").drawImage(le(this,ie),0,0,le(this,ie).width,le(this,ie).height,0,0,r,p),c.transferToImageBitmap()}return structuredClone(le(this,ie))},s=new WeakSet,Da=function(){$e(this,o,new ResizeObserver(m=>{const x=m[0].contentRect;x.width&&x.height&&Me(this,M,_a).call(this,x.width,x.height)})),le(this,o).observe(this.div)},Rt(F,"_type","stamp");let P=F;Ce.StampEditor=P}],__webpack_module_cache__={};function __w_pdfjs_require__(at){var Ce=__webpack_module_cache__[at];if(Ce!==void 0)return Ce.exports;var Ve=__webpack_module_cache__[at]={exports:{}};return __webpack_modules__[at](Ve,Ve.exports,__w_pdfjs_require__),Ve.exports}var __webpack_exports__={};return(()=>{var at=__webpack_exports__;Object.defineProperty(at,"__esModule",{value:!0}),Object.defineProperty(at,"AbortException",{enumerable:!0,get:function(){return Ce.AbortException}}),Object.defineProperty(at,"AnnotationEditorLayer",{enumerable:!0,get:function(){return qe.AnnotationEditorLayer}}),Object.defineProperty(at,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return Ce.AnnotationEditorParamsType}}),Object.defineProperty(at,"AnnotationEditorType",{enumerable:!0,get:function(){return Ce.AnnotationEditorType}}),Object.defineProperty(at,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return ke.AnnotationEditorUIManager}}),Object.defineProperty(at,"AnnotationLayer",{enumerable:!0,get:function(){return P.AnnotationLayer}}),Object.defineProperty(at,"AnnotationMode",{enumerable:!0,get:function(){return Ce.AnnotationMode}}),Object.defineProperty(at,"CMapCompressionType",{enumerable:!0,get:function(){return Ce.CMapCompressionType}}),Object.defineProperty(at,"DOMSVGFactory",{enumerable:!0,get:function(){return we.DOMSVGFactory}}),Object.defineProperty(at,"FeatureTest",{enumerable:!0,get:function(){return Ce.FeatureTest}}),Object.defineProperty(at,"GlobalWorkerOptions",{enumerable:!0,get:function(){return ie.GlobalWorkerOptions}}),Object.defineProperty(at,"ImageKind",{enumerable:!0,get:function(){return Ce.ImageKind}}),Object.defineProperty(at,"InvalidPDFException",{enumerable:!0,get:function(){return Ce.InvalidPDFException}}),Object.defineProperty(at,"MissingPDFException",{enumerable:!0,get:function(){return Ce.MissingPDFException}}),Object.defineProperty(at,"OPS",{enumerable:!0,get:function(){return Ce.OPS}}),Object.defineProperty(at,"PDFDataRangeTransport",{enumerable:!0,get:function(){return Ve.PDFDataRangeTransport}}),Object.defineProperty(at,"PDFDateString",{enumerable:!0,get:function(){return we.PDFDateString}}),Object.defineProperty(at,"PDFWorker",{enumerable:!0,get:function(){return Ve.PDFWorker}}),Object.defineProperty(at,"PasswordResponses",{enumerable:!0,get:function(){return Ce.PasswordResponses}}),Object.defineProperty(at,"PermissionFlag",{enumerable:!0,get:function(){return Ce.PermissionFlag}}),Object.defineProperty(at,"PixelsPerInch",{enumerable:!0,get:function(){return we.PixelsPerInch}}),Object.defineProperty(at,"PromiseCapability",{enumerable:!0,get:function(){return Ce.PromiseCapability}}),Object.defineProperty(at,"RenderingCancelledException",{enumerable:!0,get:function(){return we.RenderingCancelledException}}),Object.defineProperty(at,"SVGGraphics",{enumerable:!0,get:function(){return Ve.SVGGraphics}}),Object.defineProperty(at,"UnexpectedResponseException",{enumerable:!0,get:function(){return Ce.UnexpectedResponseException}}),Object.defineProperty(at,"Util",{enumerable:!0,get:function(){return Ce.Util}}),Object.defineProperty(at,"VerbosityLevel",{enumerable:!0,get:function(){return Ce.VerbosityLevel}}),Object.defineProperty(at,"XfaLayer",{enumerable:!0,get:function(){return n.XfaLayer}}),Object.defineProperty(at,"build",{enumerable:!0,get:function(){return Ve.build}}),Object.defineProperty(at,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return Ce.createValidAbsoluteUrl}}),Object.defineProperty(at,"getDocument",{enumerable:!0,get:function(){return Ve.getDocument}}),Object.defineProperty(at,"getFilenameFromUrl",{enumerable:!0,get:function(){return we.getFilenameFromUrl}}),Object.defineProperty(at,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return we.getPdfFilenameFromUrl}}),Object.defineProperty(at,"getXfaPageViewport",{enumerable:!0,get:function(){return we.getXfaPageViewport}}),Object.defineProperty(at,"isDataScheme",{enumerable:!0,get:function(){return we.isDataScheme}}),Object.defineProperty(at,"isPdfFile",{enumerable:!0,get:function(){return we.isPdfFile}}),Object.defineProperty(at,"loadScript",{enumerable:!0,get:function(){return we.loadScript}}),Object.defineProperty(at,"noContextMenu",{enumerable:!0,get:function(){return we.noContextMenu}}),Object.defineProperty(at,"normalizeUnicode",{enumerable:!0,get:function(){return Ce.normalizeUnicode}}),Object.defineProperty(at,"renderTextLayer",{enumerable:!0,get:function(){return Pe.renderTextLayer}}),Object.defineProperty(at,"setLayerDimensions",{enumerable:!0,get:function(){return we.setLayerDimensions}}),Object.defineProperty(at,"shadow",{enumerable:!0,get:function(){return Ce.shadow}}),Object.defineProperty(at,"updateTextLayer",{enumerable:!0,get:function(){return Pe.updateTextLayer}}),Object.defineProperty(at,"version",{enumerable:!0,get:function(){return Ve.version}});var Ce=__w_pdfjs_require__(1),Ve=__w_pdfjs_require__(2),we=__w_pdfjs_require__(6),Pe=__w_pdfjs_require__(26),qe=__w_pdfjs_require__(27),ke=__w_pdfjs_require__(5),P=__w_pdfjs_require__(29),ie=__w_pdfjs_require__(14),n=__w_pdfjs_require__(32)})(),__webpack_exports__})())})(pdf);var pdfExports=pdf.exports,pdf_worker={exports:{}};(function(at,Ce){(function(we,Pe){at.exports=we.pdfjsWorker=Pe()})(globalThis,()=>(()=>{var Ve=[,(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.WorkerTask=P.WorkerMessageHandler=void 0;var n=ie(2),k=ie(3),R=ie(4),e=ie(6),t=ie(10),o=ie(68),$=ie(73),L=ie(104),I=ie(105),T=ie(72);class d{constructor(w){this.name=w,this.terminated=!1,this._capability=new n.PromiseCapability}get finished(){return this._capability.promise}finish(){this._capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}P.WorkerTask=d;class f{static setup(w,v){let b=!1;w.on("test",function(M){b||(b=!0,w.send("test",M instanceof Uint8Array))}),w.on("configure",function(M){(0,n.setVerbosityLevel)(M.verbosity)}),w.on("GetDocRequest",function(M){return f.createDocumentHandler(M,v)})}static createDocumentHandler(w,v){let b,M=!1,_=null;const H=new Set,A=(0,n.getVerbosityLevel)(),{docId:E,apiVersion:l}=w,g="3.11.174";if(l!==g)throw new Error(`The API version "${l}" does not match the Worker version "${g}".`);const N=[];for(const r in[])N.push(r);if(N.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+N.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");const s=E+"_worker";let u=new L.MessageHandler(s,E,v);function F(){if(M)throw new Error("Worker was terminated")}function U(r){H.add(r)}function O(r){r.finish(),H.delete(r)}async function m(r){await b.ensureDoc("checkHeader"),await b.ensureDoc("parseStartXRef"),await b.ensureDoc("parse",[r]),await b.ensureDoc("checkFirstPage",[r]),await b.ensureDoc("checkLastPage",[r]);const p=await b.ensureDoc("isPureXfa");if(p){const D=new d("loadXfaFonts");U(D),await Promise.all([b.loadXfaFonts(u,D).catch(X=>{}).then(()=>O(D)),b.loadXfaImages()])}const[c,h]=await Promise.all([b.ensureDoc("numPages"),b.ensureDoc("fingerprints")]),C=p?await b.ensureDoc("htmlForXfa"):null;return{numPages:c,fingerprints:h,htmlForXfa:C}}function x({data:r,password:p,disableAutoFetch:c,rangeChunkSize:h,length:C,docBaseUrl:D,enableXfa:X,evaluatorOptions:q}){const re={source:null,disableAutoFetch:c,docBaseUrl:D,docId:E,enableXfa:X,evaluatorOptions:q,handler:u,length:C,password:p,rangeChunkSize:h},K=new n.PromiseCapability;let oe;if(r){try{re.source=r,oe=new e.LocalPdfManager(re),K.resolve(oe)}catch(W){K.reject(W)}return K.promise}let J,te=[];try{J=new I.PDFWorkerStream(u)}catch(W){return K.reject(W),K.promise}const B=J.getFullReader();B.headersReady.then(function(){if(B.isRangeSupported){re.source=J,re.length=B.contentLength,re.disableAutoFetch||(re.disableAutoFetch=B.isStreamingSupported),oe=new e.NetworkPdfManager(re);for(const W of te)oe.sendProgressiveData(W);te=[],K.resolve(oe),_=null}}).catch(function(W){K.reject(W),_=null});let j=0;const Y=function(){const W=(0,k.arrayBuffersToBytes)(te);C&&W.length!==C&&(0,n.warn)("reported HTTP length is different from actual");try{re.source=W,oe=new e.LocalPdfManager(re),K.resolve(oe)}catch(G){K.reject(G)}te=[]};return new Promise(function(W,G){const Q=function({value:ee,done:z}){try{if(F(),z){oe||Y(),_=null;return}j+=ee.byteLength,B.isStreamingSupported||u.send("DocProgress",{loaded:j,total:Math.max(j,B.contentLength||0)}),oe?oe.sendProgressiveData(ee):te.push(ee),B.read().then(Q,G)}catch(se){G(se)}};B.read().then(Q,G)}).catch(function(W){K.reject(W),_=null}),_=function(W){J.cancelAllRequests(W)},K.promise}function y(r){function p(C){F(),u.send("GetDoc",{pdfInfo:C})}function c(C){if(F(),C instanceof n.PasswordException){const D=new d(`PasswordException: response ${C.code}`);U(D),u.sendWithPromise("PasswordRequest",C).then(function({password:X}){O(D),b.updatePassword(X),h()}).catch(function(){O(D),u.send("DocException",C)})}else C instanceof n.InvalidPDFException||C instanceof n.MissingPDFException||C instanceof n.UnexpectedResponseException||C instanceof n.UnknownErrorException?u.send("DocException",C):u.send("DocException",new n.UnknownErrorException(C.message,C.toString()))}function h(){F(),m(!1).then(p,function(C){if(F(),!(C instanceof k.XRefParseException)){c(C);return}b.requestLoadedStream().then(function(){F(),m(!0).then(p,c)})})}F(),x(r).then(function(C){if(M)throw C.terminate(new n.AbortException("Worker was terminated.")),new Error("Worker was terminated");b=C,b.requestLoadedStream(!0).then(D=>{u.send("DataLoaded",{length:D.bytes.byteLength})})}).then(h,c)}return u.on("GetPage",function(r){return b.getPage(r.pageIndex).then(function(p){return Promise.all([b.ensure(p,"rotate"),b.ensure(p,"ref"),b.ensure(p,"userUnit"),b.ensure(p,"view")]).then(function([c,h,C,D]){return{rotate:c,ref:h,userUnit:C,view:D}})})}),u.on("GetPageIndex",function(r){const p=R.Ref.get(r.num,r.gen);return b.ensureCatalog("getPageIndex",[p])}),u.on("GetDestinations",function(r){return b.ensureCatalog("destinations")}),u.on("GetDestination",function(r){return b.ensureCatalog("getDestination",[r.id])}),u.on("GetPageLabels",function(r){return b.ensureCatalog("pageLabels")}),u.on("GetPageLayout",function(r){return b.ensureCatalog("pageLayout")}),u.on("GetPageMode",function(r){return b.ensureCatalog("pageMode")}),u.on("GetViewerPreferences",function(r){return b.ensureCatalog("viewerPreferences")}),u.on("GetOpenAction",function(r){return b.ensureCatalog("openAction")}),u.on("GetAttachments",function(r){return b.ensureCatalog("attachments")}),u.on("GetDocJSActions",function(r){return b.ensureCatalog("jsActions")}),u.on("GetPageJSActions",function({pageIndex:r}){return b.getPage(r).then(function(p){return b.ensure(p,"jsActions")})}),u.on("GetOutline",function(r){return b.ensureCatalog("documentOutline")}),u.on("GetOptionalContentConfig",function(r){return b.ensureCatalog("optionalContentConfig")}),u.on("GetPermissions",function(r){return b.ensureCatalog("permissions")}),u.on("GetMetadata",function(r){return Promise.all([b.ensureDoc("documentInfo"),b.ensureCatalog("metadata")])}),u.on("GetMarkInfo",function(r){return b.ensureCatalog("markInfo")}),u.on("GetData",function(r){return b.requestLoadedStream().then(function(p){return p.bytes})}),u.on("GetAnnotations",function({pageIndex:r,intent:p}){return b.getPage(r).then(function(c){const h=new d(`GetAnnotations: page ${r}`);return U(h),c.getAnnotationsData(u,h,p).then(C=>(O(h),C),C=>{throw O(h),C})})}),u.on("GetFieldObjects",function(r){return b.ensureDoc("fieldObjects")}),u.on("HasJSActions",function(r){return b.ensureDoc("hasJSActions")}),u.on("GetCalculationOrderIds",function(r){return b.ensureDoc("calculationOrderIds")}),u.on("SaveDocument",async function({isPureXfa:r,numPages:p,annotationStorage:c,filename:h}){const C=[b.requestLoadedStream(),b.ensureCatalog("acroForm"),b.ensureCatalog("acroFormRef"),b.ensureDoc("startXRef"),b.ensureDoc("xref"),b.ensureDoc("linearization"),b.ensureCatalog("structTreeRoot")],D=[],X=r?null:(0,k.getNewAnnotationsMap)(c),[q,re,K,oe,J,te,B]=await Promise.all(C),j=J.trailer.getRaw("Root")||null;let Y;if(X){B?await B.canUpdateStructTree({pdfManager:b,newAnnotationsByPage:X})&&(Y=B):await T.StructTreeRoot.canCreateStructureTree({catalogRef:j,pdfManager:b,newAnnotationsByPage:X})&&(Y=null);const ae=t.AnnotationFactory.generateImages(c.values(),J,b.evaluatorOptions.isOffscreenCanvasSupported),ce=Y===void 0?D:[];for(const[de,Ae]of X)ce.push(b.getPage(de).then(ve=>{const pe=new d(`Save (editor): page ${de}`);return ve.saveNewAnnotations(u,pe,Ae,ae).finally(function(){O(pe)})}));Y===null?D.push(Promise.all(ce).then(async de=>(await T.StructTreeRoot.createStructureTree({newAnnotationsByPage:X,xref:J,catalogRef:j,pdfManager:b,newRefs:de}),de))):Y&&D.push(Promise.all(ce).then(async de=>(await Y.updateStructureTree({newAnnotationsByPage:X,pdfManager:b,newRefs:de}),de)))}if(r)D.push(b.serializeXfaData(c));else for(let ae=0;ae<p;ae++)D.push(b.getPage(ae).then(function(ce){const de=new d(`Save: page ${ae}`);return ce.save(u,de,c).finally(function(){O(de)})}));const W=await Promise.all(D);let G=[],Q=null;if(r){if(Q=W[0],!Q)return q.bytes}else if(G=W.flat(2),G.length===0)return q.bytes;const ee=K&&re instanceof R.Dict&&G.some(ae=>ae.needAppearances),z=re instanceof R.Dict&&re.get("XFA")||null;let se=null,ne=!1;if(Array.isArray(z)){for(let ae=0,ce=z.length;ae<ce;ae+=2)z[ae]==="datasets"&&(se=z[ae+1],ne=!0);se===null&&(se=J.getNewTemporaryRef())}else z&&(0,n.warn)("Unsupported XFA type.");let V=Object.create(null);if(J.trailer){const ae=Object.create(null),ce=J.trailer.get("Info")||null;ce instanceof R.Dict&&ce.forEach((de,Ae)=>{typeof Ae=="string"&&(ae[de]=(0,n.stringToPDFString)(Ae))}),V={rootRef:j,encryptRef:J.trailer.getRaw("Encrypt")||null,newRef:J.getNewTemporaryRef(),infoRef:J.trailer.getRaw("Info")||null,info:ae,fileIds:J.trailer.get("ID")||null,startXRef:te?oe:J.lastXRefStreamPos??oe,filename:h}}return(0,$.incrementalUpdate)({originalData:q.bytes,xrefInfo:V,newRefs:G,xref:J,hasXfa:!!z,xfaDatasetsRef:se,hasXfaDatasetsEntry:ne,needAppearances:ee,acroFormRef:K,acroForm:re,xfaData:Q}).finally(()=>{J.resetNewTemporaryRef()})}),u.on("GetOperatorList",function(r,p){const c=r.pageIndex;b.getPage(c).then(function(h){const C=new d(`GetOperatorList: page ${c}`);U(C);const D=A>=n.VerbosityLevel.INFOS?Date.now():0;h.getOperatorList({handler:u,sink:p,task:C,intent:r.intent,cacheKey:r.cacheKey,annotationStorage:r.annotationStorage}).then(function(X){O(C),D&&(0,n.info)(`page=${c+1} - getOperatorList: time=${Date.now()-D}ms, len=${X.length}`),p.close()},function(X){O(C),!C.terminated&&p.error(X)})})}),u.on("GetTextContent",function(r,p){const{pageIndex:c,includeMarkedContent:h,disableNormalization:C}=r;b.getPage(c).then(function(D){const X=new d("GetTextContent: page "+c);U(X);const q=A>=n.VerbosityLevel.INFOS?Date.now():0;D.extractTextContent({handler:u,task:X,sink:p,includeMarkedContent:h,disableNormalization:C}).then(function(){O(X),q&&(0,n.info)(`page=${c+1} - getTextContent: time=${Date.now()-q}ms`),p.close()},function(re){O(X),!X.terminated&&p.error(re)})})}),u.on("GetStructTree",function(r){return b.getPage(r.pageIndex).then(function(p){return b.ensure(p,"getStructTree")})}),u.on("FontFallback",function(r){return b.fontFallback(r.id,u)}),u.on("Cleanup",function(r){return b.cleanup(!0)}),u.on("Terminate",function(r){M=!0;const p=[];if(b){b.terminate(new n.AbortException("Worker was terminated."));const c=b.cleanup();p.push(c),b=null}else(0,o.clearGlobalCaches)();_&&_(new n.AbortException("Worker was terminated."));for(const c of H)p.push(c.finished),c.terminate();return Promise.all(p).then(function(){u.destroy(),u=null})}),u.on("Ready",function(r){y(w),w=null}),s}static initializeFromPort(w){const v=new L.MessageHandler("worker","main",w);f.setup(v,w),v.send("ready",null)}}P.WorkerMessageHandler=f;function i(S){return typeof S.postMessage=="function"&&"onmessage"in S}typeof window>"u"&&!n.isNodeJS&&typeof self<"u"&&i(self)&&f.initializeFromPort(self)},(ke,P)=>{var Le;Object.defineProperty(P,"__esModule",{value:!0}),P.VerbosityLevel=P.Util=P.UnknownErrorException=P.UnexpectedResponseException=P.TextRenderingMode=P.RenderingIntentFlag=P.PromiseCapability=P.PermissionFlag=P.PasswordResponses=P.PasswordException=P.PageActionEventType=P.OPS=P.MissingPDFException=P.MAX_IMAGE_SIZE_TO_CACHE=P.LINE_FACTOR=P.LINE_DESCENT_FACTOR=P.InvalidPDFException=P.ImageKind=P.IDENTITY_MATRIX=P.FormatError=P.FeatureTest=P.FONT_IDENTITY_MATRIX=P.DocumentActionEventType=P.CMapCompressionType=P.BaseException=P.BASELINE_FACTOR=P.AnnotationType=P.AnnotationReplyType=P.AnnotationPrefix=P.AnnotationMode=P.AnnotationFlag=P.AnnotationFieldFlag=P.AnnotationEditorType=P.AnnotationEditorPrefix=P.AnnotationEditorParamsType=P.AnnotationBorderStyleType=P.AnnotationActionEventType=P.AbortException=void 0,P.assert=y,P.bytesToString=J,P.createValidAbsoluteUrl=p,P.getModificationDate=Ae,P.getUuid=xe,P.getVerbosityLevel=U,P.info=O,P.isArrayBuffer=ce,P.isArrayEqual=de,P.isNodeJS=void 0,P.normalizeUnicode=fe,P.objectFromMap=Y,P.objectSize=j,P.setVerbosityLevel=F,P.shadow=c,P.string32=B,P.stringToBytes=te,P.stringToPDFString=ne,P.stringToUTF8String=V,P.unreachable=x,P.utf8StringToString=ae,P.warn=m;const ie=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");P.isNodeJS=ie;const n=[1,0,0,1,0,0];P.IDENTITY_MATRIX=n;const k=[.001,0,0,.001,0,0];P.FONT_IDENTITY_MATRIX=k;const R=1e7;P.MAX_IMAGE_SIZE_TO_CACHE=R;const e=1.35;P.LINE_FACTOR=e;const t=.35;P.LINE_DESCENT_FACTOR=t;const o=t/e;P.BASELINE_FACTOR=o;const $={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};P.RenderingIntentFlag=$;const L={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};P.AnnotationMode=L;const I="pdfjs_internal_editor_";P.AnnotationEditorPrefix=I;const T={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};P.AnnotationEditorType=T;const d={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};P.AnnotationEditorParamsType=d;const f={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};P.PermissionFlag=f;const i={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};P.TextRenderingMode=i;const S={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};P.ImageKind=S;const w={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};P.AnnotationType=w;const v={GROUP:"Group",REPLY:"R"};P.AnnotationReplyType=v;const b={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};P.AnnotationFlag=b;const M={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};P.AnnotationFieldFlag=M;const _={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};P.AnnotationBorderStyleType=_;const H={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"};P.AnnotationActionEventType=H;const A={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};P.DocumentActionEventType=A;const E={O:"PageOpen",C:"PageClose"};P.PageActionEventType=E;const l={ERRORS:0,WARNINGS:1,INFOS:5};P.VerbosityLevel=l;const g={NONE:0,BINARY:1};P.CMapCompressionType=g;const N={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,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};P.OPS=N;const s={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};P.PasswordResponses=s;let u=l.WARNINGS;function F(Ie){Number.isInteger(Ie)&&(u=Ie)}function U(){return u}function O(Ie){u>=l.INFOS&&console.log(`Info: ${Ie}`)}function m(Ie){u>=l.WARNINGS&&console.log(`Warning: ${Ie}`)}function x(Ie){throw new Error(Ie)}function y(Ie,ue){Ie||x(ue)}function r(Ie){switch(Ie==null?void 0:Ie.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function p(Ie,ue=null,me=null){if(!Ie)return null;try{if(me&&typeof Ie=="string"){if(me.addDefaultProtocol&&Ie.startsWith("www.")){const Fe=Ie.match(/\./g);(Fe==null?void 0:Fe.length)>=2&&(Ie=`http://${Ie}`)}if(me.tryConvertEncoding)try{Ie=V(Ie)}catch{}}const De=ue?new URL(Ie,ue):new URL(Ie);if(r(De))return De}catch{}return null}function c(Ie,ue,me,De=!1){return Object.defineProperty(Ie,ue,{value:me,enumerable:!De,configurable:!0,writable:!1}),me}const h=function(){function ue(me,De){this.constructor===ue&&x("Cannot initialize BaseException."),this.message=me,this.name=De}return ue.prototype=new Error,ue.constructor=ue,ue}();P.BaseException=h;class C extends h{constructor(ue,me){super(ue,"PasswordException"),this.code=me}}P.PasswordException=C;class D extends h{constructor(ue,me){super(ue,"UnknownErrorException"),this.details=me}}P.UnknownErrorException=D;class X extends h{constructor(ue){super(ue,"InvalidPDFException")}}P.InvalidPDFException=X;class q extends h{constructor(ue){super(ue,"MissingPDFException")}}P.MissingPDFException=q;class re extends h{constructor(ue,me){super(ue,"UnexpectedResponseException"),this.status=me}}P.UnexpectedResponseException=re;class K extends h{constructor(ue){super(ue,"FormatError")}}P.FormatError=K;class oe extends h{constructor(ue){super(ue,"AbortException")}}P.AbortException=oe;function J(Ie){(typeof Ie!="object"||(Ie==null?void 0:Ie.length)===void 0)&&x("Invalid argument for bytesToString");const ue=Ie.length,me=8192;if(ue<me)return String.fromCharCode.apply(null,Ie);const De=[];for(let Fe=0;Fe<ue;Fe+=me){const je=Math.min(Fe+me,ue),Ue=Ie.subarray(Fe,je);De.push(String.fromCharCode.apply(null,Ue))}return De.join("")}function te(Ie){typeof Ie!="string"&&x("Invalid argument for stringToBytes");const ue=Ie.length,me=new Uint8Array(ue);for(let De=0;De<ue;++De)me[De]=Ie.charCodeAt(De)&255;return me}function B(Ie){return String.fromCharCode(Ie>>24&255,Ie>>16&255,Ie>>8&255,Ie&255)}function j(Ie){return Object.keys(Ie).length}function Y(Ie){const ue=Object.create(null);for(const[me,De]of Ie)ue[me]=De;return ue}function W(){const Ie=new Uint8Array(4);return Ie[0]=1,new Uint32Array(Ie.buffer,0,1)[0]===1}function G(){try{return new Function(""),!0}catch{return!1}}class Q{static get isLittleEndian(){return c(this,"isLittleEndian",W())}static get isEvalSupported(){return c(this,"isEvalSupported",G())}static get isOffscreenCanvasSupported(){return c(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?c(this,"platform",{isWin:!1,isMac:!1}):c(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var ue,me;return c(this,"isCSSRoundSupported",(me=(ue=globalThis.CSS)==null?void 0:ue.supports)==null?void 0:me.call(ue,"width: round(1.5px, 1px)"))}}P.FeatureTest=Q;const ee=[...Array(256).keys()].map(Ie=>Ie.toString(16).padStart(2,"0"));class z{static makeHexColor(ue,me,De){return`#${ee[ue]}${ee[me]}${ee[De]}`}static scaleMinMax(ue,me){let De;ue[0]?(ue[0]<0&&(De=me[0],me[0]=me[1],me[1]=De),me[0]*=ue[0],me[1]*=ue[0],ue[3]<0&&(De=me[2],me[2]=me[3],me[3]=De),me[2]*=ue[3],me[3]*=ue[3]):(De=me[0],me[0]=me[2],me[2]=De,De=me[1],me[1]=me[3],me[3]=De,ue[1]<0&&(De=me[2],me[2]=me[3],me[3]=De),me[2]*=ue[1],me[3]*=ue[1],ue[2]<0&&(De=me[0],me[0]=me[1],me[1]=De),me[0]*=ue[2],me[1]*=ue[2]),me[0]+=ue[4],me[1]+=ue[4],me[2]+=ue[5],me[3]+=ue[5]}static transform(ue,me){return[ue[0]*me[0]+ue[2]*me[1],ue[1]*me[0]+ue[3]*me[1],ue[0]*me[2]+ue[2]*me[3],ue[1]*me[2]+ue[3]*me[3],ue[0]*me[4]+ue[2]*me[5]+ue[4],ue[1]*me[4]+ue[3]*me[5]+ue[5]]}static applyTransform(ue,me){const De=ue[0]*me[0]+ue[1]*me[2]+me[4],Fe=ue[0]*me[1]+ue[1]*me[3]+me[5];return[De,Fe]}static applyInverseTransform(ue,me){const De=me[0]*me[3]-me[1]*me[2],Fe=(ue[0]*me[3]-ue[1]*me[2]+me[2]*me[5]-me[4]*me[3])/De,je=(-ue[0]*me[1]+ue[1]*me[0]+me[4]*me[1]-me[5]*me[0])/De;return[Fe,je]}static getAxialAlignedBoundingBox(ue,me){const De=this.applyTransform(ue,me),Fe=this.applyTransform(ue.slice(2,4),me),je=this.applyTransform([ue[0],ue[3]],me),Ue=this.applyTransform([ue[2],ue[1]],me);return[Math.min(De[0],Fe[0],je[0],Ue[0]),Math.min(De[1],Fe[1],je[1],Ue[1]),Math.max(De[0],Fe[0],je[0],Ue[0]),Math.max(De[1],Fe[1],je[1],Ue[1])]}static inverseTransform(ue){const me=ue[0]*ue[3]-ue[1]*ue[2];return[ue[3]/me,-ue[1]/me,-ue[2]/me,ue[0]/me,(ue[2]*ue[5]-ue[4]*ue[3])/me,(ue[4]*ue[1]-ue[5]*ue[0])/me]}static singularValueDecompose2dScale(ue){const me=[ue[0],ue[2],ue[1],ue[3]],De=ue[0]*me[0]+ue[1]*me[2],Fe=ue[0]*me[1]+ue[1]*me[3],je=ue[2]*me[0]+ue[3]*me[2],Ue=ue[2]*me[1]+ue[3]*me[3],ht=(De+Ue)/2,_e=Math.sqrt((De+Ue)**2-4*(De*Ue-je*Fe))/2,st=ht+_e||1,Je=ht-_e||1;return[Math.sqrt(st),Math.sqrt(Je)]}static normalizeRect(ue){const me=ue.slice(0);return ue[0]>ue[2]&&(me[0]=ue[2],me[2]=ue[0]),ue[1]>ue[3]&&(me[1]=ue[3],me[3]=ue[1]),me}static intersect(ue,me){const De=Math.max(Math.min(ue[0],ue[2]),Math.min(me[0],me[2])),Fe=Math.min(Math.max(ue[0],ue[2]),Math.max(me[0],me[2]));if(De>Fe)return null;const je=Math.max(Math.min(ue[1],ue[3]),Math.min(me[1],me[3])),Ue=Math.min(Math.max(ue[1],ue[3]),Math.max(me[1],me[3]));return je>Ue?null:[De,je,Fe,Ue]}static bezierBoundingBox(ue,me,De,Fe,je,Ue,ht,_e){const st=[],Je=[[],[]];let be,he,ye,Se,Oe,Re,Ne,Ye;for(let tt=0;tt<2;++tt){if(tt===0?(he=6*ue-12*De+6*je,be=-3*ue+9*De-9*je+3*ht,ye=3*De-3*ue):(he=6*me-12*Fe+6*Ue,be=-3*me+9*Fe-9*Ue+3*_e,ye=3*Fe-3*me),Math.abs(be)<1e-12){if(Math.abs(he)<1e-12)continue;Se=-ye/he,0<Se&&Se<1&&st.push(Se);continue}Ne=he*he-4*ye*be,Ye=Math.sqrt(Ne),!(Ne<0)&&(Oe=(-he+Ye)/(2*be),0<Oe&&Oe<1&&st.push(Oe),Re=(-he-Ye)/(2*be),0<Re&&Re<1&&st.push(Re))}let Ge=st.length,ze;const Qe=Ge;for(;Ge--;)Se=st[Ge],ze=1-Se,Je[0][Ge]=ze*ze*ze*ue+3*ze*ze*Se*De+3*ze*Se*Se*je+Se*Se*Se*ht,Je[1][Ge]=ze*ze*ze*me+3*ze*ze*Se*Fe+3*ze*Se*Se*Ue+Se*Se*Se*_e;return Je[0][Qe]=ue,Je[1][Qe]=me,Je[0][Qe+1]=ht,Je[1][Qe+1]=_e,Je[0].length=Je[1].length=Qe+2,[Math.min(...Je[0]),Math.min(...Je[1]),Math.max(...Je[0]),Math.max(...Je[1])]}}P.Util=z;const se=[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 ne(Ie){if(Ie[0]>="ï"){let me;if(Ie[0]==="þ"&&Ie[1]==="ÿ"?me="utf-16be":Ie[0]==="ÿ"&&Ie[1]==="þ"?me="utf-16le":Ie[0]==="ï"&&Ie[1]==="»"&&Ie[2]==="¿"&&(me="utf-8"),me)try{const De=new TextDecoder(me,{fatal:!0}),Fe=te(Ie);return De.decode(Fe)}catch(De){m(`stringToPDFString: "${De}".`)}}const ue=[];for(let me=0,De=Ie.length;me<De;me++){const Fe=se[Ie.charCodeAt(me)];ue.push(Fe?String.fromCharCode(Fe):Ie.charAt(me))}return ue.join("")}function V(Ie){return decodeURIComponent(escape(Ie))}function ae(Ie){return unescape(encodeURIComponent(Ie))}function ce(Ie){return typeof Ie=="object"&&(Ie==null?void 0:Ie.byteLength)!==void 0}function de(Ie,ue){if(Ie.length!==ue.length)return!1;for(let me=0,De=Ie.length;me<De;me++)if(Ie[me]!==ue[me])return!1;return!0}function Ae(Ie=new Date){return[Ie.getUTCFullYear().toString(),(Ie.getUTCMonth()+1).toString().padStart(2,"0"),Ie.getUTCDate().toString().padStart(2,"0"),Ie.getUTCHours().toString().padStart(2,"0"),Ie.getUTCMinutes().toString().padStart(2,"0"),Ie.getUTCSeconds().toString().padStart(2,"0")].join("")}class ve{constructor(){Ee(this,Le,!1);this.promise=new Promise((ue,me)=>{this.resolve=De=>{$e(this,Le,!0),ue(De)},this.reject=De=>{$e(this,Le,!0),me(De)}})}get settled(){return le(this,Le)}}Le=new WeakMap,P.PromiseCapability=ve;let pe=null,ge=null;function fe(Ie){return pe||(pe=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,ge=new Map([["ſt","ſt"]])),Ie.replaceAll(pe,(ue,me,De)=>me?me.normalize("NFKC"):ge.get(De))}function xe(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const Ie=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(Ie);else for(let ue=0;ue<32;ue++)Ie[ue]=Math.floor(Math.random()*255);return J(Ie)}const Te="pdfjs_internal_id_";P.AnnotationPrefix=Te},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XRefParseException=P.XRefEntryException=P.ParserEOFException=P.PDF_VERSION_REGEXP=P.MissingDataException=void 0,P.arrayBuffersToBytes=T,P.collectActions=l,P.encodeToXmlString=N,P.escapePDFName=H,P.escapeString=A,P.getInheritableProperty=d,P.getLookupTableFactory=t,P.getNewAnnotationsMap=O,P.getRotationMatrix=r,P.isAscii=m,P.isWhiteSpace=M,P.log2=S,P.numberToString=U,P.parseXFAPath=_,P.readInt8=w,P.readUint16=v,P.readUint32=b,P.recoverJsURL=F,P.stringToUTF16HexString=x,P.stringToUTF16String=y,P.toRomanNumerals=i,P.validateCSSFont=u,P.validateFontName=s;var n=ie(2),k=ie(4),R=ie(5);const e=/^[1-9]\.\d$/;P.PDF_VERSION_REGEXP=e;function t(p){let c;return function(){return p&&(c=Object.create(null),p(c),p=null),c}}class o extends n.BaseException{constructor(c,h){super(`Missing data [${c}, ${h})`,"MissingDataException"),this.begin=c,this.end=h}}P.MissingDataException=o;class $ extends n.BaseException{constructor(c){super(c,"ParserEOFException")}}P.ParserEOFException=$;class L extends n.BaseException{constructor(c){super(c,"XRefEntryException")}}P.XRefEntryException=L;class I extends n.BaseException{constructor(c){super(c,"XRefParseException")}}P.XRefParseException=I;function T(p){const c=p.length;if(c===0)return new Uint8Array(0);if(c===1)return new Uint8Array(p[0]);let h=0;for(let X=0;X<c;X++)h+=p[X].byteLength;const C=new Uint8Array(h);let D=0;for(let X=0;X<c;X++){const q=new Uint8Array(p[X]);C.set(q,D),D+=q.byteLength}return C}function d({dict:p,key:c,getArray:h=!1,stopWhenFound:C=!0}){let D;const X=new k.RefSet;for(;p instanceof k.Dict&&!(p.objId&&X.has(p.objId));){p.objId&&X.put(p.objId);const q=h?p.getArray(c):p.get(c);if(q!==void 0){if(C)return q;(D||(D=[])).push(q)}p=p.get("Parent")}return D}const f=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function i(p,c=!1){(0,n.assert)(Number.isInteger(p)&&p>0,"The number should be a positive integer.");const h=[];let C;for(;p>=1e3;)p-=1e3,h.push("M");C=p/100|0,p%=100,h.push(f[C]),C=p/10|0,p%=10,h.push(f[10+C]),h.push(f[20+p]);const D=h.join("");return c?D.toLowerCase():D}function S(p){return p<=0?0:Math.ceil(Math.log2(p))}function w(p,c){return p[c]<<24>>24}function v(p,c){return p[c]<<8|p[c+1]}function b(p,c){return(p[c]<<24|p[c+1]<<16|p[c+2]<<8|p[c+3])>>>0}function M(p){return p===32||p===9||p===13||p===10}function _(p){const c=/(.+)\[(\d+)\]$/;return p.split(".").map(h=>{const C=h.match(c);return C?{name:C[1],pos:parseInt(C[2],10)}:{name:h,pos:0}})}function H(p){const c=[];let h=0;for(let C=0,D=p.length;C<D;C++){const X=p.charCodeAt(C);(X<33||X>126||X===35||X===40||X===41||X===60||X===62||X===91||X===93||X===123||X===125||X===47||X===37)&&(h<C&&c.push(p.substring(h,C)),c.push(`#${X.toString(16)}`),h=C+1)}return c.length===0?p:(h<p.length&&c.push(p.substring(h,p.length)),c.join(""))}function A(p){return p.replaceAll(/([()\\\n\r])/g,c=>c===`
`?"\\n":c==="\r"?"\\r":`\\${c}`)}function E(p,c,h,C){if(!p)return;let D=null;if(p instanceof k.Ref){if(C.has(p))return;D=p,C.put(D),p=c.fetch(p)}if(Array.isArray(p))for(const X of p)E(X,c,h,C);else if(p instanceof k.Dict){if((0,k.isName)(p.get("S"),"JavaScript")){const X=p.get("JS");let q;X instanceof R.BaseStream?q=X.getString():typeof X=="string"&&(q=X),q&&(q=(0,n.stringToPDFString)(q).replaceAll("\0","")),q&&h.push(q)}E(p.getRaw("Next"),c,h,C)}D&&C.remove(D)}function l(p,c,h){const C=Object.create(null),D=d({dict:c,key:"AA",stopWhenFound:!1});if(D)for(let X=D.length-1;X>=0;X--){const q=D[X];if(q instanceof k.Dict)for(const re of q.getKeys()){const K=h[re];if(!K)continue;const oe=q.getRaw(re),J=new k.RefSet,te=[];E(oe,p,te,J),te.length>0&&(C[K]=te)}}if(c.has("A")){const X=c.get("A"),q=new k.RefSet,re=[];E(X,p,re,q),re.length>0&&(C.Action=re)}return(0,n.objectSize)(C)>0?C:null}const g={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function N(p){const c=[];let h=0;for(let C=0,D=p.length;C<D;C++){const X=p.codePointAt(C);if(32<=X&&X<=126){const q=g[X];q&&(h<C&&c.push(p.substring(h,C)),c.push(q),h=C+1)}else h<C&&c.push(p.substring(h,C)),c.push(`&#x${X.toString(16).toUpperCase()};`),X>55295&&(X<57344||X>65533)&&C++,h=C+1}return c.length===0?p:(h<p.length&&c.push(p.substring(h,p.length)),c.join(""))}function s(p,c=!1){const h=/^("|').*("|')$/.exec(p);if(h&&h[1]===h[2]){if(new RegExp(`[^\\\\]${h[1]}`).test(p.slice(1,-1)))return c&&(0,n.warn)(`FontFamily contains unescaped ${h[1]}: ${p}.`),!1}else for(const C of p.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(C)||!/^[\w-\\]+$/.test(C))return c&&(0,n.warn)(`FontFamily contains invalid <custom-ident>: ${p}.`),!1;return!0}function u(p){const c="14",h="400",C=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:D,fontWeight:X,italicAngle:q}=p;if(!s(D,!0))return!1;const re=X?X.toString():"";p.fontWeight=C.has(re)?re:h;const K=parseFloat(q);return p.italicAngle=isNaN(K)||K<-90||K>90?c:q.toString(),!0}function F(p){const c=["app.launchURL","window.open","xfa.host.gotoURL"],C=new RegExp("^\\s*("+c.join("|").replaceAll(".","\\.")+`)\\((?:'|")([^'"]*)(?:'|")(?:,\\s*(\\w+)\\)|\\))`,"i").exec(p);if(C!=null&&C[2]){const D=C[2];let X=!1;return C[3]==="true"&&C[1]==="app.launchURL"&&(X=!0),{url:D,newWindow:X}}return null}function U(p){if(Number.isInteger(p))return p.toString();const c=Math.round(p*100);return c%100===0?(c/100).toString():c%10===0?p.toFixed(1):p.toFixed(2)}function O(p){if(!p)return null;const c=new Map;for(const[h,C]of p){if(!h.startsWith(n.AnnotationEditorPrefix))continue;let D=c.get(C.pageIndex);D||(D=[],c.set(C.pageIndex,D)),D.push(C)}return c.size>0?c:null}function m(p){return/^[\x00-\x7F]*$/.test(p)}function x(p){const c=[];for(let h=0,C=p.length;h<C;h++){const D=p.charCodeAt(h);c.push((D>>8&255).toString(16).padStart(2,"0"),(D&255).toString(16).padStart(2,"0"))}return c.join("")}function y(p,c=!1){const h=[];c&&h.push("þÿ");for(let C=0,D=p.length;C<D;C++){const X=p.charCodeAt(C);h.push(String.fromCharCode(X>>8&255),String.fromCharCode(X&255))}return h.join("")}function r(p,c,h){switch(p){case 90:return[0,1,-1,0,c,0];case 180:return[-1,0,0,-1,c,h];case 270:return[0,-1,1,0,0,h];default:throw new Error("Invalid rotation")}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RefSetCache=P.RefSet=P.Ref=P.Name=P.EOF=P.Dict=P.Cmd=P.CIRCULAR_REF=void 0,P.clearPrimitiveCaches=$,P.isCmd=v,P.isDict=b,P.isName=w,P.isRefsEqual=M;var n=ie(2);const k=Symbol("CIRCULAR_REF");P.CIRCULAR_REF=k;const R=Symbol("EOF");P.EOF=R;let e=Object.create(null),t=Object.create(null),o=Object.create(null);function $(){e=Object.create(null),t=Object.create(null),o=Object.create(null)}class L{constructor(H){this.name=H}static get(H){return t[H]||(t[H]=new L(H))}}P.Name=L;class I{constructor(H){this.cmd=H}static get(H){return e[H]||(e[H]=new I(H))}}P.Cmd=I;const T=function(){return T};class d{constructor(H=null){this._map=Object.create(null),this.xref=H,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=T}assignXref(H){this.xref=H}get size(){return Object.keys(this._map).length}get(H,A,E){let l=this._map[H];return l===void 0&&A!==void 0&&(l=this._map[A],l===void 0&&E!==void 0&&(l=this._map[E])),l instanceof f&&this.xref?this.xref.fetch(l,this.suppressEncryption):l}async getAsync(H,A,E){let l=this._map[H];return l===void 0&&A!==void 0&&(l=this._map[A],l===void 0&&E!==void 0&&(l=this._map[E])),l instanceof f&&this.xref?this.xref.fetchAsync(l,this.suppressEncryption):l}getArray(H,A,E){let l=this._map[H];if(l===void 0&&A!==void 0&&(l=this._map[A],l===void 0&&E!==void 0&&(l=this._map[E])),l instanceof f&&this.xref&&(l=this.xref.fetch(l,this.suppressEncryption)),Array.isArray(l)){l=l.slice();for(let g=0,N=l.length;g<N;g++)l[g]instanceof f&&this.xref&&(l[g]=this.xref.fetch(l[g],this.suppressEncryption))}return l}getRaw(H){return this._map[H]}getKeys(){return Object.keys(this._map)}getRawValues(){return Object.values(this._map)}set(H,A){this._map[H]=A}has(H){return this._map[H]!==void 0}forEach(H){for(const A in this._map)H(A,this.get(A))}static get empty(){const H=new d(null);return H.set=(A,E)=>{(0,n.unreachable)("Should not call `set` on the empty dictionary.")},(0,n.shadow)(this,"empty",H)}static merge({xref:H,dictArray:A,mergeSubDicts:E=!1}){const l=new d(H),g=new Map;for(const N of A)if(N instanceof d)for(const[s,u]of Object.entries(N._map)){let F=g.get(s);if(F===void 0)F=[],g.set(s,F);else if(!E||!(u instanceof d))continue;F.push(u)}for(const[N,s]of g){if(s.length===1||!(s[0]instanceof d)){l._map[N]=s[0];continue}const u=new d(H);for(const F of s)for(const[U,O]of Object.entries(F._map))u._map[U]===void 0&&(u._map[U]=O);u.size>0&&(l._map[N]=u)}return g.clear(),l.size>0?l:d.empty}clone(){const H=new d(this.xref);for(const A of this.getKeys())H.set(A,this.getRaw(A));return H}}P.Dict=d;class f{constructor(H,A){this.num=H,this.gen=A}toString(){return this.gen===0?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(H){const A=o[H];if(A)return A;const E=/^(\d+)R(\d*)$/.exec(H);return!E||E[1]==="0"?null:o[H]=new f(parseInt(E[1]),E[2]?parseInt(E[2]):0)}static get(H,A){const E=A===0?`${H}R`:`${H}R${A}`;return o[E]||(o[E]=new f(H,A))}}P.Ref=f;class i{constructor(H=null){this._set=new Set(H==null?void 0:H._set)}has(H){return this._set.has(H.toString())}put(H){this._set.add(H.toString())}remove(H){this._set.delete(H.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}P.RefSet=i;class S{constructor(){this._map=new Map}get size(){return this._map.size}get(H){return this._map.get(H.toString())}has(H){return this._map.has(H.toString())}put(H,A){this._map.set(H.toString(),A)}putAlias(H,A){this._map.set(H.toString(),this.get(A))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}}P.RefSetCache=S;function w(_,H){return _ instanceof L&&(H===void 0||_.name===H)}function v(_,H){return _ instanceof I&&(H===void 0||_.cmd===H)}function b(_,H){return _ instanceof d&&(H===void 0||w(_.get("Type"),H))}function M(_,H){return _.num===H.num&&_.gen===H.gen}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.BaseStream=void 0;var n=ie(2);class k{constructor(){this.constructor===k&&(0,n.unreachable)("Cannot initialize BaseStream.")}get length(){(0,n.unreachable)("Abstract getter `length` accessed")}get isEmpty(){(0,n.unreachable)("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return(0,n.shadow)(this,"isDataLoaded",!0)}getByte(){(0,n.unreachable)("Abstract method `getByte` called")}getBytes(e){(0,n.unreachable)("Abstract method `getBytes` called")}peekByte(){const e=this.getByte();return e!==-1&&this.pos--,e}peekBytes(e){const t=this.getBytes(e);return this.pos-=t.length,t}getUint16(){const e=this.getByte(),t=this.getByte();return e===-1||t===-1?-1:(e<<8)+t}getInt32(){const e=this.getByte(),t=this.getByte(),o=this.getByte(),$=this.getByte();return(e<<24)+(t<<16)+(o<<8)+$}getByteRange(e,t){(0,n.unreachable)("Abstract method `getByteRange` called")}getString(e){return(0,n.bytesToString)(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){(0,n.unreachable)("Abstract method `reset` called")}moveStart(){(0,n.unreachable)("Abstract method `moveStart` called")}makeSubStream(e,t,o=null){(0,n.unreachable)("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}P.BaseStream=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.NetworkPdfManager=P.LocalPdfManager=void 0;var n=ie(2),k=ie(7),R=ie(3),e=ie(9),t=ie(8);function o(T){if(T){const d=(0,n.createValidAbsoluteUrl)(T);if(d)return d.href;(0,n.warn)(`Invalid absolute docBaseUrl: "${T}".`)}return null}class ${constructor(d){var f;this.constructor===$&&(0,n.unreachable)("Cannot initialize BasePdfManager."),this._docBaseUrl=o(d.docBaseUrl),this._docId=d.docId,this._password=d.password,this.enableXfa=d.enableXfa,(f=d.evaluatorOptions).isOffscreenCanvasSupported&&(f.isOffscreenCanvasSupported=n.FeatureTest.isOffscreenCanvasSupported),this.evaluatorOptions=d.evaluatorOptions}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}get catalog(){return this.pdfDocument.catalog}ensureDoc(d,f){return this.ensure(this.pdfDocument,d,f)}ensureXRef(d,f){return this.ensure(this.pdfDocument.xref,d,f)}ensureCatalog(d,f){return this.ensure(this.pdfDocument.catalog,d,f)}getPage(d){return this.pdfDocument.getPage(d)}fontFallback(d,f){return this.pdfDocument.fontFallback(d,f)}loadXfaFonts(d,f){return this.pdfDocument.loadXfaFonts(d,f)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(d){return this.pdfDocument.serializeXfaData(d)}cleanup(d=!1){return this.pdfDocument.cleanup(d)}async ensure(d,f,i){(0,n.unreachable)("Abstract method `ensure` called")}requestRange(d,f){(0,n.unreachable)("Abstract method `requestRange` called")}requestLoadedStream(d=!1){(0,n.unreachable)("Abstract method `requestLoadedStream` called")}sendProgressiveData(d){(0,n.unreachable)("Abstract method `sendProgressiveData` called")}updatePassword(d){this._password=d}terminate(d){(0,n.unreachable)("Abstract method `terminate` called")}}class L extends ${constructor(d){super(d);const f=new t.Stream(d.source);this.pdfDocument=new e.PDFDocument(this,f),this._loadedStreamPromise=Promise.resolve(f)}async ensure(d,f,i){const S=d[f];return typeof S=="function"?S.apply(d,i):S}requestRange(d,f){return Promise.resolve()}requestLoadedStream(d=!1){return this._loadedStreamPromise}terminate(d){}}P.LocalPdfManager=L;class I extends ${constructor(d){super(d),this.streamManager=new k.ChunkedStreamManager(d.source,{msgHandler:d.handler,length:d.length,disableAutoFetch:d.disableAutoFetch,rangeChunkSize:d.rangeChunkSize}),this.pdfDocument=new e.PDFDocument(this,this.streamManager.getStream())}async ensure(d,f,i){try{const S=d[f];return typeof S=="function"?S.apply(d,i):S}catch(S){if(!(S instanceof R.MissingDataException))throw S;return await this.requestRange(S.begin,S.end),this.ensure(d,f,i)}}requestRange(d,f){return this.streamManager.requestRange(d,f)}requestLoadedStream(d=!1){return this.streamManager.requestAllChunks(d)}sendProgressiveData(d){this.streamManager.onReceiveData({chunk:d})}terminate(d){this.streamManager.abort(d)}}P.NetworkPdfManager=I},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ChunkedStreamManager=P.ChunkedStream=void 0;var n=ie(3),k=ie(2),R=ie(8);class e extends R.Stream{constructor($,L,I){super(new Uint8Array($),0,$,null),this.chunkSize=L,this._loadedChunks=new Set,this.numChunks=Math.ceil($/L),this.manager=I,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const $=[];for(let L=0,I=this.numChunks;L<I;++L)this._loadedChunks.has(L)||$.push(L);return $}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData($,L){const I=this.chunkSize;if($%I!==0)throw new Error(`Bad begin offset: ${$}`);const T=$+L.byteLength;if(T%I!==0&&T!==this.bytes.length)throw new Error(`Bad end offset: ${T}`);this.bytes.set(new Uint8Array(L),$);const d=Math.floor($/I),f=Math.floor((T-1)/I)+1;for(let i=d;i<f;++i)this._loadedChunks.add(i)}onReceiveProgressiveData($){let L=this.progressiveDataLength;const I=Math.floor(L/this.chunkSize);this.bytes.set(new Uint8Array($),L),L+=$.byteLength,this.progressiveDataLength=L;const T=L>=this.end?this.numChunks:Math.floor(L/this.chunkSize);for(let d=I;d<T;++d)this._loadedChunks.add(d)}ensureByte($){if($<this.progressiveDataLength)return;const L=Math.floor($/this.chunkSize);if(!(L>this.numChunks)&&L!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(L))throw new n.MissingDataException($,$+1);this.lastSuccessfulEnsureByteChunk=L}}ensureRange($,L){if($>=L||L<=this.progressiveDataLength)return;const I=Math.floor($/this.chunkSize);if(I>this.numChunks)return;const T=Math.min(Math.floor((L-1)/this.chunkSize)+1,this.numChunks);for(let d=I;d<T;++d)if(!this._loadedChunks.has(d))throw new n.MissingDataException($,L)}nextEmptyChunk($){const L=this.numChunks;for(let I=0;I<L;++I){const T=($+I)%L;if(!this._loadedChunks.has(T))return T}return null}hasChunk($){return this._loadedChunks.has($)}getByte(){const $=this.pos;return $>=this.end?-1:($>=this.progressiveDataLength&&this.ensureByte($),this.bytes[this.pos++])}getBytes($){const L=this.bytes,I=this.pos,T=this.end;if(!$)return T>this.progressiveDataLength&&this.ensureRange(I,T),L.subarray(I,T);let d=I+$;return d>T&&(d=T),d>this.progressiveDataLength&&this.ensureRange(I,d),this.pos=d,L.subarray(I,d)}getByteRange($,L){return $<0&&($=0),L>this.end&&(L=this.end),L>this.progressiveDataLength&&this.ensureRange($,L),this.bytes.subarray($,L)}makeSubStream($,L,I=null){L?$+L>this.progressiveDataLength&&this.ensureRange($,$+L):$>=this.progressiveDataLength&&this.ensureByte($);function T(){}T.prototype=Object.create(this),T.prototype.getMissingChunks=function(){const f=this.chunkSize,i=Math.floor(this.start/f),S=Math.floor((this.end-1)/f)+1,w=[];for(let v=i;v<S;++v)this._loadedChunks.has(v)||w.push(v);return w},Object.defineProperty(T.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks?!0:this.getMissingChunks().length===0},configurable:!0});const d=new T;return d.pos=d.start=$,d.end=$+L||this.end,d.dict=I,d}getBaseStreams(){return[this]}}P.ChunkedStream=e;class t{constructor($,L){this.length=L.length,this.chunkSize=L.rangeChunkSize,this.stream=new e(this.length,this.chunkSize,this),this.pdfNetworkStream=$,this.disableAutoFetch=L.disableAutoFetch,this.msgHandler=L.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=new k.PromiseCapability}sendRequest($,L){const I=this.pdfNetworkStream.getRangeReader($,L);I.isStreamingSupported||(I.onProgress=this.onProgress.bind(this));let T=[],d=0;return new Promise((f,i)=>{const S=({value:w,done:v})=>{try{if(v){const b=(0,n.arrayBuffersToBytes)(T);T=null,f(b);return}d+=w.byteLength,I.isStreamingSupported&&this.onProgress({loaded:d}),T.push(w),I.read().then(S,i)}catch(b){i(b)}};I.read().then(S,i)}).then(f=>{this.aborted||this.onReceiveData({chunk:f,begin:$})})}requestAllChunks($=!1){if(!$){const L=this.stream.getMissingChunks();this._requestChunks(L)}return this._loadedStreamCapability.promise}_requestChunks($){const L=this.currRequestId++,I=new Set;this._chunksNeededByRequest.set(L,I);for(const f of $)this.stream.hasChunk(f)||I.add(f);if(I.size===0)return Promise.resolve();const T=new k.PromiseCapability;this._promisesByRequest.set(L,T);const d=[];for(const f of I){let i=this._requestsByChunk.get(f);i||(i=[],this._requestsByChunk.set(f,i),d.push(f)),i.push(L)}if(d.length>0){const f=this.groupChunks(d);for(const i of f){const S=i.beginChunk*this.chunkSize,w=Math.min(i.endChunk*this.chunkSize,this.length);this.sendRequest(S,w).catch(T.reject)}}return T.promise.catch(f=>{if(!this.aborted)throw f})}getStream(){return this.stream}requestRange($,L){L=Math.min(L,this.length);const I=this.getBeginChunk($),T=this.getEndChunk(L),d=[];for(let f=I;f<T;++f)d.push(f);return this._requestChunks(d)}requestRanges($=[]){const L=[];for(const I of $){const T=this.getBeginChunk(I.begin),d=this.getEndChunk(I.end);for(let f=T;f<d;++f)L.includes(f)||L.push(f)}return L.sort(function(I,T){return I-T}),this._requestChunks(L)}groupChunks($){const L=[];let I=-1,T=-1;for(let d=0,f=$.length;d<f;++d){const i=$[d];I<0&&(I=i),T>=0&&T+1!==i&&(L.push({beginChunk:I,endChunk:T+1}),I=i),d+1===$.length&&L.push({beginChunk:I,endChunk:i+1}),T=i}return L}onProgress($){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+$.loaded,total:this.length})}onReceiveData($){const L=$.chunk,I=$.begin===void 0,T=I?this.progressiveDataLength:$.begin,d=T+L.byteLength,f=Math.floor(T/this.chunkSize),i=d<this.length?Math.floor(d/this.chunkSize):Math.ceil(d/this.chunkSize);I?(this.stream.onReceiveProgressiveData(L),this.progressiveDataLength=d):this.stream.onReceiveData(T,L),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const S=[];for(let w=f;w<i;++w){const v=this._requestsByChunk.get(w);if(v){this._requestsByChunk.delete(w);for(const b of v){const M=this._chunksNeededByRequest.get(b);M.has(w)&&M.delete(w),!(M.size>0)&&S.push(b)}}}if(!this.disableAutoFetch&&this._requestsByChunk.size===0){let w;if(this.stream.numChunksLoaded===1){const v=this.stream.numChunks-1;this.stream.hasChunk(v)||(w=v)}else w=this.stream.nextEmptyChunk(i);Number.isInteger(w)&&this._requestChunks([w])}for(const w of S){const v=this._promisesByRequest.get(w);this._promisesByRequest.delete(w),v.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError($){this._loadedStreamCapability.reject($)}getBeginChunk($){return Math.floor($/this.chunkSize)}getEndChunk($){return Math.floor(($-1)/this.chunkSize)+1}abort($){var L;this.aborted=!0,(L=this.pdfNetworkStream)==null||L.cancelAllRequests($);for(const I of this._promisesByRequest.values())I.reject($)}}P.ChunkedStreamManager=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.StringStream=P.Stream=P.NullStream=void 0;var n=ie(5),k=ie(2);class R extends n.BaseStream{constructor($,L,I,T){super(),this.bytes=$ instanceof Uint8Array?$:new Uint8Array($),this.start=L||0,this.pos=this.start,this.end=L+I||this.bytes.length,this.dict=T}get length(){return this.end-this.start}get isEmpty(){return this.length===0}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes($){const L=this.bytes,I=this.pos,T=this.end;if(!$)return L.subarray(I,T);let d=I+$;return d>T&&(d=T),this.pos=d,L.subarray(I,d)}getByteRange($,L){return $<0&&($=0),L>this.end&&(L=this.end),this.bytes.subarray($,L)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream($,L,I=null){return new R(this.bytes.buffer,$,L,I)}}P.Stream=R;class e extends R{constructor($){super((0,k.stringToBytes)($))}}P.StringStream=e;class t extends R{constructor(){super(new Uint8Array(0))}}P.NullStream=t},(ke,P,ie)=>{var m,qi,y,Vi;Object.defineProperty(P,"__esModule",{value:!0}),P.Page=P.PDFDocument=void 0;var n=ie(2),k=ie(10),R=ie(3),e=ie(4),t=ie(51),o=ie(5),$=ie(74),L=ie(66),I=ie(68),T=ie(102),d=ie(16),f=ie(8),i=ie(76),S=ie(64),w=ie(13),v=ie(18),b=ie(72),M=ie(73),_=ie(77),H=ie(103);const A=1,E=[0,0,612,792];class l{constructor({pdfManager:c,xref:h,pageIndex:C,pageDict:D,ref:X,globalIdFactory:q,fontCache:re,builtInCMapCache:K,standardFontDataCache:oe,globalImageCache:J,systemFontCache:te,nonBlendModesSet:B,xfaFactory:j}){Ee(this,m);this.pdfManager=c,this.pageIndex=C,this.pageDict=D,this.xref=h,this.ref=X,this.fontCache=re,this.builtInCMapCache=K,this.standardFontDataCache=oe,this.globalImageCache=J,this.systemFontCache=te,this.nonBlendModesSet=B,this.evaluatorOptions=c.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=j;const Y={obj:0};this._localIdFactory=class extends q{static createObjId(){return`p${C}_${++Y.obj}`}static getPageObjId(){return`p${X.toString()}`}}}_getInheritableProperty(c,h=!1){const C=(0,R.getInheritableProperty)({dict:this.pageDict,key:c,getArray:h,stopWhenFound:!1});return Array.isArray(C)?C.length===1||!(C[0]instanceof e.Dict)?C[0]:e.Dict.merge({xref:this.xref,dictArray:C}):C}get content(){return this.pageDict.getArray("Contents")}get resources(){const c=this._getInheritableProperty("Resources");return(0,n.shadow)(this,"resources",c instanceof e.Dict?c:e.Dict.empty)}_getBoundingBox(c){if(this.xfaData)return this.xfaData.bbox;let h=this._getInheritableProperty(c,!0);if(Array.isArray(h)&&h.length===4){if(h=n.Util.normalizeRect(h),h[2]-h[0]>0&&h[3]-h[1]>0)return h;(0,n.warn)(`Empty, or invalid, /${c} entry.`)}return null}get mediaBox(){return(0,n.shadow)(this,"mediaBox",this._getBoundingBox("MediaBox")||E)}get cropBox(){return(0,n.shadow)(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){let c=this.pageDict.get("UserUnit");return(typeof c!="number"||c<=0)&&(c=A),(0,n.shadow)(this,"userUnit",c)}get view(){const{cropBox:c,mediaBox:h}=this;if(c!==h&&!(0,n.isArrayEqual)(c,h)){const C=n.Util.intersect(c,h);if(C&&C[2]-C[0]>0&&C[3]-C[1]>0)return(0,n.shadow)(this,"view",C);(0,n.warn)("Empty /CropBox and /MediaBox intersection.")}return(0,n.shadow)(this,"view",h)}get rotate(){let c=this._getInheritableProperty("Rotate")||0;return c%90!==0?c=0:c>=360?c%=360:c<0&&(c=(c%360+360)%360),(0,n.shadow)(this,"rotate",c)}_onSubStreamError(c,h){if(this.evaluatorOptions.ignoreErrors){(0,n.warn)(`getContentStream - ignoring sub-stream (${h}): "${c}".`);return}throw c}getContentStream(){return this.pdfManager.ensure(this,"content").then(c=>c instanceof o.BaseStream?c:Array.isArray(c)?new v.StreamsSequenceStream(c,this._onSubStreamError.bind(this)):new f.NullStream)}get xfaData(){return(0,n.shadow)(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async saveNewAnnotations(c,h,C,D){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const X=new w.PartialEvaluator({xref:this.xref,handler:c,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),q=new e.RefSet,re=new e.RefSet;Me(this,m,qi).call(this,C,q,re);const K=this.pageDict,oe=this.annotations.filter(Y=>!(Y instanceof e.Ref&&q.has(Y))),J=await k.AnnotationFactory.saveNewAnnotations(X,h,C,D);for(const{ref:Y}of J.annotations)Y instanceof e.Ref&&!re.has(Y)&&oe.push(Y);const te=K.get("Annots");K.set("Annots",oe);const B=[];await(0,M.writeObject)(this.ref,K,B,this.xref),te&&K.set("Annots",te);const j=J.dependencies;return j.push({ref:this.ref,data:B.join("")},...J.annotations),j}save(c,h,C){const D=new w.PartialEvaluator({xref:this.xref,handler:c,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions});return this._parsedAnnotations.then(function(X){const q=[];for(const re of X)re.mustBePrinted(C)&&q.push(re.save(D,h,C).catch(function(K){return(0,n.warn)(`save - ignoring annotation data during "${h.name}" task: "${K}".`),null}));return Promise.all(q).then(function(re){return re.filter(K=>!!K)})})}loadResources(c){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then(()=>new i.ObjectLoader(this.resources,c,this.xref).load())}getOperatorList({handler:c,sink:h,task:C,intent:D,cacheKey:X,annotationStorage:q=null}){const re=this.getContentStream(),K=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),oe=new w.PartialEvaluator({xref:this.xref,handler:c,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),J=this.xfaFactory?null:(0,R.getNewAnnotationsMap)(q);let te=null,B=Promise.resolve(null);if(J){const W=J.get(this.pageIndex);if(W){const G=this.pdfManager.ensureDoc("annotationGlobals");let Q;const ee=new Set;for(const{bitmapId:se,bitmap:ne}of W)se&&!ne&&!ee.has(se)&&ee.add(se);const{isOffscreenCanvasSupported:z}=this.evaluatorOptions;if(ee.size>0){const se=W.slice();for(const[ne,V]of q)ne.startsWith(n.AnnotationEditorPrefix)&&V.bitmap&&ee.has(V.bitmapId)&&se.push(V);Q=k.AnnotationFactory.generateImages(se,this.xref,z)}else Q=k.AnnotationFactory.generateImages(W,this.xref,z);te=new e.RefSet,Me(this,m,qi).call(this,W,te,null),B=G.then(se=>se?k.AnnotationFactory.printNewAnnotations(se,oe,C,W,Q):null)}}const Y=Promise.all([re,K]).then(([W])=>{const G=new S.OperatorList(D,h);return c.send("StartRenderPage",{transparency:oe.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:X}),oe.getOperatorList({stream:W,task:C,resources:this.resources,operatorList:G}).then(function(){return G})});return Promise.all([Y,this._parsedAnnotations,B]).then(function([W,G,Q]){if(Q){G=G.filter(ae=>!(ae.ref&&te.has(ae.ref)));for(let ae=0,ce=Q.length;ae<ce;ae++){const de=Q[ae];if(de.refToReplace){const Ae=G.findIndex(ve=>ve.ref&&(0,e.isRefsEqual)(ve.ref,de.refToReplace));Ae>=0&&(G.splice(Ae,1,de),Q.splice(ae--,1),ce--)}}G=G.concat(Q)}if(G.length===0||D&n.RenderingIntentFlag.ANNOTATIONS_DISABLE)return W.flush(!0),{length:W.totalLength};const ee=!!(D&n.RenderingIntentFlag.ANNOTATIONS_FORMS),z=!!(D&n.RenderingIntentFlag.ANY),se=!!(D&n.RenderingIntentFlag.DISPLAY),ne=!!(D&n.RenderingIntentFlag.PRINT),V=[];for(const ae of G)(z||se&&ae.mustBeViewed(q,ee)||ne&&ae.mustBePrinted(q))&&V.push(ae.getOperatorList(oe,C,D,ee,q).catch(function(ce){return(0,n.warn)(`getOperatorList - ignoring annotation data during "${C.name}" task: "${ce}".`),{opList:null,separateForm:!1,separateCanvas:!1}}));return Promise.all(V).then(function(ae){let ce=!1,de=!1;for(const{opList:Ae,separateForm:ve,separateCanvas:pe}of ae)W.addOpList(Ae),ce||(ce=ve),de||(de=pe);return W.flush(!0,{form:ce,canvas:de}),{length:W.totalLength}})})}extractTextContent({handler:c,task:h,includeMarkedContent:C,disableNormalization:D,sink:X}){const q=this.getContentStream(),re=this.loadResources(["ExtGState","Font","Properties","XObject"]);return Promise.all([q,re]).then(([oe])=>new w.PartialEvaluator({xref:this.xref,handler:c,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}).getTextContent({stream:oe,task:h,resources:this.resources,includeMarkedContent:C,disableNormalization:D,sink:X,viewBox:this.view}))}async getStructTree(){const c=await this.pdfManager.ensureCatalog("structTreeRoot");return c?(await this._parsedAnnotations,(await this.pdfManager.ensure(this,"_parseStructTree",[c])).serializable):null}_parseStructTree(c){const h=new b.StructTreePage(c,this.pageDict);return h.parse(this.ref),h}async getAnnotationsData(c,h,C){const D=await this._parsedAnnotations;if(D.length===0)return D;const X=[],q=[];let re;const K=!!(C&n.RenderingIntentFlag.ANY),oe=!!(C&n.RenderingIntentFlag.DISPLAY),J=!!(C&n.RenderingIntentFlag.PRINT);for(const te of D){const B=K||oe&&te.viewable;(B||J&&te.printable)&&X.push(te.data),te.hasTextContent&&B&&(re||(re=new w.PartialEvaluator({xref:this.xref,handler:c,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions})),q.push(te.extractTextContent(re,h,[-1/0,-1/0,1/0,1/0]).catch(function(j){(0,n.warn)(`getAnnotationsData - ignoring textContent during "${h.name}" task: "${j}".`)})))}return await Promise.all(q),X}get annotations(){const c=this._getInheritableProperty("Annots");return(0,n.shadow)(this,"annotations",Array.isArray(c)?c:[])}get _parsedAnnotations(){const c=this.pdfManager.ensure(this,"annotations").then(async h=>{if(h.length===0)return h;const C=await this.pdfManager.ensureDoc("annotationGlobals");if(!C)return[];const D=[];for(const re of h)D.push(k.AnnotationFactory.create(this.xref,re,C,this._localIdFactory,!1,this.ref).catch(function(K){return(0,n.warn)(`_parsedAnnotations: "${K}".`),null}));const X=[];let q;for(const re of await Promise.all(D))if(re){if(re instanceof k.PopupAnnotation){(q||(q=[])).push(re);continue}X.push(re)}return q&&X.push(...q),X});return(0,n.shadow)(this,"_parsedAnnotations",c)}get jsActions(){const c=(0,R.collectActions)(this.xref,this.pageDict,n.PageActionEventType);return(0,n.shadow)(this,"jsActions",c)}}m=new WeakSet,qi=function(c,h,C){for(const D of c)if(D.id){const X=e.Ref.fromString(D.id);if(!X){(0,n.warn)(`A non-linked annotation cannot be modified: ${D.id}`);continue}if(D.deleted){h.put(X);continue}C==null||C.put(X),D.ref=X,delete D.id}},P.Page=l;const g=new Uint8Array([37,80,68,70,45]),N=new Uint8Array([115,116,97,114,116,120,114,101,102]),s=new Uint8Array([101,110,100,111,98,106]),u=1024,F="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";function U(p,c,h=1024,C=!1){const D=c.length,X=p.peekBytes(h),q=X.length-D;if(q<=0)return!1;if(C){const re=D-1;let K=X.length-1;for(;K>=re;){let oe=0;for(;oe<D&&X[K-oe]===c[re-oe];)oe++;if(oe>=D)return p.pos+=K-re,!0;K--}}else{let re=0;for(;re<=q;){let K=0;for(;K<D&&X[re+K]===c[K];)K++;if(K>=D)return p.pos+=re,!0;re++}}return!1}class O{constructor(c,h){Ee(this,y);if(h.length<=0)throw new n.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=c,this.stream=h,this.xref=new H.XRef(h,c),this._pagePromises=new Map,this._version=null;const C={font:0};this._globalIdFactory=class{static getDocId(){return`g_${c.docId}`}static createFontId(){return`f${++C.font}`}static createObjId(){(0,n.unreachable)("Abstract method `createObjId` called.")}static getPageObjId(){(0,n.unreachable)("Abstract method `getPageObjId` called.")}}}parse(c){this.xref.parse(c),this.catalog=new L.Catalog(this.pdfManager,this.xref)}get linearization(){let c=null;try{c=d.Linearization.create(this.stream)}catch(h){if(h instanceof R.MissingDataException)throw h;(0,n.info)(h)}return(0,n.shadow)(this,"linearization",c)}get startXRef(){const c=this.stream;let h=0;if(this.linearization)c.reset(),U(c,s)&&(h=c.pos+6-c.start);else{const D=N.length;let X=!1,q=c.end;for(;!X&&q>0;)q-=1024-D,q<0&&(q=0),c.pos=q,X=U(c,N,1024,!0);if(X){c.skip(9);let re;do re=c.getByte();while((0,R.isWhiteSpace)(re));let K="";for(;re>=32&&re<=57;)K+=String.fromCharCode(re),re=c.getByte();h=parseInt(K,10),isNaN(h)&&(h=0)}}return(0,n.shadow)(this,"startXRef",h)}checkHeader(){const c=this.stream;if(c.reset(),!U(c,g))return;c.moveStart(),c.skip(g.length);let h="",C;for(;(C=c.getByte())>32&&h.length<7;)h+=String.fromCharCode(C);R.PDF_VERSION_REGEXP.test(h)?this._version=h:(0,n.warn)(`Invalid PDF header version: ${h}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let c=0;return this.catalog.hasActualNumPages?c=this.catalog.numPages:this.xfaFactory?c=this.xfaFactory.getNumPages():this.linearization?c=this.linearization.numPages:c=this.catalog.numPages,(0,n.shadow)(this,"numPages",c)}_hasOnlyDocumentSignatures(c,h=0){return Array.isArray(c)?c.every(D=>{if(D=this.xref.fetchIfRef(D),!(D instanceof e.Dict))return!1;if(D.has("Kids"))return++h>10?((0,n.warn)("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this._hasOnlyDocumentSignatures(D.get("Kids"),h);const X=(0,e.isName)(D.get("FT"),"Sig"),q=D.get("Rect"),re=Array.isArray(q)&&q.every(K=>K===0);return X&&re}):!1}get _xfaStreams(){const c=this.catalog.acroForm;if(!c)return null;const h=c.get("XFA"),C={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(h instanceof o.BaseStream&&!h.isEmpty)return C["xdp:xdp"]=h,C;if(!Array.isArray(h)||h.length===0)return null;for(let D=0,X=h.length;D<X;D+=2){let q;if(D===0?q="xdp:xdp":D===X-2?q="/xdp:xdp":q=h[D],!C.hasOwnProperty(q))continue;const re=this.xref.fetchIfRef(h[D+1]);!(re instanceof o.BaseStream)||re.isEmpty||(C[q]=re)}return C}get xfaDatasets(){const c=this._xfaStreams;if(!c)return(0,n.shadow)(this,"xfaDatasets",null);for(const h of["datasets","xdp:xdp"]){const C=c[h];if(C)try{const D=(0,n.stringToUTF8String)(C.getString()),X={[h]:D};return(0,n.shadow)(this,"xfaDatasets",new T.DatasetReader(X))}catch{(0,n.warn)("XFA - Invalid utf-8 string.");break}}return(0,n.shadow)(this,"xfaDatasets",null)}get xfaData(){const c=this._xfaStreams;if(!c)return null;const h=Object.create(null);for(const[C,D]of Object.entries(c))if(D)try{h[C]=(0,n.stringToUTF8String)(D.getString())}catch{return(0,n.warn)("XFA - Invalid utf-8 string."),null}return h}get xfaFactory(){let c;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(c=this.xfaData),(0,n.shadow)(this,"xfaFactory",c?new _.XFAFactory(c):null)}get isPureXfa(){return this.xfaFactory?this.xfaFactory.isValid():!1}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async loadXfaImages(){const c=await this.pdfManager.ensureCatalog("xfaImages");if(!c)return;const h=c.getKeys();await new i.ObjectLoader(c,h,this.xref).load();const D=new Map;for(const X of h){const q=c.get(X);q instanceof o.BaseStream&&D.set(X,q.getBytes())}this.xfaFactory.setImages(D)}async loadXfaFonts(c,h){const C=await this.pdfManager.ensureCatalog("acroForm");if(!C)return;const D=await C.getAsync("DR");if(!(D instanceof e.Dict))return;await new i.ObjectLoader(D,["Font"],this.xref).load();const q=D.get("Font");if(!(q instanceof e.Dict))return;const re=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions);re.useSystemFonts=!1;const K=new w.PartialEvaluator({xref:this.xref,handler:c,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache,standardFontDataCache:this.catalog.standardFontDataCache,options:re}),oe=new S.OperatorList,J=[],te={get font(){return J.at(-1)},set font(G){J.push(G)},clone(){return this}},B=new Map;q.forEach((G,Q)=>{B.set(G,Q)});const j=[];for(const[G,Q]of B){const ee=Q.get("FontDescriptor");if(!(ee instanceof e.Dict))continue;let z=ee.get("FontFamily");z=z.replaceAll(/[ ]+(\d)/g,"$1");const se=ee.get("FontWeight"),ne=-ee.get("ItalicAngle"),V={fontFamily:z,fontWeight:se,italicAngle:ne};(0,R.validateCSSFont)(V)&&j.push(K.handleSetFont(D,[e.Name.get(G),1],null,oe,h,te,null,V).catch(function(ae){return(0,n.warn)(`loadXfaFonts: "${ae}".`),null}))}await Promise.all(j);const Y=this.xfaFactory.setFonts(J);if(!Y)return;re.ignoreErrors=!0,j.length=0,J.length=0;const W=new Set;for(const G of Y)(0,t.getXfaFontName)(`${G}-Regular`)||W.add(G);W.size&&Y.push("PdfJS-Fallback");for(const G of Y)if(!W.has(G))for(const Q of[{name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const ee=`${G}-${Q.name}`,z=(0,t.getXfaFontDict)(ee);j.push(K.handleSetFont(D,[e.Name.get(ee),1],null,oe,h,te,z,{fontFamily:G,fontWeight:Q.fontWeight,italicAngle:Q.italicAngle}).catch(function(se){return(0,n.warn)(`loadXfaFonts: "${se}".`),null}))}await Promise.all(j),this.xfaFactory.appendFonts(J,W)}async serializeXfaData(c){return this.xfaFactory?this.xfaFactory.serializeData(c):null}get version(){return this.catalog.version||this._version}get formInfo(){const c={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},h=this.catalog.acroForm;if(!h)return(0,n.shadow)(this,"formInfo",c);try{const C=h.get("Fields"),D=Array.isArray(C)&&C.length>0;c.hasFields=D;const X=h.get("XFA");c.hasXfa=Array.isArray(X)&&X.length>0||X instanceof o.BaseStream&&!X.isEmpty;const re=!!(h.get("SigFlags")&1),K=re&&this._hasOnlyDocumentSignatures(C);c.hasAcroForm=D&&!K,c.hasSignatures=re}catch(C){if(C instanceof R.MissingDataException)throw C;(0,n.warn)(`Cannot fetch form information: "${C}".`)}return(0,n.shadow)(this,"formInfo",c)}get documentInfo(){const c={PDFFormatVersion:this.version,Language:this.catalog.lang,EncryptFilterName:this.xref.encrypt?this.xref.encrypt.filterName:null,IsLinearized:!!this.linearization,IsAcroFormPresent:this.formInfo.hasAcroForm,IsXFAPresent:this.formInfo.hasXfa,IsCollectionPresent:!!this.catalog.collection,IsSignaturesPresent:this.formInfo.hasSignatures};let h;try{h=this.xref.trailer.get("Info")}catch(C){if(C instanceof R.MissingDataException)throw C;(0,n.info)("The document information dictionary is invalid.")}if(!(h instanceof e.Dict))return(0,n.shadow)(this,"documentInfo",c);for(const C of h.getKeys()){const D=h.get(C);switch(C){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if(typeof D=="string"){c[C]=(0,n.stringToPDFString)(D);continue}break;case"Trapped":if(D instanceof e.Name){c[C]=D;continue}break;default:let X;switch(typeof D){case"string":X=(0,n.stringToPDFString)(D);break;case"number":case"boolean":X=D;break;default:D instanceof e.Name&&(X=D);break}if(X===void 0){(0,n.warn)(`Bad value, for custom key "${C}", in Info: ${D}.`);continue}c.Custom||(c.Custom=Object.create(null)),c.Custom[C]=X;continue}(0,n.warn)(`Bad value, for key "${C}", in Info: ${D}.`)}return(0,n.shadow)(this,"documentInfo",c)}get fingerprints(){function c(q){return typeof q=="string"&&q.length>0&&q!==F}function h(q){const re=[];for(const K of q){const oe=K.toString(16);re.push(oe.padStart(2,"0"))}return re.join("")}const C=this.xref.trailer.get("ID");let D,X;return Array.isArray(C)&&c(C[0])?(D=(0,n.stringToBytes)(C[0]),C[1]!==C[0]&&c(C[1])&&(X=(0,n.stringToBytes)(C[1]))):D=(0,$.calculateMD5)(this.stream.getByteRange(0,u),0,u),(0,n.shadow)(this,"fingerprints",[h(D),X?h(X):null])}async _getLinearizationPage(c){const{catalog:h,linearization:C,xref:D}=this,X=e.Ref.get(C.objectNumberFirst,0);try{const q=await D.fetchAsync(X);if(q instanceof e.Dict){let re=q.getRaw("Type");if(re instanceof e.Ref&&(re=await D.fetchAsync(re)),(0,e.isName)(re,"Page")||!q.has("Type")&&!q.has("Kids"))return h.pageKidsCountCache.has(X)||h.pageKidsCountCache.put(X,1),h.pageIndexCache.has(X)||h.pageIndexCache.put(X,0),[q,X]}throw new n.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(q){return(0,n.warn)(`_getLinearizationPage: "${q.message}".`),h.getPageDict(c)}}getPage(c){const h=this._pagePromises.get(c);if(h)return h;const{catalog:C,linearization:D,xfaFactory:X}=this;let q;return X?q=Promise.resolve([e.Dict.empty,null]):(D==null?void 0:D.pageFirst)===c?q=this._getLinearizationPage(c):q=C.getPageDict(c),q=q.then(([re,K])=>new l({pdfManager:this.pdfManager,xref:this.xref,pageIndex:c,pageDict:re,ref:K,globalIdFactory:this._globalIdFactory,fontCache:C.fontCache,builtInCMapCache:C.builtInCMapCache,standardFontDataCache:C.standardFontDataCache,globalImageCache:C.globalImageCache,systemFontCache:C.systemFontCache,nonBlendModesSet:C.nonBlendModesSet,xfaFactory:X})),this._pagePromises.set(c,q),q}async checkFirstPage(c=!1){if(!c)try{await this.getPage(0)}catch(h){if(h instanceof R.XRefEntryException)throw this._pagePromises.delete(0),await this.cleanup(),new R.XRefParseException}}async checkLastPage(c=!1){const{catalog:h,pdfManager:C}=this;h.setActualNumPages();let D;try{if(await Promise.all([C.ensureDoc("xfaFactory"),C.ensureDoc("linearization"),C.ensureCatalog("numPages")]),this.xfaFactory)return;if(this.linearization?D=this.linearization.numPages:D=h.numPages,Number.isInteger(D)){if(D<=1)return}else throw new n.FormatError("Page count is not an integer.");await this.getPage(D-1)}catch(X){if(this._pagePromises.delete(D-1),await this.cleanup(),X instanceof R.XRefEntryException&&!c)throw new R.XRefParseException;(0,n.warn)(`checkLastPage - invalid /Pages tree /Count: ${D}.`);let q;try{q=await h.getAllPageDicts(c)}catch(re){if(re instanceof R.XRefEntryException&&!c)throw new R.XRefParseException;h.setActualNumPages(1);return}for(const[re,[K,oe]]of q){let J;K instanceof Error?(J=Promise.reject(K),J.catch(()=>{})):J=Promise.resolve(new l({pdfManager:C,xref:this.xref,pageIndex:re,pageDict:K,ref:oe,globalIdFactory:this._globalIdFactory,fontCache:h.fontCache,builtInCMapCache:h.builtInCMapCache,standardFontDataCache:h.standardFontDataCache,globalImageCache:h.globalImageCache,systemFontCache:h.systemFontCache,nonBlendModesSet:h.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(re,J)}h.setActualNumPages(q.size)}}fontFallback(c,h){return this.catalog.fontFallback(c,h)}async cleanup(c=!1){return this.catalog?this.catalog.cleanup(c):(0,I.clearGlobalCaches)()}get fieldObjects(){if(!this.formInfo.hasFields)return(0,n.shadow)(this,"fieldObjects",Promise.resolve(null));const c=this.pdfManager.ensureDoc("annotationGlobals").then(async h=>{if(!h)return null;const C=Object.create(null),D=new Map;for(const q of this.catalog.acroForm.get("Fields"))Me(this,y,Vi).call(this,"",q,D,h);const X=[];for(const[q,re]of D)X.push(Promise.all(re).then(K=>{K=K.filter(oe=>!!oe),K.length>0&&(C[q]=K)}));return await Promise.all(X),C});return(0,n.shadow)(this,"fieldObjects",c)}get hasJSActions(){const c=this.pdfManager.ensureDoc("_parseHasJSActions");return(0,n.shadow)(this,"hasJSActions",c)}async _parseHasJSActions(){const[c,h]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return c?!0:h?Object.values(h).some(C=>C.some(D=>D.actions!==null)):!1}get calculationOrderIds(){const c=this.catalog.acroForm;if(!(c!=null&&c.has("CO")))return(0,n.shadow)(this,"calculationOrderIds",null);const h=c.get("CO");if(!Array.isArray(h)||h.length===0)return(0,n.shadow)(this,"calculationOrderIds",null);const C=[];for(const D of h)D instanceof e.Ref&&C.push(D.toString());return C.length===0?(0,n.shadow)(this,"calculationOrderIds",null):(0,n.shadow)(this,"calculationOrderIds",C)}get annotationGlobals(){return(0,n.shadow)(this,"annotationGlobals",k.AnnotationFactory.createGlobals(this.pdfManager))}}y=new WeakSet,Vi=function(c,h,C,D){const X=this.xref.fetchIfRef(h);if(X.has("T")){const q=(0,n.stringToPDFString)(X.get("T"));c=c===""?q:`${c}.${q}`}if(C.has(c)||C.set(c,[]),C.get(c).push(k.AnnotationFactory.create(this.xref,h,D,this._localIdFactory,!0,null).then(q=>q==null?void 0:q.getFieldObject()).catch(function(q){return(0,n.warn)(`#collectFieldObjects: "${q}".`),null})),X.has("Kids"))for(const q of X.get("Kids"))Me(this,y,Vi).call(this,c,q,C,D)},P.PDFDocument=O},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PopupAnnotation=P.MarkupAnnotation=P.AnnotationFactory=P.AnnotationBorderStyle=P.Annotation=void 0,P.getQuadPoints=_;var n=ie(2),k=ie(3),R=ie(11),e=ie(4),t=ie(8),o=ie(5),$=ie(60),L=ie(66),I=ie(12),T=ie(69),d=ie(26),f=ie(76),i=ie(64),S=ie(73),w=ie(77);class v{static createGlobals(B){return Promise.all([B.ensureCatalog("acroForm"),B.ensureDoc("xfaDatasets"),B.ensureCatalog("structTreeRoot"),B.ensureCatalog("baseUrl"),B.ensureCatalog("attachments")]).then(([j,Y,W,G,Q])=>({pdfManager:B,acroForm:j instanceof e.Dict?j:e.Dict.empty,xfaDatasets:Y,structTreeRoot:W,baseUrl:G,attachments:Q}),j=>((0,n.warn)(`createGlobals: "${j}".`),null))}static async create(B,j,Y,W,G,Q){const ee=G?await this._getPageIndex(B,j,Y.pdfManager):null;return Y.pdfManager.ensure(this,"_create",[B,j,Y,W,G,ee,Q])}static _create(B,j,Y,W,G=!1,Q=null,ee=null){const z=B.fetchIfRef(j);if(!(z instanceof e.Dict))return;const{acroForm:se,pdfManager:ne}=Y,V=j instanceof e.Ref?j.toString():`annot_${W.createObjId()}`;let ae=z.get("Subtype");ae=ae instanceof e.Name?ae.name:null;const ce={xref:B,ref:j,dict:z,subtype:ae,id:V,annotationGlobals:Y,collectFields:G,needAppearances:!G&&se.get("NeedAppearances")===!0,pageIndex:Q,evaluatorOptions:ne.evaluatorOptions,pageRef:ee};switch(ae){case"Link":return new O(ce);case"Text":return new U(ce);case"Widget":let de=(0,k.getInheritableProperty)({dict:z,key:"FT"});switch(de=de instanceof e.Name?de.name:null,de){case"Tx":return new N(ce);case"Btn":return new s(ce);case"Ch":return new u(ce);case"Sig":return new F(ce)}return(0,n.warn)(`Unimplemented widget field type "${de}", falling back to base field type.`),new g(ce);case"Popup":return new m(ce);case"FreeText":return new x(ce);case"Line":return new y(ce);case"Square":return new r(ce);case"Circle":return new p(ce);case"PolyLine":return new c(ce);case"Polygon":return new h(ce);case"Caret":return new C(ce);case"Ink":return new D(ce);case"Highlight":return new X(ce);case"Underline":return new q(ce);case"Squiggly":return new re(ce);case"StrikeOut":return new K(ce);case"Stamp":return new oe(ce);case"FileAttachment":return new J(ce);default:return G||(ae?(0,n.warn)(`Unimplemented annotation type "${ae}", falling back to base annotation.`):(0,n.warn)("Annotation is missing the required /Subtype.")),new A(ce)}}static async _getPageIndex(B,j,Y){try{const W=await B.fetchIfRefAsync(j);if(!(W instanceof e.Dict))return-1;const G=W.getRaw("P");if(G instanceof e.Ref)try{return await Y.ensureCatalog("getPageIndex",[G])}catch(ee){(0,n.info)(`_getPageIndex -- not a valid page reference: "${ee}".`)}if(W.has("Kids"))return-1;const Q=await Y.ensureDoc("numPages");for(let ee=0;ee<Q;ee++){const z=await Y.getPage(ee),se=await Y.ensure(z,"annotations");for(const ne of se)if(ne instanceof e.Ref&&(0,e.isRefsEqual)(ne,j))return ee}}catch(W){(0,n.warn)(`_getPageIndex: "${W}".`)}return-1}static generateImages(B,j,Y){if(!Y)return(0,n.warn)("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."),null;let W;for(const{bitmapId:G,bitmap:Q}of B)Q&&(W||(W=new Map),W.set(G,oe.createImage(Q,j)));return W}static async saveNewAnnotations(B,j,Y,W){const G=B.xref;let Q;const ee=[],z=[],{isOffscreenCanvasSupported:se}=B.options;for(const ne of Y)if(!ne.deleted)switch(ne.annotationType){case n.AnnotationEditorType.FREETEXT:if(!Q){const ae=new e.Dict(G);ae.set("BaseFont",e.Name.get("Helvetica")),ae.set("Type",e.Name.get("Font")),ae.set("Subtype",e.Name.get("Type1")),ae.set("Encoding",e.Name.get("WinAnsiEncoding"));const ce=[];Q=G.getNewTemporaryRef(),await(0,S.writeObject)(Q,ae,ce,G),ee.push({ref:Q,data:ce.join("")})}z.push(x.createNewAnnotation(G,ne,ee,{evaluator:B,task:j,baseFontRef:Q}));break;case n.AnnotationEditorType.INK:z.push(D.createNewAnnotation(G,ne,ee));break;case n.AnnotationEditorType.STAMP:if(!se)break;const V=await W.get(ne.bitmapId);if(V.imageStream){const{imageStream:ae,smaskStream:ce}=V,de=[];if(ce){const ve=G.getNewTemporaryRef();await(0,S.writeObject)(ve,ce,de,G),ee.push({ref:ve,data:de.join("")}),ae.dict.set("SMask",ve),de.length=0}const Ae=V.imageRef=G.getNewTemporaryRef();await(0,S.writeObject)(Ae,ae,de,G),ee.push({ref:Ae,data:de.join("")}),V.imageStream=V.smaskStream=null}z.push(oe.createNewAnnotation(G,ne,ee,{image:V}));break}return{annotations:await Promise.all(z),dependencies:ee}}static async printNewAnnotations(B,j,Y,W,G){if(!W)return null;const{options:Q,xref:ee}=j,z=[];for(const se of W)if(!se.deleted)switch(se.annotationType){case n.AnnotationEditorType.FREETEXT:z.push(x.createNewPrintAnnotation(B,ee,se,{evaluator:j,task:Y,evaluatorOptions:Q}));break;case n.AnnotationEditorType.INK:z.push(D.createNewPrintAnnotation(B,ee,se,{evaluatorOptions:Q}));break;case n.AnnotationEditorType.STAMP:if(!Q.isOffscreenCanvasSupported)break;const ne=await G.get(se.bitmapId);if(ne.imageStream){const{imageStream:V,smaskStream:ae}=ne;ae&&V.dict.set("SMask",ae),ne.imageRef=new d.JpegStream(V,V.length),ne.imageStream=ne.smaskStream=null}z.push(oe.createNewPrintAnnotation(B,ee,se,{image:ne,evaluatorOptions:Q}));break}return Promise.all(z)}}P.AnnotationFactory=v;function b(te,B=new Uint8ClampedArray(3)){if(!Array.isArray(te))return B;const j=B||new Uint8ClampedArray(3);switch(te.length){case 0:return null;case 1:return I.ColorSpace.singletons.gray.getRgbItem(te,0,j,0),j;case 3:return I.ColorSpace.singletons.rgb.getRgbItem(te,0,j,0),j;case 4:return I.ColorSpace.singletons.cmyk.getRgbItem(te,0,j,0),j;default:return B}}function M(te){return Array.from(te,B=>B/255)}function _(te,B){const j=te.getArray("QuadPoints");if(!Array.isArray(j)||j.length===0||j.length%8>0)return null;const Y=[];for(let W=0,G=j.length/8;W<G;W++){let Q=1/0,ee=-1/0,z=1/0,se=-1/0;for(let ne=W*8,V=W*8+8;ne<V;ne+=2){const ae=j[ne],ce=j[ne+1];Q=Math.min(ae,Q),ee=Math.max(ae,ee),z=Math.min(ce,z),se=Math.max(ce,se)}if(B!==null&&(Q<B[0]||ee>B[2]||z<B[1]||se>B[3]))return null;Y.push([{x:Q,y:se},{x:ee,y:se},{x:Q,y:z},{x:ee,y:z}])}return Y}function H(te,B,j){const[Y,W,G,Q]=n.Util.getAxialAlignedBoundingBox(B,j);if(Y===G||W===Q)return[1,0,0,1,te[0],te[1]];const ee=(te[2]-te[0])/(G-Y),z=(te[3]-te[1])/(Q-W);return[ee,0,0,z,te[0]-Y*ee,te[1]-W*z]}class A{constructor(B){const{dict:j,xref:Y,annotationGlobals:W}=B;this.setTitle(j.get("T")),this.setContents(j.get("Contents")),this.setModificationDate(j.get("M")),this.setFlags(j.get("F")),this.setRectangle(j.getArray("Rect")),this.setColor(j.getArray("C")),this.setBorderStyle(j),this.setAppearance(j),this.setOptionalContent(j);const G=j.get("MK");this.setBorderAndBackgroundColors(G),this.setRotation(G,j),this.ref=B.ref instanceof e.Ref?B.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);const Q=!!(this.flags&n.AnnotationFlag.LOCKED),ee=!!(this.flags&n.AnnotationFlag.LOCKEDCONTENTS);if(W.structTreeRoot){let z=j.get("StructParent");z=Number.isInteger(z)&&z>=0?z:-1,W.structTreeRoot.addAnnotationIdToPage(B.pageRef,z)}if(this.data={annotationFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:B.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:B.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&n.AnnotationFlag.NOROTATE),noHTML:Q&&ee},B.collectFields){const z=j.get("Kids");if(Array.isArray(z)){const se=[];for(const ne of z)ne instanceof e.Ref&&se.push(ne.toString());se.length!==0&&(this.data.kidIds=se)}this.data.actions=(0,k.collectActions)(Y,j,n.AnnotationActionEventType),this.data.fieldName=this._constructFieldName(j),this.data.pageIndex=B.pageIndex}this._isOffscreenCanvasSupported=B.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(B,j){return!!(B&j)}_isViewable(B){return!this._hasFlag(B,n.AnnotationFlag.INVISIBLE)&&!this._hasFlag(B,n.AnnotationFlag.NOVIEW)}_isPrintable(B){return this._hasFlag(B,n.AnnotationFlag.PRINT)&&!this._hasFlag(B,n.AnnotationFlag.HIDDEN)&&!this._hasFlag(B,n.AnnotationFlag.INVISIBLE)}mustBeViewed(B,j){var W;const Y=(W=B==null?void 0:B.get(this.data.id))==null?void 0:W.noView;return Y!==void 0?!Y:this.viewable&&!this._hasFlag(this.flags,n.AnnotationFlag.HIDDEN)}mustBePrinted(B){var Y;const j=(Y=B==null?void 0:B.get(this.data.id))==null?void 0:Y.noPrint;return j!==void 0?!j:this.printable}get viewable(){return this.data.quadPoints===null?!1:this.flags===0?!0:this._isViewable(this.flags)}get printable(){return this.data.quadPoints===null||this.flags===0?!1:this._isPrintable(this.flags)}_parseStringHelper(B){const j=typeof B=="string"?(0,n.stringToPDFString)(B):"",Y=j&&(0,$.bidi)(j).dir==="rtl"?"rtl":"ltr";return{str:j,dir:Y}}setDefaultAppearance(B){const{dict:j,annotationGlobals:Y}=B,W=(0,k.getInheritableProperty)({dict:j,key:"DA"})||Y.acroForm.get("DA");this._defaultAppearance=typeof W=="string"?W:"",this.data.defaultAppearanceData=(0,R.parseDefaultAppearance)(this._defaultAppearance)}setTitle(B){this._title=this._parseStringHelper(B)}setContents(B){this._contents=this._parseStringHelper(B)}setModificationDate(B){this.modificationDate=typeof B=="string"?B:null}setFlags(B){this.flags=Number.isInteger(B)&&B>0?B:0}hasFlag(B){return this._hasFlag(this.flags,B)}setRectangle(B){this.rectangle=Array.isArray(B)&&B.length===4?n.Util.normalizeRect(B):[0,0,0,0]}setColor(B){this.color=b(B)}setLineEndings(B){if(this.lineEndings=["None","None"],Array.isArray(B)&&B.length===2)for(let j=0;j<2;j++){const Y=B[j];if(Y instanceof e.Name)switch(Y.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[j]=Y.name;continue}(0,n.warn)(`Ignoring invalid lineEnding: ${Y}`)}}setRotation(B,j){this.rotation=0;let Y=B instanceof e.Dict?B.get("R")||0:j.get("Rotate")||0;Number.isInteger(Y)&&Y!==0&&(Y%=360,Y<0&&(Y+=360),Y%90===0&&(this.rotation=Y))}setBorderAndBackgroundColors(B){B instanceof e.Dict?(this.borderColor=b(B.getArray("BC"),null),this.backgroundColor=b(B.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(B){if(this.borderStyle=new E,B instanceof e.Dict)if(B.has("BS")){const j=B.get("BS"),Y=j.get("Type");(!Y||(0,e.isName)(Y,"Border"))&&(this.borderStyle.setWidth(j.get("W"),this.rectangle),this.borderStyle.setStyle(j.get("S")),this.borderStyle.setDashArray(j.getArray("D")))}else if(B.has("Border")){const j=B.getArray("Border");Array.isArray(j)&&j.length>=3&&(this.borderStyle.setHorizontalCornerRadius(j[0]),this.borderStyle.setVerticalCornerRadius(j[1]),this.borderStyle.setWidth(j[2],this.rectangle),j.length===4&&this.borderStyle.setDashArray(j[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(B){this.appearance=null;const j=B.get("AP");if(!(j instanceof e.Dict))return;const Y=j.get("N");if(Y instanceof o.BaseStream){this.appearance=Y;return}if(!(Y instanceof e.Dict))return;const W=B.get("AS");if(!(W instanceof e.Name)||!Y.has(W.name))return;const G=Y.get(W.name);G instanceof o.BaseStream&&(this.appearance=G)}setOptionalContent(B){this.oc=null;const j=B.get("OC");j instanceof e.Name?(0,n.warn)("setOptionalContent: Support for /Name-entry is not implemented."):j instanceof e.Dict&&(this.oc=j)}loadResources(B,j){return j.dict.getAsync("Resources").then(Y=>Y?new f.ObjectLoader(Y,B,Y.xref).load().then(function(){return Y}):void 0)}async getOperatorList(B,j,Y,W,G){const Q=this.data;let ee=this.appearance;const z=!!(this.data.hasOwnCanvas&&Y&n.RenderingIntentFlag.DISPLAY);if(!ee){if(!z)return{opList:new i.OperatorList,separateForm:!1,separateCanvas:!1};ee=new t.StringStream(""),ee.dict=new e.Dict}const se=ee.dict,ne=await this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],ee),V=se.getArray("BBox")||[0,0,1,1],ae=se.getArray("Matrix")||[1,0,0,1,0,0],ce=H(Q.rect,V,ae),de=new i.OperatorList;let Ae;return this.oc&&(Ae=await B.parseMarkedContentProps(this.oc,null)),Ae!==void 0&&de.addOp(n.OPS.beginMarkedContentProps,["OC",Ae]),de.addOp(n.OPS.beginAnnotation,[Q.id,Q.rect,ce,ae,z]),await B.getOperatorList({stream:ee,task:j,resources:ne,operatorList:de,fallbackFontDict:this._fallbackFontDict}),de.addOp(n.OPS.endAnnotation,[]),Ae!==void 0&&de.addOp(n.OPS.endMarkedContent,[]),this.reset(),{opList:de,separateForm:!1,separateCanvas:z}}async save(B,j,Y){return null}get hasTextContent(){return!1}async extractTextContent(B,j,Y){if(!this.appearance)return;const W=await this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance),G=[],Q=[];let ee=null;const z={desiredSize:Math.Infinity,ready:!0,enqueue(se,ne){for(const V of se.items)V.str!==void 0&&(ee||(ee=V.transform.slice(-2)),Q.push(V.str),V.hasEOL&&(G.push(Q.join("")),Q.length=0))}};if(await B.getTextContent({stream:this.appearance,task:j,resources:W,includeMarkedContent:!0,sink:z,viewBox:Y}),this.reset(),Q.length&&G.push(Q.join("")),G.length>1||G[0]){const se=this.appearance.dict,ne=se.getArray("BBox")||[0,0,1,1],V=se.getArray("Matrix")||[1,0,0,1,0,0],ae=this.data.rect,ce=H(ae,ne,V);ce[4]-=ae[0],ce[5]-=ae[1],ee=n.Util.applyTransform(ee,ce),ee=n.Util.applyTransform(ee,V),this.data.textPosition=ee,this.data.textContent=G}}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const B of this._streams)B.reset()}_constructFieldName(B){if(!B.has("T")&&!B.has("Parent"))return(0,n.warn)("Unknown field name, falling back to empty field name."),"";if(!B.has("Parent"))return(0,n.stringToPDFString)(B.get("T"));const j=[];B.has("T")&&j.unshift((0,n.stringToPDFString)(B.get("T")));let Y=B;const W=new e.RefSet;for(B.objId&&W.put(B.objId);Y.has("Parent")&&(Y=Y.get("Parent"),!(!(Y instanceof e.Dict)||Y.objId&&W.has(Y.objId)));)Y.objId&&W.put(Y.objId),Y.has("T")&&j.unshift((0,n.stringToPDFString)(Y.get("T")));return j.join(".")}}P.Annotation=A;class E{constructor(){this.width=1,this.style=n.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(B,j=[0,0,0,0]){if(B instanceof e.Name){this.width=0;return}if(typeof B=="number"){if(B>0){const Y=(j[2]-j[0])/2,W=(j[3]-j[1])/2;Y>0&&W>0&&(B>Y||B>W)&&((0,n.warn)(`AnnotationBorderStyle.setWidth - ignoring width: ${B}`),B=1)}this.width=B}}setStyle(B){if(B instanceof e.Name)switch(B.name){case"S":this.style=n.AnnotationBorderStyleType.SOLID;break;case"D":this.style=n.AnnotationBorderStyleType.DASHED;break;case"B":this.style=n.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=n.AnnotationBorderStyleType.INSET;break;case"U":this.style=n.AnnotationBorderStyleType.UNDERLINE;break}}setDashArray(B,j=!1){if(Array.isArray(B)&&B.length>0){let Y=!0,W=!0;for(const G of B)if(+G>=0)G>0&&(W=!1);else{Y=!1;break}Y&&!W?(this.dashArray=B,j&&this.setStyle(e.Name.get("D"))):this.width=0}else B&&(this.width=0)}setHorizontalCornerRadius(B){Number.isInteger(B)&&(this.horizontalCornerRadius=B)}setVerticalCornerRadius(B){Number.isInteger(B)&&(this.verticalCornerRadius=B)}}P.AnnotationBorderStyle=E;class l extends A{constructor(B){super(B);const{dict:j}=B;if(j.has("IRT")){const W=j.getRaw("IRT");this.data.inReplyTo=W instanceof e.Ref?W.toString():null;const G=j.get("RT");this.data.replyType=G instanceof e.Name?G.name:n.AnnotationReplyType.REPLY}let Y=null;if(this.data.replyType===n.AnnotationReplyType.GROUP){const W=j.get("IRT");this.setTitle(W.get("T")),this.data.titleObj=this._title,this.setContents(W.get("Contents")),this.data.contentsObj=this._contents,W.has("CreationDate")?(this.setCreationDate(W.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,W.has("M")?(this.setModificationDate(W.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,Y=W.getRaw("Popup"),W.has("C")?(this.setColor(W.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(j.get("CreationDate")),this.data.creationDate=this.creationDate,Y=j.getRaw("Popup"),j.has("C")||(this.data.color=null);this.data.popupRef=Y instanceof e.Ref?Y.toString():null,j.has("RC")&&(this.data.richText=w.XFAFactory.getRichTextAsHtml(j.get("RC")))}setCreationDate(B){this.creationDate=typeof B=="string"?B:null}_setDefaultAppearance({xref:B,extra:j,strokeColor:Y,fillColor:W,blendMode:G,strokeAlpha:Q,fillAlpha:ee,pointsCallback:z}){let se=Number.MAX_VALUE,ne=Number.MAX_VALUE,V=Number.MIN_VALUE,ae=Number.MIN_VALUE;const ce=["q"];j&&ce.push(j),Y&&ce.push(`${Y[0]} ${Y[1]} ${Y[2]} RG`),W&&ce.push(`${W[0]} ${W[1]} ${W[2]} rg`);let de=this.data.quadPoints;de||(de=[[{x:this.rectangle[0],y:this.rectangle[3]},{x:this.rectangle[2],y:this.rectangle[3]},{x:this.rectangle[0],y:this.rectangle[1]},{x:this.rectangle[2],y:this.rectangle[1]}]]);for(const Ie of de){const[ue,me,De,Fe]=z(ce,Ie);se=Math.min(se,ue),V=Math.max(V,me),ne=Math.min(ne,De),ae=Math.max(ae,Fe)}ce.push("Q");const Ae=new e.Dict(B),ve=new e.Dict(B);ve.set("Subtype",e.Name.get("Form"));const pe=new t.StringStream(ce.join(" "));pe.dict=ve,Ae.set("Fm0",pe);const ge=new e.Dict(B);G&&ge.set("BM",e.Name.get(G)),typeof Q=="number"&&ge.set("CA",Q),typeof ee=="number"&&ge.set("ca",ee);const fe=new e.Dict(B);fe.set("GS0",ge);const xe=new e.Dict(B);xe.set("ExtGState",fe),xe.set("XObject",Ae);const Te=new e.Dict(B);Te.set("Resources",xe);const Le=this.data.rect=[se,ne,V,ae];Te.set("BBox",Le),this.appearance=new t.StringStream("/GS0 gs /Fm0 Do"),this.appearance.dict=Te,this._streams.push(this.appearance,pe)}static async createNewAnnotation(B,j,Y,W){const G=j.ref||(j.ref=B.getNewTemporaryRef()),Q=await this.createNewAppearanceStream(j,B,W),ee=[];let z;if(Q){const se=B.getNewTemporaryRef();z=this.createNewDict(j,B,{apRef:se}),await(0,S.writeObject)(se,Q,ee,B),Y.push({ref:se,data:ee.join("")})}else z=this.createNewDict(j,B,{});return Number.isInteger(j.parentTreeId)&&z.set("StructParent",j.parentTreeId),ee.length=0,await(0,S.writeObject)(G,z,ee,B),{ref:G,data:ee.join("")}}static async createNewPrintAnnotation(B,j,Y,W){const G=await this.createNewAppearanceStream(Y,j,W),Q=this.createNewDict(Y,j,{ap:G}),ee=new this.prototype.constructor({dict:Q,xref:j,annotationGlobals:B,evaluatorOptions:W.evaluatorOptions});return Y.ref&&(ee.ref=ee.refToReplace=Y.ref),ee}}P.MarkupAnnotation=l;class g extends A{constructor(B){var ae;super(B);const{dict:j,xref:Y,annotationGlobals:W}=B,G=this.data;this._needAppearances=B.needAppearances,G.annotationType=n.AnnotationType.WIDGET,G.fieldName===void 0&&(G.fieldName=this._constructFieldName(j)),G.actions===void 0&&(G.actions=(0,k.collectActions)(Y,j,n.AnnotationActionEventType));let Q=(0,k.getInheritableProperty)({dict:j,key:"V",getArray:!0});G.fieldValue=this._decodeFormValue(Q);const ee=(0,k.getInheritableProperty)({dict:j,key:"DV",getArray:!0});if(G.defaultFieldValue=this._decodeFormValue(ee),Q===void 0&&W.xfaDatasets){const ce=this._title.str;ce&&(this._hasValueFromXFA=!0,G.fieldValue=Q=W.xfaDatasets.getValue(ce))}Q===void 0&&G.defaultFieldValue!==null&&(G.fieldValue=G.defaultFieldValue),G.alternativeText=(0,n.stringToPDFString)(j.get("TU")||""),this.setDefaultAppearance(B),G.hasAppearance||(G.hasAppearance=this._needAppearances&&G.fieldValue!==void 0&&G.fieldValue!==null);const z=(0,k.getInheritableProperty)({dict:j,key:"FT"});G.fieldType=z instanceof e.Name?z.name:null;const se=(0,k.getInheritableProperty)({dict:j,key:"DR"}),ne=W.acroForm.get("DR"),V=(ae=this.appearance)==null?void 0:ae.dict.get("Resources");this._fieldResources={localResources:se,acroFormResources:ne,appearanceResources:V,mergedResources:e.Dict.merge({xref:Y,dictArray:[se,V,ne],mergeSubDicts:!0})},G.fieldFlags=(0,k.getInheritableProperty)({dict:j,key:"Ff"}),(!Number.isInteger(G.fieldFlags)||G.fieldFlags<0)&&(G.fieldFlags=0),G.readOnly=this.hasFieldFlag(n.AnnotationFieldFlag.READONLY),G.required=this.hasFieldFlag(n.AnnotationFieldFlag.REQUIRED),G.hidden=this._hasFlag(G.annotationFlags,n.AnnotationFlag.HIDDEN)||this._hasFlag(G.annotationFlags,n.AnnotationFlag.NOVIEW)}_decodeFormValue(B){return Array.isArray(B)?B.filter(j=>typeof j=="string").map(j=>(0,n.stringToPDFString)(j)):B instanceof e.Name?(0,n.stringToPDFString)(B.name):typeof B=="string"?(0,n.stringToPDFString)(B):null}hasFieldFlag(B){return!!(this.data.fieldFlags&B)}_isViewable(B){return!this._hasFlag(B,n.AnnotationFlag.INVISIBLE)}mustBeViewed(B,j){return j?this.viewable:super.mustBeViewed(B,j)&&!this._hasFlag(this.flags,n.AnnotationFlag.NOVIEW)}getRotationMatrix(B){var G;let j=(G=B==null?void 0:B.get(this.data.id))==null?void 0:G.rotation;if(j===void 0&&(j=this.rotation),j===0)return n.IDENTITY_MATRIX;const Y=this.data.rect[2]-this.data.rect[0],W=this.data.rect[3]-this.data.rect[1];return(0,k.getRotationMatrix)(j,Y,W)}getBorderAndBackgroundAppearances(B){var ee;let j=(ee=B==null?void 0:B.get(this.data.id))==null?void 0:ee.rotation;if(j===void 0&&(j=this.rotation),!this.backgroundColor&&!this.borderColor)return"";const Y=this.data.rect[2]-this.data.rect[0],W=this.data.rect[3]-this.data.rect[1],G=j===0||j===180?`0 0 ${Y} ${W} re`:`0 0 ${W} ${Y} re`;let Q="";if(this.backgroundColor&&(Q=`${(0,R.getPdfColor)(this.backgroundColor,!0)} ${G} f `),this.borderColor){const z=this.borderStyle.width||1;Q+=`${z} w ${(0,R.getPdfColor)(this.borderColor,!1)} ${G} S `}return Q}async getOperatorList(B,j,Y,W,G){if(W&&!(this instanceof F)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new i.OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(B,j,Y,W,G);const Q=await this._getAppearance(B,j,Y,G);if(this.appearance&&Q===null)return super.getOperatorList(B,j,Y,W,G);const ee=new i.OperatorList;if(!this._defaultAppearance||Q===null)return{opList:ee,separateForm:!1,separateCanvas:!1};const z=!!(this.data.hasOwnCanvas&&Y&n.RenderingIntentFlag.DISPLAY),se=[1,0,0,1,0,0],ne=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],V=H(this.data.rect,ne,se);let ae;this.oc&&(ae=await B.parseMarkedContentProps(this.oc,null)),ae!==void 0&&ee.addOp(n.OPS.beginMarkedContentProps,["OC",ae]),ee.addOp(n.OPS.beginAnnotation,[this.data.id,this.data.rect,V,this.getRotationMatrix(G),z]);const ce=new t.StringStream(Q);return await B.getOperatorList({stream:ce,task:j,resources:this._fieldResources.mergedResources,operatorList:ee}),ee.addOp(n.OPS.endAnnotation,[]),ae!==void 0&&ee.addOp(n.OPS.endMarkedContent,[]),{opList:ee,separateForm:!1,separateCanvas:z}}_getMKDict(B){const j=new e.Dict(null);return B&&j.set("R",B),this.borderColor&&j.set("BC",M(this.borderColor)),this.backgroundColor&&j.set("BG",M(this.backgroundColor)),j.size>0?j:null}amendSavedDict(B,j){}async save(B,j,Y){const W=Y==null?void 0:Y.get(this.data.id);let G=W==null?void 0:W.value,Q=W==null?void 0:W.rotation;if(G===this.data.fieldValue||G===void 0){if(!this._hasValueFromXFA&&Q===void 0)return null;G||(G=this.data.fieldValue)}if(Q===void 0&&!this._hasValueFromXFA&&Array.isArray(G)&&Array.isArray(this.data.fieldValue)&&G.length===this.data.fieldValue.length&&G.every((pe,ge)=>pe===this.data.fieldValue[ge]))return null;Q===void 0&&(Q=this.rotation);let ee=null;if(!this._needAppearances&&(ee=await this._getAppearance(B,j,n.RenderingIntentFlag.SAVE,Y),ee===null))return null;let z=!1;ee!=null&&ee.needAppearances&&(z=!0,ee=null);const{xref:se}=B,ne=se.fetchIfRef(this.ref);if(!(ne instanceof e.Dict))return null;const V=new e.Dict(se);for(const pe of ne.getKeys())pe!=="AP"&&V.set(pe,ne.getRaw(pe));const ae={path:this.data.fieldName,value:G},ce=pe=>(0,k.isAscii)(pe)?pe:(0,k.stringToUTF16String)(pe,!0);V.set("V",Array.isArray(G)?G.map(ce):ce(G)),this.amendSavedDict(Y,V);const de=this._getMKDict(Q);de&&V.set("MK",de);const Ae=[],ve=[{ref:this.ref,data:"",xfa:ae,needAppearances:z}];if(ee!==null){const pe=se.getNewTemporaryRef(),ge=new e.Dict(se);V.set("AP",ge),ge.set("N",pe);const fe=this._getSaveFieldResources(se),xe=new t.StringStream(ee),Te=xe.dict=new e.Dict(se);Te.set("Subtype",e.Name.get("Form")),Te.set("Resources",fe),Te.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]);const Le=this.getRotationMatrix(Y);Le!==n.IDENTITY_MATRIX&&Te.set("Matrix",Le),await(0,S.writeObject)(pe,xe,Ae,se),ve.push({ref:pe,data:Ae.join(""),xfa:null,needAppearances:!1}),Ae.length=0}return V.set("M",`D:${(0,n.getModificationDate)()}`),await(0,S.writeObject)(this.ref,V,Ae,se),ve[0].data=Ae.join(""),ve}async _getAppearance(B,j,Y,W){if(this.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD))return null;const Q=W==null?void 0:W.get(this.data.id);let ee,z;if(Q&&(ee=Q.formattedValue||Q.value,z=Q.rotation),z===void 0&&ee===void 0&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const se=this.getBorderAndBackgroundAppearances(W);if(ee===void 0&&(ee=this.data.fieldValue,!ee))return`/Tx BMC q ${se}Q EMC`;if(Array.isArray(ee)&&ee.length===1&&(ee=ee[0]),(0,n.assert)(typeof ee=="string","Expected `value` to be a string."),ee=ee.trim(),this.data.combo){const je=this.data.options.find(({exportValue:Ue})=>ee===Ue);ee=(je==null?void 0:je.displayValue)||ee}if(ee==="")return`/Tx BMC q ${se}Q EMC`;z===void 0&&(z=this.rotation);let ne=-1,V;this.data.multiLine?(V=ee.split(/\r\n?|\n/).map(je=>je.normalize("NFC")),ne=V.length):V=[ee.replace(/\r\n?|\n/,"").normalize("NFC")];const ae=1,ce=2;let de=this.data.rect[3]-this.data.rect[1],Ae=this.data.rect[2]-this.data.rect[0];(z===90||z===270)&&([Ae,de]=[de,Ae]),this._defaultAppearance||(this.data.defaultAppearanceData=(0,R.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let ve=await g._getFontData(B,j,this.data.defaultAppearanceData,this._fieldResources.mergedResources),pe,ge,fe;const xe=[];let Te=!1;for(const je of V){const Ue=ve.encodeString(je);Ue.length>1&&(Te=!0),xe.push(Ue.join(""))}if(Te&&Y&n.RenderingIntentFlag.SAVE)return{needAppearances:!0};if(Te&&this._isOffscreenCanvasSupported){const je=this.data.comb?"monospace":"sans-serif",Ue=new R.FakeUnicodeFont(B.xref,je),ht=Ue.createFontResources(V.join("")),_e=ht.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const be=this._fieldResources.mergedResources.get("Font");for(const he of _e.getKeys())be.set(he,_e.getRaw(he))}else this._fieldResources.mergedResources.set("Font",_e);const st=Ue.fontName.name;ve=await g._getFontData(B,j,{fontName:st,fontSize:0},ht);for(let be=0,he=xe.length;be<he;be++)xe[be]=(0,k.stringToUTF16String)(V[be]);const Je=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=st,[pe,ge,fe]=this._computeFontSize(de-2*ae,Ae-2*ce,ee,ve,ne),this.data.defaultAppearanceData=Je}else this._isOffscreenCanvasSupported||(0,n.warn)("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."),[pe,ge,fe]=this._computeFontSize(de-2*ae,Ae-2*ce,ee,ve,ne);let Le=ve.descent;isNaN(Le)?Le=n.BASELINE_FACTOR*fe:Le=Math.max(n.BASELINE_FACTOR*fe,Math.abs(Le)*ge);const Ie=Math.min(Math.floor((de-ge)/2),ae),ue=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(pe,xe,ve,ge,Ae,de,ue,ce,Ie,Le,fe,W);if(this.data.comb)return this._getCombAppearance(pe,ve,xe[0],ge,Ae,de,ce,Ie,Le,fe,W);const me=Ie+Le;if(ue===0||ue>2)return`/Tx BMC q ${se}BT `+pe+` 1 0 0 1 ${(0,k.numberToString)(ce)} ${(0,k.numberToString)(me)} Tm (${(0,k.escapeString)(xe[0])}) Tj ET Q EMC`;const De={shift:0},Fe=this._renderText(xe[0],ve,ge,Ae,ue,De,ce,me);return`/Tx BMC q ${se}BT `+pe+` 1 0 0 1 0 0 Tm ${Fe} ET Q EMC`}static async _getFontData(B,j,Y,W){const G=new i.OperatorList,Q={font:null,clone(){return this}},{fontName:ee,fontSize:z}=Y;return await B.handleSetFont(W,[ee&&e.Name.get(ee),z],null,G,j,Q,null),Q.font}_getTextWidth(B,j){return j.charsToGlyphs(B).reduce((Y,W)=>Y+W.width,0)/1e3}_computeFontSize(B,j,Y,W,G){let{fontSize:Q}=this.data.defaultAppearanceData,ee=(Q||12)*n.LINE_FACTOR,z=Math.round(B/ee);if(!Q){const se=ae=>Math.floor(ae*100)/100;if(G===-1){const ae=this._getTextWidth(Y,W);Q=se(Math.min(B/n.LINE_FACTOR,ae>j?j/ae:1/0)),z=1}else{const ae=Y.split(/\r\n?|\n/),ce=[];for(const Ae of ae){const ve=W.encodeString(Ae).join(""),pe=W.charsToGlyphs(ve),ge=W.getCharPositions(ve);ce.push({line:ve,glyphs:pe,positions:ge})}const de=Ae=>{let ve=0;for(const pe of ce){const ge=this._splitLine(null,W,Ae,j,pe);if(ve+=ge.length*Ae,ve>B)return!0}return!1};for(z=Math.max(z,G);;){if(ee=B/z,Q=se(ee/n.LINE_FACTOR),de(Q)){z++;continue}break}}const{fontName:ne,fontColor:V}=this.data.defaultAppearanceData;this._defaultAppearance=(0,R.createDefaultAppearance)({fontSize:Q,fontName:ne,fontColor:V})}return[this._defaultAppearance,Q,B/z]}_renderText(B,j,Y,W,G,Q,ee,z){let se;if(G===1){const V=this._getTextWidth(B,j)*Y;se=(W-V)/2}else if(G===2){const V=this._getTextWidth(B,j)*Y;se=W-V-ee}else se=ee;const ne=(0,k.numberToString)(se-Q.shift);return Q.shift=se,z=(0,k.numberToString)(z),`${ne} ${z} Td (${(0,k.escapeString)(B)}) Tj`}_getSaveFieldResources(B){var Q;const{localResources:j,appearanceResources:Y,acroFormResources:W}=this._fieldResources,G=(Q=this.data.defaultAppearanceData)==null?void 0:Q.fontName;if(!G)return j||e.Dict.empty;for(const ee of[j,Y])if(ee instanceof e.Dict){const z=ee.get("Font");if(z instanceof e.Dict&&z.has(G))return ee}if(W instanceof e.Dict){const ee=W.get("Font");if(ee instanceof e.Dict&&ee.has(G)){const z=new e.Dict(B);z.set(G,ee.getRaw(G));const se=new e.Dict(B);return se.set("Font",z),e.Dict.merge({xref:B,dictArray:[se,j],mergeSubDicts:!0})}}return j||e.Dict.empty}getFieldObject(){return null}}class N extends g{constructor(B){super(B),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0;const j=B.dict;typeof this.data.fieldValue!="string"&&(this.data.fieldValue="");let Y=(0,k.getInheritableProperty)({dict:j,key:"Q"});(!Number.isInteger(Y)||Y<0||Y>2)&&(Y=null),this.data.textAlignment=Y;let W=(0,k.getInheritableProperty)({dict:j,key:"MaxLen"});(!Number.isInteger(W)||W<0)&&(W=0),this.data.maxLen=W,this.data.multiLine=this.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE),this.data.comb=this.hasFieldFlag(n.AnnotationFieldFlag.COMB)&&!this.hasFieldFlag(n.AnnotationFieldFlag.MULTILINE)&&!this.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD)&&!this.hasFieldFlag(n.AnnotationFieldFlag.FILESELECT)&&this.data.maxLen!==0,this.data.doNotScroll=this.hasFieldFlag(n.AnnotationFieldFlag.DONOTSCROLL)}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(B,j,Y,W,G,Q,ee,z,se,ne,V){const ae=G/this.data.maxLen,ce=this.getBorderAndBackgroundAppearances(V),de=[],Ae=j.getCharPositions(Y);for(const[pe,ge]of Ae)de.push(`(${(0,k.escapeString)(Y.substring(pe,ge))}) Tj`);const ve=de.join(` ${(0,k.numberToString)(ae)} 0 Td `);return`/Tx BMC q ${ce}BT `+B+` 1 0 0 1 ${(0,k.numberToString)(ee)} ${(0,k.numberToString)(z+se)} Tm ${ve} ET Q EMC`}_getMultilineAppearance(B,j,Y,W,G,Q,ee,z,se,ne,V,ae){const ce=[],de=G-2*z,Ae={shift:0};for(let ge=0,fe=j.length;ge<fe;ge++){const xe=j[ge],Te=this._splitLine(xe,Y,W,de);for(let Le=0,Ie=Te.length;Le<Ie;Le++){const ue=Te[Le],me=ge===0&&Le===0?-se-(V-ne):-V;ce.push(this._renderText(ue,Y,W,G,ee,Ae,z,me))}}const ve=this.getBorderAndBackgroundAppearances(ae),pe=ce.join(`
`);return`/Tx BMC q ${ve}BT `+B+` 1 0 0 1 0 ${(0,k.numberToString)(Q)} Tm ${pe} ET Q EMC`}_splitLine(B,j,Y,W,G={}){B=G.line||B;const Q=G.glyphs||j.charsToGlyphs(B);if(Q.length<=1)return[B];const ee=G.positions||j.getCharPositions(B),z=Y/1e3,se=[];let ne=-1,V=-1,ae=-1,ce=0,de=0;for(let Ae=0,ve=Q.length;Ae<ve;Ae++){const[pe,ge]=ee[Ae],fe=Q[Ae],xe=fe.width*z;fe.unicode===" "?de+xe>W?(se.push(B.substring(ce,pe)),ce=pe,de=xe,ne=-1,ae=-1):(de+=xe,ne=pe,V=ge,ae=Ae):de+xe>W?ne!==-1?(se.push(B.substring(ce,V)),ce=V,Ae=ae+1,ne=-1,de=0):(se.push(B.substring(ce,pe)),ce=pe,de=xe):de+=xe}return ce<B.length&&se.push(B.substring(ce,B.length)),se}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.hasFieldFlag(n.AnnotationFieldFlag.PASSWORD),charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:"text"}}}class s extends g{constructor(B){super(B),this.checkedAppearance=null,this.uncheckedAppearance=null,this.data.checkBox=!this.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),this.data.radioButton=this.hasFieldFlag(n.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),this.data.pushButton=this.hasFieldFlag(n.AnnotationFieldFlag.PUSHBUTTON),this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(B):this.data.radioButton?this._processRadioButton(B):this.data.pushButton?(this.data.hasOwnCanvas=!0,this._processPushButton(B)):(0,n.warn)("Invalid field flags for button widget annotation")}async getOperatorList(B,j,Y,W,G){if(this.data.pushButton)return super.getOperatorList(B,j,Y,!1,G);let Q=null,ee=null;if(G){const se=G.get(this.data.id);Q=se?se.value:null,ee=se?se.rotation:null}if(Q===null&&this.appearance)return super.getOperatorList(B,j,Y,W,G);Q==null&&(Q=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const z=Q?this.checkedAppearance:this.uncheckedAppearance;if(z){const se=this.appearance,ne=z.dict.getArray("Matrix")||n.IDENTITY_MATRIX;ee&&z.dict.set("Matrix",this.getRotationMatrix(G)),this.appearance=z;const V=super.getOperatorList(B,j,Y,W,G);return this.appearance=se,z.dict.set("Matrix",ne),V}return{opList:new i.OperatorList,separateForm:!1,separateCanvas:!1}}async save(B,j,Y){return this.data.checkBox?this._saveCheckbox(B,j,Y):this.data.radioButton?this._saveRadioButton(B,j,Y):null}async _saveCheckbox(B,j,Y){if(!Y)return null;const W=Y.get(this.data.id);let G=W==null?void 0:W.rotation,Q=W==null?void 0:W.value;if(G===void 0&&(Q===void 0||this.data.fieldValue===this.data.exportValue===Q))return null;const ee=B.xref.fetchIfRef(this.ref);if(!(ee instanceof e.Dict))return null;G===void 0&&(G=this.rotation),Q===void 0&&(Q=this.data.fieldValue===this.data.exportValue);const z={path:this.data.fieldName,value:Q?this.data.exportValue:""},se=e.Name.get(Q?this.data.exportValue:"Off");ee.set("V",se),ee.set("AS",se),ee.set("M",`D:${(0,n.getModificationDate)()}`);const ne=this._getMKDict(G);ne&&ee.set("MK",ne);const V=[];return await(0,S.writeObject)(this.ref,ee,V,B.xref),[{ref:this.ref,data:V.join(""),xfa:z}]}async _saveRadioButton(B,j,Y){if(!Y)return null;const W=Y.get(this.data.id);let G=W==null?void 0:W.rotation,Q=W==null?void 0:W.value;if(G===void 0&&(Q===void 0||this.data.fieldValue===this.data.buttonValue===Q))return null;const ee=B.xref.fetchIfRef(this.ref);if(!(ee instanceof e.Dict))return null;Q===void 0&&(Q=this.data.fieldValue===this.data.buttonValue),G===void 0&&(G=this.rotation);const z={path:this.data.fieldName,value:Q?this.data.buttonValue:""},se=e.Name.get(Q?this.data.buttonValue:"Off"),ne=[];let V=null;if(Q)if(this.parent instanceof e.Ref){const de=B.xref.fetch(this.parent);de.set("V",se),await(0,S.writeObject)(this.parent,de,ne,B.xref),V=ne.join(""),ne.length=0}else this.parent instanceof e.Dict&&this.parent.set("V",se);ee.set("AS",se),ee.set("M",`D:${(0,n.getModificationDate)()}`);const ae=this._getMKDict(G);ae&&ee.set("MK",ae),await(0,S.writeObject)(this.ref,ee,ne,B.xref);const ce=[{ref:this.ref,data:ne.join(""),xfa:z}];return V&&ce.push({ref:this.parent,data:V,xfa:null}),ce}_getDefaultCheckedAppearance(B,j){const Y=this.data.rect[2]-this.data.rect[0],W=this.data.rect[3]-this.data.rect[1],G=[0,0,Y,W],Q=.8,ee=Math.min(Y,W)*Q;let z,se;j==="check"?(z={width:.755*ee,height:.705*ee},se="3"):j==="disc"?(z={width:.791*ee,height:.705*ee},se="l"):(0,n.unreachable)(`_getDefaultCheckedAppearance - unsupported type: ${j}`);const ne=(0,k.numberToString)((Y-z.width)/2),V=(0,k.numberToString)((W-z.height)/2),ae=`q BT /PdfJsZaDb ${ee} Tf 0 g ${ne} ${V} Td (${se}) Tj ET Q`,ce=new e.Dict(B.xref);ce.set("FormType",1),ce.set("Subtype",e.Name.get("Form")),ce.set("Type",e.Name.get("XObject")),ce.set("BBox",G),ce.set("Matrix",[1,0,0,1,0,0]),ce.set("Length",ae.length);const de=new e.Dict(B.xref),Ae=new e.Dict(B.xref);Ae.set("PdfJsZaDb",this.fallbackFontDict),de.set("Font",Ae),ce.set("Resources",de),this.checkedAppearance=new t.StringStream(ae),this.checkedAppearance.dict=ce,this._streams.push(this.checkedAppearance)}_processCheckBox(B){const j=B.dict.get("AP");if(!(j instanceof e.Dict))return;const Y=j.get("N");if(!(Y instanceof e.Dict))return;const W=this._decodeFormValue(B.dict.get("AS"));typeof W=="string"&&(this.data.fieldValue=W);const G=this.data.fieldValue!==null&&this.data.fieldValue!=="Off"?this.data.fieldValue:"Yes",Q=Y.getKeys();if(Q.length===0)Q.push("Off",G);else if(Q.length===1)Q[0]==="Off"?Q.push(G):Q.unshift("Off");else if(Q.includes(G))Q.length=0,Q.push("Off",G);else{const se=Q.find(ne=>ne!=="Off");Q.length=0,Q.push("Off",se)}Q.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=Q[1];const ee=Y.get(this.data.exportValue);this.checkedAppearance=ee instanceof o.BaseStream?ee:null;const z=Y.get("Off");this.uncheckedAppearance=z instanceof o.BaseStream?z:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(B,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,this.data.defaultFieldValue===null&&(this.data.defaultFieldValue="Off")}_processRadioButton(B){this.data.fieldValue=this.data.buttonValue=null;const j=B.dict.get("Parent");if(j instanceof e.Dict){this.parent=B.dict.getRaw("Parent");const ee=j.get("V");ee instanceof e.Name&&(this.data.fieldValue=this._decodeFormValue(ee))}const Y=B.dict.get("AP");if(!(Y instanceof e.Dict))return;const W=Y.get("N");if(!(W instanceof e.Dict))return;for(const ee of W.getKeys())if(ee!=="Off"){this.data.buttonValue=this._decodeFormValue(ee);break}const G=W.get(this.data.buttonValue);this.checkedAppearance=G instanceof o.BaseStream?G:null;const Q=W.get("Off");this.uncheckedAppearance=Q instanceof o.BaseStream?Q:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(B,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,this.data.defaultFieldValue===null&&(this.data.defaultFieldValue="Off")}_processPushButton(B){const{dict:j,annotationGlobals:Y}=B;if(!j.has("A")&&!j.has("AA")&&!this.data.alternativeText){(0,n.warn)("Push buttons without action dictionaries are not supported");return}this.data.isTooltipOnly=!j.has("A")&&!j.has("AA"),L.Catalog.parseDestDictionary({destDict:j,resultObj:this.data,docBaseUrl:Y.baseUrl,docAttachments:Y.attachments})}getFieldObject(){let B="button",j;return this.data.checkBox?(B="checkbox",j=this.data.exportValue):this.data.radioButton&&(B="radiobutton",j=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:j,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:B}}get fallbackFontDict(){const B=new e.Dict;return B.set("BaseFont",e.Name.get("ZapfDingbats")),B.set("Type",e.Name.get("FallbackType")),B.set("Subtype",e.Name.get("FallbackType")),B.set("Encoding",e.Name.get("ZapfDingbatsEncoding")),(0,n.shadow)(this,"fallbackFontDict",B)}}class u extends g{constructor(B){super(B);const{dict:j,xref:Y}=B;this.indices=j.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];const W=(0,k.getInheritableProperty)({dict:j,key:"Opt"});if(Array.isArray(W))for(let G=0,Q=W.length;G<Q;G++){const ee=Y.fetchIfRef(W[G]),z=Array.isArray(ee);this.data.options[G]={exportValue:this._decodeFormValue(z?Y.fetchIfRef(ee[0]):ee),displayValue:this._decodeFormValue(z?Y.fetchIfRef(ee[1]):ee)}}if(!this.hasIndices)typeof this.data.fieldValue=="string"?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||(this.data.fieldValue=[]);else{this.data.fieldValue=[];const G=this.data.options.length;for(const Q of this.indices)Number.isInteger(Q)&&Q>=0&&Q<G&&this.data.fieldValue.push(this.data.options[Q].exportValue)}this.data.combo=this.hasFieldFlag(n.AnnotationFieldFlag.COMBO),this.data.multiSelect=this.hasFieldFlag(n.AnnotationFieldFlag.MULTISELECT),this._hasText=!0}getFieldObject(){const B=this.data.combo?"combobox":"listbox",j=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:j,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:B}}amendSavedDict(B,j){var Q;if(!this.hasIndices)return;let Y=(Q=B==null?void 0:B.get(this.data.id))==null?void 0:Q.value;Array.isArray(Y)||(Y=[Y]);const W=[],{options:G}=this.data;for(let ee=0,z=0,se=G.length;ee<se;ee++)G[ee].exportValue===Y[z]&&(W.push(ee),z+=1);j.set("I",W)}async _getAppearance(B,j,Y,W){if(this.data.combo)return super._getAppearance(B,j,Y,W);let G,Q;const ee=W==null?void 0:W.get(this.data.id);if(ee&&(Q=ee.rotation,G=ee.value),Q===void 0&&G===void 0&&!this._needAppearances)return null;G===void 0?G=this.data.fieldValue:Array.isArray(G)||(G=[G]);const z=1,se=2;let ne=this.data.rect[3]-this.data.rect[1],V=this.data.rect[2]-this.data.rect[0];(Q===90||Q===270)&&([V,ne]=[ne,V]);const ae=this.data.options.length,ce=[];for(let ue=0;ue<ae;ue++){const{exportValue:me}=this.data.options[ue];G.includes(me)&&ce.push(ue)}this._defaultAppearance||(this.data.defaultAppearanceData=(0,R.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const de=await g._getFontData(B,j,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let Ae,{fontSize:ve}=this.data.defaultAppearanceData;if(ve)Ae=this._defaultAppearance;else{const ue=(ne-z)/ae;let me=-1,De;for(const{displayValue:Fe}of this.data.options){const je=this._getTextWidth(Fe,de);je>me&&(me=je,De=Fe)}[Ae,ve]=this._computeFontSize(ue,V-2*se,De,de,-1)}const pe=ve*n.LINE_FACTOR,ge=(pe-ve)/2,fe=Math.floor(ne/pe);let xe=0;if(ce.length>0){const ue=Math.min(...ce),me=Math.max(...ce);xe=Math.max(0,me-fe+1),xe>ue&&(xe=ue)}const Te=Math.min(xe+fe+1,ae),Le=["/Tx BMC q",`1 1 ${V} ${ne} re W n`];if(ce.length){Le.push("0.600006 0.756866 0.854904 rg");for(const ue of ce)xe<=ue&&ue<Te&&Le.push(`1 ${ne-(ue-xe+1)*pe} ${V} ${pe} re f`)}Le.push("BT",Ae,`1 0 0 1 0 ${ne} Tm`);const Ie={shift:0};for(let ue=xe;ue<Te;ue++){const{displayValue:me}=this.data.options[ue],De=ue===xe?ge:0;Le.push(this._renderText(me,de,ve,V,0,Ie,se,-pe+De))}return Le.push("ET Q EMC"),Le.join(`
`)}}class F extends g{constructor(B){super(B),this.data.fieldValue=null,this.data.hasOwnCanvas=this.data.noRotate}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class U extends l{constructor(B){super(B),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate;const{dict:Y}=B;this.data.annotationType=n.AnnotationType.TEXT,this.data.hasAppearance?this.data.name="NoIcon":(this.data.rect[1]=this.data.rect[3]-22,this.data.rect[2]=this.data.rect[0]+22,this.data.name=Y.has("Name")?Y.get("Name").name:"Note"),Y.has("State")?(this.data.state=Y.get("State")||null,this.data.stateModel=Y.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}}class O extends A{constructor(B){var G;super(B);const{dict:j,annotationGlobals:Y}=B;this.data.annotationType=n.AnnotationType.LINK;const W=_(j,this.rectangle);W&&(this.data.quadPoints=W),(G=this.data).borderColor||(G.borderColor=this.data.color),L.Catalog.parseDestDictionary({destDict:j,resultObj:this.data,docBaseUrl:Y.baseUrl,docAttachments:Y.attachments})}}class m extends A{constructor(B){super(B);const{dict:j}=B;this.data.annotationType=n.AnnotationType.POPUP,(this.data.rect[0]===this.data.rect[2]||this.data.rect[1]===this.data.rect[3])&&(this.data.rect=null);let Y=j.get("Parent");if(!Y){(0,n.warn)("Popup annotation has a missing or invalid parent annotation.");return}const W=Y.getArray("Rect");this.data.parentRect=Array.isArray(W)&&W.length===4?n.Util.normalizeRect(W):null;const G=Y.get("RT");if((0,e.isName)(G,n.AnnotationReplyType.GROUP)&&(Y=Y.get("IRT")),Y.has("M")?(this.setModificationDate(Y.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,Y.has("C")?(this.setColor(Y.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){const Q=Y.get("F");this._isViewable(Q)&&this.setFlags(Q)}this.setTitle(Y.get("T")),this.data.titleObj=this._title,this.setContents(Y.get("Contents")),this.data.contentsObj=this._contents,Y.has("RC")&&(this.data.richText=w.XFAFactory.getRichTextAsHtml(Y.get("RC"))),this.data.open=!!j.get("Open")}}P.PopupAnnotation=m;class x extends l{constructor(B){var W;super(B),this.data.hasOwnCanvas=!0;const{evaluatorOptions:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.FREETEXT,this.setDefaultAppearance(B),this.appearance){const{fontColor:G,fontSize:Q}=(0,R.parseAppearanceStream)(this.appearance,j,Y);this.data.defaultAppearanceData.fontColor=G,this.data.defaultAppearanceData.fontSize=Q||10}else if(this._isOffscreenCanvasSupported){const G=B.dict.get("CA"),Q=new R.FakeUnicodeFont(Y,"sans-serif");(W=this.data.defaultAppearanceData).fontSize||(W.fontSize=10);const{fontColor:ee,fontSize:z}=this.data.defaultAppearanceData;this.appearance=Q.createAppearance(this._contents.str,this.rectangle,this.rotation,z,ee,G),this._streams.push(this.appearance,R.FakeUnicodeFont.toUnicodeStream)}else(0,n.warn)("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}get hasTextContent(){return!!this.appearance}static createNewDict(B,j,{apRef:Y,ap:W}){const{color:G,fontSize:Q,rect:ee,rotation:z,user:se,value:ne}=B,V=new e.Dict(j);V.set("Type",e.Name.get("Annot")),V.set("Subtype",e.Name.get("FreeText")),V.set("CreationDate",`D:${(0,n.getModificationDate)()}`),V.set("Rect",ee);const ae=`/Helv ${Q} Tf ${(0,R.getPdfColor)(G,!0)}`;if(V.set("DA",ae),V.set("Contents",(0,k.isAscii)(ne)?ne:(0,k.stringToUTF16String)(ne,!0)),V.set("F",4),V.set("Border",[0,0,0]),V.set("Rotate",z),se&&V.set("T",(0,k.isAscii)(se)?se:(0,k.stringToUTF16String)(se,!0)),Y||W){const ce=new e.Dict(j);V.set("AP",ce),Y?ce.set("N",Y):ce.set("N",W)}return V}static async createNewAppearanceStream(B,j,Y){const{baseFontRef:W,evaluator:G,task:Q}=Y,{color:ee,fontSize:z,rect:se,rotation:ne,value:V}=B,ae=new e.Dict(j),ce=new e.Dict(j);if(W)ce.set("Helv",W);else{const Ne=new e.Dict(j);Ne.set("BaseFont",e.Name.get("Helvetica")),Ne.set("Type",e.Name.get("Font")),Ne.set("Subtype",e.Name.get("Type1")),Ne.set("Encoding",e.Name.get("WinAnsiEncoding")),ce.set("Helv",Ne)}ae.set("Font",ce);const de=await g._getFontData(G,Q,{fontName:"Helv",fontSize:z},ae),[Ae,ve,pe,ge]=se;let fe=pe-Ae,xe=ge-ve;ne%180!==0&&([fe,xe]=[xe,fe]);const Te=V.split(`
`),Le=z/1e3;let Ie=-1/0;const ue=[];for(let Ne of Te){const Ye=de.encodeString(Ne);if(Ye.length>1)return null;Ne=Ye.join(""),ue.push(Ne);let Ge=0;const ze=de.charsToGlyphs(Ne);for(const Qe of ze)Ge+=Qe.width*Le;Ie=Math.max(Ie,Ge)}let me=1;Ie>fe&&(me=fe/Ie);let De=1;const Fe=n.LINE_FACTOR*z,je=(n.LINE_FACTOR-n.LINE_DESCENT_FACTOR)*z,Ue=Fe*Te.length;Ue>xe&&(De=xe/Ue);const ht=Math.min(me,De),_e=z*ht;let st,Je,be;switch(ne){case 0:be=[1,0,0,1],Je=[se[0],se[1],fe,xe],st=[se[0],se[3]-je];break;case 90:be=[0,1,-1,0],Je=[se[1],-se[2],fe,xe],st=[se[1],-se[0]-je];break;case 180:be=[-1,0,0,-1],Je=[-se[2],-se[3],fe,xe],st=[-se[2],-se[1]-je];break;case 270:be=[0,-1,1,0],Je=[-se[3],se[0],fe,xe],st=[-se[3],se[2]-je];break}const he=["q",`${be.join(" ")} 0 0 cm`,`${Je.join(" ")} re W n`,"BT",`${(0,R.getPdfColor)(ee,!0)}`,`0 Tc /Helv ${(0,k.numberToString)(_e)} Tf`];he.push(`${st.join(" ")} Td (${(0,k.escapeString)(ue[0])}) Tj`);const ye=(0,k.numberToString)(Fe);for(let Ne=1,Ye=ue.length;Ne<Ye;Ne++){const Ge=ue[Ne];he.push(`0 -${ye} Td (${(0,k.escapeString)(Ge)}) Tj`)}he.push("ET","Q");const Se=he.join(`
`),Oe=new e.Dict(j);Oe.set("FormType",1),Oe.set("Subtype",e.Name.get("Form")),Oe.set("Type",e.Name.get("XObject")),Oe.set("BBox",se),Oe.set("Resources",ae),Oe.set("Matrix",[1,0,0,1,-se[0],-se[1]]);const Re=new t.StringStream(Se);return Re.dict=Oe,Re}}class y extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;this.data.annotationType=n.AnnotationType.LINE,this.data.hasOwnCanvas=this.data.noRotate;const W=j.getArray("L");if(this.data.lineCoordinates=n.Util.normalizeRect(W),this.setLineEndings(j.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){const G=this.color?M(this.color):[0,0,0],Q=j.get("CA"),ee=b(j.getArray("IC"),null),z=ee?M(ee):null,se=z?Q:null,ne=this.borderStyle.width||1,V=2*ne,ae=[this.data.lineCoordinates[0]-V,this.data.lineCoordinates[1]-V,this.data.lineCoordinates[2]+V,this.data.lineCoordinates[3]+V];n.Util.intersect(this.rectangle,ae)||(this.rectangle=ae),this._setDefaultAppearance({xref:Y,extra:`${ne} w`,strokeColor:G,fillColor:z,strokeAlpha:Q,fillAlpha:se,pointsCallback:(ce,de)=>(ce.push(`${W[0]} ${W[1]} m`,`${W[2]} ${W[3]} l`,"S"),[de[0].x-ne,de[1].x+ne,de[3].y-ne,de[1].y+ne])})}}}class r extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.SQUARE,this.data.hasOwnCanvas=this.data.noRotate,!this.appearance){const W=this.color?M(this.color):[0,0,0],G=j.get("CA"),Q=b(j.getArray("IC"),null),ee=Q?M(Q):null,z=ee?G:null;if(this.borderStyle.width===0&&!ee)return;this._setDefaultAppearance({xref:Y,extra:`${this.borderStyle.width} w`,strokeColor:W,fillColor:ee,strokeAlpha:G,fillAlpha:z,pointsCallback:(se,ne)=>{const V=ne[2].x+this.borderStyle.width/2,ae=ne[2].y+this.borderStyle.width/2,ce=ne[3].x-ne[2].x-this.borderStyle.width,de=ne[1].y-ne[3].y-this.borderStyle.width;return se.push(`${V} ${ae} ${ce} ${de} re`),ee?se.push("B"):se.push("S"),[ne[0].x,ne[1].x,ne[3].y,ne[1].y]}})}}}class p extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.CIRCLE,!this.appearance){const W=this.color?M(this.color):[0,0,0],G=j.get("CA"),Q=b(j.getArray("IC"),null),ee=Q?M(Q):null,z=ee?G:null;if(this.borderStyle.width===0&&!ee)return;const se=4/3*Math.tan(Math.PI/(2*4));this._setDefaultAppearance({xref:Y,extra:`${this.borderStyle.width} w`,strokeColor:W,fillColor:ee,strokeAlpha:G,fillAlpha:z,pointsCallback:(ne,V)=>{const ae=V[0].x+this.borderStyle.width/2,ce=V[0].y-this.borderStyle.width/2,de=V[3].x-this.borderStyle.width/2,Ae=V[3].y+this.borderStyle.width/2,ve=ae+(de-ae)/2,pe=ce+(Ae-ce)/2,ge=(de-ae)/2*se,fe=(Ae-ce)/2*se;return ne.push(`${ve} ${Ae} m`,`${ve+ge} ${Ae} ${de} ${pe+fe} ${de} ${pe} c`,`${de} ${pe-fe} ${ve+ge} ${ce} ${ve} ${ce} c`,`${ve-ge} ${ce} ${ae} ${pe-fe} ${ae} ${pe} c`,`${ae} ${pe+fe} ${ve-ge} ${Ae} ${ve} ${Ae} c`,"h"),ee?ne.push("B"):ne.push("S"),[V[0].x,V[1].x,V[3].y,V[1].y]}})}}}class c extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;this.data.annotationType=n.AnnotationType.POLYLINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.vertices=[],this instanceof h||(this.setLineEndings(j.getArray("LE")),this.data.lineEndings=this.lineEndings);const W=j.getArray("Vertices");if(Array.isArray(W)){for(let G=0,Q=W.length;G<Q;G+=2)this.data.vertices.push({x:W[G],y:W[G+1]});if(!this.appearance){const G=this.color?M(this.color):[0,0,0],Q=j.get("CA"),ee=this.borderStyle.width||1,z=2*ee,se=[1/0,1/0,-1/0,-1/0];for(const ne of this.data.vertices)se[0]=Math.min(se[0],ne.x-z),se[1]=Math.min(se[1],ne.y-z),se[2]=Math.max(se[2],ne.x+z),se[3]=Math.max(se[3],ne.y+z);n.Util.intersect(this.rectangle,se)||(this.rectangle=se),this._setDefaultAppearance({xref:Y,extra:`${ee} w`,strokeColor:G,strokeAlpha:Q,pointsCallback:(ne,V)=>{const ae=this.data.vertices;for(let ce=0,de=ae.length;ce<de;ce++)ne.push(`${ae[ce].x} ${ae[ce].y} ${ce===0?"m":"l"}`);return ne.push("S"),[V[0].x,V[1].x,V[3].y,V[1].y]}})}}}}class h extends c{constructor(B){super(B),this.data.annotationType=n.AnnotationType.POLYGON}}class C extends l{constructor(B){super(B),this.data.annotationType=n.AnnotationType.CARET}}class D extends l{constructor(B){super(B),this.data.hasOwnCanvas=this.data.noRotate;const{dict:j,xref:Y}=B;this.data.annotationType=n.AnnotationType.INK,this.data.inkLists=[];const W=j.getArray("InkList");if(Array.isArray(W)){for(let G=0,Q=W.length;G<Q;++G){this.data.inkLists.push([]);for(let ee=0,z=W[G].length;ee<z;ee+=2)this.data.inkLists[G].push({x:Y.fetchIfRef(W[G][ee]),y:Y.fetchIfRef(W[G][ee+1])})}if(!this.appearance){const G=this.color?M(this.color):[0,0,0],Q=j.get("CA"),ee=this.borderStyle.width||1,z=2*ee,se=[1/0,1/0,-1/0,-1/0];for(const ne of this.data.inkLists)for(const V of ne)se[0]=Math.min(se[0],V.x-z),se[1]=Math.min(se[1],V.y-z),se[2]=Math.max(se[2],V.x+z),se[3]=Math.max(se[3],V.y+z);n.Util.intersect(this.rectangle,se)||(this.rectangle=se),this._setDefaultAppearance({xref:Y,extra:`${ee} w`,strokeColor:G,strokeAlpha:Q,pointsCallback:(ne,V)=>{for(const ae of this.data.inkLists){for(let ce=0,de=ae.length;ce<de;ce++)ne.push(`${ae[ce].x} ${ae[ce].y} ${ce===0?"m":"l"}`);ne.push("S")}return[V[0].x,V[1].x,V[3].y,V[1].y]}})}}}static createNewDict(B,j,{apRef:Y,ap:W}){const{color:G,opacity:Q,paths:ee,rect:z,rotation:se,thickness:ne}=B,V=new e.Dict(j);V.set("Type",e.Name.get("Annot")),V.set("Subtype",e.Name.get("Ink")),V.set("CreationDate",`D:${(0,n.getModificationDate)()}`),V.set("Rect",z),V.set("InkList",ee.map(de=>de.points)),V.set("F",4),V.set("Rotate",se);const ae=new e.Dict(j);V.set("BS",ae),ae.set("W",ne),V.set("C",Array.from(G,de=>de/255)),V.set("CA",Q);const ce=new e.Dict(j);return V.set("AP",ce),Y?ce.set("N",Y):ce.set("N",W),V}static async createNewAppearanceStream(B,j,Y){const{color:W,rect:G,paths:Q,thickness:ee,opacity:z}=B,se=[`${ee} w 1 J 1 j`,`${(0,R.getPdfColor)(W,!1)}`];z!==1&&se.push("/R0 gs");const ne=[];for(const{bezier:de}of Q){ne.length=0,ne.push(`${(0,k.numberToString)(de[0])} ${(0,k.numberToString)(de[1])} m`);for(let Ae=2,ve=de.length;Ae<ve;Ae+=6){const pe=de.slice(Ae,Ae+6).map(k.numberToString).join(" ");ne.push(`${pe} c`)}ne.push("S"),se.push(ne.join(`
`))}const V=se.join(`
`),ae=new e.Dict(j);if(ae.set("FormType",1),ae.set("Subtype",e.Name.get("Form")),ae.set("Type",e.Name.get("XObject")),ae.set("BBox",G),ae.set("Length",V.length),z!==1){const de=new e.Dict(j),Ae=new e.Dict(j),ve=new e.Dict(j);ve.set("CA",z),ve.set("Type",e.Name.get("ExtGState")),Ae.set("R0",ve),de.set("ExtGState",Ae),ae.set("Resources",de)}const ce=new t.StringStream(V);return ce.dict=ae,ce}}class X extends l{constructor(B){var G;super(B);const{dict:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.HIGHLIGHT,this.data.quadPoints=_(j,null)){const Q=(G=this.appearance)==null?void 0:G.dict.get("Resources");if(!this.appearance||!(Q!=null&&Q.has("ExtGState"))){this.appearance&&(0,n.warn)("HighlightAnnotation - ignoring built-in appearance stream.");const ee=this.color?M(this.color):[1,1,0],z=j.get("CA");this._setDefaultAppearance({xref:Y,fillColor:ee,blendMode:"Multiply",fillAlpha:z,pointsCallback:(se,ne)=>(se.push(`${ne[0].x} ${ne[0].y} m`,`${ne[1].x} ${ne[1].y} l`,`${ne[3].x} ${ne[3].y} l`,`${ne[2].x} ${ne[2].y} l`,"f"),[ne[0].x,ne[1].x,ne[3].y,ne[1].y])})}}else this.data.popupRef=null}}class q extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.UNDERLINE,this.data.quadPoints=_(j,null)){if(!this.appearance){const G=this.color?M(this.color):[0,0,0],Q=j.get("CA");this._setDefaultAppearance({xref:Y,extra:"[] 0 d 0.571 w",strokeColor:G,strokeAlpha:Q,pointsCallback:(ee,z)=>(ee.push(`${z[2].x} ${z[2].y+1.3} m`,`${z[3].x} ${z[3].y+1.3} l`,"S"),[z[0].x,z[1].x,z[3].y,z[1].y])})}}else this.data.popupRef=null}}class re extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.SQUIGGLY,this.data.quadPoints=_(j,null)){if(!this.appearance){const G=this.color?M(this.color):[0,0,0],Q=j.get("CA");this._setDefaultAppearance({xref:Y,extra:"[] 0 d 1 w",strokeColor:G,strokeAlpha:Q,pointsCallback:(ee,z)=>{const se=(z[0].y-z[2].y)/6;let ne=se,V=z[2].x;const ae=z[2].y,ce=z[3].x;ee.push(`${V} ${ae+ne} m`);do V+=2,ne=ne===0?se:0,ee.push(`${V} ${ae+ne} l`);while(V<ce);return ee.push("S"),[z[2].x,ce,ae-2*se,ae+2*se]}})}}else this.data.popupRef=null}}class K extends l{constructor(B){super(B);const{dict:j,xref:Y}=B;if(this.data.annotationType=n.AnnotationType.STRIKEOUT,this.data.quadPoints=_(j,null)){if(!this.appearance){const G=this.color?M(this.color):[0,0,0],Q=j.get("CA");this._setDefaultAppearance({xref:Y,extra:"[] 0 d 1 w",strokeColor:G,strokeAlpha:Q,pointsCallback:(ee,z)=>(ee.push(`${(z[0].x+z[2].x)/2} ${(z[0].y+z[2].y)/2} m`,`${(z[1].x+z[3].x)/2} ${(z[1].y+z[3].y)/2} l`,"S"),[z[0].x,z[1].x,z[3].y,z[1].y])})}}else this.data.popupRef=null}}class oe extends l{constructor(B){super(B),this.data.annotationType=n.AnnotationType.STAMP,this.data.hasOwnCanvas=this.data.noRotate}static async createImage(B,j){const{width:Y,height:W}=B,G=new OffscreenCanvas(Y,W),Q=G.getContext("2d",{alpha:!0});Q.drawImage(B,0,0);const ee=Q.getImageData(0,0,Y,W).data,z=new Uint32Array(ee.buffer),se=z.some(n.FeatureTest.isLittleEndian?ve=>ve>>>24!==255:ve=>(ve&255)!==255);se&&(Q.fillStyle="white",Q.fillRect(0,0,Y,W),Q.drawImage(B,0,0));const ne=G.convertToBlob({type:"image/jpeg",quality:1}).then(ve=>ve.arrayBuffer()),V=e.Name.get("XObject"),ae=e.Name.get("Image"),ce=new e.Dict(j);ce.set("Type",V),ce.set("Subtype",ae),ce.set("BitsPerComponent",8),ce.set("ColorSpace",e.Name.get("DeviceRGB")),ce.set("Filter",e.Name.get("DCTDecode")),ce.set("BBox",[0,0,Y,W]),ce.set("Width",Y),ce.set("Height",W);let de=null;if(se){const ve=new Uint8Array(z.length);if(n.FeatureTest.isLittleEndian)for(let ge=0,fe=z.length;ge<fe;ge++)ve[ge]=z[ge]>>>24;else for(let ge=0,fe=z.length;ge<fe;ge++)ve[ge]=z[ge]&255;const pe=new e.Dict(j);pe.set("Type",V),pe.set("Subtype",ae),pe.set("BitsPerComponent",8),pe.set("ColorSpace",e.Name.get("DeviceGray")),pe.set("Width",Y),pe.set("Height",W),de=new t.Stream(ve,0,0,pe)}return{imageStream:new t.Stream(await ne,0,0,ce),smaskStream:de,width:Y,height:W}}static createNewDict(B,j,{apRef:Y,ap:W}){const{rect:G,rotation:Q,user:ee}=B,z=new e.Dict(j);if(z.set("Type",e.Name.get("Annot")),z.set("Subtype",e.Name.get("Stamp")),z.set("CreationDate",`D:${(0,n.getModificationDate)()}`),z.set("Rect",G),z.set("F",4),z.set("Border",[0,0,0]),z.set("Rotate",Q),ee&&z.set("T",(0,k.isAscii)(ee)?ee:(0,k.stringToUTF16String)(ee,!0)),Y||W){const se=new e.Dict(j);z.set("AP",se),Y?se.set("N",Y):se.set("N",W)}return z}static async createNewAppearanceStream(B,j,Y){const{rotation:W}=B,{imageRef:G,width:Q,height:ee}=Y.image,z=new e.Dict(j),se=new e.Dict(j);z.set("XObject",se),se.set("Im0",G);const ne=`q ${Q} 0 0 ${ee} 0 0 cm /Im0 Do Q`,V=new e.Dict(j);if(V.set("FormType",1),V.set("Subtype",e.Name.get("Form")),V.set("Type",e.Name.get("XObject")),V.set("BBox",[0,0,Q,ee]),V.set("Resources",z),W){const ce=(0,k.getRotationMatrix)(W,Q,ee);V.set("Matrix",ce)}const ae=new t.StringStream(ne);return ae.dict=V,ae}}class J extends l{constructor(B){super(B);const{dict:j,xref:Y}=B,W=new T.FileSpec(j.get("FS"),Y);this.data.annotationType=n.AnnotationType.FILEATTACHMENT,this.data.hasOwnCanvas=this.data.noRotate,this.data.file=W.serializable;const G=j.get("Name");this.data.name=G instanceof e.Name?(0,n.stringToPDFString)(G.name):"PushPin";const Q=j.get("ca");this.data.fillAlpha=typeof Q=="number"&&Q>=0&&Q<=1?Q:null}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FakeUnicodeFont=void 0,P.createDefaultAppearance=S,P.getPdfColor=i,P.parseAppearanceStream=f,P.parseDefaultAppearance=T;var n=ie(4),k=ie(3),R=ie(2),e=ie(12),t=ie(13),o=ie(59),$=ie(57),L=ie(8);class I extends t.EvaluatorPreprocessor{constructor(b){super(new L.StringStream(b))}parse(){const b={fn:0,args:[]},M={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;b.args.length=0,!!this.read(b);){if(this.savedStatesDepth!==0)continue;const{fn:_,args:H}=b;switch(_|0){case R.OPS.setFont:const[A,E]=H;A instanceof n.Name&&(M.fontName=A.name),typeof E=="number"&&E>0&&(M.fontSize=E);break;case R.OPS.setFillRGBColor:e.ColorSpace.singletons.rgb.getRgbItem(H,0,M.fontColor,0);break;case R.OPS.setFillGray:e.ColorSpace.singletons.gray.getRgbItem(H,0,M.fontColor,0);break;case R.OPS.setFillCMYKColor:e.ColorSpace.singletons.cmyk.getRgbItem(H,0,M.fontColor,0);break}}}catch(_){(0,R.warn)(`parseDefaultAppearance - ignoring errors: "${_}".`)}return M}}function T(v){return new I(v).parse()}class d extends t.EvaluatorPreprocessor{constructor(b,M,_){var H;super(b),this.stream=b,this.evaluatorOptions=M,this.xref=_,this.resources=(H=b.dict)==null?void 0:H.get("Resources")}parse(){const b={fn:0,args:[]};let M={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:e.ColorSpace.singletons.gray},_=!1;const H=[];try{for(;b.args.length=0,!(_||!this.read(b));){const{fn:A,args:E}=b;switch(A|0){case R.OPS.save:H.push({scaleFactor:M.scaleFactor,fontSize:M.fontSize,fontName:M.fontName,fontColor:M.fontColor.slice(),fillColorSpace:M.fillColorSpace});break;case R.OPS.restore:M=H.pop()||M;break;case R.OPS.setTextMatrix:M.scaleFactor*=Math.hypot(E[0],E[1]);break;case R.OPS.setFont:const[l,g]=E;l instanceof n.Name&&(M.fontName=l.name),typeof g=="number"&&g>0&&(M.fontSize=g*M.scaleFactor);break;case R.OPS.setFillColorSpace:M.fillColorSpace=e.ColorSpace.parse({cs:E[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case R.OPS.setFillColor:M.fillColorSpace.getRgbItem(E,0,M.fontColor,0);break;case R.OPS.setFillRGBColor:e.ColorSpace.singletons.rgb.getRgbItem(E,0,M.fontColor,0);break;case R.OPS.setFillGray:e.ColorSpace.singletons.gray.getRgbItem(E,0,M.fontColor,0);break;case R.OPS.setFillCMYKColor:e.ColorSpace.singletons.cmyk.getRgbItem(E,0,M.fontColor,0);break;case R.OPS.showText:case R.OPS.showSpacedText:case R.OPS.nextLineShowText:case R.OPS.nextLineSetSpacingShowText:_=!0;break}}}catch(A){(0,R.warn)(`parseAppearanceStream - ignoring errors: "${A}".`)}return this.stream.reset(),delete M.scaleFactor,delete M.fillColorSpace,M}get _localColorSpaceCache(){return(0,R.shadow)(this,"_localColorSpaceCache",new o.LocalColorSpaceCache)}get _pdfFunctionFactory(){const b=new $.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported});return(0,R.shadow)(this,"_pdfFunctionFactory",b)}}function f(v,b,M){return new d(v,b,M).parse()}function i(v,b){if(v[0]===v[1]&&v[1]===v[2]){const M=v[0]/255;return`${(0,k.numberToString)(M)} ${b?"g":"G"}`}return Array.from(v,M=>(0,k.numberToString)(M/255)).join(" ")+` ${b?"rg":"RG"}`}function S({fontSize:v,fontName:b,fontColor:M}){return`/${(0,k.escapePDFName)(b)} ${v} Tf ${i(M,!0)}`}class w{constructor(b,M){this.xref=b,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=M;const _=new OffscreenCanvas(1,1);this.ctxMeasure=_.getContext("2d"),w._fontNameId||(w._fontNameId=1),this.fontName=n.Name.get(`InvalidPDFjsFont_${M}_${w._fontNameId++}`)}get toUnicodeRef(){if(!w._toUnicodeRef){const b=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (Adobe)
/Ordering (UCS) /Supplement 0 >> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000> <FFFF>
endcodespacerange
1 beginbfrange
<0000> <FFFF> <0000>
endbfrange
endcmap CMapName currentdict /CMap defineresource pop end end`,M=w.toUnicodeStream=new L.StringStream(b),_=new n.Dict(this.xref);M.dict=_,_.set("Length",b.length),w._toUnicodeRef=this.xref.getNewPersistentRef(M)}return w._toUnicodeRef}get fontDescriptorRef(){if(!w._fontDescriptorRef){const b=new n.Dict(this.xref);b.set("Type",n.Name.get("FontDescriptor")),b.set("FontName",this.fontName),b.set("FontFamily","MyriadPro Regular"),b.set("FontBBox",[0,0,0,0]),b.set("FontStretch",n.Name.get("Normal")),b.set("FontWeight",400),b.set("ItalicAngle",0),w._fontDescriptorRef=this.xref.getNewPersistentRef(b)}return w._fontDescriptorRef}get descendantFontRef(){const b=new n.Dict(this.xref);b.set("BaseFont",this.fontName),b.set("Type",n.Name.get("Font")),b.set("Subtype",n.Name.get("CIDFontType0")),b.set("CIDToGIDMap",n.Name.get("Identity")),b.set("FirstChar",this.firstChar),b.set("LastChar",this.lastChar),b.set("FontDescriptor",this.fontDescriptorRef),b.set("DW",1e3);const M=[],_=[...this.widths.entries()].sort();let H=null,A=null;for(const[l,g]of _){if(!H){H=l,A=[g];continue}l===H+A.length?A.push(g):(M.push(H,A),H=l,A=[g])}H&&M.push(H,A),b.set("W",M);const E=new n.Dict(this.xref);return E.set("Ordering","Identity"),E.set("Registry","Adobe"),E.set("Supplement",0),b.set("CIDSystemInfo",E),this.xref.getNewPersistentRef(b)}get baseFontRef(){const b=new n.Dict(this.xref);return b.set("BaseFont",this.fontName),b.set("Type",n.Name.get("Font")),b.set("Subtype",n.Name.get("Type0")),b.set("Encoding",n.Name.get("Identity-H")),b.set("DescendantFonts",[this.descendantFontRef]),b.set("ToUnicode",this.toUnicodeRef),this.xref.getNewPersistentRef(b)}get resources(){const b=new n.Dict(this.xref),M=new n.Dict(this.xref);return M.set(this.fontName.name,this.baseFontRef),b.set("Font",M),b}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(b){const M=this._createContext();for(const _ of b.split(/\r\n?|\n/))for(const H of _.split("")){const A=H.charCodeAt(0);if(this.widths.has(A))continue;const E=M.measureText(H),l=Math.ceil(E.width);this.widths.set(A,l),this.firstChar=Math.min(A,this.firstChar),this.lastChar=Math.max(A,this.lastChar)}return this.resources}createAppearance(b,M,_,H,A,E){const l=this._createContext(),g=[];let N=-1/0;for(const J of b.split(/\r\n?|\n/)){g.push(J);const te=l.measureText(J).width;N=Math.max(N,te);for(const B of J.split("")){const j=B.charCodeAt(0);let Y=this.widths.get(j);if(Y===void 0){const W=l.measureText(B);Y=Math.ceil(W.width),this.widths.set(j,Y),this.firstChar=Math.min(j,this.firstChar),this.lastChar=Math.max(j,this.lastChar)}}}N*=H/1e3;const[s,u,F,U]=M;let O=F-s,m=U-u;_%180!==0&&([O,m]=[m,O]);let x=1;N>O&&(x=O/N);let y=1;const r=R.LINE_FACTOR*H,p=R.LINE_DESCENT_FACTOR*H,c=r*g.length;c>m&&(y=m/c);const h=Math.min(x,y),C=H*h,D=["q",`0 0 ${(0,k.numberToString)(O)} ${(0,k.numberToString)(m)} re W n`,"BT",`1 0 0 1 0 ${(0,k.numberToString)(m+p)} Tm 0 Tc ${i(A,!0)}`,`/${this.fontName.name} ${(0,k.numberToString)(C)} Tf`],{resources:X}=this;if(E=typeof E=="number"&&E>=0&&E<=1?E:1,E!==1){D.push("/R0 gs");const J=new n.Dict(this.xref),te=new n.Dict(this.xref);te.set("ca",E),te.set("CA",E),te.set("Type",n.Name.get("ExtGState")),J.set("R0",te),X.set("ExtGState",J)}const q=(0,k.numberToString)(r);for(const J of g)D.push(`0 -${q} Td <${(0,k.stringToUTF16HexString)(J)}> Tj`);D.push("ET","Q");const re=D.join(`
`),K=new n.Dict(this.xref);if(K.set("Subtype",n.Name.get("Form")),K.set("Type",n.Name.get("XObject")),K.set("BBox",[0,0,O,m]),K.set("Length",re.length),K.set("Resources",X),_){const J=(0,k.getRotationMatrix)(_,O,m);K.set("Matrix",J)}const oe=new L.StringStream(re);return oe.dict=K,oe}}P.FakeUnicodeFont=w},(ke,P,ie)=>{var v,Ki,M,Yi,H,A,E,l,g,N,s,u,F,fn,O,La,x,Na,r,Wn,c,gn,C,pn,X,Ba,re,$a,oe,ja,te,Ji,Y,qn,G,Vn,ee,Zi;Object.defineProperty(P,"__esModule",{value:!0}),P.ColorSpace=void 0;var n=ie(2),k=ie(4),R=ie(5),e=ie(3);function t(se,ne,V,ae,ce,de,Ae){Ae=Ae!==1?0:Ae;const pe=V/ce,ge=ae/de;let fe=0,xe;const Te=new Uint16Array(ce),Le=V*3;for(let Ie=0;Ie<ce;Ie++)Te[Ie]=Math.floor(Ie*pe)*3;for(let Ie=0;Ie<de;Ie++){const ue=Math.floor(Ie*ge)*Le;for(let me=0;me<ce;me++)xe=ue+Te[me],ne[fe++]=se[xe++],ne[fe++]=se[xe++],ne[fe++]=se[xe++],fe+=Ae}}class o{constructor(ne,V){this.constructor===o&&(0,n.unreachable)("Cannot initialize ColorSpace."),this.name=ne,this.numComps=V}getRgb(ne,V){const ae=new Uint8ClampedArray(3);return this.getRgbItem(ne,V,ae,0),ae}getRgbItem(ne,V,ae,ce){(0,n.unreachable)("Should not call ColorSpace.getRgbItem")}getRgbBuffer(ne,V,ae,ce,de,Ae,ve){(0,n.unreachable)("Should not call ColorSpace.getRgbBuffer")}getOutputLength(ne,V){(0,n.unreachable)("Should not call ColorSpace.getOutputLength")}isPassthrough(ne){return!1}isDefaultDecode(ne,V){return o.isDefaultDecode(ne,this.numComps)}fillRgb(ne,V,ae,ce,de,Ae,ve,pe,ge){const fe=V*ae;let xe=null;const Te=1<<ve,Le=ae!==de||V!==ce;if(this.isPassthrough(ve))xe=pe;else if(this.numComps===1&&fe>Te&&this.name!=="DeviceGray"&&this.name!=="DeviceRGB"){const Ie=ve<=8?new Uint8Array(Te):new Uint16Array(Te);for(let me=0;me<Te;me++)Ie[me]=me;const ue=new Uint8ClampedArray(Te*3);if(this.getRgbBuffer(Ie,0,Te,ue,0,ve,0),Le){xe=new Uint8Array(fe*3);let me=0;for(let De=0;De<fe;++De){const Fe=pe[De]*3;xe[me++]=ue[Fe],xe[me++]=ue[Fe+1],xe[me++]=ue[Fe+2]}}else{let me=0;for(let De=0;De<fe;++De){const Fe=pe[De]*3;ne[me++]=ue[Fe],ne[me++]=ue[Fe+1],ne[me++]=ue[Fe+2],me+=ge}}}else Le?(xe=new Uint8ClampedArray(fe*3),this.getRgbBuffer(pe,0,fe,xe,0,ve,0)):this.getRgbBuffer(pe,0,ce*Ae,ne,0,ve,ge);if(xe)if(Le)t(xe,ne,V,ae,ce,de,ge);else{let Ie=0,ue=0;for(let me=0,De=ce*Ae;me<De;me++)ne[Ie++]=xe[ue++],ne[Ie++]=xe[ue++],ne[Ie++]=xe[ue++],Ie+=ge}}get usesZeroToOneRange(){return(0,n.shadow)(this,"usesZeroToOneRange",!0)}static _cache(ne,V,ae,ce){if(!ae)throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!ce)throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.');let de,Ae;ne instanceof k.Ref&&(Ae=ne,ne=V.fetch(ne)),ne instanceof k.Name&&(de=ne.name),(de||Ae)&&ae.set(de,Ae,ce)}static getCached(ne,V,ae){if(!ae)throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(ne instanceof k.Ref){const ce=ae.getByRef(ne);if(ce)return ce;try{ne=V.fetch(ne)}catch(de){if(de instanceof e.MissingDataException)throw de}}if(ne instanceof k.Name){const ce=ae.getByName(ne.name);if(ce)return ce}return null}static async parseAsync({cs:ne,xref:V,resources:ae=null,pdfFunctionFactory:ce,localColorSpaceCache:de}){const Ae=this._parse(ne,V,ae,ce);return this._cache(ne,V,de,Ae),Ae}static parse({cs:ne,xref:V,resources:ae=null,pdfFunctionFactory:ce,localColorSpaceCache:de}){const Ae=this.getCached(ne,V,de);if(Ae)return Ae;const ve=this._parse(ne,V,ae,ce);return this._cache(ne,V,de,ve),ve}static _parse(ne,V,ae=null,ce){if(ne=V.fetchIfRef(ne),ne instanceof k.Name)switch(ne.name){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"Pattern":return new L(null);default:if(ae instanceof k.Dict){const de=ae.get("ColorSpace");if(de instanceof k.Dict){const Ae=de.get(ne.name);if(Ae){if(Ae instanceof k.Name)return this._parse(Ae,V,ae,ce);ne=Ae;break}}}throw new n.FormatError(`Unrecognized ColorSpace: ${ne.name}`)}if(Array.isArray(ne)){const de=V.fetchIfRef(ne[0]).name;let Ae,ve,pe,ge,fe,xe;switch(de){case"G":case"DeviceGray":return this.singletons.gray;case"RGB":case"DeviceRGB":return this.singletons.rgb;case"CMYK":case"DeviceCMYK":return this.singletons.cmyk;case"CalGray":return Ae=V.fetchIfRef(ne[1]),ge=Ae.getArray("WhitePoint"),fe=Ae.getArray("BlackPoint"),xe=Ae.get("Gamma"),new i(ge,fe,xe);case"CalRGB":Ae=V.fetchIfRef(ne[1]),ge=Ae.getArray("WhitePoint"),fe=Ae.getArray("BlackPoint"),xe=Ae.getArray("Gamma");const Te=Ae.getArray("Matrix");return new S(ge,fe,xe,Te);case"ICCBased":const Ie=V.fetchIfRef(ne[1]).dict;ve=Ie.get("N");const ue=Ie.get("Alternate");if(ue){const ht=this._parse(ue,V,ae,ce);if(ht.numComps===ve)return ht;(0,n.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(ve===1)return this.singletons.gray;if(ve===3)return this.singletons.rgb;if(ve===4)return this.singletons.cmyk;break;case"Pattern":return pe=ne[1]||null,pe&&(pe=this._parse(pe,V,ae,ce)),new L(pe);case"I":case"Indexed":pe=this._parse(ne[1],V,ae,ce);const me=V.fetchIfRef(ne[2])+1,De=V.fetchIfRef(ne[3]);return new I(pe,me,De);case"Separation":case"DeviceN":const Fe=V.fetchIfRef(ne[1]);ve=Array.isArray(Fe)?Fe.length:1,pe=this._parse(ne[2],V,ae,ce);const je=ce.create(ne[3]);return new $(ve,pe,je);case"Lab":Ae=V.fetchIfRef(ne[1]),ge=Ae.getArray("WhitePoint"),fe=Ae.getArray("BlackPoint");const Ue=Ae.getArray("Range");return new w(ge,fe,Ue);default:throw new n.FormatError(`Unimplemented ColorSpace object: ${de}`)}}throw new n.FormatError(`Unrecognized ColorSpace object: ${ne}`)}static isDefaultDecode(ne,V){if(!Array.isArray(ne))return!0;if(V*2!==ne.length)return(0,n.warn)("The decode map is not the correct length"),!0;for(let ae=0,ce=ne.length;ae<ce;ae+=2)if(ne[ae]!==0||ne[ae+1]!==1)return!1;return!0}static get singletons(){return(0,n.shadow)(this,"singletons",{get gray(){return(0,n.shadow)(this,"gray",new T)},get rgb(){return(0,n.shadow)(this,"rgb",new d)},get cmyk(){return(0,n.shadow)(this,"cmyk",new f)}})}}P.ColorSpace=o;class $ extends o{constructor(ne,V,ae){super("Alternate",ne),this.base=V,this.tintFn=ae,this.tmpBuf=new Float32Array(V.numComps)}getRgbItem(ne,V,ae,ce){const de=this.tmpBuf;this.tintFn(ne,V,de,0),this.base.getRgbItem(de,0,ae,ce)}getRgbBuffer(ne,V,ae,ce,de,Ae,ve){const pe=this.tintFn,ge=this.base,fe=1/((1<<Ae)-1),xe=ge.numComps,Te=ge.usesZeroToOneRange,Le=(ge.isPassthrough(8)||!Te)&&ve===0;let Ie=Le?de:0;const ue=Le?ce:new Uint8ClampedArray(xe*ae),me=this.numComps,De=new Float32Array(me),Fe=new Float32Array(xe);let je,Ue;for(je=0;je<ae;je++){for(Ue=0;Ue<me;Ue++)De[Ue]=ne[V++]*fe;if(pe(De,0,Fe,0),Te)for(Ue=0;Ue<xe;Ue++)ue[Ie++]=Fe[Ue]*255;else ge.getRgbItem(Fe,0,ue,Ie),Ie+=xe}Le||ge.getRgbBuffer(ue,0,ae,ce,de,8,ve)}getOutputLength(ne,V){return this.base.getOutputLength(ne*this.base.numComps/this.numComps,V)}}class L extends o{constructor(ne){super("Pattern",null),this.base=ne}isDefaultDecode(ne,V){(0,n.unreachable)("Should not call PatternCS.isDefaultDecode")}}class I extends o{constructor(ne,V,ae){super("Indexed",1),this.base=ne,this.highVal=V;const ce=ne.numComps*V;if(this.lookup=new Uint8Array(ce),ae instanceof R.BaseStream){const de=ae.getBytes(ce);this.lookup.set(de)}else if(typeof ae=="string")for(let de=0;de<ce;++de)this.lookup[de]=ae.charCodeAt(de)&255;else throw new n.FormatError(`IndexedCS - unrecognized lookup table: ${ae}`)}getRgbItem(ne,V,ae,ce){const de=this.base.numComps,Ae=ne[V]*de;this.base.getRgbBuffer(this.lookup,Ae,1,ae,ce,8,0)}getRgbBuffer(ne,V,ae,ce,de,Ae,ve){const pe=this.base,ge=pe.numComps,fe=pe.getOutputLength(ge,ve),xe=this.lookup;for(let Te=0;Te<ae;++Te){const Le=ne[V++]*ge;pe.getRgbBuffer(xe,Le,1,ce,de,8,ve),de+=fe}}getOutputLength(ne,V){return this.base.getOutputLength(ne*this.base.numComps,V)}isDefaultDecode(ne,V){return Array.isArray(ne)?ne.length!==2?((0,n.warn)("Decode map length is not correct"),!0):!Number.isInteger(V)||V<1?((0,n.warn)("Bits per component is not correct"),!0):ne[0]===0&&ne[1]===(1<<V)-1:!0}}class T extends o{constructor(){super("DeviceGray",1)}getRgbItem(ne,V,ae,ce){const de=ne[V]*255;ae[ce]=ae[ce+1]=ae[ce+2]=de}getRgbBuffer(ne,V,ae,ce,de,Ae,ve){const pe=255/((1<<Ae)-1);let ge=V,fe=de;for(let xe=0;xe<ae;++xe){const Te=pe*ne[ge++];ce[fe++]=Te,ce[fe++]=Te,ce[fe++]=Te,fe+=ve}}getOutputLength(ne,V){return ne*(3+V)}}class d extends o{constructor(){super("DeviceRGB",3)}getRgbItem(ne,V,ae,ce){ae[ce]=ne[V]*255,ae[ce+1]=ne[V+1]*255,ae[ce+2]=ne[V+2]*255}getRgbBuffer(ne,V,ae,ce,de,Ae,ve){if(Ae===8&&ve===0){ce.set(ne.subarray(V,V+ae*3),de);return}const pe=255/((1<<Ae)-1);let ge=V,fe=de;for(let xe=0;xe<ae;++xe)ce[fe++]=pe*ne[ge++],ce[fe++]=pe*ne[ge++],ce[fe++]=pe*ne[ge++],fe+=ve}getOutputLength(ne,V){return ne*(3+V)/3|0}isPassthrough(ne){return ne===8}}class f extends o{constructor(){super("DeviceCMYK",4);Ee(this,v)}getRgbItem(V,ae,ce,de){Me(this,v,Ki).call(this,V,ae,1,ce,de)}getRgbBuffer(V,ae,ce,de,Ae,ve,pe){const ge=1/((1<<ve)-1);for(let fe=0;fe<ce;fe++)Me(this,v,Ki).call(this,V,ae,ge,de,Ae),ae+=4,Ae+=3+pe}getOutputLength(V,ae){return V/4*(3+ae)|0}}v=new WeakSet,Ki=function(V,ae,ce,de,Ae){const ve=V[ae]*ce,pe=V[ae+1]*ce,ge=V[ae+2]*ce,fe=V[ae+3]*ce;de[Ae]=255+ve*(-4.387332384609988*ve+54.48615194189176*pe+18.82290502165302*ge+212.25662451639585*fe+-285.2331026137004)+pe*(1.7149763477362134*pe-5.6096736904047315*ge+-17.873870861415444*fe-5.497006427196366)+ge*(-2.5217340131683033*ge-21.248923337353073*fe+17.5119270841813)+fe*(-21.86122147463605*fe-189.48180835922747),de[Ae+1]=255+ve*(8.841041422036149*ve+60.118027045597366*pe+6.871425592049007*ge+31.159100130055922*fe+-79.2970844816548)+pe*(-15.310361306967817*pe+17.575251261109482*ge+131.35250912493976*fe-190.9453302588951)+ge*(4.444339102852739*ge+9.8632861493405*fe-24.86741582555878)+fe*(-20.737325471181034*fe-187.80453709719578),de[Ae+2]=255+ve*(.8842522430003296*ve+8.078677503112928*pe+30.89978309703729*ge-.23883238689178934*fe+-14.183576799673286)+pe*(10.49593273432072*pe+63.02378494754052*ge+50.606957656360734*fe-112.23884253719248)+ge*(.03296041114873217*ge+115.60384449646641*fe+-193.58209356861505)+fe*(-22.33816807309886*fe-180.12613974708367)};class i extends o{constructor(V,ae,ce){super("CalGray",1);Ee(this,M);if(!V)throw new n.FormatError("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=V,[this.XB,this.YB,this.ZB]=ae||[0,0,0],this.G=ce||1,this.XW<0||this.ZW<0||this.YW!==1)throw new n.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&((0,n.info)(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),(this.XB!==0||this.YB!==0||this.ZB!==0)&&(0,n.warn)(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),this.G<1&&((0,n.info)(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}getRgbItem(V,ae,ce,de){Me(this,M,Yi).call(this,V,ae,ce,de,1)}getRgbBuffer(V,ae,ce,de,Ae,ve,pe){const ge=1/((1<<ve)-1);for(let fe=0;fe<ce;++fe)Me(this,M,Yi).call(this,V,ae,de,Ae,ge),ae+=1,Ae+=3+pe}getOutputLength(V,ae){return V*(3+ae)}}M=new WeakSet,Yi=function(V,ae,ce,de,Ae){const pe=(V[ae]*Ae)**this.G,ge=this.YW*pe,fe=Math.max(295.8*ge**.3333333333333333-40.8,0);ce[de]=fe,ce[de+1]=fe,ce[de+2]=fe};const j=class j extends o{constructor(V,ae,ce,de){super("CalRGB",3);Ee(this,F);Ee(this,O);Ee(this,x);Ee(this,r);Ee(this,c);Ee(this,C);Ee(this,X);Ee(this,re);Ee(this,oe);Ee(this,te);if(!V)throw new n.FormatError("WhitePoint missing - required for color space CalRGB");const[Ae,ve,pe]=this.whitePoint=V,[ge,fe,xe]=this.blackPoint=ae||new Float32Array(3);if([this.GR,this.GG,this.GB]=ce||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=de||new Float32Array([1,0,0,0,1,0,0,0,1]),Ae<0||pe<0||ve!==1)throw new n.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);(ge<0||fe<0||xe<0)&&((0,n.info)(`Invalid BlackPoint for ${this.name} [${ge}, ${fe}, ${xe}], falling back to default.`),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&((0,n.info)(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`),this.GR=this.GG=this.GB=1)}getRgbItem(V,ae,ce,de){Me(this,te,Ji).call(this,V,ae,ce,de,1)}getRgbBuffer(V,ae,ce,de,Ae,ve,pe){const ge=1/((1<<ve)-1);for(let fe=0;fe<ce;++fe)Me(this,te,Ji).call(this,V,ae,de,Ae,ge),ae+=3,Ae+=3+pe}getOutputLength(V,ae){return V*(3+ae)/3|0}};H=new WeakMap,A=new WeakMap,E=new WeakMap,l=new WeakMap,g=new WeakMap,N=new WeakMap,s=new WeakMap,u=new WeakMap,F=new WeakSet,fn=function(V,ae,ce){ce[0]=V[0]*ae[0]+V[1]*ae[1]+V[2]*ae[2],ce[1]=V[3]*ae[0]+V[4]*ae[1]+V[5]*ae[2],ce[2]=V[6]*ae[0]+V[7]*ae[1]+V[8]*ae[2]},O=new WeakSet,La=function(V,ae,ce){ce[0]=ae[0]*1/V[0],ce[1]=ae[1]*1/V[1],ce[2]=ae[2]*1/V[2]},x=new WeakSet,Na=function(V,ae,ce){ce[0]=ae[0]*.95047/V[0],ce[1]=ae[1]*1/V[1],ce[2]=ae[2]*1.08883/V[2]},r=new WeakSet,Wn=function(V){return V<=.0031308?Me(this,c,gn).call(this,0,1,12.92*V):V>=.99554525?1:Me(this,c,gn).call(this,0,1,1.055*V**.4166666666666667-.055)},c=new WeakSet,gn=function(V,ae,ce){return Math.max(V,Math.min(ae,ce))},C=new WeakSet,pn=function(V){return V<0?-Me(this,C,pn).call(this,-V):V>8?((V+16)/116)**3:V*le(j,u)},X=new WeakSet,Ba=function(V,ae,ce){if(V[0]===0&&V[1]===0&&V[2]===0){ce[0]=ae[0],ce[1]=ae[1],ce[2]=ae[2];return}const de=Me(this,C,pn).call(this,0),Ae=de,ve=Me(this,C,pn).call(this,V[0]),pe=de,ge=Me(this,C,pn).call(this,V[1]),fe=de,xe=Me(this,C,pn).call(this,V[2]),Te=(1-Ae)/(1-ve),Le=1-Te,Ie=(1-pe)/(1-ge),ue=1-Ie,me=(1-fe)/(1-xe),De=1-me;ce[0]=ae[0]*Te+Le,ce[1]=ae[1]*Ie+ue,ce[2]=ae[2]*me+De},re=new WeakSet,$a=function(V,ae,ce){if(V[0]===1&&V[2]===1){ce[0]=ae[0],ce[1]=ae[1],ce[2]=ae[2];return}const de=ce;Me(this,F,fn).call(this,le(j,H),ae,de);const Ae=le(j,g);Me(this,O,La).call(this,V,de,Ae),Me(this,F,fn).call(this,le(j,A),Ae,ce)},oe=new WeakSet,ja=function(V,ae,ce){const de=ce;Me(this,F,fn).call(this,le(j,H),ae,de);const Ae=le(j,g);Me(this,x,Na).call(this,V,de,Ae),Me(this,F,fn).call(this,le(j,A),Ae,ce)},te=new WeakSet,Ji=function(V,ae,ce,de,Ae){const ve=Me(this,c,gn).call(this,0,1,V[ae]*Ae),pe=Me(this,c,gn).call(this,0,1,V[ae+1]*Ae),ge=Me(this,c,gn).call(this,0,1,V[ae+2]*Ae),fe=ve===1?1:ve**this.GR,xe=pe===1?1:pe**this.GG,Te=ge===1?1:ge**this.GB,Le=this.MXA*fe+this.MXB*xe+this.MXC*Te,Ie=this.MYA*fe+this.MYB*xe+this.MYC*Te,ue=this.MZA*fe+this.MZB*xe+this.MZC*Te,me=le(j,N);me[0]=Le,me[1]=Ie,me[2]=ue;const De=le(j,s);Me(this,re,$a).call(this,this.whitePoint,me,De);const Fe=le(j,N);Me(this,X,Ba).call(this,this.blackPoint,De,Fe);const je=le(j,s);Me(this,oe,ja).call(this,le(j,l),Fe,je);const Ue=le(j,N);Me(this,F,fn).call(this,le(j,E),je,Ue),ce[de]=Me(this,r,Wn).call(this,Ue[0])*255,ce[de+1]=Me(this,r,Wn).call(this,Ue[1])*255,ce[de+2]=Me(this,r,Wn).call(this,Ue[2])*255},Ee(j,H,new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296])),Ee(j,A,new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867])),Ee(j,E,new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252])),Ee(j,l,new Float32Array([1,1,1])),Ee(j,g,new Float32Array(3)),Ee(j,N,new Float32Array(3)),Ee(j,s,new Float32Array(3)),Ee(j,u,.0011070564598794539);let S=j;class w extends o{constructor(V,ae,ce){super("Lab",3);Ee(this,Y);Ee(this,G);Ee(this,ee);if(!V)throw new n.FormatError("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=V,[this.amin,this.amax,this.bmin,this.bmax]=ce||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=ae||[0,0,0],this.XW<0||this.ZW<0||this.YW!==1)throw new n.FormatError("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&((0,n.info)("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&((0,n.info)("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}getRgbItem(V,ae,ce,de){Me(this,ee,Zi).call(this,V,ae,!1,ce,de)}getRgbBuffer(V,ae,ce,de,Ae,ve,pe){const ge=(1<<ve)-1;for(let fe=0;fe<ce;fe++)Me(this,ee,Zi).call(this,V,ae,ge,de,Ae),ae+=3,Ae+=3+pe}getOutputLength(V,ae){return V*(3+ae)/3|0}isDefaultDecode(V,ae){return!0}get usesZeroToOneRange(){return(0,n.shadow)(this,"usesZeroToOneRange",!1)}}Y=new WeakSet,qn=function(V){return V>=.20689655172413793?V**3:.12841854934601665*(V-.13793103448275862)},G=new WeakSet,Vn=function(V,ae,ce,de){return ce+V*(de-ce)/ae},ee=new WeakSet,Zi=function(V,ae,ce,de,Ae){let ve=V[ae],pe=V[ae+1],ge=V[ae+2];ce!==!1&&(ve=Me(this,G,Vn).call(this,ve,ce,0,100),pe=Me(this,G,Vn).call(this,pe,ce,this.amin,this.amax),ge=Me(this,G,Vn).call(this,ge,ce,this.bmin,this.bmax)),pe>this.amax?pe=this.amax:pe<this.amin&&(pe=this.amin),ge>this.bmax?ge=this.bmax:ge<this.bmin&&(ge=this.bmin);const fe=(ve+16)/116,xe=fe+pe/500,Te=fe-ge/200,Le=this.XW*Me(this,Y,qn).call(this,xe),Ie=this.YW*Me(this,Y,qn).call(this,fe),ue=this.ZW*Me(this,Y,qn).call(this,Te);let me,De,Fe;this.ZW<1?(me=Le*3.1339+Ie*-1.617+ue*-.4906,De=Le*-.9785+Ie*1.916+ue*.0333,Fe=Le*.072+Ie*-.229+ue*1.4057):(me=Le*3.2406+Ie*-1.5372+ue*-.4986,De=Le*-.9689+Ie*1.8758+ue*.0415,Fe=Le*.0557+Ie*-.204+ue*1.057),de[Ae]=Math.sqrt(me)*255,de[Ae+1]=Math.sqrt(De)*255,de[Ae+2]=Math.sqrt(Fe)*255}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PartialEvaluator=P.EvaluatorPreprocessor=void 0;var n=ie(2),k=ie(14),R=ie(4),e=ie(34),t=ie(37),o=ie(41),$=ie(50),L=ie(51),I=ie(42),T=ie(57),d=ie(16),f=ie(59),i=ie(8),S=ie(5),w=ie(60),v=ie(12),b=ie(18),M=ie(38),_=ie(61),H=ie(39),A=ie(45),E=ie(40),l=ie(62),g=ie(63),N=ie(64),s=ie(65);const u=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),F={TILING:1,SHADING:2},U=10,O=Promise.resolve();function m(re,K=!1){if(Array.isArray(re)){for(const oe of re){const J=m(oe,!0);if(J)return J}return(0,n.warn)(`Unsupported blend mode Array: ${re}`),"source-over"}if(!(re instanceof R.Name))return K?null:"source-over";switch(re.name){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";case"Luminosity":return"luminosity"}return K?null:((0,n.warn)(`Unsupported blend mode: ${re.name}`),"source-over")}function x(re){var K;re.fn===n.OPS.paintImageMaskXObject&&((K=re.args[0])==null?void 0:K.count)>0&&re.args[0].count++}const X=class X{constructor(){this.reset()}check(){return++this.checked<X.CHECK_TIME_EVERY?!1:(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+X.TIME_SLOT_DURATION_MS,this.checked=0}};Rt(X,"TIME_SLOT_DURATION_MS",20),Rt(X,"CHECK_TIME_EVERY",100);let y=X;class r{constructor({xref:K,handler:oe,pageIndex:J,idFactory:te,fontCache:B,builtInCMapCache:j,standardFontDataCache:Y,globalImageCache:W,systemFontCache:G,options:Q=null}){this.xref=K,this.handler=oe,this.pageIndex=J,this.idFactory=te,this.fontCache=B,this.builtInCMapCache=j,this.standardFontDataCache=Y,this.globalImageCache=W,this.systemFontCache=G,this.options=Q||u,this.parsingType3Font=!1,this._regionalImageCache=new f.RegionalImageCache,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this),l.ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes)}get _pdfFunctionFactory(){const K=new T.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported});return(0,n.shadow)(this,"_pdfFunctionFactory",K)}clone(K=null){const oe=Object.create(this);return oe.options=Object.assign(Object.create(null),this.options,K),oe}hasBlendModes(K,oe){if(!(K instanceof R.Dict)||K.objId&&oe.has(K.objId))return!1;const J=new R.RefSet(oe);K.objId&&J.put(K.objId);const te=[K],B=this.xref;for(;te.length;){const j=te.shift(),Y=j.get("ExtGState");if(Y instanceof R.Dict)for(let G of Y.getRawValues()){if(G instanceof R.Ref){if(J.has(G))continue;try{G=B.fetch(G)}catch(ee){J.put(G),(0,n.info)(`hasBlendModes - ignoring ExtGState: "${ee}".`);continue}}if(!(G instanceof R.Dict))continue;G.objId&&J.put(G.objId);const Q=G.get("BM");if(Q instanceof R.Name){if(Q.name!=="Normal")return!0;continue}if(Q!==void 0&&Array.isArray(Q)){for(const ee of Q)if(ee instanceof R.Name&&ee.name!=="Normal")return!0}}const W=j.get("XObject");if(W instanceof R.Dict)for(let G of W.getRawValues()){if(G instanceof R.Ref){if(J.has(G))continue;try{G=B.fetch(G)}catch(ee){J.put(G),(0,n.info)(`hasBlendModes - ignoring XObject: "${ee}".`);continue}}if(!(G instanceof S.BaseStream))continue;G.dict.objId&&J.put(G.dict.objId);const Q=G.dict.get("Resources");Q instanceof R.Dict&&(Q.objId&&J.has(Q.objId)||(te.push(Q),Q.objId&&J.put(Q.objId)))}}for(const j of J)oe.put(j);return!1}async fetchBuiltInCMap(K){const oe=this.builtInCMapCache.get(K);if(oe)return oe;let J;if(this.options.cMapUrl!==null){const te=`${this.options.cMapUrl}${K}.bcmap`,B=await fetch(te);if(!B.ok)throw new Error(`fetchBuiltInCMap: failed to fetch file "${te}" with "${B.statusText}".`);J={cMapData:new Uint8Array(await B.arrayBuffer()),compressionType:n.CMapCompressionType.BINARY}}else J=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:K});return J.compressionType!==n.CMapCompressionType.NONE&&this.builtInCMapCache.set(K,J),J}async fetchStandardFontData(K){const oe=this.standardFontDataCache.get(K);if(oe)return new i.Stream(oe);if(this.options.useSystemFonts&&K!=="Symbol"&&K!=="ZapfDingbats")return null;const J=(0,o.getFontNameToFileMap)(),te=J[K];let B;if(this.options.standardFontDataUrl!==null){const j=`${this.options.standardFontDataUrl}${te}`,Y=await fetch(j);Y.ok?B=await Y.arrayBuffer():(0,n.warn)(`fetchStandardFontData: failed to fetch file "${j}" with "${Y.statusText}".`)}else try{B=await this.handler.sendWithPromise("FetchStandardFontData",{filename:te})}catch(j){(0,n.warn)(`fetchStandardFontData: failed to fetch file "${te}" with "${j}".`)}return B?(this.standardFontDataCache.set(K,B),new i.Stream(B)):null}async buildFormXObject(K,oe,J,te,B,j,Y){const W=oe.dict,G=W.getArray("Matrix");let Q=W.getArray("BBox");Q=Array.isArray(Q)&&Q.length===4?n.Util.normalizeRect(Q):null;let ee,z;W.has("OC")&&(ee=await this.parseMarkedContentProps(W.get("OC"),K)),ee!==void 0&&te.addOp(n.OPS.beginMarkedContentProps,["OC",ee]);const se=W.get("Group");if(se){z={matrix:G,bbox:Q,smask:J,isolated:!1,knockout:!1};const V=se.get("S");let ae=null;if((0,R.isName)(V,"Transparency")&&(z.isolated=se.get("I")||!1,z.knockout=se.get("K")||!1,se.has("CS"))){const ce=se.getRaw("CS"),de=v.ColorSpace.getCached(ce,this.xref,Y);de?ae=de:ae=await this.parseColorSpace({cs:ce,resources:K,localColorSpaceCache:Y})}J!=null&&J.backdrop&&(ae||(ae=v.ColorSpace.singletons.rgb),J.backdrop=ae.getRgb(J.backdrop,0)),te.addOp(n.OPS.beginGroup,[z])}const ne=se?[G,null]:[G,Q];return te.addOp(n.OPS.paintFormXObjectBegin,ne),this.getOperatorList({stream:oe,task:B,resources:W.get("Resources")||K,operatorList:te,initialState:j}).then(function(){te.addOp(n.OPS.paintFormXObjectEnd,[]),se&&te.addOp(n.OPS.endGroup,[z]),ee!==void 0&&te.addOp(n.OPS.endMarkedContent,[])})}_sendImgData(K,oe,J=!1){const te=oe?[oe.bitmap||oe.data.buffer]:null;return this.parsingType3Font||J?this.handler.send("commonobj",[K,"Image",oe],te):this.handler.send("obj",[K,this.pageIndex,"Image",oe],te)}async buildPaintImageXObject({resources:K,image:oe,isInline:J=!1,operatorList:te,cacheKey:B,localImageCache:j,localColorSpaceCache:Y}){const W=oe.dict,G=W.objId,Q=W.get("W","Width"),ee=W.get("H","Height");if(!(Q&&typeof Q=="number")||!(ee&&typeof ee=="number")){(0,n.warn)("Image dimensions are missing, or not numbers.");return}const z=this.options.maxImageSize;if(z!==-1&&Q*ee>z){const ve="Image exceeded maximum allowed size and was removed.";if(this.options.ignoreErrors){(0,n.warn)(ve);return}throw new Error(ve)}let se;W.has("OC")&&(se=await this.parseMarkedContentProps(W.get("OC"),K));const ne=W.get("IM","ImageMask")||!1;let V,ae;if(ne){const ve=W.get("I","Interpolate"),pe=Q+7>>3,ge=oe.getBytes(pe*ee),fe=W.getArray("D","Decode");if(this.parsingType3Font){if(V=s.PDFImage.createRawMask({imgArray:ge,width:Q,height:ee,imageIsFromDecodeStream:oe instanceof b.DecodeStream,inverseDecode:(fe==null?void 0:fe[0])>0,interpolate:ve}),V.cached=!!B,ae=[V],te.addImageOps(n.OPS.paintImageMaskXObject,ae,se),B){const Te={fn:n.OPS.paintImageMaskXObject,args:ae,optionalContent:se};j.set(B,G,Te),G&&this._regionalImageCache.set(null,G,Te)}return}if(V=await s.PDFImage.createMask({imgArray:ge,width:Q,height:ee,imageIsFromDecodeStream:oe instanceof b.DecodeStream,inverseDecode:(fe==null?void 0:fe[0])>0,interpolate:ve,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported}),V.isSingleOpaquePixel){if(te.addImageOps(n.OPS.paintSolidColorImageMask,[],se),B){const Te={fn:n.OPS.paintSolidColorImageMask,args:[],optionalContent:se};j.set(B,G,Te),G&&this._regionalImageCache.set(null,G,Te)}return}const xe=`mask_${this.idFactory.createObjId()}`;if(te.addDependency(xe),this._sendImgData(xe,V),ae=[{data:xe,width:V.width,height:V.height,interpolate:V.interpolate,count:1}],te.addImageOps(n.OPS.paintImageMaskXObject,ae,se),B){const Te={fn:n.OPS.paintImageMaskXObject,args:ae,optionalContent:se};j.set(B,G,Te),G&&this._regionalImageCache.set(null,G,Te)}return}const ce=200;if(J&&!W.has("SMask")&&!W.has("Mask")&&Q+ee<ce){V=await new s.PDFImage({xref:this.xref,res:K,image:oe,isInline:J,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:Y}).createImageData(!0,!1),te.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,te.addImageOps(n.OPS.paintInlineImageXObject,[V],se);return}let de=`img_${this.idFactory.createObjId()}`,Ae=!1;if(this.parsingType3Font?de=`${this.idFactory.getDocId()}_type3_${de}`:G&&(Ae=this.globalImageCache.shouldCache(G,this.pageIndex),Ae&&(de=`${this.idFactory.getDocId()}_${de}`)),te.addDependency(de),ae=[de,Q,ee],s.PDFImage.buildImage({xref:this.xref,res:K,image:oe,isInline:J,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:Y}).then(async ve=>{if(V=await ve.createImageData(!1,this.options.isOffscreenCanvasSupported),B&&G&&Ae){const pe=V.bitmap?V.width*V.height*4:V.data.length;this.globalImageCache.addByteSize(G,pe)}return this._sendImgData(de,V,Ae)}).catch(ve=>((0,n.warn)(`Unable to decode image "${de}": "${ve}".`),this._sendImgData(de,null,Ae))),te.addImageOps(n.OPS.paintImageXObject,ae,se),B){const ve={fn:n.OPS.paintImageXObject,args:ae,optionalContent:se};j.set(B,G,ve),G&&(this._regionalImageCache.set(null,G,ve),Ae&&((0,n.assert)(!J,"Cannot cache an inline image globally."),this.globalImageCache.setData(G,{objId:de,fn:n.OPS.paintImageXObject,args:ae,optionalContent:se,byteSize:0})))}}handleSMask(K,oe,J,te,B,j){const Y=K.get("G"),W={subtype:K.get("S").name,backdrop:K.get("BC")},G=K.get("TR");if((0,T.isPDFFunction)(G)){const Q=this._pdfFunctionFactory.create(G),ee=new Uint8Array(256),z=new Float32Array(1);for(let se=0;se<256;se++)z[0]=se/255,Q(z,0,z,0),ee[se]=z[0]*255|0;W.transferMap=ee}return this.buildFormXObject(oe,Y,W,J,te,B.state.clone(),j)}handleTransferFunction(K){let oe;if(Array.isArray(K))oe=K;else if((0,T.isPDFFunction)(K))oe=[K];else return null;const J=[];let te=0,B=0;for(const j of oe){const Y=this.xref.fetchIfRef(j);if(te++,(0,R.isName)(Y,"Identity")){J.push(null);continue}else if(!(0,T.isPDFFunction)(Y))return null;const W=this._pdfFunctionFactory.create(Y),G=new Uint8Array(256),Q=new Float32Array(1);for(let ee=0;ee<256;ee++)Q[0]=ee/255,W(Q,0,Q,0),G[ee]=Q[0]*255|0;J.push(G),B++}return!(te===1||te===4)||B===0?null:J}handleTilingType(K,oe,J,te,B,j,Y,W){const G=new N.OperatorList,Q=R.Dict.merge({xref:this.xref,dictArray:[B.get("Resources"),J]});return this.getOperatorList({stream:te,task:Y,resources:Q,operatorList:G}).then(function(){const ee=G.getIR(),z=(0,$.getTilingPatternIR)(ee,B,oe);j.addDependencies(G.dependencies),j.addOp(K,z),B.objId&&W.set(null,B.objId,{operatorListIR:ee,dict:B})}).catch(ee=>{if(!(ee instanceof n.AbortException)){if(this.options.ignoreErrors){(0,n.warn)(`handleTilingType - ignoring pattern: "${ee}".`);return}throw ee}})}handleSetFont(K,oe,J,te,B,j,Y=null,W=null){const G=(oe==null?void 0:oe[0])instanceof R.Name?oe[0].name:null;return this.loadFont(G,J,K,Y,W).then(Q=>Q.font.isType3Font?Q.loadType3Data(this,K,B).then(function(){return te.addDependencies(Q.type3Dependencies),Q}).catch(ee=>new p({loadedName:"g_font_error",font:new e.ErrorFont(`Type3 font load error: ${ee}`),dict:Q.font,evaluatorOptions:this.options})):Q).then(Q=>(j.font=Q.font,Q.send(this.handler),Q.loadedName))}handleText(K,oe){const J=oe.font,te=J.charsToGlyphs(K);return J.data&&(oe.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG||oe.fillColorSpace.name==="Pattern"||J.disableFontFace||this.options.disableFontFace)&&r.buildFontPaths(J,te,this.handler,this.options),te}ensureStateFont(K){if(K.font)return;const oe=new n.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(this.options.ignoreErrors){(0,n.warn)(`ensureStateFont: "${oe}".`);return}throw oe}async setGState({resources:K,gState:oe,operatorList:J,cacheKey:te,task:B,stateManager:j,localGStateCache:Y,localColorSpaceCache:W}){const G=oe.objId;let Q=!0;const ee=[];let z=Promise.resolve();for(const se of oe.getKeys()){const ne=oe.get(se);switch(se){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":ee.push([se,ne]);break;case"Font":Q=!1,z=z.then(()=>this.handleSetFont(K,null,ne[0],J,B,j.state).then(function(ae){J.addDependency(ae),ee.push([se,[ae,ne[1]]])}));break;case"BM":ee.push([se,m(ne)]);break;case"SMask":if((0,R.isName)(ne,"None")){ee.push([se,!1]);break}ne instanceof R.Dict?(Q=!1,z=z.then(()=>this.handleSMask(ne,K,J,B,j,W)),ee.push([se,!0])):(0,n.warn)("Unsupported SMask type");break;case"TR":const V=this.handleTransferFunction(ne);ee.push([se,V]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":(0,n.info)("graphic state operator "+se);break;default:(0,n.info)("Unknown graphic state operator "+se);break}}return z.then(function(){ee.length>0&&J.addOp(n.OPS.setGState,[ee]),Q&&Y.set(te,G,ee)})}loadFont(K,oe,J,te=null,B=null){const j=async()=>new p({loadedName:"g_font_error",font:new e.ErrorFont(`Font "${K}" is not available.`),dict:oe,evaluatorOptions:this.options});let Y;if(oe)oe instanceof R.Ref&&(Y=oe);else{const ne=J.get("Font");ne&&(Y=ne.getRaw(K))}if(Y){if(this.parsingType3Font&&this.type3FontRefs.has(Y))return j();if(this.fontCache.has(Y))return this.fontCache.get(Y);oe=this.xref.fetchIfRef(Y)}if(!(oe instanceof R.Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,n.warn)(`Font "${K}" is not available.`),j();(0,n.warn)(`Font "${K}" is not available -- attempting to fallback to a default font.`),oe=te||r.fallbackFontDict}if(oe.cacheKey&&this.fontCache.has(oe.cacheKey))return this.fontCache.get(oe.cacheKey);const W=new n.PromiseCapability;let G;try{G=this.preEvaluateFont(oe),G.cssFontInfo=B}catch(ne){return(0,n.warn)(`loadFont - preEvaluateFont failed: "${ne}".`),j()}const{descriptor:Q,hash:ee}=G,z=Y instanceof R.Ref;let se;if(ee&&Q instanceof R.Dict){const ne=Q.fontAliases||(Q.fontAliases=Object.create(null));if(ne[ee]){const V=ne[ee].aliasRef;if(z&&V&&this.fontCache.has(V))return this.fontCache.putAlias(Y,V),this.fontCache.get(Y)}else ne[ee]={fontID:this.idFactory.createFontId()};z&&(ne[ee].aliasRef=Y),se=ne[ee].fontID}else se=this.idFactory.createFontId();return(0,n.assert)(se==null?void 0:se.startsWith("f"),'The "fontID" must be (correctly) defined.'),z?this.fontCache.put(Y,W.promise):(oe.cacheKey=`cacheKey_${se}`,this.fontCache.put(oe.cacheKey,W.promise)),oe.loadedName=`${this.idFactory.getDocId()}_${se}`,this.translateFont(G).then(ne=>{W.resolve(new p({loadedName:oe.loadedName,font:ne,dict:oe,evaluatorOptions:this.options}))}).catch(ne=>{(0,n.warn)(`loadFont - translateFont failed: "${ne}".`),W.resolve(new p({loadedName:oe.loadedName,font:new e.ErrorFont(ne instanceof Error?ne.message:ne),dict:oe,evaluatorOptions:this.options}))}),W.promise}buildPath(K,oe,J,te=!1){const B=K.length-1;if(J||(J=[]),B<0||K.fnArray[B]!==n.OPS.constructPath){te&&((0,n.warn)(`Encountered path operator "${oe}" inside of a text object.`),K.addOp(n.OPS.save,null));let j;switch(oe){case n.OPS.rectangle:const Y=J[0]+J[2],W=J[1]+J[3];j=[Math.min(J[0],Y),Math.max(J[0],Y),Math.min(J[1],W),Math.max(J[1],W)];break;case n.OPS.moveTo:case n.OPS.lineTo:j=[J[0],J[0],J[1],J[1]];break;default:j=[1/0,-1/0,1/0,-1/0];break}K.addOp(n.OPS.constructPath,[[oe],J,j]),te&&K.addOp(n.OPS.restore,null)}else{const j=K.argsArray[B];j[0].push(oe),j[1].push(...J);const Y=j[2];switch(oe){case n.OPS.rectangle:const W=J[0]+J[2],G=J[1]+J[3];Y[0]=Math.min(Y[0],J[0],W),Y[1]=Math.max(Y[1],J[0],W),Y[2]=Math.min(Y[2],J[1],G),Y[3]=Math.max(Y[3],J[1],G);break;case n.OPS.moveTo:case n.OPS.lineTo:Y[0]=Math.min(Y[0],J[0]),Y[1]=Math.max(Y[1],J[0]),Y[2]=Math.min(Y[2],J[1]),Y[3]=Math.max(Y[3],J[1]);break}}}parseColorSpace({cs:K,resources:oe,localColorSpaceCache:J}){return v.ColorSpace.parseAsync({cs:K,xref:this.xref,resources:oe,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:J}).catch(te=>{if(te instanceof n.AbortException)return null;if(this.options.ignoreErrors)return(0,n.warn)(`parseColorSpace - ignoring ColorSpace: "${te}".`),null;throw te})}parseShading({shading:K,resources:oe,localColorSpaceCache:J,localShadingPatternCache:te}){let B=te.get(K);if(!B){var j=$.Pattern.parseShading(K,this.xref,oe,this._pdfFunctionFactory,J);const Y=j.getIR();B=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(B=`${this.idFactory.getDocId()}_type3_${B}`),te.set(K,B),this.parsingType3Font?this.handler.send("commonobj",[B,"Pattern",Y]):this.handler.send("obj",[B,this.pageIndex,"Pattern",Y])}return B}handleColorN(K,oe,J,te,B,j,Y,W,G,Q){const ee=J.pop();if(ee instanceof R.Name){const z=B.getRaw(ee.name),se=z instanceof R.Ref&&G.getByRef(z);if(se)try{const V=te.base?te.base.getRgb(J,0):null,ae=(0,$.getTilingPatternIR)(se.operatorListIR,se.dict,V);K.addOp(oe,ae);return}catch{}const ne=this.xref.fetchIfRef(z);if(ne){const V=ne instanceof S.BaseStream?ne.dict:ne,ae=V.get("PatternType");if(ae===F.TILING){const ce=te.base?te.base.getRgb(J,0):null;return this.handleTilingType(oe,ce,j,ne,V,K,Y,G)}else if(ae===F.SHADING){const ce=V.get("Shading"),de=V.getArray("Matrix"),Ae=this.parseShading({shading:ce,resources:j,localColorSpaceCache:W,localShadingPatternCache:Q});K.addOp(oe,["Shading",Ae,de]);return}throw new n.FormatError(`Unknown PatternType: ${ae}`)}}throw new n.FormatError(`Unknown PatternName: ${ee}`)}_parseVisibilityExpression(K,oe,J){if(++oe>10){(0,n.warn)("Visibility expression is too deeply nested");return}const B=K.length,j=this.xref.fetchIfRef(K[0]);if(B<2||!(j instanceof R.Name)){(0,n.warn)("Invalid visibility expression");return}switch(j.name){case"And":case"Or":case"Not":J.push(j.name);break;default:(0,n.warn)(`Invalid operator ${j.name} in visibility expression`);return}for(let Y=1;Y<B;Y++){const W=K[Y],G=this.xref.fetchIfRef(W);if(Array.isArray(G)){const Q=[];J.push(Q),this._parseVisibilityExpression(G,oe,Q)}else W instanceof R.Ref&&J.push(W.toString())}}async parseMarkedContentProps(K,oe){var B;let J;if(K instanceof R.Name)J=oe.get("Properties").get(K.name);else if(K instanceof R.Dict)J=K;else throw new n.FormatError("Optional content properties malformed.");const te=(B=J.get("Type"))==null?void 0:B.name;if(te==="OCG")return{type:te,id:J.objId};if(te==="OCMD"){const j=J.get("VE");if(Array.isArray(j)){const W=[];if(this._parseVisibilityExpression(j,0,W),W.length>0)return{type:"OCMD",expression:W}}const Y=J.get("OCGs");if(Array.isArray(Y)||Y instanceof R.Dict){const W=[];if(Array.isArray(Y))for(const G of Y)W.push(G.toString());else W.push(Y.objId);return{type:te,ids:W,policy:J.get("P")instanceof R.Name?J.get("P").name:null,expression:null}}else if(Y instanceof R.Ref)return{type:te,id:Y.toString()}}return null}getOperatorList({stream:K,task:oe,resources:J,operatorList:te,initialState:B=null,fallbackFontDict:j=null}){if(J||(J=R.Dict.empty),B||(B=new C),!te)throw new Error('getOperatorList: missing "operatorList" parameter');const Y=this,W=this.xref;let G=!1;const Q=new f.LocalImageCache,ee=new f.LocalColorSpaceCache,z=new f.LocalGStateCache,se=new f.LocalTilingPatternCache,ne=new Map,V=J.get("XObject")||R.Dict.empty,ae=J.get("Pattern")||R.Dict.empty,ce=new c(B),de=new D(K,W,ce),Ae=new y;function ve(pe){for(let ge=0,fe=de.savedStatesDepth;ge<fe;ge++)te.addOp(n.OPS.restore,[])}return new Promise(function pe(ge,fe){const xe=function(be){Promise.all([be,te.ready]).then(function(){try{pe(ge,fe)}catch(he){fe(he)}},fe)};oe.ensureNotTerminated(),Ae.reset();const Te={};let Le,Ie,ue,me,De,Fe;for(;!(Le=Ae.check())&&(Te.args=null,!!de.read(Te));){let be=Te.args,he=Te.fn;switch(he|0){case n.OPS.paintXObject:if(Fe=be[0]instanceof R.Name,De=be[0].name,Fe){const Se=Q.getByName(De);if(Se){te.addImageOps(Se.fn,Se.args,Se.optionalContent),x(Se),be=null;continue}}xe(new Promise(function(Se,Oe){if(!Fe)throw new n.FormatError("XObject must be referred to by name.");let Re=V.getRaw(De);if(Re instanceof R.Ref){const Ye=Q.getByRef(Re)||Y._regionalImageCache.getByRef(Re);if(Ye){te.addImageOps(Ye.fn,Ye.args,Ye.optionalContent),x(Ye),Se();return}const Ge=Y.globalImageCache.getData(Re,Y.pageIndex);if(Ge){te.addDependency(Ge.objId),te.addImageOps(Ge.fn,Ge.args,Ge.optionalContent),Se();return}Re=W.fetch(Re)}if(!(Re instanceof S.BaseStream))throw new n.FormatError("XObject should be a stream");const Ne=Re.dict.get("Subtype");if(!(Ne instanceof R.Name))throw new n.FormatError("XObject should have a Name subtype");if(Ne.name==="Form"){ce.save(),Y.buildFormXObject(J,Re,null,te,oe,ce.state.clone(),ee).then(function(){ce.restore(),Se()},Oe);return}else if(Ne.name==="Image"){Y.buildPaintImageXObject({resources:J,image:Re,operatorList:te,cacheKey:De,localImageCache:Q,localColorSpaceCache:ee}).then(Se,Oe);return}else if(Ne.name==="PS")(0,n.info)("Ignored XObject subtype PS");else throw new n.FormatError(`Unhandled XObject subtype ${Ne.name}`);Se()}).catch(function(Se){if(!(Se instanceof n.AbortException)){if(Y.options.ignoreErrors){(0,n.warn)(`getOperatorList - ignoring XObject: "${Se}".`);return}throw Se}}));return;case n.OPS.setFont:var je=be[1];xe(Y.handleSetFont(J,be,null,te,oe,ce.state,j).then(function(Se){te.addDependency(Se),te.addOp(n.OPS.setFont,[Se,je])}));return;case n.OPS.beginText:G=!0;break;case n.OPS.endText:G=!1;break;case n.OPS.endInlineImage:var Ue=be[0].cacheKey;if(Ue){const Se=Q.getByName(Ue);if(Se){te.addImageOps(Se.fn,Se.args,Se.optionalContent),x(Se),be=null;continue}}xe(Y.buildPaintImageXObject({resources:J,image:be[0],isInline:!0,operatorList:te,cacheKey:Ue,localImageCache:Q,localColorSpaceCache:ee}));return;case n.OPS.showText:if(!ce.state.font){Y.ensureStateFont(ce.state);continue}be[0]=Y.handleText(be[0],ce.state);break;case n.OPS.showSpacedText:if(!ce.state.font){Y.ensureStateFont(ce.state);continue}var ht=[],_e=ce.state;for(const Se of be[0])typeof Se=="string"?ht.push(...Y.handleText(Se,_e)):typeof Se=="number"&&ht.push(Se);be[0]=ht,he=n.OPS.showText;break;case n.OPS.nextLineShowText:if(!ce.state.font){Y.ensureStateFont(ce.state);continue}te.addOp(n.OPS.nextLine),be[0]=Y.handleText(be[0],ce.state),he=n.OPS.showText;break;case n.OPS.nextLineSetSpacingShowText:if(!ce.state.font){Y.ensureStateFont(ce.state);continue}te.addOp(n.OPS.nextLine),te.addOp(n.OPS.setWordSpacing,[be.shift()]),te.addOp(n.OPS.setCharSpacing,[be.shift()]),be[0]=Y.handleText(be[0],ce.state),he=n.OPS.showText;break;case n.OPS.setTextRenderingMode:ce.state.textRenderingMode=be[0];break;case n.OPS.setFillColorSpace:{const Se=v.ColorSpace.getCached(be[0],W,ee);if(Se){ce.state.fillColorSpace=Se;continue}xe(Y.parseColorSpace({cs:be[0],resources:J,localColorSpaceCache:ee}).then(function(Oe){Oe&&(ce.state.fillColorSpace=Oe)}));return}case n.OPS.setStrokeColorSpace:{const Se=v.ColorSpace.getCached(be[0],W,ee);if(Se){ce.state.strokeColorSpace=Se;continue}xe(Y.parseColorSpace({cs:be[0],resources:J,localColorSpaceCache:ee}).then(function(Oe){Oe&&(ce.state.strokeColorSpace=Oe)}));return}case n.OPS.setFillColor:me=ce.state.fillColorSpace,be=me.getRgb(be,0),he=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeColor:me=ce.state.strokeColorSpace,be=me.getRgb(be,0),he=n.OPS.setStrokeRGBColor;break;case n.OPS.setFillGray:ce.state.fillColorSpace=v.ColorSpace.singletons.gray,be=v.ColorSpace.singletons.gray.getRgb(be,0),he=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeGray:ce.state.strokeColorSpace=v.ColorSpace.singletons.gray,be=v.ColorSpace.singletons.gray.getRgb(be,0),he=n.OPS.setStrokeRGBColor;break;case n.OPS.setFillCMYKColor:ce.state.fillColorSpace=v.ColorSpace.singletons.cmyk,be=v.ColorSpace.singletons.cmyk.getRgb(be,0),he=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeCMYKColor:ce.state.strokeColorSpace=v.ColorSpace.singletons.cmyk,be=v.ColorSpace.singletons.cmyk.getRgb(be,0),he=n.OPS.setStrokeRGBColor;break;case n.OPS.setFillRGBColor:ce.state.fillColorSpace=v.ColorSpace.singletons.rgb,be=v.ColorSpace.singletons.rgb.getRgb(be,0);break;case n.OPS.setStrokeRGBColor:ce.state.strokeColorSpace=v.ColorSpace.singletons.rgb,be=v.ColorSpace.singletons.rgb.getRgb(be,0);break;case n.OPS.setFillColorN:if(me=ce.state.fillColorSpace,me.name==="Pattern"){xe(Y.handleColorN(te,n.OPS.setFillColorN,be,me,ae,J,oe,ee,se,ne));return}be=me.getRgb(be,0),he=n.OPS.setFillRGBColor;break;case n.OPS.setStrokeColorN:if(me=ce.state.strokeColorSpace,me.name==="Pattern"){xe(Y.handleColorN(te,n.OPS.setStrokeColorN,be,me,ae,J,oe,ee,se,ne));return}be=me.getRgb(be,0),he=n.OPS.setStrokeRGBColor;break;case n.OPS.shadingFill:var st=J.get("Shading");if(!st)throw new n.FormatError("No shading resource found");var Je=st.get(be[0].name);if(!Je)throw new n.FormatError("No shading object found");be=[Y.parseShading({shading:Je,resources:J,localColorSpaceCache:ee,localShadingPatternCache:ne})],he=n.OPS.shadingFill;break;case n.OPS.setGState:if(Fe=be[0]instanceof R.Name,De=be[0].name,Fe){const Se=z.getByName(De);if(Se){Se.length>0&&te.addOp(n.OPS.setGState,[Se]),be=null;continue}}xe(new Promise(function(Se,Oe){if(!Fe)throw new n.FormatError("GState must be referred to by name.");const Re=J.get("ExtGState");if(!(Re instanceof R.Dict))throw new n.FormatError("ExtGState should be a dictionary.");const Ne=Re.get(De);if(!(Ne instanceof R.Dict))throw new n.FormatError("GState should be a dictionary.");Y.setGState({resources:J,gState:Ne,operatorList:te,cacheKey:De,task:oe,stateManager:ce,localGStateCache:z,localColorSpaceCache:ee}).then(Se,Oe)}).catch(function(Se){if(!(Se instanceof n.AbortException)){if(Y.options.ignoreErrors){(0,n.warn)(`getOperatorList - ignoring ExtGState: "${Se}".`);return}throw Se}}));return;case n.OPS.moveTo:case n.OPS.lineTo:case n.OPS.curveTo:case n.OPS.curveTo2:case n.OPS.curveTo3:case n.OPS.closePath:case n.OPS.rectangle:Y.buildPath(te,he,be,G);continue;case n.OPS.markPoint:case n.OPS.markPointProps:case n.OPS.beginCompat:case n.OPS.endCompat:continue;case n.OPS.beginMarkedContentProps:if(!(be[0]instanceof R.Name)){(0,n.warn)(`Expected name for beginMarkedContentProps arg0=${be[0]}`);continue}if(be[0].name==="OC"){xe(Y.parseMarkedContentProps(be[1],J).then(Se=>{te.addOp(n.OPS.beginMarkedContentProps,["OC",Se])}).catch(Se=>{if(!(Se instanceof n.AbortException)){if(Y.options.ignoreErrors){(0,n.warn)(`getOperatorList - ignoring beginMarkedContentProps: "${Se}".`);return}throw Se}}));return}be=[be[0].name,be[1]instanceof R.Dict?be[1].get("MCID"):null];break;case n.OPS.beginMarkedContent:case n.OPS.endMarkedContent:default:if(be!==null){for(Ie=0,ue=be.length;Ie<ue&&!(be[Ie]instanceof R.Dict);Ie++);if(Ie<ue){(0,n.warn)("getOperatorList - ignoring operator: "+he);continue}}}te.addOp(he,be)}if(Le){xe(O);return}ve(),ge()}).catch(pe=>{if(!(pe instanceof n.AbortException)){if(this.options.ignoreErrors){(0,n.warn)(`getOperatorList - ignoring errors during "${oe.name}" task: "${pe}".`),ve();return}throw pe}})}getTextContent({stream:K,task:oe,resources:J,stateManager:te=null,includeMarkedContent:B=!1,sink:j,seenStyles:Y=new Set,viewBox:W,markedContentData:G=null,disableNormalization:Q=!1}){J||(J=R.Dict.empty),te||(te=new c(new h)),B&&(G||(G={level:0}));const ee={items:[],styles:Object.create(null)},z={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},se=[" "," "];let ne=0;function V(Ge){const ze=(ne+1)%2,Qe=se[ne]!==" "&&se[ze]===" ";return se[ne]=Ge,ne=ze,Qe}function ae(){return se[ne]!==" "&&se[(ne+1)%2]===" "}function ce(){se[0]=se[1]=" ",ne=0}const de=.102,Ae=.03,ve=-.2,pe=.102,ge=.6,fe=.25,xe=this,Te=this.xref,Le=[];let Ie=null;const ue=new f.LocalImageCache,me=new f.LocalGStateCache,De=new D(K,Te,te);let Fe;function je({width:Ge=0,height:ze=0,transform:Qe=z.prevTransform,fontName:tt=z.fontName}){ee.items.push({str:" ",dir:"ltr",width:Ge,height:ze,transform:Qe,fontName:tt,hasEOL:!1})}function Ue(){const Ge=Fe.font,ze=[Fe.fontSize*Fe.textHScale,0,0,Fe.fontSize,0,Fe.textRise];if(Ge.isType3Font&&(Fe.fontSize<=1||Ge.isCharBBox)&&!(0,n.isArrayEqual)(Fe.fontMatrix,n.FONT_IDENTITY_MATRIX)){const Qe=Ge.bbox[3]-Ge.bbox[1];Qe>0&&(ze[3]*=Qe*Fe.fontMatrix[3])}return n.Util.transform(Fe.ctm,n.Util.transform(Fe.textMatrix,ze))}function ht(){if(z.initialized)return z;const{font:Ge,loadedName:ze}=Fe;Y.has(ze)||(Y.add(ze),ee.styles[ze]={fontFamily:Ge.fallbackName,ascent:Ge.ascent,descent:Ge.descent,vertical:Ge.vertical}),z.fontName=ze;const Qe=z.transform=Ue();Ge.vertical?(z.width=z.totalWidth=Math.hypot(Qe[0],Qe[1]),z.height=z.totalHeight=0,z.vertical=!0):(z.width=z.totalWidth=0,z.height=z.totalHeight=Math.hypot(Qe[2],Qe[3]),z.vertical=!1);const tt=Math.hypot(Fe.textLineMatrix[0],Fe.textLineMatrix[1]),rt=Math.hypot(Fe.ctm[0],Fe.ctm[1]);z.textAdvanceScale=rt*tt;const{fontSize:ut}=Fe;return z.trackingSpaceMin=ut*de,z.notASpace=ut*Ae,z.negativeSpaceMax=ut*ve,z.spaceInFlowMin=ut*pe,z.spaceInFlowMax=ut*ge,z.hasEOL=!1,z.initialized=!0,z}function _e(){if(!z.initialized)return;const Ge=Math.hypot(Fe.textLineMatrix[0],Fe.textLineMatrix[1]),Qe=Math.hypot(Fe.ctm[0],Fe.ctm[1])*Ge;Qe!==z.textAdvanceScale&&(z.vertical?(z.totalHeight+=z.height*z.textAdvanceScale,z.height=0):(z.totalWidth+=z.width*z.textAdvanceScale,z.width=0),z.textAdvanceScale=Qe)}function st(Ge){let ze=Ge.str.join("");Q||(ze=(0,n.normalizeUnicode)(ze));const Qe=(0,w.bidi)(ze,-1,Ge.vertical);return{str:Qe.str,dir:Qe.dir,width:Math.abs(Ge.totalWidth),height:Math.abs(Ge.totalHeight),transform:Ge.transform,fontName:Ge.fontName,hasEOL:Ge.hasEOL}}function Je(Ge,ze){return xe.loadFont(Ge,ze,J).then(function(Qe){return Qe.font.isType3Font?Qe.loadType3Data(xe,J,oe).catch(function(){}).then(function(){return Qe}):Qe}).then(function(Qe){Fe.loadedName=Qe.loadedName,Fe.font=Qe.font,Fe.fontMatrix=Qe.font.fontMatrix||n.FONT_IDENTITY_MATRIX})}function be(Ge,ze,Qe){const tt=Math.hypot(Qe[0],Qe[1]);return[(Qe[0]*Ge+Qe[1]*ze)/tt,(Qe[2]*Ge+Qe[3]*ze)/tt]}function he(Ge){var Xe;const ze=Ue();let Qe=ze[4],tt=ze[5];if((Xe=Fe.font)!=null&&Xe.vertical){if(Qe<W[0]||Qe>W[2]||tt+Ge<W[1]||tt>W[3])return!1}else if(Qe+Ge<W[0]||Qe>W[2]||tt<W[1]||tt>W[3])return!1;if(!Fe.font||!z.prevTransform)return!0;let rt=z.prevTransform[4],ut=z.prevTransform[5];if(rt===Qe&&ut===tt)return!0;let ot=-1;switch(ze[0]&&ze[1]===0&&ze[2]===0?ot=ze[0]>0?0:180:ze[1]&&ze[0]===0&&ze[3]===0&&(ot=ze[1]>0?90:270),ot){case 0:break;case 90:[Qe,tt]=[tt,Qe],[rt,ut]=[ut,rt];break;case 180:[Qe,tt,rt,ut]=[-Qe,-tt,-rt,-ut];break;case 270:[Qe,tt]=[-tt,-Qe],[rt,ut]=[-ut,-rt];break;default:[Qe,tt]=be(Qe,tt,ze),[rt,ut]=be(rt,ut,z.prevTransform)}if(Fe.font.vertical){const Ze=(ut-tt)/z.textAdvanceScale,it=Qe-rt,ct=Math.sign(z.height);return Ze<ct*z.negativeSpaceMax?Math.abs(it)>.5*z.width?(Se(),!0):(ce(),Re(),!0):Math.abs(it)>z.width?(Se(),!0):(Ze<=ct*z.notASpace&&ce(),Ze<=ct*z.trackingSpaceMin?ae()?(ce(),Re(),je({height:Math.abs(Ze)})):z.height+=Ze:Oe(Ze,z.prevTransform,ct)||(z.str.length===0?(ce(),je({height:Math.abs(Ze)})):z.height+=Ze),Math.abs(it)>z.width*fe&&Re(),!0)}const yt=(Qe-rt)/z.textAdvanceScale,Et=tt-ut,We=Math.sign(z.width);return yt<We*z.negativeSpaceMax?Math.abs(Et)>.5*z.height?(Se(),!0):(ce(),Re(),!0):Math.abs(Et)>z.height?(Se(),!0):(yt<=We*z.notASpace&&ce(),yt<=We*z.trackingSpaceMin?ae()?(ce(),Re(),je({width:Math.abs(yt)})):z.width+=yt:Oe(yt,z.prevTransform,We)||(z.str.length===0?(ce(),je({width:Math.abs(yt)})):z.width+=yt),Math.abs(Et)>z.height*fe&&Re(),!0)}function ye({chars:Ge,extraSpacing:ze}){const Qe=Fe.font;if(!Ge){const ut=Fe.charSpacing+ze;ut&&(Qe.vertical?Fe.translateTextMatrix(0,-ut):Fe.translateTextMatrix(ut*Fe.textHScale,0));return}const tt=Qe.charsToGlyphs(Ge),rt=Fe.fontMatrix[0]*Fe.fontSize;for(let ut=0,ot=tt.length;ut<ot;ut++){const yt=tt[ut],{category:Et}=yt;if(Et.isInvisibleFormatMark)continue;let We=Fe.charSpacing+(ut+1===ot?ze:0),Xe=yt.width;Qe.vertical&&(Xe=yt.vmetric?yt.vmetric[0]:-Xe);let Ze=Xe*rt;if(Et.isWhitespace){Qe.vertical?(We+=-Ze+Fe.wordSpacing,Fe.translateTextMatrix(0,-We)):(We+=Ze+Fe.wordSpacing,Fe.translateTextMatrix(We*Fe.textHScale,0)),V(" ");continue}if(!Et.isZeroWidthDiacritic&&!he(Ze)){Qe.vertical?Fe.translateTextMatrix(0,Ze):Fe.translateTextMatrix(Ze*Fe.textHScale,0);continue}const it=ht();Et.isZeroWidthDiacritic&&(Ze=0),Qe.vertical?(Fe.translateTextMatrix(0,Ze),Ze=Math.abs(Ze),it.height+=Ze):(Ze*=Fe.textHScale,Fe.translateTextMatrix(Ze,0),it.width+=Ze),Ze&&(it.prevTransform=Ue());const ct=yt.unicode;V(ct)&&it.str.push(" "),it.str.push(ct),We&&(Qe.vertical?Fe.translateTextMatrix(0,-We):Fe.translateTextMatrix(We*Fe.textHScale,0))}}function Se(){ce(),z.initialized?(z.hasEOL=!0,Re()):ee.items.push({str:"",dir:"ltr",width:0,height:0,transform:Ue(),fontName:Fe.loadedName,hasEOL:!0})}function Oe(Ge,ze,Qe){if(Qe*z.spaceInFlowMin<=Ge&&Ge<=Qe*z.spaceInFlowMax)return z.initialized&&(ce(),z.str.push(" ")),!1;const tt=z.fontName;let rt=0;return z.vertical&&(rt=Ge,Ge=0),Re(),ce(),je({width:Math.abs(Ge),height:Math.abs(rt),transform:ze||Ue(),fontName:tt}),!0}function Re(){!z.initialized||!z.str||(z.vertical?z.totalHeight+=z.height*z.textAdvanceScale:z.totalWidth+=z.width*z.textAdvanceScale,ee.items.push(st(z)),z.initialized=!1,z.str.length=0)}function Ne(Ge=!1){const ze=ee.items.length;ze!==0&&(Ge&&ze<U||(j.enqueue(ee,ze),ee.items=[],ee.styles=Object.create(null)))}const Ye=new y;return new Promise(function Ge(ze,Qe){const tt=function(Ze){Ne(!0),Promise.all([Ze,j.ready]).then(function(){try{Ge(ze,Qe)}catch(it){Qe(it)}},Qe)};oe.ensureNotTerminated(),Ye.reset();const rt={};let ut,ot=[];for(;!(ut=Ye.check())&&(ot.length=0,rt.args=ot,!!De.read(rt));){const Ze=Fe;Fe=te.state;const it=rt.fn;switch(ot=rt.args,it|0){case n.OPS.setFont:var yt=ot[0].name,Et=ot[1];if(Fe.font&&yt===Fe.fontName&&Et===Fe.fontSize)break;Re(),Fe.fontName=yt,Fe.fontSize=Et,tt(Je(yt,null));return;case n.OPS.setTextRise:Fe.textRise=ot[0];break;case n.OPS.setHScale:Fe.textHScale=ot[0]/100;break;case n.OPS.setLeading:Fe.leading=ot[0];break;case n.OPS.moveText:Fe.translateTextLineMatrix(ot[0],ot[1]),Fe.textMatrix=Fe.textLineMatrix.slice();break;case n.OPS.setLeadingMoveText:Fe.leading=-ot[1],Fe.translateTextLineMatrix(ot[0],ot[1]),Fe.textMatrix=Fe.textLineMatrix.slice();break;case n.OPS.nextLine:Fe.carriageReturn();break;case n.OPS.setTextMatrix:Fe.setTextMatrix(ot[0],ot[1],ot[2],ot[3],ot[4],ot[5]),Fe.setTextLineMatrix(ot[0],ot[1],ot[2],ot[3],ot[4],ot[5]),_e();break;case n.OPS.setCharSpacing:Fe.charSpacing=ot[0];break;case n.OPS.setWordSpacing:Fe.wordSpacing=ot[0];break;case n.OPS.beginText:Fe.textMatrix=n.IDENTITY_MATRIX.slice(),Fe.textLineMatrix=n.IDENTITY_MATRIX.slice();break;case n.OPS.showSpacedText:if(!te.state.font){xe.ensureStateFont(te.state);continue}const ct=(Fe.font.vertical?1:-1)*Fe.fontSize/1e3,xt=ot[0];for(let lt=0,nt=xt.length;lt<nt;lt++){const gt=xt[lt];if(typeof gt=="string")Le.push(gt);else if(typeof gt=="number"&&gt!==0){const vt=Le.join("");Le.length=0,ye({chars:vt,extraSpacing:gt*ct})}}if(Le.length>0){const lt=Le.join("");Le.length=0,ye({chars:lt,extraSpacing:0})}break;case n.OPS.showText:if(!te.state.font){xe.ensureStateFont(te.state);continue}ye({chars:ot[0],extraSpacing:0});break;case n.OPS.nextLineShowText:if(!te.state.font){xe.ensureStateFont(te.state);continue}Fe.carriageReturn(),ye({chars:ot[0],extraSpacing:0});break;case n.OPS.nextLineSetSpacingShowText:if(!te.state.font){xe.ensureStateFont(te.state);continue}Fe.wordSpacing=ot[0],Fe.charSpacing=ot[1],Fe.carriageReturn(),ye({chars:ot[2],extraSpacing:0});break;case n.OPS.paintXObject:Re(),Ie||(Ie=J.get("XObject")||R.Dict.empty);var We=ot[0]instanceof R.Name,Xe=ot[0].name;if(We&&ue.getByName(Xe))break;tt(new Promise(function(lt,nt){if(!We)throw new n.FormatError("XObject must be referred to by name.");let gt=Ie.getRaw(Xe);if(gt instanceof R.Ref){if(ue.getByRef(gt)){lt();return}if(xe.globalImageCache.getData(gt,xe.pageIndex)){lt();return}gt=Te.fetch(gt)}if(!(gt instanceof S.BaseStream))throw new n.FormatError("XObject should be a stream");const vt=gt.dict.get("Subtype");if(!(vt instanceof R.Name))throw new n.FormatError("XObject should have a Name subtype");if(vt.name!=="Form"){ue.set(Xe,gt.dict.objId,!0),lt();return}const Mt=te.state.clone(),At=new c(Mt),St=gt.dict.getArray("Matrix");Array.isArray(St)&&St.length===6&&At.transform(St),Ne();const It={enqueueInvoked:!1,enqueue(pt,Ct){this.enqueueInvoked=!0,j.enqueue(pt,Ct)},get desiredSize(){return j.desiredSize},get ready(){return j.ready}};xe.getTextContent({stream:gt,task:oe,resources:gt.dict.get("Resources")||J,stateManager:At,includeMarkedContent:B,sink:It,seenStyles:Y,viewBox:W,markedContentData:G,disableNormalization:Q}).then(function(){It.enqueueInvoked||ue.set(Xe,gt.dict.objId,!0),lt()},nt)}).catch(function(lt){if(!(lt instanceof n.AbortException)){if(xe.options.ignoreErrors){(0,n.warn)(`getTextContent - ignoring XObject: "${lt}".`);return}throw lt}}));return;case n.OPS.setGState:if(We=ot[0]instanceof R.Name,Xe=ot[0].name,We&&me.getByName(Xe))break;tt(new Promise(function(lt,nt){if(!We)throw new n.FormatError("GState must be referred to by name.");const gt=J.get("ExtGState");if(!(gt instanceof R.Dict))throw new n.FormatError("ExtGState should be a dictionary.");const vt=gt.get(Xe);if(!(vt instanceof R.Dict))throw new n.FormatError("GState should be a dictionary.");const Mt=vt.get("Font");if(!Mt){me.set(Xe,vt.objId,!0),lt();return}Re(),Fe.fontName=null,Fe.fontSize=Mt[1],Je(null,Mt[0]).then(lt,nt)}).catch(function(lt){if(!(lt instanceof n.AbortException)){if(xe.options.ignoreErrors){(0,n.warn)(`getTextContent - ignoring ExtGState: "${lt}".`);return}throw lt}}));return;case n.OPS.beginMarkedContent:Re(),B&&(G.level++,ee.items.push({type:"beginMarkedContent",tag:ot[0]instanceof R.Name?ot[0].name:null}));break;case n.OPS.beginMarkedContentProps:if(Re(),B){G.level++;let lt=null;ot[1]instanceof R.Dict&&(lt=ot[1].get("MCID")),ee.items.push({type:"beginMarkedContentProps",id:Number.isInteger(lt)?`${xe.idFactory.getPageObjId()}_mc${lt}`:null,tag:ot[0]instanceof R.Name?ot[0].name:null})}break;case n.OPS.endMarkedContent:if(Re(),B){if(G.level===0)break;G.level--,ee.items.push({type:"endMarkedContent"})}break;case n.OPS.restore:Ze&&(Ze.font!==Fe.font||Ze.fontSize!==Fe.fontSize||Ze.fontName!==Fe.fontName)&&Re();break}if(ee.items.length>=j.desiredSize){ut=!0;break}}if(ut){tt(O);return}Re(),Ne(),ze()}).catch(Ge=>{if(!(Ge instanceof n.AbortException)){if(this.options.ignoreErrors){(0,n.warn)(`getTextContent - ignoring errors during "${oe.name}" task: "${Ge}".`),Re(),Ne();return}throw Ge}})}extractDataStructures(K,oe,J){const te=this.xref;let B;const j=this.readToUnicode(J.toUnicode||K.get("ToUnicode")||oe.get("ToUnicode"));if(J.composite){const z=K.get("CIDSystemInfo");z instanceof R.Dict&&(J.cidSystemInfo={registry:(0,n.stringToPDFString)(z.get("Registry")),ordering:(0,n.stringToPDFString)(z.get("Ordering")),supplement:z.get("Supplement")});try{const se=K.get("CIDToGIDMap");se instanceof S.BaseStream&&(B=se.getBytes())}catch(se){if(!this.options.ignoreErrors)throw se;(0,n.warn)(`extractDataStructures - ignoring CIDToGIDMap data: "${se}".`)}}const Y=[];let W=null,G;if(K.has("Encoding")){if(G=K.get("Encoding"),G instanceof R.Dict){if(W=G.get("BaseEncoding"),W=W instanceof R.Name?W.name:null,G.has("Differences")){const z=G.get("Differences");let se=0;for(const ne of z){const V=te.fetchIfRef(ne);if(typeof V=="number")se=V;else if(V instanceof R.Name)Y[se++]=V.name;else throw new n.FormatError(`Invalid entry in 'Differences' array: ${V}`)}}}else if(G instanceof R.Name)W=G.name;else{const z="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new n.FormatError(z);(0,n.warn)(z)}W!=="MacRomanEncoding"&&W!=="MacExpertEncoding"&&W!=="WinAnsiEncoding"&&(W=null)}const Q=!J.file||J.isInternalFont,ee=(0,o.getSymbolsFonts)()[J.name];if(W&&Q&&ee&&(W=null),W)J.defaultEncoding=(0,t.getEncoding)(W);else{const z=!!(J.flags&M.FontFlags.Symbolic),se=!!(J.flags&M.FontFlags.Nonsymbolic);G=t.StandardEncoding,J.type==="TrueType"&&!se&&(G=t.WinAnsiEncoding),(z||ee)&&(G=t.MacRomanEncoding,Q&&(/Symbol/i.test(J.name)?G=t.SymbolSetEncoding:/Dingbats/i.test(J.name)?G=t.ZapfDingbatsEncoding:/Wingdings/i.test(J.name)&&(G=t.WinAnsiEncoding))),J.defaultEncoding=G}return J.differences=Y,J.baseEncodingName=W,J.hasEncoding=!!W||Y.length>0,J.dict=K,j.then(z=>(J.toUnicode=z,this.buildToUnicode(J))).then(z=>(J.toUnicode=z,B&&(J.cidToGidMap=this.readCidToGidMap(B,z)),J))}_simpleFontToUnicode(K,oe=!1){(0,n.assert)(!K.composite,"Must be a simple font.");const J=[],te=K.defaultEncoding.slice(),B=K.baseEncodingName,j=K.differences;for(const W in j){const G=j[W];G!==".notdef"&&(te[W]=G)}const Y=(0,H.getGlyphsUnicode)();for(const W in te){let G=te[W];if(G==="")continue;let Q=Y[G];if(Q!==void 0){J[W]=String.fromCharCode(Q);continue}let ee=0;switch(G[0]){case"G":G.length===3&&(ee=parseInt(G.substring(1),16));break;case"g":G.length===5&&(ee=parseInt(G.substring(1),16));break;case"C":case"c":if(G.length>=3&&G.length<=4){const z=G.substring(1);if(oe){ee=parseInt(z,16);break}if(ee=+z,Number.isNaN(ee)&&Number.isInteger(parseInt(z,16)))return this._simpleFontToUnicode(K,!0)}break;case"u":Q=(0,E.getUnicodeForGlyph)(G,Y),Q!==-1&&(ee=Q);break;default:switch(G){case"f_h":case"f_t":case"T_h":J[W]=G.replaceAll("_","");continue}break}if(ee>0&&ee<=1114111&&Number.isInteger(ee)){if(B&&ee===+W){const z=(0,t.getEncoding)(B);if(z&&(G=z[W])){J[W]=String.fromCharCode(Y[G]);continue}}J[W]=String.fromCodePoint(ee)}}return J}async buildToUnicode(K){var oe;if(K.hasIncludedToUnicodeMap=((oe=K.toUnicode)==null?void 0:oe.length)>0,K.hasIncludedToUnicodeMap)return!K.composite&&K.hasEncoding&&(K.fallbackToUnicode=this._simpleFontToUnicode(K)),K.toUnicode;if(!K.composite)return new I.ToUnicodeMap(this._simpleFontToUnicode(K));if(K.composite&&(K.cMap.builtInCMap&&!(K.cMap instanceof k.IdentityCMap)||K.cidSystemInfo.registry==="Adobe"&&(K.cidSystemInfo.ordering==="GB1"||K.cidSystemInfo.ordering==="CNS1"||K.cidSystemInfo.ordering==="Japan1"||K.cidSystemInfo.ordering==="Korea1"))){const{registry:J,ordering:te}=K.cidSystemInfo,B=R.Name.get(`${J}-${te}-UCS2`),j=await k.CMapFactory.create({encoding:B,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),Y=[],W=[];return K.cMap.forEach(function(G,Q){if(Q>65535)throw new n.FormatError("Max size of CID is 65,535");const ee=j.lookup(Q);if(ee){W.length=0;for(let z=0,se=ee.length;z<se;z+=2)W.push((ee.charCodeAt(z)<<8)+ee.charCodeAt(z+1));Y[G]=String.fromCharCode(...W)}}),new I.ToUnicodeMap(Y)}return new I.IdentityToUnicodeMap(K.firstChar,K.lastChar)}readToUnicode(K){return K?K instanceof R.Name?k.CMapFactory.create({encoding:K,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then(function(oe){return oe instanceof k.IdentityCMap?new I.IdentityToUnicodeMap(0,65535):new I.ToUnicodeMap(oe.getMap())}):K instanceof S.BaseStream?k.CMapFactory.create({encoding:K,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then(function(oe){if(oe instanceof k.IdentityCMap)return new I.IdentityToUnicodeMap(0,65535);const J=new Array(oe.length);return oe.forEach(function(te,B){if(typeof B=="number"){J[te]=String.fromCodePoint(B);return}const j=[];for(let Y=0;Y<B.length;Y+=2){const W=B.charCodeAt(Y)<<8|B.charCodeAt(Y+1);if((W&63488)!==55296){j.push(W);continue}Y+=2;const G=B.charCodeAt(Y)<<8|B.charCodeAt(Y+1);j.push(((W&1023)<<10)+(G&1023)+65536)}J[te]=String.fromCodePoint(...j)}),new I.ToUnicodeMap(J)},oe=>{if(oe instanceof n.AbortException)return null;if(this.options.ignoreErrors)return(0,n.warn)(`readToUnicode - ignoring ToUnicode data: "${oe}".`),null;throw oe}):Promise.resolve(null):Promise.resolve(null)}readCidToGidMap(K,oe){const J=[];for(let te=0,B=K.length;te<B;te++){const j=K[te++]<<8|K[te],Y=te>>1;j===0&&!oe.has(Y)||(J[Y]=j)}return J}extractWidths(K,oe,J){const te=this.xref;let B=[],j=0;const Y=[];let W,G,Q,ee,z,se,ne,V;if(J.composite){if(j=K.has("DW")?K.get("DW"):1e3,V=K.get("W"),V)for(G=0,Q=V.length;G<Q;G++)if(se=te.fetchIfRef(V[G++]),ne=te.fetchIfRef(V[G]),Array.isArray(ne))for(ee=0,z=ne.length;ee<z;ee++)B[se++]=te.fetchIfRef(ne[ee]);else{const de=te.fetchIfRef(V[++G]);for(ee=se;ee<=ne;ee++)B[ee]=de}if(J.vertical){let de=K.getArray("DW2")||[880,-1e3];if(W=[de[1],j*.5,de[0]],de=K.get("W2"),de)for(G=0,Q=de.length;G<Q;G++)if(se=te.fetchIfRef(de[G++]),ne=te.fetchIfRef(de[G]),Array.isArray(ne))for(ee=0,z=ne.length;ee<z;ee++)Y[se++]=[te.fetchIfRef(ne[ee++]),te.fetchIfRef(ne[ee++]),te.fetchIfRef(ne[ee])];else{const Ae=[te.fetchIfRef(de[++G]),te.fetchIfRef(de[++G]),te.fetchIfRef(de[++G])];for(ee=se;ee<=ne;ee++)Y[ee]=Ae}}}else{const de=J.firstChar;if(V=K.get("Widths"),V){for(ee=de,G=0,Q=V.length;G<Q;G++)B[ee++]=te.fetchIfRef(V[G]);j=parseFloat(oe.get("MissingWidth"))||0}else{const Ae=K.get("BaseFont");if(Ae instanceof R.Name){const ve=this.getBaseFontMetrics(Ae.name);B=this.buildCharCodeToWidth(ve.widths,J),j=ve.defaultWidth}}}let ae=!0,ce=j;for(const de in B){const Ae=B[de];if(Ae){if(!ce){ce=Ae;continue}if(ce!==Ae){ae=!1;break}}}ae?J.flags|=M.FontFlags.FixedPitch:J.flags&=~M.FontFlags.FixedPitch,J.defaultWidth=j,J.widths=B,J.defaultVMetrics=W,J.vmetrics=Y}isSerifFont(K){const oe=K.split("-")[0];return oe in(0,o.getSerifFonts)()||/serif/gi.test(oe)}getBaseFontMetrics(K){let oe=0,J=Object.create(null),te=!1,j=(0,o.getStdFontMap)()[K]||K;const Y=(0,A.getMetrics)();j in Y||(j=this.isSerifFont(K)?"Times-Roman":"Helvetica");const W=Y[j];return typeof W=="number"?(oe=W,te=!0):J=W(),{defaultWidth:oe,monospace:te,widths:J}}buildCharCodeToWidth(K,oe){const J=Object.create(null),te=oe.differences,B=oe.defaultEncoding;for(let j=0;j<256;j++){if(j in te&&K[te[j]]){J[j]=K[te[j]];continue}if(j in B&&K[B[j]]){J[j]=K[B[j]];continue}}return J}preEvaluateFont(K){const oe=K;let J=K.get("Subtype");if(!(J instanceof R.Name))throw new n.FormatError("invalid font Subtype");let te=!1,B,j;if(J.name==="Type0"){const Q=K.get("DescendantFonts");if(!Q)throw new n.FormatError("Descendant fonts are not specified");if(K=Array.isArray(Q)?this.xref.fetchIfRef(Q[0]):Q,!(K instanceof R.Dict))throw new n.FormatError("Descendant font is not a dictionary.");if(J=K.get("Subtype"),!(J instanceof R.Name))throw new n.FormatError("invalid font Subtype");te=!0}const Y=K.get("FirstChar")||0,W=K.get("LastChar")||(te?65535:255),G=K.get("FontDescriptor");if(G){B=new g.MurmurHash3_64;const Q=oe.getRaw("Encoding");if(Q instanceof R.Name)B.update(Q.name);else if(Q instanceof R.Ref)B.update(Q.toString());else if(Q instanceof R.Dict){for(const z of Q.getRawValues())if(z instanceof R.Name)B.update(z.name);else if(z instanceof R.Ref)B.update(z.toString());else if(Array.isArray(z)){const se=z.length,ne=new Array(se);for(let V=0;V<se;V++){const ae=z[V];ae instanceof R.Name?ne[V]=ae.name:(typeof ae=="number"||ae instanceof R.Ref)&&(ne[V]=ae.toString())}B.update(ne.join())}}if(B.update(`${Y}-${W}`),j=K.get("ToUnicode")||oe.get("ToUnicode"),j instanceof S.BaseStream){const z=j.str||j,se=z.buffer?new Uint8Array(z.buffer.buffer,0,z.bufferLength):new Uint8Array(z.bytes.buffer,z.start,z.end-z.start);B.update(se)}else j instanceof R.Name&&B.update(j.name);const ee=K.get("Widths")||oe.get("Widths");if(Array.isArray(ee)){const z=[];for(const se of ee)(typeof se=="number"||se instanceof R.Ref)&&z.push(se.toString());B.update(z.join())}if(te){B.update("compositeFont");const z=K.get("W")||oe.get("W");if(Array.isArray(z)){const ne=[];for(const V of z)if(typeof V=="number"||V instanceof R.Ref)ne.push(V.toString());else if(Array.isArray(V)){const ae=[];for(const ce of V)(typeof ce=="number"||ce instanceof R.Ref)&&ae.push(ce.toString());ne.push(`[${ae.join()}]`)}B.update(ne.join())}const se=K.getRaw("CIDToGIDMap")||oe.getRaw("CIDToGIDMap");se instanceof R.Name?B.update(se.name):se instanceof R.Ref?B.update(se.toString()):se instanceof S.BaseStream&&B.update(se.peekBytes())}}return{descriptor:G,dict:K,baseDict:oe,composite:te,type:J.name,firstChar:Y,lastChar:W,toUnicode:j,hash:B?B.hexdigest():""}}async translateFont({descriptor:K,dict:oe,baseDict:J,composite:te,type:B,firstChar:j,lastChar:Y,toUnicode:W,cssFontInfo:G}){const Q=B==="Type3";let ee;if(!K)if(Q)K=new R.Dict(null),K.set("FontName",R.Name.get(B)),K.set("FontBBox",oe.getArray("FontBBox")||[0,0,0,0]);else{let xe=oe.get("BaseFont");if(!(xe instanceof R.Name))throw new n.FormatError("Base font is not specified");xe=xe.name.replaceAll(/[,_]/g,"-");const Te=this.getBaseFontMetrics(xe),Le=xe.split("-")[0],Ie=(this.isSerifFont(Le)?M.FontFlags.Serif:0)|(Te.monospace?M.FontFlags.FixedPitch:0)|((0,o.getSymbolsFonts)()[Le]?M.FontFlags.Symbolic:M.FontFlags.Nonsymbolic);ee={type:B,name:xe,loadedName:J.loadedName,systemFontInfo:null,widths:Te.widths,defaultWidth:Te.defaultWidth,isSimulatedFlags:!0,flags:Ie,firstChar:j,lastChar:Y,toUnicode:W,xHeight:0,capHeight:0,italicAngle:0,isType3Font:Q};const ue=oe.get("Widths"),me=(0,o.getStandardFontName)(xe);let De=null;return me&&(De=await this.fetchStandardFontData(me),ee.isInternalFont=!!De),!ee.isInternalFont&&this.options.useSystemFonts&&(ee.systemFontInfo=(0,_.getFontSubstitution)(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,xe,me)),this.extractDataStructures(oe,oe,ee).then(Fe=>{if(ue){const je=[];let Ue=j;for(const ht of ue)je[Ue++]=this.xref.fetchIfRef(ht);Fe.widths=je}else Fe.widths=this.buildCharCodeToWidth(Te.widths,Fe);return new e.Font(xe,De,Fe)})}let z=K.get("FontName"),se=oe.get("BaseFont");typeof z=="string"&&(z=R.Name.get(z)),typeof se=="string"&&(se=R.Name.get(se));const ne=z==null?void 0:z.name,V=se==null?void 0:se.name;if(!Q&&ne!==V&&((0,n.info)(`The FontDescriptor's FontName is "${ne}" but should be the same as the Font's BaseFont "${V}".`),ne&&V&&(V.startsWith(ne)||!(0,o.isKnownFontName)(ne)&&(0,o.isKnownFontName)(V))&&(z=null)),z||(z=se),!(z instanceof R.Name))throw new n.FormatError("invalid font name");let ae,ce,de,Ae,ve;try{ae=K.get("FontFile","FontFile2","FontFile3")}catch(xe){if(!this.options.ignoreErrors)throw xe;(0,n.warn)(`translateFont - fetching "${z.name}" font file: "${xe}".`),ae=new i.NullStream}let pe=!1,ge=null,fe=null;if(ae){if(ae.dict){const xe=ae.dict.get("Subtype");xe instanceof R.Name&&(ce=xe.name),de=ae.dict.get("Length1"),Ae=ae.dict.get("Length2"),ve=ae.dict.get("Length3")}}else if(G){const xe=(0,L.getXfaFontName)(z.name);xe&&(G.fontFamily=`${G.fontFamily}-PdfJS-XFA`,G.metrics=xe.metrics||null,ge=xe.factors||null,ae=await this.fetchStandardFontData(xe.name),pe=!!ae,J=oe=(0,L.getXfaFontDict)(z.name),te=!0)}else if(!Q){const xe=(0,o.getStandardFontName)(z.name);xe&&(ae=await this.fetchStandardFontData(xe),pe=!!ae),!pe&&this.options.useSystemFonts&&(fe=(0,_.getFontSubstitution)(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,z.name,xe))}if(ee={type:B,name:z.name,subtype:ce,file:ae,length1:de,length2:Ae,length3:ve,isInternalFont:pe,loadedName:J.loadedName,composite:te,fixedPitch:!1,fontMatrix:oe.getArray("FontMatrix")||n.FONT_IDENTITY_MATRIX,firstChar:j,lastChar:Y,toUnicode:W,bbox:K.getArray("FontBBox")||oe.getArray("FontBBox"),ascent:K.get("Ascent"),descent:K.get("Descent"),xHeight:K.get("XHeight")||0,capHeight:K.get("CapHeight")||0,flags:K.get("Flags"),italicAngle:K.get("ItalicAngle")||0,isType3Font:Q,cssFontInfo:G,scaleFactors:ge,systemFontInfo:fe},te){const xe=J.get("Encoding");xe instanceof R.Name&&(ee.cidEncoding=xe.name);const Te=await k.CMapFactory.create({encoding:xe,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});ee.cMap=Te,ee.vertical=ee.cMap.vertical}return this.extractDataStructures(oe,J,ee).then(xe=>(this.extractWidths(oe,K,xe),new e.Font(z.name,ae,xe)))}static buildFontPaths(K,oe,J,te){function B(j){const Y=`${K.loadedName}_path_${j}`;try{if(K.renderer.hasBuiltPath(j))return;J.send("commonobj",[Y,"FontPath",K.renderer.getPathJs(j)])}catch(W){if(te.ignoreErrors){(0,n.warn)(`buildFontPaths - ignoring ${Y} glyph: "${W}".`);return}throw W}}for(const j of oe){B(j.fontChar);const Y=j.accent;Y!=null&&Y.fontChar&&B(Y.fontChar)}}static get fallbackFontDict(){const K=new R.Dict;return K.set("BaseFont",R.Name.get("Helvetica")),K.set("Type",R.Name.get("FallbackType")),K.set("Subtype",R.Name.get("FallbackType")),K.set("Encoding",R.Name.get("WinAnsiEncoding")),(0,n.shadow)(this,"fallbackFontDict",K)}}P.PartialEvaluator=r;class p{constructor({loadedName:K,font:oe,dict:J,evaluatorOptions:te}){this.loadedName=K,this.font=oe,this.dict=J,this._evaluatorOptions=te||u,this.type3Loaded=null,this.type3Dependencies=oe.isType3Font?new Set:null,this.sent=!1}send(K){this.sent||(this.sent=!0,K.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}fallback(K){this.font.data&&(this.font.disableFontFace=!0,r.buildFontPaths(this.font,this.font.glyphCacheValues,K,this._evaluatorOptions))}loadType3Data(K,oe,J){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");const te=K.clone({ignoreErrors:!1});te.parsingType3Font=!0;const B=new R.RefSet(K.type3FontRefs);this.dict.objId&&!B.has(this.dict.objId)&&B.put(this.dict.objId),te.type3FontRefs=B;const j=this.font,Y=this.type3Dependencies;let W=Promise.resolve();const G=this.dict.get("CharProcs"),Q=this.dict.get("Resources")||oe,ee=Object.create(null),z=n.Util.normalizeRect(j.bbox||[0,0,0,0]),se=z[2]-z[0],ne=z[3]-z[1],V=Math.hypot(se,ne);for(const ae of G.getKeys())W=W.then(()=>{const ce=G.get(ae),de=new N.OperatorList;return te.getOperatorList({stream:ce,task:J,resources:Q,operatorList:de}).then(()=>{de.fnArray[0]===n.OPS.setCharWidthAndBounds&&this._removeType3ColorOperators(de,V),ee[ae]=de.getIR();for(const Ae of de.dependencies)Y.add(Ae)}).catch(function(Ae){(0,n.warn)(`Type3 font resource "${ae}" is not available.`);const ve=new N.OperatorList;ee[ae]=ve.getIR()})});return this.type3Loaded=W.then(()=>{j.charProcOperatorList=ee,this._bbox&&(j.isCharBBox=!0,j.bbox=this._bbox)}),this.type3Loaded}_removeType3ColorOperators(K,oe=NaN){const J=n.Util.normalizeRect(K.argsArray[0].slice(2)),te=J[2]-J[0],B=J[3]-J[1],j=Math.hypot(te,B);te===0||B===0?(K.fnArray.splice(0,1),K.argsArray.splice(0,1)):(oe===0||Math.round(j/oe)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],J[0]),this._bbox[1]=Math.min(this._bbox[1],J[1]),this._bbox[2]=Math.max(this._bbox[2],J[2]),this._bbox[3]=Math.max(this._bbox[3],J[3]));let Y=0,W=K.length;for(;Y<W;){switch(K.fnArray[Y]){case n.OPS.setCharWidthAndBounds:break;case n.OPS.setStrokeColorSpace:case n.OPS.setFillColorSpace:case n.OPS.setStrokeColor:case n.OPS.setStrokeColorN:case n.OPS.setFillColor:case n.OPS.setFillColorN:case n.OPS.setStrokeGray:case n.OPS.setFillGray:case n.OPS.setStrokeRGBColor:case n.OPS.setFillRGBColor:case n.OPS.setStrokeCMYKColor:case n.OPS.setFillCMYKColor:case n.OPS.shadingFill:case n.OPS.setRenderingIntent:K.fnArray.splice(Y,1),K.argsArray.splice(Y,1),W--;continue;case n.OPS.setGState:const[G]=K.argsArray[Y];let Q=0,ee=G.length;for(;Q<ee;){const[z]=G[Q];switch(z){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":G.splice(Q,1),ee--;continue}Q++}break}Y++}}}class c{constructor(K=new C){this.state=K,this.stateStack=[]}save(){const K=this.state;this.stateStack.push(this.state),this.state=K.clone()}restore(){const K=this.stateStack.pop();K&&(this.state=K)}transform(K){this.state.ctm=n.Util.transform(this.state.ctm,K)}}class h{constructor(){this.ctm=new Float32Array(n.IDENTITY_MATRIX),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.textMatrix=n.IDENTITY_MATRIX.slice(),this.textLineMatrix=n.IDENTITY_MATRIX.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(K,oe,J,te,B,j){const Y=this.textMatrix;Y[0]=K,Y[1]=oe,Y[2]=J,Y[3]=te,Y[4]=B,Y[5]=j}setTextLineMatrix(K,oe,J,te,B,j){const Y=this.textLineMatrix;Y[0]=K,Y[1]=oe,Y[2]=J,Y[3]=te,Y[4]=B,Y[5]=j}translateTextMatrix(K,oe){const J=this.textMatrix;J[4]=J[0]*K+J[2]*oe+J[4],J[5]=J[1]*K+J[3]*oe+J[5]}translateTextLineMatrix(K,oe){const J=this.textLineMatrix;J[4]=J[0]*K+J[2]*oe+J[4],J[5]=J[1]*K+J[3]*oe+J[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){const K=Object.create(this);return K.textMatrix=this.textMatrix.slice(),K.textLineMatrix=this.textLineMatrix.slice(),K.fontMatrix=this.fontMatrix.slice(),K}}class C{constructor(){this.ctm=new Float32Array(n.IDENTITY_MATRIX),this.font=null,this.textRenderingMode=n.TextRenderingMode.FILL,this.fillColorSpace=v.ColorSpace.singletons.gray,this.strokeColorSpace=v.ColorSpace.singletons.gray}clone(){return Object.create(this)}}const q=class q{static get opMap(){return(0,n.shadow)(this,"opMap",{w:{id:n.OPS.setLineWidth,numArgs:1,variableArgs:!1},J:{id:n.OPS.setLineCap,numArgs:1,variableArgs:!1},j:{id:n.OPS.setLineJoin,numArgs:1,variableArgs:!1},M:{id:n.OPS.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:n.OPS.setDash,numArgs:2,variableArgs:!1},ri:{id:n.OPS.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:n.OPS.setFlatness,numArgs:1,variableArgs:!1},gs:{id:n.OPS.setGState,numArgs:1,variableArgs:!1},q:{id:n.OPS.save,numArgs:0,variableArgs:!1},Q:{id:n.OPS.restore,numArgs:0,variableArgs:!1},cm:{id:n.OPS.transform,numArgs:6,variableArgs:!1},m:{id:n.OPS.moveTo,numArgs:2,variableArgs:!1},l:{id:n.OPS.lineTo,numArgs:2,variableArgs:!1},c:{id:n.OPS.curveTo,numArgs:6,variableArgs:!1},v:{id:n.OPS.curveTo2,numArgs:4,variableArgs:!1},y:{id:n.OPS.curveTo3,numArgs:4,variableArgs:!1},h:{id:n.OPS.closePath,numArgs:0,variableArgs:!1},re:{id:n.OPS.rectangle,numArgs:4,variableArgs:!1},S:{id:n.OPS.stroke,numArgs:0,variableArgs:!1},s:{id:n.OPS.closeStroke,numArgs:0,variableArgs:!1},f:{id:n.OPS.fill,numArgs:0,variableArgs:!1},F:{id:n.OPS.fill,numArgs:0,variableArgs:!1},"f*":{id:n.OPS.eoFill,numArgs:0,variableArgs:!1},B:{id:n.OPS.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:n.OPS.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:n.OPS.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:n.OPS.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:n.OPS.endPath,numArgs:0,variableArgs:!1},W:{id:n.OPS.clip,numArgs:0,variableArgs:!1},"W*":{id:n.OPS.eoClip,numArgs:0,variableArgs:!1},BT:{id:n.OPS.beginText,numArgs:0,variableArgs:!1},ET:{id:n.OPS.endText,numArgs:0,variableArgs:!1},Tc:{id:n.OPS.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:n.OPS.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:n.OPS.setHScale,numArgs:1,variableArgs:!1},TL:{id:n.OPS.setLeading,numArgs:1,variableArgs:!1},Tf:{id:n.OPS.setFont,numArgs:2,variableArgs:!1},Tr:{id:n.OPS.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:n.OPS.setTextRise,numArgs:1,variableArgs:!1},Td:{id:n.OPS.moveText,numArgs:2,variableArgs:!1},TD:{id:n.OPS.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:n.OPS.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:n.OPS.nextLine,numArgs:0,variableArgs:!1},Tj:{id:n.OPS.showText,numArgs:1,variableArgs:!1},TJ:{id:n.OPS.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:n.OPS.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:n.OPS.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:n.OPS.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:n.OPS.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:n.OPS.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:n.OPS.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:n.OPS.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:n.OPS.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:n.OPS.setFillColor,numArgs:4,variableArgs:!0},scn:{id:n.OPS.setFillColorN,numArgs:33,variableArgs:!0},G:{id:n.OPS.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:n.OPS.setFillGray,numArgs:1,variableArgs:!1},RG:{id:n.OPS.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:n.OPS.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:n.OPS.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:n.OPS.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:n.OPS.shadingFill,numArgs:1,variableArgs:!1},BI:{id:n.OPS.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:n.OPS.beginImageData,numArgs:0,variableArgs:!1},EI:{id:n.OPS.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:n.OPS.paintXObject,numArgs:1,variableArgs:!1},MP:{id:n.OPS.markPoint,numArgs:1,variableArgs:!1},DP:{id:n.OPS.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:n.OPS.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:n.OPS.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:n.OPS.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:n.OPS.beginCompat,numArgs:0,variableArgs:!1},EX:{id:n.OPS.endCompat,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null})}constructor(K,oe,J=new c){this.parser=new d.Parser({lexer:new d.Lexer(K,q.opMap),xref:oe}),this.stateManager=J,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(K){let oe=K.args;for(;;){const J=this.parser.getObj();if(J instanceof R.Cmd){const te=J.cmd,B=q.opMap[te];if(!B){(0,n.warn)(`Unknown command "${te}".`);continue}const j=B.id,Y=B.numArgs;let W=oe!==null?oe.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=j>=n.OPS.moveTo&&j<=n.OPS.endPath,B.variableArgs)W>Y&&(0,n.info)(`Command ${te}: expected [0, ${Y}] args, but received ${W} args.`);else{if(W!==Y){const G=this.nonProcessedArgs;for(;W>Y;)G.push(oe.shift()),W--;for(;W<Y&&G.length!==0;)oe===null&&(oe=[]),oe.unshift(G.pop()),W++}if(W<Y){const G=`command ${te}: expected ${Y} args, but received ${W} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>q.MAX_INVALID_PATH_OPS)throw new n.FormatError(`Invalid ${G}`);(0,n.warn)(`Skipping ${G}`),oe!==null&&(oe.length=0);continue}}return this.preprocessCommand(j,oe),K.fn=j,K.args=oe,!0}if(J===R.EOF)return!1;if(J!==null&&(oe===null&&(oe=[]),oe.push(J),oe.length>33))throw new n.FormatError("Too many arguments")}}preprocessCommand(K,oe){switch(K|0){case n.OPS.save:this.stateManager.save();break;case n.OPS.restore:this.stateManager.restore();break;case n.OPS.transform:this.stateManager.transform(oe);break}}};Rt(q,"MAX_INVALID_PATH_OPS",10);let D=q;P.EvaluatorPreprocessor=D},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.IdentityCMap=P.CMapFactory=P.CMap=void 0;var n=ie(2),k=ie(4),R=ie(5),e=ie(15),t=ie(16),o=ie(3),$=ie(8);const L=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],I=2**24-1;class T{constructor(u=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=u}addCodespaceRange(u,F,U){this.codespaceRanges[u-1].push(F,U),this.numCodespaceRanges++}mapCidRange(u,F,U){if(F-u>I)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;u<=F;)this._map[u++]=U++}mapBfRange(u,F,U){if(F-u>I)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const O=U.length-1;for(;u<=F;){this._map[u++]=U;const m=U.charCodeAt(O)+1;if(m>255){U=U.substring(0,O-1)+String.fromCharCode(U.charCodeAt(O-1)+1)+"\0";continue}U=U.substring(0,O)+String.fromCharCode(m)}}mapBfRangeToArray(u,F,U){if(F-u>I)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const O=U.length;let m=0;for(;u<=F&&m<O;)this._map[u]=U[m++],++u}mapOne(u,F){this._map[u]=F}lookup(u){return this._map[u]}contains(u){return this._map[u]!==void 0}forEach(u){const F=this._map,U=F.length;if(U<=65536)for(let O=0;O<U;O++)F[O]!==void 0&&u(O,F[O]);else for(const O in F)u(O,F[O])}charCodeOf(u){const F=this._map;if(F.length<=65536)return F.indexOf(u);for(const U in F)if(F[U]===u)return U|0;return-1}getMap(){return this._map}readCharCode(u,F,U){let O=0;const m=this.codespaceRanges;for(let x=0,y=m.length;x<y;x++){O=(O<<8|u.charCodeAt(F+x))>>>0;const r=m[x];for(let p=0,c=r.length;p<c;){const h=r[p++],C=r[p++];if(O>=h&&O<=C){U.charcode=O,U.length=x+1;return}}}U.charcode=0,U.length=1}getCharCodeLength(u){const F=this.codespaceRanges;for(let U=0,O=F.length;U<O;U++){const m=F[U];for(let x=0,y=m.length;x<y;){const r=m[x++],p=m[x++];if(u>=r&&u<=p)return U+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if(!(this.name==="Identity-H"||this.name==="Identity-V")||this._map.length!==65536)return!1;for(let u=0;u<65536;u++)if(this._map[u]!==u)return!1;return!0}}P.CMap=T;class d extends T{constructor(u,F){super(),this.vertical=u,this.addCodespaceRange(F,0,65535)}mapCidRange(u,F,U){(0,n.unreachable)("should not call mapCidRange")}mapBfRange(u,F,U){(0,n.unreachable)("should not call mapBfRange")}mapBfRangeToArray(u,F,U){(0,n.unreachable)("should not call mapBfRangeToArray")}mapOne(u,F){(0,n.unreachable)("should not call mapCidOne")}lookup(u){return Number.isInteger(u)&&u<=65535?u:void 0}contains(u){return Number.isInteger(u)&&u<=65535}forEach(u){for(let F=0;F<=65535;F++)u(F,F)}charCodeOf(u){return Number.isInteger(u)&&u<=65535?u:-1}getMap(){const u=new Array(65536);for(let F=0;F<=65535;F++)u[F]=F;return u}get length(){return 65536}get isIdentityCMap(){(0,n.unreachable)("should not access .isIdentityCMap")}}P.IdentityCMap=d;function f(s){let u=0;for(let F=0;F<s.length;F++)u=u<<8|s.charCodeAt(F);return u>>>0}function i(s){if(typeof s!="string")throw new n.FormatError("Malformed CMap: expected string.")}function S(s){if(!Number.isInteger(s))throw new n.FormatError("Malformed CMap: expected int.")}function w(s,u){for(;;){let F=u.getObj();if(F===k.EOF)break;if((0,k.isCmd)(F,"endbfchar"))return;i(F);const U=f(F);F=u.getObj(),i(F);const O=F;s.mapOne(U,O)}}function v(s,u){for(;;){let F=u.getObj();if(F===k.EOF)break;if((0,k.isCmd)(F,"endbfrange"))return;i(F);const U=f(F);F=u.getObj(),i(F);const O=f(F);if(F=u.getObj(),Number.isInteger(F)||typeof F=="string"){const m=Number.isInteger(F)?String.fromCharCode(F):F;s.mapBfRange(U,O,m)}else if((0,k.isCmd)(F,"[")){F=u.getObj();const m=[];for(;!(0,k.isCmd)(F,"]")&&F!==k.EOF;)m.push(F),F=u.getObj();s.mapBfRangeToArray(U,O,m)}else break}throw new n.FormatError("Invalid bf range.")}function b(s,u){for(;;){let F=u.getObj();if(F===k.EOF)break;if((0,k.isCmd)(F,"endcidchar"))return;i(F);const U=f(F);F=u.getObj(),S(F);const O=F;s.mapOne(U,O)}}function M(s,u){for(;;){let F=u.getObj();if(F===k.EOF)break;if((0,k.isCmd)(F,"endcidrange"))return;i(F);const U=f(F);F=u.getObj(),i(F);const O=f(F);F=u.getObj(),S(F);const m=F;s.mapCidRange(U,O,m)}}function _(s,u){for(;;){let F=u.getObj();if(F===k.EOF)break;if((0,k.isCmd)(F,"endcodespacerange"))return;if(typeof F!="string")break;const U=f(F);if(F=u.getObj(),typeof F!="string")break;const O=f(F);s.addCodespaceRange(F.length,U,O)}throw new n.FormatError("Invalid codespace range.")}function H(s,u){const F=u.getObj();Number.isInteger(F)&&(s.vertical=!!F)}function A(s,u){const F=u.getObj();F instanceof k.Name&&(s.name=F.name)}async function E(s,u,F,U){let O,m;e:for(;;)try{const x=u.getObj();if(x===k.EOF)break;if(x instanceof k.Name)x.name==="WMode"?H(s,u):x.name==="CMapName"&&A(s,u),O=x;else if(x instanceof k.Cmd)switch(x.cmd){case"endcmap":break e;case"usecmap":O instanceof k.Name&&(m=O.name);break;case"begincodespacerange":_(s,u);break;case"beginbfchar":w(s,u);break;case"begincidchar":b(s,u);break;case"beginbfrange":v(s,u);break;case"begincidrange":M(s,u);break}}catch(x){if(x instanceof o.MissingDataException)throw x;(0,n.warn)("Invalid cMap data: "+x);continue}return!U&&m&&(U=m),U?l(s,F,U):s}async function l(s,u,F){if(s.useCMap=await g(F,u),s.numCodespaceRanges===0){const U=s.useCMap.codespaceRanges;for(let O=0;O<U.length;O++)s.codespaceRanges[O]=U[O].slice();s.numCodespaceRanges=s.useCMap.numCodespaceRanges}return s.useCMap.forEach(function(U,O){s.contains(U)||s.mapOne(U,s.useCMap.lookup(U))}),s}async function g(s,u){if(s==="Identity-H")return new d(!1,2);if(s==="Identity-V")return new d(!0,2);if(!L.includes(s))throw new Error("Unknown CMap name: "+s);if(!u)throw new Error("Built-in CMap parameters are not provided.");const{cMapData:F,compressionType:U}=await u(s),O=new T(!0);if(U===n.CMapCompressionType.BINARY)return new e.BinaryCMapReader().process(F,O,m=>l(O,u,m));if(U===n.CMapCompressionType.NONE){const m=new t.Lexer(new $.Stream(F));return E(O,m,u,null)}throw new Error(`Invalid CMap "compressionType" value: ${U}`)}class N{static async create({encoding:u,fetchBuiltInCMap:F,useCMap:U}){if(u instanceof k.Name)return g(u.name,F);if(u instanceof R.BaseStream){const O=await E(new T,new t.Lexer(u),F,U);return O.isIdentityCMap?g(O.name,F):O}throw new Error("Encoding required.")}}P.CMapFactory=N},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.BinaryCMapReader=void 0;var n=ie(2);function k(T,d){let f=0;for(let i=0;i<=d;i++)f=f<<8|T[i];return f>>>0}function R(T,d){return d===1?String.fromCharCode(T[0],T[1]):d===3?String.fromCharCode(T[0],T[1],T[2],T[3]):String.fromCharCode(...T.subarray(0,d+1))}function e(T,d,f){let i=0;for(let S=f;S>=0;S--)i+=T[S]+d[S],T[S]=i&255,i>>=8}function t(T,d){let f=1;for(let i=d;i>=0&&f>0;i--)f+=T[i],T[i]=f&255,f>>=8}const o=16,$=19;class L{constructor(d){this.buffer=d,this.pos=0,this.end=d.length,this.tmpBuf=new Uint8Array($)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let d=0,f;do{const i=this.readByte();if(i<0)throw new n.FormatError("unexpected EOF in bcmap");f=!(i&128),d=d<<7|i&127}while(!f);return d}readSigned(){const d=this.readNumber();return d&1?~(d>>>1):d>>>1}readHex(d,f){d.set(this.buffer.subarray(this.pos,this.pos+f+1)),this.pos+=f+1}readHexNumber(d,f){let i;const S=this.tmpBuf;let w=0;do{const _=this.readByte();if(_<0)throw new n.FormatError("unexpected EOF in bcmap");i=!(_&128),S[w++]=_&127}while(!i);let v=f,b=0,M=0;for(;v>=0;){for(;M<8&&S.length>0;)b|=S[--w]<<M,M+=7;d[v]=b&255,v--,b>>=8,M-=8}}readHexSigned(d,f){this.readHexNumber(d,f);const i=d[f]&1?255:0;let S=0;for(let w=0;w<=f;w++)S=(S&1)<<8|d[w],d[w]=S>>1^i}readString(){const d=this.readNumber(),f=new Array(d);for(let i=0;i<d;i++)f[i]=this.readNumber();return String.fromCharCode(...f)}}class I{async process(d,f,i){const S=new L(d),w=S.readByte();f.vertical=!!(w&1);let v=null;const b=new Uint8Array(o),M=new Uint8Array(o),_=new Uint8Array(o),H=new Uint8Array(o),A=new Uint8Array(o);let E,l;for(;(l=S.readByte())>=0;){const g=l>>5;if(g===7){switch(l&31){case 0:S.readString();break;case 1:v=S.readString();break}continue}const N=!!(l&16),s=l&15;if(s+1>o)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const u=1,F=S.readNumber();switch(g){case 0:S.readHex(b,s),S.readHexNumber(M,s),e(M,b,s),f.addCodespaceRange(s+1,k(b,s),k(M,s));for(let U=1;U<F;U++)t(M,s),S.readHexNumber(b,s),e(b,M,s),S.readHexNumber(M,s),e(M,b,s),f.addCodespaceRange(s+1,k(b,s),k(M,s));break;case 1:S.readHex(b,s),S.readHexNumber(M,s),e(M,b,s),S.readNumber();for(let U=1;U<F;U++)t(M,s),S.readHexNumber(b,s),e(b,M,s),S.readHexNumber(M,s),e(M,b,s),S.readNumber();break;case 2:S.readHex(_,s),E=S.readNumber(),f.mapOne(k(_,s),E);for(let U=1;U<F;U++)t(_,s),N||(S.readHexNumber(A,s),e(_,A,s)),E=S.readSigned()+(E+1),f.mapOne(k(_,s),E);break;case 3:S.readHex(b,s),S.readHexNumber(M,s),e(M,b,s),E=S.readNumber(),f.mapCidRange(k(b,s),k(M,s),E);for(let U=1;U<F;U++)t(M,s),N?b.set(M):(S.readHexNumber(b,s),e(b,M,s)),S.readHexNumber(M,s),e(M,b,s),E=S.readNumber(),f.mapCidRange(k(b,s),k(M,s),E);break;case 4:S.readHex(_,u),S.readHex(H,s),f.mapOne(k(_,u),R(H,s));for(let U=1;U<F;U++)t(_,u),N||(S.readHexNumber(A,u),e(_,A,u)),t(H,s),S.readHexSigned(A,s),e(H,A,s),f.mapOne(k(_,u),R(H,s));break;case 5:S.readHex(b,u),S.readHexNumber(M,u),e(M,b,u),S.readHex(H,s),f.mapBfRange(k(b,u),k(M,u),R(H,s));for(let U=1;U<F;U++)t(M,u),N?b.set(M):(S.readHexNumber(b,u),e(b,M,u)),S.readHexNumber(M,u),e(M,b,u),S.readHex(H,s),f.mapBfRange(k(b,u),k(M,u),R(H,s));break;default:throw new Error(`BinaryCMapReader.process - unknown type: ${g}`)}}return v?i(v):f}}P.BinaryCMapReader=I},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Parser=P.Linearization=P.Lexer=void 0;var n=ie(2),k=ie(4),R=ie(3),e=ie(8),t=ie(17),o=ie(19),$=ie(20),L=ie(22),I=ie(23),T=ie(26),d=ie(29),f=ie(31),i=ie(32),S=ie(33);const w=1e3;function v(E){const l=[],g=E.length;let N=0;for(;N<g-1;)l.push(E[N++]<<8|E[N++]);return N<g&&l.push(E[N]),g+"_"+String.fromCharCode.apply(null,l)}class b{constructor({lexer:l,xref:g,allowStreams:N=!1,recoveryMode:s=!1}){this.lexer=l,this.xref=g,this.allowStreams=N,this.recoveryMode=s,this.imageCache=Object.create(null),this._imageId=0,this.refill()}refill(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()}shift(){this.buf2 instanceof k.Cmd&&this.buf2.cmd==="ID"?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(l){if(l instanceof R.MissingDataException)throw l;return!1}}getObj(l=null){const g=this.buf1;if(this.shift(),g instanceof k.Cmd)switch(g.cmd){case"BI":return this.makeInlineImage(l);case"[":const N=[];for(;!(0,k.isCmd)(this.buf1,"]")&&this.buf1!==k.EOF;)N.push(this.getObj(l));if(this.buf1===k.EOF){if(this.recoveryMode)return N;throw new R.ParserEOFException("End of file inside array.")}return this.shift(),N;case"<<":const s=new k.Dict(this.xref);for(;!(0,k.isCmd)(this.buf1,">>")&&this.buf1!==k.EOF;){if(!(this.buf1 instanceof k.Name)){(0,n.info)("Malformed dictionary: key must be a name object"),this.shift();continue}const u=this.buf1.name;if(this.shift(),this.buf1===k.EOF)break;s.set(u,this.getObj(l))}if(this.buf1===k.EOF){if(this.recoveryMode)return s;throw new R.ParserEOFException("End of file inside dictionary.")}return(0,k.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(s,l):s:(this.shift(),s);default:return g}if(Number.isInteger(g)){if(Number.isInteger(this.buf1)&&(0,k.isCmd)(this.buf2,"R")){const N=k.Ref.get(g,this.buf1);return this.shift(),this.shift(),N}return g}return typeof g=="string"&&l?l.decryptString(g):g}findDefaultInlineStreamEnd(l){const{knownCommands:O}=this.lexer,m=l.pos,x=15;let y=0,r,p;for(;(r=l.getByte())!==-1;)if(y===0)y=r===69?1:0;else if(y===1)y=r===73?2:0;else if(r===32||r===10||r===13){p=l.pos;const h=l.peekBytes(x),C=h.length;if(C===0)break;for(let q=0;q<C;q++)if(r=h[q],!(r===0&&h[q+1]!==0)&&r!==10&&r!==13&&(r<32||r>127)){y=0;break}if(y!==2)continue;if(!O){(0,n.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const D=new H(new e.Stream(h.slice()),O);D._hexStringWarn=()=>{};let X=0;for(;;){const q=D.getObj();if(q===k.EOF){y=0;break}if(q instanceof k.Cmd){const re=O[q.cmd];if(re){if(re.variableArgs?X<=re.numArgs:X===re.numArgs)break}else{y=0;break}X=0;continue}X++}if(y===2)break}else y=0;r===-1&&((0,n.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),p&&((0,n.warn)('... trying to recover by using the last "EI" occurrence.'),l.skip(-(l.pos-p))));let c=4;return l.skip(-c),r=l.peekByte(),l.skip(c),(0,R.isWhiteSpace)(r)||c--,l.pos-c-m}findDCTDecodeInlineStreamEnd(l){const g=l.pos;let N=!1,s,u;for(;(s=l.getByte())!==-1;)if(s===255){switch(l.getByte()){case 0:break;case 255:l.skip(-1);break;case 217:N=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:u=l.getUint16(),u>2?l.skip(u-2):l.skip(-2);break}if(N)break}const F=l.pos-g;return s===-1?((0,n.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),l.skip(-F),this.findDefaultInlineStreamEnd(l)):(this.inlineStreamSkipEI(l),F)}findASCII85DecodeInlineStreamEnd(l){const s=l.pos;let u;for(;(u=l.getByte())!==-1;)if(u===126){const U=l.pos;for(u=l.peekByte();(0,R.isWhiteSpace)(u);)l.skip(),u=l.peekByte();if(u===62){l.skip();break}if(l.pos>U){const O=l.peekBytes(2);if(O[0]===69&&O[1]===73)break}}const F=l.pos-s;return u===-1?((0,n.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),l.skip(-F),this.findDefaultInlineStreamEnd(l)):(this.inlineStreamSkipEI(l),F)}findASCIIHexDecodeInlineStreamEnd(l){const N=l.pos;let s;for(;(s=l.getByte())!==-1&&s!==62;);const u=l.pos-N;return s===-1?((0,n.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),l.skip(-u),this.findDefaultInlineStreamEnd(l)):(this.inlineStreamSkipEI(l),u)}inlineStreamSkipEI(l){let s=0,u;for(;(u=l.getByte())!==-1;)if(s===0)s=u===69?1:0;else if(s===1)s=u===73?2:0;else if(s===2)break}makeInlineImage(l){const g=this.lexer,N=g.stream,s=Object.create(null);let u;for(;!(0,k.isCmd)(this.buf1,"ID")&&this.buf1!==k.EOF;){if(!(this.buf1 instanceof k.Name))throw new n.FormatError("Dictionary key must be a name object");const p=this.buf1.name;if(this.shift(),this.buf1===k.EOF)break;s[p]=this.getObj(l)}g.beginInlineImagePos!==-1&&(u=N.pos-g.beginInlineImagePos);const F=this.xref.fetchIfRef(s.F||s.Filter);let U;if(F instanceof k.Name)U=F.name;else if(Array.isArray(F)){const p=this.xref.fetchIfRef(F[0]);p instanceof k.Name&&(U=p.name)}const O=N.pos;let m;switch(U){case"DCT":case"DCTDecode":m=this.findDCTDecodeInlineStreamEnd(N);break;case"A85":case"ASCII85Decode":m=this.findASCII85DecodeInlineStreamEnd(N);break;case"AHx":case"ASCIIHexDecode":m=this.findASCIIHexDecodeInlineStreamEnd(N);break;default:m=this.findDefaultInlineStreamEnd(N)}let x;if(m<w&&u>0){const p=N.pos;N.pos=g.beginInlineImagePos,x=v(N.getBytes(u+m)),N.pos=p;const c=this.imageCache[x];if(c!==void 0)return this.buf2=k.Cmd.get("EI"),this.shift(),c.reset(),c}const y=new k.Dict(this.xref);for(const p in s)y.set(p,s[p]);let r=N.makeSubStream(O,m,y);return l&&(r=l.createStream(r,m)),r=this.filter(r,y,m),r.dict=y,x!==void 0&&(r.cacheKey=`inline_img_${++this._imageId}`,this.imageCache[x]=r),this.buf2=k.Cmd.get("EI"),this.shift(),r}_findStreamLength(l,g){const{stream:N}=this.lexer;N.pos=l;const s=2048,u=g.length;for(;N.pos<N.end;){const F=N.peekBytes(s),U=F.length-u;if(U<=0)break;let O=0;for(;O<U;){let m=0;for(;m<u&&F[O+m]===g[m];)m++;if(m>=u)return N.pos+=O,N.pos-l;O++}N.pos+=U}return-1}makeStream(l,g){const N=this.lexer;let s=N.stream;N.skipToNextLine();const u=s.pos-1;let F=l.get("Length");if(Number.isInteger(F)||((0,n.info)(`Bad length "${F&&F.toString()}" in stream.`),F=0),s.pos=u+F,N.nextChar(),this.tryShift()&&(0,k.isCmd)(this.buf2,"endstream"))this.shift();else{const U=new Uint8Array([101,110,100,115,116,114,101,97,109]);let O=this._findStreamLength(u,U);if(O<0){for(let x=1;x<=1;x++){const y=U.length-x,r=U.slice(0,y),p=this._findStreamLength(u,r);if(p>=0){const c=s.peekBytes(y+1)[y];if(!(0,R.isWhiteSpace)(c))break;(0,n.info)(`Found "${(0,n.bytesToString)(r)}" when searching for endstream command.`),O=p;break}}if(O<0)throw new n.FormatError("Missing endstream command.")}F=O,N.nextChar(),this.shift(),this.shift()}return this.shift(),s=s.makeSubStream(u,F,l),g&&(s=g.createStream(s,F)),s=this.filter(s,l,F),s.dict=l,s}filter(l,g,N){let s=g.get("F","Filter"),u=g.get("DP","DecodeParms");if(s instanceof k.Name)return Array.isArray(u)&&(0,n.warn)("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(l,s.name,N,u);let F=N;if(Array.isArray(s)){const U=s,O=u;for(let m=0,x=U.length;m<x;++m){if(s=this.xref.fetchIfRef(U[m]),!(s instanceof k.Name))throw new n.FormatError(`Bad filter name "${s}"`);u=null,Array.isArray(O)&&m in O&&(u=this.xref.fetchIfRef(O[m])),l=this.makeFilter(l,s.name,F,u),F=null}}return l}makeFilter(l,g,N,s){if(N===0)return(0,n.warn)(`Empty "${g}" stream.`),new e.NullStream;try{switch(g){case"Fl":case"FlateDecode":return s?new i.PredictorStream(new L.FlateStream(l,N),N,s):new L.FlateStream(l,N);case"LZW":case"LZWDecode":let u=1;return s?(s.has("EarlyChange")&&(u=s.get("EarlyChange")),new i.PredictorStream(new f.LZWStream(l,N,u),N,s)):new f.LZWStream(l,N,u);case"DCT":case"DCTDecode":return new T.JpegStream(l,N,s);case"JPX":case"JPXDecode":return new d.JpxStream(l,N,s);case"A85":case"ASCII85Decode":return new t.Ascii85Stream(l,N);case"AHx":case"ASCIIHexDecode":return new o.AsciiHexStream(l,N);case"CCF":case"CCITTFaxDecode":return new $.CCITTFaxStream(l,N,s);case"RL":case"RunLengthDecode":return new S.RunLengthStream(l,N);case"JBIG2Decode":return new I.Jbig2Stream(l,N,s)}return(0,n.warn)(`Filter "${g}" is not supported.`),l}catch(u){if(u instanceof R.MissingDataException)throw u;return(0,n.warn)(`Invalid stream: "${u}"`),new e.NullStream}}}P.Parser=b;const M=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,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,2,0,2,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,2,0,2,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,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];function _(E){return E>=48&&E<=57?E&15:E>=65&&E<=70||E>=97&&E<=102?(E&15)+9:-1}class H{constructor(l,g=null){this.stream=l,this.nextChar(),this.strBuf=[],this.knownCommands=g,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let l=this.currentChar,g=!1,N=0,s=1;if(l===45?(s=-1,l=this.nextChar(),l===45&&(l=this.nextChar())):l===43&&(l=this.nextChar()),l===10||l===13)do l=this.nextChar();while(l===10||l===13);if(l===46&&(N=10,l=this.nextChar()),l<48||l>57){const O=`Invalid number: ${String.fromCharCode(l)} (charCode ${l})`;if((0,R.isWhiteSpace)(l)||l===-1)return(0,n.info)(`Lexer.getNumber - "${O}".`),0;throw new n.FormatError(O)}let u=l-48,F=0,U=1;for(;(l=this.nextChar())>=0;)if(l>=48&&l<=57){const O=l-48;g?F=F*10+O:(N!==0&&(N*=10),u=u*10+O)}else if(l===46)if(N===0)N=1;else break;else if(l===45)(0,n.warn)("Badly formatted number: minus sign in the middle");else if(l===69||l===101){if(l=this.peekChar(),l===43||l===45)U=l===45?-1:1,this.nextChar();else if(l<48||l>57)break;g=!0}else break;return N!==0&&(u/=N),g&&(u*=10**(U*F)),s*u}getString(){let l=1,g=!1;const N=this.strBuf;N.length=0;let s=this.nextChar();for(;;){let u=!1;switch(s|0){case-1:(0,n.warn)("Unterminated string"),g=!0;break;case 40:++l,N.push("(");break;case 41:--l===0?(this.nextChar(),g=!0):N.push(")");break;case 92:switch(s=this.nextChar(),s){case-1:(0,n.warn)("Unterminated string"),g=!0;break;case 110:N.push(`
`);break;case 114:N.push("\r");break;case 116:N.push("	");break;case 98:N.push("\b");break;case 102:N.push("\f");break;case 92:case 40:case 41:N.push(String.fromCharCode(s));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let F=s&15;s=this.nextChar(),u=!0,s>=48&&s<=55&&(F=(F<<3)+(s&15),s=this.nextChar(),s>=48&&s<=55&&(u=!1,F=(F<<3)+(s&15))),N.push(String.fromCharCode(F));break;case 13:this.peekChar()===10&&this.nextChar();break;case 10:break;default:N.push(String.fromCharCode(s));break}break;default:N.push(String.fromCharCode(s));break}if(g)break;u||(s=this.nextChar())}return N.join("")}getName(){let l,g;const N=this.strBuf;for(N.length=0;(l=this.nextChar())>=0&&!M[l];)if(l===35){if(l=this.nextChar(),M[l]){(0,n.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),N.push("#");break}const s=_(l);if(s!==-1){g=l,l=this.nextChar();const u=_(l);if(u===-1){if((0,n.warn)(`Lexer_getName: Illegal digit (${String.fromCharCode(l)}) in hexadecimal number.`),N.push("#",String.fromCharCode(g)),M[l])break;N.push(String.fromCharCode(l));continue}N.push(String.fromCharCode(s<<4|u))}else N.push("#",String.fromCharCode(l))}else N.push(String.fromCharCode(l));return N.length>127&&(0,n.warn)(`Name token is longer than allowed by the spec: ${N.length}`),k.Name.get(N.join(""))}_hexStringWarn(l){if(this._hexStringNumWarn++===5){(0,n.warn)("getHexString - ignoring additional invalid characters.");return}this._hexStringNumWarn>5||(0,n.warn)(`getHexString - ignoring invalid character: ${l}`)}getHexString(){const l=this.strBuf;l.length=0;let g=this.currentChar,N=!0,s,u;for(this._hexStringNumWarn=0;;)if(g<0){(0,n.warn)("Unterminated hex string");break}else if(g===62){this.nextChar();break}else if(M[g]===1){g=this.nextChar();continue}else{if(N){if(s=_(g),s===-1){this._hexStringWarn(g),g=this.nextChar();continue}}else{if(u=_(g),u===-1){this._hexStringWarn(g),g=this.nextChar();continue}l.push(String.fromCharCode(s<<4|u))}N=!N,g=this.nextChar()}return l.join("")}getObj(){let l=!1,g=this.currentChar;for(;;){if(g<0)return k.EOF;if(l)(g===10||g===13)&&(l=!1);else if(g===37)l=!0;else if(M[g]!==1)break;g=this.nextChar()}switch(g|0){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),k.Cmd.get("[");case 93:return this.nextChar(),k.Cmd.get("]");case 60:return g=this.nextChar(),g===60?(this.nextChar(),k.Cmd.get("<<")):this.getHexString();case 62:return g=this.nextChar(),g===62?(this.nextChar(),k.Cmd.get(">>")):k.Cmd.get(">");case 123:return this.nextChar(),k.Cmd.get("{");case 125:return this.nextChar(),k.Cmd.get("}");case 41:throw this.nextChar(),new n.FormatError(`Illegal character: ${g}`)}let N=String.fromCharCode(g);if(g<32||g>127){const F=this.peekChar();if(F>=32&&F<=127)return this.nextChar(),k.Cmd.get(N)}const s=this.knownCommands;let u=(s==null?void 0:s[N])!==void 0;for(;(g=this.nextChar())>=0&&!M[g];){const F=N+String.fromCharCode(g);if(u&&s[F]===void 0)break;if(N.length===128)throw new n.FormatError(`Command token too long: ${N.length}`);N=F,u=(s==null?void 0:s[N])!==void 0}return N==="true"?!0:N==="false"?!1:N==="null"?null:(N==="BI"&&(this.beginInlineImagePos=this.stream.pos),k.Cmd.get(N))}skipToNextLine(){let l=this.currentChar;for(;l>=0;){if(l===13){l=this.nextChar(),l===10&&this.nextChar();break}else if(l===10){this.nextChar();break}l=this.nextChar()}}}P.Lexer=H;class A{static create(l){function g(y,r,p=!1){const c=y.get(r);if(Number.isInteger(c)&&(p?c>=0:c>0))return c;throw new Error(`The "${r}" parameter in the linearization dictionary is invalid.`)}function N(y){const r=y.get("H");let p;if(Array.isArray(r)&&((p=r.length)===2||p===4)){for(let c=0;c<p;c++){const h=r[c];if(!(Number.isInteger(h)&&h>0))throw new Error(`Hint (${c}) in the linearization dictionary is invalid.`)}return r}throw new Error("Hint array in the linearization dictionary is invalid.")}const s=new b({lexer:new H(l),xref:null}),u=s.getObj(),F=s.getObj(),U=s.getObj(),O=s.getObj();let m,x;if(Number.isInteger(u)&&Number.isInteger(F)&&(0,k.isCmd)(U,"obj")&&O instanceof k.Dict&&typeof(m=O.get("Linearized"))=="number"&&m>0){if((x=g(O,"L"))!==l.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.')}else return null;return{length:x,hints:N(O),objectNumberFirst:g(O,"O"),endFirst:g(O,"E"),numPages:g(O,"N"),mainXRefEntriesOffset:g(O,"T"),pageFirst:O.has("P")?g(O,"P",!0):0}}}P.Linearization=A},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Ascii85Stream=void 0;var n=ie(18),k=ie(3);class R extends n.DecodeStream{constructor(t,o){o&&(o*=.8),super(o),this.str=t,this.dict=t.dict,this.input=new Uint8Array(5)}readBlock(){const L=this.str;let I=L.getByte();for(;(0,k.isWhiteSpace)(I);)I=L.getByte();if(I===-1||I===126){this.eof=!0;return}const T=this.bufferLength;let d,f;if(I===122){for(d=this.ensureBuffer(T+4),f=0;f<4;++f)d[T+f]=0;this.bufferLength+=4}else{const i=this.input;for(i[0]=I,f=1;f<5;++f){for(I=L.getByte();(0,k.isWhiteSpace)(I);)I=L.getByte();if(i[f]=I,I===-1||I===126)break}if(d=this.ensureBuffer(T+f-1),this.bufferLength+=f-1,f<5){for(;f<5;++f)i[f]=117;this.eof=!0}let S=0;for(f=0;f<5;++f)S=S*85+(i[f]-33);for(f=3;f>=0;--f)d[T+f]=S&255,S>>=8}}}P.Ascii85Stream=R},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.StreamsSequenceStream=P.DecodeStream=void 0;var n=ie(5),k=ie(8);const R=new Uint8Array(0);class e extends n.BaseStream{constructor($){if(super(),this._rawMinBufferLength=$||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=R,this.minBufferLength=512,$)for(;this.minBufferLength<$;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&this.bufferLength===0;)this.readBlock();return this.bufferLength===0}ensureBuffer($){const L=this.buffer;if($<=L.byteLength)return L;let I=this.minBufferLength;for(;I<$;)I*=2;const T=new Uint8Array(I);return T.set(L),this.buffer=T}getByte(){const $=this.pos;for(;this.bufferLength<=$;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes($){const L=this.pos;let I;if($){for(this.ensureBuffer(L+$),I=L+$;!this.eof&&this.bufferLength<I;)this.readBlock();const T=this.bufferLength;I>T&&(I=T)}else{for(;!this.eof;)this.readBlock();I=this.bufferLength}return this.pos=I,this.buffer.subarray(L,I)}reset(){this.pos=0}makeSubStream($,L,I=null){if(L===void 0)for(;!this.eof;)this.readBlock();else{const T=$+L;for(;this.bufferLength<=T&&!this.eof;)this.readBlock()}return new k.Stream(this.buffer,$,L,I)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}P.DecodeStream=e;class t extends e{constructor($,L=null){let I=0;for(const T of $)I+=T instanceof e?T._rawMinBufferLength:T.length;super(I),this.streams=$,this._onError=L}readBlock(){var i;const $=this.streams;if($.length===0){this.eof=!0;return}const L=$.shift();let I;try{I=L.getBytes()}catch(S){if(this._onError){this._onError(S,(i=L.dict)==null?void 0:i.objId);return}throw S}const T=this.bufferLength,d=T+I.length;this.ensureBuffer(d).set(I,T),this.bufferLength=d}getBaseStreams(){const $=[];for(const L of this.streams){const I=L.getBaseStreams();I&&$.push(...I)}return $.length>0?$:null}}P.StreamsSequenceStream=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.AsciiHexStream=void 0;var n=ie(18);class k extends n.DecodeStream{constructor(e,t){t&&(t*=.5),super(t),this.str=e,this.dict=e.dict,this.firstDigit=-1}readBlock(){const t=this.str.getBytes(8e3);if(!t.length){this.eof=!0;return}const o=t.length+1>>1,$=this.ensureBuffer(this.bufferLength+o);let L=this.bufferLength,I=this.firstDigit;for(const T of t){let d;if(T>=48&&T<=57)d=T&15;else if(T>=65&&T<=70||T>=97&&T<=102)d=(T&15)+9;else if(T===62){this.eof=!0;break}else continue;I<0?I=d:($[L++]=I<<4|d,I=-1)}I>=0&&this.eof&&($[L++]=I<<4,I=-1),this.firstDigit=I,this.bufferLength=L}}P.AsciiHexStream=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CCITTFaxStream=void 0;var n=ie(21),k=ie(18),R=ie(4);class e extends k.DecodeStream{constructor(o,$,L){super($),this.str=o,this.dict=o.dict,L instanceof R.Dict||(L=R.Dict.empty);const I={next(){return o.getByte()}};this.ccittFaxDecoder=new n.CCITTFaxDecoder(I,{K:L.get("K"),EndOfLine:L.get("EndOfLine"),EncodedByteAlign:L.get("EncodedByteAlign"),Columns:L.get("Columns"),Rows:L.get("Rows"),EndOfBlock:L.get("EndOfBlock"),BlackIs1:L.get("BlackIs1")})}readBlock(){for(;!this.eof;){const o=this.ccittFaxDecoder.readNextChar();if(o===-1){this.eof=!0;return}this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=o}}}P.CCITTFaxStream=e},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CCITTFaxDecoder=void 0;var n=ie(2);const k=-2,R=-1,e=0,t=1,o=2,$=3,L=4,I=5,T=6,d=7,f=8,i=[[-1,-1],[-1,-1],[7,f],[7,d],[6,T],[6,T],[6,I],[6,I],[4,e],[4,e],[4,e],[4,e],[4,e],[4,e],[4,e],[4,e],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,t],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,L],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[3,$],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o],[1,o]],S=[[-1,-1],[12,k],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],w=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],v=[[-1,-1],[-1,-1],[12,k],[12,k],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],b=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],M=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class _{constructor(A,E={}){if(!A||typeof A.next!="function")throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=A,this.eof=!1,this.encoding=E.K||0,this.eoline=E.EndOfLine||!1,this.byteAlign=E.EncodedByteAlign||!1,this.columns=E.Columns||1728,this.rows=E.Rows||0,this.eoblock=E.EndOfBlock??!0,this.black=E.BlackIs1||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0,this.rowsDone=!1;let l;for(;(l=this._lookBits(12))===0;)this._eatBits(1);l===1&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;const A=this.refLine,E=this.codingLine,l=this.columns;let g,N,s,u;if(this.outputBits===0){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;this.err=!1;let U,O,m;if(this.nextLine2D){for(u=0;E[u]<l;++u)A[u]=E[u];for(A[u++]=l,A[u]=l,E[0]=0,this.codingPos=0,g=0,N=0;E[this.codingPos]<l;)switch(U=this._getTwoDimCode(),U){case e:this._addPixels(A[g+1],N),A[g+1]<l&&(g+=2);break;case t:if(U=O=0,N){do U+=m=this._getBlackCode();while(m>=64);do O+=m=this._getWhiteCode();while(m>=64)}else{do U+=m=this._getWhiteCode();while(m>=64);do O+=m=this._getBlackCode();while(m>=64)}for(this._addPixels(E[this.codingPos]+U,N),E[this.codingPos]<l&&this._addPixels(E[this.codingPos]+O,N^1);A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case d:if(this._addPixels(A[g]+3,N),N^=1,E[this.codingPos]<l)for(++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case I:if(this._addPixels(A[g]+2,N),N^=1,E[this.codingPos]<l)for(++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case $:if(this._addPixels(A[g]+1,N),N^=1,E[this.codingPos]<l)for(++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case o:if(this._addPixels(A[g],N),N^=1,E[this.codingPos]<l)for(++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case f:if(this._addPixelsNeg(A[g]-3,N),N^=1,E[this.codingPos]<l)for(g>0?--g:++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case T:if(this._addPixelsNeg(A[g]-2,N),N^=1,E[this.codingPos]<l)for(g>0?--g:++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case L:if(this._addPixelsNeg(A[g]-1,N),N^=1,E[this.codingPos]<l)for(g>0?--g:++g;A[g]<=E[this.codingPos]&&A[g]<l;)g+=2;break;case R:this._addPixels(l,0),this.eof=!0;break;default:(0,n.info)("bad 2d code"),this._addPixels(l,0),this.err=!0}}else for(E[0]=0,this.codingPos=0,N=0;E[this.codingPos]<l;){if(U=0,N)do U+=m=this._getBlackCode();while(m>=64);else do U+=m=this._getWhiteCode();while(m>=64);this._addPixels(E[this.codingPos]+U,N),N^=1}let x=!1;if(this.byteAlign&&(this.inputBits&=-8),!this.eoblock&&this.row===this.rows-1)this.rowsDone=!0;else{if(U=this._lookBits(12),this.eoline)for(;U!==R&&U!==1;)this._eatBits(1),U=this._lookBits(12);else for(;U===0;)this._eatBits(1),U=this._lookBits(12);U===1?(this._eatBits(12),x=!0):U===R&&(this.eof=!0)}if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&x&&this.byteAlign){if(U=this._lookBits(12),U===1){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(u=0;u<4;++u)U=this._lookBits(12),U!==1&&(0,n.info)("bad rtc code: "+U),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(U=this._lookBits(13),U===R)return this.eof=!0,-1;if(U>>1===1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(U&1))}this.outputBits=E[0]>0?E[this.codingPos=0]:E[this.codingPos=1],this.row++}let F;if(this.outputBits>=8)F=this.codingPos&1?0:255,this.outputBits-=8,this.outputBits===0&&E[this.codingPos]<l&&(this.codingPos++,this.outputBits=E[this.codingPos]-E[this.codingPos-1]);else{s=8,F=0;do{if(typeof this.outputBits!="number")throw new n.FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>s?(F<<=s,this.codingPos&1||(F|=255>>8-s),this.outputBits-=s,s=0):(F<<=this.outputBits,this.codingPos&1||(F|=255>>8-this.outputBits),s-=this.outputBits,this.outputBits=0,E[this.codingPos]<l?(this.codingPos++,this.outputBits=E[this.codingPos]-E[this.codingPos-1]):s>0&&(F<<=s,s=0))}while(s)}return this.black&&(F^=255),F}_addPixels(A,E){const l=this.codingLine;let g=this.codingPos;A>l[g]&&(A>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,A=this.columns),g&1^E&&++g,l[g]=A),this.codingPos=g}_addPixelsNeg(A,E){const l=this.codingLine;let g=this.codingPos;if(A>l[g])A>this.columns&&((0,n.info)("row is wrong length"),this.err=!0,A=this.columns),g&1^E&&++g,l[g]=A;else if(A<l[g]){for(A<0&&((0,n.info)("invalid code"),this.err=!0,A=0);g>0&&A<l[g-1];)--g;l[g]=A}this.codingPos=g}_findTableCode(A,E,l,g){const N=g||0;for(let s=A;s<=E;++s){let u=this._lookBits(s);if(u===R)return[!0,1,!1];if(s<E&&(u<<=E-s),!N||u>=N){const F=l[u-N];if(F[0]===s)return this._eatBits(s),[!0,F[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let A=0,E;if(this.eoblock){if(A=this._lookBits(7),E=i[A],(E==null?void 0:E[0])>0)return this._eatBits(E[0]),E[1]}else{const l=this._findTableCode(1,7,i);if(l[0]&&l[2])return l[1]}return(0,n.info)("Bad two dim code"),R}_getWhiteCode(){let A=0,E;if(this.eoblock){if(A=this._lookBits(12),A===R)return 1;if(E=A>>5?w[A>>3]:S[A],E[0]>0)return this._eatBits(E[0]),E[1]}else{let l=this._findTableCode(1,9,w);if(l[0]||(l=this._findTableCode(11,12,S),l[0]))return l[1]}return(0,n.info)("bad white code"),this._eatBits(1),1}_getBlackCode(){let A,E;if(this.eoblock){if(A=this._lookBits(13),A===R)return 1;if(A>>7?!(A>>9)&&A>>7?E=b[(A>>1)-64]:E=M[A>>7]:E=v[A],E[0]>0)return this._eatBits(E[0]),E[1]}else{let l=this._findTableCode(2,6,M);if(l[0]||(l=this._findTableCode(7,12,b,64),l[0])||(l=this._findTableCode(10,13,v),l[0]))return l[1]}return(0,n.info)("bad black code"),this._eatBits(1),1}_lookBits(A){let E;for(;this.inputBits<A;){if((E=this.source.next())===-1)return this.inputBits===0?R:this.inputBuf<<A-this.inputBits&65535>>16-A;this.inputBuf=this.inputBuf<<8|E,this.inputBits+=8}return this.inputBuf>>this.inputBits-A&65535>>16-A}_eatBits(A){(this.inputBits-=A)<0&&(this.inputBits=0)}}P.CCITTFaxDecoder=_},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FlateStream=void 0;var n=ie(18),k=ie(2);const R=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),t=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],$=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];class L extends n.DecodeStream{constructor(T,d){super(d),this.str=T,this.dict=T.dict;const f=T.getByte(),i=T.getByte();if(f===-1||i===-1)throw new k.FormatError(`Invalid header in flate stream: ${f}, ${i}`);if((f&15)!==8)throw new k.FormatError(`Unknown compression method in flate stream: ${f}, ${i}`);if(((f<<8)+i)%31!==0)throw new k.FormatError(`Bad FCHECK in flate stream: ${f}, ${i}`);if(i&32)throw new k.FormatError(`FDICT bit set in flate stream: ${f}, ${i}`);this.codeSize=0,this.codeBuf=0}getBits(T){const d=this.str;let f=this.codeSize,i=this.codeBuf,S;for(;f<T;){if((S=d.getByte())===-1)throw new k.FormatError("Bad encoding in flate stream");i|=S<<f,f+=8}return S=i&(1<<T)-1,this.codeBuf=i>>T,this.codeSize=f-=T,S}getCode(T){const d=this.str,f=T[0],i=T[1];let S=this.codeSize,w=this.codeBuf,v;for(;S<i&&(v=d.getByte())!==-1;)w|=v<<S,S+=8;const b=f[w&(1<<i)-1],M=b>>16,_=b&65535;if(M<1||S<M)throw new k.FormatError("Bad encoding in flate stream");return this.codeBuf=w>>M,this.codeSize=S-M,_}generateHuffmanTable(T){const d=T.length;let f=0,i;for(i=0;i<d;++i)T[i]>f&&(f=T[i]);const S=1<<f,w=new Int32Array(S);for(let v=1,b=0,M=2;v<=f;++v,b<<=1,M<<=1)for(let _=0;_<d;++_)if(T[_]===v){let H=0,A=b;for(i=0;i<v;++i)H=H<<1|A&1,A>>=1;for(i=H;i<S;i+=M)w[i]=v<<16|_;++b}return[w,f]}readBlock(){let T,d;const f=this.str;let i=this.getBits(3);if(i&1&&(this.eof=!0),i>>=1,i===0){let M;if((M=f.getByte())===-1)throw new k.FormatError("Bad block header in flate stream");let _=M;if((M=f.getByte())===-1)throw new k.FormatError("Bad block header in flate stream");if(_|=M<<8,(M=f.getByte())===-1)throw new k.FormatError("Bad block header in flate stream");let H=M;if((M=f.getByte())===-1)throw new k.FormatError("Bad block header in flate stream");if(H|=M<<8,H!==(~_&65535)&&(_!==0||H!==0))throw new k.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;const A=this.bufferLength,E=A+_;if(T=this.ensureBuffer(E),this.bufferLength=E,_===0)f.peekByte()===-1&&(this.eof=!0);else{const l=f.getBytes(_);T.set(l,A),l.length<_&&(this.eof=!0)}return}let S,w;if(i===1)S=o,w=$;else if(i===2){const M=this.getBits(5)+257,_=this.getBits(5)+1,H=this.getBits(4)+4,A=new Uint8Array(R.length);let E;for(E=0;E<H;++E)A[R[E]]=this.getBits(3);const l=this.generateHuffmanTable(A);d=0,E=0;const g=M+_,N=new Uint8Array(g);let s,u,F;for(;E<g;){const U=this.getCode(l);if(U===16)s=2,u=3,F=d;else if(U===17)s=3,u=3,F=d=0;else if(U===18)s=7,u=11,F=d=0;else{N[E++]=d=U;continue}let O=this.getBits(s)+u;for(;O-- >0;)N[E++]=F}S=this.generateHuffmanTable(N.subarray(0,M)),w=this.generateHuffmanTable(N.subarray(M,g))}else throw new k.FormatError("Unknown block type in flate stream");T=this.buffer;let v=T?T.length:0,b=this.bufferLength;for(;;){let M=this.getCode(S);if(M<256){b+1>=v&&(T=this.ensureBuffer(b+1),v=T.length),T[b++]=M;continue}if(M===256){this.bufferLength=b;return}M-=257,M=e[M];let _=M>>16;_>0&&(_=this.getBits(_)),d=(M&65535)+_,M=this.getCode(w),M=t[M],_=M>>16,_>0&&(_=this.getBits(_));const H=(M&65535)+_;b+d>=v&&(T=this.ensureBuffer(b+d),v=T.length);for(let A=0;A<d;++A,++b)T[b]=T[b-H]}}}P.FlateStream=L},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Jbig2Stream=void 0;var n=ie(5),k=ie(18),R=ie(4),e=ie(24),t=ie(2);class o extends k.DecodeStream{constructor(L,I,T){super(I),this.stream=L,this.dict=L.dict,this.maybeLength=I,this.params=T}get bytes(){return(0,t.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(L){}readBlock(){if(this.eof)return;const L=new e.Jbig2Image,I=[];if(this.params instanceof R.Dict){const f=this.params.get("JBIG2Globals");if(f instanceof n.BaseStream){const i=f.getBytes();I.push({data:i,start:0,end:i.length})}}I.push({data:this.bytes,start:0,end:this.bytes.length});const T=L.parseChunks(I),d=T.length;for(let f=0;f<d;f++)T[f]^=255;this.buffer=T,this.bufferLength=d,this.eof=!0}}P.Jbig2Stream=o},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Jbig2Image=void 0;var n=ie(2),k=ie(3),R=ie(25),e=ie(21);class t extends n.BaseException{constructor(te){super(`JBIG2 error: ${te}`,"Jbig2Error")}}class o{getContexts(te){return te in this?this[te]:this[te]=new Int8Array(65536)}}class ${constructor(te,B,j){this.data=te,this.start=B,this.end=j}get decoder(){const te=new R.ArithmeticDecoder(this.data,this.start,this.end);return(0,n.shadow)(this,"decoder",te)}get contextCache(){const te=new o;return(0,n.shadow)(this,"contextCache",te)}}const L=2**31-1,I=-(2**31);function T(J,te,B){const j=J.getContexts(te);let Y=1;function W(z){let se=0;for(let ne=0;ne<z;ne++){const V=B.readBit(j,Y);Y=Y<256?Y<<1|V:(Y<<1|V)&511|256,se=se<<1|V}return se>>>0}const G=W(1),Q=W(1)?W(1)?W(1)?W(1)?W(1)?W(32)+4436:W(12)+340:W(8)+84:W(6)+20:W(4)+4:W(2);let ee;return G===0?ee=Q:Q>0&&(ee=-Q),ee>=I&&ee<=L?ee:null}function d(J,te,B){const j=J.getContexts("IAID");let Y=1;for(let W=0;W<B;W++){const G=te.readBit(j,Y);Y=Y<<1|G}return B<31?Y&(1<<B)-1:Y&2147483647}const f=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],i=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],S=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],w=[39717,1941,229,405],v=[32,8];function b(J,te,B){const j=B.decoder,Y=B.contextCache.getContexts("GB"),W=[];let G,Q,ee,z,se,ne,V;const ae=31735;for(Q=0;Q<te;Q++)for(se=W[Q]=new Uint8Array(J),ne=Q<1?se:W[Q-1],V=Q<2?se:W[Q-2],G=V[0]<<13|V[1]<<12|V[2]<<11|ne[0]<<7|ne[1]<<6|ne[2]<<5|ne[3]<<4,ee=0;ee<J;ee++)se[ee]=z=j.readBit(Y,G),G=(G&ae)<<1|(ee+3<J?V[ee+3]<<11:0)|(ee+4<J?ne[ee+4]<<4:0)|z;return W}function M(J,te,B,j,Y,W,G,Q){if(J){const Oe=new C(Q.data,Q.start,Q.end);return K(Oe,te,B,!1)}if(j===0&&!W&&!Y&&G.length===4&&G[0].x===3&&G[0].y===-1&&G[1].x===-3&&G[1].y===-1&&G[2].x===2&&G[2].y===-2&&G[3].x===-2&&G[3].y===-2)return b(te,B,Q);const ee=!!W,z=i[j].concat(G);z.sort(function(Oe,Re){return Oe.y-Re.y||Oe.x-Re.x});const se=z.length,ne=new Int8Array(se),V=new Int8Array(se),ae=[];let ce=0,de=0,Ae=0,ve=0,pe,ge;for(ge=0;ge<se;ge++)ne[ge]=z[ge].x,V[ge]=z[ge].y,de=Math.min(de,z[ge].x),Ae=Math.max(Ae,z[ge].x),ve=Math.min(ve,z[ge].y),ge<se-1&&z[ge].y===z[ge+1].y&&z[ge].x===z[ge+1].x-1?ce|=1<<se-1-ge:ae.push(ge);const fe=ae.length,xe=new Int8Array(fe),Te=new Int8Array(fe),Le=new Uint16Array(fe);for(pe=0;pe<fe;pe++)ge=ae[pe],xe[pe]=z[ge].x,Te[pe]=z[ge].y,Le[pe]=1<<se-1-ge;const Ie=-de,ue=-ve,me=te-Ae,De=w[j];let Fe=new Uint8Array(te);const je=[],Ue=Q.decoder,ht=Q.contextCache.getContexts("GB");let _e=0,st,Je,be,he=0,ye,Se;for(let Oe=0;Oe<B;Oe++){if(Y){const Re=Ue.readBit(ht,De);if(_e^=Re,_e){je.push(Fe);continue}}for(Fe=new Uint8Array(Fe),je.push(Fe),st=0;st<te;st++){if(ee&&W[Oe][st]){Fe[st]=0;continue}if(st>=Ie&&st<me&&Oe>=ue)for(he=he<<1&ce,ge=0;ge<fe;ge++)Je=Oe+Te[ge],be=st+xe[ge],ye=je[Je][be],ye&&(ye=Le[ge],he|=ye);else for(he=0,Se=se-1,ge=0;ge<se;ge++,Se--)be=st+ne[ge],be>=0&&be<te&&(Je=Oe+V[ge],Je>=0&&(ye=je[Je][be],ye&&(he|=ye<<Se)));const Re=Ue.readBit(ht,he);Fe[st]=Re}}return je}function _(J,te,B,j,Y,W,G,Q,ee){let z=S[B].coding;B===0&&(z=z.concat([Q[0]]));const se=z.length,ne=new Int32Array(se),V=new Int32Array(se);let ae;for(ae=0;ae<se;ae++)ne[ae]=z[ae].x,V[ae]=z[ae].y;let ce=S[B].reference;B===0&&(ce=ce.concat([Q[1]]));const de=ce.length,Ae=new Int32Array(de),ve=new Int32Array(de);for(ae=0;ae<de;ae++)Ae[ae]=ce[ae].x,ve[ae]=ce[ae].y;const pe=j[0].length,ge=j.length,fe=v[B],xe=[],Te=ee.decoder,Le=ee.contextCache.getContexts("GR");let Ie=0;for(let ue=0;ue<te;ue++){if(G){const De=Te.readBit(Le,fe);if(Ie^=De,Ie)throw new t("prediction is not supported")}const me=new Uint8Array(J);xe.push(me);for(let De=0;De<J;De++){let Fe,je,Ue=0;for(ae=0;ae<se;ae++)Fe=ue+V[ae],je=De+ne[ae],Fe<0||je<0||je>=J?Ue<<=1:Ue=Ue<<1|xe[Fe][je];for(ae=0;ae<de;ae++)Fe=ue+ve[ae]-W,je=De+Ae[ae]-Y,Fe<0||Fe>=ge||je<0||je>=pe?Ue<<=1:Ue=Ue<<1|j[Fe][je];const ht=Te.readBit(Le,Ue);me[De]=ht}}return xe}function H(J,te,B,j,Y,W,G,Q,ee,z,se,ne){if(J&&te)throw new t("symbol refinement with Huffman is not supported");const V=[];let ae=0,ce=(0,k.log2)(B.length+j);const de=se.decoder,Ae=se.contextCache;let ve,pe;for(J&&(ve=h(1),pe=[],ce=Math.max(ce,1));V.length<j;){const ue=J?W.tableDeltaHeight.decode(ne):T(Ae,"IADH",de);ae+=ue;let me=0,De=0;const Fe=J?pe.length:0;for(;;){const je=J?W.tableDeltaWidth.decode(ne):T(Ae,"IADW",de);if(je===null)break;me+=je,De+=me;let Ue;if(te){const ht=T(Ae,"IAAI",de);if(ht>1)Ue=A(J,te,me,ae,0,ht,1,B.concat(V),ce,0,0,1,0,W,ee,z,se,0,ne);else{const _e=d(Ae,de,ce),st=T(Ae,"IARDX",de),Je=T(Ae,"IARDY",de),be=_e<B.length?B[_e]:V[_e-B.length];Ue=_(me,ae,ee,be,st,Je,!1,z,se)}V.push(Ue)}else J?pe.push(me):(Ue=M(!1,me,ae,G,!1,null,Q,se),V.push(Ue))}if(J&&!te){const je=W.tableBitmapSize.decode(ne);ne.byteAlign();let Ue;if(je===0)Ue=re(ne,De,ae);else{const _e=ne.end,st=ne.position+je;ne.end=st,Ue=K(ne,De,ae,!1),ne.end=_e,ne.position=st}const ht=pe.length;if(Fe===ht-1)V.push(Ue);else{let _e,st,Je=0,be,he,ye;for(_e=Fe;_e<ht;_e++){for(he=pe[_e],be=Je+he,ye=[],st=0;st<ae;st++)ye.push(Ue[st].subarray(Je,be));V.push(ye),Je=be}}}}const ge=[],fe=[];let xe=!1,Te,Le;const Ie=B.length+j;for(;fe.length<Ie;){let ue=J?ve.decode(ne):T(Ae,"IAEX",de);for(;ue--;)fe.push(xe);xe=!xe}for(Te=0,Le=B.length;Te<Le;Te++)fe[Te]&&ge.push(B[Te]);for(let ue=0;ue<j;Te++,ue++)fe[Te]&&ge.push(V[ue]);return ge}function A(J,te,B,j,Y,W,G,Q,ee,z,se,ne,V,ae,ce,de,Ae,ve,pe){if(J&&te)throw new t("refinement with Huffman is not supported");const ge=[];let fe,xe;for(fe=0;fe<j;fe++){if(xe=new Uint8Array(B),Y)for(let me=0;me<B;me++)xe[me]=Y;ge.push(xe)}const Te=Ae.decoder,Le=Ae.contextCache;let Ie=J?-ae.tableDeltaT.decode(pe):-T(Le,"IADT",Te),ue=0;for(fe=0;fe<W;){const me=J?ae.tableDeltaT.decode(pe):T(Le,"IADT",Te);Ie+=me;const De=J?ae.tableFirstS.decode(pe):T(Le,"IAFS",Te);ue+=De;let Fe=ue;do{let je=0;G>1&&(je=J?pe.readBits(ve):T(Le,"IAIT",Te));const Ue=G*Ie+je,ht=J?ae.symbolIDTable.decode(pe):d(Le,Te,ee),_e=te&&(J?pe.readBit():T(Le,"IARI",Te));let st=Q[ht],Je=st[0].length,be=st.length;if(_e){const Ye=T(Le,"IARDW",Te),Ge=T(Le,"IARDH",Te),ze=T(Le,"IARDX",Te),Qe=T(Le,"IARDY",Te);Je+=Ye,be+=Ge,st=_(Je,be,ce,st,(Ye>>1)+ze,(Ge>>1)+Qe,!1,de,Ae)}const he=Ue-(ne&1?0:be-1),ye=Fe-(ne&2?Je-1:0);let Se,Oe,Re;if(z){for(Se=0;Se<be;Se++){if(xe=ge[ye+Se],!xe)continue;Re=st[Se];const Ye=Math.min(B-he,Je);switch(V){case 0:for(Oe=0;Oe<Ye;Oe++)xe[he+Oe]|=Re[Oe];break;case 2:for(Oe=0;Oe<Ye;Oe++)xe[he+Oe]^=Re[Oe];break;default:throw new t(`operator ${V} is not supported`)}}Fe+=be-1}else{for(Oe=0;Oe<be;Oe++)if(xe=ge[he+Oe],!!xe)switch(Re=st[Oe],V){case 0:for(Se=0;Se<Je;Se++)xe[ye+Se]|=Re[Se];break;case 2:for(Se=0;Se<Je;Se++)xe[ye+Se]^=Re[Se];break;default:throw new t(`operator ${V} is not supported`)}Fe+=Je-1}fe++;const Ne=J?ae.tableDeltaS.decode(pe):T(Le,"IADS",Te);if(Ne===null)break;Fe+=Ne+se}while(!0)}return ge}function E(J,te,B,j,Y,W){const G=[];J||(G.push({x:-te,y:0}),Y===0&&G.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const Q=(j+1)*te,ee=M(J,Q,B,Y,!1,null,G,W),z=[];for(let se=0;se<=j;se++){const ne=[],V=te*se,ae=V+te;for(let ce=0;ce<B;ce++)ne.push(ee[ce].subarray(V,ae));z.push(ne)}return z}function l(J,te,B,j,Y,W,G,Q,ee,z,se,ne,V,ae,ce){if(G)throw new t("skip is not supported");if(Q!==0)throw new t(`operator "${Q}" is not supported in halftone region`);const Ae=[];let ve,pe,ge;for(ve=0;ve<Y;ve++){if(ge=new Uint8Array(j),W)for(pe=0;pe<j;pe++)ge[pe]=W;Ae.push(ge)}const fe=te.length,xe=te[0],Te=xe[0].length,Le=xe.length,Ie=(0,k.log2)(fe),ue=[];J||(ue.push({x:B<=1?3:2,y:-1}),B===0&&ue.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const me=[];let De,Fe;for(J&&(De=new C(ce.data,ce.start,ce.end)),ve=Ie-1;ve>=0;ve--)J?Fe=K(De,ee,z,!0):Fe=M(!1,ee,z,B,!1,null,ue,ce),me[ve]=Fe;let je,Ue,ht,_e,st,Je,be,he,ye;for(je=0;je<z;je++)for(Ue=0;Ue<ee;Ue++){for(ht=0,_e=0,pe=Ie-1;pe>=0;pe--)ht^=me[pe][je][Ue],_e|=ht<<pe;if(st=te[_e],Je=se+je*ae+Ue*V>>8,be=ne+je*V-Ue*ae>>8,Je>=0&&Je+Te<=j&&be>=0&&be+Le<=Y)for(ve=0;ve<Le;ve++)for(ye=Ae[be+ve],he=st[ve],pe=0;pe<Te;pe++)ye[Je+pe]|=he[pe];else{let Se,Oe;for(ve=0;ve<Le;ve++)if(Oe=be+ve,!(Oe<0||Oe>=Y))for(ye=Ae[Oe],he=st[ve],pe=0;pe<Te;pe++)Se=Je+pe,Se>=0&&Se<j&&(ye[Se]|=he[pe])}}return Ae}function g(J,te){const B={};B.number=(0,k.readUint32)(J,te);const j=J[te+4],Y=j&63;if(!f[Y])throw new t("invalid segment type: "+Y);B.type=Y,B.typeName=f[Y],B.deferredNonRetain=!!(j&128);const W=!!(j&64),G=J[te+5];let Q=G>>5&7;const ee=[G&31];let z=te+6;if(G===7){Q=(0,k.readUint32)(J,z-1)&536870911,z+=3;let ce=Q+7>>3;for(ee[0]=J[z++];--ce>0;)ee.push(J[z++])}else if(G===5||G===6)throw new t("invalid referred-to flags");B.retainBits=ee;let se=4;B.number<=256?se=1:B.number<=65536&&(se=2);const ne=[];let V,ae;for(V=0;V<Q;V++){let ce;se===1?ce=J[z]:se===2?ce=(0,k.readUint16)(J,z):ce=(0,k.readUint32)(J,z),ne.push(ce),z+=se}if(B.referredTo=ne,W?(B.pageAssociation=(0,k.readUint32)(J,z),z+=4):B.pageAssociation=J[z++],B.length=(0,k.readUint32)(J,z),z+=4,B.length===4294967295)if(Y===38){const ce=s(J,z),Ae=!!(J[z+u]&1),ve=6,pe=new Uint8Array(ve);for(Ae||(pe[0]=255,pe[1]=172),pe[2]=ce.height>>>24&255,pe[3]=ce.height>>16&255,pe[4]=ce.height>>8&255,pe[5]=ce.height&255,V=z,ae=J.length;V<ae;V++){let ge=0;for(;ge<ve&&pe[ge]===J[V+ge];)ge++;if(ge===ve){B.length=V+ve;break}}if(B.length===4294967295)throw new t("segment end was not found")}else throw new t("invalid unknown segment length");return B.headerEnd=z,B}function N(J,te,B,j){const Y=[];let W=B;for(;W<j;){const G=g(te,W);W=G.headerEnd;const Q={header:G,data:te};if(J.randomAccess||(Q.start=W,W+=G.length,Q.end=W),Y.push(Q),G.type===51)break}if(J.randomAccess)for(let G=0,Q=Y.length;G<Q;G++)Y[G].start=W,W+=Y[G].header.length,Y[G].end=W;return Y}function s(J,te){return{width:(0,k.readUint32)(J,te),height:(0,k.readUint32)(J,te+4),x:(0,k.readUint32)(J,te+8),y:(0,k.readUint32)(J,te+12),combinationOperator:J[te+16]&7}}const u=17;function F(J,te){const B=J.header,j=J.data,Y=J.end;let W=J.start,G,Q,ee,z;switch(B.type){case 0:const ne={},V=(0,k.readUint16)(j,W);if(ne.huffman=!!(V&1),ne.refinement=!!(V&2),ne.huffmanDHSelector=V>>2&3,ne.huffmanDWSelector=V>>4&3,ne.bitmapSizeSelector=V>>6&1,ne.aggregationInstancesSelector=V>>7&1,ne.bitmapCodingContextUsed=!!(V&256),ne.bitmapCodingContextRetained=!!(V&512),ne.template=V>>10&3,ne.refinementTemplate=V>>12&1,W+=2,!ne.huffman){for(z=ne.template===0?4:1,Q=[],ee=0;ee<z;ee++)Q.push({x:(0,k.readInt8)(j,W),y:(0,k.readInt8)(j,W+1)}),W+=2;ne.at=Q}if(ne.refinement&&!ne.refinementTemplate){for(Q=[],ee=0;ee<2;ee++)Q.push({x:(0,k.readInt8)(j,W),y:(0,k.readInt8)(j,W+1)}),W+=2;ne.refinementAt=Q}ne.numberOfExportedSymbols=(0,k.readUint32)(j,W),W+=4,ne.numberOfNewSymbols=(0,k.readUint32)(j,W),W+=4,G=[ne,B.number,B.referredTo,j,W,Y];break;case 6:case 7:const ae={};ae.info=s(j,W),W+=u;const ce=(0,k.readUint16)(j,W);if(W+=2,ae.huffman=!!(ce&1),ae.refinement=!!(ce&2),ae.logStripSize=ce>>2&3,ae.stripSize=1<<ae.logStripSize,ae.referenceCorner=ce>>4&3,ae.transposed=!!(ce&64),ae.combinationOperator=ce>>7&3,ae.defaultPixelValue=ce>>9&1,ae.dsOffset=ce<<17>>27,ae.refinementTemplate=ce>>15&1,ae.huffman){const Le=(0,k.readUint16)(j,W);W+=2,ae.huffmanFS=Le&3,ae.huffmanDS=Le>>2&3,ae.huffmanDT=Le>>4&3,ae.huffmanRefinementDW=Le>>6&3,ae.huffmanRefinementDH=Le>>8&3,ae.huffmanRefinementDX=Le>>10&3,ae.huffmanRefinementDY=Le>>12&3,ae.huffmanRefinementSizeSelector=!!(Le&16384)}if(ae.refinement&&!ae.refinementTemplate){for(Q=[],ee=0;ee<2;ee++)Q.push({x:(0,k.readInt8)(j,W),y:(0,k.readInt8)(j,W+1)}),W+=2;ae.refinementAt=Q}ae.numberOfSymbolInstances=(0,k.readUint32)(j,W),W+=4,G=[ae,B.referredTo,j,W,Y];break;case 16:const de={},Ae=j[W++];de.mmr=!!(Ae&1),de.template=Ae>>1&3,de.patternWidth=j[W++],de.patternHeight=j[W++],de.maxPatternIndex=(0,k.readUint32)(j,W),W+=4,G=[de,B.number,j,W,Y];break;case 22:case 23:const ve={};ve.info=s(j,W),W+=u;const pe=j[W++];ve.mmr=!!(pe&1),ve.template=pe>>1&3,ve.enableSkip=!!(pe&8),ve.combinationOperator=pe>>4&7,ve.defaultPixelValue=pe>>7&1,ve.gridWidth=(0,k.readUint32)(j,W),W+=4,ve.gridHeight=(0,k.readUint32)(j,W),W+=4,ve.gridOffsetX=(0,k.readUint32)(j,W)&4294967295,W+=4,ve.gridOffsetY=(0,k.readUint32)(j,W)&4294967295,W+=4,ve.gridVectorX=(0,k.readUint16)(j,W),W+=2,ve.gridVectorY=(0,k.readUint16)(j,W),W+=2,G=[ve,B.referredTo,j,W,Y];break;case 38:case 39:const ge={};ge.info=s(j,W),W+=u;const fe=j[W++];if(ge.mmr=!!(fe&1),ge.template=fe>>1&3,ge.prediction=!!(fe&8),!ge.mmr){for(z=ge.template===0?4:1,Q=[],ee=0;ee<z;ee++)Q.push({x:(0,k.readInt8)(j,W),y:(0,k.readInt8)(j,W+1)}),W+=2;ge.at=Q}G=[ge,j,W,Y];break;case 48:const xe={width:(0,k.readUint32)(j,W),height:(0,k.readUint32)(j,W+4),resolutionX:(0,k.readUint32)(j,W+8),resolutionY:(0,k.readUint32)(j,W+12)};xe.height===4294967295&&delete xe.height;const Te=j[W+16];(0,k.readUint16)(j,W+17),xe.lossless=!!(Te&1),xe.refinement=!!(Te&2),xe.defaultPixelValue=Te>>2&1,xe.combinationOperator=Te>>3&3,xe.requiresBuffer=!!(Te&32),xe.combinationOperatorOverride=!!(Te&64),G=[xe];break;case 49:break;case 50:break;case 51:break;case 53:G=[B.number,j,W,Y];break;case 62:break;default:throw new t(`segment type ${B.typeName}(${B.type}) is not implemented`)}const se="on"+B.typeName;se in te&&te[se].apply(te,G)}function U(J,te){for(let B=0,j=J.length;B<j;B++)F(J[B],te)}function O(J){const te=new m;for(let B=0,j=J.length;B<j;B++){const Y=J[B],W=N({},Y.data,Y.start,Y.end);U(W,te)}return te.buffer}class m{onPageInformation(te){this.currentPageInfo=te;const B=te.width+7>>3,j=new Uint8ClampedArray(B*te.height);te.defaultPixelValue&&j.fill(255),this.buffer=j}drawBitmap(te,B){const j=this.currentPageInfo,Y=te.width,W=te.height,G=j.width+7>>3,Q=j.combinationOperatorOverride?te.combinationOperator:j.combinationOperator,ee=this.buffer,z=128>>(te.x&7);let se=te.y*G+(te.x>>3),ne,V,ae,ce;switch(Q){case 0:for(ne=0;ne<W;ne++){for(ae=z,ce=se,V=0;V<Y;V++)B[ne][V]&&(ee[ce]|=ae),ae>>=1,ae||(ae=128,ce++);se+=G}break;case 2:for(ne=0;ne<W;ne++){for(ae=z,ce=se,V=0;V<Y;V++)B[ne][V]&&(ee[ce]^=ae),ae>>=1,ae||(ae=128,ce++);se+=G}break;default:throw new t(`operator ${Q} is not supported`)}}onImmediateGenericRegion(te,B,j,Y){const W=te.info,G=new $(B,j,Y),Q=M(te.mmr,W.width,W.height,te.template,te.prediction,null,te.at,G);this.drawBitmap(W,Q)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(te,B,j,Y,W,G){let Q,ee;te.huffman&&(Q=q(te,j,this.customTables),ee=new C(Y,W,G));let z=this.symbols;z||(this.symbols=z={});const se=[];for(const V of j){const ae=z[V];ae&&se.push(...ae)}const ne=new $(Y,W,G);z[B]=H(te.huffman,te.refinement,se,te.numberOfNewSymbols,te.numberOfExportedSymbols,Q,te.template,te.at,te.refinementTemplate,te.refinementAt,ne,ee)}onImmediateTextRegion(te,B,j,Y,W){const G=te.info;let Q,ee;const z=this.symbols,se=[];for(const ce of B){const de=z[ce];de&&se.push(...de)}const ne=(0,k.log2)(se.length);te.huffman&&(ee=new C(j,Y,W),Q=X(te,B,this.customTables,se.length,ee));const V=new $(j,Y,W),ae=A(te.huffman,te.refinement,G.width,G.height,te.defaultPixelValue,te.numberOfSymbolInstances,te.stripSize,se,ne,te.transposed,te.dsOffset,te.referenceCorner,te.combinationOperator,Q,te.refinementTemplate,te.refinementAt,V,te.logStripSize,ee);this.drawBitmap(G,ae)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(te,B,j,Y,W){let G=this.patterns;G||(this.patterns=G={});const Q=new $(j,Y,W);G[B]=E(te.mmr,te.patternWidth,te.patternHeight,te.maxPatternIndex,te.template,Q)}onImmediateHalftoneRegion(te,B,j,Y,W){const G=this.patterns[B[0]],Q=te.info,ee=new $(j,Y,W),z=l(te.mmr,G,te.template,Q.width,Q.height,te.defaultPixelValue,te.enableSkip,te.combinationOperator,te.gridWidth,te.gridHeight,te.gridOffsetX,te.gridOffsetY,te.gridVectorX,te.gridVectorY,ee);this.drawBitmap(Q,z)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(te,B,j,Y){let W=this.customTables;W||(this.customTables=W={}),W[te]=p(B,j,Y)}}class x{constructor(te){te.length===2?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=te[0],this.rangeLength=0,this.prefixCode=te[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=te[0],this.prefixLength=te[1],this.rangeLength=te[2],this.prefixCode=te[3],this.isLowerRange=te[4]==="lower")}}class y{constructor(te){this.children=[],te?(this.isLeaf=!0,this.rangeLength=te.rangeLength,this.rangeLow=te.rangeLow,this.isLowerRange=te.isLowerRange,this.isOOB=te.isOOB):this.isLeaf=!1}buildTree(te,B){const j=te.prefixCode>>B&1;if(B<=0)this.children[j]=new y(te);else{let Y=this.children[j];Y||(this.children[j]=Y=new y(null)),Y.buildTree(te,B-1)}}decodeNode(te){if(this.isLeaf){if(this.isOOB)return null;const j=te.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-j:j)}const B=this.children[te.readBit()];if(!B)throw new t("invalid Huffman data");return B.decodeNode(te)}}class r{constructor(te,B){B||this.assignPrefixCodes(te),this.rootNode=new y(null);for(let j=0,Y=te.length;j<Y;j++){const W=te[j];W.prefixLength>0&&this.rootNode.buildTree(W,W.prefixLength-1)}}decode(te){return this.rootNode.decodeNode(te)}assignPrefixCodes(te){const B=te.length;let j=0;for(let se=0;se<B;se++)j=Math.max(j,te[se].prefixLength);const Y=new Uint32Array(j+1);for(let se=0;se<B;se++)Y[te[se].prefixLength]++;let W=1,G=0,Q,ee,z;for(Y[0]=0;W<=j;){for(G=G+Y[W-1]<<1,Q=G,ee=0;ee<B;)z=te[ee],z.prefixLength===W&&(z.prefixCode=Q,Q++),ee++;W++}}}function p(J,te,B){const j=J[te],Y=(0,k.readUint32)(J,te+1)&4294967295,W=(0,k.readUint32)(J,te+5)&4294967295,G=new C(J,te+9,B),Q=(j>>1&7)+1,ee=(j>>4&7)+1,z=[];let se,ne,V=Y;do se=G.readBits(Q),ne=G.readBits(ee),z.push(new x([V,se,ne,0])),V+=1<<ne;while(V<W);return se=G.readBits(Q),z.push(new x([Y-1,se,32,0,"lower"])),se=G.readBits(Q),z.push(new x([W,se,32,0])),j&1&&(se=G.readBits(Q),z.push(new x([se,0]))),new r(z,!1)}const c={};function h(J){let te=c[J];if(te)return te;let B;switch(J){case 1:B=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:B=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:B=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:B=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:B=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:B=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:B=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:B=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:B=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:B=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:B=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:B=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:B=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:B=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:B=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new t(`standard table B.${J} does not exist`)}for(let j=0,Y=B.length;j<Y;j++)B[j]=new x(B[j]);return te=new r(B,!0),c[J]=te,te}class C{constructor(te,B,j){this.data=te,this.start=B,this.end=j,this.position=B,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new t("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}const te=this.currentByte>>this.shift&1;return this.shift--,te}readBits(te){let B=0,j;for(j=te-1;j>=0;j--)B|=this.readBit()<<j;return B}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function D(J,te,B){let j=0;for(let Y=0,W=te.length;Y<W;Y++){const G=B[te[Y]];if(G){if(J===j)return G;j++}}throw new t("can't find custom Huffman table")}function X(J,te,B,j,Y){const W=[];for(let V=0;V<=34;V++){const ae=Y.readBits(4);W.push(new x([V,ae,0,0]))}const G=new r(W,!1);W.length=0;for(let V=0;V<j;){const ae=G.decode(Y);if(ae>=32){let ce,de,Ae;switch(ae){case 32:if(V===0)throw new t("no previous value in symbol ID table");de=Y.readBits(2)+3,ce=W[V-1].prefixLength;break;case 33:de=Y.readBits(3)+3,ce=0;break;case 34:de=Y.readBits(7)+11,ce=0;break;default:throw new t("invalid code length in symbol ID table")}for(Ae=0;Ae<de;Ae++)W.push(new x([V,ce,0,0])),V++}else W.push(new x([V,ae,0,0])),V++}Y.byteAlign();const Q=new r(W,!1);let ee=0,z,se,ne;switch(J.huffmanFS){case 0:case 1:z=h(J.huffmanFS+6);break;case 3:z=D(ee,te,B),ee++;break;default:throw new t("invalid Huffman FS selector")}switch(J.huffmanDS){case 0:case 1:case 2:se=h(J.huffmanDS+8);break;case 3:se=D(ee,te,B),ee++;break;default:throw new t("invalid Huffman DS selector")}switch(J.huffmanDT){case 0:case 1:case 2:ne=h(J.huffmanDT+11);break;case 3:ne=D(ee,te,B),ee++;break;default:throw new t("invalid Huffman DT selector")}if(J.refinement)throw new t("refinement with Huffman is not supported");return{symbolIDTable:Q,tableFirstS:z,tableDeltaS:se,tableDeltaT:ne}}function q(J,te,B){let j=0,Y,W;switch(J.huffmanDHSelector){case 0:case 1:Y=h(J.huffmanDHSelector+4);break;case 3:Y=D(j,te,B),j++;break;default:throw new t("invalid Huffman DH selector")}switch(J.huffmanDWSelector){case 0:case 1:W=h(J.huffmanDWSelector+2);break;case 3:W=D(j,te,B),j++;break;default:throw new t("invalid Huffman DW selector")}let G,Q;return J.bitmapSizeSelector?(G=D(j,te,B),j++):G=h(1),J.aggregationInstancesSelector?Q=D(j,te,B):Q=h(1),{tableDeltaHeight:Y,tableDeltaWidth:W,tableBitmapSize:G,tableAggregateInstances:Q}}function re(J,te,B){const j=[];for(let Y=0;Y<B;Y++){const W=new Uint8Array(te);j.push(W);for(let G=0;G<te;G++)W[G]=J.readBit();J.byteAlign()}return j}function K(J,te,B,j){const Y={K:-1,Columns:te,Rows:B,BlackIs1:!0,EndOfBlock:j},W=new e.CCITTFaxDecoder(J,Y),G=[];let Q,ee=!1;for(let z=0;z<B;z++){const se=new Uint8Array(te);G.push(se);let ne=-1;for(let V=0;V<te;V++)ne<0&&(Q=W.readNextChar(),Q===-1&&(Q=0,ee=!0),ne=7),se[V]=Q>>ne&1,ne--}if(j&&!ee)for(let se=0;se<5&&W.readNextChar()!==-1;se++);return G}class oe{parseChunks(te){return O(te)}parse(te){throw new Error("Not implemented: Jbig2Image.parse")}}P.Jbig2Image=oe},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ArithmeticDecoder=void 0;const ie=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class n{constructor(R,e,t){this.data=R,this.bp=e,this.dataEnd=t,this.chigh=R[e],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}byteIn(){const R=this.data;let e=this.bp;R[e]===255?R[e+1]>143?(this.clow+=65280,this.ct=8):(e++,this.clow+=R[e]<<9,this.ct=7,this.bp=e):(e++,this.clow+=e<this.dataEnd?R[e]<<8:65280,this.ct=8,this.bp=e),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(R,e){let t=R[e]>>1,o=R[e]&1;const $=ie[t],L=$.qe;let I,T=this.a-L;if(this.chigh<L)T<L?(T=L,I=o,t=$.nmps):(T=L,I=1^o,$.switchFlag===1&&(o=I),t=$.nlps);else{if(this.chigh-=L,T&32768)return this.a=T,o;T<L?(I=1^o,$.switchFlag===1&&(o=I),t=$.nlps):(I=o,t=$.nmps)}do this.ct===0&&this.byteIn(),T<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(!(T&32768));return this.a=T,R[e]=t<<1|o,I}}P.ArithmeticDecoder=n},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.JpegStream=void 0;var n=ie(18),k=ie(4),R=ie(27),e=ie(2);class t extends n.DecodeStream{constructor($,L,I){let T;for(;(T=$.getByte())!==-1;)if(T===255){$.skip(-1);break}super(L),this.stream=$,this.dict=$.dict,this.maybeLength=L,this.params=I}get bytes(){return(0,e.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer($){}readBlock(){if(this.eof)return;const $={decodeTransform:void 0,colorTransform:void 0},L=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(L)){const d=this.dict.get("BPC","BitsPerComponent")||8,f=L.length,i=new Int32Array(f);let S=!1;const w=(1<<d)-1;for(let v=0;v<f;v+=2)i[v]=(L[v+1]-L[v])*256|0,i[v+1]=L[v]*w|0,(i[v]!==256||i[v+1]!==0)&&(S=!0);S&&($.decodeTransform=i)}if(this.params instanceof k.Dict){const d=this.params.get("ColorTransform");Number.isInteger(d)&&($.colorTransform=d)}const I=new R.JpegImage($);I.parse(this.bytes);const T=I.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=T,this.bufferLength=T.length,this.eof=!0}}P.JpegStream=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.JpegImage=void 0;var n=ie(2),k=ie(28),R=ie(3);class e extends n.BaseException{constructor(g){super(`JPEG error: ${g}`,"JpegError")}}class t extends n.BaseException{constructor(g,N){super(g,"DNLMarkerError"),this.scanLines=N}}class o extends n.BaseException{constructor(g){super(g,"EOIMarkerError")}}const $=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),L=4017,I=799,T=3406,d=2276,f=1567,i=3784,S=5793,w=2896;function v(l,g){let N=0,s,u,F=16;for(;F>0&&!l[F-1];)F--;const U=[{children:[],index:0}];let O=U[0],m;for(s=0;s<F;s++){for(u=0;u<l[s];u++){for(O=U.pop(),O.children[O.index]=g[N];O.index>0;)O=U.pop();for(O.index++,U.push(O);U.length<=s;)U.push(m={children:[],index:0}),O.children[O.index]=m.children,O=m;N++}s+1<F&&(U.push(m={children:[],index:0}),O.children[O.index]=m.children,O=m)}return U[0].children}function b(l,g,N){return 64*((l.blocksPerLine+1)*g+N)}function M(l,g,N,s,u,F,U,O,m,x=!1){const y=N.mcusPerLine,r=N.progressive,p=g;let c=0,h=0;function C(){if(h>0)return h--,c>>h&1;if(c=l[g++],c===255){const fe=l[g++];if(fe){if(fe===220&&x){g+=2;const xe=(0,R.readUint16)(l,g);if(g+=2,xe>0&&xe!==N.scanLines)throw new t("Found DNL marker (0xFFDC) while parsing scan data",xe)}else if(fe===217){if(x){const xe=W*(N.precision===8?8:0);if(xe>0&&Math.round(N.scanLines/xe)>=5)throw new t("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",xe)}throw new o("Found EOI marker (0xFFD9) while parsing scan data")}throw new e(`unexpected marker ${(c<<8|fe).toString(16)}`)}}return h=7,c>>>7}function D(fe){let xe=fe;for(;;){switch(xe=xe[C()],typeof xe){case"number":return xe;case"object":continue}throw new e("invalid huffman sequence")}}function X(fe){let xe=0;for(;fe>0;)xe=xe<<1|C(),fe--;return xe}function q(fe){if(fe===1)return C()===1?1:-1;const xe=X(fe);return xe>=1<<fe-1?xe:xe+(-1<<fe)+1}function re(fe,xe){const Te=D(fe.huffmanTableDC),Le=Te===0?0:q(Te);fe.blockData[xe]=fe.pred+=Le;let Ie=1;for(;Ie<64;){const ue=D(fe.huffmanTableAC),me=ue&15,De=ue>>4;if(me===0){if(De<15)break;Ie+=16;continue}Ie+=De;const Fe=$[Ie];fe.blockData[xe+Fe]=q(me),Ie++}}function K(fe,xe){const Te=D(fe.huffmanTableDC),Le=Te===0?0:q(Te)<<m;fe.blockData[xe]=fe.pred+=Le}function oe(fe,xe){fe.blockData[xe]|=C()<<m}let J=0;function te(fe,xe){if(J>0){J--;return}let Te=F;const Le=U;for(;Te<=Le;){const Ie=D(fe.huffmanTableAC),ue=Ie&15,me=Ie>>4;if(ue===0){if(me<15){J=X(me)+(1<<me)-1;break}Te+=16;continue}Te+=me;const De=$[Te];fe.blockData[xe+De]=q(ue)*(1<<m),Te++}}let B=0,j;function Y(fe,xe){let Te=F;const Le=U;let Ie=0,ue,me;for(;Te<=Le;){const De=xe+$[Te],Fe=fe.blockData[De]<0?-1:1;switch(B){case 0:if(me=D(fe.huffmanTableAC),ue=me&15,Ie=me>>4,ue===0)Ie<15?(J=X(Ie)+(1<<Ie),B=4):(Ie=16,B=1);else{if(ue!==1)throw new e("invalid ACn encoding");j=q(ue),B=Ie?2:3}continue;case 1:case 2:fe.blockData[De]?fe.blockData[De]+=Fe*(C()<<m):(Ie--,Ie===0&&(B=B===2?3:0));break;case 3:fe.blockData[De]?fe.blockData[De]+=Fe*(C()<<m):(fe.blockData[De]=j<<m,B=0);break;case 4:fe.blockData[De]&&(fe.blockData[De]+=Fe*(C()<<m));break}Te++}B===4&&(J--,J===0&&(B=0))}let W=0;function G(fe,xe,Te,Le,Ie){const ue=Te/y|0,me=Te%y;W=ue*fe.v+Le;const De=me*fe.h+Ie,Fe=b(fe,W,De);xe(fe,Fe)}function Q(fe,xe,Te){W=Te/fe.blocksPerLine|0;const Le=Te%fe.blocksPerLine,Ie=b(fe,W,Le);xe(fe,Ie)}const ee=s.length;let z,se,ne,V,ae,ce;r?F===0?ce=O===0?K:oe:ce=O===0?te:Y:ce=re;let de=0,Ae;const ve=ee===1?s[0].blocksPerLine*s[0].blocksPerColumn:y*N.mcusPerColumn;let pe,ge;for(;de<=ve;){const fe=u?Math.min(ve-de,u):ve;if(fe>0){for(se=0;se<ee;se++)s[se].pred=0;if(J=0,ee===1)for(z=s[0],ae=0;ae<fe;ae++)Q(z,ce,de),de++;else for(ae=0;ae<fe;ae++){for(se=0;se<ee;se++)for(z=s[se],pe=z.h,ge=z.v,ne=0;ne<ge;ne++)for(V=0;V<pe;V++)G(z,ce,de,ne,V);de++}}if(h=0,Ae=A(l,g),!Ae)break;if(Ae.invalid){const xe=fe>0?"unexpected":"excessive";(0,n.warn)(`decodeScan - ${xe} MCU data, current marker is: ${Ae.invalid}`),g=Ae.offset}if(Ae.marker>=65488&&Ae.marker<=65495)g+=2;else break}return g-p}function _(l,g,N){const s=l.quantizationTable,u=l.blockData;let F,U,O,m,x,y,r,p,c,h,C,D,X,q,re,K,oe;if(!s)throw new e("missing required Quantization Table.");for(let J=0;J<64;J+=8){if(c=u[g+J],h=u[g+J+1],C=u[g+J+2],D=u[g+J+3],X=u[g+J+4],q=u[g+J+5],re=u[g+J+6],K=u[g+J+7],c*=s[J],!(h|C|D|X|q|re|K)){oe=S*c+512>>10,N[J]=oe,N[J+1]=oe,N[J+2]=oe,N[J+3]=oe,N[J+4]=oe,N[J+5]=oe,N[J+6]=oe,N[J+7]=oe;continue}h*=s[J+1],C*=s[J+2],D*=s[J+3],X*=s[J+4],q*=s[J+5],re*=s[J+6],K*=s[J+7],F=S*c+128>>8,U=S*X+128>>8,O=C,m=re,x=w*(h-K)+128>>8,p=w*(h+K)+128>>8,y=D<<4,r=q<<4,F=F+U+1>>1,U=F-U,oe=O*i+m*f+128>>8,O=O*f-m*i+128>>8,m=oe,x=x+r+1>>1,r=x-r,p=p+y+1>>1,y=p-y,F=F+m+1>>1,m=F-m,U=U+O+1>>1,O=U-O,oe=x*d+p*T+2048>>12,x=x*T-p*d+2048>>12,p=oe,oe=y*I+r*L+2048>>12,y=y*L-r*I+2048>>12,r=oe,N[J]=F+p,N[J+7]=F-p,N[J+1]=U+r,N[J+6]=U-r,N[J+2]=O+y,N[J+5]=O-y,N[J+3]=m+x,N[J+4]=m-x}for(let J=0;J<8;++J){if(c=N[J],h=N[J+8],C=N[J+16],D=N[J+24],X=N[J+32],q=N[J+40],re=N[J+48],K=N[J+56],!(h|C|D|X|q|re|K)){oe=S*c+8192>>14,oe<-2040?oe=0:oe>=2024?oe=255:oe=oe+2056>>4,u[g+J]=oe,u[g+J+8]=oe,u[g+J+16]=oe,u[g+J+24]=oe,u[g+J+32]=oe,u[g+J+40]=oe,u[g+J+48]=oe,u[g+J+56]=oe;continue}F=S*c+2048>>12,U=S*X+2048>>12,O=C,m=re,x=w*(h-K)+2048>>12,p=w*(h+K)+2048>>12,y=D,r=q,F=(F+U+1>>1)+4112,U=F-U,oe=O*i+m*f+2048>>12,O=O*f-m*i+2048>>12,m=oe,x=x+r+1>>1,r=x-r,p=p+y+1>>1,y=p-y,F=F+m+1>>1,m=F-m,U=U+O+1>>1,O=U-O,oe=x*d+p*T+2048>>12,x=x*T-p*d+2048>>12,p=oe,oe=y*I+r*L+2048>>12,y=y*L-r*I+2048>>12,r=oe,c=F+p,K=F-p,h=U+r,re=U-r,C=O+y,q=O-y,D=m+x,X=m-x,c<16?c=0:c>=4080?c=255:c>>=4,h<16?h=0:h>=4080?h=255:h>>=4,C<16?C=0:C>=4080?C=255:C>>=4,D<16?D=0:D>=4080?D=255:D>>=4,X<16?X=0:X>=4080?X=255:X>>=4,q<16?q=0:q>=4080?q=255:q>>=4,re<16?re=0:re>=4080?re=255:re>>=4,K<16?K=0:K>=4080?K=255:K>>=4,u[g+J]=c,u[g+J+8]=h,u[g+J+16]=C,u[g+J+24]=D,u[g+J+32]=X,u[g+J+40]=q,u[g+J+48]=re,u[g+J+56]=K}}function H(l,g){const N=g.blocksPerLine,s=g.blocksPerColumn,u=new Int16Array(64);for(let F=0;F<s;F++)for(let U=0;U<N;U++){const O=b(g,F,U);_(g,O,u)}return g.blockData}function A(l,g,N=g){const s=l.length-1;let u=N<g?N:g;if(g>=s)return null;const F=(0,R.readUint16)(l,g);if(F>=65472&&F<=65534)return{invalid:null,marker:F,offset:g};let U=(0,R.readUint16)(l,u);for(;!(U>=65472&&U<=65534);){if(++u>=s)return null;U=(0,R.readUint16)(l,u)}return{invalid:F.toString(16),marker:U,offset:u}}class E{constructor({decodeTransform:g=null,colorTransform:N=-1}={}){this._decodeTransform=g,this._colorTransform=N}parse(g,{dnlScanLines:N=null}={}){function s(){const C=(0,R.readUint16)(g,F);F+=2;let D=F+C-2;const X=A(g,D,F);X!=null&&X.invalid&&((0,n.warn)("readDataBlock - incorrect length, current marker is: "+X.invalid),D=X.offset);const q=g.subarray(F,D);return F+=q.length,q}function u(C){const D=Math.ceil(C.samplesPerLine/8/C.maxH),X=Math.ceil(C.scanLines/8/C.maxV);for(const q of C.components){const re=Math.ceil(Math.ceil(C.samplesPerLine/8)*q.h/C.maxH),K=Math.ceil(Math.ceil(C.scanLines/8)*q.v/C.maxV),oe=D*q.h,te=64*(X*q.v)*(oe+1);q.blockData=new Int16Array(te),q.blocksPerLine=re,q.blocksPerColumn=K}C.mcusPerLine=D,C.mcusPerColumn=X}let F=0,U=null,O=null,m,x,y=0;const r=[],p=[],c=[];let h=(0,R.readUint16)(g,F);if(F+=2,h!==65496)throw new e("SOI not found");h=(0,R.readUint16)(g,F),F+=2;e:for(;h!==65497;){let C,D,X;switch(h){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const q=s();h===65504&&q[0]===74&&q[1]===70&&q[2]===73&&q[3]===70&&q[4]===0&&(U={version:{major:q[5],minor:q[6]},densityUnits:q[7],xDensity:q[8]<<8|q[9],yDensity:q[10]<<8|q[11],thumbWidth:q[12],thumbHeight:q[13],thumbData:q.subarray(14,14+3*q[12]*q[13])}),h===65518&&q[0]===65&&q[1]===100&&q[2]===111&&q[3]===98&&q[4]===101&&(O={version:q[5]<<8|q[6],flags0:q[7]<<8|q[8],flags1:q[9]<<8|q[10],transformCode:q[11]});break;case 65499:const re=(0,R.readUint16)(g,F);F+=2;const K=re+F-2;let oe;for(;F<K;){const V=g[F++],ae=new Uint16Array(64);if(V>>4)if(V>>4===1)for(D=0;D<64;D++)oe=$[D],ae[oe]=(0,R.readUint16)(g,F),F+=2;else throw new e("DQT - invalid table spec");else for(D=0;D<64;D++)oe=$[D],ae[oe]=g[F++];r[V&15]=ae}break;case 65472:case 65473:case 65474:if(m)throw new e("Only single frame JPEGs supported");F+=2,m={},m.extended=h===65473,m.progressive=h===65474,m.precision=g[F++];const J=(0,R.readUint16)(g,F);F+=2,m.scanLines=N||J,m.samplesPerLine=(0,R.readUint16)(g,F),F+=2,m.components=[],m.componentIds={};const te=g[F++];let B=0,j=0;for(C=0;C<te;C++){const V=g[F],ae=g[F+1]>>4,ce=g[F+1]&15;B<ae&&(B=ae),j<ce&&(j=ce);const de=g[F+2];X=m.components.push({h:ae,v:ce,quantizationId:de,quantizationTable:null}),m.componentIds[V]=X-1,F+=3}m.maxH=B,m.maxV=j,u(m);break;case 65476:const Y=(0,R.readUint16)(g,F);for(F+=2,C=2;C<Y;){const V=g[F++],ae=new Uint8Array(16);let ce=0;for(D=0;D<16;D++,F++)ce+=ae[D]=g[F];const de=new Uint8Array(ce);for(D=0;D<ce;D++,F++)de[D]=g[F];C+=17+ce,(V>>4?p:c)[V&15]=v(ae,de)}break;case 65501:F+=2,x=(0,R.readUint16)(g,F),F+=2;break;case 65498:const W=++y===1&&!N;F+=2;const G=g[F++],Q=[];for(C=0;C<G;C++){const V=g[F++],ae=m.componentIds[V],ce=m.components[ae];ce.index=V;const de=g[F++];ce.huffmanTableDC=c[de>>4],ce.huffmanTableAC=p[de&15],Q.push(ce)}const ee=g[F++],z=g[F++],se=g[F++];try{const V=M(g,F,m,Q,x,ee,z,se>>4,se&15,W);F+=V}catch(V){if(V instanceof t)return(0,n.warn)(`${V.message} -- attempting to re-parse the JPEG image.`),this.parse(g,{dnlScanLines:V.scanLines});if(V instanceof o){(0,n.warn)(`${V.message} -- ignoring the rest of the image data.`);break e}throw V}break;case 65500:F+=4;break;case 65535:g[F]!==255&&F--;break;default:const ne=A(g,F-2,F-3);if(ne!=null&&ne.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+ne.invalid),F=ne.offset;break}if(!ne||F>=g.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new e("JpegImage.parse - unknown marker: "+h.toString(16))}h=(0,R.readUint16)(g,F),F+=2}this.width=m.samplesPerLine,this.height=m.scanLines,this.jfif=U,this.adobe=O,this.components=[];for(const C of m.components){const D=r[C.quantizationId];D&&(C.quantizationTable=D),this.components.push({index:C.index,output:H(m,C),scaleX:C.h/m.maxH,scaleY:C.v/m.maxV,blocksPerLine:C.blocksPerLine,blocksPerColumn:C.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(g,N,s=!1){const u=this.width/g,F=this.height/N;let U,O,m,x,y,r,p,c,h,C,D=0,X;const q=this.components.length,re=g*N*q,K=new Uint8ClampedArray(re),oe=new Uint32Array(g),J=4294967288;let te;for(p=0;p<q;p++){if(U=this.components[p],O=U.scaleX*u,m=U.scaleY*F,D=p,X=U.output,x=U.blocksPerLine+1<<3,O!==te){for(y=0;y<g;y++)c=0|y*O,oe[y]=(c&J)<<3|c&7;te=O}for(r=0;r<N;r++)for(c=0|r*m,C=x*(c&J)|(c&7)<<3,y=0;y<g;y++)K[D]=X[C+oe[y]],D+=q}let B=this._decodeTransform;if(!s&&q===4&&!B&&(B=new Int32Array([-256,255,-256,255,-256,255,-256,255])),B)for(p=0;p<re;)for(c=0,h=0;c<q;c++,p++,h+=2)K[p]=(K[p]*B[h]>>8)+B[h+1];return K}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:this.numComponents===3?this._colorTransform===0?!1:!(this.components[0].index===82&&this.components[1].index===71&&this.components[2].index===66):this._colorTransform===1}_convertYccToRgb(g){let N,s,u;for(let F=0,U=g.length;F<U;F+=3)N=g[F],s=g[F+1],u=g[F+2],g[F]=N-179.456+1.402*u,g[F+1]=N+135.459-.344*s-.714*u,g[F+2]=N-226.816+1.772*s;return g}_convertYccToRgba(g,N){for(let s=0,u=0,F=g.length;s<F;s+=3,u+=4){const U=g[s],O=g[s+1],m=g[s+2];N[u]=U-179.456+1.402*m,N[u+1]=U+135.459-.344*O-.714*m,N[u+2]=U-226.816+1.772*O,N[u+3]=255}return N}_convertYcckToRgb(g){let N,s,u,F,U=0;for(let O=0,m=g.length;O<m;O+=4)N=g[O],s=g[O+1],u=g[O+2],F=g[O+3],g[U++]=-122.67195406894+s*(-660635669420364e-19*s+.000437130475926232*u-54080610064599e-18*N+.00048449797120281*F-.154362151871126)+u*(-.000957964378445773*u+.000817076911346625*N-.00477271405408747*F+1.53380253221734)+N*(.000961250184130688*N-.00266257332283933*F+.48357088451265)+F*(-.000336197177618394*F+.484791561490776),g[U++]=107.268039397724+s*(219927104525741e-19*s-.000640992018297945*u+.000659397001245577*N+.000426105652938837*F-.176491792462875)+u*(-.000778269941513683*u+.00130872261408275*N+.000770482631801132*F-.151051492775562)+N*(.00126935368114843*N-.00265090189010898*F+.25802910206845)+F*(-.000318913117588328*F-.213742400323665),g[U++]=-20.810012546947+s*(-.000570115196973677*s-263409051004589e-19*u+.0020741088115012*N-.00288260236853442*F+.814272968359295)+u*(-153496057440975e-19*u-.000132689043961446*N+.000560833691242812*F-.195152027534049)+N*(.00174418132927582*N-.00255243321439347*F+.116935020465145)+F*(-.000343531996510555*F+.24165260232407);return g.subarray(0,U)}_convertYcckToRgba(g){for(let N=0,s=g.length;N<s;N+=4){const u=g[N],F=g[N+1],U=g[N+2],O=g[N+3];g[N]=-122.67195406894+F*(-660635669420364e-19*F+.000437130475926232*U-54080610064599e-18*u+.00048449797120281*O-.154362151871126)+U*(-.000957964378445773*U+.000817076911346625*u-.00477271405408747*O+1.53380253221734)+u*(.000961250184130688*u-.00266257332283933*O+.48357088451265)+O*(-.000336197177618394*O+.484791561490776),g[N+1]=107.268039397724+F*(219927104525741e-19*F-.000640992018297945*U+.000659397001245577*u+.000426105652938837*O-.176491792462875)+U*(-.000778269941513683*U+.00130872261408275*u+.000770482631801132*O-.151051492775562)+u*(.00126935368114843*u-.00265090189010898*O+.25802910206845)+O*(-.000318913117588328*O-.213742400323665),g[N+2]=-20.810012546947+F*(-.000570115196973677*F-263409051004589e-19*U+.0020741088115012*u-.00288260236853442*O+.814272968359295)+U*(-153496057440975e-19*U-.000132689043961446*u+.000560833691242812*O-.195152027534049)+u*(.00174418132927582*u-.00255243321439347*O+.116935020465145)+O*(-.000343531996510555*O+.24165260232407),g[N+3]=255}return g}_convertYcckToCmyk(g){let N,s,u;for(let F=0,U=g.length;F<U;F+=4)N=g[F],s=g[F+1],u=g[F+2],g[F]=434.456-N-1.402*u,g[F+1]=119.541-N+.344*s+.714*u,g[F+2]=481.816-N-1.772*s;return g}_convertCmykToRgb(g){let N,s,u,F,U=0;for(let O=0,m=g.length;O<m;O+=4)N=g[O],s=g[O+1],u=g[O+2],F=g[O+3],g[U++]=255+N*(-6747147073602441e-20*N+.0008379262121013727*s+.0002894718188643294*u+.003264231057537806*F-1.1185611867203937)+s*(26374107616089405e-21*s-8626949158638572e-20*u-.0002748769067499491*F-.02155688794978967)+u*(-3878099212869363e-20*u-.0003267808279485286*F+.0686742238595345)-F*(.0003361971776183937*F+.7430659151342254),g[U++]=255+N*(.00013596372813588848*N+.000924537132573585*s+.00010567359618683593*u+.0004791864687436512*F-.3109689587515875)+s*(-.00023545346108370344*s+.0002702845253534714*u+.0020200308977307156*F-.7488052167015494)+u*(6834815998235662e-20*u+.00015168452363460973*F-.09751927774728933)-F*(.0003189131175883281*F+.7364883807733168),g[U++]=255+N*(13598650411385307e-21*N+.00012423956175490851*s+.0004751985097583589*u-36729317476630422e-22*F-.05562186980264034)+s*(.00016141380598724676*s+.0009692239130725186*u+.0007782692450036253*F-.44015232367526463)+u*(5068882914068769e-22*u+.0017778369011375071*F-.7591454649749609)-F*(.0003435319965105553*F+.7063770186160144);return g.subarray(0,U)}_convertCmykToRgba(g){for(let N=0,s=g.length;N<s;N+=4){const u=g[N],F=g[N+1],U=g[N+2],O=g[N+3];g[N]=255+u*(-6747147073602441e-20*u+.0008379262121013727*F+.0002894718188643294*U+.003264231057537806*O-1.1185611867203937)+F*(26374107616089405e-21*F-8626949158638572e-20*U-.0002748769067499491*O-.02155688794978967)+U*(-3878099212869363e-20*U-.0003267808279485286*O+.0686742238595345)-O*(.0003361971776183937*O+.7430659151342254),g[N+1]=255+u*(.00013596372813588848*u+.000924537132573585*F+.00010567359618683593*U+.0004791864687436512*O-.3109689587515875)+F*(-.00023545346108370344*F+.0002702845253534714*U+.0020200308977307156*O-.7488052167015494)+U*(6834815998235662e-20*U+.00015168452363460973*O-.09751927774728933)-O*(.0003189131175883281*O+.7364883807733168),g[N+2]=255+u*(13598650411385307e-21*u+.00012423956175490851*F+.0004751985097583589*U-36729317476630422e-22*O-.05562186980264034)+F*(.00016141380598724676*F+.0009692239130725186*U+.0007782692450036253*O-.44015232367526463)+U*(5068882914068769e-22*U+.0017778369011375071*O-.7591454649749609)-O*(.0003435319965105553*O+.7063770186160144),g[N+3]=255}return g}getData({width:g,height:N,forceRGBA:s=!1,forceRGB:u=!1,isSourcePDF:F=!1}){if(this.numComponents>4)throw new e("Unsupported color mode");const U=this._getLinearizedBlockData(g,N,F);if(this.numComponents===1&&(s||u)){const O=U.length*(s?4:3),m=new Uint8ClampedArray(O);let x=0;if(s)(0,k.grayToRGBA)(U,new Uint32Array(m.buffer));else for(const y of U)m[x++]=y,m[x++]=y,m[x++]=y;return m}else if(this.numComponents===3&&this._isColorConversionNeeded){if(s){const O=new Uint8ClampedArray(U.length/3*4);return this._convertYccToRgba(U,O)}return this._convertYccToRgb(U)}else if(this.numComponents===4){if(this._isColorConversionNeeded)return s?this._convertYcckToRgba(U):u?this._convertYcckToRgb(U):this._convertYcckToCmyk(U);if(s)return this._convertCmykToRgba(U);if(u)return this._convertCmykToRgb(U)}return U}}P.JpegImage=E},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.convertBlackAndWhiteToRGBA=R,P.convertToRGBA=k,P.grayToRGBA=t;var n=ie(2);function k(o){switch(o.kind){case n.ImageKind.GRAYSCALE_1BPP:return R(o);case n.ImageKind.RGB_24BPP:return e(o)}return null}function R({src:o,srcPos:$=0,dest:L,width:I,height:T,nonBlackColor:d=4294967295,inverseDecode:f=!1}){const i=n.FeatureTest.isLittleEndian?4278190080:255,[S,w]=f?[d,i]:[i,d],v=I>>3,b=I&7,M=o.length;L=new Uint32Array(L.buffer);let _=0;for(let H=0;H<T;H++){for(const E=$+v;$<E;$++){const l=$<M?o[$]:255;L[_++]=l&128?w:S,L[_++]=l&64?w:S,L[_++]=l&32?w:S,L[_++]=l&16?w:S,L[_++]=l&8?w:S,L[_++]=l&4?w:S,L[_++]=l&2?w:S,L[_++]=l&1?w:S}if(b===0)continue;const A=$<M?o[$++]:255;for(let E=0;E<b;E++)L[_++]=A&1<<7-E?w:S}return{srcPos:$,destPos:_}}function e({src:o,srcPos:$=0,dest:L,destPos:I=0,width:T,height:d}){let f=0;const i=o.length>>2,S=new Uint32Array(o.buffer,$,i);if(n.FeatureTest.isLittleEndian){for(;f<i-2;f+=3,I+=4){const w=S[f],v=S[f+1],b=S[f+2];L[I]=w|4278190080,L[I+1]=w>>>24|v<<8|4278190080,L[I+2]=v>>>16|b<<16|4278190080,L[I+3]=b>>>8|4278190080}for(let w=f*4,v=o.length;w<v;w+=3)L[I++]=o[w]|o[w+1]<<8|o[w+2]<<16|4278190080}else{for(;f<i-2;f+=3,I+=4){const w=S[f],v=S[f+1],b=S[f+2];L[I]=w|255,L[I+1]=w<<24|v>>>8|255,L[I+2]=v<<16|b>>>16|255,L[I+3]=b<<8|255}for(let w=f*4,v=o.length;w<v;w+=3)L[I++]=o[w]<<24|o[w+1]<<16|o[w+2]<<8|255}return{srcPos:$,destPos:I}}function t(o,$){if(n.FeatureTest.isLittleEndian)for(let L=0,I=o.length;L<I;L++)$[L]=o[L]*65793|4278190080;else for(let L=0,I=o.length;L<I;L++)$[L]=o[L]*16843008|255}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.JpxStream=void 0;var n=ie(18),k=ie(30),R=ie(2);class e extends n.DecodeStream{constructor(o,$,L){super($),this.stream=o,this.dict=o.dict,this.maybeLength=$,this.params=L}get bytes(){return(0,R.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(o){}readBlock(){if(this.eof)return;const o=new k.JpxImage;o.parse(this.bytes);const $=o.width,L=o.height,I=o.componentsCount,T=o.tiles.length;if(T===1)this.buffer=o.tiles[0].items;else{const d=new Uint8ClampedArray($*L*I);for(let f=0;f<T;f++){const i=o.tiles[f],S=i.width,w=i.height,v=i.left,b=i.top,M=i.items;let _=0,H=($*b+v)*I;const A=$*I,E=S*I;for(let l=0;l<w;l++){const g=M.subarray(_,_+E);d.set(g,H),_+=E,H+=A}}this.buffer=d}this.bufferLength=this.buffer.length,this.eof=!0}}P.JpxStream=e},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.JpxImage=void 0;var n=ie(2),k=ie(3),R=ie(25);class e extends n.BaseException{constructor(r){super(`JPX error: ${r}`,"JpxError")}}const t={LL:0,LH:1,HL:1,HH:2};class o{constructor(){this.failOnCorruptedImage=!1}parse(r){if((0,k.readUint16)(r,0)===65359){this.parseCodestream(r,0,r.length);return}const c=r.length;let h=0;for(;h<c;){let C=8,D=(0,k.readUint32)(r,h);const X=(0,k.readUint32)(r,h+4);if(h+=C,D===1&&(D=(0,k.readUint32)(r,h)*4294967296+(0,k.readUint32)(r,h+4),h+=8,C+=8),D===0&&(D=c-h+C),D<C)throw new e("Invalid box field size");const q=D-C;let re=!0;switch(X){case 1785737832:re=!1;break;case 1668246642:const K=r[h];if(K===1){const J=(0,k.readUint32)(r,h+3);switch(J){case 16:case 17:case 18:break;default:(0,n.warn)("Unknown colorspace "+J);break}}else K===2&&(0,n.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(r,h,h+q);break;case 1783636e3:(0,k.readUint32)(r,h)!==218793738&&(0,n.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:const oe=String.fromCharCode(X>>24&255,X>>16&255,X>>8&255,X&255);(0,n.warn)(`Unsupported header type ${X} (${oe}).`);break}re&&(h+=q)}}parseImageProperties(r){let p=r.getByte();for(;p>=0;){const c=p;if(p=r.getByte(),(c<<8|p)===65361){r.skip(4);const C=r.getInt32()>>>0,D=r.getInt32()>>>0,X=r.getInt32()>>>0,q=r.getInt32()>>>0;r.skip(16);const re=r.getUint16();this.width=C-X,this.height=D-q,this.componentsCount=re,this.bitsPerComponent=8;return}}throw new e("No size marker found in JPX stream")}parseCodestream(r,p,c){const h={};let C=!1;try{let D=p;for(;D+1<c;){const X=(0,k.readUint16)(r,D);D+=2;let q=0,re,K,oe,J,te,B;switch(X){case 65359:h.mainHeader=!0;break;case 65497:break;case 65361:q=(0,k.readUint16)(r,D);const j={};j.Xsiz=(0,k.readUint32)(r,D+4),j.Ysiz=(0,k.readUint32)(r,D+8),j.XOsiz=(0,k.readUint32)(r,D+12),j.YOsiz=(0,k.readUint32)(r,D+16),j.XTsiz=(0,k.readUint32)(r,D+20),j.YTsiz=(0,k.readUint32)(r,D+24),j.XTOsiz=(0,k.readUint32)(r,D+28),j.YTOsiz=(0,k.readUint32)(r,D+32);const Y=(0,k.readUint16)(r,D+36);j.Csiz=Y;const W=[];re=D+38;for(let ae=0;ae<Y;ae++){const ce={precision:(r[re]&127)+1,isSigned:!!(r[re]&128),XRsiz:r[re+1],YRsiz:r[re+2]};re+=3,$(ce,j),W.push(ce)}h.SIZ=j,h.components=W,L(h,W),h.QCC=[],h.COC=[];break;case 65372:q=(0,k.readUint16)(r,D);const G={};switch(re=D+2,K=r[re++],K&31){case 0:J=8,te=!0;break;case 1:J=16,te=!1;break;case 2:J=16,te=!0;break;default:throw new Error("Invalid SQcd value "+K)}for(G.noQuantization=J===8,G.scalarExpounded=te,G.guardBits=K>>5,oe=[];re<q+D;){const ae={};J===8?(ae.epsilon=r[re++]>>3,ae.mu=0):(ae.epsilon=r[re]>>3,ae.mu=(r[re]&7)<<8|r[re+1],re+=2),oe.push(ae)}G.SPqcds=oe,h.mainHeader?h.QCD=G:(h.currentTile.QCD=G,h.currentTile.QCC=[]);break;case 65373:q=(0,k.readUint16)(r,D);const Q={};re=D+2;let ee;switch(h.SIZ.Csiz<257?ee=r[re++]:(ee=(0,k.readUint16)(r,re),re+=2),K=r[re++],K&31){case 0:J=8,te=!0;break;case 1:J=16,te=!1;break;case 2:J=16,te=!0;break;default:throw new Error("Invalid SQcd value "+K)}for(Q.noQuantization=J===8,Q.scalarExpounded=te,Q.guardBits=K>>5,oe=[];re<q+D;){const ae={};J===8?(ae.epsilon=r[re++]>>3,ae.mu=0):(ae.epsilon=r[re]>>3,ae.mu=(r[re]&7)<<8|r[re+1],re+=2),oe.push(ae)}Q.SPqcds=oe,h.mainHeader?h.QCC[ee]=Q:h.currentTile.QCC[ee]=Q;break;case 65362:q=(0,k.readUint16)(r,D);const z={};re=D+2;const se=r[re++];z.entropyCoderWithCustomPrecincts=!!(se&1),z.sopMarkerUsed=!!(se&2),z.ephMarkerUsed=!!(se&4),z.progressionOrder=r[re++],z.layersCount=(0,k.readUint16)(r,re),re+=2,z.multipleComponentTransform=r[re++],z.decompositionLevelsCount=r[re++],z.xcb=(r[re++]&15)+2,z.ycb=(r[re++]&15)+2;const ne=r[re++];if(z.selectiveArithmeticCodingBypass=!!(ne&1),z.resetContextProbabilities=!!(ne&2),z.terminationOnEachCodingPass=!!(ne&4),z.verticallyStripe=!!(ne&8),z.predictableTermination=!!(ne&16),z.segmentationSymbolUsed=!!(ne&32),z.reversibleTransformation=r[re++],z.entropyCoderWithCustomPrecincts){const ae=[];for(;re<q+D;){const ce=r[re++];ae.push({PPx:ce&15,PPy:ce>>4})}z.precinctsSizes=ae}const V=[];z.selectiveArithmeticCodingBypass&&V.push("selectiveArithmeticCodingBypass"),z.terminationOnEachCodingPass&&V.push("terminationOnEachCodingPass"),z.verticallyStripe&&V.push("verticallyStripe"),z.predictableTermination&&V.push("predictableTermination"),V.length>0&&(C=!0,(0,n.warn)(`JPX: Unsupported COD options (${V.join(", ")}).`)),h.mainHeader?h.COD=z:(h.currentTile.COD=z,h.currentTile.COC=[]);break;case 65424:q=(0,k.readUint16)(r,D),B={},B.index=(0,k.readUint16)(r,D+2),B.length=(0,k.readUint32)(r,D+4),B.dataEnd=B.length+D-2,B.partIndex=r[D+8],B.partsCount=r[D+9],h.mainHeader=!1,B.partIndex===0&&(B.COD=h.COD,B.COC=h.COC.slice(0),B.QCD=h.QCD,B.QCC=h.QCC.slice(0)),h.currentTile=B;break;case 65427:B=h.currentTile,B.partIndex===0&&(N(h,B.index),H(h)),q=B.dataEnd-D,A(h,r,D,q);break;case 65363:(0,n.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:q=(0,k.readUint16)(r,D);break;default:throw new Error("Unknown codestream code: "+X.toString(16))}D+=q}}catch(D){if(C||this.failOnCorruptedImage)throw new e(D.message);(0,n.warn)(`JPX: Trying to recover from: "${D.message}".`)}this.tiles=g(h),this.width=h.SIZ.Xsiz-h.SIZ.XOsiz,this.height=h.SIZ.Ysiz-h.SIZ.YOsiz,this.componentsCount=h.SIZ.Csiz}}P.JpxImage=o;function $(y,r){y.x0=Math.ceil(r.XOsiz/y.XRsiz),y.x1=Math.ceil(r.Xsiz/y.XRsiz),y.y0=Math.ceil(r.YOsiz/y.YRsiz),y.y1=Math.ceil(r.Ysiz/y.YRsiz),y.width=y.x1-y.x0,y.height=y.y1-y.y0}function L(y,r){const p=y.SIZ,c=[];let h;const C=Math.ceil((p.Xsiz-p.XTOsiz)/p.XTsiz),D=Math.ceil((p.Ysiz-p.YTOsiz)/p.YTsiz);for(let q=0;q<D;q++)for(let re=0;re<C;re++)h={},h.tx0=Math.max(p.XTOsiz+re*p.XTsiz,p.XOsiz),h.ty0=Math.max(p.YTOsiz+q*p.YTsiz,p.YOsiz),h.tx1=Math.min(p.XTOsiz+(re+1)*p.XTsiz,p.Xsiz),h.ty1=Math.min(p.YTOsiz+(q+1)*p.YTsiz,p.Ysiz),h.width=h.tx1-h.tx0,h.height=h.ty1-h.ty0,h.components=[],c.push(h);y.tiles=c;const X=p.Csiz;for(let q=0,re=X;q<re;q++){const K=r[q];for(let oe=0,J=c.length;oe<J;oe++){const te={};h=c[oe],te.tcx0=Math.ceil(h.tx0/K.XRsiz),te.tcy0=Math.ceil(h.ty0/K.YRsiz),te.tcx1=Math.ceil(h.tx1/K.XRsiz),te.tcy1=Math.ceil(h.ty1/K.YRsiz),te.width=te.tcx1-te.tcx0,te.height=te.tcy1-te.tcy0,h.components[q]=te}}}function I(y,r,p){const c=r.codingStyleParameters,h={};return c.entropyCoderWithCustomPrecincts?(h.PPx=c.precinctsSizes[p].PPx,h.PPy=c.precinctsSizes[p].PPy):(h.PPx=15,h.PPy=15),h.xcb_=p>0?Math.min(c.xcb,h.PPx-1):Math.min(c.xcb,h.PPx),h.ycb_=p>0?Math.min(c.ycb,h.PPy-1):Math.min(c.ycb,h.PPy),h}function T(y,r,p){const c=1<<p.PPx,h=1<<p.PPy,C=r.resLevel===0,D=1<<p.PPx+(C?0:-1),X=1<<p.PPy+(C?0:-1),q=r.trx1>r.trx0?Math.ceil(r.trx1/c)-Math.floor(r.trx0/c):0,re=r.try1>r.try0?Math.ceil(r.try1/h)-Math.floor(r.try0/h):0,K=q*re;r.precinctParameters={precinctWidth:c,precinctHeight:h,numprecinctswide:q,numprecinctshigh:re,numprecincts:K,precinctWidthInSubband:D,precinctHeightInSubband:X}}function d(y,r,p){const c=p.xcb_,h=p.ycb_,C=1<<c,D=1<<h,X=r.tbx0>>c,q=r.tby0>>h,re=r.tbx1+C-1>>c,K=r.tby1+D-1>>h,oe=r.resolution.precinctParameters,J=[],te=[];let B,j,Y,W;for(j=q;j<K;j++)for(B=X;B<re;B++){Y={cbx:B,cby:j,tbx0:C*B,tby0:D*j,tbx1:C*(B+1),tby1:D*(j+1)},Y.tbx0_=Math.max(r.tbx0,Y.tbx0),Y.tby0_=Math.max(r.tby0,Y.tby0),Y.tbx1_=Math.min(r.tbx1,Y.tbx1),Y.tby1_=Math.min(r.tby1,Y.tby1);const G=Math.floor((Y.tbx0_-r.tbx0)/oe.precinctWidthInSubband),Q=Math.floor((Y.tby0_-r.tby0)/oe.precinctHeightInSubband);if(W=G+Q*oe.numprecinctswide,Y.precinctNumber=W,Y.subbandType=r.type,Y.Lblock=3,Y.tbx1_<=Y.tbx0_||Y.tby1_<=Y.tby0_)continue;J.push(Y);let ee=te[W];ee!==void 0?(B<ee.cbxMin?ee.cbxMin=B:B>ee.cbxMax&&(ee.cbxMax=B),j<ee.cbyMin?ee.cbxMin=j:j>ee.cbyMax&&(ee.cbyMax=j)):te[W]=ee={cbxMin:B,cbyMin:j,cbxMax:B,cbyMax:j},Y.precinct=ee}r.codeblockParameters={codeblockWidth:c,codeblockHeight:h,numcodeblockwide:re-X+1,numcodeblockhigh:K-q+1},r.codeblocks=J,r.precincts=te}function f(y,r,p){const c=[],h=y.subbands;for(let C=0,D=h.length;C<D;C++){const q=h[C].codeblocks;for(let re=0,K=q.length;re<K;re++){const oe=q[re];oe.precinctNumber===r&&c.push(oe)}}return{layerNumber:p,codeblocks:c}}function i(y){const r=y.SIZ,p=y.currentTile.index,c=y.tiles[p],h=c.codingStyleDefaultParameters.layersCount,C=r.Csiz;let D=0;for(let oe=0;oe<C;oe++)D=Math.max(D,c.components[oe].codingStyleParameters.decompositionLevelsCount);let X=0,q=0,re=0,K=0;this.nextPacket=function(){for(;X<h;X++){for(;q<=D;q++){for(;re<C;re++){const J=c.components[re];if(q>J.codingStyleParameters.decompositionLevelsCount)continue;const te=J.resolutions[q],B=te.precinctParameters.numprecincts;for(;K<B;){const j=f(te,K,X);return K++,j}K=0}re=0}q=0}throw new e("Out of packets")}}function S(y){const r=y.SIZ,p=y.currentTile.index,c=y.tiles[p],h=c.codingStyleDefaultParameters.layersCount,C=r.Csiz;let D=0;for(let oe=0;oe<C;oe++)D=Math.max(D,c.components[oe].codingStyleParameters.decompositionLevelsCount);let X=0,q=0,re=0,K=0;this.nextPacket=function(){for(;X<=D;X++){for(;q<h;q++){for(;re<C;re++){const J=c.components[re];if(X>J.codingStyleParameters.decompositionLevelsCount)continue;const te=J.resolutions[X],B=te.precinctParameters.numprecincts;for(;K<B;){const j=f(te,K,q);return K++,j}K=0}re=0}q=0}throw new e("Out of packets")}}function w(y){const r=y.SIZ,p=y.currentTile.index,c=y.tiles[p],h=c.codingStyleDefaultParameters.layersCount,C=r.Csiz;let D,X,q,re,K=0;for(q=0;q<C;q++){const J=c.components[q];K=Math.max(K,J.codingStyleParameters.decompositionLevelsCount)}const oe=new Int32Array(K+1);for(X=0;X<=K;++X){let J=0;for(q=0;q<C;++q){const te=c.components[q].resolutions;X<te.length&&(J=Math.max(J,te[X].precinctParameters.numprecincts))}oe[X]=J}D=0,X=0,q=0,re=0,this.nextPacket=function(){for(;X<=K;X++){for(;re<oe[X];re++){for(;q<C;q++){const te=c.components[q];if(X>te.codingStyleParameters.decompositionLevelsCount)continue;const B=te.resolutions[X],j=B.precinctParameters.numprecincts;if(!(re>=j)){for(;D<h;){const Y=f(B,re,D);return D++,Y}D=0}}q=0}re=0}throw new e("Out of packets")}}function v(y){const r=y.SIZ,p=y.currentTile.index,c=y.tiles[p],h=c.codingStyleDefaultParameters.layersCount,C=r.Csiz,D=_(c),X=D;let q=0,re=0,K=0,oe=0,J=0;this.nextPacket=function(){for(;J<X.maxNumHigh;J++){for(;oe<X.maxNumWide;oe++){for(;K<C;K++){const B=c.components[K],j=B.codingStyleParameters.decompositionLevelsCount;for(;re<=j;re++){const Y=B.resolutions[re],W=D.components[K].resolutions[re],G=M(oe,J,W,X,Y);if(G!==null){for(;q<h;){const Q=f(Y,G,q);return q++,Q}q=0}}re=0}K=0}oe=0}throw new e("Out of packets")}}function b(y){const r=y.SIZ,p=y.currentTile.index,c=y.tiles[p],h=c.codingStyleDefaultParameters.layersCount,C=r.Csiz,D=_(c);let X=0,q=0,re=0,K=0,oe=0;this.nextPacket=function(){for(;re<C;++re){const te=c.components[re],B=D.components[re],j=te.codingStyleParameters.decompositionLevelsCount;for(;oe<B.maxNumHigh;oe++){for(;K<B.maxNumWide;K++){for(;q<=j;q++){const Y=te.resolutions[q],W=B.resolutions[q],G=M(K,oe,W,B,Y);if(G!==null){for(;X<h;){const Q=f(Y,G,X);return X++,Q}X=0}}q=0}K=0}oe=0}throw new e("Out of packets")}}function M(y,r,p,c,h){const C=y*c.minWidth,D=r*c.minHeight;if(C%p.width!==0||D%p.height!==0)return null;const X=D/p.width*h.precinctParameters.numprecinctswide;return C/p.height+X}function _(y){const r=y.components.length;let p=Number.MAX_VALUE,c=Number.MAX_VALUE,h=0,C=0;const D=new Array(r);for(let X=0;X<r;X++){const q=y.components[X],re=q.codingStyleParameters.decompositionLevelsCount,K=new Array(re+1);let oe=Number.MAX_VALUE,J=Number.MAX_VALUE,te=0,B=0,j=1;for(let Y=re;Y>=0;--Y){const W=q.resolutions[Y],G=j*W.precinctParameters.precinctWidth,Q=j*W.precinctParameters.precinctHeight;oe=Math.min(oe,G),J=Math.min(J,Q),te=Math.max(te,W.precinctParameters.numprecinctswide),B=Math.max(B,W.precinctParameters.numprecinctshigh),K[Y]={width:G,height:Q},j<<=1}p=Math.min(p,oe),c=Math.min(c,J),h=Math.max(h,te),C=Math.max(C,B),D[X]={resolutions:K,minWidth:oe,minHeight:J,maxNumWide:te,maxNumHigh:B}}return{components:D,minWidth:p,minHeight:c,maxNumWide:h,maxNumHigh:C}}function H(y){const r=y.SIZ,p=y.currentTile.index,c=y.tiles[p],h=r.Csiz;for(let D=0;D<h;D++){const X=c.components[D],q=X.codingStyleParameters.decompositionLevelsCount,re=[],K=[];for(let oe=0;oe<=q;oe++){const J=I(y,X,oe),te={},B=1<<q-oe;te.trx0=Math.ceil(X.tcx0/B),te.try0=Math.ceil(X.tcy0/B),te.trx1=Math.ceil(X.tcx1/B),te.try1=Math.ceil(X.tcy1/B),te.resLevel=oe,T(y,te,J),re.push(te);let j;if(oe===0)j={},j.type="LL",j.tbx0=Math.ceil(X.tcx0/B),j.tby0=Math.ceil(X.tcy0/B),j.tbx1=Math.ceil(X.tcx1/B),j.tby1=Math.ceil(X.tcy1/B),j.resolution=te,d(y,j,J),K.push(j),te.subbands=[j];else{const Y=1<<q-oe+1,W=[];j={},j.type="HL",j.tbx0=Math.ceil(X.tcx0/Y-.5),j.tby0=Math.ceil(X.tcy0/Y),j.tbx1=Math.ceil(X.tcx1/Y-.5),j.tby1=Math.ceil(X.tcy1/Y),j.resolution=te,d(y,j,J),K.push(j),W.push(j),j={},j.type="LH",j.tbx0=Math.ceil(X.tcx0/Y),j.tby0=Math.ceil(X.tcy0/Y-.5),j.tbx1=Math.ceil(X.tcx1/Y),j.tby1=Math.ceil(X.tcy1/Y-.5),j.resolution=te,d(y,j,J),K.push(j),W.push(j),j={},j.type="HH",j.tbx0=Math.ceil(X.tcx0/Y-.5),j.tby0=Math.ceil(X.tcy0/Y-.5),j.tbx1=Math.ceil(X.tcx1/Y-.5),j.tby1=Math.ceil(X.tcy1/Y-.5),j.resolution=te,d(y,j,J),K.push(j),W.push(j),te.subbands=W}}X.resolutions=re,X.subbands=K}const C=c.codingStyleDefaultParameters.progressionOrder;switch(C){case 0:c.packetsIterator=new i(y);break;case 1:c.packetsIterator=new S(y);break;case 2:c.packetsIterator=new w(y);break;case 3:c.packetsIterator=new v(y);break;case 4:c.packetsIterator=new b(y);break;default:throw new e(`Unsupported progression order ${C}`)}}function A(y,r,p,c){let h=0,C,D=0,X=!1;function q(G){for(;D<G;){const Q=r[p+h];h++,X?(C=C<<7|Q,D+=7,X=!1):(C=C<<8|Q,D+=8),Q===255&&(X=!0)}return D-=G,C>>>D&(1<<G)-1}function re(G){return r[p+h-1]===255&&r[p+h]===G?(K(1),!0):r[p+h]===255&&r[p+h+1]===G?(K(2),!0):!1}function K(G){h+=G}function oe(){D=0,X&&(h++,X=!1)}function J(){if(q(1)===0)return 1;if(q(1)===0)return 2;let G=q(2);return G<3?G+3:(G=q(5),G<31?G+6:(G=q(7),G+37))}const te=y.currentTile.index,B=y.tiles[te],j=y.COD.sopMarkerUsed,Y=y.COD.ephMarkerUsed,W=B.packetsIterator;for(;h<c;){oe(),j&&re(145)&&K(4);const G=W.nextPacket();if(!q(1))continue;const Q=G.layerNumber,ee=[];let z;for(let se=0,ne=G.codeblocks.length;se<ne;se++){z=G.codeblocks[se];let V=z.precinct;const ae=z.cbx-V.cbxMin,ce=z.cby-V.cbyMin;let de=!1,Ae=!1,ve,pe;if(z.included!==void 0)de=!!q(1);else{V=z.precinct;let Le;if(V.inclusionTree!==void 0)Le=V.inclusionTree;else{const Ie=V.cbxMax-V.cbxMin+1,ue=V.cbyMax-V.cbyMin+1;Le=new u(Ie,ue,Q),pe=new s(Ie,ue),V.inclusionTree=Le,V.zeroBitPlanesTree=pe;for(let me=0;me<Q;me++)if(q(1)!==0)throw new e("Invalid tag tree")}if(Le.reset(ae,ce,Q))for(;;)if(q(1)){if(ve=!Le.nextLevel(),ve){z.included=!0,de=Ae=!0;break}}else{Le.incrementValue(Q);break}}if(!de)continue;if(Ae){for(pe=V.zeroBitPlanesTree,pe.reset(ae,ce);;)if(q(1)){if(ve=!pe.nextLevel(),ve)break}else pe.incrementValue();z.zeroBitPlanes=pe.value}const ge=J();for(;q(1);)z.Lblock++;const fe=(0,k.log2)(ge),xe=(ge<1<<fe?fe-1:fe)+z.Lblock,Te=q(xe);ee.push({codeblock:z,codingpasses:ge,dataLength:Te})}for(oe(),Y&&re(146);ee.length>0;){const se=ee.shift();z=se.codeblock,z.data===void 0&&(z.data=[]),z.data.push({data:r,start:p+h,end:p+h+se.dataLength,codingpasses:se.codingpasses}),h+=se.dataLength}}return h}function E(y,r,p,c,h,C,D,X,q){const re=c.tbx0,K=c.tby0,oe=c.tbx1-c.tbx0,J=c.codeblocks,te=c.type.charAt(0)==="H"?1:0,B=c.type.charAt(1)==="H"?r:0;for(let j=0,Y=J.length;j<Y;++j){const W=J[j],G=W.tbx1_-W.tbx0_,Q=W.tby1_-W.tby0_;if(G===0||Q===0||W.data===void 0)continue;const ee=new F(G,Q,W.subbandType,W.zeroBitPlanes,C);let z=2;const se=W.data;let ne=0,V=0,ae,ce,de;for(ae=0,ce=se.length;ae<ce;ae++)de=se[ae],ne+=de.end-de.start,V+=de.codingpasses;const Ae=new Uint8Array(ne);let ve=0;for(ae=0,ce=se.length;ae<ce;ae++){de=se[ae];const Fe=de.data.subarray(de.start,de.end);Ae.set(Fe,ve),ve+=Fe.length}const pe=new R.ArithmeticDecoder(Ae,0,ne);for(ee.setDecoder(pe),ae=0;ae<V;ae++){switch(z){case 0:ee.runSignificancePropagationPass();break;case 1:ee.runMagnitudeRefinementPass();break;case 2:ee.runCleanupPass(),X&&ee.checkSegmentationSymbol();break}q&&ee.reset(),z=(z+1)%3}let ge=W.tbx0_-re+(W.tby0_-K)*oe;const fe=ee.coefficentsSign,xe=ee.coefficentsMagnitude,Te=ee.bitsDecoded,Le=D?0:.5;let Ie,ue,me;ve=0;const De=c.type!=="LL";for(ae=0;ae<Q;ae++){const je=2*(ge/oe|0)*(r-oe)+te+B;for(Ie=0;Ie<G;Ie++){if(ue=xe[ve],ue!==0){ue=(ue+Le)*h,fe[ve]!==0&&(ue=-ue),me=Te[ve];const Ue=De?je+(ge<<1):ge;y[Ue]=D&&me>=C?ue:ue*(1<<C-me)}ge++,ve++}ge+=oe-G}}}function l(y,r,p){const c=r.components[p],h=c.codingStyleParameters,C=c.quantizationParameters,D=h.decompositionLevelsCount,X=C.SPqcds,q=C.scalarExpounded,re=C.guardBits,K=h.segmentationSymbolUsed,oe=h.resetContextProbabilities,J=y.components[p].precision,te=h.reversibleTransformation,B=te?new m:new O,j=[];let Y=0;for(let G=0;G<=D;G++){const Q=c.resolutions[G],ee=Q.trx1-Q.trx0,z=Q.try1-Q.try0,se=new Float32Array(ee*z);for(let ne=0,V=Q.subbands.length;ne<V;ne++){let ae,ce;q?(ae=X[Y].mu,ce=X[Y].epsilon,Y++):(ae=X[0].mu,ce=X[0].epsilon+(G>0?1-G:0));const de=Q.subbands[ne],Ae=t[de.type],ve=te?1:2**(J+Ae-ce)*(1+ae/2048),pe=re+ce-1;E(se,ee,z,de,ve,pe,te,K,oe)}j.push({width:ee,height:z,items:se})}const W=B.calculate(j,c.tcx0,c.tcy0);return{left:c.tcx0,top:c.tcy0,width:W.width,height:W.height,items:W.items}}function g(y){const r=y.SIZ,p=y.components,c=r.Csiz,h=[];for(let C=0,D=y.tiles.length;C<D;C++){const X=y.tiles[C],q=[];for(let ee=0;ee<c;ee++)q[ee]=l(y,X,ee);const re=q[0],K=new Uint8ClampedArray(re.items.length*c),oe={left:re.left,top:re.top,width:re.width,height:re.height,items:K};let J,te,B=0,j,Y,W,G,Q;if(X.codingStyleDefaultParameters.multipleComponentTransform){const ee=c===4,z=q[0].items,se=q[1].items,ne=q[2].items,V=ee?q[3].items:null;J=p[0].precision-8,te=(128<<J)+.5;const ae=X.components[0],ce=c-3;if(Y=z.length,ae.codingStyleParameters.reversibleTransformation)for(j=0;j<Y;j++,B+=ce){W=z[j]+te,G=se[j],Q=ne[j];const de=W-(Q+G>>2);K[B++]=de+Q>>J,K[B++]=de>>J,K[B++]=de+G>>J}else for(j=0;j<Y;j++,B+=ce)W=z[j]+te,G=se[j],Q=ne[j],K[B++]=W+1.402*Q>>J,K[B++]=W-.34413*G-.71414*Q>>J,K[B++]=W+1.772*G>>J;if(ee)for(j=0,B=3;j<Y;j++,B+=4)K[B]=V[j]+te>>J}else for(let ee=0;ee<c;ee++){const z=q[ee].items;for(J=p[ee].precision-8,te=(128<<J)+.5,B=ee,j=0,Y=z.length;j<Y;j++)K[B]=z[j]+te>>J,B+=c}h.push(oe)}return h}function N(y,r){const c=y.SIZ.Csiz,h=y.tiles[r];for(let C=0;C<c;C++){const D=h.components[C],X=y.currentTile.QCC[C]!==void 0?y.currentTile.QCC[C]:y.currentTile.QCD;D.quantizationParameters=X;const q=y.currentTile.COC[C]!==void 0?y.currentTile.COC[C]:y.currentTile.COD;D.codingStyleParameters=q}h.codingStyleDefaultParameters=y.currentTile.COD}class s{constructor(r,p){const c=(0,k.log2)(Math.max(r,p))+1;this.levels=[];for(let h=0;h<c;h++){const C={width:r,height:p,items:[]};this.levels.push(C),r=Math.ceil(r/2),p=Math.ceil(p/2)}}reset(r,p){let c=0,h=0,C;for(;c<this.levels.length;){C=this.levels[c];const D=r+p*C.width;if(C.items[D]!==void 0){h=C.items[D];break}C.index=D,r>>=1,p>>=1,c++}c--,C=this.levels[c],C.items[C.index]=h,this.currentLevel=c,delete this.value}incrementValue(){const r=this.levels[this.currentLevel];r.items[r.index]++}nextLevel(){let r=this.currentLevel,p=this.levels[r];const c=p.items[p.index];return r--,r<0?(this.value=c,!1):(this.currentLevel=r,p=this.levels[r],p.items[p.index]=c,!0)}}class u{constructor(r,p,c){const h=(0,k.log2)(Math.max(r,p))+1;this.levels=[];for(let C=0;C<h;C++){const D=new Uint8Array(r*p);for(let q=0,re=D.length;q<re;q++)D[q]=c;const X={width:r,height:p,items:D};this.levels.push(X),r=Math.ceil(r/2),p=Math.ceil(p/2)}}reset(r,p,c){let h=0;for(;h<this.levels.length;){const C=this.levels[h],D=r+p*C.width;C.index=D;const X=C.items[D];if(X===255)break;if(X>c)return this.currentLevel=h,this.propagateValues(),!1;r>>=1,p>>=1,h++}return this.currentLevel=h-1,!0}incrementValue(r){const p=this.levels[this.currentLevel];p.items[p.index]=r+1,this.propagateValues()}propagateValues(){let r=this.currentLevel,p=this.levels[r];const c=p.items[p.index];for(;--r>=0;)p=this.levels[r],p.items[p.index]=c}nextLevel(){let r=this.currentLevel,p=this.levels[r];const c=p.items[p.index];return p.items[p.index]=255,r--,r<0?!1:(this.currentLevel=r,p=this.levels[r],p.items[p.index]=c,!0)}}const x=class x{constructor(r,p,c,h,C){this.width=r,this.height=p;let D;c==="HH"?D=x.HHContextLabel:c==="HL"?D=x.HLContextLabel:D=x.LLAndLHContextsLabel,this.contextLabelTable=D;const X=r*p;this.neighborsSignificance=new Uint8Array(X),this.coefficentsSign=new Uint8Array(X);let q;C>14?q=new Uint32Array(X):C>6?q=new Uint16Array(X):q=new Uint8Array(X),this.coefficentsMagnitude=q,this.processingFlags=new Uint8Array(X);const re=new Uint8Array(X);if(h!==0)for(let K=0;K<X;K++)re[K]=h;this.bitsDecoded=re,this.reset()}setDecoder(r){this.decoder=r}reset(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[x.UNIFORM_CONTEXT]=92,this.contexts[x.RUNLENGTH_CONTEXT]=6}setNeighborsSignificance(r,p,c){const h=this.neighborsSignificance,C=this.width,D=this.height,X=p>0,q=p+1<C;let re;r>0&&(re=c-C,X&&(h[re-1]+=16),q&&(h[re+1]+=16),h[re]+=4),r+1<D&&(re=c+C,X&&(h[re-1]+=16),q&&(h[re+1]+=16),h[re]+=4),X&&(h[c-1]+=1),q&&(h[c+1]+=1),h[c]|=128}runSignificancePropagationPass(){const r=this.decoder,p=this.width,c=this.height,h=this.coefficentsMagnitude,C=this.coefficentsSign,D=this.neighborsSignificance,X=this.processingFlags,q=this.contexts,re=this.contextLabelTable,K=this.bitsDecoded,oe=-2,J=1,te=2;for(let B=0;B<c;B+=4)for(let j=0;j<p;j++){let Y=B*p+j;for(let W=0;W<4;W++,Y+=p){const G=B+W;if(G>=c)break;if(X[Y]&=oe,h[Y]||!D[Y])continue;const Q=re[D[Y]];if(r.readBit(q,Q)){const z=this.decodeSignBit(G,j,Y);C[Y]=z,h[Y]=1,this.setNeighborsSignificance(G,j,Y),X[Y]|=te}K[Y]++,X[Y]|=J}}}decodeSignBit(r,p,c){const h=this.width,C=this.height,D=this.coefficentsMagnitude,X=this.coefficentsSign;let q,re,K,oe,J,te;oe=p>0&&D[c-1]!==0,p+1<h&&D[c+1]!==0?(K=X[c+1],oe?(re=X[c-1],q=1-K-re):q=1-K-K):oe?(re=X[c-1],q=1-re-re):q=0;const B=3*q;return oe=r>0&&D[c-h]!==0,r+1<C&&D[c+h]!==0?(K=X[c+h],oe?(re=X[c-h],q=1-K-re+B):q=1-K-K+B):oe?(re=X[c-h],q=1-re-re+B):q=B,q>=0?(J=9+q,te=this.decoder.readBit(this.contexts,J)):(J=9-q,te=this.decoder.readBit(this.contexts,J)^1),te}runMagnitudeRefinementPass(){const r=this.decoder,p=this.width,c=this.height,h=this.coefficentsMagnitude,C=this.neighborsSignificance,D=this.contexts,X=this.bitsDecoded,q=this.processingFlags,re=1,K=2,oe=p*c,J=p*4;for(let te=0,B;te<oe;te=B){B=Math.min(oe,te+J);for(let j=0;j<p;j++)for(let Y=te+j;Y<B;Y+=p){if(!h[Y]||q[Y]&re)continue;let W=16;q[Y]&K&&(q[Y]^=K,W=(C[Y]&127)===0?15:14);const G=r.readBit(D,W);h[Y]=h[Y]<<1|G,X[Y]++,q[Y]|=re}}}runCleanupPass(){const r=this.decoder,p=this.width,c=this.height,h=this.neighborsSignificance,C=this.coefficentsMagnitude,D=this.coefficentsSign,X=this.contexts,q=this.contextLabelTable,re=this.bitsDecoded,K=this.processingFlags,oe=1,J=2,te=p,B=p*2,j=p*3;let Y;for(let W=0;W<c;W=Y){Y=Math.min(W+4,c);const G=W*p,Q=W+3<c;for(let ee=0;ee<p;ee++){const z=G+ee,se=Q&&K[z]===0&&K[z+te]===0&&K[z+B]===0&&K[z+j]===0&&h[z]===0&&h[z+te]===0&&h[z+B]===0&&h[z+j]===0;let ne=0,V=z,ae=W,ce;if(se){if(!r.readBit(X,x.RUNLENGTH_CONTEXT)){re[z]++,re[z+te]++,re[z+B]++,re[z+j]++;continue}ne=r.readBit(X,x.UNIFORM_CONTEXT)<<1|r.readBit(X,x.UNIFORM_CONTEXT),ne!==0&&(ae=W+ne,V+=ne*p),ce=this.decodeSignBit(ae,ee,V),D[V]=ce,C[V]=1,this.setNeighborsSignificance(ae,ee,V),K[V]|=J,V=z;for(let Ae=W;Ae<=ae;Ae++,V+=p)re[V]++;ne++}for(ae=W+ne;ae<Y;ae++,V+=p){if(C[V]||K[V]&oe)continue;const de=q[h[V]];r.readBit(X,de)===1&&(ce=this.decodeSignBit(ae,ee,V),D[V]=ce,C[V]=1,this.setNeighborsSignificance(ae,ee,V),K[V]|=J),re[V]++}}}}checkSegmentationSymbol(){const r=this.decoder,p=this.contexts;if((r.readBit(p,x.UNIFORM_CONTEXT)<<3|r.readBit(p,x.UNIFORM_CONTEXT)<<2|r.readBit(p,x.UNIFORM_CONTEXT)<<1|r.readBit(p,x.UNIFORM_CONTEXT))!==10)throw new e("Invalid segmentation symbol")}};Rt(x,"UNIFORM_CONTEXT",17),Rt(x,"RUNLENGTH_CONTEXT",18),Rt(x,"LLAndLHContextsLabel",new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8])),Rt(x,"HLContextLabel",new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8])),Rt(x,"HHContextLabel",new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]));let F=x;class U{constructor(){this.constructor===U&&(0,n.unreachable)("Cannot initialize Transform.")}calculate(r,p,c){let h=r[0];for(let C=1,D=r.length;C<D;C++)h=this.iterate(h,r[C],p,c);return h}extend(r,p,c){let h=p-1,C=p+1,D=p+c-2,X=p+c;r[h--]=r[C++],r[X++]=r[D--],r[h--]=r[C++],r[X++]=r[D--],r[h--]=r[C++],r[X++]=r[D--],r[h]=r[C],r[X]=r[D]}filter(r,p,c){(0,n.unreachable)("Abstract method `filter` called")}iterate(r,p,c,h){const C=r.width,D=r.height;let X=r.items;const q=p.width,re=p.height,K=p.items;let oe,J,te,B,j,Y;for(te=0,oe=0;oe<D;oe++)for(B=oe*2*q,J=0;J<C;J++,te++,B+=2)K[B]=X[te];X=r.items=null;const W=4,G=new Float32Array(q+2*W);if(q===1){if(c&1)for(Y=0,te=0;Y<re;Y++,te+=q)K[te]*=.5}else for(Y=0,te=0;Y<re;Y++,te+=q)G.set(K.subarray(te,te+q),W),this.extend(G,W,q),this.filter(G,W,q),K.set(G.subarray(W,W+q),te);let Q=16;const ee=[];for(oe=0;oe<Q;oe++)ee.push(new Float32Array(re+2*W));let z,se=0;if(r=W+re,re===1){if(h&1)for(j=0;j<q;j++)K[j]*=.5}else for(j=0;j<q;j++){if(se===0){for(Q=Math.min(q-j,Q),te=j,B=W;B<r;te+=q,B++)for(z=0;z<Q;z++)ee[z][B]=K[te+z];se=Q}se--;const ne=ee[se];if(this.extend(ne,W,re),this.filter(ne,W,re),se===0)for(te=j-Q+1,B=W;B<r;te+=q,B++)for(z=0;z<Q;z++)K[te+z]=ee[z][B]}return{width:q,height:re,items:K}}}class O extends U{filter(r,p,c){const h=c>>1;p|=0;let C,D,X,q;const re=-1.586134342059924,K=-.052980118572961,oe=.882911075530934,J=.443506852043971,te=1.230174104914001,B=1/te;for(C=p-3,D=h+4;D--;C+=2)r[C]*=B;for(C=p-2,X=J*r[C-1],D=h+3;D--&&(q=J*r[C+1],r[C]=te*r[C]-X-q,D--);C+=2)C+=2,X=J*r[C+1],r[C]=te*r[C]-X-q;for(C=p-1,X=oe*r[C-1],D=h+2;D--&&(q=oe*r[C+1],r[C]-=X+q,D--);C+=2)C+=2,X=oe*r[C+1],r[C]-=X+q;for(C=p,X=K*r[C-1],D=h+1;D--&&(q=K*r[C+1],r[C]-=X+q,D--);C+=2)C+=2,X=K*r[C+1],r[C]-=X+q;if(h!==0)for(C=p+1,X=re*r[C-1],D=h;D--&&(q=re*r[C+1],r[C]-=X+q,D--);C+=2)C+=2,X=re*r[C+1],r[C]-=X+q}}class m extends U{filter(r,p,c){const h=c>>1;p|=0;let C,D;for(C=p,D=h+1;D--;C+=2)r[C]-=r[C-1]+r[C+1]+2>>2;for(C=p+1,D=h;D--;C+=2)r[C]+=r[C-1]+r[C+1]>>1}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.LZWStream=void 0;var n=ie(18);class k extends n.DecodeStream{constructor(e,t,o){super(t),this.str=e,this.dict=e.dict,this.cachedData=0,this.bitsCached=0;const $=4096,L={earlyChange:o,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array($),dictionaryLengths:new Uint16Array($),dictionaryPrevCodes:new Uint16Array($),currentSequence:new Uint8Array($),currentSequenceLength:0};for(let I=0;I<256;++I)L.dictionaryValues[I]=I,L.dictionaryLengths[I]=1;this.lzwState=L}readBits(e){let t=this.bitsCached,o=this.cachedData;for(;t<e;){const $=this.str.getByte();if($===-1)return this.eof=!0,null;o=o<<8|$,t+=8}return this.bitsCached=t-=e,this.cachedData=o,this.lastCode=null,o>>>t&(1<<e)-1}readBlock(){let o=1024,$,L,I;const T=this.lzwState;if(!T)return;const d=T.earlyChange;let f=T.nextCode;const i=T.dictionaryValues,S=T.dictionaryLengths,w=T.dictionaryPrevCodes;let v=T.codeLength,b=T.prevCode;const M=T.currentSequence;let _=T.currentSequenceLength,H=0,A=this.bufferLength,E=this.ensureBuffer(this.bufferLength+o);for($=0;$<512;$++){const l=this.readBits(v),g=_>0;if(l<256)M[0]=l,_=1;else if(l>=258)if(l<f)for(_=S[l],L=_-1,I=l;L>=0;L--)M[L]=i[I],I=w[I];else M[_++]=M[0];else if(l===256){v=9,f=258,_=0;continue}else{this.eof=!0,delete this.lzwState;break}if(g&&(w[f]=b,S[f]=S[b]+1,i[f]=M[0],f++,v=f+d&f+d-1?v:Math.min(Math.log(f+d)/.6931471805599453+1,12)|0),b=l,H+=_,o<H){do o+=512;while(o<H);E=this.ensureBuffer(this.bufferLength+o)}for(L=0;L<_;L++)E[A++]=M[L]}T.nextCode=f,T.codeLength=v,T.prevCode=b,T.currentSequenceLength=_,this.bufferLength=A}}P.LZWStream=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PredictorStream=void 0;var n=ie(18),k=ie(4),R=ie(2);class e extends n.DecodeStream{constructor(o,$,L){if(super($),!(L instanceof k.Dict))return o;const I=this.predictor=L.get("Predictor")||1;if(I<=1)return o;if(I!==2&&(I<10||I>15))throw new R.FormatError(`Unsupported predictor: ${I}`);this.readBlock=I===2?this.readBlockTiff:this.readBlockPng,this.str=o,this.dict=o.dict;const T=this.colors=L.get("Colors")||1,d=this.bits=L.get("BPC","BitsPerComponent")||8,f=this.columns=L.get("Columns")||1;return this.pixBytes=T*d+7>>3,this.rowBytes=f*T*d+7>>3,this}readBlockTiff(){const o=this.rowBytes,$=this.bufferLength,L=this.ensureBuffer($+o),I=this.bits,T=this.colors,d=this.str.getBytes(o);if(this.eof=!d.length,this.eof)return;let f=0,i=0,S=0,w=0,v=$,b;if(I===1&&T===1)for(b=0;b<o;++b){let M=d[b]^f;M^=M>>1,M^=M>>2,M^=M>>4,f=(M&1)<<7,L[v++]=M}else if(I===8){for(b=0;b<T;++b)L[v++]=d[b];for(;b<o;++b)L[v]=L[v-T]+d[b],v++}else if(I===16){const M=T*2;for(b=0;b<M;++b)L[v++]=d[b];for(;b<o;b+=2){const _=((d[b]&255)<<8)+(d[b+1]&255)+((L[v-M]&255)<<8)+(L[v-M+1]&255);L[v++]=_>>8&255,L[v++]=_&255}}else{const M=new Uint8Array(T+1),_=(1<<I)-1;let H=0,A=$;const E=this.columns;for(b=0;b<E;++b)for(let l=0;l<T;++l)S<I&&(f=f<<8|d[H++]&255,S+=8),M[l]=M[l]+(f>>S-I)&_,S-=I,i=i<<I|M[l],w+=I,w>=8&&(L[A++]=i>>w-8&255,w-=8);w>0&&(L[A++]=(i<<8-w)+(f&(1<<8-w)-1))}this.bufferLength+=o}readBlockPng(){const o=this.rowBytes,$=this.pixBytes,L=this.str.getByte(),I=this.str.getBytes(o);if(this.eof=!I.length,this.eof)return;const T=this.bufferLength,d=this.ensureBuffer(T+o);let f=d.subarray(T-o,T);f.length===0&&(f=new Uint8Array(o));let i,S=T,w,v;switch(L){case 0:for(i=0;i<o;++i)d[S++]=I[i];break;case 1:for(i=0;i<$;++i)d[S++]=I[i];for(;i<o;++i)d[S]=d[S-$]+I[i]&255,S++;break;case 2:for(i=0;i<o;++i)d[S++]=f[i]+I[i]&255;break;case 3:for(i=0;i<$;++i)d[S++]=(f[i]>>1)+I[i];for(;i<o;++i)d[S]=(f[i]+d[S-$]>>1)+I[i]&255,S++;break;case 4:for(i=0;i<$;++i)w=f[i],v=I[i],d[S++]=w+v;for(;i<o;++i){w=f[i];const b=f[i-$],M=d[S-$],_=M+w-b;let H=_-M;H<0&&(H=-H);let A=_-w;A<0&&(A=-A);let E=_-b;E<0&&(E=-E),v=I[i],H<=A&&H<=E?d[S++]=M+v:A<=E?d[S++]=w+v:d[S++]=b+v}break;default:throw new R.FormatError(`Unsupported predictor: ${L}`)}this.bufferLength+=o}}P.PredictorStream=e},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RunLengthStream=void 0;var n=ie(18);class k extends n.DecodeStream{constructor(e,t){super(t),this.str=e,this.dict=e.dict}readBlock(){const e=this.str.getBytes(2);if(!e||e.length<2||e[0]===128){this.eof=!0;return}let t,o=this.bufferLength,$=e[0];if($<128){if(t=this.ensureBuffer(o+$+1),t[o++]=e[1],$>0){const L=this.str.getBytes($);t.set(L,o),o+=$}}else{$=257-$;const L=e[1];t=this.ensureBuffer(o+$+1);for(let I=0;I<$;I++)t[o++]=L}this.bufferLength=o}}P.RunLengthStream=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Font=P.ErrorFont=void 0;var n=ie(2),k=ie(35),R=ie(38),e=ie(40),t=ie(39),o=ie(37),$=ie(41),L=ie(42),I=ie(43),T=ie(44),d=ie(45),f=ie(46),i=ie(14),S=ie(47),w=ie(3),v=ie(8),b=ie(48);const M=[[57344,63743],[1048576,1114109]],_=1e3,H=["ascent","bbox","black","bold","charProcOperatorList","composite","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","fallbackName","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","subtype","systemFontInfo","type","vertical"],A=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function E(z){if(!z.fontMatrix||z.fontMatrix[0]===n.FONT_IDENTITY_MATRIX[0])return;const se=.001/z.fontMatrix[0],ne=z.widths;for(const V in ne)ne[V]*=se;z.defaultWidth*=se}function l(z,se,ne){if(z.isInternalFont||z.hasIncludedToUnicodeMap||z.hasEncoding||z.toUnicode instanceof L.IdentityToUnicodeMap||!se||ne.length===0||z.defaultEncoding===o.WinAnsiEncoding)return;for(const de of ne)if(!re(de))return;const V=o.WinAnsiEncoding,ae=[],ce=(0,t.getGlyphsUnicode)();for(const de in V){const Ae=V[de];if(Ae==="")continue;const ve=ce[Ae];ve!==void 0&&(ae[de]=String.fromCharCode(ve))}ae.length>0&&z.toUnicode.amend(ae)}function g(z,se){if(z.isInternalFont||z.hasIncludedToUnicodeMap||se===z.defaultEncoding||z.toUnicode instanceof L.IdentityToUnicodeMap)return;const ne=[],V=(0,t.getGlyphsUnicode)();for(const ae in se){if(z.hasEncoding&&(z.baseEncodingName||z.differences[ae]!==void 0))continue;const ce=se[ae],de=(0,e.getUnicodeForGlyph)(ce,V);de!==-1&&(ne[ae]=String.fromCharCode(de))}ne.length>0&&z.toUnicode.amend(ne)}function N(z){if(!z.fallbackToUnicode||z.toUnicode instanceof L.IdentityToUnicodeMap)return;const se=[];for(const ne in z.fallbackToUnicode)z.toUnicode.has(ne)||(se[ne]=z.fallbackToUnicode[ne]);se.length>0&&z.toUnicode.amend(se)}class s{constructor(se,ne,V,ae,ce,de,Ae,ve,pe){this.originalCharCode=se,this.fontChar=ne,this.unicode=V,this.accent=ae,this.width=ce,this.vmetric=de,this.operatorListId=Ae,this.isSpace=ve,this.isInFont=pe}get category(){return(0,n.shadow)(this,"category",(0,e.getCharUnicodeCategory)(this.unicode),!0)}}function u(z,se){return(z<<8)+se}function F(z,se,ne){z[se+1]=ne,z[se]=ne>>>8}function U(z,se){const ne=(z<<8)+se;return ne&32768?ne-65536:ne}function O(z,se,ne,V){return(z<<24)+(se<<16)+(ne<<8)+V}function m(z){return String.fromCharCode(z>>8&255,z&255)}function x(z){return z>32767?z=32767:z<-32768&&(z=-32768),String.fromCharCode(z>>8&255,z&255)}function y(z){const se=z.peekBytes(4);return(0,w.readUint32)(se,0)===65536||(0,n.bytesToString)(se)==="true"}function r(z){const se=z.peekBytes(4);return(0,n.bytesToString)(se)==="ttcf"}function p(z){const se=z.peekBytes(4);return(0,n.bytesToString)(se)==="OTTO"}function c(z){const se=z.peekBytes(2);return se[0]===37&&se[1]===33||se[0]===128&&se[1]===1}function h(z){const se=z.peekBytes(4);return se[0]>=1&&se[3]>=1&&se[3]<=4}function C(z,{type:se,subtype:ne,composite:V}){let ae,ce;return y(z)||r(z)?ae=V?"CIDFontType2":"TrueType":p(z)?ae=V?"CIDFontType2":"OpenType":c(z)?V?ae="CIDFontType0":ae=se==="MMType1"?"MMType1":"Type1":h(z)?V?(ae="CIDFontType0",ce="CIDFontType0C"):(ae=se==="MMType1"?"MMType1":"Type1",ce="Type1C"):((0,n.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),ae=se,ce=ne),[ae,ce]}function D(z,se){for(const ne in se)z[+ne]=se[ne]}function X(z,se,ne){const V=[];let ae;for(let ce=0,de=z.length;ce<de;ce++)ae=(0,e.getUnicodeForGlyph)(z[ce],se),ae!==-1&&(V[ce]=ae);for(const ce in ne)ae=(0,e.getUnicodeForGlyph)(ne[ce],se),ae!==-1&&(V[+ce]=ae);return V}function q(z){return z.platform===1&&z.encoding===0&&z.language===0}function re(z){return z.platform===3&&z.encoding===1&&z.language===1033}function K(z,se,ne=!1){switch(se.length){case 1:return se.charCodeAt(0);case 2:return se.charCodeAt(0)<<8|se.charCodeAt(1)}const V=`Unsupported CID string (charCode ${z}): "${se}".`;if(ne)throw new n.FormatError(V);return(0,n.warn)(V),se}function oe(z,se,ne,V){const ae=Object.create(null),ce=new Map,de=[],Ae=new Set;let ve=0,ge=M[ve][0],fe=M[ve][1];const xe=Te=>M[0][0]<=Te&&Te<=M[0][1]||M[1][0]<=Te&&Te<=M[1][1];for(let Te in z){Te|=0;let Le=z[Te];if(!se(Le))continue;if(ge>fe){if(ve++,ve>=M.length){(0,n.warn)("Ran out of space in font private use area.");break}ge=M[ve][0],fe=M[ve][1]}const Ie=ge++;Le===0&&(Le=ne);let ue=V.get(Te);typeof ue=="string"&&(ue=ue.codePointAt(0)),ue&&!xe(ue)&&!Ae.has(Le)&&(ce.set(ue,Le),Ae.add(Le)),ae[Ie]=Le,de[Te]=Ie}return{toFontChar:de,charCodeToGlyphId:ae,toUnicodeExtraMap:ce,nextAvailableFontCharCode:ge}}function J(z,se,ne){const V=[];for(const de in z)z[de]>=ne||V.push({fontCharCode:de|0,glyphId:z[de]});if(se)for(const[de,Ae]of se)Ae>=ne||V.push({fontCharCode:de,glyphId:Ae});V.length===0&&V.push({fontCharCode:0,glyphId:0}),V.sort(function(Ae,ve){return Ae.fontCharCode-ve.fontCharCode});const ae=[],ce=V.length;for(let de=0;de<ce;){const Ae=V[de].fontCharCode,ve=[V[de].glyphId];++de;let pe=Ae;for(;de<ce&&pe+1===V[de].fontCharCode&&(ve.push(V[de].glyphId),++pe,++de,pe!==65535););ae.push([Ae,pe,ve])}return ae}function te(z,se,ne){const V=J(z,se,ne),ae=V.at(-1)[1]>65535?2:1;let ce="\0\0"+m(ae)+"\0\0"+(0,n.string32)(4+ae*8),de,Ae,ve,pe;for(de=V.length-1;de>=0&&!(V[de][0]<=65535);--de);const ge=de+1;V[de][0]<65535&&V[de][1]===65535&&(V[de][1]=65534);const fe=V[de][1]<65535?1:0,xe=ge+fe,Te=S.OpenTypeFileBuilder.getSearchParams(xe,2);let Le="",Ie="",ue="",me="",De="",Fe=0,je,Ue,ht,_e;for(de=0,Ae=ge;de<Ae;de++){je=V[de],Ue=je[0],ht=je[1],Le+=m(Ue),Ie+=m(ht),_e=je[2];let he=!0;for(ve=1,pe=_e.length;ve<pe;++ve)if(_e[ve]!==_e[ve-1]+1){he=!1;break}if(he){const ye=_e[0];ue+=m(ye-Ue&65535),me+=m(0)}else{const ye=(xe-de)*2+Fe*2;for(Fe+=ht-Ue+1,ue+=m(0),me+=m(ye),ve=0,pe=_e.length;ve<pe;++ve)De+=m(_e[ve])}}fe>0&&(Ie+="ÿÿ",Le+="ÿÿ",ue+="\0",me+="\0\0");const st="\0\0"+m(2*xe)+m(Te.range)+m(Te.entry)+m(Te.rangeShift)+Ie+"\0\0"+Le+ue+me+De;let Je="",be="";if(ae>1){for(ce+=`\0\0
`+(0,n.string32)(4+ae*8+4+st.length),Je="",de=0,Ae=V.length;de<Ae;de++){je=V[de],Ue=je[0],_e=je[2];let he=_e[0];for(ve=1,pe=_e.length;ve<pe;++ve)_e[ve]!==_e[ve-1]+1&&(ht=je[0]+ve-1,Je+=(0,n.string32)(Ue)+(0,n.string32)(ht)+(0,n.string32)(he),Ue=ht+1,he=_e[ve]);Je+=(0,n.string32)(Ue)+(0,n.string32)(je[1])+(0,n.string32)(he)}be="\0\f\0\0"+(0,n.string32)(Je.length+16)+"\0\0\0\0"+(0,n.string32)(Je.length/12)}return ce+"\0"+m(st.length+4)+st+be+Je}function B(z,se){se.pos=(se.start||0)+z.offset;const ne=se.getUint16();se.skip(60);const V=se.getUint16();if(ne<4&&V&768)return!1;const ae=se.getUint16(),ce=se.getUint16();return ae>ce||(se.skip(6),se.getUint16()===0)?!1:(z.data[8]=z.data[9]=0,!0)}function j(z,se,ne){ne||(ne={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0});let V=0,ae=0,ce=0,de=0,Ae=null,ve=0,pe=-1;if(se){for(let me in se)if(me|=0,(Ae>me||!Ae)&&(Ae=me),ve<me&&(ve=me),pe=(0,e.getUnicodeRangeFor)(me,pe),pe<32)V|=1<<pe;else if(pe<64)ae|=1<<pe-32;else if(pe<96)ce|=1<<pe-64;else if(pe<123)de|=1<<pe-96;else throw new n.FormatError("Unicode ranges Bits > 123 are reserved for internal usage");ve>65535&&(ve=65535)}else Ae=0,ve=255;const ge=z.bbox||[0,0,0,0],fe=ne.unitsPerEm||1/(z.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],xe=z.ascentScaled?1:fe/_,Te=ne.ascent||Math.round(xe*(z.ascent||ge[3]));let Le=ne.descent||Math.round(xe*(z.descent||ge[1]));Le>0&&z.descent>0&&ge[1]<0&&(Le=-Le);const Ie=ne.yMax||Te,ue=-ne.yMin||-Le;return"\0$ô\0\0\0Š»\0\0\0ŒŠ»\0\0ß\x001\0\0\0\0"+String.fromCharCode(z.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,n.string32)(V)+(0,n.string32)(ae)+(0,n.string32)(ce)+(0,n.string32)(de)+"*21*"+m(z.italicAngle?1:0)+m(Ae||z.firstChar)+m(ve||z.lastChar)+m(Te)+m(Le)+"\0d"+m(Ie)+m(ue)+"\0\0\0\0\0\0\0\0"+m(z.xHeight)+m(z.capHeight)+m(0)+m(Ae||z.firstChar)+"\0"}function Y(z){const se=Math.floor(z.italicAngle*65536);return"\0\0\0"+(0,n.string32)(se)+"\0\0\0\0"+(0,n.string32)(z.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function W(z){return z.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function G(z,se){se||(se=[[],[]]);const ne=[se[0][0]||"Original licence",se[0][1]||z,se[0][2]||"Unknown",se[0][3]||"uniqueID",se[0][4]||z,se[0][5]||"Version 0.11",se[0][6]||W(z),se[0][7]||"Unknown",se[0][8]||"Unknown",se[0][9]||"Unknown"],V=[];let ae,ce,de,Ae,ve;for(ae=0,ce=ne.length;ae<ce;ae++){ve=se[1][ae]||ne[ae];const ue=[];for(de=0,Ae=ve.length;de<Ae;de++)ue.push(m(ve.charCodeAt(de)));V.push(ue.join(""))}const pe=[ne,V],ge=["\0","\0"],fe=["\0\0","\0"],xe=["\0\0","	"],Te=ne.length*ge.length;let Le="\0\0"+m(Te)+m(Te*12+6),Ie=0;for(ae=0,ce=ge.length;ae<ce;ae++){const ue=pe[ae];for(de=0,Ae=ue.length;de<Ae;de++){ve=ue[de];const me=ge[ae]+fe[ae]+xe[ae]+m(de)+m(ve.length)+m(Ie);Le+=me,Ie+=ve.length}}return Le+=ne.join("")+V.join(""),Le}class Q{constructor(se,ne,V){var pe;this.name=se,this.psName=null,this.mimetype=null,this.disableFontFace=!1,this.loadedName=V.loadedName,this.isType3Font=V.isType3Font,this.missingFile=!1,this.cssFontInfo=V.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let ae=!!(V.flags&R.FontFlags.Serif);if(!ae&&!V.isSimulatedFlags){const ge=se.replaceAll(/[,_]/g,"-").split("-")[0],fe=(0,$.getSerifFonts)();for(const xe of ge.split("+"))if(fe[xe]){ae=!0;break}}this.isSerifFont=ae,this.isSymbolicFont=!!(V.flags&R.FontFlags.Symbolic),this.isMonospace=!!(V.flags&R.FontFlags.FixedPitch);let{type:ce,subtype:de}=V;this.type=ce,this.subtype=de,this.systemFontInfo=V.systemFontInfo;const Ae=se.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!Ae,this.isInvalidPDFjsFont?this.fallbackName=Ae[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif",(pe=this.systemFontInfo)!=null&&pe.guessFallback&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=V.differences,this.widths=V.widths,this.defaultWidth=V.defaultWidth,this.composite=V.composite,this.cMap=V.cMap,this.capHeight=V.capHeight/_,this.ascent=V.ascent/_,this.descent=V.descent/_,this.lineHeight=this.ascent-this.descent,this.fontMatrix=V.fontMatrix,this.bbox=V.bbox,this.defaultEncoding=V.defaultEncoding,this.toUnicode=V.toUnicode,this.toFontChar=[],V.type==="Type3"){for(let ge=0;ge<256;ge++)this.toFontChar[ge]=this.differences[ge]||V.defaultEncoding[ge];return}if(this.cidEncoding=V.cidEncoding||"",this.vertical=!!V.vertical,this.vertical&&(this.vmetrics=V.vmetrics,this.defaultVMetrics=V.defaultVMetrics),!ne||ne.isEmpty){ne&&(0,n.warn)('Font file is empty in "'+se+'" ('+this.loadedName+")"),this.fallbackToSystemFont(V);return}[ce,de]=C(ne,V),(ce!==this.type||de!==this.subtype)&&(0,n.info)(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${ce}/${de}.`);let ve;try{switch(ce){case"MMType1":(0,n.info)("MMType1 font ("+se+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const ge=de==="Type1C"||de==="CIDFontType0C"?new I.CFFFont(ne,V):new b.Type1Font(se,ne,V);E(V),ve=this.convert(se,ge,V);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",ve=this.checkAndRepair(se,ne,V),this.isOpenType&&(E(V),ce="OpenType");break;default:throw new n.FormatError(`Font ${ce} is not supported`)}}catch(ge){(0,n.warn)(ge),this.fallbackToSystemFont(V);return}N(V),this.data=ve,this.type=ce,this.subtype=de,this.fontMatrix=V.fontMatrix,this.widths=V.widths,this.defaultWidth=V.defaultWidth,this.toUnicode=V.toUnicode,this.seacMap=V.seacMap}get renderer(){const se=T.FontRendererFactory.create(this,R.SEAC_ANALYSIS_ENABLED);return(0,n.shadow)(this,"renderer",se)}exportData(se=!1){const ne=se?[...H,...A]:H,V=Object.create(null);let ae,ce;for(ae of ne)ce=this[ae],ce!==void 0&&(V[ae]=ce);return V}fallbackToSystemFont(se){this.missingFile=!0;const{name:ne,type:V}=this;let ae=(0,R.normalizeFontName)(ne);const ce=(0,$.getStdFontMap)(),de=(0,$.getNonStdFontMap)(),Ae=!!ce[ae],ve=!!(de[ae]&&ce[de[ae]]);ae=ce[ae]||de[ae]||ae;const ge=(0,d.getFontBasicMetrics)()[ae];ge&&(isNaN(this.ascent)&&(this.ascent=ge.ascent/_),isNaN(this.descent)&&(this.descent=ge.descent/_),isNaN(this.capHeight)&&(this.capHeight=ge.capHeight/_)),this.bold=/bold/gi.test(ae),this.italic=/oblique|italic/gi.test(ae),this.black=/Black/g.test(ne);const fe=/Narrow/g.test(ne);if(this.remeasure=(!Ae||fe)&&Object.keys(this.widths).length>0,(Ae||ve)&&V==="CIDFontType2"&&this.cidEncoding.startsWith("Identity-")){const xe=se.cidToGidMap,Te=[];if(D(Te,(0,$.getGlyphMapForStandardFonts)()),/Arial-?Black/i.test(ne)?D(Te,(0,$.getSupplementalGlyphMapForArialBlack)()):/Calibri/i.test(ne)&&D(Te,(0,$.getSupplementalGlyphMapForCalibri)()),xe){for(const Le in Te){const Ie=Te[Le];xe[Ie]!==void 0&&(Te[+Le]=xe[Ie])}xe.length!==this.toUnicode.length&&se.hasIncludedToUnicodeMap&&this.toUnicode instanceof L.IdentityToUnicodeMap&&this.toUnicode.forEach(function(Le,Ie){const ue=Te[Le];xe[ue]===void 0&&(Te[+Le]=Ie)})}this.toUnicode instanceof L.IdentityToUnicodeMap||this.toUnicode.forEach(function(Le,Ie){Te[+Le]=Ie}),this.toFontChar=Te,this.toUnicode=new L.ToUnicodeMap(Te)}else if(/Symbol/i.test(ae))this.toFontChar=X(o.SymbolSetEncoding,(0,t.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(ae))this.toFontChar=X(o.ZapfDingbatsEncoding,(0,t.getDingbatsGlyphsUnicode)(),this.differences);else if(Ae){const xe=X(this.defaultEncoding,(0,t.getGlyphsUnicode)(),this.differences);V==="CIDFontType2"&&!this.cidEncoding.startsWith("Identity-")&&!(this.toUnicode instanceof L.IdentityToUnicodeMap)&&this.toUnicode.forEach(function(Te,Le){xe[+Te]=Le}),this.toFontChar=xe}else{const xe=(0,t.getGlyphsUnicode)(),Te=[];this.toUnicode.forEach((Le,Ie)=>{if(!this.composite){const ue=this.differences[Le]||this.defaultEncoding[Le],me=(0,e.getUnicodeForGlyph)(ue,xe);me!==-1&&(Ie=me)}Te[+Le]=Ie}),this.composite&&this.toUnicode instanceof L.IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(ne)&&D(Te,(0,$.getGlyphMapForStandardFonts)()),this.toFontChar=Te}N(se),this.loadedName=ae.split("-")[0]}checkAndRepair(se,ne,V){var ot,yt,Et;const ae=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function ce(We,Xe){const Ze=Object.create(null);Ze["OS/2"]=null,Ze.cmap=null,Ze.head=null,Ze.hhea=null,Ze.hmtx=null,Ze.maxp=null,Ze.name=null,Ze.post=null;for(let it=0;it<Xe;it++){const ct=de(We);ae.includes(ct.tag)&&ct.length!==0&&(Ze[ct.tag]=ct)}return Ze}function de(We){const Xe=We.getString(4),Ze=We.getInt32()>>>0,it=We.getInt32()>>>0,ct=We.getInt32()>>>0,xt=We.pos;We.pos=We.start||0,We.skip(it);const lt=We.getBytes(ct);return We.pos=xt,Xe==="head"&&(lt[8]=lt[9]=lt[10]=lt[11]=0,lt[17]|=32),{tag:Xe,checksum:Ze,length:ct,offset:it,data:lt}}function Ae(We){return{version:We.getString(4),numTables:We.getUint16(),searchRange:We.getUint16(),entrySelector:We.getUint16(),rangeShift:We.getUint16()}}function ve(We){const Xe=We.getString(4);(0,n.assert)(Xe==="ttcf","Must be a TrueType Collection font.");const Ze=We.getUint16(),it=We.getUint16(),ct=We.getInt32()>>>0,xt=[];for(let nt=0;nt<ct;nt++)xt.push(We.getInt32()>>>0);const lt={ttcTag:Xe,majorVersion:Ze,minorVersion:it,numFonts:ct,offsetTable:xt};switch(Ze){case 1:return lt;case 2:return lt.dsigTag=We.getInt32()>>>0,lt.dsigLength=We.getInt32()>>>0,lt.dsigOffset=We.getInt32()>>>0,lt}throw new n.FormatError(`Invalid TrueType Collection majorVersion: ${Ze}.`)}function pe(We,Xe){var lt;const{numFonts:Ze,offsetTable:it}=ve(We),ct=Xe.split("+");let xt;for(let nt=0;nt<Ze;nt++){We.pos=(We.start||0)+it[nt];const gt=Ae(We),vt=ce(We,gt.numTables);if(!vt.name)throw new n.FormatError('TrueType Collection font must contain a "name" table.');const[Mt]=ue(vt.name);for(let At=0,St=Mt.length;At<St;At++)for(let It=0,pt=Mt[At].length;It<pt;It++){const Ct=(lt=Mt[At][It])==null?void 0:lt.replaceAll(/\s/g,"");if(Ct){if(Ct===Xe)return{header:gt,tables:vt};if(!(ct.length<2))for(const ft of ct)Ct===ft&&(xt={name:ft,header:gt,tables:vt})}}}if(xt)return(0,n.warn)(`TrueType Collection does not contain "${Xe}" font, falling back to "${xt.name}" font instead.`),{header:xt.header,tables:xt.tables};throw new n.FormatError(`TrueType Collection does not contain "${Xe}" font.`)}function ge(We,Xe,Ze,it){if(!We)return(0,n.warn)("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let ct,xt=(Xe.start||0)+We.offset;Xe.pos=xt,Xe.skip(2);const lt=Xe.getUint16();let nt,gt=!1;for(let pt=0;pt<lt;pt++){const Ct=Xe.getUint16(),ft=Xe.getUint16(),Tt=Xe.getInt32()>>>0;let _t=!1;if(!((nt==null?void 0:nt.platformId)===Ct&&(nt==null?void 0:nt.encodingId)===ft)){if(Ct===0&&(ft===0||ft===1||ft===3))_t=!0;else if(Ct===1&&ft===0)_t=!0;else if(Ct===3&&ft===1&&(it||!nt))_t=!0,Ze||(gt=!0);else if(Ze&&Ct===3&&ft===0){_t=!0;let zt=!0;if(pt<lt-1){const kt=Xe.peekBytes(2);u(kt[0],kt[1])<Ct&&(zt=!1)}zt&&(gt=!0)}if(_t&&(nt={platformId:Ct,encodingId:ft,offset:Tt}),gt)break}}if(nt&&(Xe.pos=xt+nt.offset),!nt||Xe.peekByte()===-1)return(0,n.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};const vt=Xe.getUint16();let Mt=!1;const At=[];let St,It;if(vt===0){for(Xe.skip(4),St=0;St<256;St++){const pt=Xe.getByte();pt&&At.push({charCode:St,glyphId:pt})}Mt=!0}else if(vt===2){Xe.skip(4);const pt=[];let Ct=0;for(let Tt=0;Tt<256;Tt++){const _t=Xe.getUint16()>>3;pt.push(_t),Ct=Math.max(_t,Ct)}const ft=[];for(let Tt=0;Tt<=Ct;Tt++)ft.push({firstCode:Xe.getUint16(),entryCount:Xe.getUint16(),idDelta:U(Xe.getByte(),Xe.getByte()),idRangePos:Xe.pos+Xe.getUint16()});for(let Tt=0;Tt<256;Tt++)if(pt[Tt]===0)Xe.pos=ft[0].idRangePos+2*Tt,It=Xe.getUint16(),At.push({charCode:Tt,glyphId:It});else{const _t=ft[pt[Tt]];for(St=0;St<_t.entryCount;St++){const zt=(Tt<<8)+St+_t.firstCode;Xe.pos=_t.idRangePos+2*St,It=Xe.getUint16(),It!==0&&(It=(It+_t.idDelta)%65536),At.push({charCode:zt,glyphId:It})}}}else if(vt===4){Xe.skip(4);const pt=Xe.getUint16()>>1;Xe.skip(6);const Ct=[];let ft;for(ft=0;ft<pt;ft++)Ct.push({end:Xe.getUint16()});for(Xe.skip(2),ft=0;ft<pt;ft++)Ct[ft].start=Xe.getUint16();for(ft=0;ft<pt;ft++)Ct[ft].delta=Xe.getUint16();let Tt=0,_t;for(ft=0;ft<pt;ft++){ct=Ct[ft];const kt=Xe.getUint16();if(!kt){ct.offsetIndex=-1;continue}_t=(kt>>1)-(pt-ft),ct.offsetIndex=_t,Tt=Math.max(Tt,_t+ct.end-ct.start+1)}const zt=[];for(St=0;St<Tt;St++)zt.push(Xe.getUint16());for(ft=0;ft<pt;ft++){ct=Ct[ft],xt=ct.start;const kt=ct.end,Ft=ct.delta;for(_t=ct.offsetIndex,St=xt;St<=kt;St++)St!==65535&&(It=_t<0?St:zt[_t+St-xt],It=It+Ft&65535,At.push({charCode:St,glyphId:It}))}}else if(vt===6){Xe.skip(4);const pt=Xe.getUint16(),Ct=Xe.getUint16();for(St=0;St<Ct;St++){It=Xe.getUint16();const ft=pt+St;At.push({charCode:ft,glyphId:It})}}else if(vt===12){Xe.skip(10);const pt=Xe.getInt32()>>>0;for(St=0;St<pt;St++){const Ct=Xe.getInt32()>>>0,ft=Xe.getInt32()>>>0;let Tt=Xe.getInt32()>>>0;for(let _t=Ct;_t<=ft;_t++)At.push({charCode:_t,glyphId:Tt++})}}else return(0,n.warn)("cmap table has unsupported format: "+vt),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};At.sort(function(pt,Ct){return pt.charCode-Ct.charCode});for(let pt=1;pt<At.length;pt++)At[pt-1].charCode===At[pt].charCode&&(At.splice(pt,1),pt--);return{platformId:nt.platformId,encodingId:nt.encodingId,mappings:At,hasShortCmap:Mt}}function fe(We,Xe,Ze,it,ct,xt){if(!Xe){Ze&&(Ze.data=null);return}We.pos=(We.start||0)+Xe.offset,We.pos+=4,We.pos+=2,We.pos+=2,We.pos+=2,We.pos+=2,We.pos+=2,We.pos+=2,We.pos+=2,We.pos+=2,We.pos+=2;const lt=We.getUint16();We.pos+=8,We.pos+=2;let nt=We.getUint16();lt!==0&&(u(it.data[44],it.data[45])&2||(Xe.data[22]=0,Xe.data[23]=0)),nt>ct&&((0,n.info)(`The numOfMetrics (${nt}) should not be greater than the numGlyphs (${ct}).`),nt=ct,Xe.data[34]=(nt&65280)>>8,Xe.data[35]=nt&255);const vt=ct-nt-(Ze.length-nt*4>>1);if(vt>0){const Mt=new Uint8Array(Ze.length+vt*2);Mt.set(Ze.data),xt&&(Mt[Ze.length]=Ze.data[2],Mt[Ze.length+1]=Ze.data[3]),Ze.data=Mt}}function xe(We,Xe,Ze,it,ct,xt){const lt={length:0,sizeOfInstructions:0};if(Xe<0||Xe>=We.length||Ze>We.length||Ze-Xe<=12)return lt;const nt=We.subarray(Xe,Ze),gt=U(nt[2],nt[3]),vt=U(nt[4],nt[5]),Mt=U(nt[6],nt[7]),At=U(nt[8],nt[9]);gt>Mt&&(F(nt,2,Mt),F(nt,6,gt)),vt>At&&(F(nt,4,At),F(nt,8,vt));const St=U(nt[0],nt[1]);if(St<0)return St<-1||(it.set(nt,ct),lt.length=nt.length),lt;let It,pt=10,Ct=0;for(It=0;It<St;It++)Ct=(nt[pt]<<8|nt[pt+1])+1,pt+=2;const ft=pt,Tt=nt[pt]<<8|nt[pt+1];lt.sizeOfInstructions=Tt,pt+=2+Tt;const _t=pt;let zt=0;for(It=0;It<Ct;It++){const Ft=nt[pt++];Ft&192&&(nt[pt-1]=Ft&63);let Nt=2;Ft&2?Nt=1:Ft&16&&(Nt=0);let Ut=2;Ft&4?Ut=1:Ft&32&&(Ut=0);const Vt=Nt+Ut;if(zt+=Vt,Ft&8){const nn=nt[pt++];nn===0&&(nt[pt-1]^=8),It+=nn,zt+=nn*Vt}}if(zt===0)return lt;let kt=pt+zt;return kt>nt.length?lt:!xt&&Tt>0?(it.set(nt.subarray(0,ft),ct),it.set([0,0],ct+ft),it.set(nt.subarray(_t,kt),ct+ft+2),kt-=Tt,nt.length-kt>3&&(kt=kt+3&-4),lt.length=kt,lt):nt.length-kt>3?(kt=kt+3&-4,it.set(nt.subarray(0,kt),ct),lt.length=kt,lt):(it.set(nt,ct),lt.length=nt.length,lt)}function Te(We,Xe,Ze){const it=We.data,ct=O(it[0],it[1],it[2],it[3]);ct>>16!==1&&((0,n.info)("Attempting to fix invalid version in head table: "+ct),it[0]=0,it[1]=1,it[2]=0,it[3]=0);const xt=u(it[50],it[51]);if(xt<0||xt>1){(0,n.info)("Attempting to fix invalid indexToLocFormat in head table: "+xt);const lt=Xe+1;if(Ze===lt<<1)it[50]=0,it[51]=0;else if(Ze===lt<<2)it[50]=0,it[51]=1;else throw new n.FormatError("Could not fix indexToLocFormat: "+xt)}}function Le(We,Xe,Ze,it,ct,xt,lt){let nt,gt,vt;it?(nt=4,gt=function(Nt,Ut){return Nt[Ut]<<24|Nt[Ut+1]<<16|Nt[Ut+2]<<8|Nt[Ut+3]},vt=function(Nt,Ut,Vt){Nt[Ut]=Vt>>>24&255,Nt[Ut+1]=Vt>>16&255,Nt[Ut+2]=Vt>>8&255,Nt[Ut+3]=Vt&255}):(nt=2,gt=function(Nt,Ut){return Nt[Ut]<<9|Nt[Ut+1]<<1},vt=function(Nt,Ut,Vt){Nt[Ut]=Vt>>9&255,Nt[Ut+1]=Vt>>1&255});const Mt=xt?Ze+1:Ze,At=nt*(1+Mt),St=new Uint8Array(At);St.set(We.data.subarray(0,At)),We.data=St;const It=Xe.data,pt=It.length,Ct=new Uint8Array(pt);let ft,Tt;const _t=[];for(ft=0,Tt=0;ft<Ze+1;ft++,Tt+=nt){let Ft=gt(St,Tt);Ft>pt&&(Ft=pt),_t.push({index:ft,offset:Ft,endOffset:0})}for(_t.sort((Ft,Nt)=>Ft.offset-Nt.offset),ft=0;ft<Ze;ft++)_t[ft].endOffset=_t[ft+1].offset;for(_t.sort((Ft,Nt)=>Ft.index-Nt.index),ft=0;ft<Ze;ft++){const{offset:Ft,endOffset:Nt}=_t[ft];if(Ft!==0||Nt!==0)break;const Ut=_t[ft+1].offset;if(Ut!==0){_t[ft].endOffset=Ut;break}}const zt=Object.create(null);let kt=0;for(vt(St,0,kt),ft=0,Tt=nt;ft<Ze;ft++,Tt+=nt){const Ft=xe(It,_t[ft].offset,_t[ft].endOffset,Ct,kt,ct),Nt=Ft.length;Nt===0&&(zt[ft]=!0),Ft.sizeOfInstructions>lt&&(lt=Ft.sizeOfInstructions),kt+=Nt,vt(St,Tt,kt)}if(kt===0){const Ft=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(ft=0,Tt=nt;ft<Mt;ft++,Tt+=nt)vt(St,Tt,Ft.length);Xe.data=Ft}else if(xt){const Ft=gt(St,nt);Ct.length>Ft+kt?Xe.data=Ct.subarray(0,Ft+kt):(Xe.data=new Uint8Array(Ft+kt),Xe.data.set(Ct.subarray(0,kt))),Xe.data.set(Ct.subarray(0,Ft),kt),vt(We.data,St.length-nt,kt+Ft)}else Xe.data=Ct.subarray(0,kt);return{missingGlyphs:zt,maxSizeOfInstructions:lt}}function Ie(We,Xe,Ze){const it=(ne.start||0)+We.offset;ne.pos=it;const ct=We.length,xt=it+ct,lt=ne.getInt32();ne.skip(28);let nt,gt=!0,vt;switch(lt){case 65536:nt=R.MacStandardGlyphOrdering;break;case 131072:const Mt=ne.getUint16();if(Mt!==Ze){gt=!1;break}const At=[];for(vt=0;vt<Mt;++vt){const pt=ne.getUint16();if(pt>=32768){gt=!1;break}At.push(pt)}if(!gt)break;const St=[],It=[];for(;ne.pos<xt;){const pt=ne.getByte();for(It.length=pt,vt=0;vt<pt;++vt)It[vt]=String.fromCharCode(ne.getByte());St.push(It.join(""))}for(nt=[],vt=0;vt<Mt;++vt){const pt=At[vt];if(pt<258){nt.push(R.MacStandardGlyphOrdering[pt]);continue}nt.push(St[pt-258])}break;case 196608:break;default:(0,n.warn)("Unknown/unsupported post table version "+lt),gt=!1,Xe.defaultEncoding&&(nt=Xe.defaultEncoding);break}return Xe.glyphNames=nt,gt}function ue(We){const Xe=(ne.start||0)+We.offset;ne.pos=Xe;const Ze=[[],[]],it=[],ct=We.length,xt=Xe+ct;if(ne.getUint16()!==0||ct<6)return[Ze,it];const gt=ne.getUint16(),vt=ne.getUint16(),Mt=12;let At,St;for(At=0;At<gt&&ne.pos+Mt<=xt;At++){const It={platform:ne.getUint16(),encoding:ne.getUint16(),language:ne.getUint16(),name:ne.getUint16(),length:ne.getUint16(),offset:ne.getUint16()};(q(It)||re(It))&&it.push(It)}for(At=0,St=it.length;At<St;At++){const It=it[At];if(It.length<=0)continue;const pt=Xe+vt+It.offset;if(pt+It.length>xt)continue;ne.pos=pt;const Ct=It.name;if(It.encoding){let ft="";for(let Tt=0,_t=It.length;Tt<_t;Tt+=2)ft+=String.fromCharCode(ne.getUint16());Ze[1][Ct]=ft}else Ze[0][Ct]=ne.getString(It.length)}return[Ze,it]}const me=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function De(We,Xe){let Ze=We.data,it=0,ct,xt,lt,nt,gt,vt=0,Mt=0;const At=[],St=[],It=[];let pt=Xe.tooComplexToFollowFunctions,Ct=!1,ft=0,Tt=0;for(let zt=Ze.length;it<zt;){const kt=Ze[it++];if(kt===64)if(xt=Ze[it++],Ct||Tt)it+=xt;else for(ct=0;ct<xt;ct++)At.push(Ze[it++]);else if(kt===65)if(xt=Ze[it++],Ct||Tt)it+=xt*2;else for(ct=0;ct<xt;ct++)lt=Ze[it++],At.push(lt<<8|Ze[it++]);else if((kt&248)===176)if(xt=kt-176+1,Ct||Tt)it+=xt;else for(ct=0;ct<xt;ct++)At.push(Ze[it++]);else if((kt&248)===184)if(xt=kt-184+1,Ct||Tt)it+=xt*2;else for(ct=0;ct<xt;ct++)lt=Ze[it++],At.push(lt<<8|Ze[it++]);else if(kt===43&&!pt){if(!Ct&&!Tt){if(nt=At.at(-1),isNaN(nt))(0,n.info)("TT: CALL empty stack (or invalid entry).");else if(Xe.functionsUsed[nt]=!0,nt in Xe.functionsStackDeltas){const Ft=At.length+Xe.functionsStackDeltas[nt];if(Ft<0){(0,n.warn)("TT: CALL invalid functions stack delta."),Xe.hintsValid=!1;return}At.length=Ft}else if(nt in Xe.functionsDefined&&!It.includes(nt)){if(St.push({data:Ze,i:it,stackTop:At.length-1}),It.push(nt),gt=Xe.functionsDefined[nt],!gt){(0,n.warn)("TT: CALL non-existent function"),Xe.hintsValid=!1;return}Ze=gt.data,it=gt.i}}}else if(kt===44&&!pt)(Ct||Tt)&&((0,n.warn)("TT: nested FDEFs not allowed"),pt=!0),Ct=!0,Mt=it,nt=At.pop(),Xe.functionsDefined[nt]={data:Ze,i:it};else if(kt===45)if(Ct)Ct=!1,vt=it;else{if(gt=St.pop(),!gt){(0,n.warn)("TT: ENDF bad stack"),Xe.hintsValid=!1;return}nt=It.pop(),Ze=gt.data,it=gt.i,Xe.functionsStackDeltas[nt]=At.length-gt.stackTop}else if(kt===137)(Ct||Tt)&&((0,n.warn)("TT: nested IDEFs not allowed"),pt=!0),Ct=!0,Mt=it;else if(kt===88)++ft;else if(kt===27)Tt=ft;else if(kt===89)Tt===ft&&(Tt=0),--ft;else if(kt===28&&!Ct&&!Tt){const Ft=At.at(-1);Ft>0&&(it+=Ft-1)}if(!Ct&&!Tt){let Ft=0;for(kt<=142?Ft=me[kt]:kt>=192&&kt<=223?Ft=-1:kt>=224&&(Ft=-2),kt>=113&&kt<=117&&(xt=At.pop(),isNaN(xt)||(Ft=-xt*2));Ft<0&&At.length>0;)At.pop(),Ft++;for(;Ft>0;)At.push(NaN),Ft--}}Xe.tooComplexToFollowFunctions=pt;const _t=[Ze];it>Ze.length&&_t.push(new Uint8Array(it-Ze.length)),Mt>vt&&((0,n.warn)("TT: complementing a missing function tail"),_t.push(new Uint8Array([34,45]))),je(We,_t)}function Fe(We,Xe){if(!We.tooComplexToFollowFunctions){if(We.functionsDefined.length>Xe){(0,n.warn)("TT: more functions defined than expected"),We.hintsValid=!1;return}for(let Ze=0,it=We.functionsUsed.length;Ze<it;Ze++){if(Ze>Xe){(0,n.warn)("TT: invalid function id: "+Ze),We.hintsValid=!1;return}if(We.functionsUsed[Ze]&&!We.functionsDefined[Ze]){(0,n.warn)("TT: undefined function: "+Ze),We.hintsValid=!1;return}}}}function je(We,Xe){if(Xe.length>1){let Ze=0,it,ct;for(it=0,ct=Xe.length;it<ct;it++)Ze+=Xe[it].length;Ze=Ze+3&-4;const xt=new Uint8Array(Ze);let lt=0;for(it=0,ct=Xe.length;it<ct;it++)xt.set(Xe[it],lt),lt+=Xe[it].length;We.data=xt,We.length=Ze}}function Ue(We,Xe,Ze,it){const ct={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(We&&De(We,ct),Xe&&De(Xe,ct),We&&Fe(ct,it),Ze&&Ze.length&1){const xt=new Uint8Array(Ze.length+1);xt.set(Ze.data),Ze.data=xt}return ct.hintsValid}ne=new v.Stream(new Uint8Array(ne.getBytes()));let ht,_e;if(r(ne)){const We=pe(ne,this.name);ht=We.header,_e=We.tables}else ht=Ae(ne),_e=ce(ne,ht.numTables);let st,Je;const be=!_e["CFF "];if(be){if(!_e.loca)throw new n.FormatError('Required "loca" table is not found');_e.glyf||((0,n.warn)('Required "glyf" table is not found -- trying to recover.'),_e.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{const We=V.composite&&(((ot=V.cidToGidMap)==null?void 0:ot.length)>0||!(V.cMap instanceof i.IdentityCMap));if(ht.version==="OTTO"&&!We||!_e.head||!_e.hhea||!_e.maxp||!_e.post)return Je=new v.Stream(_e["CFF "].data),st=new I.CFFFont(Je,V),E(V),this.convert(se,st,V);delete _e.glyf,delete _e.loca,delete _e.fpgm,delete _e.prep,delete _e["cvt "],this.isOpenType=!0}if(!_e.maxp)throw new n.FormatError('Required "maxp" table is not found');ne.pos=(ne.start||0)+_e.maxp.offset;const he=ne.getInt32(),ye=ne.getUint16();if(((yt=V.scaleFactors)==null?void 0:yt.length)===ye&&be){const{scaleFactors:We}=V,Xe=u(_e.head.data[50],_e.head.data[51]),Ze=new f.GlyfTable({glyfTable:_e.glyf.data,isGlyphLocationsLong:Xe,locaTable:_e.loca.data,numGlyphs:ye});Ze.scale(We);const{glyf:it,loca:ct,isLocationLong:xt}=Ze.write();_e.glyf.data=it,_e.loca.data=ct,xt!==!!Xe&&(_e.head.data[50]=0,_e.head.data[51]=xt?1:0);const lt=_e.hmtx.data;for(let nt=0;nt<ye;nt++){const gt=4*nt,vt=Math.round(We[nt]*u(lt[gt],lt[gt+1]));lt[gt]=vt>>8&255,lt[gt+1]=vt&255;const Mt=Math.round(We[nt]*U(lt[gt+2],lt[gt+3]));F(lt,gt+2,Mt)}}let Se=ye+1,Oe=!0;Se>65535&&(Oe=!1,Se=ye,(0,n.warn)("Not enough space in glyfs to duplicate first glyph."));let Re=0,Ne=0;he>=65536&&_e.maxp.length>=22&&(ne.pos+=8,ne.getUint16()>2&&(_e.maxp.data[14]=0,_e.maxp.data[15]=2),ne.pos+=4,Re=ne.getUint16(),ne.pos+=4,Ne=ne.getUint16()),_e.maxp.data[4]=Se>>8,_e.maxp.data[5]=Se&255;const Ye=Ue(_e.fpgm,_e.prep,_e["cvt "],Re);if(Ye||(delete _e.fpgm,delete _e.prep,delete _e["cvt "]),fe(ne,_e.hhea,_e.hmtx,_e.head,Se,Oe),!_e.head)throw new n.FormatError('Required "head" table is not found');Te(_e.head,ye,be?_e.loca.length:0);let Ge=Object.create(null);if(be){const We=u(_e.head.data[50],_e.head.data[51]),Xe=Le(_e.loca,_e.glyf,ye,We,Ye,Oe,Ne);Ge=Xe.missingGlyphs,he>=65536&&_e.maxp.length>=22&&(_e.maxp.data[26]=Xe.maxSizeOfInstructions>>8,_e.maxp.data[27]=Xe.maxSizeOfInstructions&255)}if(!_e.hhea)throw new n.FormatError('Required "hhea" table is not found');_e.hhea.data[10]===0&&_e.hhea.data[11]===0&&(_e.hhea.data[10]=255,_e.hhea.data[11]=255);const ze={unitsPerEm:u(_e.head.data[18],_e.head.data[19]),yMax:U(_e.head.data[42],_e.head.data[43]),yMin:U(_e.head.data[38],_e.head.data[39]),ascent:U(_e.hhea.data[4],_e.hhea.data[5]),descent:U(_e.hhea.data[6],_e.hhea.data[7]),lineGap:U(_e.hhea.data[8],_e.hhea.data[9])};this.ascent=ze.ascent/ze.unitsPerEm,this.descent=ze.descent/ze.unitsPerEm,this.lineGap=ze.lineGap/ze.unitsPerEm,(Et=this.cssFontInfo)!=null&&Et.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,_e.post&&Ie(_e.post,V,ye),_e.post={tag:"post",data:Y(V)};const Qe=[];function tt(We){return!Ge[We]}if(V.composite){const We=V.cidToGidMap||[],Xe=We.length===0;V.cMap.forEach(function(Ze,it){if(typeof it=="string"&&(it=K(Ze,it,!0)),it>65535)throw new n.FormatError("Max size of CID is 65,535");let ct=-1;Xe?ct=it:We[it]!==void 0&&(ct=We[it]),ct>=0&&ct<ye&&tt(ct)&&(Qe[Ze]=ct)})}else{const We=ge(_e.cmap,ne,this.isSymbolicFont,V.hasEncoding),Xe=We.platformId,Ze=We.encodingId,it=We.mappings;let ct=[],xt=!1;if(V.hasEncoding&&(V.baseEncodingName==="MacRomanEncoding"||V.baseEncodingName==="WinAnsiEncoding")&&(ct=(0,o.getEncoding)(V.baseEncodingName)),V.hasEncoding&&!this.isSymbolicFont&&(Xe===3&&Ze===1||Xe===1&&Ze===0)){const lt=(0,t.getGlyphsUnicode)();for(let nt=0;nt<256;nt++){let gt;if(this.differences[nt]!==void 0?gt=this.differences[nt]:ct.length&&ct[nt]!==""?gt=ct[nt]:gt=o.StandardEncoding[nt],!gt)continue;const vt=(0,R.recoverGlyphName)(gt,lt);let Mt;if(Xe===3&&Ze===1?Mt=lt[vt]:Xe===1&&Ze===0&&(Mt=o.MacRomanEncoding.indexOf(vt)),Mt===void 0){if(!V.glyphNames&&V.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof L.IdentityToUnicodeMap)){const At=this.toUnicode.get(nt);At&&(Mt=At.codePointAt(0))}if(Mt===void 0)continue}for(const At of it)if(At.charCode===Mt){Qe[nt]=At.glyphId;break}}}else if(Xe===0){for(const lt of it)Qe[lt.charCode]=lt.glyphId;xt=!0}else for(const lt of it){let nt=lt.charCode;Xe===3&&nt>=61440&&nt<=61695&&(nt&=255),Qe[nt]=lt.glyphId}if(V.glyphNames&&(ct.length||this.differences.length))for(let lt=0;lt<256;++lt){if(!xt&&Qe[lt]!==void 0)continue;const nt=this.differences[lt]||ct[lt];if(!nt)continue;const gt=V.glyphNames.indexOf(nt);gt>0&&tt(gt)&&(Qe[lt]=gt)}}Qe.length===0&&(Qe[0]=0);let rt=Se-1;if(Oe||(rt=0),!V.cssFontInfo){const We=oe(Qe,tt,rt,this.toUnicode);this.toFontChar=We.toFontChar,_e.cmap={tag:"cmap",data:te(We.charCodeToGlyphId,We.toUnicodeExtraMap,Se)},(!_e["OS/2"]||!B(_e["OS/2"],ne))&&(_e["OS/2"]={tag:"OS/2",data:j(V,We.charCodeToGlyphId,ze)})}if(!be)try{Je=new v.Stream(_e["CFF "].data),st=new k.CFFParser(Je,V,R.SEAC_ANALYSIS_ENABLED).parse(),st.duplicateFirstGlyph();const Xe=new k.CFFCompiler(st);_e["CFF "].data=Xe.compile()}catch{(0,n.warn)("Failed to compile font "+V.loadedName)}if(!_e.name)_e.name={tag:"name",data:G(this.name)};else{const[We,Xe]=ue(_e.name);_e.name.data=G(se,We),this.psName=We[0][6]||null,V.composite||l(V,this.isSymbolicFont,Xe)}const ut=new S.OpenTypeFileBuilder(ht.version);for(const We in _e)ut.addTable(We,_e[We].data);return ut.toArray()}convert(se,ne,V){V.fixedPitch=!1,V.builtInEncoding&&g(V,V.builtInEncoding);let ae=1;ne instanceof I.CFFFont&&(ae=ne.numGlyphs-1);const ce=ne.getGlyphMapping(V);let de=null,Ae=ce,ve=null;V.cssFontInfo||(de=oe(ce,ne.hasGlyphId.bind(ne),ae,this.toUnicode),this.toFontChar=de.toFontChar,Ae=de.charCodeToGlyphId,ve=de.toUnicodeExtraMap);const pe=ne.numGlyphs;function ge(Ie,ue){let me=null;for(const De in Ie)ue===Ie[De]&&(me||(me=[])).push(De|0);return me}function fe(Ie,ue){for(const me in Ie)if(ue===Ie[me])return me|0;return de.charCodeToGlyphId[de.nextAvailableFontCharCode]=ue,de.nextAvailableFontCharCode++}const xe=ne.seacs;if(de&&R.SEAC_ANALYSIS_ENABLED&&(xe!=null&&xe.length)){const Ie=V.fontMatrix||n.FONT_IDENTITY_MATRIX,ue=ne.getCharset(),me=Object.create(null);for(let De in xe){De|=0;const Fe=xe[De],je=o.StandardEncoding[Fe[2]],Ue=o.StandardEncoding[Fe[3]],ht=ue.indexOf(je),_e=ue.indexOf(Ue);if(ht<0||_e<0)continue;const st={x:Fe[0]*Ie[0]+Fe[1]*Ie[2]+Ie[4],y:Fe[0]*Ie[1]+Fe[1]*Ie[3]+Ie[5]},Je=ge(ce,De);if(Je)for(const be of Je){const he=de.charCodeToGlyphId,ye=fe(he,ht),Se=fe(he,_e);me[be]={baseFontCharCode:ye,accentFontCharCode:Se,accentOffset:st}}}V.seacMap=me}const Te=1/(V.fontMatrix||n.FONT_IDENTITY_MATRIX)[0],Le=new S.OpenTypeFileBuilder("OTTO");return Le.addTable("CFF ",ne.data),Le.addTable("OS/2",j(V,Ae)),Le.addTable("cmap",te(Ae,ve,pe)),Le.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+x(Te)+"\0\0\0\0ž\v~'\0\0\0\0ž\v~'\0\0"+x(V.descent)+"ÿ"+x(V.ascent)+m(V.italicAngle?2:0)+"\0\0\0\0\0\0\0"),Le.addTable("hhea","\0\0\0"+x(V.ascent)+x(V.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+x(V.capHeight)+x(Math.tan(V.italicAngle)*V.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+m(pe)),Le.addTable("hmtx",function(){const ue=ne.charstrings,me=ne.cff?ne.cff.widths:null;let De="\0\0\0\0";for(let Fe=1,je=pe;Fe<je;Fe++){let Ue=0;if(ue){const ht=ue[Fe-1];Ue="width"in ht?ht.width:0}else me&&(Ue=Math.ceil(me[Fe]||0));De+=m(Ue)+m(0)}return De}()),Le.addTable("maxp","\0\0P\0"+m(pe)),Le.addTable("name",G(se)),Le.addTable("post",Y(V)),Le.toArray()}get spaceWidth(){const se=["space","minus","one","i","I"];let ne;for(const V of se){if(V in this.widths){ne=this.widths[V];break}const ce=(0,t.getGlyphsUnicode)()[V];let de=0;if(this.composite&&this.cMap.contains(ce)&&(de=this.cMap.lookup(ce),typeof de=="string"&&(de=K(ce,de))),!de&&this.toUnicode&&(de=this.toUnicode.charCodeOf(ce)),de<=0&&(de=ce),ne=this.widths[de],ne)break}return(0,n.shadow)(this,"spaceWidth",ne||this.defaultWidth)}_charToGlyph(se,ne=!1){var Te,Le,Ie;let V=this._glyphCache[se];if((V==null?void 0:V.isSpace)===ne)return V;let ae,ce,de,Ae=se;(Te=this.cMap)!=null&&Te.contains(se)&&(Ae=this.cMap.lookup(se),typeof Ae=="string"&&(Ae=K(se,Ae))),ce=this.widths[Ae],typeof ce!="number"&&(ce=this.defaultWidth);const ve=(Le=this.vmetrics)==null?void 0:Le[Ae];let pe=this.toUnicode.get(se)||se;typeof pe=="number"&&(pe=String.fromCharCode(pe));let ge=this.toFontChar[se]!==void 0;if(ae=this.toFontChar[se]||se,this.missingFile){const ue=this.differences[se]||this.defaultEncoding[se];(ue===".notdef"||ue==="")&&this.type==="Type1"&&(ae=32),ae=(0,e.mapSpecialUnicodeValues)(ae)}this.isType3Font&&(de=ae);let fe=null;if((Ie=this.seacMap)!=null&&Ie[se]){ge=!0;const ue=this.seacMap[se];ae=ue.baseFontCharCode,fe={fontChar:String.fromCodePoint(ue.accentFontCharCode),offset:ue.accentOffset}}let xe="";return typeof ae=="number"&&(ae<=1114111?xe=String.fromCodePoint(ae):(0,n.warn)(`charToGlyph - invalid fontCharCode: ${ae}`)),V=new s(se,xe,pe,fe,ce,ve,de,ne,ge),this._glyphCache[se]=V}charsToGlyphs(se){let ne=this._charsCache[se];if(ne)return ne;if(ne=[],this.cMap){const V=Object.create(null),ae=se.length;let ce=0;for(;ce<ae;){this.cMap.readCharCode(se,ce,V);const{charcode:de,length:Ae}=V;ce+=Ae;const ve=this._charToGlyph(de,Ae===1&&se.charCodeAt(ce-1)===32);ne.push(ve)}}else for(let V=0,ae=se.length;V<ae;++V){const ce=se.charCodeAt(V),de=this._charToGlyph(ce,ce===32);ne.push(de)}return this._charsCache[se]=ne}getCharPositions(se){const ne=[];if(this.cMap){const V=Object.create(null);let ae=0;for(;ae<se.length;){this.cMap.readCharCode(se,ae,V);const ce=V.length;ne.push([ae,ae+ce]),ae+=ce}}else for(let V=0,ae=se.length;V<ae;++V)ne.push([V,V+1]);return ne}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(se){const ne=[],V=[],ae=()=>ne.length%2===1,ce=this.toUnicode instanceof L.IdentityToUnicodeMap?de=>this.toUnicode.charCodeOf(de):de=>this.toUnicode.charCodeOf(String.fromCodePoint(de));for(let de=0,Ae=se.length;de<Ae;de++){const ve=se.codePointAt(de);if(ve>55295&&(ve<57344||ve>65533)&&de++,this.toUnicode){const pe=ce(ve);if(pe!==-1){ae()&&(ne.push(V.join("")),V.length=0);const ge=this.cMap?this.cMap.getCharCodeLength(pe):1;for(let fe=ge-1;fe>=0;fe--)V.push(String.fromCharCode(pe>>8*fe&255));continue}}ae()||(ne.push(V.join("")),V.length=0),V.push(String.fromCodePoint(ve))}return ne.push(V.join("")),ne}}P.Font=Q;class ee{constructor(se){this.error=se,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(se){return[se]}exportData(se=!1){return{error:this.error}}}P.ErrorFont=ee},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CFFTopDict=P.CFFStrings=P.CFFStandardStrings=P.CFFPrivateDict=P.CFFParser=P.CFFIndex=P.CFFHeader=P.CFFFDSelect=P.CFFCompiler=P.CFFCharset=P.CFF=void 0;var n=ie(2),k=ie(36),R=ie(37);const e=10,t=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"];P.CFFStandardStrings=t;const o=391,$=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"vvcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],L=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(N,s){N[s-2]=N[s-2]+N[s-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(N,s){N[s-2]=N[s-2]-N[s-1]}},{id:"div",min:2,stackDelta:-1,stackFn(N,s){N[s-2]=N[s-2]/N[s-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(N,s){N[s-1]=-N[s-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(N,s){N[s-2]=N[s-2]*N[s-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];class I{constructor(s,u,F){this.bytes=s.getBytes(),this.properties=u,this.seacAnalysisEnabled=!!F}parse(){const s=this.properties,u=new T;this.cff=u;const F=this.parseHeader(),U=this.parseIndex(F.endPos),O=this.parseIndex(U.endPos),m=this.parseIndex(O.endPos),x=this.parseIndex(m.endPos),y=this.parseDict(O.obj.get(0)),r=this.createDict(v,y,u.strings);u.header=F.obj,u.names=this.parseNameIndex(U.obj),u.strings=this.parseStringIndex(m.obj),u.topDict=r,u.globalSubrIndex=x.obj,this.parsePrivateDict(u.topDict),u.isCIDFont=r.hasName("ROS");const p=r.getByName("CharStrings"),c=this.parseIndex(p).obj,h=r.getByName("FontMatrix");h&&(s.fontMatrix=h);const C=r.getByName("FontBBox");C&&(s.ascent=Math.max(C[3],C[1]),s.descent=Math.min(C[1],C[3]),s.ascentScaled=!0);let D,X;if(u.isCIDFont){const re=this.parseIndex(r.getByName("FDArray")).obj;for(let K=0,oe=re.count;K<oe;++K){const J=re.get(K),te=this.createDict(v,this.parseDict(J),u.strings);this.parsePrivateDict(te),u.fdArray.push(te)}X=null,D=this.parseCharsets(r.getByName("charset"),c.count,u.strings,!0),u.fdSelect=this.parseFDSelect(r.getByName("FDSelect"),c.count)}else D=this.parseCharsets(r.getByName("charset"),c.count,u.strings,!1),X=this.parseEncoding(r.getByName("Encoding"),s,u.strings,D.charset);u.charset=D,u.encoding=X;const q=this.parseCharStrings({charStrings:c,localSubrIndex:r.privateDict.subrsIndex,globalSubrIndex:x.obj,fdSelect:u.fdSelect,fdArray:u.fdArray,privateDict:r.privateDict});return u.charStrings=q.charStrings,u.seacs=q.seacs,u.widths=q.widths,u}parseHeader(){let s=this.bytes;const u=s.length;let F=0;for(;F<u&&s[F]!==1;)++F;if(F>=u)throw new n.FormatError("Invalid CFF header");F!==0&&((0,n.info)("cff data is shifted"),s=s.subarray(F),this.bytes=s);const U=s[0],O=s[1],m=s[2],x=s[3];return{obj:new d(U,O,m,x),endPos:m}}parseDict(s){let u=0;function F(){let y=s[u++];return y===30?U():y===28?(y=s[u++],y=(y<<24|s[u++]<<16)>>16,y):y===29?(y=s[u++],y=y<<8|s[u++],y=y<<8|s[u++],y=y<<8|s[u++],y):y>=32&&y<=246?y-139:y>=247&&y<=250?(y-247)*256+s[u++]+108:y>=251&&y<=254?-((y-251)*256)-s[u++]-108:((0,n.warn)('CFFParser_parseDict: "'+y+'" is a reserved command.'),NaN)}function U(){let y="";const p=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],c=s.length;for(;u<c;){const h=s[u++],C=h>>4,D=h&15;if(C===15||(y+=p[C],D===15))break;y+=p[D]}return parseFloat(y)}let O=[];const m=[];u=0;const x=s.length;for(;u<x;){let y=s[u];y<=21?(y===12&&(y=y<<8|s[++u]),m.push([y,O]),O=[],++u):O.push(F())}return m}parseIndex(s){const u=new i,F=this.bytes,U=F[s++]<<8|F[s++],O=[];let m=s,x,y;if(U!==0){const r=F[s++],p=s+(U+1)*r-1;for(x=0,y=U+1;x<y;++x){let c=0;for(let h=0;h<r;++h)c<<=8,c+=F[s++];O.push(p+c)}m=O[U]}for(x=0,y=O.length-1;x<y;++x){const r=O[x],p=O[x+1];u.add(F.subarray(r,p))}return{obj:u,endPos:m}}parseNameIndex(s){const u=[];for(let F=0,U=s.count;F<U;++F){const O=s.get(F);u.push((0,n.bytesToString)(O))}return u}parseStringIndex(s){const u=new f;for(let F=0,U=s.count;F<U;++F){const O=s.get(F);u.add((0,n.bytesToString)(O))}return u}createDict(s,u,F){const U=new s(F);for(const[O,m]of u)U.setByKey(O,m);return U}parseCharString(s,u,F,U){if(!u||s.callDepth>e)return!1;let O=s.stackSize;const m=s.stack;let x=u.length;for(let y=0;y<x;){const r=u[y++];let p=null;if(r===12){const c=u[y++];c===0?(u[y-2]=139,u[y-1]=22,O=0):p=L[c]}else if(r===28)m[O]=(u[y]<<24|u[y+1]<<16)>>16,y+=2,O++;else if(r===14){if(O>=4&&(O-=4,this.seacAnalysisEnabled))return s.seac=m.slice(O,O+4),!1;p=$[r]}else if(r>=32&&r<=246)m[O]=r-139,O++;else if(r>=247&&r<=254)m[O]=r<251?(r-247<<8)+u[y]+108:-(r-251<<8)-u[y]-108,y++,O++;else if(r===255)m[O]=(u[y]<<24|u[y+1]<<16|u[y+2]<<8|u[y+3])/65536,y+=4,O++;else if(r===19||r===20){if(s.hints+=O>>1,s.hints===0){u.copyWithin(y-1,y,-1),y-=1,x-=1;continue}y+=s.hints+7>>3,O%=2,p=$[r]}else if(r===10||r===29){const c=r===10?F:U;if(!c)return p=$[r],(0,n.warn)("Missing subrsIndex for "+p.id),!1;let h=32768;c.count<1240?h=107:c.count<33900&&(h=1131);const C=m[--O]+h;if(C<0||C>=c.count||isNaN(C))return p=$[r],(0,n.warn)("Out of bounds subrIndex for "+p.id),!1;if(s.stackSize=O,s.callDepth++,!this.parseCharString(s,c.get(C),F,U))return!1;s.callDepth--,O=s.stackSize;continue}else{if(r===11)return s.stackSize=O,!0;if(r===0&&y===u.length)u[y-1]=14,p=$[14];else if(r===9){u.copyWithin(y-1,y,-1),y-=1,x-=1;continue}else p=$[r]}if(p){if(p.stem&&(s.hints+=O>>1,r===3||r===23?s.hasVStems=!0:s.hasVStems&&(r===1||r===18)&&((0,n.warn)("CFF stem hints are in wrong order"),u[y-1]=r===1?3:23)),"min"in p&&!s.undefStack&&O<p.min)return(0,n.warn)("Not enough parameters for "+p.id+"; actual: "+O+", expected: "+p.min),O===0?(u[y-1]=14,!0):!1;s.firstStackClearing&&p.stackClearing&&(s.firstStackClearing=!1,O-=p.min,O>=2&&p.stem?O%=2:O>1&&(0,n.warn)("Found too many parameters for stack-clearing command"),O>0&&(s.width=m[O-1])),"stackDelta"in p?("stackFn"in p&&p.stackFn(m,O),O+=p.stackDelta):p.stackClearing?O=0:p.resetStack?(O=0,s.undefStack=!1):p.undefStack&&(O=0,s.undefStack=!0,s.firstStackClearing=!1)}}return x<u.length&&u.fill(14,x),s.stackSize=O,!0}parseCharStrings({charStrings:s,localSubrIndex:u,globalSubrIndex:F,fdSelect:U,fdArray:O,privateDict:m}){const x=[],y=[],r=s.count;for(let p=0;p<r;p++){const c=s.get(p),h={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let C=!0,D=null,X=m;if(U&&O.length){const q=U.getFDIndex(p);q===-1&&((0,n.warn)("Glyph index is not in fd select."),C=!1),q>=O.length&&((0,n.warn)("Invalid fd index for glyph index."),C=!1),C&&(X=O[q].privateDict,D=X.subrsIndex)}else u&&(D=u);if(C&&(C=this.parseCharString(h,c,D,F)),h.width!==null){const q=X.getByName("nominalWidthX");y[p]=q+h.width}else{const q=X.getByName("defaultWidthX");y[p]=q}h.seac!==null&&(x[p]=h.seac),C||s.set(p,new Uint8Array([14]))}return{charStrings:s,seacs:x,widths:y}}emptyPrivateDictionary(s){const u=this.createDict(M,[],s.strings);s.setByKey(18,[0,0]),s.privateDict=u}parsePrivateDict(s){if(!s.hasName("Private")){this.emptyPrivateDictionary(s);return}const u=s.getByName("Private");if(!Array.isArray(u)||u.length!==2){s.removeByName("Private");return}const F=u[0],U=u[1];if(F===0||U>=this.bytes.length){this.emptyPrivateDictionary(s);return}const O=U+F,m=this.bytes.subarray(U,O),x=this.parseDict(m),y=this.createDict(M,x,s.strings);if(s.privateDict=y,y.getByName("ExpansionFactor")===0&&y.setByName("ExpansionFactor",.06),!y.getByName("Subrs"))return;const r=y.getByName("Subrs"),p=U+r;if(r===0||p>=this.bytes.length){this.emptyPrivateDictionary(s);return}const c=this.parseIndex(p);y.subrsIndex=c.obj}parseCharsets(s,u,F,U){if(s===0)return new H(!0,_.ISO_ADOBE,k.ISOAdobeCharset);if(s===1)return new H(!0,_.EXPERT,k.ExpertCharset);if(s===2)return new H(!0,_.EXPERT_SUBSET,k.ExpertSubsetCharset);const O=this.bytes,m=s,x=O[s++],y=[U?0:".notdef"];let r,p,c;switch(u-=1,x){case 0:for(c=0;c<u;c++)r=O[s++]<<8|O[s++],y.push(U?r:F.get(r));break;case 1:for(;y.length<=u;)for(r=O[s++]<<8|O[s++],p=O[s++],c=0;c<=p;c++)y.push(U?r++:F.get(r++));break;case 2:for(;y.length<=u;)for(r=O[s++]<<8|O[s++],p=O[s++]<<8|O[s++],c=0;c<=p;c++)y.push(U?r++:F.get(r++));break;default:throw new n.FormatError("Unknown charset format")}const h=s,C=O.subarray(m,h);return new H(!1,x,y,C)}parseEncoding(s,u,F,U){const O=Object.create(null),m=this.bytes;let x=!1,y,r,p,c=null;function h(){const C=m[s++];for(r=0;r<C;r++){const D=m[s++],X=(m[s++]<<8)+(m[s++]&255);O[D]=U.indexOf(F.get(X))}}if(s===0||s===1){x=!0,y=s;const C=s?R.ExpertEncoding:R.StandardEncoding;for(r=0,p=U.length;r<p;r++){const D=C.indexOf(U[r]);D!==-1&&(O[D]=r)}}else{const C=s;switch(y=m[s++],y&127){case 0:const X=m[s++];for(r=1;r<=X;r++)O[m[s++]]=r;break;case 1:const q=m[s++];let re=1;for(r=0;r<q;r++){const K=m[s++],oe=m[s++];for(let J=K;J<=K+oe;J++)O[J]=re++}break;default:throw new n.FormatError(`Unknown encoding format: ${y} in CFF`)}const D=s;y&128&&(m[C]&=127,h()),c=m.subarray(C,D)}return y&=127,new A(x,y,O,c)}parseFDSelect(s,u){const F=this.bytes,U=F[s++],O=[];let m;switch(U){case 0:for(m=0;m<u;++m){const y=F[s++];O.push(y)}break;case 3:const x=F[s++]<<8|F[s++];for(m=0;m<x;++m){let y=F[s++]<<8|F[s++];m===0&&y!==0&&((0,n.warn)("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),y=0);const r=F[s++],p=F[s]<<8|F[s+1];for(let c=y;c<p;++c)O.push(r)}s+=2;break;default:throw new n.FormatError(`parseFDSelect: Unknown format "${U}".`)}if(O.length!==u)throw new n.FormatError("parseFDSelect: Invalid font data.");return new E(U,O)}}P.CFFParser=I;class T{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new f,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535){(0,n.warn)("Not enough space in charstrings to duplicate first glyph.");return}const s=this.charStrings.get(0);this.charStrings.add(s),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(s){return s<0||s>=this.charStrings.count?!1:this.charStrings.get(s).length>0}}P.CFF=T;class d{constructor(s,u,F,U){this.major=s,this.minor=u,this.hdrSize=F,this.offSize=U}}P.CFFHeader=d;class f{constructor(){this.strings=[]}get(s){return s>=0&&s<=o-1?t[s]:s-o<=this.strings.length?this.strings[s-o]:t[0]}getSID(s){let u=t.indexOf(s);return u!==-1?u:(u=this.strings.indexOf(s),u!==-1?u+o:-1)}add(s){this.strings.push(s)}get count(){return this.strings.length}}P.CFFStrings=f;class i{constructor(){this.objects=[],this.length=0}add(s){this.length+=s.length,this.objects.push(s)}set(s,u){this.length+=u.length-this.objects[s].length,this.objects[s]=u}get(s){return this.objects[s]}get count(){return this.objects.length}}P.CFFIndex=i;class S{constructor(s,u){this.keyToNameMap=s.keyToNameMap,this.nameToKeyMap=s.nameToKeyMap,this.defaults=s.defaults,this.types=s.types,this.opcodes=s.opcodes,this.order=s.order,this.strings=u,this.values=Object.create(null)}setByKey(s,u){if(!(s in this.keyToNameMap))return!1;if(u.length===0)return!0;for(const U of u)if(isNaN(U))return(0,n.warn)(`Invalid CFFDict value: "${u}" for key "${s}".`),!0;const F=this.types[s];return(F==="num"||F==="sid"||F==="offset")&&(u=u[0]),this.values[s]=u,!0}setByName(s,u){if(!(s in this.nameToKeyMap))throw new n.FormatError(`Invalid dictionary name "${s}"`);this.values[this.nameToKeyMap[s]]=u}hasName(s){return this.nameToKeyMap[s]in this.values}getByName(s){if(!(s in this.nameToKeyMap))throw new n.FormatError(`Invalid dictionary name ${s}"`);const u=this.nameToKeyMap[s];return u in this.values?this.values[u]:this.defaults[u]}removeByName(s){delete this.values[this.nameToKeyMap[s]]}static createTables(s){const u={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const F of s){const U=Array.isArray(F[0])?(F[0][0]<<8)+F[0][1]:F[0];u.keyToNameMap[U]=F[1],u.nameToKeyMap[F[1]]=U,u.types[U]=F[2],u.defaults[U]=F[3],u.opcodes[U]=Array.isArray(F[0])?F[0]:[F[0]],u.order.push(U)}return u}}const w=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class v extends S{static get tables(){return(0,n.shadow)(this,"tables",this.createTables(w))}constructor(s){super(v.tables,s),this.privateDict=null}}P.CFFTopDict=v;const b=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class M extends S{static get tables(){return(0,n.shadow)(this,"tables",this.createTables(b))}constructor(s){super(M.tables,s),this.subrsIndex=null}}P.CFFPrivateDict=M;const _={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class H{constructor(s,u,F,U){this.predefined=s,this.format=u,this.charset=F,this.raw=U}}P.CFFCharset=H;class A{constructor(s,u,F,U){this.predefined=s,this.format=u,this.encoding=F,this.raw=U}}class E{constructor(s,u){this.format=s,this.fdSelect=u}getFDIndex(s){return s<0||s>=this.fdSelect.length?-1:this.fdSelect[s]}}P.CFFFDSelect=E;class l{constructor(){this.offsets=Object.create(null)}isTracking(s){return s in this.offsets}track(s,u){if(s in this.offsets)throw new n.FormatError(`Already tracking location of ${s}`);this.offsets[s]=u}offset(s){for(const u in this.offsets)this.offsets[u]+=s}setEntryLocation(s,u,F){if(!(s in this.offsets))throw new n.FormatError(`Not tracking location of ${s}`);const U=F.data,O=this.offsets[s],m=5;for(let x=0,y=u.length;x<y;++x){const r=x*m+O,p=r+1,c=r+2,h=r+3,C=r+4;if(U[r]!==29||U[p]!==0||U[c]!==0||U[h]!==0||U[C]!==0)throw new n.FormatError("writing to an offset that is not empty");const D=u[x];U[r]=29,U[p]=D>>24&255,U[c]=D>>16&255,U[h]=D>>8&255,U[C]=D&255}}}class g{constructor(s){this.cff=s}compile(){const s=this.cff,u={data:[],length:0,add(h){try{this.data.push(...h)}catch{this.data=this.data.concat(h)}this.length=this.data.length}},F=this.compileHeader(s.header);u.add(F);const U=this.compileNameIndex(s.names);if(u.add(U),s.isCIDFont&&s.topDict.hasName("FontMatrix")){const h=s.topDict.getByName("FontMatrix");s.topDict.removeByName("FontMatrix");for(const C of s.fdArray){let D=h.slice(0);C.hasName("FontMatrix")&&(D=n.Util.transform(D,C.getByName("FontMatrix"))),C.setByName("FontMatrix",D)}}const O=s.topDict.getByName("XUID");(O==null?void 0:O.length)>16&&s.topDict.removeByName("XUID"),s.topDict.setByName("charset",0);let m=this.compileTopDicts([s.topDict],u.length,s.isCIDFont);u.add(m.output);const x=m.trackers[0],y=this.compileStringIndex(s.strings.strings);u.add(y);const r=this.compileIndex(s.globalSubrIndex);if(u.add(r),s.encoding&&s.topDict.hasName("Encoding"))if(s.encoding.predefined)x.setEntryLocation("Encoding",[s.encoding.format],u);else{const h=this.compileEncoding(s.encoding);x.setEntryLocation("Encoding",[u.length],u),u.add(h)}const p=this.compileCharset(s.charset,s.charStrings.count,s.strings,s.isCIDFont);x.setEntryLocation("charset",[u.length],u),u.add(p);const c=this.compileCharStrings(s.charStrings);if(x.setEntryLocation("CharStrings",[u.length],u),u.add(c),s.isCIDFont){x.setEntryLocation("FDSelect",[u.length],u);const h=this.compileFDSelect(s.fdSelect);u.add(h),m=this.compileTopDicts(s.fdArray,u.length,!0),x.setEntryLocation("FDArray",[u.length],u),u.add(m.output);const C=m.trackers;this.compilePrivateDicts(s.fdArray,C,u)}return this.compilePrivateDicts([s.topDict],[x],u),u.add([0]),u.data}encodeNumber(s){return Number.isInteger(s)?this.encodeInteger(s):this.encodeFloat(s)}static get EncodeFloatRegExp(){return(0,n.shadow)(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(s){let u=s.toString();const F=g.EncodeFloatRegExp.exec(u);if(F){const y=parseFloat("1e"+((F[2]?+F[2]:0)+F[1].length));u=(Math.round(s*y)/y).toString()}let U="",O,m;for(O=0,m=u.length;O<m;++O){const y=u[O];y==="e"?U+=u[++O]==="-"?"c":"b":y==="."?U+="a":y==="-"?U+="e":U+=y}U+=U.length&1?"f":"ff";const x=[30];for(O=0,m=U.length;O<m;O+=2)x.push(parseInt(U.substring(O,O+2),16));return x}encodeInteger(s){let u;return s>=-107&&s<=107?u=[s+139]:s>=108&&s<=1131?(s-=108,u=[(s>>8)+247,s&255]):s>=-1131&&s<=-108?(s=-s-108,u=[(s>>8)+251,s&255]):s>=-32768&&s<=32767?u=[28,s>>8&255,s&255]:u=[29,s>>24&255,s>>16&255,s>>8&255,s&255],u}compileHeader(s){return[s.major,s.minor,4,s.offSize]}compileNameIndex(s){const u=new i;for(const F of s){const U=Math.min(F.length,127);let O=new Array(U);for(let m=0;m<U;m++){let x=F[m];(x<"!"||x>"~"||x==="["||x==="]"||x==="("||x===")"||x==="{"||x==="}"||x==="<"||x===">"||x==="/"||x==="%")&&(x="_"),O[m]=x}O=O.join(""),O===""&&(O="Bad_Font_Name"),u.add((0,n.stringToBytes)(O))}return this.compileIndex(u)}compileTopDicts(s,u,F){const U=[];let O=new i;for(const m of s){F&&(m.removeByName("CIDFontVersion"),m.removeByName("CIDFontRevision"),m.removeByName("CIDFontType"),m.removeByName("CIDCount"),m.removeByName("UIDBase"));const x=new l,y=this.compileDict(m,x);U.push(x),O.add(y),x.offset(u)}return O=this.compileIndex(O,U),{trackers:U,output:O}}compilePrivateDicts(s,u,F){for(let U=0,O=s.length;U<O;++U){const m=s[U],x=m.privateDict;if(!x||!m.hasName("Private"))throw new n.FormatError("There must be a private dictionary.");const y=new l,r=this.compileDict(x,y);let p=F.length;if(y.offset(p),r.length||(p=0),u[U].setEntryLocation("Private",[r.length,p],F),F.add(r),x.subrsIndex&&x.hasName("Subrs")){const c=this.compileIndex(x.subrsIndex);y.setEntryLocation("Subrs",[r.length],F),F.add(c)}}}compileDict(s,u){const F=[];for(const U of s.order){if(!(U in s.values))continue;let O=s.values[U],m=s.types[U];if(Array.isArray(m)||(m=[m]),Array.isArray(O)||(O=[O]),O.length!==0){for(let x=0,y=m.length;x<y;++x){const r=m[x],p=O[x];switch(r){case"num":case"sid":F.push(...this.encodeNumber(p));break;case"offset":const c=s.keyToNameMap[U];u.isTracking(c)||u.track(c,F.length),F.push(29,0,0,0,0);break;case"array":case"delta":F.push(...this.encodeNumber(p));for(let h=1,C=O.length;h<C;++h)F.push(...this.encodeNumber(O[h]));break;default:throw new n.FormatError(`Unknown data type of ${r}`)}}F.push(...s.opcodes[U])}}return F}compileStringIndex(s){const u=new i;for(const F of s)u.add((0,n.stringToBytes)(F));return this.compileIndex(u)}compileCharStrings(s){const u=new i;for(let F=0;F<s.count;F++){const U=s.get(F);if(U.length===0){u.add(new Uint8Array([139,14]));continue}u.add(U)}return this.compileIndex(u)}compileCharset(s,u,F,U){let O;const m=u-1;if(U)O=new Uint8Array([2,0,0,m>>8&255,m&255]);else{const x=1+m*2;O=new Uint8Array(x),O[0]=0;let y=0;const r=s.charset.length;let p=!1;for(let c=1;c<O.length;c+=2){let h=0;if(y<r){const C=s.charset[y++];h=F.getSID(C),h===-1&&(h=0,p||(p=!0,(0,n.warn)(`Couldn't find ${C} in CFF strings`)))}O[c]=h>>8&255,O[c+1]=h&255}}return this.compileTypedArray(O)}compileEncoding(s){return this.compileTypedArray(s.raw)}compileFDSelect(s){const u=s.format;let F,U;switch(u){case 0:for(F=new Uint8Array(1+s.fdSelect.length),F[0]=u,U=0;U<s.fdSelect.length;U++)F[U+1]=s.fdSelect[U];break;case 3:const O=0;let m=s.fdSelect[0];const x=[u,0,0,O>>8&255,O&255,m];for(U=1;U<s.fdSelect.length;U++){const r=s.fdSelect[U];r!==m&&(x.push(U>>8&255,U&255,r),m=r)}const y=(x.length-3)/3;x[1]=y>>8&255,x[2]=y&255,x.push(U>>8&255,U&255),F=new Uint8Array(x);break}return this.compileTypedArray(F)}compileTypedArray(s){return Array.from(s)}compileIndex(s,u=[]){const F=s.objects,U=F.length;if(U===0)return[0,0];const O=[U>>8&255,U&255];let m=1,x;for(x=0;x<U;++x)m+=F[x].length;let y;m<256?y=1:m<65536?y=2:m<16777216?y=3:y=4,O.push(y);let r=1;for(x=0;x<U+1;x++)y===1?O.push(r&255):y===2?O.push(r>>8&255,r&255):y===3?O.push(r>>16&255,r>>8&255,r&255):O.push(r>>>24&255,r>>16&255,r>>8&255,r&255),F[x]&&(r+=F[x].length);for(x=0;x<U;x++)u[x]&&u[x].offset(O.length),O.push(...F[x]);return O}}P.CFFCompiler=g},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ISOAdobeCharset=P.ExpertSubsetCharset=P.ExpertCharset=void 0;const ie=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"];P.ISOAdobeCharset=ie;const n=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];P.ExpertCharset=n;const k=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle","figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior"];P.ExpertSubsetCharset=k},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ZapfDingbatsEncoding=P.WinAnsiEncoding=P.SymbolSetEncoding=P.StandardEncoding=P.MacRomanEncoding=P.ExpertEncoding=void 0,P.getEncoding=$;const ie=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"];P.ExpertEncoding=ie;const n=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otildesmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Ringsmall","","","",""],k=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"];P.MacRomanEncoding=k;const R=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""];P.StandardEncoding=R;const e=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered","cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","ae","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"];P.WinAnsiEncoding=e;const t=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","comma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta","iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblleft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""];P.SymbolSetEncoding=t;const o=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a137","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];P.ZapfDingbatsEncoding=o;function $(L){switch(L){case"WinAnsiEncoding":return e;case"StandardEncoding":return R;case"MacRomanEncoding":return k;case"SymbolSetEncoding":return t;case"ZapfDingbatsEncoding":return o;case"ExpertEncoding":return ie;case"MacExpertEncoding":return n;default:return null}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SEAC_ANALYSIS_ENABLED=P.MacStandardGlyphOrdering=P.FontFlags=void 0,P.normalizeFontName=T,P.recoverGlyphName=L,P.type1FontGlyphMapping=I;var n=ie(37),k=ie(39),R=ie(40),e=ie(2);const t=!0;P.SEAC_ANALYSIS_ENABLED=t;const o={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144};P.FontFlags=o;const $=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];P.MacStandardGlyphOrdering=$;function L(d,f){if(f[d]!==void 0)return d;const i=(0,R.getUnicodeForGlyph)(d,f);if(i!==-1){for(const S in f)if(f[S]===i)return S}return(0,e.info)("Unable to recover a standard glyph name for: "+d),d}function I(d,f,i){const S=Object.create(null);let w,v,b;const M=!!(d.flags&o.Symbolic);if(d.isInternalFont)for(b=f,v=0;v<b.length;v++)w=i.indexOf(b[v]),S[v]=w>=0?w:0;else if(d.baseEncodingName)for(b=(0,n.getEncoding)(d.baseEncodingName),v=0;v<b.length;v++)w=i.indexOf(b[v]),S[v]=w>=0?w:0;else if(M)for(v in f)S[v]=f[v];else for(b=n.StandardEncoding,v=0;v<b.length;v++)w=i.indexOf(b[v]),S[v]=w>=0?w:0;const _=d.differences;let H;if(_)for(v in _){const A=_[v];if(w=i.indexOf(A),w===-1){H||(H=(0,k.getGlyphsUnicode)());const E=L(A,H);E!==A&&(w=i.indexOf(E))}S[v]=w>=0?w:0}return S}function T(d){return d.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.getGlyphsUnicode=P.getDingbatsGlyphsUnicode=void 0;var n=ie(3);const k=(0,n.getLookupTableFactory)(function(e){e.A=65,e.AE=198,e.AEacute=508,e.AEmacron=482,e.AEsmall=63462,e.Aacute=193,e.Aacutesmall=63457,e.Abreve=258,e.Abreveacute=7854,e.Abrevecyrillic=1232,e.Abrevedotbelow=7862,e.Abrevegrave=7856,e.Abrevehookabove=7858,e.Abrevetilde=7860,e.Acaron=461,e.Acircle=9398,e.Acircumflex=194,e.Acircumflexacute=7844,e.Acircumflexdotbelow=7852,e.Acircumflexgrave=7846,e.Acircumflexhookabove=7848,e.Acircumflexsmall=63458,e.Acircumflextilde=7850,e.Acute=63177,e.Acutesmall=63412,e.Acyrillic=1040,e.Adblgrave=512,e.Adieresis=196,e.Adieresiscyrillic=1234,e.Adieresismacron=478,e.Adieresissmall=63460,e.Adotbelow=7840,e.Adotmacron=480,e.Agrave=192,e.Agravesmall=63456,e.Ahookabove=7842,e.Aiecyrillic=1236,e.Ainvertedbreve=514,e.Alpha=913,e.Alphatonos=902,e.Amacron=256,e.Amonospace=65313,e.Aogonek=260,e.Aring=197,e.Aringacute=506,e.Aringbelow=7680,e.Aringsmall=63461,e.Asmall=63329,e.Atilde=195,e.Atildesmall=63459,e.Aybarmenian=1329,e.B=66,e.Bcircle=9399,e.Bdotaccent=7682,e.Bdotbelow=7684,e.Becyrillic=1041,e.Benarmenian=1330,e.Beta=914,e.Bhook=385,e.Blinebelow=7686,e.Bmonospace=65314,e.Brevesmall=63220,e.Bsmall=63330,e.Btopbar=386,e.C=67,e.Caarmenian=1342,e.Cacute=262,e.Caron=63178,e.Caronsmall=63221,e.Ccaron=268,e.Ccedilla=199,e.Ccedillaacute=7688,e.Ccedillasmall=63463,e.Ccircle=9400,e.Ccircumflex=264,e.Cdot=266,e.Cdotaccent=266,e.Cedillasmall=63416,e.Chaarmenian=1353,e.Cheabkhasiancyrillic=1212,e.Checyrillic=1063,e.Chedescenderabkhasiancyrillic=1214,e.Chedescendercyrillic=1206,e.Chedieresiscyrillic=1268,e.Cheharmenian=1347,e.Chekhakassiancyrillic=1227,e.Cheverticalstrokecyrillic=1208,e.Chi=935,e.Chook=391,e.Circumflexsmall=63222,e.Cmonospace=65315,e.Coarmenian=1361,e.Csmall=63331,e.D=68,e.DZ=497,e.DZcaron=452,e.Daarmenian=1332,e.Dafrican=393,e.Dcaron=270,e.Dcedilla=7696,e.Dcircle=9401,e.Dcircumflexbelow=7698,e.Dcroat=272,e.Ddotaccent=7690,e.Ddotbelow=7692,e.Decyrillic=1044,e.Deicoptic=1006,e.Delta=8710,e.Deltagreek=916,e.Dhook=394,e.Dieresis=63179,e.DieresisAcute=63180,e.DieresisGrave=63181,e.Dieresissmall=63400,e.Digammagreek=988,e.Djecyrillic=1026,e.Dlinebelow=7694,e.Dmonospace=65316,e.Dotaccentsmall=63223,e.Dslash=272,e.Dsmall=63332,e.Dtopbar=395,e.Dz=498,e.Dzcaron=453,e.Dzeabkhasiancyrillic=1248,e.Dzecyrillic=1029,e.Dzhecyrillic=1039,e.E=69,e.Eacute=201,e.Eacutesmall=63465,e.Ebreve=276,e.Ecaron=282,e.Ecedillabreve=7708,e.Echarmenian=1333,e.Ecircle=9402,e.Ecircumflex=202,e.Ecircumflexacute=7870,e.Ecircumflexbelow=7704,e.Ecircumflexdotbelow=7878,e.Ecircumflexgrave=7872,e.Ecircumflexhookabove=7874,e.Ecircumflexsmall=63466,e.Ecircumflextilde=7876,e.Ecyrillic=1028,e.Edblgrave=516,e.Edieresis=203,e.Edieresissmall=63467,e.Edot=278,e.Edotaccent=278,e.Edotbelow=7864,e.Efcyrillic=1060,e.Egrave=200,e.Egravesmall=63464,e.Eharmenian=1335,e.Ehookabove=7866,e.Eightroman=8551,e.Einvertedbreve=518,e.Eiotifiedcyrillic=1124,e.Elcyrillic=1051,e.Elevenroman=8554,e.Emacron=274,e.Emacronacute=7702,e.Emacrongrave=7700,e.Emcyrillic=1052,e.Emonospace=65317,e.Encyrillic=1053,e.Endescendercyrillic=1186,e.Eng=330,e.Enghecyrillic=1188,e.Enhookcyrillic=1223,e.Eogonek=280,e.Eopen=400,e.Epsilon=917,e.Epsilontonos=904,e.Ercyrillic=1056,e.Ereversed=398,e.Ereversedcyrillic=1069,e.Escyrillic=1057,e.Esdescendercyrillic=1194,e.Esh=425,e.Esmall=63333,e.Eta=919,e.Etarmenian=1336,e.Etatonos=905,e.Eth=208,e.Ethsmall=63472,e.Etilde=7868,e.Etildebelow=7706,e.Euro=8364,e.Ezh=439,e.Ezhcaron=494,e.Ezhreversed=440,e.F=70,e.Fcircle=9403,e.Fdotaccent=7710,e.Feharmenian=1366,e.Feicoptic=996,e.Fhook=401,e.Fitacyrillic=1138,e.Fiveroman=8548,e.Fmonospace=65318,e.Fourroman=8547,e.Fsmall=63334,e.G=71,e.GBsquare=13191,e.Gacute=500,e.Gamma=915,e.Gammaafrican=404,e.Gangiacoptic=1002,e.Gbreve=286,e.Gcaron=486,e.Gcedilla=290,e.Gcircle=9404,e.Gcircumflex=284,e.Gcommaaccent=290,e.Gdot=288,e.Gdotaccent=288,e.Gecyrillic=1043,e.Ghadarmenian=1346,e.Ghemiddlehookcyrillic=1172,e.Ghestrokecyrillic=1170,e.Gheupturncyrillic=1168,e.Ghook=403,e.Gimarmenian=1331,e.Gjecyrillic=1027,e.Gmacron=7712,e.Gmonospace=65319,e.Grave=63182,e.Gravesmall=63328,e.Gsmall=63335,e.Gsmallhook=667,e.Gstroke=484,e.H=72,e.H18533=9679,e.H18543=9642,e.H18551=9643,e.H22073=9633,e.HPsquare=13259,e.Haabkhasiancyrillic=1192,e.Hadescendercyrillic=1202,e.Hardsigncyrillic=1066,e.Hbar=294,e.Hbrevebelow=7722,e.Hcedilla=7720,e.Hcircle=9405,e.Hcircumflex=292,e.Hdieresis=7718,e.Hdotaccent=7714,e.Hdotbelow=7716,e.Hmonospace=65320,e.Hoarmenian=1344,e.Horicoptic=1e3,e.Hsmall=63336,e.Hungarumlaut=63183,e.Hungarumlautsmall=63224,e.Hzsquare=13200,e.I=73,e.IAcyrillic=1071,e.IJ=306,e.IUcyrillic=1070,e.Iacute=205,e.Iacutesmall=63469,e.Ibreve=300,e.Icaron=463,e.Icircle=9406,e.Icircumflex=206,e.Icircumflexsmall=63470,e.Icyrillic=1030,e.Idblgrave=520,e.Idieresis=207,e.Idieresisacute=7726,e.Idieresiscyrillic=1252,e.Idieresissmall=63471,e.Idot=304,e.Idotaccent=304,e.Idotbelow=7882,e.Iebrevecyrillic=1238,e.Iecyrillic=1045,e.Ifraktur=8465,e.Igrave=204,e.Igravesmall=63468,e.Ihookabove=7880,e.Iicyrillic=1048,e.Iinvertedbreve=522,e.Iishortcyrillic=1049,e.Imacron=298,e.Imacroncyrillic=1250,e.Imonospace=65321,e.Iniarmenian=1339,e.Iocyrillic=1025,e.Iogonek=302,e.Iota=921,e.Iotaafrican=406,e.Iotadieresis=938,e.Iotatonos=906,e.Ismall=63337,e.Istroke=407,e.Itilde=296,e.Itildebelow=7724,e.Izhitsacyrillic=1140,e.Izhitsadblgravecyrillic=1142,e.J=74,e.Jaarmenian=1345,e.Jcircle=9407,e.Jcircumflex=308,e.Jecyrillic=1032,e.Jheharmenian=1355,e.Jmonospace=65322,e.Jsmall=63338,e.K=75,e.KBsquare=13189,e.KKsquare=13261,e.Kabashkircyrillic=1184,e.Kacute=7728,e.Kacyrillic=1050,e.Kadescendercyrillic=1178,e.Kahookcyrillic=1219,e.Kappa=922,e.Kastrokecyrillic=1182,e.Kaverticalstrokecyrillic=1180,e.Kcaron=488,e.Kcedilla=310,e.Kcircle=9408,e.Kcommaaccent=310,e.Kdotbelow=7730,e.Keharmenian=1364,e.Kenarmenian=1343,e.Khacyrillic=1061,e.Kheicoptic=998,e.Khook=408,e.Kjecyrillic=1036,e.Klinebelow=7732,e.Kmonospace=65323,e.Koppacyrillic=1152,e.Koppagreek=990,e.Ksicyrillic=1134,e.Ksmall=63339,e.L=76,e.LJ=455,e.LL=63167,e.Lacute=313,e.Lambda=923,e.Lcaron=317,e.Lcedilla=315,e.Lcircle=9409,e.Lcircumflexbelow=7740,e.Lcommaaccent=315,e.Ldot=319,e.Ldotaccent=319,e.Ldotbelow=7734,e.Ldotbelowmacron=7736,e.Liwnarmenian=1340,e.Lj=456,e.Ljecyrillic=1033,e.Llinebelow=7738,e.Lmonospace=65324,e.Lslash=321,e.Lslashsmall=63225,e.Lsmall=63340,e.M=77,e.MBsquare=13190,e.Macron=63184,e.Macronsmall=63407,e.Macute=7742,e.Mcircle=9410,e.Mdotaccent=7744,e.Mdotbelow=7746,e.Menarmenian=1348,e.Mmonospace=65325,e.Msmall=63341,e.Mturned=412,e.Mu=924,e.N=78,e.NJ=458,e.Nacute=323,e.Ncaron=327,e.Ncedilla=325,e.Ncircle=9411,e.Ncircumflexbelow=7754,e.Ncommaaccent=325,e.Ndotaccent=7748,e.Ndotbelow=7750,e.Nhookleft=413,e.Nineroman=8552,e.Nj=459,e.Njecyrillic=1034,e.Nlinebelow=7752,e.Nmonospace=65326,e.Nowarmenian=1350,e.Nsmall=63342,e.Ntilde=209,e.Ntildesmall=63473,e.Nu=925,e.O=79,e.OE=338,e.OEsmall=63226,e.Oacute=211,e.Oacutesmall=63475,e.Obarredcyrillic=1256,e.Obarreddieresiscyrillic=1258,e.Obreve=334,e.Ocaron=465,e.Ocenteredtilde=415,e.Ocircle=9412,e.Ocircumflex=212,e.Ocircumflexacute=7888,e.Ocircumflexdotbelow=7896,e.Ocircumflexgrave=7890,e.Ocircumflexhookabove=7892,e.Ocircumflexsmall=63476,e.Ocircumflextilde=7894,e.Ocyrillic=1054,e.Odblacute=336,e.Odblgrave=524,e.Odieresis=214,e.Odieresiscyrillic=1254,e.Odieresissmall=63478,e.Odotbelow=7884,e.Ogoneksmall=63227,e.Ograve=210,e.Ogravesmall=63474,e.Oharmenian=1365,e.Ohm=8486,e.Ohookabove=7886,e.Ohorn=416,e.Ohornacute=7898,e.Ohorndotbelow=7906,e.Ohorngrave=7900,e.Ohornhookabove=7902,e.Ohorntilde=7904,e.Ohungarumlaut=336,e.Oi=418,e.Oinvertedbreve=526,e.Omacron=332,e.Omacronacute=7762,e.Omacrongrave=7760,e.Omega=8486,e.Omegacyrillic=1120,e.Omegagreek=937,e.Omegaroundcyrillic=1146,e.Omegatitlocyrillic=1148,e.Omegatonos=911,e.Omicron=927,e.Omicrontonos=908,e.Omonospace=65327,e.Oneroman=8544,e.Oogonek=490,e.Oogonekmacron=492,e.Oopen=390,e.Oslash=216,e.Oslashacute=510,e.Oslashsmall=63480,e.Osmall=63343,e.Ostrokeacute=510,e.Otcyrillic=1150,e.Otilde=213,e.Otildeacute=7756,e.Otildedieresis=7758,e.Otildesmall=63477,e.P=80,e.Pacute=7764,e.Pcircle=9413,e.Pdotaccent=7766,e.Pecyrillic=1055,e.Peharmenian=1354,e.Pemiddlehookcyrillic=1190,e.Phi=934,e.Phook=420,e.Pi=928,e.Piwrarmenian=1363,e.Pmonospace=65328,e.Psi=936,e.Psicyrillic=1136,e.Psmall=63344,e.Q=81,e.Qcircle=9414,e.Qmonospace=65329,e.Qsmall=63345,e.R=82,e.Raarmenian=1356,e.Racute=340,e.Rcaron=344,e.Rcedilla=342,e.Rcircle=9415,e.Rcommaaccent=342,e.Rdblgrave=528,e.Rdotaccent=7768,e.Rdotbelow=7770,e.Rdotbelowmacron=7772,e.Reharmenian=1360,e.Rfraktur=8476,e.Rho=929,e.Ringsmall=63228,e.Rinvertedbreve=530,e.Rlinebelow=7774,e.Rmonospace=65330,e.Rsmall=63346,e.Rsmallinverted=641,e.Rsmallinvertedsuperior=694,e.S=83,e.SF010000=9484,e.SF020000=9492,e.SF030000=9488,e.SF040000=9496,e.SF050000=9532,e.SF060000=9516,e.SF070000=9524,e.SF080000=9500,e.SF090000=9508,e.SF100000=9472,e.SF110000=9474,e.SF190000=9569,e.SF200000=9570,e.SF210000=9558,e.SF220000=9557,e.SF230000=9571,e.SF240000=9553,e.SF250000=9559,e.SF260000=9565,e.SF270000=9564,e.SF280000=9563,e.SF360000=9566,e.SF370000=9567,e.SF380000=9562,e.SF390000=9556,e.SF400000=9577,e.SF410000=9574,e.SF420000=9568,e.SF430000=9552,e.SF440000=9580,e.SF450000=9575,e.SF460000=9576,e.SF470000=9572,e.SF480000=9573,e.SF490000=9561,e.SF500000=9560,e.SF510000=9554,e.SF520000=9555,e.SF530000=9579,e.SF540000=9578,e.Sacute=346,e.Sacutedotaccent=7780,e.Sampigreek=992,e.Scaron=352,e.Scarondotaccent=7782,e.Scaronsmall=63229,e.Scedilla=350,e.Schwa=399,e.Schwacyrillic=1240,e.Schwadieresiscyrillic=1242,e.Scircle=9416,e.Scircumflex=348,e.Scommaaccent=536,e.Sdotaccent=7776,e.Sdotbelow=7778,e.Sdotbelowdotaccent=7784,e.Seharmenian=1357,e.Sevenroman=8550,e.Shaarmenian=1351,e.Shacyrillic=1064,e.Shchacyrillic=1065,e.Sheicoptic=994,e.Shhacyrillic=1210,e.Shimacoptic=1004,e.Sigma=931,e.Sixroman=8549,e.Smonospace=65331,e.Softsigncyrillic=1068,e.Ssmall=63347,e.Stigmagreek=986,e.T=84,e.Tau=932,e.Tbar=358,e.Tcaron=356,e.Tcedilla=354,e.Tcircle=9417,e.Tcircumflexbelow=7792,e.Tcommaaccent=354,e.Tdotaccent=7786,e.Tdotbelow=7788,e.Tecyrillic=1058,e.Tedescendercyrillic=1196,e.Tenroman=8553,e.Tetsecyrillic=1204,e.Theta=920,e.Thook=428,e.Thorn=222,e.Thornsmall=63486,e.Threeroman=8546,e.Tildesmall=63230,e.Tiwnarmenian=1359,e.Tlinebelow=7790,e.Tmonospace=65332,e.Toarmenian=1337,e.Tonefive=444,e.Tonesix=388,e.Tonetwo=423,e.Tretroflexhook=430,e.Tsecyrillic=1062,e.Tshecyrillic=1035,e.Tsmall=63348,e.Twelveroman=8555,e.Tworoman=8545,e.U=85,e.Uacute=218,e.Uacutesmall=63482,e.Ubreve=364,e.Ucaron=467,e.Ucircle=9418,e.Ucircumflex=219,e.Ucircumflexbelow=7798,e.Ucircumflexsmall=63483,e.Ucyrillic=1059,e.Udblacute=368,e.Udblgrave=532,e.Udieresis=220,e.Udieresisacute=471,e.Udieresisbelow=7794,e.Udieresiscaron=473,e.Udieresiscyrillic=1264,e.Udieresisgrave=475,e.Udieresismacron=469,e.Udieresissmall=63484,e.Udotbelow=7908,e.Ugrave=217,e.Ugravesmall=63481,e.Uhookabove=7910,e.Uhorn=431,e.Uhornacute=7912,e.Uhorndotbelow=7920,e.Uhorngrave=7914,e.Uhornhookabove=7916,e.Uhorntilde=7918,e.Uhungarumlaut=368,e.Uhungarumlautcyrillic=1266,e.Uinvertedbreve=534,e.Ukcyrillic=1144,e.Umacron=362,e.Umacroncyrillic=1262,e.Umacrondieresis=7802,e.Umonospace=65333,e.Uogonek=370,e.Upsilon=933,e.Upsilon1=978,e.Upsilonacutehooksymbolgreek=979,e.Upsilonafrican=433,e.Upsilondieresis=939,e.Upsilondieresishooksymbolgreek=980,e.Upsilonhooksymbol=978,e.Upsilontonos=910,e.Uring=366,e.Ushortcyrillic=1038,e.Usmall=63349,e.Ustraightcyrillic=1198,e.Ustraightstrokecyrillic=1200,e.Utilde=360,e.Utildeacute=7800,e.Utildebelow=7796,e.V=86,e.Vcircle=9419,e.Vdotbelow=7806,e.Vecyrillic=1042,e.Vewarmenian=1358,e.Vhook=434,e.Vmonospace=65334,e.Voarmenian=1352,e.Vsmall=63350,e.Vtilde=7804,e.W=87,e.Wacute=7810,e.Wcircle=9420,e.Wcircumflex=372,e.Wdieresis=7812,e.Wdotaccent=7814,e.Wdotbelow=7816,e.Wgrave=7808,e.Wmonospace=65335,e.Wsmall=63351,e.X=88,e.Xcircle=9421,e.Xdieresis=7820,e.Xdotaccent=7818,e.Xeharmenian=1341,e.Xi=926,e.Xmonospace=65336,e.Xsmall=63352,e.Y=89,e.Yacute=221,e.Yacutesmall=63485,e.Yatcyrillic=1122,e.Ycircle=9422,e.Ycircumflex=374,e.Ydieresis=376,e.Ydieresissmall=63487,e.Ydotaccent=7822,e.Ydotbelow=7924,e.Yericyrillic=1067,e.Yerudieresiscyrillic=1272,e.Ygrave=7922,e.Yhook=435,e.Yhookabove=7926,e.Yiarmenian=1349,e.Yicyrillic=1031,e.Yiwnarmenian=1362,e.Ymonospace=65337,e.Ysmall=63353,e.Ytilde=7928,e.Yusbigcyrillic=1130,e.Yusbigiotifiedcyrillic=1132,e.Yuslittlecyrillic=1126,e.Yuslittleiotifiedcyrillic=1128,e.Z=90,e.Zaarmenian=1334,e.Zacute=377,e.Zcaron=381,e.Zcaronsmall=63231,e.Zcircle=9423,e.Zcircumflex=7824,e.Zdot=379,e.Zdotaccent=379,e.Zdotbelow=7826,e.Zecyrillic=1047,e.Zedescendercyrillic=1176,e.Zedieresiscyrillic=1246,e.Zeta=918,e.Zhearmenian=1338,e.Zhebrevecyrillic=1217,e.Zhecyrillic=1046,e.Zhedescendercyrillic=1174,e.Zhedieresiscyrillic=1244,e.Zlinebelow=7828,e.Zmonospace=65338,e.Zsmall=63354,e.Zstroke=437,e.a=97,e.aabengali=2438,e.aacute=225,e.aadeva=2310,e.aagujarati=2694,e.aagurmukhi=2566,e.aamatragurmukhi=2622,e.aarusquare=13059,e.aavowelsignbengali=2494,e.aavowelsigndeva=2366,e.aavowelsigngujarati=2750,e.abbreviationmarkarmenian=1375,e.abbreviationsigndeva=2416,e.abengali=2437,e.abopomofo=12570,e.abreve=259,e.abreveacute=7855,e.abrevecyrillic=1233,e.abrevedotbelow=7863,e.abrevegrave=7857,e.abrevehookabove=7859,e.abrevetilde=7861,e.acaron=462,e.acircle=9424,e.acircumflex=226,e.acircumflexacute=7845,e.acircumflexdotbelow=7853,e.acircumflexgrave=7847,e.acircumflexhookabove=7849,e.acircumflextilde=7851,e.acute=180,e.acutebelowcmb=791,e.acutecmb=769,e.acutecomb=769,e.acutedeva=2388,e.acutelowmod=719,e.acutetonecmb=833,e.acyrillic=1072,e.adblgrave=513,e.addakgurmukhi=2673,e.adeva=2309,e.adieresis=228,e.adieresiscyrillic=1235,e.adieresismacron=479,e.adotbelow=7841,e.adotmacron=481,e.ae=230,e.aeacute=509,e.aekorean=12624,e.aemacron=483,e.afii00208=8213,e.afii08941=8356,e.afii10017=1040,e.afii10018=1041,e.afii10019=1042,e.afii10020=1043,e.afii10021=1044,e.afii10022=1045,e.afii10023=1025,e.afii10024=1046,e.afii10025=1047,e.afii10026=1048,e.afii10027=1049,e.afii10028=1050,e.afii10029=1051,e.afii10030=1052,e.afii10031=1053,e.afii10032=1054,e.afii10033=1055,e.afii10034=1056,e.afii10035=1057,e.afii10036=1058,e.afii10037=1059,e.afii10038=1060,e.afii10039=1061,e.afii10040=1062,e.afii10041=1063,e.afii10042=1064,e.afii10043=1065,e.afii10044=1066,e.afii10045=1067,e.afii10046=1068,e.afii10047=1069,e.afii10048=1070,e.afii10049=1071,e.afii10050=1168,e.afii10051=1026,e.afii10052=1027,e.afii10053=1028,e.afii10054=1029,e.afii10055=1030,e.afii10056=1031,e.afii10057=1032,e.afii10058=1033,e.afii10059=1034,e.afii10060=1035,e.afii10061=1036,e.afii10062=1038,e.afii10063=63172,e.afii10064=63173,e.afii10065=1072,e.afii10066=1073,e.afii10067=1074,e.afii10068=1075,e.afii10069=1076,e.afii10070=1077,e.afii10071=1105,e.afii10072=1078,e.afii10073=1079,e.afii10074=1080,e.afii10075=1081,e.afii10076=1082,e.afii10077=1083,e.afii10078=1084,e.afii10079=1085,e.afii10080=1086,e.afii10081=1087,e.afii10082=1088,e.afii10083=1089,e.afii10084=1090,e.afii10085=1091,e.afii10086=1092,e.afii10087=1093,e.afii10088=1094,e.afii10089=1095,e.afii10090=1096,e.afii10091=1097,e.afii10092=1098,e.afii10093=1099,e.afii10094=1100,e.afii10095=1101,e.afii10096=1102,e.afii10097=1103,e.afii10098=1169,e.afii10099=1106,e.afii10100=1107,e.afii10101=1108,e.afii10102=1109,e.afii10103=1110,e.afii10104=1111,e.afii10105=1112,e.afii10106=1113,e.afii10107=1114,e.afii10108=1115,e.afii10109=1116,e.afii10110=1118,e.afii10145=1039,e.afii10146=1122,e.afii10147=1138,e.afii10148=1140,e.afii10192=63174,e.afii10193=1119,e.afii10194=1123,e.afii10195=1139,e.afii10196=1141,e.afii10831=63175,e.afii10832=63176,e.afii10846=1241,e.afii299=8206,e.afii300=8207,e.afii301=8205,e.afii57381=1642,e.afii57388=1548,e.afii57392=1632,e.afii57393=1633,e.afii57394=1634,e.afii57395=1635,e.afii57396=1636,e.afii57397=1637,e.afii57398=1638,e.afii57399=1639,e.afii57400=1640,e.afii57401=1641,e.afii57403=1563,e.afii57407=1567,e.afii57409=1569,e.afii57410=1570,e.afii57411=1571,e.afii57412=1572,e.afii57413=1573,e.afii57414=1574,e.afii57415=1575,e.afii57416=1576,e.afii57417=1577,e.afii57418=1578,e.afii57419=1579,e.afii57420=1580,e.afii57421=1581,e.afii57422=1582,e.afii57423=1583,e.afii57424=1584,e.afii57425=1585,e.afii57426=1586,e.afii57427=1587,e.afii57428=1588,e.afii57429=1589,e.afii57430=1590,e.afii57431=1591,e.afii57432=1592,e.afii57433=1593,e.afii57434=1594,e.afii57440=1600,e.afii57441=1601,e.afii57442=1602,e.afii57443=1603,e.afii57444=1604,e.afii57445=1605,e.afii57446=1606,e.afii57448=1608,e.afii57449=1609,e.afii57450=1610,e.afii57451=1611,e.afii57452=1612,e.afii57453=1613,e.afii57454=1614,e.afii57455=1615,e.afii57456=1616,e.afii57457=1617,e.afii57458=1618,e.afii57470=1607,e.afii57505=1700,e.afii57506=1662,e.afii57507=1670,e.afii57508=1688,e.afii57509=1711,e.afii57511=1657,e.afii57512=1672,e.afii57513=1681,e.afii57514=1722,e.afii57519=1746,e.afii57534=1749,e.afii57636=8362,e.afii57645=1470,e.afii57658=1475,e.afii57664=1488,e.afii57665=1489,e.afii57666=1490,e.afii57667=1491,e.afii57668=1492,e.afii57669=1493,e.afii57670=1494,e.afii57671=1495,e.afii57672=1496,e.afii57673=1497,e.afii57674=1498,e.afii57675=1499,e.afii57676=1500,e.afii57677=1501,e.afii57678=1502,e.afii57679=1503,e.afii57680=1504,e.afii57681=1505,e.afii57682=1506,e.afii57683=1507,e.afii57684=1508,e.afii57685=1509,e.afii57686=1510,e.afii57687=1511,e.afii57688=1512,e.afii57689=1513,e.afii57690=1514,e.afii57694=64298,e.afii57695=64299,e.afii57700=64331,e.afii57705=64287,e.afii57716=1520,e.afii57717=1521,e.afii57718=1522,e.afii57723=64309,e.afii57793=1460,e.afii57794=1461,e.afii57795=1462,e.afii57796=1467,e.afii57797=1464,e.afii57798=1463,e.afii57799=1456,e.afii57800=1458,e.afii57801=1457,e.afii57802=1459,e.afii57803=1474,e.afii57804=1473,e.afii57806=1465,e.afii57807=1468,e.afii57839=1469,e.afii57841=1471,e.afii57842=1472,e.afii57929=700,e.afii61248=8453,e.afii61289=8467,e.afii61352=8470,e.afii61573=8236,e.afii61574=8237,e.afii61575=8238,e.afii61664=8204,e.afii63167=1645,e.afii64937=701,e.agrave=224,e.agujarati=2693,e.agurmukhi=2565,e.ahiragana=12354,e.ahookabove=7843,e.aibengali=2448,e.aibopomofo=12574,e.aideva=2320,e.aiecyrillic=1237,e.aigujarati=2704,e.aigurmukhi=2576,e.aimatragurmukhi=2632,e.ainarabic=1593,e.ainfinalarabic=65226,e.aininitialarabic=65227,e.ainmedialarabic=65228,e.ainvertedbreve=515,e.aivowelsignbengali=2504,e.aivowelsigndeva=2376,e.aivowelsigngujarati=2760,e.akatakana=12450,e.akatakanahalfwidth=65393,e.akorean=12623,e.alef=1488,e.alefarabic=1575,e.alefdageshhebrew=64304,e.aleffinalarabic=65166,e.alefhamzaabovearabic=1571,e.alefhamzaabovefinalarabic=65156,e.alefhamzabelowarabic=1573,e.alefhamzabelowfinalarabic=65160,e.alefhebrew=1488,e.aleflamedhebrew=64335,e.alefmaddaabovearabic=1570,e.alefmaddaabovefinalarabic=65154,e.alefmaksuraarabic=1609,e.alefmaksurafinalarabic=65264,e.alefmaksurainitialarabic=65267,e.alefmaksuramedialarabic=65268,e.alefpatahhebrew=64302,e.alefqamatshebrew=64303,e.aleph=8501,e.allequal=8780,e.alpha=945,e.alphatonos=940,e.amacron=257,e.amonospace=65345,e.ampersand=38,e.ampersandmonospace=65286,e.ampersandsmall=63270,e.amsquare=13250,e.anbopomofo=12578,e.angbopomofo=12580,e.angbracketleft=12296,e.angbracketright=12297,e.angkhankhuthai=3674,e.angle=8736,e.anglebracketleft=12296,e.anglebracketleftvertical=65087,e.anglebracketright=12297,e.anglebracketrightvertical=65088,e.angleleft=9001,e.angleright=9002,e.angstrom=8491,e.anoteleia=903,e.anudattadeva=2386,e.anusvarabengali=2434,e.anusvaradeva=2306,e.anusvaragujarati=2690,e.aogonek=261,e.apaatosquare=13056,e.aparen=9372,e.apostrophearmenian=1370,e.apostrophemod=700,e.apple=63743,e.approaches=8784,e.approxequal=8776,e.approxequalorimage=8786,e.approximatelyequal=8773,e.araeaekorean=12686,e.araeakorean=12685,e.arc=8978,e.arighthalfring=7834,e.aring=229,e.aringacute=507,e.aringbelow=7681,e.arrowboth=8596,e.arrowdashdown=8675,e.arrowdashleft=8672,e.arrowdashright=8674,e.arrowdashup=8673,e.arrowdblboth=8660,e.arrowdbldown=8659,e.arrowdblleft=8656,e.arrowdblright=8658,e.arrowdblup=8657,e.arrowdown=8595,e.arrowdownleft=8601,e.arrowdownright=8600,e.arrowdownwhite=8681,e.arrowheaddownmod=709,e.arrowheadleftmod=706,e.arrowheadrightmod=707,e.arrowheadupmod=708,e.arrowhorizex=63719,e.arrowleft=8592,e.arrowleftdbl=8656,e.arrowleftdblstroke=8653,e.arrowleftoverright=8646,e.arrowleftwhite=8678,e.arrowright=8594,e.arrowrightdblstroke=8655,e.arrowrightheavy=10142,e.arrowrightoverleft=8644,e.arrowrightwhite=8680,e.arrowtableft=8676,e.arrowtabright=8677,e.arrowup=8593,e.arrowupdn=8597,e.arrowupdnbse=8616,e.arrowupdownbase=8616,e.arrowupleft=8598,e.arrowupleftofdown=8645,e.arrowupright=8599,e.arrowupwhite=8679,e.arrowvertex=63718,e.asciicircum=94,e.asciicircummonospace=65342,e.asciitilde=126,e.asciitildemonospace=65374,e.ascript=593,e.ascriptturned=594,e.asmallhiragana=12353,e.asmallkatakana=12449,e.asmallkatakanahalfwidth=65383,e.asterisk=42,e.asteriskaltonearabic=1645,e.asteriskarabic=1645,e.asteriskmath=8727,e.asteriskmonospace=65290,e.asterisksmall=65121,e.asterism=8258,e.asuperior=63209,e.asymptoticallyequal=8771,e.at=64,e.atilde=227,e.atmonospace=65312,e.atsmall=65131,e.aturned=592,e.aubengali=2452,e.aubopomofo=12576,e.audeva=2324,e.augujarati=2708,e.augurmukhi=2580,e.aulengthmarkbengali=2519,e.aumatragurmukhi=2636,e.auvowelsignbengali=2508,e.auvowelsigndeva=2380,e.auvowelsigngujarati=2764,e.avagrahadeva=2365,e.aybarmenian=1377,e.ayin=1506,e.ayinaltonehebrew=64288,e.ayinhebrew=1506,e.b=98,e.babengali=2476,e.backslash=92,e.backslashmonospace=65340,e.badeva=2348,e.bagujarati=2732,e.bagurmukhi=2604,e.bahiragana=12400,e.bahtthai=3647,e.bakatakana=12496,e.bar=124,e.barmonospace=65372,e.bbopomofo=12549,e.bcircle=9425,e.bdotaccent=7683,e.bdotbelow=7685,e.beamedsixteenthnotes=9836,e.because=8757,e.becyrillic=1073,e.beharabic=1576,e.behfinalarabic=65168,e.behinitialarabic=65169,e.behiragana=12409,e.behmedialarabic=65170,e.behmeeminitialarabic=64671,e.behmeemisolatedarabic=64520,e.behnoonfinalarabic=64621,e.bekatakana=12505,e.benarmenian=1378,e.bet=1489,e.beta=946,e.betasymbolgreek=976,e.betdagesh=64305,e.betdageshhebrew=64305,e.bethebrew=1489,e.betrafehebrew=64332,e.bhabengali=2477,e.bhadeva=2349,e.bhagujarati=2733,e.bhagurmukhi=2605,e.bhook=595,e.bihiragana=12403,e.bikatakana=12499,e.bilabialclick=664,e.bindigurmukhi=2562,e.birusquare=13105,e.blackcircle=9679,e.blackdiamond=9670,e.blackdownpointingtriangle=9660,e.blackleftpointingpointer=9668,e.blackleftpointingtriangle=9664,e.blacklenticularbracketleft=12304,e.blacklenticularbracketleftvertical=65083,e.blacklenticularbracketright=12305,e.blacklenticularbracketrightvertical=65084,e.blacklowerlefttriangle=9699,e.blacklowerrighttriangle=9698,e.blackrectangle=9644,e.blackrightpointingpointer=9658,e.blackrightpointingtriangle=9654,e.blacksmallsquare=9642,e.blacksmilingface=9787,e.blacksquare=9632,e.blackstar=9733,e.blackupperlefttriangle=9700,e.blackupperrighttriangle=9701,e.blackuppointingsmalltriangle=9652,e.blackuppointingtriangle=9650,e.blank=9251,e.blinebelow=7687,e.block=9608,e.bmonospace=65346,e.bobaimaithai=3610,e.bohiragana=12412,e.bokatakana=12508,e.bparen=9373,e.bqsquare=13251,e.braceex=63732,e.braceleft=123,e.braceleftbt=63731,e.braceleftmid=63730,e.braceleftmonospace=65371,e.braceleftsmall=65115,e.bracelefttp=63729,e.braceleftvertical=65079,e.braceright=125,e.bracerightbt=63742,e.bracerightmid=63741,e.bracerightmonospace=65373,e.bracerightsmall=65116,e.bracerighttp=63740,e.bracerightvertical=65080,e.bracketleft=91,e.bracketleftbt=63728,e.bracketleftex=63727,e.bracketleftmonospace=65339,e.bracketlefttp=63726,e.bracketright=93,e.bracketrightbt=63739,e.bracketrightex=63738,e.bracketrightmonospace=65341,e.bracketrighttp=63737,e.breve=728,e.brevebelowcmb=814,e.brevecmb=774,e.breveinvertedbelowcmb=815,e.breveinvertedcmb=785,e.breveinverteddoublecmb=865,e.bridgebelowcmb=810,e.bridgeinvertedbelowcmb=826,e.brokenbar=166,e.bstroke=384,e.bsuperior=63210,e.btopbar=387,e.buhiragana=12406,e.bukatakana=12502,e.bullet=8226,e.bulletinverse=9688,e.bulletoperator=8729,e.bullseye=9678,e.c=99,e.caarmenian=1390,e.cabengali=2458,e.cacute=263,e.cadeva=2330,e.cagujarati=2714,e.cagurmukhi=2586,e.calsquare=13192,e.candrabindubengali=2433,e.candrabinducmb=784,e.candrabindudeva=2305,e.candrabindugujarati=2689,e.capslock=8682,e.careof=8453,e.caron=711,e.caronbelowcmb=812,e.caroncmb=780,e.carriagereturn=8629,e.cbopomofo=12568,e.ccaron=269,e.ccedilla=231,e.ccedillaacute=7689,e.ccircle=9426,e.ccircumflex=265,e.ccurl=597,e.cdot=267,e.cdotaccent=267,e.cdsquare=13253,e.cedilla=184,e.cedillacmb=807,e.cent=162,e.centigrade=8451,e.centinferior=63199,e.centmonospace=65504,e.centoldstyle=63394,e.centsuperior=63200,e.chaarmenian=1401,e.chabengali=2459,e.chadeva=2331,e.chagujarati=2715,e.chagurmukhi=2587,e.chbopomofo=12564,e.cheabkhasiancyrillic=1213,e.checkmark=10003,e.checyrillic=1095,e.chedescenderabkhasiancyrillic=1215,e.chedescendercyrillic=1207,e.chedieresiscyrillic=1269,e.cheharmenian=1395,e.chekhakassiancyrillic=1228,e.cheverticalstrokecyrillic=1209,e.chi=967,e.chieuchacirclekorean=12919,e.chieuchaparenkorean=12823,e.chieuchcirclekorean=12905,e.chieuchkorean=12618,e.chieuchparenkorean=12809,e.chochangthai=3594,e.chochanthai=3592,e.chochingthai=3593,e.chochoethai=3596,e.chook=392,e.cieucacirclekorean=12918,e.cieucaparenkorean=12822,e.cieuccirclekorean=12904,e.cieuckorean=12616,e.cieucparenkorean=12808,e.cieucuparenkorean=12828,e.circle=9675,e.circlecopyrt=169,e.circlemultiply=8855,e.circleot=8857,e.circleplus=8853,e.circlepostalmark=12342,e.circlewithlefthalfblack=9680,e.circlewithrighthalfblack=9681,e.circumflex=710,e.circumflexbelowcmb=813,e.circumflexcmb=770,e.clear=8999,e.clickalveolar=450,e.clickdental=448,e.clicklateral=449,e.clickretroflex=451,e.club=9827,e.clubsuitblack=9827,e.clubsuitwhite=9831,e.cmcubedsquare=13220,e.cmonospace=65347,e.cmsquaredsquare=13216,e.coarmenian=1409,e.colon=58,e.colonmonetary=8353,e.colonmonospace=65306,e.colonsign=8353,e.colonsmall=65109,e.colontriangularhalfmod=721,e.colontriangularmod=720,e.comma=44,e.commaabovecmb=787,e.commaaboverightcmb=789,e.commaaccent=63171,e.commaarabic=1548,e.commaarmenian=1373,e.commainferior=63201,e.commamonospace=65292,e.commareversedabovecmb=788,e.commareversedmod=701,e.commasmall=65104,e.commasuperior=63202,e.commaturnedabovecmb=786,e.commaturnedmod=699,e.compass=9788,e.congruent=8773,e.contourintegral=8750,e.control=8963,e.controlACK=6,e.controlBEL=7,e.controlBS=8,e.controlCAN=24,e.controlCR=13,e.controlDC1=17,e.controlDC2=18,e.controlDC3=19,e.controlDC4=20,e.controlDEL=127,e.controlDLE=16,e.controlEM=25,e.controlENQ=5,e.controlEOT=4,e.controlESC=27,e.controlETB=23,e.controlETX=3,e.controlFF=12,e.controlFS=28,e.controlGS=29,e.controlHT=9,e.controlLF=10,e.controlNAK=21,e.controlNULL=0,e.controlRS=30,e.controlSI=15,e.controlSO=14,e.controlSOT=2,e.controlSTX=1,e.controlSUB=26,e.controlSYN=22,e.controlUS=31,e.controlVT=11,e.copyright=169,e.copyrightsans=63721,e.copyrightserif=63193,e.cornerbracketleft=12300,e.cornerbracketlefthalfwidth=65378,e.cornerbracketleftvertical=65089,e.cornerbracketright=12301,e.cornerbracketrighthalfwidth=65379,e.cornerbracketrightvertical=65090,e.corporationsquare=13183,e.cosquare=13255,e.coverkgsquare=13254,e.cparen=9374,e.cruzeiro=8354,e.cstretched=663,e.curlyand=8911,e.curlyor=8910,e.currency=164,e.cyrBreve=63185,e.cyrFlex=63186,e.cyrbreve=63188,e.cyrflex=63189,e.d=100,e.daarmenian=1380,e.dabengali=2470,e.dadarabic=1590,e.dadeva=2342,e.dadfinalarabic=65214,e.dadinitialarabic=65215,e.dadmedialarabic=65216,e.dagesh=1468,e.dageshhebrew=1468,e.dagger=8224,e.daggerdbl=8225,e.dagujarati=2726,e.dagurmukhi=2598,e.dahiragana=12384,e.dakatakana=12480,e.dalarabic=1583,e.dalet=1491,e.daletdagesh=64307,e.daletdageshhebrew=64307,e.dalethebrew=1491,e.dalfinalarabic=65194,e.dammaarabic=1615,e.dammalowarabic=1615,e.dammatanaltonearabic=1612,e.dammatanarabic=1612,e.danda=2404,e.dargahebrew=1447,e.dargalefthebrew=1447,e.dasiapneumatacyrilliccmb=1157,e.dblGrave=63187,e.dblanglebracketleft=12298,e.dblanglebracketleftvertical=65085,e.dblanglebracketright=12299,e.dblanglebracketrightvertical=65086,e.dblarchinvertedbelowcmb=811,e.dblarrowleft=8660,e.dblarrowright=8658,e.dbldanda=2405,e.dblgrave=63190,e.dblgravecmb=783,e.dblintegral=8748,e.dbllowline=8215,e.dbllowlinecmb=819,e.dbloverlinecmb=831,e.dblprimemod=698,e.dblverticalbar=8214,e.dblverticallineabovecmb=782,e.dbopomofo=12553,e.dbsquare=13256,e.dcaron=271,e.dcedilla=7697,e.dcircle=9427,e.dcircumflexbelow=7699,e.dcroat=273,e.ddabengali=2465,e.ddadeva=2337,e.ddagujarati=2721,e.ddagurmukhi=2593,e.ddalarabic=1672,e.ddalfinalarabic=64393,e.dddhadeva=2396,e.ddhabengali=2466,e.ddhadeva=2338,e.ddhagujarati=2722,e.ddhagurmukhi=2594,e.ddotaccent=7691,e.ddotbelow=7693,e.decimalseparatorarabic=1643,e.decimalseparatorpersian=1643,e.decyrillic=1076,e.degree=176,e.dehihebrew=1453,e.dehiragana=12391,e.deicoptic=1007,e.dekatakana=12487,e.deleteleft=9003,e.deleteright=8998,e.delta=948,e.deltaturned=397,e.denominatorminusonenumeratorbengali=2552,e.dezh=676,e.dhabengali=2471,e.dhadeva=2343,e.dhagujarati=2727,e.dhagurmukhi=2599,e.dhook=599,e.dialytikatonos=901,e.dialytikatonoscmb=836,e.diamond=9830,e.diamondsuitwhite=9826,e.dieresis=168,e.dieresisacute=63191,e.dieresisbelowcmb=804,e.dieresiscmb=776,e.dieresisgrave=63192,e.dieresistonos=901,e.dihiragana=12386,e.dikatakana=12482,e.dittomark=12291,e.divide=247,e.divides=8739,e.divisionslash=8725,e.djecyrillic=1106,e.dkshade=9619,e.dlinebelow=7695,e.dlsquare=13207,e.dmacron=273,e.dmonospace=65348,e.dnblock=9604,e.dochadathai=3598,e.dodekthai=3604,e.dohiragana=12393,e.dokatakana=12489,e.dollar=36,e.dollarinferior=63203,e.dollarmonospace=65284,e.dollaroldstyle=63268,e.dollarsmall=65129,e.dollarsuperior=63204,e.dong=8363,e.dorusquare=13094,e.dotaccent=729,e.dotaccentcmb=775,e.dotbelowcmb=803,e.dotbelowcomb=803,e.dotkatakana=12539,e.dotlessi=305,e.dotlessj=63166,e.dotlessjstrokehook=644,e.dotmath=8901,e.dottedcircle=9676,e.doubleyodpatah=64287,e.doubleyodpatahhebrew=64287,e.downtackbelowcmb=798,e.downtackmod=725,e.dparen=9375,e.dsuperior=63211,e.dtail=598,e.dtopbar=396,e.duhiragana=12389,e.dukatakana=12485,e.dz=499,e.dzaltone=675,e.dzcaron=454,e.dzcurl=677,e.dzeabkhasiancyrillic=1249,e.dzecyrillic=1109,e.dzhecyrillic=1119,e.e=101,e.eacute=233,e.earth=9793,e.ebengali=2447,e.ebopomofo=12572,e.ebreve=277,e.ecandradeva=2317,e.ecandragujarati=2701,e.ecandravowelsigndeva=2373,e.ecandravowelsigngujarati=2757,e.ecaron=283,e.ecedillabreve=7709,e.echarmenian=1381,e.echyiwnarmenian=1415,e.ecircle=9428,e.ecircumflex=234,e.ecircumflexacute=7871,e.ecircumflexbelow=7705,e.ecircumflexdotbelow=7879,e.ecircumflexgrave=7873,e.ecircumflexhookabove=7875,e.ecircumflextilde=7877,e.ecyrillic=1108,e.edblgrave=517,e.edeva=2319,e.edieresis=235,e.edot=279,e.edotaccent=279,e.edotbelow=7865,e.eegurmukhi=2575,e.eematragurmukhi=2631,e.efcyrillic=1092,e.egrave=232,e.egujarati=2703,e.eharmenian=1383,e.ehbopomofo=12573,e.ehiragana=12360,e.ehookabove=7867,e.eibopomofo=12575,e.eight=56,e.eightarabic=1640,e.eightbengali=2542,e.eightcircle=9319,e.eightcircleinversesansserif=10129,e.eightdeva=2414,e.eighteencircle=9329,e.eighteenparen=9349,e.eighteenperiod=9369,e.eightgujarati=2798,e.eightgurmukhi=2670,e.eighthackarabic=1640,e.eighthangzhou=12328,e.eighthnotebeamed=9835,e.eightideographicparen=12839,e.eightinferior=8328,e.eightmonospace=65304,e.eightoldstyle=63288,e.eightparen=9339,e.eightperiod=9359,e.eightpersian=1784,e.eightroman=8567,e.eightsuperior=8312,e.eightthai=3672,e.einvertedbreve=519,e.eiotifiedcyrillic=1125,e.ekatakana=12456,e.ekatakanahalfwidth=65396,e.ekonkargurmukhi=2676,e.ekorean=12628,e.elcyrillic=1083,e.element=8712,e.elevencircle=9322,e.elevenparen=9342,e.elevenperiod=9362,e.elevenroman=8570,e.ellipsis=8230,e.ellipsisvertical=8942,e.emacron=275,e.emacronacute=7703,e.emacrongrave=7701,e.emcyrillic=1084,e.emdash=8212,e.emdashvertical=65073,e.emonospace=65349,e.emphasismarkarmenian=1371,e.emptyset=8709,e.enbopomofo=12579,e.encyrillic=1085,e.endash=8211,e.endashvertical=65074,e.endescendercyrillic=1187,e.eng=331,e.engbopomofo=12581,e.enghecyrillic=1189,e.enhookcyrillic=1224,e.enspace=8194,e.eogonek=281,e.eokorean=12627,e.eopen=603,e.eopenclosed=666,e.eopenreversed=604,e.eopenreversedclosed=606,e.eopenreversedhook=605,e.eparen=9376,e.epsilon=949,e.epsilontonos=941,e.equal=61,e.equalmonospace=65309,e.equalsmall=65126,e.equalsuperior=8316,e.equivalence=8801,e.erbopomofo=12582,e.ercyrillic=1088,e.ereversed=600,e.ereversedcyrillic=1101,e.escyrillic=1089,e.esdescendercyrillic=1195,e.esh=643,e.eshcurl=646,e.eshortdeva=2318,e.eshortvowelsigndeva=2374,e.eshreversedloop=426,e.eshsquatreversed=645,e.esmallhiragana=12359,e.esmallkatakana=12455,e.esmallkatakanahalfwidth=65386,e.estimated=8494,e.esuperior=63212,e.eta=951,e.etarmenian=1384,e.etatonos=942,e.eth=240,e.etilde=7869,e.etildebelow=7707,e.etnahtafoukhhebrew=1425,e.etnahtafoukhlefthebrew=1425,e.etnahtahebrew=1425,e.etnahtalefthebrew=1425,e.eturned=477,e.eukorean=12641,e.euro=8364,e.evowelsignbengali=2503,e.evowelsigndeva=2375,e.evowelsigngujarati=2759,e.exclam=33,e.exclamarmenian=1372,e.exclamdbl=8252,e.exclamdown=161,e.exclamdownsmall=63393,e.exclammonospace=65281,e.exclamsmall=63265,e.existential=8707,e.ezh=658,e.ezhcaron=495,e.ezhcurl=659,e.ezhreversed=441,e.ezhtail=442,e.f=102,e.fadeva=2398,e.fagurmukhi=2654,e.fahrenheit=8457,e.fathaarabic=1614,e.fathalowarabic=1614,e.fathatanarabic=1611,e.fbopomofo=12552,e.fcircle=9429,e.fdotaccent=7711,e.feharabic=1601,e.feharmenian=1414,e.fehfinalarabic=65234,e.fehinitialarabic=65235,e.fehmedialarabic=65236,e.feicoptic=997,e.female=9792,e.ff=64256,e.f_f=64256,e.ffi=64259,e.f_f_i=64259,e.ffl=64260,e.f_f_l=64260,e.fi=64257,e.f_i=64257,e.fifteencircle=9326,e.fifteenparen=9346,e.fifteenperiod=9366,e.figuredash=8210,e.filledbox=9632,e.filledrect=9644,e.finalkaf=1498,e.finalkafdagesh=64314,e.finalkafdageshhebrew=64314,e.finalkafhebrew=1498,e.finalmem=1501,e.finalmemhebrew=1501,e.finalnun=1503,e.finalnunhebrew=1503,e.finalpe=1507,e.finalpehebrew=1507,e.finaltsadi=1509,e.finaltsadihebrew=1509,e.firsttonechinese=713,e.fisheye=9673,e.fitacyrillic=1139,e.five=53,e.fivearabic=1637,e.fivebengali=2539,e.fivecircle=9316,e.fivecircleinversesansserif=10126,e.fivedeva=2411,e.fiveeighths=8541,e.fivegujarati=2795,e.fivegurmukhi=2667,e.fivehackarabic=1637,e.fivehangzhou=12325,e.fiveideographicparen=12836,e.fiveinferior=8325,e.fivemonospace=65301,e.fiveoldstyle=63285,e.fiveparen=9336,e.fiveperiod=9356,e.fivepersian=1781,e.fiveroman=8564,e.fivesuperior=8309,e.fivethai=3669,e.fl=64258,e.f_l=64258,e.florin=402,e.fmonospace=65350,e.fmsquare=13209,e.fofanthai=3615,e.fofathai=3613,e.fongmanthai=3663,e.forall=8704,e.four=52,e.fourarabic=1636,e.fourbengali=2538,e.fourcircle=9315,e.fourcircleinversesansserif=10125,e.fourdeva=2410,e.fourgujarati=2794,e.fourgurmukhi=2666,e.fourhackarabic=1636,e.fourhangzhou=12324,e.fourideographicparen=12835,e.fourinferior=8324,e.fourmonospace=65300,e.fournumeratorbengali=2551,e.fouroldstyle=63284,e.fourparen=9335,e.fourperiod=9355,e.fourpersian=1780,e.fourroman=8563,e.foursuperior=8308,e.fourteencircle=9325,e.fourteenparen=9345,e.fourteenperiod=9365,e.fourthai=3668,e.fourthtonechinese=715,e.fparen=9377,e.fraction=8260,e.franc=8355,e.g=103,e.gabengali=2455,e.gacute=501,e.gadeva=2327,e.gafarabic=1711,e.gaffinalarabic=64403,e.gafinitialarabic=64404,e.gafmedialarabic=64405,e.gagujarati=2711,e.gagurmukhi=2583,e.gahiragana=12364,e.gakatakana=12460,e.gamma=947,e.gammalatinsmall=611,e.gammasuperior=736,e.gangiacoptic=1003,e.gbopomofo=12557,e.gbreve=287,e.gcaron=487,e.gcedilla=291,e.gcircle=9430,e.gcircumflex=285,e.gcommaaccent=291,e.gdot=289,e.gdotaccent=289,e.gecyrillic=1075,e.gehiragana=12370,e.gekatakana=12466,e.geometricallyequal=8785,e.gereshaccenthebrew=1436,e.gereshhebrew=1523,e.gereshmuqdamhebrew=1437,e.germandbls=223,e.gershayimaccenthebrew=1438,e.gershayimhebrew=1524,e.getamark=12307,e.ghabengali=2456,e.ghadarmenian=1394,e.ghadeva=2328,e.ghagujarati=2712,e.ghagurmukhi=2584,e.ghainarabic=1594,e.ghainfinalarabic=65230,e.ghaininitialarabic=65231,e.ghainmedialarabic=65232,e.ghemiddlehookcyrillic=1173,e.ghestrokecyrillic=1171,e.gheupturncyrillic=1169,e.ghhadeva=2394,e.ghhagurmukhi=2650,e.ghook=608,e.ghzsquare=13203,e.gihiragana=12366,e.gikatakana=12462,e.gimarmenian=1379,e.gimel=1490,e.gimeldagesh=64306,e.gimeldageshhebrew=64306,e.gimelhebrew=1490,e.gjecyrillic=1107,e.glottalinvertedstroke=446,e.glottalstop=660,e.glottalstopinverted=662,e.glottalstopmod=704,e.glottalstopreversed=661,e.glottalstopreversedmod=705,e.glottalstopreversedsuperior=740,e.glottalstopstroke=673,e.glottalstopstrokereversed=674,e.gmacron=7713,e.gmonospace=65351,e.gohiragana=12372,e.gokatakana=12468,e.gparen=9378,e.gpasquare=13228,e.gradient=8711,e.grave=96,e.gravebelowcmb=790,e.gravecmb=768,e.gravecomb=768,e.gravedeva=2387,e.gravelowmod=718,e.gravemonospace=65344,e.gravetonecmb=832,e.greater=62,e.greaterequal=8805,e.greaterequalorless=8923,e.greatermonospace=65310,e.greaterorequivalent=8819,e.greaterorless=8823,e.greateroverequal=8807,e.greatersmall=65125,e.gscript=609,e.gstroke=485,e.guhiragana=12368,e.guillemotleft=171,e.guillemotright=187,e.guilsinglleft=8249,e.guilsinglright=8250,e.gukatakana=12464,e.guramusquare=13080,e.gysquare=13257,e.h=104,e.haabkhasiancyrillic=1193,e.haaltonearabic=1729,e.habengali=2489,e.hadescendercyrillic=1203,e.hadeva=2361,e.hagujarati=2745,e.hagurmukhi=2617,e.haharabic=1581,e.hahfinalarabic=65186,e.hahinitialarabic=65187,e.hahiragana=12399,e.hahmedialarabic=65188,e.haitusquare=13098,e.hakatakana=12495,e.hakatakanahalfwidth=65418,e.halantgurmukhi=2637,e.hamzaarabic=1569,e.hamzalowarabic=1569,e.hangulfiller=12644,e.hardsigncyrillic=1098,e.harpoonleftbarbup=8636,e.harpoonrightbarbup=8640,e.hasquare=13258,e.hatafpatah=1458,e.hatafpatah16=1458,e.hatafpatah23=1458,e.hatafpatah2f=1458,e.hatafpatahhebrew=1458,e.hatafpatahnarrowhebrew=1458,e.hatafpatahquarterhebrew=1458,e.hatafpatahwidehebrew=1458,e.hatafqamats=1459,e.hatafqamats1b=1459,e.hatafqamats28=1459,e.hatafqamats34=1459,e.hatafqamatshebrew=1459,e.hatafqamatsnarrowhebrew=1459,e.hatafqamatsquarterhebrew=1459,e.hatafqamatswidehebrew=1459,e.hatafsegol=1457,e.hatafsegol17=1457,e.hatafsegol24=1457,e.hatafsegol30=1457,e.hatafsegolhebrew=1457,e.hatafsegolnarrowhebrew=1457,e.hatafsegolquarterhebrew=1457,e.hatafsegolwidehebrew=1457,e.hbar=295,e.hbopomofo=12559,e.hbrevebelow=7723,e.hcedilla=7721,e.hcircle=9431,e.hcircumflex=293,e.hdieresis=7719,e.hdotaccent=7715,e.hdotbelow=7717,e.he=1492,e.heart=9829,e.heartsuitblack=9829,e.heartsuitwhite=9825,e.hedagesh=64308,e.hedageshhebrew=64308,e.hehaltonearabic=1729,e.heharabic=1607,e.hehebrew=1492,e.hehfinalaltonearabic=64423,e.hehfinalalttwoarabic=65258,e.hehfinalarabic=65258,e.hehhamzaabovefinalarabic=64421,e.hehhamzaaboveisolatedarabic=64420,e.hehinitialaltonearabic=64424,e.hehinitialarabic=65259,e.hehiragana=12408,e.hehmedialaltonearabic=64425,e.hehmedialarabic=65260,e.heiseierasquare=13179,e.hekatakana=12504,e.hekatakanahalfwidth=65421,e.hekutaarusquare=13110,e.henghook=615,e.herutusquare=13113,e.het=1495,e.hethebrew=1495,e.hhook=614,e.hhooksuperior=689,e.hieuhacirclekorean=12923,e.hieuhaparenkorean=12827,e.hieuhcirclekorean=12909,e.hieuhkorean=12622,e.hieuhparenkorean=12813,e.hihiragana=12402,e.hikatakana=12498,e.hikatakanahalfwidth=65419,e.hiriq=1460,e.hiriq14=1460,e.hiriq21=1460,e.hiriq2d=1460,e.hiriqhebrew=1460,e.hiriqnarrowhebrew=1460,e.hiriqquarterhebrew=1460,e.hiriqwidehebrew=1460,e.hlinebelow=7830,e.hmonospace=65352,e.hoarmenian=1392,e.hohipthai=3627,e.hohiragana=12411,e.hokatakana=12507,e.hokatakanahalfwidth=65422,e.holam=1465,e.holam19=1465,e.holam26=1465,e.holam32=1465,e.holamhebrew=1465,e.holamnarrowhebrew=1465,e.holamquarterhebrew=1465,e.holamwidehebrew=1465,e.honokhukthai=3630,e.hookabovecomb=777,e.hookcmb=777,e.hookpalatalizedbelowcmb=801,e.hookretroflexbelowcmb=802,e.hoonsquare=13122,e.horicoptic=1001,e.horizontalbar=8213,e.horncmb=795,e.hotsprings=9832,e.house=8962,e.hparen=9379,e.hsuperior=688,e.hturned=613,e.huhiragana=12405,e.huiitosquare=13107,e.hukatakana=12501,e.hukatakanahalfwidth=65420,e.hungarumlaut=733,e.hungarumlautcmb=779,e.hv=405,e.hyphen=45,e.hypheninferior=63205,e.hyphenmonospace=65293,e.hyphensmall=65123,e.hyphensuperior=63206,e.hyphentwo=8208,e.i=105,e.iacute=237,e.iacyrillic=1103,e.ibengali=2439,e.ibopomofo=12583,e.ibreve=301,e.icaron=464,e.icircle=9432,e.icircumflex=238,e.icyrillic=1110,e.idblgrave=521,e.ideographearthcircle=12943,e.ideographfirecircle=12939,e.ideographicallianceparen=12863,e.ideographiccallparen=12858,e.ideographiccentrecircle=12965,e.ideographicclose=12294,e.ideographiccomma=12289,e.ideographiccommaleft=65380,e.ideographiccongratulationparen=12855,e.ideographiccorrectcircle=12963,e.ideographicearthparen=12847,e.ideographicenterpriseparen=12861,e.ideographicexcellentcircle=12957,e.ideographicfestivalparen=12864,e.ideographicfinancialcircle=12950,e.ideographicfinancialparen=12854,e.ideographicfireparen=12843,e.ideographichaveparen=12850,e.ideographichighcircle=12964,e.ideographiciterationmark=12293,e.ideographiclaborcircle=12952,e.ideographiclaborparen=12856,e.ideographicleftcircle=12967,e.ideographiclowcircle=12966,e.ideographicmedicinecircle=12969,e.ideographicmetalparen=12846,e.ideographicmoonparen=12842,e.ideographicnameparen=12852,e.ideographicperiod=12290,e.ideographicprintcircle=12958,e.ideographicreachparen=12867,e.ideographicrepresentparen=12857,e.ideographicresourceparen=12862,e.ideographicrightcircle=12968,e.ideographicsecretcircle=12953,e.ideographicselfparen=12866,e.ideographicsocietyparen=12851,e.ideographicspace=12288,e.ideographicspecialparen=12853,e.ideographicstockparen=12849,e.ideographicstudyparen=12859,e.ideographicsunparen=12848,e.ideographicsuperviseparen=12860,e.ideographicwaterparen=12844,e.ideographicwoodparen=12845,e.ideographiczero=12295,e.ideographmetalcircle=12942,e.ideographmooncircle=12938,e.ideographnamecircle=12948,e.ideographsuncircle=12944,e.ideographwatercircle=12940,e.ideographwoodcircle=12941,e.ideva=2311,e.idieresis=239,e.idieresisacute=7727,e.idieresiscyrillic=1253,e.idotbelow=7883,e.iebrevecyrillic=1239,e.iecyrillic=1077,e.ieungacirclekorean=12917,e.ieungaparenkorean=12821,e.ieungcirclekorean=12903,e.ieungkorean=12615,e.ieungparenkorean=12807,e.igrave=236,e.igujarati=2695,e.igurmukhi=2567,e.ihiragana=12356,e.ihookabove=7881,e.iibengali=2440,e.iicyrillic=1080,e.iideva=2312,e.iigujarati=2696,e.iigurmukhi=2568,e.iimatragurmukhi=2624,e.iinvertedbreve=523,e.iishortcyrillic=1081,e.iivowelsignbengali=2496,e.iivowelsigndeva=2368,e.iivowelsigngujarati=2752,e.ij=307,e.ikatakana=12452,e.ikatakanahalfwidth=65394,e.ikorean=12643,e.ilde=732,e.iluyhebrew=1452,e.imacron=299,e.imacroncyrillic=1251,e.imageorapproximatelyequal=8787,e.imatragurmukhi=2623,e.imonospace=65353,e.increment=8710,e.infinity=8734,e.iniarmenian=1387,e.integral=8747,e.integralbottom=8993,e.integralbt=8993,e.integralex=63733,e.integraltop=8992,e.integraltp=8992,e.intersection=8745,e.intisquare=13061,e.invbullet=9688,e.invcircle=9689,e.invsmileface=9787,e.iocyrillic=1105,e.iogonek=303,e.iota=953,e.iotadieresis=970,e.iotadieresistonos=912,e.iotalatin=617,e.iotatonos=943,e.iparen=9380,e.irigurmukhi=2674,e.ismallhiragana=12355,e.ismallkatakana=12451,e.ismallkatakanahalfwidth=65384,e.issharbengali=2554,e.istroke=616,e.isuperior=63213,e.iterationhiragana=12445,e.iterationkatakana=12541,e.itilde=297,e.itildebelow=7725,e.iubopomofo=12585,e.iucyrillic=1102,e.ivowelsignbengali=2495,e.ivowelsigndeva=2367,e.ivowelsigngujarati=2751,e.izhitsacyrillic=1141,e.izhitsadblgravecyrillic=1143,e.j=106,e.jaarmenian=1393,e.jabengali=2460,e.jadeva=2332,e.jagujarati=2716,e.jagurmukhi=2588,e.jbopomofo=12560,e.jcaron=496,e.jcircle=9433,e.jcircumflex=309,e.jcrossedtail=669,e.jdotlessstroke=607,e.jecyrillic=1112,e.jeemarabic=1580,e.jeemfinalarabic=65182,e.jeeminitialarabic=65183,e.jeemmedialarabic=65184,e.jeharabic=1688,e.jehfinalarabic=64395,e.jhabengali=2461,e.jhadeva=2333,e.jhagujarati=2717,e.jhagurmukhi=2589,e.jheharmenian=1403,e.jis=12292,e.jmonospace=65354,e.jparen=9381,e.jsuperior=690,e.k=107,e.kabashkircyrillic=1185,e.kabengali=2453,e.kacute=7729,e.kacyrillic=1082,e.kadescendercyrillic=1179,e.kadeva=2325,e.kaf=1499,e.kafarabic=1603,e.kafdagesh=64315,e.kafdageshhebrew=64315,e.kaffinalarabic=65242,e.kafhebrew=1499,e.kafinitialarabic=65243,e.kafmedialarabic=65244,e.kafrafehebrew=64333,e.kagujarati=2709,e.kagurmukhi=2581,e.kahiragana=12363,e.kahookcyrillic=1220,e.kakatakana=12459,e.kakatakanahalfwidth=65398,e.kappa=954,e.kappasymbolgreek=1008,e.kapyeounmieumkorean=12657,e.kapyeounphieuphkorean=12676,e.kapyeounpieupkorean=12664,e.kapyeounssangpieupkorean=12665,e.karoriisquare=13069,e.kashidaautoarabic=1600,e.kashidaautonosidebearingarabic=1600,e.kasmallkatakana=12533,e.kasquare=13188,e.kasraarabic=1616,e.kasratanarabic=1613,e.kastrokecyrillic=1183,e.katahiraprolongmarkhalfwidth=65392,e.kaverticalstrokecyrillic=1181,e.kbopomofo=12558,e.kcalsquare=13193,e.kcaron=489,e.kcedilla=311,e.kcircle=9434,e.kcommaaccent=311,e.kdotbelow=7731,e.keharmenian=1412,e.kehiragana=12369,e.kekatakana=12465,e.kekatakanahalfwidth=65401,e.kenarmenian=1391,e.kesmallkatakana=12534,e.kgreenlandic=312,e.khabengali=2454,e.khacyrillic=1093,e.khadeva=2326,e.khagujarati=2710,e.khagurmukhi=2582,e.khaharabic=1582,e.khahfinalarabic=65190,e.khahinitialarabic=65191,e.khahmedialarabic=65192,e.kheicoptic=999,e.khhadeva=2393,e.khhagurmukhi=2649,e.khieukhacirclekorean=12920,e.khieukhaparenkorean=12824,e.khieukhcirclekorean=12906,e.khieukhkorean=12619,e.khieukhparenkorean=12810,e.khokhaithai=3586,e.khokhonthai=3589,e.khokhuatthai=3587,e.khokhwaithai=3588,e.khomutthai=3675,e.khook=409,e.khorakhangthai=3590,e.khzsquare=13201,e.kihiragana=12365,e.kikatakana=12461,e.kikatakanahalfwidth=65399,e.kiroguramusquare=13077,e.kiromeetorusquare=13078,e.kirosquare=13076,e.kiyeokacirclekorean=12910,e.kiyeokaparenkorean=12814,e.kiyeokcirclekorean=12896,e.kiyeokkorean=12593,e.kiyeokparenkorean=12800,e.kiyeoksioskorean=12595,e.kjecyrillic=1116,e.klinebelow=7733,e.klsquare=13208,e.kmcubedsquare=13222,e.kmonospace=65355,e.kmsquaredsquare=13218,e.kohiragana=12371,e.kohmsquare=13248,e.kokaithai=3585,e.kokatakana=12467,e.kokatakanahalfwidth=65402,e.kooposquare=13086,e.koppacyrillic=1153,e.koreanstandardsymbol=12927,e.koroniscmb=835,e.kparen=9382,e.kpasquare=13226,e.ksicyrillic=1135,e.ktsquare=13263,e.kturned=670,e.kuhiragana=12367,e.kukatakana=12463,e.kukatakanahalfwidth=65400,e.kvsquare=13240,e.kwsquare=13246,e.l=108,e.labengali=2482,e.lacute=314,e.ladeva=2354,e.lagujarati=2738,e.lagurmukhi=2610,e.lakkhangyaothai=3653,e.lamaleffinalarabic=65276,e.lamalefhamzaabovefinalarabic=65272,e.lamalefhamzaaboveisolatedarabic=65271,e.lamalefhamzabelowfinalarabic=65274,e.lamalefhamzabelowisolatedarabic=65273,e.lamalefisolatedarabic=65275,e.lamalefmaddaabovefinalarabic=65270,e.lamalefmaddaaboveisolatedarabic=65269,e.lamarabic=1604,e.lambda=955,e.lambdastroke=411,e.lamed=1500,e.lameddagesh=64316,e.lameddageshhebrew=64316,e.lamedhebrew=1500,e.lamfinalarabic=65246,e.lamhahinitialarabic=64714,e.laminitialarabic=65247,e.lamjeeminitialarabic=64713,e.lamkhahinitialarabic=64715,e.lamlamhehisolatedarabic=65010,e.lammedialarabic=65248,e.lammeemhahinitialarabic=64904,e.lammeeminitialarabic=64716,e.largecircle=9711,e.lbar=410,e.lbelt=620,e.lbopomofo=12556,e.lcaron=318,e.lcedilla=316,e.lcircle=9435,e.lcircumflexbelow=7741,e.lcommaaccent=316,e.ldot=320,e.ldotaccent=320,e.ldotbelow=7735,e.ldotbelowmacron=7737,e.leftangleabovecmb=794,e.lefttackbelowcmb=792,e.less=60,e.lessequal=8804,e.lessequalorgreater=8922,e.lessmonospace=65308,e.lessorequivalent=8818,e.lessorgreater=8822,e.lessoverequal=8806,e.lesssmall=65124,e.lezh=622,e.lfblock=9612,e.lhookretroflex=621,e.lira=8356,e.liwnarmenian=1388,e.lj=457,e.ljecyrillic=1113,e.ll=63168,e.lladeva=2355,e.llagujarati=2739,e.llinebelow=7739,e.llladeva=2356,e.llvocalicbengali=2529,e.llvocalicdeva=2401,e.llvocalicvowelsignbengali=2531,e.llvocalicvowelsigndeva=2403,e.lmiddletilde=619,e.lmonospace=65356,e.lmsquare=13264,e.lochulathai=3628,e.logicaland=8743,e.logicalnot=172,e.logicalnotreversed=8976,e.logicalor=8744,e.lolingthai=3621,e.longs=383,e.lowlinecenterline=65102,e.lowlinecmb=818,e.lowlinedashed=65101,e.lozenge=9674,e.lparen=9383,e.lslash=322,e.lsquare=8467,e.lsuperior=63214,e.ltshade=9617,e.luthai=3622,e.lvocalicbengali=2444,e.lvocalicdeva=2316,e.lvocalicvowelsignbengali=2530,e.lvocalicvowelsigndeva=2402,e.lxsquare=13267,e.m=109,e.mabengali=2478,e.macron=175,e.macronbelowcmb=817,e.macroncmb=772,e.macronlowmod=717,e.macronmonospace=65507,e.macute=7743,e.madeva=2350,e.magujarati=2734,e.magurmukhi=2606,e.mahapakhhebrew=1444,e.mahapakhlefthebrew=1444,e.mahiragana=12414,e.maichattawalowleftthai=63637,e.maichattawalowrightthai=63636,e.maichattawathai=3659,e.maichattawaupperleftthai=63635,e.maieklowleftthai=63628,e.maieklowrightthai=63627,e.maiekthai=3656,e.maiekupperleftthai=63626,e.maihanakatleftthai=63620,e.maihanakatthai=3633,e.maitaikhuleftthai=63625,e.maitaikhuthai=3655,e.maitholowleftthai=63631,e.maitholowrightthai=63630,e.maithothai=3657,e.maithoupperleftthai=63629,e.maitrilowleftthai=63634,e.maitrilowrightthai=63633,e.maitrithai=3658,e.maitriupperleftthai=63632,e.maiyamokthai=3654,e.makatakana=12510,e.makatakanahalfwidth=65423,e.male=9794,e.mansyonsquare=13127,e.maqafhebrew=1470,e.mars=9794,e.masoracirclehebrew=1455,e.masquare=13187,e.mbopomofo=12551,e.mbsquare=13268,e.mcircle=9436,e.mcubedsquare=13221,e.mdotaccent=7745,e.mdotbelow=7747,e.meemarabic=1605,e.meemfinalarabic=65250,e.meeminitialarabic=65251,e.meemmedialarabic=65252,e.meemmeeminitialarabic=64721,e.meemmeemisolatedarabic=64584,e.meetorusquare=13133,e.mehiragana=12417,e.meizierasquare=13182,e.mekatakana=12513,e.mekatakanahalfwidth=65426,e.mem=1502,e.memdagesh=64318,e.memdageshhebrew=64318,e.memhebrew=1502,e.menarmenian=1396,e.merkhahebrew=1445,e.merkhakefulahebrew=1446,e.merkhakefulalefthebrew=1446,e.merkhalefthebrew=1445,e.mhook=625,e.mhzsquare=13202,e.middledotkatakanahalfwidth=65381,e.middot=183,e.mieumacirclekorean=12914,e.mieumaparenkorean=12818,e.mieumcirclekorean=12900,e.mieumkorean=12609,e.mieumpansioskorean=12656,e.mieumparenkorean=12804,e.mieumpieupkorean=12654,e.mieumsioskorean=12655,e.mihiragana=12415,e.mikatakana=12511,e.mikatakanahalfwidth=65424,e.minus=8722,e.minusbelowcmb=800,e.minuscircle=8854,e.minusmod=727,e.minusplus=8723,e.minute=8242,e.miribaarusquare=13130,e.mirisquare=13129,e.mlonglegturned=624,e.mlsquare=13206,e.mmcubedsquare=13219,e.mmonospace=65357,e.mmsquaredsquare=13215,e.mohiragana=12418,e.mohmsquare=13249,e.mokatakana=12514,e.mokatakanahalfwidth=65427,e.molsquare=13270,e.momathai=3617,e.moverssquare=13223,e.moverssquaredsquare=13224,e.mparen=9384,e.mpasquare=13227,e.mssquare=13235,e.msuperior=63215,e.mturned=623,e.mu=181,e.mu1=181,e.muasquare=13186,e.muchgreater=8811,e.muchless=8810,e.mufsquare=13196,e.mugreek=956,e.mugsquare=13197,e.muhiragana=12416,e.mukatakana=12512,e.mukatakanahalfwidth=65425,e.mulsquare=13205,e.multiply=215,e.mumsquare=13211,e.munahhebrew=1443,e.munahlefthebrew=1443,e.musicalnote=9834,e.musicalnotedbl=9835,e.musicflatsign=9837,e.musicsharpsign=9839,e.mussquare=13234,e.muvsquare=13238,e.muwsquare=13244,e.mvmegasquare=13241,e.mvsquare=13239,e.mwmegasquare=13247,e.mwsquare=13245,e.n=110,e.nabengali=2472,e.nabla=8711,e.nacute=324,e.nadeva=2344,e.nagujarati=2728,e.nagurmukhi=2600,e.nahiragana=12394,e.nakatakana=12490,e.nakatakanahalfwidth=65413,e.napostrophe=329,e.nasquare=13185,e.nbopomofo=12555,e.nbspace=160,e.ncaron=328,e.ncedilla=326,e.ncircle=9437,e.ncircumflexbelow=7755,e.ncommaaccent=326,e.ndotaccent=7749,e.ndotbelow=7751,e.nehiragana=12397,e.nekatakana=12493,e.nekatakanahalfwidth=65416,e.newsheqelsign=8362,e.nfsquare=13195,e.ngabengali=2457,e.ngadeva=2329,e.ngagujarati=2713,e.ngagurmukhi=2585,e.ngonguthai=3591,e.nhiragana=12435,e.nhookleft=626,e.nhookretroflex=627,e.nieunacirclekorean=12911,e.nieunaparenkorean=12815,e.nieuncieuckorean=12597,e.nieuncirclekorean=12897,e.nieunhieuhkorean=12598,e.nieunkorean=12596,e.nieunpansioskorean=12648,e.nieunparenkorean=12801,e.nieunsioskorean=12647,e.nieuntikeutkorean=12646,e.nihiragana=12395,e.nikatakana=12491,e.nikatakanahalfwidth=65414,e.nikhahitleftthai=63641,e.nikhahitthai=3661,e.nine=57,e.ninearabic=1641,e.ninebengali=2543,e.ninecircle=9320,e.ninecircleinversesansserif=10130,e.ninedeva=2415,e.ninegujarati=2799,e.ninegurmukhi=2671,e.ninehackarabic=1641,e.ninehangzhou=12329,e.nineideographicparen=12840,e.nineinferior=8329,e.ninemonospace=65305,e.nineoldstyle=63289,e.nineparen=9340,e.nineperiod=9360,e.ninepersian=1785,e.nineroman=8568,e.ninesuperior=8313,e.nineteencircle=9330,e.nineteenparen=9350,e.nineteenperiod=9370,e.ninethai=3673,e.nj=460,e.njecyrillic=1114,e.nkatakana=12531,e.nkatakanahalfwidth=65437,e.nlegrightlong=414,e.nlinebelow=7753,e.nmonospace=65358,e.nmsquare=13210,e.nnabengali=2467,e.nnadeva=2339,e.nnagujarati=2723,e.nnagurmukhi=2595,e.nnnadeva=2345,e.nohiragana=12398,e.nokatakana=12494,e.nokatakanahalfwidth=65417,e.nonbreakingspace=160,e.nonenthai=3603,e.nonuthai=3609,e.noonarabic=1606,e.noonfinalarabic=65254,e.noonghunnaarabic=1722,e.noonghunnafinalarabic=64415,e.nooninitialarabic=65255,e.noonjeeminitialarabic=64722,e.noonjeemisolatedarabic=64587,e.noonmedialarabic=65256,e.noonmeeminitialarabic=64725,e.noonmeemisolatedarabic=64590,e.noonnoonfinalarabic=64653,e.notcontains=8716,e.notelement=8713,e.notelementof=8713,e.notequal=8800,e.notgreater=8815,e.notgreaternorequal=8817,e.notgreaternorless=8825,e.notidentical=8802,e.notless=8814,e.notlessnorequal=8816,e.notparallel=8742,e.notprecedes=8832,e.notsubset=8836,e.notsucceeds=8833,e.notsuperset=8837,e.nowarmenian=1398,e.nparen=9385,e.nssquare=13233,e.nsuperior=8319,e.ntilde=241,e.nu=957,e.nuhiragana=12396,e.nukatakana=12492,e.nukatakanahalfwidth=65415,e.nuktabengali=2492,e.nuktadeva=2364,e.nuktagujarati=2748,e.nuktagurmukhi=2620,e.numbersign=35,e.numbersignmonospace=65283,e.numbersignsmall=65119,e.numeralsigngreek=884,e.numeralsignlowergreek=885,e.numero=8470,e.nun=1504,e.nundagesh=64320,e.nundageshhebrew=64320,e.nunhebrew=1504,e.nvsquare=13237,e.nwsquare=13243,e.nyabengali=2462,e.nyadeva=2334,e.nyagujarati=2718,e.nyagurmukhi=2590,e.o=111,e.oacute=243,e.oangthai=3629,e.obarred=629,e.obarredcyrillic=1257,e.obarreddieresiscyrillic=1259,e.obengali=2451,e.obopomofo=12571,e.obreve=335,e.ocandradeva=2321,e.ocandragujarati=2705,e.ocandravowelsigndeva=2377,e.ocandravowelsigngujarati=2761,e.ocaron=466,e.ocircle=9438,e.ocircumflex=244,e.ocircumflexacute=7889,e.ocircumflexdotbelow=7897,e.ocircumflexgrave=7891,e.ocircumflexhookabove=7893,e.ocircumflextilde=7895,e.ocyrillic=1086,e.odblacute=337,e.odblgrave=525,e.odeva=2323,e.odieresis=246,e.odieresiscyrillic=1255,e.odotbelow=7885,e.oe=339,e.oekorean=12634,e.ogonek=731,e.ogonekcmb=808,e.ograve=242,e.ogujarati=2707,e.oharmenian=1413,e.ohiragana=12362,e.ohookabove=7887,e.ohorn=417,e.ohornacute=7899,e.ohorndotbelow=7907,e.ohorngrave=7901,e.ohornhookabove=7903,e.ohorntilde=7905,e.ohungarumlaut=337,e.oi=419,e.oinvertedbreve=527,e.okatakana=12458,e.okatakanahalfwidth=65397,e.okorean=12631,e.olehebrew=1451,e.omacron=333,e.omacronacute=7763,e.omacrongrave=7761,e.omdeva=2384,e.omega=969,e.omega1=982,e.omegacyrillic=1121,e.omegalatinclosed=631,e.omegaroundcyrillic=1147,e.omegatitlocyrillic=1149,e.omegatonos=974,e.omgujarati=2768,e.omicron=959,e.omicrontonos=972,e.omonospace=65359,e.one=49,e.onearabic=1633,e.onebengali=2535,e.onecircle=9312,e.onecircleinversesansserif=10122,e.onedeva=2407,e.onedotenleader=8228,e.oneeighth=8539,e.onefitted=63196,e.onegujarati=2791,e.onegurmukhi=2663,e.onehackarabic=1633,e.onehalf=189,e.onehangzhou=12321,e.oneideographicparen=12832,e.oneinferior=8321,e.onemonospace=65297,e.onenumeratorbengali=2548,e.oneoldstyle=63281,e.oneparen=9332,e.oneperiod=9352,e.onepersian=1777,e.onequarter=188,e.oneroman=8560,e.onesuperior=185,e.onethai=3665,e.onethird=8531,e.oogonek=491,e.oogonekmacron=493,e.oogurmukhi=2579,e.oomatragurmukhi=2635,e.oopen=596,e.oparen=9386,e.openbullet=9702,e.option=8997,e.ordfeminine=170,e.ordmasculine=186,e.orthogonal=8735,e.oshortdeva=2322,e.oshortvowelsigndeva=2378,e.oslash=248,e.oslashacute=511,e.osmallhiragana=12361,e.osmallkatakana=12457,e.osmallkatakanahalfwidth=65387,e.ostrokeacute=511,e.osuperior=63216,e.otcyrillic=1151,e.otilde=245,e.otildeacute=7757,e.otildedieresis=7759,e.oubopomofo=12577,e.overline=8254,e.overlinecenterline=65098,e.overlinecmb=773,e.overlinedashed=65097,e.overlinedblwavy=65100,e.overlinewavy=65099,e.overscore=175,e.ovowelsignbengali=2507,e.ovowelsigndeva=2379,e.ovowelsigngujarati=2763,e.p=112,e.paampssquare=13184,e.paasentosquare=13099,e.pabengali=2474,e.pacute=7765,e.padeva=2346,e.pagedown=8671,e.pageup=8670,e.pagujarati=2730,e.pagurmukhi=2602,e.pahiragana=12401,e.paiyannoithai=3631,e.pakatakana=12497,e.palatalizationcyrilliccmb=1156,e.palochkacyrillic=1216,e.pansioskorean=12671,e.paragraph=182,e.parallel=8741,e.parenleft=40,e.parenleftaltonearabic=64830,e.parenleftbt=63725,e.parenleftex=63724,e.parenleftinferior=8333,e.parenleftmonospace=65288,e.parenleftsmall=65113,e.parenleftsuperior=8317,e.parenlefttp=63723,e.parenleftvertical=65077,e.parenright=41,e.parenrightaltonearabic=64831,e.parenrightbt=63736,e.parenrightex=63735,e.parenrightinferior=8334,e.parenrightmonospace=65289,e.parenrightsmall=65114,e.parenrightsuperior=8318,e.parenrighttp=63734,e.parenrightvertical=65078,e.partialdiff=8706,e.paseqhebrew=1472,e.pashtahebrew=1433,e.pasquare=13225,e.patah=1463,e.patah11=1463,e.patah1d=1463,e.patah2a=1463,e.patahhebrew=1463,e.patahnarrowhebrew=1463,e.patahquarterhebrew=1463,e.patahwidehebrew=1463,e.pazerhebrew=1441,e.pbopomofo=12550,e.pcircle=9439,e.pdotaccent=7767,e.pe=1508,e.pecyrillic=1087,e.pedagesh=64324,e.pedageshhebrew=64324,e.peezisquare=13115,e.pefinaldageshhebrew=64323,e.peharabic=1662,e.peharmenian=1402,e.pehebrew=1508,e.pehfinalarabic=64343,e.pehinitialarabic=64344,e.pehiragana=12410,e.pehmedialarabic=64345,e.pekatakana=12506,e.pemiddlehookcyrillic=1191,e.perafehebrew=64334,e.percent=37,e.percentarabic=1642,e.percentmonospace=65285,e.percentsmall=65130,e.period=46,e.periodarmenian=1417,e.periodcentered=183,e.periodhalfwidth=65377,e.periodinferior=63207,e.periodmonospace=65294,e.periodsmall=65106,e.periodsuperior=63208,e.perispomenigreekcmb=834,e.perpendicular=8869,e.perthousand=8240,e.peseta=8359,e.pfsquare=13194,e.phabengali=2475,e.phadeva=2347,e.phagujarati=2731,e.phagurmukhi=2603,e.phi=966,e.phi1=981,e.phieuphacirclekorean=12922,e.phieuphaparenkorean=12826,e.phieuphcirclekorean=12908,e.phieuphkorean=12621,e.phieuphparenkorean=12812,e.philatin=632,e.phinthuthai=3642,e.phisymbolgreek=981,e.phook=421,e.phophanthai=3614,e.phophungthai=3612,e.phosamphaothai=3616,e.pi=960,e.pieupacirclekorean=12915,e.pieupaparenkorean=12819,e.pieupcieuckorean=12662,e.pieupcirclekorean=12901,e.pieupkiyeokkorean=12658,e.pieupkorean=12610,e.pieupparenkorean=12805,e.pieupsioskiyeokkorean=12660,e.pieupsioskorean=12612,e.pieupsiostikeutkorean=12661,e.pieupthieuthkorean=12663,e.pieuptikeutkorean=12659,e.pihiragana=12404,e.pikatakana=12500,e.pisymbolgreek=982,e.piwrarmenian=1411,e.planckover2pi=8463,e.planckover2pi1=8463,e.plus=43,e.plusbelowcmb=799,e.pluscircle=8853,e.plusminus=177,e.plusmod=726,e.plusmonospace=65291,e.plussmall=65122,e.plussuperior=8314,e.pmonospace=65360,e.pmsquare=13272,e.pohiragana=12413,e.pointingindexdownwhite=9759,e.pointingindexleftwhite=9756,e.pointingindexrightwhite=9758,e.pointingindexupwhite=9757,e.pokatakana=12509,e.poplathai=3611,e.postalmark=12306,e.postalmarkface=12320,e.pparen=9387,e.precedes=8826,e.prescription=8478,e.primemod=697,e.primereversed=8245,e.product=8719,e.projective=8965,e.prolongedkana=12540,e.propellor=8984,e.propersubset=8834,e.propersuperset=8835,e.proportion=8759,e.proportional=8733,e.psi=968,e.psicyrillic=1137,e.psilipneumatacyrilliccmb=1158,e.pssquare=13232,e.puhiragana=12407,e.pukatakana=12503,e.pvsquare=13236,e.pwsquare=13242,e.q=113,e.qadeva=2392,e.qadmahebrew=1448,e.qafarabic=1602,e.qaffinalarabic=65238,e.qafinitialarabic=65239,e.qafmedialarabic=65240,e.qamats=1464,e.qamats10=1464,e.qamats1a=1464,e.qamats1c=1464,e.qamats27=1464,e.qamats29=1464,e.qamats33=1464,e.qamatsde=1464,e.qamatshebrew=1464,e.qamatsnarrowhebrew=1464,e.qamatsqatanhebrew=1464,e.qamatsqatannarrowhebrew=1464,e.qamatsqatanquarterhebrew=1464,e.qamatsqatanwidehebrew=1464,e.qamatsquarterhebrew=1464,e.qamatswidehebrew=1464,e.qarneyparahebrew=1439,e.qbopomofo=12561,e.qcircle=9440,e.qhook=672,e.qmonospace=65361,e.qof=1511,e.qofdagesh=64327,e.qofdageshhebrew=64327,e.qofhebrew=1511,e.qparen=9388,e.quarternote=9833,e.qubuts=1467,e.qubuts18=1467,e.qubuts25=1467,e.qubuts31=1467,e.qubutshebrew=1467,e.qubutsnarrowhebrew=1467,e.qubutsquarterhebrew=1467,e.qubutswidehebrew=1467,e.question=63,e.questionarabic=1567,e.questionarmenian=1374,e.questiondown=191,e.questiondownsmall=63423,e.questiongreek=894,e.questionmonospace=65311,e.questionsmall=63295,e.quotedbl=34,e.quotedblbase=8222,e.quotedblleft=8220,e.quotedblmonospace=65282,e.quotedblprime=12318,e.quotedblprimereversed=12317,e.quotedblright=8221,e.quoteleft=8216,e.quoteleftreversed=8219,e.quotereversed=8219,e.quoteright=8217,e.quoterightn=329,e.quotesinglbase=8218,e.quotesingle=39,e.quotesinglemonospace=65287,e.r=114,e.raarmenian=1404,e.rabengali=2480,e.racute=341,e.radeva=2352,e.radical=8730,e.radicalex=63717,e.radoverssquare=13230,e.radoverssquaredsquare=13231,e.radsquare=13229,e.rafe=1471,e.rafehebrew=1471,e.ragujarati=2736,e.ragurmukhi=2608,e.rahiragana=12425,e.rakatakana=12521,e.rakatakanahalfwidth=65431,e.ralowerdiagonalbengali=2545,e.ramiddlediagonalbengali=2544,e.ramshorn=612,e.ratio=8758,e.rbopomofo=12566,e.rcaron=345,e.rcedilla=343,e.rcircle=9441,e.rcommaaccent=343,e.rdblgrave=529,e.rdotaccent=7769,e.rdotbelow=7771,e.rdotbelowmacron=7773,e.referencemark=8251,e.reflexsubset=8838,e.reflexsuperset=8839,e.registered=174,e.registersans=63720,e.registerserif=63194,e.reharabic=1585,e.reharmenian=1408,e.rehfinalarabic=65198,e.rehiragana=12428,e.rekatakana=12524,e.rekatakanahalfwidth=65434,e.resh=1512,e.reshdageshhebrew=64328,e.reshhebrew=1512,e.reversedtilde=8765,e.reviahebrew=1431,e.reviamugrashhebrew=1431,e.revlogicalnot=8976,e.rfishhook=638,e.rfishhookreversed=639,e.rhabengali=2525,e.rhadeva=2397,e.rho=961,e.rhook=637,e.rhookturned=635,e.rhookturnedsuperior=693,e.rhosymbolgreek=1009,e.rhotichookmod=734,e.rieulacirclekorean=12913,e.rieulaparenkorean=12817,e.rieulcirclekorean=12899,e.rieulhieuhkorean=12608,e.rieulkiyeokkorean=12602,e.rieulkiyeoksioskorean=12649,e.rieulkorean=12601,e.rieulmieumkorean=12603,e.rieulpansioskorean=12652,e.rieulparenkorean=12803,e.rieulphieuphkorean=12607,e.rieulpieupkorean=12604,e.rieulpieupsioskorean=12651,e.rieulsioskorean=12605,e.rieulthieuthkorean=12606,e.rieultikeutkorean=12650,e.rieulyeorinhieuhkorean=12653,e.rightangle=8735,e.righttackbelowcmb=793,e.righttriangle=8895,e.rihiragana=12426,e.rikatakana=12522,e.rikatakanahalfwidth=65432,e.ring=730,e.ringbelowcmb=805,e.ringcmb=778,e.ringhalfleft=703,e.ringhalfleftarmenian=1369,e.ringhalfleftbelowcmb=796,e.ringhalfleftcentered=723,e.ringhalfright=702,e.ringhalfrightbelowcmb=825,e.ringhalfrightcentered=722,e.rinvertedbreve=531,e.rittorusquare=13137,e.rlinebelow=7775,e.rlongleg=636,e.rlonglegturned=634,e.rmonospace=65362,e.rohiragana=12429,e.rokatakana=12525,e.rokatakanahalfwidth=65435,e.roruathai=3619,e.rparen=9389,e.rrabengali=2524,e.rradeva=2353,e.rragurmukhi=2652,e.rreharabic=1681,e.rrehfinalarabic=64397,e.rrvocalicbengali=2528,e.rrvocalicdeva=2400,e.rrvocalicgujarati=2784,e.rrvocalicvowelsignbengali=2500,e.rrvocalicvowelsigndeva=2372,e.rrvocalicvowelsigngujarati=2756,e.rsuperior=63217,e.rtblock=9616,e.rturned=633,e.rturnedsuperior=692,e.ruhiragana=12427,e.rukatakana=12523,e.rukatakanahalfwidth=65433,e.rupeemarkbengali=2546,e.rupeesignbengali=2547,e.rupiah=63197,e.ruthai=3620,e.rvocalicbengali=2443,e.rvocalicdeva=2315,e.rvocalicgujarati=2699,e.rvocalicvowelsignbengali=2499,e.rvocalicvowelsigndeva=2371,e.rvocalicvowelsigngujarati=2755,e.s=115,e.sabengali=2488,e.sacute=347,e.sacutedotaccent=7781,e.sadarabic=1589,e.sadeva=2360,e.sadfinalarabic=65210,e.sadinitialarabic=65211,e.sadmedialarabic=65212,e.sagujarati=2744,e.sagurmukhi=2616,e.sahiragana=12373,e.sakatakana=12469,e.sakatakanahalfwidth=65403,e.sallallahoualayhewasallamarabic=65018,e.samekh=1505,e.samekhdagesh=64321,e.samekhdageshhebrew=64321,e.samekhhebrew=1505,e.saraaathai=3634,e.saraaethai=3649,e.saraaimaimalaithai=3652,e.saraaimaimuanthai=3651,e.saraamthai=3635,e.saraathai=3632,e.saraethai=3648,e.saraiileftthai=63622,e.saraiithai=3637,e.saraileftthai=63621,e.saraithai=3636,e.saraothai=3650,e.saraueeleftthai=63624,e.saraueethai=3639,e.saraueleftthai=63623,e.sarauethai=3638,e.sarauthai=3640,e.sarauuthai=3641,e.sbopomofo=12569,e.scaron=353,e.scarondotaccent=7783,e.scedilla=351,e.schwa=601,e.schwacyrillic=1241,e.schwadieresiscyrillic=1243,e.schwahook=602,e.scircle=9442,e.scircumflex=349,e.scommaaccent=537,e.sdotaccent=7777,e.sdotbelow=7779,e.sdotbelowdotaccent=7785,e.seagullbelowcmb=828,e.second=8243,e.secondtonechinese=714,e.section=167,e.seenarabic=1587,e.seenfinalarabic=65202,e.seeninitialarabic=65203,e.seenmedialarabic=65204,e.segol=1462,e.segol13=1462,e.segol1f=1462,e.segol2c=1462,e.segolhebrew=1462,e.segolnarrowhebrew=1462,e.segolquarterhebrew=1462,e.segoltahebrew=1426,e.segolwidehebrew=1462,e.seharmenian=1405,e.sehiragana=12379,e.sekatakana=12475,e.sekatakanahalfwidth=65406,e.semicolon=59,e.semicolonarabic=1563,e.semicolonmonospace=65307,e.semicolonsmall=65108,e.semivoicedmarkkana=12444,e.semivoicedmarkkanahalfwidth=65439,e.sentisquare=13090,e.sentosquare=13091,e.seven=55,e.sevenarabic=1639,e.sevenbengali=2541,e.sevencircle=9318,e.sevencircleinversesansserif=10128,e.sevendeva=2413,e.seveneighths=8542,e.sevengujarati=2797,e.sevengurmukhi=2669,e.sevenhackarabic=1639,e.sevenhangzhou=12327,e.sevenideographicparen=12838,e.seveninferior=8327,e.sevenmonospace=65303,e.sevenoldstyle=63287,e.sevenparen=9338,e.sevenperiod=9358,e.sevenpersian=1783,e.sevenroman=8566,e.sevensuperior=8311,e.seventeencircle=9328,e.seventeenparen=9348,e.seventeenperiod=9368,e.seventhai=3671,e.sfthyphen=173,e.shaarmenian=1399,e.shabengali=2486,e.shacyrillic=1096,e.shaddaarabic=1617,e.shaddadammaarabic=64609,e.shaddadammatanarabic=64606,e.shaddafathaarabic=64608,e.shaddakasraarabic=64610,e.shaddakasratanarabic=64607,e.shade=9618,e.shadedark=9619,e.shadelight=9617,e.shademedium=9618,e.shadeva=2358,e.shagujarati=2742,e.shagurmukhi=2614,e.shalshelethebrew=1427,e.shbopomofo=12565,e.shchacyrillic=1097,e.sheenarabic=1588,e.sheenfinalarabic=65206,e.sheeninitialarabic=65207,e.sheenmedialarabic=65208,e.sheicoptic=995,e.sheqel=8362,e.sheqelhebrew=8362,e.sheva=1456,e.sheva115=1456,e.sheva15=1456,e.sheva22=1456,e.sheva2e=1456,e.shevahebrew=1456,e.shevanarrowhebrew=1456,e.shevaquarterhebrew=1456,e.shevawidehebrew=1456,e.shhacyrillic=1211,e.shimacoptic=1005,e.shin=1513,e.shindagesh=64329,e.shindageshhebrew=64329,e.shindageshshindot=64300,e.shindageshshindothebrew=64300,e.shindageshsindot=64301,e.shindageshsindothebrew=64301,e.shindothebrew=1473,e.shinhebrew=1513,e.shinshindot=64298,e.shinshindothebrew=64298,e.shinsindot=64299,e.shinsindothebrew=64299,e.shook=642,e.sigma=963,e.sigma1=962,e.sigmafinal=962,e.sigmalunatesymbolgreek=1010,e.sihiragana=12375,e.sikatakana=12471,e.sikatakanahalfwidth=65404,e.siluqhebrew=1469,e.siluqlefthebrew=1469,e.similar=8764,e.sindothebrew=1474,e.siosacirclekorean=12916,e.siosaparenkorean=12820,e.sioscieuckorean=12670,e.sioscirclekorean=12902,e.sioskiyeokkorean=12666,e.sioskorean=12613,e.siosnieunkorean=12667,e.siosparenkorean=12806,e.siospieupkorean=12669,e.siostikeutkorean=12668,e.six=54,e.sixarabic=1638,e.sixbengali=2540,e.sixcircle=9317,e.sixcircleinversesansserif=10127,e.sixdeva=2412,e.sixgujarati=2796,e.sixgurmukhi=2668,e.sixhackarabic=1638,e.sixhangzhou=12326,e.sixideographicparen=12837,e.sixinferior=8326,e.sixmonospace=65302,e.sixoldstyle=63286,e.sixparen=9337,e.sixperiod=9357,e.sixpersian=1782,e.sixroman=8565,e.sixsuperior=8310,e.sixteencircle=9327,e.sixteencurrencydenominatorbengali=2553,e.sixteenparen=9347,e.sixteenperiod=9367,e.sixthai=3670,e.slash=47,e.slashmonospace=65295,e.slong=383,e.slongdotaccent=7835,e.smileface=9786,e.smonospace=65363,e.sofpasuqhebrew=1475,e.softhyphen=173,e.softsigncyrillic=1100,e.sohiragana=12381,e.sokatakana=12477,e.sokatakanahalfwidth=65407,e.soliduslongoverlaycmb=824,e.solidusshortoverlaycmb=823,e.sorusithai=3625,e.sosalathai=3624,e.sosothai=3595,e.sosuathai=3626,e.space=32,e.spacehackarabic=32,e.spade=9824,e.spadesuitblack=9824,e.spadesuitwhite=9828,e.sparen=9390,e.squarebelowcmb=827,e.squarecc=13252,e.squarecm=13213,e.squarediagonalcrosshatchfill=9641,e.squarehorizontalfill=9636,e.squarekg=13199,e.squarekm=13214,e.squarekmcapital=13262,e.squareln=13265,e.squarelog=13266,e.squaremg=13198,e.squaremil=13269,e.squaremm=13212,e.squaremsquared=13217,e.squareorthogonalcrosshatchfill=9638,e.squareupperlefttolowerrightfill=9639,e.squareupperrighttolowerleftfill=9640,e.squareverticalfill=9637,e.squarewhitewithsmallblack=9635,e.srsquare=13275,e.ssabengali=2487,e.ssadeva=2359,e.ssagujarati=2743,e.ssangcieuckorean=12617,e.ssanghieuhkorean=12677,e.ssangieungkorean=12672,e.ssangkiyeokkorean=12594,e.ssangnieunkorean=12645,e.ssangpieupkorean=12611,e.ssangsioskorean=12614,e.ssangtikeutkorean=12600,e.ssuperior=63218,e.sterling=163,e.sterlingmonospace=65505,e.strokelongoverlaycmb=822,e.strokeshortoverlaycmb=821,e.subset=8834,e.subsetnotequal=8842,e.subsetorequal=8838,e.succeeds=8827,e.suchthat=8715,e.suhiragana=12377,e.sukatakana=12473,e.sukatakanahalfwidth=65405,e.sukunarabic=1618,e.summation=8721,e.sun=9788,e.superset=8835,e.supersetnotequal=8843,e.supersetorequal=8839,e.svsquare=13276,e.syouwaerasquare=13180,e.t=116,e.tabengali=2468,e.tackdown=8868,e.tackleft=8867,e.tadeva=2340,e.tagujarati=2724,e.tagurmukhi=2596,e.taharabic=1591,e.tahfinalarabic=65218,e.tahinitialarabic=65219,e.tahiragana=12383,e.tahmedialarabic=65220,e.taisyouerasquare=13181,e.takatakana=12479,e.takatakanahalfwidth=65408,e.tatweelarabic=1600,e.tau=964,e.tav=1514,e.tavdages=64330,e.tavdagesh=64330,e.tavdageshhebrew=64330,e.tavhebrew=1514,e.tbar=359,e.tbopomofo=12554,e.tcaron=357,e.tccurl=680,e.tcedilla=355,e.tcheharabic=1670,e.tchehfinalarabic=64379,e.tchehinitialarabic=64380,e.tchehmedialarabic=64381,e.tcircle=9443,e.tcircumflexbelow=7793,e.tcommaaccent=355,e.tdieresis=7831,e.tdotaccent=7787,e.tdotbelow=7789,e.tecyrillic=1090,e.tedescendercyrillic=1197,e.teharabic=1578,e.tehfinalarabic=65174,e.tehhahinitialarabic=64674,e.tehhahisolatedarabic=64524,e.tehinitialarabic=65175,e.tehiragana=12390,e.tehjeeminitialarabic=64673,e.tehjeemisolatedarabic=64523,e.tehmarbutaarabic=1577,e.tehmarbutafinalarabic=65172,e.tehmedialarabic=65176,e.tehmeeminitialarabic=64676,e.tehmeemisolatedarabic=64526,e.tehnoonfinalarabic=64627,e.tekatakana=12486,e.tekatakanahalfwidth=65411,e.telephone=8481,e.telephoneblack=9742,e.telishagedolahebrew=1440,e.telishaqetanahebrew=1449,e.tencircle=9321,e.tenideographicparen=12841,e.tenparen=9341,e.tenperiod=9361,e.tenroman=8569,e.tesh=679,e.tet=1496,e.tetdagesh=64312,e.tetdageshhebrew=64312,e.tethebrew=1496,e.tetsecyrillic=1205,e.tevirhebrew=1435,e.tevirlefthebrew=1435,e.thabengali=2469,e.thadeva=2341,e.thagujarati=2725,e.thagurmukhi=2597,e.thalarabic=1584,e.thalfinalarabic=65196,e.thanthakhatlowleftthai=63640,e.thanthakhatlowrightthai=63639,e.thanthakhatthai=3660,e.thanthakhatupperleftthai=63638,e.theharabic=1579,e.thehfinalarabic=65178,e.thehinitialarabic=65179,e.thehmedialarabic=65180,e.thereexists=8707,e.therefore=8756,e.theta=952,e.theta1=977,e.thetasymbolgreek=977,e.thieuthacirclekorean=12921,e.thieuthaparenkorean=12825,e.thieuthcirclekorean=12907,e.thieuthkorean=12620,e.thieuthparenkorean=12811,e.thirteencircle=9324,e.thirteenparen=9344,e.thirteenperiod=9364,e.thonangmonthothai=3601,e.thook=429,e.thophuthaothai=3602,e.thorn=254,e.thothahanthai=3607,e.thothanthai=3600,e.thothongthai=3608,e.thothungthai=3606,e.thousandcyrillic=1154,e.thousandsseparatorarabic=1644,e.thousandsseparatorpersian=1644,e.three=51,e.threearabic=1635,e.threebengali=2537,e.threecircle=9314,e.threecircleinversesansserif=10124,e.threedeva=2409,e.threeeighths=8540,e.threegujarati=2793,e.threegurmukhi=2665,e.threehackarabic=1635,e.threehangzhou=12323,e.threeideographicparen=12834,e.threeinferior=8323,e.threemonospace=65299,e.threenumeratorbengali=2550,e.threeoldstyle=63283,e.threeparen=9334,e.threeperiod=9354,e.threepersian=1779,e.threequarters=190,e.threequartersemdash=63198,e.threeroman=8562,e.threesuperior=179,e.threethai=3667,e.thzsquare=13204,e.tihiragana=12385,e.tikatakana=12481,e.tikatakanahalfwidth=65409,e.tikeutacirclekorean=12912,e.tikeutaparenkorean=12816,e.tikeutcirclekorean=12898,e.tikeutkorean=12599,e.tikeutparenkorean=12802,e.tilde=732,e.tildebelowcmb=816,e.tildecmb=771,e.tildecomb=771,e.tildedoublecmb=864,e.tildeoperator=8764,e.tildeoverlaycmb=820,e.tildeverticalcmb=830,e.timescircle=8855,e.tipehahebrew=1430,e.tipehalefthebrew=1430,e.tippigurmukhi=2672,e.titlocyrilliccmb=1155,e.tiwnarmenian=1407,e.tlinebelow=7791,e.tmonospace=65364,e.toarmenian=1385,e.tohiragana=12392,e.tokatakana=12488,e.tokatakanahalfwidth=65412,e.tonebarextrahighmod=741,e.tonebarextralowmod=745,e.tonebarhighmod=742,e.tonebarlowmod=744,e.tonebarmidmod=743,e.tonefive=445,e.tonesix=389,e.tonetwo=424,e.tonos=900,e.tonsquare=13095,e.topatakthai=3599,e.tortoiseshellbracketleft=12308,e.tortoiseshellbracketleftsmall=65117,e.tortoiseshellbracketleftvertical=65081,e.tortoiseshellbracketright=12309,e.tortoiseshellbracketrightsmall=65118,e.tortoiseshellbracketrightvertical=65082,e.totaothai=3605,e.tpalatalhook=427,e.tparen=9391,e.trademark=8482,e.trademarksans=63722,e.trademarkserif=63195,e.tretroflexhook=648,e.triagdn=9660,e.triaglf=9668,e.triagrt=9658,e.triagup=9650,e.ts=678,e.tsadi=1510,e.tsadidagesh=64326,e.tsadidageshhebrew=64326,e.tsadihebrew=1510,e.tsecyrillic=1094,e.tsere=1461,e.tsere12=1461,e.tsere1e=1461,e.tsere2b=1461,e.tserehebrew=1461,e.tserenarrowhebrew=1461,e.tserequarterhebrew=1461,e.tserewidehebrew=1461,e.tshecyrillic=1115,e.tsuperior=63219,e.ttabengali=2463,e.ttadeva=2335,e.ttagujarati=2719,e.ttagurmukhi=2591,e.tteharabic=1657,e.ttehfinalarabic=64359,e.ttehinitialarabic=64360,e.ttehmedialarabic=64361,e.tthabengali=2464,e.tthadeva=2336,e.tthagujarati=2720,e.tthagurmukhi=2592,e.tturned=647,e.tuhiragana=12388,e.tukatakana=12484,e.tukatakanahalfwidth=65410,e.tusmallhiragana=12387,e.tusmallkatakana=12483,e.tusmallkatakanahalfwidth=65391,e.twelvecircle=9323,e.twelveparen=9343,e.twelveperiod=9363,e.twelveroman=8571,e.twentycircle=9331,e.twentyhangzhou=21316,e.twentyparen=9351,e.twentyperiod=9371,e.two=50,e.twoarabic=1634,e.twobengali=2536,e.twocircle=9313,e.twocircleinversesansserif=10123,e.twodeva=2408,e.twodotenleader=8229,e.twodotleader=8229,e.twodotleadervertical=65072,e.twogujarati=2792,e.twogurmukhi=2664,e.twohackarabic=1634,e.twohangzhou=12322,e.twoideographicparen=12833,e.twoinferior=8322,e.twomonospace=65298,e.twonumeratorbengali=2549,e.twooldstyle=63282,e.twoparen=9333,e.twoperiod=9353,e.twopersian=1778,e.tworoman=8561,e.twostroke=443,e.twosuperior=178,e.twothai=3666,e.twothirds=8532,e.u=117,e.uacute=250,e.ubar=649,e.ubengali=2441,e.ubopomofo=12584,e.ubreve=365,e.ucaron=468,e.ucircle=9444,e.ucircumflex=251,e.ucircumflexbelow=7799,e.ucyrillic=1091,e.udattadeva=2385,e.udblacute=369,e.udblgrave=533,e.udeva=2313,e.udieresis=252,e.udieresisacute=472,e.udieresisbelow=7795,e.udieresiscaron=474,e.udieresiscyrillic=1265,e.udieresisgrave=476,e.udieresismacron=470,e.udotbelow=7909,e.ugrave=249,e.ugujarati=2697,e.ugurmukhi=2569,e.uhiragana=12358,e.uhookabove=7911,e.uhorn=432,e.uhornacute=7913,e.uhorndotbelow=7921,e.uhorngrave=7915,e.uhornhookabove=7917,e.uhorntilde=7919,e.uhungarumlaut=369,e.uhungarumlautcyrillic=1267,e.uinvertedbreve=535,e.ukatakana=12454,e.ukatakanahalfwidth=65395,e.ukcyrillic=1145,e.ukorean=12636,e.umacron=363,e.umacroncyrillic=1263,e.umacrondieresis=7803,e.umatragurmukhi=2625,e.umonospace=65365,e.underscore=95,e.underscoredbl=8215,e.underscoremonospace=65343,e.underscorevertical=65075,e.underscorewavy=65103,e.union=8746,e.universal=8704,e.uogonek=371,e.uparen=9392,e.upblock=9600,e.upperdothebrew=1476,e.upsilon=965,e.upsilondieresis=971,e.upsilondieresistonos=944,e.upsilonlatin=650,e.upsilontonos=973,e.uptackbelowcmb=797,e.uptackmod=724,e.uragurmukhi=2675,e.uring=367,e.ushortcyrillic=1118,e.usmallhiragana=12357,e.usmallkatakana=12453,e.usmallkatakanahalfwidth=65385,e.ustraightcyrillic=1199,e.ustraightstrokecyrillic=1201,e.utilde=361,e.utildeacute=7801,e.utildebelow=7797,e.uubengali=2442,e.uudeva=2314,e.uugujarati=2698,e.uugurmukhi=2570,e.uumatragurmukhi=2626,e.uuvowelsignbengali=2498,e.uuvowelsigndeva=2370,e.uuvowelsigngujarati=2754,e.uvowelsignbengali=2497,e.uvowelsigndeva=2369,e.uvowelsigngujarati=2753,e.v=118,e.vadeva=2357,e.vagujarati=2741,e.vagurmukhi=2613,e.vakatakana=12535,e.vav=1493,e.vavdagesh=64309,e.vavdagesh65=64309,e.vavdageshhebrew=64309,e.vavhebrew=1493,e.vavholam=64331,e.vavholamhebrew=64331,e.vavvavhebrew=1520,e.vavyodhebrew=1521,e.vcircle=9445,e.vdotbelow=7807,e.vecyrillic=1074,e.veharabic=1700,e.vehfinalarabic=64363,e.vehinitialarabic=64364,e.vehmedialarabic=64365,e.vekatakana=12537,e.venus=9792,e.verticalbar=124,e.verticallineabovecmb=781,e.verticallinebelowcmb=809,e.verticallinelowmod=716,e.verticallinemod=712,e.vewarmenian=1406,e.vhook=651,e.vikatakana=12536,e.viramabengali=2509,e.viramadeva=2381,e.viramagujarati=2765,e.visargabengali=2435,e.visargadeva=2307,e.visargagujarati=2691,e.vmonospace=65366,e.voarmenian=1400,e.voicediterationhiragana=12446,e.voicediterationkatakana=12542,e.voicedmarkkana=12443,e.voicedmarkkanahalfwidth=65438,e.vokatakana=12538,e.vparen=9393,e.vtilde=7805,e.vturned=652,e.vuhiragana=12436,e.vukatakana=12532,e.w=119,e.wacute=7811,e.waekorean=12633,e.wahiragana=12431,e.wakatakana=12527,e.wakatakanahalfwidth=65436,e.wakorean=12632,e.wasmallhiragana=12430,e.wasmallkatakana=12526,e.wattosquare=13143,e.wavedash=12316,e.wavyunderscorevertical=65076,e.wawarabic=1608,e.wawfinalarabic=65262,e.wawhamzaabovearabic=1572,e.wawhamzaabovefinalarabic=65158,e.wbsquare=13277,e.wcircle=9446,e.wcircumflex=373,e.wdieresis=7813,e.wdotaccent=7815,e.wdotbelow=7817,e.wehiragana=12433,e.weierstrass=8472,e.wekatakana=12529,e.wekorean=12638,e.weokorean=12637,e.wgrave=7809,e.whitebullet=9702,e.whitecircle=9675,e.whitecircleinverse=9689,e.whitecornerbracketleft=12302,e.whitecornerbracketleftvertical=65091,e.whitecornerbracketright=12303,e.whitecornerbracketrightvertical=65092,e.whitediamond=9671,e.whitediamondcontainingblacksmalldiamond=9672,e.whitedownpointingsmalltriangle=9663,e.whitedownpointingtriangle=9661,e.whiteleftpointingsmalltriangle=9667,e.whiteleftpointingtriangle=9665,e.whitelenticularbracketleft=12310,e.whitelenticularbracketright=12311,e.whiterightpointingsmalltriangle=9657,e.whiterightpointingtriangle=9655,e.whitesmallsquare=9643,e.whitesmilingface=9786,e.whitesquare=9633,e.whitestar=9734,e.whitetelephone=9743,e.whitetortoiseshellbracketleft=12312,e.whitetortoiseshellbracketright=12313,e.whiteuppointingsmalltriangle=9653,e.whiteuppointingtriangle=9651,e.wihiragana=12432,e.wikatakana=12528,e.wikorean=12639,e.wmonospace=65367,e.wohiragana=12434,e.wokatakana=12530,e.wokatakanahalfwidth=65382,e.won=8361,e.wonmonospace=65510,e.wowaenthai=3623,e.wparen=9394,e.wring=7832,e.wsuperior=695,e.wturned=653,e.wynn=447,e.x=120,e.xabovecmb=829,e.xbopomofo=12562,e.xcircle=9447,e.xdieresis=7821,e.xdotaccent=7819,e.xeharmenian=1389,e.xi=958,e.xmonospace=65368,e.xparen=9395,e.xsuperior=739,e.y=121,e.yaadosquare=13134,e.yabengali=2479,e.yacute=253,e.yadeva=2351,e.yaekorean=12626,e.yagujarati=2735,e.yagurmukhi=2607,e.yahiragana=12420,e.yakatakana=12516,e.yakatakanahalfwidth=65428,e.yakorean=12625,e.yamakkanthai=3662,e.yasmallhiragana=12419,e.yasmallkatakana=12515,e.yasmallkatakanahalfwidth=65388,e.yatcyrillic=1123,e.ycircle=9448,e.ycircumflex=375,e.ydieresis=255,e.ydotaccent=7823,e.ydotbelow=7925,e.yeharabic=1610,e.yehbarreearabic=1746,e.yehbarreefinalarabic=64431,e.yehfinalarabic=65266,e.yehhamzaabovearabic=1574,e.yehhamzaabovefinalarabic=65162,e.yehhamzaaboveinitialarabic=65163,e.yehhamzaabovemedialarabic=65164,e.yehinitialarabic=65267,e.yehmedialarabic=65268,e.yehmeeminitialarabic=64733,e.yehmeemisolatedarabic=64600,e.yehnoonfinalarabic=64660,e.yehthreedotsbelowarabic=1745,e.yekorean=12630,e.yen=165,e.yenmonospace=65509,e.yeokorean=12629,e.yeorinhieuhkorean=12678,e.yerahbenyomohebrew=1450,e.yerahbenyomolefthebrew=1450,e.yericyrillic=1099,e.yerudieresiscyrillic=1273,e.yesieungkorean=12673,e.yesieungpansioskorean=12675,e.yesieungsioskorean=12674,e.yetivhebrew=1434,e.ygrave=7923,e.yhook=436,e.yhookabove=7927,e.yiarmenian=1397,e.yicyrillic=1111,e.yikorean=12642,e.yinyang=9775,e.yiwnarmenian=1410,e.ymonospace=65369,e.yod=1497,e.yoddagesh=64313,e.yoddageshhebrew=64313,e.yodhebrew=1497,e.yodyodhebrew=1522,e.yodyodpatahhebrew=64287,e.yohiragana=12424,e.yoikorean=12681,e.yokatakana=12520,e.yokatakanahalfwidth=65430,e.yokorean=12635,e.yosmallhiragana=12423,e.yosmallkatakana=12519,e.yosmallkatakanahalfwidth=65390,e.yotgreek=1011,e.yoyaekorean=12680,e.yoyakorean=12679,e.yoyakthai=3618,e.yoyingthai=3597,e.yparen=9396,e.ypogegrammeni=890,e.ypogegrammenigreekcmb=837,e.yr=422,e.yring=7833,e.ysuperior=696,e.ytilde=7929,e.yturned=654,e.yuhiragana=12422,e.yuikorean=12684,e.yukatakana=12518,e.yukatakanahalfwidth=65429,e.yukorean=12640,e.yusbigcyrillic=1131,e.yusbigiotifiedcyrillic=1133,e.yuslittlecyrillic=1127,e.yuslittleiotifiedcyrillic=1129,e.yusmallhiragana=12421,e.yusmallkatakana=12517,e.yusmallkatakanahalfwidth=65389,e.yuyekorean=12683,e.yuyeokorean=12682,e.yyabengali=2527,e.yyadeva=2399,e.z=122,e.zaarmenian=1382,e.zacute=378,e.zadeva=2395,e.zagurmukhi=2651,e.zaharabic=1592,e.zahfinalarabic=65222,e.zahinitialarabic=65223,e.zahiragana=12374,e.zahmedialarabic=65224,e.zainarabic=1586,e.zainfinalarabic=65200,e.zakatakana=12470,e.zaqefgadolhebrew=1429,e.zaqefqatanhebrew=1428,e.zarqahebrew=1432,e.zayin=1494,e.zayindagesh=64310,e.zayindageshhebrew=64310,e.zayinhebrew=1494,e.zbopomofo=12567,e.zcaron=382,e.zcircle=9449,e.zcircumflex=7825,e.zcurl=657,e.zdot=380,e.zdotaccent=380,e.zdotbelow=7827,e.zecyrillic=1079,e.zedescendercyrillic=1177,e.zedieresiscyrillic=1247,e.zehiragana=12380,e.zekatakana=12476,e.zero=48,e.zeroarabic=1632,e.zerobengali=2534,e.zerodeva=2406,e.zerogujarati=2790,e.zerogurmukhi=2662,e.zerohackarabic=1632,e.zeroinferior=8320,e.zeromonospace=65296,e.zerooldstyle=63280,e.zeropersian=1776,e.zerosuperior=8304,e.zerothai=3664,e.zerowidthjoiner=65279,e.zerowidthnonjoiner=8204,e.zerowidthspace=8203,e.zeta=950,e.zhbopomofo=12563,e.zhearmenian=1386,e.zhebrevecyrillic=1218,e.zhecyrillic=1078,e.zhedescendercyrillic=1175,e.zhedieresiscyrillic=1245,e.zihiragana=12376,e.zikatakana=12472,e.zinorhebrew=1454,e.zlinebelow=7829,e.zmonospace=65370,e.zohiragana=12382,e.zokatakana=12478,e.zparen=9397,e.zretroflexhook=656,e.zstroke=438,e.zuhiragana=12378,e.zukatakana=12474,e[".notdef"]=0,e.angbracketleftbig=9001,e.angbracketleftBig=9001,e.angbracketleftbigg=9001,e.angbracketleftBigg=9001,e.angbracketrightBig=9002,e.angbracketrightbig=9002,e.angbracketrightBigg=9002,e.angbracketrightbigg=9002,e.arrowhookleft=8618,e.arrowhookright=8617,e.arrowlefttophalf=8636,e.arrowleftbothalf=8637,e.arrownortheast=8599,e.arrownorthwest=8598,e.arrowrighttophalf=8640,e.arrowrightbothalf=8641,e.arrowsoutheast=8600,e.arrowsouthwest=8601,e.backslashbig=8726,e.backslashBig=8726,e.backslashBigg=8726,e.backslashbigg=8726,e.bardbl=8214,e.bracehtipdownleft=65079,e.bracehtipdownright=65079,e.bracehtipupleft=65080,e.bracehtipupright=65080,e.braceleftBig=123,e.braceleftbig=123,e.braceleftbigg=123,e.braceleftBigg=123,e.bracerightBig=125,e.bracerightbig=125,e.bracerightbigg=125,e.bracerightBigg=125,e.bracketleftbig=91,e.bracketleftBig=91,e.bracketleftbigg=91,e.bracketleftBigg=91,e.bracketrightBig=93,e.bracketrightbig=93,e.bracketrightbigg=93,e.bracketrightBigg=93,e.ceilingleftbig=8968,e.ceilingleftBig=8968,e.ceilingleftBigg=8968,e.ceilingleftbigg=8968,e.ceilingrightbig=8969,e.ceilingrightBig=8969,e.ceilingrightbigg=8969,e.ceilingrightBigg=8969,e.circledotdisplay=8857,e.circledottext=8857,e.circlemultiplydisplay=8855,e.circlemultiplytext=8855,e.circleplusdisplay=8853,e.circleplustext=8853,e.contintegraldisplay=8750,e.contintegraltext=8750,e.coproductdisplay=8720,e.coproducttext=8720,e.floorleftBig=8970,e.floorleftbig=8970,e.floorleftbigg=8970,e.floorleftBigg=8970,e.floorrightbig=8971,e.floorrightBig=8971,e.floorrightBigg=8971,e.floorrightbigg=8971,e.hatwide=770,e.hatwider=770,e.hatwidest=770,e.intercal=7488,e.integraldisplay=8747,e.integraltext=8747,e.intersectiondisplay=8898,e.intersectiontext=8898,e.logicalanddisplay=8743,e.logicalandtext=8743,e.logicalordisplay=8744,e.logicalortext=8744,e.parenleftBig=40,e.parenleftbig=40,e.parenleftBigg=40,e.parenleftbigg=40,e.parenrightBig=41,e.parenrightbig=41,e.parenrightBigg=41,e.parenrightbigg=41,e.prime=8242,e.productdisplay=8719,e.producttext=8719,e.radicalbig=8730,e.radicalBig=8730,e.radicalBigg=8730,e.radicalbigg=8730,e.radicalbt=8730,e.radicaltp=8730,e.radicalvertex=8730,e.slashbig=47,e.slashBig=47,e.slashBigg=47,e.slashbigg=47,e.summationdisplay=8721,e.summationtext=8721,e.tildewide=732,e.tildewider=732,e.tildewidest=732,e.uniondisplay=8899,e.unionmultidisplay=8846,e.unionmultitext=8846,e.unionsqdisplay=8852,e.unionsqtext=8852,e.uniontext=8899,e.vextenddouble=8741,e.vextendsingle=8739});P.getGlyphsUnicode=k;const R=(0,n.getLookupTableFactory)(function(e){e.space=32,e.a1=9985,e.a2=9986,e.a202=9987,e.a3=9988,e.a4=9742,e.a5=9990,e.a119=9991,e.a118=9992,e.a117=9993,e.a11=9755,e.a12=9758,e.a13=9996,e.a14=9997,e.a15=9998,e.a16=9999,e.a105=1e4,e.a17=10001,e.a18=10002,e.a19=10003,e.a20=10004,e.a21=10005,e.a22=10006,e.a23=10007,e.a24=10008,e.a25=10009,e.a26=10010,e.a27=10011,e.a28=10012,e.a6=10013,e.a7=10014,e.a8=10015,e.a9=10016,e.a10=10017,e.a29=10018,e.a30=10019,e.a31=10020,e.a32=10021,e.a33=10022,e.a34=10023,e.a35=9733,e.a36=10025,e.a37=10026,e.a38=10027,e.a39=10028,e.a40=10029,e.a41=10030,e.a42=10031,e.a43=10032,e.a44=10033,e.a45=10034,e.a46=10035,e.a47=10036,e.a48=10037,e.a49=10038,e.a50=10039,e.a51=10040,e.a52=10041,e.a53=10042,e.a54=10043,e.a55=10044,e.a56=10045,e.a57=10046,e.a58=10047,e.a59=10048,e.a60=10049,e.a61=10050,e.a62=10051,e.a63=10052,e.a64=10053,e.a65=10054,e.a66=10055,e.a67=10056,e.a68=10057,e.a69=10058,e.a70=10059,e.a71=9679,e.a72=10061,e.a73=9632,e.a74=10063,e.a203=10064,e.a75=10065,e.a204=10066,e.a76=9650,e.a77=9660,e.a78=9670,e.a79=10070,e.a81=9687,e.a82=10072,e.a83=10073,e.a84=10074,e.a97=10075,e.a98=10076,e.a99=10077,e.a100=10078,e.a101=10081,e.a102=10082,e.a103=10083,e.a104=10084,e.a106=10085,e.a107=10086,e.a108=10087,e.a112=9827,e.a111=9830,e.a110=9829,e.a109=9824,e.a120=9312,e.a121=9313,e.a122=9314,e.a123=9315,e.a124=9316,e.a125=9317,e.a126=9318,e.a127=9319,e.a128=9320,e.a129=9321,e.a130=10102,e.a131=10103,e.a132=10104,e.a133=10105,e.a134=10106,e.a135=10107,e.a136=10108,e.a137=10109,e.a138=10110,e.a139=10111,e.a140=10112,e.a141=10113,e.a142=10114,e.a143=10115,e.a144=10116,e.a145=10117,e.a146=10118,e.a147=10119,e.a148=10120,e.a149=10121,e.a150=10122,e.a151=10123,e.a152=10124,e.a153=10125,e.a154=10126,e.a155=10127,e.a156=10128,e.a157=10129,e.a158=10130,e.a159=10131,e.a160=10132,e.a161=8594,e.a163=8596,e.a164=8597,e.a196=10136,e.a165=10137,e.a192=10138,e.a166=10139,e.a167=10140,e.a168=10141,e.a169=10142,e.a170=10143,e.a171=10144,e.a172=10145,e.a173=10146,e.a162=10147,e.a174=10148,e.a175=10149,e.a176=10150,e.a177=10151,e.a178=10152,e.a179=10153,e.a193=10154,e.a180=10155,e.a199=10156,e.a181=10157,e.a200=10158,e.a182=10159,e.a201=10161,e.a183=10162,e.a184=10163,e.a197=10164,e.a185=10165,e.a194=10166,e.a198=10167,e.a186=10168,e.a195=10169,e.a187=10170,e.a188=10171,e.a189=10172,e.a190=10173,e.a191=10174,e.a89=10088,e.a90=10089,e.a93=10090,e.a94=10091,e.a91=10092,e.a92=10093,e.a205=10094,e.a85=10095,e.a206=10096,e.a86=10097,e.a87=10098,e.a88=10099,e.a95=10100,e.a96=10101,e[".notdef"]=0});P.getDingbatsGlyphsUnicode=R},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.clearUnicodeCaches=T,P.getCharUnicodeCategory=I,P.getUnicodeForGlyph=e,P.getUnicodeRangeFor=o,P.mapSpecialUnicodeValues=R;var n=ie(3);const k=(0,n.getLookupTableFactory)(function(d){d[63721]=169,d[63193]=169,d[63720]=174,d[63194]=174,d[63722]=8482,d[63195]=8482,d[63729]=9127,d[63730]=9128,d[63731]=9129,d[63740]=9131,d[63741]=9132,d[63742]=9133,d[63726]=9121,d[63727]=9122,d[63728]=9123,d[63737]=9124,d[63738]=9125,d[63739]=9126,d[63723]=9115,d[63724]=9116,d[63725]=9117,d[63734]=9118,d[63735]=9119,d[63736]=9120});function R(d){return d>=65520&&d<=65535?0:d>=62976&&d<=63743?k()[d]||d:d===173?45:d}function e(d,f){let i=f[d];if(i!==void 0)return i;if(!d)return-1;if(d[0]==="u"){const S=d.length;let w;if(S===7&&d[1]==="n"&&d[2]==="i")w=d.substring(3);else if(S>=5&&S<=7)w=d.substring(1);else return-1;if(w===w.toUpperCase()&&(i=parseInt(w,16),i>=0))return i}return-1}const t=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,42655],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647],[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function o(d,f=-1){if(f!==-1){const i=t[f];for(let S=0,w=i.length;S<w;S+=2)if(d>=i[S]&&d<=i[S+1])return f}for(let i=0,S=t.length;i<S;i++){const w=t[i];for(let v=0,b=w.length;v<b;v+=2)if(d>=w[v]&&d<=w[v+1])return i}return-1}const $=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),L=new Map;function I(d){const f=L.get(d);if(f)return f;const i=d.match($),S={isWhitespace:!!(i!=null&&i[1]),isZeroWidthDiacritic:!!(i!=null&&i[2]),isInvisibleFormatMark:!!(i!=null&&i[3])};return L.set(d,S),S}function T(){L.clear()}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.getSerifFonts=P.getNonStdFontMap=P.getGlyphMapForStandardFonts=P.getFontNameToFileMap=void 0,P.getStandardFontName=d,P.getSymbolsFonts=P.getSupplementalGlyphMapForCalibri=P.getSupplementalGlyphMapForArialBlack=P.getStdFontMap=void 0,P.isKnownFontName=f;var n=ie(3),k=ie(38);const R=(0,n.getLookupTableFactory)(function(i){i["Times-Roman"]="Times-Roman",i.Helvetica="Helvetica",i.Courier="Courier",i.Symbol="Symbol",i["Times-Bold"]="Times-Bold",i["Helvetica-Bold"]="Helvetica-Bold",i["Courier-Bold"]="Courier-Bold",i.ZapfDingbats="ZapfDingbats",i["Times-Italic"]="Times-Italic",i["Helvetica-Oblique"]="Helvetica-Oblique",i["Courier-Oblique"]="Courier-Oblique",i["Times-BoldItalic"]="Times-BoldItalic",i["Helvetica-BoldOblique"]="Helvetica-BoldOblique",i["Courier-BoldOblique"]="Courier-BoldOblique",i.ArialNarrow="Helvetica",i["ArialNarrow-Bold"]="Helvetica-Bold",i["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",i["ArialNarrow-Italic"]="Helvetica-Oblique",i.ArialBlack="Helvetica",i["ArialBlack-Bold"]="Helvetica-Bold",i["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",i["ArialBlack-Italic"]="Helvetica-Oblique",i["Arial-Black"]="Helvetica",i["Arial-Black-Bold"]="Helvetica-Bold",i["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",i["Arial-Black-Italic"]="Helvetica-Oblique",i.Arial="Helvetica",i["Arial-Bold"]="Helvetica-Bold",i["Arial-BoldItalic"]="Helvetica-BoldOblique",i["Arial-Italic"]="Helvetica-Oblique",i.ArialMT="Helvetica",i["Arial-BoldItalicMT"]="Helvetica-BoldOblique",i["Arial-BoldMT"]="Helvetica-Bold",i["Arial-ItalicMT"]="Helvetica-Oblique",i["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",i["Arial-BoldMT-Bold"]="Helvetica-Bold",i["Arial-ItalicMT-Italic"]="Helvetica-Oblique",i.ArialUnicodeMS="Helvetica",i["ArialUnicodeMS-Bold"]="Helvetica-Bold",i["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",i["ArialUnicodeMS-Italic"]="Helvetica-Oblique",i["Courier-BoldItalic"]="Courier-BoldOblique",i["Courier-Italic"]="Courier-Oblique",i.CourierNew="Courier",i["CourierNew-Bold"]="Courier-Bold",i["CourierNew-BoldItalic"]="Courier-BoldOblique",i["CourierNew-Italic"]="Courier-Oblique",i["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",i["CourierNewPS-BoldMT"]="Courier-Bold",i["CourierNewPS-ItalicMT"]="Courier-Oblique",i.CourierNewPSMT="Courier",i["Helvetica-BoldItalic"]="Helvetica-BoldOblique",i["Helvetica-Italic"]="Helvetica-Oblique",i["Symbol-Bold"]="Symbol",i["Symbol-BoldItalic"]="Symbol",i["Symbol-Italic"]="Symbol",i.TimesNewRoman="Times-Roman",i["TimesNewRoman-Bold"]="Times-Bold",i["TimesNewRoman-BoldItalic"]="Times-BoldItalic",i["TimesNewRoman-Italic"]="Times-Italic",i.TimesNewRomanPS="Times-Roman",i["TimesNewRomanPS-Bold"]="Times-Bold",i["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",i["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",i["TimesNewRomanPS-BoldMT"]="Times-Bold",i["TimesNewRomanPS-Italic"]="Times-Italic",i["TimesNewRomanPS-ItalicMT"]="Times-Italic",i.TimesNewRomanPSMT="Times-Roman",i["TimesNewRomanPSMT-Bold"]="Times-Bold",i["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",i["TimesNewRomanPSMT-Italic"]="Times-Italic"});P.getStdFontMap=R;const e=(0,n.getLookupTableFactory)(function(i){i.Courier="FoxitFixed.pfb",i["Courier-Bold"]="FoxitFixedBold.pfb",i["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",i["Courier-Oblique"]="FoxitFixedItalic.pfb",i.Helvetica="LiberationSans-Regular.ttf",i["Helvetica-Bold"]="LiberationSans-Bold.ttf",i["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",i["Helvetica-Oblique"]="LiberationSans-Italic.ttf",i["Times-Roman"]="FoxitSerif.pfb",i["Times-Bold"]="FoxitSerifBold.pfb",i["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",i["Times-Italic"]="FoxitSerifItalic.pfb",i.Symbol="FoxitSymbol.pfb",i.ZapfDingbats="FoxitDingbats.pfb",i["LiberationSans-Regular"]="LiberationSans-Regular.ttf",i["LiberationSans-Bold"]="LiberationSans-Bold.ttf",i["LiberationSans-Italic"]="LiberationSans-Italic.ttf",i["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"});P.getFontNameToFileMap=e;const t=(0,n.getLookupTableFactory)(function(i){i.Calibri="Helvetica",i["Calibri-Bold"]="Helvetica-Bold",i["Calibri-BoldItalic"]="Helvetica-BoldOblique",i["Calibri-Italic"]="Helvetica-Oblique",i.CenturyGothic="Helvetica",i["CenturyGothic-Bold"]="Helvetica-Bold",i["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",i["CenturyGothic-Italic"]="Helvetica-Oblique",i.ComicSansMS="Comic Sans MS",i["ComicSansMS-Bold"]="Comic Sans MS-Bold",i["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",i["ComicSansMS-Italic"]="Comic Sans MS-Italic",i.Impact="Helvetica",i["ItcSymbol-Bold"]="Helvetica-Bold",i["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",i["ItcSymbol-Book"]="Helvetica",i["ItcSymbol-BookItalic"]="Helvetica-Oblique",i["ItcSymbol-Medium"]="Helvetica",i["ItcSymbol-MediumItalic"]="Helvetica-Oblique",i.LucidaConsole="Courier",i["LucidaConsole-Bold"]="Courier-Bold",i["LucidaConsole-BoldItalic"]="Courier-BoldOblique",i["LucidaConsole-Italic"]="Courier-Oblique",i["LucidaSans-Demi"]="Helvetica-Bold",i["MS-Gothic"]="MS Gothic",i["MS-Gothic-Bold"]="MS Gothic-Bold",i["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",i["MS-Gothic-Italic"]="MS Gothic-Italic",i["MS-Mincho"]="MS Mincho",i["MS-Mincho-Bold"]="MS Mincho-Bold",i["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",i["MS-Mincho-Italic"]="MS Mincho-Italic",i["MS-PGothic"]="MS PGothic",i["MS-PGothic-Bold"]="MS PGothic-Bold",i["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",i["MS-PGothic-Italic"]="MS PGothic-Italic",i["MS-PMincho"]="MS PMincho",i["MS-PMincho-Bold"]="MS PMincho-Bold",i["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",i["MS-PMincho-Italic"]="MS PMincho-Italic",i.NuptialScript="Times-Italic",i.SegoeUISymbol="Helvetica"});P.getNonStdFontMap=t;const o=(0,n.getLookupTableFactory)(function(i){i["Adobe Jenson"]=!0,i["Adobe Text"]=!0,i.Albertus=!0,i.Aldus=!0,i.Alexandria=!0,i.Algerian=!0,i["American Typewriter"]=!0,i.Antiqua=!0,i.Apex=!0,i.Arno=!0,i.Aster=!0,i.Aurora=!0,i.Baskerville=!0,i.Bell=!0,i.Bembo=!0,i["Bembo Schoolbook"]=!0,i.Benguiat=!0,i["Berkeley Old Style"]=!0,i["Bernhard Modern"]=!0,i["Berthold City"]=!0,i.Bodoni=!0,i["Bauer Bodoni"]=!0,i["Book Antiqua"]=!0,i.Bookman=!0,i["Bordeaux Roman"]=!0,i["Californian FB"]=!0,i.Calisto=!0,i.Calvert=!0,i.Capitals=!0,i.Cambria=!0,i.Cartier=!0,i.Caslon=!0,i.Catull=!0,i.Centaur=!0,i["Century Old Style"]=!0,i["Century Schoolbook"]=!0,i.Chaparral=!0,i["Charis SIL"]=!0,i.Cheltenham=!0,i["Cholla Slab"]=!0,i.Clarendon=!0,i.Clearface=!0,i.Cochin=!0,i.Colonna=!0,i["Computer Modern"]=!0,i["Concrete Roman"]=!0,i.Constantia=!0,i["Cooper Black"]=!0,i.Corona=!0,i.Ecotype=!0,i.Egyptienne=!0,i.Elephant=!0,i.Excelsior=!0,i.Fairfield=!0,i["FF Scala"]=!0,i.Folkard=!0,i.Footlight=!0,i.FreeSerif=!0,i["Friz Quadrata"]=!0,i.Garamond=!0,i.Gentium=!0,i.Georgia=!0,i.Gloucester=!0,i["Goudy Old Style"]=!0,i["Goudy Schoolbook"]=!0,i["Goudy Pro Font"]=!0,i.Granjon=!0,i["Guardian Egyptian"]=!0,i.Heather=!0,i.Hercules=!0,i["High Tower Text"]=!0,i.Hiroshige=!0,i["Hoefler Text"]=!0,i["Humana Serif"]=!0,i.Imprint=!0,i["Ionic No. 5"]=!0,i.Janson=!0,i.Joanna=!0,i.Korinna=!0,i.Lexicon=!0,i.LiberationSerif=!0,i["Liberation Serif"]=!0,i["Linux Libertine"]=!0,i.Literaturnaya=!0,i.Lucida=!0,i["Lucida Bright"]=!0,i.Melior=!0,i.Memphis=!0,i.Miller=!0,i.Minion=!0,i.Modern=!0,i["Mona Lisa"]=!0,i["Mrs Eaves"]=!0,i["MS Serif"]=!0,i["Museo Slab"]=!0,i["New York"]=!0,i["Nimbus Roman"]=!0,i["NPS Rawlinson Roadway"]=!0,i.NuptialScript=!0,i.Palatino=!0,i.Perpetua=!0,i.Plantin=!0,i["Plantin Schoolbook"]=!0,i.Playbill=!0,i["Poor Richard"]=!0,i["Rawlinson Roadway"]=!0,i.Renault=!0,i.Requiem=!0,i.Rockwell=!0,i.Roman=!0,i["Rotis Serif"]=!0,i.Sabon=!0,i.Scala=!0,i.Seagull=!0,i.Sistina=!0,i.Souvenir=!0,i.STIX=!0,i["Stone Informal"]=!0,i["Stone Serif"]=!0,i.Sylfaen=!0,i.Times=!0,i.Trajan=!0,i.Trinité=!0,i["Trump Mediaeval"]=!0,i.Utopia=!0,i["Vale Type"]=!0,i["Bitstream Vera"]=!0,i["Vera Serif"]=!0,i.Versailles=!0,i.Wanted=!0,i.Weiss=!0,i["Wide Latin"]=!0,i.Windsor=!0,i.XITS=!0});P.getSerifFonts=o;const $=(0,n.getLookupTableFactory)(function(i){i.Dingbats=!0,i.Symbol=!0,i.ZapfDingbats=!0,i.Wingdings=!0,i["Wingdings-Bold"]=!0,i["Wingdings-Regular"]=!0});P.getSymbolsFonts=$;const L=(0,n.getLookupTableFactory)(function(i){i[2]=10,i[3]=32,i[4]=33,i[5]=34,i[6]=35,i[7]=36,i[8]=37,i[9]=38,i[10]=39,i[11]=40,i[12]=41,i[13]=42,i[14]=43,i[15]=44,i[16]=45,i[17]=46,i[18]=47,i[19]=48,i[20]=49,i[21]=50,i[22]=51,i[23]=52,i[24]=53,i[25]=54,i[26]=55,i[27]=56,i[28]=57,i[29]=58,i[30]=894,i[31]=60,i[32]=61,i[33]=62,i[34]=63,i[35]=64,i[36]=65,i[37]=66,i[38]=67,i[39]=68,i[40]=69,i[41]=70,i[42]=71,i[43]=72,i[44]=73,i[45]=74,i[46]=75,i[47]=76,i[48]=77,i[49]=78,i[50]=79,i[51]=80,i[52]=81,i[53]=82,i[54]=83,i[55]=84,i[56]=85,i[57]=86,i[58]=87,i[59]=88,i[60]=89,i[61]=90,i[62]=91,i[63]=92,i[64]=93,i[65]=94,i[66]=95,i[67]=96,i[68]=97,i[69]=98,i[70]=99,i[71]=100,i[72]=101,i[73]=102,i[74]=103,i[75]=104,i[76]=105,i[77]=106,i[78]=107,i[79]=108,i[80]=109,i[81]=110,i[82]=111,i[83]=112,i[84]=113,i[85]=114,i[86]=115,i[87]=116,i[88]=117,i[89]=118,i[90]=119,i[91]=120,i[92]=121,i[93]=122,i[94]=123,i[95]=124,i[96]=125,i[97]=126,i[98]=196,i[99]=197,i[100]=199,i[101]=201,i[102]=209,i[103]=214,i[104]=220,i[105]=225,i[106]=224,i[107]=226,i[108]=228,i[109]=227,i[110]=229,i[111]=231,i[112]=233,i[113]=232,i[114]=234,i[115]=235,i[116]=237,i[117]=236,i[118]=238,i[119]=239,i[120]=241,i[121]=243,i[122]=242,i[123]=244,i[124]=246,i[125]=245,i[126]=250,i[127]=249,i[128]=251,i[129]=252,i[130]=8224,i[131]=176,i[132]=162,i[133]=163,i[134]=167,i[135]=8226,i[136]=182,i[137]=223,i[138]=174,i[139]=169,i[140]=8482,i[141]=180,i[142]=168,i[143]=8800,i[144]=198,i[145]=216,i[146]=8734,i[147]=177,i[148]=8804,i[149]=8805,i[150]=165,i[151]=181,i[152]=8706,i[153]=8721,i[154]=8719,i[156]=8747,i[157]=170,i[158]=186,i[159]=8486,i[160]=230,i[161]=248,i[162]=191,i[163]=161,i[164]=172,i[165]=8730,i[166]=402,i[167]=8776,i[168]=8710,i[169]=171,i[170]=187,i[171]=8230,i[179]=8220,i[180]=8221,i[181]=8216,i[182]=8217,i[200]=193,i[203]=205,i[207]=211,i[210]=218,i[223]=711,i[224]=321,i[225]=322,i[226]=352,i[227]=353,i[228]=381,i[229]=382,i[233]=221,i[234]=253,i[252]=263,i[253]=268,i[254]=269,i[258]=258,i[260]=260,i[261]=261,i[265]=280,i[266]=281,i[267]=282,i[268]=283,i[269]=313,i[275]=323,i[276]=324,i[278]=328,i[283]=344,i[284]=345,i[285]=346,i[286]=347,i[292]=367,i[295]=377,i[296]=378,i[298]=380,i[305]=963,i[306]=964,i[307]=966,i[308]=8215,i[309]=8252,i[310]=8319,i[311]=8359,i[312]=8592,i[313]=8593,i[337]=9552,i[493]=1039,i[494]=1040,i[672]=1488,i[673]=1489,i[674]=1490,i[675]=1491,i[676]=1492,i[677]=1493,i[678]=1494,i[679]=1495,i[680]=1496,i[681]=1497,i[682]=1498,i[683]=1499,i[684]=1500,i[685]=1501,i[686]=1502,i[687]=1503,i[688]=1504,i[689]=1505,i[690]=1506,i[691]=1507,i[692]=1508,i[693]=1509,i[694]=1510,i[695]=1511,i[696]=1512,i[697]=1513,i[698]=1514,i[705]=1524,i[706]=8362,i[710]=64288,i[711]=64298,i[759]=1617,i[761]=1776,i[763]=1778,i[775]=1652,i[777]=1764,i[778]=1780,i[779]=1781,i[780]=1782,i[782]=771,i[783]=64726,i[786]=8363,i[788]=8532,i[790]=768,i[791]=769,i[792]=768,i[795]=803,i[797]=64336,i[798]=64337,i[799]=64342,i[800]=64343,i[801]=64344,i[802]=64345,i[803]=64362,i[804]=64363,i[805]=64364,i[2424]=7821,i[2425]=7822,i[2426]=7823,i[2427]=7824,i[2428]=7825,i[2429]=7826,i[2430]=7827,i[2433]=7682,i[2678]=8045,i[2679]=8046,i[2830]=1552,i[2838]=686,i[2840]=751,i[2842]=753,i[2843]=754,i[2844]=755,i[2846]=757,i[2856]=767,i[2857]=848,i[2858]=849,i[2862]=853,i[2863]=854,i[2864]=855,i[2865]=861,i[2866]=862,i[2906]=7460,i[2908]=7462,i[2909]=7463,i[2910]=7464,i[2912]=7466,i[2913]=7467,i[2914]=7468,i[2916]=7470,i[2917]=7471,i[2918]=7472,i[2920]=7474,i[2921]=7475,i[2922]=7476,i[2924]=7478,i[2925]=7479,i[2926]=7480,i[2928]=7482,i[2929]=7483,i[2930]=7484,i[2932]=7486,i[2933]=7487,i[2934]=7488,i[2936]=7490,i[2937]=7491,i[2938]=7492,i[2940]=7494,i[2941]=7495,i[2942]=7496,i[2944]=7498,i[2946]=7500,i[2948]=7502,i[2950]=7504,i[2951]=7505,i[2952]=7506,i[2954]=7508,i[2955]=7509,i[2956]=7510,i[2958]=7512,i[2959]=7513,i[2960]=7514,i[2962]=7516,i[2963]=7517,i[2964]=7518,i[2966]=7520,i[2967]=7521,i[2968]=7522,i[2970]=7524,i[2971]=7525,i[2972]=7526,i[2974]=7528,i[2975]=7529,i[2976]=7530,i[2978]=1537,i[2979]=1538,i[2980]=1539,i[2982]=1549,i[2983]=1551,i[2984]=1552,i[2986]=1554,i[2987]=1555,i[2988]=1556,i[2990]=1623,i[2991]=1624,i[2995]=1775,i[2999]=1791,i[3002]=64290,i[3003]=64291,i[3004]=64292,i[3006]=64294,i[3007]=64295,i[3008]=64296,i[3011]=1900,i[3014]=8223,i[3015]=8244,i[3017]=7532,i[3018]=7533,i[3019]=7534,i[3075]=7590,i[3076]=7591,i[3079]=7594,i[3080]=7595,i[3083]=7598,i[3084]=7599,i[3087]=7602,i[3088]=7603,i[3091]=7606,i[3092]=7607,i[3095]=7610,i[3096]=7611,i[3099]=7614,i[3100]=7615,i[3103]=7618,i[3104]=7619,i[3107]=8337,i[3108]=8338,i[3116]=1884,i[3119]=1885,i[3120]=1885,i[3123]=1886,i[3124]=1886,i[3127]=1887,i[3128]=1887,i[3131]=1888,i[3132]=1888,i[3135]=1889,i[3136]=1889,i[3139]=1890,i[3140]=1890,i[3143]=1891,i[3144]=1891,i[3147]=1892,i[3148]=1892,i[3153]=580,i[3154]=581,i[3157]=584,i[3158]=585,i[3161]=588,i[3162]=589,i[3165]=891,i[3166]=892,i[3169]=1274,i[3170]=1275,i[3173]=1278,i[3174]=1279,i[3181]=7622,i[3182]=7623,i[3282]=11799,i[3316]=578,i[3379]=42785,i[3393]=1159,i[3416]=8377});P.getGlyphMapForStandardFonts=L;const I=(0,n.getLookupTableFactory)(function(i){i[227]=322,i[264]=261,i[291]=346});P.getSupplementalGlyphMapForArialBlack=I;const T=(0,n.getLookupTableFactory)(function(i){i[1]=32,i[4]=65,i[5]=192,i[6]=193,i[9]=196,i[17]=66,i[18]=67,i[21]=268,i[24]=68,i[28]=69,i[29]=200,i[30]=201,i[32]=282,i[38]=70,i[39]=71,i[44]=72,i[47]=73,i[48]=204,i[49]=205,i[58]=74,i[60]=75,i[62]=76,i[68]=77,i[69]=78,i[75]=79,i[76]=210,i[80]=214,i[87]=80,i[89]=81,i[90]=82,i[92]=344,i[94]=83,i[97]=352,i[100]=84,i[104]=85,i[109]=220,i[115]=86,i[116]=87,i[121]=88,i[122]=89,i[124]=221,i[127]=90,i[129]=381,i[258]=97,i[259]=224,i[260]=225,i[263]=228,i[268]=261,i[271]=98,i[272]=99,i[273]=263,i[275]=269,i[282]=100,i[286]=101,i[287]=232,i[288]=233,i[290]=283,i[295]=281,i[296]=102,i[336]=103,i[346]=104,i[349]=105,i[350]=236,i[351]=237,i[361]=106,i[364]=107,i[367]=108,i[371]=322,i[373]=109,i[374]=110,i[381]=111,i[382]=242,i[383]=243,i[386]=246,i[393]=112,i[395]=113,i[396]=114,i[398]=345,i[400]=115,i[401]=347,i[403]=353,i[410]=116,i[437]=117,i[442]=252,i[448]=118,i[449]=119,i[454]=120,i[455]=121,i[457]=253,i[460]=122,i[462]=382,i[463]=380,i[853]=44,i[855]=58,i[856]=46,i[876]=47,i[878]=45,i[882]=45,i[894]=40,i[895]=41,i[896]=91,i[897]=93,i[923]=64,i[1004]=48,i[1005]=49,i[1006]=50,i[1007]=51,i[1008]=52,i[1009]=53,i[1010]=54,i[1011]=55,i[1012]=56,i[1013]=57,i[1081]=37,i[1085]=43,i[1086]=45});P.getSupplementalGlyphMapForCalibri=T;function d(i){const S=(0,k.normalizeFontName)(i);return R()[S]}function f(i){const S=(0,k.normalizeFontName)(i);return!!(R()[S]||t()[S]||o()[S]||$()[S])}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ToUnicodeMap=P.IdentityToUnicodeMap=void 0;var n=ie(2);class k{constructor(t=[]){this._map=t}get length(){return this._map.length}forEach(t){for(const o in this._map)t(o,this._map[o].charCodeAt(0))}has(t){return this._map[t]!==void 0}get(t){return this._map[t]}charCodeOf(t){const o=this._map;if(o.length<=65536)return o.indexOf(t);for(const $ in o)if(o[$]===t)return $|0;return-1}amend(t){for(const o in t)this._map[o]=t[o]}}P.ToUnicodeMap=k;class R{constructor(t,o){this.firstChar=t,this.lastChar=o}get length(){return this.lastChar+1-this.firstChar}forEach(t){for(let o=this.firstChar,$=this.lastChar;o<=$;o++)t(o,o)}has(t){return this.firstChar<=t&&t<=this.lastChar}get(t){if(this.firstChar<=t&&t<=this.lastChar)return String.fromCharCode(t)}charCodeOf(t){return Number.isInteger(t)&&t>=this.firstChar&&t<=this.lastChar?t:-1}amend(t){(0,n.unreachable)("Should not call amend()")}}P.IdentityToUnicodeMap=R},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CFFFont=void 0;var n=ie(35),k=ie(38),R=ie(2);class e{constructor(o,$){this.properties=$;const L=new n.CFFParser(o,$,k.SEAC_ANALYSIS_ENABLED);this.cff=L.parse(),this.cff.duplicateFirstGlyph();const I=new n.CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=I.compile()}catch{(0,R.warn)("Failed to compile font "+$.loadedName),this.data=o}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const o=this.cff,$=this.properties,{cidToGidMap:L,cMap:I}=$,T=o.charset.charset;let d,f;if($.composite){let S;if((L==null?void 0:L.length)>0){S=Object.create(null);for(let v=0,b=L.length;v<b;v++){const M=L[v];M!==void 0&&(S[M]=v)}}d=Object.create(null);let w;if(o.isCIDFont)for(f=0;f<T.length;f++){const v=T[f];w=I.charCodeOf(v),(S==null?void 0:S[w])!==void 0&&(w=S[w]),d[w]=f}else for(f=0;f<o.charStrings.count;f++)w=I.charCodeOf(f),d[w]=f;return d}let i=o.encoding?o.encoding.encoding:null;return $.isInternalFont&&(i=$.defaultEncoding),d=(0,k.type1FontGlyphMapping)($,i,T),d}hasGlyphId(o){return this.cff.hasGlyphId(o)}_createBuiltInEncoding(){const{charset:o,encoding:$}=this.cff;if(!o||!$)return;const L=o.charset,I=$.encoding,T=[];for(const d in I){const f=I[d];if(f>=0){const i=L[f];i&&(T[d]=i)}}T.length>0&&(this.properties.builtInEncoding=T)}}P.CFFFont=e},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FontRendererFactory=void 0;var n=ie(2),k=ie(35),R=ie(39),e=ie(37),t=ie(8);function o(l,g){return(l[g]<<24|l[g+1]<<16|l[g+2]<<8|l[g+3])>>>0}function $(l,g){return l[g]<<8|l[g+1]}function L(l,g){return(l[g]<<24|l[g+1]<<16)>>16}function I(l,g){return l[g]<<24>>24}function T(l,g){return L(l,g)/16384}function d(l){const g=l.length;let N=32768;return g<1240?N=107:g<33900&&(N=1131),N}function f(l,g,N){const s=$(l,g+2)===1?o(l,g+8):o(l,g+16),u=$(l,g+s);let F,U,O;if(u===4){$(l,g+s+2);const m=$(l,g+s+6)>>1;for(U=g+s+14,F=[],O=0;O<m;O++,U+=2)F[O]={end:$(l,U)};for(U+=2,O=0;O<m;O++,U+=2)F[O].start=$(l,U);for(O=0;O<m;O++,U+=2)F[O].idDelta=$(l,U);for(O=0;O<m;O++,U+=2){let x=$(l,U);if(x!==0){F[O].ids=[];for(let y=0,r=F[O].end-F[O].start+1;y<r;y++)F[O].ids[y]=$(l,U+x),x+=2}}return F}else if(u===12){const m=o(l,g+s+12);for(U=g+s+16,F=[],O=0;O<m;O++)g=o(l,U),F.push({start:g,end:o(l,U+4),idDelta:o(l,U+8)-g}),U+=12;return F}throw new n.FormatError(`unsupported cmap: ${u}`)}function i(l,g,N,s){var O,m,x;const u={},U=new k.CFFParser(new t.Stream(l,g,N-g),u,s).parse();return{glyphs:U.charStrings.objects,subrs:(m=(O=U.topDict.privateDict)==null?void 0:O.subrsIndex)==null?void 0:m.objects,gsubrs:(x=U.globalSubrIndex)==null?void 0:x.objects,isCFFCIDFont:U.isCIDFont,fdSelect:U.fdSelect,fdArray:U.fdArray}}function S(l,g,N){let s,u;N?(s=4,u=o):(s=2,u=(O,m)=>2*$(O,m));const F=[];let U=u(g,0);for(let O=s;O<g.length;O+=s){const m=u(g,O);F.push(l.subarray(U,m)),U=m}return F}function w(l,g){const N=g.codePointAt(0);let s=0,u=0,F=l.length-1;for(;u<F;){const U=u+F+1>>1;N<l[U].start?F=U-1:u=U}return l[u].start<=N&&N<=l[u].end&&(s=l[u].idDelta+(l[u].ids?l[u].ids[N-l[u].start]:N)&65535),{charCode:N,glyphId:s}}function v(l,g,N){function s(r,p){g.push({cmd:"moveTo",args:[r,p]})}function u(r,p){g.push({cmd:"lineTo",args:[r,p]})}function F(r,p,c,h){g.push({cmd:"quadraticCurveTo",args:[r,p,c,h]})}let U=0;const O=L(l,U);let m,x=0,y=0;if(U+=10,O<0)do{m=$(l,U);const r=$(l,U+2);U+=4;let p,c;m&1?(m&2?(p=L(l,U),c=L(l,U+2)):(p=$(l,U),c=$(l,U+2)),U+=4):m&2?(p=I(l,U++),c=I(l,U++)):(p=l[U++],c=l[U++]),m&2?(x=p,y=c):(x=0,y=0);let h=1,C=1,D=0,X=0;m&8?(h=C=T(l,U),U+=2):m&64?(h=T(l,U),C=T(l,U+2),U+=4):m&128&&(h=T(l,U),D=T(l,U+2),X=T(l,U+4),C=T(l,U+6),U+=8);const q=N.glyphs[r];q&&(g.push({cmd:"save"},{cmd:"transform",args:[h,D,X,C,x,y]}),v(q,g,N),g.push({cmd:"restore"}))}while(m&32);else{const r=[];let p,c;for(p=0;p<O;p++)r.push($(l,U)),U+=2;const h=$(l,U);U+=2+h;const C=r.at(-1)+1,D=[];for(;D.length<C;){m=l[U++];let q=1;for(m&8&&(q+=l[U++]);q-- >0;)D.push({flags:m})}for(p=0;p<C;p++){switch(D[p].flags&18){case 0:x+=L(l,U),U+=2;break;case 2:x-=l[U++];break;case 18:x+=l[U++];break}D[p].x=x}for(p=0;p<C;p++){switch(D[p].flags&36){case 0:y+=L(l,U),U+=2;break;case 4:y-=l[U++];break;case 36:y+=l[U++];break}D[p].y=y}let X=0;for(U=0;U<O;U++){const q=r[U],re=D.slice(X,q+1);if(re[0].flags&1)re.push(re[0]);else if(re.at(-1).flags&1)re.unshift(re.at(-1));else{const K={flags:1,x:(re[0].x+re.at(-1).x)/2,y:(re[0].y+re.at(-1).y)/2};re.unshift(K),re.push(K)}for(s(re[0].x,re[0].y),p=1,c=re.length;p<c;p++)re[p].flags&1?u(re[p].x,re[p].y):re[p+1].flags&1?(F(re[p].x,re[p].y,re[p+1].x,re[p+1].y),p++):F(re[p].x,re[p].y,(re[p].x+re[p+1].x)/2,(re[p].y+re[p+1].y)/2);X=q+1}}}function b(l,g,N,s){function u(p,c){g.push({cmd:"moveTo",args:[p,c]})}function F(p,c){g.push({cmd:"lineTo",args:[p,c]})}function U(p,c,h,C,D,X){g.push({cmd:"bezierCurveTo",args:[p,c,h,C,D,X]})}const O=[];let m=0,x=0,y=0;function r(p){var h;let c=0;for(;c<p.length;){let C=!1,D=p[c++],X,q,re,K,oe,J,te,B,j;switch(D){case 1:y+=O.length>>1,C=!0;break;case 3:y+=O.length>>1,C=!0;break;case 4:x+=O.pop(),u(m,x),C=!0;break;case 5:for(;O.length>0;)m+=O.shift(),x+=O.shift(),F(m,x);break;case 6:for(;O.length>0&&(m+=O.shift(),F(m,x),O.length!==0);)x+=O.shift(),F(m,x);break;case 7:for(;O.length>0&&(x+=O.shift(),F(m,x),O.length!==0);)m+=O.shift(),F(m,x);break;case 8:for(;O.length>0;)X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+O.shift(),U(X,re,q,K,m,x);break;case 10:if(B=O.pop(),j=null,N.isCFFCIDFont){const Y=N.fdSelect.getFDIndex(s);if(Y>=0&&Y<N.fdArray.length){const W=N.fdArray[Y];let G;(h=W.privateDict)!=null&&h.subrsIndex&&(G=W.privateDict.subrsIndex.objects),G&&(B+=d(G),j=G[B])}else(0,n.warn)("Invalid fd index for glyph index.")}else j=N.subrs[B+N.subrsBias];j&&r(j);break;case 11:return;case 12:switch(D=p[c++],D){case 34:X=m+O.shift(),q=X+O.shift(),oe=x+O.shift(),m=q+O.shift(),U(X,x,q,oe,m,oe),X=m+O.shift(),q=X+O.shift(),m=q+O.shift(),U(X,oe,q,x,m,x);break;case 35:X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+O.shift(),U(X,re,q,K,m,x),X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+O.shift(),U(X,re,q,K,m,x),O.pop();break;case 36:X=m+O.shift(),oe=x+O.shift(),q=X+O.shift(),J=oe+O.shift(),m=q+O.shift(),U(X,oe,q,J,m,J),X=m+O.shift(),q=X+O.shift(),te=J+O.shift(),m=q+O.shift(),U(X,J,q,te,m,x);break;case 37:const Y=m,W=x;X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+O.shift(),U(X,re,q,K,m,x),X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q,x=K,Math.abs(m-Y)>Math.abs(x-W)?m+=O.shift():x+=O.shift(),U(X,re,q,K,m,x);break;default:throw new n.FormatError(`unknown operator: 12 ${D}`)}break;case 14:if(O.length>=4){const Y=O.pop(),W=O.pop();x=O.pop(),m=O.pop(),g.push({cmd:"save"},{cmd:"translate",args:[m,x]});let G=w(N.cmap,String.fromCharCode(N.glyphNameMap[e.StandardEncoding[Y]]));b(N.glyphs[G.glyphId],g,N,G.glyphId),g.push({cmd:"restore"}),G=w(N.cmap,String.fromCharCode(N.glyphNameMap[e.StandardEncoding[W]])),b(N.glyphs[G.glyphId],g,N,G.glyphId)}return;case 18:y+=O.length>>1,C=!0;break;case 19:y+=O.length>>1,c+=y+7>>3,C=!0;break;case 20:y+=O.length>>1,c+=y+7>>3,C=!0;break;case 21:x+=O.pop(),m+=O.pop(),u(m,x),C=!0;break;case 22:m+=O.pop(),u(m,x),C=!0;break;case 23:y+=O.length>>1,C=!0;break;case 24:for(;O.length>2;)X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+O.shift(),U(X,re,q,K,m,x);m+=O.shift(),x+=O.shift(),F(m,x);break;case 25:for(;O.length>6;)m+=O.shift(),x+=O.shift(),F(m,x);X=m+O.shift(),re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+O.shift(),U(X,re,q,K,m,x);break;case 26:for(O.length%2&&(m+=O.shift());O.length>0;)X=m,re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q,x=K+O.shift(),U(X,re,q,K,m,x);break;case 27:for(O.length%2&&(x+=O.shift());O.length>0;)X=m+O.shift(),re=x,q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K,U(X,re,q,K,m,x);break;case 28:O.push((p[c]<<24|p[c+1]<<16)>>16),c+=2;break;case 29:B=O.pop()+N.gsubrsBias,j=N.gsubrs[B],j&&r(j);break;case 30:for(;O.length>0&&(X=m,re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+(O.length===1?O.shift():0),U(X,re,q,K,m,x),O.length!==0);)X=m+O.shift(),re=x,q=X+O.shift(),K=re+O.shift(),x=K+O.shift(),m=q+(O.length===1?O.shift():0),U(X,re,q,K,m,x);break;case 31:for(;O.length>0&&(X=m+O.shift(),re=x,q=X+O.shift(),K=re+O.shift(),x=K+O.shift(),m=q+(O.length===1?O.shift():0),U(X,re,q,K,m,x),O.length!==0);)X=m,re=x+O.shift(),q=X+O.shift(),K=re+O.shift(),m=q+O.shift(),x=K+(O.length===1?O.shift():0),U(X,re,q,K,m,x);break;default:if(D<32)throw new n.FormatError(`unknown operator: ${D}`);D<247?O.push(D-139):D<251?O.push((D-247)*256+p[c++]+108):D<255?O.push(-(D-251)*256-p[c++]-108):(O.push((p[c]<<24|p[c+1]<<16|p[c+2]<<8|p[c+3])/65536),c+=4);break}C&&(O.length=0)}}r(l)}const M=[];class _{constructor(g){this.constructor===_&&(0,n.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=g,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(g){const{charCode:N,glyphId:s}=w(this.cmap,g);let u=this.compiledGlyphs[s];if(!u)try{u=this.compileGlyph(this.glyphs[s],s),this.compiledGlyphs[s]=u}catch(F){throw this.compiledGlyphs[s]=M,this.compiledCharCodeToGlyphId[N]===void 0&&(this.compiledCharCodeToGlyphId[N]=s),F}return this.compiledCharCodeToGlyphId[N]===void 0&&(this.compiledCharCodeToGlyphId[N]=s),u}compileGlyph(g,N){if(!g||g.length===0||g[0]===14)return M;let s=this.fontMatrix;if(this.isCFFCIDFont){const F=this.fdSelect.getFDIndex(N);F>=0&&F<this.fdArray.length?s=this.fdArray[F].getByName("FontMatrix")||n.FONT_IDENTITY_MATRIX:(0,n.warn)("Invalid fd index for glyph index.")}const u=[{cmd:"save"},{cmd:"transform",args:s.slice()},{cmd:"scale",args:["size","-size"]}];return this.compileGlyphImpl(g,u,N),u.push({cmd:"restore"}),u}compileGlyphImpl(){(0,n.unreachable)("Children classes should implement this.")}hasBuiltPath(g){const{charCode:N,glyphId:s}=w(this.cmap,g);return this.compiledGlyphs[s]!==void 0&&this.compiledCharCodeToGlyphId[N]!==void 0}}class H extends _{constructor(g,N,s){super(s||[488e-6,0,0,488e-6,0,0]),this.glyphs=g,this.cmap=N}compileGlyphImpl(g,N){v(g,N,this)}}class A extends _{constructor(g,N,s,u){super(s||[.001,0,0,.001,0,0]),this.glyphs=g.glyphs,this.gsubrs=g.gsubrs||[],this.subrs=g.subrs||[],this.cmap=N,this.glyphNameMap=u||(0,R.getGlyphsUnicode)(),this.gsubrsBias=d(this.gsubrs),this.subrsBias=d(this.subrs),this.isCFFCIDFont=g.isCFFCIDFont,this.fdSelect=g.fdSelect,this.fdArray=g.fdArray}compileGlyphImpl(g,N,s){b(g,N,this,s)}}class E{static create(g,N){const s=new Uint8Array(g.data);let u,F,U,O,m,x;const y=$(s,4);for(let r=0,p=12;r<y;r++,p+=16){const c=(0,n.bytesToString)(s.subarray(p,p+4)),h=o(s,p+8),C=o(s,p+12);switch(c){case"cmap":u=f(s,h);break;case"glyf":F=s.subarray(h,h+C);break;case"loca":U=s.subarray(h,h+C);break;case"head":x=$(s,h+18),m=$(s,h+50);break;case"CFF ":O=i(s,h,h+C,N);break}}if(F){const r=x?[1/x,0,0,1/x,0,0]:g.fontMatrix;return new H(S(F,U,m),u,r)}return new A(O,u,g.fontMatrix,g.glyphNameMap)}}P.FontRendererFactory=E},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.getMetrics=P.getFontBasicMetrics=void 0;var n=ie(3);const k=(0,n.getLookupTableFactory)(function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=(0,n.getLookupTableFactory)(function(t){t.space=278,t.exclam=278,t.quotedbl=355,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=667,t.quoteright=222,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=278,t.semicolon=278,t.less=584,t.equal=584,t.greater=584,t.question=556,t.at=1015,t.A=667,t.B=667,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=500,t.K=667,t.L=556,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=278,t.backslash=278,t.bracketright=278,t.asciicircum=469,t.underscore=556,t.quoteleft=222,t.a=556,t.b=556,t.c=500,t.d=556,t.e=556,t.f=278,t.g=556,t.h=556,t.i=222,t.j=222,t.k=500,t.l=222,t.m=833,t.n=556,t.o=556,t.p=556,t.q=556,t.r=333,t.s=500,t.t=278,t.u=556,t.v=500,t.w=722,t.x=500,t.y=500,t.z=500,t.braceleft=334,t.bar=260,t.braceright=334,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=191,t.quotedblleft=333,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=500,t.fl=500,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=537,t.bullet=350,t.quotesinglbase=222,t.quotedblbase=333,t.quotedblright=333,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=556,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=222,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=556,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=667,t.aacute=556,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=500,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=500,t.aring=556,t.Ncommaaccent=722,t.lacute=222,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=500,t.scedilla=500,t.iacute=278,t.lozenge=471,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=556,t.acircumflex=556,t.Amacron=667,t.rcaron=333,t.ccedilla=500,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=643,t.Umacron=722,t.uring=556,t.threesuperior=333,t.Ograve=778,t.Agrave=667,t.Abreve=667,t.multiply=584,t.uacute=556,t.Tcaron=611,t.partialdiff=476,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=500,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=260,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=333,t.omacron=556,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=222,t.tcaron=317,t.eogonek=556,t.Uogonek=722,t.Aacute=667,t.Adieresis=667,t.egrave=556,t.zacute=500,t.iogonek=222,t.Oacute=778,t.oacute=556,t.amacron=556,t.sacute=500,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=556,t.twosuperior=333,t.Odieresis=778,t.mu=556,t.igrave=278,t.ohungarumlaut=556,t.Eogonek=667,t.dcroat=556,t.threequarters=834,t.Scedilla=667,t.lcaron=299,t.Kcommaaccent=667,t.Lacute=556,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=556,t.onehalf=834,t.lessequal=549,t.ocircumflex=556,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=556,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=556,t.Ccaron=722,t.ugrave=556,t.radical=453,t.Dcaron=722,t.rcommaaccent=333,t.Ntilde=722,t.otilde=556,t.Rcommaaccent=722,t.Lcommaaccent=556,t.Atilde=667,t.Aogonek=667,t.Aring=667,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=500,t.minus=584,t.Icircumflex=278,t.ncaron=556,t.tcommaaccent=278,t.logicalnot=584,t.odieresis=556,t.udieresis=556,t.notequal=549,t.gcommaaccent=556,t.eth=556,t.zcaron=500,t.ncommaaccent=556,t.onesuperior=333,t.imacron=278,t.Euro=556}),e["Helvetica-Bold"]=(0,n.getLookupTableFactory)(function(t){t.space=278,t.exclam=333,t.quotedbl=474,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=722,t.quoteright=278,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=333,t.semicolon=333,t.less=584,t.equal=584,t.greater=584,t.question=611,t.at=975,t.A=722,t.B=722,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=556,t.K=722,t.L=611,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=584,t.underscore=556,t.quoteleft=278,t.a=556,t.b=611,t.c=556,t.d=611,t.e=556,t.f=333,t.g=611,t.h=611,t.i=278,t.j=278,t.k=556,t.l=278,t.m=889,t.n=611,t.o=611,t.p=611,t.q=611,t.r=389,t.s=556,t.t=333,t.u=611,t.v=556,t.w=778,t.x=556,t.y=556,t.z=500,t.braceleft=389,t.bar=280,t.braceright=389,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=238,t.quotedblleft=500,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=611,t.fl=611,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=556,t.bullet=350,t.quotesinglbase=278,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=611,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=278,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=611,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=722,t.aacute=556,t.Ucircumflex=722,t.yacute=556,t.scommaaccent=556,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=611,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=556,t.aring=556,t.Ncommaaccent=722,t.lacute=278,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=556,t.scedilla=556,t.iacute=278,t.lozenge=494,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=611,t.acircumflex=556,t.Amacron=722,t.rcaron=389,t.ccedilla=556,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=743,t.Umacron=722,t.uring=611,t.threesuperior=333,t.Ograve=778,t.Agrave=722,t.Abreve=722,t.multiply=584,t.uacute=611,t.Tcaron=611,t.partialdiff=494,t.ydieresis=556,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=556,t.nacute=611,t.umacron=611,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=280,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=389,t.omacron=611,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=278,t.tcaron=389,t.eogonek=556,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=556,t.zacute=500,t.iogonek=278,t.Oacute=778,t.oacute=611,t.amacron=556,t.sacute=556,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=611,t.twosuperior=333,t.Odieresis=778,t.mu=611,t.igrave=278,t.ohungarumlaut=611,t.Eogonek=667,t.dcroat=611,t.threequarters=834,t.Scedilla=667,t.lcaron=400,t.Kcommaaccent=722,t.Lacute=611,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=611,t.onehalf=834,t.lessequal=549,t.ocircumflex=611,t.ntilde=611,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=611,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=611,t.Ccaron=722,t.ugrave=611,t.radical=549,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=722,t.otilde=611,t.Rcommaaccent=722,t.Lcommaaccent=611,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=556,t.minus=584,t.Icircumflex=278,t.ncaron=611,t.tcommaaccent=333,t.logicalnot=584,t.odieresis=611,t.udieresis=611,t.notequal=549,t.gcommaaccent=611,t.eth=611,t.zcaron=500,t.ncommaaccent=611,t.onesuperior=333,t.imacron=278,t.Euro=556}),e["Helvetica-BoldOblique"]=(0,n.getLookupTableFactory)(function(t){t.space=278,t.exclam=333,t.quotedbl=474,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=722,t.quoteright=278,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=333,t.semicolon=333,t.less=584,t.equal=584,t.greater=584,t.question=611,t.at=975,t.A=722,t.B=722,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=556,t.K=722,t.L=611,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=584,t.underscore=556,t.quoteleft=278,t.a=556,t.b=611,t.c=556,t.d=611,t.e=556,t.f=333,t.g=611,t.h=611,t.i=278,t.j=278,t.k=556,t.l=278,t.m=889,t.n=611,t.o=611,t.p=611,t.q=611,t.r=389,t.s=556,t.t=333,t.u=611,t.v=556,t.w=778,t.x=556,t.y=556,t.z=500,t.braceleft=389,t.bar=280,t.braceright=389,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=238,t.quotedblleft=500,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=611,t.fl=611,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=556,t.bullet=350,t.quotesinglbase=278,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=611,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=278,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=611,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=722,t.aacute=556,t.Ucircumflex=722,t.yacute=556,t.scommaaccent=556,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=611,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=556,t.aring=556,t.Ncommaaccent=722,t.lacute=278,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=556,t.scedilla=556,t.iacute=278,t.lozenge=494,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=611,t.acircumflex=556,t.Amacron=722,t.rcaron=389,t.ccedilla=556,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=743,t.Umacron=722,t.uring=611,t.threesuperior=333,t.Ograve=778,t.Agrave=722,t.Abreve=722,t.multiply=584,t.uacute=611,t.Tcaron=611,t.partialdiff=494,t.ydieresis=556,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=556,t.nacute=611,t.umacron=611,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=280,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=389,t.omacron=611,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=278,t.tcaron=389,t.eogonek=556,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=556,t.zacute=500,t.iogonek=278,t.Oacute=778,t.oacute=611,t.amacron=556,t.sacute=556,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=611,t.twosuperior=333,t.Odieresis=778,t.mu=611,t.igrave=278,t.ohungarumlaut=611,t.Eogonek=667,t.dcroat=611,t.threequarters=834,t.Scedilla=667,t.lcaron=400,t.Kcommaaccent=722,t.Lacute=611,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=611,t.onehalf=834,t.lessequal=549,t.ocircumflex=611,t.ntilde=611,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=611,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=611,t.Ccaron=722,t.ugrave=611,t.radical=549,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=722,t.otilde=611,t.Rcommaaccent=722,t.Lcommaaccent=611,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=556,t.minus=584,t.Icircumflex=278,t.ncaron=611,t.tcommaaccent=333,t.logicalnot=584,t.odieresis=611,t.udieresis=611,t.notequal=549,t.gcommaaccent=611,t.eth=611,t.zcaron=500,t.ncommaaccent=611,t.onesuperior=333,t.imacron=278,t.Euro=556}),e["Helvetica-Oblique"]=(0,n.getLookupTableFactory)(function(t){t.space=278,t.exclam=278,t.quotedbl=355,t.numbersign=556,t.dollar=556,t.percent=889,t.ampersand=667,t.quoteright=222,t.parenleft=333,t.parenright=333,t.asterisk=389,t.plus=584,t.comma=278,t.hyphen=333,t.period=278,t.slash=278,t.zero=556,t.one=556,t.two=556,t.three=556,t.four=556,t.five=556,t.six=556,t.seven=556,t.eight=556,t.nine=556,t.colon=278,t.semicolon=278,t.less=584,t.equal=584,t.greater=584,t.question=556,t.at=1015,t.A=667,t.B=667,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=722,t.I=278,t.J=500,t.K=667,t.L=556,t.M=833,t.N=722,t.O=778,t.P=667,t.Q=778,t.R=722,t.S=667,t.T=611,t.U=722,t.V=667,t.W=944,t.X=667,t.Y=667,t.Z=611,t.bracketleft=278,t.backslash=278,t.bracketright=278,t.asciicircum=469,t.underscore=556,t.quoteleft=222,t.a=556,t.b=556,t.c=500,t.d=556,t.e=556,t.f=278,t.g=556,t.h=556,t.i=222,t.j=222,t.k=500,t.l=222,t.m=833,t.n=556,t.o=556,t.p=556,t.q=556,t.r=333,t.s=500,t.t=278,t.u=556,t.v=500,t.w=722,t.x=500,t.y=500,t.z=500,t.braceleft=334,t.bar=260,t.braceright=334,t.asciitilde=584,t.exclamdown=333,t.cent=556,t.sterling=556,t.fraction=167,t.yen=556,t.florin=556,t.section=556,t.currency=556,t.quotesingle=191,t.quotedblleft=333,t.guillemotleft=556,t.guilsinglleft=333,t.guilsinglright=333,t.fi=500,t.fl=500,t.endash=556,t.dagger=556,t.daggerdbl=556,t.periodcentered=278,t.paragraph=537,t.bullet=350,t.quotesinglbase=222,t.quotedblbase=333,t.quotedblright=333,t.guillemotright=556,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=611,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=370,t.Lslash=556,t.Oslash=778,t.OE=1e3,t.ordmasculine=365,t.ae=889,t.dotlessi=278,t.lslash=222,t.oslash=611,t.oe=944,t.germandbls=611,t.Idieresis=278,t.eacute=556,t.abreve=556,t.uhungarumlaut=556,t.ecaron=556,t.Ydieresis=667,t.divide=584,t.Yacute=667,t.Acircumflex=667,t.aacute=556,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=500,t.ecircumflex=556,t.Uring=722,t.Udieresis=722,t.aogonek=556,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=737,t.Emacron=667,t.ccaron=500,t.aring=556,t.Ncommaaccent=722,t.lacute=222,t.agrave=556,t.Tcommaaccent=611,t.Cacute=722,t.atilde=556,t.Edotaccent=667,t.scaron=500,t.scedilla=500,t.iacute=278,t.lozenge=471,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=556,t.acircumflex=556,t.Amacron=667,t.rcaron=333,t.ccedilla=500,t.Zdotaccent=611,t.Thorn=667,t.Omacron=778,t.Racute=722,t.Sacute=667,t.dcaron=643,t.Umacron=722,t.uring=556,t.threesuperior=333,t.Ograve=778,t.Agrave=667,t.Abreve=667,t.multiply=584,t.uacute=556,t.Tcaron=611,t.partialdiff=476,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=556,t.edieresis=556,t.cacute=500,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=278,t.plusminus=584,t.brokenbar=260,t.registered=737,t.Gbreve=778,t.Idotaccent=278,t.summation=600,t.Egrave=667,t.racute=333,t.omacron=556,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=222,t.tcaron=317,t.eogonek=556,t.Uogonek=722,t.Aacute=667,t.Adieresis=667,t.egrave=556,t.zacute=500,t.iogonek=222,t.Oacute=778,t.oacute=556,t.amacron=556,t.sacute=500,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=556,t.twosuperior=333,t.Odieresis=778,t.mu=556,t.igrave=278,t.ohungarumlaut=556,t.Eogonek=667,t.dcroat=556,t.threequarters=834,t.Scedilla=667,t.lcaron=299,t.Kcommaaccent=667,t.Lacute=556,t.trademark=1e3,t.edotaccent=556,t.Igrave=278,t.Imacron=278,t.Lcaron=556,t.onehalf=834,t.lessequal=549,t.ocircumflex=556,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=556,t.gbreve=556,t.onequarter=834,t.Scaron=667,t.Scommaaccent=667,t.Ohungarumlaut=778,t.degree=400,t.ograve=556,t.Ccaron=722,t.ugrave=556,t.radical=453,t.Dcaron=722,t.rcommaaccent=333,t.Ntilde=722,t.otilde=556,t.Rcommaaccent=722,t.Lcommaaccent=556,t.Atilde=667,t.Aogonek=667,t.Aring=667,t.Otilde=778,t.zdotaccent=500,t.Ecaron=667,t.Iogonek=278,t.kcommaaccent=500,t.minus=584,t.Icircumflex=278,t.ncaron=556,t.tcommaaccent=278,t.logicalnot=584,t.odieresis=556,t.udieresis=556,t.notequal=549,t.gcommaaccent=556,t.eth=556,t.zcaron=500,t.ncommaaccent=556,t.onesuperior=333,t.imacron=278,t.Euro=556}),e.Symbol=(0,n.getLookupTableFactory)(function(t){t.space=250,t.exclam=333,t.universal=713,t.numbersign=500,t.existential=549,t.percent=833,t.ampersand=778,t.suchthat=439,t.parenleft=333,t.parenright=333,t.asteriskmath=500,t.plus=549,t.comma=250,t.minus=549,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=278,t.semicolon=278,t.less=549,t.equal=549,t.greater=549,t.question=444,t.congruent=549,t.Alpha=722,t.Beta=667,t.Chi=722,t.Delta=612,t.Epsilon=611,t.Phi=763,t.Gamma=603,t.Eta=722,t.Iota=333,t.theta1=631,t.Kappa=722,t.Lambda=686,t.Mu=889,t.Nu=722,t.Omicron=722,t.Pi=768,t.Theta=741,t.Rho=556,t.Sigma=592,t.Tau=611,t.Upsilon=690,t.sigma1=439,t.Omega=768,t.Xi=645,t.Psi=795,t.Zeta=611,t.bracketleft=333,t.therefore=863,t.bracketright=333,t.perpendicular=658,t.underscore=500,t.radicalex=500,t.alpha=631,t.beta=549,t.chi=549,t.delta=494,t.epsilon=439,t.phi=521,t.gamma=411,t.eta=603,t.iota=329,t.phi1=603,t.kappa=549,t.lambda=549,t.mu=576,t.nu=521,t.omicron=549,t.pi=549,t.theta=521,t.rho=549,t.sigma=603,t.tau=439,t.upsilon=576,t.omega1=713,t.omega=686,t.xi=493,t.psi=686,t.zeta=494,t.braceleft=480,t.bar=200,t.braceright=480,t.similar=549,t.Euro=750,t.Upsilon1=620,t.minute=247,t.lessequal=549,t.fraction=167,t.infinity=713,t.florin=500,t.club=753,t.diamond=753,t.heart=753,t.spade=753,t.arrowboth=1042,t.arrowleft=987,t.arrowup=603,t.arrowright=987,t.arrowdown=603,t.degree=400,t.plusminus=549,t.second=411,t.greaterequal=549,t.multiply=549,t.proportional=713,t.partialdiff=494,t.bullet=460,t.divide=549,t.notequal=549,t.equivalence=549,t.approxequal=549,t.ellipsis=1e3,t.arrowvertex=603,t.arrowhorizex=1e3,t.carriagereturn=658,t.aleph=823,t.Ifraktur=686,t.Rfraktur=795,t.weierstrass=987,t.circlemultiply=768,t.circleplus=768,t.emptyset=823,t.intersection=768,t.union=768,t.propersuperset=713,t.reflexsuperset=713,t.notsubset=713,t.propersubset=713,t.reflexsubset=713,t.element=713,t.notelement=713,t.angle=768,t.gradient=713,t.registerserif=790,t.copyrightserif=790,t.trademarkserif=890,t.product=823,t.radical=549,t.dotmath=250,t.logicalnot=713,t.logicaland=603,t.logicalor=603,t.arrowdblboth=1042,t.arrowdblleft=987,t.arrowdblup=603,t.arrowdblright=987,t.arrowdbldown=603,t.lozenge=494,t.angleleft=329,t.registersans=790,t.copyrightsans=790,t.trademarksans=786,t.summation=713,t.parenlefttp=384,t.parenleftex=384,t.parenleftbt=384,t.bracketlefttp=384,t.bracketleftex=384,t.bracketleftbt=384,t.bracelefttp=494,t.braceleftmid=494,t.braceleftbt=494,t.braceex=494,t.angleright=329,t.integral=274,t.integraltp=686,t.integralex=686,t.integralbt=686,t.parenrighttp=384,t.parenrightex=384,t.parenrightbt=384,t.bracketrighttp=384,t.bracketrightex=384,t.bracketrightbt=384,t.bracerighttp=494,t.bracerightmid=494,t.bracerightbt=494,t.apple=790}),e["Times-Roman"]=(0,n.getLookupTableFactory)(function(t){t.space=250,t.exclam=333,t.quotedbl=408,t.numbersign=500,t.dollar=500,t.percent=833,t.ampersand=778,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=564,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=278,t.semicolon=278,t.less=564,t.equal=564,t.greater=564,t.question=444,t.at=921,t.A=722,t.B=667,t.C=667,t.D=722,t.E=611,t.F=556,t.G=722,t.H=722,t.I=333,t.J=389,t.K=722,t.L=611,t.M=889,t.N=722,t.O=722,t.P=556,t.Q=722,t.R=667,t.S=556,t.T=611,t.U=722,t.V=722,t.W=944,t.X=722,t.Y=722,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=469,t.underscore=500,t.quoteleft=333,t.a=444,t.b=500,t.c=444,t.d=500,t.e=444,t.f=333,t.g=500,t.h=500,t.i=278,t.j=278,t.k=500,t.l=278,t.m=778,t.n=500,t.o=500,t.p=500,t.q=500,t.r=333,t.s=389,t.t=278,t.u=500,t.v=500,t.w=722,t.x=500,t.y=500,t.z=444,t.braceleft=480,t.bar=200,t.braceright=480,t.asciitilde=541,t.exclamdown=333,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=180,t.quotedblleft=444,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=556,t.fl=556,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=453,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=444,t.quotedblright=444,t.guillemotright=500,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=444,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=889,t.ordfeminine=276,t.Lslash=611,t.Oslash=722,t.OE=889,t.ordmasculine=310,t.ae=667,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=722,t.germandbls=500,t.Idieresis=333,t.eacute=444,t.abreve=444,t.uhungarumlaut=500,t.ecaron=444,t.Ydieresis=722,t.divide=564,t.Yacute=722,t.Acircumflex=722,t.aacute=444,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=444,t.Uacute=722,t.uogonek=500,t.Edieresis=611,t.Dcroat=722,t.commaaccent=250,t.copyright=760,t.Emacron=611,t.ccaron=444,t.aring=444,t.Ncommaaccent=722,t.lacute=278,t.agrave=444,t.Tcommaaccent=611,t.Cacute=667,t.atilde=444,t.Edotaccent=611,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=471,t.Rcaron=667,t.Gcommaaccent=722,t.ucircumflex=500,t.acircumflex=444,t.Amacron=722,t.rcaron=333,t.ccedilla=444,t.Zdotaccent=611,t.Thorn=556,t.Omacron=722,t.Racute=667,t.Sacute=556,t.dcaron=588,t.Umacron=722,t.uring=500,t.threesuperior=300,t.Ograve=722,t.Agrave=722,t.Abreve=722,t.multiply=564,t.uacute=500,t.Tcaron=611,t.partialdiff=476,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=611,t.adieresis=444,t.edieresis=444,t.cacute=444,t.nacute=500,t.umacron=500,t.Ncaron=722,t.Iacute=333,t.plusminus=564,t.brokenbar=200,t.registered=760,t.Gbreve=722,t.Idotaccent=333,t.summation=600,t.Egrave=611,t.racute=333,t.omacron=500,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=667,t.lcommaaccent=278,t.tcaron=326,t.eogonek=444,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=444,t.zacute=444,t.iogonek=278,t.Oacute=722,t.oacute=500,t.amacron=444,t.sacute=389,t.idieresis=278,t.Ocircumflex=722,t.Ugrave=722,t.Delta=612,t.thorn=500,t.twosuperior=300,t.Odieresis=722,t.mu=500,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=611,t.dcroat=500,t.threequarters=750,t.Scedilla=556,t.lcaron=344,t.Kcommaaccent=722,t.Lacute=611,t.trademark=980,t.edotaccent=444,t.Igrave=333,t.Imacron=333,t.Lcaron=611,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=500,t.Uhungarumlaut=722,t.Eacute=611,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=556,t.Scommaaccent=556,t.Ohungarumlaut=722,t.degree=400,t.ograve=500,t.Ccaron=667,t.ugrave=500,t.radical=453,t.Dcaron=722,t.rcommaaccent=333,t.Ntilde=722,t.otilde=500,t.Rcommaaccent=667,t.Lcommaaccent=611,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=722,t.zdotaccent=444,t.Ecaron=611,t.Iogonek=333,t.kcommaaccent=500,t.minus=564,t.Icircumflex=333,t.ncaron=500,t.tcommaaccent=278,t.logicalnot=564,t.odieresis=500,t.udieresis=500,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=444,t.ncommaaccent=500,t.onesuperior=300,t.imacron=278,t.Euro=500}),e["Times-Bold"]=(0,n.getLookupTableFactory)(function(t){t.space=250,t.exclam=333,t.quotedbl=555,t.numbersign=500,t.dollar=500,t.percent=1e3,t.ampersand=833,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=570,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=333,t.semicolon=333,t.less=570,t.equal=570,t.greater=570,t.question=500,t.at=930,t.A=722,t.B=667,t.C=722,t.D=722,t.E=667,t.F=611,t.G=778,t.H=778,t.I=389,t.J=500,t.K=778,t.L=667,t.M=944,t.N=722,t.O=778,t.P=611,t.Q=778,t.R=722,t.S=556,t.T=667,t.U=722,t.V=722,t.W=1e3,t.X=722,t.Y=722,t.Z=667,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=581,t.underscore=500,t.quoteleft=333,t.a=500,t.b=556,t.c=444,t.d=556,t.e=444,t.f=333,t.g=500,t.h=556,t.i=278,t.j=333,t.k=556,t.l=278,t.m=833,t.n=556,t.o=500,t.p=556,t.q=556,t.r=444,t.s=389,t.t=333,t.u=556,t.v=500,t.w=722,t.x=500,t.y=500,t.z=444,t.braceleft=394,t.bar=220,t.braceright=394,t.asciitilde=520,t.exclamdown=333,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=278,t.quotedblleft=500,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=556,t.fl=556,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=540,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=500,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=500,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=1e3,t.ordfeminine=300,t.Lslash=667,t.Oslash=778,t.OE=1e3,t.ordmasculine=330,t.ae=722,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=722,t.germandbls=556,t.Idieresis=389,t.eacute=444,t.abreve=500,t.uhungarumlaut=556,t.ecaron=444,t.Ydieresis=722,t.divide=570,t.Yacute=722,t.Acircumflex=722,t.aacute=500,t.Ucircumflex=722,t.yacute=500,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=500,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=747,t.Emacron=667,t.ccaron=444,t.aring=500,t.Ncommaaccent=722,t.lacute=278,t.agrave=500,t.Tcommaaccent=667,t.Cacute=722,t.atilde=500,t.Edotaccent=667,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=494,t.Rcaron=722,t.Gcommaaccent=778,t.ucircumflex=556,t.acircumflex=500,t.Amacron=722,t.rcaron=444,t.ccedilla=444,t.Zdotaccent=667,t.Thorn=611,t.Omacron=778,t.Racute=722,t.Sacute=556,t.dcaron=672,t.Umacron=722,t.uring=556,t.threesuperior=300,t.Ograve=778,t.Agrave=722,t.Abreve=722,t.multiply=570,t.uacute=556,t.Tcaron=667,t.partialdiff=494,t.ydieresis=500,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=500,t.edieresis=444,t.cacute=444,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=389,t.plusminus=570,t.brokenbar=220,t.registered=747,t.Gbreve=778,t.Idotaccent=389,t.summation=600,t.Egrave=667,t.racute=444,t.omacron=500,t.Zacute=667,t.Zcaron=667,t.greaterequal=549,t.Eth=722,t.Ccedilla=722,t.lcommaaccent=278,t.tcaron=416,t.eogonek=444,t.Uogonek=722,t.Aacute=722,t.Adieresis=722,t.egrave=444,t.zacute=444,t.iogonek=278,t.Oacute=778,t.oacute=500,t.amacron=500,t.sacute=389,t.idieresis=278,t.Ocircumflex=778,t.Ugrave=722,t.Delta=612,t.thorn=556,t.twosuperior=300,t.Odieresis=778,t.mu=556,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=667,t.dcroat=556,t.threequarters=750,t.Scedilla=556,t.lcaron=394,t.Kcommaaccent=778,t.Lacute=667,t.trademark=1e3,t.edotaccent=444,t.Igrave=389,t.Imacron=389,t.Lcaron=667,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=556,t.Scommaaccent=556,t.Ohungarumlaut=778,t.degree=400,t.ograve=500,t.Ccaron=722,t.ugrave=556,t.radical=549,t.Dcaron=722,t.rcommaaccent=444,t.Ntilde=722,t.otilde=500,t.Rcommaaccent=722,t.Lcommaaccent=667,t.Atilde=722,t.Aogonek=722,t.Aring=722,t.Otilde=778,t.zdotaccent=444,t.Ecaron=667,t.Iogonek=389,t.kcommaaccent=556,t.minus=570,t.Icircumflex=389,t.ncaron=556,t.tcommaaccent=333,t.logicalnot=570,t.odieresis=500,t.udieresis=556,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=444,t.ncommaaccent=556,t.onesuperior=300,t.imacron=278,t.Euro=500}),e["Times-BoldItalic"]=(0,n.getLookupTableFactory)(function(t){t.space=250,t.exclam=389,t.quotedbl=555,t.numbersign=500,t.dollar=500,t.percent=833,t.ampersand=778,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=570,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=333,t.semicolon=333,t.less=570,t.equal=570,t.greater=570,t.question=500,t.at=832,t.A=667,t.B=667,t.C=667,t.D=722,t.E=667,t.F=667,t.G=722,t.H=778,t.I=389,t.J=500,t.K=667,t.L=611,t.M=889,t.N=722,t.O=722,t.P=611,t.Q=722,t.R=667,t.S=556,t.T=611,t.U=722,t.V=667,t.W=889,t.X=667,t.Y=611,t.Z=611,t.bracketleft=333,t.backslash=278,t.bracketright=333,t.asciicircum=570,t.underscore=500,t.quoteleft=333,t.a=500,t.b=500,t.c=444,t.d=500,t.e=444,t.f=333,t.g=500,t.h=556,t.i=278,t.j=278,t.k=500,t.l=278,t.m=778,t.n=556,t.o=500,t.p=500,t.q=500,t.r=389,t.s=389,t.t=278,t.u=556,t.v=444,t.w=667,t.x=500,t.y=444,t.z=389,t.braceleft=348,t.bar=220,t.braceright=348,t.asciitilde=570,t.exclamdown=389,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=278,t.quotedblleft=500,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=556,t.fl=556,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=500,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=500,t.quotedblright=500,t.guillemotright=500,t.ellipsis=1e3,t.perthousand=1e3,t.questiondown=500,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=1e3,t.AE=944,t.ordfeminine=266,t.Lslash=611,t.Oslash=722,t.OE=944,t.ordmasculine=300,t.ae=722,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=722,t.germandbls=500,t.Idieresis=389,t.eacute=444,t.abreve=500,t.uhungarumlaut=556,t.ecaron=444,t.Ydieresis=611,t.divide=570,t.Yacute=611,t.Acircumflex=667,t.aacute=500,t.Ucircumflex=722,t.yacute=444,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=500,t.Uacute=722,t.uogonek=556,t.Edieresis=667,t.Dcroat=722,t.commaaccent=250,t.copyright=747,t.Emacron=667,t.ccaron=444,t.aring=500,t.Ncommaaccent=722,t.lacute=278,t.agrave=500,t.Tcommaaccent=611,t.Cacute=667,t.atilde=500,t.Edotaccent=667,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=494,t.Rcaron=667,t.Gcommaaccent=722,t.ucircumflex=556,t.acircumflex=500,t.Amacron=667,t.rcaron=389,t.ccedilla=444,t.Zdotaccent=611,t.Thorn=611,t.Omacron=722,t.Racute=667,t.Sacute=556,t.dcaron=608,t.Umacron=722,t.uring=556,t.threesuperior=300,t.Ograve=722,t.Agrave=667,t.Abreve=667,t.multiply=570,t.uacute=556,t.Tcaron=611,t.partialdiff=494,t.ydieresis=444,t.Nacute=722,t.icircumflex=278,t.Ecircumflex=667,t.adieresis=500,t.edieresis=444,t.cacute=444,t.nacute=556,t.umacron=556,t.Ncaron=722,t.Iacute=389,t.plusminus=570,t.brokenbar=220,t.registered=747,t.Gbreve=722,t.Idotaccent=389,t.summation=600,t.Egrave=667,t.racute=389,t.omacron=500,t.Zacute=611,t.Zcaron=611,t.greaterequal=549,t.Eth=722,t.Ccedilla=667,t.lcommaaccent=278,t.tcaron=366,t.eogonek=444,t.Uogonek=722,t.Aacute=667,t.Adieresis=667,t.egrave=444,t.zacute=389,t.iogonek=278,t.Oacute=722,t.oacute=500,t.amacron=500,t.sacute=389,t.idieresis=278,t.Ocircumflex=722,t.Ugrave=722,t.Delta=612,t.thorn=500,t.twosuperior=300,t.Odieresis=722,t.mu=576,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=667,t.dcroat=500,t.threequarters=750,t.Scedilla=556,t.lcaron=382,t.Kcommaaccent=667,t.Lacute=611,t.trademark=1e3,t.edotaccent=444,t.Igrave=389,t.Imacron=389,t.Lcaron=611,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=556,t.Uhungarumlaut=722,t.Eacute=667,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=556,t.Scommaaccent=556,t.Ohungarumlaut=722,t.degree=400,t.ograve=500,t.Ccaron=667,t.ugrave=556,t.radical=549,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=722,t.otilde=500,t.Rcommaaccent=667,t.Lcommaaccent=611,t.Atilde=667,t.Aogonek=667,t.Aring=667,t.Otilde=722,t.zdotaccent=389,t.Ecaron=667,t.Iogonek=389,t.kcommaaccent=500,t.minus=606,t.Icircumflex=389,t.ncaron=556,t.tcommaaccent=278,t.logicalnot=606,t.odieresis=500,t.udieresis=556,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=389,t.ncommaaccent=556,t.onesuperior=300,t.imacron=278,t.Euro=500}),e["Times-Italic"]=(0,n.getLookupTableFactory)(function(t){t.space=250,t.exclam=333,t.quotedbl=420,t.numbersign=500,t.dollar=500,t.percent=833,t.ampersand=778,t.quoteright=333,t.parenleft=333,t.parenright=333,t.asterisk=500,t.plus=675,t.comma=250,t.hyphen=333,t.period=250,t.slash=278,t.zero=500,t.one=500,t.two=500,t.three=500,t.four=500,t.five=500,t.six=500,t.seven=500,t.eight=500,t.nine=500,t.colon=333,t.semicolon=333,t.less=675,t.equal=675,t.greater=675,t.question=500,t.at=920,t.A=611,t.B=611,t.C=667,t.D=722,t.E=611,t.F=611,t.G=722,t.H=722,t.I=333,t.J=444,t.K=667,t.L=556,t.M=833,t.N=667,t.O=722,t.P=611,t.Q=722,t.R=611,t.S=500,t.T=556,t.U=722,t.V=611,t.W=833,t.X=611,t.Y=556,t.Z=556,t.bracketleft=389,t.backslash=278,t.bracketright=389,t.asciicircum=422,t.underscore=500,t.quoteleft=333,t.a=500,t.b=500,t.c=444,t.d=500,t.e=444,t.f=278,t.g=500,t.h=500,t.i=278,t.j=278,t.k=444,t.l=278,t.m=722,t.n=500,t.o=500,t.p=500,t.q=500,t.r=389,t.s=389,t.t=278,t.u=500,t.v=444,t.w=667,t.x=444,t.y=444,t.z=389,t.braceleft=400,t.bar=275,t.braceright=400,t.asciitilde=541,t.exclamdown=389,t.cent=500,t.sterling=500,t.fraction=167,t.yen=500,t.florin=500,t.section=500,t.currency=500,t.quotesingle=214,t.quotedblleft=556,t.guillemotleft=500,t.guilsinglleft=333,t.guilsinglright=333,t.fi=500,t.fl=500,t.endash=500,t.dagger=500,t.daggerdbl=500,t.periodcentered=250,t.paragraph=523,t.bullet=350,t.quotesinglbase=333,t.quotedblbase=556,t.quotedblright=556,t.guillemotright=500,t.ellipsis=889,t.perthousand=1e3,t.questiondown=500,t.grave=333,t.acute=333,t.circumflex=333,t.tilde=333,t.macron=333,t.breve=333,t.dotaccent=333,t.dieresis=333,t.ring=333,t.cedilla=333,t.hungarumlaut=333,t.ogonek=333,t.caron=333,t.emdash=889,t.AE=889,t.ordfeminine=276,t.Lslash=556,t.Oslash=722,t.OE=944,t.ordmasculine=310,t.ae=667,t.dotlessi=278,t.lslash=278,t.oslash=500,t.oe=667,t.germandbls=500,t.Idieresis=333,t.eacute=444,t.abreve=500,t.uhungarumlaut=500,t.ecaron=444,t.Ydieresis=556,t.divide=675,t.Yacute=556,t.Acircumflex=611,t.aacute=500,t.Ucircumflex=722,t.yacute=444,t.scommaaccent=389,t.ecircumflex=444,t.Uring=722,t.Udieresis=722,t.aogonek=500,t.Uacute=722,t.uogonek=500,t.Edieresis=611,t.Dcroat=722,t.commaaccent=250,t.copyright=760,t.Emacron=611,t.ccaron=444,t.aring=500,t.Ncommaaccent=667,t.lacute=278,t.agrave=500,t.Tcommaaccent=556,t.Cacute=667,t.atilde=500,t.Edotaccent=611,t.scaron=389,t.scedilla=389,t.iacute=278,t.lozenge=471,t.Rcaron=611,t.Gcommaaccent=722,t.ucircumflex=500,t.acircumflex=500,t.Amacron=611,t.rcaron=389,t.ccedilla=444,t.Zdotaccent=556,t.Thorn=611,t.Omacron=722,t.Racute=611,t.Sacute=500,t.dcaron=544,t.Umacron=722,t.uring=500,t.threesuperior=300,t.Ograve=722,t.Agrave=611,t.Abreve=611,t.multiply=675,t.uacute=500,t.Tcaron=556,t.partialdiff=476,t.ydieresis=444,t.Nacute=667,t.icircumflex=278,t.Ecircumflex=611,t.adieresis=500,t.edieresis=444,t.cacute=444,t.nacute=500,t.umacron=500,t.Ncaron=667,t.Iacute=333,t.plusminus=675,t.brokenbar=275,t.registered=760,t.Gbreve=722,t.Idotaccent=333,t.summation=600,t.Egrave=611,t.racute=389,t.omacron=500,t.Zacute=556,t.Zcaron=556,t.greaterequal=549,t.Eth=722,t.Ccedilla=667,t.lcommaaccent=278,t.tcaron=300,t.eogonek=444,t.Uogonek=722,t.Aacute=611,t.Adieresis=611,t.egrave=444,t.zacute=389,t.iogonek=278,t.Oacute=722,t.oacute=500,t.amacron=500,t.sacute=389,t.idieresis=278,t.Ocircumflex=722,t.Ugrave=722,t.Delta=612,t.thorn=500,t.twosuperior=300,t.Odieresis=722,t.mu=500,t.igrave=278,t.ohungarumlaut=500,t.Eogonek=611,t.dcroat=500,t.threequarters=750,t.Scedilla=500,t.lcaron=300,t.Kcommaaccent=667,t.Lacute=556,t.trademark=980,t.edotaccent=444,t.Igrave=333,t.Imacron=333,t.Lcaron=611,t.onehalf=750,t.lessequal=549,t.ocircumflex=500,t.ntilde=500,t.Uhungarumlaut=722,t.Eacute=611,t.emacron=444,t.gbreve=500,t.onequarter=750,t.Scaron=500,t.Scommaaccent=500,t.Ohungarumlaut=722,t.degree=400,t.ograve=500,t.Ccaron=667,t.ugrave=500,t.radical=453,t.Dcaron=722,t.rcommaaccent=389,t.Ntilde=667,t.otilde=500,t.Rcommaaccent=611,t.Lcommaaccent=556,t.Atilde=611,t.Aogonek=611,t.Aring=611,t.Otilde=722,t.zdotaccent=389,t.Ecaron=611,t.Iogonek=333,t.kcommaaccent=444,t.minus=675,t.Icircumflex=333,t.ncaron=500,t.tcommaaccent=278,t.logicalnot=675,t.odieresis=500,t.udieresis=500,t.notequal=549,t.gcommaaccent=500,t.eth=500,t.zcaron=389,t.ncommaaccent=500,t.onesuperior=300,t.imacron=278,t.Euro=500}),e.ZapfDingbats=(0,n.getLookupTableFactory)(function(t){t.space=278,t.a1=974,t.a2=961,t.a202=974,t.a3=980,t.a4=719,t.a5=789,t.a119=790,t.a118=791,t.a117=690,t.a11=960,t.a12=939,t.a13=549,t.a14=855,t.a15=911,t.a16=933,t.a105=911,t.a17=945,t.a18=974,t.a19=755,t.a20=846,t.a21=762,t.a22=761,t.a23=571,t.a24=677,t.a25=763,t.a26=760,t.a27=759,t.a28=754,t.a6=494,t.a7=552,t.a8=537,t.a9=577,t.a10=692,t.a29=786,t.a30=788,t.a31=788,t.a32=790,t.a33=793,t.a34=794,t.a35=816,t.a36=823,t.a37=789,t.a38=841,t.a39=823,t.a40=833,t.a41=816,t.a42=831,t.a43=923,t.a44=744,t.a45=723,t.a46=749,t.a47=790,t.a48=792,t.a49=695,t.a50=776,t.a51=768,t.a52=792,t.a53=759,t.a54=707,t.a55=708,t.a56=682,t.a57=701,t.a58=826,t.a59=815,t.a60=789,t.a61=789,t.a62=707,t.a63=687,t.a64=696,t.a65=689,t.a66=786,t.a67=787,t.a68=713,t.a69=791,t.a70=785,t.a71=791,t.a72=873,t.a73=761,t.a74=762,t.a203=762,t.a75=759,t.a204=759,t.a76=892,t.a77=892,t.a78=788,t.a79=784,t.a81=438,t.a82=138,t.a83=277,t.a84=415,t.a97=392,t.a98=392,t.a99=668,t.a100=668,t.a89=390,t.a90=390,t.a93=317,t.a94=317,t.a91=276,t.a92=276,t.a205=509,t.a85=509,t.a206=410,t.a86=410,t.a87=234,t.a88=234,t.a95=334,t.a96=334,t.a101=732,t.a102=544,t.a103=544,t.a104=910,t.a106=667,t.a107=760,t.a108=760,t.a112=776,t.a111=595,t.a110=694,t.a109=626,t.a120=788,t.a121=788,t.a122=788,t.a123=788,t.a124=788,t.a125=788,t.a126=788,t.a127=788,t.a128=788,t.a129=788,t.a130=788,t.a131=788,t.a132=788,t.a133=788,t.a134=788,t.a135=788,t.a136=788,t.a137=788,t.a138=788,t.a139=788,t.a140=788,t.a141=788,t.a142=788,t.a143=788,t.a144=788,t.a145=788,t.a146=788,t.a147=788,t.a148=788,t.a149=788,t.a150=788,t.a151=788,t.a152=788,t.a153=788,t.a154=788,t.a155=788,t.a156=788,t.a157=788,t.a158=788,t.a159=788,t.a160=894,t.a161=838,t.a163=1016,t.a164=458,t.a196=748,t.a165=924,t.a192=748,t.a166=918,t.a167=927,t.a168=928,t.a169=928,t.a170=834,t.a171=873,t.a172=828,t.a173=924,t.a162=924,t.a174=917,t.a175=930,t.a176=931,t.a177=463,t.a178=883,t.a179=836,t.a193=836,t.a180=867,t.a199=867,t.a181=696,t.a200=696,t.a182=874,t.a201=874,t.a183=760,t.a184=946,t.a197=771,t.a185=865,t.a194=771,t.a198=888,t.a186=967,t.a195=888,t.a187=831,t.a188=873,t.a189=927,t.a190=970,t.a191=918})});P.getMetrics=k;const R=(0,n.getLookupTableFactory)(function(e){e.Courier={ascent:629,descent:-157,capHeight:562,xHeight:-426},e["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439},e["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},e["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426},e.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523},e["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532},e["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523},e["Helvetica-BoldOblique"]={ascent:718,descent:-207,capHeight:718,xHeight:532},e["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450},e["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461},e["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441},e["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462},e.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN},e.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}});P.getFontBasicMetrics=R},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.GlyfTable=void 0;const ie=1,n=2,k=4,R=8,e=16,t=32,o=64,$=1,L=2,I=8,T=32,d=64,f=128,i=256;class S{constructor({glyfTable:A,isGlyphLocationsLong:E,locaTable:l,numGlyphs:g}){this.glyphs=[];const N=new DataView(l.buffer,l.byteOffset,l.byteLength),s=new DataView(A.buffer,A.byteOffset,A.byteLength),u=E?4:2;let F=E?N.getUint32(0):2*N.getUint16(0),U=0;for(let O=0;O<g;O++){U+=u;const m=E?N.getUint32(U):2*N.getUint16(U);if(m===F){this.glyphs.push(new w({}));continue}const x=w.parse(F,s);this.glyphs.push(x),F=m}}getSize(){return this.glyphs.reduce((A,E)=>{const l=E.getSize();return A+(l+3&-4)},0)}write(){const A=this.getSize(),E=new DataView(new ArrayBuffer(A)),l=A>131070,g=l?4:2,N=new DataView(new ArrayBuffer((this.glyphs.length+1)*g));l?N.setUint32(0,0):N.setUint16(0,0);let s=0,u=0;for(const F of this.glyphs)s+=F.write(s,E),s=s+3&-4,u+=g,l?N.setUint32(u,s):N.setUint16(u,s>>1);return{isLocationLong:l,loca:new Uint8Array(N.buffer),glyf:new Uint8Array(E.buffer)}}scale(A){for(let E=0,l=this.glyphs.length;E<l;E++)this.glyphs[E].scale(A[E])}}P.GlyfTable=S;class w{constructor({header:A=null,simple:E=null,composites:l=null}){this.header=A,this.simple=E,this.composites=l}static parse(A,E){const[l,g]=v.parse(A,E);if(A+=l,g.numberOfContours<0){const s=[];for(;;){const[u,F]=_.parse(A,E);if(A+=u,s.push(F),!(F.flags&T))break}return new w({header:g,composites:s})}const N=M.parse(A,E,g.numberOfContours);return new w({header:g,simple:N})}getSize(){if(!this.header)return 0;const A=this.simple?this.simple.getSize():this.composites.reduce((E,l)=>E+l.getSize(),0);return this.header.getSize()+A}write(A,E){if(!this.header)return 0;const l=A;if(A+=this.header.write(A,E),this.simple)A+=this.simple.write(A,E);else for(const g of this.composites)A+=g.write(A,E);return A-l}scale(A){if(!this.header)return;const E=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(E,A),this.simple)this.simple.scale(E,A);else for(const l of this.composites)l.scale(E,A)}}class v{constructor({numberOfContours:A,xMin:E,yMin:l,xMax:g,yMax:N}){this.numberOfContours=A,this.xMin=E,this.yMin=l,this.xMax=g,this.yMax=N}static parse(A,E){return[10,new v({numberOfContours:E.getInt16(A),xMin:E.getInt16(A+2),yMin:E.getInt16(A+4),xMax:E.getInt16(A+6),yMax:E.getInt16(A+8)})]}getSize(){return 10}write(A,E){return E.setInt16(A,this.numberOfContours),E.setInt16(A+2,this.xMin),E.setInt16(A+4,this.yMin),E.setInt16(A+6,this.xMax),E.setInt16(A+8,this.yMax),10}scale(A,E){this.xMin=Math.round(A+(this.xMin-A)*E),this.xMax=Math.round(A+(this.xMax-A)*E)}}class b{constructor({flags:A,xCoordinates:E,yCoordinates:l}){this.xCoordinates=E,this.yCoordinates=l,this.flags=A}}class M{constructor({contours:A,instructions:E}){this.contours=A,this.instructions=E}static parse(A,E,l){const g=[];for(let c=0;c<l;c++){const h=E.getUint16(A);A+=2,g.push(h)}const N=g[l-1]+1,s=E.getUint16(A);A+=2;const u=new Uint8Array(E).slice(A,A+s);A+=s;const F=[];for(let c=0;c<N;A++,c++){let h=E.getUint8(A);if(F.push(h),h&R){const C=E.getUint8(++A);h^=R;for(let D=0;D<C;D++)F.push(h);c+=C}}const U=[];let O=[],m=[],x=[];const y=[];let r=0,p=0;for(let c=0;c<N;c++){const h=F[c];if(h&n){const C=E.getUint8(A++);p+=h&e?C:-C,O.push(p)}else h&e||(p+=E.getInt16(A),A+=2),O.push(p);g[r]===c&&(r++,U.push(O),O=[])}p=0,r=0;for(let c=0;c<N;c++){const h=F[c];if(h&k){const C=E.getUint8(A++);p+=h&t?C:-C,m.push(p)}else h&t||(p+=E.getInt16(A),A+=2),m.push(p);x.push(h&ie|h&o),g[r]===c&&(O=U[r],r++,y.push(new b({flags:x,xCoordinates:O,yCoordinates:m})),m=[],x=[])}return new M({contours:y,instructions:u})}getSize(){let A=this.contours.length*2+2+this.instructions.length,E=0,l=0;for(const g of this.contours){A+=g.flags.length;for(let N=0,s=g.xCoordinates.length;N<s;N++){const u=g.xCoordinates[N],F=g.yCoordinates[N];let U=Math.abs(u-E);U>255?A+=2:U>0&&(A+=1),E=u,U=Math.abs(F-l),U>255?A+=2:U>0&&(A+=1),l=F}}return A}write(A,E){const l=A,g=[],N=[],s=[];let u=0,F=0;for(const U of this.contours){for(let O=0,m=U.xCoordinates.length;O<m;O++){let x=U.flags[O];const y=U.xCoordinates[O];let r=y-u;if(r===0)x|=e,g.push(0);else{const c=Math.abs(r);c<=255?(x|=r>=0?n|e:n,g.push(c)):g.push(r)}u=y;const p=U.yCoordinates[O];if(r=p-F,r===0)x|=t,N.push(0);else{const c=Math.abs(r);c<=255?(x|=r>=0?k|t:k,N.push(c)):N.push(r)}F=p,s.push(x)}E.setUint16(A,g.length-1),A+=2}E.setUint16(A,this.instructions.length),A+=2,this.instructions.length&&(new Uint8Array(E.buffer,0,E.buffer.byteLength).set(this.instructions,A),A+=this.instructions.length);for(const U of s)E.setUint8(A++,U);for(let U=0,O=g.length;U<O;U++){const m=g[U],x=s[U];x&n?E.setUint8(A++,m):x&e||(E.setInt16(A,m),A+=2)}for(let U=0,O=N.length;U<O;U++){const m=N[U],x=s[U];x&k?E.setUint8(A++,m):x&t||(E.setInt16(A,m),A+=2)}return A-l}scale(A,E){for(const l of this.contours)if(l.xCoordinates.length!==0)for(let g=0,N=l.xCoordinates.length;g<N;g++)l.xCoordinates[g]=Math.round(A+(l.xCoordinates[g]-A)*E)}}class _{constructor({flags:A,glyphIndex:E,argument1:l,argument2:g,transf:N,instructions:s}){this.flags=A,this.glyphIndex=E,this.argument1=l,this.argument2=g,this.transf=N,this.instructions=s}static parse(A,E){const l=A,g=[];let N=E.getUint16(A);const s=E.getUint16(A+2);A+=4;let u,F;N&$?(N&L?(u=E.getInt16(A),F=E.getInt16(A+2)):(u=E.getUint16(A),F=E.getUint16(A+2)),A+=4,N^=$):(N&L?(u=E.getInt8(A),F=E.getInt8(A+1)):(u=E.getUint8(A),F=E.getUint8(A+1)),A+=2),N&I?(g.push(E.getUint16(A)),A+=2):N&d?(g.push(E.getUint16(A),E.getUint16(A+2)),A+=4):N&f&&(g.push(E.getUint16(A),E.getUint16(A+2),E.getUint16(A+4),E.getUint16(A+6)),A+=8);let U=null;if(N&i){const O=E.getUint16(A);A+=2,U=new Uint8Array(E).slice(A,A+O),A+=O}return[A-l,new _({flags:N,glyphIndex:s,argument1:u,argument2:F,transf:g,instructions:U})]}getSize(){let A=4+this.transf.length*2;return this.flags&i&&(A+=2+this.instructions.length),A+=2,this.flags&2?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(A+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(A+=2),A}write(A,E){const l=A;return this.flags&L?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=$):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=$),E.setUint16(A,this.flags),E.setUint16(A+2,this.glyphIndex),A+=4,this.flags&$?(this.flags&L?(E.setInt16(A,this.argument1),E.setInt16(A+2,this.argument2)):(E.setUint16(A,this.argument1),E.setUint16(A+2,this.argument2)),A+=4):(E.setUint8(A,this.argument1),E.setUint8(A+1,this.argument2),A+=2),this.flags&i&&(E.setUint16(A,this.instructions.length),A+=2,this.instructions.length&&(new Uint8Array(E.buffer,0,E.buffer.byteLength).set(this.instructions,A),A+=this.instructions.length)),A-l}scale(A,E){}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.OpenTypeFileBuilder=void 0;var n=ie(3),k=ie(2);function R(I,T,d){I[T]=d>>8&255,I[T+1]=d&255}function e(I,T,d){I[T]=d>>24&255,I[T+1]=d>>16&255,I[T+2]=d>>8&255,I[T+3]=d&255}function t(I,T,d){if(d instanceof Uint8Array)I.set(d,T);else if(typeof d=="string")for(let f=0,i=d.length;f<i;f++)I[T++]=d.charCodeAt(f)&255;else for(const f of d)I[T++]=f&255}const o=12,$=16;class L{constructor(T){this.sfnt=T,this.tables=Object.create(null)}static getSearchParams(T,d){let f=1,i=0;for(;(f^T)>f;)f<<=1,i++;const S=f*d;return{range:S,entry:i,rangeShift:d*T-S}}toArray(){let T=this.sfnt;const d=this.tables,f=Object.keys(d);f.sort();const i=f.length;let S,w,v,b,M,_=o+i*$;const H=[_];for(S=0;S<i;S++){b=d[f[S]];const l=(b.length+3&-4)>>>0;_+=l,H.push(_)}const A=new Uint8Array(_);for(S=0;S<i;S++)b=d[f[S]],t(A,H[S],b);T==="true"&&(T=(0,k.string32)(65536)),A[0]=T.charCodeAt(0)&255,A[1]=T.charCodeAt(1)&255,A[2]=T.charCodeAt(2)&255,A[3]=T.charCodeAt(3)&255,R(A,4,i);const E=L.getSearchParams(i,16);for(R(A,6,E.range),R(A,8,E.entry),R(A,10,E.rangeShift),_=o,S=0;S<i;S++){M=f[S],A[_]=M.charCodeAt(0)&255,A[_+1]=M.charCodeAt(1)&255,A[_+2]=M.charCodeAt(2)&255,A[_+3]=M.charCodeAt(3)&255;let l=0;for(w=H[S],v=H[S+1];w<v;w+=4){const g=(0,n.readUint32)(A,w);l=l+g>>>0}e(A,_+4,l),e(A,_+8,H[S]),e(A,_+12,d[M].length),_+=$}return A}addTable(T,d){if(T in this.tables)throw new Error("Table "+T+" already exists");this.tables[T]=d}}P.OpenTypeFileBuilder=L},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Type1Font=void 0;var n=ie(35),k=ie(2),R=ie(38),e=ie(3),t=ie(8),o=ie(49);function $(d,f,i){const S=d.length,w=f.length,v=S-w;let b=i,M=!1;for(;b<v;){let _=0;for(;_<w&&d[b+_]===f[_];)_++;if(_>=w){for(b+=_;b<S&&(0,e.isWhiteSpace)(d[b]);)b++;M=!0;break}b++}return{found:M,length:b}}function L(d,f){const i=[101,101,120,101,99],S=d.pos;let w,v,b;try{w=d.getBytes(f),v=w.length}catch{}if(v===f&&(b=$(w,i,f-2*i.length),b.found&&b.length===f))return{stream:new t.Stream(w),length:f};(0,k.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'),d.pos=S;const M=2048;let _;for(;;){const H=d.peekBytes(M);if(b=$(H,i,0),b.length===0)break;if(d.pos+=b.length,b.found){_=d.pos-S;break}}return d.pos=S,_?{stream:new t.Stream(d.getBytes(_)),length:_}:((0,k.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new t.Stream(d.getBytes(f)),length:f})}function I(d,f){const i=d.getBytes();if(i.length===0)throw new k.FormatError("getEexecBlock - no font program found.");return{stream:new t.Stream(i),length:i.length}}class T{constructor(f,i,S){let v=S.length1;S.length2;let b=i.peekBytes(6);const M=b[0]===128&&b[1]===1;M&&(i.skip(6),v=b[5]<<24|b[4]<<16|b[3]<<8|b[2]);const _=L(i,v);new o.Type1Parser(_.stream,!1,R.SEAC_ANALYSIS_ENABLED).extractFontHeader(S),M&&(b=i.getBytes(6),b[5]<<24|b[4]<<16|b[3]<<8|b[2]);const A=I(i),l=new o.Type1Parser(A.stream,!0,R.SEAC_ANALYSIS_ENABLED).extractFontProgram(S);for(const u in l.properties)S[u]=l.properties[u];const g=l.charstrings,N=this.getType2Charstrings(g),s=this.getType2Subrs(l.subrs);this.charstrings=g,this.data=this.wrap(f,N,this.charstrings,s,S),this.seacs=this.getSeacs(l.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const f=[".notdef"];for(const{glyphName:i}of this.charstrings)f.push(i);return f}getGlyphMapping(f){const i=this.charstrings;if(f.composite){const M=Object.create(null);for(let _=0,H=i.length;_<H;_++){const A=f.cMap.charCodeOf(_);M[A]=_+1}return M}const S=[".notdef"];let w,v;for(v=0;v<i.length;v++)S.push(i[v].glyphName);const b=f.builtInEncoding;if(b){w=Object.create(null);for(const M in b)v=S.indexOf(b[M]),v>=0&&(w[M]=v)}return(0,R.type1FontGlyphMapping)(f,w,S)}hasGlyphId(f){return f<0||f>=this.numGlyphs?!1:f===0?!0:this.charstrings[f-1].charstring.length>0}getSeacs(f){const i=[];for(let S=0,w=f.length;S<w;S++){const v=f[S];v.seac&&(i[S+1]=v.seac)}return i}getType2Charstrings(f){const i=[];for(const S of f)i.push(S.charstring);return i}getType2Subrs(f){let i=0;const S=f.length;S<1133?i=107:S<33769?i=1131:i=32768;const w=[];let v;for(v=0;v<i;v++)w.push([11]);for(v=0;v<S;v++)w.push(f[v]);return w}wrap(f,i,S,w,v){const b=new n.CFF;b.header=new n.CFFHeader(1,0,4,4),b.names=[f];const M=new n.CFFTopDict;M.setByName("version",391),M.setByName("Notice",392),M.setByName("FullName",393),M.setByName("FamilyName",394),M.setByName("Weight",395),M.setByName("Encoding",null),M.setByName("FontMatrix",v.fontMatrix),M.setByName("FontBBox",v.bbox),M.setByName("charset",null),M.setByName("CharStrings",null),M.setByName("Private",null),b.topDict=M;const _=new n.CFFStrings;_.add("Version 0.11"),_.add("See original notice"),_.add(f),_.add(f),_.add("Medium"),b.strings=_,b.globalSubrIndex=new n.CFFIndex;const H=i.length,A=[".notdef"];let E,l;for(E=0;E<H;E++){const U=S[E].glyphName;n.CFFStandardStrings.indexOf(U)===-1&&_.add(U),A.push(U)}b.charset=new n.CFFCharset(!1,0,A);const g=new n.CFFIndex;for(g.add([139,14]),E=0;E<H;E++)g.add(i[E]);b.charStrings=g;const N=new n.CFFPrivateDict;N.setByName("Subrs",null);const s=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(E=0,l=s.length;E<l;E++){const U=s[E];if(!(U in v.privateData))continue;const O=v.privateData[U];if(Array.isArray(O))for(let m=O.length-1;m>0;m--)O[m]-=O[m-1];N.setByName(U,O)}b.topDict.privateDict=N;const u=new n.CFFIndex;for(E=0,l=w.length;E<l;E++)u.add(w[E]);return N.subrsIndex=u,new n.CFFCompiler(b).compile()}}P.Type1Font=T},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Type1Parser=void 0;var n=ie(37),k=ie(3),R=ie(8),e=ie(2);const t=!1,o={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};class ${constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(v,b,M){const _=v.length;let H=!1,A,E,l;for(let g=0;g<_;g++){let N=v[g];if(N<32){switch(N===12&&(N=(N<<8)+v[++g]),N){case 1:{this.stack=[];break}case 3:{this.stack=[];break}case 4:if(this.flexing){if(this.stack.length<1){H=!0;break}const O=this.stack.pop();this.stack.push(0,O);break}H=this.executeCommand(1,o.vmoveto);break;case 5:H=this.executeCommand(2,o.rlineto);break;case 6:H=this.executeCommand(1,o.hlineto);break;case 7:H=this.executeCommand(1,o.vlineto);break;case 8:H=this.executeCommand(6,o.rrcurveto);break;case 9:this.stack=[];break;case 10:if(this.stack.length<1){H=!0;break}if(l=this.stack.pop(),!b[l]){H=!0;break}H=this.convert(b[l],b,M);break;case 11:return H;case 13:if(this.stack.length<2){H=!0;break}A=this.stack.pop(),E=this.stack.pop(),this.lsb=E,this.width=A,this.stack.push(A,E),H=this.executeCommand(2,o.hmoveto);break;case 14:this.output.push(o.endchar[0]);break;case 21:if(this.flexing)break;H=this.executeCommand(2,o.rmoveto);break;case 22:if(this.flexing){this.stack.push(0);break}H=this.executeCommand(1,o.hmoveto);break;case 30:H=this.executeCommand(4,o.vhcurveto);break;case 31:H=this.executeCommand(4,o.hvcurveto);break;case 3072:this.stack=[];break;case 3073:{this.stack=[];break}case 3074:{this.stack=[];break}case 3078:if(M){const O=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-O,H=this.executeCommand(0,o.endchar)}else H=this.executeCommand(4,o.endchar);break;case 3079:if(this.stack.length<4){H=!0;break}this.stack.pop(),A=this.stack.pop();const s=this.stack.pop();E=this.stack.pop(),this.lsb=E,this.width=A,this.stack.push(A,E,s),H=this.executeCommand(3,o.rmoveto);break;case 3084:if(this.stack.length<2){H=!0;break}const u=this.stack.pop(),F=this.stack.pop();this.stack.push(F/u);break;case 3088:if(this.stack.length<2){H=!0;break}l=this.stack.pop();const U=this.stack.pop();if(l===0&&U===3){const O=this.stack.splice(-17,17);this.stack.push(O[2]+O[0],O[3]+O[1],O[4],O[5],O[6],O[7],O[8],O[9],O[10],O[11],O[12],O[13],O[14]),H=this.executeCommand(13,o.flex,!0),this.flexing=!1,this.stack.push(O[15],O[16])}else l===1&&U===0&&(this.flexing=!0);break;case 3089:break;case 3105:this.stack=[];break;default:(0,e.warn)('Unknown type 1 charstring command of "'+N+'"');break}if(H)break;continue}else N<=246?N-=139:N<=250?N=(N-247)*256+v[++g]+108:N<=254?N=-((N-251)*256)-v[++g]-108:N=(v[++g]&255)<<24|(v[++g]&255)<<16|(v[++g]&255)<<8|(v[++g]&255)<<0;this.stack.push(N)}return H}executeCommand(v,b,M){const _=this.stack.length;if(v>_)return!0;const H=_-v;for(let A=H;A<_;A++){let E=this.stack[A];Number.isInteger(E)?this.output.push(28,E>>8&255,E&255):(E=65536*E|0,this.output.push(255,E>>24&255,E>>16&255,E>>8&255,E&255))}return this.output.push(...b),M?this.stack.splice(H,v):this.stack.length=0,!1}}const L=55665,I=4330;function T(w){return w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102}function d(w,v,b){if(b>=w.length)return new Uint8Array(0);const M=52845,_=22719;let H=v|0,A,E;for(A=0;A<b;A++)H=(w[A]+H)*M+_&65535;const l=w.length-b,g=new Uint8Array(l);for(A=b,E=0;E<l;A++,E++){const N=w[A];g[E]=N^H>>8,H=(N+H)*M+_&65535}return g}function f(w,v,b){let H=v|0;const A=w.length,E=A>>>1,l=new Uint8Array(E);let g,N;for(g=0,N=0;g<A;g++){const s=w[g];if(!T(s))continue;g++;let u;for(;g<A&&!T(u=w[g]);)g++;if(g<A){const F=parseInt(String.fromCharCode(s,u),16);l[N++]=F^H>>8,H=(F+H)*52845+22719&65535}}return l.slice(b,N)}function i(w){return w===47||w===91||w===93||w===123||w===125||w===40||w===41}class S{constructor(v,b,M){if(b){const _=v.getBytes(),H=!((T(_[0])||(0,k.isWhiteSpace)(_[0]))&&T(_[1])&&T(_[2])&&T(_[3])&&T(_[4])&&T(_[5])&&T(_[6])&&T(_[7]));v=new R.Stream(H?d(_,L,4):f(_,L,4))}this.seacAnalysisEnabled=!!M,this.stream=v,this.nextChar()}readNumberArray(){this.getToken();const v=[];for(;;){const b=this.getToken();if(b===null||b==="]"||b==="}")break;v.push(parseFloat(b||0))}return v}readNumber(){const v=this.getToken();return parseFloat(v||0)}readInt(){const v=this.getToken();return parseInt(v||0,10)|0}readBoolean(){return this.getToken()==="true"?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let v=!1,b=this.currentChar;for(;;){if(b===-1)return null;if(v)(b===10||b===13)&&(v=!1);else if(b===37)v=!0;else if(!(0,k.isWhiteSpace)(b))break;b=this.nextChar()}if(i(b))return this.nextChar(),String.fromCharCode(b);let M="";do M+=String.fromCharCode(b),b=this.nextChar();while(b>=0&&!(0,k.isWhiteSpace)(b)&&!i(b));return M}readCharStrings(v,b){return b===-1?v:d(v,I,b)}extractFontProgram(v){const b=this.stream,M=[],_=[],H=Object.create(null);H.lenIV=4;const A={subrs:[],charstrings:[],properties:{privateData:H}};let E,l,g,N;for(;(E=this.getToken())!==null;)if(E==="/")switch(E=this.getToken(),E){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();E=this.getToken(),!(E===null||E==="end");){if(E!=="/")continue;const u=this.getToken();l=this.readInt(),this.getToken(),g=l>0?b.getBytes(l):new Uint8Array(0),N=A.properties.privateData.lenIV;const F=this.readCharStrings(g,N);this.nextChar(),E=this.getToken(),E==="noaccess"?this.getToken():E==="/"&&this.prevChar(),_.push({glyph:u,encoded:F})}break;case"Subrs":for(this.readInt(),this.getToken();this.getToken()==="dup";){const u=this.readInt();l=this.readInt(),this.getToken(),g=l>0?b.getBytes(l):new Uint8Array(0),N=A.properties.privateData.lenIV;const F=this.readCharStrings(g,N);this.nextChar(),E=this.getToken(),E==="noaccess"&&this.getToken(),M[u]=F}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const s=this.readNumberArray();s.length>0&&s.length%2===0&&t&&(A.properties.privateData[E]=s);break;case"StemSnapH":case"StemSnapV":A.properties.privateData[E]=this.readNumberArray();break;case"StdHW":case"StdVW":A.properties.privateData[E]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":A.properties.privateData[E]=this.readNumber();break;case"ExpansionFactor":A.properties.privateData[E]=this.readNumber()||.06;break;case"ForceBold":A.properties.privateData[E]=this.readBoolean();break}for(const{encoded:s,glyph:u}of _){const F=new $,U=F.convert(s,M,this.seacAnalysisEnabled);let O=F.output;U&&(O=[14]);const m={glyphName:u,charstring:O,width:F.width,lsb:F.lsb,seac:F.seac};if(u===".notdef"?A.charstrings.unshift(m):A.charstrings.push(m),v.builtInEncoding){const x=v.builtInEncoding.indexOf(u);x>-1&&v.widths[x]===void 0&&x>=v.firstChar&&x<=v.lastChar&&(v.widths[x]=F.width)}}return A}extractFontHeader(v){let b;for(;(b=this.getToken())!==null;)if(b==="/")switch(b=this.getToken(),b){case"FontMatrix":const M=this.readNumberArray();v.fontMatrix=M;break;case"Encoding":const _=this.getToken();let H;if(!/^\d+$/.test(_))H=(0,n.getEncoding)(_);else{H=[];const E=parseInt(_,10)|0;this.getToken();for(let l=0;l<E;l++){for(b=this.getToken();b!=="dup"&&b!=="def";)if(b=this.getToken(),b===null)return;if(b==="def")break;const g=this.readInt();this.getToken();const N=this.getToken();H[g]=N,this.getToken()}}v.builtInEncoding=H;break;case"FontBBox":const A=this.readNumberArray();v.ascent=Math.max(A[3],A[1]),v.descent=Math.min(A[1],A[3]),v.ascentScaled=!0;break}}}P.Type1Parser=S},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Pattern=void 0,P.clearPatternCaches=i,P.getTilingPatternIR=v;var n=ie(2),k=ie(5),R=ie(12),e=ie(3);const t={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7};class o{constructor(){(0,n.unreachable)("Cannot initialize Pattern.")}static parseShading(H,A,E,l,g){const N=H instanceof k.BaseStream?H.dict:H,s=N.get("ShadingType");try{switch(s){case t.AXIAL:case t.RADIAL:return new L(N,A,E,l,g);case t.FREE_FORM_MESH:case t.LATTICE_FORM_MESH:case t.COONS_PATCH_MESH:case t.TENSOR_PATCH_MESH:return new S(H,A,E,l,g);default:throw new n.FormatError("Unsupported ShadingType: "+s)}}catch(u){if(u instanceof e.MissingDataException)throw u;return(0,n.warn)(u),new w}}}P.Pattern=o;const b=class b{constructor(){this.constructor===b&&(0,n.unreachable)("Cannot initialize BaseShading.")}getIR(){(0,n.unreachable)("Abstract method `getIR` called.")}};Rt(b,"SMALL_NUMBER",1e-6);let $=b;class L extends ${constructor(H,A,E,l,g){super(),this.coordsArr=H.getArray("Coords"),this.shadingType=H.get("ShadingType");const N=R.ColorSpace.parse({cs:H.getRaw("CS")||H.getRaw("ColorSpace"),xref:A,resources:E,pdfFunctionFactory:l,localColorSpaceCache:g}),s=H.getArray("BBox");this.bbox=Array.isArray(s)&&s.length===4?n.Util.normalizeRect(s):null;let u=0,F=1;if(H.has("Domain")){const Q=H.getArray("Domain");u=Q[0],F=Q[1]}let U=!1,O=!1;if(H.has("Extend")){const Q=H.getArray("Extend");U=Q[0],O=Q[1]}if(this.shadingType===t.RADIAL&&(!U||!O)){const[Q,ee,z,se,ne,V]=this.coordsArr,ae=Math.hypot(Q-se,ee-ne);z<=V+ae&&V<=z+ae&&(0,n.warn)("Unsupported radial gradient.")}this.extendStart=U,this.extendEnd=O;const m=H.getRaw("Function"),x=l.createFromArray(m),y=840,r=(F-u)/y,p=this.colorStops=[];if(u>=F||r<=0){(0,n.info)("Bad shading domain.");return}const c=new Float32Array(N.numComps),h=new Float32Array(1);let C,D=0;h[0]=u,x(h,0,c,0);let X=N.getRgb(c,0);const q=n.Util.makeHexColor(X[0],X[1],X[2]);p.push([0,q]);let re=1;h[0]=u+r,x(h,0,c,0);let K=N.getRgb(c,0),oe=K[0]-X[0]+1,J=K[1]-X[1]+1,te=K[2]-X[2]+1,B=K[0]-X[0]-1,j=K[1]-X[1]-1,Y=K[2]-X[2]-1;for(let Q=2;Q<y;Q++){h[0]=u+Q*r,x(h,0,c,0),C=N.getRgb(c,0);const ee=Q-D;if(oe=Math.min(oe,(C[0]-X[0]+1)/ee),J=Math.min(J,(C[1]-X[1]+1)/ee),te=Math.min(te,(C[2]-X[2]+1)/ee),B=Math.max(B,(C[0]-X[0]-1)/ee),j=Math.max(j,(C[1]-X[1]-1)/ee),Y=Math.max(Y,(C[2]-X[2]-1)/ee),!(B<=oe&&j<=J&&Y<=te)){const se=n.Util.makeHexColor(K[0],K[1],K[2]);p.push([re/y,se]),oe=C[0]-K[0]+1,J=C[1]-K[1]+1,te=C[2]-K[2]+1,B=C[0]-K[0]-1,j=C[1]-K[1]-1,Y=C[2]-K[2]-1,D=re,X=K}re=Q,K=C}const W=n.Util.makeHexColor(K[0],K[1],K[2]);p.push([1,W]);let G="transparent";H.has("Background")&&(C=N.getRgb(H.get("Background"),0),G=n.Util.makeHexColor(C[0],C[1],C[2])),U||(p.unshift([0,G]),p[1][0]+=$.SMALL_NUMBER),O||(p.at(-1)[0]-=$.SMALL_NUMBER,p.push([1,G])),this.colorStops=p}getIR(){const H=this.coordsArr,A=this.shadingType;let E,l,g,N,s;return A===t.AXIAL?(l=[H[0],H[1]],g=[H[2],H[3]],N=null,s=null,E="axial"):A===t.RADIAL?(l=[H[0],H[1]],g=[H[3],H[4]],N=H[2],s=H[5],E="radial"):(0,n.unreachable)(`getPattern type unknown: ${A}`),["RadialAxial",E,this.bbox,this.colorStops,l,g,N,s]}}class I{constructor(H,A){this.stream=H,this.context=A,this.buffer=0,this.bufferLength=0;const E=A.numComps;this.tmpCompsBuf=new Float32Array(E);const l=A.colorSpace.numComps;this.tmpCsCompsBuf=A.colorFn?new Float32Array(l):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const H=this.stream.getByte();return H<0?!1:(this.buffer=H,this.bufferLength=8,!0)}readBits(H){let A=this.buffer,E=this.bufferLength;if(H===32){if(E===0)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;A=A<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();const l=this.stream.getByte();return this.buffer=l&(1<<E)-1,(A<<8-E|(l&255)>>E)>>>0}if(H===8&&E===0)return this.stream.getByte();for(;E<H;)A=A<<8|this.stream.getByte(),E+=8;return E-=H,this.bufferLength=E,this.buffer=A&(1<<E)-1,A>>E}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const H=this.context.bitsPerCoordinate,A=this.readBits(H),E=this.readBits(H),l=this.context.decode,g=H<32?1/((1<<H)-1):23283064365386963e-26;return[A*g*(l[1]-l[0])+l[0],E*g*(l[3]-l[2])+l[2]]}readComponents(){const H=this.context.numComps,A=this.context.bitsPerComponent,E=A<32?1/((1<<A)-1):23283064365386963e-26,l=this.context.decode,g=this.tmpCompsBuf;for(let s=0,u=4;s<H;s++,u+=2){const F=this.readBits(A);g[s]=F*E*(l[u+1]-l[u])+l[u]}const N=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(g,0,N,0),this.context.colorSpace.getRgb(N,0)}}let T=Object.create(null);function d(_){const H=[];for(let A=0;A<=_;A++){const E=A/_,l=1-E;H.push(new Float32Array([l**3,3*E*l**2,3*E**2*l,E**3]))}return H}function f(_){return T[_]||(T[_]=d(_))}function i(){T=Object.create(null)}const M=class M extends ${constructor(H,A,E,l,g){if(super(),!(H instanceof k.BaseStream))throw new n.FormatError("Mesh data is not a stream");const N=H.dict;this.shadingType=N.get("ShadingType");const s=N.getArray("BBox");this.bbox=Array.isArray(s)&&s.length===4?n.Util.normalizeRect(s):null;const u=R.ColorSpace.parse({cs:N.getRaw("CS")||N.getRaw("ColorSpace"),xref:A,resources:E,pdfFunctionFactory:l,localColorSpaceCache:g});this.background=N.has("Background")?u.getRgb(N.get("Background"),0):null;const F=N.getRaw("Function"),U=F?l.createFromArray(F):null;this.coords=[],this.colors=[],this.figures=[];const O={bitsPerCoordinate:N.get("BitsPerCoordinate"),bitsPerComponent:N.get("BitsPerComponent"),bitsPerFlag:N.get("BitsPerFlag"),decode:N.getArray("Decode"),colorFn:U,colorSpace:u,numComps:U?1:u.numComps},m=new I(H,O);let x=!1;switch(this.shadingType){case t.FREE_FORM_MESH:this._decodeType4Shading(m);break;case t.LATTICE_FORM_MESH:const y=N.get("VerticesPerRow")|0;if(y<2)throw new n.FormatError("Invalid VerticesPerRow");this._decodeType5Shading(m,y);break;case t.COONS_PATCH_MESH:this._decodeType6Shading(m),x=!0;break;case t.TENSOR_PATCH_MESH:this._decodeType7Shading(m),x=!0;break;default:(0,n.unreachable)("Unsupported mesh type.");break}if(x){this._updateBounds();for(let y=0,r=this.figures.length;y<r;y++)this._buildFigureFromPatch(y)}this._updateBounds(),this._packData()}_decodeType4Shading(H){const A=this.coords,E=this.colors,l=[];let g=0;for(;H.hasData;){const N=H.readFlag(),s=H.readCoordinate(),u=H.readComponents();if(g===0){if(!(0<=N&&N<=2))throw new n.FormatError("Unknown type4 flag");switch(N){case 0:g=3;break;case 1:l.push(l.at(-2),l.at(-1)),g=1;break;case 2:l.push(l.at(-3),l.at(-1)),g=1;break}}l.push(A.length),A.push(s),E.push(u),g--,H.align()}this.figures.push({type:"triangles",coords:new Int32Array(l),colors:new Int32Array(l)})}_decodeType5Shading(H,A){const E=this.coords,l=this.colors,g=[];for(;H.hasData;){const N=H.readCoordinate(),s=H.readComponents();g.push(E.length),E.push(N),l.push(s)}this.figures.push({type:"lattice",coords:new Int32Array(g),colors:new Int32Array(g),verticesPerRow:A})}_decodeType6Shading(H){const A=this.coords,E=this.colors,l=new Int32Array(16),g=new Int32Array(4);for(;H.hasData;){const N=H.readFlag();if(!(0<=N&&N<=3))throw new n.FormatError("Unknown type6 flag");const s=A.length;for(let x=0,y=N!==0?8:12;x<y;x++)A.push(H.readCoordinate());const u=E.length;for(let x=0,y=N!==0?2:4;x<y;x++)E.push(H.readComponents());let F,U,O,m;switch(N){case 0:l[12]=s+3,l[13]=s+4,l[14]=s+5,l[15]=s+6,l[8]=s+2,l[11]=s+7,l[4]=s+1,l[7]=s+8,l[0]=s,l[1]=s+11,l[2]=s+10,l[3]=s+9,g[2]=u+1,g[3]=u+2,g[0]=u,g[1]=u+3;break;case 1:F=l[12],U=l[13],O=l[14],m=l[15],l[12]=m,l[13]=s+0,l[14]=s+1,l[15]=s+2,l[8]=O,l[11]=s+3,l[4]=U,l[7]=s+4,l[0]=F,l[1]=s+7,l[2]=s+6,l[3]=s+5,F=g[2],U=g[3],g[2]=U,g[3]=u,g[0]=F,g[1]=u+1;break;case 2:F=l[15],U=l[11],l[12]=l[3],l[13]=s+0,l[14]=s+1,l[15]=s+2,l[8]=l[7],l[11]=s+3,l[4]=U,l[7]=s+4,l[0]=F,l[1]=s+7,l[2]=s+6,l[3]=s+5,F=g[3],g[2]=g[1],g[3]=u,g[0]=F,g[1]=u+1;break;case 3:l[12]=l[0],l[13]=s+0,l[14]=s+1,l[15]=s+2,l[8]=l[1],l[11]=s+3,l[4]=l[2],l[7]=s+4,l[0]=l[3],l[1]=s+7,l[2]=s+6,l[3]=s+5,g[2]=g[0],g[3]=u,g[0]=g[1],g[1]=u+1;break}l[5]=A.length,A.push([(-4*A[l[0]][0]-A[l[15]][0]+6*(A[l[4]][0]+A[l[1]][0])-2*(A[l[12]][0]+A[l[3]][0])+3*(A[l[13]][0]+A[l[7]][0]))/9,(-4*A[l[0]][1]-A[l[15]][1]+6*(A[l[4]][1]+A[l[1]][1])-2*(A[l[12]][1]+A[l[3]][1])+3*(A[l[13]][1]+A[l[7]][1]))/9]),l[6]=A.length,A.push([(-4*A[l[3]][0]-A[l[12]][0]+6*(A[l[2]][0]+A[l[7]][0])-2*(A[l[0]][0]+A[l[15]][0])+3*(A[l[4]][0]+A[l[14]][0]))/9,(-4*A[l[3]][1]-A[l[12]][1]+6*(A[l[2]][1]+A[l[7]][1])-2*(A[l[0]][1]+A[l[15]][1])+3*(A[l[4]][1]+A[l[14]][1]))/9]),l[9]=A.length,A.push([(-4*A[l[12]][0]-A[l[3]][0]+6*(A[l[8]][0]+A[l[13]][0])-2*(A[l[0]][0]+A[l[15]][0])+3*(A[l[11]][0]+A[l[1]][0]))/9,(-4*A[l[12]][1]-A[l[3]][1]+6*(A[l[8]][1]+A[l[13]][1])-2*(A[l[0]][1]+A[l[15]][1])+3*(A[l[11]][1]+A[l[1]][1]))/9]),l[10]=A.length,A.push([(-4*A[l[15]][0]-A[l[0]][0]+6*(A[l[11]][0]+A[l[14]][0])-2*(A[l[12]][0]+A[l[3]][0])+3*(A[l[2]][0]+A[l[8]][0]))/9,(-4*A[l[15]][1]-A[l[0]][1]+6*(A[l[11]][1]+A[l[14]][1])-2*(A[l[12]][1]+A[l[3]][1])+3*(A[l[2]][1]+A[l[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(l),colors:new Int32Array(g)})}}_decodeType7Shading(H){const A=this.coords,E=this.colors,l=new Int32Array(16),g=new Int32Array(4);for(;H.hasData;){const N=H.readFlag();if(!(0<=N&&N<=3))throw new n.FormatError("Unknown type7 flag");const s=A.length;for(let x=0,y=N!==0?12:16;x<y;x++)A.push(H.readCoordinate());const u=E.length;for(let x=0,y=N!==0?2:4;x<y;x++)E.push(H.readComponents());let F,U,O,m;switch(N){case 0:l[12]=s+3,l[13]=s+4,l[14]=s+5,l[15]=s+6,l[8]=s+2,l[9]=s+13,l[10]=s+14,l[11]=s+7,l[4]=s+1,l[5]=s+12,l[6]=s+15,l[7]=s+8,l[0]=s,l[1]=s+11,l[2]=s+10,l[3]=s+9,g[2]=u+1,g[3]=u+2,g[0]=u,g[1]=u+3;break;case 1:F=l[12],U=l[13],O=l[14],m=l[15],l[12]=m,l[13]=s+0,l[14]=s+1,l[15]=s+2,l[8]=O,l[9]=s+9,l[10]=s+10,l[11]=s+3,l[4]=U,l[5]=s+8,l[6]=s+11,l[7]=s+4,l[0]=F,l[1]=s+7,l[2]=s+6,l[3]=s+5,F=g[2],U=g[3],g[2]=U,g[3]=u,g[0]=F,g[1]=u+1;break;case 2:F=l[15],U=l[11],l[12]=l[3],l[13]=s+0,l[14]=s+1,l[15]=s+2,l[8]=l[7],l[9]=s+9,l[10]=s+10,l[11]=s+3,l[4]=U,l[5]=s+8,l[6]=s+11,l[7]=s+4,l[0]=F,l[1]=s+7,l[2]=s+6,l[3]=s+5,F=g[3],g[2]=g[1],g[3]=u,g[0]=F,g[1]=u+1;break;case 3:l[12]=l[0],l[13]=s+0,l[14]=s+1,l[15]=s+2,l[8]=l[1],l[9]=s+9,l[10]=s+10,l[11]=s+3,l[4]=l[2],l[5]=s+8,l[6]=s+11,l[7]=s+4,l[0]=l[3],l[1]=s+7,l[2]=s+6,l[3]=s+5,g[2]=g[0],g[3]=u,g[0]=g[1],g[1]=u+1;break}this.figures.push({type:"patch",coords:new Int32Array(l),colors:new Int32Array(g)})}}_buildFigureFromPatch(H){const A=this.figures[H];(0,n.assert)(A.type==="patch","Unexpected patch mesh figure");const E=this.coords,l=this.colors,g=A.coords,N=A.colors,s=Math.min(E[g[0]][0],E[g[3]][0],E[g[12]][0],E[g[15]][0]),u=Math.min(E[g[0]][1],E[g[3]][1],E[g[12]][1],E[g[15]][1]),F=Math.max(E[g[0]][0],E[g[3]][0],E[g[12]][0],E[g[15]][0]),U=Math.max(E[g[0]][1],E[g[3]][1],E[g[12]][1],E[g[15]][1]);let O=Math.ceil((F-s)*M.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));O=Math.max(M.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(M.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,O));let m=Math.ceil((U-u)*M.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));m=Math.max(M.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(M.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,m));const x=O+1,y=new Int32Array((m+1)*x),r=new Int32Array((m+1)*x);let p=0;const c=new Uint8Array(3),h=new Uint8Array(3),C=l[N[0]],D=l[N[1]],X=l[N[2]],q=l[N[3]],re=f(m),K=f(O);for(let oe=0;oe<=m;oe++){c[0]=(C[0]*(m-oe)+X[0]*oe)/m|0,c[1]=(C[1]*(m-oe)+X[1]*oe)/m|0,c[2]=(C[2]*(m-oe)+X[2]*oe)/m|0,h[0]=(D[0]*(m-oe)+q[0]*oe)/m|0,h[1]=(D[1]*(m-oe)+q[1]*oe)/m|0,h[2]=(D[2]*(m-oe)+q[2]*oe)/m|0;for(let J=0;J<=O;J++,p++){if((oe===0||oe===m)&&(J===0||J===O))continue;let te=0,B=0,j=0;for(let W=0;W<=3;W++)for(let G=0;G<=3;G++,j++){const Q=re[oe][W]*K[J][G];te+=E[g[j]][0]*Q,B+=E[g[j]][1]*Q}y[p]=E.length,E.push([te,B]),r[p]=l.length;const Y=new Uint8Array(3);Y[0]=(c[0]*(O-J)+h[0]*J)/O|0,Y[1]=(c[1]*(O-J)+h[1]*J)/O|0,Y[2]=(c[2]*(O-J)+h[2]*J)/O|0,l.push(Y)}}y[0]=g[0],r[0]=N[0],y[O]=g[3],r[O]=N[1],y[x*m]=g[12],r[x*m]=N[2],y[x*m+O]=g[15],r[x*m+O]=N[3],this.figures[H]={type:"lattice",coords:y,colors:r,verticesPerRow:x}}_updateBounds(){let H=this.coords[0][0],A=this.coords[0][1],E=H,l=A;for(let g=1,N=this.coords.length;g<N;g++){const s=this.coords[g][0],u=this.coords[g][1];H=H>s?s:H,A=A>u?u:A,E=E<s?s:E,l=l<u?u:l}this.bounds=[H,A,E,l]}_packData(){let H,A,E,l;const g=this.coords,N=new Float32Array(g.length*2);for(H=0,E=0,A=g.length;H<A;H++){const U=g[H];N[E++]=U[0],N[E++]=U[1]}this.coords=N;const s=this.colors,u=new Uint8Array(s.length*3);for(H=0,E=0,A=s.length;H<A;H++){const U=s[H];u[E++]=U[0],u[E++]=U[1],u[E++]=U[2]}this.colors=u;const F=this.figures;for(H=0,A=F.length;H<A;H++){const U=F[H],O=U.coords,m=U.colors;for(E=0,l=O.length;E<l;E++)O[E]*=2,m[E]*=3}}getIR(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.bbox,this.background]}};Rt(M,"MIN_SPLIT_PATCH_CHUNKS_AMOUNT",3),Rt(M,"MAX_SPLIT_PATCH_CHUNKS_AMOUNT",20),Rt(M,"TRIANGLE_DENSITY",20);let S=M;class w extends ${getIR(){return["Dummy"]}}function v(_,H,A){const E=H.getArray("Matrix"),l=n.Util.normalizeRect(H.getArray("BBox")),g=H.get("XStep"),N=H.get("YStep"),s=H.get("PaintType"),u=H.get("TilingType");if(l[2]-l[0]===0||l[3]-l[1]===0)throw new n.FormatError(`Invalid getTilingPatternIR /BBox array: [${l}].`);return["TilingPattern",A,_,E,l,g,N,s,u]}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.getXfaFontDict=f,P.getXfaFontName=T;var n=ie(52),k=ie(4),R=ie(53),e=ie(54),t=ie(55),o=ie(56),$=ie(3),L=ie(38);const I=(0,$.getLookupTableFactory)(function(i){i["MyriadPro-Regular"]=i["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:t.MyriadProRegularFactors,baseWidths:e.LiberationSansRegularWidths,baseMapping:e.LiberationSansRegularMapping,metrics:t.MyriadProRegularMetrics},i["MyriadPro-Bold"]=i["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:t.MyriadProBoldFactors,baseWidths:e.LiberationSansBoldWidths,baseMapping:e.LiberationSansBoldMapping,metrics:t.MyriadProBoldMetrics},i["MyriadPro-It"]=i["MyriadPro-Italic"]=i["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:t.MyriadProItalicFactors,baseWidths:e.LiberationSansItalicWidths,baseMapping:e.LiberationSansItalicMapping,metrics:t.MyriadProItalicMetrics},i["MyriadPro-BoldIt"]=i["MyriadPro-BoldItalic"]=i["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:t.MyriadProBoldItalicFactors,baseWidths:e.LiberationSansBoldItalicWidths,baseMapping:e.LiberationSansBoldItalicMapping,metrics:t.MyriadProBoldItalicMetrics},i.ArialMT=i.Arial=i["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:e.LiberationSansRegularWidths,baseMapping:e.LiberationSansRegularMapping},i["Arial-BoldMT"]=i["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:e.LiberationSansBoldWidths,baseMapping:e.LiberationSansBoldMapping},i["Arial-ItalicMT"]=i["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:e.LiberationSansItalicWidths,baseMapping:e.LiberationSansItalicMapping},i["Arial-BoldItalicMT"]=i["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:e.LiberationSansBoldItalicWidths,baseMapping:e.LiberationSansBoldItalicMapping},i["Calibri-Regular"]={name:"LiberationSans-Regular",factors:n.CalibriRegularFactors,baseWidths:e.LiberationSansRegularWidths,baseMapping:e.LiberationSansRegularMapping,metrics:n.CalibriRegularMetrics},i["Calibri-Bold"]={name:"LiberationSans-Bold",factors:n.CalibriBoldFactors,baseWidths:e.LiberationSansBoldWidths,baseMapping:e.LiberationSansBoldMapping,metrics:n.CalibriBoldMetrics},i["Calibri-Italic"]={name:"LiberationSans-Italic",factors:n.CalibriItalicFactors,baseWidths:e.LiberationSansItalicWidths,baseMapping:e.LiberationSansItalicMapping,metrics:n.CalibriItalicMetrics},i["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:n.CalibriBoldItalicFactors,baseWidths:e.LiberationSansBoldItalicWidths,baseMapping:e.LiberationSansBoldItalicMapping,metrics:n.CalibriBoldItalicMetrics},i["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:o.SegoeuiRegularFactors,baseWidths:e.LiberationSansRegularWidths,baseMapping:e.LiberationSansRegularMapping,metrics:o.SegoeuiRegularMetrics},i["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:o.SegoeuiBoldFactors,baseWidths:e.LiberationSansBoldWidths,baseMapping:e.LiberationSansBoldMapping,metrics:o.SegoeuiBoldMetrics},i["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:o.SegoeuiItalicFactors,baseWidths:e.LiberationSansItalicWidths,baseMapping:e.LiberationSansItalicMapping,metrics:o.SegoeuiItalicMetrics},i["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:o.SegoeuiBoldItalicFactors,baseWidths:e.LiberationSansBoldItalicWidths,baseMapping:e.LiberationSansBoldItalicMapping,metrics:o.SegoeuiBoldItalicMetrics},i["Helvetica-Regular"]=i.Helvetica={name:"LiberationSans-Regular",factors:R.HelveticaRegularFactors,baseWidths:e.LiberationSansRegularWidths,baseMapping:e.LiberationSansRegularMapping,metrics:R.HelveticaRegularMetrics},i["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:R.HelveticaBoldFactors,baseWidths:e.LiberationSansBoldWidths,baseMapping:e.LiberationSansBoldMapping,metrics:R.HelveticaBoldMetrics},i["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:R.HelveticaItalicFactors,baseWidths:e.LiberationSansItalicWidths,baseMapping:e.LiberationSansItalicMapping,metrics:R.HelveticaItalicMetrics},i["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:R.HelveticaBoldItalicFactors,baseWidths:e.LiberationSansBoldItalicWidths,baseMapping:e.LiberationSansBoldItalicMapping,metrics:R.HelveticaBoldItalicMetrics}});function T(i){const S=(0,L.normalizeFontName)(i);return I()[S]}function d(i){const S=T(i);if(!S)return null;const{baseWidths:w,baseMapping:v,factors:b}=S,M=b?w.map((E,l)=>E*b[l]):w;let _=-2,H;const A=[];for(const[E,l]of v.map((g,N)=>[g,N]).sort(([g],[N])=>g-N))E!==-1&&(E===_+1?(H.push(M[l]),_+=1):(_=E,H=[M[l]],A.push(E,H)));return A}function f(i){const S=d(i),w=new k.Dict(null);w.set("BaseFont",k.Name.get(i)),w.set("Type",k.Name.get("Font")),w.set("Subtype",k.Name.get("CIDFontType2")),w.set("Encoding",k.Name.get("Identity-H")),w.set("CIDToGIDMap",k.Name.get("Identity")),w.set("W",S),w.set("FirstChar",S[0]),w.set("LastChar",S.at(-2)+S.at(-1).length-1);const v=new k.Dict(null);w.set("FontDescriptor",v);const b=new k.Dict(null);return b.set("Ordering","Identity"),b.set("Registry","Adobe"),b.set("Supplement",0),w.set("CIDSystemInfo",b),w}},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.CalibriRegularMetrics=P.CalibriRegularFactors=P.CalibriItalicMetrics=P.CalibriItalicFactors=P.CalibriBoldMetrics=P.CalibriBoldItalicMetrics=P.CalibriBoldItalicFactors=P.CalibriBoldFactors=void 0;const ie=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.CalibriBoldFactors=ie;const n={lineHeight:1.2207,lineGap:.2207};P.CalibriBoldMetrics=n;const k=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.CalibriBoldItalicFactors=k;const R={lineHeight:1.2207,lineGap:.2207};P.CalibriBoldItalicMetrics=R;const e=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.CalibriItalicFactors=e;const t={lineHeight:1.2207,lineGap:.2207};P.CalibriItalicMetrics=t;const o=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.89464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.86128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.69043,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1];P.CalibriRegularFactors=o;const $={lineHeight:1.2207,lineGap:.2207};P.CalibriRegularMetrics=$},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.HelveticaRegularMetrics=P.HelveticaRegularFactors=P.HelveticaItalicMetrics=P.HelveticaItalicFactors=P.HelveticaBoldMetrics=P.HelveticaBoldItalicMetrics=P.HelveticaBoldItalicFactors=P.HelveticaBoldFactors=void 0;const ie=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1];P.HelveticaBoldFactors=ie;const n={lineHeight:1.2,lineGap:.2};P.HelveticaBoldMetrics=n;const k=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1];P.HelveticaBoldItalicFactors=k;const R={lineHeight:1.35,lineGap:.2};P.HelveticaBoldItalicMetrics=R;const e=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.91221,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1];P.HelveticaItalicFactors=e;const t={lineHeight:1.35,lineGap:.2};P.HelveticaItalicMetrics=t;const o=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.0003,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.HelveticaRegularFactors=o;const $={lineHeight:1.2,lineGap:.2};P.HelveticaRegularMetrics=$},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.LiberationSansRegularWidths=P.LiberationSansRegularMapping=P.LiberationSansItalicWidths=P.LiberationSansItalicMapping=P.LiberationSansBoldWidths=P.LiberationSansBoldMapping=P.LiberationSansBoldItalicWidths=P.LiberationSansBoldItalicMapping=void 0;const ie=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,611,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333];P.LiberationSansBoldWidths=ie;const n=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];P.LiberationSansBoldMapping=n;const k=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333];P.LiberationSansBoldItalicWidths=k;const R=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];P.LiberationSansBoldItalicMapping=R;const e=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,565,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285];P.LiberationSansItalicWidths=e;const t=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];P.LiberationSansItalicMapping=t;const o=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,855,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285];P.LiberationSansRegularWidths=o;const $=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];P.LiberationSansRegularMapping=$},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.MyriadProRegularMetrics=P.MyriadProRegularFactors=P.MyriadProItalicMetrics=P.MyriadProItalicFactors=P.MyriadProBoldMetrics=P.MyriadProBoldItalicMetrics=P.MyriadProBoldItalicFactors=P.MyriadProBoldFactors=void 0;const ie=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.95546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.16161,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.MyriadProBoldFactors=ie;const n={lineHeight:1.2,lineGap:.2};P.MyriadProBoldMetrics=n;const k=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.91677,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.30628,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.20006,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.MyriadProBoldItalicFactors=k;const R={lineHeight:1.2,lineGap:.2};P.MyriadProBoldItalicMetrics=R;const e=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.94578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.7646,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05233,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.MyriadProItalicFactors=e;const t={lineHeight:1.2,lineGap:.2};P.MyriadProItalicMetrics=t;const o=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.90088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.0231,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.05638,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.MyriadProRegularFactors=o;const $={lineHeight:1.2,lineGap:.2};P.MyriadProRegularMetrics=$},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SegoeuiRegularMetrics=P.SegoeuiRegularFactors=P.SegoeuiItalicMetrics=P.SegoeuiItalicFactors=P.SegoeuiBoldMetrics=P.SegoeuiBoldItalicMetrics=P.SegoeuiBoldItalicFactors=P.SegoeuiBoldFactors=void 0;const ie=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.09398,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.SegoeuiBoldFactors=ie;const n={lineHeight:1.33008,lineGap:0};P.SegoeuiBoldMetrics=n;const k=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.9817,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.97363,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.79429,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.15574,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.SegoeuiBoldItalicFactors=k;const R={lineHeight:1.33008,lineGap:0};P.SegoeuiBoldItalicMetrics=R;const e=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.97454,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1.24822,1.24822,1.17308,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];P.SegoeuiItalicFactors=e;const t={lineHeight:1.33008,lineGap:0};P.SegoeuiItalicMetrics=t;const o=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.21968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.8287,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.98248,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.98965,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1];P.SegoeuiRegularFactors=o;const $={lineHeight:1.33008,lineGap:0};P.SegoeuiRegularMetrics=$},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PostScriptEvaluator=P.PostScriptCompiler=P.PDFFunctionFactory=void 0,P.isPDFFunction=I;var n=ie(4),k=ie(2),R=ie(58),e=ie(5),t=ie(59);class o{constructor({xref:u,isEvalSupported:F=!0}){this.xref=u,this.isEvalSupported=F!==!1}create(u){const F=this.getCached(u);if(F)return F;const U=L.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:u instanceof n.Ref?this.xref.fetch(u):u});return this._cache(u,U),U}createFromArray(u){const F=this.getCached(u);if(F)return F;const U=L.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:u instanceof n.Ref?this.xref.fetch(u):u});return this._cache(u,U),U}getCached(u){var U;let F;if(u instanceof n.Ref?F=u:u instanceof n.Dict?F=u.objId:u instanceof e.BaseStream&&(F=(U=u.dict)==null?void 0:U.objId),F){const O=this._localFunctionCache.getByRef(F);if(O)return O}return null}_cache(u,F){var O;if(!F)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let U;u instanceof n.Ref?U=u:u instanceof n.Dict?U=u.objId:u instanceof e.BaseStream&&(U=(O=u.dict)==null?void 0:O.objId),U&&this._localFunctionCache.set(null,U,F)}get _localFunctionCache(){return(0,k.shadow)(this,"_localFunctionCache",new t.LocalFunctionCache)}}P.PDFFunctionFactory=o;function $(s){if(!Array.isArray(s))return null;const u=s.length;for(let F=0;F<u;F++)if(typeof s[F]!="number"){const U=new Array(u);for(let O=0;O<u;O++)U[O]=+s[O];return U}return s}class L{static getSampleArray(u,F,U,O){let m,x,y=1;for(m=0,x=u.length;m<x;m++)y*=u[m];y*=F;const r=new Array(y);let p=0,c=0;const h=1/(2**U-1),C=O.getBytes((y*U+7)/8);let D=0;for(m=0;m<y;m++){for(;p<U;)c<<=8,c|=C[D++],p+=8;p-=U,r[m]=(c>>p)*h,c&=(1<<p)-1}return r}static parse({xref:u,isEvalSupported:F,fn:U}){const O=U.dict||U;switch(O.get("FunctionType")){case 0:return this.constructSampled({xref:u,isEvalSupported:F,fn:U,dict:O});case 1:break;case 2:return this.constructInterpolated({xref:u,isEvalSupported:F,dict:O});case 3:return this.constructStiched({xref:u,isEvalSupported:F,dict:O});case 4:return this.constructPostScript({xref:u,isEvalSupported:F,fn:U,dict:O})}throw new k.FormatError("Unknown type of function")}static parseArray({xref:u,isEvalSupported:F,fnObj:U}){if(!Array.isArray(U))return this.parse({xref:u,isEvalSupported:F,fn:U});const O=[];for(const m of U)O.push(this.parse({xref:u,isEvalSupported:F,fn:u.fetchIfRef(m)}));return function(m,x,y,r){for(let p=0,c=O.length;p<c;p++)O[p](m,x,y,r+p)}}static constructSampled({xref:u,isEvalSupported:F,fn:U,dict:O}){function m(K){const oe=K.length,J=[];let te=0;for(let B=0;B<oe;B+=2)J[te++]=[K[B],K[B+1]];return J}function x(K,oe,J,te,B){return te+(K-oe)*((B-te)/(J-oe))}let y=$(O.getArray("Domain")),r=$(O.getArray("Range"));if(!y||!r)throw new k.FormatError("No domain or range");const p=y.length/2,c=r.length/2;y=m(y),r=m(r);const h=$(O.getArray("Size")),C=O.get("BitsPerSample"),D=O.get("Order")||1;D!==1&&(0,k.info)("No support for cubic spline interpolation: "+D);let X=$(O.getArray("Encode"));if(X)X=m(X);else{X=[];for(let K=0;K<p;++K)X.push([0,h[K]-1])}let q=$(O.getArray("Decode"));q=q?m(q):r;const re=this.getSampleArray(h,c,C,U);return function(oe,J,te,B){const j=1<<p,Y=new Float64Array(j),W=new Uint32Array(j);let G,Q;for(Q=0;Q<j;Q++)Y[Q]=1;let ee=c,z=1;for(G=0;G<p;++G){const se=y[G][0],ne=y[G][1],V=Math.min(Math.max(oe[J+G],se),ne);let ae=x(V,se,ne,X[G][0],X[G][1]);const ce=h[G];ae=Math.min(Math.max(ae,0),ce-1);const de=ae<ce-1?Math.floor(ae):ae-1,Ae=de+1-ae,ve=ae-de,pe=de*ee,ge=pe+ee;for(Q=0;Q<j;Q++)Q&z?(Y[Q]*=ve,W[Q]+=ge):(Y[Q]*=Ae,W[Q]+=pe);ee*=ce,z<<=1}for(Q=0;Q<c;++Q){let se=0;for(G=0;G<j;G++)se+=re[W[G]+Q]*Y[G];se=x(se,0,1,q[Q][0],q[Q][1]),te[B+Q]=Math.min(Math.max(se,r[Q][0]),r[Q][1])}}}static constructInterpolated({xref:u,isEvalSupported:F,dict:U}){const O=$(U.getArray("C0"))||[0],m=$(U.getArray("C1"))||[1],x=U.get("N"),y=[];for(let p=0,c=O.length;p<c;++p)y.push(m[p]-O[p]);const r=y.length;return function(c,h,C,D){const X=x===1?c[h]:c[h]**x;for(let q=0;q<r;++q)C[D+q]=O[q]+X*y[q]}}static constructStiched({xref:u,isEvalSupported:F,dict:U}){const O=$(U.getArray("Domain"));if(!O)throw new k.FormatError("No domain");if(O.length/2!==1)throw new k.FormatError("Bad domain for stiched function");const x=[];for(const c of U.get("Functions"))x.push(this.parse({xref:u,isEvalSupported:F,fn:u.fetchIfRef(c)}));const y=$(U.getArray("Bounds")),r=$(U.getArray("Encode")),p=new Float32Array(1);return function(h,C,D,X){const re=function(W,G,Q){return W>Q?W=Q:W<G&&(W=G),W}(h[C],O[0],O[1]),K=y.length;let oe;for(oe=0;oe<K&&!(re<y[oe]);++oe);let J=O[0];oe>0&&(J=y[oe-1]);let te=O[1];oe<y.length&&(te=y[oe]);const B=r[2*oe],j=r[2*oe+1];p[0]=J===te?B:B+(re-J)*(j-B)/(te-J),x[oe](p,0,D,X)}}static constructPostScript({xref:u,isEvalSupported:F,fn:U,dict:O}){const m=$(O.getArray("Domain")),x=$(O.getArray("Range"));if(!m)throw new k.FormatError("No domain.");if(!x)throw new k.FormatError("No range.");const y=new R.PostScriptLexer(U),p=new R.PostScriptParser(y).parse();if(F&&k.FeatureTest.isEvalSupported){const K=new g().compile(p,m,x);if(K)return new Function("src","srcOffset","dest","destOffset",K)}(0,k.info)("Unable to compile PS function");const c=x.length>>1,h=m.length>>1,C=new d(p),D=Object.create(null);let q=2048*4;const re=new Float32Array(h);return function(oe,J,te,B){let j,Y,W="";const G=re;for(j=0;j<h;j++)Y=oe[J+j],G[j]=Y,W+=Y+"_";const Q=D[W];if(Q!==void 0){te.set(Q,B);return}const ee=new Float32Array(c),z=C.execute(G),se=z.length-c;for(j=0;j<c;j++){Y=z[se+j];let ne=x[j*2];Y<ne?Y=ne:(ne=x[j*2+1],Y>ne&&(Y=ne)),ee[j]=Y}q>0&&(q--,D[W]=ee),te.set(ee,B)}}}function I(s){let u;if(s instanceof n.Dict)u=s;else if(s instanceof e.BaseStream)u=s.dict;else return!1;return u.has("FunctionType")}const N=class N{constructor(u){this.stack=u?Array.from(u):[]}push(u){if(this.stack.length>=N.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(u)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(u){if(this.stack.length+u>=N.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const F=this.stack;for(let U=F.length-u,O=u-1;O>=0;O--,U++)F.push(F[U])}index(u){this.push(this.stack[this.stack.length-u-1])}roll(u,F){const U=this.stack,O=U.length-u,m=U.length-1,x=O+(F-Math.floor(F/u)*u);for(let y=O,r=m;y<r;y++,r--){const p=U[y];U[y]=U[r],U[r]=p}for(let y=O,r=x-1;y<r;y++,r--){const p=U[y];U[y]=U[r],U[r]=p}for(let y=x,r=m;y<r;y++,r--){const p=U[y];U[y]=U[r],U[r]=p}}};Rt(N,"MAX_STACK_SIZE",100);let T=N;class d{constructor(u){this.operators=u}execute(u){const F=new T(u);let U=0;const O=this.operators,m=O.length;let x,y,r;for(;U<m;){if(x=O[U++],typeof x=="number"){F.push(x);continue}switch(x){case"jz":r=F.pop(),y=F.pop(),y||(U=r);break;case"j":y=F.pop(),U=y;break;case"abs":y=F.pop(),F.push(Math.abs(y));break;case"add":r=F.pop(),y=F.pop(),F.push(y+r);break;case"and":r=F.pop(),y=F.pop(),typeof y=="boolean"&&typeof r=="boolean"?F.push(y&&r):F.push(y&r);break;case"atan":r=F.pop(),y=F.pop(),y=Math.atan2(y,r)/Math.PI*180,y<0&&(y+=360),F.push(y);break;case"bitshift":r=F.pop(),y=F.pop(),y>0?F.push(y<<r):F.push(y>>r);break;case"ceiling":y=F.pop(),F.push(Math.ceil(y));break;case"copy":y=F.pop(),F.copy(y);break;case"cos":y=F.pop(),F.push(Math.cos(y%360/180*Math.PI));break;case"cvi":y=F.pop()|0,F.push(y);break;case"cvr":break;case"div":r=F.pop(),y=F.pop(),F.push(y/r);break;case"dup":F.copy(1);break;case"eq":r=F.pop(),y=F.pop(),F.push(y===r);break;case"exch":F.roll(2,1);break;case"exp":r=F.pop(),y=F.pop(),F.push(y**r);break;case"false":F.push(!1);break;case"floor":y=F.pop(),F.push(Math.floor(y));break;case"ge":r=F.pop(),y=F.pop(),F.push(y>=r);break;case"gt":r=F.pop(),y=F.pop(),F.push(y>r);break;case"idiv":r=F.pop(),y=F.pop(),F.push(y/r|0);break;case"index":y=F.pop(),F.index(y);break;case"le":r=F.pop(),y=F.pop(),F.push(y<=r);break;case"ln":y=F.pop(),F.push(Math.log(y));break;case"log":y=F.pop(),F.push(Math.log10(y));break;case"lt":r=F.pop(),y=F.pop(),F.push(y<r);break;case"mod":r=F.pop(),y=F.pop(),F.push(y%r);break;case"mul":r=F.pop(),y=F.pop(),F.push(y*r);break;case"ne":r=F.pop(),y=F.pop(),F.push(y!==r);break;case"neg":y=F.pop(),F.push(-y);break;case"not":y=F.pop(),typeof y=="boolean"?F.push(!y):F.push(~y);break;case"or":r=F.pop(),y=F.pop(),typeof y=="boolean"&&typeof r=="boolean"?F.push(y||r):F.push(y|r);break;case"pop":F.pop();break;case"roll":r=F.pop(),y=F.pop(),F.roll(y,r);break;case"round":y=F.pop(),F.push(Math.round(y));break;case"sin":y=F.pop(),F.push(Math.sin(y%360/180*Math.PI));break;case"sqrt":y=F.pop(),F.push(Math.sqrt(y));break;case"sub":r=F.pop(),y=F.pop(),F.push(y-r);break;case"true":F.push(!0);break;case"truncate":y=F.pop(),y=y<0?Math.ceil(y):Math.floor(y),F.push(y);break;case"xor":r=F.pop(),y=F.pop(),typeof y=="boolean"&&typeof r=="boolean"?F.push(y!==r):F.push(y^r);break;default:throw new k.FormatError(`Unknown operator ${x}`)}}return F.stack}}P.PostScriptEvaluator=d;class f{constructor(u){this.type=u}visit(u){(0,k.unreachable)("abstract method")}}class i extends f{constructor(u,F,U){super("args"),this.index=u,this.min=F,this.max=U}visit(u){u.visitArgument(this)}}class S extends f{constructor(u){super("literal"),this.number=u,this.min=u,this.max=u}visit(u){u.visitLiteral(this)}}class w extends f{constructor(u,F,U,O,m){super("binary"),this.op=u,this.arg1=F,this.arg2=U,this.min=O,this.max=m}visit(u){u.visitBinaryOperation(this)}}class v extends f{constructor(u,F){super("max"),this.arg=u,this.min=u.min,this.max=F}visit(u){u.visitMin(this)}}class b extends f{constructor(u,F,U){super("var"),this.index=u,this.min=F,this.max=U}visit(u){u.visitVariable(this)}}class M extends f{constructor(u,F){super("definition"),this.variable=u,this.arg=F}visit(u){u.visitVariableDefinition(this)}}class _{constructor(){this.parts=[]}visitArgument(u){this.parts.push("Math.max(",u.min,", Math.min(",u.max,", src[srcOffset + ",u.index,"]))")}visitVariable(u){this.parts.push("v",u.index)}visitLiteral(u){this.parts.push(u.number)}visitBinaryOperation(u){this.parts.push("("),u.arg1.visit(this),this.parts.push(" ",u.op," "),u.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(u){this.parts.push("var "),u.variable.visit(this),this.parts.push(" = "),u.arg.visit(this),this.parts.push(";")}visitMin(u){this.parts.push("Math.min("),u.arg.visit(this),this.parts.push(", ",u.max,")")}toString(){return this.parts.join("")}}function H(s,u){return u.type==="literal"&&u.number===0?s:s.type==="literal"&&s.number===0?u:u.type==="literal"&&s.type==="literal"?new S(s.number+u.number):new w("+",s,u,s.min+u.min,s.max+u.max)}function A(s,u){if(u.type==="literal"){if(u.number===0)return new S(0);if(u.number===1)return s;if(s.type==="literal")return new S(s.number*u.number)}if(s.type==="literal"){if(s.number===0)return new S(0);if(s.number===1)return u}const F=Math.min(s.min*u.min,s.min*u.max,s.max*u.min,s.max*u.max),U=Math.max(s.min*u.min,s.min*u.max,s.max*u.min,s.max*u.max);return new w("*",s,u,F,U)}function E(s,u){if(u.type==="literal"){if(u.number===0)return s;if(s.type==="literal")return new S(s.number-u.number)}return u.type==="binary"&&u.op==="-"&&s.type==="literal"&&s.number===1&&u.arg1.type==="literal"&&u.arg1.number===1?u.arg2:new w("-",s,u,s.min-u.max,s.max-u.min)}function l(s,u){return s.min>=u?new S(u):s.max<=u?s:new v(s,u)}class g{compile(u,F,U){const O=[],m=[],x=F.length>>1,y=U.length>>1;let r=0,p,c,h,C,D,X,q,re;for(let oe=0;oe<x;oe++)O.push(new i(oe,F[oe*2],F[oe*2+1]));for(let oe=0,J=u.length;oe<J;oe++){if(re=u[oe],typeof re=="number"){O.push(new S(re));continue}switch(re){case"add":if(O.length<2)return null;C=O.pop(),h=O.pop(),O.push(H(h,C));break;case"cvr":if(O.length<1)return null;break;case"mul":if(O.length<2)return null;C=O.pop(),h=O.pop(),O.push(A(h,C));break;case"sub":if(O.length<2)return null;C=O.pop(),h=O.pop(),O.push(E(h,C));break;case"exch":if(O.length<2)return null;D=O.pop(),X=O.pop(),O.push(D,X);break;case"pop":if(O.length<1)return null;O.pop();break;case"index":if(O.length<1||(h=O.pop(),h.type!=="literal")||(p=h.number,p<0||!Number.isInteger(p)||O.length<p))return null;if(D=O[O.length-p-1],D.type==="literal"||D.type==="var"){O.push(D);break}q=new b(r++,D.min,D.max),O[O.length-p-1]=q,O.push(q),m.push(new M(q,D));break;case"dup":if(O.length<1)return null;if(typeof u[oe+1]=="number"&&u[oe+2]==="gt"&&u[oe+3]===oe+7&&u[oe+4]==="jz"&&u[oe+5]==="pop"&&u[oe+6]===u[oe+1]){h=O.pop(),O.push(l(h,u[oe+1])),oe+=6;break}if(D=O.at(-1),D.type==="literal"||D.type==="var"){O.push(D);break}q=new b(r++,D.min,D.max),O[O.length-1]=q,O.push(q),m.push(new M(q,D));break;case"roll":if(O.length<2||(C=O.pop(),h=O.pop(),C.type!=="literal"||h.type!=="literal")||(c=C.number,p=h.number,p<=0||!Number.isInteger(p)||!Number.isInteger(c)||O.length<p))return null;if(c=(c%p+p)%p,c===0)break;O.push(...O.splice(O.length-p,p-c));break;default:return null}}if(O.length!==y)return null;const K=[];for(const oe of m){const J=new _;oe.visit(J),K.push(J.toString())}for(let oe=0,J=O.length;oe<J;oe++){const te=O[oe],B=new _;te.visit(B);const j=U[oe*2],Y=U[oe*2+1],W=[B.toString()];j>te.min&&(W.unshift("Math.max(",j,", "),W.push(")")),Y<te.max&&(W.unshift("Math.min(",Y,", "),W.push(")")),W.unshift("dest[destOffset + ",oe,"] = "),W.push(";"),K.push(W.join(""))}return K.join(`
`)}}P.PostScriptCompiler=g},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PostScriptParser=P.PostScriptLexer=void 0;var n=ie(2),k=ie(4),R=ie(3);class e{constructor(I){this.lexer=I,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(I){return this.token.type===I?(this.nextToken(),!0):!1}expect(I){if(this.accept(I))return!0;throw new n.FormatError(`Unexpected symbol: found ${this.token.type} expected ${I}.`)}parse(){return this.nextToken(),this.expect(t.LBRACE),this.parseBlock(),this.expect(t.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(t.NUMBER))this.operators.push(this.prev.value);else if(this.accept(t.OPERATOR))this.operators.push(this.prev.value);else if(this.accept(t.LBRACE))this.parseCondition();else return}parseCondition(){const I=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(t.RBRACE),this.accept(t.IF))this.operators[I]=this.operators.length,this.operators[I+1]="jz";else if(this.accept(t.LBRACE)){const T=this.operators.length;this.operators.push(null,null);const d=this.operators.length;this.parseBlock(),this.expect(t.RBRACE),this.expect(t.IFELSE),this.operators[T]=this.operators.length,this.operators[T+1]="j",this.operators[I]=d,this.operators[I+1]="jz"}else throw new n.FormatError("PS Function: error parsing conditional.")}}P.PostScriptParser=e;const t={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class o{static get opCache(){return(0,n.shadow)(this,"opCache",Object.create(null))}constructor(I,T){this.type=I,this.value=T}static getOperator(I){var T;return(T=o.opCache)[I]||(T[I]=new o(t.OPERATOR,I))}static get LBRACE(){return(0,n.shadow)(this,"LBRACE",new o(t.LBRACE,"{"))}static get RBRACE(){return(0,n.shadow)(this,"RBRACE",new o(t.RBRACE,"}"))}static get IF(){return(0,n.shadow)(this,"IF",new o(t.IF,"IF"))}static get IFELSE(){return(0,n.shadow)(this,"IFELSE",new o(t.IFELSE,"IFELSE"))}}class ${constructor(I){this.stream=I,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let I=!1,T=this.currentChar;for(;;){if(T<0)return k.EOF;if(I)(T===10||T===13)&&(I=!1);else if(T===37)I=!0;else if(!(0,R.isWhiteSpace)(T))break;T=this.nextChar()}switch(T|0){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new o(t.NUMBER,this.getNumber());case 123:return this.nextChar(),o.LBRACE;case 125:return this.nextChar(),o.RBRACE}const d=this.strBuf;for(d.length=0,d[0]=String.fromCharCode(T);(T=this.nextChar())>=0&&(T>=65&&T<=90||T>=97&&T<=122);)d.push(String.fromCharCode(T));const f=d.join("");switch(f.toLowerCase()){case"if":return o.IF;case"ifelse":return o.IFELSE;default:return o.getOperator(f)}}getNumber(){let I=this.currentChar;const T=this.strBuf;for(T.length=0,T[0]=String.fromCharCode(I);(I=this.nextChar())>=0&&(I>=48&&I<=57||I===45||I===46);)T.push(String.fromCharCode(I));const d=parseFloat(T.join(""));if(isNaN(d))throw new n.FormatError(`Invalid floating point number: ${d}`);return d}}P.PostScriptLexer=$},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.RegionalImageCache=P.LocalTilingPatternCache=P.LocalImageCache=P.LocalGStateCache=P.LocalFunctionCache=P.LocalColorSpaceCache=P.GlobalImageCache=void 0;var n=ie(2),k=ie(4);class R{constructor(i){this.constructor===R&&(0,n.unreachable)("Cannot initialize BaseLocalCache."),this._onlyRefs=(i==null?void 0:i.onlyRefs)===!0,this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new k.RefSetCache}getByName(i){this._onlyRefs&&(0,n.unreachable)("Should not call `getByName` method.");const S=this._nameRefMap.get(i);return S?this.getByRef(S):this._imageMap.get(i)||null}getByRef(i){return this._imageCache.get(i)||null}set(i,S,w){(0,n.unreachable)("Abstract method `set` called.")}}class e extends R{set(i,S=null,w){if(typeof i!="string")throw new Error('LocalImageCache.set - expected "name" argument.');if(S){if(this._imageCache.has(S))return;this._nameRefMap.set(i,S),this._imageCache.put(S,w);return}this._imageMap.has(i)||this._imageMap.set(i,w)}}P.LocalImageCache=e;class t extends R{set(i=null,S=null,w){if(typeof i!="string"&&!S)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(S){if(this._imageCache.has(S))return;i!==null&&this._nameRefMap.set(i,S),this._imageCache.put(S,w);return}this._imageMap.has(i)||this._imageMap.set(i,w)}}P.LocalColorSpaceCache=t;class o extends R{constructor(i){super({onlyRefs:!0})}set(i=null,S,w){if(!S)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(S)||this._imageCache.put(S,w)}}P.LocalFunctionCache=o;class $ extends R{set(i,S=null,w){if(typeof i!="string")throw new Error('LocalGStateCache.set - expected "name" argument.');if(S){if(this._imageCache.has(S))return;this._nameRefMap.set(i,S),this._imageCache.put(S,w);return}this._imageMap.has(i)||this._imageMap.set(i,w)}}P.LocalGStateCache=$;class L extends R{constructor(i){super({onlyRefs:!0})}set(i=null,S,w){if(!S)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(S)||this._imageCache.put(S,w)}}P.LocalTilingPatternCache=L;class I extends R{constructor(i){super({onlyRefs:!0})}set(i=null,S,w){if(!S)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(S)||this._imageCache.put(S,w)}}P.RegionalImageCache=I;const d=class d{constructor(){this._refCache=new k.RefSetCache,this._imageCache=new k.RefSetCache}get _byteSize(){let i=0;for(const S of this._imageCache)i+=S.byteSize;return i}get _cacheLimitReached(){return!(this._imageCache.size<d.MIN_IMAGES_TO_CACHE||this._byteSize<d.MAX_BYTE_SIZE)}shouldCache(i,S){let w=this._refCache.get(i);return w||(w=new Set,this._refCache.put(i,w)),w.add(S),!(w.size<d.NUM_PAGES_THRESHOLD||!this._imageCache.has(i)&&this._cacheLimitReached)}addByteSize(i,S){const w=this._imageCache.get(i);w&&(w.byteSize||(w.byteSize=S))}getData(i,S){const w=this._refCache.get(i);if(!w||w.size<d.NUM_PAGES_THRESHOLD)return null;const v=this._imageCache.get(i);return v?(w.add(S),v):null}setData(i,S){if(!this._refCache.has(i))throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');if(!this._imageCache.has(i)){if(this._cacheLimitReached){(0,n.warn)("GlobalImageCache.setData - cache limit reached.");return}this._imageCache.put(i,S)}}clear(i=!1){i||this._refCache.clear(),this._imageCache.clear()}};Rt(d,"NUM_PAGES_THRESHOLD",2),Rt(d,"MIN_IMAGES_TO_CACHE",10),Rt(d,"MAX_BYTE_SIZE",5*n.MAX_IMAGE_SIZE_TO_CACHE);let T=d;P.GlobalImageCache=T},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.bidi=f;var n=ie(2);const k=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],R=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function e(i){return(i&1)!==0}function t(i){return(i&1)===0}function o(i,S,w){let v,b;for(v=S,b=i.length;v<b;++v)if(i[v]!==w)return v;return v}function $(i,S,w,v){for(let b=S;b<w;++b)i[b]=v}function L(i,S,w){for(let v=S,b=w-1;v<b;++v,--b){const M=i[v];i[v]=i[b],i[b]=M}}function I(i,S,w=!1){let v="ltr";return w?v="ttb":S||(v="rtl"),{str:i,dir:v}}const T=[],d=[];function f(i,S=-1,w=!1){let v=!0;const b=i.length;if(b===0||w)return I(i,v,w);T.length=b,d.length=b;let M=0,_,H;for(_=0;_<b;++_){T[_]=i.charAt(_);const O=i.charCodeAt(_);let m="L";O<=255?m=k[O]:1424<=O&&O<=1524?m="R":1536<=O&&O<=1791?(m=R[O&255],m||(0,n.warn)("Bidi: invalid Unicode character "+O.toString(16))):(1792<=O&&O<=2220||64336<=O&&O<=65023||65136<=O&&O<=65279)&&(m="AL"),(m==="R"||m==="AL"||m==="AN")&&M++,d[_]=m}if(M===0)return v=!0,I(i,v);S===-1&&(M/b<.3&&b>4?(v=!0,S=0):(v=!1,S=1));const A=[];for(_=0;_<b;++_)A[_]=S;const E=e(S)?"R":"L",l=E,g=l;let N=l;for(_=0;_<b;++_)d[_]==="NSM"?d[_]=N:N=d[_];N=l;let s;for(_=0;_<b;++_)s=d[_],s==="EN"?d[_]=N==="AL"?"AN":"EN":(s==="R"||s==="L"||s==="AL")&&(N=s);for(_=0;_<b;++_)s=d[_],s==="AL"&&(d[_]="R");for(_=1;_<b-1;++_)d[_]==="ES"&&d[_-1]==="EN"&&d[_+1]==="EN"&&(d[_]="EN"),d[_]==="CS"&&(d[_-1]==="EN"||d[_-1]==="AN")&&d[_+1]===d[_-1]&&(d[_]=d[_-1]);for(_=0;_<b;++_)if(d[_]==="EN"){for(let O=_-1;O>=0&&d[O]==="ET";--O)d[O]="EN";for(let O=_+1;O<b&&d[O]==="ET";++O)d[O]="EN"}for(_=0;_<b;++_)s=d[_],(s==="WS"||s==="ES"||s==="ET"||s==="CS")&&(d[_]="ON");for(N=l,_=0;_<b;++_)s=d[_],s==="EN"?d[_]=N==="L"?"L":"EN":(s==="R"||s==="L")&&(N=s);for(_=0;_<b;++_)if(d[_]==="ON"){const O=o(d,_+1,"ON");let m=l;_>0&&(m=d[_-1]);let x=g;O+1<b&&(x=d[O+1]),m!=="L"&&(m="R"),x!=="L"&&(x="R"),m===x&&$(d,_,O,m),_=O-1}for(_=0;_<b;++_)d[_]==="ON"&&(d[_]=E);for(_=0;_<b;++_)s=d[_],t(A[_])?s==="R"?A[_]+=1:(s==="AN"||s==="EN")&&(A[_]+=2):(s==="L"||s==="AN"||s==="EN")&&(A[_]+=1);let u=-1,F=99,U;for(_=0,H=A.length;_<H;++_)U=A[_],u<U&&(u=U),F>U&&e(U)&&(F=U);for(U=u;U>=F;--U){let O=-1;for(_=0,H=A.length;_<H;++_)A[_]<U?O>=0&&(L(T,O,_),O=-1):O<0&&(O=_);O>=0&&L(T,O,A.length)}for(_=0,H=T.length;_<H;++_){const O=T[_];(O==="<"||O===">")&&(T[_]="")}return I(T.join(""),v)}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.getFontSubstitution=d;var n=ie(38),k=ie(3);const R={style:"normal",weight:"normal"},e={style:"normal",weight:"bold"},t={style:"italic",weight:"normal"},o={style:"italic",weight:"bold"},$=new Map([["Times-Roman",{local:["Times New Roman","Times-Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:R,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:e,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:t,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:o,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:R,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:e,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:t,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:o,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono"],style:R,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:e,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:t,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:o,ultimate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:R,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:e,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:t,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:o,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:R,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:e,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:t,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:o,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:R}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),L=new Map([["Arial-Black","ArialBlack"]]);function I(f){switch(f){case e:return"Bold";case t:return"Italic";case o:return"Bold Italic";default:if((f==null?void 0:f.weight)==="bold")return"Bold";if((f==null?void 0:f.style)==="italic")return"Italic"}return""}function T({alias:f,local:i,path:S,fallback:w,style:v,ultimate:b},M,_,H=!0,A=!0,E=""){const l={style:null,ultimate:null};if(i){const g=E?` ${E}`:"";for(const N of i)M.push(`local(${N}${g})`)}if(f){const g=$.get(f),N=E||I(v);Object.assign(l,T(g,M,_,H&&!w,A&&!S,N))}if(v&&(l.style=v),b&&(l.ultimate=b),H&&w){const g=$.get(w),{ultimate:N}=T(g,M,_,H,A&&!S,E);l.ultimate||(l.ultimate=N)}return A&&S&&_&&M.push(`url(${_}${S})`),l}function d(f,i,S,w,v){w=(0,n.normalizeFontName)(w);const b=w;let M=f.get(b);if(M)return M;let _=$.get(w);if(!_){for(const[u,F]of L)if(w.startsWith(u)){w=`${F}${w.substring(u.length)}`,_=$.get(w);break}}let H=!1;_||(_=$.get(v),H=!0);const A=`${i.getDocId()}_s${i.createFontId()}`;if(!_){if(!(0,k.validateFontName)(w))return f.set(b,null),null;const u=/bold/gi.test(w),F=/oblique|italic/gi.test(w),U=u&&F&&o||u&&e||F&&t||R;return M={css:A,guessFallback:!0,loadedName:A,baseFontName:w,src:`local(${w})`,style:U},f.set(b,M),M}const E=[];H&&(0,k.validateFontName)(w)&&E.push(`local(${w})`);const{style:l,ultimate:g}=T(_,E,S),N=g===null,s=N?"":`,${g}`;return M={css:`${A}${s}`,guessFallback:N,loadedName:A,baseFontName:w,src:E.join(","),style:l},f.set(b,M),M}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ImageResizer=void 0;var n=ie(2);const k=2048,R=65537,e=128;class t{constructor($,L){this._imgData=$,this._isMask=L}static needsToBeResized($,L){if($<=this._goodSquareLength&&L<=this._goodSquareLength)return!1;const{MAX_DIM:I}=this;if($>I||L>I)return!0;const T=$*L;if(this._hasMaxArea)return T>this.MAX_AREA;if(T<this._goodSquareLength**2)return!1;if(this._areGoodDims($,L))return this._goodSquareLength=Math.max(this._goodSquareLength,Math.floor(Math.sqrt($*L))),!1;this._goodSquareLength=this._guessMax(this._goodSquareLength,I,e,0);const d=this.MAX_AREA=this._goodSquareLength**2;return T>d}static get MAX_DIM(){return(0,n.shadow)(this,"MAX_DIM",this._guessMax(k,R,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,(0,n.shadow)(this,"MAX_AREA",this._guessMax(t._goodSquareLength,this.MAX_DIM,e,0)**2)}static set MAX_AREA($){$>=0&&(this._hasMaxArea=!0,(0,n.shadow)(this,"MAX_AREA",$))}static setMaxArea($){this._hasMaxArea||(this.MAX_AREA=$>>2)}static _areGoodDims($,L){try{const I=new OffscreenCanvas($,L),T=I.getContext("2d");T.fillRect(0,0,1,1);const d=T.getImageData(0,0,1,1).data[3];return I.width=I.height=1,d!==0}catch{return!1}}static _guessMax($,L,I,T){for(;$+I+1<L;){const d=Math.floor(($+L)/2),f=T||d;this._areGoodDims(d,f)?$=d:L=d}return $}static async createImage($,L=!1){return new t($,L)._createImage()}async _createImage(){const $=this._encodeBMP(),L=new Blob([$.buffer],{type:"image/bmp"}),I=createImageBitmap(L),{MAX_AREA:T,MAX_DIM:d}=t,{_imgData:f}=this,{width:i,height:S}=f,w=Math.max(i/d,S/d,Math.sqrt(i*S/T)),v=Math.max(w,2),b=Math.round(10*(w+1.25))/10/v,M=Math.floor(Math.log2(b)),_=new Array(M+2).fill(2);_[0]=v,_.splice(-1,1,b/(1<<M));let H=i,A=S,E=await I;for(const l of _){const g=H,N=A;H=Math.floor(H/l)-1,A=Math.floor(A/l)-1;const s=new OffscreenCanvas(H,A);s.getContext("2d").drawImage(E,0,0,g,N,0,0,H,A),E=s.transferToImageBitmap()}return f.data=null,f.bitmap=E,f.width=H,f.height=A,f}_encodeBMP(){const{width:$,height:L,kind:I}=this._imgData;let T=this._imgData.data,d,f=new Uint8Array(0),i=f,S=0;switch(I){case n.ImageKind.GRAYSCALE_1BPP:{d=1,f=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const A=$+7>>3,E=A+3&-4;if(A!==E){const l=new Uint8Array(E*L);let g=0;for(let N=0,s=L*A;N<s;N+=A,g+=E)l.set(T.subarray(N,N+A),g);T=l}break}case n.ImageKind.RGB_24BPP:{if(d=24,$&3){const A=3*$,E=A+3&-4,l=E-A,g=new Uint8Array(E*L);let N=0;for(let s=0,u=L*A;s<u;s+=A){const F=T.subarray(s,s+A);for(let U=0;U<A;U+=3)g[N++]=F[U+2],g[N++]=F[U+1],g[N++]=F[U];N+=l}T=g}else for(let A=0,E=T.length;A<E;A+=3){const l=T[A];T[A]=T[A+2],T[A+2]=l}break}case n.ImageKind.RGBA_32BPP:d=32,S=3,i=new Uint8Array(68);const H=new DataView(i.buffer);n.FeatureTest.isLittleEndian?(H.setUint32(0,255,!0),H.setUint32(4,65280,!0),H.setUint32(8,16711680,!0),H.setUint32(12,4278190080,!0)):(H.setUint32(0,4278190080,!0),H.setUint32(4,16711680,!0),H.setUint32(8,65280,!0),H.setUint32(12,255,!0));break;default:throw new Error("invalid format")}let w=0;const v=40+i.length,b=14+v+f.length+T.length,M=new Uint8Array(b),_=new DataView(M.buffer);return _.setUint16(w,19778,!0),w+=2,_.setUint32(w,b,!0),w+=4,_.setUint32(w,0,!0),w+=4,_.setUint32(w,14+v+f.length,!0),w+=4,_.setUint32(w,v,!0),w+=4,_.setInt32(w,$,!0),w+=4,_.setInt32(w,-L,!0),w+=4,_.setUint16(w,1,!0),w+=2,_.setUint16(w,d,!0),w+=2,_.setUint32(w,S,!0),w+=4,_.setUint32(w,0,!0),w+=4,_.setInt32(w,0,!0),w+=4,_.setInt32(w,0,!0),w+=4,_.setUint32(w,f.length/4,!0),w+=4,_.setUint32(w,0,!0),w+=4,M.set(i,w),w+=i.length,M.set(f,w),w+=f.length,M.set(T,w),M}}P.ImageResizer=t,t._goodSquareLength=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.MurmurHash3_64=void 0;var n=ie(2);const k=3285377520,R=4294901760,e=65535;class t{constructor($){this.h1=$?$&4294967295:k,this.h2=$?$&4294967295:k}update($){let L,I;if(typeof $=="string"){L=new Uint8Array($.length*2),I=0;for(let A=0,E=$.length;A<E;A++){const l=$.charCodeAt(A);l<=255?L[I++]=l:(L[I++]=l>>>8,L[I++]=l&255)}}else if((0,n.isArrayBuffer)($))L=$.slice(),I=L.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const T=I>>2,d=I-T*4,f=new Uint32Array(L.buffer,0,T);let i=0,S=0,w=this.h1,v=this.h2;const b=3432918353,M=461845907,_=b&e,H=M&e;for(let A=0;A<T;A++)A&1?(i=f[A],i=i*b&R|i*_&e,i=i<<15|i>>>17,i=i*M&R|i*H&e,w^=i,w=w<<13|w>>>19,w=w*5+3864292196):(S=f[A],S=S*b&R|S*_&e,S=S<<15|S>>>17,S=S*M&R|S*H&e,v^=S,v=v<<13|v>>>19,v=v*5+3864292196);switch(i=0,d){case 3:i^=L[T*4+2]<<16;case 2:i^=L[T*4+1]<<8;case 1:i^=L[T*4],i=i*b&R|i*_&e,i=i<<15|i>>>17,i=i*M&R|i*H&e,T&1?w^=i:v^=i}this.h1=w,this.h2=v}hexdigest(){let $=this.h1,L=this.h2;return $^=L>>>1,$=$*3981806797&R|$*36045&e,L=L*4283543511&R|((L<<16|$>>>16)*2950163797&R)>>>16,$^=L>>>1,$=$*444984403&R|$*60499&e,L=L*3301882366&R|((L<<16|$>>>16)*3120437893&R)>>>16,$^=L>>>1,($>>>0).toString(16).padStart(8,"0")+(L>>>0).toString(16).padStart(8,"0")}}P.MurmurHash3_64=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.OperatorList=void 0;var n=ie(2);function k(L,I,T,d,f){let i=L;for(let S=0,w=I.length-1;S<w;S++){const v=I[S];i=i[v]||(i[v]=[])}i[I.at(-1)]={checkFn:T,iterateFn:d,processFn:f}}const R=[];k(R,[n.OPS.save,n.OPS.transform,n.OPS.paintInlineImageXObject,n.OPS.restore],null,function(I,T){const d=I.fnArray,f=I.iCurr-3,i=(T-f)%4;switch(i){case 0:return d[T]===n.OPS.save;case 1:return d[T]===n.OPS.transform;case 2:return d[T]===n.OPS.paintInlineImageXObject;case 3:return d[T]===n.OPS.restore}throw new Error(`iterateInlineImageGroup - invalid pos: ${i}`)},function(I,T){const w=I.fnArray,v=I.argsArray,b=I.iCurr,M=b-3,_=b-2,H=b-1,A=Math.min(Math.floor((T-M)/4),200);if(A<10)return T-(T-M)%4;let E=0;const l=[];let g=0,N=1,s=1;for(let x=0;x<A;x++){const y=v[_+(x<<2)],r=v[H+(x<<2)][0];N+r.width>1e3&&(E=Math.max(E,N),s+=g+2,N=0,g=0),l.push({transform:y,x:N,y:s,w:r.width,h:r.height}),N+=r.width+2,g=Math.max(g,r.height)}const u=Math.max(E,N)+1,F=s+g+1,U=new Uint8Array(u*F*4),O=u<<2;for(let x=0;x<A;x++){const y=v[H+(x<<2)][0].data,r=l[x].w<<2;let p=0,c=l[x].x+l[x].y*u<<2;U.set(y.subarray(0,r),c-O);for(let h=0,C=l[x].h;h<C;h++)U.set(y.subarray(p,p+r),c),p+=r,c+=O;for(U.set(y.subarray(p-r,p),c);c>=0;)y[c-4]=y[c],y[c-3]=y[c+1],y[c-2]=y[c+2],y[c-1]=y[c+3],y[c+r]=y[c+r-4],y[c+r+1]=y[c+r-3],y[c+r+2]=y[c+r-2],y[c+r+3]=y[c+r-1],c-=O}const m={width:u,height:F};if(I.isOffscreenCanvasSupported){const x=new OffscreenCanvas(u,F);x.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(U.buffer),u,F),0,0),m.bitmap=x.transferToImageBitmap(),m.data=null}else m.kind=n.ImageKind.RGBA_32BPP,m.data=U;return w.splice(M,A*4,n.OPS.paintInlineImageXObjectGroup),v.splice(M,A*4,[m,l]),M+1}),k(R,[n.OPS.save,n.OPS.transform,n.OPS.paintImageMaskXObject,n.OPS.restore],null,function(I,T){const d=I.fnArray,f=I.iCurr-3,i=(T-f)%4;switch(i){case 0:return d[T]===n.OPS.save;case 1:return d[T]===n.OPS.transform;case 2:return d[T]===n.OPS.paintImageMaskXObject;case 3:return d[T]===n.OPS.restore}throw new Error(`iterateImageMaskGroup - invalid pos: ${i}`)},function(I,T){const S=I.fnArray,w=I.argsArray,v=I.iCurr,b=v-3,M=v-2,_=v-1;let H=Math.floor((T-b)/4);if(H<10)return T-(T-b)%4;let A=!1,E,l;const g=w[_][0],N=w[M][0],s=w[M][1],u=w[M][2],F=w[M][3];if(s===u){A=!0,E=M+4;let U=_+4;for(let O=1;O<H;O++,E+=4,U+=4)if(l=w[E],w[U][0]!==g||l[0]!==N||l[1]!==s||l[2]!==u||l[3]!==F){O<10?A=!1:H=O;break}}if(A){H=Math.min(H,1e3);const U=new Float32Array(H*2);E=M;for(let O=0;O<H;O++,E+=4)l=w[E],U[O<<1]=l[4],U[(O<<1)+1]=l[5];S.splice(b,H*4,n.OPS.paintImageMaskXObjectRepeat),w.splice(b,H*4,[g,N,s,u,F,U])}else{H=Math.min(H,100);const U=[];for(let O=0;O<H;O++){l=w[M+(O<<2)];const m=w[_+(O<<2)][0];U.push({data:m.data,width:m.width,height:m.height,interpolate:m.interpolate,count:m.count,transform:l})}S.splice(b,H*4,n.OPS.paintImageMaskXObjectGroup),w.splice(b,H*4,[U])}return b+1}),k(R,[n.OPS.save,n.OPS.transform,n.OPS.paintImageXObject,n.OPS.restore],function(L){const I=L.argsArray,T=L.iCurr-2;return I[T][1]===0&&I[T][2]===0},function(I,T){const d=I.fnArray,f=I.argsArray,i=I.iCurr-3,S=(T-i)%4;switch(S){case 0:return d[T]===n.OPS.save;case 1:if(d[T]!==n.OPS.transform)return!1;const w=I.iCurr-2,v=f[w][0],b=f[w][3];return!(f[T][0]!==v||f[T][1]!==0||f[T][2]!==0||f[T][3]!==b);case 2:if(d[T]!==n.OPS.paintImageXObject)return!1;const M=I.iCurr-1,_=f[M][0];return f[T][0]===_;case 3:return d[T]===n.OPS.restore}throw new Error(`iterateImageGroup - invalid pos: ${S}`)},function(L,I){const f=L.fnArray,i=L.argsArray,S=L.iCurr,w=S-3,v=S-2,b=S-1,M=i[b][0],_=i[v][0],H=i[v][3],A=Math.min(Math.floor((I-w)/4),1e3);if(A<3)return I-(I-w)%4;const E=new Float32Array(A*2);let l=v;for(let N=0;N<A;N++,l+=4){const s=i[l];E[N<<1]=s[4],E[(N<<1)+1]=s[5]}const g=[M,_,H,E];return f.splice(w,A*4,n.OPS.paintImageXObjectRepeat),i.splice(w,A*4,g),w+1}),k(R,[n.OPS.beginText,n.OPS.setFont,n.OPS.setTextMatrix,n.OPS.showText,n.OPS.endText],null,function(I,T){const d=I.fnArray,f=I.argsArray,i=I.iCurr-4,S=(T-i)%5;switch(S){case 0:return d[T]===n.OPS.beginText;case 1:return d[T]===n.OPS.setFont;case 2:return d[T]===n.OPS.setTextMatrix;case 3:if(d[T]!==n.OPS.showText)return!1;const w=I.iCurr-3,v=f[w][0],b=f[w][1];return!(f[T][0]!==v||f[T][1]!==b);case 4:return d[T]===n.OPS.endText}throw new Error(`iterateShowTextGroup - invalid pos: ${S}`)},function(L,I){const f=L.fnArray,i=L.argsArray,S=L.iCurr,w=S-4,v=S-3,b=S-2,M=S-1,_=S,H=i[v][0],A=i[v][1];let E=Math.min(Math.floor((I-w)/5),1e3);if(E<3)return I-(I-w)%5;let l=w;w>=4&&f[w-4]===f[v]&&f[w-3]===f[b]&&f[w-2]===f[M]&&f[w-1]===f[_]&&i[w-4][0]===H&&i[w-4][1]===A&&(E++,l-=5);let g=l+4;for(let N=1;N<E;N++)f.splice(g,3),i.splice(g,3),g+=2;return g+1});class e{constructor(I){this.queue=I}_optimize(){}push(I,T){this.queue.fnArray.push(I),this.queue.argsArray.push(T),this._optimize()}flush(){}reset(){}}class t extends e{constructor(I){super(I),this.state=null,this.context={iCurr:0,fnArray:I.fnArray,argsArray:I.argsArray,isOffscreenCanvasSupported:!1},this.match=null,this.lastProcessed=0}set isOffscreenCanvasSupported(I){this.context.isOffscreenCanvasSupported=I}_optimize(){const I=this.queue.fnArray;let T=this.lastProcessed,d=I.length,f=this.state,i=this.match;if(!f&&!i&&T+1===d&&!R[I[T]]){this.lastProcessed=d;return}const S=this.context;for(;T<d;){if(i){if((0,i.iterateFn)(S,T)){T++;continue}if(T=(0,i.processFn)(S,T+1),d=I.length,i=null,f=null,T>=d)break}if(f=(f||R)[I[T]],!f||Array.isArray(f)){T++;continue}if(S.iCurr=T,T++,f.checkFn&&!(0,f.checkFn)(S)){f=null;continue}i=f,f=null}this.state=f,this.match=i,this.lastProcessed=T}flush(){for(;this.match;){const I=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,I),this.match=null,this.state=null,this._optimize()}}reset(){this.state=null,this.match=null,this.lastProcessed=0}}const $=class ${constructor(I=0,T){this._streamSink=T,this.fnArray=[],this.argsArray=[],this.optimizer=T&&!(I&n.RenderingIntentFlag.OPLIST)?new t(this):new e(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=T?null:Promise.resolve()}set isOffscreenCanvasSupported(I){this.optimizer.isOffscreenCanvasSupported=I}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(I,T){this.optimizer.push(I,T),this.weight++,this._streamSink&&(this.weight>=$.CHUNK_SIZE?this.flush():this.weight>=$.CHUNK_SIZE_ABOUT&&(I===n.OPS.restore||I===n.OPS.endText)&&this.flush())}addImageOps(I,T,d){d!==void 0&&this.addOp(n.OPS.beginMarkedContentProps,["OC",d]),this.addOp(I,T),d!==void 0&&this.addOp(n.OPS.endMarkedContent,[])}addDependency(I){this.dependencies.has(I)||(this.dependencies.add(I),this.addOp(n.OPS.dependency,[I]))}addDependencies(I){for(const T of I)this.addDependency(T)}addOpList(I){if(!(I instanceof $)){(0,n.warn)('addOpList - ignoring invalid "opList" parameter.');return}for(const T of I.dependencies)this.dependencies.add(T);for(let T=0,d=I.length;T<d;T++)this.addOp(I.fnArray[T],I.argsArray[T])}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){var i;const I=[],{fnArray:T,argsArray:d,length:f}=this;for(let S=0;S<f;S++)switch(T[S]){case n.OPS.paintInlineImageXObject:case n.OPS.paintInlineImageXObjectGroup:case n.OPS.paintImageMaskXObject:const w=d[S][0];!w.cached&&((i=w.data)==null?void 0:i.buffer)instanceof ArrayBuffer&&I.push(w.data.buffer);break}return I}flush(I=!1,T=null){this.optimizer.flush();const d=this.length;this._totalLength+=d,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:I,separateAnnots:T,length:d},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}};Rt($,"CHUNK_SIZE",1e3),Rt($,"CHUNK_SIZE_ABOUT",$.CHUNK_SIZE-5);let o=$;P.OperatorList=o},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PDFImage=void 0;var n=ie(2),k=ie(28),R=ie(5),e=ie(12),t=ie(18),o=ie(62),$=ie(26),L=ie(30),I=ie(4);function T(i,S,w,v){return i=S+i*w,i<0?i=0:i>v&&(i=v),i}function d(i,S,w,v,b,M){const _=b*M;let H;S<=8?H=new Uint8Array(_):S<=16?H=new Uint16Array(_):H=new Uint32Array(_);const A=w/b,E=v/M;let l,g,N,s=0,u;const F=new Uint16Array(b),U=w;for(l=0;l<b;l++)F[l]=Math.floor(l*A);for(l=0;l<M;l++)for(N=Math.floor(l*E)*U,g=0;g<b;g++)u=N+F[g],H[s++]=i[u];return H}class f{constructor({xref:S,res:w,image:v,isInline:b=!1,smask:M=null,mask:_=null,isMask:H=!1,pdfFunctionFactory:A,localColorSpaceCache:E}){var U;this.image=v;const l=v.dict,g=l.get("F","Filter");let N;if(g instanceof I.Name)N=g.name;else if(Array.isArray(g)){const O=S.fetchIfRef(g[0]);O instanceof I.Name&&(N=O.name)}switch(N){case"JPXDecode":const O=new L.JpxImage;O.parseImageProperties(v.stream),v.stream.reset(),v.width=O.width,v.height=O.height,v.bitsPerComponent=O.bitsPerComponent,v.numComps=O.componentsCount;break;case"JBIG2Decode":v.bitsPerComponent=1,v.numComps=1;break}let s=l.get("W","Width"),u=l.get("H","Height");if(Number.isInteger(v.width)&&v.width>0&&Number.isInteger(v.height)&&v.height>0&&(v.width!==s||v.height!==u)&&((0,n.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),s=v.width,u=v.height),s<1||u<1)throw new n.FormatError(`Invalid image width: ${s} or height: ${u}`);this.width=s,this.height=u,this.interpolate=l.get("I","Interpolate"),this.imageMask=l.get("IM","ImageMask")||!1,this.matte=l.get("Matte")||!1;let F=v.bitsPerComponent;if(!F&&(F=l.get("BPC","BitsPerComponent"),!F))if(this.imageMask)F=1;else throw new n.FormatError(`Bits per component missing in image: ${this.imageMask}`);if(this.bpc=F,!this.imageMask){let O=l.getRaw("CS")||l.getRaw("ColorSpace");if(!O)switch((0,n.info)("JPX images (which do not require color spaces)"),v.numComps){case 1:O=I.Name.get("DeviceGray");break;case 3:O=I.Name.get("DeviceRGB");break;case 4:O=I.Name.get("DeviceCMYK");break;default:throw new Error(`JPX images with ${v.numComps} color components not supported.`)}this.colorSpace=e.ColorSpace.parse({cs:O,xref:S,resources:b?w:null,pdfFunctionFactory:A,localColorSpaceCache:E}),this.numComps=this.colorSpace.numComps}if(this.decode=l.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,F)||H&&!e.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const O=(1<<F)-1;this.decodeCoefficients=[],this.decodeAddends=[];const m=((U=this.colorSpace)==null?void 0:U.name)==="Indexed";for(let x=0,y=0;x<this.decode.length;x+=2,++y){const r=this.decode[x],p=this.decode[x+1];this.decodeCoefficients[y]=m?(p-r)/O:p-r,this.decodeAddends[y]=m?r:O*r}}M?this.smask=new f({xref:S,res:w,image:M,isInline:b,pdfFunctionFactory:A,localColorSpaceCache:E}):_&&(_ instanceof R.BaseStream?_.dict.get("IM","ImageMask")?this.mask=new f({xref:S,res:w,image:_,isInline:b,isMask:!0,pdfFunctionFactory:A,localColorSpaceCache:E}):(0,n.warn)("Ignoring /Mask in image without /ImageMask."):this.mask=_)}static async buildImage({xref:S,res:w,image:v,isInline:b=!1,pdfFunctionFactory:M,localColorSpaceCache:_}){const H=v;let A=null,E=null;const l=v.dict.get("SMask"),g=v.dict.get("Mask");return l?l instanceof R.BaseStream?A=l:(0,n.warn)("Unsupported /SMask format."):g&&(g instanceof R.BaseStream||Array.isArray(g)?E=g:(0,n.warn)("Unsupported /Mask format.")),new f({xref:S,res:w,image:H,isInline:b,smask:A,mask:E,pdfFunctionFactory:M,localColorSpaceCache:_})}static createRawMask({imgArray:S,width:w,height:v,imageIsFromDecodeStream:b,inverseDecode:M,interpolate:_}){const H=(w+7>>3)*v,A=S.byteLength,E=H===A;let l,g;if(b&&(!M||E)?l=S:M?(l=new Uint8Array(H),l.set(S),l.fill(255,A)):l=new Uint8Array(S),M)for(g=0;g<A;g++)l[g]^=255;return{data:l,width:w,height:v,interpolate:_}}static async createMask({imgArray:S,width:w,height:v,imageIsFromDecodeStream:b,inverseDecode:M,interpolate:_,isOffscreenCanvasSupported:H=!1}){const A=w===1&&v===1&&M===(S.length===0||!!(S[0]&128));if(A)return{isSingleOpaquePixel:A};if(H){if(o.ImageResizer.needsToBeResized(w,v)){const s=new Uint8ClampedArray(w*v*4);return(0,k.convertBlackAndWhiteToRGBA)({src:S,dest:s,width:w,height:v,nonBlackColor:0,inverseDecode:M}),o.ImageResizer.createImage({kind:n.ImageKind.RGBA_32BPP,data:s,width:w,height:v,interpolate:_})}const E=new OffscreenCanvas(w,v),l=E.getContext("2d"),g=l.createImageData(w,v);(0,k.convertBlackAndWhiteToRGBA)({src:S,dest:g.data,width:w,height:v,nonBlackColor:0,inverseDecode:M}),l.putImageData(g,0,0);const N=E.transferToImageBitmap();return{data:null,width:w,height:v,interpolate:_,bitmap:N}}return this.createRawMask({imgArray:S,width:w,height:v,inverseDecode:M,imageIsFromDecodeStream:b,interpolate:_})}get drawWidth(){var S,w;return Math.max(this.width,((S=this.smask)==null?void 0:S.width)||0,((w=this.mask)==null?void 0:w.width)||0)}get drawHeight(){var S,w;return Math.max(this.height,((S=this.smask)==null?void 0:S.height)||0,((w=this.mask)==null?void 0:w.height)||0)}decodeBuffer(S){const w=this.bpc,v=this.numComps,b=this.decodeAddends,M=this.decodeCoefficients,_=(1<<w)-1;let H,A;if(w===1){for(H=0,A=S.length;H<A;H++)S[H]=+!S[H];return}let E=0;for(H=0,A=this.width*this.height;H<A;H++)for(let l=0;l<v;l++)S[E]=T(S[E],b[l],M[l],_),E++}getComponents(S){const w=this.bpc;if(w===8)return S;const v=this.width,b=this.height,M=this.numComps,_=v*b*M;let H=0,A;w<=8?A=new Uint8Array(_):w<=16?A=new Uint16Array(_):A=new Uint32Array(_);const E=v*M,l=(1<<w)-1;let g=0,N,s;if(w===1){let u,F,U;for(let O=0;O<b;O++){for(F=g+(E&-8),U=g+E;g<F;)s=S[H++],A[g]=s>>7&1,A[g+1]=s>>6&1,A[g+2]=s>>5&1,A[g+3]=s>>4&1,A[g+4]=s>>3&1,A[g+5]=s>>2&1,A[g+6]=s>>1&1,A[g+7]=s&1,g+=8;if(g<U)for(s=S[H++],u=128;g<U;)A[g++]=+!!(s&u),u>>=1}}else{let u=0;for(s=0,g=0,N=_;g<N;++g){for(g%E===0&&(s=0,u=0);u<w;)s=s<<8|S[H++],u+=8;const F=u-w;let U=s>>F;U<0?U=0:U>l&&(U=l),A[g]=U,s&=(1<<F)-1,u=F}}return A}fillOpacity(S,w,v,b,M){const _=this.smask,H=this.mask;let A,E,l,g,N,s;if(_)E=_.width,l=_.height,A=new Uint8ClampedArray(E*l),_.fillGrayBuffer(A),(E!==w||l!==v)&&(A=d(A,_.bpc,E,l,w,v));else if(H)if(H instanceof f){for(E=H.width,l=H.height,A=new Uint8ClampedArray(E*l),H.numComps=1,H.fillGrayBuffer(A),g=0,N=E*l;g<N;++g)A[g]=255-A[g];(E!==w||l!==v)&&(A=d(A,H.bpc,E,l,w,v))}else if(Array.isArray(H)){A=new Uint8ClampedArray(w*v);const u=this.numComps;for(g=0,N=w*v;g<N;++g){let F=0;const U=g*u;for(s=0;s<u;++s){const O=M[U+s],m=s*2;if(O<H[m]||O>H[m+1]){F=255;break}}A[g]=F}}else throw new n.FormatError("Unknown mask format.");if(A)for(g=0,s=3,N=w*b;g<N;++g,s+=4)S[s]=A[g];else for(g=0,s=3,N=w*b;g<N;++g,s+=4)S[s]=255}undoPreblend(S,w,v){var l;const b=(l=this.smask)==null?void 0:l.matte;if(!b)return;const M=this.colorSpace.getRgb(b,0),_=M[0],H=M[1],A=M[2],E=w*v*4;for(let g=0;g<E;g+=4){const N=S[g+3];if(N===0){S[g]=255,S[g+1]=255,S[g+2]=255;continue}const s=255/N;S[g]=(S[g]-_)*s+_,S[g+1]=(S[g+1]-H)*s+H,S[g+2]=(S[g+2]-A)*s+A}}async createImageData(S=!1,w=!1){const v=this.drawWidth,b=this.drawHeight,M={width:v,height:b,interpolate:this.interpolate,kind:0,data:null},_=this.numComps,H=this.width,A=this.height,E=this.bpc,l=H*_*E+7>>3,g=w&&o.ImageResizer.needsToBeResized(v,b);if(!S){let r;if(this.colorSpace.name==="DeviceGray"&&E===1?r=n.ImageKind.GRAYSCALE_1BPP:this.colorSpace.name==="DeviceRGB"&&E===8&&!this.needsDecode&&(r=n.ImageKind.RGB_24BPP),r&&!this.smask&&!this.mask&&v===H&&b===A){const p=this.getImageBytes(A*l,{});if(w)return g?o.ImageResizer.createImage({data:p,kind:r,width:v,height:b,interpolate:this.interpolate},this.needsDecode):this.createBitmap(r,H,A,p);if(M.kind=r,M.data=p,this.needsDecode){(0,n.assert)(r===n.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");const c=M.data;for(let h=0,C=c.length;h<C;h++)c[h]^=255}return M}if(this.image instanceof $.JpegStream&&!this.smask&&!this.mask&&!this.needsDecode){let p=A*l;if(w&&!g){let c=!1;switch(this.colorSpace.name){case"DeviceGray":p*=4,c=!0;break;case"DeviceRGB":p=p/3*4,c=!0;break;case"DeviceCMYK":c=!0;break}if(c){const h=this.getImageBytes(p,{drawWidth:v,drawHeight:b,forceRGBA:!0});return this.createBitmap(n.ImageKind.RGBA_32BPP,v,b,h)}}else switch(this.colorSpace.name){case"DeviceGray":p*=3;case"DeviceRGB":case"DeviceCMYK":return M.kind=n.ImageKind.RGB_24BPP,M.data=this.getImageBytes(p,{drawWidth:v,drawHeight:b,forceRGB:!0}),g?o.ImageResizer.createImage(M):M}}}const N=this.getImageBytes(A*l,{internal:!0}),s=0|N.length/l*b/A,u=this.getComponents(N);let F,U,O,m,x,y;if(w&&!g&&(O=new OffscreenCanvas(v,b),m=O.getContext("2d"),x=m.createImageData(v,b),y=x.data),M.kind=n.ImageKind.RGBA_32BPP,!S&&!this.smask&&!this.mask?(!w||g?(M.kind=n.ImageKind.RGB_24BPP,y=new Uint8ClampedArray(v*b*3),F=0):(new Uint32Array(y.buffer).fill(n.FeatureTest.isLittleEndian?4278190080:255),F=1),U=!1):((!w||g)&&(y=new Uint8ClampedArray(v*b*4)),F=1,U=!0,this.fillOpacity(y,v,b,s,u)),this.needsDecode&&this.decodeBuffer(u),this.colorSpace.fillRgb(y,H,A,v,b,s,E,u,F),U&&this.undoPreblend(y,v,s),w&&!g){m.putImageData(x,0,0);const r=O.transferToImageBitmap();return{data:null,width:v,height:b,bitmap:r,interpolate:this.interpolate}}return M.data=y,g?o.ImageResizer.createImage(M):M}fillGrayBuffer(S){const w=this.numComps;if(w!==1)throw new n.FormatError(`Reading gray scale from a color image: ${w}`);const v=this.width,b=this.height,M=this.bpc,_=v*w*M+7>>3,H=this.getImageBytes(b*_,{internal:!0}),A=this.getComponents(H);let E,l;if(M===1){if(l=v*b,this.needsDecode)for(E=0;E<l;++E)S[E]=A[E]-1&255;else for(E=0;E<l;++E)S[E]=-A[E]&255;return}this.needsDecode&&this.decodeBuffer(A),l=v*b;const g=255/((1<<M)-1);for(E=0;E<l;++E)S[E]=g*A[E]}createBitmap(S,w,v,b){const M=new OffscreenCanvas(w,v),_=M.getContext("2d");let H;S===n.ImageKind.RGBA_32BPP?H=new ImageData(b,w,v):(H=_.createImageData(w,v),(0,k.convertToRGBA)({kind:S,src:b,dest:new Uint32Array(H.data.buffer),width:w,height:v,inverseDecode:this.needsDecode})),_.putImageData(H,0,0);const A=M.transferToImageBitmap();return{data:null,width:w,height:v,bitmap:A,interpolate:this.interpolate}}getImageBytes(S,{drawWidth:w,drawHeight:v,forceRGBA:b=!1,forceRGB:M=!1,internal:_=!1}){this.image.reset(),this.image.drawWidth=w||this.width,this.image.drawHeight=v||this.height,this.image.forceRGBA=!!b,this.image.forceRGB=!!M;const H=this.image.getBytes(S);return _||this.image instanceof t.DecodeStream?H:((0,n.assert)(H instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(H))}}P.PDFImage=f},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Catalog=void 0;var n=ie(3),k=ie(2),R=ie(4),e=ie(67),t=ie(5),o=ie(68),$=ie(12),L=ie(69),I=ie(59),T=ie(70),d=ie(72);function f(S){return S instanceof R.Dict&&(S=S.get("D")),Array.isArray(S)?S:null}class i{constructor(w,v){if(this.pdfManager=w,this.xref=v,this._catDict=v.getCatalogObj(),!(this._catDict instanceof R.Dict))throw new k.FormatError("Catalog object is not a dictionary.");this.toplevelPagesDict,this._actualNumPages=null,this.fontCache=new R.RefSetCache,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new I.GlobalImageCache,this.pageKidsCountCache=new R.RefSetCache,this.pageIndexCache=new R.RefSetCache,this.nonBlendModesSet=new R.RefSet,this.systemFontCache=new Map}cloneDict(){return this._catDict.clone()}get version(){const w=this._catDict.get("Version");if(w instanceof R.Name){if(n.PDF_VERSION_REGEXP.test(w.name))return(0,k.shadow)(this,"version",w.name);(0,k.warn)(`Invalid PDF catalog version: ${w.name}`)}return(0,k.shadow)(this,"version",null)}get lang(){const w=this._catDict.get("Lang");return(0,k.shadow)(this,"lang",typeof w=="string"?(0,k.stringToPDFString)(w):null)}get needsRendering(){const w=this._catDict.get("NeedsRendering");return(0,k.shadow)(this,"needsRendering",typeof w=="boolean"?w:!1)}get collection(){let w=null;try{const v=this._catDict.get("Collection");v instanceof R.Dict&&v.size>0&&(w=v)}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.info)("Cannot fetch Collection entry; assuming no collection is present.")}return(0,k.shadow)(this,"collection",w)}get acroForm(){let w=null;try{const v=this._catDict.get("AcroForm");v instanceof R.Dict&&v.size>0&&(w=v)}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.info)("Cannot fetch AcroForm entry; assuming no forms are present.")}return(0,k.shadow)(this,"acroForm",w)}get acroFormRef(){const w=this._catDict.getRaw("AcroForm");return(0,k.shadow)(this,"acroFormRef",w instanceof R.Ref?w:null)}get metadata(){var b;const w=this._catDict.getRaw("Metadata");if(!(w instanceof R.Ref))return(0,k.shadow)(this,"metadata",null);let v=null;try{const M=this.xref.fetch(w,!((b=this.xref.encrypt)!=null&&b.encryptMetadata));if(M instanceof t.BaseStream&&M.dict instanceof R.Dict){const _=M.dict.get("Type"),H=M.dict.get("Subtype");if((0,R.isName)(_,"Metadata")&&(0,R.isName)(H,"XML")){const A=(0,k.stringToUTF8String)(M.getString());A&&(v=new T.MetadataParser(A).serializable)}}}catch(M){if(M instanceof n.MissingDataException)throw M;(0,k.info)(`Skipping invalid Metadata: "${M}".`)}return(0,k.shadow)(this,"metadata",v)}get markInfo(){let w=null;try{w=this._readMarkInfo()}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.warn)("Unable to read mark info.")}return(0,k.shadow)(this,"markInfo",w)}_readMarkInfo(){const w=this._catDict.get("MarkInfo");if(!(w instanceof R.Dict))return null;const v={Marked:!1,UserProperties:!1,Suspects:!1};for(const b in v){const M=w.get(b);typeof M=="boolean"&&(v[b]=M)}return v}get structTreeRoot(){let w=null;try{w=this._readStructTreeRoot()}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.warn)("Unable read to structTreeRoot info.")}return(0,k.shadow)(this,"structTreeRoot",w)}_readStructTreeRoot(){const w=this._catDict.getRaw("StructTreeRoot"),v=this.xref.fetchIfRef(w);if(!(v instanceof R.Dict))return null;const b=new d.StructTreeRoot(v,w);return b.init(),b}get toplevelPagesDict(){const w=this._catDict.get("Pages");if(!(w instanceof R.Dict))throw new k.FormatError("Invalid top-level pages dictionary.");return(0,k.shadow)(this,"toplevelPagesDict",w)}get documentOutline(){let w=null;try{w=this._readDocumentOutline()}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.warn)("Unable to read document outline.")}return(0,k.shadow)(this,"documentOutline",w)}_readDocumentOutline(){let w=this._catDict.get("Outlines");if(!(w instanceof R.Dict)||(w=w.getRaw("First"),!(w instanceof R.Ref)))return null;const v={items:[]},b=[{obj:w,parent:v}],M=new R.RefSet;M.put(w);const _=this.xref,H=new Uint8ClampedArray(3);for(;b.length>0;){const A=b.shift(),E=_.fetchIfRef(A.obj);if(E===null)continue;if(!E.has("Title"))throw new k.FormatError("Invalid outline item encountered.");const l={url:null,dest:null,action:null};i.parseDestDictionary({destDict:E,resultObj:l,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const g=E.get("Title"),N=E.get("F")||0,s=E.getArray("C"),u=E.get("Count");let F=H;Array.isArray(s)&&s.length===3&&(s[0]!==0||s[1]!==0||s[2]!==0)&&(F=$.ColorSpace.singletons.rgb.getRgb(s,0));const U={action:l.action,attachment:l.attachment,dest:l.dest,url:l.url,unsafeUrl:l.unsafeUrl,newWindow:l.newWindow,setOCGState:l.setOCGState,title:(0,k.stringToPDFString)(g),color:F,count:Number.isInteger(u)?u:void 0,bold:!!(N&2),italic:!!(N&1),items:[]};A.parent.items.push(U),w=E.getRaw("First"),w instanceof R.Ref&&!M.has(w)&&(b.push({obj:w,parent:U}),M.put(w)),w=E.getRaw("Next"),w instanceof R.Ref&&!M.has(w)&&(b.push({obj:w,parent:A.parent}),M.put(w))}return v.items.length>0?v.items:null}get permissions(){let w=null;try{w=this._readPermissions()}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.warn)("Unable to read permissions.")}return(0,k.shadow)(this,"permissions",w)}_readPermissions(){const w=this.xref.trailer.get("Encrypt");if(!(w instanceof R.Dict))return null;let v=w.get("P");if(typeof v!="number")return null;v+=4294967296;const b=[];for(const M in k.PermissionFlag){const _=k.PermissionFlag[M];v&_&&b.push(_)}return b}get optionalContentConfig(){let w=null;try{const v=this._catDict.get("OCProperties");if(!v)return(0,k.shadow)(this,"optionalContentConfig",null);const b=v.get("D");if(!b)return(0,k.shadow)(this,"optionalContentConfig",null);const M=v.get("OCGs");if(!Array.isArray(M))return(0,k.shadow)(this,"optionalContentConfig",null);const _=[],H=[];for(const A of M){if(!(A instanceof R.Ref))continue;H.push(A);const E=this.xref.fetchIfRef(A);_.push({id:A.toString(),name:typeof E.get("Name")=="string"?(0,k.stringToPDFString)(E.get("Name")):null,intent:typeof E.get("Intent")=="string"?(0,k.stringToPDFString)(E.get("Intent")):null})}w=this._readOptionalContentConfig(b,H),w.groups=_}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.warn)(`Unable to read optional content config: ${v}`)}return(0,k.shadow)(this,"optionalContentConfig",w)}_readOptionalContentConfig(w,v){function b(l){const g=[];if(Array.isArray(l))for(const N of l)N instanceof R.Ref&&v.includes(N)&&g.push(N.toString());return g}function M(l,g=0){if(!Array.isArray(l))return null;const N=[];for(const u of l){if(u instanceof R.Ref&&v.includes(u)){A.put(u),N.push(u.toString());continue}const F=_(u,g);F&&N.push(F)}if(g>0)return N;const s=[];for(const u of v)A.has(u)||s.push(u.toString());return s.length&&N.push({name:null,order:s}),N}function _(l,g){if(++g>E)return(0,k.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;const N=H.fetchIfRef(l);if(!Array.isArray(N))return null;const s=H.fetchIfRef(N[0]);if(typeof s!="string")return null;const u=M(N.slice(1),g);return!u||!u.length?null:{name:(0,k.stringToPDFString)(s),order:u}}const H=this.xref,A=new R.RefSet,E=10;return{name:typeof w.get("Name")=="string"?(0,k.stringToPDFString)(w.get("Name")):null,creator:typeof w.get("Creator")=="string"?(0,k.stringToPDFString)(w.get("Creator")):null,baseState:w.get("BaseState")instanceof R.Name?w.get("BaseState").name:null,on:b(w.get("ON")),off:b(w.get("OFF")),order:M(w.get("Order")),groups:null}}setActualNumPages(w=null){this._actualNumPages=w}get hasActualNumPages(){return this._actualNumPages!==null}get _pagesCount(){const w=this.toplevelPagesDict.get("Count");if(!Number.isInteger(w))throw new k.FormatError("Page count in top-level pages dictionary is not an integer.");return(0,k.shadow)(this,"_pagesCount",w)}get numPages(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}get destinations(){const w=this._readDests(),v=Object.create(null);if(w instanceof e.NameTree)for(const[b,M]of w.getAll()){const _=f(M);_&&(v[(0,k.stringToPDFString)(b)]=_)}else w instanceof R.Dict&&w.forEach(function(b,M){const _=f(M);_&&(v[b]=_)});return(0,k.shadow)(this,"destinations",v)}getDestination(w){const v=this._readDests();if(v instanceof e.NameTree){const b=f(v.get(w));if(b)return b;const M=this.destinations[w];if(M)return(0,k.warn)(`Found "${w}" at an incorrect position in the NameTree.`),M}else if(v instanceof R.Dict){const b=f(v.get(w));if(b)return b}return null}_readDests(){const w=this._catDict.get("Names");if(w!=null&&w.has("Dests"))return new e.NameTree(w.getRaw("Dests"),this.xref);if(this._catDict.has("Dests"))return this._catDict.get("Dests")}get pageLabels(){let w=null;try{w=this._readPageLabels()}catch(v){if(v instanceof n.MissingDataException)throw v;(0,k.warn)("Unable to read page labels.")}return(0,k.shadow)(this,"pageLabels",w)}_readPageLabels(){const w=this._catDict.getRaw("PageLabels");if(!w)return null;const v=new Array(this.numPages);let b=null,M="";const H=new e.NumberTree(w,this.xref).getAll();let A="",E=1;for(let l=0,g=this.numPages;l<g;l++){const N=H.get(l);if(N!==void 0){if(!(N instanceof R.Dict))throw new k.FormatError("PageLabel is not a dictionary.");if(N.has("Type")&&!(0,R.isName)(N.get("Type"),"PageLabel"))throw new k.FormatError("Invalid type in PageLabel dictionary.");if(N.has("S")){const s=N.get("S");if(!(s instanceof R.Name))throw new k.FormatError("Invalid style in PageLabel dictionary.");b=s.name}else b=null;if(N.has("P")){const s=N.get("P");if(typeof s!="string")throw new k.FormatError("Invalid prefix in PageLabel dictionary.");M=(0,k.stringToPDFString)(s)}else M="";if(N.has("St")){const s=N.get("St");if(!(Number.isInteger(s)&&s>=1))throw new k.FormatError("Invalid start in PageLabel dictionary.");E=s}else E=1}switch(b){case"D":A=E;break;case"R":case"r":A=(0,n.toRomanNumerals)(E,b==="r");break;case"A":case"a":const s=26,U=b==="a"?97:65,O=E-1;A=String.fromCharCode(U+O%s).repeat(Math.floor(O/s)+1);break;default:if(b)throw new k.FormatError(`Invalid style "${b}" in PageLabel dictionary.`);A=""}v[l]=M+A,E++}return v}get pageLayout(){const w=this._catDict.get("PageLayout");let v="";if(w instanceof R.Name)switch(w.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":v=w.name}return(0,k.shadow)(this,"pageLayout",v)}get pageMode(){const w=this._catDict.get("PageMode");let v="UseNone";if(w instanceof R.Name)switch(w.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":v=w.name}return(0,k.shadow)(this,"pageMode",v)}get viewerPreferences(){const w=this._catDict.get("ViewerPreferences");if(!(w instanceof R.Dict))return(0,k.shadow)(this,"viewerPreferences",null);let v=null;for(const b of w.getKeys()){const M=w.get(b);let _;switch(b){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":typeof M=="boolean"&&(_=M);break;case"NonFullScreenPageMode":if(M instanceof R.Name)switch(M.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":_=M.name;break;default:_="UseNone"}break;case"Direction":if(M instanceof R.Name)switch(M.name){case"L2R":case"R2L":_=M.name;break;default:_="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(M instanceof R.Name)switch(M.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":_=M.name;break;default:_="CropBox"}break;case"PrintScaling":if(M instanceof R.Name)switch(M.name){case"None":case"AppDefault":_=M.name;break;default:_="AppDefault"}break;case"Duplex":if(M instanceof R.Name)switch(M.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":_=M.name;break;default:_="None"}break;case"PrintPageRange":Array.isArray(M)&&M.length%2===0&&M.every((A,E,l)=>Number.isInteger(A)&&A>0&&(E===0||A>=l[E-1])&&A<=this.numPages)&&(_=M);break;case"NumCopies":Number.isInteger(M)&&M>0&&(_=M);break;default:(0,k.warn)(`Ignoring non-standard key in ViewerPreferences: ${b}.`);continue}if(_===void 0){(0,k.warn)(`Bad value, for key "${b}", in ViewerPreferences: ${M}.`);continue}v||(v=Object.create(null)),v[b]=_}return(0,k.shadow)(this,"viewerPreferences",v)}get openAction(){const w=this._catDict.get("OpenAction"),v=Object.create(null);if(w instanceof R.Dict){const b=new R.Dict(this.xref);b.set("A",w);const M={url:null,dest:null,action:null};i.parseDestDictionary({destDict:b,resultObj:M}),Array.isArray(M.dest)?v.dest=M.dest:M.action&&(v.action=M.action)}else Array.isArray(w)&&(v.dest=w);return(0,k.shadow)(this,"openAction",(0,k.objectSize)(v)>0?v:null)}get attachments(){const w=this._catDict.get("Names");let v=null;if(w instanceof R.Dict&&w.has("EmbeddedFiles")){const b=new e.NameTree(w.getRaw("EmbeddedFiles"),this.xref);for(const[M,_]of b.getAll()){const H=new L.FileSpec(_,this.xref);v||(v=Object.create(null)),v[(0,k.stringToPDFString)(M)]=H.serializable}}return(0,k.shadow)(this,"attachments",v)}get xfaImages(){const w=this._catDict.get("Names");let v=null;if(w instanceof R.Dict&&w.has("XFAImages")){const b=new e.NameTree(w.getRaw("XFAImages"),this.xref);for(const[M,_]of b.getAll())v||(v=new R.Dict(this.xref)),v.set((0,k.stringToPDFString)(M),_)}return(0,k.shadow)(this,"xfaImages",v)}_collectJavaScript(){const w=this._catDict.get("Names");let v=null;function b(_,H){if(!(H instanceof R.Dict)||!(0,R.isName)(H.get("S"),"JavaScript"))return;let A=H.get("JS");if(A instanceof t.BaseStream)A=A.getString();else if(typeof A!="string")return;A=(0,k.stringToPDFString)(A).replaceAll("\0",""),A&&(v||(v=new Map)).set(_,A)}if(w instanceof R.Dict&&w.has("JavaScript")){const _=new e.NameTree(w.getRaw("JavaScript"),this.xref);for(const[H,A]of _.getAll())b((0,k.stringToPDFString)(H),A)}const M=this._catDict.get("OpenAction");return M&&b("OpenAction",M),v}get jsActions(){const w=this._collectJavaScript();let v=(0,n.collectActions)(this.xref,this._catDict,k.DocumentActionEventType);if(w){v||(v=Object.create(null));for(const[b,M]of w)b in v?v[b].push(M):v[b]=[M]}return(0,k.shadow)(this,"jsActions",v)}async fontFallback(w,v){const b=await Promise.all(this.fontCache);for(const M of b)if(M.loadedName===w){M.fallback(v);return}}async cleanup(w=!1){(0,o.clearGlobalCaches)(),this.globalImageCache.clear(w),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.nonBlendModesSet.clear();const v=await Promise.all(this.fontCache);for(const{dict:b}of v)delete b.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(w){const v=[this.toplevelPagesDict],b=new R.RefSet,M=this._catDict.getRaw("Pages");M instanceof R.Ref&&b.put(M);const _=this.xref,H=this.pageKidsCountCache,A=this.pageIndexCache;let E=0;for(;v.length;){const l=v.pop();if(l instanceof R.Ref){const u=H.get(l);if(u>=0&&E+u<=w){E+=u;continue}if(b.has(l))throw new k.FormatError("Pages tree contains circular reference.");b.put(l);const F=await _.fetchAsync(l);if(F instanceof R.Dict){let U=F.getRaw("Type");if(U instanceof R.Ref&&(U=await _.fetchAsync(U)),(0,R.isName)(U,"Page")||!F.has("Kids")){if(H.has(l)||H.put(l,1),A.has(l)||A.put(l,E),E===w)return[F,l];E++;continue}}v.push(F);continue}if(!(l instanceof R.Dict))throw new k.FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:g}=l;let N=l.getRaw("Count");if(N instanceof R.Ref&&(N=await _.fetchAsync(N)),Number.isInteger(N)&&N>=0&&(g&&!H.has(g)&&H.put(g,N),E+N<=w)){E+=N;continue}let s=l.getRaw("Kids");if(s instanceof R.Ref&&(s=await _.fetchAsync(s)),!Array.isArray(s)){let u=l.getRaw("Type");if(u instanceof R.Ref&&(u=await _.fetchAsync(u)),(0,R.isName)(u,"Page")||!l.has("Kids")){if(E===w)return[l,null];E++;continue}throw new k.FormatError("Page dictionary kids object is not an array.")}for(let u=s.length-1;u>=0;u--)v.push(s[u])}throw new Error(`Page index ${w} not found.`)}async getAllPageDicts(w=!1){const{ignoreErrors:v}=this.pdfManager.evaluatorOptions,b=[{currentNode:this.toplevelPagesDict,posInKids:0}],M=new R.RefSet,_=this._catDict.getRaw("Pages");_ instanceof R.Ref&&M.put(_);const H=new Map,A=this.xref,E=this.pageIndexCache;let l=0;function g(s,u){u&&!E.has(u)&&E.put(u,l),H.set(l++,[s,u])}function N(s){if(s instanceof n.XRefEntryException&&!w)throw s;w&&v&&l===0&&((0,k.warn)(`getAllPageDicts - Skipping invalid first page: "${s}".`),s=R.Dict.empty),H.set(l++,[s,null])}for(;b.length>0;){const s=b.at(-1),{currentNode:u,posInKids:F}=s;let U=u.getRaw("Kids");if(U instanceof R.Ref)try{U=await A.fetchAsync(U)}catch(y){N(y);break}if(!Array.isArray(U)){N(new k.FormatError("Page dictionary kids object is not an array."));break}if(F>=U.length){b.pop();continue}const O=U[F];let m;if(O instanceof R.Ref){if(M.has(O)){N(new k.FormatError("Pages tree contains circular reference."));break}M.put(O);try{m=await A.fetchAsync(O)}catch(y){N(y);break}}else m=O;if(!(m instanceof R.Dict)){N(new k.FormatError("Page dictionary kid reference points to wrong type of object."));break}let x=m.getRaw("Type");if(x instanceof R.Ref)try{x=await A.fetchAsync(x)}catch(y){N(y);break}(0,R.isName)(x,"Page")||!m.has("Kids")?g(m,O instanceof R.Ref?O:null):b.push({currentNode:m,posInKids:0}),s.posInKids++}return H}getPageIndex(w){const v=this.pageIndexCache.get(w);if(v!==void 0)return Promise.resolve(v);const b=this.xref;function M(A){let E=0,l;return b.fetchAsync(A).then(function(g){if((0,R.isRefsEqual)(A,w)&&!(0,R.isDict)(g,"Page")&&!(g instanceof R.Dict&&!g.has("Type")&&g.has("Contents")))throw new k.FormatError("The reference does not point to a /Page dictionary.");if(!g)return null;if(!(g instanceof R.Dict))throw new k.FormatError("Node must be a dictionary.");return l=g.getRaw("Parent"),g.getAsync("Parent")}).then(function(g){if(!g)return null;if(!(g instanceof R.Dict))throw new k.FormatError("Parent must be a dictionary.");return g.getAsync("Kids")}).then(function(g){if(!g)return null;const N=[];let s=!1;for(const u of g){if(!(u instanceof R.Ref))throw new k.FormatError("Kid must be a reference.");if((0,R.isRefsEqual)(u,A)){s=!0;break}N.push(b.fetchAsync(u).then(function(F){if(!(F instanceof R.Dict))throw new k.FormatError("Kid node must be a dictionary.");F.has("Count")?E+=F.get("Count"):E++}))}if(!s)throw new k.FormatError("Kid reference not found in parent's kids.");return Promise.all(N).then(function(){return[E,l]})})}let _=0;const H=A=>M(A).then(E=>{if(!E)return this.pageIndexCache.put(w,_),_;const[l,g]=E;return _+=l,H(g)});return H(w)}get baseUrl(){const w=this._catDict.get("URI");if(w instanceof R.Dict){const v=w.get("Base");if(typeof v=="string"){const b=(0,k.createValidAbsoluteUrl)(v,null,{tryConvertEncoding:!0});if(b)return(0,k.shadow)(this,"baseUrl",b.href)}}return(0,k.shadow)(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:w,resultObj:v,docBaseUrl:b=null,docAttachments:M=null}){if(!(w instanceof R.Dict)){(0,k.warn)("parseDestDictionary: `destDict` must be a dictionary.");return}let _=w.get("A"),H,A;if(_ instanceof R.Dict||(w.has("Dest")?_=w.get("Dest"):(_=w.get("AA"),_ instanceof R.Dict&&(_.has("D")?_=_.get("D"):_.has("U")&&(_=_.get("U"))))),_ instanceof R.Dict){const E=_.get("S");if(!(E instanceof R.Name)){(0,k.warn)("parseDestDictionary: Invalid type in Action dictionary.");return}const l=E.name;switch(l){case"ResetForm":const g=_.get("Flags"),N=((typeof g=="number"?g:0)&1)===0,s=[],u=[];for(const X of _.get("Fields")||[])X instanceof R.Ref?u.push(X.toString()):typeof X=="string"&&s.push((0,k.stringToPDFString)(X));v.resetForm={fields:s,refs:u,include:N};break;case"URI":H=_.get("URI"),H instanceof R.Name&&(H="/"+H.name);break;case"GoTo":A=_.get("D");break;case"Launch":case"GoToR":const F=_.get("F");F instanceof R.Dict?H=F.get("F")||null:typeof F=="string"&&(H=F);let U=_.get("D");if(U&&(U instanceof R.Name&&(U=U.name),typeof H=="string")){const X=H.split("#")[0];typeof U=="string"?H=X+"#"+U:Array.isArray(U)&&(H=X+"#"+JSON.stringify(U))}const O=_.get("NewWindow");typeof O=="boolean"&&(v.newWindow=O);break;case"GoToE":const m=_.get("T");let x;if(M&&m instanceof R.Dict){const X=m.get("R"),q=m.get("N");(0,R.isName)(X,"C")&&typeof q=="string"&&(x=M[(0,k.stringToPDFString)(q)])}x?v.attachment=x:(0,k.warn)('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":const y=_.get("N");y instanceof R.Name&&(v.action=y.name);break;case"SetOCGState":const r=_.get("State"),p=_.get("PreserveRB");if(!Array.isArray(r)||r.length===0)break;const c=[];for(const X of r)if(X instanceof R.Name)switch(X.name){case"ON":case"OFF":case"Toggle":c.push(X.name);break}else X instanceof R.Ref&&c.push(X.toString());if(c.length!==r.length)break;v.setOCGState={state:c,preserveRB:typeof p=="boolean"?p:!0};break;case"JavaScript":const h=_.get("JS");let C;h instanceof t.BaseStream?C=h.getString():typeof h=="string"&&(C=h);const D=C&&(0,n.recoverJsURL)((0,k.stringToPDFString)(C));if(D){H=D.url,v.newWindow=D.newWindow;break}default:if(l==="JavaScript"||l==="SubmitForm")break;(0,k.warn)(`parseDestDictionary - unsupported action: "${l}".`);break}}else w.has("Dest")&&(A=w.get("Dest"));if(typeof H=="string"){const E=(0,k.createValidAbsoluteUrl)(H,b,{addDefaultProtocol:!0,tryConvertEncoding:!0});E&&(v.url=E.href),v.unsafeUrl=H}A&&(A instanceof R.Name&&(A=A.name),typeof A=="string"?v.dest=(0,k.stringToPDFString)(A):Array.isArray(A)&&(v.dest=A))}}P.Catalog=i},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.NumberTree=P.NameTree=void 0;var n=ie(4),k=ie(2);class R{constructor($,L,I){this.constructor===R&&(0,k.unreachable)("Cannot initialize NameOrNumberTree."),this.root=$,this.xref=L,this._type=I}getAll(){const $=new Map;if(!this.root)return $;const L=this.xref,I=new n.RefSet;I.put(this.root);const T=[this.root];for(;T.length>0;){const d=L.fetchIfRef(T.shift());if(!(d instanceof n.Dict))continue;if(d.has("Kids")){const i=d.get("Kids");if(!Array.isArray(i))continue;for(const S of i){if(I.has(S))throw new k.FormatError(`Duplicate entry in "${this._type}" tree.`);T.push(S),I.put(S)}continue}const f=d.get(this._type);if(Array.isArray(f))for(let i=0,S=f.length;i<S;i+=2)$.set(L.fetchIfRef(f[i]),L.fetchIfRef(f[i+1]))}return $}get($){if(!this.root)return null;const L=this.xref;let I=L.fetchIfRef(this.root),T=0;const d=10;for(;I.has("Kids");){if(++T>d)return(0,k.warn)(`Search depth limit reached for "${this._type}" tree.`),null;const i=I.get("Kids");if(!Array.isArray(i))return null;let S=0,w=i.length-1;for(;S<=w;){const v=S+w>>1,b=L.fetchIfRef(i[v]),M=b.get("Limits");if($<L.fetchIfRef(M[0]))w=v-1;else if($>L.fetchIfRef(M[1]))S=v+1;else{I=b;break}}if(S>w)return null}const f=I.get(this._type);if(Array.isArray(f)){let i=0,S=f.length-2;for(;i<=S;){const w=i+S>>1,v=w+(w&1),b=L.fetchIfRef(f[v]);if($<b)S=v-2;else if($>b)i=v+2;else return L.fetchIfRef(f[v+1])}}return null}}class e extends R{constructor($,L){super($,L,"Names")}}P.NameTree=e;class t extends R{constructor($,L){super($,L,"Nums")}}P.NumberTree=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.clearGlobalCaches=e;var n=ie(50),k=ie(4),R=ie(40);function e(){(0,n.clearPatternCaches)(),(0,k.clearPrimitiveCaches)(),(0,R.clearUnicodeCaches)()}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FileSpec=void 0;var n=ie(2),k=ie(5),R=ie(4);function e(o){return o.has("UF")?o.get("UF"):o.has("F")?o.get("F"):o.has("Unix")?o.get("Unix"):o.has("Mac")?o.get("Mac"):o.has("DOS")?o.get("DOS"):null}class t{constructor($,L){$ instanceof R.Dict&&(this.xref=L,this.root=$,$.has("FS")&&(this.fs=$.get("FS")),this.description=$.has("Desc")?(0,n.stringToPDFString)($.get("Desc")):"",$.has("RF")&&(0,n.warn)("Related file specifications are not supported"),this.contentAvailable=!0,$.has("EF")||(this.contentAvailable=!1,(0,n.warn)("Non-embedded file specifications are not supported")))}get filename(){if(!this._filename&&this.root){const $=e(this.root)||"unnamed";this._filename=(0,n.stringToPDFString)($).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")}return this._filename}get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=e(this.root.get("EF")));let $=null;if(this.contentRef){const L=this.xref.fetchIfRef(this.contentRef);L instanceof k.BaseStream?$=L.getBytes():(0,n.warn)("Embedded file specification points to non-existing/invalid content")}else(0,n.warn)("Embedded file specification does not have a content");return $}get serializable(){return{filename:this.filename,content:this.content}}}P.FileSpec=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.MetadataParser=void 0;var n=ie(71);class k{constructor(e){e=this._repair(e);const o=new n.SimpleXMLParser({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map,this._data=e,o&&this._parse(o)}_repair(e){return e.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,function(t,o){const $=o.replaceAll(/\\([0-3])([0-7])([0-7])/g,function(I,T,d,f){return String.fromCharCode(T*64+d*8+f*1)}).replaceAll(/&(amp|apos|gt|lt|quot);/g,function(I,T){switch(T){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${T} isn't defined.`)}),L=[">"];for(let I=0,T=$.length;I<T;I+=2){const d=$.charCodeAt(I)*256+$.charCodeAt(I+1);d>=32&&d<127&&d!==60&&d!==62&&d!==38?L.push(String.fromCharCode(d)):L.push("&#x"+(65536+d).toString(16).substring(1)+";")}return L.join("")})}_getSequence(e){const t=e.nodeName;return t!=="rdf:bag"&&t!=="rdf:seq"&&t!=="rdf:alt"?null:e.childNodes.filter(o=>o.nodeName==="rdf:li")}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,o=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,o.map($=>$.textContent.trim()))}_parse(e){let t=e.documentElement;if(t.nodeName!=="rdf:rdf")for(t=t.firstChild;t&&t.nodeName!=="rdf:rdf";)t=t.nextSibling;if(!(!t||t.nodeName!=="rdf:rdf"||!t.hasChildNodes())){for(const o of t.childNodes)if(o.nodeName==="rdf:description")for(const $ of o.childNodes){const L=$.nodeName;switch(L){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray($);continue}this._metadataMap.set(L,$.textContent.trim())}}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}P.MetadataParser=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XMLParserErrorCode=P.XMLParserBase=P.SimpleXMLParser=P.SimpleDOMNode=void 0;var n=ie(3);const k={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};P.XMLParserErrorCode=k;function R(L,I){const T=L[I];return T===" "||T===`
`||T==="\r"||T==="	"}function e(L){for(let I=0,T=L.length;I<T;I++)if(!R(L,I))return!1;return!0}class t{_resolveEntities(I){return I.replaceAll(/&([^;]+);/g,(T,d)=>{if(d.substring(0,2)==="#x")return String.fromCodePoint(parseInt(d.substring(2),16));if(d.substring(0,1)==="#")return String.fromCodePoint(parseInt(d.substring(1),10));switch(d){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(d)})}_parseContent(I,T){const d=[];let f=T;function i(){for(;f<I.length&&R(I,f);)++f}for(;f<I.length&&!R(I,f)&&I[f]!==">"&&I[f]!=="/";)++f;const S=I.substring(T,f);for(i();f<I.length&&I[f]!==">"&&I[f]!=="/"&&I[f]!=="?";){i();let w="",v="";for(;f<I.length&&!R(I,f)&&I[f]!=="=";)w+=I[f],++f;if(i(),I[f]!=="=")return null;++f,i();const b=I[f];if(b!=='"'&&b!=="'")return null;const M=I.indexOf(b,++f);if(M<0)return null;v=I.substring(f,M),d.push({name:w,value:this._resolveEntities(v)}),f=M+1,i()}return{name:S,attributes:d,parsed:f-T}}_parseProcessingInstruction(I,T){let d=T;function f(){for(;d<I.length&&R(I,d);)++d}for(;d<I.length&&!R(I,d)&&I[d]!==">"&&I[d]!=="?"&&I[d]!=="/";)++d;const i=I.substring(T,d);f();const S=d;for(;d<I.length&&(I[d]!=="?"||I[d+1]!==">");)++d;const w=I.substring(S,d);return{name:i,value:w,parsed:d-T}}parseXml(I){let T=0;for(;T<I.length;){const d=I[T];let f=T;if(d==="<"){++f;const i=I[f];let S;switch(i){case"/":if(++f,S=I.indexOf(">",f),S<0){this.onError(k.UnterminatedElement);return}this.onEndElement(I.substring(f,S)),f=S+1;break;case"?":++f;const w=this._parseProcessingInstruction(I,f);if(I.substring(f+w.parsed,f+w.parsed+2)!=="?>"){this.onError(k.UnterminatedXmlDeclaration);return}this.onPi(w.name,w.value),f+=w.parsed+2;break;case"!":if(I.substring(f+1,f+3)==="--"){if(S=I.indexOf("-->",f+3),S<0){this.onError(k.UnterminatedComment);return}this.onComment(I.substring(f+3,S)),f=S+3}else if(I.substring(f+1,f+8)==="[CDATA["){if(S=I.indexOf("]]>",f+8),S<0){this.onError(k.UnterminatedCdat);return}this.onCdata(I.substring(f+8,S)),f=S+3}else if(I.substring(f+1,f+8)==="DOCTYPE"){const M=I.indexOf("[",f+8);let _=!1;if(S=I.indexOf(">",f+8),S<0){this.onError(k.UnterminatedDoctypeDeclaration);return}if(M>0&&S>M){if(S=I.indexOf("]>",f+8),S<0){this.onError(k.UnterminatedDoctypeDeclaration);return}_=!0}const H=I.substring(f+8,S+(_?1:0));this.onDoctype(H),f=S+(_?2:1)}else{this.onError(k.MalformedElement);return}break;default:const v=this._parseContent(I,f);if(v===null){this.onError(k.MalformedElement);return}let b=!1;if(I.substring(f+v.parsed,f+v.parsed+2)==="/>")b=!0;else if(I.substring(f+v.parsed,f+v.parsed+1)!==">"){this.onError(k.UnterminatedElement);return}this.onBeginElement(v.name,v.attributes,b),f+=v.parsed+(b?2:1);break}}else{for(;f<I.length&&I[f]!=="<";)f++;const i=I.substring(T,f);this.onText(this._resolveEntities(i))}T=f}}onResolveEntity(I){return`&${I};`}onPi(I,T){}onComment(I){}onCdata(I){}onDoctype(I){}onText(I){}onBeginElement(I,T,d){}onEndElement(I){}onError(I){}}P.XMLParserBase=t;class o{constructor(I,T){this.nodeName=I,this.nodeValue=T,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){var I;return(I=this.childNodes)==null?void 0:I[0]}get nextSibling(){const I=this.parentNode.childNodes;if(!I)return;const T=I.indexOf(this);if(T!==-1)return I[T+1]}get textContent(){return this.childNodes?this.childNodes.map(function(I){return I.textContent}).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){var I;return((I=this.childNodes)==null?void 0:I.length)>0}searchNode(I,T){var S;if(T>=I.length)return this;const d=I[T];if(d.name.startsWith("#")&&T<I.length-1)return this.searchNode(I,T+1);const f=[];let i=this;for(;;){if(d.name===i.nodeName)if(d.pos===0){const w=i.searchNode(I,T+1);if(w!==null)return w}else{if(f.length===0)return null;{const[w]=f.pop();let v=0;for(const b of w.childNodes)if(d.name===b.nodeName){if(v===d.pos)return b.searchNode(I,T+1);v++}return i.searchNode(I,T+1)}}if(((S=i.childNodes)==null?void 0:S.length)>0)f.push([i,0]),i=i.childNodes[0];else{if(f.length===0)return null;for(;f.length!==0;){const[w,v]=f.pop(),b=v+1;if(b<w.childNodes.length){f.push([w,b]),i=w.childNodes[b];break}}if(f.length===0)return null}}}dump(I){if(this.nodeName==="#text"){I.push((0,n.encodeToXmlString)(this.nodeValue));return}if(I.push(`<${this.nodeName}`),this.attributes)for(const T of this.attributes)I.push(` ${T.name}="${(0,n.encodeToXmlString)(T.value)}"`);if(this.hasChildNodes()){I.push(">");for(const T of this.childNodes)T.dump(I);I.push(`</${this.nodeName}>`)}else this.nodeValue?I.push(`>${(0,n.encodeToXmlString)(this.nodeValue)}</${this.nodeName}>`):I.push("/>")}}P.SimpleDOMNode=o;class $ extends t{constructor({hasAttributes:I=!1,lowerCaseName:T=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=k.NoError,this._hasAttributes=I,this._lowerCaseName=T}parseFromString(I){if(this._currentFragment=[],this._stack=[],this._errorCode=k.NoError,this.parseXml(I),this._errorCode!==k.NoError)return;const[T]=this._currentFragment;if(T)return{documentElement:T}}onText(I){if(e(I))return;const T=new o("#text",I);this._currentFragment.push(T)}onCdata(I){const T=new o("#text",I);this._currentFragment.push(T)}onBeginElement(I,T,d){this._lowerCaseName&&(I=I.toLowerCase());const f=new o(I);f.childNodes=[],this._hasAttributes&&(f.attributes=T),this._currentFragment.push(f),!d&&(this._stack.push(this._currentFragment),this._currentFragment=f.childNodes)}onEndElement(I){this._currentFragment=this._stack.pop()||[];const T=this._currentFragment.at(-1);if(!T)return null;for(const d of T.childNodes)d.parentNode=T;return T}onError(I){this._errorCode=I}}P.SimpleXMLParser=$},(ke,P,ie)=>{var d,Ua,i,Qi,w,Ha,b,Xa;Object.defineProperty(P,"__esModule",{value:!0}),P.StructTreeRoot=P.StructTreePage=void 0;var n=ie(2),k=ie(4),R=ie(67),e=ie(73);const t=40,o={PAGE_CONTENT:1,STREAM_CONTENT:2,OBJECT:3,ANNOTATION:4,ELEMENT:5},_=class _{constructor(A,E){Ee(this,d);this.dict=A,this.ref=E instanceof k.Ref?E:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}addAnnotationIdToPage(A,E){Me(this,d,Ua).call(this,A,E,o.ANNOTATION)}readRoleMap(){const A=this.dict.get("RoleMap");A instanceof k.Dict&&A.forEach((E,l)=>{l instanceof k.Name&&this.roleMap.set(E,l.name)})}static async canCreateStructureTree({catalogRef:A,pdfManager:E,newAnnotationsByPage:l}){var s;if(!(A instanceof k.Ref))return(0,n.warn)("Cannot save the struct tree: no catalog reference."),!1;let g=0,N=!0;for(const[u,F]of l){const{ref:U}=await E.getPage(u);if(!(U instanceof k.Ref)){(0,n.warn)(`Cannot save the struct tree: page ${u} has no ref.`),N=!0;break}for(const O of F)(s=O.accessibilityData)!=null&&s.type&&(O.parentTreeId=g++,N=!1)}if(N){for(const u of l.values())for(const F of u)delete F.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:A,xref:E,catalogRef:l,pdfManager:g,newRefs:N}){const s=g.catalog.cloneDict(),u=E.getNewTemporaryRef();s.set("StructTreeRoot",u);const F=[];await(0,e.writeObject)(l,s,F,E),N.push({ref:l,data:F.join("")});const U=new k.Dict(E);U.set("Type",k.Name.get("StructTreeRoot"));const O=E.getNewTemporaryRef();U.set("ParentTree",O);const m=[];U.set("K",m);const x=new k.Dict(E),y=[];x.set("Nums",y);const r=await Me(this,i,Qi).call(this,{newAnnotationsByPage:A,structTreeRootRef:u,kids:m,nums:y,xref:E,pdfManager:g,newRefs:N,buffer:F});U.set("ParentTreeNextKey",r),F.length=0,await(0,e.writeObject)(O,x,F,E),N.push({ref:O,data:F.join("")}),F.length=0,await(0,e.writeObject)(u,U,F,E),N.push({ref:u,data:F.join("")})}async canUpdateStructTree({pdfManager:A,newAnnotationsByPage:E}){var F,U;if(!this.ref)return(0,n.warn)("Cannot update the struct tree: no root reference."),!1;let l=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(l)||l<0)return(0,n.warn)("Cannot update the struct tree: invalid next key."),!1;const g=this.dict.get("ParentTree");if(!(g instanceof k.Dict))return(0,n.warn)("Cannot update the struct tree: ParentTree isn't a dict."),!1;const N=g.get("Nums");if(!Array.isArray(N))return(0,n.warn)("Cannot update the struct tree: nums isn't an array."),!1;const{numPages:s}=A.catalog;for(const O of E.keys()){const{pageDict:m,ref:x}=await A.getPage(O);if(!(x instanceof k.Ref))return(0,n.warn)(`Cannot save the struct tree: page ${O} has no ref.`),!1;const y=m.get("StructParents");if(!Number.isInteger(y)||y<0||y>=s)return(0,n.warn)(`Cannot save the struct tree: page ${O} has no id.`),!1}let u=!0;for(const[O,m]of E){const{pageDict:x}=await A.getPage(O);Me(F=_,w,Ha).call(F,{elements:m,xref:this.dict.xref,pageDict:x,parentTree:g});for(const y of m)(U=y.accessibilityData)!=null&&U.type&&(y.parentTreeId=l++,u=!1)}if(u){for(const O of E.values())for(const m of O)delete m.parentTreeId,delete m.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:A,pdfManager:E,newRefs:l}){var p;const g=this.dict.xref,N=this.dict.clone(),s=this.ref;let u=N.getRaw("ParentTree"),F;u instanceof k.Ref?F=g.fetch(u):(F=u,u=g.getNewTemporaryRef(),N.set("ParentTree",u)),F=F.clone();let U=F.getRaw("Nums"),O=null;U instanceof k.Ref&&(O=U,U=g.fetch(O)),U=U.slice(),O||F.set("Nums",U);let m=N.getRaw("K"),x=null;m instanceof k.Ref?(x=m,m=g.fetch(x)):(x=g.getNewTemporaryRef(),N.set("K",x)),m=Array.isArray(m)?m.slice():[m];const y=[],r=await Me(p=_,i,Qi).call(p,{newAnnotationsByPage:A,structTreeRootRef:s,kids:m,nums:U,xref:g,pdfManager:E,newRefs:l,buffer:y});N.set("ParentTreeNextKey",r),y.length=0,await(0,e.writeObject)(x,m,y,g),l.push({ref:x,data:y.join("")}),O&&(y.length=0,await(0,e.writeObject)(O,U,y,g),l.push({ref:O,data:y.join("")})),y.length=0,await(0,e.writeObject)(u,F,y,g),l.push({ref:u,data:y.join("")}),y.length=0,await(0,e.writeObject)(s,N,y,g),l.push({ref:s,data:y.join("")})}};d=new WeakSet,Ua=function(A,E,l){if(!(A instanceof k.Ref)||E<0)return;this.structParentIds||(this.structParentIds=new k.RefSetCache);let g=this.structParentIds.get(A);g||(g=[],this.structParentIds.put(A,g)),g.push([E,l])},i=new WeakSet,Qi=async function({newAnnotationsByPage:A,structTreeRootRef:E,kids:l,nums:g,xref:N,pdfManager:s,newRefs:u,buffer:F}){const U=k.Name.get("OBJR");let O=-1/0;for(const[m,x]of A){const{ref:y}=await s.getPage(m);for(const{accessibilityData:{type:r,title:p,lang:c,alt:h,expanded:C,actualText:D},ref:X,parentTreeId:q,structTreeParent:re}of x){O=Math.max(O,q);const K=N.getNewTemporaryRef(),oe=new k.Dict(N);oe.set("S",k.Name.get(r)),p&&oe.set("T",p),c&&oe.set("Lang",c),h&&oe.set("Alt",h),C&&oe.set("E",C),D&&oe.set("ActualText",D),re?await Me(this,b,Xa).call(this,{structTreeParent:re,tagDict:oe,newTagRef:K,fallbackRef:E,xref:N,newRefs:u,buffer:F}):oe.set("P",E);const J=new k.Dict(N);oe.set("K",J),J.set("Type",U),J.set("Pg",y),J.set("Obj",X),F.length=0,await(0,e.writeObject)(K,oe,F,N),u.push({ref:K,data:F.join("")}),g.push(q,K),l.push(K)}}return O+1},w=new WeakSet,Ha=function({elements:A,xref:E,pageDict:l,parentTree:g}){const N=new Map;for(const O of A)if(O.structTreeParentId){const m=parseInt(O.structTreeParentId.split("_mc")[1],10);N.set(m,O)}const s=l.get("StructParents"),F=new R.NumberTree(g,E).get(s);if(!Array.isArray(F))return;const U=(O,m,x)=>{const y=N.get(O);if(y){const r=m.getRaw("P"),p=E.fetchIfRef(r);return r instanceof k.Ref&&p instanceof k.Dict&&(y.structTreeParent={ref:x,dict:m}),!0}return!1};for(const O of F){if(!(O instanceof k.Ref))continue;const m=E.fetch(O),x=m.get("K");if(Number.isInteger(x)){U(x,m,O);continue}if(Array.isArray(x)){for(let y of x)if(y=E.fetchIfRef(y),Number.isInteger(y)&&U(y,m,O))break}}},b=new WeakSet,Xa=async function({structTreeParent:{ref:A,dict:E},tagDict:l,newTagRef:g,fallbackRef:N,xref:s,newRefs:u,buffer:F}){const U=E.getRaw("P");let O=s.fetchIfRef(U);l.set("P",U);let m=!1,x,y=O.getRaw("K");if(y instanceof k.Ref?x=s.fetch(y):(x=y,y=s.getNewTemporaryRef(),O=O.clone(),O.set("K",y),m=!0),Array.isArray(x)){const r=x.indexOf(A);if(r>=0)x=x.slice(),x.splice(r+1,0,g);else{(0,n.warn)("Cannot update the struct tree: parent kid not found."),l.set("P",N);return}}else x instanceof k.Dict&&(x=[y,g],y=s.getNewTemporaryRef(),O.set("K",y),m=!0);F.length=0,await(0,e.writeObject)(y,x,F,s),u.push({ref:y,data:F.join("")}),m&&(F.length=0,await(0,e.writeObject)(U,O,F,s),u.push({ref:U,data:F.join("")}))},Ee(_,i),Ee(_,w),Ee(_,b);let $=_;P.StructTreeRoot=$;class L{constructor(A,E){this.tree=A,this.dict=E,this.kids=[],this.parseKids()}get role(){const A=this.dict.get("S"),E=A instanceof k.Name?A.name:"",{root:l}=this.tree;return l.roleMap.has(E)?l.roleMap.get(E):E}parseKids(){let A=null;const E=this.dict.getRaw("Pg");E instanceof k.Ref&&(A=E.toString());const l=this.dict.get("K");if(Array.isArray(l))for(const g of l){const N=this.parseKid(A,g);N&&this.kids.push(N)}else{const g=this.parseKid(A,l);g&&this.kids.push(g)}}parseKid(A,E){if(Number.isInteger(E))return this.tree.pageDict.objId!==A?null:new I({type:o.PAGE_CONTENT,mcid:E,pageObjId:A});let l=null;if(E instanceof k.Ref?l=this.dict.xref.fetch(E):E instanceof k.Dict&&(l=E),!l)return null;const g=l.getRaw("Pg");g instanceof k.Ref&&(A=g.toString());const N=l.get("Type")instanceof k.Name?l.get("Type").name:null;if(N==="MCR"){if(this.tree.pageDict.objId!==A)return null;const s=l.getRaw("Stm");return new I({type:o.STREAM_CONTENT,refObjId:s instanceof k.Ref?s.toString():null,pageObjId:A,mcid:l.get("MCID")})}if(N==="OBJR"){if(this.tree.pageDict.objId!==A)return null;const s=l.getRaw("Obj");return new I({type:o.OBJECT,refObjId:s instanceof k.Ref?s.toString():null,pageObjId:A})}return new I({type:o.ELEMENT,dict:l})}}class I{constructor({type:A,dict:E=null,mcid:l=null,pageObjId:g=null,refObjId:N=null}){this.type=A,this.dict=E,this.mcid=l,this.pageObjId=g,this.refObjId=N,this.parentNode=null}}class T{constructor(A,E){this.root=A,this.rootDict=A?A.dict:null,this.pageDict=E,this.nodes=[]}parse(A){var u,F;if(!this.root||!this.rootDict)return;const E=this.rootDict.get("ParentTree");if(!E)return;const l=this.pageDict.get("StructParents"),g=A instanceof k.Ref&&((u=this.root.structParentIds)==null?void 0:u.get(A));if(!Number.isInteger(l)&&!g)return;const N=new Map,s=new R.NumberTree(E,this.rootDict.xref);if(Number.isInteger(l)){const U=s.get(l);if(Array.isArray(U))for(const O of U)O instanceof k.Ref&&this.addNode(this.rootDict.xref.fetch(O),N)}if(g)for(const[U,O]of g){const m=s.get(U);if(m){const x=this.addNode(this.rootDict.xref.fetchIfRef(m),N);((F=x==null?void 0:x.kids)==null?void 0:F.length)===1&&x.kids[0].type===o.OBJECT&&(x.kids[0].type=O)}}}addNode(A,E,l=0){if(l>t)return(0,n.warn)("StructTree MAX_DEPTH reached."),null;if(E.has(A))return E.get(A);const g=new L(this,A);E.set(A,g);const N=A.get("P");if(!N||(0,k.isName)(N.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(A,g)||E.delete(A),g;const s=this.addNode(N,E,l+1);if(!s)return g;let u=!1;for(const F of s.kids)F.type===o.ELEMENT&&F.dict===A&&(F.parentNode=g,u=!0);return u||E.delete(A),g}addTopLevelNode(A,E){const l=this.rootDict.get("K");if(!l)return!1;if(l instanceof k.Dict)return l.objId!==A.objId?!1:(this.nodes[0]=E,!0);if(!Array.isArray(l))return!0;let g=!1;for(let N=0;N<l.length;N++){const s=l[N];(s==null?void 0:s.toString())===A.objId&&(this.nodes[N]=E,g=!0)}return g}get serializable(){function A(l,g,N=0){if(N>t){(0,n.warn)("StructTree too deep to be fully serialized.");return}const s=Object.create(null);s.role=l.role,s.children=[],g.children.push(s);const u=l.dict.get("Alt");typeof u=="string"&&(s.alt=(0,n.stringToPDFString)(u));const F=l.dict.get("Lang");typeof F=="string"&&(s.lang=(0,n.stringToPDFString)(F));for(const U of l.kids){const O=U.type===o.ELEMENT?U.parentNode:null;if(O){A(O,s,N+1);continue}else U.type===o.PAGE_CONTENT||U.type===o.STREAM_CONTENT?s.children.push({type:"content",id:`p${U.pageObjId}_mc${U.mcid}`}):U.type===o.OBJECT?s.children.push({type:"object",id:U.refObjId}):U.type===o.ANNOTATION&&s.children.push({type:"annotation",id:`${n.AnnotationPrefix}${U.refObjId}`})}}const E=Object.create(null);E.children=[],E.role="Root";for(const l of this.nodes)l&&A(l,E);return E}}P.StructTreePage=T},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.incrementalUpdate=M,P.writeDict=L,P.writeObject=$;var n=ie(2),k=ie(4),R=ie(3),e=ie(71),t=ie(5),o=ie(74);async function $(_,H,A,{encrypt:E=null}){const l=E==null?void 0:E.createCipherTransform(_.num,_.gen);A.push(`${_.num} ${_.gen} obj
`),H instanceof k.Dict?await L(H,A,l):H instanceof t.BaseStream?await I(H,A,l):Array.isArray(H)&&await T(H,A,l),A.push(`
endobj
`)}async function L(_,H,A){H.push("<<");for(const E of _.getKeys())H.push(` /${(0,R.escapePDFName)(E)} `),await d(_.getRaw(E),H,A);H.push(">>")}async function I(_,H,A){let E=_.getString();const{dict:l}=_,[g,N]=await Promise.all([l.getAsync("Filter"),l.getAsync("DecodeParms")]),s=Array.isArray(g)?await l.xref.fetchIfRefAsync(g[0]):g,u=(0,k.isName)(s,"FlateDecode"),F=256;if(typeof CompressionStream<"u"&&(E.length>=F||u))try{const U=(0,n.stringToBytes)(E),O=new CompressionStream("deflate"),m=O.writable.getWriter();m.write(U),m.close();const x=await new Response(O.readable).arrayBuffer();E=(0,n.bytesToString)(new Uint8Array(x));let y,r;g?u||(y=Array.isArray(g)?[k.Name.get("FlateDecode"),...g]:[k.Name.get("FlateDecode"),g],N&&(r=Array.isArray(N)?[null,...N]:[null,N])):y=k.Name.get("FlateDecode"),y&&l.set("Filter",y),r&&l.set("DecodeParms",r)}catch(U){(0,n.info)(`writeStream - cannot compress data: "${U}".`)}A&&(E=A.encryptString(E)),l.set("Length",E.length),await L(l,H,A),H.push(` stream
`,E,`
endstream`)}async function T(_,H,A){H.push("[");let E=!0;for(const l of _)E?E=!1:H.push(" "),await d(l,H,A);H.push("]")}async function d(_,H,A){_ instanceof k.Name?H.push(`/${(0,R.escapePDFName)(_.name)}`):_ instanceof k.Ref?H.push(`${_.num} ${_.gen} R`):Array.isArray(_)?await T(_,H,A):typeof _=="string"?(A&&(_=A.encryptString(_)),H.push(`(${(0,R.escapeString)(_)})`)):typeof _=="number"?H.push((0,R.numberToString)(_)):typeof _=="boolean"?H.push(_.toString()):_ instanceof k.Dict?await L(_,H,A):_ instanceof t.BaseStream?await I(_,H,A):_===null?H.push("null"):(0,n.warn)(`Unhandled value in writer: ${typeof _}, please file a bug.`)}function f(_,H,A,E){for(let l=H+A-1;l>A-1;l--)E[l]=_&255,_>>=8;return A+H}function i(_,H,A){for(let E=0,l=_.length;E<l;E++)A[H+E]=_.charCodeAt(E)&255}function S(_,H){const A=Math.floor(Date.now()/1e3),E=H.filename||"",l=[A.toString(),E,_.toString()];let g=l.reduce((u,F)=>u+F.length,0);for(const u of Object.values(H.info))l.push(u),g+=u.length;const N=new Uint8Array(g);let s=0;for(const u of l)i(u,s,N),s+=u.length;return(0,n.bytesToString)((0,o.calculateMD5)(N))}function w(_,H){const A=new e.SimpleXMLParser({hasAttributes:!0}).parseFromString(_);for(const{xfa:l}of H){if(!l)continue;const{path:g,value:N}=l;if(!g)continue;const s=(0,R.parseXFAPath)(g);let u=A.documentElement.searchNode(s,0);!u&&s.length>1&&(u=A.documentElement.searchNode([s.at(-1)],0)),u?u.childNodes=Array.isArray(N)?N.map(F=>new e.SimpleDOMNode("value",F)):[new e.SimpleDOMNode("#text",N)]:(0,n.warn)(`Node not found for path: ${g}`)}const E=[];return A.documentElement.dump(E),E.join("")}async function v({xref:_,acroForm:H,acroFormRef:A,hasXfa:E,hasXfaDatasetsEntry:l,xfaDatasetsRef:g,needAppearances:N,newRefs:s}){if(E&&!l&&!g&&(0,n.warn)("XFA - Cannot save it"),!N&&(!E||!g||l))return;const u=H.clone();if(E&&!l){const U=H.get("XFA").slice();U.splice(2,0,"datasets"),U.splice(3,0,g),u.set("XFA",U)}N&&u.set("NeedAppearances",!0);const F=[];await $(A,u,F,_),s.push({ref:A,data:F.join("")})}function b({xfaData:_,xfaDatasetsRef:H,newRefs:A,xref:E}){if(_===null){const N=E.fetchIfRef(H);_=w(N.getString(),A)}const l=E.encrypt;l&&(_=l.createCipherTransform(H.num,H.gen).encryptString(_));const g=`${H.num} ${H.gen} obj
<< /Type /EmbeddedFile /Length ${_.length}>>
stream
`+_+`
endstream
endobj
`;A.push({ref:H,data:g})}async function M({originalData:_,xrefInfo:H,newRefs:A,xref:E=null,hasXfa:l=!1,xfaDatasetsRef:g=null,hasXfaDatasetsEntry:N=!1,needAppearances:s,acroFormRef:u=null,acroForm:F=null,xfaData:U=null}){await v({xref:E,acroForm:F,acroFormRef:u,hasXfa:l,hasXfaDatasetsEntry:N,xfaDatasetsRef:g,needAppearances:s,newRefs:A}),l&&b({xfaData:U,xfaDatasetsRef:g,newRefs:A,xref:E});const O=new k.Dict(null),m=H.newRef;let x,y;const r=_.at(-1);r===10||r===13?(x=[],y=_.length):(x=[`
`],y=_.length+1),O.set("Size",m.num+1),O.set("Prev",H.startXRef),O.set("Type",k.Name.get("XRef")),H.rootRef!==null&&O.set("Root",H.rootRef),H.infoRef!==null&&O.set("Info",H.infoRef),H.encryptRef!==null&&O.set("Encrypt",H.encryptRef),A.push({ref:m,data:""}),A=A.sort((te,B)=>te.ref.num-B.ref.num);const p=[[0,1,65535]],c=[0,1];let h=0;for(const{ref:te,data:B}of A)h=Math.max(h,y),p.push([1,y,Math.min(te.gen,65535)]),y+=B.length,c.push(te.num,1),x.push(B);if(O.set("Index",c),Array.isArray(H.fileIds)&&H.fileIds.length>0){const te=S(y,H);O.set("ID",[H.fileIds[0],te])}const D=[1,Math.ceil(Math.log2(h)/8),2],q=(D[0]+D[1]+D[2])*p.length;O.set("W",D),O.set("Length",q),x.push(`${m.num} ${m.gen} obj
`),await L(O,x,null),x.push(` stream
`);const re=x.reduce((te,B)=>te+B.length,0),K=`
endstream
endobj
startxref
${y}
%%EOF
`,oe=new Uint8Array(_.length+re+q+K.length);oe.set(_);let J=_.length;for(const te of x)i(te,J,oe),J+=te.length;for(const[te,B,j]of p)J=f(te,D[0],J,oe),J=f(B,D[1],J,oe),J=f(j,D[2],J,oe);return i(K,J,oe),oe}},(ke,P,ie)=>{var M,_,za,A,ea,l,Ga,N,Kn,u,ta;Object.defineProperty(P,"__esModule",{value:!0}),P.calculateSHA256=P.calculateMD5=P.PDF20=P.PDF17=P.CipherTransformFactory=P.ARCFourCipher=P.AES256Cipher=P.AES128Cipher=void 0,P.calculateSHA384=I,P.calculateSHA512=void 0;var n=ie(2),k=ie(4),R=ie(75);class e{constructor(m){this.a=0,this.b=0;const x=new Uint8Array(256),y=m.length;for(let r=0;r<256;++r)x[r]=r;for(let r=0,p=0;r<256;++r){const c=x[r];p=p+c+m[r%y]&255,x[r]=x[p],x[p]=c}this.s=x}encryptBlock(m){let x=this.a,y=this.b;const r=this.s,p=m.length,c=new Uint8Array(p);for(let h=0;h<p;++h){x=x+1&255;const C=r[x];y=y+C&255;const D=r[y];r[x]=D,r[y]=C,c[h]=m[h]^r[C+D&255]}return this.a=x,this.b=y,c}decryptBlock(m){return this.encryptBlock(m)}encrypt(m){return this.encryptBlock(m)}}P.ARCFourCipher=e;const t=function(){const m=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),x=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);function y(r,p,c){let h=1732584193,C=-271733879,D=-1732584194,X=271733878;const q=c+72&-64,re=new Uint8Array(q);let K,oe;for(K=0;K<c;++K)re[K]=r[p++];re[K++]=128;const J=q-8;for(;K<J;)re[K++]=0;re[K++]=c<<3&255,re[K++]=c>>5&255,re[K++]=c>>13&255,re[K++]=c>>21&255,re[K++]=c>>>29&255,re[K++]=0,re[K++]=0,re[K++]=0;const te=new Int32Array(16);for(K=0;K<q;){for(oe=0;oe<16;++oe,K+=4)te[oe]=re[K]|re[K+1]<<8|re[K+2]<<16|re[K+3]<<24;let B=h,j=C,Y=D,W=X,G,Q;for(oe=0;oe<64;++oe){oe<16?(G=j&Y|~j&W,Q=oe):oe<32?(G=W&j|~W&Y,Q=5*oe+1&15):oe<48?(G=j^Y^W,Q=3*oe+5&15):(G=Y^(j|~W),Q=7*oe&15);const ee=W,z=B+G+x[oe]+te[Q]|0,se=m[oe];W=Y,Y=j,j=j+(z<<se|z>>>32-se)|0,B=ee}h=h+B|0,C=C+j|0,D=D+Y|0,X=X+W|0}return new Uint8Array([h&255,h>>8&255,h>>16&255,h>>>24&255,C&255,C>>8&255,C>>16&255,C>>>24&255,D&255,D>>8&255,D>>16&255,D>>>24&255,X&255,X>>8&255,X>>16&255,X>>>24&255])}return y}();P.calculateMD5=t;class o{constructor(m,x){this.high=m|0,this.low=x|0}and(m){this.high&=m.high,this.low&=m.low}xor(m){this.high^=m.high,this.low^=m.low}or(m){this.high|=m.high,this.low|=m.low}shiftRight(m){m>=32?(this.low=this.high>>>m-32|0,this.high=0):(this.low=this.low>>>m|this.high<<32-m,this.high=this.high>>>m|0)}shiftLeft(m){m>=32?(this.high=this.low<<m-32,this.low=0):(this.high=this.high<<m|this.low>>>32-m,this.low<<=m)}rotateRight(m){let x,y;m&32?(y=this.low,x=this.high):(x=this.low,y=this.high),m&=31,this.low=x>>>m|y<<32-m,this.high=y>>>m|x<<32-m}not(){this.high=~this.high,this.low=~this.low}add(m){const x=(this.low>>>0)+(m.low>>>0);let y=(this.high>>>0)+(m.high>>>0);x>4294967295&&(y+=1),this.low=x|0,this.high=y|0}copyTo(m,x){m[x]=this.high>>>24&255,m[x+1]=this.high>>16&255,m[x+2]=this.high>>8&255,m[x+3]=this.high&255,m[x+4]=this.low>>>24&255,m[x+5]=this.low>>16&255,m[x+6]=this.low>>8&255,m[x+7]=this.low&255}assign(m){this.high=m.high,this.low=m.low}}const $=function(){function m(X,q){return X>>>q|X<<32-q}function x(X,q,re){return X&q^~X&re}function y(X,q,re){return X&q^X&re^q&re}function r(X){return m(X,2)^m(X,13)^m(X,22)}function p(X){return m(X,6)^m(X,11)^m(X,25)}function c(X){return m(X,7)^m(X,18)^X>>>3}function h(X){return m(X,17)^m(X,19)^X>>>10}const C=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function D(X,q,re){let K=1779033703,oe=3144134277,J=1013904242,te=2773480762,B=1359893119,j=2600822924,Y=528734635,W=1541459225;const G=Math.ceil((re+9)/64)*64,Q=new Uint8Array(G);let ee,z;for(ee=0;ee<re;++ee)Q[ee]=X[q++];Q[ee++]=128;const se=G-8;for(;ee<se;)Q[ee++]=0;Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=re>>>29&255,Q[ee++]=re>>21&255,Q[ee++]=re>>13&255,Q[ee++]=re>>5&255,Q[ee++]=re<<3&255;const ne=new Uint32Array(64);for(ee=0;ee<G;){for(z=0;z<16;++z)ne[z]=Q[ee]<<24|Q[ee+1]<<16|Q[ee+2]<<8|Q[ee+3],ee+=4;for(z=16;z<64;++z)ne[z]=h(ne[z-2])+ne[z-7]+c(ne[z-15])+ne[z-16]|0;let V=K,ae=oe,ce=J,de=te,Ae=B,ve=j,pe=Y,ge=W,fe,xe;for(z=0;z<64;++z)fe=ge+p(Ae)+x(Ae,ve,pe)+C[z]+ne[z],xe=r(V)+y(V,ae,ce),ge=pe,pe=ve,ve=Ae,Ae=de+fe|0,de=ce,ce=ae,ae=V,V=fe+xe|0;K=K+V|0,oe=oe+ae|0,J=J+ce|0,te=te+de|0,B=B+Ae|0,j=j+ve|0,Y=Y+pe|0,W=W+ge|0}return new Uint8Array([K>>24&255,K>>16&255,K>>8&255,K&255,oe>>24&255,oe>>16&255,oe>>8&255,oe&255,J>>24&255,J>>16&255,J>>8&255,J&255,te>>24&255,te>>16&255,te>>8&255,te&255,B>>24&255,B>>16&255,B>>8&255,B&255,j>>24&255,j>>16&255,j>>8&255,j&255,Y>>24&255,Y>>16&255,Y>>8&255,Y&255,W>>24&255,W>>16&255,W>>8&255,W&255])}return D}();P.calculateSHA256=$;const L=function(){function m(D,X,q,re,K){D.assign(X),D.and(q),K.assign(X),K.not(),K.and(re),D.xor(K)}function x(D,X,q,re,K){D.assign(X),D.and(q),K.assign(X),K.and(re),D.xor(K),K.assign(q),K.and(re),D.xor(K)}function y(D,X,q){D.assign(X),D.rotateRight(28),q.assign(X),q.rotateRight(34),D.xor(q),q.assign(X),q.rotateRight(39),D.xor(q)}function r(D,X,q){D.assign(X),D.rotateRight(14),q.assign(X),q.rotateRight(18),D.xor(q),q.assign(X),q.rotateRight(41),D.xor(q)}function p(D,X,q){D.assign(X),D.rotateRight(1),q.assign(X),q.rotateRight(8),D.xor(q),q.assign(X),q.shiftRight(7),D.xor(q)}function c(D,X,q){D.assign(X),D.rotateRight(19),q.assign(X),q.rotateRight(61),D.xor(q),q.assign(X),q.shiftRight(6),D.xor(q)}const h=[new o(1116352408,3609767458),new o(1899447441,602891725),new o(3049323471,3964484399),new o(3921009573,2173295548),new o(961987163,4081628472),new o(1508970993,3053834265),new o(2453635748,2937671579),new o(2870763221,3664609560),new o(3624381080,2734883394),new o(310598401,1164996542),new o(607225278,1323610764),new o(1426881987,3590304994),new o(1925078388,4068182383),new o(2162078206,991336113),new o(2614888103,633803317),new o(3248222580,3479774868),new o(3835390401,2666613458),new o(4022224774,944711139),new o(264347078,2341262773),new o(604807628,2007800933),new o(770255983,1495990901),new o(1249150122,1856431235),new o(1555081692,3175218132),new o(1996064986,2198950837),new o(2554220882,3999719339),new o(2821834349,766784016),new o(2952996808,2566594879),new o(3210313671,3203337956),new o(3336571891,1034457026),new o(3584528711,2466948901),new o(113926993,3758326383),new o(338241895,168717936),new o(666307205,1188179964),new o(773529912,1546045734),new o(1294757372,1522805485),new o(1396182291,2643833823),new o(1695183700,2343527390),new o(1986661051,1014477480),new o(2177026350,1206759142),new o(2456956037,344077627),new o(2730485921,1290863460),new o(2820302411,3158454273),new o(3259730800,3505952657),new o(3345764771,106217008),new o(3516065817,3606008344),new o(3600352804,1432725776),new o(4094571909,1467031594),new o(275423344,851169720),new o(430227734,3100823752),new o(506948616,1363258195),new o(659060556,3750685593),new o(883997877,3785050280),new o(958139571,3318307427),new o(1322822218,3812723403),new o(1537002063,2003034995),new o(1747873779,3602036899),new o(1955562222,1575990012),new o(2024104815,1125592928),new o(2227730452,2716904306),new o(2361852424,442776044),new o(2428436474,593698344),new o(2756734187,3733110249),new o(3204031479,2999351573),new o(3329325298,3815920427),new o(3391569614,3928383900),new o(3515267271,566280711),new o(3940187606,3454069534),new o(4118630271,4000239992),new o(116418474,1914138554),new o(174292421,2731055270),new o(289380356,3203993006),new o(460393269,320620315),new o(685471733,587496836),new o(852142971,1086792851),new o(1017036298,365543100),new o(1126000580,2618297676),new o(1288033470,3409855158),new o(1501505948,4234509866),new o(1607167915,987167468),new o(1816402316,1246189591)];function C(D,X,q,re=!1){let K,oe,J,te,B,j,Y,W;re?(K=new o(3418070365,3238371032),oe=new o(1654270250,914150663),J=new o(2438529370,812702999),te=new o(355462360,4144912697),B=new o(1731405415,4290775857),j=new o(2394180231,1750603025),Y=new o(3675008525,1694076839),W=new o(1203062813,3204075428)):(K=new o(1779033703,4089235720),oe=new o(3144134277,2227873595),J=new o(1013904242,4271175723),te=new o(2773480762,1595750129),B=new o(1359893119,2917565137),j=new o(2600822924,725511199),Y=new o(528734635,4215389547),W=new o(1541459225,327033209));const G=Math.ceil((q+17)/128)*128,Q=new Uint8Array(G);let ee,z;for(ee=0;ee<q;++ee)Q[ee]=D[X++];Q[ee++]=128;const se=G-16;for(;ee<se;)Q[ee++]=0;Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=0,Q[ee++]=q>>>29&255,Q[ee++]=q>>21&255,Q[ee++]=q>>13&255,Q[ee++]=q>>5&255,Q[ee++]=q<<3&255;const ne=new Array(80);for(ee=0;ee<80;ee++)ne[ee]=new o(0,0);let V=new o(0,0),ae=new o(0,0),ce=new o(0,0),de=new o(0,0),Ae=new o(0,0),ve=new o(0,0),pe=new o(0,0),ge=new o(0,0);const fe=new o(0,0),xe=new o(0,0),Te=new o(0,0),Le=new o(0,0);let Ie;for(ee=0;ee<G;){for(z=0;z<16;++z)ne[z].high=Q[ee]<<24|Q[ee+1]<<16|Q[ee+2]<<8|Q[ee+3],ne[z].low=Q[ee+4]<<24|Q[ee+5]<<16|Q[ee+6]<<8|Q[ee+7],ee+=8;for(z=16;z<80;++z)Ie=ne[z],c(Ie,ne[z-2],Le),Ie.add(ne[z-7]),p(Te,ne[z-15],Le),Ie.add(Te),Ie.add(ne[z-16]);for(V.assign(K),ae.assign(oe),ce.assign(J),de.assign(te),Ae.assign(B),ve.assign(j),pe.assign(Y),ge.assign(W),z=0;z<80;++z)fe.assign(ge),r(Te,Ae,Le),fe.add(Te),m(Te,Ae,ve,pe,Le),fe.add(Te),fe.add(h[z]),fe.add(ne[z]),y(xe,V,Le),x(Te,V,ae,ce,Le),xe.add(Te),Ie=ge,ge=pe,pe=ve,ve=Ae,de.add(fe),Ae=de,de=ce,ce=ae,ae=V,Ie.assign(fe),Ie.add(xe),V=Ie;K.add(V),oe.add(ae),J.add(ce),te.add(de),B.add(Ae),j.add(ve),Y.add(pe),W.add(ge)}let ue;return re?(ue=new Uint8Array(48),K.copyTo(ue,0),oe.copyTo(ue,8),J.copyTo(ue,16),te.copyTo(ue,24),B.copyTo(ue,32),j.copyTo(ue,40)):(ue=new Uint8Array(64),K.copyTo(ue,0),oe.copyTo(ue,8),J.copyTo(ue,16),te.copyTo(ue,24),B.copyTo(ue,32),j.copyTo(ue,40),Y.copyTo(ue,48),W.copyTo(ue,56)),ue}return C}();P.calculateSHA512=L;function I(O,m,x){return L(O,m,x,!0)}class T{decryptBlock(m){return m}encrypt(m){return m}}class d{constructor(){this.constructor===d&&(0,n.unreachable)("Cannot initialize AESBaseCipher."),this._s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),this._inv_s=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),this._mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]),this._mixCol=new Uint8Array(256);for(let m=0;m<256;m++)this._mixCol[m]=m<128?m<<1:m<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(m){(0,n.unreachable)("Cannot call `_expandKey` on the base class")}_decrypt(m,x){let y,r,p;const c=new Uint8Array(16);c.set(m);for(let h=0,C=this._keySize;h<16;++h,++C)c[h]^=x[C];for(let h=this._cyclesOfRepetition-1;h>=1;--h){y=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=y,y=c[14],r=c[10],c[14]=c[6],c[10]=c[2],c[6]=y,c[2]=r,y=c[15],r=c[11],p=c[7],c[15]=c[3],c[11]=y,c[7]=r,c[3]=p;for(let C=0;C<16;++C)c[C]=this._inv_s[c[C]];for(let C=0,D=h*16;C<16;++C,++D)c[C]^=x[D];for(let C=0;C<16;C+=4){const D=this._mix[c[C]],X=this._mix[c[C+1]],q=this._mix[c[C+2]],re=this._mix[c[C+3]];y=D^X>>>8^X<<24^q>>>16^q<<16^re>>>24^re<<8,c[C]=y>>>24&255,c[C+1]=y>>16&255,c[C+2]=y>>8&255,c[C+3]=y&255}}y=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=y,y=c[14],r=c[10],c[14]=c[6],c[10]=c[2],c[6]=y,c[2]=r,y=c[15],r=c[11],p=c[7],c[15]=c[3],c[11]=y,c[7]=r,c[3]=p;for(let h=0;h<16;++h)c[h]=this._inv_s[c[h]],c[h]^=x[h];return c}_encrypt(m,x){const y=this._s;let r,p,c;const h=new Uint8Array(16);h.set(m);for(let C=0;C<16;++C)h[C]^=x[C];for(let C=1;C<this._cyclesOfRepetition;C++){for(let D=0;D<16;++D)h[D]=y[h[D]];c=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=c,c=h[2],p=h[6],h[2]=h[10],h[6]=h[14],h[10]=c,h[14]=p,c=h[3],p=h[7],r=h[11],h[3]=h[15],h[7]=c,h[11]=p,h[15]=r;for(let D=0;D<16;D+=4){const X=h[D+0],q=h[D+1],re=h[D+2],K=h[D+3];r=X^q^re^K,h[D+0]^=r^this._mixCol[X^q],h[D+1]^=r^this._mixCol[q^re],h[D+2]^=r^this._mixCol[re^K],h[D+3]^=r^this._mixCol[K^X]}for(let D=0,X=C*16;D<16;++D,++X)h[D]^=x[X]}for(let C=0;C<16;++C)h[C]=y[h[C]];c=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=c,c=h[2],p=h[6],h[2]=h[10],h[6]=h[14],h[10]=c,h[14]=p,c=h[3],p=h[7],r=h[11],h[3]=h[15],h[7]=c,h[11]=p,h[15]=r;for(let C=0,D=this._keySize;C<16;++C,++D)h[C]^=x[D];return h}_decryptBlock2(m,x){const y=m.length;let r=this.buffer,p=this.bufferPosition;const c=[];let h=this.iv;for(let X=0;X<y;++X){if(r[p]=m[X],++p,p<16)continue;const q=this._decrypt(r,this._key);for(let re=0;re<16;++re)q[re]^=h[re];h=r,c.push(q),r=new Uint8Array(16),p=0}if(this.buffer=r,this.bufferLength=p,this.iv=h,c.length===0)return new Uint8Array(0);let C=16*c.length;if(x){const X=c.at(-1);let q=X[15];if(q<=16){for(let re=15,K=16-q;re>=K;--re)if(X[re]!==q){q=0;break}C-=q,c[c.length-1]=X.subarray(0,16-q)}}const D=new Uint8Array(C);for(let X=0,q=0,re=c.length;X<re;++X,q+=16)D.set(c[X],q);return D}decryptBlock(m,x,y=null){const r=m.length,p=this.buffer;let c=this.bufferPosition;if(y)this.iv=y;else{for(let h=0;c<16&&h<r;++h,++c)p[c]=m[h];if(c<16)return this.bufferLength=c,new Uint8Array(0);this.iv=p,m=m.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(m,x)}encrypt(m,x){const y=m.length;let r=this.buffer,p=this.bufferPosition;const c=[];x||(x=new Uint8Array(16));for(let D=0;D<y;++D){if(r[p]=m[D],++p,p<16)continue;for(let q=0;q<16;++q)r[q]^=x[q];const X=this._encrypt(r,this._key);x=X,c.push(X),r=new Uint8Array(16),p=0}if(this.buffer=r,this.bufferLength=p,this.iv=x,c.length===0)return new Uint8Array(0);const h=16*c.length,C=new Uint8Array(h);for(let D=0,X=0,q=c.length;D<q;++D,X+=16)C.set(c[D],X);return C}}class f extends d{constructor(m){super(),this._cyclesOfRepetition=10,this._keySize=160,this._rcon=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),this._key=this._expandKey(m)}_expandKey(m){const y=this._s,r=this._rcon,p=new Uint8Array(176);p.set(m);for(let c=16,h=1;c<176;++h){let C=p[c-3],D=p[c-2],X=p[c-1],q=p[c-4];C=y[C],D=y[D],X=y[X],q=y[q],C^=r[h];for(let re=0;re<4;++re)p[c]=C^=p[c-16],c++,p[c]=D^=p[c-16],c++,p[c]=X^=p[c-16],c++,p[c]=q^=p[c-16],c++}return p}}P.AES128Cipher=f;class i extends d{constructor(m){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(m)}_expandKey(m){const y=this._s,r=new Uint8Array(240);r.set(m);let p=1,c,h,C,D;for(let X=32,q=1;X<240;++q){X%32===16?(c=y[c],h=y[h],C=y[C],D=y[D]):X%32===0&&(c=r[X-3],h=r[X-2],C=r[X-1],D=r[X-4],c=y[c],h=y[h],C=y[C],D=y[D],c^=p,(p<<=1)>=256&&(p=(p^27)&255));for(let re=0;re<4;++re)r[X]=c^=r[X-32],X++,r[X]=h^=r[X-32],X++,r[X]=C^=r[X-32],X++,r[X]=D^=r[X-32],X++}return r}}P.AES256Cipher=i;class S{checkOwnerPassword(m,x,y,r){const p=new Uint8Array(m.length+56);p.set(m,0),p.set(x,m.length),p.set(y,m.length+x.length);const c=$(p,0,p.length);return(0,n.isArrayEqual)(c,r)}checkUserPassword(m,x,y){const r=new Uint8Array(m.length+8);r.set(m,0),r.set(x,m.length);const p=$(r,0,r.length);return(0,n.isArrayEqual)(p,y)}getOwnerKey(m,x,y,r){const p=new Uint8Array(m.length+56);p.set(m,0),p.set(x,m.length),p.set(y,m.length+x.length);const c=$(p,0,p.length);return new i(c).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(m,x,y){const r=new Uint8Array(m.length+8);r.set(m,0),r.set(x,m.length);const p=$(r,0,r.length);return new i(p).decryptBlock(y,!1,new Uint8Array(16))}}P.PDF17=S;class w{_hash(m,x,y){let r=$(x,0,x.length).subarray(0,32),p=[0],c=0;for(;c<64||p.at(-1)>c-32;){const h=m.length+r.length+y.length,C=new Uint8Array(h);let D=0;C.set(m,D),D+=m.length,C.set(r,D),D+=r.length,C.set(y,D);const X=new Uint8Array(h*64);for(let K=0,oe=0;K<64;K++,oe+=h)X.set(C,oe);p=new f(r.subarray(0,16)).encrypt(X,r.subarray(16,32));const re=p.slice(0,16).reduce((K,oe)=>K+oe,0)%3;re===0?r=$(p,0,p.length):re===1?r=I(p,0,p.length):re===2&&(r=L(p,0,p.length)),c++}return r.subarray(0,32)}checkOwnerPassword(m,x,y,r){const p=new Uint8Array(m.length+56);p.set(m,0),p.set(x,m.length),p.set(y,m.length+x.length);const c=this._hash(m,p,y);return(0,n.isArrayEqual)(c,r)}checkUserPassword(m,x,y){const r=new Uint8Array(m.length+8);r.set(m,0),r.set(x,m.length);const p=this._hash(m,r,[]);return(0,n.isArrayEqual)(p,y)}getOwnerKey(m,x,y,r){const p=new Uint8Array(m.length+56);p.set(m,0),p.set(x,m.length),p.set(y,m.length+x.length);const c=this._hash(m,p,y);return new i(c).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(m,x,y){const r=new Uint8Array(m.length+8);r.set(m,0),r.set(x,m.length);const p=this._hash(m,r,[]);return new i(p).decryptBlock(y,!1,new Uint8Array(16))}}P.PDF20=w;class v{constructor(m,x){this.StringCipherConstructor=m,this.StreamCipherConstructor=x}createStream(m,x){const y=new this.StreamCipherConstructor;return new R.DecryptStream(m,x,function(p,c){return y.decryptBlock(p,c)})}decryptString(m){const x=new this.StringCipherConstructor;let y=(0,n.stringToBytes)(m);return y=x.decryptBlock(y,!0),(0,n.bytesToString)(y)}encryptString(m){const x=new this.StringCipherConstructor;if(x instanceof d){const p=16-m.length%16;m+=String.fromCharCode(p).repeat(p);const c=new Uint8Array(16);if(typeof crypto<"u")crypto.getRandomValues(c);else for(let D=0;D<16;D++)c[D]=Math.floor(256*Math.random());let h=(0,n.stringToBytes)(m);h=x.encrypt(h,c);const C=new Uint8Array(16+h.length);return C.set(c),C.set(h,16),(0,n.bytesToString)(C)}let y=(0,n.stringToBytes)(m);return y=x.encrypt(y),(0,n.bytesToString)(y)}}const U=class U{constructor(m,x,y){Ee(this,_);Ee(this,A);Ee(this,l);Ee(this,N);Ee(this,u);const r=m.get("Filter");if(!(0,k.isName)(r,"Standard"))throw new n.FormatError("unknown encryption method");this.filterName=r.name,this.dict=m;const p=m.get("V");if(!Number.isInteger(p)||p!==1&&p!==2&&p!==4&&p!==5)throw new n.FormatError("unsupported encryption algorithm");this.algorithm=p;let c=m.get("Length");if(!c)if(p<=3)c=40;else{const B=m.get("CF"),j=m.get("StmF");if(B instanceof k.Dict&&j instanceof k.Name){B.suppressEncryption=!0;const Y=B.get(j.name);c=(Y==null?void 0:Y.get("Length"))||128,c<40&&(c<<=3)}}if(!Number.isInteger(c)||c<40||c%8!==0)throw new n.FormatError("invalid key length");const h=(0,n.stringToBytes)(m.get("O")),C=(0,n.stringToBytes)(m.get("U")),D=h.subarray(0,32),X=C.subarray(0,32),q=m.get("P"),re=m.get("R"),K=(p===4||p===5)&&m.get("EncryptMetadata")!==!1;this.encryptMetadata=K;const oe=(0,n.stringToBytes)(x);let J;if(y){if(re===6)try{y=(0,n.utf8StringToString)(y)}catch{(0,n.warn)("CipherTransformFactory: Unable to convert UTF8 encoded password.")}J=(0,n.stringToBytes)(y)}let te;if(p!==5)te=Me(this,A,ea).call(this,oe,J,D,X,q,re,c,K);else{const B=h.subarray(32,40),j=h.subarray(40,48),Y=C.subarray(0,48),W=C.subarray(32,40),G=C.subarray(40,48),Q=(0,n.stringToBytes)(m.get("OE")),ee=(0,n.stringToBytes)(m.get("UE")),z=(0,n.stringToBytes)(m.get("Perms"));te=Me(this,_,za).call(this,re,J,D,B,j,Y,X,W,G,Q,ee,z)}if(!te&&!y)throw new n.PasswordException("No password given",n.PasswordResponses.NEED_PASSWORD);if(!te&&y){const B=Me(this,l,Ga).call(this,J,D,re,c);te=Me(this,A,ea).call(this,oe,B,D,X,q,re,c,K)}if(!te)throw new n.PasswordException("Incorrect Password",n.PasswordResponses.INCORRECT_PASSWORD);if(this.encryptionKey=te,p>=4){const B=m.get("CF");B instanceof k.Dict&&(B.suppressEncryption=!0),this.cf=B,this.stmf=m.get("StmF")||k.Name.get("Identity"),this.strf=m.get("StrF")||k.Name.get("Identity"),this.eff=m.get("EFF")||this.stmf}}createCipherTransform(m,x){if(this.algorithm===4||this.algorithm===5)return new v(Me(this,u,ta).call(this,this.cf,this.strf,m,x,this.encryptionKey),Me(this,u,ta).call(this,this.cf,this.stmf,m,x,this.encryptionKey));const y=Me(this,N,Kn).call(this,m,x,this.encryptionKey,!1),r=function(){return new e(y)};return new v(r,r)}};M=new WeakMap,_=new WeakSet,za=function(m,x,y,r,p,c,h,C,D,X,q,re){if(x){const oe=Math.min(127,x.length);x=x.subarray(0,oe)}else x=[];const K=m===6?new w:new S;return K.checkUserPassword(x,C,h)?K.getUserKey(x,D,q):x.length&&K.checkOwnerPassword(x,r,c,y)?K.getOwnerKey(x,p,c,X):null},A=new WeakSet,ea=function(m,x,y,r,p,c,h,C){const D=40+y.length+m.length,X=new Uint8Array(D);let q=0,re,K;if(x)for(K=Math.min(32,x.length);q<K;++q)X[q]=x[q];for(re=0;q<32;)X[q++]=le(U,M)[re++];for(re=0,K=y.length;re<K;++re)X[q++]=y[re];for(X[q++]=p&255,X[q++]=p>>8&255,X[q++]=p>>16&255,X[q++]=p>>>24&255,re=0,K=m.length;re<K;++re)X[q++]=m[re];c>=4&&!C&&(X[q++]=255,X[q++]=255,X[q++]=255,X[q++]=255);let oe=t(X,0,q);const J=h>>3;if(c>=3)for(re=0;re<50;++re)oe=t(oe,0,J);const te=oe.subarray(0,J);let B,j;if(c>=3){for(q=0;q<32;++q)X[q]=le(U,M)[q];for(re=0,K=m.length;re<K;++re)X[q++]=m[re];B=new e(te),j=B.encryptBlock(t(X,0,q)),K=te.length;const Y=new Uint8Array(K);for(re=1;re<=19;++re){for(let W=0;W<K;++W)Y[W]=te[W]^re;B=new e(Y),j=B.encryptBlock(j)}for(re=0,K=j.length;re<K;++re)if(r[re]!==j[re])return null}else for(B=new e(te),j=B.encryptBlock(le(U,M)),re=0,K=j.length;re<K;++re)if(r[re]!==j[re])return null;return te},l=new WeakSet,Ga=function(m,x,y,r){const p=new Uint8Array(32);let c=0;const h=Math.min(32,m.length);for(;c<h;++c)p[c]=m[c];let C=0;for(;c<32;)p[c++]=le(U,M)[C++];let D=t(p,0,c);const X=r>>3;if(y>=3)for(C=0;C<50;++C)D=t(D,0,D.length);let q,re;if(y>=3){re=x;const K=new Uint8Array(X);for(C=19;C>=0;C--){for(let oe=0;oe<X;++oe)K[oe]=D[oe]^C;q=new e(K),re=q.encryptBlock(re)}}else q=new e(D.subarray(0,X)),re=q.encryptBlock(x);return re},N=new WeakSet,Kn=function(m,x,y,r=!1){const p=new Uint8Array(y.length+9),c=y.length;let h;for(h=0;h<c;++h)p[h]=y[h];return p[h++]=m&255,p[h++]=m>>8&255,p[h++]=m>>16&255,p[h++]=x&255,p[h++]=x>>8&255,r&&(p[h++]=115,p[h++]=65,p[h++]=108,p[h++]=84),t(p,0,h).subarray(0,Math.min(y.length+5,16))},u=new WeakSet,ta=function(m,x,y,r,p){if(!(x instanceof k.Name))throw new n.FormatError("Invalid crypt filter name.");const c=this,h=m.get(x.name),C=h==null?void 0:h.get("CFM");if(!C||C.name==="None")return function(){return new T};if(C.name==="V2")return function(){var D;return new e(Me(D=c,N,Kn).call(D,y,r,p,!1))};if(C.name==="AESV2")return function(){var D;return new f(Me(D=c,N,Kn).call(D,y,r,p,!0))};if(C.name==="AESV3")return function(){return new i(p)};throw new n.FormatError("Unknown crypto method")},Ee(U,M,new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]));let b=U;P.CipherTransformFactory=b},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DecryptStream=void 0;var n=ie(18);const k=512;class R extends n.DecodeStream{constructor(t,o,$){super(o),this.str=t,this.dict=t.dict,this.decrypt=$,this.nextChunk=null,this.initialized=!1}readBlock(){var d;let t;if(this.initialized?t=this.nextChunk:(t=this.str.getBytes(k),this.initialized=!0),!t||t.length===0){this.eof=!0;return}this.nextChunk=this.str.getBytes(k);const o=((d=this.nextChunk)==null?void 0:d.length)>0,$=this.decrypt;t=$(t,!o);const L=this.bufferLength,I=L+t.length;this.ensureBuffer(I).set(t,L),this.bufferLength=I}}P.DecryptStream=R},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ObjectLoader=void 0;var n=ie(4),k=ie(5),R=ie(3),e=ie(2);function t(L){return L instanceof n.Ref||L instanceof n.Dict||L instanceof k.BaseStream||Array.isArray(L)}function o(L,I){if(L instanceof n.Dict)L=L.getRawValues();else if(L instanceof k.BaseStream)L=L.dict.getRawValues();else if(!Array.isArray(L))return;for(const T of L)t(T)&&I.push(T)}class ${constructor(I,T,d){this.dict=I,this.keys=T,this.xref=d,this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:I,dict:T}=this;this.refSet=new n.RefSet;const d=[];for(const f of I){const i=T.getRaw(f);i!==void 0&&d.push(i)}return this._walk(d)}async _walk(I){const T=[],d=[];for(;I.length;){let f=I.pop();if(f instanceof n.Ref){if(this.refSet.has(f))continue;try{this.refSet.put(f),f=this.xref.fetch(f)}catch(i){if(!(i instanceof R.MissingDataException)){(0,e.warn)(`ObjectLoader._walk - requesting all data: "${i}".`),this.refSet=null;const{manager:S}=this.xref.stream;return S.requestAllChunks()}T.push(f),d.push({begin:i.begin,end:i.end})}}if(f instanceof k.BaseStream){const i=f.getBaseStreams();if(i){let S=!1;for(const w of i)w.isDataLoaded||(S=!0,d.push({begin:w.start,end:w.end}));S&&T.push(f)}}o(f,I)}if(d.length){await this.xref.stream.manager.requestRanges(d);for(const f of T)f instanceof n.Ref&&this.refSet.remove(f);return this._walk(T)}this.refSet=null}}P.ObjectLoader=$},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XFAFactory=void 0;var n=ie(78),k=ie(79),R=ie(89),e=ie(85),t=ie(84),o=ie(2),$=ie(90),L=ie(100);class I{constructor(d){try{this.root=new $.XFAParser().parse(I._createDocument(d));const f=new k.Binder(this.root);this.form=f.bind(),this.dataHandler=new R.DataHandler(this.root,f.getData()),this.form[n.$globalData].template=this.form}catch(f){(0,o.warn)(`XFA - an error occurred during parsing and binding: ${f}`)}}isValid(){return this.root&&this.form}_createPagesHelper(){const d=this.form[n.$toPages]();return new Promise((f,i)=>{const S=()=>{try{const w=d.next();w.done?f(w.value):setTimeout(S,0)}catch(w){i(w)}};setTimeout(S,0)})}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map(d=>{const{width:f,height:i}=d.attributes.style;return[0,0,parseInt(f),parseInt(i)]})}catch(d){(0,o.warn)(`XFA - an error occurred during layout: ${d}`)}}getBoundingBox(d){return this.dims[d]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(d){this.form[n.$globalData].images=d}setFonts(d){this.form[n.$globalData].fontFinder=new e.FontFinder(d);const f=[];for(let i of this.form[n.$globalData].usedTypefaces)i=(0,t.stripQuotes)(i),this.form[n.$globalData].fontFinder.find(i)||f.push(i);return f.length>0?f:null}appendFonts(d,f){this.form[n.$globalData].fontFinder.add(d,f)}async getPages(){this.pages||await this._createPages();const d=this.pages;return this.pages=null,d}serializeData(d){return this.dataHandler.serialize(d)}static _createDocument(d){return d["/xdp:xdp"]?Object.values(d).join(""):d["xdp:xdp"]}static getRichTextAsHtml(d){if(!d||typeof d!="string")return null;try{let f=new $.XFAParser(L.XhtmlNamespace,!0).parse(d);if(!["body","xhtml"].includes(f[n.$nodeName])){const v=L.XhtmlNamespace.body({});v[n.$appendChild](f),f=v}const i=f[n.$toHTML]();if(!i.success)return null;const{html:S}=i,{attributes:w}=S;return w&&(w.class&&(w.class=w.class.filter(v=>!v.startsWith("xfa"))),w.dir="auto"),{html:S,str:f[n.$text]()}}catch(f){(0,o.warn)(`XFA - an error occurred during parsing of rich text: ${f}`)}return null}}P.XFAFactory=I},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.$uid=P.$toStyle=P.$toString=P.$toPages=P.$toHTML=P.$text=P.$tabIndex=P.$setValue=P.$setSetAttributes=P.$setId=P.$searchNode=P.$root=P.$resolvePrototypes=P.$removeChild=P.$pushPara=P.$pushGlyphs=P.$popPara=P.$onText=P.$onChildCheck=P.$onChild=P.$nsAttributes=P.$nodeName=P.$namespaceId=P.$lastAttribute=P.$isUsable=P.$isTransparent=P.$isThereMoreWidth=P.$isSplittable=P.$isNsAgnostic=P.$isDescendent=P.$isDataValue=P.$isCDATAXml=P.$isBindable=P.$insertAt=P.$indexOf=P.$ids=P.$hasSettableValue=P.$globalData=P.$getTemplateRoot=P.$getSubformParent=P.$getRealChildrenByNameIt=P.$getParent=P.$getNextPage=P.$getExtra=P.$getDataValue=P.$getContainedChildren=P.$getChildrenByNameIt=P.$getChildrenByName=P.$getChildrenByClass=P.$getChildren=P.$getAvailableSpace=P.$getAttributes=P.$getAttributeIt=P.$flushHTML=P.$finalize=P.$extra=P.$dump=P.$data=P.$content=P.$consumed=P.$clone=P.$cleanup=P.$cleanPage=P.$clean=P.$childrenToHTML=P.$appendChild=P.$addHTML=P.$acceptWhitespace=void 0;const ie=Symbol();P.$acceptWhitespace=ie;const n=Symbol();P.$addHTML=n;const k=Symbol();P.$appendChild=k;const R=Symbol();P.$childrenToHTML=R;const e=Symbol();P.$clean=e;const t=Symbol();P.$cleanPage=t;const o=Symbol();P.$cleanup=o;const $=Symbol();P.$clone=$;const L=Symbol();P.$consumed=L;const I=Symbol("content");P.$content=I;const T=Symbol("data");P.$data=T;const d=Symbol();P.$dump=d;const f=Symbol("extra");P.$extra=f;const i=Symbol();P.$finalize=i;const S=Symbol();P.$flushHTML=S;const w=Symbol();P.$getAttributeIt=w;const v=Symbol();P.$getAttributes=v;const b=Symbol();P.$getAvailableSpace=b;const M=Symbol();P.$getChildrenByClass=M;const _=Symbol();P.$getChildrenByName=_;const H=Symbol();P.$getChildrenByNameIt=H;const A=Symbol();P.$getDataValue=A;const E=Symbol();P.$getExtra=E;const l=Symbol();P.$getRealChildrenByNameIt=l;const g=Symbol();P.$getChildren=g;const N=Symbol();P.$getContainedChildren=N;const s=Symbol();P.$getNextPage=s;const u=Symbol();P.$getSubformParent=u;const F=Symbol();P.$getParent=F;const U=Symbol();P.$getTemplateRoot=U;const O=Symbol();P.$globalData=O;const m=Symbol();P.$hasSettableValue=m;const x=Symbol();P.$ids=x;const y=Symbol();P.$indexOf=y;const r=Symbol();P.$insertAt=r;const p=Symbol();P.$isCDATAXml=p;const c=Symbol();P.$isBindable=c;const h=Symbol();P.$isDataValue=h;const C=Symbol();P.$isDescendent=C;const D=Symbol();P.$isNsAgnostic=D;const X=Symbol();P.$isSplittable=X;const q=Symbol();P.$isThereMoreWidth=q;const re=Symbol();P.$isTransparent=re;const K=Symbol();P.$isUsable=K;const oe=Symbol();P.$lastAttribute=oe;const J=Symbol("namespaceId");P.$namespaceId=J;const te=Symbol("nodeName");P.$nodeName=te;const B=Symbol();P.$nsAttributes=B;const j=Symbol();P.$onChild=j;const Y=Symbol();P.$onChildCheck=Y;const W=Symbol();P.$onText=W;const G=Symbol();P.$pushGlyphs=G;const Q=Symbol();P.$popPara=Q;const ee=Symbol();P.$pushPara=ee;const z=Symbol();P.$removeChild=z;const se=Symbol("root");P.$root=se;const ne=Symbol();P.$resolvePrototypes=ne;const V=Symbol();P.$searchNode=V;const ae=Symbol();P.$setId=ae;const ce=Symbol();P.$setSetAttributes=ce;const de=Symbol();P.$setValue=de;const Ae=Symbol();P.$tabIndex=Ae;const ve=Symbol();P.$text=ve;const pe=Symbol();P.$toPages=pe;const ge=Symbol();P.$toHTML=ge;const fe=Symbol();P.$toString=fe;const xe=Symbol();P.$toStyle=xe;const Te=Symbol("uid");P.$uid=Te},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Binder=void 0;var n=ie(78),k=ie(80),R=ie(88),e=ie(87),t=ie(81),o=ie(2);const $=t.NamespaceIds.datasets.id;function L(T){const d=new k.Text({});return d[n.$content]=T,d}class I{constructor(d){var f;this.root=d,this.datasets=d.datasets,this.data=((f=d.datasets)==null?void 0:f.data)||new e.XmlObject(t.NamespaceIds.datasets.id,"data"),this.emptyMerge=this.data[n.$getChildren]().length===0,this.root.form=this.form=d.template[n.$clone]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_isMatchTemplate(){return!this._isConsumeData()}bind(){return this._bindElement(this.form,this.data),this.form}getData(){return this.data}_bindValue(d,f,i){var S,w;if(d[n.$data]=f,d[n.$hasSettableValue]())if(f[n.$isDataValue]()){const v=f[n.$getDataValue]();d[n.$setValue](L(v))}else if(d instanceof k.Field&&((w=(S=d.ui)==null?void 0:S.choiceList)==null?void 0:w.open)==="multiSelect"){const v=f[n.$getChildren]().map(b=>b[n.$content].trim()).join(`
`);d[n.$setValue](L(v))}else this._isConsumeData()&&(0,o.warn)("XFA - Nodes haven't the same type.");else!f[n.$isDataValue]()||this._isMatchTemplate()?this._bindElement(d,f):(0,o.warn)("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(d,f,i,S){if(!d)return null;let w,v;for(let b=0;b<3;b++){for(w=i[n.$getRealChildrenByNameIt](d,!1,!0);v=w.next().value,!!v;)if(f===v[n.$isDataValue]())return v;if(i[n.$namespaceId]===t.NamespaceIds.datasets.id&&i[n.$nodeName]==="data")break;i=i[n.$getParent]()}return S?(w=this.data[n.$getRealChildrenByNameIt](d,!0,!1),v=w.next().value,v||(w=this.data[n.$getAttributeIt](d,!0),v=w.next().value,v!=null&&v[n.$isDataValue]())?v:null):null}_setProperties(d,f){if(d.hasOwnProperty("setProperty"))for(const{ref:i,target:S,connection:w}of d.setProperty.children){if(w||!i)continue;const v=(0,R.searchNode)(this.root,f,i,!1,!1);if(!v){(0,o.warn)(`XFA - Invalid reference: ${i}.`);continue}const[b]=v;if(!b[n.$isDescendent](this.data)){(0,o.warn)("XFA - Invalid node: must be a data node.");continue}const M=(0,R.searchNode)(this.root,d,S,!1,!1);if(!M){(0,o.warn)(`XFA - Invalid target: ${S}.`);continue}const[_]=M;if(!_[n.$isDescendent](d)){(0,o.warn)("XFA - Invalid target: must be a property or subproperty.");continue}const H=_[n.$getParent]();if(_ instanceof k.SetProperty||H instanceof k.SetProperty){(0,o.warn)("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(_ instanceof k.BindItems||H instanceof k.BindItems){(0,o.warn)("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const A=b[n.$text](),E=_[n.$nodeName];if(_ instanceof e.XFAAttribute){const l=Object.create(null);l[E]=A;const g=Reflect.construct(Object.getPrototypeOf(H).constructor,[l]);H[E]=g[E];continue}if(!_.hasOwnProperty(n.$content)){(0,o.warn)("XFA - Invalid node to use in setProperty");continue}_[n.$data]=b,_[n.$content]=A,_[n.$finalize]()}}_bindItems(d,f){if(!d.hasOwnProperty("items")||!d.hasOwnProperty("bindItems")||d.bindItems.isEmpty())return;for(const w of d.items.children)d[n.$removeChild](w);d.items.clear();const i=new k.Items({}),S=new k.Items({});d[n.$appendChild](i),d.items.push(i),d[n.$appendChild](S),d.items.push(S);for(const{ref:w,labelRef:v,valueRef:b,connection:M}of d.bindItems.children){if(M||!w)continue;const _=(0,R.searchNode)(this.root,f,w,!1,!1);if(!_){(0,o.warn)(`XFA - Invalid reference: ${w}.`);continue}for(const H of _){if(!H[n.$isDescendent](this.datasets)){(0,o.warn)(`XFA - Invalid ref (${w}): must be a datasets child.`);continue}const A=(0,R.searchNode)(this.root,H,v,!0,!1);if(!A){(0,o.warn)(`XFA - Invalid label: ${v}.`);continue}const[E]=A;if(!E[n.$isDescendent](this.datasets)){(0,o.warn)("XFA - Invalid label: must be a datasets child.");continue}const l=(0,R.searchNode)(this.root,H,b,!0,!1);if(!l){(0,o.warn)(`XFA - Invalid value: ${b}.`);continue}const[g]=l;if(!g[n.$isDescendent](this.datasets)){(0,o.warn)("XFA - Invalid value: must be a datasets child.");continue}const N=L(E[n.$text]()),s=L(g[n.$text]());i[n.$appendChild](N),i.text.push(N),S[n.$appendChild](s),S.text.push(s)}}}_bindOccurrences(d,f,i){let S;if(f.length>1&&(S=d[n.$clone](),S[n.$removeChild](S.occur),S.occur=null),this._bindValue(d,f[0],i),this._setProperties(d,f[0]),this._bindItems(d,f[0]),f.length===1)return;const w=d[n.$getParent](),v=d[n.$nodeName],b=w[n.$indexOf](d);for(let M=1,_=f.length;M<_;M++){const H=f[M],A=S[n.$clone]();w[v].push(A),w[n.$insertAt](b+M,A),this._bindValue(A,H,i),this._setProperties(A,H),this._bindItems(A,H)}}_createOccurrences(d){if(!this.emptyMerge)return;const{occur:f}=d;if(!f||f.initial<=1)return;const i=d[n.$getParent](),S=d[n.$nodeName];if(!(i[S]instanceof e.XFAObjectArray))return;let w;d.name?w=i[S].children.filter(M=>M.name===d.name).length:w=i[S].children.length;const v=i[n.$indexOf](d)+1,b=f.initial-w;if(b){const M=d[n.$clone]();M[n.$removeChild](M.occur),M.occur=null,i[S].push(M),i[n.$insertAt](v,M);for(let _=1;_<b;_++){const H=M[n.$clone]();i[S].push(H),i[n.$insertAt](v+_,H)}}}_getOccurInfo(d){const{name:f,occur:i}=d;if(!i||!f)return[1,1];const S=i.max===-1?1/0:i.max;return[i.min,S]}_setAndBind(d,f){this._setProperties(d,f),this._bindItems(d,f),this._bindElement(d,f)}_bindElement(d,f){const i=[];this._createOccurrences(d);for(const S of d[n.$getChildren]()){if(S[n.$data])continue;if(this._mergeMode===void 0&&S[n.$nodeName]==="subform"){this._mergeMode=S.mergeMode==="consumeData";const A=f[n.$getChildren]();if(A.length>0)this._bindOccurrences(S,[A[0]],null);else if(this.emptyMerge){const E=f[n.$namespaceId]===$?-1:f[n.$namespaceId],l=S[n.$data]=new e.XmlObject(E,S.name||"root");f[n.$appendChild](l),this._bindElement(S,l)}continue}if(!S[n.$isBindable]())continue;let w=!1,v=null,b=null,M=null;if(S.bind){switch(S.bind.match){case"none":this._setAndBind(S,f);continue;case"global":w=!0;break;case"dataRef":if(!S.bind.ref){(0,o.warn)(`XFA - ref is empty in node ${S[n.$nodeName]}.`),this._setAndBind(S,f);continue}b=S.bind.ref;break}S.bind.picture&&(v=S.bind.picture[n.$content])}const[_,H]=this._getOccurInfo(S);if(b)if(M=(0,R.searchNode)(this.root,f,b,!0,!1),M===null){if(M=(0,R.createDataNode)(this.data,f,b),!M)continue;this._isConsumeData()&&(M[n.$consumed]=!0),this._setAndBind(S,M);continue}else this._isConsumeData()&&(M=M.filter(A=>!A[n.$consumed])),M.length>H?M=M.slice(0,H):M.length===0&&(M=null),M&&this._isConsumeData()&&M.forEach(A=>{A[n.$consumed]=!0});else{if(!S.name){this._setAndBind(S,f);continue}if(this._isConsumeData()){const A=[];for(;A.length<H;){const E=this._findDataByNameToConsume(S.name,S[n.$hasSettableValue](),f,w);if(!E)break;E[n.$consumed]=!0,A.push(E)}M=A.length>0?A:null}else{if(M=f[n.$getRealChildrenByNameIt](S.name,!1,this.emptyMerge).next().value,!M){if(_===0){i.push(S);continue}const A=f[n.$namespaceId]===$?-1:f[n.$namespaceId];M=S[n.$data]=new e.XmlObject(A,S.name),this.emptyMerge&&(M[n.$consumed]=!0),f[n.$appendChild](M),this._setAndBind(S,M);continue}this.emptyMerge&&(M[n.$consumed]=!0),M=[M]}}M?this._bindOccurrences(S,M,v):_>0?this._setAndBind(S,f):i.push(S)}i.forEach(S=>S[n.$getParent]()[n.$removeChild](S))}}P.Binder=I},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Value=P.Text=P.TemplateNamespace=P.Template=P.SetProperty=P.Items=P.Field=P.BindItems=void 0;var n=ie(78),k=ie(81),R=ie(82),e=ie(83),t=ie(87),o=ie(84),$=ie(2),L=ie(85),I=ie(3),T=ie(88);const d=k.NamespaceIds.template.id,f="http://www.w3.org/2000/svg",i=2,S=3,w=5e3,v=/^H(\d+)$/,b=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","image/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),M=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function _(He){if(!He||!He.border)return{w:0,h:0};const a=He.border[n.$getExtra]();return a?{w:a.widths[0]+a.widths[2]+a.insets[0]+a.insets[2],h:a.widths[1]+a.widths[3]+a.insets[1]+a.insets[3]}:{w:0,h:0}}function H(He){return He.margin&&(He.margin.topInset||He.margin.rightInset||He.margin.bottomInset||He.margin.leftInset)}function A(He,a){if(!He.value){const Z=new sn({});He[n.$appendChild](Z),He.value=Z}He.value[n.$setValue](a)}function*E(He){for(const a of He[n.$getChildren]()){if(a instanceof mn){yield*a[n.$getContainedChildren]();continue}yield a}}function l(He){var a;return((a=He.validate)==null?void 0:a.nullTest)==="error"}function g(He){for(;He;){if(!He.traversal){He[n.$tabIndex]=He[n.$getParent]()[n.$tabIndex];return}if(He[n.$tabIndex])return;let a=null;for(const Ke of He.traversal[n.$getChildren]())if(Ke.operation==="next"){a=Ke;break}if(!a||!a.ref){He[n.$tabIndex]=He[n.$getParent]()[n.$tabIndex];return}const Z=He[n.$getTemplateRoot]();He[n.$tabIndex]=++Z[n.$tabIndex];const Be=Z[n.$searchNode](a.ref,He);if(!Be)return;He=Be[0]}}function N(He,a){var Be;const Z=He.assist;if(Z){const Ke=Z[n.$toHTML]();Ke&&(a.title=Ke);const dt=Z.role.match(v);if(dt){const mt="heading",bt=dt[1];a.role=mt,a["aria-level"]=bt}}if(He.layout==="table")a.role="table";else if(He.layout==="row")a.role="row";else{const Ke=He[n.$getParent]();Ke.layout==="row"&&(a.role=((Be=Ke.assist)==null?void 0:Be.role)==="TH"?"columnheader":"cell")}}function s(He){if(!He.assist)return null;const a=He.assist;return a.speak&&a.speak[n.$content]!==""?a.speak[n.$content]:a.toolTip?a.toolTip[n.$content]:null}function u(He){return o.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:He}]})}function F(He){const a=He[n.$getTemplateRoot]();a[n.$extra].firstUnsplittable===null&&(a[n.$extra].firstUnsplittable=He,a[n.$extra].noLayoutFailure=!0)}function U(He){const a=He[n.$getTemplateRoot]();a[n.$extra].firstUnsplittable===He&&(a[n.$extra].noLayoutFailure=!1)}function O(He){if(He[n.$extra]||(He[n.$extra]=Object.create(null),He.targetType==="auto"))return!1;const a=He[n.$getTemplateRoot]();let Z=null;if(He.target){if(Z=a[n.$searchNode](He.target,He[n.$getParent]()),!Z)return!1;Z=Z[0]}const{currentPageArea:Be,currentContentArea:Ke}=a[n.$extra];if(He.targetType==="pageArea")return Z instanceof At||(Z=null),He.startNew?(He[n.$extra].target=Z||Be,!0):Z&&Z!==Be?(He[n.$extra].target=Z,!0):!1;Z instanceof se||(Z=null);const et=Z&&Z[n.$getParent]();let dt,mt=et;if(He.startNew)if(Z){const bt=et.contentArea.children,Ot=bt.indexOf(Ke),Dt=bt.indexOf(Z);Ot!==-1&&Ot<Dt&&(mt=null),dt=Dt-1}else dt=Be.contentArea.children.indexOf(Ke);else if(Z&&Z!==Ke)dt=et.contentArea.children.indexOf(Z)-1,mt=et===Be?null:et;else return!1;return He[n.$extra].target=mt,He[n.$extra].index=dt,!0}function m(He,a,Z){const Be=He[n.$getTemplateRoot](),Ke=Be[n.$extra].noLayoutFailure,et=a[n.$getSubformParent];a[n.$getSubformParent]=()=>He,Be[n.$extra].noLayoutFailure=!0;const dt=a[n.$toHTML](Z);He[n.$addHTML](dt.html,dt.bbox),Be[n.$extra].noLayoutFailure=Ke,a[n.$getSubformParent]=et}class x extends t.StringObject{constructor(a){super(d,"appearanceFilter"),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||""}}class y extends t.XFAObject{constructor(a){super(d,"arc",!0),this.circular=(0,o.getInteger)({data:a.circular,defaultValue:0,validate:Z=>Z===1}),this.hand=(0,o.getStringOption)(a.hand,["even","left","right"]),this.id=a.id||"",this.startAngle=(0,o.getFloat)({data:a.startAngle,defaultValue:0,validate:Z=>!0}),this.sweepAngle=(0,o.getFloat)({data:a.sweepAngle,defaultValue:360,validate:Z=>!0}),this.use=a.use||"",this.usehref=a.usehref||"",this.edge=null,this.fill=null}[n.$toHTML](){var bt;const a=this.edge||new xe({}),Z=a[n.$toStyle](),Be=Object.create(null);((bt=this.fill)==null?void 0:bt.presence)==="visible"?Object.assign(Be,this.fill[n.$toStyle]()):Be.fill="transparent",Be.strokeWidth=(0,e.measureToString)(a.presence==="visible"?a.thickness:0),Be.stroke=Z.color;let Ke;const et={xmlns:f,style:{width:"100%",height:"100%",overflow:"visible"}};if(this.sweepAngle===360)Ke={name:"ellipse",attributes:{xmlns:f,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:Be}};else{const Ot=this.startAngle*Math.PI/180,Dt=this.sweepAngle*Math.PI/180,$t=this.sweepAngle>180?1:0,[Bt,jt,Xt,Pt]=[50*(1+Math.cos(Ot)),50*(1-Math.sin(Ot)),50*(1+Math.cos(Ot+Dt)),50*(1-Math.sin(Ot+Dt))];Ke={name:"path",attributes:{xmlns:f,d:`M ${Bt} ${jt} A 50 50 0 ${$t} 0 ${Xt} ${Pt}`,vectorEffect:"non-scaling-stroke",style:Be}},Object.assign(et,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const dt={name:"svg",children:[Ke],attributes:et},mt=this[n.$getParent]()[n.$getParent]();return H(mt)?o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[dt]}):(dt.attributes.style.position="absolute",o.HTMLResult.success(dt))}}class r extends t.XFAObject{constructor(a){super(d,"area",!0),this.colSpan=(0,o.getInteger)({data:a.colSpan,defaultValue:1,validate:Z=>Z>=1||Z===-1}),this.id=a.id||"",this.name=a.name||"",this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.x=(0,o.getMeasurement)(a.x,"0pt"),this.y=(0,o.getMeasurement)(a.y,"0pt"),this.desc=null,this.extras=null,this.area=new t.XFAObjectArray,this.draw=new t.XFAObjectArray,this.exObject=new t.XFAObjectArray,this.exclGroup=new t.XFAObjectArray,this.field=new t.XFAObjectArray,this.subform=new t.XFAObjectArray,this.subformSet=new t.XFAObjectArray}*[n.$getContainedChildren](){yield*E(this)}[n.$isTransparent](){return!0}[n.$isBindable](){return!0}[n.$addHTML](a,Z){const[Be,Ke,et,dt]=Z;this[n.$extra].width=Math.max(this[n.$extra].width,Be+et),this[n.$extra].height=Math.max(this[n.$extra].height,Ke+dt),this[n.$extra].children.push(a)}[n.$getAvailableSpace](){return this[n.$extra].availableSpace}[n.$toHTML](a){const Z=(0,e.toStyle)(this,"position"),Be={style:Z,id:this[n.$uid],class:["xfaArea"]};(0,e.isPrintOnly)(this)&&Be.class.push("xfaPrintOnly"),this.name&&(Be.xfaName=this.name);const Ke=[];this[n.$extra]={children:Ke,width:0,height:0,availableSpace:a};const et=this[n.$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!et.success)return et.isBreak()?et:(delete this[n.$extra],o.HTMLResult.FAILURE);Z.width=(0,e.measureToString)(this[n.$extra].width),Z.height=(0,e.measureToString)(this[n.$extra].height);const dt={name:"div",attributes:Be,children:Ke},mt=[this.x,this.y,this[n.$extra].width,this[n.$extra].height];return delete this[n.$extra],o.HTMLResult.success(dt,mt)}}class p extends t.XFAObject{constructor(a){super(d,"assist",!0),this.id=a.id||"",this.role=a.role||"",this.use=a.use||"",this.usehref=a.usehref||"",this.speak=null,this.toolTip=null}[n.$toHTML](){var a;return((a=this.toolTip)==null?void 0:a[n.$content])||null}}class c extends t.XFAObject{constructor(a){super(d,"barcode",!0),this.charEncoding=(0,o.getKeyword)({data:a.charEncoding?a.charEncoding.toLowerCase():"",defaultValue:"",validate:Z=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(Z)||Z.match(/iso-8859-\d{2}/)}),this.checksum=(0,o.getStringOption)(a.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=(0,o.getInteger)({data:a.dataColumnCount,defaultValue:-1,validate:Z=>Z>=0}),this.dataLength=(0,o.getInteger)({data:a.dataLength,defaultValue:-1,validate:Z=>Z>=0}),this.dataPrep=(0,o.getStringOption)(a.dataPrep,["none","flateCompress"]),this.dataRowCount=(0,o.getInteger)({data:a.dataRowCount,defaultValue:-1,validate:Z=>Z>=0}),this.endChar=a.endChar||"",this.errorCorrectionLevel=(0,o.getInteger)({data:a.errorCorrectionLevel,defaultValue:-1,validate:Z=>Z>=0&&Z<=8}),this.id=a.id||"",this.moduleHeight=(0,o.getMeasurement)(a.moduleHeight,"5mm"),this.moduleWidth=(0,o.getMeasurement)(a.moduleWidth,"0.25mm"),this.printCheckDigit=(0,o.getInteger)({data:a.printCheckDigit,defaultValue:0,validate:Z=>Z===1}),this.rowColumnRatio=(0,o.getRatio)(a.rowColumnRatio),this.startChar=a.startChar||"",this.textLocation=(0,o.getStringOption)(a.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=(0,o.getInteger)({data:a.truncate,defaultValue:0,validate:Z=>Z===1}),this.type=(0,o.getStringOption)(a.type?a.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upcaadd2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]),this.upsMode=(0,o.getStringOption)(a.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=a.use||"",this.usehref=a.usehref||"",this.wideNarrowRatio=(0,o.getRatio)(a.wideNarrowRatio),this.encrypt=null,this.extras=null}}class h extends t.XFAObject{constructor(a){super(d,"bind",!0),this.match=(0,o.getStringOption)(a.match,["once","dataRef","global","none"]),this.ref=a.ref||"",this.picture=null}}class C extends t.XFAObject{constructor(a){super(d,"bindItems"),this.connection=a.connection||"",this.labelRef=a.labelRef||"",this.ref=a.ref||"",this.valueRef=a.valueRef||""}}P.BindItems=C;class D extends t.XFAObject{constructor(a){super(d,"bookend"),this.id=a.id||"",this.leader=a.leader||"",this.trailer=a.trailer||"",this.use=a.use||"",this.usehref=a.usehref||""}}class X extends t.Option01{constructor(a){super(d,"boolean"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$toHTML](a){return u(this[n.$content]===1?"1":"0")}}class q extends t.XFAObject{constructor(a){super(d,"border",!0),this.break=(0,o.getStringOption)(a.break,["close","open"]),this.hand=(0,o.getStringOption)(a.hand,["even","left","right"]),this.id=a.id||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.corner=new t.XFAObjectArray(4),this.edge=new t.XFAObjectArray(4),this.extras=null,this.fill=null,this.margin=null}[n.$getExtra](){if(!this[n.$extra]){const a=this.edge.children.slice();if(a.length<4){const Ke=a.at(-1)||new xe({});for(let et=a.length;et<4;et++)a.push(Ke)}const Z=a.map(Ke=>Ke.thickness),Be=[0,0,0,0];this.margin&&(Be[0]=this.margin.topInset,Be[1]=this.margin.rightInset,Be[2]=this.margin.bottomInset,Be[3]=this.margin.leftInset),this[n.$extra]={widths:Z,insets:Be,edges:a}}return this[n.$extra]}[n.$toStyle](){var Ke;const{edges:a}=this[n.$getExtra](),Z=a.map(et=>{const dt=et[n.$toStyle]();return dt.color||(dt.color="#000000"),dt}),Be=Object.create(null);if(this.margin&&Object.assign(Be,this.margin[n.$toStyle]()),((Ke=this.fill)==null?void 0:Ke.presence)==="visible"&&Object.assign(Be,this.fill[n.$toStyle]()),this.corner.children.some(et=>et.radius!==0)){const et=this.corner.children.map(dt=>dt[n.$toStyle]());if(et.length===2||et.length===3){const dt=et.at(-1);for(let mt=et.length;mt<4;mt++)et.push(dt)}Be.borderRadius=et.map(dt=>dt.radius).join(" ")}switch(this.presence){case"invisible":case"hidden":Be.borderStyle="";break;case"inactive":Be.borderStyle="none";break;default:Be.borderStyle=Z.map(et=>et.style).join(" ");break}return Be.borderWidth=Z.map(et=>et.width).join(" "),Be.borderColor=Z.map(et=>et.color).join(" "),Be}}class re extends t.XFAObject{constructor(a){super(d,"break",!0),this.after=(0,o.getStringOption)(a.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=a.afterTarget||"",this.before=(0,o.getStringOption)(a.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=a.beforeTarget||"",this.bookendLeader=a.bookendLeader||"",this.bookendTrailer=a.bookendTrailer||"",this.id=a.id||"",this.overflowLeader=a.overflowLeader||"",this.overflowTarget=a.overflowTarget||"",this.overflowTrailer=a.overflowTrailer||"",this.startNew=(0,o.getInteger)({data:a.startNew,defaultValue:0,validate:Z=>Z===1}),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}}class K extends t.XFAObject{constructor(a){super(d,"breakAfter",!0),this.id=a.id||"",this.leader=a.leader||"",this.startNew=(0,o.getInteger)({data:a.startNew,defaultValue:0,validate:Z=>Z===1}),this.target=a.target||"",this.targetType=(0,o.getStringOption)(a.targetType,["auto","contentArea","pageArea"]),this.trailer=a.trailer||"",this.use=a.use||"",this.usehref=a.usehref||"",this.script=null}}class oe extends t.XFAObject{constructor(a){super(d,"breakBefore",!0),this.id=a.id||"",this.leader=a.leader||"",this.startNew=(0,o.getInteger)({data:a.startNew,defaultValue:0,validate:Z=>Z===1}),this.target=a.target||"",this.targetType=(0,o.getStringOption)(a.targetType,["auto","contentArea","pageArea"]),this.trailer=a.trailer||"",this.use=a.use||"",this.usehref=a.usehref||"",this.script=null}[n.$toHTML](a){return this[n.$extra]={},o.HTMLResult.FAILURE}}class J extends t.XFAObject{constructor(a){super(d,"button",!0),this.highlight=(0,o.getStringOption)(a.highlight,["inverted","none","outline","push"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}[n.$toHTML](a){const Be=this[n.$getParent]()[n.$getParent](),Ke={name:"button",attributes:{id:this[n.$uid],class:["xfaButton"],style:{}},children:[]};for(const et of Be.event.children){if(et.activity!=="click"||!et.script)continue;const dt=(0,I.recoverJsURL)(et.script[n.$content]);if(!dt)continue;const mt=(0,e.fixURL)(dt.url);mt&&Ke.children.push({name:"a",attributes:{id:"link"+this[n.$uid],href:mt,newWindow:dt.newWindow,class:["xfaLink"],style:{}},children:[]})}return o.HTMLResult.success(Ke)}}class te extends t.XFAObject{constructor(a){super(d,"calculate",!0),this.id=a.id||"",this.override=(0,o.getStringOption)(a.override,["disabled","error","ignore","warning"]),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.message=null,this.script=null}}class B extends t.XFAObject{constructor(a){super(d,"caption",!0),this.id=a.id||"",this.placement=(0,o.getStringOption)(a.placement,["left","bottom","inline","right","top"]),this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil((0,o.getMeasurement)(a.reserve)),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[n.$setValue](a){A(this,a)}[n.$getExtra](a){if(!this[n.$extra]){let{width:Z,height:Be}=a;switch(this.placement){case"left":case"right":case"inline":Z=this.reserve<=0?Z:this.reserve;break;case"top":case"bottom":Be=this.reserve<=0?Be:this.reserve;break}this[n.$extra]=(0,e.layoutNode)(this,{width:Z,height:Be})}return this[n.$extra]}[n.$toHTML](a){if(!this.value)return o.HTMLResult.EMPTY;this[n.$pushPara]();const Z=this.value[n.$toHTML](a).html;if(!Z)return this[n.$popPara](),o.HTMLResult.EMPTY;const Be=this.reserve;if(this.reserve<=0){const{w:dt,h:mt}=this[n.$getExtra](a);switch(this.placement){case"left":case"right":case"inline":this.reserve=dt;break;case"top":case"bottom":this.reserve=mt;break}}const Ke=[];typeof Z=="string"?Ke.push({name:"#text",value:Z}):Ke.push(Z);const et=(0,e.toStyle)(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(et.width=(0,e.measureToString)(this.reserve));break;case"top":case"bottom":this.reserve>0&&(et.height=(0,e.measureToString)(this.reserve));break}return(0,e.setPara)(this,null,Z),this[n.$popPara](),this.reserve=Be,o.HTMLResult.success({name:"div",attributes:{style:et,class:["xfaCaption"]},children:Ke})}}class j extends t.StringObject{constructor(a){super(d,"certificate"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}}class Y extends t.XFAObject{constructor(a){super(d,"certificates",!0),this.credentialServerPolicy=(0,o.getStringOption)(a.credentialServerPolicy,["optional","required"]),this.id=a.id||"",this.url=a.url||"",this.urlPolicy=a.urlPolicy||"",this.use=a.use||"",this.usehref=a.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}}class W extends t.XFAObject{constructor(a){super(d,"checkButton",!0),this.id=a.id||"",this.mark=(0,o.getStringOption)(a.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=(0,o.getStringOption)(a.shape,["square","round"]),this.size=(0,o.getMeasurement)(a.size,"10pt"),this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.extras=null,this.margin=null}[n.$toHTML](a){var Gt,Ht,Kt;const Z=(0,e.toStyle)("margin"),Be=(0,e.measureToString)(this.size);Z.width=Z.height=Be;let Ke,et,dt;const mt=this[n.$getParent]()[n.$getParent](),bt=mt.items.children.length&&mt.items.children[0][n.$toHTML]().html||[],Ot={on:(bt[0]!==void 0?bt[0]:"on").toString(),off:(bt[1]!==void 0?bt[1]:"off").toString()},$t=(((Gt=mt.value)==null?void 0:Gt[n.$text]())||"off")===Ot.on||void 0,Bt=mt[n.$getSubformParent](),jt=mt[n.$uid];let Xt;Bt instanceof _e?(dt=Bt[n.$uid],Ke="radio",et="xfaRadio",Xt=((Ht=Bt[n.$data])==null?void 0:Ht[n.$uid])||Bt[n.$uid]):(Ke="checkbox",et="xfaCheckbox",Xt=((Kt=mt[n.$data])==null?void 0:Kt[n.$uid])||mt[n.$uid]);const Pt={name:"input",attributes:{class:[et],style:Z,fieldId:jt,dataId:Xt,type:Ke,checked:$t,xfaOn:Ot.on,xfaOff:Ot.off,"aria-label":s(mt),"aria-required":!1}};return dt&&(Pt.attributes.name=dt),l(mt)&&(Pt.attributes["aria-required"]=!0,Pt.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[Pt]})}}class G extends t.XFAObject{constructor(a){super(d,"choiceList",!0),this.commitOn=(0,o.getStringOption)(a.commitOn,["select","exit"]),this.id=a.id||"",this.open=(0,o.getStringOption)(a.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=(0,o.getInteger)({data:a.textEntry,defaultValue:0,validate:Z=>Z===1}),this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.extras=null,this.margin=null}[n.$toHTML](a){var Ot,Dt,$t;const Z=(0,e.toStyle)(this,"border","margin"),Ke=this[n.$getParent]()[n.$getParent](),dt={fontSize:`calc(${((Ot=Ke.font)==null?void 0:Ot.size)||10}px * var(--scale-factor))`},mt=[];if(Ke.items.children.length>0){const Bt=Ke.items;let jt=0,Xt=0;Bt.children.length===2&&(jt=Bt.children[0].save,Xt=1-jt);const Pt=Bt.children[jt][n.$toHTML]().html,Gt=Bt.children[Xt][n.$toHTML]().html;let Ht=!1;const Kt=((Dt=Ke.value)==null?void 0:Dt[n.$text]())||"";for(let Wt=0,Lt=Pt.length;Wt<Lt;Wt++){const wt={name:"option",attributes:{value:Gt[Wt]||Pt[Wt],style:dt},value:Pt[Wt]};Gt[Wt]===Kt&&(wt.attributes.selected=Ht=!0),mt.push(wt)}Ht||mt.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const bt={class:["xfaSelect"],fieldId:Ke[n.$uid],dataId:(($t=Ke[n.$data])==null?void 0:$t[n.$uid])||Ke[n.$uid],style:Z,"aria-label":s(Ke),"aria-required":!1};return l(Ke)&&(bt["aria-required"]=!0,bt.required=!0),this.open==="multiSelect"&&(bt.multiple=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:mt,attributes:bt}]})}}class Q extends t.XFAObject{constructor(a){super(d,"color",!0),this.cSpace=(0,o.getStringOption)(a.cSpace,["SRGB"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.value=a.value?(0,o.getColor)(a.value):"",this.extras=null}[n.$hasSettableValue](){return!1}[n.$toStyle](){return this.value?$.Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class ee extends t.XFAObject{constructor(a){super(d,"comb"),this.id=a.id||"",this.numberOfCells=(0,o.getInteger)({data:a.numberOfCells,defaultValue:0,validate:Z=>Z>=0}),this.use=a.use||"",this.usehref=a.usehref||""}}class z extends t.XFAObject{constructor(a){super(d,"connect",!0),this.connection=a.connection||"",this.id=a.id||"",this.ref=a.ref||"",this.usage=(0,o.getStringOption)(a.usage,["exportAndImport","exportOnly","importOnly"]),this.use=a.use||"",this.usehref=a.usehref||"",this.picture=null}}class se extends t.XFAObject{constructor(a){super(d,"contentArea",!0),this.h=(0,o.getMeasurement)(a.h),this.id=a.id||"",this.name=a.name||"",this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.w=(0,o.getMeasurement)(a.w),this.x=(0,o.getMeasurement)(a.x,"0pt"),this.y=(0,o.getMeasurement)(a.y,"0pt"),this.desc=null,this.extras=null}[n.$toHTML](a){const Z=(0,e.measureToString)(this.x),Be=(0,e.measureToString)(this.y),Ke={left:Z,top:Be,width:(0,e.measureToString)(this.w),height:(0,e.measureToString)(this.h)},et=["xfaContentarea"];return(0,e.isPrintOnly)(this)&&et.push("xfaPrintOnly"),o.HTMLResult.success({name:"div",children:[],attributes:{style:Ke,class:et,id:this[n.$uid]}})}}class ne extends t.XFAObject{constructor(a){super(d,"corner",!0),this.id=a.id||"",this.inverted=(0,o.getInteger)({data:a.inverted,defaultValue:0,validate:Z=>Z===1}),this.join=(0,o.getStringOption)(a.join,["square","round"]),this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.radius=(0,o.getMeasurement)(a.radius),this.stroke=(0,o.getStringOption)(a.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,o.getMeasurement)(a.thickness,"0.5pt"),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null}[n.$toStyle](){const a=(0,e.toStyle)(this,"visibility");return a.radius=(0,e.measureToString)(this.join==="square"?0:this.radius),a}}class V extends t.ContentObject{constructor(a){super(d,"date"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){const a=this[n.$content].trim();this[n.$content]=a?new Date(a):null}[n.$toHTML](a){return u(this[n.$content]?this[n.$content].toString():"")}}class ae extends t.ContentObject{constructor(a){super(d,"dateTime"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){const a=this[n.$content].trim();this[n.$content]=a?new Date(a):null}[n.$toHTML](a){return u(this[n.$content]?this[n.$content].toString():"")}}class ce extends t.XFAObject{constructor(a){super(d,"dateTimeEdit",!0),this.hScrollPolicy=(0,o.getStringOption)(a.hScrollPolicy,["auto","off","on"]),this.id=a.id||"",this.picker=(0,o.getStringOption)(a.picker,["host","none"]),this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[n.$toHTML](a){var et;const Z=(0,e.toStyle)(this,"border","font","margin"),Be=this[n.$getParent]()[n.$getParent](),Ke={name:"input",attributes:{type:"text",fieldId:Be[n.$uid],dataId:((et=Be[n.$data])==null?void 0:et[n.$uid])||Be[n.$uid],class:["xfaTextfield"],style:Z,"aria-label":s(Be),"aria-required":!1}};return l(Be)&&(Ke.attributes["aria-required"]=!0,Ke.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[Ke]})}}class de extends t.ContentObject{constructor(a){super(d,"decimal"),this.fracDigits=(0,o.getInteger)({data:a.fracDigits,defaultValue:2,validate:Z=>!0}),this.id=a.id||"",this.leadDigits=(0,o.getInteger)({data:a.leadDigits,defaultValue:-1,validate:Z=>!0}),this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){const a=parseFloat(this[n.$content].trim());this[n.$content]=isNaN(a)?null:a}[n.$toHTML](a){return u(this[n.$content]!==null?this[n.$content].toString():"")}}class Ae extends t.XFAObject{constructor(a){super(d,"defaultUi",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}}class ve extends t.XFAObject{constructor(a){super(d,"desc",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.boolean=new t.XFAObjectArray,this.date=new t.XFAObjectArray,this.dateTime=new t.XFAObjectArray,this.decimal=new t.XFAObjectArray,this.exData=new t.XFAObjectArray,this.float=new t.XFAObjectArray,this.image=new t.XFAObjectArray,this.integer=new t.XFAObjectArray,this.text=new t.XFAObjectArray,this.time=new t.XFAObjectArray}}class pe extends t.OptionObject{constructor(a){super(d,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||""}}class ge extends t.XFAObject{constructor(a){super(d,"digestMethods",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.digestMethod=new t.XFAObjectArray}}class fe extends t.XFAObject{constructor(a){super(d,"draw",!0),this.anchorType=(0,o.getStringOption)(a.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:a.colSpan,defaultValue:1,validate:Z=>Z>=1||Z===-1}),this.h=a.h?(0,o.getMeasurement)(a.h):"",this.hAlign=(0,o.getStringOption)(a.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=a.id||"",this.locale=a.locale||"",this.maxH=(0,o.getMeasurement)(a.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(a.maxW,"0pt"),this.minH=(0,o.getMeasurement)(a.minH,"0pt"),this.minW=(0,o.getMeasurement)(a.minW,"0pt"),this.name=a.name||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(a.relevant),this.rotate=(0,o.getInteger)({data:a.rotate,defaultValue:0,validate:Z=>Z%90===0}),this.use=a.use||"",this.usehref=a.usehref||"",this.w=a.w?(0,o.getMeasurement)(a.w):"",this.x=(0,o.getMeasurement)(a.x,"0pt"),this.y=(0,o.getMeasurement)(a.y,"0pt"),this.assist=null,this.border=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.value=null,this.setProperty=new t.XFAObjectArray}[n.$setValue](a){A(this,a)}[n.$toHTML](a){if(g(this),this.presence==="hidden"||this.presence==="inactive")return o.HTMLResult.EMPTY;(0,e.fixDimensions)(this),this[n.$pushPara]();const Z=this.w,Be=this.h,{w:Ke,h:et,isBroken:dt}=(0,e.layoutNode)(this,a);if(Ke&&this.w===""){if(dt&&this[n.$getSubformParent]()[n.$isThereMoreWidth]())return this[n.$popPara](),o.HTMLResult.FAILURE;this.w=Ke}if(et&&this.h===""&&(this.h=et),F(this),!(0,R.checkDimensions)(this,a))return this.w=Z,this.h=Be,this[n.$popPara](),o.HTMLResult.FAILURE;U(this);const mt=(0,e.toStyle)(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");(0,e.setMinMaxDimensions)(this,mt),mt.margin&&(mt.padding=mt.margin,delete mt.margin);const bt=["xfaDraw"];this.font&&bt.push("xfaFont"),(0,e.isPrintOnly)(this)&&bt.push("xfaPrintOnly");const Ot={style:mt,id:this[n.$uid],class:bt};this.name&&(Ot.xfaName=this.name);const Dt={name:"div",attributes:Ot,children:[]};N(this,Ot);const $t=(0,e.computeBbox)(this,Dt,a),Bt=this.value?this.value[n.$toHTML](a).html:null;return Bt===null?(this.w=Z,this.h=Be,this[n.$popPara](),o.HTMLResult.success((0,e.createWrapper)(this,Dt),$t)):(Dt.children.push(Bt),(0,e.setPara)(this,mt,Bt),this.w=Z,this.h=Be,this[n.$popPara](),o.HTMLResult.success((0,e.createWrapper)(this,Dt),$t))}}class xe extends t.XFAObject{constructor(a){super(d,"edge",!0),this.cap=(0,o.getStringOption)(a.cap,["square","butt","round"]),this.id=a.id||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.stroke=(0,o.getStringOption)(a.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,o.getMeasurement)(a.thickness,"0.5pt"),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null}[n.$toStyle](){const a=(0,e.toStyle)(this,"visibility");if(Object.assign(a,{linecap:this.cap,width:(0,e.measureToString)(this.thickness),color:this.color?this.color[n.$toStyle]():"#000000",style:""}),this.presence!=="visible")a.style="none";else switch(this.stroke){case"solid":a.style="solid";break;case"dashDot":a.style="dashed";break;case"dashDotDot":a.style="dashed";break;case"dashed":a.style="dashed";break;case"dotted":a.style="dotted";break;case"embossed":a.style="ridge";break;case"etched":a.style="groove";break;case"lowered":a.style="inset";break;case"raised":a.style="outset";break}return a}}class Te extends t.OptionObject{constructor(a){super(d,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||""}}class Le extends t.XFAObject{constructor(a){super(d,"encodings",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.encoding=new t.XFAObjectArray}}class Ie extends t.XFAObject{constructor(a){super(d,"encrypt",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.certificate=null}}class ue extends t.XFAObject{constructor(a){super(d,"encryptData",!0),this.id=a.id||"",this.operation=(0,o.getStringOption)(a.operation,["encrypt","decrypt"]),this.target=a.target||"",this.use=a.use||"",this.usehref=a.usehref||"",this.filter=null,this.manifest=null}}class me extends t.XFAObject{constructor(a){super(d,"encryption",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.certificate=new t.XFAObjectArray}}class De extends t.OptionObject{constructor(a){super(d,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||""}}class Fe extends t.XFAObject{constructor(a){super(d,"encryptionMethods",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.encryptionMethod=new t.XFAObjectArray}}class je extends t.XFAObject{constructor(a){super(d,"event",!0),this.activity=(0,o.getStringOption)(a.activity,["click","change","docClose","docReady","enter","exit","full","indexChange","initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]),this.id=a.id||"",this.listen=(0,o.getStringOption)(a.listen,["refOnly","refAndDescendents"]),this.name=a.name||"",this.ref=a.ref||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}}class Ue extends t.ContentObject{constructor(a){super(d,"exData"),this.contentType=a.contentType||"",this.href=a.href||"",this.id=a.id||"",this.maxLength=(0,o.getInteger)({data:a.maxLength,defaultValue:-1,validate:Z=>Z>=-1}),this.name=a.name||"",this.rid=a.rid||"",this.transferEncoding=(0,o.getStringOption)(a.transferEncoding,["none","base64","package"]),this.use=a.use||"",this.usehref=a.usehref||""}[n.$isCDATAXml](){return this.contentType==="text/html"}[n.$onChild](a){return this.contentType==="text/html"&&a[n.$namespaceId]===k.NamespaceIds.xhtml.id?(this[n.$content]=a,!0):this.contentType==="text/xml"?(this[n.$content]=a,!0):!1}[n.$toHTML](a){return this.contentType!=="text/html"||!this[n.$content]?o.HTMLResult.EMPTY:this[n.$content][n.$toHTML](a)}}class ht extends t.XFAObject{constructor(a){super(d,"exObject",!0),this.archive=a.archive||"",this.classId=a.classId||"",this.codeBase=a.codeBase||"",this.codeType=a.codeType||"",this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.boolean=new t.XFAObjectArray,this.date=new t.XFAObjectArray,this.dateTime=new t.XFAObjectArray,this.decimal=new t.XFAObjectArray,this.exData=new t.XFAObjectArray,this.exObject=new t.XFAObjectArray,this.float=new t.XFAObjectArray,this.image=new t.XFAObjectArray,this.integer=new t.XFAObjectArray,this.text=new t.XFAObjectArray,this.time=new t.XFAObjectArray}}class _e extends t.XFAObject{constructor(a){super(d,"exclGroup",!0),this.access=(0,o.getStringOption)(a.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=a.accessKey||"",this.anchorType=(0,o.getStringOption)(a.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:a.colSpan,defaultValue:1,validate:Z=>Z>=1||Z===-1}),this.h=a.h?(0,o.getMeasurement)(a.h):"",this.hAlign=(0,o.getStringOption)(a.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=a.id||"",this.layout=(0,o.getStringOption)(a.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=(0,o.getMeasurement)(a.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(a.maxW,"0pt"),this.minH=(0,o.getMeasurement)(a.minH,"0pt"),this.minW=(0,o.getMeasurement)(a.minW,"0pt"),this.name=a.name||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.w=a.w?(0,o.getMeasurement)(a.w):"",this.x=(0,o.getMeasurement)(a.x,"0pt"),this.y=(0,o.getMeasurement)(a.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.margin=null,this.para=null,this.traversal=null,this.validate=null,this.connect=new t.XFAObjectArray,this.event=new t.XFAObjectArray,this.field=new t.XFAObjectArray,this.setProperty=new t.XFAObjectArray}[n.$isBindable](){return!0}[n.$hasSettableValue](){return!0}[n.$setValue](a){for(const Z of this.field.children){if(!Z.value){const Be=new sn({});Z[n.$appendChild](Be),Z.value=Be}Z.value[n.$setValue](a)}}[n.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&this[n.$extra].attempt===0&&this[n.$extra].numberInLine>0||this[n.$getParent]()[n.$isThereMoreWidth]()}[n.$isSplittable](){var Z;const a=this[n.$getSubformParent]();return a[n.$isSplittable]()?this[n.$extra]._isSplittable!==void 0?this[n.$extra]._isSplittable:this.layout==="position"||this.layout.includes("row")?(this[n.$extra]._isSplittable=!1,!1):(Z=a.layout)!=null&&Z.endsWith("-tb")&&a[n.$extra].numberInLine!==0?!1:(this[n.$extra]._isSplittable=!0,!0):!1}[n.$flushHTML](){return(0,R.flushHTML)(this)}[n.$addHTML](a,Z){(0,R.addHTML)(this,a,Z)}[n.$getAvailableSpace](){return(0,R.getAvailableSpace)(this)}[n.$toHTML](a){if(g(this),this.presence==="hidden"||this.presence==="inactive"||this.h===0||this.w===0)return o.HTMLResult.EMPTY;(0,e.fixDimensions)(this);const Z=[],Be={id:this[n.$uid],class:[]};(0,e.setAccess)(this,Be.class),this[n.$extra]||(this[n.$extra]=Object.create(null)),Object.assign(this[n.$extra],{children:Z,attributes:Be,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,a.width),height:Math.min(this.h||1/0,a.height)},width:0,height:0,prevHeight:0,currentWidth:0});const Ke=this[n.$isSplittable]();if(Ke||F(this),!(0,R.checkDimensions)(this,a))return o.HTMLResult.FAILURE;const et=new Set(["field"]);if(this.layout.includes("row")){const Ht=this[n.$getSubformParent]().columnWidths;Array.isArray(Ht)&&Ht.length>0&&(this[n.$extra].columnWidths=Ht,this[n.$extra].currentColumn=0)}const dt=(0,e.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),mt=["xfaExclgroup"],bt=(0,e.layoutClass)(this);bt&&mt.push(bt),(0,e.isPrintOnly)(this)&&mt.push("xfaPrintOnly"),Be.style=dt,Be.class=mt,this.name&&(Be.xfaName=this.name),this[n.$pushPara]();const Ot=this.layout==="lr-tb"||this.layout==="rl-tb",Dt=Ot?i:1;for(;this[n.$extra].attempt<Dt;this[n.$extra].attempt++){Ot&&this[n.$extra].attempt===i-1&&(this[n.$extra].numberInLine=0);const Ht=this[n.$childrenToHTML]({filter:et,include:!0});if(Ht.success)break;if(Ht.isBreak())return this[n.$popPara](),Ht;if(Ot&&this[n.$extra].attempt===0&&this[n.$extra].numberInLine===0&&!this[n.$getTemplateRoot]()[n.$extra].noLayoutFailure){this[n.$extra].attempt=Dt;break}}if(this[n.$popPara](),Ke||U(this),this[n.$extra].attempt===Dt)return Ke||delete this[n.$extra],o.HTMLResult.FAILURE;let $t=0,Bt=0;this.margin&&($t=this.margin.leftInset+this.margin.rightInset,Bt=this.margin.topInset+this.margin.bottomInset);const jt=Math.max(this[n.$extra].width+$t,this.w||0),Xt=Math.max(this[n.$extra].height+Bt,this.h||0),Pt=[this.x,this.y,jt,Xt];this.w===""&&(dt.width=(0,e.measureToString)(jt)),this.h===""&&(dt.height=(0,e.measureToString)(Xt));const Gt={name:"div",attributes:Be,children:Z};return N(this,Be),delete this[n.$extra],o.HTMLResult.success((0,e.createWrapper)(this,Gt),Pt)}}class st extends t.XFAObject{constructor(a){super(d,"execute"),this.connection=a.connection||"",this.executeType=(0,o.getStringOption)(a.executeType,["import","remerge"]),this.id=a.id||"",this.runAt=(0,o.getStringOption)(a.runAt,["client","both","server"]),this.use=a.use||"",this.usehref=a.usehref||""}}class Je extends t.XFAObject{constructor(a){super(d,"extras",!0),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||"",this.boolean=new t.XFAObjectArray,this.date=new t.XFAObjectArray,this.dateTime=new t.XFAObjectArray,this.decimal=new t.XFAObjectArray,this.exData=new t.XFAObjectArray,this.extras=new t.XFAObjectArray,this.float=new t.XFAObjectArray,this.image=new t.XFAObjectArray,this.integer=new t.XFAObjectArray,this.text=new t.XFAObjectArray,this.time=new t.XFAObjectArray}}class be extends t.XFAObject{constructor(a){super(d,"field",!0),this.access=(0,o.getStringOption)(a.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=a.accessKey||"",this.anchorType=(0,o.getStringOption)(a.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:a.colSpan,defaultValue:1,validate:Z=>Z>=1||Z===-1}),this.h=a.h?(0,o.getMeasurement)(a.h):"",this.hAlign=(0,o.getStringOption)(a.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=a.id||"",this.locale=a.locale||"",this.maxH=(0,o.getMeasurement)(a.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(a.maxW,"0pt"),this.minH=(0,o.getMeasurement)(a.minH,"0pt"),this.minW=(0,o.getMeasurement)(a.minW,"0pt"),this.name=a.name||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(a.relevant),this.rotate=(0,o.getInteger)({data:a.rotate,defaultValue:0,validate:Z=>Z%90===0}),this.use=a.use||"",this.usehref=a.usehref||"",this.w=a.w?(0,o.getMeasurement)(a.w):"",this.x=(0,o.getMeasurement)(a.x,"0pt"),this.y=(0,o.getMeasurement)(a.y,"0pt"),this.assist=null,this.bind=null,this.border=null,this.calculate=null,this.caption=null,this.desc=null,this.extras=null,this.font=null,this.format=null,this.items=new t.XFAObjectArray(2),this.keep=null,this.margin=null,this.para=null,this.traversal=null,this.ui=null,this.validate=null,this.value=null,this.bindItems=new t.XFAObjectArray,this.connect=new t.XFAObjectArray,this.event=new t.XFAObjectArray,this.setProperty=new t.XFAObjectArray}[n.$isBindable](){return!0}[n.$setValue](a){A(this,a)}[n.$toHTML](a){var Ht,Kt,Wt;if(g(this),!this.ui){this.ui=new bn({}),this.ui[n.$globalData]=this[n.$globalData],this[n.$appendChild](this.ui);let Lt;switch(this.items.children.length){case 0:Lt=new On({}),this.ui.textEdit=Lt;break;case 1:Lt=new W({}),this.ui.checkButton=Lt;break;case 2:Lt=new G({}),this.ui.choiceList=Lt;break}this.ui[n.$appendChild](Lt)}if(!this.ui||this.presence==="hidden"||this.presence==="inactive"||this.h===0||this.w===0)return o.HTMLResult.EMPTY;this.caption&&delete this.caption[n.$extra],this[n.$pushPara]();const Z=this.caption?this.caption[n.$toHTML](a).html:null,Be=this.w,Ke=this.h;let et=0,dt=0;this.margin&&(et=this.margin.leftInset+this.margin.rightInset,dt=this.margin.topInset+this.margin.bottomInset);let mt=null;if(this.w===""||this.h===""){let Lt=null,wt=null,Zt=0,Yt=0;if(this.ui.checkButton)Zt=Yt=this.ui.checkButton.size;else{const{w:tn,h:Qt}=(0,e.layoutNode)(this,a);tn!==null?(Zt=tn,Yt=Qt):Yt=(0,L.getMetrics)(this.font,!0).lineNoGap}if(mt=_(this.ui[n.$getExtra]()),Zt+=mt.w,Yt+=mt.h,this.caption){const{w:tn,h:Qt,isBroken:qt}=this.caption[n.$getExtra](a);if(qt&&this[n.$getSubformParent]()[n.$isThereMoreWidth]())return this[n.$popPara](),o.HTMLResult.FAILURE;switch(Lt=tn,wt=Qt,this.caption.placement){case"left":case"right":case"inline":Lt+=Zt;break;case"top":case"bottom":wt+=Yt;break}}else Lt=Zt,wt=Yt;Lt&&this.w===""&&(Lt+=et,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<Lt?Lt:this.minW)),wt&&this.h===""&&(wt+=dt,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<wt?wt:this.minH))}if(this[n.$popPara](),(0,e.fixDimensions)(this),F(this),!(0,R.checkDimensions)(this,a))return this.w=Be,this.h=Ke,this[n.$popPara](),o.HTMLResult.FAILURE;U(this);const bt=(0,e.toStyle)(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");(0,e.setMinMaxDimensions)(this,bt);const Ot=["xfaField"];this.font&&Ot.push("xfaFont"),(0,e.isPrintOnly)(this)&&Ot.push("xfaPrintOnly");const Dt={style:bt,id:this[n.$uid],class:Ot};bt.margin&&(bt.padding=bt.margin,delete bt.margin),(0,e.setAccess)(this,Ot),this.name&&(Dt.xfaName=this.name);const $t=[],Bt={name:"div",attributes:Dt,children:$t};N(this,Dt);const jt=this.border?this.border[n.$toStyle]():null,Xt=(0,e.computeBbox)(this,Bt,a),Pt=this.ui[n.$toHTML]().html;if(!Pt)return Object.assign(bt,jt),o.HTMLResult.success((0,e.createWrapper)(this,Bt),Xt);this[n.$tabIndex]&&((Ht=Pt.children)!=null&&Ht[0]?Pt.children[0].attributes.tabindex=this[n.$tabIndex]:Pt.attributes.tabindex=this[n.$tabIndex]),Pt.attributes.style||(Pt.attributes.style=Object.create(null));let Gt=null;if(this.ui.button?(Pt.children.length===1&&([Gt]=Pt.children.splice(0,1)),Object.assign(Pt.attributes.style,jt)):Object.assign(bt,jt),$t.push(Pt),this.value){if(this.ui.imageEdit)Pt.children.push(this.value[n.$toHTML]().html);else if(!this.ui.button){let Lt="";if(this.value.exData)Lt=this.value.exData[n.$text]();else if(this.value.text)Lt=this.value.text[n.$getExtra]();else{const wt=this.value[n.$toHTML]().html;wt!==null&&(Lt=wt.children[0].value)}this.ui.textEdit&&((Kt=this.value.text)!=null&&Kt.maxChars)&&(Pt.children[0].attributes.maxLength=this.value.text.maxChars),Lt&&(this.ui.numericEdit&&(Lt=parseFloat(Lt),Lt=isNaN(Lt)?"":Lt.toString()),Pt.children[0].name==="textarea"?Pt.children[0].attributes.textContent=Lt:Pt.children[0].attributes.value=Lt)}}if(!this.ui.imageEdit&&((Wt=Pt.children)!=null&&Wt[0])&&this.h){mt=mt||_(this.ui[n.$getExtra]());let Lt=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){Lt=this.caption.reserve,Lt<=0&&(Lt=this.caption[n.$getExtra](a).h);const wt=this.h-Lt-dt-mt.h;Pt.children[0].attributes.style.height=(0,e.measureToString)(wt)}else Pt.children[0].attributes.style.height="100%"}if(Gt&&Pt.children.push(Gt),!Z)return Pt.attributes.class&&Pt.attributes.class.push("xfaLeft"),this.w=Be,this.h=Ke,o.HTMLResult.success((0,e.createWrapper)(this,Bt),Xt);if(this.ui.button)return bt.padding&&delete bt.padding,Z.name==="div"&&(Z.name="span"),Pt.children.push(Z),o.HTMLResult.success(Bt,Xt);switch(this.ui.checkButton&&(Z.attributes.class[0]="xfaCaptionForCheckButton"),Pt.attributes.class||(Pt.attributes.class=[]),Pt.children.splice(0,0,Z),this.caption.placement){case"left":Pt.attributes.class.push("xfaLeft");break;case"right":Pt.attributes.class.push("xfaRight");break;case"top":Pt.attributes.class.push("xfaTop");break;case"bottom":Pt.attributes.class.push("xfaBottom");break;case"inline":Pt.attributes.class.push("xfaLeft");break}return this.w=Be,this.h=Ke,o.HTMLResult.success((0,e.createWrapper)(this,Bt),Xt)}}P.Field=be;class he extends t.XFAObject{constructor(a){super(d,"fill",!0),this.id=a.id||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[n.$toStyle](){var mt;const a=this[n.$getParent](),Be=a[n.$getParent]()[n.$getParent](),Ke=Object.create(null);let et="color",dt=et;a instanceof q&&(et="background-color",dt="background",Be instanceof bn&&(Ke.backgroundColor="white")),(a instanceof Ft||a instanceof y)&&(et=dt="fill",Ke.fill="white");for(const bt of Object.getOwnPropertyNames(this)){if(bt==="extras"||bt==="color")continue;const Ot=this[bt];if(!(Ot instanceof t.XFAObject))continue;const Dt=Ot[n.$toStyle](this.color);return Dt&&(Ke[Dt.startsWith("#")?et:dt]=Dt),Ke}if((mt=this.color)!=null&&mt.value){const bt=this.color[n.$toStyle]();Ke[bt.startsWith("#")?et:dt]=bt}return Ke}}class ye extends t.XFAObject{constructor(a){super(d,"filter",!0),this.addRevocationInfo=(0,o.getStringOption)(a.addRevocationInfo,["","required","optional","none"]),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||"",this.version=(0,o.getInteger)({data:this.version,defaultValue:5,validate:Z=>Z>=1&&Z<=5}),this.appearanceFilter=null,this.certificates=null,this.digestMethods=null,this.encodings=null,this.encryptionMethods=null,this.handler=null,this.lockDocument=null,this.mdp=null,this.reasons=null,this.timeStamp=null}}class Se extends t.ContentObject{constructor(a){super(d,"float"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){const a=parseFloat(this[n.$content].trim());this[n.$content]=isNaN(a)?null:a}[n.$toHTML](a){return u(this[n.$content]!==null?this[n.$content].toString():"")}}class Oe extends t.XFAObject{constructor(a){super(d,"font",!0),this.baselineShift=(0,o.getMeasurement)(a.baselineShift),this.fontHorizontalScale=(0,o.getFloat)({data:a.fontHorizontalScale,defaultValue:100,validate:Z=>Z>=0}),this.fontVerticalScale=(0,o.getFloat)({data:a.fontVerticalScale,defaultValue:100,validate:Z=>Z>=0}),this.id=a.id||"",this.kerningMode=(0,o.getStringOption)(a.kerningMode,["none","pair"]),this.letterSpacing=(0,o.getMeasurement)(a.letterSpacing,"0"),this.lineThrough=(0,o.getInteger)({data:a.lineThrough,defaultValue:0,validate:Z=>Z===1||Z===2}),this.lineThroughPeriod=(0,o.getStringOption)(a.lineThroughPeriod,["all","word"]),this.overline=(0,o.getInteger)({data:a.overline,defaultValue:0,validate:Z=>Z===1||Z===2}),this.overlinePeriod=(0,o.getStringOption)(a.overlinePeriod,["all","word"]),this.posture=(0,o.getStringOption)(a.posture,["normal","italic"]),this.size=(0,o.getMeasurement)(a.size,"10pt"),this.typeface=a.typeface||"Courier",this.underline=(0,o.getInteger)({data:a.underline,defaultValue:0,validate:Z=>Z===1||Z===2}),this.underlinePeriod=(0,o.getStringOption)(a.underlinePeriod,["all","word"]),this.use=a.use||"",this.usehref=a.usehref||"",this.weight=(0,o.getStringOption)(a.weight,["normal","bold"]),this.extras=null,this.fill=null}[n.$clean](a){super[n.$clean](a),this[n.$globalData].usedTypefaces.add(this.typeface)}[n.$toStyle](){const a=(0,e.toStyle)(this,"fill"),Z=a.color;return Z&&(Z==="#000000"?delete a.color:Z.startsWith("#")||(a.background=Z,a.backgroundClip="text",a.color="transparent")),this.baselineShift&&(a.verticalAlign=(0,e.measureToString)(this.baselineShift)),a.fontKerning=this.kerningMode==="none"?"none":"normal",a.letterSpacing=(0,e.measureToString)(this.letterSpacing),this.lineThrough!==0&&(a.textDecoration="line-through",this.lineThrough===2&&(a.textDecorationStyle="double")),this.overline!==0&&(a.textDecoration="overline",this.overline===2&&(a.textDecorationStyle="double")),a.fontStyle=this.posture,a.fontSize=(0,e.measureToString)(.99*this.size),(0,e.setFontFamily)(this,this,this[n.$globalData].fontFinder,a),this.underline!==0&&(a.textDecoration="underline",this.underline===2&&(a.textDecorationStyle="double")),a.fontWeight=this.weight,a}}class Re extends t.XFAObject{constructor(a){super(d,"format",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.picture=null}}class Ne extends t.StringObject{constructor(a){super(d,"handler"),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||""}}class Ye extends t.XFAObject{constructor(a){super(d,"hyphenation"),this.excludeAllCaps=(0,o.getInteger)({data:a.excludeAllCaps,defaultValue:0,validate:Z=>Z===1}),this.excludeInitialCap=(0,o.getInteger)({data:a.excludeInitialCap,defaultValue:0,validate:Z=>Z===1}),this.hyphenate=(0,o.getInteger)({data:a.hyphenate,defaultValue:0,validate:Z=>Z===1}),this.id=a.id||"",this.pushCharacterCount=(0,o.getInteger)({data:a.pushCharacterCount,defaultValue:3,validate:Z=>Z>=0}),this.remainCharacterCount=(0,o.getInteger)({data:a.remainCharacterCount,defaultValue:3,validate:Z=>Z>=0}),this.use=a.use||"",this.usehref=a.usehref||"",this.wordCharacterCount=(0,o.getInteger)({data:a.wordCharacterCount,defaultValue:7,validate:Z=>Z>=0})}}class Ge extends t.StringObject{constructor(a){super(d,"image"),this.aspect=(0,o.getStringOption)(a.aspect,["fit","actual","height","none","width"]),this.contentType=a.contentType||"",this.href=a.href||"",this.id=a.id||"",this.name=a.name||"",this.transferEncoding=(0,o.getStringOption)(a.transferEncoding,["base64","none","package"]),this.use=a.use||"",this.usehref=a.usehref||""}[n.$toHTML](){if(this.contentType&&!b.has(this.contentType.toLowerCase()))return o.HTMLResult.EMPTY;let a=this[n.$globalData].images&&this[n.$globalData].images.get(this.href);if(!a&&(this.href||!this[n.$content])||(!a&&this.transferEncoding==="base64"&&(a=(0,$.stringToBytes)(atob(this[n.$content]))),!a))return o.HTMLResult.EMPTY;if(!this.contentType){for(const[et,dt]of M)if(a.length>et.length&&et.every((mt,bt)=>mt===a[bt])){this.contentType=dt;break}if(!this.contentType)return o.HTMLResult.EMPTY}const Z=new Blob([a],{type:this.contentType});let Be;switch(this.aspect){case"fit":case"actual":break;case"height":Be={height:"100%",objectFit:"fill"};break;case"none":Be={width:"100%",height:"100%",objectFit:"fill"};break;case"width":Be={width:"100%",objectFit:"fill"};break}const Ke=this[n.$getParent]();return o.HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:Be,src:URL.createObjectURL(Z),alt:Ke?s(Ke[n.$getParent]()):null}})}}class ze extends t.XFAObject{constructor(a){super(d,"imageEdit",!0),this.data=(0,o.getStringOption)(a.data,["link","embed"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.extras=null,this.margin=null}[n.$toHTML](a){return this.data==="embed"?o.HTMLResult.success({name:"div",children:[],attributes:{}}):o.HTMLResult.EMPTY}}class Qe extends t.ContentObject{constructor(a){super(d,"integer"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){const a=parseInt(this[n.$content].trim(),10);this[n.$content]=isNaN(a)?null:a}[n.$toHTML](a){return u(this[n.$content]!==null?this[n.$content].toString():"")}}class tt extends t.XFAObject{constructor(a){super(d,"issuers",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.certificate=new t.XFAObjectArray}}class rt extends t.XFAObject{constructor(a){super(d,"items",!0),this.id=a.id||"",this.name=a.name||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.ref=a.ref||"",this.save=(0,o.getInteger)({data:a.save,defaultValue:0,validate:Z=>Z===1}),this.use=a.use||"",this.usehref=a.usehref||"",this.boolean=new t.XFAObjectArray,this.date=new t.XFAObjectArray,this.dateTime=new t.XFAObjectArray,this.decimal=new t.XFAObjectArray,this.exData=new t.XFAObjectArray,this.float=new t.XFAObjectArray,this.image=new t.XFAObjectArray,this.integer=new t.XFAObjectArray,this.text=new t.XFAObjectArray,this.time=new t.XFAObjectArray}[n.$toHTML](){const a=[];for(const Z of this[n.$getChildren]())a.push(Z[n.$text]());return o.HTMLResult.success(a)}}P.Items=rt;class ut extends t.XFAObject{constructor(a){super(d,"keep",!0),this.id=a.id||"";const Z=["none","contentArea","pageArea"];this.intact=(0,o.getStringOption)(a.intact,Z),this.next=(0,o.getStringOption)(a.next,Z),this.previous=(0,o.getStringOption)(a.previous,Z),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}}class ot extends t.XFAObject{constructor(a){super(d,"keyUsage");const Z=["","yes","no"];this.crlSign=(0,o.getStringOption)(a.crlSign,Z),this.dataEncipherment=(0,o.getStringOption)(a.dataEncipherment,Z),this.decipherOnly=(0,o.getStringOption)(a.decipherOnly,Z),this.digitalSignature=(0,o.getStringOption)(a.digitalSignature,Z),this.encipherOnly=(0,o.getStringOption)(a.encipherOnly,Z),this.id=a.id||"",this.keyAgreement=(0,o.getStringOption)(a.keyAgreement,Z),this.keyCertSign=(0,o.getStringOption)(a.keyCertSign,Z),this.keyEncipherment=(0,o.getStringOption)(a.keyEncipherment,Z),this.nonRepudiation=(0,o.getStringOption)(a.nonRepudiation,Z),this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||""}}class yt extends t.XFAObject{constructor(a){super(d,"line",!0),this.hand=(0,o.getStringOption)(a.hand,["even","left","right"]),this.id=a.id||"",this.slope=(0,o.getStringOption)(a.slope,["\\","/"]),this.use=a.use||"",this.usehref=a.usehref||"",this.edge=null}[n.$toHTML](){const a=this[n.$getParent]()[n.$getParent](),Z=this.edge||new xe({}),Be=Z[n.$toStyle](),Ke=Object.create(null),et=Z.presence==="visible"?Z.thickness:0;Ke.strokeWidth=(0,e.measureToString)(et),Ke.stroke=Be.color;let dt,mt,bt,Ot,Dt="100%",$t="100%";a.w<=et?([dt,mt,bt,Ot]=["50%",0,"50%","100%"],Dt=Ke.strokeWidth):a.h<=et?([dt,mt,bt,Ot]=[0,"50%","100%","50%"],$t=Ke.strokeWidth):this.slope==="\\"?[dt,mt,bt,Ot]=[0,0,"100%","100%"]:[dt,mt,bt,Ot]=[0,"100%","100%",0];const jt={name:"svg",children:[{name:"line",attributes:{xmlns:f,x1:dt,y1:mt,x2:bt,y2:Ot,style:Ke}}],attributes:{xmlns:f,width:Dt,height:$t,style:{overflow:"visible"}}};return H(a)?o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[jt]}):(jt.attributes.style.position="absolute",o.HTMLResult.success(jt))}}class Et extends t.XFAObject{constructor(a){super(d,"linear",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["toRight","toBottom","toLeft","toTop"]),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null}[n.$toStyle](a){a=a?a[n.$toStyle]():"#FFFFFF";const Z=this.type.replace(/([RBLT])/," $1").toLowerCase(),Be=this.color?this.color[n.$toStyle]():"#000000";return`linear-gradient(${Z}, ${a}, ${Be})`}}class We extends t.ContentObject{constructor(a){super(d,"lockDocument"),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){this[n.$content]=(0,o.getStringOption)(this[n.$content],["auto","0","1"])}}class Xe extends t.XFAObject{constructor(a){super(d,"manifest",!0),this.action=(0,o.getStringOption)(a.action,["include","all","exclude"]),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.ref=new t.XFAObjectArray}}class Ze extends t.XFAObject{constructor(a){super(d,"margin",!0),this.bottomInset=(0,o.getMeasurement)(a.bottomInset,"0"),this.id=a.id||"",this.leftInset=(0,o.getMeasurement)(a.leftInset,"0"),this.rightInset=(0,o.getMeasurement)(a.rightInset,"0"),this.topInset=(0,o.getMeasurement)(a.topInset,"0"),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}[n.$toStyle](){return{margin:(0,e.measureToString)(this.topInset)+" "+(0,e.measureToString)(this.rightInset)+" "+(0,e.measureToString)(this.bottomInset)+" "+(0,e.measureToString)(this.leftInset)}}}class it extends t.XFAObject{constructor(a){super(d,"mdp"),this.id=a.id||"",this.permissions=(0,o.getInteger)({data:a.permissions,defaultValue:2,validate:Z=>Z===1||Z===3}),this.signatureType=(0,o.getStringOption)(a.signatureType,["filler","author"]),this.use=a.use||"",this.usehref=a.usehref||""}}class ct extends t.XFAObject{constructor(a){super(d,"medium"),this.id=a.id||"",this.imagingBBox=(0,o.getBBox)(a.imagingBBox),this.long=(0,o.getMeasurement)(a.long),this.orientation=(0,o.getStringOption)(a.orientation,["portrait","landscape"]),this.short=(0,o.getMeasurement)(a.short),this.stock=a.stock||"",this.trayIn=(0,o.getStringOption)(a.trayIn,["auto","delegate","pageFront"]),this.trayOut=(0,o.getStringOption)(a.trayOut,["auto","delegate"]),this.use=a.use||"",this.usehref=a.usehref||""}}class xt extends t.XFAObject{constructor(a){super(d,"message",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.text=new t.XFAObjectArray}}class lt extends t.XFAObject{constructor(a){super(d,"numericEdit",!0),this.hScrollPolicy=(0,o.getStringOption)(a.hScrollPolicy,["auto","off","on"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[n.$toHTML](a){var et;const Z=(0,e.toStyle)(this,"border","font","margin"),Be=this[n.$getParent]()[n.$getParent](),Ke={name:"input",attributes:{type:"text",fieldId:Be[n.$uid],dataId:((et=Be[n.$data])==null?void 0:et[n.$uid])||Be[n.$uid],class:["xfaTextfield"],style:Z,"aria-label":s(Be),"aria-required":!1}};return l(Be)&&(Ke.attributes["aria-required"]=!0,Ke.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[Ke]})}}class nt extends t.XFAObject{constructor(a){super(d,"occur",!0),this.id=a.id||"",this.initial=a.initial!==""?(0,o.getInteger)({data:a.initial,defaultValue:"",validate:Z=>!0}):"",this.max=a.max!==""?(0,o.getInteger)({data:a.max,defaultValue:1,validate:Z=>!0}):"",this.min=a.min!==""?(0,o.getInteger)({data:a.min,defaultValue:1,validate:Z=>!0}):"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}[n.$clean](){const a=this[n.$getParent](),Z=this.min;this.min===""&&(this.min=a instanceof At||a instanceof St?0:1),this.max===""&&(Z===""?this.max=a instanceof At||a instanceof St?-1:1:this.max=this.min),this.max!==-1&&this.max<this.min&&(this.max=this.min),this.initial===""&&(this.initial=a instanceof xn?1:this.min)}}class gt extends t.StringObject{constructor(a){super(d,"oid"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}}class vt extends t.XFAObject{constructor(a){super(d,"oids",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.oid=new t.XFAObjectArray}}class Mt extends t.XFAObject{constructor(a){super(d,"overflow"),this.id=a.id||"",this.leader=a.leader||"",this.target=a.target||"",this.trailer=a.trailer||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$getExtra](){if(!this[n.$extra]){const a=this[n.$getParent](),Z=this[n.$getTemplateRoot](),Be=Z[n.$searchNode](this.target,a),Ke=Z[n.$searchNode](this.leader,a),et=Z[n.$searchNode](this.trailer,a);this[n.$extra]={target:(Be==null?void 0:Be[0])||null,leader:(Ke==null?void 0:Ke[0])||null,trailer:(et==null?void 0:et[0])||null,addLeader:!1,addTrailer:!1}}return this[n.$extra]}}class At extends t.XFAObject{constructor(a){super(d,"pageArea",!0),this.blankOrNotBlank=(0,o.getStringOption)(a.blankOrNotBlank,["any","blank","notBlank"]),this.id=a.id||"",this.initialNumber=(0,o.getInteger)({data:a.initialNumber,defaultValue:1,validate:Z=>!0}),this.name=a.name||"",this.numbered=(0,o.getInteger)({data:a.numbered,defaultValue:1,validate:Z=>!0}),this.oddOrEven=(0,o.getStringOption)(a.oddOrEven,["any","even","odd"]),this.pagePosition=(0,o.getStringOption)(a.pagePosition,["any","first","last","only","rest"]),this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new t.XFAObjectArray,this.contentArea=new t.XFAObjectArray,this.draw=new t.XFAObjectArray,this.exclGroup=new t.XFAObjectArray,this.field=new t.XFAObjectArray,this.subform=new t.XFAObjectArray}[n.$isUsable](){return this[n.$extra]?!this.occur||this.occur.max===-1||this[n.$extra].numberOfUse<this.occur.max:(this[n.$extra]={numberOfUse:0},!0)}[n.$cleanPage](){delete this[n.$extra]}[n.$getNextPage](){this[n.$extra]||(this[n.$extra]={numberOfUse:0});const a=this[n.$getParent]();return a.relation==="orderedOccurrence"&&this[n.$isUsable]()?(this[n.$extra].numberOfUse+=1,this):a[n.$getNextPage]()}[n.$getAvailableSpace](){return this[n.$extra].space||{width:0,height:0}}[n.$toHTML](){this[n.$extra]||(this[n.$extra]={numberOfUse:1});const a=[];this[n.$extra].children=a;const Z=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(Z.width=(0,e.measureToString)(this.medium.short),Z.height=(0,e.measureToString)(this.medium.long),this[n.$extra].space={width:this.medium.short,height:this.medium.long},this.medium.orientation==="landscape"){const Be=Z.width;Z.width=Z.height,Z.height=Be,this[n.$extra].space={width:this.medium.long,height:this.medium.short}}}else(0,$.warn)("XFA - No medium specified in pageArea: please file a bug.");return this[n.$childrenToHTML]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[n.$childrenToHTML]({filter:new Set(["contentArea"]),include:!0}),o.HTMLResult.success({name:"div",children:a,attributes:{class:["xfaPage"],id:this[n.$uid],style:Z,xfaName:this.name}})}}class St extends t.XFAObject{constructor(a){super(d,"pageSet",!0),this.duplexImposition=(0,o.getStringOption)(a.duplexImposition,["longEdge","shortEdge"]),this.id=a.id||"",this.name=a.name||"",this.relation=(0,o.getStringOption)(a.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.occur=null,this.pageArea=new t.XFAObjectArray,this.pageSet=new t.XFAObjectArray}[n.$cleanPage](){for(const a of this.pageArea.children)a[n.$cleanPage]();for(const a of this.pageSet.children)a[n.$cleanPage]()}[n.$isUsable](){return!this.occur||this.occur.max===-1||this[n.$extra].numberOfUse<this.occur.max}[n.$getNextPage](){if(this[n.$extra]||(this[n.$extra]={numberOfUse:1,pageIndex:-1,pageSetIndex:-1}),this.relation==="orderedOccurrence"){if(this[n.$extra].pageIndex+1<this.pageArea.children.length)return this[n.$extra].pageIndex+=1,this.pageArea.children[this[n.$extra].pageIndex][n.$getNextPage]();if(this[n.$extra].pageSetIndex+1<this.pageSet.children.length)return this[n.$extra].pageSetIndex+=1,this.pageSet.children[this[n.$extra].pageSetIndex][n.$getNextPage]();if(this[n.$isUsable]())return this[n.$extra].numberOfUse+=1,this[n.$extra].pageIndex=-1,this[n.$extra].pageSetIndex=-1,this[n.$getNextPage]();const et=this[n.$getParent]();return et instanceof St?et[n.$getNextPage]():(this[n.$cleanPage](),this[n.$getNextPage]())}const a=this[n.$getTemplateRoot]()[n.$extra].pageNumber,Z=a%2===0?"even":"odd",Be=a===0?"first":"rest";let Ke=this.pageArea.children.find(et=>et.oddOrEven===Z&&et.pagePosition===Be);return Ke||(Ke=this.pageArea.children.find(et=>et.oddOrEven==="any"&&et.pagePosition===Be),Ke)||(Ke=this.pageArea.children.find(et=>et.oddOrEven==="any"&&et.pagePosition==="any"),Ke)?Ke:this.pageArea.children[0]}}class It extends t.XFAObject{constructor(a){super(d,"para",!0),this.hAlign=(0,o.getStringOption)(a.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=a.id||"",this.lineHeight=a.lineHeight?(0,o.getMeasurement)(a.lineHeight,"0pt"):"",this.marginLeft=a.marginLeft?(0,o.getMeasurement)(a.marginLeft,"0pt"):"",this.marginRight=a.marginRight?(0,o.getMeasurement)(a.marginRight,"0pt"):"",this.orphans=(0,o.getInteger)({data:a.orphans,defaultValue:0,validate:Z=>Z>=0}),this.preserve=a.preserve||"",this.radixOffset=a.radixOffset?(0,o.getMeasurement)(a.radixOffset,"0pt"):"",this.spaceAbove=a.spaceAbove?(0,o.getMeasurement)(a.spaceAbove,"0pt"):"",this.spaceBelow=a.spaceBelow?(0,o.getMeasurement)(a.spaceBelow,"0pt"):"",this.tabDefault=a.tabDefault?(0,o.getMeasurement)(this.tabDefault):"",this.tabStops=(a.tabStops||"").trim().split(/\s+/).map((Z,Be)=>Be%2===1?(0,o.getMeasurement)(Z):Z),this.textIndent=a.textIndent?(0,o.getMeasurement)(a.textIndent,"0pt"):"",this.use=a.use||"",this.usehref=a.usehref||"",this.vAlign=(0,o.getStringOption)(a.vAlign,["top","bottom","middle"]),this.widows=(0,o.getInteger)({data:a.widows,defaultValue:0,validate:Z=>Z>=0}),this.hyphenation=null}[n.$toStyle](){const a=(0,e.toStyle)(this,"hAlign");return this.marginLeft!==""&&(a.paddingLeft=(0,e.measureToString)(this.marginLeft)),this.marginRight!==""&&(a.paddingight=(0,e.measureToString)(this.marginRight)),this.spaceAbove!==""&&(a.paddingTop=(0,e.measureToString)(this.spaceAbove)),this.spaceBelow!==""&&(a.paddingBottom=(0,e.measureToString)(this.spaceBelow)),this.textIndent!==""&&(a.textIndent=(0,e.measureToString)(this.textIndent),(0,e.fixTextIndent)(a)),this.lineHeight>0&&(a.lineHeight=(0,e.measureToString)(this.lineHeight)),this.tabDefault!==""&&(a.tabSize=(0,e.measureToString)(this.tabDefault)),this.tabStops.length>0,this.hyphenatation&&Object.assign(a,this.hyphenatation[n.$toStyle]()),a}}class pt extends t.XFAObject{constructor(a){super(d,"passwordEdit",!0),this.hScrollPolicy=(0,o.getStringOption)(a.hScrollPolicy,["auto","off","on"]),this.id=a.id||"",this.passwordChar=a.passwordChar||"*",this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.extras=null,this.margin=null}}class Ct extends t.XFAObject{constructor(a){super(d,"pattern",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null}[n.$toStyle](a){a=a?a[n.$toStyle]():"#FFFFFF";const Z=this.color?this.color[n.$toStyle]():"#000000",Be=5,Ke="repeating-linear-gradient",et=`${a},${a} ${Be}px,${Z} ${Be}px,${Z} ${2*Be}px`;switch(this.type){case"crossHatch":return`${Ke}(to top,${et}) ${Ke}(to right,${et})`;case"crossDiagonal":return`${Ke}(45deg,${et}) ${Ke}(-45deg,${et})`;case"diagonalLeft":return`${Ke}(45deg,${et})`;case"diagonalRight":return`${Ke}(-45deg,${et})`;case"horizontal":return`${Ke}(to top,${et})`;case"vertical":return`${Ke}(to right,${et})`}return""}}class ft extends t.StringObject{constructor(a){super(d,"picture"),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||""}}class Tt extends t.XFAObject{constructor(a){super(d,"proto",!0),this.appearanceFilter=new t.XFAObjectArray,this.arc=new t.XFAObjectArray,this.area=new t.XFAObjectArray,this.assist=new t.XFAObjectArray,this.barcode=new t.XFAObjectArray,this.bindItems=new t.XFAObjectArray,this.bookend=new t.XFAObjectArray,this.boolean=new t.XFAObjectArray,this.border=new t.XFAObjectArray,this.break=new t.XFAObjectArray,this.breakAfter=new t.XFAObjectArray,this.breakBefore=new t.XFAObjectArray,this.button=new t.XFAObjectArray,this.calculate=new t.XFAObjectArray,this.caption=new t.XFAObjectArray,this.certificate=new t.XFAObjectArray,this.certificates=new t.XFAObjectArray,this.checkButton=new t.XFAObjectArray,this.choiceList=new t.XFAObjectArray,this.color=new t.XFAObjectArray,this.comb=new t.XFAObjectArray,this.connect=new t.XFAObjectArray,this.contentArea=new t.XFAObjectArray,this.corner=new t.XFAObjectArray,this.date=new t.XFAObjectArray,this.dateTime=new t.XFAObjectArray,this.dateTimeEdit=new t.XFAObjectArray,this.decimal=new t.XFAObjectArray,this.defaultUi=new t.XFAObjectArray,this.desc=new t.XFAObjectArray,this.digestMethod=new t.XFAObjectArray,this.digestMethods=new t.XFAObjectArray,this.draw=new t.XFAObjectArray,this.edge=new t.XFAObjectArray,this.encoding=new t.XFAObjectArray,this.encodings=new t.XFAObjectArray,this.encrypt=new t.XFAObjectArray,this.encryptData=new t.XFAObjectArray,this.encryption=new t.XFAObjectArray,this.encryptionMethod=new t.XFAObjectArray,this.encryptionMethods=new t.XFAObjectArray,this.event=new t.XFAObjectArray,this.exData=new t.XFAObjectArray,this.exObject=new t.XFAObjectArray,this.exclGroup=new t.XFAObjectArray,this.execute=new t.XFAObjectArray,this.extras=new t.XFAObjectArray,this.field=new t.XFAObjectArray,this.fill=new t.XFAObjectArray,this.filter=new t.XFAObjectArray,this.float=new t.XFAObjectArray,this.font=new t.XFAObjectArray,this.format=new t.XFAObjectArray,this.handler=new t.XFAObjectArray,this.hyphenation=new t.XFAObjectArray,this.image=new t.XFAObjectArray,this.imageEdit=new t.XFAObjectArray,this.integer=new t.XFAObjectArray,this.issuers=new t.XFAObjectArray,this.items=new t.XFAObjectArray,this.keep=new t.XFAObjectArray,this.keyUsage=new t.XFAObjectArray,this.line=new t.XFAObjectArray,this.linear=new t.XFAObjectArray,this.lockDocument=new t.XFAObjectArray,this.manifest=new t.XFAObjectArray,this.margin=new t.XFAObjectArray,this.mdp=new t.XFAObjectArray,this.medium=new t.XFAObjectArray,this.message=new t.XFAObjectArray,this.numericEdit=new t.XFAObjectArray,this.occur=new t.XFAObjectArray,this.oid=new t.XFAObjectArray,this.oids=new t.XFAObjectArray,this.overflow=new t.XFAObjectArray,this.pageArea=new t.XFAObjectArray,this.pageSet=new t.XFAObjectArray,this.para=new t.XFAObjectArray,this.passwordEdit=new t.XFAObjectArray,this.pattern=new t.XFAObjectArray,this.picture=new t.XFAObjectArray,this.radial=new t.XFAObjectArray,this.reason=new t.XFAObjectArray,this.reasons=new t.XFAObjectArray,this.rectangle=new t.XFAObjectArray,this.ref=new t.XFAObjectArray,this.script=new t.XFAObjectArray,this.setProperty=new t.XFAObjectArray,this.signData=new t.XFAObjectArray,this.signature=new t.XFAObjectArray,this.signing=new t.XFAObjectArray,this.solid=new t.XFAObjectArray,this.speak=new t.XFAObjectArray,this.stipple=new t.XFAObjectArray,this.subform=new t.XFAObjectArray,this.subformSet=new t.XFAObjectArray,this.subjectDN=new t.XFAObjectArray,this.subjectDNs=new t.XFAObjectArray,this.submit=new t.XFAObjectArray,this.text=new t.XFAObjectArray,this.textEdit=new t.XFAObjectArray,this.time=new t.XFAObjectArray,this.timeStamp=new t.XFAObjectArray,this.toolTip=new t.XFAObjectArray,this.traversal=new t.XFAObjectArray,this.traverse=new t.XFAObjectArray,this.ui=new t.XFAObjectArray,this.validate=new t.XFAObjectArray,this.value=new t.XFAObjectArray,this.variables=new t.XFAObjectArray}}class _t extends t.XFAObject{constructor(a){super(d,"radial",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["toEdge","toCenter"]),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null}[n.$toStyle](a){a=a?a[n.$toStyle]():"#FFFFFF";const Z=this.color?this.color[n.$toStyle]():"#000000";return`radial-gradient(circle at center, ${this.type==="toEdge"?`${a},${Z}`:`${Z},${a}`})`}}class zt extends t.StringObject{constructor(a){super(d,"reason"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}}class kt extends t.XFAObject{constructor(a){super(d,"reasons",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.reason=new t.XFAObjectArray}}class Ft extends t.XFAObject{constructor(a){super(d,"rectangle",!0),this.hand=(0,o.getStringOption)(a.hand,["even","left","right"]),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.corner=new t.XFAObjectArray(4),this.edge=new t.XFAObjectArray(4),this.fill=null}[n.$toHTML](){var Ot;const a=this.edge.children.length?this.edge.children[0]:new xe({}),Z=a[n.$toStyle](),Be=Object.create(null);((Ot=this.fill)==null?void 0:Ot.presence)==="visible"?Object.assign(Be,this.fill[n.$toStyle]()):Be.fill="transparent",Be.strokeWidth=(0,e.measureToString)(a.presence==="visible"?a.thickness:0),Be.stroke=Z.color;const et=(this.corner.children.length?this.corner.children[0]:new ne({}))[n.$toStyle](),mt={name:"svg",children:[{name:"rect",attributes:{xmlns:f,width:"100%",height:"100%",x:0,y:0,rx:et.radius,ry:et.radius,style:Be}}],attributes:{xmlns:f,style:{overflow:"visible"},width:"100%",height:"100%"}},bt=this[n.$getParent]()[n.$getParent]();return H(bt)?o.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[mt]}):(mt.attributes.style.position="absolute",o.HTMLResult.success(mt))}}class Nt extends t.StringObject{constructor(a){super(d,"ref"),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||""}}class Ut extends t.StringObject{constructor(a){super(d,"script"),this.binding=a.binding||"",this.contentType=a.contentType||"",this.id=a.id||"",this.name=a.name||"",this.runAt=(0,o.getStringOption)(a.runAt,["client","both","server"]),this.use=a.use||"",this.usehref=a.usehref||""}}class Vt extends t.XFAObject{constructor(a){super(d,"setProperty"),this.connection=a.connection||"",this.ref=a.ref||"",this.target=a.target||""}}P.SetProperty=Vt;class nn extends t.XFAObject{constructor(a){super(d,"signData",!0),this.id=a.id||"",this.operation=(0,o.getStringOption)(a.operation,["sign","clear","verify"]),this.ref=a.ref||"",this.target=a.target||"",this.use=a.use||"",this.usehref=a.usehref||"",this.filter=null,this.manifest=null}}class Jn extends t.XFAObject{constructor(a){super(d,"signature",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["PDF1.3","PDF1.6"]),this.use=a.use||"",this.usehref=a.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}}class Zn extends t.XFAObject{constructor(a){super(d,"signing",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.certificate=new t.XFAObjectArray}}class Qn extends t.XFAObject{constructor(a){super(d,"solid",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null}[n.$toStyle](a){return a?a[n.$toStyle]():"#FFFFFF"}}class ei extends t.StringObject{constructor(a){super(d,"speak"),this.disable=(0,o.getInteger)({data:a.disable,defaultValue:0,validate:Z=>Z===1}),this.id=a.id||"",this.priority=(0,o.getStringOption)(a.priority,["custom","caption","name","toolTip"]),this.rid=a.rid||"",this.use=a.use||"",this.usehref=a.usehref||""}}class ti extends t.XFAObject{constructor(a){super(d,"stipple",!0),this.id=a.id||"",this.rate=(0,o.getInteger)({data:a.rate,defaultValue:50,validate:Z=>Z>=0&&Z<=100}),this.use=a.use||"",this.usehref=a.usehref||"",this.color=null,this.extras=null}[n.$toStyle](a){const Z=this.rate/100;return $.Util.makeHexColor(Math.round(a.value.r*(1-Z)+this.value.r*Z),Math.round(a.value.g*(1-Z)+this.value.g*Z),Math.round(a.value.b*(1-Z)+this.value.b*Z))}}class En extends t.XFAObject{constructor(a){super(d,"subform",!0),this.access=(0,o.getStringOption)(a.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=(0,o.getInteger)({data:a.allowMacro,defaultValue:0,validate:Z=>Z===1}),this.anchorType=(0,o.getStringOption)(a.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,o.getInteger)({data:a.colSpan,defaultValue:1,validate:Z=>Z>=1||Z===-1}),this.columnWidths=(a.columnWidths||"").trim().split(/\s+/).map(Z=>Z==="-1"?-1:(0,o.getMeasurement)(Z)),this.h=a.h?(0,o.getMeasurement)(a.h):"",this.hAlign=(0,o.getStringOption)(a.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=a.id||"",this.layout=(0,o.getStringOption)(a.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=a.locale||"",this.maxH=(0,o.getMeasurement)(a.maxH,"0pt"),this.maxW=(0,o.getMeasurement)(a.maxW,"0pt"),this.mergeMode=(0,o.getStringOption)(a.mergeMode,["consumeData","matchTemplate"]),this.minH=(0,o.getMeasurement)(a.minH,"0pt"),this.minW=(0,o.getMeasurement)(a.minW,"0pt"),this.name=a.name||"",this.presence=(0,o.getStringOption)(a.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,o.getRelevant)(a.relevant),this.restoreState=(0,o.getStringOption)(a.restoreState,["manual","auto"]),this.scope=(0,o.getStringOption)(a.scope,["name","none"]),this.use=a.use||"",this.usehref=a.usehref||"",this.w=a.w?(0,o.getMeasurement)(a.w):"",this.x=(0,o.getMeasurement)(a.x,"0pt"),this.y=(0,o.getMeasurement)(a.y,"0pt"),this.assist=null,this.bind=null,this.bookend=null,this.border=null,this.break=null,this.calculate=null,this.desc=null,this.extras=null,this.keep=null,this.margin=null,this.occur=null,this.overflow=null,this.pageSet=null,this.para=null,this.traversal=null,this.validate=null,this.variables=null,this.area=new t.XFAObjectArray,this.breakAfter=new t.XFAObjectArray,this.breakBefore=new t.XFAObjectArray,this.connect=new t.XFAObjectArray,this.draw=new t.XFAObjectArray,this.event=new t.XFAObjectArray,this.exObject=new t.XFAObjectArray,this.exclGroup=new t.XFAObjectArray,this.field=new t.XFAObjectArray,this.proto=new t.XFAObjectArray,this.setProperty=new t.XFAObjectArray,this.subform=new t.XFAObjectArray,this.subformSet=new t.XFAObjectArray}[n.$getSubformParent](){const a=this[n.$getParent]();return a instanceof mn?a[n.$getSubformParent]():a}[n.$isBindable](){return!0}[n.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&this[n.$extra].attempt===0&&this[n.$extra].numberInLine>0||this[n.$getParent]()[n.$isThereMoreWidth]()}*[n.$getContainedChildren](){yield*E(this)}[n.$flushHTML](){return(0,R.flushHTML)(this)}[n.$addHTML](a,Z){(0,R.addHTML)(this,a,Z)}[n.$getAvailableSpace](){return(0,R.getAvailableSpace)(this)}[n.$isSplittable](){var Z;const a=this[n.$getSubformParent]();return a[n.$isSplittable]()?this[n.$extra]._isSplittable!==void 0?this[n.$extra]._isSplittable:this.layout==="position"||this.layout.includes("row")?(this[n.$extra]._isSplittable=!1,!1):this.keep&&this.keep.intact!=="none"?(this[n.$extra]._isSplittable=!1,!1):(Z=a.layout)!=null&&Z.endsWith("-tb")&&a[n.$extra].numberInLine!==0?!1:(this[n.$extra]._isSplittable=!0,!0):!1}[n.$toHTML](a){var Lt;if(g(this),this.break){if(this.break.after!=="auto"||this.break.afterTarget!==""){const wt=new K({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});wt[n.$globalData]=this[n.$globalData],this[n.$appendChild](wt),this.breakAfter.push(wt)}if(this.break.before!=="auto"||this.break.beforeTarget!==""){const wt=new oe({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});wt[n.$globalData]=this[n.$globalData],this[n.$appendChild](wt),this.breakBefore.push(wt)}if(this.break.overflowTarget!==""){const wt=new Mt({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});wt[n.$globalData]=this[n.$globalData],this[n.$appendChild](wt),this.overflow.push(wt)}this[n.$removeChild](this.break),this.break=null}if(this.presence==="hidden"||this.presence==="inactive")return o.HTMLResult.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&(0,$.warn)("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){const wt=this.breakBefore.children[0];if(O(wt))return o.HTMLResult.breakNode(wt)}if((Lt=this[n.$extra])!=null&&Lt.afterBreakAfter)return o.HTMLResult.EMPTY;(0,e.fixDimensions)(this);const Z=[],Be={id:this[n.$uid],class:[]};(0,e.setAccess)(this,Be.class),this[n.$extra]||(this[n.$extra]=Object.create(null)),Object.assign(this[n.$extra],{children:Z,line:null,attributes:Be,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,a.width),height:Math.min(this.h||1/0,a.height)},width:0,height:0,prevHeight:0,currentWidth:0});const Ke=this[n.$getTemplateRoot](),et=Ke[n.$extra].noLayoutFailure,dt=this[n.$isSplittable]();if(dt||F(this),!(0,R.checkDimensions)(this,a))return o.HTMLResult.FAILURE;const mt=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const wt=this[n.$getSubformParent]().columnWidths;Array.isArray(wt)&&wt.length>0&&(this[n.$extra].columnWidths=wt,this[n.$extra].currentColumn=0)}const bt=(0,e.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),Ot=["xfaSubform"],Dt=(0,e.layoutClass)(this);if(Dt&&Ot.push(Dt),Be.style=bt,Be.class=Ot,this.name&&(Be.xfaName=this.name),this.overflow){const wt=this.overflow[n.$getExtra]();wt.addLeader&&(wt.addLeader=!1,m(this,wt.leader,a))}this[n.$pushPara]();const $t=this.layout==="lr-tb"||this.layout==="rl-tb",Bt=$t?i:1;for(;this[n.$extra].attempt<Bt;this[n.$extra].attempt++){$t&&this[n.$extra].attempt===i-1&&(this[n.$extra].numberInLine=0);const wt=this[n.$childrenToHTML]({filter:mt,include:!0});if(wt.success)break;if(wt.isBreak())return this[n.$popPara](),wt;if($t&&this[n.$extra].attempt===0&&this[n.$extra].numberInLine===0&&!Ke[n.$extra].noLayoutFailure){this[n.$extra].attempt=Bt;break}}if(this[n.$popPara](),dt||U(this),Ke[n.$extra].noLayoutFailure=et,this[n.$extra].attempt===Bt)return this.overflow&&(this[n.$getTemplateRoot]()[n.$extra].overflowNode=this.overflow),dt||delete this[n.$extra],o.HTMLResult.FAILURE;if(this.overflow){const wt=this.overflow[n.$getExtra]();wt.addTrailer&&(wt.addTrailer=!1,m(this,wt.trailer,a))}let jt=0,Xt=0;this.margin&&(jt=this.margin.leftInset+this.margin.rightInset,Xt=this.margin.topInset+this.margin.bottomInset);const Pt=Math.max(this[n.$extra].width+jt,this.w||0),Gt=Math.max(this[n.$extra].height+Xt,this.h||0),Ht=[this.x,this.y,Pt,Gt];if(this.w===""&&(bt.width=(0,e.measureToString)(Pt)),this.h===""&&(bt.height=(0,e.measureToString)(Gt)),(bt.width==="0px"||bt.height==="0px")&&Z.length===0)return o.HTMLResult.EMPTY;const Kt={name:"div",attributes:Be,children:Z};N(this,Be);const Wt=o.HTMLResult.success((0,e.createWrapper)(this,Kt),Ht);if(this.breakAfter.children.length>=1){const wt=this.breakAfter.children[0];if(O(wt))return this[n.$extra].afterBreakAfter=Wt,o.HTMLResult.breakNode(wt)}return delete this[n.$extra],Wt}}class mn extends t.XFAObject{constructor(a){super(d,"subformSet",!0),this.id=a.id||"",this.name=a.name||"",this.relation=(0,o.getStringOption)(a.relation,["ordered","choice","unordered"]),this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new t.XFAObjectArray,this.breakBefore=new t.XFAObjectArray,this.subform=new t.XFAObjectArray,this.subformSet=new t.XFAObjectArray}*[n.$getContainedChildren](){yield*E(this)}[n.$getSubformParent](){let a=this[n.$getParent]();for(;!(a instanceof En);)a=a[n.$getParent]();return a}[n.$isBindable](){return!0}}class ni extends t.ContentObject{constructor(a){super(d,"subjectDN"),this.delimiter=a.delimiter||",",this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){this[n.$content]=new Map(this[n.$content].split(this.delimiter).map(a=>(a=a.split("=",2),a[0]=a[0].trim(),a)))}}class ii extends t.XFAObject{constructor(a){super(d,"subjectDNs",!0),this.id=a.id||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||"",this.subjectDN=new t.XFAObjectArray}}class ai extends t.XFAObject{constructor(a){super(d,"submit",!0),this.embedPDF=(0,o.getInteger)({data:a.embedPDF,defaultValue:0,validate:Z=>Z===1}),this.format=(0,o.getStringOption)(a.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=a.id||"",this.target=a.target||"",this.textEncoding=(0,o.getKeyword)({data:a.textEncoding?a.textEncoding.toLowerCase():"",defaultValue:"",validate:Z=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(Z)||Z.match(/iso-8859-\d{2}/)}),this.use=a.use||"",this.usehref=a.usehref||"",this.xdpContent=a.xdpContent||"",this.encrypt=null,this.encryptData=new t.XFAObjectArray,this.signData=new t.XFAObjectArray}}class xn extends t.XFAObject{constructor(a){super(d,"template",!0),this.baseProfile=(0,o.getStringOption)(a.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new t.XFAObjectArray}[n.$finalize](){this.subform.children.length===0&&(0,$.warn)("XFA - No subforms in template node."),this.subform.children.length>=2&&(0,$.warn)("XFA - Several subforms in template node: please file a bug."),this[n.$tabIndex]=w}[n.$isSplittable](){return!0}[n.$searchNode](a,Z){return a.startsWith("#")?[this[n.$ids].get(a.slice(1))]:(0,T.searchNode)(this,Z,a,!0,!0)}*[n.$toPages](){var Xt,Pt,Gt;if(!this.subform.children.length)return o.HTMLResult.success({name:"div",children:[]});this[n.$extra]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const a=this.subform.children[0];a.pageSet[n.$cleanPage]();const Z=a.pageSet.pageArea.children,Be={name:"div",children:[]};let Ke=null,et=null,dt=null;if(a.breakBefore.children.length>=1?(et=a.breakBefore.children[0],dt=et.target):a.subform.children.length>=1&&a.subform.children[0].breakBefore.children.length>=1?(et=a.subform.children[0].breakBefore.children[0],dt=et.target):(Xt=a.break)!=null&&Xt.beforeTarget?(et=a.break,dt=et.beforeTarget):a.subform.children.length>=1&&((Pt=a.subform.children[0].break)!=null&&Pt.beforeTarget)&&(et=a.subform.children[0].break,dt=et.beforeTarget),et){const Ht=this[n.$searchNode](dt,et[n.$getParent]());Ht instanceof At&&(Ke=Ht,et[n.$extra]={})}Ke||(Ke=Z[0]),Ke[n.$extra]={numberOfUse:1};const mt=Ke[n.$getParent]();mt[n.$extra]={numberOfUse:1,pageIndex:mt.pageArea.children.indexOf(Ke),pageSetIndex:0};let bt,Ot=null,Dt=null,$t=!0,Bt=0,jt=0;for(;;){if($t)Bt=0;else if(Be.children.pop(),++Bt===S)return(0,$.warn)("XFA - Something goes wrong: please file a bug."),Be;bt=null,this[n.$extra].currentPageArea=Ke;const Ht=Ke[n.$toHTML]().html;Be.children.push(Ht),Ot&&(this[n.$extra].noLayoutFailure=!0,Ht.children.push(Ot[n.$toHTML](Ke[n.$extra].space).html),Ot=null),Dt&&(this[n.$extra].noLayoutFailure=!0,Ht.children.push(Dt[n.$toHTML](Ke[n.$extra].space).html),Dt=null);const Kt=Ke.contentArea.children,Wt=Ht.children.filter(wt=>wt.attributes.class.includes("xfaContentarea"));$t=!1,this[n.$extra].firstUnsplittable=null,this[n.$extra].noLayoutFailure=!1;const Lt=wt=>{var Yt;const Zt=a[n.$flushHTML]();Zt&&($t||($t=((Yt=Zt.children)==null?void 0:Yt.length)>0),Wt[wt].children.push(Zt))};for(let wt=jt,Zt=Kt.length;wt<Zt;wt++){const Yt=this[n.$extra].currentContentArea=Kt[wt],tn={width:Yt.w,height:Yt.h};jt=0,Ot&&(Wt[wt].children.push(Ot[n.$toHTML](tn).html),Ot=null),Dt&&(Wt[wt].children.push(Dt[n.$toHTML](tn).html),Dt=null);const Qt=a[n.$toHTML](tn);if(Qt.success)return Qt.html?($t||($t=((Gt=Qt.html.children)==null?void 0:Gt.length)>0),Wt[wt].children.push(Qt.html)):!$t&&Be.children.length>1&&Be.children.pop(),Be;if(Qt.isBreak()){const qt=Qt.breakNode;if(Lt(wt),qt.targetType==="auto")continue;qt.leader&&(Ot=this[n.$searchNode](qt.leader,qt[n.$getParent]()),Ot=Ot?Ot[0]:null),qt.trailer&&(Dt=this[n.$searchNode](qt.trailer,qt[n.$getParent]()),Dt=Dt?Dt[0]:null),qt.targetType==="pageArea"?(bt=qt[n.$extra].target,wt=1/0):qt[n.$extra].target?(bt=qt[n.$extra].target,jt=qt[n.$extra].index+1,wt=1/0):wt=qt[n.$extra].index;continue}if(this[n.$extra].overflowNode){const qt=this[n.$extra].overflowNode;this[n.$extra].overflowNode=null;const yn=qt[n.$getExtra](),on=yn.target;yn.addLeader=yn.leader!==null,yn.addTrailer=yn.trailer!==null,Lt(wt);const Va=wt;if(wt=1/0,on instanceof At)bt=on;else if(on instanceof se){const Pn=Kt.indexOf(on);Pn!==-1?Pn>Va?wt=Pn-1:jt=Pn:(bt=on[n.$getParent](),jt=bt.contentArea.children.indexOf(on))}continue}Lt(wt)}this[n.$extra].pageNumber+=1,bt&&(bt[n.$isUsable]()?bt[n.$extra].numberOfUse+=1:bt=null),Ke=bt||Ke[n.$getNextPage](),yield null}}}P.Template=xn;class In extends t.ContentObject{constructor(a){super(d,"text"),this.id=a.id||"",this.maxChars=(0,o.getInteger)({data:a.maxChars,defaultValue:0,validate:Z=>Z>=0}),this.name=a.name||"",this.rid=a.rid||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$acceptWhitespace](){return!0}[n.$onChild](a){return a[n.$namespaceId]===k.NamespaceIds.xhtml.id?(this[n.$content]=a,!0):((0,$.warn)(`XFA - Invalid content in Text: ${a[n.$nodeName]}.`),!1)}[n.$onText](a){this[n.$content]instanceof t.XFAObject||super[n.$onText](a)}[n.$finalize](){typeof this[n.$content]=="string"&&(this[n.$content]=this[n.$content].replaceAll(`\r
`,`
`))}[n.$getExtra](){return typeof this[n.$content]=="string"?this[n.$content].split(/[\u2029\u2028\n]/).reduce((a,Z)=>(Z&&a.push(Z),a),[]).join(`
`):this[n.$content][n.$text]()}[n.$toHTML](a){if(typeof this[n.$content]=="string"){const Z=u(this[n.$content]).html;return this[n.$content].includes("\u2029")?(Z.name="div",Z.children=[],this[n.$content].split("\u2029").map(Be=>Be.split(/[\u2028\n]/).reduce((Ke,et)=>(Ke.push({name:"span",value:et},{name:"br"}),Ke),[])).forEach(Be=>{Z.children.push({name:"p",children:Be})})):/[\u2028\n]/.test(this[n.$content])&&(Z.name="div",Z.children=[],this[n.$content].split(/[\u2028\n]/).forEach(Be=>{Z.children.push({name:"span",value:Be},{name:"br"})})),o.HTMLResult.success(Z)}return this[n.$content][n.$toHTML](a)}}P.Text=In;class On extends t.XFAObject{constructor(a){super(d,"textEdit",!0),this.allowRichText=(0,o.getInteger)({data:a.allowRichText,defaultValue:0,validate:Z=>Z===1}),this.hScrollPolicy=(0,o.getStringOption)(a.hScrollPolicy,["auto","off","on"]),this.id=a.id||"",this.multiLine=(0,o.getInteger)({data:a.multiLine,defaultValue:"",validate:Z=>Z===0||Z===1}),this.use=a.use||"",this.usehref=a.usehref||"",this.vScrollPolicy=(0,o.getStringOption)(a.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[n.$toHTML](a){var et,dt;const Z=(0,e.toStyle)(this,"border","font","margin");let Be;const Ke=this[n.$getParent]()[n.$getParent]();return this.multiLine===""&&(this.multiLine=Ke instanceof fe?1:0),this.multiLine===1?Be={name:"textarea",attributes:{dataId:((et=Ke[n.$data])==null?void 0:et[n.$uid])||Ke[n.$uid],fieldId:Ke[n.$uid],class:["xfaTextfield"],style:Z,"aria-label":s(Ke),"aria-required":!1}}:Be={name:"input",attributes:{type:"text",dataId:((dt=Ke[n.$data])==null?void 0:dt[n.$uid])||Ke[n.$uid],fieldId:Ke[n.$uid],class:["xfaTextfield"],style:Z,"aria-label":s(Ke),"aria-required":!1}},l(Ke)&&(Be.attributes["aria-required"]=!0,Be.attributes.required=!0),o.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[Be]})}}class si extends t.StringObject{constructor(a){super(d,"time"),this.id=a.id||"",this.name=a.name||"",this.use=a.use||"",this.usehref=a.usehref||""}[n.$finalize](){const a=this[n.$content].trim();this[n.$content]=a?new Date(a):null}[n.$toHTML](a){return u(this[n.$content]?this[n.$content].toString():"")}}class ri extends t.XFAObject{constructor(a){super(d,"timeStamp"),this.id=a.id||"",this.server=a.server||"",this.type=(0,o.getStringOption)(a.type,["optional","required"]),this.use=a.use||"",this.usehref=a.usehref||""}}class oi extends t.StringObject{constructor(a){super(d,"toolTip"),this.id=a.id||"",this.rid=a.rid||"",this.use=a.use||"",this.usehref=a.usehref||""}}class ci extends t.XFAObject{constructor(a){super(d,"traversal",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.traverse=new t.XFAObjectArray}}class li extends t.XFAObject{constructor(a){super(d,"traverse",!0),this.id=a.id||"",this.operation=(0,o.getStringOption)(a.operation,["next","back","down","first","left","right","up"]),this.ref=a.ref||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[n.$isTransparent](){return!1}}class bn extends t.XFAObject{constructor(a){super(d,"ui",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.picture=null,this.barcode=null,this.button=null,this.checkButton=null,this.choiceList=null,this.dateTimeEdit=null,this.defaultUi=null,this.imageEdit=null,this.numericEdit=null,this.passwordEdit=null,this.signature=null,this.textEdit=null}[n.$getExtra](){if(this[n.$extra]===void 0){for(const a of Object.getOwnPropertyNames(this)){if(a==="extras"||a==="picture")continue;const Z=this[a];if(Z instanceof t.XFAObject)return this[n.$extra]=Z,Z}this[n.$extra]=null}return this[n.$extra]}[n.$toHTML](a){const Z=this[n.$getExtra]();return Z?Z[n.$toHTML](a):o.HTMLResult.EMPTY}}class hi extends t.XFAObject{constructor(a){super(d,"validate",!0),this.formatTest=(0,o.getStringOption)(a.formatTest,["warning","disabled","error"]),this.id=a.id||"",this.nullTest=(0,o.getStringOption)(a.nullTest,["disabled","error","warning"]),this.scriptTest=(0,o.getStringOption)(a.scriptTest,["error","disabled","warning"]),this.use=a.use||"",this.usehref=a.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class sn extends t.XFAObject{constructor(a){super(d,"value",!0),this.id=a.id||"",this.override=(0,o.getInteger)({data:a.override,defaultValue:0,validate:Z=>Z===1}),this.relevant=(0,o.getRelevant)(a.relevant),this.use=a.use||"",this.usehref=a.usehref||"",this.arc=null,this.boolean=null,this.date=null,this.dateTime=null,this.decimal=null,this.exData=null,this.float=null,this.image=null,this.integer=null,this.line=null,this.rectangle=null,this.text=null,this.time=null}[n.$setValue](a){var Ke;const Z=this[n.$getParent]();if(Z instanceof be&&(Ke=Z.ui)!=null&&Ke.imageEdit){this.image||(this.image=new Ge({}),this[n.$appendChild](this.image)),this.image[n.$content]=a[n.$content];return}const Be=a[n.$nodeName];if(this[Be]!==null){this[Be][n.$content]=a[n.$content];return}for(const et of Object.getOwnPropertyNames(this)){const dt=this[et];dt instanceof t.XFAObject&&(this[et]=null,this[n.$removeChild](dt))}this[a[n.$nodeName]]=a,this[n.$appendChild](a)}[n.$text](){if(this.exData)return typeof this.exData[n.$content]=="string"?this.exData[n.$content].trim():this.exData[n.$content][n.$text]().trim();for(const a of Object.getOwnPropertyNames(this)){if(a==="image")continue;const Z=this[a];if(Z instanceof t.XFAObject)return(Z[n.$content]||"").toString().trim()}return null}[n.$toHTML](a){for(const Z of Object.getOwnPropertyNames(this)){const Be=this[Z];if(Be instanceof t.XFAObject)return Be[n.$toHTML](a)}return o.HTMLResult.EMPTY}}P.Value=sn;class ui extends t.XFAObject{constructor(a){super(d,"variables",!0),this.id=a.id||"",this.use=a.use||"",this.usehref=a.usehref||"",this.boolean=new t.XFAObjectArray,this.date=new t.XFAObjectArray,this.dateTime=new t.XFAObjectArray,this.decimal=new t.XFAObjectArray,this.exData=new t.XFAObjectArray,this.float=new t.XFAObjectArray,this.image=new t.XFAObjectArray,this.integer=new t.XFAObjectArray,this.manifest=new t.XFAObjectArray,this.script=new t.XFAObjectArray,this.text=new t.XFAObjectArray,this.time=new t.XFAObjectArray}[n.$isTransparent](){return!0}}class rn{static[k.$buildXFAObject](a,Z){if(rn.hasOwnProperty(a)){const Be=rn[a](Z);return Be[n.$setSetAttributes](Z),Be}}static appearanceFilter(a){return new x(a)}static arc(a){return new y(a)}static area(a){return new r(a)}static assist(a){return new p(a)}static barcode(a){return new c(a)}static bind(a){return new h(a)}static bindItems(a){return new C(a)}static bookend(a){return new D(a)}static boolean(a){return new X(a)}static border(a){return new q(a)}static break(a){return new re(a)}static breakAfter(a){return new K(a)}static breakBefore(a){return new oe(a)}static button(a){return new J(a)}static calculate(a){return new te(a)}static caption(a){return new B(a)}static certificate(a){return new j(a)}static certificates(a){return new Y(a)}static checkButton(a){return new W(a)}static choiceList(a){return new G(a)}static color(a){return new Q(a)}static comb(a){return new ee(a)}static connect(a){return new z(a)}static contentArea(a){return new se(a)}static corner(a){return new ne(a)}static date(a){return new V(a)}static dateTime(a){return new ae(a)}static dateTimeEdit(a){return new ce(a)}static decimal(a){return new de(a)}static defaultUi(a){return new Ae(a)}static desc(a){return new ve(a)}static digestMethod(a){return new pe(a)}static digestMethods(a){return new ge(a)}static draw(a){return new fe(a)}static edge(a){return new xe(a)}static encoding(a){return new Te(a)}static encodings(a){return new Le(a)}static encrypt(a){return new Ie(a)}static encryptData(a){return new ue(a)}static encryption(a){return new me(a)}static encryptionMethod(a){return new De(a)}static encryptionMethods(a){return new Fe(a)}static event(a){return new je(a)}static exData(a){return new Ue(a)}static exObject(a){return new ht(a)}static exclGroup(a){return new _e(a)}static execute(a){return new st(a)}static extras(a){return new Je(a)}static field(a){return new be(a)}static fill(a){return new he(a)}static filter(a){return new ye(a)}static float(a){return new Se(a)}static font(a){return new Oe(a)}static format(a){return new Re(a)}static handler(a){return new Ne(a)}static hyphenation(a){return new Ye(a)}static image(a){return new Ge(a)}static imageEdit(a){return new ze(a)}static integer(a){return new Qe(a)}static issuers(a){return new tt(a)}static items(a){return new rt(a)}static keep(a){return new ut(a)}static keyUsage(a){return new ot(a)}static line(a){return new yt(a)}static linear(a){return new Et(a)}static lockDocument(a){return new We(a)}static manifest(a){return new Xe(a)}static margin(a){return new Ze(a)}static mdp(a){return new it(a)}static medium(a){return new ct(a)}static message(a){return new xt(a)}static numericEdit(a){return new lt(a)}static occur(a){return new nt(a)}static oid(a){return new gt(a)}static oids(a){return new vt(a)}static overflow(a){return new Mt(a)}static pageArea(a){return new At(a)}static pageSet(a){return new St(a)}static para(a){return new It(a)}static passwordEdit(a){return new pt(a)}static pattern(a){return new Ct(a)}static picture(a){return new ft(a)}static proto(a){return new Tt(a)}static radial(a){return new _t(a)}static reason(a){return new zt(a)}static reasons(a){return new kt(a)}static rectangle(a){return new Ft(a)}static ref(a){return new Nt(a)}static script(a){return new Ut(a)}static setProperty(a){return new Vt(a)}static signData(a){return new nn(a)}static signature(a){return new Jn(a)}static signing(a){return new Zn(a)}static solid(a){return new Qn(a)}static speak(a){return new ei(a)}static stipple(a){return new ti(a)}static subform(a){return new En(a)}static subformSet(a){return new mn(a)}static subjectDN(a){return new ni(a)}static subjectDNs(a){return new ii(a)}static submit(a){return new ai(a)}static template(a){return new xn(a)}static text(a){return new In(a)}static textEdit(a){return new On(a)}static time(a){return new si(a)}static timeStamp(a){return new ri(a)}static toolTip(a){return new oi(a)}static traversal(a){return new ci(a)}static traverse(a){return new li(a)}static ui(a){return new bn(a)}static validate(a){return new hi(a)}static value(a){return new sn(a)}static variables(a){return new ui(a)}}P.TemplateNamespace=rn},(ke,P)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.NamespaceIds=P.$buildXFAObject=void 0;const ie=Symbol();P.$buildXFAObject=ie;const n={config:{id:0,check:k=>k.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:k=>k.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:k=>k.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:k=>k.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:k=>k.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:k=>k==="http://ns.adobe.com/xdp/pdf/"},signature:{id:6,check:k=>k==="http://www.w3.org/2000/09/xmldsig#"},sourceSet:{id:7,check:k=>k.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:k=>k==="http://www.w3.org/1999/XSL/Transform"},template:{id:9,check:k=>k.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:k=>k.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:k=>k==="http://ns.adobe.com/xdp/"},xfdf:{id:12,check:k=>k==="http://ns.adobe.com/xfdf/"},xhtml:{id:13,check:k=>k==="http://www.w3.org/1999/xhtml"},xmpmeta:{id:14,check:k=>k==="http://ns.adobe.com/xmpmeta/"}};P.NamespaceIds=n},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.addHTML=t,P.checkDimensions=L,P.flushHTML=e,P.getAvailableSpace=o;var n=ie(78),k=ie(83);function R(I,T){return{name:"div",attributes:{class:[I.layout==="lr-tb"?"xfaLr":"xfaRl"]},children:T}}function e(I){if(!I[n.$extra])return null;const d={name:"div",attributes:I[n.$extra].attributes,children:I[n.$extra].children};if(I[n.$extra].failingNode){const f=I[n.$extra].failingNode[n.$flushHTML]();f&&(I.layout.endsWith("-tb")?d.children.push(R(I,[f])):d.children.push(f))}return d.children.length===0?null:d}function t(I,T,d){const f=I[n.$extra],i=f.availableSpace,[S,w,v,b]=d;switch(I.layout){case"position":{f.width=Math.max(f.width,S+v),f.height=Math.max(f.height,w+b),f.children.push(T);break}case"lr-tb":case"rl-tb":(!f.line||f.attempt===1)&&(f.line=R(I,[]),f.children.push(f.line),f.numberInLine=0),f.numberInLine+=1,f.line.children.push(T),f.attempt===0?(f.currentWidth+=v,f.height=Math.max(f.height,f.prevHeight+b)):(f.currentWidth=v,f.prevHeight=f.height,f.height+=b,f.attempt=0),f.width=Math.max(f.width,f.currentWidth);break;case"rl-row":case"row":{f.children.push(T),f.width+=v,f.height=Math.max(f.height,b);const M=(0,k.measureToString)(f.height);for(const _ of f.children)_.attributes.style.height=M;break}case"table":{f.width=Math.min(i.width,Math.max(f.width,v)),f.height+=b,f.children.push(T);break}case"tb":{f.width=Math.min(i.width,Math.max(f.width,v)),f.height+=b,f.children.push(T);break}}}function o(I){const T=I[n.$extra].availableSpace,d=I.margin?I.margin.topInset+I.margin.bottomInset:0,f=I.margin?I.margin.leftInset+I.margin.rightInset:0;switch(I.layout){case"lr-tb":case"rl-tb":return I[n.$extra].attempt===0?{width:T.width-f-I[n.$extra].currentWidth,height:T.height-d-I[n.$extra].prevHeight}:{width:T.width-f,height:T.height-d-I[n.$extra].height};case"rl-row":case"row":return{width:I[n.$extra].columnWidths.slice(I[n.$extra].currentColumn).reduce((S,w)=>S+w),height:T.height-f};case"table":case"tb":return{width:T.width-f,height:T.height-d-I[n.$extra].height};case"position":default:return T}}function $(I){let T=I.w===""?NaN:I.w,d=I.h===""?NaN:I.h,[f,i]=[0,0];switch(I.anchorType||""){case"bottomCenter":[f,i]=[T/2,d];break;case"bottomLeft":[f,i]=[0,d];break;case"bottomRight":[f,i]=[T,d];break;case"middleCenter":[f,i]=[T/2,d/2];break;case"middleLeft":[f,i]=[0,d/2];break;case"middleRight":[f,i]=[T,d/2];break;case"topCenter":[f,i]=[T/2,0];break;case"topRight":[f,i]=[T,0];break}let S,w;switch(I.rotate||0){case 0:[S,w]=[-f,-i];break;case 90:[S,w]=[-i,f],[T,d]=[d,-T];break;case 180:[S,w]=[f,i],[T,d]=[-T,-d];break;case 270:[S,w]=[i,-f],[T,d]=[-d,T];break}return[I.x+S+Math.min(0,T),I.y+w+Math.min(0,d),Math.abs(T),Math.abs(d)]}function L(I,T){var b;if(I[n.$getTemplateRoot]()[n.$extra].firstUnsplittable===null||I.w===0||I.h===0)return!0;const d=2,f=I[n.$getSubformParent](),i=((b=f[n.$extra])==null?void 0:b.attempt)||0,[,S,w,v]=$(I);switch(f.layout){case"lr-tb":case"rl-tb":return i===0?I[n.$getTemplateRoot]()[n.$extra].noLayoutFailure?I.w!==""?Math.round(w-T.width)<=d:T.width>d:I.h!==""&&Math.round(v-T.height)>d?!1:I.w!==""?Math.round(w-T.width)<=d?!0:f[n.$extra].numberInLine===0?T.height>d:!1:T.width>d:I[n.$getTemplateRoot]()[n.$extra].noLayoutFailure?!0:I.h!==""&&Math.round(v-T.height)>d?!1:I.w===""||Math.round(w-T.width)<=d?T.height>d:f[n.$isThereMoreWidth]()?!1:T.height>d;case"table":case"tb":return I[n.$getTemplateRoot]()[n.$extra].noLayoutFailure?!0:I.h!==""&&!I[n.$isSplittable]()?Math.round(v-T.height)<=d:I.w===""||Math.round(w-T.width)<=d?T.height>d:f[n.$isThereMoreWidth]()?!1:T.height>d;case"position":if(I[n.$getTemplateRoot]()[n.$extra].noLayoutFailure||I.h===""||Math.round(v+S-T.height)<=d)return!0;const M=I[n.$getTemplateRoot]()[n.$extra].currentContentArea;return v+S>M.h;case"rl-row":case"row":return I[n.$getTemplateRoot]()[n.$extra].noLayoutFailure?!0:I.h!==""?Math.round(v-T.height)<=d:!0;default:return!0}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.computeBbox=f,P.createWrapper=v,P.fixDimensions=i,P.fixTextIndent=b,P.fixURL=l,P.isPrintOnly=_,P.layoutClass=S,P.layoutNode=d,P.measureToString=$,P.setAccess=M,P.setFontFamily=E,P.setMinMaxDimensions=I,P.setPara=A,P.toStyle=w;var n=ie(78),k=ie(2),R=ie(84),e=ie(85),t=ie(86),o=ie(87);function $(g){return typeof g=="string"?"0px":Number.isInteger(g)?`${g}px`:`${g.toFixed(2)}px`}const L={anchorType(g,N){const s=g[n.$getSubformParent]();if(!(!s||s.layout&&s.layout!=="position"))switch("transform"in N||(N.transform=""),g.anchorType){case"bottomCenter":N.transform+="translate(-50%, -100%)";break;case"bottomLeft":N.transform+="translate(0,-100%)";break;case"bottomRight":N.transform+="translate(-100%,-100%)";break;case"middleCenter":N.transform+="translate(-50%,-50%)";break;case"middleLeft":N.transform+="translate(0,-50%)";break;case"middleRight":N.transform+="translate(-100%,-50%)";break;case"topCenter":N.transform+="translate(-50%,0)";break;case"topRight":N.transform+="translate(-100%,0)";break}},dimensions(g,N){var U;const s=g[n.$getSubformParent]();let u=g.w;const F=g.h;if((U=s.layout)!=null&&U.includes("row")){const O=s[n.$extra],m=g.colSpan;let x;m===-1?(x=O.columnWidths.slice(O.currentColumn).reduce((y,r)=>y+r,0),O.currentColumn=0):(x=O.columnWidths.slice(O.currentColumn,O.currentColumn+m).reduce((y,r)=>y+r,0),O.currentColumn=(O.currentColumn+g.colSpan)%O.columnWidths.length),isNaN(x)||(u=g.w=x)}N.width=u!==""?$(u):"auto",N.height=F!==""?$(F):"auto"},position(g,N){const s=g[n.$getSubformParent]();s!=null&&s.layout&&s.layout!=="position"||(N.position="absolute",N.left=$(g.x),N.top=$(g.y))},rotate(g,N){g.rotate&&("transform"in N||(N.transform=""),N.transform+=`rotate(-${g.rotate}deg)`,N.transformOrigin="top left")},presence(g,N){switch(g.presence){case"invisible":N.visibility="hidden";break;case"hidden":case"inactive":N.display="none";break}},hAlign(g,N){if(g[n.$nodeName]==="para")switch(g.hAlign){case"justifyAll":N.textAlign="justify-all";break;case"radix":N.textAlign="left";break;default:N.textAlign=g.hAlign}else switch(g.hAlign){case"left":N.alignSelf="start";break;case"center":N.alignSelf="center";break;case"right":N.alignSelf="end";break}},margin(g,N){g.margin&&(N.margin=g.margin[n.$toStyle]().margin)}};function I(g,N){g[n.$getSubformParent]().layout==="position"&&(g.minW>0&&(N.minWidth=$(g.minW)),g.maxW>0&&(N.maxWidth=$(g.maxW)),g.minH>0&&(N.minHeight=$(g.minH)),g.maxH>0&&(N.maxHeight=$(g.maxH)))}function T(g,N,s,u,F,U){const O=new t.TextMeasure(N,s,u,F);return typeof g=="string"?O.addString(g):g[n.$pushGlyphs](O),O.compute(U)}function d(g,N){let s=null,u=null,F=!1;if((!g.w||!g.h)&&g.value){let U=0,O=0;g.margin&&(U=g.margin.leftInset+g.margin.rightInset,O=g.margin.topInset+g.margin.bottomInset);let m=null,x=null;g.para&&(x=Object.create(null),m=g.para.lineHeight===""?null:g.para.lineHeight,x.top=g.para.spaceAbove===""?0:g.para.spaceAbove,x.bottom=g.para.spaceBelow===""?0:g.para.spaceBelow,x.left=g.para.marginLeft===""?0:g.para.marginLeft,x.right=g.para.marginRight===""?0:g.para.marginRight);let y=g.font;if(!y){const c=g[n.$getTemplateRoot]();let h=g[n.$getParent]();for(;h&&h!==c;){if(h.font){y=h.font;break}h=h[n.$getParent]()}}const r=(g.w||N.width)-U,p=g[n.$globalData].fontFinder;if(g.value.exData&&g.value.exData[n.$content]&&g.value.exData.contentType==="text/html"){const c=T(g.value.exData[n.$content],y,x,m,p,r);u=c.width,s=c.height,F=c.isBroken}else{const c=g.value[n.$text]();if(c){const h=T(c,y,x,m,p,r);u=h.width,s=h.height,F=h.isBroken}}u!==null&&!g.w&&(u+=U),s!==null&&!g.h&&(s+=O)}return{w:u,h:s,isBroken:F}}function f(g,N,s){let u;if(g.w!==""&&g.h!=="")u=[g.x,g.y,g.w,g.h];else{if(!s)return null;let F=g.w;if(F===""){if(g.maxW===0){const O=g[n.$getSubformParent]();F=O.layout==="position"&&O.w!==""?0:g.minW}else F=Math.min(g.maxW,s.width);N.attributes.style.width=$(F)}let U=g.h;if(U===""){if(g.maxH===0){const O=g[n.$getSubformParent]();U=O.layout==="position"&&O.h!==""?0:g.minH}else U=Math.min(g.maxH,s.height);N.attributes.style.height=$(U)}u=[g.x,g.y,F,U]}return u}function i(g){var s;const N=g[n.$getSubformParent]();if((s=N.layout)!=null&&s.includes("row")){const u=N[n.$extra],F=g.colSpan;let U;F===-1?U=u.columnWidths.slice(u.currentColumn).reduce((O,m)=>O+m,0):U=u.columnWidths.slice(u.currentColumn,u.currentColumn+F).reduce((O,m)=>O+m,0),isNaN(U)||(g.w=U)}N.layout&&N.layout!=="position"&&(g.x=g.y=0),g.layout==="table"&&g.w===""&&Array.isArray(g.columnWidths)&&(g.w=g.columnWidths.reduce((u,F)=>u+F,0))}function S(g){switch(g.layout){case"position":return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb";default:return"xfaPosition"}}function w(g,...N){const s=Object.create(null);for(const u of N){const F=g[u];if(F!==null){if(L.hasOwnProperty(u)){L[u](g,s);continue}if(F instanceof o.XFAObject){const U=F[n.$toStyle]();U?Object.assign(s,U):(0,k.warn)(`(DEBUG) - XFA - style for ${u} not implemented yet`)}}}return s}function v(g,N){const{attributes:s}=N,{style:u}=s,F={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(s.class.push("xfaWrapped"),g.border){const{widths:U,insets:O}=g.border[n.$extra];let m,x,y=O[0],r=O[3];const p=O[0]+O[2],c=O[1]+O[3];switch(g.border.hand){case"even":y-=U[0]/2,r-=U[3]/2,m=`calc(100% + ${(U[1]+U[3])/2-c}px)`,x=`calc(100% + ${(U[0]+U[2])/2-p}px)`;break;case"left":y-=U[0],r-=U[3],m=`calc(100% + ${U[1]+U[3]-c}px)`,x=`calc(100% + ${U[0]+U[2]-p}px)`;break;case"right":m=c?`calc(100% - ${c}px)`:"100%",x=p?`calc(100% - ${p}px)`:"100%";break}const h=["xfaBorder"];_(g.border)&&h.push("xfaPrintOnly");const C={name:"div",attributes:{class:h,style:{top:`${y}px`,left:`${r}px`,width:m,height:x}},children:[]};for(const D of["border","borderWidth","borderColor","borderRadius","borderStyle"])u[D]!==void 0&&(C.attributes.style[D]=u[D],delete u[D]);F.children.push(C,N)}else F.children.push(N);for(const U of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])u[U]!==void 0&&(F.attributes.style[U]=u[U],delete u[U]);return F.attributes.style.position=u.position==="absolute"?"absolute":"relative",delete u.position,u.alignSelf&&(F.attributes.style.alignSelf=u.alignSelf,delete u.alignSelf),F}function b(g){const N=(0,R.getMeasurement)(g.textIndent,"0px");if(N>=0)return;const u="padding"+((g.textAlign==="right"?"right":"left")==="left"?"Left":"Right"),F=(0,R.getMeasurement)(g[u],"0px");g[u]=`${F-N}px`}function M(g,N){switch(g.access){case"nonInteractive":N.push("xfaNonInteractive");break;case"readOnly":N.push("xfaReadOnly");break;case"protected":N.push("xfaDisabled");break}}function _(g){return g.relevant.length>0&&!g.relevant[0].excluded&&g.relevant[0].viewname==="print"}function H(g){const N=g[n.$getTemplateRoot]()[n.$extra].paraStack;return N.length?N.at(-1):null}function A(g,N,s){var u;if((u=s.attributes.class)!=null&&u.includes("xfaRich")){N&&(g.h===""&&(N.height="auto"),g.w===""&&(N.width="auto"));const F=H(g);if(F){const U=s.attributes.style;switch(U.display="flex",U.flexDirection="column",F.vAlign){case"top":U.justifyContent="start";break;case"bottom":U.justifyContent="end";break;case"middle":U.justifyContent="center";break}const O=F[n.$toStyle]();for(const[m,x]of Object.entries(O))m in U||(U[m]=x)}}}function E(g,N,s,u){if(!s){delete u.fontFamily;return}const F=(0,R.stripQuotes)(g.typeface);u.fontFamily=`"${F}"`;const U=s.find(F);if(U){const{fontFamily:O}=U.regular.cssFontInfo;O!==F&&(u.fontFamily=`"${O}"`);const m=H(N);if(m&&m.lineHeight!==""||u.lineHeight)return;const x=(0,e.selectFont)(g,U);x&&(u.lineHeight=Math.max(1.2,x.lineHeight))}}function l(g){const N=(0,k.createValidAbsoluteUrl)(g,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return N?N.href:null}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.HTMLResult=void 0,P.getBBox=i,P.getColor=f,P.getFloat=o,P.getInteger=t,P.getKeyword=$,P.getMeasurement=I,P.getRatio=T,P.getRelevant=d,P.getStringOption=L,P.stripQuotes=e;var n=ie(2);const k={pt:w=>w,cm:w=>w/2.54*72,mm:w=>w/(10*2.54)*72,in:w=>w*72,px:w=>w},R=/([+-]?\d+\.?\d*)(.*)/;function e(w){return w.startsWith("'")||w.startsWith('"')?w.slice(1,-1):w}function t({data:w,defaultValue:v,validate:b}){if(!w)return v;w=w.trim();const M=parseInt(w,10);return!isNaN(M)&&b(M)?M:v}function o({data:w,defaultValue:v,validate:b}){if(!w)return v;w=w.trim();const M=parseFloat(w);return!isNaN(M)&&b(M)?M:v}function $({data:w,defaultValue:v,validate:b}){return w?(w=w.trim(),b(w)?w:v):v}function L(w,v){return $({data:w,defaultValue:v[0],validate:b=>v.includes(b)})}function I(w,v="0"){if(v||(v="0"),!w)return I(v);const b=w.trim().match(R);if(!b)return I(v);const[,M,_]=b,H=parseFloat(M);if(isNaN(H))return I(v);if(H===0)return 0;const A=k[_];return A?A(H):H}function T(w){if(!w)return{num:1,den:1};const v=w.trim().split(/\s*:\s*/).map(_=>parseFloat(_)).filter(_=>!isNaN(_));if(v.length===1&&v.push(1),v.length===0)return{num:1,den:1};const[b,M]=v;return{num:b,den:M}}function d(w){return w?w.trim().split(/\s+/).map(v=>({excluded:v[0]==="-",viewname:v.substring(1)})):[]}function f(w,v=[0,0,0]){let[b,M,_]=v;if(!w)return{r:b,g:M,b:_};const H=w.trim().split(/\s*,\s*/).map(A=>Math.min(Math.max(0,parseInt(A.trim(),10)),255)).map(A=>isNaN(A)?0:A);return H.length<3?{r:b,g:M,b:_}:([b,M,_]=H,{r:b,g:M,b:_})}function i(w){if(!w)return{x:-1,y:-1,width:-1,height:-1};const b=w.trim().split(/\s*,\s*/).map(E=>I(E,"-1"));if(b.length<4||b[2]<0||b[3]<0)return{x:-1,y:-1,width:-1,height:-1};const[M,_,H,A]=b;return{x:M,y:_,width:H,height:A}}class S{static get FAILURE(){return(0,n.shadow)(this,"FAILURE",new S(!1,null,null,null))}static get EMPTY(){return(0,n.shadow)(this,"EMPTY",new S(!0,null,null,null))}constructor(v,b,M,_){this.success=v,this.html=b,this.bbox=M,this.breakNode=_}isBreak(){return!!this.breakNode}static breakNode(v){return new S(!1,null,null,v)}static success(v,b=null){return new S(!0,v,b,null)}}P.HTMLResult=S},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.FontFinder=void 0,P.getMetrics=o,P.selectFont=t;var n=ie(78),k=ie(84),R=ie(2);class e{constructor(L){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(L)}add(L,I=null){for(const d of L)this.addPdfFont(d);for(const d of this.fonts.values())d.regular||(d.regular=d.italic||d.bold||d.bolditalic);if(!I||I.size===0)return;const T=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const d of I)this.fonts.set(d,T)}addPdfFont(L){var S,w,v;const I=L.cssFontInfo,T=I.fontFamily;let d=this.fonts.get(T);d||(d=Object.create(null),this.fonts.set(T,d),this.defaultFont||(this.defaultFont=d));let f="";const i=parseFloat(I.fontWeight);parseFloat(I.italicAngle)!==0?f=i>=700?"bolditalic":"italic":i>=700&&(f="bold"),f||((L.name.includes("Bold")||(S=L.psName)!=null&&S.includes("Bold"))&&(f="bold"),(L.name.includes("Italic")||L.name.endsWith("It")||(w=L.psName)!=null&&w.includes("Italic")||(v=L.psName)!=null&&v.endsWith("It"))&&(f+="italic")),f||(f="regular"),d[f]=L}getDefault(){return this.defaultFont}find(L,I=!0){var S,w;let T=this.fonts.get(L)||this.cache.get(L);if(T)return T;const d=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let f=L.replaceAll(d,"");if(T=this.fonts.get(f),T)return this.cache.set(L,T),T;f=f.toLowerCase();const i=[];for(const[v,b]of this.fonts.entries())v.replaceAll(d,"").toLowerCase().startsWith(f)&&i.push(b);if(i.length===0)for(const[,v]of this.fonts.entries())(S=v.regular.name)!=null&&S.replaceAll(d,"").toLowerCase().startsWith(f)&&i.push(v);if(i.length===0){f=f.replaceAll(/psmt|mt/gi,"");for(const[v,b]of this.fonts.entries())v.replaceAll(d,"").toLowerCase().startsWith(f)&&i.push(b)}if(i.length===0)for(const v of this.fonts.values())(w=v.regular.name)!=null&&w.replaceAll(d,"").toLowerCase().startsWith(f)&&i.push(v);return i.length>=1?(i.length!==1&&I&&(0,R.warn)(`XFA - Too many choices to guess the correct font: ${L}`),this.cache.set(L,i[0]),i[0]):(I&&!this.warned.has(L)&&(this.warned.add(L),(0,R.warn)(`XFA - Cannot find the font: ${L}`)),null)}}P.FontFinder=e;function t($,L){return $.posture==="italic"?$.weight==="bold"?L.bolditalic:L.italic:$.weight==="bold"?L.bold:L.regular}function o($,L=!1){let I=null;if($){const i=(0,k.stripQuotes)($.typeface),S=$[n.$globalData].fontFinder.find(i);I=t($,S)}if(!I)return{lineHeight:12,lineGap:2,lineNoGap:10};const T=$.size||10,d=I.lineHeight?Math.max(L?0:1.2,I.lineHeight):1.2,f=I.lineGap===void 0?.2:I.lineGap;return{lineHeight:d*T,lineGap:f*T,lineNoGap:Math.max(1,d-f)*T}}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.TextMeasure=void 0;var n=ie(85);const k=1.02;class R{constructor($,L,I,T){if(this.lineHeight=I,this.paraMargin=L||{top:0,bottom:0,left:0,right:0},!$){[this.pdfFont,this.xfaFont]=this.defaultFont(T);return}this.xfaFont={typeface:$.typeface,posture:$.posture,weight:$.weight,size:$.size,letterSpacing:$.letterSpacing};const d=T.find($.typeface);if(!d){[this.pdfFont,this.xfaFont]=this.defaultFont(T);return}this.pdfFont=(0,n.selectFont)($,d),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(T))}defaultFont($){const L=$.find("Helvetica",!1)||$.find("Myriad Pro",!1)||$.find("Arial",!1)||$.getDefault();if(L!=null&&L.regular){const T=L.regular,f={typeface:T.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0};return[T,f]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class e{constructor($,L,I,T){this.fontFinder=T,this.stack=[new R($,L,I,T)]}pushData($,L,I){const T=this.stack.at(-1);for(const f of["typeface","posture","weight","size","letterSpacing"])$[f]||($[f]=T.xfaFont[f]);for(const f of["top","bottom","left","right"])isNaN(L[f])&&(L[f]=T.paraMargin[f]);const d=new R($,L,I||T.lineHeight,this.fontFinder);d.pdfFont||(d.pdfFont=T.pdfFont),this.stack.push(d)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}class t{constructor($,L,I,T){this.glyphs=[],this.fontSelector=new e($,L,I,T),this.extraHeight=0}pushData($,L,I){this.fontSelector.pushData($,L,I)}popFont($){return this.fontSelector.popFont()}addPara(){const $=this.fontSelector.topFont();this.extraHeight+=$.paraMargin.top+$.paraMargin.bottom}addString($){if(!$)return;const L=this.fontSelector.topFont(),I=L.xfaFont.size;if(L.pdfFont){const T=L.xfaFont.letterSpacing,d=L.pdfFont,f=d.lineHeight||1.2,i=L.lineHeight||Math.max(1.2,f)*I,S=d.lineGap===void 0?.2:d.lineGap,w=f-S,v=Math.max(1,w)*I,b=I/1e3,M=d.defaultWidth||d.charsToGlyphs(" ")[0].width;for(const _ of $.split(/[\u2029\n]/)){const H=d.encodeString(_).join(""),A=d.charsToGlyphs(H);for(const E of A){const l=E.width||M;this.glyphs.push([l*b+T,i,v,E.unicode,!1])}this.glyphs.push([0,0,0,`
`,!0])}this.glyphs.pop();return}for(const T of $.split(/[\u2029\n]/)){for(const d of T.split(""))this.glyphs.push([I,1.2*I,I,d,!1]);this.glyphs.push([0,0,0,`
`,!0])}this.glyphs.pop()}compute($){let L=-1,I=0,T=0,d=0,f=0,i=0,S=!1,w=!0;for(let v=0,b=this.glyphs.length;v<b;v++){const[M,_,H,A,E]=this.glyphs[v],l=A===" ",g=w?H:_;if(E){T=Math.max(T,f),f=0,d+=i,i=g,L=-1,I=0,w=!1;continue}if(l){f+M>$?(T=Math.max(T,f),f=0,d+=i,i=g,L=-1,I=0,S=!0,w=!1):(i=Math.max(g,i),I=f,f+=M,L=v);continue}if(f+M>$){d+=i,i=g,L!==-1?(v=L,T=Math.max(T,I),f=0,L=-1,I=0):(T=Math.max(T,f),f=M),S=!0,w=!1;continue}f+=M,i=Math.max(g,i)}return T=Math.max(T,f),d+=i+this.extraHeight,{width:k*T,height:d,isBroken:S}}}P.TextMeasure=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XmlObject=P.XFAObjectArray=P.XFAObject=P.XFAAttribute=P.StringObject=P.OptionObject=P.Option10=P.Option01=P.IntegerObject=P.ContentObject=void 0;var n=ie(78),k=ie(84),R=ie(2),e=ie(3),t=ie(81),o=ie(88);const $=Symbol(),L=Symbol(),I=Symbol(),T=Symbol("_children"),d=Symbol(),f=Symbol(),i=Symbol(),S=Symbol(),w=Symbol(),v=Symbol(),b=Symbol(),M=Symbol(),_=Symbol(),H=Symbol("parent"),A=Symbol(),E=Symbol(),l=Symbol();let g=0;const N=t.NamespaceIds.datasets.id;class s{constructor(h,C,D=!1){this[n.$namespaceId]=h,this[n.$nodeName]=C,this[b]=D,this[H]=null,this[T]=[],this[n.$uid]=`${C}${g++}`,this[n.$globalData]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(h){let C=this,D=null;for(const{name:X,index:q}of h){for(let re=0,K=isFinite(q)?q:0;re<=K;re++){const oe=C[n.$namespaceId]===N?-1:C[n.$namespaceId];D=new U(oe,X),C[n.$appendChild](D)}C=D}return D}[n.$onChild](h){if(!this[b]||!this[n.$onChildCheck](h))return!1;const C=h[n.$nodeName],D=this[C];if(D instanceof u){if(D.push(h))return this[n.$appendChild](h),!0}else return D!==null&&this[n.$removeChild](D),this[C]=h,this[n.$appendChild](h),!0;let X="";return this.id?X=` (id: ${this.id})`:this.name&&(X=` (name: ${this.name} ${this.h.value})`),(0,R.warn)(`XFA - node "${this[n.$nodeName]}"${X} has already enough "${C}"!`),!1}[n.$onChildCheck](h){return this.hasOwnProperty(h[n.$nodeName])&&h[n.$namespaceId]===this[n.$namespaceId]}[n.$isNsAgnostic](){return!1}[n.$acceptWhitespace](){return!1}[n.$isCDATAXml](){return!1}[n.$isBindable](){return!1}[n.$popPara](){this.para&&this[n.$getTemplateRoot]()[n.$extra].paraStack.pop()}[n.$pushPara](){this[n.$getTemplateRoot]()[n.$extra].paraStack.push(this.para)}[n.$setId](h){this.id&&this[n.$namespaceId]===t.NamespaceIds.template.id&&h.set(this.id,this)}[n.$getTemplateRoot](){return this[n.$globalData].template}[n.$isSplittable](){return!1}[n.$isThereMoreWidth](){return!1}[n.$appendChild](h){h[H]=this,this[T].push(h),!h[n.$globalData]&&this[n.$globalData]&&(h[n.$globalData]=this[n.$globalData])}[n.$removeChild](h){const C=this[T].indexOf(h);this[T].splice(C,1)}[n.$hasSettableValue](){return this.hasOwnProperty("value")}[n.$setValue](h){}[n.$onText](h){}[n.$finalize](){}[n.$clean](h){delete this[b],this[n.$cleanup]&&(h.clean(this[n.$cleanup]),delete this[n.$cleanup])}[n.$indexOf](h){return this[T].indexOf(h)}[n.$insertAt](h,C){C[H]=this,this[T].splice(h,0,C),!C[n.$globalData]&&this[n.$globalData]&&(C[n.$globalData]=this[n.$globalData])}[n.$isTransparent](){return!this.name}[n.$lastAttribute](){return""}[n.$text](){return this[T].length===0?this[n.$content]:this[T].map(h=>h[n.$text]()).join("")}get[I](){const h=Object.getPrototypeOf(this);if(!h._attributes){const C=h._attributes=new Set;for(const D of Object.getOwnPropertyNames(this)){if(this[D]===null||this[D]instanceof s||this[D]instanceof u)break;C.add(D)}}return(0,R.shadow)(this,I,h._attributes)}[n.$isDescendent](h){let C=this;for(;C;){if(C===h)return!0;C=C[n.$getParent]()}return!1}[n.$getParent](){return this[H]}[n.$getSubformParent](){return this[n.$getParent]()}[n.$getChildren](h=null){return h?this[h]:this[T]}[n.$dump](){const h=Object.create(null);this[n.$content]&&(h.$content=this[n.$content]);for(const C of Object.getOwnPropertyNames(this)){const D=this[C];D!==null&&(D instanceof s?h[C]=D[n.$dump]():D instanceof u?D.isEmpty()||(h[C]=D.dump()):h[C]=D)}return h}[n.$toStyle](){return null}[n.$toHTML](){return k.HTMLResult.EMPTY}*[n.$getContainedChildren](){for(const h of this[n.$getChildren]())yield h}*[S](h,C){for(const D of this[n.$getContainedChildren]())if(!h||C===h.has(D[n.$nodeName])){const X=this[n.$getAvailableSpace](),q=D[n.$toHTML](X);q.success||(this[n.$extra].failingNode=D),yield q}}[n.$flushHTML](){return null}[n.$addHTML](h,C){this[n.$extra].children.push(h)}[n.$getAvailableSpace](){}[n.$childrenToHTML]({filter:h=null,include:C=!0}){if(!this[n.$extra].generator)this[n.$extra].generator=this[S](h,C);else{const D=this[n.$getAvailableSpace](),X=this[n.$extra].failingNode[n.$toHTML](D);if(!X.success)return X;X.html&&this[n.$addHTML](X.html,X.bbox),delete this[n.$extra].failingNode}for(;;){const D=this[n.$extra].generator.next();if(D.done)break;const X=D.value;if(!X.success)return X;X.html&&this[n.$addHTML](X.html,X.bbox)}return this[n.$extra].generator=null,k.HTMLResult.EMPTY}[n.$setSetAttributes](h){this[E]=new Set(Object.keys(h))}[v](h){const C=this[I],D=this[E];return[...h].filter(X=>C.has(X)&&!D.has(X))}[n.$resolvePrototypes](h,C=new Set){for(const D of this[T])D[A](h,C)}[A](h,C){const D=this[w](h,C);D?this[$](D,h,C):this[n.$resolvePrototypes](h,C)}[w](h,C){const{use:D,usehref:X}=this;if(!D&&!X)return null;let q=null,re=null,K=null,oe=D;if(X?(oe=X,X.startsWith("#som(")&&X.endsWith(")")?re=X.slice(5,-1):X.startsWith(".#som(")&&X.endsWith(")")?re=X.slice(6,-1):X.startsWith("#")?K=X.slice(1):X.startsWith(".#")&&(K=X.slice(2))):D.startsWith("#")?K=D.slice(1):re=D,this.use=this.usehref="",K?q=h.get(K):(q=(0,o.searchNode)(h.get(n.$root),this,re,!0,!1),q&&(q=q[0])),!q)return(0,R.warn)(`XFA - Invalid prototype reference: ${oe}.`),null;if(q[n.$nodeName]!==this[n.$nodeName])return(0,R.warn)(`XFA - Incompatible prototype: ${q[n.$nodeName]} !== ${this[n.$nodeName]}.`),null;if(C.has(q))return(0,R.warn)("XFA - Cycle detected in prototypes use."),null;C.add(q);const J=q[w](h,C);return J&&q[$](J,h,C),q[n.$resolvePrototypes](h,C),C.delete(q),q}[$](h,C,D){if(D.has(h)){(0,R.warn)("XFA - Cycle detected in prototypes use.");return}!this[n.$content]&&h[n.$content]&&(this[n.$content]=h[n.$content]),new Set(D).add(h);for(const q of this[v](h[E]))this[q]=h[q],this[E]&&this[E].add(q);for(const q of Object.getOwnPropertyNames(this)){if(this[I].has(q))continue;const re=this[q],K=h[q];if(re instanceof u){for(const oe of re[T])oe[A](C,D);for(let oe=re[T].length,J=K[T].length;oe<J;oe++){const te=h[T][oe][n.$clone]();if(re.push(te))te[H]=this,this[T].push(te),te[A](C,D);else break}continue}if(re!==null){re[n.$resolvePrototypes](C,D),K&&re[$](K,C,D);continue}if(K!==null){const oe=K[n.$clone]();oe[H]=this,this[q]=oe,this[T].push(oe),oe[A](C,D)}}}static[d](h){return Array.isArray(h)?h.map(C=>s[d](C)):typeof h=="object"&&h!==null?Object.assign({},h):h}[n.$clone](){const h=Object.create(Object.getPrototypeOf(this));for(const C of Object.getOwnPropertySymbols(this))try{h[C]=this[C]}catch{(0,R.shadow)(h,C,this[C])}h[n.$uid]=`${h[n.$nodeName]}${g++}`,h[T]=[];for(const C of Object.getOwnPropertyNames(this)){if(this[I].has(C)){h[C]=s[d](this[C]);continue}const D=this[C];h[C]=D instanceof u?new u(D[M]):null}for(const C of this[T]){const D=C[n.$nodeName],X=C[n.$clone]();h[T].push(X),X[H]=h,h[D]===null?h[D]=X:h[D][T].push(X)}return h}[n.$getChildren](h=null){return h?this[T].filter(C=>C[n.$nodeName]===h):this[T]}[n.$getChildrenByClass](h){return this[h]}[n.$getChildrenByName](h,C,D=!0){return Array.from(this[n.$getChildrenByNameIt](h,C,D))}*[n.$getChildrenByNameIt](h,C,D=!0){if(h==="parent"){yield this[H];return}for(const X of this[T])X[n.$nodeName]===h&&(yield X),X.name===h&&(yield X),(C||X[n.$isTransparent]())&&(yield*X[n.$getChildrenByNameIt](h,C,!1));D&&this[I].has(h)&&(yield new F(this,h,this[h]))}}P.XFAObject=s;class u{constructor(h=1/0){this[M]=h,this[T]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(h){return this[T].length<=this[M]?(this[T].push(h),!0):((0,R.warn)(`XFA - node "${h[n.$nodeName]}" accepts no more than ${this[M]} children`),!1)}isEmpty(){return this[T].length===0}dump(){return this[T].length===1?this[T][0][n.$dump]():this[T].map(h=>h[n.$dump]())}[n.$clone](){const h=new u(this[M]);return h[T]=this[T].map(C=>C[n.$clone]()),h}get children(){return this[T]}clear(){this[T].length=0}}P.XFAObjectArray=u;class F{constructor(h,C,D){this[H]=h,this[n.$nodeName]=C,this[n.$content]=D,this[n.$consumed]=!1,this[n.$uid]=`attribute${g++}`}[n.$getParent](){return this[H]}[n.$isDataValue](){return!0}[n.$getDataValue](){return this[n.$content].trim()}[n.$setValue](h){h=h.value||"",this[n.$content]=h.toString()}[n.$text](){return this[n.$content]}[n.$isDescendent](h){return this[H]===h||this[H][n.$isDescendent](h)}}P.XFAAttribute=F;class U extends s{constructor(h,C,D={}){if(super(h,C),this[n.$content]="",this[f]=null,C!=="#text"){const X=new Map;this[L]=X;for(const[q,re]of Object.entries(D))X.set(q,new F(this,q,re));if(D.hasOwnProperty(n.$nsAttributes)){const q=D[n.$nsAttributes].xfa.dataNode;q!==void 0&&(q==="dataGroup"?this[f]=!1:q==="dataValue"&&(this[f]=!0))}}this[n.$consumed]=!1}[n.$toString](h){const C=this[n.$nodeName];if(C==="#text"){h.push((0,e.encodeToXmlString)(this[n.$content]));return}const D=(0,R.utf8StringToString)(C),X=this[n.$namespaceId]===N?"xfa:":"";h.push(`<${X}${D}`);for(const[q,re]of this[L].entries()){const K=(0,R.utf8StringToString)(q);h.push(` ${K}="${(0,e.encodeToXmlString)(re[n.$content])}"`)}if(this[f]!==null&&(this[f]?h.push(' xfa:dataNode="dataValue"'):h.push(' xfa:dataNode="dataGroup"')),!this[n.$content]&&this[T].length===0){h.push("/>");return}if(h.push(">"),this[n.$content])typeof this[n.$content]=="string"?h.push((0,e.encodeToXmlString)(this[n.$content])):this[n.$content][n.$toString](h);else for(const q of this[T])q[n.$toString](h);h.push(`</${X}${D}>`)}[n.$onChild](h){if(this[n.$content]){const C=new U(this[n.$namespaceId],"#text");this[n.$appendChild](C),C[n.$content]=this[n.$content],this[n.$content]=""}return this[n.$appendChild](h),!0}[n.$onText](h){this[n.$content]+=h}[n.$finalize](){if(this[n.$content]&&this[T].length>0){const h=new U(this[n.$namespaceId],"#text");this[n.$appendChild](h),h[n.$content]=this[n.$content],delete this[n.$content]}}[n.$toHTML](){return this[n.$nodeName]==="#text"?k.HTMLResult.success({name:"#text",value:this[n.$content]}):k.HTMLResult.EMPTY}[n.$getChildren](h=null){return h?this[T].filter(C=>C[n.$nodeName]===h):this[T]}[n.$getAttributes](){return this[L]}[n.$getChildrenByClass](h){const C=this[L].get(h);return C!==void 0?C:this[n.$getChildren](h)}*[n.$getChildrenByNameIt](h,C){const D=this[L].get(h);D&&(yield D);for(const X of this[T])X[n.$nodeName]===h&&(yield X),C&&(yield*X[n.$getChildrenByNameIt](h,C))}*[n.$getAttributeIt](h,C){const D=this[L].get(h);D&&(!C||!D[n.$consumed])&&(yield D);for(const X of this[T])yield*X[n.$getAttributeIt](h,C)}*[n.$getRealChildrenByNameIt](h,C,D){for(const X of this[T])X[n.$nodeName]===h&&(!D||!X[n.$consumed])&&(yield X),C&&(yield*X[n.$getRealChildrenByNameIt](h,C,D))}[n.$isDataValue](){return this[f]===null?this[T].length===0||this[T][0][n.$namespaceId]===t.NamespaceIds.xhtml.id:this[f]}[n.$getDataValue](){return this[f]===null?this[T].length===0?this[n.$content].trim():this[T][0][n.$namespaceId]===t.NamespaceIds.xhtml.id?this[T][0][n.$text]().trim():null:this[n.$content].trim()}[n.$setValue](h){h=h.value||"",this[n.$content]=h.toString()}[n.$dump](h=!1){const C=Object.create(null);h&&(C.$ns=this[n.$namespaceId]),this[n.$content]&&(C.$content=this[n.$content]),C.$name=this[n.$nodeName],C.children=[];for(const D of this[T])C.children.push(D[n.$dump](h));C.attributes=Object.create(null);for(const[D,X]of this[L])C.attributes[D]=X[n.$content];return C}}P.XmlObject=U;class O extends s{constructor(h,C){super(h,C),this[n.$content]=""}[n.$onText](h){this[n.$content]+=h}[n.$finalize](){}}P.ContentObject=O;class m extends O{constructor(h,C,D){super(h,C),this[_]=D}[n.$finalize](){this[n.$content]=(0,k.getKeyword)({data:this[n.$content],defaultValue:this[_][0],validate:h=>this[_].includes(h)})}[n.$clean](h){super[n.$clean](h),delete this[_]}}P.OptionObject=m;class x extends O{[n.$finalize](){this[n.$content]=this[n.$content].trim()}}P.StringObject=x;class y extends O{constructor(h,C,D,X){super(h,C),this[i]=D,this[l]=X}[n.$finalize](){this[n.$content]=(0,k.getInteger)({data:this[n.$content],defaultValue:this[i],validate:this[l]})}[n.$clean](h){super[n.$clean](h),delete this[i],delete this[l]}}P.IntegerObject=y;class r extends y{constructor(h,C){super(h,C,0,D=>D===1)}}P.Option01=r;class p extends y{constructor(h,C){super(h,C,1,D=>D===0)}}P.Option10=p},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.createDataNode=d,P.searchNode=T;var n=ie(78),k=ie(2);const R=/^[^.[]+/,e=/^[^\]]+/,t={dot:0,dotDot:1,dotHash:2,dotBracket:3,dotParen:4},o=new Map([["$data",(f,i)=>f.datasets?f.datasets.data:f],["$record",(f,i)=>(f.datasets?f.datasets.data:f)[n.$getChildren]()[0]],["$template",(f,i)=>f.template],["$connectionSet",(f,i)=>f.connectionSet],["$form",(f,i)=>f.form],["$layout",(f,i)=>f.layout],["$host",(f,i)=>f.host],["$dataWindow",(f,i)=>f.dataWindow],["$event",(f,i)=>f.event],["!",(f,i)=>f.datasets],["$xfa",(f,i)=>f],["xfa",(f,i)=>f],["$",(f,i)=>i]]),$=new WeakMap;function L(f){return f=f.trim(),f==="*"?1/0:parseInt(f,10)||0}function I(f,i,S=!0){let w=f.match(R);if(!w)return null;let[v]=w;const b=[{name:v,cacheName:"."+v,index:0,js:null,formCalc:null,operator:t.dot}];let M=v.length;for(;M<f.length;){const _=M;if(f.charAt(M++)==="["){if(w=f.slice(M).match(e),!w)return(0,k.warn)("XFA - Invalid index in SOM expression"),null;b.at(-1).index=L(w[0]),M+=w[0].length+1;continue}let A;switch(f.charAt(M)){case".":if(!i)return null;M++,A=t.dotDot;break;case"#":M++,A=t.dotHash;break;case"[":if(S)return(0,k.warn)("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;A=t.dotBracket;break;case"(":if(S)return(0,k.warn)("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;A=t.dotParen;break;default:A=t.dot;break}if(w=f.slice(M).match(R),!w)break;[v]=w,M+=v.length,b.push({name:v,cacheName:f.slice(_,M),operator:A,index:0,js:null,formCalc:null})}return b}function T(f,i,S,w=!0,v=!0){const b=I(S,w);if(!b)return null;const M=o.get(b[0].name);let _=0,H;M?(H=!0,f=[M(f,i)],_=1):(H=i===null,f=[i||f]);for(let A=b.length;_<A;_++){const{name:E,cacheName:l,operator:g,index:N}=b[_],s=[];for(const u of f){if(!u.isXFAObject)continue;let F,U;if(v&&(U=$.get(u),U||(U=new Map,$.set(u,U)),F=U.get(l)),!F){switch(g){case t.dot:F=u[n.$getChildrenByName](E,!1);break;case t.dotDot:F=u[n.$getChildrenByName](E,!0);break;case t.dotHash:F=u[n.$getChildrenByClass](E),F=F.isXFAObjectArray?F.children:[F];break}v&&U.set(l,F)}F.length>0&&s.push(F)}if(s.length===0&&!H&&_===0){if(i=i[n.$getParent](),!i)return null;_=-1,f=[i];continue}f=isFinite(N)?s.filter(u=>N<u.length).map(u=>u[N]):s.flat()}return f.length===0?null:f}function d(f,i,S){const w=I(S);if(!w||w.some(M=>M.operator===t.dotDot))return null;const v=o.get(w[0].name);let b=0;v?(f=v(f,i),b=1):f=i||f;for(let M=w.length;b<M;b++){const{name:_,operator:H,index:A}=w[b];if(!isFinite(A))return w[b].index=0,f.createNodes(w.slice(b));let E;switch(H){case t.dot:E=f[n.$getChildrenByName](_,!1);break;case t.dotDot:E=f[n.$getChildrenByName](_,!0);break;case t.dotHash:E=f[n.$getChildrenByClass](_),E=E.isXFAObjectArray?E.children:[E];break}if(E.length===0)return f.createNodes(w.slice(b));if(A<E.length){const l=E[A];if(!l.isXFAObject)return(0,k.warn)("XFA - Cannot create a node."),null;f=l}else return w[b].index=A-E.length,f.createNodes(w.slice(b))}return null}},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DataHandler=void 0;var n=ie(78);class k{constructor(e,t){this.data=t,this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[n.$getChildren]()]];for(;t.length>0;){const $=t.at(-1),[L,I]=$;if(L+1===I.length){t.pop();continue}const T=I[++$[0]],d=e.get(T[n.$uid]);if(d)T[n.$setValue](d);else{const i=T[n.$getAttributes]();for(const S of i.values()){const w=e.get(S[n.$uid]);if(w){S[n.$setValue](w);break}}}const f=T[n.$getChildren]();f.length>0&&t.push([-1,f])}const o=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const $ of this.dataset[n.$getChildren]())$[n.$nodeName]!=="data"&&$[n.$toString](o);return this.data[n.$toString](o),o.push("</xfa:datasets>"),o.join("")}}P.DataHandler=k},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XFAParser=void 0;var n=ie(78),k=ie(71),R=ie(91),e=ie(2);class t extends k.XMLParserBase{constructor($=null,L=!1){super(),this._builder=new R.Builder($),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=k.XMLParserErrorCode.NoError,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=L}parse($){if(this.parseXml($),this._errorCode===k.XMLParserErrorCode.NoError)return this._current[n.$finalize](),this._current.element}onText($){if($=$.replace(this._nbsps,L=>L.slice(1)+" "),this._richText||this._current[n.$acceptWhitespace]()){this._current[n.$onText]($,this._richText);return}this._whiteRegex.test($)||this._current[n.$onText]($.trim())}onCdata($){this._current[n.$onText]($)}_mkAttributes($,L){let I=null,T=null;const d=Object.create({});for(const{name:f,value:i}of $)if(f==="xmlns")I?(0,e.warn)(`XFA - multiple namespace definition in <${L}>`):I=i;else if(f.startsWith("xmlns:")){const S=f.substring(6);T||(T=[]),T.push({prefix:S,value:i})}else{const S=f.indexOf(":");if(S===-1)d[f]=i;else{let w=d[n.$nsAttributes];w||(w=d[n.$nsAttributes]=Object.create(null));const[v,b]=[f.slice(0,S),f.slice(S+1)],M=w[v]||(w[v]=Object.create(null));M[b]=i}}return[I,T,d]}_getNameAndPrefix($,L){const I=$.indexOf(":");return I===-1?[$,null]:[$.substring(I+1),L?"":$.substring(0,I)]}onBeginElement($,L,I){const[T,d,f]=this._mkAttributes(L,$),[i,S]=this._getNameAndPrefix($,this._builder.isNsAgnostic()),w=this._builder.build({nsPrefix:S,name:i,attributes:f,namespace:T,prefixes:d});if(w[n.$globalData]=this._globalData,I){w[n.$finalize](),this._current[n.$onChild](w)&&w[n.$setId](this._ids),w[n.$clean](this._builder);return}this._stack.push(this._current),this._current=w}onEndElement($){const L=this._current;if(L[n.$isCDATAXml]()&&typeof L[n.$content]=="string"){const I=new t;I._globalData=this._globalData;const T=I.parse(L[n.$content]);L[n.$content]=null,L[n.$onChild](T)}L[n.$finalize](),this._current=this._stack.pop(),this._current[n.$onChild](L)&&L[n.$setId](this._ids),L[n.$clean](this._builder)}onError($){this._errorCode=$}}P.XFAParser=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.Builder=void 0;var n=ie(81),k=ie(78),R=ie(92),e=ie(80),t=ie(101),o=ie(2),$=ie(87);class L extends $.XFAObject{constructor(f){super(-1,"root",Object.create(null)),this.element=null,this[k.$ids]=f}[k.$onChild](f){return this.element=f,!0}[k.$finalize](){super[k.$finalize](),this.element.template instanceof e.Template&&(this[k.$ids].set(k.$root,this.element),this.element.template[k.$resolvePrototypes](this[k.$ids]),this.element.template[k.$ids]=this[k.$ids])}}class I extends $.XFAObject{constructor(){super(-1,"",Object.create(null))}[k.$onChild](f){return!1}}class T{constructor(f=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(n.NamespaceIds).map(({id:i})=>i)),this._currentNamespace=f||new t.UnknownNamespace(++this._nextNsId)}buildRoot(f){return new L(f)}build({nsPrefix:f,name:i,attributes:S,namespace:w,prefixes:v}){const b=w!==null;if(b&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(w)),v&&this._addNamespacePrefix(v),S.hasOwnProperty(k.$nsAttributes)){const H=R.NamespaceSetUp.datasets,A=S[k.$nsAttributes];let E=null;for(const[l,g]of Object.entries(A))if(this._getNamespaceToUse(l)===H){E={xfa:g};break}E?S[k.$nsAttributes]=E:delete S[k.$nsAttributes]}const M=this._getNamespaceToUse(f),_=(M==null?void 0:M[n.$buildXFAObject](i,S))||new I;return _[k.$isNsAgnostic]()&&this._nsAgnosticLevel++,(b||v||_[k.$isNsAgnostic]())&&(_[k.$cleanup]={hasNamespace:b,prefixes:v,nsAgnostic:_[k.$isNsAgnostic]()}),_}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(f){let i=this._namespaces.get(f);if(i)return i;for(const[S,{check:w}]of Object.entries(n.NamespaceIds))if(w(f)){if(i=R.NamespaceSetUp[S],i)return this._namespaces.set(f,i),i;break}return i=new t.UnknownNamespace(++this._nextNsId),this._namespaces.set(f,i),i}_addNamespacePrefix(f){for(const{prefix:i,value:S}of f){const w=this._searchNamespace(S);let v=this._namespacePrefixes.get(i);v||(v=[],this._namespacePrefixes.set(i,v)),v.push(w)}}_getNamespaceToUse(f){if(!f)return this._currentNamespace;const i=this._namespacePrefixes.get(f);return(i==null?void 0:i.length)>0?i.at(-1):((0,o.warn)(`Unknown namespace prefix: ${f}.`),null)}clean(f){const{hasNamespace:i,prefixes:S,nsAgnostic:w}=f;i&&(this._currentNamespace=this._namespaceStack.pop()),S&&S.forEach(({prefix:v})=>{this._namespacePrefixes.get(v).pop()}),w&&this._nsAgnosticLevel--}}P.Builder=T},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.NamespaceSetUp=void 0;var n=ie(93),k=ie(94),R=ie(95),e=ie(96),t=ie(97),o=ie(98),$=ie(80),L=ie(99),I=ie(100);const T={config:n.ConfigNamespace,connection:k.ConnectionSetNamespace,datasets:R.DatasetsNamespace,localeSet:e.LocaleSetNamespace,signature:t.SignatureNamespace,stylesheet:o.StylesheetNamespace,template:$.TemplateNamespace,xdp:L.XdpNamespace,xhtml:I.XhtmlNamespace};P.NamespaceSetUp=T},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConfigNamespace=void 0;var n=ie(81),k=ie(78),R=ie(87),e=ie(84),t=ie(2);const o=n.NamespaceIds.config.id;class $ extends R.XFAObject{constructor(Z){super(o,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new R.XFAObjectArray}}class L extends R.XFAObject{constructor(Z){super(o,"acrobat7",!0),this.dynamicRender=null}}class I extends R.OptionObject{constructor(Z){super(o,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class T extends R.OptionObject{constructor(Z){super(o,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class d extends R.Option01{constructor(Z){super(o,"addSilentPrint")}}class f extends R.Option01{constructor(Z){super(o,"addViewerPreferences")}}class i extends R.Option10{constructor(Z){super(o,"adjustData")}}class S extends R.IntegerObject{constructor(Z){super(o,"adobeExtensionLevel",0,Be=>Be>=1&&Be<=8)}}class w extends R.XFAObject{constructor(Z){super(o,"agent",!0),this.name=Z.name?Z.name.trim():"",this.common=new R.XFAObjectArray}}class v extends R.ContentObject{constructor(Z){super(o,"alwaysEmbed")}}class b extends R.StringObject{constructor(Z){super(o,"amd")}}class M extends R.XFAObject{constructor(Z){super(o,"area"),this.level=(0,e.getInteger)({data:Z.level,defaultValue:0,validate:Be=>Be>=1&&Be<=3}),this.name=(0,e.getStringOption)(Z.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class _ extends R.OptionObject{constructor(Z){super(o,"attributes",["preserve","delegate","ignore"])}}class H extends R.OptionObject{constructor(Z){super(o,"autoSave",["disabled","enabled"])}}class A extends R.StringObject{constructor(Z){super(o,"base")}}class E extends R.XFAObject{constructor(Z){super(o,"batchOutput"),this.format=(0,e.getStringOption)(Z.format,["none","concat","zip","zipCompress"])}}class l extends R.ContentObject{constructor(Z){super(o,"behaviorOverride")}[k.$finalize](){this[k.$content]=new Map(this[k.$content].trim().split(/\s+/).filter(Z=>Z.includes(":")).map(Z=>Z.split(":",2)))}}class g extends R.XFAObject{constructor(Z){super(o,"cache",!0),this.templateCache=null}}class N extends R.Option01{constructor(Z){super(o,"change")}}class s extends R.XFAObject{constructor(Z){super(o,"common",!0),this.data=null,this.locale=null,this.localeSet=null,this.messaging=null,this.suppressBanner=null,this.template=null,this.validationMessaging=null,this.versionControl=null,this.log=new R.XFAObjectArray}}class u extends R.XFAObject{constructor(Z){super(o,"compress"),this.scope=(0,e.getStringOption)(Z.scope,["imageOnly","document"])}}class F extends R.Option01{constructor(Z){super(o,"compressLogicalStructure")}}class U extends R.Option10{constructor(Z){super(o,"compressObjectStream")}}class O extends R.XFAObject{constructor(Z){super(o,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class m extends R.XFAObject{constructor(Z){super(o,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new R.XFAObjectArray}}class x extends R.OptionObject{constructor(Z){super(o,"conformance",["A","B"])}}class y extends R.Option01{constructor(Z){super(o,"contentCopy")}}class r extends R.IntegerObject{constructor(Z){super(o,"copies",1,Be=>Be>=1)}}class p extends R.StringObject{constructor(Z){super(o,"creator")}}class c extends R.IntegerObject{constructor(Z){super(o,"currentPage",0,Be=>Be>=0)}}class h extends R.XFAObject{constructor(Z){super(o,"data",!0),this.adjustData=null,this.attributes=null,this.incrementalLoad=null,this.outputXSL=null,this.range=null,this.record=null,this.startNode=null,this.uri=null,this.window=null,this.xsl=null,this.excludeNS=new R.XFAObjectArray,this.transform=new R.XFAObjectArray}}class C extends R.XFAObject{constructor(Z){super(o,"debug",!0),this.uri=null}}class D extends R.ContentObject{constructor(Z){super(o,"defaultTypeface"),this.writingScript=(0,e.getStringOption)(Z.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class X extends R.OptionObject{constructor(Z){super(o,"destination",["pdf","pcl","ps","webClient","zpl"])}}class q extends R.Option01{constructor(Z){super(o,"documentAssembly")}}class re extends R.XFAObject{constructor(Z){super(o,"driver",!0),this.name=Z.name?Z.name.trim():"",this.fontInfo=null,this.xdc=null}}class K extends R.OptionObject{constructor(Z){super(o,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class oe extends R.OptionObject{constructor(Z){super(o,"dynamicRender",["forbidden","required"])}}class J extends R.Option01{constructor(Z){super(o,"embed")}}class te extends R.Option01{constructor(Z){super(o,"encrypt")}}class B extends R.XFAObject{constructor(Z){super(o,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class j extends R.OptionObject{constructor(Z){super(o,"encryptionLevel",["40bit","128bit"])}}class Y extends R.StringObject{constructor(Z){super(o,"enforce")}}class W extends R.XFAObject{constructor(Z){super(o,"equate"),this.force=(0,e.getInteger)({data:Z.force,defaultValue:1,validate:Be=>Be===0}),this.from=Z.from||"",this.to=Z.to||""}}class G extends R.XFAObject{constructor(Z){super(o,"equateRange"),this.from=Z.from||"",this.to=Z.to||"",this._unicodeRange=Z.unicodeRange||""}get unicodeRange(){const Z=[],Be=/U\+([0-9a-fA-F]+)/,Ke=this._unicodeRange;for(let et of Ke.split(",").map(dt=>dt.trim()).filter(dt=>!!dt))et=et.split("-",2).map(dt=>{const mt=dt.match(Be);return mt?parseInt(mt[1],16):0}),et.length===1&&et.push(et[0]),Z.push(et);return(0,t.shadow)(this,"unicodeRange",Z)}}class Q extends R.ContentObject{constructor(Z){super(o,"exclude")}[k.$finalize](){this[k.$content]=this[k.$content].trim().split(/\s+/).filter(Z=>Z&&["calculate","close","enter","exit","initialize","ready","validate"].includes(Z))}}class ee extends R.StringObject{constructor(Z){super(o,"excludeNS")}}class z extends R.OptionObject{constructor(Z){super(o,"flipLabel",["usePrinterSetting","on","off"])}}class se extends R.XFAObject{constructor(Z){super(o,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new R.XFAObjectArray,this.defaultTypeface=new R.XFAObjectArray,this.neverEmbed=new R.XFAObjectArray}}class ne extends R.Option01{constructor(Z){super(o,"formFieldFilling")}}class V extends R.StringObject{constructor(Z){super(o,"groupParent")}}class ae extends R.OptionObject{constructor(Z){super(o,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class ce extends R.StringObject{constructor(Z){super(o,"includeXDPContent")}}class de extends R.OptionObject{constructor(Z){super(o,"incrementalLoad",["none","forwardOnly"])}}class Ae extends R.Option01{constructor(Z){super(o,"incrementalMerge")}}class ve extends R.Option01{constructor(Z){super(o,"interactive")}}class pe extends R.OptionObject{constructor(Z){super(o,"jog",["usePrinterSetting","none","pageSet"])}}class ge extends R.XFAObject{constructor(Z){super(o,"labelPrinter",!0),this.name=(0,e.getStringOption)(Z.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class fe extends R.OptionObject{constructor(Z){super(o,"layout",["paginate","panel"])}}class xe extends R.IntegerObject{constructor(Z){super(o,"level",0,Be=>Be>0)}}class Te extends R.Option01{constructor(Z){super(o,"linearized")}}class Le extends R.StringObject{constructor(Z){super(o,"locale")}}class Ie extends R.StringObject{constructor(Z){super(o,"localeSet")}}class ue extends R.XFAObject{constructor(Z){super(o,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}}class me extends R.XFAObject{constructor(Z){super(o,"map",!0),this.equate=new R.XFAObjectArray,this.equateRange=new R.XFAObjectArray}}class De extends R.XFAObject{constructor(Z){super(o,"mediumInfo",!0),this.map=null}}class Fe extends R.XFAObject{constructor(Z){super(o,"message",!0),this.msgId=null,this.severity=null}}class je extends R.XFAObject{constructor(Z){super(o,"messaging",!0),this.message=new R.XFAObjectArray}}class Ue extends R.OptionObject{constructor(Z){super(o,"mode",["append","overwrite"])}}class ht extends R.Option01{constructor(Z){super(o,"modifyAnnots")}}class _e extends R.IntegerObject{constructor(Z){super(o,"msgId",1,Be=>Be>=1)}}class st extends R.StringObject{constructor(Z){super(o,"nameAttr")}}class Je extends R.ContentObject{constructor(Z){super(o,"neverEmbed")}}class be extends R.IntegerObject{constructor(Z){super(o,"numberOfCopies",null,Be=>Be>=2&&Be<=5)}}class he extends R.XFAObject{constructor(Z){super(o,"openAction",!0),this.destination=null}}class ye extends R.XFAObject{constructor(Z){super(o,"output",!0),this.to=null,this.type=null,this.uri=null}}class Se extends R.StringObject{constructor(Z){super(o,"outputBin")}}class Oe extends R.XFAObject{constructor(Z){super(o,"outputXSL",!0),this.uri=null}}class Re extends R.OptionObject{constructor(Z){super(o,"overprint",["none","both","draw","field"])}}class Ne extends R.StringObject{constructor(Z){super(o,"packets")}[k.$finalize](){this[k.$content]!=="*"&&(this[k.$content]=this[k.$content].trim().split(/\s+/).filter(Z=>["config","datasets","template","xfdf","xslt"].includes(Z)))}}class Ye extends R.XFAObject{constructor(Z){super(o,"pageOffset"),this.x=(0,e.getInteger)({data:Z.x,defaultValue:"useXDCSetting",validate:Be=>!0}),this.y=(0,e.getInteger)({data:Z.y,defaultValue:"useXDCSetting",validate:Be=>!0})}}class Ge extends R.StringObject{constructor(Z){super(o,"pageRange")}[k.$finalize](){const Z=this[k.$content].trim().split(/\s+/).map(Ke=>parseInt(Ke,10)),Be=[];for(let Ke=0,et=Z.length;Ke<et;Ke+=2)Be.push(Z.slice(Ke,Ke+2));this[k.$content]=Be}}class ze extends R.OptionObject{constructor(Z){super(o,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class Qe extends R.OptionObject{constructor(Z){super(o,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class tt extends R.IntegerObject{constructor(Z){super(o,"part",1,Be=>!1)}}class rt extends R.XFAObject{constructor(Z){super(o,"pcl",!0),this.name=Z.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.pageOffset=null,this.staple=null,this.xdc=null}}class ut extends R.XFAObject{constructor(Z){super(o,"pdf",!0),this.name=Z.name||"",this.adobeExtensionLevel=null,this.batchOutput=null,this.compression=null,this.creator=null,this.encryption=null,this.fontInfo=null,this.interactive=null,this.linearized=null,this.openAction=null,this.pdfa=null,this.producer=null,this.renderPolicy=null,this.scriptModel=null,this.silentPrint=null,this.submitFormat=null,this.tagged=null,this.version=null,this.viewerPreferences=null,this.xdc=null}}class ot extends R.XFAObject{constructor(Z){super(o,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class yt extends R.XFAObject{constructor(Z){super(o,"permissions",!0),this.accessibleContent=null,this.change=null,this.contentCopy=null,this.documentAssembly=null,this.formFieldFilling=null,this.modifyAnnots=null,this.plaintextMetadata=null,this.print=null,this.printHighQuality=null}}class Et extends R.Option01{constructor(Z){super(o,"pickTrayByPDFSize")}}class We extends R.StringObject{constructor(Z){super(o,"picture")}}class Xe extends R.Option01{constructor(Z){super(o,"plaintextMetadata")}}class Ze extends R.OptionObject{constructor(Z){super(o,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class it extends R.XFAObject{constructor(Z){super(o,"present",!0),this.behaviorOverride=null,this.cache=null,this.common=null,this.copies=null,this.destination=null,this.incrementalMerge=null,this.layout=null,this.output=null,this.overprint=null,this.pagination=null,this.paginationOverride=null,this.script=null,this.validate=null,this.xdp=null,this.driver=new R.XFAObjectArray,this.labelPrinter=new R.XFAObjectArray,this.pcl=new R.XFAObjectArray,this.pdf=new R.XFAObjectArray,this.ps=new R.XFAObjectArray,this.submitUrl=new R.XFAObjectArray,this.webClient=new R.XFAObjectArray,this.zpl=new R.XFAObjectArray}}class ct extends R.Option01{constructor(Z){super(o,"print")}}class xt extends R.Option01{constructor(Z){super(o,"printHighQuality")}}class lt extends R.OptionObject{constructor(Z){super(o,"printScaling",["appdefault","noScaling"])}}class nt extends R.StringObject{constructor(Z){super(o,"printerName")}}class gt extends R.StringObject{constructor(Z){super(o,"producer")}}class vt extends R.XFAObject{constructor(Z){super(o,"ps",!0),this.name=Z.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}class Mt extends R.ContentObject{constructor(Z){super(o,"range")}[k.$finalize](){this[k.$content]=this[k.$content].trim().split(/\s*,\s*/,2).map(Z=>Z.split("-").map(Be=>parseInt(Be.trim(),10))).filter(Z=>Z.every(Be=>!isNaN(Be))).map(Z=>(Z.length===1&&Z.push(Z[0]),Z))}}class At extends R.ContentObject{constructor(Z){super(o,"record")}[k.$finalize](){this[k.$content]=this[k.$content].trim();const Z=parseInt(this[k.$content],10);!isNaN(Z)&&Z>=0&&(this[k.$content]=Z)}}class St extends R.ContentObject{constructor(Z){super(o,"relevant")}[k.$finalize](){this[k.$content]=this[k.$content].trim().split(/\s+/)}}class It extends R.ContentObject{constructor(Z){super(o,"rename")}[k.$finalize](){this[k.$content]=this[k.$content].trim(),(this[k.$content].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[k.$content]))&&(0,t.warn)("XFA - Rename: invalid XFA name")}}class pt extends R.OptionObject{constructor(Z){super(o,"renderPolicy",["server","client"])}}class Ct extends R.OptionObject{constructor(Z){super(o,"runScripts",["both","client","none","server"])}}class ft extends R.XFAObject{constructor(Z){super(o,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class Tt extends R.OptionObject{constructor(Z){super(o,"scriptModel",["XFA","none"])}}class _t extends R.OptionObject{constructor(Z){super(o,"severity",["ignore","error","information","trace","warning"])}}class zt extends R.XFAObject{constructor(Z){super(o,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class kt extends R.XFAObject{constructor(Z){super(o,"staple"),this.mode=(0,e.getStringOption)(Z.mode,["usePrinterSetting","on","off"])}}class Ft extends R.StringObject{constructor(Z){super(o,"startNode")}}class Nt extends R.IntegerObject{constructor(Z){super(o,"startPage",0,Be=>!0)}}class Ut extends R.OptionObject{constructor(Z){super(o,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class Vt extends R.StringObject{constructor(Z){super(o,"submitUrl")}}class nn extends R.IntegerObject{constructor(Z){super(o,"subsetBelow",100,Be=>Be>=0&&Be<=100)}}class Jn extends R.Option01{constructor(Z){super(o,"suppressBanner")}}class Zn extends R.Option01{constructor(Z){super(o,"tagged")}}class Qn extends R.XFAObject{constructor(Z){super(o,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class ei extends R.OptionObject{constructor(Z){super(o,"threshold",["trace","error","information","warning"])}}class ti extends R.OptionObject{constructor(Z){super(o,"to",["null","memory","stderr","stdout","system","uri"])}}class En extends R.XFAObject{constructor(Z){super(o,"templateCache"),this.maxEntries=(0,e.getInteger)({data:Z.maxEntries,defaultValue:5,validate:Be=>Be>=0})}}class mn extends R.XFAObject{constructor(Z){super(o,"trace",!0),this.area=new R.XFAObjectArray}}class ni extends R.XFAObject{constructor(Z){super(o,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class ii extends R.OptionObject{constructor(Z){super(o,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class ai extends R.StringObject{constructor(Z){super(o,"uri")}}class xn extends R.OptionObject{constructor(Z){super(o,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class In extends R.ContentObject{constructor(Z){super(o,"validateApprovalSignatures")}[k.$finalize](){this[k.$content]=this[k.$content].trim().split(/\s+/).filter(Z=>["docReady","postSign"].includes(Z))}}class On extends R.OptionObject{constructor(Z){super(o,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class si extends R.OptionObject{constructor(Z){super(o,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class ri extends R.XFAObject{constructor(Z){super(o,"VersionControl"),this.outputBelow=(0,e.getStringOption)(Z.outputBelow,["warn","error","update"]),this.sourceAbove=(0,e.getStringOption)(Z.sourceAbove,["warn","error"]),this.sourceBelow=(0,e.getStringOption)(Z.sourceBelow,["update","maintain"])}}class oi extends R.XFAObject{constructor(Z){super(o,"viewerPreferences",!0),this.ADBE_JSConsole=null,this.ADBE_JSDebugger=null,this.addViewerPreferences=null,this.duplexOption=null,this.enforce=null,this.numberOfCopies=null,this.pageRange=null,this.pickTrayByPDFSize=null,this.printScaling=null}}class ci extends R.XFAObject{constructor(Z){super(o,"webClient",!0),this.name=Z.name?Z.name.trim():"",this.fontInfo=null,this.xdc=null}}class li extends R.OptionObject{constructor(Z){super(o,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class bn extends R.ContentObject{constructor(Z){super(o,"window")}[k.$finalize](){const Z=this[k.$content].trim().split(/\s*,\s*/,2).map(Be=>parseInt(Be,10));if(Z.some(Be=>isNaN(Be))){this[k.$content]=[0,0];return}Z.length===1&&Z.push(Z[0]),this[k.$content]=Z}}class hi extends R.XFAObject{constructor(Z){super(o,"xdc",!0),this.uri=new R.XFAObjectArray,this.xsl=new R.XFAObjectArray}}class sn extends R.XFAObject{constructor(Z){super(o,"xdp",!0),this.packets=null}}class ui extends R.XFAObject{constructor(Z){super(o,"xsl",!0),this.debug=null,this.uri=null}}class rn extends R.XFAObject{constructor(Z){super(o,"zpl",!0),this.name=Z.name?Z.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class He{static[n.$buildXFAObject](Z,Be){if(He.hasOwnProperty(Z))return He[Z](Be)}static acrobat(Z){return new $(Z)}static acrobat7(Z){return new L(Z)}static ADBE_JSConsole(Z){return new I(Z)}static ADBE_JSDebugger(Z){return new T(Z)}static addSilentPrint(Z){return new d(Z)}static addViewerPreferences(Z){return new f(Z)}static adjustData(Z){return new i(Z)}static adobeExtensionLevel(Z){return new S(Z)}static agent(Z){return new w(Z)}static alwaysEmbed(Z){return new v(Z)}static amd(Z){return new b(Z)}static area(Z){return new M(Z)}static attributes(Z){return new _(Z)}static autoSave(Z){return new H(Z)}static base(Z){return new A(Z)}static batchOutput(Z){return new E(Z)}static behaviorOverride(Z){return new l(Z)}static cache(Z){return new g(Z)}static change(Z){return new N(Z)}static common(Z){return new s(Z)}static compress(Z){return new u(Z)}static compressLogicalStructure(Z){return new F(Z)}static compressObjectStream(Z){return new U(Z)}static compression(Z){return new O(Z)}static config(Z){return new m(Z)}static conformance(Z){return new x(Z)}static contentCopy(Z){return new y(Z)}static copies(Z){return new r(Z)}static creator(Z){return new p(Z)}static currentPage(Z){return new c(Z)}static data(Z){return new h(Z)}static debug(Z){return new C(Z)}static defaultTypeface(Z){return new D(Z)}static destination(Z){return new X(Z)}static documentAssembly(Z){return new q(Z)}static driver(Z){return new re(Z)}static duplexOption(Z){return new K(Z)}static dynamicRender(Z){return new oe(Z)}static embed(Z){return new J(Z)}static encrypt(Z){return new te(Z)}static encryption(Z){return new B(Z)}static encryptionLevel(Z){return new j(Z)}static enforce(Z){return new Y(Z)}static equate(Z){return new W(Z)}static equateRange(Z){return new G(Z)}static exclude(Z){return new Q(Z)}static excludeNS(Z){return new ee(Z)}static flipLabel(Z){return new z(Z)}static fontInfo(Z){return new se(Z)}static formFieldFilling(Z){return new ne(Z)}static groupParent(Z){return new V(Z)}static ifEmpty(Z){return new ae(Z)}static includeXDPContent(Z){return new ce(Z)}static incrementalLoad(Z){return new de(Z)}static incrementalMerge(Z){return new Ae(Z)}static interactive(Z){return new ve(Z)}static jog(Z){return new pe(Z)}static labelPrinter(Z){return new ge(Z)}static layout(Z){return new fe(Z)}static level(Z){return new xe(Z)}static linearized(Z){return new Te(Z)}static locale(Z){return new Le(Z)}static localeSet(Z){return new Ie(Z)}static log(Z){return new ue(Z)}static map(Z){return new me(Z)}static mediumInfo(Z){return new De(Z)}static message(Z){return new Fe(Z)}static messaging(Z){return new je(Z)}static mode(Z){return new Ue(Z)}static modifyAnnots(Z){return new ht(Z)}static msgId(Z){return new _e(Z)}static nameAttr(Z){return new st(Z)}static neverEmbed(Z){return new Je(Z)}static numberOfCopies(Z){return new be(Z)}static openAction(Z){return new he(Z)}static output(Z){return new ye(Z)}static outputBin(Z){return new Se(Z)}static outputXSL(Z){return new Oe(Z)}static overprint(Z){return new Re(Z)}static packets(Z){return new Ne(Z)}static pageOffset(Z){return new Ye(Z)}static pageRange(Z){return new Ge(Z)}static pagination(Z){return new ze(Z)}static paginationOverride(Z){return new Qe(Z)}static part(Z){return new tt(Z)}static pcl(Z){return new rt(Z)}static pdf(Z){return new ut(Z)}static pdfa(Z){return new ot(Z)}static permissions(Z){return new yt(Z)}static pickTrayByPDFSize(Z){return new Et(Z)}static picture(Z){return new We(Z)}static plaintextMetadata(Z){return new Xe(Z)}static presence(Z){return new Ze(Z)}static present(Z){return new it(Z)}static print(Z){return new ct(Z)}static printHighQuality(Z){return new xt(Z)}static printScaling(Z){return new lt(Z)}static printerName(Z){return new nt(Z)}static producer(Z){return new gt(Z)}static ps(Z){return new vt(Z)}static range(Z){return new Mt(Z)}static record(Z){return new At(Z)}static relevant(Z){return new St(Z)}static rename(Z){return new It(Z)}static renderPolicy(Z){return new pt(Z)}static runScripts(Z){return new Ct(Z)}static script(Z){return new ft(Z)}static scriptModel(Z){return new Tt(Z)}static severity(Z){return new _t(Z)}static silentPrint(Z){return new zt(Z)}static staple(Z){return new kt(Z)}static startNode(Z){return new Ft(Z)}static startPage(Z){return new Nt(Z)}static submitFormat(Z){return new Ut(Z)}static submitUrl(Z){return new Vt(Z)}static subsetBelow(Z){return new nn(Z)}static suppressBanner(Z){return new Jn(Z)}static tagged(Z){return new Zn(Z)}static template(Z){return new Qn(Z)}static templateCache(Z){return new En(Z)}static threshold(Z){return new ei(Z)}static to(Z){return new ti(Z)}static trace(Z){return new mn(Z)}static transform(Z){return new ni(Z)}static type(Z){return new ii(Z)}static uri(Z){return new ai(Z)}static validate(Z){return new xn(Z)}static validateApprovalSignatures(Z){return new In(Z)}static validationMessaging(Z){return new On(Z)}static version(Z){return new si(Z)}static versionControl(Z){return new ri(Z)}static viewerPreferences(Z){return new oi(Z)}static webClient(Z){return new ci(Z)}static whitespace(Z){return new li(Z)}static window(Z){return new bn(Z)}static xdc(Z){return new hi(Z)}static xdp(Z){return new sn(Z)}static xsl(Z){return new ui(Z)}static zpl(Z){return new rn(Z)}}P.ConfigNamespace=He},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.ConnectionSetNamespace=void 0;var n=ie(81),k=ie(87);const R=n.NamespaceIds.connectionSet.id;class e extends k.XFAObject{constructor(M){super(R,"connectionSet",!0),this.wsdlConnection=new k.XFAObjectArray,this.xmlConnection=new k.XFAObjectArray,this.xsdConnection=new k.XFAObjectArray}}class t extends k.XFAObject{constructor(M){super(R,"effectiveInputPolicy"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class o extends k.XFAObject{constructor(M){super(R,"effectiveOutputPolicy"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class $ extends k.StringObject{constructor(M){super(R,"operation"),this.id=M.id||"",this.input=M.input||"",this.name=M.name||"",this.output=M.output||"",this.use=M.use||"",this.usehref=M.usehref||""}}class L extends k.StringObject{constructor(M){super(R,"rootElement"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class I extends k.StringObject{constructor(M){super(R,"soapAction"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class T extends k.StringObject{constructor(M){super(R,"soapAddress"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class d extends k.StringObject{constructor(M){super(R,"uri"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class f extends k.StringObject{constructor(M){super(R,"wsdlAddress"),this.id=M.id||"",this.name=M.name||"",this.use=M.use||"",this.usehref=M.usehref||""}}class i extends k.XFAObject{constructor(M){super(R,"wsdlConnection",!0),this.dataDescription=M.dataDescription||"",this.name=M.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class S extends k.XFAObject{constructor(M){super(R,"xmlConnection",!0),this.dataDescription=M.dataDescription||"",this.name=M.name||"",this.uri=null}}class w extends k.XFAObject{constructor(M){super(R,"xsdConnection",!0),this.dataDescription=M.dataDescription||"",this.name=M.name||"",this.rootElement=null,this.uri=null}}class v{static[n.$buildXFAObject](M,_){if(v.hasOwnProperty(M))return v[M](_)}static connectionSet(M){return new e(M)}static effectiveInputPolicy(M){return new t(M)}static effectiveOutputPolicy(M){return new o(M)}static operation(M){return new $(M)}static rootElement(M){return new L(M)}static soapAction(M){return new I(M)}static soapAddress(M){return new T(M)}static uri(M){return new d(M)}static wsdlAddress(M){return new f(M)}static wsdlConnection(M){return new i(M)}static xmlConnection(M){return new S(M)}static xsdConnection(M){return new w(M)}}P.ConnectionSetNamespace=v},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DatasetsNamespace=void 0;var n=ie(78),k=ie(81),R=ie(87);const e=k.NamespaceIds.datasets.id;class t extends R.XmlObject{constructor(I){super(e,"data",I)}[n.$isNsAgnostic](){return!0}}class o extends R.XFAObject{constructor(I){super(e,"datasets",!0),this.data=null,this.Signature=null}[n.$onChild](I){const T=I[n.$nodeName];(T==="data"&&I[n.$namespaceId]===e||T==="Signature"&&I[n.$namespaceId]===k.NamespaceIds.signature.id)&&(this[T]=I),this[n.$appendChild](I)}}class ${static[k.$buildXFAObject](I,T){if($.hasOwnProperty(I))return $[I](T)}static datasets(I){return new o(I)}static data(I){return new t(I)}}P.DatasetsNamespace=$},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.LocaleSetNamespace=void 0;var n=ie(81),k=ie(87),R=ie(84);const e=n.NamespaceIds.localeSet.id;class t extends k.XFAObject{constructor(m){super(e,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new k.XFAObjectArray(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new k.XFAObjectArray(2)}}class o extends k.StringObject{constructor(m){super(e,"currencySymbol"),this.name=(0,R.getStringOption)(m.name,["symbol","isoname","decimal"])}}class $ extends k.XFAObject{constructor(m){super(e,"currencySymbols",!0),this.currencySymbol=new k.XFAObjectArray(3)}}class L extends k.StringObject{constructor(m){super(e,"datePattern"),this.name=(0,R.getStringOption)(m.name,["full","long","med","short"])}}class I extends k.XFAObject{constructor(m){super(e,"datePatterns",!0),this.datePattern=new k.XFAObjectArray(4)}}class T extends k.ContentObject{constructor(m){super(e,"dateTimeSymbols")}}class d extends k.StringObject{constructor(m){super(e,"day")}}class f extends k.XFAObject{constructor(m){super(e,"dayNames",!0),this.abbr=(0,R.getInteger)({data:m.abbr,defaultValue:0,validate:x=>x===1}),this.day=new k.XFAObjectArray(7)}}class i extends k.StringObject{constructor(m){super(e,"era")}}class S extends k.XFAObject{constructor(m){super(e,"eraNames",!0),this.era=new k.XFAObjectArray(2)}}class w extends k.XFAObject{constructor(m){super(e,"locale",!0),this.desc=m.desc||"",this.name="isoname",this.calendarSymbols=null,this.currencySymbols=null,this.datePatterns=null,this.dateTimeSymbols=null,this.numberPatterns=null,this.numberSymbols=null,this.timePatterns=null,this.typeFaces=null}}class v extends k.XFAObject{constructor(m){super(e,"localeSet",!0),this.locale=new k.XFAObjectArray}}class b extends k.StringObject{constructor(m){super(e,"meridiem")}}class M extends k.XFAObject{constructor(m){super(e,"meridiemNames",!0),this.meridiem=new k.XFAObjectArray(2)}}class _ extends k.StringObject{constructor(m){super(e,"month")}}class H extends k.XFAObject{constructor(m){super(e,"monthNames",!0),this.abbr=(0,R.getInteger)({data:m.abbr,defaultValue:0,validate:x=>x===1}),this.month=new k.XFAObjectArray(12)}}class A extends k.StringObject{constructor(m){super(e,"numberPattern"),this.name=(0,R.getStringOption)(m.name,["full","long","med","short"])}}class E extends k.XFAObject{constructor(m){super(e,"numberPatterns",!0),this.numberPattern=new k.XFAObjectArray(4)}}class l extends k.StringObject{constructor(m){super(e,"numberSymbol"),this.name=(0,R.getStringOption)(m.name,["decimal","grouping","percent","minus","zero"])}}class g extends k.XFAObject{constructor(m){super(e,"numberSymbols",!0),this.numberSymbol=new k.XFAObjectArray(5)}}class N extends k.StringObject{constructor(m){super(e,"timePattern"),this.name=(0,R.getStringOption)(m.name,["full","long","med","short"])}}class s extends k.XFAObject{constructor(m){super(e,"timePatterns",!0),this.timePattern=new k.XFAObjectArray(4)}}class u extends k.XFAObject{constructor(m){super(e,"typeFace",!0),this.name=m.name|""}}class F extends k.XFAObject{constructor(m){super(e,"typeFaces",!0),this.typeFace=new k.XFAObjectArray}}class U{static[n.$buildXFAObject](m,x){if(U.hasOwnProperty(m))return U[m](x)}static calendarSymbols(m){return new t(m)}static currencySymbol(m){return new o(m)}static currencySymbols(m){return new $(m)}static datePattern(m){return new L(m)}static datePatterns(m){return new I(m)}static dateTimeSymbols(m){return new T(m)}static day(m){return new d(m)}static dayNames(m){return new f(m)}static era(m){return new i(m)}static eraNames(m){return new S(m)}static locale(m){return new w(m)}static localeSet(m){return new v(m)}static meridiem(m){return new b(m)}static meridiemNames(m){return new M(m)}static month(m){return new _(m)}static monthNames(m){return new H(m)}static numberPattern(m){return new A(m)}static numberPatterns(m){return new E(m)}static numberSymbol(m){return new l(m)}static numberSymbols(m){return new g(m)}static timePattern(m){return new N(m)}static timePatterns(m){return new s(m)}static typeFace(m){return new u(m)}static typeFaces(m){return new F(m)}}P.LocaleSetNamespace=U},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.SignatureNamespace=void 0;var n=ie(81),k=ie(87);const R=n.NamespaceIds.signature.id;class e extends k.XFAObject{constructor($){super(R,"signature",!0)}}class t{static[n.$buildXFAObject]($,L){if(t.hasOwnProperty($))return t[$](L)}static signature($){return new e($)}}P.SignatureNamespace=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.StylesheetNamespace=void 0;var n=ie(81),k=ie(87);const R=n.NamespaceIds.stylesheet.id;class e extends k.XFAObject{constructor($){super(R,"stylesheet",!0)}}class t{static[n.$buildXFAObject]($,L){if(t.hasOwnProperty($))return t[$](L)}static stylesheet($){return new e($)}}P.StylesheetNamespace=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XdpNamespace=void 0;var n=ie(81),k=ie(78),R=ie(87);const e=n.NamespaceIds.xdp.id;class t extends R.XFAObject{constructor(L){super(e,"xdp",!0),this.uuid=L.uuid||"",this.timeStamp=L.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new R.XFAObjectArray,this.template=null}[k.$onChildCheck](L){const I=n.NamespaceIds[L[k.$nodeName]];return I&&L[k.$namespaceId]===I.id}}class o{static[n.$buildXFAObject](L,I){if(o.hasOwnProperty(L))return o[L](I)}static xdp(L){return new t(L)}}P.XdpNamespace=o},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.XhtmlNamespace=void 0;var n=ie(78),k=ie(81),R=ie(83),e=ie(84),t=ie(87);const o=k.NamespaceIds.xhtml.id,$=Symbol(),L=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-height","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),I=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",m=>m==="none"?"none":"normal"],["xfa-font-horizontal-scale",m=>`scaleX(${Math.max(0,Math.min(parseInt(m)/100)).toFixed(2)})`],["xfa-font-vertical-scale",m=>`scaleY(${Math.max(0,Math.min(parseInt(m)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(m,x)=>(m=x.fontSize=(0,e.getMeasurement)(m),(0,R.measureToString)(.99*m))],["letter-spacing",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["line-height",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["margin",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["margin-bottom",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["margin-left",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["margin-right",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["margin-top",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["text-indent",m=>(0,R.measureToString)((0,e.getMeasurement)(m))],["font-family",m=>m],["vertical-align",m=>(0,R.measureToString)((0,e.getMeasurement)(m))]]),T=/\s+/g,d=/[\r\n]+/g,f=/\r\n?/g;function i(m,x,y){const r=Object.create(null);if(!m)return r;const p=Object.create(null);for(const[c,h]of m.split(";").map(C=>C.split(":",2))){const C=I.get(c);if(C==="")continue;let D=h;C&&(D=typeof C=="string"?C:C(h,p)),c.endsWith("scale")?r.transform=r.transform?`${r[c]} ${D}`:D:r[c.replaceAll(/-([a-zA-Z])/g,(X,q)=>q.toUpperCase())]=D}if(r.fontFamily&&(0,R.setFontFamily)({typeface:r.fontFamily,weight:r.fontWeight||"normal",posture:r.fontStyle||"normal",size:p.fontSize||0},x,x[n.$globalData].fontFinder,r),y&&r.verticalAlign&&r.verticalAlign!=="0px"&&r.fontSize){const C=(0,e.getMeasurement)(r.fontSize);r.fontSize=(0,R.measureToString)(C*.583),r.verticalAlign=(0,R.measureToString)(Math.sign((0,e.getMeasurement)(r.verticalAlign))*C*.333)}return y&&r.fontSize&&(r.fontSize=`calc(${r.fontSize} * var(--scale-factor))`),(0,R.fixTextIndent)(r),r}function S(m){return m.style?m.style.trim().split(/\s*;\s*/).filter(x=>!!x).map(x=>x.split(/\s*:\s*/,2)).filter(([x,y])=>(x==="font-family"&&m[n.$globalData].usedTypefaces.add(y),L.has(x))).map(x=>x.join(":")).join(";"):""}const w=new Set(["body","html"]);class v extends t.XmlObject{constructor(x,y){super(o,y),this[$]=!1,this.style=x.style||""}[n.$clean](x){super[n.$clean](x),this.style=S(this)}[n.$acceptWhitespace](){return!w.has(this[n.$nodeName])}[n.$onText](x,y=!1){y?this[$]=!0:(x=x.replaceAll(d,""),this.style.includes("xfa-spacerun:yes")||(x=x.replaceAll(T," "))),x&&(this[n.$content]+=x)}[n.$pushGlyphs](x,y=!0){const r=Object.create(null),p={top:NaN,bottom:NaN,left:NaN,right:NaN};let c=null;for(const[h,C]of this.style.split(";").map(D=>D.split(":",2)))switch(h){case"font-family":r.typeface=(0,e.stripQuotes)(C);break;case"font-size":r.size=(0,e.getMeasurement)(C);break;case"font-weight":r.weight=C;break;case"font-style":r.posture=C;break;case"letter-spacing":r.letterSpacing=(0,e.getMeasurement)(C);break;case"margin":const D=C.split(/ \t/).map(X=>(0,e.getMeasurement)(X));switch(D.length){case 1:p.top=p.bottom=p.left=p.right=D[0];break;case 2:p.top=p.bottom=D[0],p.left=p.right=D[1];break;case 3:p.top=D[0],p.bottom=D[2],p.left=p.right=D[1];break;case 4:p.top=D[0],p.left=D[1],p.bottom=D[2],p.right=D[3];break}break;case"margin-top":p.top=(0,e.getMeasurement)(C);break;case"margin-bottom":p.bottom=(0,e.getMeasurement)(C);break;case"margin-left":p.left=(0,e.getMeasurement)(C);break;case"margin-right":p.right=(0,e.getMeasurement)(C);break;case"line-height":c=(0,e.getMeasurement)(C);break}if(x.pushData(r,p,c),this[n.$content])x.addString(this[n.$content]);else for(const h of this[n.$getChildren]()){if(h[n.$nodeName]==="#text"){x.addString(h[n.$content]);continue}h[n.$pushGlyphs](x)}y&&x.popFont()}[n.$toHTML](x){const y=[];if(this[n.$extra]={children:y},this[n.$childrenToHTML]({}),y.length===0&&!this[n.$content])return e.HTMLResult.EMPTY;let r;return this[$]?r=this[n.$content]?this[n.$content].replaceAll(f,`
`):void 0:r=this[n.$content]||void 0,e.HTMLResult.success({name:this[n.$nodeName],attributes:{href:this.href,style:i(this.style,this,this[$])},children:y,value:r})}}class b extends v{constructor(x){super(x,"a"),this.href=(0,R.fixURL)(x.href)||""}}class M extends v{constructor(x){super(x,"b")}[n.$pushGlyphs](x){x.pushFont({weight:"bold"}),super[n.$pushGlyphs](x),x.popFont()}}class _ extends v{constructor(x){super(x,"body")}[n.$toHTML](x){const y=super[n.$toHTML](x),{html:r}=y;return r?(r.name="div",r.attributes.class=["xfaRich"],y):e.HTMLResult.EMPTY}}class H extends v{constructor(x){super(x,"br")}[n.$text](){return`
`}[n.$pushGlyphs](x){x.addString(`
`)}[n.$toHTML](x){return e.HTMLResult.success({name:"br"})}}class A extends v{constructor(x){super(x,"html")}[n.$toHTML](x){var r;const y=[];if(this[n.$extra]={children:y},this[n.$childrenToHTML]({}),y.length===0)return e.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[n.$content]||""});if(y.length===1){const p=y[0];if((r=p.attributes)!=null&&r.class.includes("xfaRich"))return e.HTMLResult.success(p)}return e.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:y})}}class E extends v{constructor(x){super(x,"i")}[n.$pushGlyphs](x){x.pushFont({posture:"italic"}),super[n.$pushGlyphs](x),x.popFont()}}class l extends v{constructor(x){super(x,"li")}}class g extends v{constructor(x){super(x,"ol")}}class N extends v{constructor(x){super(x,"p")}[n.$pushGlyphs](x){super[n.$pushGlyphs](x,!1),x.addString(`
`),x.addPara(),x.popFont()}[n.$text](){return this[n.$getParent]()[n.$getChildren]().at(-1)===this?super[n.$text]():super[n.$text]()+`
`}}class s extends v{constructor(x){super(x,"span")}}class u extends v{constructor(x){super(x,"sub")}}class F extends v{constructor(x){super(x,"sup")}}class U extends v{constructor(x){super(x,"ul")}}class O{static[k.$buildXFAObject](x,y){if(O.hasOwnProperty(x))return O[x](y)}static a(x){return new b(x)}static b(x){return new M(x)}static body(x){return new _(x)}static br(x){return new H(x)}static html(x){return new A(x)}static i(x){return new E(x)}static li(x){return new l(x)}static ol(x){return new g(x)}static p(x){return new N(x)}static span(x){return new s(x)}static sub(x){return new u(x)}static sup(x){return new F(x)}static ul(x){return new U(x)}}P.XhtmlNamespace=O},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.UnknownNamespace=void 0;var n=ie(81),k=ie(87);class R{constructor(t){this.namespaceId=t}[n.$buildXFAObject](t,o){return new k.XmlObject(this.namespaceId,t,o)}}P.UnknownNamespace=R},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.DatasetReader=void 0;var n=ie(2),k=ie(3),R=ie(71);function e($){try{return(0,n.stringToUTF8String)($)}catch(L){return(0,n.warn)(`UTF-8 decoding failed: "${L}".`),$}}class t extends R.SimpleXMLParser{constructor(L){super(L),this.node=null}onEndElement(L){const I=super.onEndElement(L);if(I&&L==="xfa:datasets")throw this.node=I,new Error("Aborting DatasetXMLParser.")}}class o{constructor(L){if(L.datasets)this.node=new R.SimpleXMLParser({hasAttributes:!0}).parseFromString(L.datasets).documentElement;else{const I=new t({hasAttributes:!0});try{I.parseFromString(L["xdp:xdp"])}catch{}this.node=I.node}}getValue(L){if(!this.node||!L)return"";const I=this.node.searchNode((0,k.parseXFAPath)(L),0);if(!I)return"";const T=I.firstChild;return(T==null?void 0:T.nodeName)==="value"?I.children.map(d=>e(d.textContent)):e(I.textContent)}}P.DatasetReader=o},(ke,P,ie)=>{var L;Object.defineProperty(P,"__esModule",{value:!0}),P.XRef=void 0;var n=ie(2),k=ie(4),R=ie(16),e=ie(3),t=ie(5),o=ie(74);class ${constructor(T,d){Ee(this,L,null);this.stream=T,this.pdfManager=d,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new k.RefSet,this._newPersistentRefNum=null,this._newTemporaryRefNum=null}getNewPersistentRef(T){this._newPersistentRefNum===null&&(this._newPersistentRefNum=this.entries.length||1);const d=this._newPersistentRefNum++;return this._cacheMap.set(d,T),k.Ref.get(d,0)}getNewTemporaryRef(){return this._newTemporaryRefNum===null&&(this._newTemporaryRefNum=this.entries.length||1),k.Ref.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){this._newTemporaryRefNum=null}setStartXRef(T){this.startXRefQueue=[T]}parse(T=!1){let d;T?((0,n.warn)("Indexing all PDF objects"),d=this.indexObjects()):d=this.readXRef(),d.assignXref(this),this.trailer=d;let f;try{f=d.get("Encrypt")}catch(S){if(S instanceof e.MissingDataException)throw S;(0,n.warn)(`XRef.parse - Invalid "Encrypt" reference: "${S}".`)}if(f instanceof k.Dict){const S=d.get("ID"),w=S!=null&&S.length?S[0]:"";f.suppressEncryption=!0,this.encrypt=new o.CipherTransformFactory(f,w,this.pdfManager.password)}let i;try{i=d.get("Root")}catch(S){if(S instanceof e.MissingDataException)throw S;(0,n.warn)(`XRef.parse - Invalid "Root" reference: "${S}".`)}if(i instanceof k.Dict)try{if(i.get("Pages")instanceof k.Dict){this.root=i;return}}catch(S){if(S instanceof e.MissingDataException)throw S;(0,n.warn)(`XRef.parse - Invalid "Pages" reference: "${S}".`)}throw T?new n.InvalidPDFException("Invalid Root reference."):new e.XRefParseException}processXRefTable(T){"tableState"in this||(this.tableState={entryNum:0,streamPos:T.lexer.stream.pos,parserBuf1:T.buf1,parserBuf2:T.buf2});const d=this.readXRefTable(T);if(!(0,k.isCmd)(d,"trailer"))throw new n.FormatError("Invalid XRef table: could not find trailer dictionary");let f=T.getObj();if(!(f instanceof k.Dict)&&f.dict&&(f=f.dict),!(f instanceof k.Dict))throw new n.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,f}readXRefTable(T){const d=T.lexer.stream,f=this.tableState;d.pos=f.streamPos,T.buf1=f.parserBuf1,T.buf2=f.parserBuf2;let i;for(;;){if(!("firstEntryNum"in f)||!("entryCount"in f)){if((0,k.isCmd)(i=T.getObj(),"trailer"))break;f.firstEntryNum=i,f.entryCount=T.getObj()}let S=f.firstEntryNum;const w=f.entryCount;if(!Number.isInteger(S)||!Number.isInteger(w))throw new n.FormatError("Invalid XRef table: wrong types in subsection header");for(let v=f.entryNum;v<w;v++){f.streamPos=d.pos,f.entryNum=v,f.parserBuf1=T.buf1,f.parserBuf2=T.buf2;const b={};b.offset=T.getObj(),b.gen=T.getObj();const M=T.getObj();if(M instanceof k.Cmd)switch(M.cmd){case"f":b.free=!0;break;case"n":b.uncompressed=!0;break}if(!Number.isInteger(b.offset)||!Number.isInteger(b.gen)||!(b.free||b.uncompressed))throw new n.FormatError(`Invalid entry in XRef subsection: ${S}, ${w}`);v===0&&b.free&&S===1&&(S=0),this.entries[v+S]||(this.entries[v+S]=b)}f.entryNum=0,f.streamPos=d.pos,f.parserBuf1=T.buf1,f.parserBuf2=T.buf2,delete f.firstEntryNum,delete f.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new n.FormatError("Invalid XRef table: unexpected first object");return i}processXRefStream(T){if(!("streamState"in this)){const d=T.dict,f=d.get("W");let i=d.get("Index");i||(i=[0,d.get("Size")]),this.streamState={entryRanges:i,byteWidths:f,entryNum:0,streamPos:T.pos}}return this.readXRefStream(T),delete this.streamState,T.dict}readXRefStream(T){const d=this.streamState;T.pos=d.streamPos;const[f,i,S]=d.byteWidths,w=d.entryRanges;for(;w.length>0;){const[v,b]=w;if(!Number.isInteger(v)||!Number.isInteger(b))throw new n.FormatError(`Invalid XRef range fields: ${v}, ${b}`);if(!Number.isInteger(f)||!Number.isInteger(i)||!Number.isInteger(S))throw new n.FormatError(`Invalid XRef entry fields length: ${v}, ${b}`);for(let M=d.entryNum;M<b;++M){d.entryNum=M,d.streamPos=T.pos;let _=0,H=0,A=0;for(let l=0;l<f;++l){const g=T.getByte();if(g===-1)throw new n.FormatError("Invalid XRef byteWidths 'type'.");_=_<<8|g}f===0&&(_=1);for(let l=0;l<i;++l){const g=T.getByte();if(g===-1)throw new n.FormatError("Invalid XRef byteWidths 'offset'.");H=H<<8|g}for(let l=0;l<S;++l){const g=T.getByte();if(g===-1)throw new n.FormatError("Invalid XRef byteWidths 'generation'.");A=A<<8|g}const E={};switch(E.offset=H,E.gen=A,_){case 0:E.free=!0;break;case 1:E.uncompressed=!0;break;case 2:break;default:throw new n.FormatError(`Invalid XRef entry type: ${_}`)}this.entries[v+M]||(this.entries[v+M]=E)}d.entryNum=0,d.streamPos=T.pos,w.splice(0,2)}}indexObjects(){function v(p,c){let h="",C=p[c];for(;C!==10&&C!==13&&C!==60&&!(++c>=p.length);)h+=String.fromCharCode(C),C=p[c];return h}function b(p,c,h){const C=h.length,D=p.length;let X=0;for(;c<D;){let q=0;for(;q<C&&p[c+q]===h[q];)++q;if(q>=C)break;c++,X++}return X}const M=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,_=/\b(startxref|\d+\s+\d+\s+obj)\b/g,H=/^(\d+)\s+(\d+)\s+obj\b/,A=new Uint8Array([116,114,97,105,108,101,114]),E=new Uint8Array([115,116,97,114,116,120,114,101,102]),l=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();const g=this.stream;g.pos=0;const N=g.getBytes(),s=(0,n.bytesToString)(N),u=N.length;let F=g.start;const U=[],O=[];for(;F<u;){let p=N[F];if(p===9||p===10||p===13||p===32){++F;continue}if(p===37){do{if(++F,F>=u)break;p=N[F]}while(p!==10&&p!==13);continue}const c=v(N,F);let h;if(c.startsWith("xref")&&(c.length===4||/\s/.test(c[4])))F+=b(N,F,A),U.push(F),F+=b(N,F,E);else if(h=H.exec(c)){const C=h[1]|0,D=h[2]|0,X=F+c.length;let q,re=!1;if(!this.entries[C])re=!0;else if(this.entries[C].gen===D)try{new R.Parser({lexer:new R.Lexer(g.makeSubStream(X))}).getObj(),re=!0}catch(te){te instanceof e.ParserEOFException?(0,n.warn)(`indexObjects -- checking object (${c}): "${te}".`):re=!0}re&&(this.entries[C]={offset:F-g.start,gen:D,uncompressed:!0}),M.lastIndex=X;const K=M.exec(s);K?(q=M.lastIndex+1-F,K[1]!=="endobj"&&((0,n.warn)(`indexObjects: Found "${K[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`),q-=K[1].length+1)):q=u-F;const oe=N.subarray(F,F+q),J=b(oe,0,l);J<q&&oe[J+5]<64&&(O.push(F-g.start),this._xrefStms.add(F-g.start)),F+=q}else if(c.startsWith("trailer")&&(c.length===7||/\s/.test(c[7]))){U.push(F);const C=F+c.length;let D;_.lastIndex=C;const X=_.exec(s);X?(D=_.lastIndex+1-F,X[1]!=="startxref"&&((0,n.warn)(`indexObjects: Found "${X[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`),D-=X[1].length+1)):D=u-F,F+=D}else F+=c.length+1}for(const p of O)this.startXRefQueue.push(p),this.readXRef(!0);const m=[];let x=!1;for(const p of U){g.pos=p;const c=new R.Parser({lexer:new R.Lexer(g),xref:this,allowStreams:!0,recoveryMode:!0}),h=c.getObj();if(!(0,k.isCmd)(h,"trailer"))continue;const C=c.getObj();C instanceof k.Dict&&(m.push(C),C.has("Encrypt")&&(x=!0))}let y,r;for(const p of[...m,"genFallback",...m]){if(p==="genFallback"){if(!r)break;this._generationFallback=!0;continue}let c=!1;try{const h=p.get("Root");if(!(h instanceof k.Dict))continue;const C=h.get("Pages");if(!(C instanceof k.Dict))continue;const D=C.get("Count");Number.isInteger(D)&&(c=!0)}catch(h){r=h;continue}if(c&&(!x||p.has("Encrypt"))&&p.has("ID"))return p;y=p}if(y)return y;if(this.topDict)return this.topDict;throw new n.InvalidPDFException("Invalid PDF structure.")}readXRef(T=!1){const d=this.stream,f=new Set;for(;this.startXRefQueue.length;){try{const i=this.startXRefQueue[0];if(f.has(i)){(0,n.warn)("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}f.add(i),d.pos=i+d.start;const S=new R.Parser({lexer:new R.Lexer(d),xref:this,allowStreams:!0});let w=S.getObj(),v;if((0,k.isCmd)(w,"xref"))v=this.processXRefTable(S),this.topDict||(this.topDict=v),w=v.get("XRefStm"),Number.isInteger(w)&&!this._xrefStms.has(w)&&(this._xrefStms.add(w),this.startXRefQueue.push(w),le(this,L)??$e(this,L,w));else if(Number.isInteger(w)){if(!Number.isInteger(S.getObj())||!(0,k.isCmd)(S.getObj(),"obj")||!((w=S.getObj())instanceof t.BaseStream))throw new n.FormatError("Invalid XRef stream");if(v=this.processXRefStream(w),this.topDict||(this.topDict=v),!v)throw new n.FormatError("Failed to read XRef stream")}else throw new n.FormatError("Invalid XRef stream header");w=v.get("Prev"),Number.isInteger(w)?this.startXRefQueue.push(w):w instanceof k.Ref&&this.startXRefQueue.push(w.num)}catch(i){if(i instanceof e.MissingDataException)throw i;(0,n.info)("(while reading XRef): "+i)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!T)throw new e.XRefParseException}get lastXRefStreamPos(){return le(this,L)??(this._xrefStms.size>0?Math.max(...this._xrefStms):null)}getEntry(T){const d=this.entries[T];return d&&!d.free&&d.offset?d:null}fetchIfRef(T,d=!1){return T instanceof k.Ref?this.fetch(T,d):T}fetch(T,d=!1){if(!(T instanceof k.Ref))throw new Error("ref object is not a reference");const f=T.num,i=this._cacheMap.get(f);if(i!==void 0)return i instanceof k.Dict&&!i.objId&&(i.objId=T.toString()),i;let S=this.getEntry(f);if(S===null)return this._cacheMap.set(f,S),S;if(this._pendingRefs.has(T))return this._pendingRefs.remove(T),(0,n.warn)(`Ignoring circular reference: ${T}.`),k.CIRCULAR_REF;this._pendingRefs.put(T);try{S=S.uncompressed?this.fetchUncompressed(T,S,d):this.fetchCompressed(T,S,d),this._pendingRefs.remove(T)}catch(w){throw this._pendingRefs.remove(T),w}return S instanceof k.Dict?S.objId=T.toString():S instanceof t.BaseStream&&(S.dict.objId=T.toString()),S}fetchUncompressed(T,d,f=!1){const i=T.gen;let S=T.num;if(d.gen!==i){const H=`Inconsistent generation in XRef: ${T}`;if(this._generationFallback&&d.gen<i)return(0,n.warn)(H),this.fetchUncompressed(k.Ref.get(S,d.gen),d,f);throw new e.XRefEntryException(H)}const w=this.stream.makeSubStream(d.offset+this.stream.start),v=new R.Parser({lexer:new R.Lexer(w),xref:this,allowStreams:!0}),b=v.getObj(),M=v.getObj(),_=v.getObj();if(b!==S||M!==i||!(_ instanceof k.Cmd))throw new e.XRefEntryException(`Bad (uncompressed) XRef entry: ${T}`);if(_.cmd!=="obj"){if(_.cmd.startsWith("obj")&&(S=parseInt(_.cmd.substring(3),10),!Number.isNaN(S)))return S;throw new e.XRefEntryException(`Bad (uncompressed) XRef entry: ${T}`)}return d=this.encrypt&&!f?v.getObj(this.encrypt.createCipherTransform(S,i)):v.getObj(),d instanceof t.BaseStream||this._cacheMap.set(S,d),d}fetchCompressed(T,d,f=!1){const i=d.offset,S=this.fetch(k.Ref.get(i,0));if(!(S instanceof t.BaseStream))throw new n.FormatError("bad ObjStm stream");const w=S.dict.get("First"),v=S.dict.get("N");if(!Number.isInteger(w)||!Number.isInteger(v))throw new n.FormatError("invalid first and n parameters for ObjStm stream");let b=new R.Parser({lexer:new R.Lexer(S),xref:this,allowStreams:!0});const M=new Array(v),_=new Array(v);for(let E=0;E<v;++E){const l=b.getObj();if(!Number.isInteger(l))throw new n.FormatError(`invalid object number in the ObjStm stream: ${l}`);const g=b.getObj();if(!Number.isInteger(g))throw new n.FormatError(`invalid object offset in the ObjStm stream: ${g}`);M[E]=l,_[E]=g}const H=(S.start||0)+w,A=new Array(v);for(let E=0;E<v;++E){const l=E<v-1?_[E+1]-_[E]:void 0;if(l<0)throw new n.FormatError("Invalid offset in the ObjStm stream.");b=new R.Parser({lexer:new R.Lexer(S.makeSubStream(H+_[E],l,S.dict)),xref:this,allowStreams:!0});const g=b.getObj();if(A[E]=g,g instanceof t.BaseStream)continue;const N=M[E],s=this.entries[N];s&&s.offset===i&&s.gen===E&&this._cacheMap.set(N,g)}if(d=A[d.gen],d===void 0)throw new e.XRefEntryException(`Bad (compressed) XRef entry: ${T}`);return d}async fetchIfRefAsync(T,d){return T instanceof k.Ref?this.fetchAsync(T,d):T}async fetchAsync(T,d){try{return this.fetch(T,d)}catch(f){if(!(f instanceof e.MissingDataException))throw f;return await this.pdfManager.requestRange(f.begin,f.end),this.fetchAsync(T,d)}}getCatalogObj(){return this.root}}L=new WeakMap,P.XRef=$},(ke,P,ie)=>{var o,Wa,L,qa,T,Yn;Object.defineProperty(P,"__esModule",{value:!0}),P.MessageHandler=void 0;var n=ie(2);const k={UNKNOWN:0,DATA:1,ERROR:2},R={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function e(f){switch(f instanceof Error||typeof f=="object"&&f!==null||(0,n.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),f.name){case"AbortException":return new n.AbortException(f.message);case"MissingPDFException":return new n.MissingPDFException(f.message);case"PasswordException":return new n.PasswordException(f.message,f.code);case"UnexpectedResponseException":return new n.UnexpectedResponseException(f.message,f.status);case"UnknownErrorException":return new n.UnknownErrorException(f.message,f.details);default:return new n.UnknownErrorException(f.message,f.toString())}}class t{constructor(i,S,w){Ee(this,o);Ee(this,L);Ee(this,T);this.sourceName=i,this.targetName=S,this.comObj=w,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=v=>{const b=v.data;if(b.targetName!==this.sourceName)return;if(b.stream){Me(this,L,qa).call(this,b);return}if(b.callback){const _=b.callbackId,H=this.callbackCapabilities[_];if(!H)throw new Error(`Cannot resolve callback ${_}`);if(delete this.callbackCapabilities[_],b.callback===k.DATA)H.resolve(b.data);else if(b.callback===k.ERROR)H.reject(e(b.reason));else throw new Error("Unexpected callback case");return}const M=this.actionHandler[b.action];if(!M)throw new Error(`Unknown action from worker: ${b.action}`);if(b.callbackId){const _=this.sourceName,H=b.sourceName;new Promise(function(A){A(M(b.data))}).then(function(A){w.postMessage({sourceName:_,targetName:H,callback:k.DATA,callbackId:b.callbackId,data:A})},function(A){w.postMessage({sourceName:_,targetName:H,callback:k.ERROR,callbackId:b.callbackId,reason:e(A)})});return}if(b.streamId){Me(this,o,Wa).call(this,b);return}M(b.data)},w.addEventListener("message",this._onComObjOnMessage)}on(i,S){const w=this.actionHandler;if(w[i])throw new Error(`There is already an actionName called "${i}"`);w[i]=S}send(i,S,w){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:i,data:S},w)}sendWithPromise(i,S,w){const v=this.callbackId++,b=new n.PromiseCapability;this.callbackCapabilities[v]=b;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:i,callbackId:v,data:S},w)}catch(M){b.reject(M)}return b.promise}sendWithStream(i,S,w,v){const b=this.streamId++,M=this.sourceName,_=this.targetName,H=this.comObj;return new ReadableStream({start:A=>{const E=new n.PromiseCapability;return this.streamControllers[b]={controller:A,startCall:E,pullCall:null,cancelCall:null,isClosed:!1},H.postMessage({sourceName:M,targetName:_,action:i,streamId:b,data:S,desiredSize:A.desiredSize},v),E.promise},pull:A=>{const E=new n.PromiseCapability;return this.streamControllers[b].pullCall=E,H.postMessage({sourceName:M,targetName:_,stream:R.PULL,streamId:b,desiredSize:A.desiredSize}),E.promise},cancel:A=>{(0,n.assert)(A instanceof Error,"cancel must have a valid reason");const E=new n.PromiseCapability;return this.streamControllers[b].cancelCall=E,this.streamControllers[b].isClosed=!0,H.postMessage({sourceName:M,targetName:_,stream:R.CANCEL,streamId:b,reason:e(A)}),E.promise}},w)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}o=new WeakSet,Wa=function(i){const S=i.streamId,w=this.sourceName,v=i.sourceName,b=this.comObj,M=this,_=this.actionHandler[i.action],H={enqueue(A,E=1,l){if(this.isCancelled)return;const g=this.desiredSize;this.desiredSize-=E,g>0&&this.desiredSize<=0&&(this.sinkCapability=new n.PromiseCapability,this.ready=this.sinkCapability.promise),b.postMessage({sourceName:w,targetName:v,stream:R.ENQUEUE,streamId:S,chunk:A},l)},close(){this.isCancelled||(this.isCancelled=!0,b.postMessage({sourceName:w,targetName:v,stream:R.CLOSE,streamId:S}),delete M.streamSinks[S])},error(A){(0,n.assert)(A instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,b.postMessage({sourceName:w,targetName:v,stream:R.ERROR,streamId:S,reason:e(A)}))},sinkCapability:new n.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:i.desiredSize,ready:null};H.sinkCapability.resolve(),H.ready=H.sinkCapability.promise,this.streamSinks[S]=H,new Promise(function(A){A(_(i.data,H))}).then(function(){b.postMessage({sourceName:w,targetName:v,stream:R.START_COMPLETE,streamId:S,success:!0})},function(A){b.postMessage({sourceName:w,targetName:v,stream:R.START_COMPLETE,streamId:S,reason:e(A)})})},L=new WeakSet,qa=function(i){const S=i.streamId,w=this.sourceName,v=i.sourceName,b=this.comObj,M=this.streamControllers[S],_=this.streamSinks[S];switch(i.stream){case R.START_COMPLETE:i.success?M.startCall.resolve():M.startCall.reject(e(i.reason));break;case R.PULL_COMPLETE:i.success?M.pullCall.resolve():M.pullCall.reject(e(i.reason));break;case R.PULL:if(!_){b.postMessage({sourceName:w,targetName:v,stream:R.PULL_COMPLETE,streamId:S,success:!0});break}_.desiredSize<=0&&i.desiredSize>0&&_.sinkCapability.resolve(),_.desiredSize=i.desiredSize,new Promise(function(H){var A;H((A=_.onPull)==null?void 0:A.call(_))}).then(function(){b.postMessage({sourceName:w,targetName:v,stream:R.PULL_COMPLETE,streamId:S,success:!0})},function(H){b.postMessage({sourceName:w,targetName:v,stream:R.PULL_COMPLETE,streamId:S,reason:e(H)})});break;case R.ENQUEUE:if((0,n.assert)(M,"enqueue should have stream controller"),M.isClosed)break;M.controller.enqueue(i.chunk);break;case R.CLOSE:if((0,n.assert)(M,"close should have stream controller"),M.isClosed)break;M.isClosed=!0,M.controller.close(),Me(this,T,Yn).call(this,M,S);break;case R.ERROR:(0,n.assert)(M,"error should have stream controller"),M.controller.error(e(i.reason)),Me(this,T,Yn).call(this,M,S);break;case R.CANCEL_COMPLETE:i.success?M.cancelCall.resolve():M.cancelCall.reject(e(i.reason)),Me(this,T,Yn).call(this,M,S);break;case R.CANCEL:if(!_)break;new Promise(function(H){var A;H((A=_.onCancel)==null?void 0:A.call(_,e(i.reason)))}).then(function(){b.postMessage({sourceName:w,targetName:v,stream:R.CANCEL_COMPLETE,streamId:S,success:!0})},function(H){b.postMessage({sourceName:w,targetName:v,stream:R.CANCEL_COMPLETE,streamId:S,reason:e(H)})}),_.sinkCapability.reject(e(i.reason)),_.isCancelled=!0,delete this.streamSinks[S];break;default:throw new Error("Unexpected stream case")}},T=new WeakSet,Yn=async function(i,S){var w,v,b;await Promise.allSettled([(w=i.startCall)==null?void 0:w.promise,(v=i.pullCall)==null?void 0:v.promise,(b=i.cancelCall)==null?void 0:b.promise]),delete this.streamControllers[S]},P.MessageHandler=t},(ke,P,ie)=>{Object.defineProperty(P,"__esModule",{value:!0}),P.PDFWorkerStream=void 0;var n=ie(2);class k{constructor(o){this._msgHandler=o,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new R(this._msgHandler),this._fullRequestReader}getRangeReader(o,$){const L=new e(o,$,this._msgHandler);return this._rangeRequestReaders.push(L),L}cancelAllRequests(o){var $;($=this._fullRequestReader)==null||$.cancel(o);for(const L of this._rangeRequestReaders.slice(0))L.cancel(o)}}P.PDFWorkerStream=k;class R{constructor(o){this._msgHandler=o,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;const $=this._msgHandler.sendWithStream("GetReader");this._reader=$.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then(L=>{this._isStreamingSupported=L.isStreamingSupported,this._isRangeSupported=L.isRangeSupported,this._contentLength=L.contentLength})}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:o,done:$}=await this._reader.read();return $?{value:void 0,done:!0}:{value:o.buffer,done:!1}}cancel(o){this._reader.cancel(o)}}class e{constructor(o,$,L){this._msgHandler=L,this.onProgress=null;const I=this._msgHandler.sendWithStream("GetRangeReader",{begin:o,end:$});this._reader=I.getReader()}get isStreamingSupported(){return!1}async read(){const{value:o,done:$}=await this._reader.read();return $?{value:void 0,done:!0}:{value:o.buffer,done:!1}}cancel(o){this._reader.cancel(o)}}}],we={};function Pe(ke){var P=we[ke];if(P!==void 0)return P.exports;var ie=we[ke]={exports:{}};return Ve[ke](ie,ie.exports,Pe),ie.exports}var qe={};return(()=>{var ke=qe;Object.defineProperty(ke,"__esModule",{value:!0}),Object.defineProperty(ke,"WorkerMessageHandler",{enumerable:!0,get:function(){return P.WorkerMessageHandler}});var P=Pe(1)})(),qe})())})(pdf_worker);var pdf_workerExports=pdf_worker.exports;(typeof window<"u"?window:{}).pdfjsWorker=pdf_workerExports;const PDFViewer_vue_vue_type_style_index_0_scoped_94be4743_lang="",_hoisted_1={class:"pdf-wrapper"},_sfc_main={__name:"PDFViewer",props:{src:{type:String,required:!0},scale:{type:Number,default:2.5}},emits:["fail"],setup(at,{emit:Ce}){const Ve=at,we=Ce,Pe=ref(null);let qe=null,ke=null;const P=ref(0),ie=ref(0);pdfExports.GlobalWorkerOptions.workerSrc=pdfjsWorker;const n=async R=>{if(R)try{const e=await pdfExports.getDocument({url:R,httpHeaders:authHeader(),isEvalSupported:!1}).promise;return ie.value=1,P.value=e.numPages,e}catch{return we("fail","Error loading PDF"),null}},k=async()=>{if(!Pe.value||!qe)return;const R=await qe.getPage(ie.value),e=R.getViewport({scale:Ve.scale});Pe.value.width=e.width,Pe.value.height=e.height,ke&&ke.cancel(),ke=R.render({canvasContext:Pe.value.getContext("2d"),viewport:e});try{await ke.promise}catch(t){console.error("Error rendering PDF:",t)}};return onMounted(async()=>{qe=await n(Ve.src),qe&&await k()}),watch(()=>Ve.src,async R=>{qe=await n(R),qe&&await k()}),watch(ie,async()=>{await k()}),onUnmounted(()=>{ke&&ke.cancel()}),(R,e)=>(openBlock(),createElementBlock("div",_hoisted_1,[renderSlot(R.$slots,"title",{currentPage:ie.value,pageCount:P.value},()=>[createBaseVNode("h5",null,"Click to turn pages (Page "+toDisplayString(ie.value)+" / "+toDisplayString(P.value)+")",1)],!0),createBaseVNode("div",{id:"pdf-container",onClick:e[0]||(e[0]=t=>ie.value=ie.value%P.value+1)},[createBaseVNode("canvas",{ref_key:"canvas",ref:Pe},null,512)])]))}},PDFViewer=_export_sfc(_sfc_main,[["__scopeId","data-v-94be4743"]]);export{PDFViewer as P,participateStudyAPI as p,updateParticipationAPI as u};