!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.UniversalDocViewer=t():e.UniversalDocViewer=t()}(this,(()=>(()=>{var __webpack_modules__={114:e=>{var t,r;t=globalThis,r=()=>(()=>{"use strict";var e=[,(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerTask=t.WorkerMessageHandler=void 0;var a,n=r(2),i=r(3),s=r(4),o=r(6),c=r(10),l=r(68),h=r(73),u=r(104),d=r(105),f=r(72);class p{constructor(e){this.name=e,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")}}t.WorkerTask=p;class g{static setup(e,t){let r=!1;e.on("test",(function(t){r||(r=!0,e.send("test",t instanceof Uint8Array))})),e.on("configure",(function(e){(0,n.setVerbosityLevel)(e.verbosity)})),e.on("GetDocRequest",(function(e){return g.createDocumentHandler(e,t)}))}static createDocumentHandler(e,t){let r,a=!1,g=null;const m=new Set,b=(0,n.getVerbosityLevel)(),{docId:y,apiVersion:v}=e,w="3.11.174";if(v!==w)throw new Error(`The API version "${v}" does not match the Worker version "${w}".`);const A=[];for(const e in[])A.push(e);if(A.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+A.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");const S=y+"_worker";let x=new u.MessageHandler(S,y,t);function k(){if(a)throw new Error("Worker was terminated")}function C(e){m.add(e)}function _(e){e.finish(),m.delete(e)}async function T(e){await r.ensureDoc("checkHeader"),await r.ensureDoc("parseStartXRef"),await r.ensureDoc("parse",[e]),await r.ensureDoc("checkFirstPage",[e]),await r.ensureDoc("checkLastPage",[e]);const t=await r.ensureDoc("isPureXfa");if(t){const e=new p("loadXfaFonts");C(e),await Promise.all([r.loadXfaFonts(x,e).catch((e=>{})).then((()=>_(e))),r.loadXfaImages()])}const[a,n]=await Promise.all([r.ensureDoc("numPages"),r.ensureDoc("fingerprints")]);return{numPages:a,fingerprints:n,htmlForXfa:t?await r.ensureDoc("htmlForXfa"):null}}function E({data:e,password:t,disableAutoFetch:r,rangeChunkSize:a,length:s,docBaseUrl:c,enableXfa:l,evaluatorOptions:h}){const u={source:null,disableAutoFetch:r,docBaseUrl:c,docId:y,enableXfa:l,evaluatorOptions:h,handler:x,length:s,password:t,rangeChunkSize:a},f=new n.PromiseCapability;let p;if(e){try{u.source=e,p=new o.LocalPdfManager(u),f.resolve(p)}catch(e){f.reject(e)}return f.promise}let m,b=[];try{m=new d.PDFWorkerStream(x)}catch(e){return f.reject(e),f.promise}const v=m.getFullReader();v.headersReady.then((function(){if(v.isRangeSupported){u.source=m,u.length=v.contentLength,u.disableAutoFetch||=v.isStreamingSupported,p=new o.NetworkPdfManager(u);for(const e of b)p.sendProgressiveData(e);b=[],f.resolve(p),g=null}})).catch((function(e){f.reject(e),g=null}));let w=0;return new Promise((function(e,t){const r=function({value:e,done:a}){try{if(k(),a)return p||function(){const e=(0,i.arrayBuffersToBytes)(b);s&&e.length!==s&&(0,n.warn)("reported HTTP length is different from actual");try{u.source=e,p=new o.LocalPdfManager(u),f.resolve(p)}catch(e){f.reject(e)}b=[]}(),void(g=null);w+=e.byteLength,v.isStreamingSupported||x.send("DocProgress",{loaded:w,total:Math.max(w,v.contentLength||0)}),p?p.sendProgressiveData(e):b.push(e),v.read().then(r,t)}catch(e){t(e)}};v.read().then(r,t)})).catch((function(e){f.reject(e),g=null})),g=function(e){m.cancelAllRequests(e)},f.promise}return x.on("GetPage",(function(e){return r.getPage(e.pageIndex).then((function(e){return Promise.all([r.ensure(e,"rotate"),r.ensure(e,"ref"),r.ensure(e,"userUnit"),r.ensure(e,"view")]).then((function([e,t,r,a]){return{rotate:e,ref:t,userUnit:r,view:a}}))}))})),x.on("GetPageIndex",(function(e){const t=s.Ref.get(e.num,e.gen);return r.ensureCatalog("getPageIndex",[t])})),x.on("GetDestinations",(function(e){return r.ensureCatalog("destinations")})),x.on("GetDestination",(function(e){return r.ensureCatalog("getDestination",[e.id])})),x.on("GetPageLabels",(function(e){return r.ensureCatalog("pageLabels")})),x.on("GetPageLayout",(function(e){return r.ensureCatalog("pageLayout")})),x.on("GetPageMode",(function(e){return r.ensureCatalog("pageMode")})),x.on("GetViewerPreferences",(function(e){return r.ensureCatalog("viewerPreferences")})),x.on("GetOpenAction",(function(e){return r.ensureCatalog("openAction")})),x.on("GetAttachments",(function(e){return r.ensureCatalog("attachments")})),x.on("GetDocJSActions",(function(e){return r.ensureCatalog("jsActions")})),x.on("GetPageJSActions",(function({pageIndex:e}){return r.getPage(e).then((function(e){return r.ensure(e,"jsActions")}))})),x.on("GetOutline",(function(e){return r.ensureCatalog("documentOutline")})),x.on("GetOptionalContentConfig",(function(e){return r.ensureCatalog("optionalContentConfig")})),x.on("GetPermissions",(function(e){return r.ensureCatalog("permissions")})),x.on("GetMetadata",(function(e){return Promise.all([r.ensureDoc("documentInfo"),r.ensureCatalog("metadata")])})),x.on("GetMarkInfo",(function(e){return r.ensureCatalog("markInfo")})),x.on("GetData",(function(e){return r.requestLoadedStream().then((function(e){return e.bytes}))})),x.on("GetAnnotations",(function({pageIndex:e,intent:t}){return r.getPage(e).then((function(r){const a=new p(`GetAnnotations: page ${e}`);return C(a),r.getAnnotationsData(x,a,t).then((e=>(_(a),e)),(e=>{throw _(a),e}))}))})),x.on("GetFieldObjects",(function(e){return r.ensureDoc("fieldObjects")})),x.on("HasJSActions",(function(e){return r.ensureDoc("hasJSActions")})),x.on("GetCalculationOrderIds",(function(e){return r.ensureDoc("calculationOrderIds")})),x.on("SaveDocument",(async function({isPureXfa:e,numPages:t,annotationStorage:a,filename:o}){const l=[r.requestLoadedStream(),r.ensureCatalog("acroForm"),r.ensureCatalog("acroFormRef"),r.ensureDoc("startXRef"),r.ensureDoc("xref"),r.ensureDoc("linearization"),r.ensureCatalog("structTreeRoot")],u=[],d=e?null:(0,i.getNewAnnotationsMap)(a),[g,m,b,y,v,w,A]=await Promise.all(l),S=v.trailer.getRaw("Root")||null;let k;if(d){A?await A.canUpdateStructTree({pdfManager:r,newAnnotationsByPage:d})&&(k=A):await f.StructTreeRoot.canCreateStructureTree({catalogRef:S,pdfManager:r,newAnnotationsByPage:d})&&(k=null);const e=c.AnnotationFactory.generateImages(a.values(),v,r.evaluatorOptions.isOffscreenCanvasSupported),t=void 0===k?u:[];for(const[a,n]of d)t.push(r.getPage(a).then((t=>{const r=new p(`Save (editor): page ${a}`);return t.saveNewAnnotations(x,r,n,e).finally((function(){_(r)}))})));null===k?u.push(Promise.all(t).then((async e=>(await f.StructTreeRoot.createStructureTree({newAnnotationsByPage:d,xref:v,catalogRef:S,pdfManager:r,newRefs:e}),e)))):k&&u.push(Promise.all(t).then((async e=>(await k.updateStructureTree({newAnnotationsByPage:d,pdfManager:r,newRefs:e}),e))))}if(e)u.push(r.serializeXfaData(a));else for(let e=0;e<t;e++)u.push(r.getPage(e).then((function(t){const r=new p(`Save: page ${e}`);return t.save(x,r,a).finally((function(){_(r)}))})));const C=await Promise.all(u);let T=[],E=null;if(e){if(E=C[0],!E)return g.bytes}else if(T=C.flat(2),0===T.length)return g.bytes;const O=b&&m instanceof s.Dict&&T.some((e=>e.needAppearances)),F=m instanceof s.Dict&&m.get("XFA")||null;let P=null,I=!1;if(Array.isArray(F)){for(let e=0,t=F.length;e<t;e+=2)"datasets"===F[e]&&(P=F[e+1],I=!0);null===P&&(P=v.getNewTemporaryRef())}else F&&(0,n.warn)("Unsupported XFA type.");let M=Object.create(null);if(v.trailer){const e=Object.create(null),t=v.trailer.get("Info")||null;t instanceof s.Dict&&t.forEach(((t,r)=>{"string"==typeof r&&(e[t]=(0,n.stringToPDFString)(r))})),M={rootRef:S,encryptRef:v.trailer.getRaw("Encrypt")||null,newRef:v.getNewTemporaryRef(),infoRef:v.trailer.getRaw("Info")||null,info:e,fileIds:v.trailer.get("ID")||null,startXRef:w?y:v.lastXRefStreamPos??y,filename:o}}return(0,h.incrementalUpdate)({originalData:g.bytes,xrefInfo:M,newRefs:T,xref:v,hasXfa:!!F,xfaDatasetsRef:P,hasXfaDatasetsEntry:I,needAppearances:O,acroFormRef:b,acroForm:m,xfaData:E}).finally((()=>{v.resetNewTemporaryRef()}))})),x.on("GetOperatorList",(function(e,t){const a=e.pageIndex;r.getPage(a).then((function(r){const i=new p(`GetOperatorList: page ${a}`);C(i);const s=b>=n.VerbosityLevel.INFOS?Date.now():0;r.getOperatorList({handler:x,sink:t,task:i,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage}).then((function(e){_(i),s&&(0,n.info)(`page=${a+1} - getOperatorList: time=${Date.now()-s}ms, len=${e.length}`),t.close()}),(function(e){_(i),i.terminated||t.error(e)}))}))})),x.on("GetTextContent",(function(e,t){const{pageIndex:a,includeMarkedContent:i,disableNormalization:s}=e;r.getPage(a).then((function(e){const r=new p("GetTextContent: page "+a);C(r);const o=b>=n.VerbosityLevel.INFOS?Date.now():0;e.extractTextContent({handler:x,task:r,sink:t,includeMarkedContent:i,disableNormalization:s}).then((function(){_(r),o&&(0,n.info)(`page=${a+1} - getTextContent: time=`+(Date.now()-o)+"ms"),t.close()}),(function(e){_(r),r.terminated||t.error(e)}))}))})),x.on("GetStructTree",(function(e){return r.getPage(e.pageIndex).then((function(e){return r.ensure(e,"getStructTree")}))})),x.on("FontFallback",(function(e){return r.fontFallback(e.id,x)})),x.on("Cleanup",(function(e){return r.cleanup(!0)})),x.on("Terminate",(function(e){a=!0;const t=[];if(r){r.terminate(new n.AbortException("Worker was terminated."));const e=r.cleanup();t.push(e),r=null}else(0,l.clearGlobalCaches)();g&&g(new n.AbortException("Worker was terminated."));for(const e of m)t.push(e.finished),e.terminate();return Promise.all(t).then((function(){x.destroy(),x=null}))})),x.on("Ready",(function(t){!function(e){function t(e){k(),x.send("GetDoc",{pdfInfo:e})}function s(e){if(k(),e instanceof n.PasswordException){const t=new p(`PasswordException: response ${e.code}`);C(t),x.sendWithPromise("PasswordRequest",e).then((function({password:e}){_(t),r.updatePassword(e),o()})).catch((function(){_(t),x.send("DocException",e)}))}else e instanceof n.InvalidPDFException||e instanceof n.MissingPDFException||e instanceof n.UnexpectedResponseException||e instanceof n.UnknownErrorException?x.send("DocException",e):x.send("DocException",new n.UnknownErrorException(e.message,e.toString()))}function o(){k(),T(!1).then(t,(function(e){k(),e instanceof i.XRefParseException?r.requestLoadedStream().then((function(){k(),T(!0).then(t,s)})):s(e)}))}k(),E(e).then((function(e){if(a)throw e.terminate(new n.AbortException("Worker was terminated.")),new Error("Worker was terminated");r=e,r.requestLoadedStream(!0).then((e=>{x.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(o,s)}(e),e=null})),S}static initializeFromPort(e){const t=new u.MessageHandler("worker","main",e);g.setup(t,e),t.send("ready",null)}}t.WorkerMessageHandler=g,"undefined"==typeof window&&!n.isNodeJS&&"undefined"!=typeof self&&"function"==typeof(a=self).postMessage&&"onmessage"in a&&g.initializeFromPort(self)},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationReplyType=t.AnnotationPrefix=t.AnnotationMode=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||o(t)},t.bytesToString=h,t.createValidAbsoluteUrl=function(e,t=null,r=null){if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(r.tryConvertEncoding)try{e=p(e)}catch{}}const a=t?new URL(e,t):new URL(e);if(function(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch{}return null},t.getModificationDate=function(e=new Date){return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getUuid=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();const e=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(255*Math.random());return h(e)},t.getVerbosityLevel=function(){return i},t.info=function(e){i>=n.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"==typeof e&&void 0!==e?.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(e[r]!==t[r])return!1;return!0},t.isNodeJS=void 0,t.normalizeUnicode=function(e){return g||(g=/([\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,m=new Map([["ﬅ","ſt"]])),e.replaceAll(g,((e,t,r)=>t?t.normalize("NFKC"):m.get(r)))},t.objectFromMap=function(e){const t=Object.create(null);for(const[r,a]of e)t[r]=a;return t},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(i=e)},t.shadow=c,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=u,t.stringToPDFString=function(e){if(e[0]>="ï"){let t;if("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const r=new TextDecoder(t,{fatal:!0}),a=u(e);return r.decode(a)}catch(e){s(`stringToPDFString: "${e}".`)}}const t=[];for(let r=0,a=e.length;r<a;r++){const a=f[e.charCodeAt(r)];t.push(a?String.fromCharCode(a):e.charAt(r))}return t.join("")},t.stringToUTF8String=p,t.unreachable=o,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=s;const r=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=r,t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.MAX_IMAGE_SIZE_TO_CACHE=1e7,t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35;const a=.35/1.35;t.BASELINE_FACTOR=a,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},t.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"};const n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n,t.CMapCompressionType={NONE:0,BINARY:1},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=n.WARNINGS;function s(e){i>=n.WARNINGS&&console.log(`Warning: ${e}`)}function o(e){throw new Error(e)}function c(e,t,r,a=!1){return Object.defineProperty(e,t,{value:r,enumerable:!a,configurable:!0,writable:!1}),r}const l=function(){function e(t,r){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();function h(e){"object"==typeof e&&void 0!==e?.length||o("Invalid argument for bytesToString");const t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);const a=[];for(let n=0;n<t;n+=r){const i=Math.min(n+r,t),s=e.subarray(n,i);a.push(String.fromCharCode.apply(null,s))}return a.join("")}function u(e){"string"!=typeof e&&o("Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let a=0;a<t;++a)r[a]=255&e.charCodeAt(a);return r}t.BaseException=l,t.PasswordException=class extends l{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends l{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends l{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends l{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends l{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends l{constructor(e){super(e,"FormatError")}},t.AbortException=class extends l{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return c(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return c(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return c(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?c(this,"platform",{isWin:!1,isMac:!1}):c(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return c(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};const d=[...Array(256).keys()].map((e=>e.toString(16).padStart(2,"0")));t.Util=class{static makeHexColor(e,t,r){return`#${d[e]}${d[t]}${d[r]}`}static scaleMinMax(e,t){let r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,e[1]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){const r=this.applyTransform(e,t),a=this.applyTransform(e.slice(2,4),t),n=this.applyTransform([e[0],e[3]],t),i=this.applyTransform([e[2],e[1]],t);return[Math.min(r[0],a[0],n[0],i[0]),Math.min(r[1],a[1],n[1],i[1]),Math.max(r[0],a[0],n[0],i[0]),Math.max(r[1],a[1],n[1],i[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],a=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],s=(r+i)/2,o=Math.sqrt((r+i)**2-4*(r*i-n*a))/2,c=s+o||1,l=s-o||1;return[Math.sqrt(c),Math.sqrt(l)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),a=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>a)return null;const n=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return n>i?null:[r,n,a,i]}static bezierBoundingBox(e,t,r,a,n,i,s,o){const c=[],l=[[],[]];let h,u,d,f,p,g,m,b;for(let l=0;l<2;++l)if(0===l?(u=6*e-12*r+6*n,h=-3*e+9*r-9*n+3*s,d=3*r-3*e):(u=6*t-12*a+6*i,h=-3*t+9*a-9*i+3*o,d=3*a-3*t),Math.abs(h)<1e-12){if(Math.abs(u)<1e-12)continue;f=-d/u,0<f&&f<1&&c.push(f)}else m=u*u-4*d*h,b=Math.sqrt(m),m<0||(p=(-u+b)/(2*h),0<p&&p<1&&c.push(p),g=(-u-b)/(2*h),0<g&&g<1&&c.push(g));let y,v=c.length;const w=v;for(;v--;)f=c[v],y=1-f,l[0][v]=y*y*y*e+3*y*y*f*r+3*y*f*f*n+f*f*f*s,l[1][v]=y*y*y*t+3*y*y*f*a+3*y*f*f*i+f*f*f*o;return l[0][w]=e,l[1][w]=t,l[0][w+1]=s,l[1][w+1]=o,l[0].length=l[1].length=w+2,[Math.min(...l[0]),Math.min(...l[1]),Math.max(...l[0]),Math.max(...l[1])]}};const f=[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 p(e){return decodeURIComponent(escape(e))}t.PromiseCapability=class{#e=!1;constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{this.#e=!0,e(t)},this.reject=e=>{this.#e=!0,t(e)}}))}get settled(){return this.#e}};let g=null,m=null;t.AnnotationPrefix="pdfjs_internal_id_"},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XRefParseException=t.XRefEntryException=t.ParserEOFException=t.PDF_VERSION_REGEXP=t.MissingDataException=void 0,t.arrayBuffersToBytes=function(e){const t=e.length;if(0===t)return new Uint8Array(0);if(1===t)return new Uint8Array(e[0]);let r=0;for(let a=0;a<t;a++)r+=e[a].byteLength;const a=new Uint8Array(r);let n=0;for(let r=0;r<t;r++){const t=new Uint8Array(e[r]);a.set(t,n),n+=t.byteLength}return a},t.collectActions=function(e,t,r){const i=Object.create(null),s=h({dict:t,key:"AA",stopWhenFound:!1});if(s)for(let t=s.length-1;t>=0;t--){const a=s[t];if(a instanceof n.Dict)for(const t of a.getKeys()){const s=r[t];if(!s)continue;const o=[];d(a.getRaw(t),e,o,new n.RefSet),o.length>0&&(i[s]=o)}}if(t.has("A")){const r=[];d(t.get("A"),e,r,new n.RefSet),r.length>0&&(i.Action=r)}return(0,a.objectSize)(i)>0?i:null},t.encodeToXmlString=function(e){const t=[];let r=0;for(let a=0,n=e.length;a<n;a++){const n=e.codePointAt(a);if(32<=n&&n<=126){const i=f[n];i&&(r<a&&t.push(e.substring(r,a)),t.push(i),r=a+1)}else r<a&&t.push(e.substring(r,a)),t.push(`&#x${n.toString(16).toUpperCase()};`),n>55295&&(n<57344||n>65533)&&a++,r=a+1}return 0===t.length?e:(r<e.length&&t.push(e.substring(r,e.length)),t.join(""))},t.escapePDFName=function(e){const t=[];let r=0;for(let a=0,n=e.length;a<n;a++){const n=e.charCodeAt(a);(n<33||n>126||35===n||40===n||41===n||60===n||62===n||91===n||93===n||123===n||125===n||47===n||37===n)&&(r<a&&t.push(e.substring(r,a)),t.push(`#${n.toString(16)}`),r=a+1)}return 0===t.length?e:(r<e.length&&t.push(e.substring(r,e.length)),t.join(""))},t.escapeString=function(e){return e.replaceAll(/([()\\\n\r])/g,(e=>"\n"===e?"\\n":"\r"===e?"\\r":`\\${e}`))},t.getInheritableProperty=h,t.getLookupTableFactory=function(e){let t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}},t.getNewAnnotationsMap=function(e){if(!e)return null;const t=new Map;for(const[r,n]of e){if(!r.startsWith(a.AnnotationEditorPrefix))continue;let e=t.get(n.pageIndex);e||(e=[],t.set(n.pageIndex,e)),e.push(n)}return t.size>0?t:null},t.getRotationMatrix=function(e,t,r){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,r];case 270:return[0,-1,1,0,0,r];default:throw new Error("Invalid rotation")}},t.isAscii=function(e){return/^[\x00-\x7F]*$/.test(e)},t.isWhiteSpace=function(e){return 32===e||9===e||13===e||10===e},t.log2=function(e){return e<=0?0:Math.ceil(Math.log2(e))},t.numberToString=function(e){if(Number.isInteger(e))return e.toString();const t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)},t.parseXFAPath=function(e){const t=/(.+)\[(\d+)\]$/;return e.split(".").map((e=>{const r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}}))},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.recoverJsURL=function(e){const t=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);if(t?.[2]){const e=t[2];let r=!1;return"true"===t[3]&&"app.launchURL"===t[1]&&(r=!0),{url:e,newWindow:r}}return null},t.stringToUTF16HexString=function(e){const t=[];for(let r=0,a=e.length;r<a;r++){const a=e.charCodeAt(r);t.push((a>>8&255).toString(16).padStart(2,"0"),(255&a).toString(16).padStart(2,"0"))}return t.join("")},t.stringToUTF16String=function(e,t=!1){const r=[];t&&r.push("þÿ");for(let t=0,a=e.length;t<a;t++){const a=e.charCodeAt(t);r.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return r.join("")},t.toRomanNumerals=function(e,t=!1){(0,a.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");const r=[];let n;for(;e>=1e3;)e-=1e3,r.push("M");n=e/100|0,e%=100,r.push(u[n]),n=e/10|0,e%=10,r.push(u[10+n]),r.push(u[20+e]);const i=r.join("");return t?i.toLowerCase():i},t.validateCSSFont=function(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:r,fontWeight:a,italicAngle:n}=e;if(!p(r,!0))return!1;const i=a?a.toString():"";e.fontWeight=t.has(i)?i:"400";const s=parseFloat(n);return e.italicAngle=isNaN(s)||s<-90||s>90?"14":n.toString(),!0},t.validateFontName=p;var a=r(2),n=r(4),i=r(5);t.PDF_VERSION_REGEXP=/^[1-9]\.\d$/;class s extends a.BaseException{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException"),this.begin=e,this.end=t}}t.MissingDataException=s;class o extends a.BaseException{constructor(e){super(e,"ParserEOFException")}}t.ParserEOFException=o;class c extends a.BaseException{constructor(e){super(e,"XRefEntryException")}}t.XRefEntryException=c;class l extends a.BaseException{constructor(e){super(e,"XRefParseException")}}function h({dict:e,key:t,getArray:r=!1,stopWhenFound:a=!0}){let i;const s=new n.RefSet;for(;e instanceof n.Dict&&(!e.objId||!s.has(e.objId));){e.objId&&s.put(e.objId);const n=r?e.getArray(t):e.get(t);if(void 0!==n){if(a)return n;(i||=[]).push(n)}e=e.get("Parent")}return i}t.XRefParseException=l;const u=["","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 d(e,t,r,s){if(!e)return;let o=null;if(e instanceof n.Ref){if(s.has(e))return;o=e,s.put(o),e=t.fetch(e)}if(Array.isArray(e))for(const a of e)d(a,t,r,s);else if(e instanceof n.Dict){if((0,n.isName)(e.get("S"),"JavaScript")){const t=e.get("JS");let n;t instanceof i.BaseStream?n=t.getString():"string"==typeof t&&(n=t),n&&=(0,a.stringToPDFString)(n).replaceAll("\0",""),n&&r.push(n)}d(e.getRaw("Next"),t,r,s)}o&&s.remove(o)}const f={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function p(e,t=!1){const r=/^("|').*("|')$/.exec(e);if(r&&r[1]===r[2]){if(new RegExp(`[^\\\\]${r[1]}`).test(e.slice(1,-1)))return t&&(0,a.warn)(`FontFamily contains unescaped ${r[1]}: ${e}.`),!1}else for(const r of e.split(/[ \t]+/))if(/^(\d|(-(\d|-)))/.test(r)||!/^[\w-\\]+$/.test(r))return t&&(0,a.warn)(`FontFamily contains invalid <custom-ident>: ${e}.`),!1;return!0}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RefSetCache=t.RefSet=t.Ref=t.Name=t.EOF=t.Dict=t.Cmd=t.CIRCULAR_REF=void 0,t.clearPrimitiveCaches=function(){s=Object.create(null),o=Object.create(null),c=Object.create(null)},t.isCmd=function(e,t){return e instanceof h&&(void 0===t||e.cmd===t)},t.isDict=function(e,t){return e instanceof d&&(void 0===t||m(e.get("Type"),t))},t.isName=m,t.isRefsEqual=function(e,t){return e.num===t.num&&e.gen===t.gen};var a=r(2);const n=Symbol("CIRCULAR_REF");t.CIRCULAR_REF=n;const i=Symbol("EOF");t.EOF=i;let s=Object.create(null),o=Object.create(null),c=Object.create(null);class l{constructor(e){this.name=e}static get(e){return o[e]||=new l(e)}}t.Name=l;class h{constructor(e){this.cmd=e}static get(e){return s[e]||=new h(e)}}t.Cmd=h;const u=function(){return u};class d{constructor(e=null){this._map=Object.create(null),this.xref=e,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=u}assignXref(e){this.xref=e}get size(){return Object.keys(this._map).length}get(e,t,r){let a=this._map[e];return void 0===a&&void 0!==t&&(a=this._map[t],void 0===a&&void 0!==r&&(a=this._map[r])),a instanceof f&&this.xref?this.xref.fetch(a,this.suppressEncryption):a}async getAsync(e,t,r){let a=this._map[e];return void 0===a&&void 0!==t&&(a=this._map[t],void 0===a&&void 0!==r&&(a=this._map[r])),a instanceof f&&this.xref?this.xref.fetchAsync(a,this.suppressEncryption):a}getArray(e,t,r){let a=this._map[e];if(void 0===a&&void 0!==t&&(a=this._map[t],void 0===a&&void 0!==r&&(a=this._map[r])),a instanceof f&&this.xref&&(a=this.xref.fetch(a,this.suppressEncryption)),Array.isArray(a)){a=a.slice();for(let e=0,t=a.length;e<t;e++)a[e]instanceof f&&this.xref&&(a[e]=this.xref.fetch(a[e],this.suppressEncryption))}return a}getRaw(e){return this._map[e]}getKeys(){return Object.keys(this._map)}getRawValues(){return Object.values(this._map)}set(e,t){this._map[e]=t}has(e){return void 0!==this._map[e]}forEach(e){for(const t in this._map)e(t,this.get(t))}static get empty(){const e=new d(null);return e.set=(e,t)=>{(0,a.unreachable)("Should not call `set` on the empty dictionary.")},(0,a.shadow)(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:r=!1}){const a=new d(e),n=new Map;for(const e of t)if(e instanceof d)for(const[t,a]of Object.entries(e._map)){let e=n.get(t);if(void 0===e)e=[],n.set(t,e);else if(!(r&&a instanceof d))continue;e.push(a)}for(const[t,r]of n){if(1===r.length||!(r[0]instanceof d)){a._map[t]=r[0];continue}const n=new d(e);for(const e of r)for(const[t,r]of Object.entries(e._map))void 0===n._map[t]&&(n._map[t]=r);n.size>0&&(a._map[t]=n)}return n.clear(),a.size>0?a:d.empty}clone(){const e=new d(this.xref);for(const t of this.getKeys())e.set(t,this.getRaw(t));return e}}t.Dict=d;class f{constructor(e,t){this.num=e,this.gen=t}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(e){const t=c[e];if(t)return t;const r=/^(\d+)R(\d*)$/.exec(e);return r&&"0"!==r[1]?c[e]=new f(parseInt(r[1]),r[2]?parseInt(r[2]):0):null}static get(e,t){const r=0===t?`${e}R`:`${e}R${t}`;return c[r]||=new f(e,t)}}t.Ref=f;class p{constructor(e=null){this._set=new Set(e?._set)}has(e){return this._set.has(e.toString())}put(e){this._set.add(e.toString())}remove(e){this._set.delete(e.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}t.RefSet=p;class g{constructor(){this._map=new Map}get size(){return this._map.size}get(e){return this._map.get(e.toString())}has(e){return this._map.has(e.toString())}put(e,t){this._map.set(e.toString(),t)}putAlias(e,t){this._map.set(e.toString(),this.get(t))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}}function m(e,t){return e instanceof l&&(void 0===t||e.name===t)}t.RefSetCache=g},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStream=void 0;var a=r(2);class n{constructor(){this.constructor===n&&(0,a.unreachable)("Cannot initialize BaseStream.")}get length(){(0,a.unreachable)("Abstract getter `length` accessed")}get isEmpty(){(0,a.unreachable)("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return(0,a.shadow)(this,"isDataLoaded",!0)}getByte(){(0,a.unreachable)("Abstract method `getByte` called")}getBytes(e){(0,a.unreachable)("Abstract method `getBytes` called")}peekByte(){const e=this.getByte();return-1!==e&&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-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){(0,a.unreachable)("Abstract method `getByteRange` called")}getString(e){return(0,a.bytesToString)(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){(0,a.unreachable)("Abstract method `reset` called")}moveStart(){(0,a.unreachable)("Abstract method `moveStart` called")}makeSubStream(e,t,r=null){(0,a.unreachable)("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}t.BaseStream=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkPdfManager=t.LocalPdfManager=void 0;var a=r(2),n=r(7),i=r(3),s=r(9),o=r(8);class c{constructor(e){this.constructor===c&&(0,a.unreachable)("Cannot initialize BasePdfManager."),this._docBaseUrl=function(e){if(e){const t=(0,a.createValidAbsoluteUrl)(e);if(t)return t.href;(0,a.warn)(`Invalid absolute docBaseUrl: "${e}".`)}return null}(e.docBaseUrl),this._docId=e.docId,this._password=e.password,this.enableXfa=e.enableXfa,e.evaluatorOptions.isOffscreenCanvasSupported&&=a.FeatureTest.isOffscreenCanvasSupported,this.evaluatorOptions=e.evaluatorOptions}get docId(){return this._docId}get password(){return this._password}get docBaseUrl(){return this._docBaseUrl}get catalog(){return this.pdfDocument.catalog}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}loadXfaFonts(e,t){return this.pdfDocument.loadXfaFonts(e,t)}loadXfaImages(){return this.pdfDocument.loadXfaImages()}serializeXfaData(e){return this.pdfDocument.serializeXfaData(e)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,r){(0,a.unreachable)("Abstract method `ensure` called")}requestRange(e,t){(0,a.unreachable)("Abstract method `requestRange` called")}requestLoadedStream(e=!1){(0,a.unreachable)("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){(0,a.unreachable)("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){(0,a.unreachable)("Abstract method `terminate` called")}}t.LocalPdfManager=class extends c{constructor(e){super(e);const t=new o.Stream(e.source);this.pdfDocument=new s.PDFDocument(this,t),this._loadedStreamPromise=Promise.resolve(t)}async ensure(e,t,r){const a=e[t];return"function"==typeof a?a.apply(e,r):a}requestRange(e,t){return Promise.resolve()}requestLoadedStream(e=!1){return this._loadedStreamPromise}terminate(e){}},t.NetworkPdfManager=class extends c{constructor(e){super(e),this.streamManager=new n.ChunkedStreamManager(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize}),this.pdfDocument=new s.PDFDocument(this,this.streamManager.getStream())}async ensure(e,t,r){try{const a=e[t];return"function"==typeof a?a.apply(e,r):a}catch(a){if(!(a instanceof i.MissingDataException))throw a;return await this.requestRange(a.begin,a.end),this.ensure(e,t,r)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(e=!1){return this.streamManager.requestAllChunks(e)}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}terminate(e){this.streamManager.abort(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedStreamManager=t.ChunkedStream=void 0;var a=r(3),n=r(2),i=r(8);class s extends i.Stream{constructor(e,t,r){super(new Uint8Array(e),0,e,null),this.chunkSize=t,this._loadedChunks=new Set,this.numChunks=Math.ceil(e/t),this.manager=r,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const e=[];for(let t=0,r=this.numChunks;t<r;++t)this._loadedChunks.has(t)||e.push(t);return e}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(e,t){const r=this.chunkSize;if(e%r!=0)throw new Error(`Bad begin offset: ${e}`);const a=e+t.byteLength;if(a%r!=0&&a!==this.bytes.length)throw new Error(`Bad end offset: ${a}`);this.bytes.set(new Uint8Array(t),e);const n=Math.floor(e/r),i=Math.floor((a-1)/r)+1;for(let e=n;e<i;++e)this._loadedChunks.add(e)}onReceiveProgressiveData(e){let t=this.progressiveDataLength;const r=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t),t+=e.byteLength,this.progressiveDataLength=t;const a=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(let e=r;e<a;++e)this._loadedChunks.add(e)}ensureByte(e){if(e<this.progressiveDataLength)return;const t=Math.floor(e/this.chunkSize);if(!(t>this.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new a.MissingDataException(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}ensureRange(e,t){if(e>=t)return;if(t<=this.progressiveDataLength)return;const r=Math.floor(e/this.chunkSize);if(r>this.numChunks)return;const n=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks);for(let i=r;i<n;++i)if(!this._loadedChunks.has(i))throw new a.MissingDataException(e,t)}nextEmptyChunk(e){const t=this.numChunks;for(let r=0;r<t;++r){const a=(e+r)%t;if(!this._loadedChunks.has(a))return a}return null}hasChunk(e){return this._loadedChunks.has(e)}getByte(){const e=this.pos;return e>=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}getBytes(e){const t=this.bytes,r=this.pos,a=this.end;if(!e)return a>this.progressiveDataLength&&this.ensureRange(r,a),t.subarray(r,a);let n=r+e;return n>a&&(n=a),n>this.progressiveDataLength&&this.ensureRange(r,n),this.pos=n,t.subarray(r,n)}getByteRange(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}makeSubStream(e,t,r=null){function a(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),a.prototype=Object.create(this),a.prototype.getMissingChunks=function(){const e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,a=[];for(let e=t;e<r;++e)this._loadedChunks.has(e)||a.push(e);return a},Object.defineProperty(a.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const n=new a;return n.pos=n.start=e,n.end=e+t||this.end,n.dict=r,n}getBaseStreams(){return[this]}}t.ChunkedStream=s,t.ChunkedStreamManager=class{constructor(e,t){this.length=t.length,this.chunkSize=t.rangeChunkSize,this.stream=new s(this.length,this.chunkSize,this),this.pdfNetworkStream=e,this.disableAutoFetch=t.disableAutoFetch,this.msgHandler=t.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 n.PromiseCapability}sendRequest(e,t){const r=this.pdfNetworkStream.getRangeReader(e,t);r.isStreamingSupported||(r.onProgress=this.onProgress.bind(this));let n=[],i=0;return new Promise(((e,t)=>{const s=({value:o,done:c})=>{try{if(c){const t=(0,a.arrayBuffersToBytes)(n);return n=null,void e(t)}i+=o.byteLength,r.isStreamingSupported&&this.onProgress({loaded:i}),n.push(o),r.read().then(s,t)}catch(e){t(e)}};r.read().then(s,t)})).then((t=>{this.aborted||this.onReceiveData({chunk:t,begin:e})}))}requestAllChunks(e=!1){if(!e){const e=this.stream.getMissingChunks();this._requestChunks(e)}return this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,r=new Set;this._chunksNeededByRequest.set(t,r);for(const t of e)this.stream.hasChunk(t)||r.add(t);if(0===r.size)return Promise.resolve();const a=new n.PromiseCapability;this._promisesByRequest.set(t,a);const i=[];for(const e of r){let r=this._requestsByChunk.get(e);r||(r=[],this._requestsByChunk.set(e,r),i.push(e)),r.push(t)}if(i.length>0){const e=this.groupChunks(i);for(const t of e){const e=t.beginChunk*this.chunkSize,r=Math.min(t.endChunk*this.chunkSize,this.length);this.sendRequest(e,r).catch(a.reject)}}return a.promise.catch((e=>{if(!this.aborted)throw e}))}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const r=this.getBeginChunk(e),a=this.getEndChunk(t),n=[];for(let e=r;e<a;++e)n.push(e);return this._requestChunks(n)}requestRanges(e=[]){const t=[];for(const r of e){const e=this.getBeginChunk(r.begin),a=this.getEndChunk(r.end);for(let r=e;r<a;++r)t.includes(r)||t.push(r)}return t.sort((function(e,t){return e-t})),this._requestChunks(t)}groupChunks(e){const t=[];let r=-1,a=-1;for(let n=0,i=e.length;n<i;++n){const i=e[n];r<0&&(r=i),a>=0&&a+1!==i&&(t.push({beginChunk:r,endChunk:a+1}),r=i),n+1===e.length&&t.push({beginChunk:r,endChunk:i+1}),a=i}return t}onProgress(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}onReceiveData(e){const t=e.chunk,r=void 0===e.begin,a=r?this.progressiveDataLength:e.begin,n=a+t.byteLength,i=Math.floor(a/this.chunkSize),s=n<this.length?Math.floor(n/this.chunkSize):Math.ceil(n/this.chunkSize);r?(this.stream.onReceiveProgressiveData(t),this.progressiveDataLength=n):this.stream.onReceiveData(a,t),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const o=[];for(let e=i;e<s;++e){const t=this._requestsByChunk.get(e);if(t){this._requestsByChunk.delete(e);for(const r of t){const t=this._chunksNeededByRequest.get(r);t.has(e)&&t.delete(e),t.size>0||o.push(r)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===this.stream.numChunksLoaded){const t=this.stream.numChunks-1;this.stream.hasChunk(t)||(e=t)}else e=this.stream.nextEmptyChunk(s);Number.isInteger(e)&&this._requestChunks([e])}for(const e of o){const t=this._promisesByRequest.get(e);this._promisesByRequest.delete(e),t.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(e){this._loadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){this.aborted=!0,this.pdfNetworkStream?.cancelAllRequests(e);for(const t of this._promisesByRequest.values())t.reject(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringStream=t.Stream=t.NullStream=void 0;var a=r(5),n=r(2);class i extends a.BaseStream{constructor(e,t,r,a){super(),this.bytes=e instanceof Uint8Array?e:new Uint8Array(e),this.start=t||0,this.pos=this.start,this.end=t+r||this.bytes.length,this.dict=a}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(e){const t=this.bytes,r=this.pos,a=this.end;if(!e)return t.subarray(r,a);let n=r+e;return n>a&&(n=a),this.pos=n,t.subarray(r,n)}getByteRange(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,r=null){return new i(this.bytes.buffer,e,t,r)}}t.Stream=i,t.StringStream=class extends i{constructor(e){super((0,n.stringToBytes)(e))}},t.NullStream=class extends i{constructor(){super(new Uint8Array(0))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Page=t.PDFDocument=void 0;var a=r(2),n=r(10),i=r(3),s=r(4),o=r(51),c=r(5),l=r(74),h=r(66),u=r(68),d=r(102),f=r(16),p=r(8),g=r(76),m=r(64),b=r(13),y=r(18),v=r(72),w=r(73),A=r(77),S=r(103);const x=[0,0,612,792];class k{constructor({pdfManager:e,xref:t,pageIndex:r,pageDict:a,ref:n,globalIdFactory:i,fontCache:s,builtInCMapCache:o,standardFontDataCache:c,globalImageCache:l,systemFontCache:h,nonBlendModesSet:u,xfaFactory:d}){this.pdfManager=e,this.pageIndex=r,this.pageDict=a,this.xref=t,this.ref=n,this.fontCache=s,this.builtInCMapCache=o,this.standardFontDataCache=c,this.globalImageCache=l,this.systemFontCache=h,this.nonBlendModesSet=u,this.evaluatorOptions=e.evaluatorOptions,this.resourcesPromise=null,this.xfaFactory=d;const f={obj:0};this._localIdFactory=class extends i{static createObjId(){return`p${r}_${++f.obj}`}static getPageObjId(){return`p${n.toString()}`}}}_getInheritableProperty(e,t=!1){const r=(0,i.getInheritableProperty)({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(r)?1!==r.length&&r[0]instanceof s.Dict?s.Dict.merge({xref:this.xref,dictArray:r}):r[0]:r}get content(){return this.pageDict.getArray("Contents")}get resources(){const e=this._getInheritableProperty("Resources");return(0,a.shadow)(this,"resources",e instanceof s.Dict?e:s.Dict.empty)}_getBoundingBox(e){if(this.xfaData)return this.xfaData.bbox;let t=this._getInheritableProperty(e,!0);if(Array.isArray(t)&&4===t.length){if(t=a.Util.normalizeRect(t),t[2]-t[0]>0&&t[3]-t[1]>0)return t;(0,a.warn)(`Empty, or invalid, /${e} entry.`)}return null}get mediaBox(){return(0,a.shadow)(this,"mediaBox",this._getBoundingBox("MediaBox")||x)}get cropBox(){return(0,a.shadow)(this,"cropBox",this._getBoundingBox("CropBox")||this.mediaBox)}get userUnit(){let e=this.pageDict.get("UserUnit");return("number"!=typeof e||e<=0)&&(e=1),(0,a.shadow)(this,"userUnit",e)}get view(){const{cropBox:e,mediaBox:t}=this;if(e!==t&&!(0,a.isArrayEqual)(e,t)){const r=a.Util.intersect(e,t);if(r&&r[2]-r[0]>0&&r[3]-r[1]>0)return(0,a.shadow)(this,"view",r);(0,a.warn)("Empty /CropBox and /MediaBox intersection.")}return(0,a.shadow)(this,"view",t)}get rotate(){let e=this._getInheritableProperty("Rotate")||0;return e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360),(0,a.shadow)(this,"rotate",e)}_onSubStreamError(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e;(0,a.warn)(`getContentStream - ignoring sub-stream (${t}): "${e}".`)}getContentStream(){return this.pdfManager.ensure(this,"content").then((e=>e instanceof c.BaseStream?e:Array.isArray(e)?new y.StreamsSequenceStream(e,this._onSubStreamError.bind(this)):new p.NullStream))}get xfaData(){return(0,a.shadow)(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}#t(e,t,r){for(const n of e)if(n.id){const e=s.Ref.fromString(n.id);if(!e){(0,a.warn)(`A non-linked annotation cannot be modified: ${n.id}`);continue}if(n.deleted){t.put(e);continue}r?.put(e),n.ref=e,delete n.id}}async saveNewAnnotations(e,t,r,a){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const i=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),o=new s.RefSet,c=new s.RefSet;this.#t(r,o,c);const l=this.pageDict,h=this.annotations.filter((e=>!(e instanceof s.Ref&&o.has(e)))),u=await n.AnnotationFactory.saveNewAnnotations(i,t,r,a);for(const{ref:e}of u.annotations)e instanceof s.Ref&&!c.has(e)&&h.push(e);const d=l.get("Annots");l.set("Annots",h);const f=[];await(0,w.writeObject)(this.ref,l,f,this.xref),d&&l.set("Annots",d);const p=u.dependencies;return p.push({ref:this.ref,data:f.join("")},...u.annotations),p}save(e,t,r){const n=new b.PartialEvaluator({xref:this.xref,handler:e,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(e){const i=[];for(const s of e)s.mustBePrinted(r)&&i.push(s.save(n,t,r).catch((function(e){return(0,a.warn)(`save - ignoring annotation data during "${t.name}" task: "${e}".`),null})));return Promise.all(i).then((function(e){return e.filter((e=>!!e))}))}))}loadResources(e){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then((()=>new g.ObjectLoader(this.resources,e,this.xref).load()))}getOperatorList({handler:e,sink:t,task:r,intent:o,cacheKey:c,annotationStorage:l=null}){const h=this.getContentStream(),u=this.loadResources(["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"]),d=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),f=this.xfaFactory?null:(0,i.getNewAnnotationsMap)(l);let p=null,g=Promise.resolve(null);if(f){const e=f.get(this.pageIndex);if(e){const t=this.pdfManager.ensureDoc("annotationGlobals");let i;const o=new Set;for(const{bitmapId:t,bitmap:r}of e)!t||r||o.has(t)||o.add(t);const{isOffscreenCanvasSupported:c}=this.evaluatorOptions;if(o.size>0){const t=e.slice();for(const[e,r]of l)e.startsWith(a.AnnotationEditorPrefix)&&r.bitmap&&o.has(r.bitmapId)&&t.push(r);i=n.AnnotationFactory.generateImages(t,this.xref,c)}else i=n.AnnotationFactory.generateImages(e,this.xref,c);p=new s.RefSet,this.#t(e,p,null),g=t.then((t=>t?n.AnnotationFactory.printNewAnnotations(t,d,r,e,i):null))}}const y=Promise.all([h,u]).then((([a])=>{const n=new m.OperatorList(o,t);return e.send("StartRenderPage",{transparency:d.hasBlendModes(this.resources,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:c}),d.getOperatorList({stream:a,task:r,resources:this.resources,operatorList:n}).then((function(){return n}))}));return Promise.all([y,this._parsedAnnotations,g]).then((function([e,t,n]){if(n){t=t.filter((e=>!(e.ref&&p.has(e.ref))));for(let e=0,r=n.length;e<r;e++){const a=n[e];if(a.refToReplace){const i=t.findIndex((e=>e.ref&&(0,s.isRefsEqual)(e.ref,a.refToReplace)));i>=0&&(t.splice(i,1,a),n.splice(e--,1),r--)}}t=t.concat(n)}if(0===t.length||o&a.RenderingIntentFlag.ANNOTATIONS_DISABLE)return e.flush(!0),{length:e.totalLength};const i=!!(o&a.RenderingIntentFlag.ANNOTATIONS_FORMS),c=!!(o&a.RenderingIntentFlag.ANY),h=!!(o&a.RenderingIntentFlag.DISPLAY),u=!!(o&a.RenderingIntentFlag.PRINT),f=[];for(const e of t)(c||h&&e.mustBeViewed(l,i)||u&&e.mustBePrinted(l))&&f.push(e.getOperatorList(d,r,o,i,l).catch((function(e){return(0,a.warn)(`getOperatorList - ignoring annotation data during "${r.name}" task: "${e}".`),{opList:null,separateForm:!1,separateCanvas:!1}})));return Promise.all(f).then((function(t){let r=!1,a=!1;for(const{opList:n,separateForm:i,separateCanvas:s}of t)e.addOpList(n),r||=i,a||=s;return e.flush(!0,{form:r,canvas:a}),{length:e.totalLength}}))}))}extractTextContent({handler:e,task:t,includeMarkedContent:r,disableNormalization:a,sink:n}){const i=this.getContentStream(),s=this.loadResources(["ExtGState","Font","Properties","XObject"]);return Promise.all([i,s]).then((([i])=>new b.PartialEvaluator({xref:this.xref,handler:e,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:i,task:t,resources:this.resources,includeMarkedContent:r,disableNormalization:a,sink:n,viewBox:this.view})))}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");return e?(await this._parsedAnnotations,(await this.pdfManager.ensure(this,"_parseStructTree",[e])).serializable):null}_parseStructTree(e){const t=new v.StructTreePage(e,this.pageDict);return t.parse(this.ref),t}async getAnnotationsData(e,t,r){const n=await this._parsedAnnotations;if(0===n.length)return n;const i=[],s=[];let o;const c=!!(r&a.RenderingIntentFlag.ANY),l=!!(r&a.RenderingIntentFlag.DISPLAY),h=!!(r&a.RenderingIntentFlag.PRINT);for(const r of n){const n=c||l&&r.viewable;(n||h&&r.printable)&&i.push(r.data),r.hasTextContent&&n&&(o||=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions}),s.push(r.extractTextContent(o,t,[-1/0,-1/0,1/0,1/0]).catch((function(e){(0,a.warn)(`getAnnotationsData - ignoring textContent during "${t.name}" task: "${e}".`)}))))}return await Promise.all(s),i}get annotations(){const e=this._getInheritableProperty("Annots");return(0,a.shadow)(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){const e=this.pdfManager.ensure(this,"annotations").then((async e=>{if(0===e.length)return e;const t=await this.pdfManager.ensureDoc("annotationGlobals");if(!t)return[];const r=[];for(const i of e)r.push(n.AnnotationFactory.create(this.xref,i,t,this._localIdFactory,!1,this.ref).catch((function(e){return(0,a.warn)(`_parsedAnnotations: "${e}".`),null})));const i=[];let s;for(const e of await Promise.all(r))e&&(e instanceof n.PopupAnnotation?(s||=[]).push(e):i.push(e));return s&&i.push(...s),i}));return(0,a.shadow)(this,"_parsedAnnotations",e)}get jsActions(){const e=(0,i.collectActions)(this.xref,this.pageDict,a.PageActionEventType);return(0,a.shadow)(this,"jsActions",e)}}t.Page=k;const C=new Uint8Array([37,80,68,70,45]),_=new Uint8Array([115,116,97,114,116,120,114,101,102]),T=new Uint8Array([101,110,100,111,98,106]);function E(e,t,r=1024,a=!1){const n=t.length,i=e.peekBytes(r),s=i.length-n;if(s<=0)return!1;if(a){const r=n-1;let a=i.length-1;for(;a>=r;){let s=0;for(;s<n&&i[a-s]===t[r-s];)s++;if(s>=n)return e.pos+=a-r,!0;a--}}else{let r=0;for(;r<=s;){let a=0;for(;a<n&&i[r+a]===t[a];)a++;if(a>=n)return e.pos+=r,!0;r++}}return!1}t.PDFDocument=class{constructor(e,t){if(t.length<=0)throw new a.InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=e,this.stream=t,this.xref=new S.XRef(t,e),this._pagePromises=new Map,this._version=null;const r={font:0};this._globalIdFactory=class{static getDocId(){return`g_${e.docId}`}static createFontId(){return"f"+ ++r.font}static createObjId(){(0,a.unreachable)("Abstract method `createObjId` called.")}static getPageObjId(){(0,a.unreachable)("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e),this.catalog=new h.Catalog(this.pdfManager,this.xref)}get linearization(){let e=null;try{e=f.Linearization.create(this.stream)}catch(e){if(e instanceof i.MissingDataException)throw e;(0,a.info)(e)}return(0,a.shadow)(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization)e.reset(),E(e,T)&&(t=e.pos+6-e.start);else{const r=1024,a=_.length;let n=!1,s=e.end;for(;!n&&s>0;)s-=r-a,s<0&&(s=0),e.pos=s,n=E(e,_,r,!0);if(n){let r;e.skip(9);do{r=e.getByte()}while((0,i.isWhiteSpace)(r));let a="";for(;r>=32&&r<=57;)a+=String.fromCharCode(r),r=e.getByte();t=parseInt(a,10),isNaN(t)&&(t=0)}}return(0,a.shadow)(this,"startXRef",t)}checkHeader(){const e=this.stream;if(e.reset(),!E(e,C))return;e.moveStart(),e.skip(C.length);let t,r="";for(;(t=e.getByte())>32&&r.length<7;)r+=String.fromCharCode(t);i.PDF_VERSION_REGEXP.test(r)?this._version=r:(0,a.warn)(`Invalid PDF header version: ${r}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let e=0;return e=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages,(0,a.shadow)(this,"numPages",e)}_hasOnlyDocumentSignatures(e,t=0){return!!Array.isArray(e)&&e.every((e=>{if(!((e=this.xref.fetchIfRef(e))instanceof s.Dict))return!1;if(e.has("Kids"))return++t>10?((0,a.warn)("_hasOnlyDocumentSignatures: maximum recursion depth reached"),!1):this._hasOnlyDocumentSignatures(e.get("Kids"),t);const r=(0,s.isName)(e.get("FT"),"Sig"),n=e.get("Rect"),i=Array.isArray(n)&&n.every((e=>0===e));return r&&i}))}get _xfaStreams(){const e=this.catalog.acroForm;if(!e)return null;const t=e.get("XFA"),r={"xdp:xdp":"",template:"",datasets:"",config:"",connectionSet:"",localeSet:"",stylesheet:"","/xdp:xdp":""};if(t instanceof c.BaseStream&&!t.isEmpty)return r["xdp:xdp"]=t,r;if(!Array.isArray(t)||0===t.length)return null;for(let e=0,a=t.length;e<a;e+=2){let n;if(n=0===e?"xdp:xdp":e===a-2?"/xdp:xdp":t[e],!r.hasOwnProperty(n))continue;const i=this.xref.fetchIfRef(t[e+1]);i instanceof c.BaseStream&&!i.isEmpty&&(r[n]=i)}return r}get xfaDatasets(){const e=this._xfaStreams;if(!e)return(0,a.shadow)(this,"xfaDatasets",null);for(const t of["datasets","xdp:xdp"]){const r=e[t];if(r)try{const e=(0,a.stringToUTF8String)(r.getString()),n={[t]:e};return(0,a.shadow)(this,"xfaDatasets",new d.DatasetReader(n))}catch{(0,a.warn)("XFA - Invalid utf-8 string.");break}}return(0,a.shadow)(this,"xfaDatasets",null)}get xfaData(){const e=this._xfaStreams;if(!e)return null;const t=Object.create(null);for(const[r,n]of Object.entries(e))if(n)try{t[r]=(0,a.stringToUTF8String)(n.getString())}catch{return(0,a.warn)("XFA - Invalid utf-8 string."),null}return t}get xfaFactory(){let e;return this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(e=this.xfaData),(0,a.shadow)(this,"xfaFactory",e?new A.XFAFactory(e):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa(){return this.xfaFactory?this.xfaFactory.getPages():null}async loadXfaImages(){const e=await this.pdfManager.ensureCatalog("xfaImages");if(!e)return;const t=e.getKeys(),r=new g.ObjectLoader(e,t,this.xref);await r.load();const a=new Map;for(const r of t){const t=e.get(r);t instanceof c.BaseStream&&a.set(r,t.getBytes())}this.xfaFactory.setImages(a)}async loadXfaFonts(e,t){const r=await this.pdfManager.ensureCatalog("acroForm");if(!r)return;const n=await r.getAsync("DR");if(!(n instanceof s.Dict))return;const c=new g.ObjectLoader(n,["Font"],this.xref);await c.load();const l=n.get("Font");if(!(l instanceof s.Dict))return;const h=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions);h.useSystemFonts=!1;const u=new b.PartialEvaluator({xref:this.xref,handler:e,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:this.catalog.fontCache,builtInCMapCache:this.catalog.builtInCMapCache,standardFontDataCache:this.catalog.standardFontDataCache,options:h}),d=new m.OperatorList,f=[],p={get font(){return f.at(-1)},set font(e){f.push(e)},clone(){return this}},y=new Map;l.forEach(((e,t)=>{y.set(e,t)}));const v=[];for(const[e,r]of y){const o=r.get("FontDescriptor");if(!(o instanceof s.Dict))continue;let c=o.get("FontFamily");c=c.replaceAll(/[ ]+(\d)/g,"$1");const l={fontFamily:c,fontWeight:o.get("FontWeight"),italicAngle:-o.get("ItalicAngle")};(0,i.validateCSSFont)(l)&&v.push(u.handleSetFont(n,[s.Name.get(e),1],null,d,t,p,null,l).catch((function(e){return(0,a.warn)(`loadXfaFonts: "${e}".`),null})))}await Promise.all(v);const w=this.xfaFactory.setFonts(f);if(!w)return;h.ignoreErrors=!0,v.length=0,f.length=0;const A=new Set;for(const e of w)(0,o.getXfaFontName)(`${e}-Regular`)||A.add(e);A.size&&w.push("PdfJS-Fallback");for(const e of w)if(!A.has(e))for(const r 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 i=`${e}-${r.name}`,c=(0,o.getXfaFontDict)(i);v.push(u.handleSetFont(n,[s.Name.get(i),1],null,d,t,p,c,{fontFamily:e,fontWeight:r.fontWeight,italicAngle:r.italicAngle}).catch((function(e){return(0,a.warn)(`loadXfaFonts: "${e}".`),null})))}await Promise.all(v),this.xfaFactory.appendFonts(f,A)}async serializeXfaData(e){return this.xfaFactory?this.xfaFactory.serializeData(e):null}get version(){return this.catalog.version||this._version}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},t=this.catalog.acroForm;if(!t)return(0,a.shadow)(this,"formInfo",e);try{const r=t.get("Fields"),a=Array.isArray(r)&&r.length>0;e.hasFields=a;const n=t.get("XFA");e.hasXfa=Array.isArray(n)&&n.length>0||n instanceof c.BaseStream&&!n.isEmpty;const i=!!(1&t.get("SigFlags")),s=i&&this._hasOnlyDocumentSignatures(r);e.hasAcroForm=a&&!s,e.hasSignatures=i}catch(e){if(e instanceof i.MissingDataException)throw e;(0,a.warn)(`Cannot fetch form information: "${e}".`)}return(0,a.shadow)(this,"formInfo",e)}get documentInfo(){const e={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 t;try{t=this.xref.trailer.get("Info")}catch(e){if(e instanceof i.MissingDataException)throw e;(0,a.info)("The document information dictionary is invalid.")}if(!(t instanceof s.Dict))return(0,a.shadow)(this,"documentInfo",e);for(const r of t.getKeys()){const n=t.get(r);switch(r){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof n){e[r]=(0,a.stringToPDFString)(n);continue}break;case"Trapped":if(n instanceof s.Name){e[r]=n;continue}break;default:let t;switch(typeof n){case"string":t=(0,a.stringToPDFString)(n);break;case"number":case"boolean":t=n;break;default:n instanceof s.Name&&(t=n)}if(void 0===t){(0,a.warn)(`Bad value, for custom key "${r}", in Info: ${n}.`);continue}e.Custom||(e.Custom=Object.create(null)),e.Custom[r]=t;continue}(0,a.warn)(`Bad value, for key "${r}", in Info: ${n}.`)}return(0,a.shadow)(this,"documentInfo",e)}get fingerprints(){function e(e){return"string"==typeof e&&e.length>0&&"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"!==e}function t(e){const t=[];for(const r of e){const e=r.toString(16);t.push(e.padStart(2,"0"))}return t.join("")}const r=this.xref.trailer.get("ID");let n,i;return Array.isArray(r)&&e(r[0])?(n=(0,a.stringToBytes)(r[0]),r[1]!==r[0]&&e(r[1])&&(i=(0,a.stringToBytes)(r[1]))):n=(0,l.calculateMD5)(this.stream.getByteRange(0,1024),0,1024),(0,a.shadow)(this,"fingerprints",[t(n),i?t(i):null])}async _getLinearizationPage(e){const{catalog:t,linearization:r,xref:n}=this,i=s.Ref.get(r.objectNumberFirst,0);try{const e=await n.fetchAsync(i);if(e instanceof s.Dict){let r=e.getRaw("Type");if(r instanceof s.Ref&&(r=await n.fetchAsync(r)),(0,s.isName)(r,"Page")||!e.has("Type")&&!e.has("Kids"))return t.pageKidsCountCache.has(i)||t.pageKidsCountCache.put(i,1),t.pageIndexCache.has(i)||t.pageIndexCache.put(i,0),[e,i]}throw new a.FormatError("The Linearization dictionary doesn't point to a valid Page dictionary.")}catch(r){return(0,a.warn)(`_getLinearizationPage: "${r.message}".`),t.getPageDict(e)}}getPage(e){const t=this._pagePromises.get(e);if(t)return t;const{catalog:r,linearization:a,xfaFactory:n}=this;let i;return i=n?Promise.resolve([s.Dict.empty,null]):a?.pageFirst===e?this._getLinearizationPage(e):r.getPageDict(e),i=i.then((([t,a])=>new k({pdfManager:this.pdfManager,xref:this.xref,pageIndex:e,pageDict:t,ref:a,globalIdFactory:this._globalIdFactory,fontCache:r.fontCache,builtInCMapCache:r.builtInCMapCache,standardFontDataCache:r.standardFontDataCache,globalImageCache:r.globalImageCache,systemFontCache:r.systemFontCache,nonBlendModesSet:r.nonBlendModesSet,xfaFactory:n}))),this._pagePromises.set(e,i),i}async checkFirstPage(e=!1){if(!e)try{await this.getPage(0)}catch(e){if(e instanceof i.XRefEntryException)throw this._pagePromises.delete(0),await this.cleanup(),new i.XRefParseException}}async checkLastPage(e=!1){const{catalog:t,pdfManager:r}=this;let n;t.setActualNumPages();try{if(await Promise.all([r.ensureDoc("xfaFactory"),r.ensureDoc("linearization"),r.ensureCatalog("numPages")]),this.xfaFactory)return;if(n=this.linearization?this.linearization.numPages:t.numPages,!Number.isInteger(n))throw new a.FormatError("Page count is not an integer.");if(n<=1)return;await this.getPage(n-1)}catch(s){if(this._pagePromises.delete(n-1),await this.cleanup(),s instanceof i.XRefEntryException&&!e)throw new i.XRefParseException;let o;(0,a.warn)(`checkLastPage - invalid /Pages tree /Count: ${n}.`);try{o=await t.getAllPageDicts(e)}catch(r){if(r instanceof i.XRefEntryException&&!e)throw new i.XRefParseException;return void t.setActualNumPages(1)}for(const[e,[a,n]]of o){let i;a instanceof Error?(i=Promise.reject(a),i.catch((()=>{}))):i=Promise.resolve(new k({pdfManager:r,xref:this.xref,pageIndex:e,pageDict:a,ref:n,globalIdFactory:this._globalIdFactory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalImageCache:t.globalImageCache,systemFontCache:t.systemFontCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null})),this._pagePromises.set(e,i)}t.setActualNumPages(o.size)}}fontFallback(e,t){return this.catalog.fontFallback(e,t)}async cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):(0,u.clearGlobalCaches)()}#r(e,t,r,i){const s=this.xref.fetchIfRef(t);if(s.has("T")){const t=(0,a.stringToPDFString)(s.get("T"));e=""===e?t:`${e}.${t}`}if(r.has(e)||r.set(e,[]),r.get(e).push(n.AnnotationFactory.create(this.xref,t,i,this._localIdFactory,!0,null).then((e=>e?.getFieldObject())).catch((function(e){return(0,a.warn)(`#collectFieldObjects: "${e}".`),null}))),s.has("Kids"))for(const t of s.get("Kids"))this.#r(e,t,r,i)}get fieldObjects(){if(!this.formInfo.hasFields)return(0,a.shadow)(this,"fieldObjects",Promise.resolve(null));const e=this.pdfManager.ensureDoc("annotationGlobals").then((async e=>{if(!e)return null;const t=Object.create(null),r=new Map;for(const t of this.catalog.acroForm.get("Fields"))this.#r("",t,r,e);const a=[];for(const[e,n]of r)a.push(Promise.all(n).then((r=>{(r=r.filter((e=>!!e))).length>0&&(t[e]=r)})));return await Promise.all(a),t}));return(0,a.shadow)(this,"fieldObjects",e)}get hasJSActions(){const e=this.pdfManager.ensureDoc("_parseHasJSActions");return(0,a.shadow)(this,"hasJSActions",e)}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!e||!!t&&Object.values(t).some((e=>e.some((e=>null!==e.actions))))}get calculationOrderIds(){const e=this.catalog.acroForm;if(!e?.has("CO"))return(0,a.shadow)(this,"calculationOrderIds",null);const t=e.get("CO");if(!Array.isArray(t)||0===t.length)return(0,a.shadow)(this,"calculationOrderIds",null);const r=[];for(const e of t)e instanceof s.Ref&&r.push(e.toString());return 0===r.length?(0,a.shadow)(this,"calculationOrderIds",null):(0,a.shadow)(this,"calculationOrderIds",r)}get annotationGlobals(){return(0,a.shadow)(this,"annotationGlobals",n.AnnotationFactory.createGlobals(this.pdfManager))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PopupAnnotation=t.MarkupAnnotation=t.AnnotationFactory=t.AnnotationBorderStyle=t.Annotation=void 0,t.getQuadPoints=w;var a=r(2),n=r(3),i=r(11),s=r(4),o=r(8),c=r(5),l=r(60),h=r(66),u=r(12),d=r(69),f=r(26),p=r(76),g=r(64),m=r(73),b=r(77);function y(e,t=new Uint8ClampedArray(3)){if(!Array.isArray(e))return t;const r=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:return u.ColorSpace.singletons.gray.getRgbItem(e,0,r,0),r;case 3:return u.ColorSpace.singletons.rgb.getRgbItem(e,0,r,0),r;case 4:return u.ColorSpace.singletons.cmyk.getRgbItem(e,0,r,0),r;default:return t}}function v(e){return Array.from(e,(e=>e/255))}function w(e,t){const r=e.getArray("QuadPoints");if(!Array.isArray(r)||0===r.length||r.length%8>0)return null;const a=[];for(let e=0,n=r.length/8;e<n;e++){let n=1/0,i=-1/0,s=1/0,o=-1/0;for(let t=8*e,a=8*e+8;t<a;t+=2){const e=r[t],a=r[t+1];n=Math.min(e,n),i=Math.max(e,i),s=Math.min(a,s),o=Math.max(a,o)}if(null!==t&&(n<t[0]||i>t[2]||s<t[1]||o>t[3]))return null;a.push([{x:n,y:o},{x:i,y:o},{x:n,y:s},{x:i,y:s}])}return a}function A(e,t,r){const[n,i,s,o]=a.Util.getAxialAlignedBoundingBox(t,r);if(n===s||i===o)return[1,0,0,1,e[0],e[1]];const c=(e[2]-e[0])/(s-n),l=(e[3]-e[1])/(o-i);return[c,0,0,l,e[0]-n*c,e[1]-i*l]}t.AnnotationFactory=class{static createGlobals(e){return Promise.all([e.ensureCatalog("acroForm"),e.ensureDoc("xfaDatasets"),e.ensureCatalog("structTreeRoot"),e.ensureCatalog("baseUrl"),e.ensureCatalog("attachments")]).then((([t,r,a,n,i])=>({pdfManager:e,acroForm:t instanceof s.Dict?t:s.Dict.empty,xfaDatasets:r,structTreeRoot:a,baseUrl:n,attachments:i})),(e=>((0,a.warn)(`createGlobals: "${e}".`),null)))}static async create(e,t,r,a,n,i){const s=n?await this._getPageIndex(e,t,r.pdfManager):null;return r.pdfManager.ensure(this,"_create",[e,t,r,a,n,s,i])}static _create(e,t,r,i,o=!1,c=null,l=null){const h=e.fetchIfRef(t);if(!(h instanceof s.Dict))return;const{acroForm:u,pdfManager:d}=r,f=t instanceof s.Ref?t.toString():`annot_${i.createObjId()}`;let p=h.get("Subtype");p=p instanceof s.Name?p.name:null;const g={xref:e,ref:t,dict:h,subtype:p,id:f,annotationGlobals:r,collectFields:o,needAppearances:!o&&!0===u.get("NeedAppearances"),pageIndex:c,evaluatorOptions:d.evaluatorOptions,pageRef:l};switch(p){case"Link":return new P(g);case"Text":return new F(g);case"Widget":let e=(0,n.getInheritableProperty)({dict:h,key:"FT"});switch(e=e instanceof s.Name?e.name:null,e){case"Tx":return new _(g);case"Btn":return new T(g);case"Ch":return new E(g);case"Sig":return new O(g)}return(0,a.warn)(`Unimplemented widget field type "${e}", falling back to base field type.`),new C(g);case"Popup":return new I(g);case"FreeText":return new M(g);case"Line":return new R(g);case"Square":return new D(g);case"Circle":return new N(g);case"PolyLine":return new L(g);case"Polygon":return new B(g);case"Caret":return new j(g);case"Ink":return new $(g);case"Highlight":return new U(g);case"Underline":return new z(g);case"Squiggly":return new H(g);case"StrikeOut":return new X(g);case"Stamp":return new W(g);case"FileAttachment":return new G(g);default:return o||(p?(0,a.warn)(`Unimplemented annotation type "${p}", falling back to base annotation.`):(0,a.warn)("Annotation is missing the required /Subtype.")),new S(g)}}static async _getPageIndex(e,t,r){try{const n=await e.fetchIfRefAsync(t);if(!(n instanceof s.Dict))return-1;const i=n.getRaw("P");if(i instanceof s.Ref)try{return await r.ensureCatalog("getPageIndex",[i])}catch(e){(0,a.info)(`_getPageIndex -- not a valid page reference: "${e}".`)}if(n.has("Kids"))return-1;const o=await r.ensureDoc("numPages");for(let e=0;e<o;e++){const a=await r.getPage(e),n=await r.ensure(a,"annotations");for(const r of n)if(r instanceof s.Ref&&(0,s.isRefsEqual)(r,t))return e}}catch(e){(0,a.warn)(`_getPageIndex: "${e}".`)}return-1}static generateImages(e,t,r){if(!r)return(0,a.warn)("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."),null;let n;for(const{bitmapId:r,bitmap:a}of e)a&&(n||=new Map,n.set(r,W.createImage(a,t)));return n}static async saveNewAnnotations(e,t,r,n){const i=e.xref;let o;const c=[],l=[],{isOffscreenCanvasSupported:h}=e.options;for(const u of r)if(!u.deleted)switch(u.annotationType){case a.AnnotationEditorType.FREETEXT:if(!o){const e=new s.Dict(i);e.set("BaseFont",s.Name.get("Helvetica")),e.set("Type",s.Name.get("Font")),e.set("Subtype",s.Name.get("Type1")),e.set("Encoding",s.Name.get("WinAnsiEncoding"));const t=[];o=i.getNewTemporaryRef(),await(0,m.writeObject)(o,e,t,i),c.push({ref:o,data:t.join("")})}l.push(M.createNewAnnotation(i,u,c,{evaluator:e,task:t,baseFontRef:o}));break;case a.AnnotationEditorType.INK:l.push($.createNewAnnotation(i,u,c));break;case a.AnnotationEditorType.STAMP:if(!h)break;const r=await n.get(u.bitmapId);if(r.imageStream){const{imageStream:e,smaskStream:t}=r,a=[];if(t){const r=i.getNewTemporaryRef();await(0,m.writeObject)(r,t,a,i),c.push({ref:r,data:a.join("")}),e.dict.set("SMask",r),a.length=0}const n=r.imageRef=i.getNewTemporaryRef();await(0,m.writeObject)(n,e,a,i),c.push({ref:n,data:a.join("")}),r.imageStream=r.smaskStream=null}l.push(W.createNewAnnotation(i,u,c,{image:r}))}return{annotations:await Promise.all(l),dependencies:c}}static async printNewAnnotations(e,t,r,n,i){if(!n)return null;const{options:s,xref:o}=t,c=[];for(const l of n)if(!l.deleted)switch(l.annotationType){case a.AnnotationEditorType.FREETEXT:c.push(M.createNewPrintAnnotation(e,o,l,{evaluator:t,task:r,evaluatorOptions:s}));break;case a.AnnotationEditorType.INK:c.push($.createNewPrintAnnotation(e,o,l,{evaluatorOptions:s}));break;case a.AnnotationEditorType.STAMP:if(!s.isOffscreenCanvasSupported)break;const n=await i.get(l.bitmapId);if(n.imageStream){const{imageStream:e,smaskStream:t}=n;t&&e.dict.set("SMask",t),n.imageRef=new f.JpegStream(e,e.length),n.imageStream=n.smaskStream=null}c.push(W.createNewPrintAnnotation(e,o,l,{image:n,evaluatorOptions:s}))}return Promise.all(c)}};class S{constructor(e){const{dict:t,xref:r,annotationGlobals:i}=e;this.setTitle(t.get("T")),this.setContents(t.get("Contents")),this.setModificationDate(t.get("M")),this.setFlags(t.get("F")),this.setRectangle(t.getArray("Rect")),this.setColor(t.getArray("C")),this.setBorderStyle(t),this.setAppearance(t),this.setOptionalContent(t);const o=t.get("MK");this.setBorderAndBackgroundColors(o),this.setRotation(o,t),this.ref=e.ref instanceof s.Ref?e.ref:null,this._streams=[],this.appearance&&this._streams.push(this.appearance);const c=!!(this.flags&a.AnnotationFlag.LOCKED),l=!!(this.flags&a.AnnotationFlag.LOCKEDCONTENTS);if(i.structTreeRoot){let r=t.get("StructParent");r=Number.isInteger(r)&&r>=0?r:-1,i.structTreeRoot.addAnnotationIdToPage(e.pageRef,r)}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:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:e.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&a.AnnotationFlag.NOROTATE),noHTML:c&&l},e.collectFields){const i=t.get("Kids");if(Array.isArray(i)){const e=[];for(const t of i)t instanceof s.Ref&&e.push(t.toString());0!==e.length&&(this.data.kidIds=e)}this.data.actions=(0,n.collectActions)(r,t,a.AnnotationActionEventType),this.data.fieldName=this._constructFieldName(t),this.data.pageIndex=e.pageIndex}this._isOffscreenCanvasSupported=e.evaluatorOptions.isOffscreenCanvasSupported,this._fallbackFontDict=null,this._needAppearances=!1}_hasFlag(e,t){return!!(e&t)}_isViewable(e){return!this._hasFlag(e,a.AnnotationFlag.INVISIBLE)&&!this._hasFlag(e,a.AnnotationFlag.NOVIEW)}_isPrintable(e){return this._hasFlag(e,a.AnnotationFlag.PRINT)&&!this._hasFlag(e,a.AnnotationFlag.HIDDEN)&&!this._hasFlag(e,a.AnnotationFlag.INVISIBLE)}mustBeViewed(e,t){const r=e?.get(this.data.id)?.noView;return void 0!==r?!r:this.viewable&&!this._hasFlag(this.flags,a.AnnotationFlag.HIDDEN)}mustBePrinted(e){const t=e?.get(this.data.id)?.noPrint;return void 0!==t?!t:this.printable}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&0!==this.flags&&this._isPrintable(this.flags)}_parseStringHelper(e){const t="string"==typeof e?(0,a.stringToPDFString)(e):"";return{str:t,dir:t&&"rtl"===(0,l.bidi)(t).dir?"rtl":"ltr"}}setDefaultAppearance(e){const{dict:t,annotationGlobals:r}=e,a=(0,n.getInheritableProperty)({dict:t,key:"DA"})||r.acroForm.get("DA");this._defaultAppearance="string"==typeof a?a:"",this.data.defaultAppearanceData=(0,i.parseDefaultAppearance)(this._defaultAppearance)}setTitle(e){this._title=this._parseStringHelper(e)}setContents(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate="string"==typeof e?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){this.rectangle=Array.isArray(e)&&4===e.length?a.Util.normalizeRect(e):[0,0,0,0]}setColor(e){this.color=y(e)}setLineEndings(e){if(this.lineEndings=["None","None"],Array.isArray(e)&&2===e.length)for(let t=0;t<2;t++){const r=e[t];if(r instanceof s.Name)switch(r.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=r.name;continue}(0,a.warn)(`Ignoring invalid lineEnding: ${r}`)}}setRotation(e,t){this.rotation=0;let r=e instanceof s.Dict?e.get("R")||0:t.get("Rotate")||0;Number.isInteger(r)&&0!==r&&(r%=360,r<0&&(r+=360),r%90==0&&(this.rotation=r))}setBorderAndBackgroundColors(e){e instanceof s.Dict?(this.borderColor=y(e.getArray("BC"),null),this.backgroundColor=y(e.getArray("BG"),null)):this.borderColor=this.backgroundColor=null}setBorderStyle(e){if(this.borderStyle=new x,e instanceof s.Dict)if(e.has("BS")){const t=e.get("BS"),r=t.get("Type");r&&!(0,s.isName)(r,"Border")||(this.borderStyle.setWidth(t.get("W"),this.rectangle),this.borderStyle.setStyle(t.get("S")),this.borderStyle.setDashArray(t.getArray("D")))}else if(e.has("Border")){const t=e.getArray("Border");Array.isArray(t)&&t.length>=3&&(this.borderStyle.setHorizontalCornerRadius(t[0]),this.borderStyle.setVerticalCornerRadius(t[1]),this.borderStyle.setWidth(t[2],this.rectangle),4===t.length&&this.borderStyle.setDashArray(t[3],!0))}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(t instanceof s.Dict))return;const r=t.get("N");if(r instanceof c.BaseStream)return void(this.appearance=r);if(!(r instanceof s.Dict))return;const a=e.get("AS");if(!(a instanceof s.Name&&r.has(a.name)))return;const n=r.get(a.name);n instanceof c.BaseStream&&(this.appearance=n)}setOptionalContent(e){this.oc=null;const t=e.get("OC");t instanceof s.Name?(0,a.warn)("setOptionalContent: Support for /Name-entry is not implemented."):t instanceof s.Dict&&(this.oc=t)}loadResources(e,t){return t.dict.getAsync("Resources").then((t=>{if(t)return new p.ObjectLoader(t,e,t.xref).load().then((function(){return t}))}))}async getOperatorList(e,t,r,n,i){const c=this.data;let l=this.appearance;const h=!!(this.data.hasOwnCanvas&&r&a.RenderingIntentFlag.DISPLAY);if(!l){if(!h)return{opList:new g.OperatorList,separateForm:!1,separateCanvas:!1};l=new o.StringStream(""),l.dict=new s.Dict}const u=l.dict,d=await this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"],l),f=u.getArray("BBox")||[0,0,1,1],p=u.getArray("Matrix")||[1,0,0,1,0,0],m=A(c.rect,f,p),b=new g.OperatorList;let y;return this.oc&&(y=await e.parseMarkedContentProps(this.oc,null)),void 0!==y&&b.addOp(a.OPS.beginMarkedContentProps,["OC",y]),b.addOp(a.OPS.beginAnnotation,[c.id,c.rect,m,p,h]),await e.getOperatorList({stream:l,task:t,resources:d,operatorList:b,fallbackFontDict:this._fallbackFontDict}),b.addOp(a.OPS.endAnnotation,[]),void 0!==y&&b.addOp(a.OPS.endMarkedContent,[]),this.reset(),{opList:b,separateForm:!1,separateCanvas:h}}async save(e,t,r){return null}get hasTextContent(){return!1}async extractTextContent(e,t,r){if(!this.appearance)return;const n=await this.loadResources(["ExtGState","Font","Properties","XObject"],this.appearance),i=[],s=[];let o=null;const c={desiredSize:Math.Infinity,ready:!0,enqueue(e,t){for(const t of e.items)void 0!==t.str&&(o||=t.transform.slice(-2),s.push(t.str),t.hasEOL&&(i.push(s.join("")),s.length=0))}};if(await e.getTextContent({stream:this.appearance,task:t,resources:n,includeMarkedContent:!0,sink:c,viewBox:r}),this.reset(),s.length&&i.push(s.join("")),i.length>1||i[0]){const e=this.appearance.dict,t=e.getArray("BBox")||[0,0,1,1],r=e.getArray("Matrix")||[1,0,0,1,0,0],n=this.data.rect,s=A(n,t,r);s[4]-=n[0],s[5]-=n[1],o=a.Util.applyTransform(o,s),o=a.Util.applyTransform(o,r),this.data.textPosition=o,this.data.textContent=i}}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 e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent"))return(0,a.warn)("Unknown field name, falling back to empty field name."),"";if(!e.has("Parent"))return(0,a.stringToPDFString)(e.get("T"));const t=[];e.has("T")&&t.unshift((0,a.stringToPDFString)(e.get("T")));let r=e;const n=new s.RefSet;for(e.objId&&n.put(e.objId);r.has("Parent")&&(r=r.get("Parent"),r instanceof s.Dict&&(!r.objId||!n.has(r.objId)));)r.objId&&n.put(r.objId),r.has("T")&&t.unshift((0,a.stringToPDFString)(r.get("T")));return t.join(".")}}t.Annotation=S;class x{constructor(){this.width=1,this.style=a.AnnotationBorderStyleType.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}setWidth(e,t=[0,0,0,0]){if(e instanceof s.Name)this.width=0;else if("number"==typeof e){if(e>0){const r=(t[2]-t[0])/2,n=(t[3]-t[1])/2;r>0&&n>0&&(e>r||e>n)&&((0,a.warn)(`AnnotationBorderStyle.setWidth - ignoring width: ${e}`),e=1)}this.width=e}}setStyle(e){if(e instanceof s.Name)switch(e.name){case"S":this.style=a.AnnotationBorderStyleType.SOLID;break;case"D":this.style=a.AnnotationBorderStyleType.DASHED;break;case"B":this.style=a.AnnotationBorderStyleType.BEVELED;break;case"I":this.style=a.AnnotationBorderStyleType.INSET;break;case"U":this.style=a.AnnotationBorderStyleType.UNDERLINE}}setDashArray(e,t=!1){if(Array.isArray(e)&&e.length>0){let r=!0,a=!0;for(const t of e){if(!(+t>=0)){r=!1;break}t>0&&(a=!1)}r&&!a?(this.dashArray=e,t&&this.setStyle(s.Name.get("D"))):this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadius=e)}}t.AnnotationBorderStyle=x;class k extends S{constructor(e){super(e);const{dict:t}=e;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=e instanceof s.Ref?e.toString():null;const r=t.get("RT");this.data.replyType=r instanceof s.Name?r.name:a.AnnotationReplyType.REPLY}let r=null;if(this.data.replyType===a.AnnotationReplyType.GROUP){const e=t.get("IRT");this.setTitle(e.get("T")),this.data.titleObj=this._title,this.setContents(e.get("Contents")),this.data.contentsObj=this._contents,e.has("CreationDate")?(this.setCreationDate(e.get("CreationDate")),this.data.creationDate=this.creationDate):this.data.creationDate=null,e.has("M")?(this.setModificationDate(e.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,r=e.getRaw("Popup"),e.has("C")?(this.setColor(e.getArray("C")),this.data.color=this.color):this.data.color=null}else this.data.titleObj=this._title,this.setCreationDate(t.get("CreationDate")),this.data.creationDate=this.creationDate,r=t.getRaw("Popup"),t.has("C")||(this.data.color=null);this.data.popupRef=r instanceof s.Ref?r.toString():null,t.has("RC")&&(this.data.richText=b.XFAFactory.getRichTextAsHtml(t.get("RC")))}setCreationDate(e){this.creationDate="string"==typeof e?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:r,fillColor:a,blendMode:n,strokeAlpha:i,fillAlpha:c,pointsCallback:l}){let h=Number.MAX_VALUE,u=Number.MAX_VALUE,d=Number.MIN_VALUE,f=Number.MIN_VALUE;const p=["q"];t&&p.push(t),r&&p.push(`${r[0]} ${r[1]} ${r[2]} RG`),a&&p.push(`${a[0]} ${a[1]} ${a[2]} rg`);let g=this.data.quadPoints;g||(g=[[{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 e of g){const[t,r,a,n]=l(p,e);h=Math.min(h,t),d=Math.max(d,r),u=Math.min(u,a),f=Math.max(f,n)}p.push("Q");const m=new s.Dict(e),b=new s.Dict(e);b.set("Subtype",s.Name.get("Form"));const y=new o.StringStream(p.join(" "));y.dict=b,m.set("Fm0",y);const v=new s.Dict(e);n&&v.set("BM",s.Name.get(n)),"number"==typeof i&&v.set("CA",i),"number"==typeof c&&v.set("ca",c);const w=new s.Dict(e);w.set("GS0",v);const A=new s.Dict(e);A.set("ExtGState",w),A.set("XObject",m);const S=new s.Dict(e);S.set("Resources",A);const x=this.data.rect=[h,u,d,f];S.set("BBox",x),this.appearance=new o.StringStream("/GS0 gs /Fm0 Do"),this.appearance.dict=S,this._streams.push(this.appearance,y)}static async createNewAnnotation(e,t,r,a){const n=t.ref||=e.getNewTemporaryRef(),i=await this.createNewAppearanceStream(t,e,a),s=[];let o;if(i){const a=e.getNewTemporaryRef();o=this.createNewDict(t,e,{apRef:a}),await(0,m.writeObject)(a,i,s,e),r.push({ref:a,data:s.join("")})}else o=this.createNewDict(t,e,{});return Number.isInteger(t.parentTreeId)&&o.set("StructParent",t.parentTreeId),s.length=0,await(0,m.writeObject)(n,o,s,e),{ref:n,data:s.join("")}}static async createNewPrintAnnotation(e,t,r,a){const n=await this.createNewAppearanceStream(r,t,a),i=this.createNewDict(r,t,{ap:n}),s=new this.prototype.constructor({dict:i,xref:t,annotationGlobals:e,evaluatorOptions:a.evaluatorOptions});return r.ref&&(s.ref=s.refToReplace=r.ref),s}}t.MarkupAnnotation=k;class C extends S{constructor(e){super(e);const{dict:t,xref:r,annotationGlobals:i}=e,o=this.data;this._needAppearances=e.needAppearances,o.annotationType=a.AnnotationType.WIDGET,void 0===o.fieldName&&(o.fieldName=this._constructFieldName(t)),void 0===o.actions&&(o.actions=(0,n.collectActions)(r,t,a.AnnotationActionEventType));let c=(0,n.getInheritableProperty)({dict:t,key:"V",getArray:!0});o.fieldValue=this._decodeFormValue(c);const l=(0,n.getInheritableProperty)({dict:t,key:"DV",getArray:!0});if(o.defaultFieldValue=this._decodeFormValue(l),void 0===c&&i.xfaDatasets){const e=this._title.str;e&&(this._hasValueFromXFA=!0,o.fieldValue=c=i.xfaDatasets.getValue(e))}void 0===c&&null!==o.defaultFieldValue&&(o.fieldValue=o.defaultFieldValue),o.alternativeText=(0,a.stringToPDFString)(t.get("TU")||""),this.setDefaultAppearance(e),o.hasAppearance||=this._needAppearances&&void 0!==o.fieldValue&&null!==o.fieldValue;const h=(0,n.getInheritableProperty)({dict:t,key:"FT"});o.fieldType=h instanceof s.Name?h.name:null;const u=(0,n.getInheritableProperty)({dict:t,key:"DR"}),d=i.acroForm.get("DR"),f=this.appearance?.dict.get("Resources");this._fieldResources={localResources:u,acroFormResources:d,appearanceResources:f,mergedResources:s.Dict.merge({xref:r,dictArray:[u,f,d],mergeSubDicts:!0})},o.fieldFlags=(0,n.getInheritableProperty)({dict:t,key:"Ff"}),(!Number.isInteger(o.fieldFlags)||o.fieldFlags<0)&&(o.fieldFlags=0),o.readOnly=this.hasFieldFlag(a.AnnotationFieldFlag.READONLY),o.required=this.hasFieldFlag(a.AnnotationFieldFlag.REQUIRED),o.hidden=this._hasFlag(o.annotationFlags,a.AnnotationFlag.HIDDEN)||this._hasFlag(o.annotationFlags,a.AnnotationFlag.NOVIEW)}_decodeFormValue(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).map((e=>(0,a.stringToPDFString)(e))):e instanceof s.Name?(0,a.stringToPDFString)(e.name):"string"==typeof e?(0,a.stringToPDFString)(e):null}hasFieldFlag(e){return!!(this.data.fieldFlags&e)}_isViewable(e){return!this._hasFlag(e,a.AnnotationFlag.INVISIBLE)}mustBeViewed(e,t){return t?this.viewable:super.mustBeViewed(e,t)&&!this._hasFlag(this.flags,a.AnnotationFlag.NOVIEW)}getRotationMatrix(e){let t=e?.get(this.data.id)?.rotation;if(void 0===t&&(t=this.rotation),0===t)return a.IDENTITY_MATRIX;const r=this.data.rect[2]-this.data.rect[0],i=this.data.rect[3]-this.data.rect[1];return(0,n.getRotationMatrix)(t,r,i)}getBorderAndBackgroundAppearances(e){let t=e?.get(this.data.id)?.rotation;if(void 0===t&&(t=this.rotation),!this.backgroundColor&&!this.borderColor)return"";const r=this.data.rect[2]-this.data.rect[0],a=this.data.rect[3]-this.data.rect[1],n=0===t||180===t?`0 0 ${r} ${a} re`:`0 0 ${a} ${r} re`;let s="";return this.backgroundColor&&(s=`${(0,i.getPdfColor)(this.backgroundColor,!0)} ${n} f `),this.borderColor&&(s+=`${this.borderStyle.width||1} w ${(0,i.getPdfColor)(this.borderColor,!1)} ${n} S `),s}async getOperatorList(e,t,r,n,i){if(n&&!(this instanceof O)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new g.OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(e,t,r,n,i);const s=await this._getAppearance(e,t,r,i);if(this.appearance&&null===s)return super.getOperatorList(e,t,r,n,i);const c=new g.OperatorList;if(!this._defaultAppearance||null===s)return{opList:c,separateForm:!1,separateCanvas:!1};const l=!!(this.data.hasOwnCanvas&&r&a.RenderingIntentFlag.DISPLAY),h=[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]],u=A(this.data.rect,h,[1,0,0,1,0,0]);let d;this.oc&&(d=await e.parseMarkedContentProps(this.oc,null)),void 0!==d&&c.addOp(a.OPS.beginMarkedContentProps,["OC",d]),c.addOp(a.OPS.beginAnnotation,[this.data.id,this.data.rect,u,this.getRotationMatrix(i),l]);const f=new o.StringStream(s);return await e.getOperatorList({stream:f,task:t,resources:this._fieldResources.mergedResources,operatorList:c}),c.addOp(a.OPS.endAnnotation,[]),void 0!==d&&c.addOp(a.OPS.endMarkedContent,[]),{opList:c,separateForm:!1,separateCanvas:l}}_getMKDict(e){const t=new s.Dict(null);return e&&t.set("R",e),this.borderColor&&t.set("BC",v(this.borderColor)),this.backgroundColor&&t.set("BG",v(this.backgroundColor)),t.size>0?t:null}amendSavedDict(e,t){}async save(e,t,r){const i=r?.get(this.data.id);let c=i?.value,l=i?.rotation;if(c===this.data.fieldValue||void 0===c){if(!this._hasValueFromXFA&&void 0===l)return null;c||=this.data.fieldValue}if(void 0===l&&!this._hasValueFromXFA&&Array.isArray(c)&&Array.isArray(this.data.fieldValue)&&c.length===this.data.fieldValue.length&&c.every(((e,t)=>e===this.data.fieldValue[t])))return null;void 0===l&&(l=this.rotation);let h=null;if(!this._needAppearances&&(h=await this._getAppearance(e,t,a.RenderingIntentFlag.SAVE,r),null===h))return null;let u=!1;h?.needAppearances&&(u=!0,h=null);const{xref:d}=e,f=d.fetchIfRef(this.ref);if(!(f instanceof s.Dict))return null;const p=new s.Dict(d);for(const e of f.getKeys())"AP"!==e&&p.set(e,f.getRaw(e));const g={path:this.data.fieldName,value:c},b=e=>(0,n.isAscii)(e)?e:(0,n.stringToUTF16String)(e,!0);p.set("V",Array.isArray(c)?c.map(b):b(c)),this.amendSavedDict(r,p);const y=this._getMKDict(l);y&&p.set("MK",y);const v=[],w=[{ref:this.ref,data:"",xfa:g,needAppearances:u}];if(null!==h){const e=d.getNewTemporaryRef(),t=new s.Dict(d);p.set("AP",t),t.set("N",e);const n=this._getSaveFieldResources(d),i=new o.StringStream(h),c=i.dict=new s.Dict(d);c.set("Subtype",s.Name.get("Form")),c.set("Resources",n),c.set("BBox",[0,0,this.data.rect[2]-this.data.rect[0],this.data.rect[3]-this.data.rect[1]]);const l=this.getRotationMatrix(r);l!==a.IDENTITY_MATRIX&&c.set("Matrix",l),await(0,m.writeObject)(e,i,v,d),w.push({ref:e,data:v.join(""),xfa:null,needAppearances:!1}),v.length=0}return p.set("M",`D:${(0,a.getModificationDate)()}`),await(0,m.writeObject)(this.ref,p,v,d),w[0].data=v.join(""),w}async _getAppearance(e,t,r,s){if(this.hasFieldFlag(a.AnnotationFieldFlag.PASSWORD))return null;const o=s?.get(this.data.id);let c,l;if(o&&(c=o.formattedValue||o.value,l=o.rotation),void 0===l&&void 0===c&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const h=this.getBorderAndBackgroundAppearances(s);if(void 0===c&&(c=this.data.fieldValue,!c))return`/Tx BMC q ${h}Q EMC`;if(Array.isArray(c)&&1===c.length&&(c=c[0]),(0,a.assert)("string"==typeof c,"Expected `value` to be a string."),c=c.trim(),this.data.combo){const e=this.data.options.find((({exportValue:e})=>c===e));c=e?.displayValue||c}if(""===c)return`/Tx BMC q ${h}Q EMC`;void 0===l&&(l=this.rotation);let u,d=-1;this.data.multiLine?(u=c.split(/\r\n?|\n/).map((e=>e.normalize("NFC"))),d=u.length):u=[c.replace(/\r\n?|\n/,"").normalize("NFC")];let f=this.data.rect[3]-this.data.rect[1],p=this.data.rect[2]-this.data.rect[0];90!==l&&270!==l||([p,f]=[f,p]),this._defaultAppearance||(this.data.defaultAppearanceData=(0,i.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let g,m,b,y=await C._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const v=[];let w=!1;for(const e of u){const t=y.encodeString(e);t.length>1&&(w=!0),v.push(t.join(""))}if(w&&r&a.RenderingIntentFlag.SAVE)return{needAppearances:!0};if(w&&this._isOffscreenCanvasSupported){const r=this.data.comb?"monospace":"sans-serif",a=new i.FakeUnicodeFont(e.xref,r),s=a.createFontResources(u.join("")),o=s.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const e=this._fieldResources.mergedResources.get("Font");for(const t of o.getKeys())e.set(t,o.getRaw(t))}else this._fieldResources.mergedResources.set("Font",o);const l=a.fontName.name;y=await C._getFontData(e,t,{fontName:l,fontSize:0},s);for(let e=0,t=v.length;e<t;e++)v[e]=(0,n.stringToUTF16String)(u[e]);const h=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0,this.data.defaultAppearanceData.fontName=l,[g,m,b]=this._computeFontSize(f-2,p-4,c,y,d),this.data.defaultAppearanceData=h}else this._isOffscreenCanvasSupported||(0,a.warn)("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."),[g,m,b]=this._computeFontSize(f-2,p-4,c,y,d);let A=y.descent;A=isNaN(A)?a.BASELINE_FACTOR*b:Math.max(a.BASELINE_FACTOR*b,Math.abs(A)*m);const S=Math.min(Math.floor((f-m)/2),1),x=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(g,v,y,m,p,f,x,2,S,A,b,s);if(this.data.comb)return this._getCombAppearance(g,y,v[0],m,p,f,2,S,A,b,s);const k=S+A;return 0===x||x>2?`/Tx BMC q ${h}BT `+g+` 1 0 0 1 ${(0,n.numberToString)(2)} ${(0,n.numberToString)(k)} Tm (${(0,n.escapeString)(v[0])}) Tj ET Q EMC`:`/Tx BMC q ${h}BT `+g+` 1 0 0 1 0 0 Tm ${this._renderText(v[0],y,m,p,x,{shift:0},2,k)} ET Q EMC`}static async _getFontData(e,t,r,a){const n=new g.OperatorList,i={font:null,clone(){return this}},{fontName:o,fontSize:c}=r;return await e.handleSetFont(a,[o&&s.Name.get(o),c],null,n,t,i,null),i.font}_getTextWidth(e,t){return t.charsToGlyphs(e).reduce(((e,t)=>e+t.width),0)/1e3}_computeFontSize(e,t,r,n,s){let{fontSize:o}=this.data.defaultAppearanceData,c=(o||12)*a.LINE_FACTOR,l=Math.round(e/c);if(!o){const h=e=>Math.floor(100*e)/100;if(-1===s){const i=this._getTextWidth(r,n);o=h(Math.min(e/a.LINE_FACTOR,i>t?t/i:1/0)),l=1}else{const i=r.split(/\r\n?|\n/),u=[];for(const e of i){const t=n.encodeString(e).join(""),r=n.charsToGlyphs(t),a=n.getCharPositions(t);u.push({line:t,glyphs:r,positions:a})}const d=r=>{let a=0;for(const i of u)if(a+=this._splitLine(null,n,r,t,i).length*r,a>e)return!0;return!1};for(l=Math.max(l,s);c=e/l,o=h(c/a.LINE_FACTOR),d(o);)l++}const{fontName:u,fontColor:d}=this.data.defaultAppearanceData;this._defaultAppearance=(0,i.createDefaultAppearance)({fontSize:o,fontName:u,fontColor:d})}return[this._defaultAppearance,o,e/l]}_renderText(e,t,r,a,i,s,o,c){let l;l=1===i?(a-this._getTextWidth(e,t)*r)/2:2===i?a-this._getTextWidth(e,t)*r-o:o;const h=(0,n.numberToString)(l-s.shift);return s.shift=l,`${h} ${c=(0,n.numberToString)(c)} Td (${(0,n.escapeString)(e)}) Tj`}_getSaveFieldResources(e){const{localResources:t,appearanceResources:r,acroFormResources:a}=this._fieldResources,n=this.data.defaultAppearanceData?.fontName;if(!n)return t||s.Dict.empty;for(const e of[t,r])if(e instanceof s.Dict){const t=e.get("Font");if(t instanceof s.Dict&&t.has(n))return e}if(a instanceof s.Dict){const r=a.get("Font");if(r instanceof s.Dict&&r.has(n)){const a=new s.Dict(e);a.set(n,r.getRaw(n));const i=new s.Dict(e);return i.set("Font",a),s.Dict.merge({xref:e,dictArray:[i,t],mergeSubDicts:!0})}}return t||s.Dict.empty}getFieldObject(){return null}}class _ extends C{constructor(e){super(e),this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML,this._hasText=!0;const t=e.dict;"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let r=(0,n.getInheritableProperty)({dict:t,key:"Q"});(!Number.isInteger(r)||r<0||r>2)&&(r=null),this.data.textAlignment=r;let i=(0,n.getInheritableProperty)({dict:t,key:"MaxLen"});(!Number.isInteger(i)||i<0)&&(i=0),this.data.maxLen=i,this.data.multiLine=this.hasFieldFlag(a.AnnotationFieldFlag.MULTILINE),this.data.comb=this.hasFieldFlag(a.AnnotationFieldFlag.COMB)&&!this.hasFieldFlag(a.AnnotationFieldFlag.MULTILINE)&&!this.hasFieldFlag(a.AnnotationFieldFlag.PASSWORD)&&!this.hasFieldFlag(a.AnnotationFieldFlag.FILESELECT)&&0!==this.data.maxLen,this.data.doNotScroll=this.hasFieldFlag(a.AnnotationFieldFlag.DONOTSCROLL)}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(e,t,r,a,i,s,o,c,l,h,u){const d=i/this.data.maxLen,f=this.getBorderAndBackgroundAppearances(u),p=[],g=t.getCharPositions(r);for(const[e,t]of g)p.push(`(${(0,n.escapeString)(r.substring(e,t))}) Tj`);const m=p.join(` ${(0,n.numberToString)(d)} 0 Td `);return`/Tx BMC q ${f}BT `+e+` 1 0 0 1 ${(0,n.numberToString)(o)} ${(0,n.numberToString)(c+l)} Tm ${m} ET Q EMC`}_getMultilineAppearance(e,t,r,a,i,s,o,c,l,h,u,d){const f=[],p=i-2*c,g={shift:0};for(let e=0,n=t.length;e<n;e++){const n=t[e],s=this._splitLine(n,r,a,p);for(let t=0,n=s.length;t<n;t++){const n=s[t],d=0===e&&0===t?-l-(u-h):-u;f.push(this._renderText(n,r,a,i,o,g,c,d))}}const m=this.getBorderAndBackgroundAppearances(d),b=f.join("\n");return`/Tx BMC q ${m}BT `+e+` 1 0 0 1 0 ${(0,n.numberToString)(s)} Tm ${b} ET Q EMC`}_splitLine(e,t,r,a,n={}){e=n.line||e;const i=n.glyphs||t.charsToGlyphs(e);if(i.length<=1)return[e];const s=n.positions||t.getCharPositions(e),o=r/1e3,c=[];let l=-1,h=-1,u=-1,d=0,f=0;for(let t=0,r=i.length;t<r;t++){const[r,n]=s[t],p=i[t],g=p.width*o;" "===p.unicode?f+g>a?(c.push(e.substring(d,r)),d=r,f=g,l=-1,u=-1):(f+=g,l=r,h=n,u=t):f+g>a?-1!==l?(c.push(e.substring(d,h)),d=h,t=u+1,l=-1,f=0):(c.push(e.substring(d,r)),d=r,f=g):f+=g}return d<e.length&&c.push(e.substring(d,e.length)),c}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.hasFieldFlag(a.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 T extends C{constructor(e){super(e),this.checkedAppearance=null,this.uncheckedAppearance=null,this.data.checkBox=!this.hasFieldFlag(a.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(a.AnnotationFieldFlag.PUSHBUTTON),this.data.radioButton=this.hasFieldFlag(a.AnnotationFieldFlag.RADIO)&&!this.hasFieldFlag(a.AnnotationFieldFlag.PUSHBUTTON),this.data.pushButton=this.hasFieldFlag(a.AnnotationFieldFlag.PUSHBUTTON),this.data.isTooltipOnly=!1,this.data.checkBox?this._processCheckBox(e):this.data.radioButton?this._processRadioButton(e):this.data.pushButton?(this.data.hasOwnCanvas=!0,this._processPushButton(e)):(0,a.warn)("Invalid field flags for button widget annotation")}async getOperatorList(e,t,r,n,i){if(this.data.pushButton)return super.getOperatorList(e,t,r,!1,i);let s=null,o=null;if(i){const e=i.get(this.data.id);s=e?e.value:null,o=e?e.rotation:null}if(null===s&&this.appearance)return super.getOperatorList(e,t,r,n,i);null==s&&(s=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);const c=s?this.checkedAppearance:this.uncheckedAppearance;if(c){const s=this.appearance,l=c.dict.getArray("Matrix")||a.IDENTITY_MATRIX;o&&c.dict.set("Matrix",this.getRotationMatrix(i)),this.appearance=c;const h=super.getOperatorList(e,t,r,n,i);return this.appearance=s,c.dict.set("Matrix",l),h}return{opList:new g.OperatorList,separateForm:!1,separateCanvas:!1}}async save(e,t,r){return this.data.checkBox?this._saveCheckbox(e,t,r):this.data.radioButton?this._saveRadioButton(e,t,r):null}async _saveCheckbox(e,t,r){if(!r)return null;const n=r.get(this.data.id);let i=n?.rotation,o=n?.value;if(void 0===i){if(void 0===o)return null;if(this.data.fieldValue===this.data.exportValue===o)return null}const c=e.xref.fetchIfRef(this.ref);if(!(c instanceof s.Dict))return null;void 0===i&&(i=this.rotation),void 0===o&&(o=this.data.fieldValue===this.data.exportValue);const l={path:this.data.fieldName,value:o?this.data.exportValue:""},h=s.Name.get(o?this.data.exportValue:"Off");c.set("V",h),c.set("AS",h),c.set("M",`D:${(0,a.getModificationDate)()}`);const u=this._getMKDict(i);u&&c.set("MK",u);const d=[];return await(0,m.writeObject)(this.ref,c,d,e.xref),[{ref:this.ref,data:d.join(""),xfa:l}]}async _saveRadioButton(e,t,r){if(!r)return null;const n=r.get(this.data.id);let i=n?.rotation,o=n?.value;if(void 0===i){if(void 0===o)return null;if(this.data.fieldValue===this.data.buttonValue===o)return null}const c=e.xref.fetchIfRef(this.ref);if(!(c instanceof s.Dict))return null;void 0===o&&(o=this.data.fieldValue===this.data.buttonValue),void 0===i&&(i=this.rotation);const l={path:this.data.fieldName,value:o?this.data.buttonValue:""},h=s.Name.get(o?this.data.buttonValue:"Off"),u=[];let d=null;if(o)if(this.parent instanceof s.Ref){const t=e.xref.fetch(this.parent);t.set("V",h),await(0,m.writeObject)(this.parent,t,u,e.xref),d=u.join(""),u.length=0}else this.parent instanceof s.Dict&&this.parent.set("V",h);c.set("AS",h),c.set("M",`D:${(0,a.getModificationDate)()}`);const f=this._getMKDict(i);f&&c.set("MK",f),await(0,m.writeObject)(this.ref,c,u,e.xref);const p=[{ref:this.ref,data:u.join(""),xfa:l}];return d&&p.push({ref:this.parent,data:d,xfa:null}),p}_getDefaultCheckedAppearance(e,t){const r=this.data.rect[2]-this.data.rect[0],i=this.data.rect[3]-this.data.rect[1],c=[0,0,r,i],l=.8*Math.min(r,i);let h,u;"check"===t?(h={width:.755*l,height:.705*l},u="3"):"disc"===t?(h={width:.791*l,height:.705*l},u="l"):(0,a.unreachable)(`_getDefaultCheckedAppearance - unsupported type: ${t}`);const d=`q BT /PdfJsZaDb ${l} Tf 0 g ${(0,n.numberToString)((r-h.width)/2)} ${(0,n.numberToString)((i-h.height)/2)} Td (${u}) Tj ET Q`,f=new s.Dict(e.xref);f.set("FormType",1),f.set("Subtype",s.Name.get("Form")),f.set("Type",s.Name.get("XObject")),f.set("BBox",c),f.set("Matrix",[1,0,0,1,0,0]),f.set("Length",d.length);const p=new s.Dict(e.xref),g=new s.Dict(e.xref);g.set("PdfJsZaDb",this.fallbackFontDict),p.set("Font",g),f.set("Resources",p),this.checkedAppearance=new o.StringStream(d),this.checkedAppearance.dict=f,this._streams.push(this.checkedAppearance)}_processCheckBox(e){const t=e.dict.get("AP");if(!(t instanceof s.Dict))return;const r=t.get("N");if(!(r instanceof s.Dict))return;const a=this._decodeFormValue(e.dict.get("AS"));"string"==typeof a&&(this.data.fieldValue=a);const n=null!==this.data.fieldValue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",i=r.getKeys();if(0===i.length)i.push("Off",n);else if(1===i.length)"Off"===i[0]?i.push(n):i.unshift("Off");else if(i.includes(n))i.length=0,i.push("Off",n);else{const e=i.find((e=>"Off"!==e));i.length=0,i.push("Off",e)}i.includes(this.data.fieldValue)||(this.data.fieldValue="Off"),this.data.exportValue=i[1];const o=r.get(this.data.exportValue);this.checkedAppearance=o instanceof c.BaseStream?o:null;const l=r.get("Off");this.uncheckedAppearance=l instanceof c.BaseStream?l:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(e){this.data.fieldValue=this.data.buttonValue=null;const t=e.dict.get("Parent");if(t instanceof s.Dict){this.parent=e.dict.getRaw("Parent");const r=t.get("V");r instanceof s.Name&&(this.data.fieldValue=this._decodeFormValue(r))}const r=e.dict.get("AP");if(!(r instanceof s.Dict))return;const a=r.get("N");if(!(a instanceof s.Dict))return;for(const e of a.getKeys())if("Off"!==e){this.data.buttonValue=this._decodeFormValue(e);break}const n=a.get(this.data.buttonValue);this.checkedAppearance=n instanceof c.BaseStream?n:null;const i=a.get("Off");this.uncheckedAppearance=i instanceof c.BaseStream?i:null,this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"disc"),this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance),this._fallbackFontDict=this.fallbackFontDict,null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(e){const{dict:t,annotationGlobals:r}=e;t.has("A")||t.has("AA")||this.data.alternativeText?(this.data.isTooltipOnly=!t.has("A")&&!t.has("AA"),h.Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:r.baseUrl,docAttachments:r.attachments})):(0,a.warn)("Push buttons without action dictionaries are not supported")}getFieldObject(){let e,t="button";return this.data.checkBox?(t="checkbox",e=this.data.exportValue):this.data.radioButton&&(t="radiobutton",e=this.data.buttonValue),{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,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:t}}get fallbackFontDict(){const e=new s.Dict;return e.set("BaseFont",s.Name.get("ZapfDingbats")),e.set("Type",s.Name.get("FallbackType")),e.set("Subtype",s.Name.get("FallbackType")),e.set("Encoding",s.Name.get("ZapfDingbatsEncoding")),(0,a.shadow)(this,"fallbackFontDict",e)}}class E extends C{constructor(e){super(e);const{dict:t,xref:r}=e;this.indices=t.getArray("I"),this.hasIndices=Array.isArray(this.indices)&&this.indices.length>0,this.data.options=[];const i=(0,n.getInheritableProperty)({dict:t,key:"Opt"});if(Array.isArray(i))for(let e=0,t=i.length;e<t;e++){const t=r.fetchIfRef(i[e]),a=Array.isArray(t);this.data.options[e]={exportValue:this._decodeFormValue(a?r.fetchIfRef(t[0]):t),displayValue:this._decodeFormValue(a?r.fetchIfRef(t[1]):t)}}if(this.hasIndices){this.data.fieldValue=[];const e=this.data.options.length;for(const t of this.indices)Number.isInteger(t)&&t>=0&&t<e&&this.data.fieldValue.push(this.data.options[t].exportValue)}else"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||(this.data.fieldValue=[]);this.data.combo=this.hasFieldFlag(a.AnnotationFieldFlag.COMBO),this.data.multiSelect=this.hasFieldFlag(a.AnnotationFieldFlag.MULTISELECT),this._hasText=!0}getFieldObject(){const e=this.data.combo?"combobox":"listbox",t=this.data.fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,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:e}}amendSavedDict(e,t){if(!this.hasIndices)return;let r=e?.get(this.data.id)?.value;Array.isArray(r)||(r=[r]);const a=[],{options:n}=this.data;for(let e=0,t=0,i=n.length;e<i;e++)n[e].exportValue===r[t]&&(a.push(e),t+=1);t.set("I",a)}async _getAppearance(e,t,r,n){if(this.data.combo)return super._getAppearance(e,t,r,n);let s,o;const c=n?.get(this.data.id);if(c&&(o=c.rotation,s=c.value),void 0===o&&void 0===s&&!this._needAppearances)return null;void 0===s?s=this.data.fieldValue:Array.isArray(s)||(s=[s]);let l=this.data.rect[3]-this.data.rect[1],h=this.data.rect[2]-this.data.rect[0];90!==o&&270!==o||([h,l]=[l,h]);const u=this.data.options.length,d=[];for(let e=0;e<u;e++){const{exportValue:t}=this.data.options[e];s.includes(t)&&d.push(e)}this._defaultAppearance||(this.data.defaultAppearanceData=(0,i.parseDefaultAppearance)(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const f=await C._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let p,{fontSize:g}=this.data.defaultAppearanceData;if(g)p=this._defaultAppearance;else{const e=(l-1)/u;let t,r=-1;for(const{displayValue:e}of this.data.options){const a=this._getTextWidth(e,f);a>r&&(r=a,t=e)}[p,g]=this._computeFontSize(e,h-4,t,f,-1)}const m=g*a.LINE_FACTOR,b=(m-g)/2,y=Math.floor(l/m);let v=0;if(d.length>0){const e=Math.min(...d),t=Math.max(...d);v=Math.max(0,t-y+1),v>e&&(v=e)}const w=Math.min(v+y+1,u),A=["/Tx BMC q",`1 1 ${h} ${l} re W n`];if(d.length){A.push("0.600006 0.756866 0.854904 rg");for(const e of d)v<=e&&e<w&&A.push(`1 ${l-(e-v+1)*m} ${h} ${m} re f`)}A.push("BT",p,`1 0 0 1 0 ${l} Tm`);const S={shift:0};for(let e=v;e<w;e++){const{displayValue:t}=this.data.options[e],r=e===v?b:0;A.push(this._renderText(t,f,g,h,0,S,2,-m+r))}return A.push("ET Q EMC"),A.join("\n")}}class O extends C{constructor(e){super(e),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 F extends k{constructor(e){super(e),this.data.noRotate=!0,this.data.hasOwnCanvas=this.data.noRotate;const{dict:t}=e;this.data.annotationType=a.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=t.has("Name")?t.get("Name").name:"Note"),t.has("State")?(this.data.state=t.get("State")||null,this.data.stateModel=t.get("StateModel")||null):(this.data.state=null,this.data.stateModel=null)}}class P extends S{constructor(e){super(e);const{dict:t,annotationGlobals:r}=e;this.data.annotationType=a.AnnotationType.LINK;const n=w(t,this.rectangle);n&&(this.data.quadPoints=n),this.data.borderColor||=this.data.color,h.Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:r.baseUrl,docAttachments:r.attachments})}}class I extends S{constructor(e){super(e);const{dict:t}=e;this.data.annotationType=a.AnnotationType.POPUP,this.data.rect[0]!==this.data.rect[2]&&this.data.rect[1]!==this.data.rect[3]||(this.data.rect=null);let r=t.get("Parent");if(!r)return void(0,a.warn)("Popup annotation has a missing or invalid parent annotation.");const n=r.getArray("Rect");this.data.parentRect=Array.isArray(n)&&4===n.length?a.Util.normalizeRect(n):null;const i=r.get("RT");if((0,s.isName)(i,a.AnnotationReplyType.GROUP)&&(r=r.get("IRT")),r.has("M")?(this.setModificationDate(r.get("M")),this.data.modificationDate=this.modificationDate):this.data.modificationDate=null,r.has("C")?(this.setColor(r.getArray("C")),this.data.color=this.color):this.data.color=null,!this.viewable){const e=r.get("F");this._isViewable(e)&&this.setFlags(e)}this.setTitle(r.get("T")),this.data.titleObj=this._title,this.setContents(r.get("Contents")),this.data.contentsObj=this._contents,r.has("RC")&&(this.data.richText=b.XFAFactory.getRichTextAsHtml(r.get("RC"))),this.data.open=!!t.get("Open")}}t.PopupAnnotation=I;class M extends k{constructor(e){super(e),this.data.hasOwnCanvas=!0;const{evaluatorOptions:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.FREETEXT,this.setDefaultAppearance(e),this.appearance){const{fontColor:e,fontSize:a}=(0,i.parseAppearanceStream)(this.appearance,t,r);this.data.defaultAppearanceData.fontColor=e,this.data.defaultAppearanceData.fontSize=a||10}else if(this._isOffscreenCanvasSupported){const t=e.dict.get("CA"),a=new i.FakeUnicodeFont(r,"sans-serif");this.data.defaultAppearanceData.fontSize||=10;const{fontColor:n,fontSize:s}=this.data.defaultAppearanceData;this.appearance=a.createAppearance(this._contents.str,this.rectangle,this.rotation,s,n,t),this._streams.push(this.appearance,i.FakeUnicodeFont.toUnicodeStream)}else(0,a.warn)("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly.")}get hasTextContent(){return!!this.appearance}static createNewDict(e,t,{apRef:r,ap:o}){const{color:c,fontSize:l,rect:h,rotation:u,user:d,value:f}=e,p=new s.Dict(t);p.set("Type",s.Name.get("Annot")),p.set("Subtype",s.Name.get("FreeText")),p.set("CreationDate",`D:${(0,a.getModificationDate)()}`),p.set("Rect",h);const g=`/Helv ${l} Tf ${(0,i.getPdfColor)(c,!0)}`;if(p.set("DA",g),p.set("Contents",(0,n.isAscii)(f)?f:(0,n.stringToUTF16String)(f,!0)),p.set("F",4),p.set("Border",[0,0,0]),p.set("Rotate",u),d&&p.set("T",(0,n.isAscii)(d)?d:(0,n.stringToUTF16String)(d,!0)),r||o){const e=new s.Dict(t);p.set("AP",e),r?e.set("N",r):e.set("N",o)}return p}static async createNewAppearanceStream(e,t,r){const{baseFontRef:c,evaluator:l,task:h}=r,{color:u,fontSize:d,rect:f,rotation:p,value:g}=e,m=new s.Dict(t),b=new s.Dict(t);if(c)b.set("Helv",c);else{const e=new s.Dict(t);e.set("BaseFont",s.Name.get("Helvetica")),e.set("Type",s.Name.get("Font")),e.set("Subtype",s.Name.get("Type1")),e.set("Encoding",s.Name.get("WinAnsiEncoding")),b.set("Helv",e)}m.set("Font",b);const y=await C._getFontData(l,h,{fontName:"Helv",fontSize:d},m),[v,w,A,S]=f;let x=A-v,k=S-w;p%180!=0&&([x,k]=[k,x]);const _=g.split("\n"),T=d/1e3;let E=-1/0;const O=[];for(let e of _){const t=y.encodeString(e);if(t.length>1)return null;e=t.join(""),O.push(e);let r=0;const a=y.charsToGlyphs(e);for(const e of a)r+=e.width*T;E=Math.max(E,r)}let F=1;E>x&&(F=x/E);let P=1;const I=a.LINE_FACTOR*d,M=(a.LINE_FACTOR-a.LINE_DESCENT_FACTOR)*d,R=I*_.length;R>k&&(P=k/R);const D=d*Math.min(F,P);let N,L,B;switch(p){case 0:B=[1,0,0,1],L=[f[0],f[1],x,k],N=[f[0],f[3]-M];break;case 90:B=[0,1,-1,0],L=[f[1],-f[2],x,k],N=[f[1],-f[0]-M];break;case 180:B=[-1,0,0,-1],L=[-f[2],-f[3],x,k],N=[-f[2],-f[1]-M];break;case 270:B=[0,-1,1,0],L=[-f[3],f[0],x,k],N=[-f[3],f[2]-M]}const j=["q",`${B.join(" ")} 0 0 cm`,`${L.join(" ")} re W n`,"BT",`${(0,i.getPdfColor)(u,!0)}`,`0 Tc /Helv ${(0,n.numberToString)(D)} Tf`];j.push(`${N.join(" ")} Td (${(0,n.escapeString)(O[0])}) Tj`);const $=(0,n.numberToString)(I);for(let e=1,t=O.length;e<t;e++){const t=O[e];j.push(`0 -${$} Td (${(0,n.escapeString)(t)}) Tj`)}j.push("ET","Q");const U=j.join("\n"),z=new s.Dict(t);z.set("FormType",1),z.set("Subtype",s.Name.get("Form")),z.set("Type",s.Name.get("XObject")),z.set("BBox",f),z.set("Resources",m),z.set("Matrix",[1,0,0,1,-f[0],-f[1]]);const H=new o.StringStream(U);return H.dict=z,H}}class R extends k{constructor(e){super(e);const{dict:t,xref:r}=e;this.data.annotationType=a.AnnotationType.LINE,this.data.hasOwnCanvas=this.data.noRotate;const n=t.getArray("L");if(this.data.lineCoordinates=a.Util.normalizeRect(n),this.setLineEndings(t.getArray("LE")),this.data.lineEndings=this.lineEndings,!this.appearance){const e=this.color?v(this.color):[0,0,0],i=t.get("CA"),s=y(t.getArray("IC"),null),o=s?v(s):null,c=o?i:null,l=this.borderStyle.width||1,h=2*l,u=[this.data.lineCoordinates[0]-h,this.data.lineCoordinates[1]-h,this.data.lineCoordinates[2]+h,this.data.lineCoordinates[3]+h];a.Util.intersect(this.rectangle,u)||(this.rectangle=u),this._setDefaultAppearance({xref:r,extra:`${l} w`,strokeColor:e,fillColor:o,strokeAlpha:i,fillAlpha:c,pointsCallback:(e,t)=>(e.push(`${n[0]} ${n[1]} m`,`${n[2]} ${n[3]} l`,"S"),[t[0].x-l,t[1].x+l,t[3].y-l,t[1].y+l])})}}}class D extends k{constructor(e){super(e);const{dict:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.SQUARE,this.data.hasOwnCanvas=this.data.noRotate,!this.appearance){const e=this.color?v(this.color):[0,0,0],a=t.get("CA"),n=y(t.getArray("IC"),null),i=n?v(n):null,s=i?a:null;if(0===this.borderStyle.width&&!i)return;this._setDefaultAppearance({xref:r,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:i,strokeAlpha:a,fillAlpha:s,pointsCallback:(e,t)=>{const r=t[2].x+this.borderStyle.width/2,a=t[2].y+this.borderStyle.width/2,n=t[3].x-t[2].x-this.borderStyle.width,s=t[1].y-t[3].y-this.borderStyle.width;return e.push(`${r} ${a} ${n} ${s} re`),i?e.push("B"):e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}class N extends k{constructor(e){super(e);const{dict:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.CIRCLE,!this.appearance){const e=this.color?v(this.color):[0,0,0],a=t.get("CA"),n=y(t.getArray("IC"),null),i=n?v(n):null,s=i?a:null;if(0===this.borderStyle.width&&!i)return;const o=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:r,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:i,strokeAlpha:a,fillAlpha:s,pointsCallback:(e,t)=>{const r=t[0].x+this.borderStyle.width/2,a=t[0].y-this.borderStyle.width/2,n=t[3].x-this.borderStyle.width/2,s=t[3].y+this.borderStyle.width/2,c=r+(n-r)/2,l=a+(s-a)/2,h=(n-r)/2*o,u=(s-a)/2*o;return e.push(`${c} ${s} m`,`${c+h} ${s} ${n} ${l+u} ${n} ${l} c`,`${n} ${l-u} ${c+h} ${a} ${c} ${a} c`,`${c-h} ${a} ${r} ${l-u} ${r} ${l} c`,`${r} ${l+u} ${c-h} ${s} ${c} ${s} c`,"h"),i?e.push("B"):e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}class L extends k{constructor(e){super(e);const{dict:t,xref:r}=e;this.data.annotationType=a.AnnotationType.POLYLINE,this.data.hasOwnCanvas=this.data.noRotate,this.data.vertices=[],this instanceof B||(this.setLineEndings(t.getArray("LE")),this.data.lineEndings=this.lineEndings);const n=t.getArray("Vertices");if(Array.isArray(n)){for(let e=0,t=n.length;e<t;e+=2)this.data.vertices.push({x:n[e],y:n[e+1]});if(!this.appearance){const e=this.color?v(this.color):[0,0,0],n=t.get("CA"),i=this.borderStyle.width||1,s=2*i,o=[1/0,1/0,-1/0,-1/0];for(const e of this.data.vertices)o[0]=Math.min(o[0],e.x-s),o[1]=Math.min(o[1],e.y-s),o[2]=Math.max(o[2],e.x+s),o[3]=Math.max(o[3],e.y+s);a.Util.intersect(this.rectangle,o)||(this.rectangle=o),this._setDefaultAppearance({xref:r,extra:`${i} w`,strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>{const r=this.data.vertices;for(let t=0,a=r.length;t<a;t++)e.push(`${r[t].x} ${r[t].y} ${0===t?"m":"l"}`);return e.push("S"),[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}}class B extends L{constructor(e){super(e),this.data.annotationType=a.AnnotationType.POLYGON}}class j extends k{constructor(e){super(e),this.data.annotationType=a.AnnotationType.CARET}}class $ extends k{constructor(e){super(e),this.data.hasOwnCanvas=this.data.noRotate;const{dict:t,xref:r}=e;this.data.annotationType=a.AnnotationType.INK,this.data.inkLists=[];const n=t.getArray("InkList");if(Array.isArray(n)){for(let e=0,t=n.length;e<t;++e){this.data.inkLists.push([]);for(let t=0,a=n[e].length;t<a;t+=2)this.data.inkLists[e].push({x:r.fetchIfRef(n[e][t]),y:r.fetchIfRef(n[e][t+1])})}if(!this.appearance){const e=this.color?v(this.color):[0,0,0],n=t.get("CA"),i=this.borderStyle.width||1,s=2*i,o=[1/0,1/0,-1/0,-1/0];for(const e of this.data.inkLists)for(const t of e)o[0]=Math.min(o[0],t.x-s),o[1]=Math.min(o[1],t.y-s),o[2]=Math.max(o[2],t.x+s),o[3]=Math.max(o[3],t.y+s);a.Util.intersect(this.rectangle,o)||(this.rectangle=o),this._setDefaultAppearance({xref:r,extra:`${i} w`,strokeColor:e,strokeAlpha:n,pointsCallback:(e,t)=>{for(const t of this.data.inkLists){for(let r=0,a=t.length;r<a;r++)e.push(`${t[r].x} ${t[r].y} ${0===r?"m":"l"}`);e.push("S")}return[t[0].x,t[1].x,t[3].y,t[1].y]}})}}}static createNewDict(e,t,{apRef:r,ap:n}){const{color:i,opacity:o,paths:c,rect:l,rotation:h,thickness:u}=e,d=new s.Dict(t);d.set("Type",s.Name.get("Annot")),d.set("Subtype",s.Name.get("Ink")),d.set("CreationDate",`D:${(0,a.getModificationDate)()}`),d.set("Rect",l),d.set("InkList",c.map((e=>e.points))),d.set("F",4),d.set("Rotate",h);const f=new s.Dict(t);d.set("BS",f),f.set("W",u),d.set("C",Array.from(i,(e=>e/255))),d.set("CA",o);const p=new s.Dict(t);return d.set("AP",p),r?p.set("N",r):p.set("N",n),d}static async createNewAppearanceStream(e,t,r){const{color:a,rect:c,paths:l,thickness:h,opacity:u}=e,d=[`${h} w 1 J 1 j`,`${(0,i.getPdfColor)(a,!1)}`];1!==u&&d.push("/R0 gs");const f=[];for(const{bezier:e}of l){f.length=0,f.push(`${(0,n.numberToString)(e[0])} ${(0,n.numberToString)(e[1])} m`);for(let t=2,r=e.length;t<r;t+=6){const r=e.slice(t,t+6).map(n.numberToString).join(" ");f.push(`${r} c`)}f.push("S"),d.push(f.join("\n"))}const p=d.join("\n"),g=new s.Dict(t);if(g.set("FormType",1),g.set("Subtype",s.Name.get("Form")),g.set("Type",s.Name.get("XObject")),g.set("BBox",c),g.set("Length",p.length),1!==u){const e=new s.Dict(t),r=new s.Dict(t),a=new s.Dict(t);a.set("CA",u),a.set("Type",s.Name.get("ExtGState")),r.set("R0",a),e.set("ExtGState",r),g.set("Resources",e)}const m=new o.StringStream(p);return m.dict=g,m}}class U extends k{constructor(e){super(e);const{dict:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.HIGHLIGHT,this.data.quadPoints=w(t,null)){const e=this.appearance?.dict.get("Resources");if(!this.appearance||!e?.has("ExtGState")){this.appearance&&(0,a.warn)("HighlightAnnotation - ignoring built-in appearance stream.");const e=this.color?v(this.color):[1,1,0],n=t.get("CA");this._setDefaultAppearance({xref:r,fillColor:e,blendMode:"Multiply",fillAlpha:n,pointsCallback:(e,t)=>(e.push(`${t[0].x} ${t[0].y} m`,`${t[1].x} ${t[1].y} l`,`${t[3].x} ${t[3].y} l`,`${t[2].x} ${t[2].y} l`,"f"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}else this.data.popupRef=null}}class z extends k{constructor(e){super(e);const{dict:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.UNDERLINE,this.data.quadPoints=w(t,null)){if(!this.appearance){const e=this.color?v(this.color):[0,0,0],a=t.get("CA");this._setDefaultAppearance({xref:r,extra:"[] 0 d 0.571 w",strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>(e.push(`${t[2].x} ${t[2].y+1.3} m`,`${t[3].x} ${t[3].y+1.3} l`,"S"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}else this.data.popupRef=null}}class H extends k{constructor(e){super(e);const{dict:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.SQUIGGLY,this.data.quadPoints=w(t,null)){if(!this.appearance){const e=this.color?v(this.color):[0,0,0],a=t.get("CA");this._setDefaultAppearance({xref:r,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>{const r=(t[0].y-t[2].y)/6;let a=r,n=t[2].x;const i=t[2].y,s=t[3].x;e.push(`${n} ${i+a} m`);do{n+=2,a=0===a?r:0,e.push(`${n} ${i+a} l`)}while(n<s);return e.push("S"),[t[2].x,s,i-2*r,i+2*r]}})}}else this.data.popupRef=null}}class X extends k{constructor(e){super(e);const{dict:t,xref:r}=e;if(this.data.annotationType=a.AnnotationType.STRIKEOUT,this.data.quadPoints=w(t,null)){if(!this.appearance){const e=this.color?v(this.color):[0,0,0],a=t.get("CA");this._setDefaultAppearance({xref:r,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:a,pointsCallback:(e,t)=>(e.push((t[0].x+t[2].x)/2+" "+(t[0].y+t[2].y)/2+" m",(t[1].x+t[3].x)/2+" "+(t[1].y+t[3].y)/2+" l","S"),[t[0].x,t[1].x,t[3].y,t[1].y])})}}else this.data.popupRef=null}}class W extends k{constructor(e){super(e),this.data.annotationType=a.AnnotationType.STAMP,this.data.hasOwnCanvas=this.data.noRotate}static async createImage(e,t){const{width:r,height:n}=e,i=new OffscreenCanvas(r,n),c=i.getContext("2d",{alpha:!0});c.drawImage(e,0,0);const l=c.getImageData(0,0,r,n).data,h=new Uint32Array(l.buffer),u=h.some(a.FeatureTest.isLittleEndian?e=>e>>>24!=255:e=>!!(255&~e));u&&(c.fillStyle="white",c.fillRect(0,0,r,n),c.drawImage(e,0,0));const d=i.convertToBlob({type:"image/jpeg",quality:1}).then((e=>e.arrayBuffer())),f=s.Name.get("XObject"),p=s.Name.get("Image"),g=new s.Dict(t);g.set("Type",f),g.set("Subtype",p),g.set("BitsPerComponent",8),g.set("ColorSpace",s.Name.get("DeviceRGB")),g.set("Filter",s.Name.get("DCTDecode")),g.set("BBox",[0,0,r,n]),g.set("Width",r),g.set("Height",n);let m=null;if(u){const e=new Uint8Array(h.length);if(a.FeatureTest.isLittleEndian)for(let t=0,r=h.length;t<r;t++)e[t]=h[t]>>>24;else for(let t=0,r=h.length;t<r;t++)e[t]=255&h[t];const i=new s.Dict(t);i.set("Type",f),i.set("Subtype",p),i.set("BitsPerComponent",8),i.set("ColorSpace",s.Name.get("DeviceGray")),i.set("Width",r),i.set("Height",n),m=new o.Stream(e,0,0,i)}return{imageStream:new o.Stream(await d,0,0,g),smaskStream:m,width:r,height:n}}static createNewDict(e,t,{apRef:r,ap:i}){const{rect:o,rotation:c,user:l}=e,h=new s.Dict(t);if(h.set("Type",s.Name.get("Annot")),h.set("Subtype",s.Name.get("Stamp")),h.set("CreationDate",`D:${(0,a.getModificationDate)()}`),h.set("Rect",o),h.set("F",4),h.set("Border",[0,0,0]),h.set("Rotate",c),l&&h.set("T",(0,n.isAscii)(l)?l:(0,n.stringToUTF16String)(l,!0)),r||i){const e=new s.Dict(t);h.set("AP",e),r?e.set("N",r):e.set("N",i)}return h}static async createNewAppearanceStream(e,t,r){const{rotation:a}=e,{imageRef:i,width:c,height:l}=r.image,h=new s.Dict(t),u=new s.Dict(t);h.set("XObject",u),u.set("Im0",i);const d=`q ${c} 0 0 ${l} 0 0 cm /Im0 Do Q`,f=new s.Dict(t);if(f.set("FormType",1),f.set("Subtype",s.Name.get("Form")),f.set("Type",s.Name.get("XObject")),f.set("BBox",[0,0,c,l]),f.set("Resources",h),a){const e=(0,n.getRotationMatrix)(a,c,l);f.set("Matrix",e)}const p=new o.StringStream(d);return p.dict=f,p}}class G extends k{constructor(e){super(e);const{dict:t,xref:r}=e,n=new d.FileSpec(t.get("FS"),r);this.data.annotationType=a.AnnotationType.FILEATTACHMENT,this.data.hasOwnCanvas=this.data.noRotate,this.data.file=n.serializable;const i=t.get("Name");this.data.name=i instanceof s.Name?(0,a.stringToPDFString)(i.name):"PushPin";const o=t.get("ca");this.data.fillAlpha="number"==typeof o&&o>=0&&o<=1?o:null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FakeUnicodeFont=void 0,t.createDefaultAppearance=function({fontSize:e,fontName:t,fontColor:r}){return`/${(0,n.escapePDFName)(t)} ${e} Tf ${f(r,!0)}`},t.getPdfColor=f,t.parseAppearanceStream=function(e,t,r){return new d(e,t,r).parse()},t.parseDefaultAppearance=function(e){return new u(e).parse()};var a=r(4),n=r(3),i=r(2),s=r(12),o=r(13),c=r(59),l=r(57),h=r(8);class u extends o.EvaluatorPreprocessor{constructor(e){super(new h.StringStream(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;e.args.length=0,this.read(e);){if(0!==this.savedStatesDepth)continue;const{fn:r,args:n}=e;switch(0|r){case i.OPS.setFont:const[e,r]=n;e instanceof a.Name&&(t.fontName=e.name),"number"==typeof r&&r>0&&(t.fontSize=r);break;case i.OPS.setFillRGBColor:s.ColorSpace.singletons.rgb.getRgbItem(n,0,t.fontColor,0);break;case i.OPS.setFillGray:s.ColorSpace.singletons.gray.getRgbItem(n,0,t.fontColor,0);break;case i.OPS.setFillCMYKColor:s.ColorSpace.singletons.cmyk.getRgbItem(n,0,t.fontColor,0)}}}catch(e){(0,i.warn)(`parseDefaultAppearance - ignoring errors: "${e}".`)}return t}}class d extends o.EvaluatorPreprocessor{constructor(e,t,r){super(e),this.stream=e,this.evaluatorOptions=t,this.xref=r,this.resources=e.dict?.get("Resources")}parse(){const e={fn:0,args:[]};let t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:s.ColorSpace.singletons.gray},r=!1;const n=[];try{for(;e.args.length=0,!r&&this.read(e);){const{fn:o,args:c}=e;switch(0|o){case i.OPS.save:n.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case i.OPS.restore:t=n.pop()||t;break;case i.OPS.setTextMatrix:t.scaleFactor*=Math.hypot(c[0],c[1]);break;case i.OPS.setFont:const[e,o]=c;e instanceof a.Name&&(t.fontName=e.name),"number"==typeof o&&o>0&&(t.fontSize=o*t.scaleFactor);break;case i.OPS.setFillColorSpace:t.fillColorSpace=s.ColorSpace.parse({cs:c[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:this._localColorSpaceCache});break;case i.OPS.setFillColor:t.fillColorSpace.getRgbItem(c,0,t.fontColor,0);break;case i.OPS.setFillRGBColor:s.ColorSpace.singletons.rgb.getRgbItem(c,0,t.fontColor,0);break;case i.OPS.setFillGray:s.ColorSpace.singletons.gray.getRgbItem(c,0,t.fontColor,0);break;case i.OPS.setFillCMYKColor:s.ColorSpace.singletons.cmyk.getRgbItem(c,0,t.fontColor,0);break;case i.OPS.showText:case i.OPS.showSpacedText:case i.OPS.nextLineShowText:case i.OPS.nextLineSetSpacingShowText:r=!0}}}catch(e){(0,i.warn)(`parseAppearanceStream - ignoring errors: "${e}".`)}return this.stream.reset(),delete t.scaleFactor,delete t.fillColorSpace,t}get _localColorSpaceCache(){return(0,i.shadow)(this,"_localColorSpaceCache",new c.LocalColorSpaceCache)}get _pdfFunctionFactory(){const e=new l.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported});return(0,i.shadow)(this,"_pdfFunctionFactory",e)}}function f(e,t){if(e[0]===e[1]&&e[1]===e[2]){const r=e[0]/255;return`${(0,n.numberToString)(r)} ${t?"g":"G"}`}return Array.from(e,(e=>(0,n.numberToString)(e/255))).join(" ")+" "+(t?"rg":"RG")}class p{constructor(e,t){this.xref=e,this.widths=null,this.firstChar=1/0,this.lastChar=-1/0,this.fontFamily=t;const r=new OffscreenCanvas(1,1);this.ctxMeasure=r.getContext("2d"),p._fontNameId||(p._fontNameId=1),this.fontName=a.Name.get(`InvalidPDFjsFont_${t}_${p._fontNameId++}`)}get toUnicodeRef(){if(!p._toUnicodeRef){const e="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo\n<< /Registry (Adobe)\n/Ordering (UCS) /Supplement 0 >> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000> <FFFF>\nendcodespacerange\n1 beginbfrange\n<0000> <FFFF> <0000>\nendbfrange\nendcmap CMapName currentdict /CMap defineresource pop end end",t=p.toUnicodeStream=new h.StringStream(e),r=new a.Dict(this.xref);t.dict=r,r.set("Length",e.length),p._toUnicodeRef=this.xref.getNewPersistentRef(t)}return p._toUnicodeRef}get fontDescriptorRef(){if(!p._fontDescriptorRef){const e=new a.Dict(this.xref);e.set("Type",a.Name.get("FontDescriptor")),e.set("FontName",this.fontName),e.set("FontFamily","MyriadPro Regular"),e.set("FontBBox",[0,0,0,0]),e.set("FontStretch",a.Name.get("Normal")),e.set("FontWeight",400),e.set("ItalicAngle",0),p._fontDescriptorRef=this.xref.getNewPersistentRef(e)}return p._fontDescriptorRef}get descendantFontRef(){const e=new a.Dict(this.xref);e.set("BaseFont",this.fontName),e.set("Type",a.Name.get("Font")),e.set("Subtype",a.Name.get("CIDFontType0")),e.set("CIDToGIDMap",a.Name.get("Identity")),e.set("FirstChar",this.firstChar),e.set("LastChar",this.lastChar),e.set("FontDescriptor",this.fontDescriptorRef),e.set("DW",1e3);const t=[],r=[...this.widths.entries()].sort();let n=null,i=null;for(const[e,a]of r)n?e===n+i.length?i.push(a):(t.push(n,i),n=e,i=[a]):(n=e,i=[a]);n&&t.push(n,i),e.set("W",t);const s=new a.Dict(this.xref);return s.set("Ordering","Identity"),s.set("Registry","Adobe"),s.set("Supplement",0),e.set("CIDSystemInfo",s),this.xref.getNewPersistentRef(e)}get baseFontRef(){const e=new a.Dict(this.xref);return e.set("BaseFont",this.fontName),e.set("Type",a.Name.get("Font")),e.set("Subtype",a.Name.get("Type0")),e.set("Encoding",a.Name.get("Identity-H")),e.set("DescendantFonts",[this.descendantFontRef]),e.set("ToUnicode",this.toUnicodeRef),this.xref.getNewPersistentRef(e)}get resources(){const e=new a.Dict(this.xref),t=new a.Dict(this.xref);return t.set(this.fontName.name,this.baseFontRef),e.set("Font",t),e}_createContext(){return this.widths=new Map,this.ctxMeasure.font=`1000px ${this.fontFamily}`,this.ctxMeasure}createFontResources(e){const t=this._createContext();for(const r of e.split(/\r\n?|\n/))for(const e of r.split("")){const r=e.charCodeAt(0);if(this.widths.has(r))continue;const a=t.measureText(e),n=Math.ceil(a.width);this.widths.set(r,n),this.firstChar=Math.min(r,this.firstChar),this.lastChar=Math.max(r,this.lastChar)}return this.resources}createAppearance(e,t,r,s,o,c){const l=this._createContext(),u=[];let d=-1/0;for(const t of e.split(/\r\n?|\n/)){u.push(t);const e=l.measureText(t).width;d=Math.max(d,e);for(const e of t.split("")){const t=e.charCodeAt(0);let r=this.widths.get(t);if(void 0===r){const a=l.measureText(e);r=Math.ceil(a.width),this.widths.set(t,r),this.firstChar=Math.min(t,this.firstChar),this.lastChar=Math.max(t,this.lastChar)}}}d*=s/1e3;const[p,g,m,b]=t;let y=m-p,v=b-g;r%180!=0&&([y,v]=[v,y]);let w=1;d>y&&(w=y/d);let A=1;const S=i.LINE_FACTOR*s,x=i.LINE_DESCENT_FACTOR*s,k=S*u.length;k>v&&(A=v/k);const C=s*Math.min(w,A),_=["q",`0 0 ${(0,n.numberToString)(y)} ${(0,n.numberToString)(v)} re W n`,"BT",`1 0 0 1 0 ${(0,n.numberToString)(v+x)} Tm 0 Tc ${f(o,!0)}`,`/${this.fontName.name} ${(0,n.numberToString)(C)} Tf`],{resources:T}=this;if(1!==(c="number"==typeof c&&c>=0&&c<=1?c:1)){_.push("/R0 gs");const e=new a.Dict(this.xref),t=new a.Dict(this.xref);t.set("ca",c),t.set("CA",c),t.set("Type",a.Name.get("ExtGState")),e.set("R0",t),T.set("ExtGState",e)}const E=(0,n.numberToString)(S);for(const e of u)_.push(`0 -${E} Td <${(0,n.stringToUTF16HexString)(e)}> Tj`);_.push("ET","Q");const O=_.join("\n"),F=new a.Dict(this.xref);if(F.set("Subtype",a.Name.get("Form")),F.set("Type",a.Name.get("XObject")),F.set("BBox",[0,0,y,v]),F.set("Length",O.length),F.set("Resources",T),r){const e=(0,n.getRotationMatrix)(r,y,v);F.set("Matrix",e)}const P=new h.StringStream(O);return P.dict=F,P}}t.FakeUnicodeFont=p},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorSpace=void 0;var a=r(2),n=r(4),i=r(5),s=r(3);class o{constructor(e,t){this.constructor===o&&(0,a.unreachable)("Cannot initialize ColorSpace."),this.name=e,this.numComps=t}getRgb(e,t){const r=new Uint8ClampedArray(3);return this.getRgbItem(e,t,r,0),r}getRgbItem(e,t,r,n){(0,a.unreachable)("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,r,n,i,s,o){(0,a.unreachable)("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){(0,a.unreachable)("Should not call ColorSpace.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return o.isDefaultDecode(e,this.numComps)}fillRgb(e,t,r,a,n,i,s,o,c){const l=t*r;let h=null;const u=1<<s,d=r!==n||t!==a;if(this.isPassthrough(s))h=o;else if(1===this.numComps&&l>u&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=s<=8?new Uint8Array(u):new Uint16Array(u);for(let e=0;e<u;e++)t[e]=e;const r=new Uint8ClampedArray(3*u);if(this.getRgbBuffer(t,0,u,r,0,s,0),d){h=new Uint8Array(3*l);let e=0;for(let t=0;t<l;++t){const a=3*o[t];h[e++]=r[a],h[e++]=r[a+1],h[e++]=r[a+2]}}else{let t=0;for(let a=0;a<l;++a){const n=3*o[a];e[t++]=r[n],e[t++]=r[n+1],e[t++]=r[n+2],t+=c}}}else d?(h=new Uint8ClampedArray(3*l),this.getRgbBuffer(o,0,l,h,0,s,0)):this.getRgbBuffer(o,0,a*i,e,0,s,c);if(h)if(d)!function(e,t,r,a,n,i,s){s=1!==s?0:s;const o=r/n,c=a/i;let l,h=0;const u=new Uint16Array(n),d=3*r;for(let e=0;e<n;e++)u[e]=3*Math.floor(e*o);for(let r=0;r<i;r++){const a=Math.floor(r*c)*d;for(let r=0;r<n;r++)l=a+u[r],t[h++]=e[l++],t[h++]=e[l++],t[h++]=e[l++],h+=s}}(h,e,t,r,a,n,c);else{let t=0,r=0;for(let n=0,s=a*i;n<s;n++)e[t++]=h[r++],e[t++]=h[r++],e[t++]=h[r++],t+=c}}get usesZeroToOneRange(){return(0,a.shadow)(this,"usesZeroToOneRange",!0)}static _cache(e,t,r,a){if(!r)throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.');if(!a)throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.');let i,s;e instanceof n.Ref&&(s=e,e=t.fetch(e)),e instanceof n.Name&&(i=e.name),(i||s)&&r.set(i,s,a)}static getCached(e,t,r){if(!r)throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.');if(e instanceof n.Ref){const a=r.getByRef(e);if(a)return a;try{e=t.fetch(e)}catch(e){if(e instanceof s.MissingDataException)throw e}}if(e instanceof n.Name){const t=r.getByName(e.name);if(t)return t}return null}static async parseAsync({cs:e,xref:t,resources:r=null,pdfFunctionFactory:a,localColorSpaceCache:n}){const i=this._parse(e,t,r,a);return this._cache(e,t,n,i),i}static parse({cs:e,xref:t,resources:r=null,pdfFunctionFactory:a,localColorSpaceCache:n}){const i=this.getCached(e,t,n);if(i)return i;const s=this._parse(e,t,r,a);return this._cache(e,t,n,s),s}static _parse(e,t,r=null,i){if((e=t.fetchIfRef(e))instanceof n.Name)switch(e.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(r instanceof n.Dict){const a=r.get("ColorSpace");if(a instanceof n.Dict){const s=a.get(e.name);if(s){if(s instanceof n.Name)return this._parse(s,t,r,i);e=s;break}}}throw new a.FormatError(`Unrecognized ColorSpace: ${e.name}`)}if(Array.isArray(e)){const n=t.fetchIfRef(e[0]).name;let s,o,u,d,f,b;switch(n){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 s=t.fetchIfRef(e[1]),d=s.getArray("WhitePoint"),f=s.getArray("BlackPoint"),b=s.get("Gamma"),new p(d,f,b);case"CalRGB":s=t.fetchIfRef(e[1]),d=s.getArray("WhitePoint"),f=s.getArray("BlackPoint"),b=s.getArray("Gamma");const y=s.getArray("Matrix");return new g(d,f,b,y);case"ICCBased":const v=t.fetchIfRef(e[1]).dict;o=v.get("N");const w=v.get("Alternate");if(w){const e=this._parse(w,t,r,i);if(e.numComps===o)return e;(0,a.warn)("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.singletons.gray;if(3===o)return this.singletons.rgb;if(4===o)return this.singletons.cmyk;break;case"Pattern":return u=e[1]||null,u&&(u=this._parse(u,t,r,i)),new l(u);case"I":case"Indexed":u=this._parse(e[1],t,r,i);const A=t.fetchIfRef(e[2])+1,S=t.fetchIfRef(e[3]);return new h(u,A,S);case"Separation":case"DeviceN":const x=t.fetchIfRef(e[1]);o=Array.isArray(x)?x.length:1,u=this._parse(e[2],t,r,i);const k=i.create(e[3]);return new c(o,u,k);case"Lab":s=t.fetchIfRef(e[1]),d=s.getArray("WhitePoint"),f=s.getArray("BlackPoint");const C=s.getArray("Range");return new m(d,f,C);default:throw new a.FormatError(`Unimplemented ColorSpace object: ${n}`)}}throw new a.FormatError(`Unrecognized ColorSpace object: ${e}`)}static isDefaultDecode(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length)return(0,a.warn)("The decode map is not the correct length"),!0;for(let t=0,r=e.length;t<r;t+=2)if(0!==e[t]||1!==e[t+1])return!1;return!0}static get singletons(){return(0,a.shadow)(this,"singletons",{get gray(){return(0,a.shadow)(this,"gray",new u)},get rgb(){return(0,a.shadow)(this,"rgb",new d)},get cmyk(){return(0,a.shadow)(this,"cmyk",new f)}})}}t.ColorSpace=o;class c extends o{constructor(e,t,r){super("Alternate",e),this.base=t,this.tintFn=r,this.tmpBuf=new Float32Array(t.numComps)}getRgbItem(e,t,r,a){const n=this.tmpBuf;this.tintFn(e,t,n,0),this.base.getRgbItem(n,0,r,a)}getRgbBuffer(e,t,r,a,n,i,s){const o=this.tintFn,c=this.base,l=1/((1<<i)-1),h=c.numComps,u=c.usesZeroToOneRange,d=(c.isPassthrough(8)||!u)&&0===s;let f=d?n:0;const p=d?a:new Uint8ClampedArray(h*r),g=this.numComps,m=new Float32Array(g),b=new Float32Array(h);let y,v;for(y=0;y<r;y++){for(v=0;v<g;v++)m[v]=e[t++]*l;if(o(m,0,b,0),u)for(v=0;v<h;v++)p[f++]=255*b[v];else c.getRgbItem(b,0,p,f),f+=h}d||c.getRgbBuffer(p,0,r,a,n,8,s)}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps/this.numComps,t)}}class l extends o{constructor(e){super("Pattern",null),this.base=e}isDefaultDecode(e,t){(0,a.unreachable)("Should not call PatternCS.isDefaultDecode")}}class h extends o{constructor(e,t,r){super("Indexed",1),this.base=e,this.highVal=t;const n=e.numComps*t;if(this.lookup=new Uint8Array(n),r instanceof i.BaseStream){const e=r.getBytes(n);this.lookup.set(e)}else{if("string"!=typeof r)throw new a.FormatError(`IndexedCS - unrecognized lookup table: ${r}`);for(let e=0;e<n;++e)this.lookup[e]=255&r.charCodeAt(e)}}getRgbItem(e,t,r,a){const n=this.base.numComps,i=e[t]*n;this.base.getRgbBuffer(this.lookup,i,1,r,a,8,0)}getRgbBuffer(e,t,r,a,n,i,s){const o=this.base,c=o.numComps,l=o.getOutputLength(c,s),h=this.lookup;for(let i=0;i<r;++i){const r=e[t++]*c;o.getRgbBuffer(h,r,1,a,n,8,s),n+=l}}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps,t)}isDefaultDecode(e,t){return!Array.isArray(e)||(2!==e.length?((0,a.warn)("Decode map length is not correct"),!0):!Number.isInteger(t)||t<1?((0,a.warn)("Bits per component is not correct"),!0):0===e[0]&&e[1]===(1<<t)-1)}}class u extends o{constructor(){super("DeviceGray",1)}getRgbItem(e,t,r,a){const n=255*e[t];r[a]=r[a+1]=r[a+2]=n}getRgbBuffer(e,t,r,a,n,i,s){const o=255/((1<<i)-1);let c=t,l=n;for(let t=0;t<r;++t){const t=o*e[c++];a[l++]=t,a[l++]=t,a[l++]=t,l+=s}}getOutputLength(e,t){return e*(3+t)}}class d extends o{constructor(){super("DeviceRGB",3)}getRgbItem(e,t,r,a){r[a]=255*e[t],r[a+1]=255*e[t+1],r[a+2]=255*e[t+2]}getRgbBuffer(e,t,r,a,n,i,s){if(8===i&&0===s)return void a.set(e.subarray(t,t+3*r),n);const o=255/((1<<i)-1);let c=t,l=n;for(let t=0;t<r;++t)a[l++]=o*e[c++],a[l++]=o*e[c++],a[l++]=o*e[c++],l+=s}getOutputLength(e,t){return e*(3+t)/3|0}isPassthrough(e){return 8===e}}class f extends o{constructor(){super("DeviceCMYK",4)}#a(e,t,r,a,n){const i=e[t]*r,s=e[t+1]*r,o=e[t+2]*r,c=e[t+3]*r;a[n]=255+i*(-4.387332384609988*i+54.48615194189176*s+18.82290502165302*o+212.25662451639585*c-285.2331026137004)+s*(1.7149763477362134*s-5.6096736904047315*o+-17.873870861415444*c-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747),a[n+1]=255+i*(8.841041422036149*i+60.118027045597366*s+6.871425592049007*o+31.159100130055922*c-79.2970844816548)+s*(-15.310361306967817*s+17.575251261109482*o+131.35250912493976*c-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578),a[n+2]=255+i*(.8842522430003296*i+8.078677503112928*s+30.89978309703729*o-.23883238689178934*c-14.183576799673286)+s*(10.49593273432072*s+63.02378494754052*o+50.606957656360734*c-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}getRgbItem(e,t,r,a){this.#a(e,t,1,r,a)}getRgbBuffer(e,t,r,a,n,i,s){const o=1/((1<<i)-1);for(let i=0;i<r;i++)this.#a(e,t,o,a,n),t+=4,n+=3+s}getOutputLength(e,t){return e/4*(3+t)|0}}class p extends o{constructor(e,t,r){if(super("CalGray",1),!e)throw new a.FormatError("WhitePoint missing - required for color space CalGray");if([this.XW,this.YW,this.ZW]=e,[this.XB,this.YB,this.ZB]=t||[0,0,0],this.G=r||1,this.XW<0||this.ZW<0||1!==this.YW)throw new a.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);(this.XB<0||this.YB<0||this.ZB<0)&&((0,a.info)(`Invalid BlackPoint for ${this.name}, falling back to default.`),this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||(0,a.warn)(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, only default values are supported.`),this.G<1&&((0,a.info)(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`),this.G=1)}#a(e,t,r,a,n){const i=(e[t]*n)**this.G,s=this.YW*i,o=Math.max(295.8*s**.3333333333333333-40.8,0);r[a]=o,r[a+1]=o,r[a+2]=o}getRgbItem(e,t,r,a){this.#a(e,t,r,a,1)}getRgbBuffer(e,t,r,a,n,i,s){const o=1/((1<<i)-1);for(let i=0;i<r;++i)this.#a(e,t,a,n,o),t+=1,n+=3+s}getOutputLength(e,t){return e*(3+t)}}class g extends o{static#n=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#i=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#s=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#o=new Float32Array([1,1,1]);static#c=new Float32Array(3);static#l=new Float32Array(3);static#h=new Float32Array(3);static#u=(24/116)**3/8;constructor(e,t,r,n){if(super("CalRGB",3),!e)throw new a.FormatError("WhitePoint missing - required for color space CalRGB");const[i,s,o]=this.whitePoint=e,[c,l,h]=this.blackPoint=t||new Float32Array(3);if([this.GR,this.GG,this.GB]=r||new Float32Array([1,1,1]),[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=n||new Float32Array([1,0,0,0,1,0,0,0,1]),i<0||o<0||1!==s)throw new a.FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);(c<0||l<0||h<0)&&((0,a.info)(`Invalid BlackPoint for ${this.name} [${c}, ${l}, ${h}], falling back to default.`),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&((0,a.info)(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`),this.GR=this.GG=this.GB=1)}#d(e,t,r){r[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2],r[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2],r[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]}#f(e,t,r){r[0]=1*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1*t[2]/e[2]}#p(e,t,r){r[0]=.95047*t[0]/e[0],r[1]=1*t[1]/e[1],r[2]=1.08883*t[2]/e[2]}#g(e){return e<=.0031308?this.#m(0,1,12.92*e):e>=.99554525?1:this.#m(0,1,1.055*e**(1/2.4)-.055)}#m(e,t,r){return Math.max(e,Math.min(t,r))}#b(e){return e<0?-this.#b(-e):e>8?((e+16)/116)**3:e*g.#u}#y(e,t,r){if(0===e[0]&&0===e[1]&&0===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);const a=this.#b(0),n=(1-a)/(1-this.#b(e[0])),i=1-n,s=(1-a)/(1-this.#b(e[1])),o=1-s,c=(1-a)/(1-this.#b(e[2])),l=1-c;r[0]=t[0]*n+i,r[1]=t[1]*s+o,r[2]=t[2]*c+l}#v(e,t,r){if(1===e[0]&&1===e[2])return r[0]=t[0],r[1]=t[1],void(r[2]=t[2]);const a=r;this.#d(g.#n,t,a);const n=g.#c;this.#f(e,a,n),this.#d(g.#i,n,r)}#w(e,t,r){const a=r;this.#d(g.#n,t,a);const n=g.#c;this.#p(e,a,n),this.#d(g.#i,n,r)}#a(e,t,r,a,n){const i=this.#m(0,1,e[t]*n),s=this.#m(0,1,e[t+1]*n),o=this.#m(0,1,e[t+2]*n),c=1===i?1:i**this.GR,l=1===s?1:s**this.GG,h=1===o?1:o**this.GB,u=this.MXA*c+this.MXB*l+this.MXC*h,d=this.MYA*c+this.MYB*l+this.MYC*h,f=this.MZA*c+this.MZB*l+this.MZC*h,p=g.#l;p[0]=u,p[1]=d,p[2]=f;const m=g.#h;this.#v(this.whitePoint,p,m);const b=g.#l;this.#y(this.blackPoint,m,b);const y=g.#h;this.#w(g.#o,b,y);const v=g.#l;this.#d(g.#s,y,v),r[a]=255*this.#g(v[0]),r[a+1]=255*this.#g(v[1]),r[a+2]=255*this.#g(v[2])}getRgbItem(e,t,r,a){this.#a(e,t,r,a,1)}getRgbBuffer(e,t,r,a,n,i,s){const o=1/((1<<i)-1);for(let i=0;i<r;++i)this.#a(e,t,a,n,o),t+=3,n+=3+s}getOutputLength(e,t){return e*(3+t)/3|0}}class m extends o{constructor(e,t,r){if(super("Lab",3),!e)throw new a.FormatError("WhitePoint missing - required for color space Lab");if([this.XW,this.YW,this.ZW]=e,[this.amin,this.amax,this.bmin,this.bmax]=r||[-100,100,-100,100],[this.XB,this.YB,this.ZB]=t||[0,0,0],this.XW<0||this.ZW<0||1!==this.YW)throw new a.FormatError("Invalid WhitePoint components, no fallback available");(this.XB<0||this.YB<0||this.ZB<0)&&((0,a.info)("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&((0,a.info)("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}#A(e){return e>=6/29?e**3:108/841*(e-4/29)}#S(e,t,r,a){return r+e*(a-r)/t}#a(e,t,r,a,n){let i=e[t],s=e[t+1],o=e[t+2];!1!==r&&(i=this.#S(i,r,0,100),s=this.#S(s,r,this.amin,this.amax),o=this.#S(o,r,this.bmin,this.bmax)),s>this.amax?s=this.amax:s<this.amin&&(s=this.amin),o>this.bmax?o=this.bmax:o<this.bmin&&(o=this.bmin);const c=(i+16)/116,l=c+s/500,h=c-o/200,u=this.XW*this.#A(l),d=this.YW*this.#A(c),f=this.ZW*this.#A(h);let p,g,m;this.ZW<1?(p=3.1339*u+-1.617*d+-.4906*f,g=-.9785*u+1.916*d+.0333*f,m=.072*u+-.229*d+1.4057*f):(p=3.2406*u+-1.5372*d+-.4986*f,g=-.9689*u+1.8758*d+.0415*f,m=.0557*u+-.204*d+1.057*f),a[n]=255*Math.sqrt(p),a[n+1]=255*Math.sqrt(g),a[n+2]=255*Math.sqrt(m)}getRgbItem(e,t,r,a){this.#a(e,t,!1,r,a)}getRgbBuffer(e,t,r,a,n,i,s){const o=(1<<i)-1;for(let i=0;i<r;i++)this.#a(e,t,o,a,n),t+=3,n+=3+s}getOutputLength(e,t){return e*(3+t)/3|0}isDefaultDecode(e,t){return!0}get usesZeroToOneRange(){return(0,a.shadow)(this,"usesZeroToOneRange",!1)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PartialEvaluator=t.EvaluatorPreprocessor=void 0;var a=r(2),n=r(14),i=r(4),s=r(34),o=r(37),c=r(41),l=r(50),h=r(51),u=r(42),d=r(57),f=r(16),p=r(59),g=r(8),m=r(5),b=r(60),y=r(12),v=r(18),w=r(38),A=r(61),S=r(39),x=r(45),k=r(40),C=r(62),_=r(63),T=r(64),E=r(65);const O=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupported:!0,isOffscreenCanvasSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,cMapUrl:null,standardFontDataUrl:null}),F=1,P=2,I=Promise.resolve();function M(e,t=!1){if(Array.isArray(e)){for(const t of e){const e=M(t,!0);if(e)return e}return(0,a.warn)(`Unsupported blend mode Array: ${e}`),"source-over"}if(!(e instanceof i.Name))return t?null:"source-over";switch(e.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 t?null:((0,a.warn)(`Unsupported blend mode: ${e.name}`),"source-over")}function R(e){e.fn===a.OPS.paintImageMaskXObject&&e.args[0]?.count>0&&e.args[0].count++}class D{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){return!(++this.checked<D.CHECK_TIME_EVERY)&&(this.checked=0,this.endTime<=Date.now())}reset(){this.endTime=Date.now()+D.TIME_SLOT_DURATION_MS,this.checked=0}}class N{constructor({xref:e,handler:t,pageIndex:r,idFactory:a,fontCache:n,builtInCMapCache:i,standardFontDataCache:s,globalImageCache:o,systemFontCache:c,options:l=null}){this.xref=e,this.handler=t,this.pageIndex=r,this.idFactory=a,this.fontCache=n,this.builtInCMapCache=i,this.standardFontDataCache=s,this.globalImageCache=o,this.systemFontCache=c,this.options=l||O,this.parsingType3Font=!1,this._regionalImageCache=new p.RegionalImageCache,this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this),C.ImageResizer.setMaxArea(this.options.canvasMaxAreaInBytes)}get _pdfFunctionFactory(){const e=new d.PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported});return(0,a.shadow)(this,"_pdfFunctionFactory",e)}clone(e=null){const t=Object.create(this);return t.options=Object.assign(Object.create(null),this.options,e),t}hasBlendModes(e,t){if(!(e instanceof i.Dict))return!1;if(e.objId&&t.has(e.objId))return!1;const r=new i.RefSet(t);e.objId&&r.put(e.objId);const n=[e],s=this.xref;for(;n.length;){const e=n.shift(),t=e.get("ExtGState");if(t instanceof i.Dict)for(let e of t.getRawValues()){if(e instanceof i.Ref){if(r.has(e))continue;try{e=s.fetch(e)}catch(t){r.put(e),(0,a.info)(`hasBlendModes - ignoring ExtGState: "${t}".`);continue}}if(!(e instanceof i.Dict))continue;e.objId&&r.put(e.objId);const t=e.get("BM");if(t instanceof i.Name){if("Normal"!==t.name)return!0}else if(void 0!==t&&Array.isArray(t))for(const e of t)if(e instanceof i.Name&&"Normal"!==e.name)return!0}const o=e.get("XObject");if(o instanceof i.Dict)for(let e of o.getRawValues()){if(e instanceof i.Ref){if(r.has(e))continue;try{e=s.fetch(e)}catch(t){r.put(e),(0,a.info)(`hasBlendModes - ignoring XObject: "${t}".`);continue}}if(!(e instanceof m.BaseStream))continue;e.dict.objId&&r.put(e.dict.objId);const t=e.dict.get("Resources");t instanceof i.Dict&&(t.objId&&r.has(t.objId)||(n.push(t),t.objId&&r.put(t.objId)))}}for(const e of r)t.put(e);return!1}async fetchBuiltInCMap(e){const t=this.builtInCMapCache.get(e);if(t)return t;let r;if(null!==this.options.cMapUrl){const t=`${this.options.cMapUrl}${e}.bcmap`,n=await fetch(t);if(!n.ok)throw new Error(`fetchBuiltInCMap: failed to fetch file "${t}" with "${n.statusText}".`);r={cMapData:new Uint8Array(await n.arrayBuffer()),compressionType:a.CMapCompressionType.BINARY}}else r=await this.handler.sendWithPromise("FetchBuiltInCMap",{name:e});return r.compressionType!==a.CMapCompressionType.NONE&&this.builtInCMapCache.set(e,r),r}async fetchStandardFontData(e){const t=this.standardFontDataCache.get(e);if(t)return new g.Stream(t);if(this.options.useSystemFonts&&"Symbol"!==e&&"ZapfDingbats"!==e)return null;const r=(0,c.getFontNameToFileMap)()[e];let n;if(null!==this.options.standardFontDataUrl){const e=`${this.options.standardFontDataUrl}${r}`,t=await fetch(e);t.ok?n=await t.arrayBuffer():(0,a.warn)(`fetchStandardFontData: failed to fetch file "${e}" with "${t.statusText}".`)}else try{n=await this.handler.sendWithPromise("FetchStandardFontData",{filename:r})}catch(e){(0,a.warn)(`fetchStandardFontData: failed to fetch file "${r}" with "${e}".`)}return n?(this.standardFontDataCache.set(e,n),new g.Stream(n)):null}async buildFormXObject(e,t,r,n,s,o,c){const l=t.dict,h=l.getArray("Matrix");let u,d,f=l.getArray("BBox");f=Array.isArray(f)&&4===f.length?a.Util.normalizeRect(f):null,l.has("OC")&&(u=await this.parseMarkedContentProps(l.get("OC"),e)),void 0!==u&&n.addOp(a.OPS.beginMarkedContentProps,["OC",u]);const p=l.get("Group");if(p){d={matrix:h,bbox:f,smask:r,isolated:!1,knockout:!1};const t=p.get("S");let s=null;if((0,i.isName)(t,"Transparency")&&(d.isolated=p.get("I")||!1,d.knockout=p.get("K")||!1,p.has("CS"))){const t=p.getRaw("CS"),r=y.ColorSpace.getCached(t,this.xref,c);s=r||await this.parseColorSpace({cs:t,resources:e,localColorSpaceCache:c})}r?.backdrop&&(s||=y.ColorSpace.singletons.rgb,r.backdrop=s.getRgb(r.backdrop,0)),n.addOp(a.OPS.beginGroup,[d])}const g=p?[h,null]:[h,f];return n.addOp(a.OPS.paintFormXObjectBegin,g),this.getOperatorList({stream:t,task:s,resources:l.get("Resources")||e,operatorList:n,initialState:o}).then((function(){n.addOp(a.OPS.paintFormXObjectEnd,[]),p&&n.addOp(a.OPS.endGroup,[d]),void 0!==u&&n.addOp(a.OPS.endMarkedContent,[])}))}_sendImgData(e,t,r=!1){const a=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||r?this.handler.send("commonobj",[e,"Image",t],a):this.handler.send("obj",[e,this.pageIndex,"Image",t],a)}async buildPaintImageXObject({resources:e,image:t,isInline:r=!1,operatorList:n,cacheKey:i,localImageCache:s,localColorSpaceCache:o}){const c=t.dict,l=c.objId,h=c.get("W","Width"),u=c.get("H","Height");if(!h||"number"!=typeof h||!u||"number"!=typeof u)return void(0,a.warn)("Image dimensions are missing, or not numbers.");const d=this.options.maxImageSize;if(-1!==d&&h*u>d){const e="Image exceeded maximum allowed size and was removed.";if(this.options.ignoreErrors)return void(0,a.warn)(e);throw new Error(e)}let f,p,g;if(c.has("OC")&&(f=await this.parseMarkedContentProps(c.get("OC"),e)),c.get("IM","ImageMask")){const e=c.get("I","Interpolate"),r=h+7>>3,o=t.getBytes(r*u),d=c.getArray("D","Decode");if(this.parsingType3Font){if(p=E.PDFImage.createRawMask({imgArray:o,width:h,height:u,imageIsFromDecodeStream:t instanceof v.DecodeStream,inverseDecode:d?.[0]>0,interpolate:e}),p.cached=!!i,g=[p],n.addImageOps(a.OPS.paintImageMaskXObject,g,f),i){const e={fn:a.OPS.paintImageMaskXObject,args:g,optionalContent:f};s.set(i,l,e),l&&this._regionalImageCache.set(null,l,e)}return}if(p=await E.PDFImage.createMask({imgArray:o,width:h,height:u,imageIsFromDecodeStream:t instanceof v.DecodeStream,inverseDecode:d?.[0]>0,interpolate:e,isOffscreenCanvasSupported:this.options.isOffscreenCanvasSupported}),p.isSingleOpaquePixel){if(n.addImageOps(a.OPS.paintSolidColorImageMask,[],f),i){const e={fn:a.OPS.paintSolidColorImageMask,args:[],optionalContent:f};s.set(i,l,e),l&&this._regionalImageCache.set(null,l,e)}return}const m=`mask_${this.idFactory.createObjId()}`;if(n.addDependency(m),this._sendImgData(m,p),g=[{data:m,width:p.width,height:p.height,interpolate:p.interpolate,count:1}],n.addImageOps(a.OPS.paintImageMaskXObject,g,f),i){const e={fn:a.OPS.paintImageMaskXObject,args:g,optionalContent:f};s.set(i,l,e),l&&this._regionalImageCache.set(null,l,e)}return}if(r&&!c.has("SMask")&&!c.has("Mask")&&h+u<200){const i=new E.PDFImage({xref:this.xref,res:e,image:t,isInline:r,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:o});return p=await i.createImageData(!0,!1),n.isOffscreenCanvasSupported=this.options.isOffscreenCanvasSupported,void n.addImageOps(a.OPS.paintInlineImageXObject,[p],f)}let m=`img_${this.idFactory.createObjId()}`,b=!1;if(this.parsingType3Font?m=`${this.idFactory.getDocId()}_type3_${m}`:l&&(b=this.globalImageCache.shouldCache(l,this.pageIndex),b&&(m=`${this.idFactory.getDocId()}_${m}`)),n.addDependency(m),g=[m,h,u],E.PDFImage.buildImage({xref:this.xref,res:e,image:t,isInline:r,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:o}).then((async e=>{if(p=await e.createImageData(!1,this.options.isOffscreenCanvasSupported),i&&l&&b){const e=p.bitmap?p.width*p.height*4:p.data.length;this.globalImageCache.addByteSize(l,e)}return this._sendImgData(m,p,b)})).catch((e=>((0,a.warn)(`Unable to decode image "${m}": "${e}".`),this._sendImgData(m,null,b)))),n.addImageOps(a.OPS.paintImageXObject,g,f),i){const e={fn:a.OPS.paintImageXObject,args:g,optionalContent:f};s.set(i,l,e),l&&(this._regionalImageCache.set(null,l,e),b&&((0,a.assert)(!r,"Cannot cache an inline image globally."),this.globalImageCache.setData(l,{objId:m,fn:a.OPS.paintImageXObject,args:g,optionalContent:f,byteSize:0})))}}handleSMask(e,t,r,a,n,i){const s=e.get("G"),o={subtype:e.get("S").name,backdrop:e.get("BC")},c=e.get("TR");if((0,d.isPDFFunction)(c)){const e=this._pdfFunctionFactory.create(c),t=new Uint8Array(256),r=new Float32Array(1);for(let a=0;a<256;a++)r[0]=a/255,e(r,0,r,0),t[a]=255*r[0]|0;o.transferMap=t}return this.buildFormXObject(t,s,o,r,a,n.state.clone(),i)}handleTransferFunction(e){let t;if(Array.isArray(e))t=e;else{if(!(0,d.isPDFFunction)(e))return null;t=[e]}const r=[];let a=0,n=0;for(const e of t){const t=this.xref.fetchIfRef(e);if(a++,(0,i.isName)(t,"Identity")){r.push(null);continue}if(!(0,d.isPDFFunction)(t))return null;const s=this._pdfFunctionFactory.create(t),o=new Uint8Array(256),c=new Float32Array(1);for(let e=0;e<256;e++)c[0]=e/255,s(c,0,c,0),o[e]=255*c[0]|0;r.push(o),n++}return 1!==a&&4!==a||0===n?null:r}handleTilingType(e,t,r,n,s,o,c,h){const u=new T.OperatorList,d=i.Dict.merge({xref:this.xref,dictArray:[s.get("Resources"),r]});return this.getOperatorList({stream:n,task:c,resources:d,operatorList:u}).then((function(){const r=u.getIR(),a=(0,l.getTilingPatternIR)(r,s,t);o.addDependencies(u.dependencies),o.addOp(e,a),s.objId&&h.set(null,s.objId,{operatorListIR:r,dict:s})})).catch((e=>{if(!(e instanceof a.AbortException)){if(!this.options.ignoreErrors)throw e;(0,a.warn)(`handleTilingType - ignoring pattern: "${e}".`)}}))}handleSetFont(e,t,r,a,n,o,c=null,l=null){const h=t?.[0]instanceof i.Name?t[0].name:null;return this.loadFont(h,r,e,c,l).then((t=>t.font.isType3Font?t.loadType3Data(this,e,n).then((function(){return a.addDependencies(t.type3Dependencies),t})).catch((e=>new L({loadedName:"g_font_error",font:new s.ErrorFont(`Type3 font load error: ${e}`),dict:t.font,evaluatorOptions:this.options}))):t)).then((e=>(o.font=e.font,e.send(this.handler),e.loadedName)))}handleText(e,t){const r=t.font,n=r.charsToGlyphs(e);return r.data&&(t.textRenderingMode&a.TextRenderingMode.ADD_TO_PATH_FLAG||"Pattern"===t.fillColorSpace.name||r.disableFontFace||this.options.disableFontFace)&&N.buildFontPaths(r,n,this.handler,this.options),n}ensureStateFont(e){if(e.font)return;const t=new a.FormatError("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;(0,a.warn)(`ensureStateFont: "${t}".`)}async setGState({resources:e,gState:t,operatorList:r,cacheKey:n,task:s,stateManager:o,localGStateCache:c,localColorSpaceCache:l}){const h=t.objId;let u=!0;const d=[];let f=Promise.resolve();for(const n of t.getKeys()){const c=t.get(n);switch(n){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":d.push([n,c]);break;case"Font":u=!1,f=f.then((()=>this.handleSetFont(e,null,c[0],r,s,o.state).then((function(e){r.addDependency(e),d.push([n,[e,c[1]]])}))));break;case"BM":d.push([n,M(c)]);break;case"SMask":if((0,i.isName)(c,"None")){d.push([n,!1]);break}c instanceof i.Dict?(u=!1,f=f.then((()=>this.handleSMask(c,e,r,s,o,l))),d.push([n,!0])):(0,a.warn)("Unsupported SMask type");break;case"TR":const t=this.handleTransferFunction(c);d.push([n,t]);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,a.info)("graphic state operator "+n);break;default:(0,a.info)("Unknown graphic state operator "+n)}}return f.then((function(){d.length>0&&r.addOp(a.OPS.setGState,[d]),u&&c.set(n,h,d)}))}loadFont(e,t,r,n=null,o=null){const c=async()=>new L({loadedName:"g_font_error",font:new s.ErrorFont(`Font "${e}" is not available.`),dict:t,evaluatorOptions:this.options});let l;if(t)t instanceof i.Ref&&(l=t);else{const t=r.get("Font");t&&(l=t.getRaw(e))}if(l){if(this.parsingType3Font&&this.type3FontRefs.has(l))return c();if(this.fontCache.has(l))return this.fontCache.get(l);t=this.xref.fetchIfRef(l)}if(!(t instanceof i.Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font)return(0,a.warn)(`Font "${e}" is not available.`),c();(0,a.warn)(`Font "${e}" is not available -- attempting to fallback to a default font.`),t=n||N.fallbackFontDict}if(t.cacheKey&&this.fontCache.has(t.cacheKey))return this.fontCache.get(t.cacheKey);const h=new a.PromiseCapability;let u;try{u=this.preEvaluateFont(t),u.cssFontInfo=o}catch(e){return(0,a.warn)(`loadFont - preEvaluateFont failed: "${e}".`),c()}const{descriptor:d,hash:f}=u,p=l instanceof i.Ref;let g;if(f&&d instanceof i.Dict){const e=d.fontAliases||=Object.create(null);if(e[f]){const t=e[f].aliasRef;if(p&&t&&this.fontCache.has(t))return this.fontCache.putAlias(l,t),this.fontCache.get(l)}else e[f]={fontID:this.idFactory.createFontId()};p&&(e[f].aliasRef=l),g=e[f].fontID}else g=this.idFactory.createFontId();return(0,a.assert)(g?.startsWith("f"),'The "fontID" must be (correctly) defined.'),p?this.fontCache.put(l,h.promise):(t.cacheKey=`cacheKey_${g}`,this.fontCache.put(t.cacheKey,h.promise)),t.loadedName=`${this.idFactory.getDocId()}_${g}`,this.translateFont(u).then((e=>{h.resolve(new L({loadedName:t.loadedName,font:e,dict:t,evaluatorOptions:this.options}))})).catch((e=>{(0,a.warn)(`loadFont - translateFont failed: "${e}".`),h.resolve(new L({loadedName:t.loadedName,font:new s.ErrorFont(e instanceof Error?e.message:e),dict:t,evaluatorOptions:this.options}))})),h.promise}buildPath(e,t,r,n=!1){const i=e.length-1;if(r||(r=[]),i<0||e.fnArray[i]!==a.OPS.constructPath){let i;switch(n&&((0,a.warn)(`Encountered path operator "${t}" inside of a text object.`),e.addOp(a.OPS.save,null)),t){case a.OPS.rectangle:const e=r[0]+r[2],t=r[1]+r[3];i=[Math.min(r[0],e),Math.max(r[0],e),Math.min(r[1],t),Math.max(r[1],t)];break;case a.OPS.moveTo:case a.OPS.lineTo:i=[r[0],r[0],r[1],r[1]];break;default:i=[1/0,-1/0,1/0,-1/0]}e.addOp(a.OPS.constructPath,[[t],r,i]),n&&e.addOp(a.OPS.restore,null)}else{const n=e.argsArray[i];n[0].push(t),n[1].push(...r);const s=n[2];switch(t){case a.OPS.rectangle:const e=r[0]+r[2],t=r[1]+r[3];s[0]=Math.min(s[0],r[0],e),s[1]=Math.max(s[1],r[0],e),s[2]=Math.min(s[2],r[1],t),s[3]=Math.max(s[3],r[1],t);break;case a.OPS.moveTo:case a.OPS.lineTo:s[0]=Math.min(s[0],r[0]),s[1]=Math.max(s[1],r[0]),s[2]=Math.min(s[2],r[1]),s[3]=Math.max(s[3],r[1])}}}parseColorSpace({cs:e,resources:t,localColorSpaceCache:r}){return y.ColorSpace.parseAsync({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,localColorSpaceCache:r}).catch((e=>{if(e instanceof a.AbortException)return null;if(this.options.ignoreErrors)return(0,a.warn)(`parseColorSpace - ignoring ColorSpace: "${e}".`),null;throw e}))}parseShading({shading:e,resources:t,localColorSpaceCache:r,localShadingPatternCache:a}){let n=a.get(e);if(!n){const i=l.Pattern.parseShading(e,this.xref,t,this._pdfFunctionFactory,r).getIR();n=`pattern_${this.idFactory.createObjId()}`,this.parsingType3Font&&(n=`${this.idFactory.getDocId()}_type3_${n}`),a.set(e,n),this.parsingType3Font?this.handler.send("commonobj",[n,"Pattern",i]):this.handler.send("obj",[n,this.pageIndex,"Pattern",i])}return n}handleColorN(e,t,r,n,s,o,c,h,u,d){const f=r.pop();if(f instanceof i.Name){const p=s.getRaw(f.name),g=p instanceof i.Ref&&u.getByRef(p);if(g)try{const a=n.base?n.base.getRgb(r,0):null,i=(0,l.getTilingPatternIR)(g.operatorListIR,g.dict,a);return void e.addOp(t,i)}catch{}const b=this.xref.fetchIfRef(p);if(b){const i=b instanceof m.BaseStream?b.dict:b,s=i.get("PatternType");if(s===F){const a=n.base?n.base.getRgb(r,0):null;return this.handleTilingType(t,a,o,b,i,e,c,u)}if(s===P){const r=i.get("Shading"),a=i.getArray("Matrix"),n=this.parseShading({shading:r,resources:o,localColorSpaceCache:h,localShadingPatternCache:d});return void e.addOp(t,["Shading",n,a])}throw new a.FormatError(`Unknown PatternType: ${s}`)}}throw new a.FormatError(`Unknown PatternName: ${f}`)}_parseVisibilityExpression(e,t,r){if(++t>10)return void(0,a.warn)("Visibility expression is too deeply nested");const n=e.length,s=this.xref.fetchIfRef(e[0]);if(!(n<2)&&s instanceof i.Name){switch(s.name){case"And":case"Or":case"Not":r.push(s.name);break;default:return void(0,a.warn)(`Invalid operator ${s.name} in visibility expression`)}for(let a=1;a<n;a++){const n=e[a],s=this.xref.fetchIfRef(n);if(Array.isArray(s)){const e=[];r.push(e),this._parseVisibilityExpression(s,t,e)}else n instanceof i.Ref&&r.push(n.toString())}}else(0,a.warn)("Invalid visibility expression")}async parseMarkedContentProps(e,t){let r;if(e instanceof i.Name)r=t.get("Properties").get(e.name);else{if(!(e instanceof i.Dict))throw new a.FormatError("Optional content properties malformed.");r=e}const n=r.get("Type")?.name;if("OCG"===n)return{type:n,id:r.objId};if("OCMD"===n){const e=r.get("VE");if(Array.isArray(e)){const t=[];if(this._parseVisibilityExpression(e,0,t),t.length>0)return{type:"OCMD",expression:t}}const t=r.get("OCGs");if(Array.isArray(t)||t instanceof i.Dict){const e=[];if(Array.isArray(t))for(const r of t)e.push(r.toString());else e.push(t.objId);return{type:n,ids:e,policy:r.get("P")instanceof i.Name?r.get("P").name:null,expression:null}}if(t instanceof i.Ref)return{type:n,id:t.toString()}}return null}getOperatorList({stream:e,task:t,resources:r,operatorList:n,initialState:s=null,fallbackFontDict:o=null}){if(r||=i.Dict.empty,s||=new $,!n)throw new Error('getOperatorList: missing "operatorList" parameter');const c=this,l=this.xref;let h=!1;const u=new p.LocalImageCache,d=new p.LocalColorSpaceCache,f=new p.LocalGStateCache,g=new p.LocalTilingPatternCache,b=new Map,v=r.get("XObject")||i.Dict.empty,w=r.get("Pattern")||i.Dict.empty,A=new B(s),S=new U(e,l,A),x=new D;function k(e){for(let e=0,t=S.savedStatesDepth;e<t;e++)n.addOp(a.OPS.restore,[])}return new Promise((function e(s,p){const C=function(t){Promise.all([t,n.ready]).then((function(){try{e(s,p)}catch(e){p(e)}}),p)};t.ensureNotTerminated(),x.reset();const _={};let T,E,O,F,P,M;for(;!(T=x.check())&&(_.args=null,S.read(_));){let e=_.args,s=_.fn;switch(0|s){case a.OPS.paintXObject:if(M=e[0]instanceof i.Name,P=e[0].name,M){const t=u.getByName(P);if(t){n.addImageOps(t.fn,t.args,t.optionalContent),R(t),e=null;continue}}return void C(new Promise((function(e,s){if(!M)throw new a.FormatError("XObject must be referred to by name.");let o=v.getRaw(P);if(o instanceof i.Ref){const t=u.getByRef(o)||c._regionalImageCache.getByRef(o);if(t)return n.addImageOps(t.fn,t.args,t.optionalContent),R(t),void e();const r=c.globalImageCache.getData(o,c.pageIndex);if(r)return n.addDependency(r.objId),n.addImageOps(r.fn,r.args,r.optionalContent),void e();o=l.fetch(o)}if(!(o instanceof m.BaseStream))throw new a.FormatError("XObject should be a stream");const h=o.dict.get("Subtype");if(!(h instanceof i.Name))throw new a.FormatError("XObject should have a Name subtype");if("Form"===h.name)return A.save(),void c.buildFormXObject(r,o,null,n,t,A.state.clone(),d).then((function(){A.restore(),e()}),s);if("Image"!==h.name){if("PS"!==h.name)throw new a.FormatError(`Unhandled XObject subtype ${h.name}`);(0,a.info)("Ignored XObject subtype PS"),e()}else c.buildPaintImageXObject({resources:r,image:o,operatorList:n,cacheKey:P,localImageCache:u,localColorSpaceCache:d}).then(e,s)})).catch((function(e){if(!(e instanceof a.AbortException)){if(!c.options.ignoreErrors)throw e;(0,a.warn)(`getOperatorList - ignoring XObject: "${e}".`)}})));case a.OPS.setFont:var D=e[1];return void C(c.handleSetFont(r,e,null,n,t,A.state,o).then((function(e){n.addDependency(e),n.addOp(a.OPS.setFont,[e,D])})));case a.OPS.beginText:h=!0;break;case a.OPS.endText:h=!1;break;case a.OPS.endInlineImage:var N=e[0].cacheKey;if(N){const t=u.getByName(N);if(t){n.addImageOps(t.fn,t.args,t.optionalContent),R(t),e=null;continue}}return void C(c.buildPaintImageXObject({resources:r,image:e[0],isInline:!0,operatorList:n,cacheKey:N,localImageCache:u,localColorSpaceCache:d}));case a.OPS.showText:if(!A.state.font){c.ensureStateFont(A.state);continue}e[0]=c.handleText(e[0],A.state);break;case a.OPS.showSpacedText:if(!A.state.font){c.ensureStateFont(A.state);continue}var L=[],B=A.state;for(const t of e[0])"string"==typeof t?L.push(...c.handleText(t,B)):"number"==typeof t&&L.push(t);e[0]=L,s=a.OPS.showText;break;case a.OPS.nextLineShowText:if(!A.state.font){c.ensureStateFont(A.state);continue}n.addOp(a.OPS.nextLine),e[0]=c.handleText(e[0],A.state),s=a.OPS.showText;break;case a.OPS.nextLineSetSpacingShowText:if(!A.state.font){c.ensureStateFont(A.state);continue}n.addOp(a.OPS.nextLine),n.addOp(a.OPS.setWordSpacing,[e.shift()]),n.addOp(a.OPS.setCharSpacing,[e.shift()]),e[0]=c.handleText(e[0],A.state),s=a.OPS.showText;break;case a.OPS.setTextRenderingMode:A.state.textRenderingMode=e[0];break;case a.OPS.setFillColorSpace:{const t=y.ColorSpace.getCached(e[0],l,d);if(t){A.state.fillColorSpace=t;continue}return void C(c.parseColorSpace({cs:e[0],resources:r,localColorSpaceCache:d}).then((function(e){e&&(A.state.fillColorSpace=e)})))}case a.OPS.setStrokeColorSpace:{const t=y.ColorSpace.getCached(e[0],l,d);if(t){A.state.strokeColorSpace=t;continue}return void C(c.parseColorSpace({cs:e[0],resources:r,localColorSpaceCache:d}).then((function(e){e&&(A.state.strokeColorSpace=e)})))}case a.OPS.setFillColor:F=A.state.fillColorSpace,e=F.getRgb(e,0),s=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeColor:F=A.state.strokeColorSpace,e=F.getRgb(e,0),s=a.OPS.setStrokeRGBColor;break;case a.OPS.setFillGray:A.state.fillColorSpace=y.ColorSpace.singletons.gray,e=y.ColorSpace.singletons.gray.getRgb(e,0),s=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeGray:A.state.strokeColorSpace=y.ColorSpace.singletons.gray,e=y.ColorSpace.singletons.gray.getRgb(e,0),s=a.OPS.setStrokeRGBColor;break;case a.OPS.setFillCMYKColor:A.state.fillColorSpace=y.ColorSpace.singletons.cmyk,e=y.ColorSpace.singletons.cmyk.getRgb(e,0),s=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeCMYKColor:A.state.strokeColorSpace=y.ColorSpace.singletons.cmyk,e=y.ColorSpace.singletons.cmyk.getRgb(e,0),s=a.OPS.setStrokeRGBColor;break;case a.OPS.setFillRGBColor:A.state.fillColorSpace=y.ColorSpace.singletons.rgb,e=y.ColorSpace.singletons.rgb.getRgb(e,0);break;case a.OPS.setStrokeRGBColor:A.state.strokeColorSpace=y.ColorSpace.singletons.rgb,e=y.ColorSpace.singletons.rgb.getRgb(e,0);break;case a.OPS.setFillColorN:if(F=A.state.fillColorSpace,"Pattern"===F.name)return void C(c.handleColorN(n,a.OPS.setFillColorN,e,F,w,r,t,d,g,b));e=F.getRgb(e,0),s=a.OPS.setFillRGBColor;break;case a.OPS.setStrokeColorN:if(F=A.state.strokeColorSpace,"Pattern"===F.name)return void C(c.handleColorN(n,a.OPS.setStrokeColorN,e,F,w,r,t,d,g,b));e=F.getRgb(e,0),s=a.OPS.setStrokeRGBColor;break;case a.OPS.shadingFill:var j=r.get("Shading");if(!j)throw new a.FormatError("No shading resource found");var $=j.get(e[0].name);if(!$)throw new a.FormatError("No shading object found");e=[c.parseShading({shading:$,resources:r,localColorSpaceCache:d,localShadingPatternCache:b})],s=a.OPS.shadingFill;break;case a.OPS.setGState:if(M=e[0]instanceof i.Name,P=e[0].name,M){const t=f.getByName(P);if(t){t.length>0&&n.addOp(a.OPS.setGState,[t]),e=null;continue}}return void C(new Promise((function(e,s){if(!M)throw new a.FormatError("GState must be referred to by name.");const o=r.get("ExtGState");if(!(o instanceof i.Dict))throw new a.FormatError("ExtGState should be a dictionary.");const l=o.get(P);if(!(l instanceof i.Dict))throw new a.FormatError("GState should be a dictionary.");c.setGState({resources:r,gState:l,operatorList:n,cacheKey:P,task:t,stateManager:A,localGStateCache:f,localColorSpaceCache:d}).then(e,s)})).catch((function(e){if(!(e instanceof a.AbortException)){if(!c.options.ignoreErrors)throw e;(0,a.warn)(`getOperatorList - ignoring ExtGState: "${e}".`)}})));case a.OPS.moveTo:case a.OPS.lineTo:case a.OPS.curveTo:case a.OPS.curveTo2:case a.OPS.curveTo3:case a.OPS.closePath:case a.OPS.rectangle:c.buildPath(n,s,e,h);continue;case a.OPS.markPoint:case a.OPS.markPointProps:case a.OPS.beginCompat:case a.OPS.endCompat:continue;case a.OPS.beginMarkedContentProps:if(!(e[0]instanceof i.Name)){(0,a.warn)(`Expected name for beginMarkedContentProps arg0=${e[0]}`);continue}if("OC"===e[0].name)return void C(c.parseMarkedContentProps(e[1],r).then((e=>{n.addOp(a.OPS.beginMarkedContentProps,["OC",e])})).catch((e=>{if(!(e instanceof a.AbortException)){if(!c.options.ignoreErrors)throw e;(0,a.warn)(`getOperatorList - ignoring beginMarkedContentProps: "${e}".`)}})));e=[e[0].name,e[1]instanceof i.Dict?e[1].get("MCID"):null];break;case a.OPS.beginMarkedContent:case a.OPS.endMarkedContent:default:if(null!==e){for(E=0,O=e.length;E<O&&!(e[E]instanceof i.Dict);E++);if(E<O){(0,a.warn)("getOperatorList - ignoring operator: "+s);continue}}}n.addOp(s,e)}T?C(I):(k(),s())})).catch((e=>{if(!(e instanceof a.AbortException)){if(this.options.ignoreErrors)return(0,a.warn)(`getOperatorList - ignoring errors during "${t.name}" task: "${e}".`),void k();throw e}}))}getTextContent({stream:e,task:t,resources:r,stateManager:n=null,includeMarkedContent:s=!1,sink:o,seenStyles:c=new Set,viewBox:l,markedContentData:h=null,disableNormalization:u=!1}){r||=i.Dict.empty,n||=new B(new j),s&&(h||={level:0});const d={items:[],styles:Object.create(null)},f={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},g=[" "," "];let y=0;function v(e){const t=(y+1)%2,r=" "!==g[y]&&" "===g[t];return g[y]=e,y=t,r}function w(){return" "!==g[y]&&" "===g[(y+1)%2]}function A(){g[0]=g[1]=" ",y=0}const S=this,x=this.xref,k=[];let C=null;const _=new p.LocalImageCache,T=new p.LocalGStateCache,E=new U(e,x,n);let O;function F({width:e=0,height:t=0,transform:r=f.prevTransform,fontName:a=f.fontName}){d.items.push({str:" ",dir:"ltr",width:e,height:t,transform:r,fontName:a,hasEOL:!1})}function P(){const e=O.font,t=[O.fontSize*O.textHScale,0,0,O.fontSize,0,O.textRise];if(e.isType3Font&&(O.fontSize<=1||e.isCharBBox)&&!(0,a.isArrayEqual)(O.fontMatrix,a.FONT_IDENTITY_MATRIX)){const r=e.bbox[3]-e.bbox[1];r>0&&(t[3]*=r*O.fontMatrix[3])}return a.Util.transform(O.ctm,a.Util.transform(O.textMatrix,t))}function M(){if(f.initialized)return f;const{font:e,loadedName:t}=O;c.has(t)||(c.add(t),d.styles[t]={fontFamily:e.fallbackName,ascent:e.ascent,descent:e.descent,vertical:e.vertical}),f.fontName=t;const r=f.transform=P();e.vertical?(f.width=f.totalWidth=Math.hypot(r[0],r[1]),f.height=f.totalHeight=0,f.vertical=!0):(f.width=f.totalWidth=0,f.height=f.totalHeight=Math.hypot(r[2],r[3]),f.vertical=!1);const a=Math.hypot(O.textLineMatrix[0],O.textLineMatrix[1]),n=Math.hypot(O.ctm[0],O.ctm[1]);f.textAdvanceScale=n*a;const{fontSize:i}=O;return f.trackingSpaceMin=.102*i,f.notASpace=.03*i,f.negativeSpaceMax=-.2*i,f.spaceInFlowMin=.102*i,f.spaceInFlowMax=.6*i,f.hasEOL=!1,f.initialized=!0,f}function R(){if(!f.initialized)return;const e=Math.hypot(O.textLineMatrix[0],O.textLineMatrix[1]),t=Math.hypot(O.ctm[0],O.ctm[1])*e;t!==f.textAdvanceScale&&(f.vertical?(f.totalHeight+=f.height*f.textAdvanceScale,f.height=0):(f.totalWidth+=f.width*f.textAdvanceScale,f.width=0),f.textAdvanceScale=t)}function N(e,n){return S.loadFont(e,n,r).then((function(e){return e.font.isType3Font?e.loadType3Data(S,r,t).catch((function(){})).then((function(){return e})):e})).then((function(e){O.loadedName=e.loadedName,O.font=e.font,O.fontMatrix=e.font.fontMatrix||a.FONT_IDENTITY_MATRIX}))}function L(e,t,r){const a=Math.hypot(r[0],r[1]);return[(r[0]*e+r[1]*t)/a,(r[2]*e+r[3]*t)/a]}function $(e){const t=P();let r=t[4],a=t[5];if(O.font?.vertical){if(r<l[0]||r>l[2]||a+e<l[1]||a>l[3])return!1}else if(r+e<l[0]||r>l[2]||a<l[1]||a>l[3])return!1;if(!O.font||!f.prevTransform)return!0;let n=f.prevTransform[4],i=f.prevTransform[5];if(n===r&&i===a)return!0;let s=-1;switch(t[0]&&0===t[1]&&0===t[2]?s=t[0]>0?0:180:t[1]&&0===t[0]&&0===t[3]&&(s=t[1]>0?90:270),s){case 0:break;case 90:[r,a]=[a,r],[n,i]=[i,n];break;case 180:[r,a,n,i]=[-r,-a,-n,-i];break;case 270:[r,a]=[-a,-r],[n,i]=[-i,-n];break;default:[r,a]=L(r,a,t),[n,i]=L(n,i,f.prevTransform)}if(O.font.vertical){const e=(i-a)/f.textAdvanceScale,t=r-n,s=Math.sign(f.height);return e<s*f.negativeSpaceMax?Math.abs(t)>.5*f.width?(H(),!0):(A(),W(),!0):Math.abs(t)>f.width?(H(),!0):(e<=s*f.notASpace&&A(),e<=s*f.trackingSpaceMin?w()?(A(),W(),F({height:Math.abs(e)})):f.height+=e:X(e,f.prevTransform,s)||(0===f.str.length?(A(),F({height:Math.abs(e)})):f.height+=e),Math.abs(t)>.25*f.width&&W(),!0)}const o=(r-n)/f.textAdvanceScale,c=a-i,h=Math.sign(f.width);return o<h*f.negativeSpaceMax?Math.abs(c)>.5*f.height?(H(),!0):(A(),W(),!0):Math.abs(c)>f.height?(H(),!0):(o<=h*f.notASpace&&A(),o<=h*f.trackingSpaceMin?w()?(A(),W(),F({width:Math.abs(o)})):f.width+=o:X(o,f.prevTransform,h)||(0===f.str.length?(A(),F({width:Math.abs(o)})):f.width+=o),Math.abs(c)>.25*f.height&&W(),!0)}function z({chars:e,extraSpacing:t}){const r=O.font;if(!e){const e=O.charSpacing+t;return void(e&&(r.vertical?O.translateTextMatrix(0,-e):O.translateTextMatrix(e*O.textHScale,0)))}const a=r.charsToGlyphs(e),n=O.fontMatrix[0]*O.fontSize;for(let e=0,i=a.length;e<i;e++){const s=a[e],{category:o}=s;if(o.isInvisibleFormatMark)continue;let c=O.charSpacing+(e+1===i?t:0),l=s.width;r.vertical&&(l=s.vmetric?s.vmetric[0]:-l);let h=l*n;if(o.isWhitespace){r.vertical?(c+=-h+O.wordSpacing,O.translateTextMatrix(0,-c)):(c+=h+O.wordSpacing,O.translateTextMatrix(c*O.textHScale,0)),v(" ");continue}if(!o.isZeroWidthDiacritic&&!$(h)){r.vertical?O.translateTextMatrix(0,h):O.translateTextMatrix(h*O.textHScale,0);continue}const u=M();o.isZeroWidthDiacritic&&(h=0),r.vertical?(O.translateTextMatrix(0,h),h=Math.abs(h),u.height+=h):(h*=O.textHScale,O.translateTextMatrix(h,0),u.width+=h),h&&(u.prevTransform=P());const d=s.unicode;v(d)&&u.str.push(" "),u.str.push(d),c&&(r.vertical?O.translateTextMatrix(0,-c):O.translateTextMatrix(c*O.textHScale,0))}}function H(){A(),f.initialized?(f.hasEOL=!0,W()):d.items.push({str:"",dir:"ltr",width:0,height:0,transform:P(),fontName:O.loadedName,hasEOL:!0})}function X(e,t,r){if(r*f.spaceInFlowMin<=e&&e<=r*f.spaceInFlowMax)return f.initialized&&(A(),f.str.push(" ")),!1;const a=f.fontName;let n=0;return f.vertical&&(n=e,e=0),W(),A(),F({width:Math.abs(e),height:Math.abs(n),transform:t||P(),fontName:a}),!0}function W(){f.initialized&&f.str&&(f.vertical?f.totalHeight+=f.height*f.textAdvanceScale:f.totalWidth+=f.width*f.textAdvanceScale,d.items.push(function(e){let t=e.str.join("");u||(t=(0,a.normalizeUnicode)(t));const r=(0,b.bidi)(t,-1,e.vertical);return{str:r.str,dir:r.dir,width:Math.abs(e.totalWidth),height:Math.abs(e.totalHeight),transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}(f)),f.initialized=!1,f.str.length=0)}function G(e=!1){const t=d.items.length;0!==t&&(e&&t<10||(o.enqueue(d,t),d.items=[],d.styles=Object.create(null)))}const q=new D;return new Promise((function e(f,p){const g=function(t){G(!0),Promise.all([t,o.ready]).then((function(){try{e(f,p)}catch(e){p(e)}}),p)};t.ensureNotTerminated(),q.reset();const b={};let y,v=[];for(;!(y=q.check())&&(v.length=0,b.args=v,E.read(b));){const e=O;O=n.state;const f=b.fn;switch(v=b.args,0|f){case a.OPS.setFont:var w=v[0].name,A=v[1];if(O.font&&w===O.fontName&&A===O.fontSize)break;return W(),O.fontName=w,O.fontSize=A,void g(N(w,null));case a.OPS.setTextRise:O.textRise=v[0];break;case a.OPS.setHScale:O.textHScale=v[0]/100;break;case a.OPS.setLeading:O.leading=v[0];break;case a.OPS.moveText:O.translateTextLineMatrix(v[0],v[1]),O.textMatrix=O.textLineMatrix.slice();break;case a.OPS.setLeadingMoveText:O.leading=-v[1],O.translateTextLineMatrix(v[0],v[1]),O.textMatrix=O.textLineMatrix.slice();break;case a.OPS.nextLine:O.carriageReturn();break;case a.OPS.setTextMatrix:O.setTextMatrix(v[0],v[1],v[2],v[3],v[4],v[5]),O.setTextLineMatrix(v[0],v[1],v[2],v[3],v[4],v[5]),R();break;case a.OPS.setCharSpacing:O.charSpacing=v[0];break;case a.OPS.setWordSpacing:O.wordSpacing=v[0];break;case a.OPS.beginText:O.textMatrix=a.IDENTITY_MATRIX.slice(),O.textLineMatrix=a.IDENTITY_MATRIX.slice();break;case a.OPS.showSpacedText:if(!n.state.font){S.ensureStateFont(n.state);continue}const f=(O.font.vertical?1:-1)*O.fontSize/1e3,p=v[0];for(let e=0,t=p.length;e<t;e++){const t=p[e];if("string"==typeof t)k.push(t);else if("number"==typeof t&&0!==t){const e=k.join("");k.length=0,z({chars:e,extraSpacing:t*f})}}if(k.length>0){const e=k.join("");k.length=0,z({chars:e,extraSpacing:0})}break;case a.OPS.showText:if(!n.state.font){S.ensureStateFont(n.state);continue}z({chars:v[0],extraSpacing:0});break;case a.OPS.nextLineShowText:if(!n.state.font){S.ensureStateFont(n.state);continue}O.carriageReturn(),z({chars:v[0],extraSpacing:0});break;case a.OPS.nextLineSetSpacingShowText:if(!n.state.font){S.ensureStateFont(n.state);continue}O.wordSpacing=v[0],O.charSpacing=v[1],O.carriageReturn(),z({chars:v[2],extraSpacing:0});break;case a.OPS.paintXObject:W(),C||(C=r.get("XObject")||i.Dict.empty);var F=v[0]instanceof i.Name,P=v[0].name;if(F&&_.getByName(P))break;return void g(new Promise((function(e,d){if(!F)throw new a.FormatError("XObject must be referred to by name.");let f=C.getRaw(P);if(f instanceof i.Ref){if(_.getByRef(f))return void e();if(S.globalImageCache.getData(f,S.pageIndex))return void e();f=x.fetch(f)}if(!(f instanceof m.BaseStream))throw new a.FormatError("XObject should be a stream");const p=f.dict.get("Subtype");if(!(p instanceof i.Name))throw new a.FormatError("XObject should have a Name subtype");if("Form"!==p.name)return _.set(P,f.dict.objId,!0),void e();const g=n.state.clone(),b=new B(g),y=f.dict.getArray("Matrix");Array.isArray(y)&&6===y.length&&b.transform(y),G();const v={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0,o.enqueue(e,t)},get desiredSize(){return o.desiredSize},get ready(){return o.ready}};S.getTextContent({stream:f,task:t,resources:f.dict.get("Resources")||r,stateManager:b,includeMarkedContent:s,sink:v,seenStyles:c,viewBox:l,markedContentData:h,disableNormalization:u}).then((function(){v.enqueueInvoked||_.set(P,f.dict.objId,!0),e()}),d)})).catch((function(e){if(!(e instanceof a.AbortException)){if(!S.options.ignoreErrors)throw e;(0,a.warn)(`getTextContent - ignoring XObject: "${e}".`)}})));case a.OPS.setGState:if(F=v[0]instanceof i.Name,P=v[0].name,F&&T.getByName(P))break;return void g(new Promise((function(e,t){if(!F)throw new a.FormatError("GState must be referred to by name.");const n=r.get("ExtGState");if(!(n instanceof i.Dict))throw new a.FormatError("ExtGState should be a dictionary.");const s=n.get(P);if(!(s instanceof i.Dict))throw new a.FormatError("GState should be a dictionary.");const o=s.get("Font");if(!o)return T.set(P,s.objId,!0),void e();W(),O.fontName=null,O.fontSize=o[1],N(null,o[0]).then(e,t)})).catch((function(e){if(!(e instanceof a.AbortException)){if(!S.options.ignoreErrors)throw e;(0,a.warn)(`getTextContent - ignoring ExtGState: "${e}".`)}})));case a.OPS.beginMarkedContent:W(),s&&(h.level++,d.items.push({type:"beginMarkedContent",tag:v[0]instanceof i.Name?v[0].name:null}));break;case a.OPS.beginMarkedContentProps:if(W(),s){h.level++;let e=null;v[1]instanceof i.Dict&&(e=v[1].get("MCID")),d.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${S.idFactory.getPageObjId()}_mc${e}`:null,tag:v[0]instanceof i.Name?v[0].name:null})}break;case a.OPS.endMarkedContent:if(W(),s){if(0===h.level)break;h.level--,d.items.push({type:"endMarkedContent"})}break;case a.OPS.restore:!e||e.font===O.font&&e.fontSize===O.fontSize&&e.fontName===O.fontName||W()}if(d.items.length>=o.desiredSize){y=!0;break}}y?g(I):(W(),G(),f())})).catch((e=>{if(!(e instanceof a.AbortException)){if(this.options.ignoreErrors)return(0,a.warn)(`getTextContent - ignoring errors during "${t.name}" task: "${e}".`),W(),void G();throw e}}))}extractDataStructures(e,t,r){const n=this.xref;let s;const l=this.readToUnicode(r.toUnicode||e.get("ToUnicode")||t.get("ToUnicode"));if(r.composite){const t=e.get("CIDSystemInfo");t instanceof i.Dict&&(r.cidSystemInfo={registry:(0,a.stringToPDFString)(t.get("Registry")),ordering:(0,a.stringToPDFString)(t.get("Ordering")),supplement:t.get("Supplement")});try{const t=e.get("CIDToGIDMap");t instanceof m.BaseStream&&(s=t.getBytes())}catch(e){if(!this.options.ignoreErrors)throw e;(0,a.warn)(`extractDataStructures - ignoring CIDToGIDMap data: "${e}".`)}}const h=[];let u,d=null;if(e.has("Encoding")){if(u=e.get("Encoding"),u instanceof i.Dict){if(d=u.get("BaseEncoding"),d=d instanceof i.Name?d.name:null,u.has("Differences")){const e=u.get("Differences");let t=0;for(const r of e){const e=n.fetchIfRef(r);if("number"==typeof e)t=e;else{if(!(e instanceof i.Name))throw new a.FormatError(`Invalid entry in 'Differences' array: ${e}`);h[t++]=e.name}}}}else if(u instanceof i.Name)d=u.name;else{const e="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new a.FormatError(e);(0,a.warn)(e)}"MacRomanEncoding"!==d&&"MacExpertEncoding"!==d&&"WinAnsiEncoding"!==d&&(d=null)}const f=!r.file||r.isInternalFont,p=(0,c.getSymbolsFonts)()[r.name];if(d&&f&&p&&(d=null),d)r.defaultEncoding=(0,o.getEncoding)(d);else{const e=!!(r.flags&w.FontFlags.Symbolic),t=!!(r.flags&w.FontFlags.Nonsymbolic);u=o.StandardEncoding,"TrueType"!==r.type||t||(u=o.WinAnsiEncoding),(e||p)&&(u=o.MacRomanEncoding,f&&(/Symbol/i.test(r.name)?u=o.SymbolSetEncoding:/Dingbats/i.test(r.name)?u=o.ZapfDingbatsEncoding:/Wingdings/i.test(r.name)&&(u=o.WinAnsiEncoding))),r.defaultEncoding=u}return r.differences=h,r.baseEncodingName=d,r.hasEncoding=!!d||h.length>0,r.dict=e,l.then((e=>(r.toUnicode=e,this.buildToUnicode(r)))).then((e=>(r.toUnicode=e,s&&(r.cidToGidMap=this.readCidToGidMap(s,e)),r)))}_simpleFontToUnicode(e,t=!1){(0,a.assert)(!e.composite,"Must be a simple font.");const r=[],n=e.defaultEncoding.slice(),i=e.baseEncodingName,s=e.differences;for(const e in s){const t=s[e];".notdef"!==t&&(n[e]=t)}const c=(0,S.getGlyphsUnicode)();for(const a in n){let s=n[a];if(""===s)continue;let l=c[s];if(void 0!==l){r[a]=String.fromCharCode(l);continue}let h=0;switch(s[0]){case"G":3===s.length&&(h=parseInt(s.substring(1),16));break;case"g":5===s.length&&(h=parseInt(s.substring(1),16));break;case"C":case"c":if(s.length>=3&&s.length<=4){const r=s.substring(1);if(t){h=parseInt(r,16);break}if(h=+r,Number.isNaN(h)&&Number.isInteger(parseInt(r,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":l=(0,k.getUnicodeForGlyph)(s,c),-1!==l&&(h=l);break;default:switch(s){case"f_h":case"f_t":case"T_h":r[a]=s.replaceAll("_","");continue}}if(h>0&&h<=1114111&&Number.isInteger(h)){if(i&&h===+a){const e=(0,o.getEncoding)(i);if(e&&(s=e[a])){r[a]=String.fromCharCode(c[s]);continue}}r[a]=String.fromCodePoint(h)}}return r}async buildToUnicode(e){if(e.hasIncludedToUnicodeMap=e.toUnicode?.length>0,e.hasIncludedToUnicodeMap)return!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e)),e.toUnicode;if(!e.composite)return new u.ToUnicodeMap(this._simpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap instanceof n.IdentityCMap)||"Adobe"===e.cidSystemInfo.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){const{registry:t,ordering:r}=e.cidSystemInfo,s=i.Name.get(`${t}-${r}-UCS2`),o=await n.CMapFactory.create({encoding:s,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),c=[],l=[];return e.cMap.forEach((function(e,t){if(t>65535)throw new a.FormatError("Max size of CID is 65,535");const r=o.lookup(t);if(r){l.length=0;for(let e=0,t=r.length;e<t;e+=2)l.push((r.charCodeAt(e)<<8)+r.charCodeAt(e+1));c[e]=String.fromCharCode(...l)}})),new u.ToUnicodeMap(c)}return new u.IdentityToUnicodeMap(e.firstChar,e.lastChar)}readToUnicode(e){return e?e instanceof i.Name?n.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(e){return e instanceof n.IdentityCMap?new u.IdentityToUnicodeMap(0,65535):new u.ToUnicodeMap(e.getMap())})):e instanceof m.BaseStream?n.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}).then((function(e){if(e instanceof n.IdentityCMap)return new u.IdentityToUnicodeMap(0,65535);const t=new Array(e.length);return e.forEach((function(e,r){if("number"==typeof r)return void(t[e]=String.fromCodePoint(r));const a=[];for(let e=0;e<r.length;e+=2){const t=r.charCodeAt(e)<<8|r.charCodeAt(e+1);if(55296!=(63488&t)){a.push(t);continue}e+=2;const n=r.charCodeAt(e)<<8|r.charCodeAt(e+1);a.push(((1023&t)<<10)+(1023&n)+65536)}t[e]=String.fromCodePoint(...a)})),new u.ToUnicodeMap(t)}),(e=>{if(e instanceof a.AbortException)return null;if(this.options.ignoreErrors)return(0,a.warn)(`readToUnicode - ignoring ToUnicode data: "${e}".`),null;throw e})):Promise.resolve(null):Promise.resolve(null)}readCidToGidMap(e,t){const r=[];for(let a=0,n=e.length;a<n;a++){const n=e[a++]<<8|e[a],i=a>>1;(0!==n||t.has(i))&&(r[i]=n)}return r}extractWidths(e,t,r){const a=this.xref;let n=[],s=0;const o=[];let c,l,h,u,d,f,p,g;if(r.composite){if(s=e.has("DW")?e.get("DW"):1e3,g=e.get("W"),g)for(l=0,h=g.length;l<h;l++)if(f=a.fetchIfRef(g[l++]),p=a.fetchIfRef(g[l]),Array.isArray(p))for(u=0,d=p.length;u<d;u++)n[f++]=a.fetchIfRef(p[u]);else{const e=a.fetchIfRef(g[++l]);for(u=f;u<=p;u++)n[u]=e}if(r.vertical){let t=e.getArray("DW2")||[880,-1e3];if(c=[t[1],.5*s,t[0]],t=e.get("W2"),t)for(l=0,h=t.length;l<h;l++)if(f=a.fetchIfRef(t[l++]),p=a.fetchIfRef(t[l]),Array.isArray(p))for(u=0,d=p.length;u<d;u++)o[f++]=[a.fetchIfRef(p[u++]),a.fetchIfRef(p[u++]),a.fetchIfRef(p[u])];else{const e=[a.fetchIfRef(t[++l]),a.fetchIfRef(t[++l]),a.fetchIfRef(t[++l])];for(u=f;u<=p;u++)o[u]=e}}}else{const o=r.firstChar;if(g=e.get("Widths"),g){for(u=o,l=0,h=g.length;l<h;l++)n[u++]=a.fetchIfRef(g[l]);s=parseFloat(t.get("MissingWidth"))||0}else{const t=e.get("BaseFont");if(t instanceof i.Name){const e=this.getBaseFontMetrics(t.name);n=this.buildCharCodeToWidth(e.widths,r),s=e.defaultWidth}}}let m=!0,b=s;for(const e in n){const t=n[e];if(t)if(b){if(b!==t){m=!1;break}}else b=t}m?r.flags|=w.FontFlags.FixedPitch:r.flags&=~w.FontFlags.FixedPitch,r.defaultWidth=s,r.widths=n,r.defaultVMetrics=c,r.vmetrics=o}isSerifFont(e){const t=e.split("-")[0];return t in(0,c.getSerifFonts)()||/serif/gi.test(t)}getBaseFontMetrics(e){let t=0,r=Object.create(null),a=!1,n=(0,c.getStdFontMap)()[e]||e;const i=(0,x.getMetrics)();n in i||(n=this.isSerifFont(e)?"Times-Roman":"Helvetica");const s=i[n];return"number"==typeof s?(t=s,a=!0):r=s(),{defaultWidth:t,monospace:a,widths:r}}buildCharCodeToWidth(e,t){const r=Object.create(null),a=t.differences,n=t.defaultEncoding;for(let t=0;t<256;t++)t in a&&e[a[t]]?r[t]=e[a[t]]:t in n&&e[n[t]]&&(r[t]=e[n[t]]);return r}preEvaluateFont(e){const t=e;let r=e.get("Subtype");if(!(r instanceof i.Name))throw new a.FormatError("invalid font Subtype");let n,s,o=!1;if("Type0"===r.name){const t=e.get("DescendantFonts");if(!t)throw new a.FormatError("Descendant fonts are not specified");if(!((e=Array.isArray(t)?this.xref.fetchIfRef(t[0]):t)instanceof i.Dict))throw new a.FormatError("Descendant font is not a dictionary.");if(r=e.get("Subtype"),!(r instanceof i.Name))throw new a.FormatError("invalid font Subtype");o=!0}const c=e.get("FirstChar")||0,l=e.get("LastChar")||(o?65535:255),h=e.get("FontDescriptor");if(h){n=new _.MurmurHash3_64;const r=t.getRaw("Encoding");if(r instanceof i.Name)n.update(r.name);else if(r instanceof i.Ref)n.update(r.toString());else if(r instanceof i.Dict)for(const e of r.getRawValues())if(e instanceof i.Name)n.update(e.name);else if(e instanceof i.Ref)n.update(e.toString());else if(Array.isArray(e)){const t=e.length,r=new Array(t);for(let a=0;a<t;a++){const t=e[a];t instanceof i.Name?r[a]=t.name:("number"==typeof t||t instanceof i.Ref)&&(r[a]=t.toString())}n.update(r.join())}if(n.update(`${c}-${l}`),s=e.get("ToUnicode")||t.get("ToUnicode"),s instanceof m.BaseStream){const e=s.str||s,t=e.buffer?new Uint8Array(e.buffer.buffer,0,e.bufferLength):new Uint8Array(e.bytes.buffer,e.start,e.end-e.start);n.update(t)}else s instanceof i.Name&&n.update(s.name);const a=e.get("Widths")||t.get("Widths");if(Array.isArray(a)){const e=[];for(const t of a)("number"==typeof t||t instanceof i.Ref)&&e.push(t.toString());n.update(e.join())}if(o){n.update("compositeFont");const r=e.get("W")||t.get("W");if(Array.isArray(r)){const e=[];for(const t of r)if("number"==typeof t||t instanceof i.Ref)e.push(t.toString());else if(Array.isArray(t)){const r=[];for(const e of t)("number"==typeof e||e instanceof i.Ref)&&r.push(e.toString());e.push(`[${r.join()}]`)}n.update(e.join())}const a=e.getRaw("CIDToGIDMap")||t.getRaw("CIDToGIDMap");a instanceof i.Name?n.update(a.name):a instanceof i.Ref?n.update(a.toString()):a instanceof m.BaseStream&&n.update(a.peekBytes())}}return{descriptor:h,dict:e,baseDict:t,composite:o,type:r.name,firstChar:c,lastChar:l,toUnicode:s,hash:n?n.hexdigest():""}}async translateFont({descriptor:e,dict:t,baseDict:r,composite:o,type:l,firstChar:u,lastChar:d,toUnicode:f,cssFontInfo:p}){const m="Type3"===l;let b;if(!e){if(!m){let e=t.get("BaseFont");if(!(e instanceof i.Name))throw new a.FormatError("Base font is not specified");e=e.name.replaceAll(/[,_]/g,"-");const n=this.getBaseFontMetrics(e),o=e.split("-")[0],h=(this.isSerifFont(o)?w.FontFlags.Serif:0)|(n.monospace?w.FontFlags.FixedPitch:0)|((0,c.getSymbolsFonts)()[o]?w.FontFlags.Symbolic:w.FontFlags.Nonsymbolic);b={type:l,name:e,loadedName:r.loadedName,systemFontInfo:null,widths:n.widths,defaultWidth:n.defaultWidth,isSimulatedFlags:!0,flags:h,firstChar:u,lastChar:d,toUnicode:f,xHeight:0,capHeight:0,italicAngle:0,isType3Font:m};const p=t.get("Widths"),g=(0,c.getStandardFontName)(e);let y=null;return g&&(y=await this.fetchStandardFontData(g),b.isInternalFont=!!y),!b.isInternalFont&&this.options.useSystemFonts&&(b.systemFontInfo=(0,A.getFontSubstitution)(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,e,g)),this.extractDataStructures(t,t,b).then((t=>{if(p){const e=[];let r=u;for(const t of p)e[r++]=this.xref.fetchIfRef(t);t.widths=e}else t.widths=this.buildCharCodeToWidth(n.widths,t);return new s.Font(e,y,t)}))}(e=new i.Dict(null)).set("FontName",i.Name.get(l)),e.set("FontBBox",t.getArray("FontBBox")||[0,0,0,0])}let y=e.get("FontName"),v=t.get("BaseFont");"string"==typeof y&&(y=i.Name.get(y)),"string"==typeof v&&(v=i.Name.get(v));const S=y?.name,x=v?.name;if(m||S===x||((0,a.info)(`The FontDescriptor's FontName is "${S}" but should be the same as the Font's BaseFont "${x}".`),S&&x&&(x.startsWith(S)||!(0,c.isKnownFontName)(S)&&(0,c.isKnownFontName)(x))&&(y=null)),y||=v,!(y instanceof i.Name))throw new a.FormatError("invalid font name");let k,C,_,T,E;try{k=e.get("FontFile","FontFile2","FontFile3")}catch(e){if(!this.options.ignoreErrors)throw e;(0,a.warn)(`translateFont - fetching "${y.name}" font file: "${e}".`),k=new g.NullStream}let O=!1,F=null,P=null;if(k){if(k.dict){const e=k.dict.get("Subtype");e instanceof i.Name&&(C=e.name),_=k.dict.get("Length1"),T=k.dict.get("Length2"),E=k.dict.get("Length3")}}else if(p){const e=(0,h.getXfaFontName)(y.name);e&&(p.fontFamily=`${p.fontFamily}-PdfJS-XFA`,p.metrics=e.metrics||null,F=e.factors||null,k=await this.fetchStandardFontData(e.name),O=!!k,r=t=(0,h.getXfaFontDict)(y.name),o=!0)}else if(!m){const e=(0,c.getStandardFontName)(y.name);e&&(k=await this.fetchStandardFontData(e),O=!!k),!O&&this.options.useSystemFonts&&(P=(0,A.getFontSubstitution)(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,y.name,e))}if(b={type:l,name:y.name,subtype:C,file:k,length1:_,length2:T,length3:E,isInternalFont:O,loadedName:r.loadedName,composite:o,fixedPitch:!1,fontMatrix:t.getArray("FontMatrix")||a.FONT_IDENTITY_MATRIX,firstChar:u,lastChar:d,toUnicode:f,bbox:e.getArray("FontBBox")||t.getArray("FontBBox"),ascent:e.get("Ascent"),descent:e.get("Descent"),xHeight:e.get("XHeight")||0,capHeight:e.get("CapHeight")||0,flags:e.get("Flags"),italicAngle:e.get("ItalicAngle")||0,isType3Font:m,cssFontInfo:p,scaleFactors:F,systemFontInfo:P},o){const e=r.get("Encoding");e instanceof i.Name&&(b.cidEncoding=e.name);const t=await n.CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});b.cMap=t,b.vertical=b.cMap.vertical}return this.extractDataStructures(t,r,b).then((r=>(this.extractWidths(t,e,r),new s.Font(y.name,k,r))))}static buildFontPaths(e,t,r,n){function i(t){const i=`${e.loadedName}_path_${t}`;try{if(e.renderer.hasBuiltPath(t))return;r.send("commonobj",[i,"FontPath",e.renderer.getPathJs(t)])}catch(e){if(n.ignoreErrors)return void(0,a.warn)(`buildFontPaths - ignoring ${i} glyph: "${e}".`);throw e}}for(const e of t){i(e.fontChar);const t=e.accent;t?.fontChar&&i(t.fontChar)}}static get fallbackFontDict(){const e=new i.Dict;return e.set("BaseFont",i.Name.get("Helvetica")),e.set("Type",i.Name.get("FallbackType")),e.set("Subtype",i.Name.get("FallbackType")),e.set("Encoding",i.Name.get("WinAnsiEncoding")),(0,a.shadow)(this,"fallbackFontDict",e)}}t.PartialEvaluator=N;class L{constructor({loadedName:e,font:t,dict:r,evaluatorOptions:a}){this.loadedName=e,this.font=t,this.dict=r,this._evaluatorOptions=a||O,this.type3Loaded=null,this.type3Dependencies=t.isType3Font?new Set:null,this.sent=!1}send(e){this.sent||(this.sent=!0,e.send("commonobj",[this.loadedName,"Font",this.font.exportData(this._evaluatorOptions.fontExtraProperties)]))}fallback(e){this.font.data&&(this.font.disableFontFace=!0,N.buildFontPaths(this.font,this.font.glyphCacheValues,e,this._evaluatorOptions))}loadType3Data(e,t,r){if(this.type3Loaded)return this.type3Loaded;if(!this.font.isType3Font)throw new Error("Must be a Type3 font.");const n=e.clone({ignoreErrors:!1});n.parsingType3Font=!0;const s=new i.RefSet(e.type3FontRefs);this.dict.objId&&!s.has(this.dict.objId)&&s.put(this.dict.objId),n.type3FontRefs=s;const o=this.font,c=this.type3Dependencies;let l=Promise.resolve();const h=this.dict.get("CharProcs"),u=this.dict.get("Resources")||t,d=Object.create(null),f=a.Util.normalizeRect(o.bbox||[0,0,0,0]),p=f[2]-f[0],g=f[3]-f[1],m=Math.hypot(p,g);for(const e of h.getKeys())l=l.then((()=>{const t=h.get(e),i=new T.OperatorList;return n.getOperatorList({stream:t,task:r,resources:u,operatorList:i}).then((()=>{i.fnArray[0]===a.OPS.setCharWidthAndBounds&&this._removeType3ColorOperators(i,m),d[e]=i.getIR();for(const e of i.dependencies)c.add(e)})).catch((function(t){(0,a.warn)(`Type3 font resource "${e}" is not available.`);const r=new T.OperatorList;d[e]=r.getIR()}))}));return this.type3Loaded=l.then((()=>{o.charProcOperatorList=d,this._bbox&&(o.isCharBBox=!0,o.bbox=this._bbox)})),this.type3Loaded}_removeType3ColorOperators(e,t=NaN){const r=a.Util.normalizeRect(e.argsArray[0].slice(2)),n=r[2]-r[0],i=r[3]-r[1],s=Math.hypot(n,i);0===n||0===i?(e.fnArray.splice(0,1),e.argsArray.splice(0,1)):(0===t||Math.round(s/t)>=10)&&(this._bbox||(this._bbox=[1/0,1/0,-1/0,-1/0]),this._bbox[0]=Math.min(this._bbox[0],r[0]),this._bbox[1]=Math.min(this._bbox[1],r[1]),this._bbox[2]=Math.max(this._bbox[2],r[2]),this._bbox[3]=Math.max(this._bbox[3],r[3]));let o=0,c=e.length;for(;o<c;){switch(e.fnArray[o]){case a.OPS.setCharWidthAndBounds:break;case a.OPS.setStrokeColorSpace:case a.OPS.setFillColorSpace:case a.OPS.setStrokeColor:case a.OPS.setStrokeColorN:case a.OPS.setFillColor:case a.OPS.setFillColorN:case a.OPS.setStrokeGray:case a.OPS.setFillGray:case a.OPS.setStrokeRGBColor:case a.OPS.setFillRGBColor:case a.OPS.setStrokeCMYKColor:case a.OPS.setFillCMYKColor:case a.OPS.shadingFill:case a.OPS.setRenderingIntent:e.fnArray.splice(o,1),e.argsArray.splice(o,1),c--;continue;case a.OPS.setGState:const[t]=e.argsArray[o];let r=0,n=t.length;for(;r<n;){const[e]=t[r];switch(e){case"TR":case"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":t.splice(r,1),n--;continue}r++}}o++}}}class B{constructor(e=new $){this.state=e,this.stateStack=[]}save(){const e=this.state;this.stateStack.push(this.state),this.state=e.clone()}restore(){const e=this.stateStack.pop();e&&(this.state=e)}transform(e){this.state.ctm=a.Util.transform(this.state.ctm,e)}}class j{constructor(){this.ctm=new Float32Array(a.IDENTITY_MATRIX),this.fontName=null,this.fontSize=0,this.loadedName=null,this.font=null,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.textMatrix=a.IDENTITY_MATRIX.slice(),this.textLineMatrix=a.IDENTITY_MATRIX.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}setTextMatrix(e,t,r,a,n,i){const s=this.textMatrix;s[0]=e,s[1]=t,s[2]=r,s[3]=a,s[4]=n,s[5]=i}setTextLineMatrix(e,t,r,a,n,i){const s=this.textLineMatrix;s[0]=e,s[1]=t,s[2]=r,s[3]=a,s[4]=n,s[5]=i}translateTextMatrix(e,t){const r=this.textMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}translateTextLineMatrix(e,t){const r=this.textLineMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()}clone(){const e=Object.create(this);return e.textMatrix=this.textMatrix.slice(),e.textLineMatrix=this.textLineMatrix.slice(),e.fontMatrix=this.fontMatrix.slice(),e}}class ${constructor(){this.ctm=new Float32Array(a.IDENTITY_MATRIX),this.font=null,this.textRenderingMode=a.TextRenderingMode.FILL,this.fillColorSpace=y.ColorSpace.singletons.gray,this.strokeColorSpace=y.ColorSpace.singletons.gray}clone(){return Object.create(this)}}class U{static get opMap(){return(0,a.shadow)(this,"opMap",{w:{id:a.OPS.setLineWidth,numArgs:1,variableArgs:!1},J:{id:a.OPS.setLineCap,numArgs:1,variableArgs:!1},j:{id:a.OPS.setLineJoin,numArgs:1,variableArgs:!1},M:{id:a.OPS.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:a.OPS.setDash,numArgs:2,variableArgs:!1},ri:{id:a.OPS.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:a.OPS.setFlatness,numArgs:1,variableArgs:!1},gs:{id:a.OPS.setGState,numArgs:1,variableArgs:!1},q:{id:a.OPS.save,numArgs:0,variableArgs:!1},Q:{id:a.OPS.restore,numArgs:0,variableArgs:!1},cm:{id:a.OPS.transform,numArgs:6,variableArgs:!1},m:{id:a.OPS.moveTo,numArgs:2,variableArgs:!1},l:{id:a.OPS.lineTo,numArgs:2,variableArgs:!1},c:{id:a.OPS.curveTo,numArgs:6,variableArgs:!1},v:{id:a.OPS.curveTo2,numArgs:4,variableArgs:!1},y:{id:a.OPS.curveTo3,numArgs:4,variableArgs:!1},h:{id:a.OPS.closePath,numArgs:0,variableArgs:!1},re:{id:a.OPS.rectangle,numArgs:4,variableArgs:!1},S:{id:a.OPS.stroke,numArgs:0,variableArgs:!1},s:{id:a.OPS.closeStroke,numArgs:0,variableArgs:!1},f:{id:a.OPS.fill,numArgs:0,variableArgs:!1},F:{id:a.OPS.fill,numArgs:0,variableArgs:!1},"f*":{id:a.OPS.eoFill,numArgs:0,variableArgs:!1},B:{id:a.OPS.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:a.OPS.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:a.OPS.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:a.OPS.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:a.OPS.endPath,numArgs:0,variableArgs:!1},W:{id:a.OPS.clip,numArgs:0,variableArgs:!1},"W*":{id:a.OPS.eoClip,numArgs:0,variableArgs:!1},BT:{id:a.OPS.beginText,numArgs:0,variableArgs:!1},ET:{id:a.OPS.endText,numArgs:0,variableArgs:!1},Tc:{id:a.OPS.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:a.OPS.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:a.OPS.setHScale,numArgs:1,variableArgs:!1},TL:{id:a.OPS.setLeading,numArgs:1,variableArgs:!1},Tf:{id:a.OPS.setFont,numArgs:2,variableArgs:!1},Tr:{id:a.OPS.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:a.OPS.setTextRise,numArgs:1,variableArgs:!1},Td:{id:a.OPS.moveText,numArgs:2,variableArgs:!1},TD:{id:a.OPS.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:a.OPS.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:a.OPS.nextLine,numArgs:0,variableArgs:!1},Tj:{id:a.OPS.showText,numArgs:1,variableArgs:!1},TJ:{id:a.OPS.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:a.OPS.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:a.OPS.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:a.OPS.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:a.OPS.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:a.OPS.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:a.OPS.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:a.OPS.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:a.OPS.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:a.OPS.setFillColor,numArgs:4,variableArgs:!0},scn:{id:a.OPS.setFillColorN,numArgs:33,variableArgs:!0},G:{id:a.OPS.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:a.OPS.setFillGray,numArgs:1,variableArgs:!1},RG:{id:a.OPS.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:a.OPS.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:a.OPS.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:a.OPS.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:a.OPS.shadingFill,numArgs:1,variableArgs:!1},BI:{id:a.OPS.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:a.OPS.beginImageData,numArgs:0,variableArgs:!1},EI:{id:a.OPS.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:a.OPS.paintXObject,numArgs:1,variableArgs:!1},MP:{id:a.OPS.markPoint,numArgs:1,variableArgs:!1},DP:{id:a.OPS.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:a.OPS.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:a.OPS.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:a.OPS.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:a.OPS.beginCompat,numArgs:0,variableArgs:!1},EX:{id:a.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})}static MAX_INVALID_PATH_OPS=10;constructor(e,t,r=new B){this.parser=new f.Parser({lexer:new f.Lexer(e,U.opMap),xref:t}),this.stateManager=r,this.nonProcessedArgs=[],this._isPathOp=!1,this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(e){let t=e.args;for(;;){const r=this.parser.getObj();if(r instanceof i.Cmd){const n=r.cmd,i=U.opMap[n];if(!i){(0,a.warn)(`Unknown command "${n}".`);continue}const s=i.id,o=i.numArgs;let c=null!==t?t.length:0;if(this._isPathOp||(this._numInvalidPathOPS=0),this._isPathOp=s>=a.OPS.moveTo&&s<=a.OPS.endPath,i.variableArgs)c>o&&(0,a.info)(`Command ${n}: expected [0, ${o}] args, but received ${c} args.`);else{if(c!==o){const e=this.nonProcessedArgs;for(;c>o;)e.push(t.shift()),c--;for(;c<o&&0!==e.length;)null===t&&(t=[]),t.unshift(e.pop()),c++}if(c<o){const e=`command ${n}: expected ${o} args, but received ${c} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>U.MAX_INVALID_PATH_OPS)throw new a.FormatError(`Invalid ${e}`);(0,a.warn)(`Skipping ${e}`),null!==t&&(t.length=0);continue}}return this.preprocessCommand(s,t),e.fn=s,e.args=t,!0}if(r===i.EOF)return!1;if(null!==r&&(null===t&&(t=[]),t.push(r),t.length>33))throw new a.FormatError("Too many arguments")}}preprocessCommand(e,t){switch(0|e){case a.OPS.save:this.stateManager.save();break;case a.OPS.restore:this.stateManager.restore();break;case a.OPS.transform:this.stateManager.transform(t)}}}t.EvaluatorPreprocessor=U},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityCMap=t.CMapFactory=t.CMap=void 0;var a=r(2),n=r(4),i=r(5),s=r(15),o=r(16),c=r(3),l=r(8);const h=["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"],u=2**24-1;class d{constructor(e=!1){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=e}addCodespaceRange(e,t,r){this.codespaceRanges[e-1].push(t,r),this.numCodespaceRanges++}mapCidRange(e,t,r){if(t-e>u)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=r++}mapBfRange(e,t,r){if(t-e>u)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const a=r.length-1;for(;e<=t;){this._map[e++]=r;const t=r.charCodeAt(a)+1;r=t>255?r.substring(0,a-1)+String.fromCharCode(r.charCodeAt(a-1)+1)+"\0":r.substring(0,a)+String.fromCharCode(t)}}mapBfRangeToArray(e,t,r){if(t-e>u)throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const a=r.length;let n=0;for(;e<=t&&n<a;)this._map[e]=r[n++],++e}mapOne(e,t){this._map[e]=t}lookup(e){return this._map[e]}contains(e){return void 0!==this._map[e]}forEach(e){const t=this._map,r=t.length;if(r<=65536)for(let a=0;a<r;a++)void 0!==t[a]&&e(a,t[a]);else for(const r in t)e(r,t[r])}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const r in t)if(t[r]===e)return 0|r;return-1}getMap(){return this._map}readCharCode(e,t,r){let a=0;const n=this.codespaceRanges;for(let i=0,s=n.length;i<s;i++){a=(a<<8|e.charCodeAt(t+i))>>>0;const s=n[i];for(let e=0,t=s.length;e<t;){const t=s[e++],n=s[e++];if(a>=t&&a<=n)return r.charcode=a,void(r.length=i+1)}}r.charcode=0,r.length=1}getCharCodeLength(e){const t=this.codespaceRanges;for(let r=0,a=t.length;r<a;r++){const a=t[r];for(let t=0,n=a.length;t<n;){const n=a[t++],i=a[t++];if(e>=n&&e<=i)return r+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}t.CMap=d;class f extends d{constructor(e,t){super(),this.vertical=e,this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,r){(0,a.unreachable)("should not call mapCidRange")}mapBfRange(e,t,r){(0,a.unreachable)("should not call mapBfRange")}mapBfRangeToArray(e,t,r){(0,a.unreachable)("should not call mapBfRangeToArray")}mapOne(e,t){(0,a.unreachable)("should not call mapCidOne")}lookup(e){return Number.isInteger(e)&&e<=65535?e:void 0}contains(e){return Number.isInteger(e)&&e<=65535}forEach(e){for(let t=0;t<=65535;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&e<=65535?e:-1}getMap(){const e=new Array(65536);for(let t=0;t<=65535;t++)e[t]=t;return e}get length(){return 65536}get isIdentityCMap(){(0,a.unreachable)("should not access .isIdentityCMap")}}function p(e){let t=0;for(let r=0;r<e.length;r++)t=t<<8|e.charCodeAt(r);return t>>>0}function g(e){if("string"!=typeof e)throw new a.FormatError("Malformed CMap: expected string.")}function m(e){if(!Number.isInteger(e))throw new a.FormatError("Malformed CMap: expected int.")}function b(e,t){for(;;){let r=t.getObj();if(r===n.EOF)break;if((0,n.isCmd)(r,"endbfchar"))return;g(r);const a=p(r);r=t.getObj(),g(r);const i=r;e.mapOne(a,i)}}function y(e,t){for(;;){let r=t.getObj();if(r===n.EOF)break;if((0,n.isCmd)(r,"endbfrange"))return;g(r);const a=p(r);r=t.getObj(),g(r);const i=p(r);if(r=t.getObj(),Number.isInteger(r)||"string"==typeof r){const t=Number.isInteger(r)?String.fromCharCode(r):r;e.mapBfRange(a,i,t)}else{if(!(0,n.isCmd)(r,"["))break;{r=t.getObj();const s=[];for(;!(0,n.isCmd)(r,"]")&&r!==n.EOF;)s.push(r),r=t.getObj();e.mapBfRangeToArray(a,i,s)}}}throw new a.FormatError("Invalid bf range.")}function v(e,t){for(;;){let r=t.getObj();if(r===n.EOF)break;if((0,n.isCmd)(r,"endcidchar"))return;g(r);const a=p(r);r=t.getObj(),m(r);const i=r;e.mapOne(a,i)}}function w(e,t){for(;;){let r=t.getObj();if(r===n.EOF)break;if((0,n.isCmd)(r,"endcidrange"))return;g(r);const a=p(r);r=t.getObj(),g(r);const i=p(r);r=t.getObj(),m(r);const s=r;e.mapCidRange(a,i,s)}}function A(e,t){for(;;){let r=t.getObj();if(r===n.EOF)break;if((0,n.isCmd)(r,"endcodespacerange"))return;if("string"!=typeof r)break;const a=p(r);if(r=t.getObj(),"string"!=typeof r)break;const i=p(r);e.addCodespaceRange(r.length,a,i)}throw new a.FormatError("Invalid codespace range.")}function S(e,t){const r=t.getObj();Number.isInteger(r)&&(e.vertical=!!r)}function x(e,t){const r=t.getObj();r instanceof n.Name&&(e.name=r.name)}async function k(e,t,r,i){let s,o;e:for(;;)try{const r=t.getObj();if(r===n.EOF)break;if(r instanceof n.Name)"WMode"===r.name?S(e,t):"CMapName"===r.name&&x(e,t),s=r;else if(r instanceof n.Cmd)switch(r.cmd){case"endcmap":break e;case"usecmap":s instanceof n.Name&&(o=s.name);break;case"begincodespacerange":A(e,t);break;case"beginbfchar":b(e,t);break;case"begincidchar":v(e,t);break;case"beginbfrange":y(e,t);break;case"begincidrange":w(e,t)}}catch(e){if(e instanceof c.MissingDataException)throw e;(0,a.warn)("Invalid cMap data: "+e);continue}return!i&&o&&(i=o),i?C(e,r,i):e}async function C(e,t,r){if(e.useCMap=await _(r,t),0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let r=0;r<t.length;r++)e.codespaceRanges[r]=t[r].slice();e.numCodespaceRanges=e.useCMap.numCodespaceRanges}return e.useCMap.forEach((function(t,r){e.contains(t)||e.mapOne(t,e.useCMap.lookup(t))})),e}async function _(e,t){if("Identity-H"===e)return new f(!1,2);if("Identity-V"===e)return new f(!0,2);if(!h.includes(e))throw new Error("Unknown CMap name: "+e);if(!t)throw new Error("Built-in CMap parameters are not provided.");const{cMapData:r,compressionType:n}=await t(e),i=new d(!0);if(n===a.CMapCompressionType.BINARY)return(new s.BinaryCMapReader).process(r,i,(e=>C(i,t,e)));if(n===a.CMapCompressionType.NONE){const e=new o.Lexer(new l.Stream(r));return k(i,e,t,null)}throw new Error(`Invalid CMap "compressionType" value: ${n}`)}t.IdentityCMap=f,t.CMapFactory=class{static async create({encoding:e,fetchBuiltInCMap:t,useCMap:r}){if(e instanceof n.Name)return _(e.name,t);if(e instanceof i.BaseStream){const a=await k(new d,new o.Lexer(e),t,r);return a.isIdentityCMap?_(a.name,t):a}throw new Error("Encoding required.")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryCMapReader=void 0;var a=r(2);function n(e,t){let r=0;for(let a=0;a<=t;a++)r=r<<8|e[a];return r>>>0}function i(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode(...e.subarray(0,t+1))}function s(e,t,r){let a=0;for(let n=r;n>=0;n--)a+=e[n]+t[n],e[n]=255&a,a>>=8}function o(e,t){let r=1;for(let a=t;a>=0&&r>0;a--)r+=e[a],e[a]=255&r,r>>=8}const c=16;class l{constructor(e){this.buffer=e,this.pos=0,this.end=e.length,this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let e,t=0;do{const r=this.readByte();if(r<0)throw new a.FormatError("unexpected EOF in bcmap");e=!(128&r),t=t<<7|127&r}while(!e);return t}readSigned(){const e=this.readNumber();return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1)),this.pos+=t+1}readHexNumber(e,t){let r;const n=this.tmpBuf;let i=0;do{const e=this.readByte();if(e<0)throw new a.FormatError("unexpected EOF in bcmap");r=!(128&e),n[i++]=127&e}while(!r);let s=t,o=0,c=0;for(;s>=0;){for(;c<8&&n.length>0;)o|=n[--i]<<c,c+=7;e[s]=255&o,s--,o>>=8,c-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const r=1&e[t]?255:0;let a=0;for(let n=0;n<=t;n++)a=(1&a)<<8|e[n],e[n]=a>>1^r}readString(){const e=this.readNumber(),t=new Array(e);for(let r=0;r<e;r++)t[r]=this.readNumber();return String.fromCharCode(...t)}}t.BinaryCMapReader=class{async process(e,t,r){const a=new l(e),h=a.readByte();t.vertical=!!(1&h);let u=null;const d=new Uint8Array(c),f=new Uint8Array(c),p=new Uint8Array(c),g=new Uint8Array(c),m=new Uint8Array(c);let b,y;for(;(y=a.readByte())>=0;){const e=y>>5;if(7===e){switch(31&y){case 0:a.readString();break;case 1:u=a.readString()}continue}const r=!!(16&y),l=15&y;if(l+1>c)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const h=1,v=a.readNumber();switch(e){case 0:a.readHex(d,l),a.readHexNumber(f,l),s(f,d,l),t.addCodespaceRange(l+1,n(d,l),n(f,l));for(let e=1;e<v;e++)o(f,l),a.readHexNumber(d,l),s(d,f,l),a.readHexNumber(f,l),s(f,d,l),t.addCodespaceRange(l+1,n(d,l),n(f,l));break;case 1:a.readHex(d,l),a.readHexNumber(f,l),s(f,d,l),a.readNumber();for(let e=1;e<v;e++)o(f,l),a.readHexNumber(d,l),s(d,f,l),a.readHexNumber(f,l),s(f,d,l),a.readNumber();break;case 2:a.readHex(p,l),b=a.readNumber(),t.mapOne(n(p,l),b);for(let e=1;e<v;e++)o(p,l),r||(a.readHexNumber(m,l),s(p,m,l)),b=a.readSigned()+(b+1),t.mapOne(n(p,l),b);break;case 3:a.readHex(d,l),a.readHexNumber(f,l),s(f,d,l),b=a.readNumber(),t.mapCidRange(n(d,l),n(f,l),b);for(let e=1;e<v;e++)o(f,l),r?d.set(f):(a.readHexNumber(d,l),s(d,f,l)),a.readHexNumber(f,l),s(f,d,l),b=a.readNumber(),t.mapCidRange(n(d,l),n(f,l),b);break;case 4:a.readHex(p,h),a.readHex(g,l),t.mapOne(n(p,h),i(g,l));for(let e=1;e<v;e++)o(p,h),r||(a.readHexNumber(m,h),s(p,m,h)),o(g,l),a.readHexSigned(m,l),s(g,m,l),t.mapOne(n(p,h),i(g,l));break;case 5:a.readHex(d,h),a.readHexNumber(f,h),s(f,d,h),a.readHex(g,l),t.mapBfRange(n(d,h),n(f,h),i(g,l));for(let e=1;e<v;e++)o(f,h),r?d.set(f):(a.readHexNumber(d,h),s(d,f,h)),a.readHexNumber(f,h),s(f,d,h),a.readHex(g,l),t.mapBfRange(n(d,h),n(f,h),i(g,l));break;default:throw new Error(`BinaryCMapReader.process - unknown type: ${e}`)}}return u?r(u):t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=t.Linearization=t.Lexer=void 0;var a=r(2),n=r(4),i=r(3),s=r(8),o=r(17),c=r(19),l=r(20),h=r(22),u=r(23),d=r(26),f=r(29),p=r(31),g=r(32),m=r(33);class b{constructor({lexer:e,xref:t,allowStreams:r=!1,recoveryMode:a=!1}){this.lexer=e,this.xref=t,this.allowStreams=r,this.recoveryMode=a,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 n.Cmd&&"ID"===this.buf2.cmd?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())}tryShift(){try{return this.shift(),!0}catch(e){if(e instanceof i.MissingDataException)throw e;return!1}}getObj(e=null){const t=this.buf1;if(this.shift(),t instanceof n.Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const r=[];for(;!(0,n.isCmd)(this.buf1,"]")&&this.buf1!==n.EOF;)r.push(this.getObj(e));if(this.buf1===n.EOF){if(this.recoveryMode)return r;throw new i.ParserEOFException("End of file inside array.")}return this.shift(),r;case"<<":const s=new n.Dict(this.xref);for(;!(0,n.isCmd)(this.buf1,">>")&&this.buf1!==n.EOF;){if(!(this.buf1 instanceof n.Name)){(0,a.info)("Malformed dictionary: key must be a name object"),this.shift();continue}const t=this.buf1.name;if(this.shift(),this.buf1===n.EOF)break;s.set(t,this.getObj(e))}if(this.buf1===n.EOF){if(this.recoveryMode)return s;throw new i.ParserEOFException("End of file inside dictionary.")}return(0,n.isCmd)(this.buf2,"stream")?this.allowStreams?this.makeStream(s,e):s:(this.shift(),s);default:return t}if(Number.isInteger(t)){if(Number.isInteger(this.buf1)&&(0,n.isCmd)(this.buf2,"R")){const e=n.Ref.get(t,this.buf1);return this.shift(),this.shift(),e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const{knownCommands:t}=this.lexer,r=e.pos;let o,c,l=0;for(;-1!==(o=e.getByte());)if(0===l)l=69===o?1:0;else if(1===l)l=73===o?2:0;else if(32===o||10===o||13===o){c=e.pos;const r=e.peekBytes(15),i=r.length;if(0===i)break;for(let e=0;e<i;e++)if(o=r[e],(0!==o||0===r[e+1])&&10!==o&&13!==o&&(o<32||o>127)){l=0;break}if(2!==l)continue;if(!t){(0,a.warn)("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const h=new w(new s.Stream(r.slice()),t);h._hexStringWarn=()=>{};let u=0;for(;;){const e=h.getObj();if(e===n.EOF){l=0;break}if(e instanceof n.Cmd){const r=t[e.cmd];if(!r){l=0;break}if(r.variableArgs?u<=r.numArgs:u===r.numArgs)break;u=0}else u++}if(2===l)break}else l=0;-1===o&&((0,a.warn)("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker"),c&&((0,a.warn)('... trying to recover by using the last "EI" occurrence.'),e.skip(-(e.pos-c))));let h=4;return e.skip(-h),o=e.peekByte(),e.skip(h),(0,i.isWhiteSpace)(o)||h--,e.pos-h-r}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let r,n,i=!1;for(;-1!==(r=e.getByte());)if(255===r){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!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:n=e.getUint16(),n>2?e.skip(n-2):e.skip(-2)}if(i)break}const s=e.pos-t;return-1===r?((0,a.warn)("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),e.skip(-s),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),s)}findASCII85DecodeInlineStreamEnd(e){const t=e.pos;let r;for(;-1!==(r=e.getByte());)if(126===r){const t=e.pos;for(r=e.peekByte();(0,i.isWhiteSpace)(r);)e.skip(),r=e.peekByte();if(62===r){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const n=e.pos-t;return-1===r?((0,a.warn)("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-n),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),n)}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let r;for(;-1!==(r=e.getByte())&&62!==r;);const n=e.pos-t;return-1===r?((0,a.warn)("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),e.skip(-n),this.findDefaultInlineStreamEnd(e)):(this.inlineStreamSkipEI(e),n)}inlineStreamSkipEI(e){let t,r=0;for(;-1!==(t=e.getByte());)if(0===r)r=69===t?1:0;else if(1===r)r=73===t?2:0;else if(2===r)break}makeInlineImage(e){const t=this.lexer,r=t.stream,i=Object.create(null);let s;for(;!(0,n.isCmd)(this.buf1,"ID")&&this.buf1!==n.EOF;){if(!(this.buf1 instanceof n.Name))throw new a.FormatError("Dictionary key must be a name object");const t=this.buf1.name;if(this.shift(),this.buf1===n.EOF)break;i[t]=this.getObj(e)}-1!==t.beginInlineImagePos&&(s=r.pos-t.beginInlineImagePos);const o=this.xref.fetchIfRef(i.F||i.Filter);let c;if(o instanceof n.Name)c=o.name;else if(Array.isArray(o)){const e=this.xref.fetchIfRef(o[0]);e instanceof n.Name&&(c=e.name)}const l=r.pos;let h,u;switch(c){case"DCT":case"DCTDecode":h=this.findDCTDecodeInlineStreamEnd(r);break;case"A85":case"ASCII85Decode":h=this.findASCII85DecodeInlineStreamEnd(r);break;case"AHx":case"ASCIIHexDecode":h=this.findASCIIHexDecodeInlineStreamEnd(r);break;default:h=this.findDefaultInlineStreamEnd(r)}if(h<1e3&&s>0){const e=r.pos;r.pos=t.beginInlineImagePos,u=function(e){const t=[],r=e.length;let a=0;for(;a<r-1;)t.push(e[a++]<<8|e[a++]);return a<r&&t.push(e[a]),r+"_"+String.fromCharCode.apply(null,t)}(r.getBytes(s+h)),r.pos=e;const a=this.imageCache[u];if(void 0!==a)return this.buf2=n.Cmd.get("EI"),this.shift(),a.reset(),a}const d=new n.Dict(this.xref);for(const e in i)d.set(e,i[e]);let f=r.makeSubStream(l,h,d);return e&&(f=e.createStream(f,h)),f=this.filter(f,d,h),f.dict=d,void 0!==u&&(f.cacheKey="inline_img_"+ ++this._imageId,this.imageCache[u]=f),this.buf2=n.Cmd.get("EI"),this.shift(),f}_findStreamLength(e,t){const{stream:r}=this.lexer;r.pos=e;const a=t.length;for(;r.pos<r.end;){const n=r.peekBytes(2048),i=n.length-a;if(i<=0)break;let s=0;for(;s<i;){let i=0;for(;i<a&&n[s+i]===t[i];)i++;if(i>=a)return r.pos+=s,r.pos-e;s++}r.pos+=i}return-1}makeStream(e,t){const r=this.lexer;let s=r.stream;r.skipToNextLine();const o=s.pos-1;let c=e.get("Length");if(Number.isInteger(c)||((0,a.info)(`Bad length "${c&&c.toString()}" in stream.`),c=0),s.pos=o+c,r.nextChar(),this.tryShift()&&(0,n.isCmd)(this.buf2,"endstream"))this.shift();else{const e=new Uint8Array([101,110,100,115,116,114,101,97,109]);let t=this._findStreamLength(o,e);if(t<0){const r=1;for(let n=1;n<=r;n++){const r=e.length-n,c=e.slice(0,r),l=this._findStreamLength(o,c);if(l>=0){const e=s.peekBytes(r+1)[r];if(!(0,i.isWhiteSpace)(e))break;(0,a.info)(`Found "${(0,a.bytesToString)(c)}" when searching for endstream command.`),t=l;break}}if(t<0)throw new a.FormatError("Missing endstream command.")}c=t,r.nextChar(),this.shift(),this.shift()}return this.shift(),s=s.makeSubStream(o,c,e),t&&(s=t.createStream(s,c)),s=this.filter(s,e,c),s.dict=e,s}filter(e,t,r){let i=t.get("F","Filter"),s=t.get("DP","DecodeParms");if(i instanceof n.Name)return Array.isArray(s)&&(0,a.warn)("/DecodeParms should not be an Array, when /Filter is a Name."),this.makeFilter(e,i.name,r,s);let o=r;if(Array.isArray(i)){const t=i,r=s;for(let c=0,l=t.length;c<l;++c){if(i=this.xref.fetchIfRef(t[c]),!(i instanceof n.Name))throw new a.FormatError(`Bad filter name "${i}"`);s=null,Array.isArray(r)&&c in r&&(s=this.xref.fetchIfRef(r[c])),e=this.makeFilter(e,i.name,o,s),o=null}}return e}makeFilter(e,t,r,n){if(0===r)return(0,a.warn)(`Empty "${t}" stream.`),new s.NullStream;try{switch(t){case"Fl":case"FlateDecode":return n?new g.PredictorStream(new h.FlateStream(e,r),r,n):new h.FlateStream(e,r);case"LZW":case"LZWDecode":let t=1;return n?(n.has("EarlyChange")&&(t=n.get("EarlyChange")),new g.PredictorStream(new p.LZWStream(e,r,t),r,n)):new p.LZWStream(e,r,t);case"DCT":case"DCTDecode":return new d.JpegStream(e,r,n);case"JPX":case"JPXDecode":return new f.JpxStream(e,r,n);case"A85":case"ASCII85Decode":return new o.Ascii85Stream(e,r);case"AHx":case"ASCIIHexDecode":return new c.AsciiHexStream(e,r);case"CCF":case"CCITTFaxDecode":return new l.CCITTFaxStream(e,r,n);case"RL":case"RunLengthDecode":return new m.RunLengthStream(e,r);case"JBIG2Decode":return new u.Jbig2Stream(e,r,n)}return(0,a.warn)(`Filter "${t}" is not supported.`),e}catch(e){if(e instanceof i.MissingDataException)throw e;return(0,a.warn)(`Invalid stream: "${e}"`),new s.NullStream}}}t.Parser=b;const y=[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 v(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}class w{constructor(e,t=null){this.stream=e,this.nextChar(),this.strBuf=[],this.knownCommands=t,this._hexStringNumWarn=0,this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=!1,r=0,n=1;if(45===e?(n=-1,e=this.nextChar(),45===e&&(e=this.nextChar())):43===e&&(e=this.nextChar()),10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e&&(r=10,e=this.nextChar()),e<48||e>57){const t=`Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;if((0,i.isWhiteSpace)(e)||-1===e)return(0,a.info)(`Lexer.getNumber - "${t}".`),0;throw new a.FormatError(t)}let s=e-48,o=0,c=1;for(;(e=this.nextChar())>=0;)if(e>=48&&e<=57){const a=e-48;t?o=10*o+a:(0!==r&&(r*=10),s=10*s+a)}else if(46===e){if(0!==r)break;r=1}else if(45===e)(0,a.warn)("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;if(e=this.peekChar(),43===e||45===e)c=45===e?-1:1,this.nextChar();else if(e<48||e>57)break;t=!0}return 0!==r&&(s/=r),t&&(s*=10**(c*o)),n*s}getString(){let e=1,t=!1;const r=this.strBuf;r.length=0;let n=this.nextChar();for(;;){let i=!1;switch(0|n){case-1:(0,a.warn)("Unterminated string"),t=!0;break;case 40:++e,r.push("(");break;case 41:0==--e?(this.nextChar(),t=!0):r.push(")");break;case 92:switch(n=this.nextChar(),n){case-1:(0,a.warn)("Unterminated string"),t=!0;break;case 110:r.push("\n");break;case 114:r.push("\r");break;case 116:r.push("\t");break;case 98:r.push("\b");break;case 102:r.push("\f");break;case 92:case 40:case 41:r.push(String.fromCharCode(n));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&n;n=this.nextChar(),i=!0,n>=48&&n<=55&&(e=(e<<3)+(15&n),n=this.nextChar(),n>=48&&n<=55&&(i=!1,e=(e<<3)+(15&n))),r.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:r.push(String.fromCharCode(n))}break;default:r.push(String.fromCharCode(n))}if(t)break;i||(n=this.nextChar())}return r.join("")}getName(){let e,t;const r=this.strBuf;for(r.length=0;(e=this.nextChar())>=0&&!y[e];)if(35===e){if(e=this.nextChar(),y[e]){(0,a.warn)("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number."),r.push("#");break}const n=v(e);if(-1!==n){t=e,e=this.nextChar();const i=v(e);if(-1===i){if((0,a.warn)(`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`),r.push("#",String.fromCharCode(t)),y[e])break;r.push(String.fromCharCode(e));continue}r.push(String.fromCharCode(n<<4|i))}else r.push("#",String.fromCharCode(e))}else r.push(String.fromCharCode(e));return r.length>127&&(0,a.warn)(`Name token is longer than allowed by the spec: ${r.length}`),n.Name.get(r.join(""))}_hexStringWarn(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||(0,a.warn)(`getHexString - ignoring invalid character: ${e}`):(0,a.warn)("getHexString - ignoring additional invalid characters.")}getHexString(){const e=this.strBuf;e.length=0;let t,r,n=this.currentChar,i=!0;for(this._hexStringNumWarn=0;;){if(n<0){(0,a.warn)("Unterminated hex string");break}if(62===n){this.nextChar();break}if(1!==y[n]){if(i){if(t=v(n),-1===t){this._hexStringWarn(n),n=this.nextChar();continue}}else{if(r=v(n),-1===r){this._hexStringWarn(n),n=this.nextChar();continue}e.push(String.fromCharCode(t<<4|r))}i=!i,n=this.nextChar()}else n=this.nextChar()}return e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(t<0)return n.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==y[t])break;t=this.nextChar()}switch(0|t){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(),n.Cmd.get("[");case 93:return this.nextChar(),n.Cmd.get("]");case 60:return t=this.nextChar(),60===t?(this.nextChar(),n.Cmd.get("<<")):this.getHexString();case 62:return t=this.nextChar(),62===t?(this.nextChar(),n.Cmd.get(">>")):n.Cmd.get(">");case 123:return this.nextChar(),n.Cmd.get("{");case 125:return this.nextChar(),n.Cmd.get("}");case 41:throw this.nextChar(),new a.FormatError(`Illegal character: ${t}`)}let r=String.fromCharCode(t);if(t<32||t>127){const e=this.peekChar();if(e>=32&&e<=127)return this.nextChar(),n.Cmd.get(r)}const i=this.knownCommands;let s=void 0!==i?.[r];for(;(t=this.nextChar())>=0&&!y[t];){const e=r+String.fromCharCode(t);if(s&&void 0===i[e])break;if(128===r.length)throw new a.FormatError(`Command token too long: ${r.length}`);r=e,s=void 0!==i?.[r]}return"true"===r||"false"!==r&&("null"===r?null:("BI"===r&&(this.beginInlineImagePos=this.stream.pos),n.Cmd.get(r)))}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar(),10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}t.Lexer=w,t.Linearization=class{static create(e){function t(e,t,r=!1){const a=e.get(t);if(Number.isInteger(a)&&(r?a>=0:a>0))return a;throw new Error(`The "${t}" parameter in the linearization dictionary is invalid.`)}const r=new b({lexer:new w(e),xref:null}),a=r.getObj(),i=r.getObj(),s=r.getObj(),o=r.getObj();let c,l;if(!(Number.isInteger(a)&&Number.isInteger(i)&&(0,n.isCmd)(s,"obj")&&o instanceof n.Dict&&"number"==typeof(c=o.get("Linearized"))&&c>0))return null;if((l=t(o,"L"))!==e.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:l,hints:function(e){const t=e.get("H");let r;if(Array.isArray(t)&&(2===(r=t.length)||4===r)){for(let e=0;e<r;e++){const r=t[e];if(!(Number.isInteger(r)&&r>0))throw new Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw new Error("Hint array in the linearization dictionary is invalid.")}(o),objectNumberFirst:t(o,"O"),endFirst:t(o,"E"),numPages:t(o,"N"),mainXRefEntriesOffset:t(o,"T"),pageFirst:o.has("P")?t(o,"P",!0):0}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ascii85Stream=void 0;var a=r(18),n=r(3);class i extends a.DecodeStream{constructor(e,t){t&&(t*=.8),super(t),this.str=e,this.dict=e.dict,this.input=new Uint8Array(5)}readBlock(){const e=this.str;let t=e.getByte();for(;(0,n.isWhiteSpace)(t);)t=e.getByte();if(-1===t||126===t)return void(this.eof=!0);const r=this.bufferLength;let a,i;if(122===t){for(a=this.ensureBuffer(r+4),i=0;i<4;++i)a[r+i]=0;this.bufferLength+=4}else{const s=this.input;for(s[0]=t,i=1;i<5;++i){for(t=e.getByte();(0,n.isWhiteSpace)(t);)t=e.getByte();if(s[i]=t,-1===t||126===t)break}if(a=this.ensureBuffer(r+i-1),this.bufferLength+=i-1,i<5){for(;i<5;++i)s[i]=117;this.eof=!0}let o=0;for(i=0;i<5;++i)o=85*o+(s[i]-33);for(i=3;i>=0;--i)a[r+i]=255&o,o>>=8}}}t.Ascii85Stream=i},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StreamsSequenceStream=t.DecodeStream=void 0;var a=r(5),n=r(8);const i=new Uint8Array(0);class s extends a.BaseStream{constructor(e){if(super(),this._rawMinBufferLength=e||0,this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=i,this.minBufferLength=512,e)for(;this.minBufferLength<e;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(e){const t=this.buffer;if(e<=t.byteLength)return t;let r=this.minBufferLength;for(;r<e;)r*=2;const a=new Uint8Array(r);return a.set(t),this.buffer=a}getByte(){const e=this.pos;for(;this.bufferLength<=e;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(e){const t=this.pos;let r;if(e){for(this.ensureBuffer(t+e),r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();const a=this.bufferLength;r>a&&(r=a)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)}reset(){this.pos=0}makeSubStream(e,t,r=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const r=e+t;for(;this.bufferLength<=r&&!this.eof;)this.readBlock()}return new n.Stream(this.buffer,e,t,r)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}t.DecodeStream=s,t.StreamsSequenceStream=class extends s{constructor(e,t=null){let r=0;for(const t of e)r+=t instanceof s?t._rawMinBufferLength:t.length;super(r),this.streams=e,this._onError=t}readBlock(){const e=this.streams;if(0===e.length)return void(this.eof=!0);const t=e.shift();let r;try{r=t.getBytes()}catch(e){if(this._onError)return void this._onError(e,t.dict?.objId);throw e}const a=this.bufferLength,n=a+r.length;this.ensureBuffer(n).set(r,a),this.bufferLength=n}getBaseStreams(){const e=[];for(const t of this.streams){const r=t.getBaseStreams();r&&e.push(...r)}return e.length>0?e:null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AsciiHexStream=void 0;var a=r(18);class n extends a.DecodeStream{constructor(e,t){t&&(t*=.5),super(t),this.str=e,this.dict=e.dict,this.firstDigit=-1}readBlock(){const e=this.str.getBytes(8e3);if(!e.length)return void(this.eof=!0);const t=e.length+1>>1,r=this.ensureBuffer(this.bufferLength+t);let a=this.bufferLength,n=this.firstDigit;for(const t of e){let e;if(t>=48&&t<=57)e=15&t;else{if(!(t>=65&&t<=70||t>=97&&t<=102)){if(62===t){this.eof=!0;break}continue}e=9+(15&t)}n<0?n=e:(r[a++]=n<<4|e,n=-1)}n>=0&&this.eof&&(r[a++]=n<<4,n=-1),this.firstDigit=n,this.bufferLength=a}}t.AsciiHexStream=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CCITTFaxStream=void 0;var a=r(21),n=r(18),i=r(4);class s extends n.DecodeStream{constructor(e,t,r){super(t),this.str=e,this.dict=e.dict,r instanceof i.Dict||(r=i.Dict.empty);const n={next:()=>e.getByte()};this.ccittFaxDecoder=new a.CCITTFaxDecoder(n,{K:r.get("K"),EndOfLine:r.get("EndOfLine"),EncodedByteAlign:r.get("EncodedByteAlign"),Columns:r.get("Columns"),Rows:r.get("Rows"),EndOfBlock:r.get("EndOfBlock"),BlackIs1:r.get("BlackIs1")})}readBlock(){for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e)return void(this.eof=!0);this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=e}}}t.CCITTFaxStream=s},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CCITTFaxDecoder=void 0;var a=r(2);const n=-1,i=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[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],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],s=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-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]],o=[[-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]],c=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-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]],l=[[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]],h=[[-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]];t.CCITTFaxDecoder=class{constructor(e,t={}){if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');let r;for(this.source=e,this.eof=!1,this.encoding=t.K||0,this.eoline=t.EndOfLine||!1,this.byteAlign=t.EncodedByteAlign||!1,this.columns=t.Columns||1728,this.rows=t.Rows||0,this.eoblock=t.EndOfBlock??!0,this.black=t.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;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12),this.encoding>0&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1))}readNextChar(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,r=this.columns;let i,s,o,c,l;if(0===this.outputBits){if(this.rowsDone&&(this.eof=!0),this.eof)return-1;let o,l,h;if(this.err=!1,this.nextLine2D){for(c=0;t[c]<r;++c)e[c]=t[c];for(e[c++]=r,e[c]=r,t[0]=0,this.codingPos=0,i=0,s=0;t[this.codingPos]<r;)switch(o=this._getTwoDimCode(),o){case 0:this._addPixels(e[i+1],s),e[i+1]<r&&(i+=2);break;case 1:if(o=l=0,s){do{o+=h=this._getBlackCode()}while(h>=64);do{l+=h=this._getWhiteCode()}while(h>=64)}else{do{o+=h=this._getWhiteCode()}while(h>=64);do{l+=h=this._getBlackCode()}while(h>=64)}for(this._addPixels(t[this.codingPos]+o,s),t[this.codingPos]<r&&this._addPixels(t[this.codingPos]+l,1^s);e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 7:if(this._addPixels(e[i]+3,s),s^=1,t[this.codingPos]<r)for(++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 5:if(this._addPixels(e[i]+2,s),s^=1,t[this.codingPos]<r)for(++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 3:if(this._addPixels(e[i]+1,s),s^=1,t[this.codingPos]<r)for(++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 2:if(this._addPixels(e[i],s),s^=1,t[this.codingPos]<r)for(++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 8:if(this._addPixelsNeg(e[i]-3,s),s^=1,t[this.codingPos]<r)for(i>0?--i:++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 6:if(this._addPixelsNeg(e[i]-2,s),s^=1,t[this.codingPos]<r)for(i>0?--i:++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case 4:if(this._addPixelsNeg(e[i]-1,s),s^=1,t[this.codingPos]<r)for(i>0?--i:++i;e[i]<=t[this.codingPos]&&e[i]<r;)i+=2;break;case n:this._addPixels(r,0),this.eof=!0;break;default:(0,a.info)("bad 2d code"),this._addPixels(r,0),this.err=!0}}else for(t[0]=0,this.codingPos=0,s=0;t[this.codingPos]<r;){if(o=0,s)do{o+=h=this._getBlackCode()}while(h>=64);else do{o+=h=this._getWhiteCode()}while(h>=64);this._addPixels(t[this.codingPos]+o,s),s^=1}let u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(o=this._lookBits(12),this.eoline)for(;o!==n&&1!==o;)this._eatBits(1),o=this._lookBits(12);else for(;0===o;)this._eatBits(1),o=this._lookBits(12);1===o?(this._eatBits(12),u=!0):o===n&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone&&(this.nextLine2D=!this._lookBits(1),this._eatBits(1)),this.eoblock&&u&&this.byteAlign){if(o=this._lookBits(12),1===o){if(this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1)),this.encoding>=0)for(c=0;c<4;++c)o=this._lookBits(12),1!==o&&(0,a.info)("bad rtc code: "+o),this._eatBits(12),this.encoding>0&&(this._lookBits(1),this._eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(o=this._lookBits(13),o===n)return this.eof=!0,-1;if(o>>1==1)break;this._eatBits(1)}this._eatBits(12),this.encoding>0&&(this._eatBits(1),this.nextLine2D=!(1&o))}this.outputBits=t[0]>0?t[this.codingPos=0]:t[this.codingPos=1],this.row++}if(this.outputBits>=8)l=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&t[this.codingPos]<r&&(this.codingPos++,this.outputBits=t[this.codingPos]-t[this.codingPos-1]);else{o=8,l=0;do{if("number"!=typeof this.outputBits)throw new a.FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.');this.outputBits>o?(l<<=o,1&this.codingPos||(l|=255>>8-o),this.outputBits-=o,o=0):(l<<=this.outputBits,1&this.codingPos||(l|=255>>8-this.outputBits),o-=this.outputBits,this.outputBits=0,t[this.codingPos]<r?(this.codingPos++,this.outputBits=t[this.codingPos]-t[this.codingPos-1]):o>0&&(l<<=o,o=0))}while(o)}return this.black&&(l^=255),l}_addPixels(e,t){const r=this.codingLine;let n=this.codingPos;e>r[n]&&(e>this.columns&&((0,a.info)("row is wrong length"),this.err=!0,e=this.columns),1&n^t&&++n,r[n]=e),this.codingPos=n}_addPixelsNeg(e,t){const r=this.codingLine;let n=this.codingPos;if(e>r[n])e>this.columns&&((0,a.info)("row is wrong length"),this.err=!0,e=this.columns),1&n^t&&++n,r[n]=e;else if(e<r[n]){for(e<0&&((0,a.info)("invalid code"),this.err=!0,e=0);n>0&&e<r[n-1];)--n;r[n]=e}this.codingPos=n}_findTableCode(e,t,r,a){const i=a||0;for(let a=e;a<=t;++a){let e=this._lookBits(a);if(e===n)return[!0,1,!1];if(a<t&&(e<<=t-a),!i||e>=i){const t=r[e-i];if(t[0]===a)return this._eatBits(a),[!0,t[1],!0]}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;if(this.eoblock){if(t=this._lookBits(7),e=i[t],e?.[0]>0)return this._eatBits(e[0]),e[1]}else{const e=this._findTableCode(1,7,i);if(e[0]&&e[2])return e[1]}return(0,a.info)("Bad two dim code"),n}_getWhiteCode(){let e,t=0;if(this.eoblock){if(t=this._lookBits(12),t===n)return 1;if(e=t>>5?o[t>>3]:s[t],e[0]>0)return this._eatBits(e[0]),e[1]}else{let e=this._findTableCode(1,9,o);if(e[0])return e[1];if(e=this._findTableCode(11,12,s),e[0])return e[1]}return(0,a.info)("bad white code"),this._eatBits(1),1}_getBlackCode(){let e,t;if(this.eoblock){if(e=this._lookBits(13),e===n)return 1;if(t=e>>7?!(e>>9)&&e>>7?l[(e>>1)-64]:h[e>>7]:c[e],t[0]>0)return this._eatBits(t[0]),t[1]}else{let e=this._findTableCode(2,6,h);if(e[0])return e[1];if(e=this._findTableCode(7,12,l,64),e[0])return e[1];if(e=this._findTableCode(10,13,c),e[0])return e[1]}return(0,a.info)("bad black code"),this._eatBits(1),1}_lookBits(e){let t;for(;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?n:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t,this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FlateStream=void 0;var a=r(18),n=r(2);const i=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=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]),o=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]),c=[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],l=[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 h extends a.DecodeStream{constructor(e,t){super(t),this.str=e,this.dict=e.dict;const r=e.getByte(),a=e.getByte();if(-1===r||-1===a)throw new n.FormatError(`Invalid header in flate stream: ${r}, ${a}`);if(8!=(15&r))throw new n.FormatError(`Unknown compression method in flate stream: ${r}, ${a}`);if(((r<<8)+a)%31!=0)throw new n.FormatError(`Bad FCHECK in flate stream: ${r}, ${a}`);if(32&a)throw new n.FormatError(`FDICT bit set in flate stream: ${r}, ${a}`);this.codeSize=0,this.codeBuf=0}getBits(e){const t=this.str;let r,a=this.codeSize,i=this.codeBuf;for(;a<e;){if(-1===(r=t.getByte()))throw new n.FormatError("Bad encoding in flate stream");i|=r<<a,a+=8}return r=i&(1<<e)-1,this.codeBuf=i>>e,this.codeSize=a-=e,r}getCode(e){const t=this.str,r=e[0],a=e[1];let i,s=this.codeSize,o=this.codeBuf;for(;s<a&&-1!==(i=t.getByte());)o|=i<<s,s+=8;const c=r[o&(1<<a)-1],l=c>>16,h=65535&c;if(l<1||s<l)throw new n.FormatError("Bad encoding in flate stream");return this.codeBuf=o>>l,this.codeSize=s-l,h}generateHuffmanTable(e){const t=e.length;let r,a=0;for(r=0;r<t;++r)e[r]>a&&(a=e[r]);const n=1<<a,i=new Int32Array(n);for(let s=1,o=0,c=2;s<=a;++s,o<<=1,c<<=1)for(let a=0;a<t;++a)if(e[a]===s){let e=0,t=o;for(r=0;r<s;++r)e=e<<1|1&t,t>>=1;for(r=e;r<n;r+=c)i[r]=s<<16|a;++o}return[i,a]}readBlock(){let e,t;const r=this.str;let a,h,u=this.getBits(3);if(1&u&&(this.eof=!0),u>>=1,0===u){let t;if(-1===(t=r.getByte()))throw new n.FormatError("Bad block header in flate stream");let a=t;if(-1===(t=r.getByte()))throw new n.FormatError("Bad block header in flate stream");if(a|=t<<8,-1===(t=r.getByte()))throw new n.FormatError("Bad block header in flate stream");let i=t;if(-1===(t=r.getByte()))throw new n.FormatError("Bad block header in flate stream");if(i|=t<<8,i!==(65535&~a)&&(0!==a||0!==i))throw new n.FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;const s=this.bufferLength,o=s+a;if(e=this.ensureBuffer(o),this.bufferLength=o,0===a)-1===r.peekByte()&&(this.eof=!0);else{const t=r.getBytes(a);e.set(t,s),t.length<a&&(this.eof=!0)}return}if(1===u)a=c,h=l;else{if(2!==u)throw new n.FormatError("Unknown block type in flate stream");{const e=this.getBits(5)+257,r=this.getBits(5)+1,n=this.getBits(4)+4,s=new Uint8Array(i.length);let o;for(o=0;o<n;++o)s[i[o]]=this.getBits(3);const c=this.generateHuffmanTable(s);t=0,o=0;const l=e+r,u=new Uint8Array(l);let d,f,p;for(;o<l;){const e=this.getCode(c);if(16===e)d=2,f=3,p=t;else if(17===e)d=3,f=3,p=t=0;else{if(18!==e){u[o++]=t=e;continue}d=7,f=11,p=t=0}let r=this.getBits(d)+f;for(;r-- >0;)u[o++]=p}a=this.generateHuffmanTable(u.subarray(0,e)),h=this.generateHuffmanTable(u.subarray(e,l))}}e=this.buffer;let d=e?e.length:0,f=this.bufferLength;for(;;){let r=this.getCode(a);if(r<256){f+1>=d&&(e=this.ensureBuffer(f+1),d=e.length),e[f++]=r;continue}if(256===r)return void(this.bufferLength=f);r-=257,r=s[r];let n=r>>16;n>0&&(n=this.getBits(n)),t=(65535&r)+n,r=this.getCode(h),r=o[r],n=r>>16,n>0&&(n=this.getBits(n));const i=(65535&r)+n;f+t>=d&&(e=this.ensureBuffer(f+t),d=e.length);for(let r=0;r<t;++r,++f)e[f]=e[f-i]}}}t.FlateStream=h},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Stream=void 0;var a=r(5),n=r(18),i=r(4),s=r(24),o=r(2);class c extends n.DecodeStream{constructor(e,t,r){super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=r}get bytes(){return(0,o.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e=new s.Jbig2Image,t=[];if(this.params instanceof i.Dict){const e=this.params.get("JBIG2Globals");if(e instanceof a.BaseStream){const r=e.getBytes();t.push({data:r,start:0,end:r.length})}}t.push({data:this.bytes,start:0,end:this.bytes.length});const r=e.parseChunks(t),n=r.length;for(let e=0;e<n;e++)r[e]^=255;this.buffer=r,this.bufferLength=n,this.eof=!0}}t.Jbig2Stream=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Jbig2Image=void 0;var a=r(2),n=r(3),i=r(25),s=r(21);class o extends a.BaseException{constructor(e){super(`JBIG2 error: ${e}`,"Jbig2Error")}}class c{getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}}class l{constructor(e,t,r){this.data=e,this.start=t,this.end=r}get decoder(){const e=new i.ArithmeticDecoder(this.data,this.start,this.end);return(0,a.shadow)(this,"decoder",e)}get contextCache(){const e=new c;return(0,a.shadow)(this,"contextCache",e)}}function h(e,t,r){const a=e.getContexts(t);let n=1;function i(e){let t=0;for(let i=0;i<e;i++){const e=r.readBit(a,n);n=n<256?n<<1|e:511&(n<<1|e)|256,t=t<<1|e}return t>>>0}const s=i(1),o=i(1)?i(1)?i(1)?i(1)?i(1)?i(32)+4436:i(12)+340:i(8)+84:i(6)+20:i(4)+4:i(2);let c;return 0===s?c=o:o>0&&(c=-o),c>=-2147483648&&c<=2147483647?c:null}function u(e,t,r){const a=e.getContexts("IAID");let n=1;for(let e=0;e<r;e++)n=n<<1|t.readBit(a,n);return r<31?n&(1<<r)-1:2147483647&n}const d=["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"],f=[[{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}]],p=[{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}]}],g=[39717,1941,229,405],m=[32,8];function b(e,t,r,a,n,i,s,o){if(e)return D(new I(o.data,o.start,o.end),t,r,!1);if(0===a&&!i&&!n&&4===s.length&&3===s[0].x&&-1===s[0].y&&-3===s[1].x&&-1===s[1].y&&2===s[2].x&&-2===s[2].y&&-2===s[3].x&&-2===s[3].y)return function(e,t,r){const a=r.decoder,n=r.contextCache.getContexts("GB"),i=[];let s,o,c,l,h,u,d;for(o=0;o<t;o++)for(h=i[o]=new Uint8Array(e),u=o<1?h:i[o-1],d=o<2?h:i[o-2],s=d[0]<<13|d[1]<<12|d[2]<<11|u[0]<<7|u[1]<<6|u[2]<<5|u[3]<<4,c=0;c<e;c++)h[c]=l=a.readBit(n,s),s=(31735&s)<<1|(c+3<e?d[c+3]<<11:0)|(c+4<e?u[c+4]<<4:0)|l;return i}(t,r,o);const c=!!i,l=f[a].concat(s);l.sort((function(e,t){return e.y-t.y||e.x-t.x}));const h=l.length,u=new Int8Array(h),d=new Int8Array(h),p=[];let m,b,y=0,v=0,w=0,A=0;for(b=0;b<h;b++)u[b]=l[b].x,d[b]=l[b].y,v=Math.min(v,l[b].x),w=Math.max(w,l[b].x),A=Math.min(A,l[b].y),b<h-1&&l[b].y===l[b+1].y&&l[b].x===l[b+1].x-1?y|=1<<h-1-b:p.push(b);const S=p.length,x=new Int8Array(S),k=new Int8Array(S),C=new Uint16Array(S);for(m=0;m<S;m++)b=p[m],x[m]=l[b].x,k[m]=l[b].y,C[m]=1<<h-1-b;const _=-v,T=-A,E=t-w,O=g[a];let F=new Uint8Array(t);const P=[],M=o.decoder,R=o.contextCache.getContexts("GB");let N,L,B,j,$,U=0,z=0;for(let e=0;e<r;e++)if(n&&(U^=M.readBit(R,O),U))P.push(F);else for(F=new Uint8Array(F),P.push(F),N=0;N<t;N++){if(c&&i[e][N]){F[N]=0;continue}if(N>=_&&N<E&&e>=T)for(z=z<<1&y,b=0;b<S;b++)L=e+k[b],B=N+x[b],j=P[L][B],j&&(j=C[b],z|=j);else for(z=0,$=h-1,b=0;b<h;b++,$--)B=N+u[b],B>=0&&B<t&&(L=e+d[b],L>=0&&(j=P[L][B],j&&(z|=j<<$)));const r=M.readBit(R,z);F[N]=r}return P}function y(e,t,r,a,n,i,s,c,l){let h=p[r].coding;0===r&&(h=h.concat([c[0]]));const u=h.length,d=new Int32Array(u),f=new Int32Array(u);let g;for(g=0;g<u;g++)d[g]=h[g].x,f[g]=h[g].y;let b=p[r].reference;0===r&&(b=b.concat([c[1]]));const y=b.length,v=new Int32Array(y),w=new Int32Array(y);for(g=0;g<y;g++)v[g]=b[g].x,w[g]=b[g].y;const A=a[0].length,S=a.length,x=m[r],k=[],C=l.decoder,_=l.contextCache.getContexts("GR");let T=0;for(let r=0;r<t;r++){if(s&&(T^=C.readBit(_,x),T))throw new o("prediction is not supported");const t=new Uint8Array(e);k.push(t);for(let s=0;s<e;s++){let o,c,l=0;for(g=0;g<u;g++)o=r+f[g],c=s+d[g],o<0||c<0||c>=e?l<<=1:l=l<<1|k[o][c];for(g=0;g<y;g++)o=r+w[g]-i,c=s+v[g]-n,o<0||o>=S||c<0||c>=A?l<<=1:l=l<<1|a[o][c];const h=C.readBit(_,l);t[s]=h}}return k}function v(e,t,r,a,n,i,s,c,l,d,f,p,g,m,b,v,w,A,S){if(e&&t)throw new o("refinement with Huffman is not supported");const x=[];let k,C;for(k=0;k<a;k++){if(C=new Uint8Array(r),n)for(let e=0;e<r;e++)C[e]=n;x.push(C)}const _=w.decoder,T=w.contextCache;let E=e?-m.tableDeltaT.decode(S):-h(T,"IADT",_),O=0;for(k=0;k<i;){E+=e?m.tableDeltaT.decode(S):h(T,"IADT",_),O+=e?m.tableFirstS.decode(S):h(T,"IAFS",_);let a=O;for(;;){let n=0;s>1&&(n=e?S.readBits(A):h(T,"IAIT",_));const i=s*E+n,O=e?m.symbolIDTable.decode(S):u(T,_,l),F=t&&(e?S.readBit():h(T,"IARI",_));let P=c[O],I=P[0].length,M=P.length;if(F){const e=h(T,"IARDW",_),t=h(T,"IARDH",_);I+=e,M+=t,P=y(I,M,b,P,(e>>1)+h(T,"IARDX",_),(t>>1)+h(T,"IARDY",_),!1,v,w)}const R=i-(1&p?0:M-1),D=a-(2&p?I-1:0);let N,L,B;if(d){for(N=0;N<M;N++){if(C=x[D+N],!C)continue;B=P[N];const e=Math.min(r-R,I);switch(g){case 0:for(L=0;L<e;L++)C[R+L]|=B[L];break;case 2:for(L=0;L<e;L++)C[R+L]^=B[L];break;default:throw new o(`operator ${g} is not supported`)}}a+=M-1}else{for(L=0;L<M;L++)if(C=x[R+L],C)switch(B=P[L],g){case 0:for(N=0;N<I;N++)C[D+N]|=B[N];break;case 2:for(N=0;N<I;N++)C[D+N]^=B[N];break;default:throw new o(`operator ${g} is not supported`)}a+=I-1}k++;const j=e?m.tableDeltaS.decode(S):h(T,"IADS",_);if(null===j)break;a+=j+f}}return x}function w(e,t){const r={};r.number=(0,n.readUint32)(e,t);const a=e[t+4],i=63&a;if(!d[i])throw new o("invalid segment type: "+i);r.type=i,r.typeName=d[i],r.deferredNonRetain=!!(128&a);const s=!!(64&a),c=e[t+5];let l=c>>5&7;const h=[31&c];let u=t+6;if(7===c){l=536870911&(0,n.readUint32)(e,u-1),u+=3;let t=l+7>>3;for(h[0]=e[u++];--t>0;)h.push(e[u++])}else if(5===c||6===c)throw new o("invalid referred-to flags");r.retainBits=h;let f=4;r.number<=256?f=1:r.number<=65536&&(f=2);const p=[];let g,m;for(g=0;g<l;g++){let t;t=1===f?e[u]:2===f?(0,n.readUint16)(e,u):(0,n.readUint32)(e,u),p.push(t),u+=f}if(r.referredTo=p,s?(r.pageAssociation=(0,n.readUint32)(e,u),u+=4):r.pageAssociation=e[u++],r.length=(0,n.readUint32)(e,u),u+=4,4294967295===r.length){if(38!==i)throw new o("invalid unknown segment length");{const t=S(e,u),a=!!(1&e[u+x]),n=6,i=new Uint8Array(n);for(a||(i[0]=255,i[1]=172),i[2]=t.height>>>24&255,i[3]=t.height>>16&255,i[4]=t.height>>8&255,i[5]=255&t.height,g=u,m=e.length;g<m;g++){let t=0;for(;t<n&&i[t]===e[g+t];)t++;if(t===n){r.length=g+n;break}}if(4294967295===r.length)throw new o("segment end was not found")}}return r.headerEnd=u,r}function A(e,t,r,a){const n=[];let i=r;for(;i<a;){const r=w(t,i);i=r.headerEnd;const a={header:r,data:t};if(e.randomAccess||(a.start=i,i+=r.length,a.end=i),n.push(a),51===r.type)break}if(e.randomAccess)for(let e=0,t=n.length;e<t;e++)n[e].start=i,i+=n[e].header.length,n[e].end=i;return n}function S(e,t){return{width:(0,n.readUint32)(e,t),height:(0,n.readUint32)(e,t+4),x:(0,n.readUint32)(e,t+8),y:(0,n.readUint32)(e,t+12),combinationOperator:7&e[t+16]}}const x=17;function k(e,t){const r=e.header,a=e.data,i=e.end;let s,c,l,h,u=e.start;switch(r.type){case 0:const e={},t=(0,n.readUint16)(a,u);if(e.huffman=!!(1&t),e.refinement=!!(2&t),e.huffmanDHSelector=t>>2&3,e.huffmanDWSelector=t>>4&3,e.bitmapSizeSelector=t>>6&1,e.aggregationInstancesSelector=t>>7&1,e.bitmapCodingContextUsed=!!(256&t),e.bitmapCodingContextRetained=!!(512&t),e.template=t>>10&3,e.refinementTemplate=t>>12&1,u+=2,!e.huffman){for(h=0===e.template?4:1,c=[],l=0;l<h;l++)c.push({x:(0,n.readInt8)(a,u),y:(0,n.readInt8)(a,u+1)}),u+=2;e.at=c}if(e.refinement&&!e.refinementTemplate){for(c=[],l=0;l<2;l++)c.push({x:(0,n.readInt8)(a,u),y:(0,n.readInt8)(a,u+1)}),u+=2;e.refinementAt=c}e.numberOfExportedSymbols=(0,n.readUint32)(a,u),u+=4,e.numberOfNewSymbols=(0,n.readUint32)(a,u),u+=4,s=[e,r.number,r.referredTo,a,u,i];break;case 6:case 7:const d={};d.info=S(a,u),u+=x;const f=(0,n.readUint16)(a,u);if(u+=2,d.huffman=!!(1&f),d.refinement=!!(2&f),d.logStripSize=f>>2&3,d.stripSize=1<<d.logStripSize,d.referenceCorner=f>>4&3,d.transposed=!!(64&f),d.combinationOperator=f>>7&3,d.defaultPixelValue=f>>9&1,d.dsOffset=f<<17>>27,d.refinementTemplate=f>>15&1,d.huffman){const e=(0,n.readUint16)(a,u);u+=2,d.huffmanFS=3&e,d.huffmanDS=e>>2&3,d.huffmanDT=e>>4&3,d.huffmanRefinementDW=e>>6&3,d.huffmanRefinementDH=e>>8&3,d.huffmanRefinementDX=e>>10&3,d.huffmanRefinementDY=e>>12&3,d.huffmanRefinementSizeSelector=!!(16384&e)}if(d.refinement&&!d.refinementTemplate){for(c=[],l=0;l<2;l++)c.push({x:(0,n.readInt8)(a,u),y:(0,n.readInt8)(a,u+1)}),u+=2;d.refinementAt=c}d.numberOfSymbolInstances=(0,n.readUint32)(a,u),u+=4,s=[d,r.referredTo,a,u,i];break;case 16:const p={},g=a[u++];p.mmr=!!(1&g),p.template=g>>1&3,p.patternWidth=a[u++],p.patternHeight=a[u++],p.maxPatternIndex=(0,n.readUint32)(a,u),u+=4,s=[p,r.number,a,u,i];break;case 22:case 23:const m={};m.info=S(a,u),u+=x;const b=a[u++];m.mmr=!!(1&b),m.template=b>>1&3,m.enableSkip=!!(8&b),m.combinationOperator=b>>4&7,m.defaultPixelValue=b>>7&1,m.gridWidth=(0,n.readUint32)(a,u),u+=4,m.gridHeight=(0,n.readUint32)(a,u),u+=4,m.gridOffsetX=4294967295&(0,n.readUint32)(a,u),u+=4,m.gridOffsetY=4294967295&(0,n.readUint32)(a,u),u+=4,m.gridVectorX=(0,n.readUint16)(a,u),u+=2,m.gridVectorY=(0,n.readUint16)(a,u),u+=2,s=[m,r.referredTo,a,u,i];break;case 38:case 39:const y={};y.info=S(a,u),u+=x;const v=a[u++];if(y.mmr=!!(1&v),y.template=v>>1&3,y.prediction=!!(8&v),!y.mmr){for(h=0===y.template?4:1,c=[],l=0;l<h;l++)c.push({x:(0,n.readInt8)(a,u),y:(0,n.readInt8)(a,u+1)}),u+=2;y.at=c}s=[y,a,u,i];break;case 48:const w={width:(0,n.readUint32)(a,u),height:(0,n.readUint32)(a,u+4),resolutionX:(0,n.readUint32)(a,u+8),resolutionY:(0,n.readUint32)(a,u+12)};4294967295===w.height&&delete w.height;const A=a[u+16];(0,n.readUint16)(a,u+17),w.lossless=!!(1&A),w.refinement=!!(2&A),w.defaultPixelValue=A>>2&1,w.combinationOperator=A>>3&3,w.requiresBuffer=!!(32&A),w.combinationOperatorOverride=!!(64&A),s=[w];break;case 49:case 50:case 51:case 62:break;case 53:s=[r.number,a,u,i];break;default:throw new o(`segment type ${r.typeName}(${r.type}) is not implemented`)}const d="on"+r.typeName;d in t&&t[d].apply(t,s)}function C(e,t){for(let r=0,a=e.length;r<a;r++)k(e[r],t)}class _{onPageInformation(e){this.currentPageInfo=e;const t=e.width+7>>3,r=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&r.fill(255),this.buffer=r}drawBitmap(e,t){const r=this.currentPageInfo,a=e.width,n=e.height,i=r.width+7>>3,s=r.combinationOperatorOverride?e.combinationOperator:r.combinationOperator,c=this.buffer,l=128>>(7&e.x);let h,u,d,f,p=e.y*i+(e.x>>3);switch(s){case 0:for(h=0;h<n;h++){for(d=l,f=p,u=0;u<a;u++)t[h][u]&&(c[f]|=d),d>>=1,d||(d=128,f++);p+=i}break;case 2:for(h=0;h<n;h++){for(d=l,f=p,u=0;u<a;u++)t[h][u]&&(c[f]^=d),d>>=1,d||(d=128,f++);p+=i}break;default:throw new o(`operator ${s} is not supported`)}}onImmediateGenericRegion(e,t,r,a){const n=e.info,i=new l(t,r,a),s=b(e.mmr,n.width,n.height,e.template,e.prediction,null,e.at,i);this.drawBitmap(n,s)}onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(e,t,r,a,i,s){let c,d;e.huffman&&(c=function(e,t,r){let a,n,i,s,c=0;switch(e.huffmanDHSelector){case 0:case 1:a=P(e.huffmanDHSelector+4);break;case 3:a=M(c,t,r),c++;break;default:throw new o("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:n=P(e.huffmanDWSelector+2);break;case 3:n=M(c,t,r),c++;break;default:throw new o("invalid Huffman DW selector")}return e.bitmapSizeSelector?(i=M(c,t,r),c++):i=P(1),s=e.aggregationInstancesSelector?M(c,t,r):P(1),{tableDeltaHeight:a,tableDeltaWidth:n,tableBitmapSize:i,tableAggregateInstances:s}}(e,r,this.customTables),d=new I(a,i,s));let f=this.symbols;f||(this.symbols=f={});const p=[];for(const e of r){const t=f[e];t&&p.push(...t)}const g=new l(a,i,s);f[t]=function(e,t,r,a,i,s,c,l,d,f,p,g){if(e&&t)throw new o("symbol refinement with Huffman is not supported");const m=[];let w=0,A=(0,n.log2)(r.length+a);const S=p.decoder,x=p.contextCache;let k,C;for(e&&(k=P(1),C=[],A=Math.max(A,1));m.length<a;){w+=e?s.tableDeltaHeight.decode(g):h(x,"IADH",S);let a=0,n=0;const i=e?C.length:0;for(;;){const i=e?s.tableDeltaWidth.decode(g):h(x,"IADW",S);if(null===i)break;let o;if(a+=i,n+=a,t){const n=h(x,"IAAI",S);if(n>1)o=v(e,t,a,w,0,n,1,r.concat(m),A,0,0,1,0,s,d,f,p,0,g);else{const e=u(x,S,A),t=h(x,"IARDX",S),n=h(x,"IARDY",S);o=y(a,w,d,e<r.length?r[e]:m[e-r.length],t,n,!1,f,p)}m.push(o)}else e?C.push(a):(o=b(!1,a,w,c,!1,null,l,p),m.push(o))}if(e&&!t){const e=s.tableBitmapSize.decode(g);let t;if(g.byteAlign(),0===e)t=R(g,n,w);else{const r=g.end,a=g.position+e;g.end=a,t=D(g,n,w,!1),g.end=r,g.position=a}const r=C.length;if(i===r-1)m.push(t);else{let e,a,n,s,o,c=0;for(e=i;e<r;e++){for(s=C[e],n=c+s,o=[],a=0;a<w;a++)o.push(t[a].subarray(c,n));m.push(o),c=n}}}}const _=[],T=[];let E,O,F=!1;const I=r.length+a;for(;T.length<I;){let t=e?k.decode(g):h(x,"IAEX",S);for(;t--;)T.push(F);F=!F}for(E=0,O=r.length;E<O;E++)T[E]&&_.push(r[E]);for(let e=0;e<a;E++,e++)T[E]&&_.push(m[e]);return _}(e.huffman,e.refinement,p,e.numberOfNewSymbols,e.numberOfExportedSymbols,c,e.template,e.at,e.refinementTemplate,e.refinementAt,g,d)}onImmediateTextRegion(e,t,r,a,i){const s=e.info;let c,h;const u=this.symbols,d=[];for(const e of t){const t=u[e];t&&d.push(...t)}const f=(0,n.log2)(d.length);e.huffman&&(h=new I(r,a,i),c=function(e,t,r,a,n){const i=[];for(let e=0;e<=34;e++){const t=n.readBits(4);i.push(new T([e,t,0,0]))}const s=new O(i,!1);i.length=0;for(let e=0;e<a;){const t=s.decode(n);if(t>=32){let r,a,s;switch(t){case 32:if(0===e)throw new o("no previous value in symbol ID table");a=n.readBits(2)+3,r=i[e-1].prefixLength;break;case 33:a=n.readBits(3)+3,r=0;break;case 34:a=n.readBits(7)+11,r=0;break;default:throw new o("invalid code length in symbol ID table")}for(s=0;s<a;s++)i.push(new T([e,r,0,0])),e++}else i.push(new T([e,t,0,0])),e++}n.byteAlign();const c=new O(i,!1);let l,h,u,d=0;switch(e.huffmanFS){case 0:case 1:l=P(e.huffmanFS+6);break;case 3:l=M(d,t,r),d++;break;default:throw new o("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:h=P(e.huffmanDS+8);break;case 3:h=M(d,t,r),d++;break;default:throw new o("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:u=P(e.huffmanDT+11);break;case 3:u=M(d,t,r),d++;break;default:throw new o("invalid Huffman DT selector")}if(e.refinement)throw new o("refinement with Huffman is not supported");return{symbolIDTable:c,tableFirstS:l,tableDeltaS:h,tableDeltaT:u}}(e,t,this.customTables,d.length,h));const p=new l(r,a,i),g=v(e.huffman,e.refinement,s.width,s.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,d,f,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,c,e.refinementTemplate,e.refinementAt,p,e.logStripSize,h);this.drawBitmap(s,g)}onImmediateLosslessTextRegion(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(e,t,r,a,n){let i=this.patterns;i||(this.patterns=i={});const s=new l(r,a,n);i[t]=function(e,t,r,a,n,i){const s=[];e||(s.push({x:-t,y:0}),0===n&&s.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const o=b(e,(a+1)*t,r,n,!1,null,s,i),c=[];for(let e=0;e<=a;e++){const a=[],n=t*e,i=n+t;for(let e=0;e<r;e++)a.push(o[e].subarray(n,i));c.push(a)}return c}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,s)}onImmediateHalftoneRegion(e,t,r,a,i){const s=this.patterns[t[0]],c=e.info,h=new l(r,a,i),u=function(e,t,r,a,i,s,c,l,h,u,d,f,p,g,m){if(c)throw new o("skip is not supported");if(0!==l)throw new o(`operator "${l}" is not supported in halftone region`);const y=[];let v,w,A;for(v=0;v<i;v++){if(A=new Uint8Array(a),s)for(w=0;w<a;w++)A[w]=s;y.push(A)}const S=t.length,x=t[0],k=x[0].length,C=x.length,_=(0,n.log2)(S),T=[];e||(T.push({x:r<=1?3:2,y:-1}),0===r&&T.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2}));const E=[];let O,F,P,M,R,N,L,B,j,$,U;for(e&&(O=new I(m.data,m.start,m.end)),v=_-1;v>=0;v--)F=e?D(O,h,u,!0):b(!1,h,u,r,!1,null,T,m),E[v]=F;for(P=0;P<u;P++)for(M=0;M<h;M++){for(R=0,N=0,w=_-1;w>=0;w--)R^=E[w][P][M],N|=R<<w;if(L=t[N],B=d+P*g+M*p>>8,j=f+P*p-M*g>>8,B>=0&&B+k<=a&&j>=0&&j+C<=i)for(v=0;v<C;v++)for(U=y[j+v],$=L[v],w=0;w<k;w++)U[B+w]|=$[w];else{let e,t;for(v=0;v<C;v++)if(t=j+v,!(t<0||t>=i))for(U=y[t],$=L[v],w=0;w<k;w++)e=B+w,e>=0&&e<a&&(U[e]|=$[w])}}return y}(e.mmr,s,e.template,c.width,c.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,h);this.drawBitmap(c,u)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(e,t,r,a){let i=this.customTables;i||(this.customTables=i={}),i[e]=function(e,t,r){const a=e[t],i=4294967295&(0,n.readUint32)(e,t+1),s=4294967295&(0,n.readUint32)(e,t+5),o=new I(e,t+9,r),c=1+(a>>1&7),l=1+(a>>4&7),h=[];let u,d,f=i;do{u=o.readBits(c),d=o.readBits(l),h.push(new T([f,u,d,0])),f+=1<<d}while(f<s);return u=o.readBits(c),h.push(new T([i-1,u,32,0,"lower"])),u=o.readBits(c),h.push(new T([s,u,32,0])),1&a&&(u=o.readBits(c),h.push(new T([u,0]))),new O(h,!1)}(t,r,a)}}class T{constructor(e){2===e.length?(this.isOOB=!0,this.rangeLow=0,this.prefixLength=e[0],this.rangeLength=0,this.prefixCode=e[1],this.isLowerRange=!1):(this.isOOB=!1,this.rangeLow=e[0],this.prefixLength=e[1],this.rangeLength=e[2],this.prefixCode=e[3],this.isLowerRange="lower"===e[4])}}class E{constructor(e){this.children=[],e?(this.isLeaf=!0,this.rangeLength=e.rangeLength,this.rangeLow=e.rangeLow,this.isLowerRange=e.isLowerRange,this.isOOB=e.isOOB):this.isLeaf=!1}buildTree(e,t){const r=e.prefixCode>>t&1;if(t<=0)this.children[r]=new E(e);else{let a=this.children[r];a||(this.children[r]=a=new E(null)),a.buildTree(e,t-1)}}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new o("invalid Huffman data");return t.decodeNode(e)}}class O{constructor(e,t){t||this.assignPrefixCodes(e),this.rootNode=new E(null);for(let t=0,r=e.length;t<r;t++){const r=e[t];r.prefixLength>0&&this.rootNode.buildTree(r,r.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let r=0;for(let a=0;a<t;a++)r=Math.max(r,e[a].prefixLength);const a=new Uint32Array(r+1);for(let r=0;r<t;r++)a[e[r].prefixLength]++;let n,i,s,o=1,c=0;for(a[0]=0;o<=r;){for(c=c+a[o-1]<<1,n=c,i=0;i<t;)s=e[i],s.prefixLength===o&&(s.prefixCode=n,n++),i++;o++}}}const F={};function P(e){let t,r=F[e];if(r)return r;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[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:t=[[-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:t=[[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:t=[[-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:t=[[-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:t=[[-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:t=[[-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:t=[[-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:t=[[-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:t=[[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:t=[[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:t=[[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:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-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 o(`standard table B.${e} does not exist`)}for(let e=0,r=t.length;e<r;e++)t[e]=new T(t[e]);return r=new O(t,!0),F[e]=r,r}class I{constructor(e,t,r){this.data=e,this.start=t,this.end=r,this.position=t,this.shift=-1,this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new o("end of data while reading bit");this.currentByte=this.data[this.position++],this.shift=7}const e=this.currentByte>>this.shift&1;return this.shift--,e}readBits(e){let t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<<t;return r}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function M(e,t,r){let a=0;for(let n=0,i=t.length;n<i;n++){const i=r[t[n]];if(i){if(e===a)return i;a++}}throw new o("can't find custom Huffman table")}function R(e,t,r){const a=[];for(let n=0;n<r;n++){const r=new Uint8Array(t);a.push(r);for(let a=0;a<t;a++)r[a]=e.readBit();e.byteAlign()}return a}function D(e,t,r,a){const n={K:-1,Columns:t,Rows:r,BlackIs1:!0,EndOfBlock:a},i=new s.CCITTFaxDecoder(e,n),o=[];let c,l=!1;for(let e=0;e<r;e++){const e=new Uint8Array(t);o.push(e);let r=-1;for(let a=0;a<t;a++)r<0&&(c=i.readNextChar(),-1===c&&(c=0,l=!0),r=7),e[a]=c>>r&1,r--}if(a&&!l){const e=5;for(let t=0;t<e&&-1!==i.readNextChar();t++);}return o}t.Jbig2Image=class{parseChunks(e){return function(e){const t=new _;for(let r=0,a=e.length;r<a;r++){const a=e[r];C(A({},a.data,a.start,a.end),t)}return t.buffer}(e)}parse(e){throw new Error("Not implemented: Jbig2Image.parse")}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArithmeticDecoder=void 0;const r=[{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}];t.ArithmeticDecoder=class{constructor(e,t,r){this.data=e,this.bp=t,this.dataEnd=r,this.chigh=e[t],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 e=this.data;let t=this.bp;255===e[t]?e[t+1]>143?(this.clow+=65280,this.ct=8):(t++,this.clow+=e[t]<<9,this.ct=7,this.bp=t):(t++,this.clow+=t<this.dataEnd?e[t]<<8:65280,this.ct=8,this.bp=t),this.clow>65535&&(this.chigh+=this.clow>>16,this.clow&=65535)}readBit(e,t){let a=e[t]>>1,n=1&e[t];const i=r[a],s=i.qe;let o,c=this.a-s;if(this.chigh<s)c<s?(c=s,o=n,a=i.nmps):(c=s,o=1^n,1===i.switchFlag&&(n=o),a=i.nlps);else{if(this.chigh-=s,32768&c)return this.a=c,n;c<s?(o=1^n,1===i.switchFlag&&(n=o),a=i.nlps):(o=n,a=i.nmps)}do{0===this.ct&&this.byteIn(),c<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--}while(!(32768&c));return this.a=c,e[t]=a<<1|n,o}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpegStream=void 0;var a=r(18),n=r(4),i=r(27),s=r(2);class o extends a.DecodeStream{constructor(e,t,r){let a;for(;-1!==(a=e.getByte());)if(255===a){e.skip(-1);break}super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=r}get bytes(){return(0,s.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(t)){const r=this.dict.get("BPC","BitsPerComponent")||8,a=t.length,n=new Int32Array(a);let i=!1;const s=(1<<r)-1;for(let e=0;e<a;e+=2)n[e]=256*(t[e+1]-t[e])|0,n[e+1]=t[e]*s|0,256===n[e]&&0===n[e+1]||(i=!0);i&&(e.decodeTransform=n)}if(this.params instanceof n.Dict){const t=this.params.get("ColorTransform");Number.isInteger(t)&&(e.colorTransform=t)}const r=new i.JpegImage(e);r.parse(this.bytes);const a=r.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,forceRGB:this.forceRGB,isSourcePDF:!0});this.buffer=a,this.bufferLength=a.length,this.eof=!0}}t.JpegStream=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpegImage=void 0;var a=r(2),n=r(28),i=r(3);class s extends a.BaseException{constructor(e){super(`JPEG error: ${e}`,"JpegError")}}class o extends a.BaseException{constructor(e,t){super(e,"DNLMarkerError"),this.scanLines=t}}class c extends a.BaseException{constructor(e){super(e,"EOIMarkerError")}}const l=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]),h=4017,u=799,d=3406,f=2276,p=1567,g=3784,m=5793,b=2896;function y(e,t){let r,a,n=0,i=16;for(;i>0&&!e[i-1];)i--;const s=[{children:[],index:0}];let o,c=s[0];for(r=0;r<i;r++){for(a=0;a<e[r];a++){for(c=s.pop(),c.children[c.index]=t[n];c.index>0;)c=s.pop();for(c.index++,s.push(c);s.length<=r;)s.push(o={children:[],index:0}),c.children[c.index]=o.children,c=o;n++}r+1<i&&(s.push(o={children:[],index:0}),c.children[c.index]=o.children,c=o)}return s[0].children}function v(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function w(e,t,r,n,h,u,d,f,p,g=!1){const m=r.mcusPerLine,b=r.progressive,y=t;let w=0,A=0;function S(){if(A>0)return A--,w>>A&1;if(w=e[t++],255===w){const a=e[t++];if(a){if(220===a&&g){t+=2;const a=(0,i.readUint16)(e,t);if(t+=2,a>0&&a!==r.scanLines)throw new o("Found DNL marker (0xFFDC) while parsing scan data",a)}else if(217===a){if(g){const e=F*(8===r.precision?8:0);if(e>0&&Math.round(r.scanLines/e)>=5)throw new o("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new c("Found EOI marker (0xFFD9) while parsing scan data")}throw new s(`unexpected marker ${(w<<8|a).toString(16)}`)}}return A=7,w>>>7}function k(e){let t=e;for(;;){switch(t=t[S()],typeof t){case"number":return t;case"object":continue}throw new s("invalid huffman sequence")}}function C(e){let t=0;for(;e>0;)t=t<<1|S(),e--;return t}function _(e){if(1===e)return 1===S()?1:-1;const t=C(e);return t>=1<<e-1?t:t+(-1<<e)+1}let T,E=0,O=0,F=0;function P(e,t,r,a,n){const i=r%m;F=(r/m|0)*e.v+a;const s=i*e.h+n;t(e,v(e,F,s))}function I(e,t,r){F=r/e.blocksPerLine|0;const a=r%e.blocksPerLine;t(e,v(e,F,a))}const M=n.length;let R,D,N,L,B,j;j=b?0===u?0===f?function(e,t){const r=k(e.huffmanTableDC),a=0===r?0:_(r)<<p;e.blockData[t]=e.pred+=a}:function(e,t){e.blockData[t]|=S()<<p}:0===f?function(e,t){if(E>0)return void E--;let r=u;const a=d;for(;r<=a;){const a=k(e.huffmanTableAC),n=15&a,i=a>>4;if(0===n){if(i<15){E=C(i)+(1<<i)-1;break}r+=16;continue}r+=i;const s=l[r];e.blockData[t+s]=_(n)*(1<<p),r++}}:function(e,t){let r=u;const a=d;let n,i,o=0;for(;r<=a;){const a=t+l[r],c=e.blockData[a]<0?-1:1;switch(O){case 0:if(i=k(e.huffmanTableAC),n=15&i,o=i>>4,0===n)o<15?(E=C(o)+(1<<o),O=4):(o=16,O=1);else{if(1!==n)throw new s("invalid ACn encoding");T=_(n),O=o?2:3}continue;case 1:case 2:e.blockData[a]?e.blockData[a]+=c*(S()<<p):(o--,0===o&&(O=2===O?3:0));break;case 3:e.blockData[a]?e.blockData[a]+=c*(S()<<p):(e.blockData[a]=T<<p,O=0);break;case 4:e.blockData[a]&&(e.blockData[a]+=c*(S()<<p))}r++}4===O&&(E--,0===E&&(O=0))}:function(e,t){const r=k(e.huffmanTableDC),a=0===r?0:_(r);e.blockData[t]=e.pred+=a;let n=1;for(;n<64;){const r=k(e.huffmanTableAC),a=15&r,i=r>>4;if(0===a){if(i<15)break;n+=16;continue}n+=i;const s=l[n];e.blockData[t+s]=_(a),n++}};let $,U=0;const z=1===M?n[0].blocksPerLine*n[0].blocksPerColumn:m*r.mcusPerColumn;let H,X;for(;U<=z;){const r=h?Math.min(z-U,h):z;if(r>0){for(D=0;D<M;D++)n[D].pred=0;if(E=0,1===M)for(R=n[0],B=0;B<r;B++)I(R,j,U),U++;else for(B=0;B<r;B++){for(D=0;D<M;D++)for(R=n[D],H=R.h,X=R.v,N=0;N<X;N++)for(L=0;L<H;L++)P(R,j,U,N,L);U++}}if(A=0,$=x(e,t),!$)break;if($.invalid){const e=r>0?"unexpected":"excessive";(0,a.warn)(`decodeScan - ${e} MCU data, current marker is: ${$.invalid}`),t=$.offset}if(!($.marker>=65488&&$.marker<=65495))break;t+=2}return t-y}function A(e,t,r){const a=e.quantizationTable,n=e.blockData;let i,o,c,l,y,v,w,A,S,x,k,C,_,T,E,O,F;if(!a)throw new s("missing required Quantization Table.");for(let e=0;e<64;e+=8)S=n[t+e],x=n[t+e+1],k=n[t+e+2],C=n[t+e+3],_=n[t+e+4],T=n[t+e+5],E=n[t+e+6],O=n[t+e+7],S*=a[e],x|k|C|_|T|E|O?(x*=a[e+1],k*=a[e+2],C*=a[e+3],_*=a[e+4],T*=a[e+5],E*=a[e+6],O*=a[e+7],i=m*S+128>>8,o=m*_+128>>8,c=k,l=E,y=b*(x-O)+128>>8,A=b*(x+O)+128>>8,v=C<<4,w=T<<4,i=i+o+1>>1,o=i-o,F=c*g+l*p+128>>8,c=c*p-l*g+128>>8,l=F,y=y+w+1>>1,w=y-w,A=A+v+1>>1,v=A-v,i=i+l+1>>1,l=i-l,o=o+c+1>>1,c=o-c,F=y*f+A*d+2048>>12,y=y*d-A*f+2048>>12,A=F,F=v*u+w*h+2048>>12,v=v*h-w*u+2048>>12,w=F,r[e]=i+A,r[e+7]=i-A,r[e+1]=o+w,r[e+6]=o-w,r[e+2]=c+v,r[e+5]=c-v,r[e+3]=l+y,r[e+4]=l-y):(F=m*S+512>>10,r[e]=F,r[e+1]=F,r[e+2]=F,r[e+3]=F,r[e+4]=F,r[e+5]=F,r[e+6]=F,r[e+7]=F);for(let e=0;e<8;++e)S=r[e],x=r[e+8],k=r[e+16],C=r[e+24],_=r[e+32],T=r[e+40],E=r[e+48],O=r[e+56],x|k|C|_|T|E|O?(i=m*S+2048>>12,o=m*_+2048>>12,c=k,l=E,y=b*(x-O)+2048>>12,A=b*(x+O)+2048>>12,v=C,w=T,i=4112+(i+o+1>>1),o=i-o,F=c*g+l*p+2048>>12,c=c*p-l*g+2048>>12,l=F,y=y+w+1>>1,w=y-w,A=A+v+1>>1,v=A-v,i=i+l+1>>1,l=i-l,o=o+c+1>>1,c=o-c,F=y*f+A*d+2048>>12,y=y*d-A*f+2048>>12,A=F,F=v*u+w*h+2048>>12,v=v*h-w*u+2048>>12,w=F,S=i+A,O=i-A,x=o+w,E=o-w,k=c+v,T=c-v,C=l+y,_=l-y,S<16?S=0:S>=4080?S=255:S>>=4,x<16?x=0:x>=4080?x=255:x>>=4,k<16?k=0:k>=4080?k=255:k>>=4,C<16?C=0:C>=4080?C=255:C>>=4,_<16?_=0:_>=4080?_=255:_>>=4,T<16?T=0:T>=4080?T=255:T>>=4,E<16?E=0:E>=4080?E=255:E>>=4,O<16?O=0:O>=4080?O=255:O>>=4,n[t+e]=S,n[t+e+8]=x,n[t+e+16]=k,n[t+e+24]=C,n[t+e+32]=_,n[t+e+40]=T,n[t+e+48]=E,n[t+e+56]=O):(F=m*S+8192>>14,F=F<-2040?0:F>=2024?255:F+2056>>4,n[t+e]=F,n[t+e+8]=F,n[t+e+16]=F,n[t+e+24]=F,n[t+e+32]=F,n[t+e+40]=F,n[t+e+48]=F,n[t+e+56]=F)}function S(e,t){const r=t.blocksPerLine,a=t.blocksPerColumn,n=new Int16Array(64);for(let e=0;e<a;e++)for(let a=0;a<r;a++)A(t,v(t,e,a),n);return t.blockData}function x(e,t,r=t){const a=e.length-1;let n=r<t?r:t;if(t>=a)return null;const s=(0,i.readUint16)(e,t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};let o=(0,i.readUint16)(e,n);for(;!(o>=65472&&o<=65534);){if(++n>=a)return null;o=(0,i.readUint16)(e,n)}return{invalid:s.toString(16),marker:o,offset:n}}t.JpegImage=class{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e,this._colorTransform=t}parse(e,{dnlScanLines:t=null}={}){function r(){const t=(0,i.readUint16)(e,d);d+=2;let r=d+t-2;const n=x(e,r,d);n?.invalid&&((0,a.warn)("readDataBlock - incorrect length, current marker is: "+n.invalid),r=n.offset);const s=e.subarray(d,r);return d+=s.length,s}function n(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV);for(const a of e.components){const n=Math.ceil(Math.ceil(e.samplesPerLine/8)*a.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*a.v/e.maxV),s=t*a.h,o=r*a.v*64*(s+1);a.blockData=new Int16Array(o),a.blocksPerLine=n,a.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}let h,u,d=0,f=null,p=null,g=0;const m=[],b=[],v=[];let A=(0,i.readUint16)(e,d);if(d+=2,65496!==A)throw new s("SOI not found");A=(0,i.readUint16)(e,d),d+=2;e:for(;65497!==A;){let S,k,C;switch(A){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 _=r();65504===A&&74===_[0]&&70===_[1]&&73===_[2]&&70===_[3]&&0===_[4]&&(f={version:{major:_[5],minor:_[6]},densityUnits:_[7],xDensity:_[8]<<8|_[9],yDensity:_[10]<<8|_[11],thumbWidth:_[12],thumbHeight:_[13],thumbData:_.subarray(14,14+3*_[12]*_[13])}),65518===A&&65===_[0]&&100===_[1]&&111===_[2]&&98===_[3]&&101===_[4]&&(p={version:_[5]<<8|_[6],flags0:_[7]<<8|_[8],flags1:_[9]<<8|_[10],transformCode:_[11]});break;case 65499:const T=(0,i.readUint16)(e,d);d+=2;const E=T+d-2;let O;for(;d<E;){const t=e[d++],r=new Uint16Array(64);if(t>>4){if(t>>4!=1)throw new s("DQT - invalid table spec");for(k=0;k<64;k++)O=l[k],r[O]=(0,i.readUint16)(e,d),d+=2}else for(k=0;k<64;k++)O=l[k],r[O]=e[d++];m[15&t]=r}break;case 65472:case 65473:case 65474:if(h)throw new s("Only single frame JPEGs supported");d+=2,h={},h.extended=65473===A,h.progressive=65474===A,h.precision=e[d++];const F=(0,i.readUint16)(e,d);d+=2,h.scanLines=t||F,h.samplesPerLine=(0,i.readUint16)(e,d),d+=2,h.components=[],h.componentIds={};const P=e[d++];let I=0,M=0;for(S=0;S<P;S++){const t=e[d],r=e[d+1]>>4,a=15&e[d+1];I<r&&(I=r),M<a&&(M=a);const n=e[d+2];C=h.components.push({h:r,v:a,quantizationId:n,quantizationTable:null}),h.componentIds[t]=C-1,d+=3}h.maxH=I,h.maxV=M,n(h);break;case 65476:const R=(0,i.readUint16)(e,d);for(d+=2,S=2;S<R;){const t=e[d++],r=new Uint8Array(16);let a=0;for(k=0;k<16;k++,d++)a+=r[k]=e[d];const n=new Uint8Array(a);for(k=0;k<a;k++,d++)n[k]=e[d];S+=17+a,(t>>4?b:v)[15&t]=y(r,n)}break;case 65501:d+=2,u=(0,i.readUint16)(e,d),d+=2;break;case 65498:const D=1==++g&&!t;d+=2;const N=e[d++],L=[];for(S=0;S<N;S++){const t=e[d++],r=h.componentIds[t],a=h.components[r];a.index=t;const n=e[d++];a.huffmanTableDC=v[n>>4],a.huffmanTableAC=b[15&n],L.push(a)}const B=e[d++],j=e[d++],$=e[d++];try{const t=w(e,d,h,L,u,B,j,$>>4,15&$,D);d+=t}catch(t){if(t instanceof o)return(0,a.warn)(`${t.message} -- attempting to re-parse the JPEG image.`),this.parse(e,{dnlScanLines:t.scanLines});if(t instanceof c){(0,a.warn)(`${t.message} -- ignoring the rest of the image data.`);break e}throw t}break;case 65500:d+=4;break;case 65535:255!==e[d]&&d--;break;default:const U=x(e,d-2,d-3);if(U?.invalid){(0,a.warn)("JpegImage.parse - unexpected data, current marker is: "+U.invalid),d=U.offset;break}if(!U||d>=e.length-1){(0,a.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new s("JpegImage.parse - unknown marker: "+A.toString(16))}A=(0,i.readUint16)(e,d),d+=2}this.width=h.samplesPerLine,this.height=h.scanLines,this.jfif=f,this.adobe=p,this.components=[];for(const e of h.components){const t=m[e.quantizationId];t&&(e.quantizationTable=t),this.components.push({index:e.index,output:S(0,e),scaleX:e.h/h.maxH,scaleY:e.v/h.maxV,blocksPerLine:e.blocksPerLine,blocksPerColumn:e.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(e,t,r=!1){const a=this.width/e,n=this.height/t;let i,s,o,c,l,h,u,d,f,p,g,m=0;const b=this.components.length,y=e*t*b,v=new Uint8ClampedArray(y),w=new Uint32Array(e),A=4294967288;let S;for(u=0;u<b;u++){if(i=this.components[u],s=i.scaleX*a,o=i.scaleY*n,m=u,g=i.output,c=i.blocksPerLine+1<<3,s!==S){for(l=0;l<e;l++)d=0|l*s,w[l]=(d&A)<<3|7&d;S=s}for(h=0;h<t;h++)for(d=0|h*o,p=c*(d&A)|(7&d)<<3,l=0;l<e;l++)v[m]=g[p+w[l]],m+=b}let x=this._decodeTransform;if(r||4!==b||x||(x=new Int32Array([-256,255,-256,255,-256,255,-256,255])),x)for(u=0;u<y;)for(d=0,f=0;d<b;d++,u++,f+=2)v[u]=(v[u]*x[f]>>8)+x[f+1];return v}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(e){let t,r,a;for(let n=0,i=e.length;n<i;n+=3)t=e[n],r=e[n+1],a=e[n+2],e[n]=t-179.456+1.402*a,e[n+1]=t+135.459-.344*r-.714*a,e[n+2]=t-226.816+1.772*r;return e}_convertYccToRgba(e,t){for(let r=0,a=0,n=e.length;r<n;r+=3,a+=4){const n=e[r],i=e[r+1],s=e[r+2];t[a]=n-179.456+1.402*s,t[a+1]=n+135.459-.344*i-.714*s,t[a+2]=n-226.816+1.772*i,t[a+3]=255}return t}_convertYcckToRgb(e){let t,r,a,n,i=0;for(let s=0,o=e.length;s<o;s+=4)t=e[s],r=e[s+1],a=e[s+2],n=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*a-54080610064599e-18*t+.00048449797120281*n-.154362151871126)-122.67195406894+a*(-.000957964378445773*a+.000817076911346625*t-.00477271405408747*n+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*a+.000659397001245577*t+.000426105652938837*n-.176491792462875)+a*(-.000778269941513683*a+.00130872261408275*t+.000770482631801132*n-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*a+.0020741088115012*t-.00288260236853442*n+.814272968359295)-20.810012546947+a*(-153496057440975e-19*a-.000132689043961446*t+.000560833691242812*n-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return e.subarray(0,i)}_convertYcckToRgba(e){for(let t=0,r=e.length;t<r;t+=4){const r=e[t],a=e[t+1],n=e[t+2],i=e[t+3];e[t]=a*(-660635669420364e-19*a+.000437130475926232*n-54080610064599e-18*r+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*r-.00477271405408747*i+1.53380253221734)+r*(.000961250184130688*r-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[t+1]=107.268039397724+a*(219927104525741e-19*a-.000640992018297945*n+.000659397001245577*r+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*r+.000770482631801132*i-.151051492775562)+r*(.00126935368114843*r-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[t+2]=a*(-.000570115196973677*a-263409051004589e-19*n+.0020741088115012*r-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*r+.000560833691242812*i-.195152027534049)+r*(.00174418132927582*r-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407),e[t+3]=255}return e}_convertYcckToCmyk(e){let t,r,a;for(let n=0,i=e.length;n<i;n+=4)t=e[n],r=e[n+1],a=e[n+2],e[n]=434.456-t-1.402*a,e[n+1]=119.541-t+.344*r+.714*a,e[n+2]=481.816-t-1.772*r;return e}_convertCmykToRgb(e){let t,r,a,n,i=0;for(let s=0,o=e.length;s<o;s+=4)t=e[s],r=e[s+1],a=e[s+2],n=e[s+3],e[i++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*a+.003264231057537806*n-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*a-.0002748769067499491*n-.02155688794978967)+a*(-3878099212869363e-20*a-.0003267808279485286*n+.0686742238595345)-n*(.0003361971776183937*n+.7430659151342254),e[i++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*a+.0004791864687436512*n-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*a+.0020200308977307156*n-.7488052167015494)+a*(6834815998235662e-20*a+.00015168452363460973*n-.09751927774728933)-n*(.0003189131175883281*n+.7364883807733168),e[i++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*a-36729317476630422e-22*n-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*a+.0007782692450036253*n-.44015232367526463)+a*(5.068882914068769e-7*a+.0017778369011375071*n-.7591454649749609)-n*(.0003435319965105553*n+.7063770186160144);return e.subarray(0,i)}_convertCmykToRgba(e){for(let t=0,r=e.length;t<r;t+=4){const r=e[t],a=e[t+1],n=e[t+2],i=e[t+3];e[t]=255+r*(-6747147073602441e-20*r+.0008379262121013727*a+.0002894718188643294*n+.003264231057537806*i-1.1185611867203937)+a*(26374107616089405e-21*a-8626949158638572e-20*n-.0002748769067499491*i-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*i+.0686742238595345)-i*(.0003361971776183937*i+.7430659151342254),e[t+1]=255+r*(.00013596372813588848*r+.000924537132573585*a+.00010567359618683593*n+.0004791864687436512*i-.3109689587515875)+a*(-.00023545346108370344*a+.0002702845253534714*n+.0020200308977307156*i-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*i-.09751927774728933)-i*(.0003189131175883281*i+.7364883807733168),e[t+2]=255+r*(13598650411385307e-21*r+.00012423956175490851*a+.0004751985097583589*n-36729317476630422e-22*i-.05562186980264034)+a*(.00016141380598724676*a+.0009692239130725186*n+.0007782692450036253*i-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*i-.7591454649749609)-i*(.0003435319965105553*i+.7063770186160144),e[t+3]=255}return e}getData({width:e,height:t,forceRGBA:r=!1,forceRGB:a=!1,isSourcePDF:i=!1}){if(this.numComponents>4)throw new s("Unsupported color mode");const o=this._getLinearizedBlockData(e,t,i);if(1===this.numComponents&&(r||a)){const e=o.length*(r?4:3),t=new Uint8ClampedArray(e);let a=0;if(r)(0,n.grayToRGBA)(o,new Uint32Array(t.buffer));else for(const e of o)t[a++]=e,t[a++]=e,t[a++]=e;return t}if(3===this.numComponents&&this._isColorConversionNeeded){if(r){const e=new Uint8ClampedArray(o.length/3*4);return this._convertYccToRgba(o,e)}return this._convertYccToRgb(o)}if(4===this.numComponents){if(this._isColorConversionNeeded)return r?this._convertYcckToRgba(o):a?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(r)return this._convertCmykToRgba(o);if(a)return this._convertCmykToRgb(o)}return o}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=n,t.convertToRGBA=function(e){switch(e.kind){case a.ImageKind.GRAYSCALE_1BPP:return n(e);case a.ImageKind.RGB_24BPP:return function({src:e,srcPos:t=0,dest:r,destPos:n=0,width:i,height:s}){let o=0;const c=e.length>>2,l=new Uint32Array(e.buffer,t,c);if(a.FeatureTest.isLittleEndian){for(;o<c-2;o+=3,n+=4){const e=l[o],t=l[o+1],a=l[o+2];r[n]=4278190080|e,r[n+1]=e>>>24|t<<8|4278190080,r[n+2]=t>>>16|a<<16|4278190080,r[n+3]=a>>>8|4278190080}for(let t=4*o,a=e.length;t<a;t+=3)r[n++]=e[t]|e[t+1]<<8|e[t+2]<<16|4278190080}else{for(;o<c-2;o+=3,n+=4){const e=l[o],t=l[o+1],a=l[o+2];r[n]=255|e,r[n+1]=e<<24|t>>>8|255,r[n+2]=t<<16|a>>>16|255,r[n+3]=a<<8|255}for(let t=4*o,a=e.length;t<a;t+=3)r[n++]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|255}return{srcPos:t,destPos:n}}(e)}return null},t.grayToRGBA=function(e,t){if(a.FeatureTest.isLittleEndian)for(let r=0,a=e.length;r<a;r++)t[r]=65793*e[r]|4278190080;else for(let r=0,a=e.length;r<a;r++)t[r]=16843008*e[r]|255};var a=r(2);function n({src:e,srcPos:t=0,dest:r,width:n,height:i,nonBlackColor:s=4294967295,inverseDecode:o=!1}){const c=a.FeatureTest.isLittleEndian?4278190080:255,[l,h]=o?[s,c]:[c,s],u=n>>3,d=7&n,f=e.length;r=new Uint32Array(r.buffer);let p=0;for(let a=0;a<i;a++){for(const a=t+u;t<a;t++){const a=t<f?e[t]:255;r[p++]=128&a?h:l,r[p++]=64&a?h:l,r[p++]=32&a?h:l,r[p++]=16&a?h:l,r[p++]=8&a?h:l,r[p++]=4&a?h:l,r[p++]=2&a?h:l,r[p++]=1&a?h:l}if(0===d)continue;const a=t<f?e[t++]:255;for(let e=0;e<d;e++)r[p++]=a&1<<7-e?h:l}return{srcPos:t,destPos:p}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpxStream=void 0;var a=r(18),n=r(30),i=r(2);class s extends a.DecodeStream{constructor(e,t,r){super(t),this.stream=e,this.dict=e.dict,this.maybeLength=t,this.params=r}get bytes(){return(0,i.shadow)(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){if(this.eof)return;const e=new n.JpxImage;e.parse(this.bytes);const t=e.width,r=e.height,a=e.componentsCount,i=e.tiles.length;if(1===i)this.buffer=e.tiles[0].items;else{const n=new Uint8ClampedArray(t*r*a);for(let r=0;r<i;r++){const i=e.tiles[r],s=i.width,o=i.height,c=i.left,l=i.top,h=i.items;let u=0,d=(t*l+c)*a;const f=t*a,p=s*a;for(let e=0;e<o;e++){const e=h.subarray(u,u+p);n.set(e,d),u+=p,d+=f}}this.buffer=n}this.bufferLength=this.buffer.length,this.eof=!0}}t.JpxStream=s},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JpxImage=void 0;var a=r(2),n=r(3),i=r(25);class s extends a.BaseException{constructor(e){super(`JPX error: ${e}`,"JpxError")}}const o={LL:0,LH:1,HL:1,HH:2};function c(e,t){e.x0=Math.ceil(t.XOsiz/e.XRsiz),e.x1=Math.ceil(t.Xsiz/e.XRsiz),e.y0=Math.ceil(t.YOsiz/e.YRsiz),e.y1=Math.ceil(t.Ysiz/e.YRsiz),e.width=e.x1-e.x0,e.height=e.y1-e.y0}function l(e,t){const r=e.SIZ,a=[];let n;const i=Math.ceil((r.Xsiz-r.XTOsiz)/r.XTsiz),s=Math.ceil((r.Ysiz-r.YTOsiz)/r.YTsiz);for(let e=0;e<s;e++)for(let t=0;t<i;t++)n={},n.tx0=Math.max(r.XTOsiz+t*r.XTsiz,r.XOsiz),n.ty0=Math.max(r.YTOsiz+e*r.YTsiz,r.YOsiz),n.tx1=Math.min(r.XTOsiz+(t+1)*r.XTsiz,r.Xsiz),n.ty1=Math.min(r.YTOsiz+(e+1)*r.YTsiz,r.Ysiz),n.width=n.tx1-n.tx0,n.height=n.ty1-n.ty0,n.components=[],a.push(n);e.tiles=a;for(let e=0,i=r.Csiz;e<i;e++){const r=t[e];for(let t=0,i=a.length;t<i;t++){const i={};n=a[t],i.tcx0=Math.ceil(n.tx0/r.XRsiz),i.tcy0=Math.ceil(n.ty0/r.YRsiz),i.tcx1=Math.ceil(n.tx1/r.XRsiz),i.tcy1=Math.ceil(n.ty1/r.YRsiz),i.width=i.tcx1-i.tcx0,i.height=i.tcy1-i.tcy0,n.components[e]=i}}}function h(e,t,r){const a=t.codingStyleParameters,n={};return a.entropyCoderWithCustomPrecincts?(n.PPx=a.precinctsSizes[r].PPx,n.PPy=a.precinctsSizes[r].PPy):(n.PPx=15,n.PPy=15),n.xcb_=r>0?Math.min(a.xcb,n.PPx-1):Math.min(a.xcb,n.PPx),n.ycb_=r>0?Math.min(a.ycb,n.PPy-1):Math.min(a.ycb,n.PPy),n}function u(e,t,r){const a=1<<r.PPx,n=1<<r.PPy,i=0===t.resLevel,s=1<<r.PPx+(i?0:-1),o=1<<r.PPy+(i?0:-1),c=t.trx1>t.trx0?Math.ceil(t.trx1/a)-Math.floor(t.trx0/a):0,l=t.try1>t.try0?Math.ceil(t.try1/n)-Math.floor(t.try0/n):0,h=c*l;t.precinctParameters={precinctWidth:a,precinctHeight:n,numprecinctswide:c,numprecinctshigh:l,numprecincts:h,precinctWidthInSubband:s,precinctHeightInSubband:o}}function d(e,t,r){const a=r.xcb_,n=r.ycb_,i=1<<a,s=1<<n,o=t.tbx0>>a,c=t.tby0>>n,l=t.tbx1+i-1>>a,h=t.tby1+s-1>>n,u=t.resolution.precinctParameters,d=[],f=[];let p,g,m,b;for(g=c;g<h;g++)for(p=o;p<l;p++){if(m={cbx:p,cby:g,tbx0:i*p,tby0:s*g,tbx1:i*(p+1),tby1:s*(g+1)},m.tbx0_=Math.max(t.tbx0,m.tbx0),m.tby0_=Math.max(t.tby0,m.tby0),m.tbx1_=Math.min(t.tbx1,m.tbx1),m.tby1_=Math.min(t.tby1,m.tby1),b=Math.floor((m.tbx0_-t.tbx0)/u.precinctWidthInSubband)+Math.floor((m.tby0_-t.tby0)/u.precinctHeightInSubband)*u.numprecinctswide,m.precinctNumber=b,m.subbandType=t.type,m.Lblock=3,m.tbx1_<=m.tbx0_||m.tby1_<=m.tby0_)continue;d.push(m);let e=f[b];void 0!==e?(p<e.cbxMin?e.cbxMin=p:p>e.cbxMax&&(e.cbxMax=p),g<e.cbyMin?e.cbxMin=g:g>e.cbyMax&&(e.cbyMax=g)):f[b]=e={cbxMin:p,cbyMin:g,cbxMax:p,cbyMax:g},m.precinct=e}t.codeblockParameters={codeblockWidth:a,codeblockHeight:n,numcodeblockwide:l-o+1,numcodeblockhigh:h-c+1},t.codeblocks=d,t.precincts=f}function f(e,t,r){const a=[],n=e.subbands;for(let e=0,r=n.length;e<r;e++){const r=n[e].codeblocks;for(let e=0,n=r.length;e<n;e++){const n=r[e];n.precinctNumber===t&&a.push(n)}}return{layerNumber:r,codeblocks:a}}function p(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],n=a.codingStyleDefaultParameters.layersCount,i=t.Csiz;let o=0;for(let e=0;e<i;e++)o=Math.max(o,a.components[e].codingStyleParameters.decompositionLevelsCount);let c=0,l=0,h=0,u=0;this.nextPacket=function(){for(;c<n;c++){for(;l<=o;l++){for(;h<i;h++){const e=a.components[h];if(l>e.codingStyleParameters.decompositionLevelsCount)continue;const t=e.resolutions[l],r=t.precinctParameters.numprecincts;for(;u<r;){const e=f(t,u,c);return u++,e}u=0}h=0}l=0}throw new s("Out of packets")}}function g(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],n=a.codingStyleDefaultParameters.layersCount,i=t.Csiz;let o=0;for(let e=0;e<i;e++)o=Math.max(o,a.components[e].codingStyleParameters.decompositionLevelsCount);let c=0,l=0,h=0,u=0;this.nextPacket=function(){for(;c<=o;c++){for(;l<n;l++){for(;h<i;h++){const e=a.components[h];if(c>e.codingStyleParameters.decompositionLevelsCount)continue;const t=e.resolutions[c],r=t.precinctParameters.numprecincts;for(;u<r;){const e=f(t,u,l);return u++,e}u=0}h=0}l=0}throw new s("Out of packets")}}function m(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],n=a.codingStyleDefaultParameters.layersCount,i=t.Csiz;let o,c,l,h,u=0;for(l=0;l<i;l++){const e=a.components[l];u=Math.max(u,e.codingStyleParameters.decompositionLevelsCount)}const d=new Int32Array(u+1);for(c=0;c<=u;++c){let e=0;for(l=0;l<i;++l){const t=a.components[l].resolutions;c<t.length&&(e=Math.max(e,t[c].precinctParameters.numprecincts))}d[c]=e}o=0,c=0,l=0,h=0,this.nextPacket=function(){for(;c<=u;c++){for(;h<d[c];h++){for(;l<i;l++){const e=a.components[l];if(c>e.codingStyleParameters.decompositionLevelsCount)continue;const t=e.resolutions[c],r=t.precinctParameters.numprecincts;if(!(h>=r)){for(;o<n;){const e=f(t,h,o);return o++,e}o=0}}l=0}h=0}throw new s("Out of packets")}}function b(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],n=a.codingStyleDefaultParameters.layersCount,i=t.Csiz,o=w(a),c=o;let l=0,h=0,u=0,d=0,p=0;this.nextPacket=function(){for(;p<c.maxNumHigh;p++){for(;d<c.maxNumWide;d++){for(;u<i;u++){const e=a.components[u],t=e.codingStyleParameters.decompositionLevelsCount;for(;h<=t;h++){const t=e.resolutions[h],r=o.components[u].resolutions[h],a=v(d,p,r,c,t);if(null!==a){for(;l<n;){const e=f(t,a,l);return l++,e}l=0}}h=0}u=0}d=0}throw new s("Out of packets")}}function y(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],n=a.codingStyleDefaultParameters.layersCount,i=t.Csiz,o=w(a);let c=0,l=0,h=0,u=0,d=0;this.nextPacket=function(){for(;h<i;++h){const e=a.components[h],t=o.components[h],r=e.codingStyleParameters.decompositionLevelsCount;for(;d<t.maxNumHigh;d++){for(;u<t.maxNumWide;u++){for(;l<=r;l++){const r=e.resolutions[l],a=t.resolutions[l],i=v(u,d,a,t,r);if(null!==i){for(;c<n;){const e=f(r,i,c);return c++,e}c=0}}l=0}u=0}d=0}throw new s("Out of packets")}}function v(e,t,r,a,n){const i=e*a.minWidth,s=t*a.minHeight;if(i%r.width!=0||s%r.height!=0)return null;const o=s/r.width*n.precinctParameters.numprecinctswide;return i/r.height+o}function w(e){const t=e.components.length;let r=Number.MAX_VALUE,a=Number.MAX_VALUE,n=0,i=0;const s=new Array(t);for(let o=0;o<t;o++){const t=e.components[o],c=t.codingStyleParameters.decompositionLevelsCount,l=new Array(c+1);let h=Number.MAX_VALUE,u=Number.MAX_VALUE,d=0,f=0,p=1;for(let e=c;e>=0;--e){const r=t.resolutions[e],a=p*r.precinctParameters.precinctWidth,n=p*r.precinctParameters.precinctHeight;h=Math.min(h,a),u=Math.min(u,n),d=Math.max(d,r.precinctParameters.numprecinctswide),f=Math.max(f,r.precinctParameters.numprecinctshigh),l[e]={width:a,height:n},p<<=1}r=Math.min(r,h),a=Math.min(a,u),n=Math.max(n,d),i=Math.max(i,f),s[o]={resolutions:l,minWidth:h,minHeight:u,maxNumWide:d,maxNumHigh:f}}return{components:s,minWidth:r,minHeight:a,maxNumWide:n,maxNumHigh:i}}function A(e){const t=e.SIZ,r=e.currentTile.index,a=e.tiles[r],n=t.Csiz;for(let e=0;e<n;e++){const t=a.components[e],r=t.codingStyleParameters.decompositionLevelsCount,n=[],i=[];for(let e=0;e<=r;e++){const a=h(0,t,e),s={},o=1<<r-e;let c;if(s.trx0=Math.ceil(t.tcx0/o),s.try0=Math.ceil(t.tcy0/o),s.trx1=Math.ceil(t.tcx1/o),s.try1=Math.ceil(t.tcy1/o),s.resLevel=e,u(0,s,a),n.push(s),0===e)c={},c.type="LL",c.tbx0=Math.ceil(t.tcx0/o),c.tby0=Math.ceil(t.tcy0/o),c.tbx1=Math.ceil(t.tcx1/o),c.tby1=Math.ceil(t.tcy1/o),c.resolution=s,d(0,c,a),i.push(c),s.subbands=[c];else{const n=1<<r-e+1,o=[];c={},c.type="HL",c.tbx0=Math.ceil(t.tcx0/n-.5),c.tby0=Math.ceil(t.tcy0/n),c.tbx1=Math.ceil(t.tcx1/n-.5),c.tby1=Math.ceil(t.tcy1/n),c.resolution=s,d(0,c,a),i.push(c),o.push(c),c={},c.type="LH",c.tbx0=Math.ceil(t.tcx0/n),c.tby0=Math.ceil(t.tcy0/n-.5),c.tbx1=Math.ceil(t.tcx1/n),c.tby1=Math.ceil(t.tcy1/n-.5),c.resolution=s,d(0,c,a),i.push(c),o.push(c),c={},c.type="HH",c.tbx0=Math.ceil(t.tcx0/n-.5),c.tby0=Math.ceil(t.tcy0/n-.5),c.tbx1=Math.ceil(t.tcx1/n-.5),c.tby1=Math.ceil(t.tcy1/n-.5),c.resolution=s,d(0,c,a),i.push(c),o.push(c),s.subbands=o}}t.resolutions=n,t.subbands=i}const i=a.codingStyleDefaultParameters.progressionOrder;switch(i){case 0:a.packetsIterator=new p(e);break;case 1:a.packetsIterator=new g(e);break;case 2:a.packetsIterator=new m(e);break;case 3:a.packetsIterator=new b(e);break;case 4:a.packetsIterator=new y(e);break;default:throw new s(`Unsupported progression order ${i}`)}}function S(e,t,r,a){let i,o=0,c=0,l=!1;function h(e){for(;c<e;){const e=t[r+o];o++,l?(i=i<<7|e,c+=7,l=!1):(i=i<<8|e,c+=8),255===e&&(l=!0)}return c-=e,i>>>c&(1<<e)-1}function u(e){return 255===t[r+o-1]&&t[r+o]===e?(d(1),!0):255===t[r+o]&&t[r+o+1]===e&&(d(2),!0)}function d(e){o+=e}function f(){c=0,l&&(o++,l=!1)}function p(){if(0===h(1))return 1;if(0===h(1))return 2;let e=h(2);return e<3?e+3:(e=h(5),e<31?e+6:(e=h(7),e+37))}const g=e.currentTile.index,m=e.tiles[g],b=e.COD.sopMarkerUsed,y=e.COD.ephMarkerUsed,v=m.packetsIterator;for(;o<a;){f(),b&&u(145)&&d(4);const e=v.nextPacket();if(!h(1))continue;const a=e.layerNumber,i=[];let c;for(let t=0,r=e.codeblocks.length;t<r;t++){c=e.codeblocks[t];let r=c.precinct;const o=c.cbx-r.cbxMin,l=c.cby-r.cbyMin;let u,d,f=!1,g=!1;if(void 0!==c.included)f=!!h(1);else{let e;if(r=c.precinct,void 0!==r.inclusionTree)e=r.inclusionTree;else{const t=r.cbxMax-r.cbxMin+1,n=r.cbyMax-r.cbyMin+1;e=new T(t,n,a),d=new _(t,n),r.inclusionTree=e,r.zeroBitPlanesTree=d;for(let e=0;e<a;e++)if(0!==h(1))throw new s("Invalid tag tree")}if(e.reset(o,l,a))for(;;){if(!h(1)){e.incrementValue(a);break}if(u=!e.nextLevel(),u){c.included=!0,f=g=!0;break}}}if(!f)continue;if(g){for(d=r.zeroBitPlanesTree,d.reset(o,l);;)if(h(1)){if(u=!d.nextLevel(),u)break}else d.incrementValue();c.zeroBitPlanes=d.value}const m=p();for(;h(1);)c.Lblock++;const b=(0,n.log2)(m),y=h((m<1<<b?b-1:b)+c.Lblock);i.push({codeblock:c,codingpasses:m,dataLength:y})}for(f(),y&&u(146);i.length>0;){const e=i.shift();c=e.codeblock,void 0===c.data&&(c.data=[]),c.data.push({data:t,start:r+o,end:r+o+e.dataLength,codingpasses:e.codingpasses}),o+=e.dataLength}}return o}function x(e,t,r,a,n,s,o,c,l){const h=a.tbx0,u=a.tby0,d=a.tbx1-a.tbx0,f=a.codeblocks,p="H"===a.type.charAt(0)?1:0,g="H"===a.type.charAt(1)?t:0;for(let r=0,m=f.length;r<m;++r){const m=f[r],b=m.tbx1_-m.tbx0_,y=m.tby1_-m.tby0_;if(0===b||0===y)continue;if(void 0===m.data)continue;const v=new E(b,y,m.subbandType,m.zeroBitPlanes,s);let w=2;const A=m.data;let S,x,k,C=0,_=0;for(S=0,x=A.length;S<x;S++)k=A[S],C+=k.end-k.start,_+=k.codingpasses;const T=new Uint8Array(C);let O=0;for(S=0,x=A.length;S<x;S++){k=A[S];const e=k.data.subarray(k.start,k.end);T.set(e,O),O+=e.length}const F=new i.ArithmeticDecoder(T,0,C);for(v.setDecoder(F),S=0;S<_;S++){switch(w){case 0:v.runSignificancePropagationPass();break;case 1:v.runMagnitudeRefinementPass();break;case 2:v.runCleanupPass(),c&&v.checkSegmentationSymbol()}l&&v.reset(),w=(w+1)%3}let P=m.tbx0_-h+(m.tby0_-u)*d;const I=v.coefficentsSign,M=v.coefficentsMagnitude,R=v.bitsDecoded,D=o?0:.5;let N,L,B;O=0;const j="LL"!==a.type;for(S=0;S<y;S++){const r=2*(P/d|0)*(t-d)+p+g;for(N=0;N<b;N++)L=M[O],0!==L&&(L=(L+D)*n,0!==I[O]&&(L=-L),B=R[O],e[j?r+(P<<1):P]=o&&B>=s?L:L*(1<<s-B)),P++,O++;P+=d-b}}}function k(e,t,r){const a=t.components[r],n=a.codingStyleParameters,i=a.quantizationParameters,s=n.decompositionLevelsCount,c=i.SPqcds,l=i.scalarExpounded,h=i.guardBits,u=n.segmentationSymbolUsed,d=n.resetContextProbabilities,f=e.components[r].precision,p=n.reversibleTransformation,g=p?new P:new F,m=[];let b=0;for(let e=0;e<=s;e++){const t=a.resolutions[e],r=t.trx1-t.trx0,n=t.try1-t.try0,i=new Float32Array(r*n);for(let a=0,n=t.subbands.length;a<n;a++){let n,s;l?(n=c[b].mu,s=c[b].epsilon,b++):(n=c[0].mu,s=c[0].epsilon+(e>0?1-e:0));const g=t.subbands[a],m=o[g.type];x(i,r,0,g,p?1:2**(f+m-s)*(1+n/2048),h+s-1,p,u,d)}m.push({width:r,height:n,items:i})}const y=g.calculate(m,a.tcx0,a.tcy0);return{left:a.tcx0,top:a.tcy0,width:y.width,height:y.height,items:y.items}}function C(e,t){const r=e.SIZ.Csiz,a=e.tiles[t];for(let t=0;t<r;t++){const r=a.components[t],n=void 0!==e.currentTile.QCC[t]?e.currentTile.QCC[t]:e.currentTile.QCD;r.quantizationParameters=n;const i=void 0!==e.currentTile.COC[t]?e.currentTile.COC[t]:e.currentTile.COD;r.codingStyleParameters=i}a.codingStyleDefaultParameters=e.currentTile.COD}t.JpxImage=class{constructor(){this.failOnCorruptedImage=!1}parse(e){if(65359===(0,n.readUint16)(e,0))return void this.parseCodestream(e,0,e.length);const t=e.length;let r=0;for(;r<t;){let i=8,o=(0,n.readUint32)(e,r);const c=(0,n.readUint32)(e,r+4);if(r+=i,1===o&&(o=4294967296*(0,n.readUint32)(e,r)+(0,n.readUint32)(e,r+4),r+=8,i+=8),0===o&&(o=t-r+i),o<i)throw new s("Invalid box field size");const l=o-i;let h=!0;switch(c){case 1785737832:h=!1;break;case 1668246642:const t=e[r];if(1===t){const t=(0,n.readUint32)(e,r+3);switch(t){case 16:case 17:case 18:break;default:(0,a.warn)("Unknown colorspace "+t)}}else 2===t&&(0,a.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(e,r,r+l);break;case 1783636e3:218793738!==(0,n.readUint32)(e,r)&&(0,a.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:const i=String.fromCharCode(c>>24&255,c>>16&255,c>>8&255,255&c);(0,a.warn)(`Unsupported header type ${c} (${i}).`)}h&&(r+=l)}}parseImageProperties(e){let t=e.getByte();for(;t>=0;){const r=t;if(t=e.getByte(),65361==(r<<8|t)){e.skip(4);const t=e.getInt32()>>>0,r=e.getInt32()>>>0,a=e.getInt32()>>>0,n=e.getInt32()>>>0;e.skip(16);const i=e.getUint16();return this.width=t-a,this.height=r-n,this.componentsCount=i,void(this.bitsPerComponent=8)}}throw new s("No size marker found in JPX stream")}parseCodestream(e,t,r){const i={};let o=!1;try{let s=t;for(;s+1<r;){const t=(0,n.readUint16)(e,s);s+=2;let r,h,u,d,f,p,g=0;switch(t){case 65359:i.mainHeader=!0;break;case 65497:break;case 65361:g=(0,n.readUint16)(e,s);const m={};m.Xsiz=(0,n.readUint32)(e,s+4),m.Ysiz=(0,n.readUint32)(e,s+8),m.XOsiz=(0,n.readUint32)(e,s+12),m.YOsiz=(0,n.readUint32)(e,s+16),m.XTsiz=(0,n.readUint32)(e,s+20),m.YTsiz=(0,n.readUint32)(e,s+24),m.XTOsiz=(0,n.readUint32)(e,s+28),m.YTOsiz=(0,n.readUint32)(e,s+32);const b=(0,n.readUint16)(e,s+36);m.Csiz=b;const y=[];r=s+38;for(let t=0;t<b;t++){const t={precision:1+(127&e[r]),isSigned:!!(128&e[r]),XRsiz:e[r+1],YRsiz:e[r+2]};r+=3,c(t,m),y.push(t)}i.SIZ=m,i.components=y,l(i,y),i.QCC=[],i.COC=[];break;case 65372:g=(0,n.readUint16)(e,s);const v={};switch(r=s+2,h=e[r++],31&h){case 0:d=8,f=!0;break;case 1:d=16,f=!1;break;case 2:d=16,f=!0;break;default:throw new Error("Invalid SQcd value "+h)}for(v.noQuantization=8===d,v.scalarExpounded=f,v.guardBits=h>>5,u=[];r<g+s;){const t={};8===d?(t.epsilon=e[r++]>>3,t.mu=0):(t.epsilon=e[r]>>3,t.mu=(7&e[r])<<8|e[r+1],r+=2),u.push(t)}v.SPqcds=u,i.mainHeader?i.QCD=v:(i.currentTile.QCD=v,i.currentTile.QCC=[]);break;case 65373:g=(0,n.readUint16)(e,s);const w={};let x;switch(r=s+2,i.SIZ.Csiz<257?x=e[r++]:(x=(0,n.readUint16)(e,r),r+=2),h=e[r++],31&h){case 0:d=8,f=!0;break;case 1:d=16,f=!1;break;case 2:d=16,f=!0;break;default:throw new Error("Invalid SQcd value "+h)}for(w.noQuantization=8===d,w.scalarExpounded=f,w.guardBits=h>>5,u=[];r<g+s;){const t={};8===d?(t.epsilon=e[r++]>>3,t.mu=0):(t.epsilon=e[r]>>3,t.mu=(7&e[r])<<8|e[r+1],r+=2),u.push(t)}w.SPqcds=u,i.mainHeader?i.QCC[x]=w:i.currentTile.QCC[x]=w;break;case 65362:g=(0,n.readUint16)(e,s);const k={};r=s+2;const _=e[r++];k.entropyCoderWithCustomPrecincts=!!(1&_),k.sopMarkerUsed=!!(2&_),k.ephMarkerUsed=!!(4&_),k.progressionOrder=e[r++],k.layersCount=(0,n.readUint16)(e,r),r+=2,k.multipleComponentTransform=e[r++],k.decompositionLevelsCount=e[r++],k.xcb=2+(15&e[r++]),k.ycb=2+(15&e[r++]);const T=e[r++];if(k.selectiveArithmeticCodingBypass=!!(1&T),k.resetContextProbabilities=!!(2&T),k.terminationOnEachCodingPass=!!(4&T),k.verticallyStripe=!!(8&T),k.predictableTermination=!!(16&T),k.segmentationSymbolUsed=!!(32&T),k.reversibleTransformation=e[r++],k.entropyCoderWithCustomPrecincts){const t=[];for(;r<g+s;){const a=e[r++];t.push({PPx:15&a,PPy:a>>4})}k.precinctsSizes=t}const E=[];k.selectiveArithmeticCodingBypass&&E.push("selectiveArithmeticCodingBypass"),k.terminationOnEachCodingPass&&E.push("terminationOnEachCodingPass"),k.verticallyStripe&&E.push("verticallyStripe"),k.predictableTermination&&E.push("predictableTermination"),E.length>0&&(o=!0,(0,a.warn)(`JPX: Unsupported COD options (${E.join(", ")}).`)),i.mainHeader?i.COD=k:(i.currentTile.COD=k,i.currentTile.COC=[]);break;case 65424:g=(0,n.readUint16)(e,s),p={},p.index=(0,n.readUint16)(e,s+2),p.length=(0,n.readUint32)(e,s+4),p.dataEnd=p.length+s-2,p.partIndex=e[s+8],p.partsCount=e[s+9],i.mainHeader=!1,0===p.partIndex&&(p.COD=i.COD,p.COC=i.COC.slice(0),p.QCD=i.QCD,p.QCC=i.QCC.slice(0)),i.currentTile=p;break;case 65427:p=i.currentTile,0===p.partIndex&&(C(i,p.index),A(i)),g=p.dataEnd-s,S(i,e,s,g);break;case 65363:(0,a.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:g=(0,n.readUint16)(e,s);break;default:throw new Error("Unknown codestream code: "+t.toString(16))}s+=g}}catch(e){if(o||this.failOnCorruptedImage)throw new s(e.message);(0,a.warn)(`JPX: Trying to recover from: "${e.message}".`)}this.tiles=function(e){const t=e.SIZ,r=e.components,a=t.Csiz,n=[];for(let t=0,i=e.tiles.length;t<i;t++){const i=e.tiles[t],s=[];for(let t=0;t<a;t++)s[t]=k(e,i,t);const o=s[0],c=new Uint8ClampedArray(o.items.length*a),l={left:o.left,top:o.top,width:o.width,height:o.height,items:c};let h,u,d,f,p,g,m,b=0;if(i.codingStyleDefaultParameters.multipleComponentTransform){const e=4===a,t=s[0].items,n=s[1].items,o=s[2].items,l=e?s[3].items:null;h=r[0].precision-8,u=.5+(128<<h);const y=i.components[0],v=a-3;if(f=t.length,y.codingStyleParameters.reversibleTransformation)for(d=0;d<f;d++,b+=v){p=t[d]+u,g=n[d],m=o[d];const e=p-(m+g>>2);c[b++]=e+m>>h,c[b++]=e>>h,c[b++]=e+g>>h}else for(d=0;d<f;d++,b+=v)p=t[d]+u,g=n[d],m=o[d],c[b++]=p+1.402*m>>h,c[b++]=p-.34413*g-.71414*m>>h,c[b++]=p+1.772*g>>h;if(e)for(d=0,b=3;d<f;d++,b+=4)c[b]=l[d]+u>>h}else for(let e=0;e<a;e++){const t=s[e].items;for(h=r[e].precision-8,u=.5+(128<<h),b=e,d=0,f=t.length;d<f;d++)c[b]=t[d]+u>>h,b+=a}n.push(l)}return n}(i),this.width=i.SIZ.Xsiz-i.SIZ.XOsiz,this.height=i.SIZ.Ysiz-i.SIZ.YOsiz,this.componentsCount=i.SIZ.Csiz}};class _{constructor(e,t){const r=(0,n.log2)(Math.max(e,t))+1;this.levels=[];for(let a=0;a<r;a++){const r={width:e,height:t,items:[]};this.levels.push(r),e=Math.ceil(e/2),t=Math.ceil(t/2)}}reset(e,t){let r,a=0,n=0;for(;a<this.levels.length;){r=this.levels[a];const i=e+t*r.width;if(void 0!==r.items[i]){n=r.items[i];break}r.index=i,e>>=1,t>>=1,a++}a--,r=this.levels[a],r.items[r.index]=n,this.currentLevel=a,delete this.value}incrementValue(){const e=this.levels[this.currentLevel];e.items[e.index]++}nextLevel(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];return e--,e<0?(this.value=r,!1):(this.currentLevel=e,t=this.levels[e],t.items[t.index]=r,!0)}}class T{constructor(e,t,r){const a=(0,n.log2)(Math.max(e,t))+1;this.levels=[];for(let n=0;n<a;n++){const a=new Uint8Array(e*t);for(let e=0,t=a.length;e<t;e++)a[e]=r;const n={width:e,height:t,items:a};this.levels.push(n),e=Math.ceil(e/2),t=Math.ceil(t/2)}}reset(e,t,r){let a=0;for(;a<this.levels.length;){const n=this.levels[a],i=e+t*n.width;n.index=i;const s=n.items[i];if(255===s)break;if(s>r)return this.currentLevel=a,this.propagateValues(),!1;e>>=1,t>>=1,a++}return this.currentLevel=a-1,!0}incrementValue(e){const t=this.levels[this.currentLevel];t.items[t.index]=e+1,this.propagateValues()}propagateValues(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];for(;--e>=0;)t=this.levels[e],t.items[t.index]=r}nextLevel(){let e=this.currentLevel,t=this.levels[e];const r=t.items[t.index];return t.items[t.index]=255,e--,!(e<0||(this.currentLevel=e,t=this.levels[e],t.items[t.index]=r,0))}}class E{static UNIFORM_CONTEXT=17;static RUNLENGTH_CONTEXT=18;static 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]);static 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]);static 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]);constructor(e,t,r,a,n){let i;this.width=e,this.height=t,i="HH"===r?E.HHContextLabel:"HL"===r?E.HLContextLabel:E.LLAndLHContextsLabel,this.contextLabelTable=i;const s=e*t;let o;this.neighborsSignificance=new Uint8Array(s),this.coefficentsSign=new Uint8Array(s),o=n>14?new Uint32Array(s):n>6?new Uint16Array(s):new Uint8Array(s),this.coefficentsMagnitude=o,this.processingFlags=new Uint8Array(s);const c=new Uint8Array(s);if(0!==a)for(let e=0;e<s;e++)c[e]=a;this.bitsDecoded=c,this.reset()}setDecoder(e){this.decoder=e}reset(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[E.UNIFORM_CONTEXT]=92,this.contexts[E.RUNLENGTH_CONTEXT]=6}setNeighborsSignificance(e,t,r){const a=this.neighborsSignificance,n=this.width,i=this.height,s=t>0,o=t+1<n;let c;e>0&&(c=r-n,s&&(a[c-1]+=16),o&&(a[c+1]+=16),a[c]+=4),e+1<i&&(c=r+n,s&&(a[c-1]+=16),o&&(a[c+1]+=16),a[c]+=4),s&&(a[r-1]+=1),o&&(a[r+1]+=1),a[r]|=128}runSignificancePropagationPass(){const e=this.decoder,t=this.width,r=this.height,a=this.coefficentsMagnitude,n=this.coefficentsSign,i=this.neighborsSignificance,s=this.processingFlags,o=this.contexts,c=this.contextLabelTable,l=this.bitsDecoded;for(let h=0;h<r;h+=4)for(let u=0;u<t;u++){let d=h*t+u;for(let f=0;f<4;f++,d+=t){const t=h+f;if(t>=r)break;if(s[d]&=-2,a[d]||!i[d])continue;const p=c[i[d]];if(e.readBit(o,p)){const e=this.decodeSignBit(t,u,d);n[d]=e,a[d]=1,this.setNeighborsSignificance(t,u,d),s[d]|=2}l[d]++,s[d]|=1}}}decodeSignBit(e,t,r){const a=this.width,n=this.height,i=this.coefficentsMagnitude,s=this.coefficentsSign;let o,c,l,h,u,d;h=t>0&&0!==i[r-1],t+1<a&&0!==i[r+1]?(l=s[r+1],h?(c=s[r-1],o=1-l-c):o=1-l-l):h?(c=s[r-1],o=1-c-c):o=0;const f=3*o;return h=e>0&&0!==i[r-a],e+1<n&&0!==i[r+a]?(l=s[r+a],h?(c=s[r-a],o=1-l-c+f):o=1-l-l+f):h?(c=s[r-a],o=1-c-c+f):o=f,o>=0?(u=9+o,d=this.decoder.readBit(this.contexts,u)):(u=9-o,d=1^this.decoder.readBit(this.contexts,u)),d}runMagnitudeRefinementPass(){const e=this.decoder,t=this.width,r=this.height,a=this.coefficentsMagnitude,n=this.neighborsSignificance,i=this.contexts,s=this.bitsDecoded,o=this.processingFlags,c=t*r,l=4*t;for(let r,h=0;h<c;h=r){r=Math.min(c,h+l);for(let c=0;c<t;c++)for(let l=h+c;l<r;l+=t){if(!a[l]||1&o[l])continue;let t=16;2&o[l]&&(o[l]^=2,t=127&n[l]?14:15);const r=e.readBit(i,t);a[l]=a[l]<<1|r,s[l]++,o[l]|=1}}}runCleanupPass(){const e=this.decoder,t=this.width,r=this.height,a=this.neighborsSignificance,n=this.coefficentsMagnitude,i=this.coefficentsSign,s=this.contexts,o=this.contextLabelTable,c=this.bitsDecoded,l=this.processingFlags,h=t,u=2*t,d=3*t;let f;for(let p=0;p<r;p=f){f=Math.min(p+4,r);const g=p*t,m=p+3<r;for(let r=0;r<t;r++){const b=g+r;let y,v=0,w=b,A=p;if(m&&0===l[b]&&0===l[b+h]&&0===l[b+u]&&0===l[b+d]&&0===a[b]&&0===a[b+h]&&0===a[b+u]&&0===a[b+d]){if(!e.readBit(s,E.RUNLENGTH_CONTEXT)){c[b]++,c[b+h]++,c[b+u]++,c[b+d]++;continue}v=e.readBit(s,E.UNIFORM_CONTEXT)<<1|e.readBit(s,E.UNIFORM_CONTEXT),0!==v&&(A=p+v,w+=v*t),y=this.decodeSignBit(A,r,w),i[w]=y,n[w]=1,this.setNeighborsSignificance(A,r,w),l[w]|=2,w=b;for(let e=p;e<=A;e++,w+=t)c[w]++;v++}for(A=p+v;A<f;A++,w+=t){if(n[w]||1&l[w])continue;const t=o[a[w]];1===e.readBit(s,t)&&(y=this.decodeSignBit(A,r,w),i[w]=y,n[w]=1,this.setNeighborsSignificance(A,r,w),l[w]|=2),c[w]++}}}}checkSegmentationSymbol(){const e=this.decoder,t=this.contexts;if(10!=(e.readBit(t,E.UNIFORM_CONTEXT)<<3|e.readBit(t,E.UNIFORM_CONTEXT)<<2|e.readBit(t,E.UNIFORM_CONTEXT)<<1|e.readBit(t,E.UNIFORM_CONTEXT)))throw new s("Invalid segmentation symbol")}}class O{constructor(){this.constructor===O&&(0,a.unreachable)("Cannot initialize Transform.")}calculate(e,t,r){let a=e[0];for(let n=1,i=e.length;n<i;n++)a=this.iterate(a,e[n],t,r);return a}extend(e,t,r){let a=t-1,n=t+1,i=t+r-2,s=t+r;e[a--]=e[n++],e[s++]=e[i--],e[a--]=e[n++],e[s++]=e[i--],e[a--]=e[n++],e[s++]=e[i--],e[a]=e[n],e[s]=e[i]}filter(e,t,r){(0,a.unreachable)("Abstract method `filter` called")}iterate(e,t,r,a){const n=e.width,i=e.height;let s=e.items;const o=t.width,c=t.height,l=t.items;let h,u,d,f,p,g;for(d=0,h=0;h<i;h++)for(f=2*h*o,u=0;u<n;u++,d++,f+=2)l[f]=s[d];s=e.items=null;const m=new Float32Array(o+8);if(1===o){if(1&r)for(g=0,d=0;g<c;g++,d+=o)l[d]*=.5}else for(g=0,d=0;g<c;g++,d+=o)m.set(l.subarray(d,d+o),4),this.extend(m,4,o),this.filter(m,4,o),l.set(m.subarray(4,4+o),d);let b=16;const y=[];for(h=0;h<b;h++)y.push(new Float32Array(c+8));let v,w=0;if(e=4+c,1===c){if(1&a)for(p=0;p<o;p++)l[p]*=.5}else for(p=0;p<o;p++){if(0===w){for(b=Math.min(o-p,b),d=p,f=4;f<e;d+=o,f++)for(v=0;v<b;v++)y[v][f]=l[d+v];w=b}w--;const t=y[w];if(this.extend(t,4,c),this.filter(t,4,c),0===w)for(d=p-b+1,f=4;f<e;d+=o,f++)for(v=0;v<b;v++)l[d+v]=y[v][f]}return{width:o,height:c,items:l}}}class F extends O{filter(e,t,r){const a=r>>1;let n,i,s,o;const c=-1.586134342059924,l=-.052980118572961,h=.882911075530934,u=.443506852043971,d=1.230174104914001,f=1/d;for(n=(t|=0)-3,i=a+4;i--;n+=2)e[n]*=f;for(n=t-2,s=u*e[n-1],i=a+3;i--&&(o=u*e[n+1],e[n]=d*e[n]-s-o,i--);n+=2)n+=2,s=u*e[n+1],e[n]=d*e[n]-s-o;for(n=t-1,s=h*e[n-1],i=a+2;i--&&(o=h*e[n+1],e[n]-=s+o,i--);n+=2)n+=2,s=h*e[n+1],e[n]-=s+o;for(n=t,s=l*e[n-1],i=a+1;i--&&(o=l*e[n+1],e[n]-=s+o,i--);n+=2)n+=2,s=l*e[n+1],e[n]-=s+o;if(0!==a)for(n=t+1,s=c*e[n-1],i=a;i--&&(o=c*e[n+1],e[n]-=s+o,i--);n+=2)n+=2,s=c*e[n+1],e[n]-=s+o}}class P extends O{filter(e,t,r){const a=r>>1;let n,i;for(n=t|=0,i=a+1;i--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,i=a;i--;n+=2)e[n]+=e[n-1]+e[n+1]>>1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LZWStream=void 0;var a=r(18);class n extends a.DecodeStream{constructor(e,t,r){super(t),this.str=e,this.dict=e.dict,this.cachedData=0,this.bitsCached=0;const a=4096,n={earlyChange:r,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(a),dictionaryLengths:new Uint16Array(a),dictionaryPrevCodes:new Uint16Array(a),currentSequence:new Uint8Array(a),currentSequenceLength:0};for(let e=0;e<256;++e)n.dictionaryValues[e]=e,n.dictionaryLengths[e]=1;this.lzwState=n}readBits(e){let t=this.bitsCached,r=this.cachedData;for(;t<e;){const e=this.str.getByte();if(-1===e)return this.eof=!0,null;r=r<<8|e,t+=8}return this.bitsCached=t-=e,this.cachedData=r,this.lastCode=null,r>>>t&(1<<e)-1}readBlock(){let e,t,r,a=1024;const n=this.lzwState;if(!n)return;const i=n.earlyChange;let s=n.nextCode;const o=n.dictionaryValues,c=n.dictionaryLengths,l=n.dictionaryPrevCodes;let h=n.codeLength,u=n.prevCode;const d=n.currentSequence;let f=n.currentSequenceLength,p=0,g=this.bufferLength,m=this.ensureBuffer(this.bufferLength+a);for(e=0;e<512;e++){const e=this.readBits(h),n=f>0;if(e<256)d[0]=e,f=1;else{if(!(e>=258)){if(256===e){h=9,s=258,f=0;continue}this.eof=!0,delete this.lzwState;break}if(e<s)for(f=c[e],t=f-1,r=e;t>=0;t--)d[t]=o[r],r=l[r];else d[f++]=d[0]}if(n&&(l[s]=u,c[s]=c[u]+1,o[s]=d[0],s++,h=s+i&s+i-1?h:0|Math.min(Math.log(s+i)/.6931471805599453+1,12)),u=e,p+=f,a<p){do{a+=512}while(a<p);m=this.ensureBuffer(this.bufferLength+a)}for(t=0;t<f;t++)m[g++]=d[t]}n.nextCode=s,n.codeLength=h,n.prevCode=u,n.currentSequenceLength=f,this.bufferLength=g}}t.LZWStream=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PredictorStream=void 0;var a=r(18),n=r(4),i=r(2);class s extends a.DecodeStream{constructor(e,t,r){if(super(t),!(r instanceof n.Dict))return e;const a=this.predictor=r.get("Predictor")||1;if(a<=1)return e;if(2!==a&&(a<10||a>15))throw new i.FormatError(`Unsupported predictor: ${a}`);this.readBlock=2===a?this.readBlockTiff:this.readBlockPng,this.str=e,this.dict=e.dict;const s=this.colors=r.get("Colors")||1,o=this.bits=r.get("BPC","BitsPerComponent")||8,c=this.columns=r.get("Columns")||1;return this.pixBytes=s*o+7>>3,this.rowBytes=c*s*o+7>>3,this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,r=this.ensureBuffer(t+e),a=this.bits,n=this.colors,i=this.str.getBytes(e);if(this.eof=!i.length,this.eof)return;let s,o=0,c=0,l=0,h=0,u=t;if(1===a&&1===n)for(s=0;s<e;++s){let e=i[s]^o;e^=e>>1,e^=e>>2,e^=e>>4,o=(1&e)<<7,r[u++]=e}else if(8===a){for(s=0;s<n;++s)r[u++]=i[s];for(;s<e;++s)r[u]=r[u-n]+i[s],u++}else if(16===a){const t=2*n;for(s=0;s<t;++s)r[u++]=i[s];for(;s<e;s+=2){const e=((255&i[s])<<8)+(255&i[s+1])+((255&r[u-t])<<8)+(255&r[u-t+1]);r[u++]=e>>8&255,r[u++]=255&e}}else{const e=new Uint8Array(n+1),u=(1<<a)-1;let d=0,f=t;const p=this.columns;for(s=0;s<p;++s)for(let t=0;t<n;++t)l<a&&(o=o<<8|255&i[d++],l+=8),e[t]=e[t]+(o>>l-a)&u,l-=a,c=c<<a|e[t],h+=a,h>=8&&(r[f++]=c>>h-8&255,h-=8);h>0&&(r[f++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,r=this.str.getByte(),a=this.str.getBytes(e);if(this.eof=!a.length,this.eof)return;const n=this.bufferLength,s=this.ensureBuffer(n+e);let o=s.subarray(n-e,n);0===o.length&&(o=new Uint8Array(e));let c,l,h,u=n;switch(r){case 0:for(c=0;c<e;++c)s[u++]=a[c];break;case 1:for(c=0;c<t;++c)s[u++]=a[c];for(;c<e;++c)s[u]=s[u-t]+a[c]&255,u++;break;case 2:for(c=0;c<e;++c)s[u++]=o[c]+a[c]&255;break;case 3:for(c=0;c<t;++c)s[u++]=(o[c]>>1)+a[c];for(;c<e;++c)s[u]=(o[c]+s[u-t]>>1)+a[c]&255,u++;break;case 4:for(c=0;c<t;++c)l=o[c],h=a[c],s[u++]=l+h;for(;c<e;++c){l=o[c];const e=o[c-t],r=s[u-t],n=r+l-e;let i=n-r;i<0&&(i=-i);let d=n-l;d<0&&(d=-d);let f=n-e;f<0&&(f=-f),h=a[c],s[u++]=i<=d&&i<=f?r+h:d<=f?l+h:e+h}break;default:throw new i.FormatError(`Unsupported predictor: ${r}`)}this.bufferLength+=e}}t.PredictorStream=s},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RunLengthStream=void 0;var a=r(18);class n extends a.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||128===e[0])return void(this.eof=!0);let t,r=this.bufferLength,a=e[0];if(a<128){if(t=this.ensureBuffer(r+a+1),t[r++]=e[1],a>0){const e=this.str.getBytes(a);t.set(e,r),r+=a}}else{a=257-a;const n=e[1];t=this.ensureBuffer(r+a+1);for(let e=0;e<a;e++)t[r++]=n}this.bufferLength=r}}t.RunLengthStream=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Font=t.ErrorFont=void 0;var a=r(2),n=r(35),i=r(38),s=r(40),o=r(39),c=r(37),l=r(41),h=r(42),u=r(43),d=r(44),f=r(45),p=r(46),g=r(14),m=r(47),b=r(3),y=r(8),v=r(48);const w=[[57344,63743],[1048576,1114109]],A=1e3,S=["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"],x=["cMap","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","toFontChar","toUnicode","vmetrics","widths"];function k(e){if(!e.fontMatrix)return;if(e.fontMatrix[0]===a.FONT_IDENTITY_MATRIX[0])return;const t=.001/e.fontMatrix[0],r=e.widths;for(const e in r)r[e]*=t;e.defaultWidth*=t}function C(e){if(!e.fallbackToUnicode)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;const t=[];for(const r in e.fallbackToUnicode)e.toUnicode.has(r)||(t[r]=e.fallbackToUnicode[r]);t.length>0&&e.toUnicode.amend(t)}class _{constructor(e,t,r,a,n,i,s,o,c){this.originalCharCode=e,this.fontChar=t,this.unicode=r,this.accent=a,this.width=n,this.vmetric=i,this.operatorListId=s,this.isSpace=o,this.isInFont=c}get category(){return(0,a.shadow)(this,"category",(0,s.getCharUnicodeCategory)(this.unicode),!0)}}function T(e,t){return(e<<8)+t}function E(e,t,r){e[t+1]=r,e[t]=r>>>8}function O(e,t){const r=(e<<8)+t;return 32768&r?r-65536:r}function F(e){return String.fromCharCode(e>>8&255,255&e)}function P(e){return e>32767?e=32767:e<-32768&&(e=-32768),String.fromCharCode(e>>8&255,255&e)}function I(e){const t=e.peekBytes(4);return"ttcf"===(0,a.bytesToString)(t)}function M(e,{type:t,subtype:r,composite:n}){let i,s;return function(e){const t=e.peekBytes(4);return 65536===(0,b.readUint32)(t,0)||"true"===(0,a.bytesToString)(t)}(e)||I(e)?i=n?"CIDFontType2":"TrueType":function(e){const t=e.peekBytes(4);return"OTTO"===(0,a.bytesToString)(t)}(e)?i=n?"CIDFontType2":"OpenType":function(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e)?i=n?"CIDFontType0":"MMType1"===t?"MMType1":"Type1":function(e){const t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e)?n?(i="CIDFontType0",s="CIDFontType0C"):(i="MMType1"===t?"MMType1":"Type1",s="Type1C"):((0,a.warn)("getFontFileType: Unable to detect correct font file Type/Subtype."),i=t,s=r),[i,s]}function R(e,t){for(const r in t)e[+r]=t[r]}function D(e,t,r){const a=[];let n;for(let r=0,i=e.length;r<i;r++)n=(0,s.getUnicodeForGlyph)(e[r],t),-1!==n&&(a[r]=n);for(const e in r)n=(0,s.getUnicodeForGlyph)(r[e],t),-1!==n&&(a[+e]=n);return a}function N(e){return 1===e.platform&&0===e.encoding&&0===e.language}function L(e){return 3===e.platform&&1===e.encoding&&1033===e.language}function B(e,t,r=!1){switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}const n=`Unsupported CID string (charCode ${e}): "${t}".`;if(r)throw new a.FormatError(n);return(0,a.warn)(n),t}function j(e,t,r,n){const i=Object.create(null),s=new Map,o=[],c=new Set;let l=0,h=w[l][0],u=w[l][1];for(let f in e){f|=0;let p=e[f];if(!t(p))continue;if(h>u){if(l++,l>=w.length){(0,a.warn)("Ran out of space in font private use area.");break}h=w[l][0],u=w[l][1]}const g=h++;0===p&&(p=r);let m=n.get(f);"string"==typeof m&&(m=m.codePointAt(0)),!m||(d=m,w[0][0]<=d&&d<=w[0][1]||w[1][0]<=d&&d<=w[1][1])||c.has(p)||(s.set(m,p),c.add(p)),i[g]=p,o[f]=g}var d;return{toFontChar:o,charCodeToGlyphId:i,toUnicodeExtraMap:s,nextAvailableFontCharCode:h}}function $(e,t,r){const n=function(e,t,r){const a=[];for(const t in e)e[t]>=r||a.push({fontCharCode:0|t,glyphId:e[t]});if(t)for(const[e,n]of t)n>=r||a.push({fontCharCode:e,glyphId:n});0===a.length&&a.push({fontCharCode:0,glyphId:0}),a.sort((function(e,t){return e.fontCharCode-t.fontCharCode}));const n=[],i=a.length;for(let e=0;e<i;){const t=a[e].fontCharCode,r=[a[e].glyphId];++e;let s=t;for(;e<i&&s+1===a[e].fontCharCode&&(r.push(a[e].glyphId),++s,++e,65535!==s););n.push([t,s,r])}return n}(e,t,r),i=n.at(-1)[1]>65535?2:1;let s,o,c,l,h="\0\0"+F(i)+"\0\0"+(0,a.string32)(4+8*i);for(s=n.length-1;s>=0&&!(n[s][0]<=65535);--s);const u=s+1;n[s][0]<65535&&65535===n[s][1]&&(n[s][1]=65534);const d=n[s][1]<65535?1:0,f=u+d,p=m.OpenTypeFileBuilder.getSearchParams(f,2);let g,b,y,v,w="",A="",S="",x="",k="",C=0;for(s=0,o=u;s<o;s++){g=n[s],b=g[0],y=g[1],w+=F(b),A+=F(y),v=g[2];let e=!0;for(c=1,l=v.length;c<l;++c)if(v[c]!==v[c-1]+1){e=!1;break}if(e)S+=F(v[0]-b&65535),x+=F(0);else{const e=2*(f-s)+2*C;for(C+=y-b+1,S+=F(0),x+=F(e),c=0,l=v.length;c<l;++c)k+=F(v[c])}}d>0&&(A+="ÿÿ",w+="ÿÿ",S+="\0",x+="\0\0");const _="\0\0"+F(2*f)+F(p.range)+F(p.entry)+F(p.rangeShift)+A+"\0\0"+w+S+x+k;let T="",E="";if(i>1){for(h+="\0\0\n"+(0,a.string32)(4+8*i+4+_.length),T="",s=0,o=n.length;s<o;s++){g=n[s],b=g[0],v=g[2];let e=v[0];for(c=1,l=v.length;c<l;++c)v[c]!==v[c-1]+1&&(y=g[0]+c-1,T+=(0,a.string32)(b)+(0,a.string32)(y)+(0,a.string32)(e),b=y+1,e=v[c]);T+=(0,a.string32)(b)+(0,a.string32)(g[1])+(0,a.string32)(e)}E="\0\f\0\0"+(0,a.string32)(T.length+16)+"\0\0\0\0"+(0,a.string32)(T.length/12)}return h+"\0"+F(_.length+4)+_+E+T}function U(e,t,r){r||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let n=0,i=0,o=0,c=0,l=null,h=0,u=-1;if(t){for(let e in t)if(e|=0,(l>e||!l)&&(l=e),h<e&&(h=e),u=(0,s.getUnicodeRangeFor)(e,u),u<32)n|=1<<u;else if(u<64)i|=1<<u-32;else if(u<96)o|=1<<u-64;else{if(!(u<123))throw new a.FormatError("Unicode ranges Bits > 123 are reserved for internal usage");c|=1<<u-96}h>65535&&(h=65535)}else l=0,h=255;const d=e.bbox||[0,0,0,0],f=r.unitsPerEm||1/(e.fontMatrix||a.FONT_IDENTITY_MATRIX)[0],p=e.ascentScaled?1:f/A,g=r.ascent||Math.round(p*(e.ascent||d[3]));let m=r.descent||Math.round(p*(e.descent||d[1]));m>0&&e.descent>0&&d[1]<0&&(m=-m);const b=r.yMax||g,y=-r.yMin||-m;return"\0$ô\0\0\0»\0\0\0»\0\0ß\x001\0\0\0\0"+String.fromCharCode(e.fixedPitch?9:0)+"\0\0\0\0\0\0"+(0,a.string32)(n)+(0,a.string32)(i)+(0,a.string32)(o)+(0,a.string32)(c)+"*21*"+F(e.italicAngle?1:0)+F(l||e.firstChar)+F(h||e.lastChar)+F(g)+F(m)+"\0d"+F(b)+F(y)+"\0\0\0\0\0\0\0\0"+F(e.xHeight)+F(e.capHeight)+F(0)+F(l||e.firstChar)+"\0"}function z(e){const t=Math.floor(65536*e.italicAngle);return"\0\0\0"+(0,a.string32)(t)+"\0\0\0\0"+(0,a.string32)(e.fixedPitch?1:0)+"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}function H(e){return e.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g,"").slice(0,63)}function X(e,t){t||(t=[[],[]]);const r=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||H(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],a=[];let n,i,s,o,c;for(n=0,i=r.length;n<i;n++){c=t[1][n]||r[n];const e=[];for(s=0,o=c.length;s<o;s++)e.push(F(c.charCodeAt(s)));a.push(e.join(""))}const l=[r,a],h=["\0","\0"],u=["\0\0","\0"],d=["\0\0","\t"],f=r.length*h.length;let p="\0\0"+F(f)+F(12*f+6),g=0;for(n=0,i=h.length;n<i;n++){const e=l[n];for(s=0,o=e.length;s<o;s++)c=e[s],p+=h[n]+u[n]+d[n]+F(s)+F(c.length)+F(g),g+=c.length}return p+=r.join("")+a.join(""),p}t.Font=class{constructor(e,t,r){this.name=e,this.psName=null,this.mimetype=null,this.disableFontFace=!1,this.loadedName=r.loadedName,this.isType3Font=r.isType3Font,this.missingFile=!1,this.cssFontInfo=r.cssFontInfo,this._charsCache=Object.create(null),this._glyphCache=Object.create(null);let n=!!(r.flags&i.FontFlags.Serif);if(!n&&!r.isSimulatedFlags){const t=e.replaceAll(/[,_]/g,"-").split("-")[0],r=(0,l.getSerifFonts)();for(const e of t.split("+"))if(r[e]){n=!0;break}}this.isSerifFont=n,this.isSymbolicFont=!!(r.flags&i.FontFlags.Symbolic),this.isMonospace=!!(r.flags&i.FontFlags.FixedPitch);let{type:s,subtype:o}=r;this.type=s,this.subtype=o,this.systemFontInfo=r.systemFontInfo;const c=e.match(/^InvalidPDFjsFont_(.*)_\d+$/);if(this.isInvalidPDFjsFont=!!c,this.isInvalidPDFjsFont?this.fallbackName=c[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif",this.systemFontInfo?.guessFallback&&(this.systemFontInfo.guessFallback=!1,this.systemFontInfo.css+=`,${this.fallbackName}`),this.differences=r.differences,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.composite=r.composite,this.cMap=r.cMap,this.capHeight=r.capHeight/A,this.ascent=r.ascent/A,this.descent=r.descent/A,this.lineHeight=this.ascent-this.descent,this.fontMatrix=r.fontMatrix,this.bbox=r.bbox,this.defaultEncoding=r.defaultEncoding,this.toUnicode=r.toUnicode,this.toFontChar=[],"Type3"===r.type){for(let e=0;e<256;e++)this.toFontChar[e]=this.differences[e]||r.defaultEncoding[e];return}if(this.cidEncoding=r.cidEncoding||"",this.vertical=!!r.vertical,this.vertical&&(this.vmetrics=r.vmetrics,this.defaultVMetrics=r.defaultVMetrics),!t||t.isEmpty)return t&&(0,a.warn)('Font file is empty in "'+e+'" ('+this.loadedName+")"),void this.fallbackToSystemFont(r);let h;[s,o]=M(t,r),s===this.type&&o===this.subtype||(0,a.info)(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${s}/${o}.`);try{switch(s){case"MMType1":(0,a.info)("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const n="Type1C"===o||"CIDFontType0C"===o?new u.CFFFont(t,r):new v.Type1Font(e,t,r);k(r),h=this.convert(e,n,r);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",h=this.checkAndRepair(e,t,r),this.isOpenType&&(k(r),s="OpenType");break;default:throw new a.FormatError(`Font ${s} is not supported`)}}catch(e){return(0,a.warn)(e),void this.fallbackToSystemFont(r)}C(r),this.data=h,this.type=s,this.subtype=o,this.fontMatrix=r.fontMatrix,this.widths=r.widths,this.defaultWidth=r.defaultWidth,this.toUnicode=r.toUnicode,this.seacMap=r.seacMap}get renderer(){const e=d.FontRendererFactory.create(this,i.SEAC_ANALYSIS_ENABLED);return(0,a.shadow)(this,"renderer",e)}exportData(e=!1){const t=e?[...S,...x]:S,r=Object.create(null);let a,n;for(a of t)n=this[a],void 0!==n&&(r[a]=n);return r}fallbackToSystemFont(e){this.missingFile=!0;const{name:t,type:r}=this;let a=(0,i.normalizeFontName)(t);const n=(0,l.getStdFontMap)(),u=(0,l.getNonStdFontMap)(),d=!!n[a],p=!(!u[a]||!n[u[a]]);a=n[a]||u[a]||a;const g=(0,f.getFontBasicMetrics)()[a];g&&(isNaN(this.ascent)&&(this.ascent=g.ascent/A),isNaN(this.descent)&&(this.descent=g.descent/A),isNaN(this.capHeight)&&(this.capHeight=g.capHeight/A)),this.bold=/bold/gi.test(a),this.italic=/oblique|italic/gi.test(a),this.black=/Black/g.test(t);const m=/Narrow/g.test(t);if(this.remeasure=(!d||m)&&Object.keys(this.widths).length>0,(d||p)&&"CIDFontType2"===r&&this.cidEncoding.startsWith("Identity-")){const r=e.cidToGidMap,a=[];if(R(a,(0,l.getGlyphMapForStandardFonts)()),/Arial-?Black/i.test(t)?R(a,(0,l.getSupplementalGlyphMapForArialBlack)()):/Calibri/i.test(t)&&R(a,(0,l.getSupplementalGlyphMapForCalibri)()),r){for(const e in a){const t=a[e];void 0!==r[t]&&(a[+e]=r[t])}r.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof h.IdentityToUnicodeMap&&this.toUnicode.forEach((function(e,t){const n=a[e];void 0===r[n]&&(a[+e]=t)}))}this.toUnicode instanceof h.IdentityToUnicodeMap||this.toUnicode.forEach((function(e,t){a[+e]=t})),this.toFontChar=a,this.toUnicode=new h.ToUnicodeMap(a)}else if(/Symbol/i.test(a))this.toFontChar=D(c.SymbolSetEncoding,(0,o.getGlyphsUnicode)(),this.differences);else if(/Dingbats/i.test(a))this.toFontChar=D(c.ZapfDingbatsEncoding,(0,o.getDingbatsGlyphsUnicode)(),this.differences);else if(d){const e=D(this.defaultEncoding,(0,o.getGlyphsUnicode)(),this.differences);"CIDFontType2"!==r||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof h.IdentityToUnicodeMap||this.toUnicode.forEach((function(t,r){e[+t]=r})),this.toFontChar=e}else{const e=(0,o.getGlyphsUnicode)(),r=[];this.toUnicode.forEach(((t,a)=>{if(!this.composite){const r=this.differences[t]||this.defaultEncoding[t],n=(0,s.getUnicodeForGlyph)(r,e);-1!==n&&(a=n)}r[+t]=a})),this.composite&&this.toUnicode instanceof h.IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(t)&&R(r,(0,l.getGlyphMapForStandardFonts)()),this.toFontChar=r}C(e),this.loadedName=a.split("-")[0]}checkAndRepair(e,t,r){const s=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function l(e,t){const r=Object.create(null);r["OS/2"]=null,r.cmap=null,r.head=null,r.hhea=null,r.hmtx=null,r.maxp=null,r.name=null,r.post=null;for(let a=0;a<t;a++){const t=d(e);s.includes(t.tag)&&0!==t.length&&(r[t.tag]=t)}return r}function d(e){const t=e.getString(4),r=e.getInt32()>>>0,a=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.pos;e.pos=e.start||0,e.skip(a);const s=e.getBytes(n);return e.pos=i,"head"===t&&(s[8]=s[9]=s[10]=s[11]=0,s[17]|=32),{tag:t,checksum:r,length:n,offset:a,data:s}}function f(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}function b(e,t,r,a,n,i){const s={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||r>e.length||r-t<=12)return s;const o=e.subarray(t,r),c=O(o[2],o[3]),l=O(o[4],o[5]),h=O(o[6],o[7]),u=O(o[8],o[9]);c>h&&(E(o,2,h),E(o,6,c)),l>u&&(E(o,4,u),E(o,8,l));const d=O(o[0],o[1]);if(d<0)return d<-1||(a.set(o,n),s.length=o.length),s;let f,p=10,g=0;for(f=0;f<d;f++)g=1+(o[p]<<8|o[p+1]),p+=2;const m=p,b=o[p]<<8|o[p+1];s.sizeOfInstructions=b,p+=2+b;const y=p;let v=0;for(f=0;f<g;f++){const e=o[p++];192&e&&(o[p-1]=63&e);let t=2;2&e?t=1:16&e&&(t=0);let r=2;4&e?r=1:32&e&&(r=0);const a=t+r;if(v+=a,8&e){const e=o[p++];0===e&&(o[p-1]^=8),f+=e,v+=e*a}}if(0===v)return s;let w=p+v;return w>o.length?s:!i&&b>0?(a.set(o.subarray(0,m),n),a.set([0,0],n+m),a.set(o.subarray(y,w),n+m+2),w-=b,o.length-w>3&&(w=w+3&-4),s.length=w,s):o.length-w>3?(w=w+3&-4,a.set(o.subarray(0,w),n),s.length=w,s):(a.set(o,n),s.length=o.length,s)}function v(e){const r=(t.start||0)+e.offset;t.pos=r;const a=[[],[]],n=[],i=e.length,s=r+i;if(0!==t.getUint16()||i<6)return[a,n];const o=t.getUint16(),c=t.getUint16();let l,h;for(l=0;l<o&&t.pos+12<=s;l++){const e={platform:t.getUint16(),encoding:t.getUint16(),language:t.getUint16(),name:t.getUint16(),length:t.getUint16(),offset:t.getUint16()};(N(e)||L(e))&&n.push(e)}for(l=0,h=n.length;l<h;l++){const e=n[l];if(e.length<=0)continue;const i=r+c+e.offset;if(i+e.length>s)continue;t.pos=i;const o=e.name;if(e.encoding){let r="";for(let a=0,n=e.length;a<n;a+=2)r+=String.fromCharCode(t.getUint16());a[1][o]=r}else a[0][o]=t.getString(e.length)}return[a,n]}const w=[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 A(e,t){let r,n,i,s,o,c=e.data,l=0,h=0,u=0;const d=[],f=[],p=[];let g=t.tooComplexToFollowFunctions,m=!1,b=0,y=0;for(let e=c.length;l<e;){const e=c[l++];if(64===e)if(n=c[l++],m||y)l+=n;else for(r=0;r<n;r++)d.push(c[l++]);else if(65===e)if(n=c[l++],m||y)l+=2*n;else for(r=0;r<n;r++)i=c[l++],d.push(i<<8|c[l++]);else if(176==(248&e))if(n=e-176+1,m||y)l+=n;else for(r=0;r<n;r++)d.push(c[l++]);else if(184==(248&e))if(n=e-184+1,m||y)l+=2*n;else for(r=0;r<n;r++)i=c[l++],d.push(i<<8|c[l++]);else if(43!==e||g)if(44!==e||g){if(45===e)if(m)m=!1,h=l;else{if(o=f.pop(),!o)return(0,a.warn)("TT: ENDF bad stack"),void(t.hintsValid=!1);s=p.pop(),c=o.data,l=o.i,t.functionsStackDeltas[s]=d.length-o.stackTop}else if(137===e)(m||y)&&((0,a.warn)("TT: nested IDEFs not allowed"),g=!0),m=!0,u=l;else if(88===e)++b;else if(27===e)y=b;else if(89===e)y===b&&(y=0),--b;else if(28===e&&!m&&!y){const e=d.at(-1);e>0&&(l+=e-1)}}else(m||y)&&((0,a.warn)("TT: nested FDEFs not allowed"),g=!0),m=!0,u=l,s=d.pop(),t.functionsDefined[s]={data:c,i:l};else if(!m&&!y)if(s=d.at(-1),isNaN(s))(0,a.info)("TT: CALL empty stack (or invalid entry).");else if(t.functionsUsed[s]=!0,s in t.functionsStackDeltas){const e=d.length+t.functionsStackDeltas[s];if(e<0)return(0,a.warn)("TT: CALL invalid functions stack delta."),void(t.hintsValid=!1);d.length=e}else if(s in t.functionsDefined&&!p.includes(s)){if(f.push({data:c,i:l,stackTop:d.length-1}),p.push(s),o=t.functionsDefined[s],!o)return(0,a.warn)("TT: CALL non-existent function"),void(t.hintsValid=!1);c=o.data,l=o.i}if(!m&&!y){let t=0;for(e<=142?t=w[e]:e>=192&&e<=223?t=-1:e>=224&&(t=-2),e>=113&&e<=117&&(n=d.pop(),isNaN(n)||(t=2*-n));t<0&&d.length>0;)d.pop(),t++;for(;t>0;)d.push(NaN),t--}}t.tooComplexToFollowFunctions=g;const v=[c];l>c.length&&v.push(new Uint8Array(l-c.length)),u>h&&((0,a.warn)("TT: complementing a missing function tail"),v.push(new Uint8Array([34,45]))),function(e,t){if(t.length>1){let r,a,n=0;for(r=0,a=t.length;r<a;r++)n+=t[r].length;n=n+3&-4;const i=new Uint8Array(n);let s=0;for(r=0,a=t.length;r<a;r++)i.set(t[r],s),s+=t[r].length;e.data=i,e.length=n}}(e,v)}let S,x,C,_;if(I(t=new y.Stream(new Uint8Array(t.getBytes())))){const e=function(e,t){const{numFonts:r,offsetTable:n}=function(e){const t=e.getString(4);(0,a.assert)("ttcf"===t,"Must be a TrueType Collection font.");const r=e.getUint16(),n=e.getUint16(),i=e.getInt32()>>>0,s=[];for(let t=0;t<i;t++)s.push(e.getInt32()>>>0);const o={ttcTag:t,majorVersion:r,minorVersion:n,numFonts:i,offsetTable:s};switch(r){case 1:return o;case 2:return o.dsigTag=e.getInt32()>>>0,o.dsigLength=e.getInt32()>>>0,o.dsigOffset=e.getInt32()>>>0,o}throw new a.FormatError(`Invalid TrueType Collection majorVersion: ${r}.`)}(e),i=t.split("+");let s;for(let o=0;o<r;o++){e.pos=(e.start||0)+n[o];const r=f(e),c=l(e,r.numTables);if(!c.name)throw new a.FormatError('TrueType Collection font must contain a "name" table.');const[h]=v(c.name);for(let e=0,a=h.length;e<a;e++)for(let a=0,n=h[e].length;a<n;a++){const n=h[e][a]?.replaceAll(/\s/g,"");if(n){if(n===t)return{header:r,tables:c};if(!(i.length<2))for(const e of i)n===e&&(s={name:e,header:r,tables:c})}}}if(s)return(0,a.warn)(`TrueType Collection does not contain "${t}" font, falling back to "${s.name}" font instead.`),{header:s.header,tables:s.tables};throw new a.FormatError(`TrueType Collection does not contain "${t}" font.`)}(t,this.name);S=e.header,x=e.tables}else S=f(t),x=l(t,S.numTables);const F=!x["CFF "];if(F){if(!x.loca)throw new a.FormatError('Required "loca" table is not found');x.glyf||((0,a.warn)('Required "glyf" table is not found -- trying to recover.'),x.glyf={tag:"glyf",data:new Uint8Array(0)}),this.isOpenType=!1}else{const t=r.composite&&(r.cidToGidMap?.length>0||!(r.cMap instanceof g.IdentityCMap));if("OTTO"===S.version&&!t||!x.head||!x.hhea||!x.maxp||!x.post)return _=new y.Stream(x["CFF "].data),C=new u.CFFFont(_,r),k(r),this.convert(e,C,r);delete x.glyf,delete x.loca,delete x.fpgm,delete x.prep,delete x["cvt "],this.isOpenType=!0}if(!x.maxp)throw new a.FormatError('Required "maxp" table is not found');t.pos=(t.start||0)+x.maxp.offset;const P=t.getInt32(),M=t.getUint16();if(r.scaleFactors?.length===M&&F){const{scaleFactors:e}=r,t=T(x.head.data[50],x.head.data[51]),a=new p.GlyfTable({glyfTable:x.glyf.data,isGlyphLocationsLong:t,locaTable:x.loca.data,numGlyphs:M});a.scale(e);const{glyf:n,loca:i,isLocationLong:s}=a.write();x.glyf.data=n,x.loca.data=i,s!==!!t&&(x.head.data[50]=0,x.head.data[51]=s?1:0);const o=x.hmtx.data;for(let t=0;t<M;t++){const r=4*t,a=Math.round(e[t]*T(o[r],o[r+1]));o[r]=a>>8&255,o[r+1]=255&a,E(o,r+2,Math.round(e[t]*O(o[r+2],o[r+3])))}}let R=M+1,D=!0;R>65535&&(D=!1,R=M,(0,a.warn)("Not enough space in glyfs to duplicate first glyph."));let H=0,W=0;P>=65536&&x.maxp.length>=22&&(t.pos+=8,t.getUint16()>2&&(x.maxp.data[14]=0,x.maxp.data[15]=2),t.pos+=4,H=t.getUint16(),t.pos+=4,W=t.getUint16()),x.maxp.data[4]=R>>8,x.maxp.data[5]=255&R;const G=function(e,t,r,n){const i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(e&&A(e,i),t&&A(t,i),e&&function(e,t){if(!e.tooComplexToFollowFunctions){if(e.functionsDefined.length>t)return(0,a.warn)("TT: more functions defined than expected"),void(e.hintsValid=!1);for(let r=0,n=e.functionsUsed.length;r<n;r++){if(r>t)return(0,a.warn)("TT: invalid function id: "+r),void(e.hintsValid=!1);if(e.functionsUsed[r]&&!e.functionsDefined[r])return(0,a.warn)("TT: undefined function: "+r),void(e.hintsValid=!1)}}}(i,n),r&&1&r.length){const e=new Uint8Array(r.length+1);e.set(r.data),r.data=e}return i.hintsValid}(x.fpgm,x.prep,x["cvt "],H);if(G||(delete x.fpgm,delete x.prep,delete x["cvt "]),function(e,t,r,n,i,s){if(!t)return void(r&&(r.data=null));e.pos=(e.start||0)+t.offset,e.pos+=4,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2,e.pos+=2;const o=e.getUint16();e.pos+=8,e.pos+=2;let c=e.getUint16();0!==o&&(2&T(n.data[44],n.data[45])||(t.data[22]=0,t.data[23]=0)),c>i&&((0,a.info)(`The numOfMetrics (${c}) should not be greater than the numGlyphs (${i}).`),c=i,t.data[34]=(65280&c)>>8,t.data[35]=255&c);const l=i-c-(r.length-4*c>>1);if(l>0){const e=new Uint8Array(r.length+2*l);e.set(r.data),s&&(e[r.length]=r.data[2],e[r.length+1]=r.data[3]),r.data=e}}(t,x.hhea,x.hmtx,x.head,R,D),!x.head)throw new a.FormatError('Required "head" table is not found');!function(e,t,r){const n=e.data,i=(s=n[0],o=n[1],c=n[2],l=n[3],(s<<24)+(o<<16)+(c<<8)+l);var s,o,c,l;i>>16!=1&&((0,a.info)("Attempting to fix invalid version in head table: "+i),n[0]=0,n[1]=1,n[2]=0,n[3]=0);const h=T(n[50],n[51]);if(h<0||h>1){(0,a.info)("Attempting to fix invalid indexToLocFormat in head table: "+h);const e=t+1;if(r===e<<1)n[50]=0,n[51]=0;else{if(r!==e<<2)throw new a.FormatError("Could not fix indexToLocFormat: "+h);n[50]=0,n[51]=1}}}(x.head,M,F?x.loca.length:0);let q=Object.create(null);if(F){const e=T(x.head.data[50],x.head.data[51]),t=function(e,t,r,a,n,i,s){let o,c,l;a?(o=4,c=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]},l=function(e,t,r){e[t]=r>>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}):(o=2,c=function(e,t){return e[t]<<9|e[t+1]<<1},l=function(e,t,r){e[t]=r>>9&255,e[t+1]=r>>1&255});const h=i?r+1:r,u=o*(1+h),d=new Uint8Array(u);d.set(e.data.subarray(0,u)),e.data=d;const f=t.data,p=f.length,g=new Uint8Array(p);let m,y;const v=[];for(m=0,y=0;m<r+1;m++,y+=o){let e=c(d,y);e>p&&(e=p),v.push({index:m,offset:e,endOffset:0})}for(v.sort(((e,t)=>e.offset-t.offset)),m=0;m<r;m++)v[m].endOffset=v[m+1].offset;for(v.sort(((e,t)=>e.index-t.index)),m=0;m<r;m++){const{offset:e,endOffset:t}=v[m];if(0!==e||0!==t)break;const r=v[m+1].offset;if(0!==r){v[m].endOffset=r;break}}const w=Object.create(null);let A=0;for(l(d,0,A),m=0,y=o;m<r;m++,y+=o){const e=b(f,v[m].offset,v[m].endOffset,g,A,n),t=e.length;0===t&&(w[m]=!0),e.sizeOfInstructions>s&&(s=e.sizeOfInstructions),A+=t,l(d,y,A)}if(0===A){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(m=0,y=o;m<h;m++,y+=o)l(d,y,e.length);t.data=e}else if(i){const r=c(d,o);g.length>r+A?t.data=g.subarray(0,r+A):(t.data=new Uint8Array(r+A),t.data.set(g.subarray(0,A))),t.data.set(g.subarray(0,r),A),l(e.data,d.length-o,A+r)}else t.data=g.subarray(0,A);return{missingGlyphs:w,maxSizeOfInstructions:s}}(x.loca,x.glyf,M,e,G,D,W);q=t.missingGlyphs,P>=65536&&x.maxp.length>=22&&(x.maxp.data[26]=t.maxSizeOfInstructions>>8,x.maxp.data[27]=255&t.maxSizeOfInstructions)}if(!x.hhea)throw new a.FormatError('Required "hhea" table is not found');0===x.hhea.data[10]&&0===x.hhea.data[11]&&(x.hhea.data[10]=255,x.hhea.data[11]=255);const V={unitsPerEm:T(x.head.data[18],x.head.data[19]),yMax:O(x.head.data[42],x.head.data[43]),yMin:O(x.head.data[38],x.head.data[39]),ascent:O(x.hhea.data[4],x.hhea.data[5]),descent:O(x.hhea.data[6],x.hhea.data[7]),lineGap:O(x.hhea.data[8],x.hhea.data[9])};this.ascent=V.ascent/V.unitsPerEm,this.descent=V.descent/V.unitsPerEm,this.lineGap=V.lineGap/V.unitsPerEm,this.cssFontInfo?.lineHeight?(this.lineHeight=this.cssFontInfo.metrics.lineHeight,this.lineGap=this.cssFontInfo.metrics.lineGap):this.lineHeight=this.ascent-this.descent+this.lineGap,x.post&&function(e,r,n){const s=(t.start||0)+e.offset;t.pos=s;const o=s+e.length,c=t.getInt32();let l;t.skip(28);let h,u=!0;switch(c){case 65536:l=i.MacStandardGlyphOrdering;break;case 131072:const e=t.getUint16();if(e!==n){u=!1;break}const s=[];for(h=0;h<e;++h){const e=t.getUint16();if(e>=32768){u=!1;break}s.push(e)}if(!u)break;const d=[],f=[];for(;t.pos<o;){const e=t.getByte();for(f.length=e,h=0;h<e;++h)f[h]=String.fromCharCode(t.getByte());d.push(f.join(""))}for(l=[],h=0;h<e;++h){const e=s[h];e<258?l.push(i.MacStandardGlyphOrdering[e]):l.push(d[e-258])}break;case 196608:break;default:(0,a.warn)("Unknown/unsupported post table version "+c),u=!1,r.defaultEncoding&&(l=r.defaultEncoding)}r.glyphNames=l}(x.post,r,M),x.post={tag:"post",data:z(r)};const K=[];function Y(e){return!q[e]}if(r.composite){const e=r.cidToGidMap||[],t=0===e.length;r.cMap.forEach((function(r,n){if("string"==typeof n&&(n=B(r,n,!0)),n>65535)throw new a.FormatError("Max size of CID is 65,535");let i=-1;t?i=n:void 0!==e[n]&&(i=e[n]),i>=0&&i<M&&Y(i)&&(K[r]=i)}))}else{const e=function(e,t,r,n){if(!e)return(0,a.warn)("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};let i,s=(t.start||0)+e.offset;t.pos=s,t.skip(2);const o=t.getUint16();let c,l=!1;for(let e=0;e<o;e++){const a=t.getUint16(),i=t.getUint16(),s=t.getInt32()>>>0;let h=!1;if(c?.platformId!==a||c?.encodingId!==i){if(0!==a||0!==i&&1!==i&&3!==i)if(1===a&&0===i)h=!0;else if(3!==a||1!==i||!n&&c){if(r&&3===a&&0===i){h=!0;let r=!0;if(e<o-1){const e=t.peekBytes(2);T(e[0],e[1])<a&&(r=!1)}r&&(l=!0)}}else h=!0,r||(l=!0);else h=!0;if(h&&(c={platformId:a,encodingId:i,offset:s}),l)break}}if(c&&(t.pos=s+c.offset),!c||-1===t.peekByte())return(0,a.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};const h=t.getUint16();let u=!1;const d=[];let f,p;if(0===h){for(t.skip(4),f=0;f<256;f++){const e=t.getByte();e&&d.push({charCode:f,glyphId:e})}u=!0}else if(2===h){t.skip(4);const e=[];let r=0;for(let a=0;a<256;a++){const a=t.getUint16()>>3;e.push(a),r=Math.max(a,r)}const a=[];for(let e=0;e<=r;e++)a.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:O(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(let r=0;r<256;r++)if(0===e[r])t.pos=a[0].idRangePos+2*r,p=t.getUint16(),d.push({charCode:r,glyphId:p});else{const n=a[e[r]];for(f=0;f<n.entryCount;f++){const e=(r<<8)+f+n.firstCode;t.pos=n.idRangePos+2*f,p=t.getUint16(),0!==p&&(p=(p+n.idDelta)%65536),d.push({charCode:e,glyphId:p})}}}else if(4===h){t.skip(4);const e=t.getUint16()>>1;t.skip(6);const r=[];let a;for(a=0;a<e;a++)r.push({end:t.getUint16()});for(t.skip(2),a=0;a<e;a++)r[a].start=t.getUint16();for(a=0;a<e;a++)r[a].delta=t.getUint16();let n,o=0;for(a=0;a<e;a++){i=r[a];const s=t.getUint16();s?(n=(s>>1)-(e-a),i.offsetIndex=n,o=Math.max(o,n+i.end-i.start+1)):i.offsetIndex=-1}const c=[];for(f=0;f<o;f++)c.push(t.getUint16());for(a=0;a<e;a++){i=r[a],s=i.start;const e=i.end,t=i.delta;for(n=i.offsetIndex,f=s;f<=e;f++)65535!==f&&(p=n<0?f:c[n+f-s],p=p+t&65535,d.push({charCode:f,glyphId:p}))}}else if(6===h){t.skip(4);const e=t.getUint16(),r=t.getUint16();for(f=0;f<r;f++){p=t.getUint16();const r=e+f;d.push({charCode:r,glyphId:p})}}else{if(12!==h)return(0,a.warn)("cmap table has unsupported format: "+h),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};{t.skip(10);const e=t.getInt32()>>>0;for(f=0;f<e;f++){const e=t.getInt32()>>>0,r=t.getInt32()>>>0;let a=t.getInt32()>>>0;for(let t=e;t<=r;t++)d.push({charCode:t,glyphId:a++})}}}d.sort((function(e,t){return e.charCode-t.charCode}));for(let e=1;e<d.length;e++)d[e-1].charCode===d[e].charCode&&(d.splice(e,1),e--);return{platformId:c.platformId,encodingId:c.encodingId,mappings:d,hasShortCmap:u}}(x.cmap,t,this.isSymbolicFont,r.hasEncoding),n=e.platformId,s=e.encodingId,l=e.mappings;let u=[],d=!1;if(!r.hasEncoding||"MacRomanEncoding"!==r.baseEncodingName&&"WinAnsiEncoding"!==r.baseEncodingName||(u=(0,c.getEncoding)(r.baseEncodingName)),r.hasEncoding&&!this.isSymbolicFont&&(3===n&&1===s||1===n&&0===s)){const e=(0,o.getGlyphsUnicode)();for(let t=0;t<256;t++){let a;if(a=void 0!==this.differences[t]?this.differences[t]:u.length&&""!==u[t]?u[t]:c.StandardEncoding[t],!a)continue;const o=(0,i.recoverGlyphName)(a,e);let d;if(3===n&&1===s?d=e[o]:1===n&&0===s&&(d=c.MacRomanEncoding.indexOf(o)),void 0===d){if(!r.glyphNames&&r.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof h.IdentityToUnicodeMap)){const e=this.toUnicode.get(t);e&&(d=e.codePointAt(0))}if(void 0===d)continue}for(const e of l)if(e.charCode===d){K[t]=e.glyphId;break}}}else if(0===n){for(const e of l)K[e.charCode]=e.glyphId;d=!0}else for(const e of l){let t=e.charCode;3===n&&t>=61440&&t<=61695&&(t&=255),K[t]=e.glyphId}if(r.glyphNames&&(u.length||this.differences.length))for(let e=0;e<256;++e){if(!d&&void 0!==K[e])continue;const t=this.differences[e]||u[e];if(!t)continue;const a=r.glyphNames.indexOf(t);a>0&&Y(a)&&(K[e]=a)}}0===K.length&&(K[0]=0);let Z=R-1;if(D||(Z=0),!r.cssFontInfo){const e=j(K,Y,Z,this.toUnicode);this.toFontChar=e.toFontChar,x.cmap={tag:"cmap",data:$(e.charCodeToGlyphId,e.toUnicodeExtraMap,R)},x["OS/2"]&&function(e,t){t.pos=(t.start||0)+e.offset;const r=t.getUint16();t.skip(60);const a=t.getUint16();return!(r<4&&768&a||t.getUint16()>t.getUint16()||(t.skip(6),0===t.getUint16()||(e.data[8]=e.data[9]=0,0)))}(x["OS/2"],t)||(x["OS/2"]={tag:"OS/2",data:U(r,e.charCodeToGlyphId,V)})}if(!F)try{_=new y.Stream(x["CFF "].data),C=new n.CFFParser(_,r,i.SEAC_ANALYSIS_ENABLED).parse(),C.duplicateFirstGlyph();const e=new n.CFFCompiler(C);x["CFF "].data=e.compile()}catch{(0,a.warn)("Failed to compile font "+r.loadedName)}if(x.name){const[t,a]=v(x.name);x.name.data=X(e,t),this.psName=t[0][6]||null,r.composite||function(e,t,r){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(e.hasEncoding)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;if(!t)return;if(0===r.length)return;if(e.defaultEncoding===c.WinAnsiEncoding)return;for(const e of r)if(!L(e))return;const a=c.WinAnsiEncoding,n=[],i=(0,o.getGlyphsUnicode)();for(const e in a){const t=a[e];if(""===t)continue;const r=i[t];void 0!==r&&(n[e]=String.fromCharCode(r))}n.length>0&&e.toUnicode.amend(n)}(r,this.isSymbolicFont,a)}else x.name={tag:"name",data:X(this.name)};const J=new m.OpenTypeFileBuilder(S.version);for(const e in x)J.addTable(e,x[e].data);return J.toArray()}convert(e,t,r){r.fixedPitch=!1,r.builtInEncoding&&function(e,t){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof h.IdentityToUnicodeMap)return;const r=[],a=(0,o.getGlyphsUnicode)();for(const n in t){if(e.hasEncoding&&(e.baseEncodingName||void 0!==e.differences[n]))continue;const i=t[n],o=(0,s.getUnicodeForGlyph)(i,a);-1!==o&&(r[n]=String.fromCharCode(o))}r.length>0&&e.toUnicode.amend(r)}(r,r.builtInEncoding);let n=1;t instanceof u.CFFFont&&(n=t.numGlyphs-1);const l=t.getGlyphMapping(r);let d=null,f=l,p=null;r.cssFontInfo||(d=j(l,t.hasGlyphId.bind(t),n,this.toUnicode),this.toFontChar=d.toFontChar,f=d.charCodeToGlyphId,p=d.toUnicodeExtraMap);const g=t.numGlyphs;function b(e,t){let r=null;for(const a in e)t===e[a]&&(r||=[]).push(0|a);return r}function y(e,t){for(const r in e)if(t===e[r])return 0|r;return d.charCodeToGlyphId[d.nextAvailableFontCharCode]=t,d.nextAvailableFontCharCode++}const v=t.seacs;if(d&&i.SEAC_ANALYSIS_ENABLED&&v?.length){const e=r.fontMatrix||a.FONT_IDENTITY_MATRIX,n=t.getCharset(),i=Object.create(null);for(let t in v){t|=0;const r=v[t],a=c.StandardEncoding[r[2]],s=c.StandardEncoding[r[3]],o=n.indexOf(a),h=n.indexOf(s);if(o<0||h<0)continue;const u={x:r[0]*e[0]+r[1]*e[2]+e[4],y:r[0]*e[1]+r[1]*e[3]+e[5]},f=b(l,t);if(f)for(const e of f){const t=d.charCodeToGlyphId,r=y(t,o),a=y(t,h);i[e]={baseFontCharCode:r,accentFontCharCode:a,accentOffset:u}}}r.seacMap=i}const w=1/(r.fontMatrix||a.FONT_IDENTITY_MATRIX)[0],A=new m.OpenTypeFileBuilder("OTTO");return A.addTable("CFF ",t.data),A.addTable("OS/2",U(r,f)),A.addTable("cmap",$(f,p,g)),A.addTable("head","\0\0\0\0\0\0\0\0\0\0_<õ\0\0"+P(w)+"\0\0\0\0\v~'\0\0\0\0\v~'\0\0"+P(r.descent)+"ÿ"+P(r.ascent)+F(r.italicAngle?2:0)+"\0\0\0\0\0\0\0"),A.addTable("hhea","\0\0\0"+P(r.ascent)+P(r.descent)+"\0\0ÿÿ\0\0\0\0\0\0"+P(r.capHeight)+P(Math.tan(r.italicAngle)*r.xHeight)+"\0\0\0\0\0\0\0\0\0\0\0\0"+F(g)),A.addTable("hmtx",function(){const e=t.charstrings,r=t.cff?t.cff.widths:null;let a="\0\0\0\0";for(let t=1,n=g;t<n;t++){let n=0;if(e){const r=e[t-1];n="width"in r?r.width:0}else r&&(n=Math.ceil(r[t]||0));a+=F(n)+F(0)}return a}()),A.addTable("maxp","\0\0P\0"+F(g)),A.addTable("name",X(e)),A.addTable("post",z(r)),A.toArray()}get spaceWidth(){const e=["space","minus","one","i","I"];let t;for(const r of e){if(r in this.widths){t=this.widths[r];break}const e=(0,o.getGlyphsUnicode)()[r];let a=0;if(this.composite&&this.cMap.contains(e)&&(a=this.cMap.lookup(e),"string"==typeof a&&(a=B(e,a))),!a&&this.toUnicode&&(a=this.toUnicode.charCodeOf(e)),a<=0&&(a=e),t=this.widths[a],t)break}return(0,a.shadow)(this,"spaceWidth",t||this.defaultWidth)}_charToGlyph(e,t=!1){let r,n,i,o=this._glyphCache[e];if(o?.isSpace===t)return o;let c=e;this.cMap?.contains(e)&&(c=this.cMap.lookup(e),"string"==typeof c&&(c=B(e,c))),n=this.widths[c],"number"!=typeof n&&(n=this.defaultWidth);const l=this.vmetrics?.[c];let h=this.toUnicode.get(e)||e;"number"==typeof h&&(h=String.fromCharCode(h));let u=void 0!==this.toFontChar[e];if(r=this.toFontChar[e]||e,this.missingFile){const t=this.differences[e]||this.defaultEncoding[e];".notdef"!==t&&""!==t||"Type1"!==this.type||(r=32),r=(0,s.mapSpecialUnicodeValues)(r)}this.isType3Font&&(i=r);let d=null;if(this.seacMap?.[e]){u=!0;const t=this.seacMap[e];r=t.baseFontCharCode,d={fontChar:String.fromCodePoint(t.accentFontCharCode),offset:t.accentOffset}}let f="";return"number"==typeof r&&(r<=1114111?f=String.fromCodePoint(r):(0,a.warn)(`charToGlyph - invalid fontCharCode: ${r}`)),o=new _(e,f,h,d,n,l,i,t,u),this._glyphCache[e]=o}charsToGlyphs(e){let t=this._charsCache[e];if(t)return t;if(t=[],this.cMap){const r=Object.create(null),a=e.length;let n=0;for(;n<a;){this.cMap.readCharCode(e,n,r);const{charcode:a,length:i}=r;n+=i;const s=this._charToGlyph(a,1===i&&32===e.charCodeAt(n-1));t.push(s)}}else for(let r=0,a=e.length;r<a;++r){const a=e.charCodeAt(r),n=this._charToGlyph(a,32===a);t.push(n)}return this._charsCache[e]=t}getCharPositions(e){const t=[];if(this.cMap){const r=Object.create(null);let a=0;for(;a<e.length;){this.cMap.readCharCode(e,a,r);const n=r.length;t.push([a,a+n]),a+=n}}else for(let r=0,a=e.length;r<a;++r)t.push([r,r+1]);return t}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(e){const t=[],r=[],a=()=>t.length%2==1,n=this.toUnicode instanceof h.IdentityToUnicodeMap?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(String.fromCodePoint(e));for(let i=0,s=e.length;i<s;i++){const s=e.codePointAt(i);if(s>55295&&(s<57344||s>65533)&&i++,this.toUnicode){const e=n(s);if(-1!==e){a()&&(t.push(r.join("")),r.length=0);for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)r.push(String.fromCharCode(e>>8*t&255));continue}}a()||(t.push(r.join("")),r.length=0),r.push(String.fromCodePoint(s))}return t.push(r.join("")),t}},t.ErrorFont=class{constructor(e){this.error=e,this.loadedName="g_font_error",this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(e=!1){return{error:this.error}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CFFTopDict=t.CFFStrings=t.CFFStandardStrings=t.CFFPrivateDict=t.CFFParser=t.CFFIndex=t.CFFHeader=t.CFFFDSelect=t.CFFCompiler=t.CFFCharset=t.CFF=void 0;var a=r(2),n=r(36),i=r(37);const s=[".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"];t.CFFStandardStrings=s;const o=391,c=[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(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(e,t){e[t-1]=-e[t-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(e,t){e[t-2]=e[t-2]*e[t-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}];t.CFFParser=class{constructor(e,t,r){this.bytes=e.getBytes(),this.properties=t,this.seacAnalysisEnabled=!!r}parse(){const e=this.properties,t=new h;this.cff=t;const r=this.parseHeader(),a=this.parseIndex(r.endPos),n=this.parseIndex(a.endPos),i=this.parseIndex(n.endPos),s=this.parseIndex(i.endPos),o=this.parseDict(n.obj.get(0)),c=this.createDict(m,o,t.strings);t.header=r.obj,t.names=this.parseNameIndex(a.obj),t.strings=this.parseStringIndex(i.obj),t.topDict=c,t.globalSubrIndex=s.obj,this.parsePrivateDict(t.topDict),t.isCIDFont=c.hasName("ROS");const l=c.getByName("CharStrings"),u=this.parseIndex(l).obj,d=c.getByName("FontMatrix");d&&(e.fontMatrix=d);const f=c.getByName("FontBBox");let p,g;if(f&&(e.ascent=Math.max(f[3],f[1]),e.descent=Math.min(f[1],f[3]),e.ascentScaled=!0),t.isCIDFont){const e=this.parseIndex(c.getByName("FDArray")).obj;for(let r=0,a=e.count;r<a;++r){const a=e.get(r),n=this.createDict(m,this.parseDict(a),t.strings);this.parsePrivateDict(n),t.fdArray.push(n)}g=null,p=this.parseCharsets(c.getByName("charset"),u.count,t.strings,!0),t.fdSelect=this.parseFDSelect(c.getByName("FDSelect"),u.count)}else p=this.parseCharsets(c.getByName("charset"),u.count,t.strings,!1),g=this.parseEncoding(c.getByName("Encoding"),e,t.strings,p.charset);t.charset=p,t.encoding=g;const b=this.parseCharStrings({charStrings:u,localSubrIndex:c.privateDict.subrsIndex,globalSubrIndex:s.obj,fdSelect:t.fdSelect,fdArray:t.fdArray,privateDict:c.privateDict});return t.charStrings=b.charStrings,t.seacs=b.seacs,t.widths=b.widths,t}parseHeader(){let e=this.bytes;const t=e.length;let r=0;for(;r<t&&1!==e[r];)++r;if(r>=t)throw new a.FormatError("Invalid CFF header");0!==r&&((0,a.info)("cff data is shifted"),e=e.subarray(r),this.bytes=e);const n=e[0],i=e[1],s=e[2],o=e[3];return{obj:new u(n,i,s,o),endPos:s}}parseDict(e){let t=0;function r(){let r=e[t++];return 30===r?function(){let r="";const a=15,n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],i=e.length;for(;t<i;){const i=e[t++],s=i>>4,o=15&i;if(s===a)break;if(r+=n[s],o===a)break;r+=n[o]}return parseFloat(r)}():28===r?(r=e[t++],r=(r<<24|e[t++]<<16)>>16,r):29===r?(r=e[t++],r=r<<8|e[t++],r=r<<8|e[t++],r=r<<8|e[t++],r):r>=32&&r<=246?r-139:r>=247&&r<=250?256*(r-247)+e[t++]+108:r>=251&&r<=254?-256*(r-251)-e[t++]-108:((0,a.warn)('CFFParser_parseDict: "'+r+'" is a reserved command.'),NaN)}let n=[];const i=[];t=0;const s=e.length;for(;t<s;){let a=e[t];a<=21?(12===a&&(a=a<<8|e[++t]),i.push([a,n]),n=[],++t):n.push(r())}return i}parseIndex(e){const t=new f,r=this.bytes,a=r[e++]<<8|r[e++],n=[];let i,s,o=e;if(0!==a){const t=r[e++],c=e+(a+1)*t-1;for(i=0,s=a+1;i<s;++i){let a=0;for(let n=0;n<t;++n)a<<=8,a+=r[e++];n.push(c+a)}o=n[a]}for(i=0,s=n.length-1;i<s;++i){const e=n[i],a=n[i+1];t.add(r.subarray(e,a))}return{obj:t,endPos:o}}parseNameIndex(e){const t=[];for(let r=0,n=e.count;r<n;++r){const n=e.get(r);t.push((0,a.bytesToString)(n))}return t}parseStringIndex(e){const t=new d;for(let r=0,n=e.count;r<n;++r){const n=e.get(r);t.add((0,a.bytesToString)(n))}return t}createDict(e,t,r){const a=new e(r);for(const[e,r]of t)a.setByKey(e,r);return a}parseCharString(e,t,r,n){if(!t||e.callDepth>10)return!1;let i=e.stackSize;const s=e.stack;let o=t.length;for(let h=0;h<o;){const u=t[h++];let d=null;if(12===u){const e=t[h++];0===e?(t[h-2]=139,t[h-1]=22,i=0):d=l[e]}else if(28===u)s[i]=(t[h]<<24|t[h+1]<<16)>>16,h+=2,i++;else if(14===u){if(i>=4&&(i-=4,this.seacAnalysisEnabled))return e.seac=s.slice(i,i+4),!1;d=c[u]}else if(u>=32&&u<=246)s[i]=u-139,i++;else if(u>=247&&u<=254)s[i]=u<251?(u-247<<8)+t[h]+108:-(u-251<<8)-t[h]-108,h++,i++;else if(255===u)s[i]=(t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3])/65536,h+=4,i++;else if(19===u||20===u){if(e.hints+=i>>1,0===e.hints){t.copyWithin(h-1,h,-1),h-=1,o-=1;continue}h+=e.hints+7>>3,i%=2,d=c[u]}else{if(10===u||29===u){const t=10===u?r:n;if(!t)return d=c[u],(0,a.warn)("Missing subrsIndex for "+d.id),!1;let o=32768;t.count<1240?o=107:t.count<33900&&(o=1131);const l=s[--i]+o;if(l<0||l>=t.count||isNaN(l))return d=c[u],(0,a.warn)("Out of bounds subrIndex for "+d.id),!1;if(e.stackSize=i,e.callDepth++,!this.parseCharString(e,t.get(l),r,n))return!1;e.callDepth--,i=e.stackSize;continue}if(11===u)return e.stackSize=i,!0;if(0===u&&h===t.length)t[h-1]=14,d=c[14];else{if(9===u){t.copyWithin(h-1,h,-1),h-=1,o-=1;continue}d=c[u]}}if(d){if(d.stem&&(e.hints+=i>>1,3===u||23===u?e.hasVStems=!0:!e.hasVStems||1!==u&&18!==u||((0,a.warn)("CFF stem hints are in wrong order"),t[h-1]=1===u?3:23)),"min"in d&&!e.undefStack&&i<d.min)return(0,a.warn)("Not enough parameters for "+d.id+"; actual: "+i+", expected: "+d.min),0===i&&(t[h-1]=14,!0);e.firstStackClearing&&d.stackClearing&&(e.firstStackClearing=!1,i-=d.min,i>=2&&d.stem?i%=2:i>1&&(0,a.warn)("Found too many parameters for stack-clearing command"),i>0&&(e.width=s[i-1])),"stackDelta"in d?("stackFn"in d&&d.stackFn(s,i),i+=d.stackDelta):d.stackClearing?i=0:d.resetStack?(i=0,e.undefStack=!1):d.undefStack&&(i=0,e.undefStack=!0,e.firstStackClearing=!1)}}return o<t.length&&t.fill(14,o),e.stackSize=i,!0}parseCharStrings({charStrings:e,localSubrIndex:t,globalSubrIndex:r,fdSelect:n,fdArray:i,privateDict:s}){const o=[],c=[],l=e.count;for(let h=0;h<l;h++){const l=e.get(h),u={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let d=!0,f=null,p=s;if(n&&i.length){const e=n.getFDIndex(h);-1===e&&((0,a.warn)("Glyph index is not in fd select."),d=!1),e>=i.length&&((0,a.warn)("Invalid fd index for glyph index."),d=!1),d&&(p=i[e].privateDict,f=p.subrsIndex)}else t&&(f=t);if(d&&(d=this.parseCharString(u,l,f,r)),null!==u.width){const e=p.getByName("nominalWidthX");c[h]=e+u.width}else{const e=p.getByName("defaultWidthX");c[h]=e}null!==u.seac&&(o[h]=u.seac),d||e.set(h,new Uint8Array([14]))}return{charStrings:e,seacs:o,widths:c}}emptyPrivateDictionary(e){const t=this.createDict(y,[],e.strings);e.setByKey(18,[0,0]),e.privateDict=t}parsePrivateDict(e){if(!e.hasName("Private"))return void this.emptyPrivateDictionary(e);const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length)return void e.removeByName("Private");const r=t[0],a=t[1];if(0===r||a>=this.bytes.length)return void this.emptyPrivateDictionary(e);const n=a+r,i=this.bytes.subarray(a,n),s=this.parseDict(i),o=this.createDict(y,s,e.strings);if(e.privateDict=o,0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06),!o.getByName("Subrs"))return;const c=o.getByName("Subrs"),l=a+c;if(0===c||l>=this.bytes.length)return void this.emptyPrivateDictionary(e);const h=this.parseIndex(l);o.subrsIndex=h.obj}parseCharsets(e,t,r,i){if(0===e)return new w(!0,v.ISO_ADOBE,n.ISOAdobeCharset);if(1===e)return new w(!0,v.EXPERT,n.ExpertCharset);if(2===e)return new w(!0,v.EXPERT_SUBSET,n.ExpertSubsetCharset);const s=this.bytes,o=e,c=s[e++],l=[i?0:".notdef"];let h,u,d;switch(t-=1,c){case 0:for(d=0;d<t;d++)h=s[e++]<<8|s[e++],l.push(i?h:r.get(h));break;case 1:for(;l.length<=t;)for(h=s[e++]<<8|s[e++],u=s[e++],d=0;d<=u;d++)l.push(i?h++:r.get(h++));break;case 2:for(;l.length<=t;)for(h=s[e++]<<8|s[e++],u=s[e++]<<8|s[e++],d=0;d<=u;d++)l.push(i?h++:r.get(h++));break;default:throw new a.FormatError("Unknown charset format")}const f=e,p=s.subarray(o,f);return new w(!1,c,l,p)}parseEncoding(e,t,r,n){const s=Object.create(null),o=this.bytes;let c,l,h,u=!1,d=null;if(0===e||1===e){u=!0,c=e;const t=e?i.ExpertEncoding:i.StandardEncoding;for(l=0,h=n.length;l<h;l++){const e=t.indexOf(n[l]);-1!==e&&(s[e]=l)}}else{const t=e;switch(c=o[e++],127&c){case 0:const t=o[e++];for(l=1;l<=t;l++)s[o[e++]]=l;break;case 1:const r=o[e++];let n=1;for(l=0;l<r;l++){const t=o[e++],r=o[e++];for(let e=t;e<=t+r;e++)s[e]=n++}break;default:throw new a.FormatError(`Unknown encoding format: ${c} in CFF`)}const i=e;128&c&&(o[t]&=127,function(){const t=o[e++];for(l=0;l<t;l++){const t=o[e++],a=(o[e++]<<8)+(255&o[e++]);s[t]=n.indexOf(r.get(a))}}()),d=o.subarray(t,i)}return c&=127,new A(u,c,s,d)}parseFDSelect(e,t){const r=this.bytes,n=r[e++],i=[];let s;switch(n){case 0:for(s=0;s<t;++s){const t=r[e++];i.push(t)}break;case 3:const o=r[e++]<<8|r[e++];for(s=0;s<o;++s){let t=r[e++]<<8|r[e++];0===s&&0!==t&&((0,a.warn)("parseFDSelect: The first range must have a first GID of 0 -- trying to recover."),t=0);const n=r[e++],o=r[e]<<8|r[e+1];for(let e=t;e<o;++e)i.push(n)}e+=2;break;default:throw new a.FormatError(`parseFDSelect: Unknown format "${n}".`)}if(i.length!==t)throw new a.FormatError("parseFDSelect: Invalid font data.");return new S(n,i)}};class h{constructor(){this.header=null,this.names=[],this.topDict=null,this.strings=new d,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)return void(0,a.warn)("Not enough space in charstrings to duplicate first glyph.");const e=this.charStrings.get(0);this.charStrings.add(e),this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(e){return!(e<0||e>=this.charStrings.count)&&this.charStrings.get(e).length>0}}t.CFF=h;class u{constructor(e,t,r,a){this.major=e,this.minor=t,this.hdrSize=r,this.offSize=a}}t.CFFHeader=u;class d{constructor(){this.strings=[]}get(e){return e>=0&&e<=390?s[e]:e-o<=this.strings.length?this.strings[e-o]:s[0]}getSID(e){let t=s.indexOf(e);return-1!==t?t:(t=this.strings.indexOf(e),-1!==t?t+o:-1)}add(e){this.strings.push(e)}get count(){return this.strings.length}}t.CFFStrings=d;class f{constructor(){this.objects=[],this.length=0}add(e){this.length+=e.length,this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length,this.objects[e]=t}get(e){return this.objects[e]}get count(){return this.objects.length}}t.CFFIndex=f;class p{constructor(e,t){this.keyToNameMap=e.keyToNameMap,this.nameToKeyMap=e.nameToKeyMap,this.defaults=e.defaults,this.types=e.types,this.opcodes=e.opcodes,this.order=e.order,this.strings=t,this.values=Object.create(null)}setByKey(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;for(const r of t)if(isNaN(r))return(0,a.warn)(`Invalid CFFDict value: "${t}" for key "${e}".`),!0;const r=this.types[e];return"num"!==r&&"sid"!==r&&"offset"!==r||(t=t[0]),this.values[e]=t,!0}setByName(e,t){if(!(e in this.nameToKeyMap))throw new a.FormatError(`Invalid dictionary name "${e}"`);this.values[this.nameToKeyMap[e]]=t}hasName(e){return this.nameToKeyMap[e]in this.values}getByName(e){if(!(e in this.nameToKeyMap))throw new a.FormatError(`Invalid dictionary name ${e}"`);const t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}removeByName(e){delete this.values[this.nameToKeyMap[e]]}static createTables(e){const t={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const r of e){const e=Array.isArray(r[0])?(r[0][0]<<8)+r[0][1]:r[0];t.keyToNameMap[e]=r[1],t.nameToKeyMap[r[1]]=e,t.types[e]=r[2],t.defaults[e]=r[3],t.opcodes[e]=Array.isArray(r[0])?r[0]:[r[0]],t.order.push(e)}return t}}const g=[[[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 m extends p{static get tables(){return(0,a.shadow)(this,"tables",this.createTables(g))}constructor(e){super(m.tables,e),this.privateDict=null}}t.CFFTopDict=m;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 y extends p{static get tables(){return(0,a.shadow)(this,"tables",this.createTables(b))}constructor(e){super(y.tables,e),this.subrsIndex=null}}t.CFFPrivateDict=y;const v={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class w{constructor(e,t,r,a){this.predefined=e,this.format=t,this.charset=r,this.raw=a}}t.CFFCharset=w;class A{constructor(e,t,r,a){this.predefined=e,this.format=t,this.encoding=r,this.raw=a}}class S{constructor(e,t){this.format=e,this.fdSelect=t}getFDIndex(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}t.CFFFDSelect=S;class x{constructor(){this.offsets=Object.create(null)}isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new a.FormatError(`Already tracking location of ${e}`);this.offsets[e]=t}offset(e){for(const t in this.offsets)this.offsets[t]+=e}setEntryLocation(e,t,r){if(!(e in this.offsets))throw new a.FormatError(`Not tracking location of ${e}`);const n=r.data,i=this.offsets[e];for(let e=0,r=t.length;e<r;++e){const r=5*e+i,s=r+1,o=r+2,c=r+3,l=r+4;if(29!==n[r]||0!==n[s]||0!==n[o]||0!==n[c]||0!==n[l])throw new a.FormatError("writing to an offset that is not empty");const h=t[e];n[r]=29,n[s]=h>>24&255,n[o]=h>>16&255,n[c]=h>>8&255,n[l]=255&h}}}class k{constructor(e){this.cff=e}compile(){const e=this.cff,t={data:[],length:0,add(e){try{this.data.push(...e)}catch{this.data=this.data.concat(e)}this.length=this.data.length}},r=this.compileHeader(e.header);t.add(r);const n=this.compileNameIndex(e.names);if(t.add(n),e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(const r of e.fdArray){let e=t.slice(0);r.hasName("FontMatrix")&&(e=a.Util.transform(e,r.getByName("FontMatrix"))),r.setByName("FontMatrix",e)}}const i=e.topDict.getByName("XUID");i?.length>16&&e.topDict.removeByName("XUID"),e.topDict.setByName("charset",0);let s=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(s.output);const o=s.trackers[0],c=this.compileStringIndex(e.strings.strings);t.add(c);const l=this.compileIndex(e.globalSubrIndex);if(t.add(l),e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)o.setEntryLocation("Encoding",[e.encoding.format],t);else{const r=this.compileEncoding(e.encoding);o.setEntryLocation("Encoding",[t.length],t),t.add(r)}const h=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);o.setEntryLocation("charset",[t.length],t),t.add(h);const u=this.compileCharStrings(e.charStrings);if(o.setEntryLocation("CharStrings",[t.length],t),t.add(u),e.isCIDFont){o.setEntryLocation("FDSelect",[t.length],t);const r=this.compileFDSelect(e.fdSelect);t.add(r),s=this.compileTopDicts(e.fdArray,t.length,!0),o.setEntryLocation("FDArray",[t.length],t),t.add(s.output);const a=s.trackers;this.compilePrivateDicts(e.fdArray,a,t)}return this.compilePrivateDicts([e.topDict],[o],t),t.add([0]),t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return(0,a.shadow)(this,"EncodeFloatRegExp",/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=e.toString();const r=k.EncodeFloatRegExp.exec(t);if(r){const a=parseFloat("1e"+((r[2]?+r[2]:0)+r[1].length));t=(Math.round(e*a)/a).toString()}let a,n,i="";for(a=0,n=t.length;a<n;++a){const e=t[a];i+="e"===e?"-"===t[++a]?"c":"b":"."===e?"a":"-"===e?"e":e}i+=1&i.length?"f":"ff";const s=[30];for(a=0,n=i.length;a<n;a+=2)s.push(parseInt(i.substring(a,a+2),16));return s}encodeInteger(e){let t;return t=e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e],t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameIndex(e){const t=new f;for(const r of e){const e=Math.min(r.length,127);let n=new Array(e);for(let t=0;t<e;t++){let e=r[t];(e<"!"||e>"~"||"["===e||"]"===e||"("===e||")"===e||"{"===e||"}"===e||"<"===e||">"===e||"/"===e||"%"===e)&&(e="_"),n[t]=e}n=n.join(""),""===n&&(n="Bad_Font_Name"),t.add((0,a.stringToBytes)(n))}return this.compileIndex(t)}compileTopDicts(e,t,r){const a=[];let n=new f;for(const i of e){r&&(i.removeByName("CIDFontVersion"),i.removeByName("CIDFontRevision"),i.removeByName("CIDFontType"),i.removeByName("CIDCount"),i.removeByName("UIDBase"));const e=new x,s=this.compileDict(i,e);a.push(e),n.add(s),e.offset(t)}return n=this.compileIndex(n,a),{trackers:a,output:n}}compilePrivateDicts(e,t,r){for(let n=0,i=e.length;n<i;++n){const i=e[n],s=i.privateDict;if(!s||!i.hasName("Private"))throw new a.FormatError("There must be a private dictionary.");const o=new x,c=this.compileDict(s,o);let l=r.length;if(o.offset(l),c.length||(l=0),t[n].setEntryLocation("Private",[c.length,l],r),r.add(c),s.subrsIndex&&s.hasName("Subrs")){const e=this.compileIndex(s.subrsIndex);o.setEntryLocation("Subrs",[c.length],r),r.add(e)}}}compileDict(e,t){const r=[];for(const n of e.order){if(!(n in e.values))continue;let i=e.values[n],s=e.types[n];if(Array.isArray(s)||(s=[s]),Array.isArray(i)||(i=[i]),0!==i.length){for(let o=0,c=s.length;o<c;++o){const c=s[o],l=i[o];switch(c){case"num":case"sid":r.push(...this.encodeNumber(l));break;case"offset":const s=e.keyToNameMap[n];t.isTracking(s)||t.track(s,r.length),r.push(29,0,0,0,0);break;case"array":case"delta":r.push(...this.encodeNumber(l));for(let e=1,t=i.length;e<t;++e)r.push(...this.encodeNumber(i[e]));break;default:throw new a.FormatError(`Unknown data type of ${c}`)}}r.push(...e.opcodes[n])}}return r}compileStringIndex(e){const t=new f;for(const r of e)t.add((0,a.stringToBytes)(r));return this.compileIndex(t)}compileCharStrings(e){const t=new f;for(let r=0;r<e.count;r++){const a=e.get(r);0!==a.length?t.add(a):t.add(new Uint8Array([139,14]))}return this.compileIndex(t)}compileCharset(e,t,r,n){let i;const s=t-1;if(n)i=new Uint8Array([2,0,0,s>>8&255,255&s]);else{i=new Uint8Array(1+2*s),i[0]=0;let t=0;const n=e.charset.length;let o=!1;for(let s=1;s<i.length;s+=2){let c=0;if(t<n){const n=e.charset[t++];c=r.getSID(n),-1===c&&(c=0,o||(o=!0,(0,a.warn)(`Couldn't find ${n} in CFF strings`)))}i[s]=c>>8&255,i[s+1]=255&c}}return this.compileTypedArray(i)}compileEncoding(e){return this.compileTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let r,a;switch(t){case 0:for(r=new Uint8Array(1+e.fdSelect.length),r[0]=t,a=0;a<e.fdSelect.length;a++)r[a+1]=e.fdSelect[a];break;case 3:const n=0;let i=e.fdSelect[0];const s=[t,0,0,n>>8&255,255&n,i];for(a=1;a<e.fdSelect.length;a++){const t=e.fdSelect[a];t!==i&&(s.push(a>>8&255,255&a,t),i=t)}const o=(s.length-3)/3;s[1]=o>>8&255,s[2]=255&o,s.push(a>>8&255,255&a),r=new Uint8Array(s)}return this.compileTypedArray(r)}compileTypedArray(e){return Array.from(e)}compileIndex(e,t=[]){const r=e.objects,a=r.length;if(0===a)return[0,0];const n=[a>>8&255,255&a];let i,s,o=1;for(i=0;i<a;++i)o+=r[i].length;s=o<256?1:o<65536?2:o<16777216?3:4,n.push(s);let c=1;for(i=0;i<a+1;i++)1===s?n.push(255&c):2===s?n.push(c>>8&255,255&c):3===s?n.push(c>>16&255,c>>8&255,255&c):n.push(c>>>24&255,c>>16&255,c>>8&255,255&c),r[i]&&(c+=r[i].length);for(i=0;i<a;i++)t[i]&&t[i].offset(n.length),n.push(...r[i]);return n}}t.CFFCompiler=k},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ISOAdobeCharset=t.ExpertSubsetCharset=t.ExpertCharset=void 0,t.ISOAdobeCharset=[".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"],t.ExpertCharset=[".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"],t.ExpertSubsetCharset=[".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"]},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ZapfDingbatsEncoding=t.WinAnsiEncoding=t.SymbolSetEncoding=t.StandardEncoding=t.MacRomanEncoding=t.ExpertEncoding=void 0,t.getEncoding=function(e){switch(e){case"WinAnsiEncoding":return s;case"StandardEncoding":return i;case"MacRomanEncoding":return n;case"SymbolSetEncoding":return o;case"ZapfDingbatsEncoding":return c;case"ExpertEncoding":return r;case"MacExpertEncoding":return a;default:return null}};const r=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"];t.ExpertEncoding=r;const a=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""],n=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"];t.MacRomanEncoding=n;const i=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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","","","",""];t.StandardEncoding=i;const s=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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"];t.WinAnsiEncoding=s;const o=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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",""];t.SymbolSetEncoding=o;const c=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","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",""];t.ZapfDingbatsEncoding=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SEAC_ANALYSIS_ENABLED=t.MacStandardGlyphOrdering=t.FontFlags=void 0,t.normalizeFontName=function(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\s/g,"")},t.recoverGlyphName=c,t.type1FontGlyphMapping=function(e,t,r){const i=Object.create(null);let s,l,h;const u=!!(e.flags&o.Symbolic);if(e.isInternalFont)for(h=t,l=0;l<h.length;l++)s=r.indexOf(h[l]),i[l]=s>=0?s:0;else if(e.baseEncodingName)for(h=(0,a.getEncoding)(e.baseEncodingName),l=0;l<h.length;l++)s=r.indexOf(h[l]),i[l]=s>=0?s:0;else if(u)for(l in t)i[l]=t[l];else for(h=a.StandardEncoding,l=0;l<h.length;l++)s=r.indexOf(h[l]),i[l]=s>=0?s:0;const d=e.differences;let f;if(d)for(l in d){const e=d[l];if(s=r.indexOf(e),-1===s){f||(f=(0,n.getGlyphsUnicode)());const t=c(e,f);t!==e&&(s=r.indexOf(t))}i[l]=s>=0?s:0}return i};var a=r(37),n=r(39),i=r(40),s=r(2);t.SEAC_ANALYSIS_ENABLED=!0;const o={FixedPitch:1,Serif:2,Symbolic:4,Script:8,Nonsymbolic:32,Italic:64,AllCap:65536,SmallCap:131072,ForceBold:262144};function c(e,t){if(void 0!==t[e])return e;const r=(0,i.getUnicodeForGlyph)(e,t);if(-1!==r)for(const e in t)if(t[e]===r)return e;return(0,s.info)("Unable to recover a standard glyph name for: "+e),e}t.FontFlags=o,t.MacStandardGlyphOrdering=[".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"]},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getGlyphsUnicode=t.getDingbatsGlyphsUnicode=void 0;var a=r(3);const n=(0,a.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}));t.getGlyphsUnicode=n;const i=(0,a.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}));t.getDingbatsGlyphsUnicode=i},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearUnicodeCaches=function(){s.clear()},t.getCharUnicodeCategory=function(e){const t=s.get(e);if(t)return t;const r=e.match(i),a={isWhitespace:!!r?.[1],isZeroWidthDiacritic:!!r?.[2],isInvisibleFormatMark:!!r?.[3]};return s.set(e,a),a},t.getUnicodeForGlyph=function(e,t){let r=t[e];if(void 0!==r)return r;if(!e)return-1;if("u"===e[0]){const t=e.length;let a;if(7===t&&"n"===e[1]&&"i"===e[2])a=e.substring(3);else{if(!(t>=5&&t<=7))return-1;a=e.substring(1)}if(a===a.toUpperCase()&&(r=parseInt(a,16),r>=0))return r}return-1},t.getUnicodeRangeFor=function(e,t=-1){if(-1!==t){const r=n[t];for(let a=0,n=r.length;a<n;a+=2)if(e>=r[a]&&e<=r[a+1])return t}for(let t=0,r=n.length;t<r;t++){const r=n[t];for(let a=0,n=r.length;a<n;a+=2)if(e>=r[a]&&e<=r[a+1])return t}return-1},t.mapSpecialUnicodeValues=function(e){return e>=65520&&e<=65535?0:e>=62976&&e<=63743?a()[e]||e:173===e?45:e};const a=(0,r(3).getLookupTableFactory)((function(e){e[63721]=169,e[63193]=169,e[63720]=174,e[63194]=174,e[63722]=8482,e[63195]=8482,e[63729]=9127,e[63730]=9128,e[63731]=9129,e[63740]=9131,e[63741]=9132,e[63742]=9133,e[63726]=9121,e[63727]=9122,e[63728]=9123,e[63737]=9124,e[63738]=9125,e[63739]=9126,e[63723]=9115,e[63724]=9116,e[63725]=9117,e[63734]=9118,e[63735]=9119,e[63736]=9120})),n=[[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]],i=new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$","u"),s=new Map},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSerifFonts=t.getNonStdFontMap=t.getGlyphMapForStandardFonts=t.getFontNameToFileMap=void 0,t.getStandardFontName=function(e){const t=(0,n.normalizeFontName)(e);return i()[t]},t.getSymbolsFonts=t.getSupplementalGlyphMapForCalibri=t.getSupplementalGlyphMapForArialBlack=t.getStdFontMap=void 0,t.isKnownFontName=function(e){const t=(0,n.normalizeFontName)(e);return!!(i()[t]||o()[t]||c()[t]||l()[t])};var a=r(3),n=r(38);const i=(0,a.getLookupTableFactory)((function(e){e["Times-Roman"]="Times-Roman",e.Helvetica="Helvetica",e.Courier="Courier",e.Symbol="Symbol",e["Times-Bold"]="Times-Bold",e["Helvetica-Bold"]="Helvetica-Bold",e["Courier-Bold"]="Courier-Bold",e.ZapfDingbats="ZapfDingbats",e["Times-Italic"]="Times-Italic",e["Helvetica-Oblique"]="Helvetica-Oblique",e["Courier-Oblique"]="Courier-Oblique",e["Times-BoldItalic"]="Times-BoldItalic",e["Helvetica-BoldOblique"]="Helvetica-BoldOblique",e["Courier-BoldOblique"]="Courier-BoldOblique",e.ArialNarrow="Helvetica",e["ArialNarrow-Bold"]="Helvetica-Bold",e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique",e["ArialNarrow-Italic"]="Helvetica-Oblique",e.ArialBlack="Helvetica",e["ArialBlack-Bold"]="Helvetica-Bold",e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique",e["ArialBlack-Italic"]="Helvetica-Oblique",e["Arial-Black"]="Helvetica",e["Arial-Black-Bold"]="Helvetica-Bold",e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Black-Italic"]="Helvetica-Oblique",e.Arial="Helvetica",e["Arial-Bold"]="Helvetica-Bold",e["Arial-BoldItalic"]="Helvetica-BoldOblique",e["Arial-Italic"]="Helvetica-Oblique",e.ArialMT="Helvetica",e["Arial-BoldItalicMT"]="Helvetica-BoldOblique",e["Arial-BoldMT"]="Helvetica-Bold",e["Arial-ItalicMT"]="Helvetica-Oblique",e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique",e["Arial-BoldMT-Bold"]="Helvetica-Bold",e["Arial-ItalicMT-Italic"]="Helvetica-Oblique",e.ArialUnicodeMS="Helvetica",e["ArialUnicodeMS-Bold"]="Helvetica-Bold",e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldOblique",e["ArialUnicodeMS-Italic"]="Helvetica-Oblique",e["Courier-BoldItalic"]="Courier-BoldOblique",e["Courier-Italic"]="Courier-Oblique",e.CourierNew="Courier",e["CourierNew-Bold"]="Courier-Bold",e["CourierNew-BoldItalic"]="Courier-BoldOblique",e["CourierNew-Italic"]="Courier-Oblique",e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique",e["CourierNewPS-BoldMT"]="Courier-Bold",e["CourierNewPS-ItalicMT"]="Courier-Oblique",e.CourierNewPSMT="Courier",e["Helvetica-BoldItalic"]="Helvetica-BoldOblique",e["Helvetica-Italic"]="Helvetica-Oblique",e["Symbol-Bold"]="Symbol",e["Symbol-BoldItalic"]="Symbol",e["Symbol-Italic"]="Symbol",e.TimesNewRoman="Times-Roman",e["TimesNewRoman-Bold"]="Times-Bold",e["TimesNewRoman-BoldItalic"]="Times-BoldItalic",e["TimesNewRoman-Italic"]="Times-Italic",e.TimesNewRomanPS="Times-Roman",e["TimesNewRomanPS-Bold"]="Times-Bold",e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldItalic",e["TimesNewRomanPS-BoldMT"]="Times-Bold",e["TimesNewRomanPS-Italic"]="Times-Italic",e["TimesNewRomanPS-ItalicMT"]="Times-Italic",e.TimesNewRomanPSMT="Times-Roman",e["TimesNewRomanPSMT-Bold"]="Times-Bold",e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic",e["TimesNewRomanPSMT-Italic"]="Times-Italic"}));t.getStdFontMap=i;const s=(0,a.getLookupTableFactory)((function(e){e.Courier="FoxitFixed.pfb",e["Courier-Bold"]="FoxitFixedBold.pfb",e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb",e["Courier-Oblique"]="FoxitFixedItalic.pfb",e.Helvetica="LiberationSans-Regular.ttf",e["Helvetica-Bold"]="LiberationSans-Bold.ttf",e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf",e["Helvetica-Oblique"]="LiberationSans-Italic.ttf",e["Times-Roman"]="FoxitSerif.pfb",e["Times-Bold"]="FoxitSerifBold.pfb",e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb",e["Times-Italic"]="FoxitSerifItalic.pfb",e.Symbol="FoxitSymbol.pfb",e.ZapfDingbats="FoxitDingbats.pfb",e["LiberationSans-Regular"]="LiberationSans-Regular.ttf",e["LiberationSans-Bold"]="LiberationSans-Bold.ttf",e["LiberationSans-Italic"]="LiberationSans-Italic.ttf",e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"}));t.getFontNameToFileMap=s;const o=(0,a.getLookupTableFactory)((function(e){e.Calibri="Helvetica",e["Calibri-Bold"]="Helvetica-Bold",e["Calibri-BoldItalic"]="Helvetica-BoldOblique",e["Calibri-Italic"]="Helvetica-Oblique",e.CenturyGothic="Helvetica",e["CenturyGothic-Bold"]="Helvetica-Bold",e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique",e["CenturyGothic-Italic"]="Helvetica-Oblique",e.ComicSansMS="Comic Sans MS",e["ComicSansMS-Bold"]="Comic Sans MS-Bold",e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic",e["ComicSansMS-Italic"]="Comic Sans MS-Italic",e.Impact="Helvetica",e["ItcSymbol-Bold"]="Helvetica-Bold",e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique",e["ItcSymbol-Book"]="Helvetica",e["ItcSymbol-BookItalic"]="Helvetica-Oblique",e["ItcSymbol-Medium"]="Helvetica",e["ItcSymbol-MediumItalic"]="Helvetica-Oblique",e.LucidaConsole="Courier",e["LucidaConsole-Bold"]="Courier-Bold",e["LucidaConsole-BoldItalic"]="Courier-BoldOblique",e["LucidaConsole-Italic"]="Courier-Oblique",e["LucidaSans-Demi"]="Helvetica-Bold",e["MS-Gothic"]="MS Gothic",e["MS-Gothic-Bold"]="MS Gothic-Bold",e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic",e["MS-Gothic-Italic"]="MS Gothic-Italic",e["MS-Mincho"]="MS Mincho",e["MS-Mincho-Bold"]="MS Mincho-Bold",e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic",e["MS-Mincho-Italic"]="MS Mincho-Italic",e["MS-PGothic"]="MS PGothic",e["MS-PGothic-Bold"]="MS PGothic-Bold",e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic",e["MS-PGothic-Italic"]="MS PGothic-Italic",e["MS-PMincho"]="MS PMincho",e["MS-PMincho-Bold"]="MS PMincho-Bold",e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic",e["MS-PMincho-Italic"]="MS PMincho-Italic",e.NuptialScript="Times-Italic",e.SegoeUISymbol="Helvetica"}));t.getNonStdFontMap=o;const c=(0,a.getLookupTableFactory)((function(e){e["Adobe Jenson"]=!0,e["Adobe Text"]=!0,e.Albertus=!0,e.Aldus=!0,e.Alexandria=!0,e.Algerian=!0,e["American Typewriter"]=!0,e.Antiqua=!0,e.Apex=!0,e.Arno=!0,e.Aster=!0,e.Aurora=!0,e.Baskerville=!0,e.Bell=!0,e.Bembo=!0,e["Bembo Schoolbook"]=!0,e.Benguiat=!0,e["Berkeley Old Style"]=!0,e["Bernhard Modern"]=!0,e["Berthold City"]=!0,e.Bodoni=!0,e["Bauer Bodoni"]=!0,e["Book Antiqua"]=!0,e.Bookman=!0,e["Bordeaux Roman"]=!0,e["Californian FB"]=!0,e.Calisto=!0,e.Calvert=!0,e.Capitals=!0,e.Cambria=!0,e.Cartier=!0,e.Caslon=!0,e.Catull=!0,e.Centaur=!0,e["Century Old Style"]=!0,e["Century Schoolbook"]=!0,e.Chaparral=!0,e["Charis SIL"]=!0,e.Cheltenham=!0,e["Cholla Slab"]=!0,e.Clarendon=!0,e.Clearface=!0,e.Cochin=!0,e.Colonna=!0,e["Computer Modern"]=!0,e["Concrete Roman"]=!0,e.Constantia=!0,e["Cooper Black"]=!0,e.Corona=!0,e.Ecotype=!0,e.Egyptienne=!0,e.Elephant=!0,e.Excelsior=!0,e.Fairfield=!0,e["FF Scala"]=!0,e.Folkard=!0,e.Footlight=!0,e.FreeSerif=!0,e["Friz Quadrata"]=!0,e.Garamond=!0,e.Gentium=!0,e.Georgia=!0,e.Gloucester=!0,e["Goudy Old Style"]=!0,e["Goudy Schoolbook"]=!0,e["Goudy Pro Font"]=!0,e.Granjon=!0,e["Guardian Egyptian"]=!0,e.Heather=!0,e.Hercules=!0,e["High Tower Text"]=!0,e.Hiroshige=!0,e["Hoefler Text"]=!0,e["Humana Serif"]=!0,e.Imprint=!0,e["Ionic No. 5"]=!0,e.Janson=!0,e.Joanna=!0,e.Korinna=!0,e.Lexicon=!0,e.LiberationSerif=!0,e["Liberation Serif"]=!0,e["Linux Libertine"]=!0,e.Literaturnaya=!0,e.Lucida=!0,e["Lucida Bright"]=!0,e.Melior=!0,e.Memphis=!0,e.Miller=!0,e.Minion=!0,e.Modern=!0,e["Mona Lisa"]=!0,e["Mrs Eaves"]=!0,e["MS Serif"]=!0,e["Museo Slab"]=!0,e["New York"]=!0,e["Nimbus Roman"]=!0,e["NPS Rawlinson Roadway"]=!0,e.NuptialScript=!0,e.Palatino=!0,e.Perpetua=!0,e.Plantin=!0,e["Plantin Schoolbook"]=!0,e.Playbill=!0,e["Poor Richard"]=!0,e["Rawlinson Roadway"]=!0,e.Renault=!0,e.Requiem=!0,e.Rockwell=!0,e.Roman=!0,e["Rotis Serif"]=!0,e.Sabon=!0,e.Scala=!0,e.Seagull=!0,e.Sistina=!0,e.Souvenir=!0,e.STIX=!0,e["Stone Informal"]=!0,e["Stone Serif"]=!0,e.Sylfaen=!0,e.Times=!0,e.Trajan=!0,e["Trinité"]=!0,e["Trump Mediaeval"]=!0,e.Utopia=!0,e["Vale Type"]=!0,e["Bitstream Vera"]=!0,e["Vera Serif"]=!0,e.Versailles=!0,e.Wanted=!0,e.Weiss=!0,e["Wide Latin"]=!0,e.Windsor=!0,e.XITS=!0}));t.getSerifFonts=c;const l=(0,a.getLookupTableFactory)((function(e){e.Dingbats=!0,e.Symbol=!0,e.ZapfDingbats=!0,e.Wingdings=!0,e["Wingdings-Bold"]=!0,e["Wingdings-Regular"]=!0}));t.getSymbolsFonts=l;const h=(0,a.getLookupTableFactory)((function(e){e[2]=10,e[3]=32,e[4]=33,e[5]=34,e[6]=35,e[7]=36,e[8]=37,e[9]=38,e[10]=39,e[11]=40,e[12]=41,e[13]=42,e[14]=43,e[15]=44,e[16]=45,e[17]=46,e[18]=47,e[19]=48,e[20]=49,e[21]=50,e[22]=51,e[23]=52,e[24]=53,e[25]=54,e[26]=55,e[27]=56,e[28]=57,e[29]=58,e[30]=894,e[31]=60,e[32]=61,e[33]=62,e[34]=63,e[35]=64,e[36]=65,e[37]=66,e[38]=67,e[39]=68,e[40]=69,e[41]=70,e[42]=71,e[43]=72,e[44]=73,e[45]=74,e[46]=75,e[47]=76,e[48]=77,e[49]=78,e[50]=79,e[51]=80,e[52]=81,e[53]=82,e[54]=83,e[55]=84,e[56]=85,e[57]=86,e[58]=87,e[59]=88,e[60]=89,e[61]=90,e[62]=91,e[63]=92,e[64]=93,e[65]=94,e[66]=95,e[67]=96,e[68]=97,e[69]=98,e[70]=99,e[71]=100,e[72]=101,e[73]=102,e[74]=103,e[75]=104,e[76]=105,e[77]=106,e[78]=107,e[79]=108,e[80]=109,e[81]=110,e[82]=111,e[83]=112,e[84]=113,e[85]=114,e[86]=115,e[87]=116,e[88]=117,e[89]=118,e[90]=119,e[91]=120,e[92]=121,e[93]=122,e[94]=123,e[95]=124,e[96]=125,e[97]=126,e[98]=196,e[99]=197,e[100]=199,e[101]=201,e[102]=209,e[103]=214,e[104]=220,e[105]=225,e[106]=224,e[107]=226,e[108]=228,e[109]=227,e[110]=229,e[111]=231,e[112]=233,e[113]=232,e[114]=234,e[115]=235,e[116]=237,e[117]=236,e[118]=238,e[119]=239,e[120]=241,e[121]=243,e[122]=242,e[123]=244,e[124]=246,e[125]=245,e[126]=250,e[127]=249,e[128]=251,e[129]=252,e[130]=8224,e[131]=176,e[132]=162,e[133]=163,e[134]=167,e[135]=8226,e[136]=182,e[137]=223,e[138]=174,e[139]=169,e[140]=8482,e[141]=180,e[142]=168,e[143]=8800,e[144]=198,e[145]=216,e[146]=8734,e[147]=177,e[148]=8804,e[149]=8805,e[150]=165,e[151]=181,e[152]=8706,e[153]=8721,e[154]=8719,e[156]=8747,e[157]=170,e[158]=186,e[159]=8486,e[160]=230,e[161]=248,e[162]=191,e[163]=161,e[164]=172,e[165]=8730,e[166]=402,e[167]=8776,e[168]=8710,e[169]=171,e[170]=187,e[171]=8230,e[179]=8220,e[180]=8221,e[181]=8216,e[182]=8217,e[200]=193,e[203]=205,e[207]=211,e[210]=218,e[223]=711,e[224]=321,e[225]=322,e[226]=352,e[227]=353,e[228]=381,e[229]=382,e[233]=221,e[234]=253,e[252]=263,e[253]=268,e[254]=269,e[258]=258,e[260]=260,e[261]=261,e[265]=280,e[266]=281,e[267]=282,e[268]=283,e[269]=313,e[275]=323,e[276]=324,e[278]=328,e[283]=344,e[284]=345,e[285]=346,e[286]=347,e[292]=367,e[295]=377,e[296]=378,e[298]=380,e[305]=963,e[306]=964,e[307]=966,e[308]=8215,e[309]=8252,e[310]=8319,e[311]=8359,e[312]=8592,e[313]=8593,e[337]=9552,e[493]=1039,e[494]=1040,e[672]=1488,e[673]=1489,e[674]=1490,e[675]=1491,e[676]=1492,e[677]=1493,e[678]=1494,e[679]=1495,e[680]=1496,e[681]=1497,e[682]=1498,e[683]=1499,e[684]=1500,e[685]=1501,e[686]=1502,e[687]=1503,e[688]=1504,e[689]=1505,e[690]=1506,e[691]=1507,e[692]=1508,e[693]=1509,e[694]=1510,e[695]=1511,e[696]=1512,e[697]=1513,e[698]=1514,e[705]=1524,e[706]=8362,e[710]=64288,e[711]=64298,e[759]=1617,e[761]=1776,e[763]=1778,e[775]=1652,e[777]=1764,e[778]=1780,e[779]=1781,e[780]=1782,e[782]=771,e[783]=64726,e[786]=8363,e[788]=8532,e[790]=768,e[791]=769,e[792]=768,e[795]=803,e[797]=64336,e[798]=64337,e[799]=64342,e[800]=64343,e[801]=64344,e[802]=64345,e[803]=64362,e[804]=64363,e[805]=64364,e[2424]=7821,e[2425]=7822,e[2426]=7823,e[2427]=7824,e[2428]=7825,e[2429]=7826,e[2430]=7827,e[2433]=7682,e[2678]=8045,e[2679]=8046,e[2830]=1552,e[2838]=686,e[2840]=751,e[2842]=753,e[2843]=754,e[2844]=755,e[2846]=757,e[2856]=767,e[2857]=848,e[2858]=849,e[2862]=853,e[2863]=854,e[2864]=855,e[2865]=861,e[2866]=862,e[2906]=7460,e[2908]=7462,e[2909]=7463,e[2910]=7464,e[2912]=7466,e[2913]=7467,e[2914]=7468,e[2916]=7470,e[2917]=7471,e[2918]=7472,e[2920]=7474,e[2921]=7475,e[2922]=7476,e[2924]=7478,e[2925]=7479,e[2926]=7480,e[2928]=7482,e[2929]=7483,e[2930]=7484,e[2932]=7486,e[2933]=7487,e[2934]=7488,e[2936]=7490,e[2937]=7491,e[2938]=7492,e[2940]=7494,e[2941]=7495,e[2942]=7496,e[2944]=7498,e[2946]=7500,e[2948]=7502,e[2950]=7504,e[2951]=7505,e[2952]=7506,e[2954]=7508,e[2955]=7509,e[2956]=7510,e[2958]=7512,e[2959]=7513,e[2960]=7514,e[2962]=7516,e[2963]=7517,e[2964]=7518,e[2966]=7520,e[2967]=7521,e[2968]=7522,e[2970]=7524,e[2971]=7525,e[2972]=7526,e[2974]=7528,e[2975]=7529,e[2976]=7530,e[2978]=1537,e[2979]=1538,e[2980]=1539,e[2982]=1549,e[2983]=1551,e[2984]=1552,e[2986]=1554,e[2987]=1555,e[2988]=1556,e[2990]=1623,e[2991]=1624,e[2995]=1775,e[2999]=1791,e[3002]=64290,e[3003]=64291,e[3004]=64292,e[3006]=64294,e[3007]=64295,e[3008]=64296,e[3011]=1900,e[3014]=8223,e[3015]=8244,e[3017]=7532,e[3018]=7533,e[3019]=7534,e[3075]=7590,e[3076]=7591,e[3079]=7594,e[3080]=7595,e[3083]=7598,e[3084]=7599,e[3087]=7602,e[3088]=7603,e[3091]=7606,e[3092]=7607,e[3095]=7610,e[3096]=7611,e[3099]=7614,e[3100]=7615,e[3103]=7618,e[3104]=7619,e[3107]=8337,e[3108]=8338,e[3116]=1884,e[3119]=1885,e[3120]=1885,e[3123]=1886,e[3124]=1886,e[3127]=1887,e[3128]=1887,e[3131]=1888,e[3132]=1888,e[3135]=1889,e[3136]=1889,e[3139]=1890,e[3140]=1890,e[3143]=1891,e[3144]=1891,e[3147]=1892,e[3148]=1892,e[3153]=580,e[3154]=581,e[3157]=584,e[3158]=585,e[3161]=588,e[3162]=589,e[3165]=891,e[3166]=892,e[3169]=1274,e[3170]=1275,e[3173]=1278,e[3174]=1279,e[3181]=7622,e[3182]=7623,e[3282]=11799,e[3316]=578,e[3379]=42785,e[3393]=1159,e[3416]=8377}));t.getGlyphMapForStandardFonts=h;const u=(0,a.getLookupTableFactory)((function(e){e[227]=322,e[264]=261,e[291]=346}));t.getSupplementalGlyphMapForArialBlack=u;const d=(0,a.getLookupTableFactory)((function(e){e[1]=32,e[4]=65,e[5]=192,e[6]=193,e[9]=196,e[17]=66,e[18]=67,e[21]=268,e[24]=68,e[28]=69,e[29]=200,e[30]=201,e[32]=282,e[38]=70,e[39]=71,e[44]=72,e[47]=73,e[48]=204,e[49]=205,e[58]=74,e[60]=75,e[62]=76,e[68]=77,e[69]=78,e[75]=79,e[76]=210,e[80]=214,e[87]=80,e[89]=81,e[90]=82,e[92]=344,e[94]=83,e[97]=352,e[100]=84,e[104]=85,e[109]=220,e[115]=86,e[116]=87,e[121]=88,e[122]=89,e[124]=221,e[127]=90,e[129]=381,e[258]=97,e[259]=224,e[260]=225,e[263]=228,e[268]=261,e[271]=98,e[272]=99,e[273]=263,e[275]=269,e[282]=100,e[286]=101,e[287]=232,e[288]=233,e[290]=283,e[295]=281,e[296]=102,e[336]=103,e[346]=104,e[349]=105,e[350]=236,e[351]=237,e[361]=106,e[364]=107,e[367]=108,e[371]=322,e[373]=109,e[374]=110,e[381]=111,e[382]=242,e[383]=243,e[386]=246,e[393]=112,e[395]=113,e[396]=114,e[398]=345,e[400]=115,e[401]=347,e[403]=353,e[410]=116,e[437]=117,e[442]=252,e[448]=118,e[449]=119,e[454]=120,e[455]=121,e[457]=253,e[460]=122,e[462]=382,e[463]=380,e[853]=44,e[855]=58,e[856]=46,e[876]=47,e[878]=45,e[882]=45,e[894]=40,e[895]=41,e[896]=91,e[897]=93,e[923]=64,e[1004]=48,e[1005]=49,e[1006]=50,e[1007]=51,e[1008]=52,e[1009]=53,e[1010]=54,e[1011]=55,e[1012]=56,e[1013]=57,e[1081]=37,e[1085]=43,e[1086]=45}));t.getSupplementalGlyphMapForCalibri=d},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ToUnicodeMap=t.IdentityToUnicodeMap=void 0;var a=r(2);t.ToUnicodeMap=class{constructor(e=[]){this._map=e}get length(){return this._map.length}forEach(e){for(const t in this._map)e(t,this._map[t].charCodeAt(0))}has(e){return void 0!==this._map[e]}get(e){return this._map[e]}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const r in t)if(t[r]===e)return 0|r;return-1}amend(e){for(const t in e)this._map[t]=e[t]}},t.IdentityToUnicodeMap=class{constructor(e,t){this.firstChar=e,this.lastChar=t}get length(){return this.lastChar+1-this.firstChar}forEach(e){for(let t=this.firstChar,r=this.lastChar;t<=r;t++)e(t,t)}has(e){return this.firstChar<=e&&e<=this.lastChar}get(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}charCodeOf(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}amend(e){(0,a.unreachable)("Should not call amend()")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CFFFont=void 0;var a=r(35),n=r(38),i=r(2);t.CFFFont=class{constructor(e,t){this.properties=t;const r=new a.CFFParser(e,t,n.SEAC_ANALYSIS_ENABLED);this.cff=r.parse(),this.cff.duplicateFirstGlyph();const s=new a.CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=s.compile()}catch{(0,i.warn)("Failed to compile font "+t.loadedName),this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,{cidToGidMap:r,cMap:a}=t,i=e.charset.charset;let s,o;if(t.composite){let t,n;if(r?.length>0){t=Object.create(null);for(let e=0,a=r.length;e<a;e++){const a=r[e];void 0!==a&&(t[a]=e)}}if(s=Object.create(null),e.isCIDFont)for(o=0;o<i.length;o++){const e=i[o];n=a.charCodeOf(e),void 0!==t?.[n]&&(n=t[n]),s[n]=o}else for(o=0;o<e.charStrings.count;o++)n=a.charCodeOf(o),s[n]=o;return s}let c=e.encoding?e.encoding.encoding:null;return t.isInternalFont&&(c=t.defaultEncoding),s=(0,n.type1FontGlyphMapping)(t,c,i),s}hasGlyphId(e){return this.cff.hasGlyphId(e)}_createBuiltInEncoding(){const{charset:e,encoding:t}=this.cff;if(!e||!t)return;const r=e.charset,a=t.encoding,n=[];for(const e in a){const t=a[e];if(t>=0){const a=r[t];a&&(n[e]=a)}}n.length>0&&(this.properties.builtInEncoding=n)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontRendererFactory=void 0;var a=r(2),n=r(35),i=r(39),s=r(37),o=r(8);function c(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function l(e,t){return e[t]<<8|e[t+1]}function h(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function u(e,t){return e[t]<<24>>24}function d(e,t){return h(e,t)/16384}function f(e){const t=e.length;let r=32768;return t<1240?r=107:t<33900&&(r=1131),r}function p(e,t,r){const n=1===l(e,t+2)?c(e,t+8):c(e,t+16),i=l(e,t+n);let s,o,h;if(4===i){l(e,t+n+2);const r=l(e,t+n+6)>>1;for(o=t+n+14,s=[],h=0;h<r;h++,o+=2)s[h]={end:l(e,o)};for(o+=2,h=0;h<r;h++,o+=2)s[h].start=l(e,o);for(h=0;h<r;h++,o+=2)s[h].idDelta=l(e,o);for(h=0;h<r;h++,o+=2){let t=l(e,o);if(0!==t){s[h].ids=[];for(let r=0,a=s[h].end-s[h].start+1;r<a;r++)s[h].ids[r]=l(e,o+t),t+=2}}return s}if(12===i){const r=c(e,t+n+12);for(o=t+n+16,s=[],h=0;h<r;h++)t=c(e,o),s.push({start:t,end:c(e,o+4),idDelta:c(e,o+8)-t}),o+=12;return s}throw new a.FormatError(`unsupported cmap: ${i}`)}function g(e,t,r,a){const i=new n.CFFParser(new o.Stream(e,t,r-t),{},a).parse();return{glyphs:i.charStrings.objects,subrs:i.topDict.privateDict?.subrsIndex?.objects,gsubrs:i.globalSubrIndex?.objects,isCFFCIDFont:i.isCIDFont,fdSelect:i.fdSelect,fdArray:i.fdArray}}function m(e,t){const r=t.codePointAt(0);let a=0,n=0,i=e.length-1;for(;n<i;){const t=n+i+1>>1;r<e[t].start?i=t-1:n=t}return e[n].start<=r&&r<=e[n].end&&(a=e[n].idDelta+(e[n].ids?e[n].ids[r-e[n].start]:r)&65535),{charCode:r,glyphId:a}}function b(e,t,r){function a(e,r){t.push({cmd:"moveTo",args:[e,r]})}function n(e,r){t.push({cmd:"lineTo",args:[e,r]})}function i(e,r,a,n){t.push({cmd:"quadraticCurveTo",args:[e,r,a,n]})}let s=0;const o=h(e,s);let c,f=0,p=0;if(s+=10,o<0)do{c=l(e,s);const a=l(e,s+2);let n,i;s+=4,1&c?(2&c?(n=h(e,s),i=h(e,s+2)):(n=l(e,s),i=l(e,s+2)),s+=4):2&c?(n=u(e,s++),i=u(e,s++)):(n=e[s++],i=e[s++]),2&c?(f=n,p=i):(f=0,p=0);let o=1,g=1,m=0,y=0;8&c?(o=g=d(e,s),s+=2):64&c?(o=d(e,s),g=d(e,s+2),s+=4):128&c&&(o=d(e,s),m=d(e,s+2),y=d(e,s+4),g=d(e,s+6),s+=8);const v=r.glyphs[a];v&&(t.push({cmd:"save"},{cmd:"transform",args:[o,m,y,g,f,p]}),b(v,t,r),t.push({cmd:"restore"}))}while(32&c);else{const t=[];let r,u;for(r=0;r<o;r++)t.push(l(e,s)),s+=2;s+=2+l(e,s);const d=t.at(-1)+1,g=[];for(;g.length<d;){c=e[s++];let t=1;for(8&c&&(t+=e[s++]);t-- >0;)g.push({flags:c})}for(r=0;r<d;r++){switch(18&g[r].flags){case 0:f+=h(e,s),s+=2;break;case 2:f-=e[s++];break;case 18:f+=e[s++]}g[r].x=f}for(r=0;r<d;r++){switch(36&g[r].flags){case 0:p+=h(e,s),s+=2;break;case 4:p-=e[s++];break;case 36:p+=e[s++]}g[r].y=p}let m=0;for(s=0;s<o;s++){const e=t[s],o=g.slice(m,e+1);if(1&o[0].flags)o.push(o[0]);else if(1&o.at(-1).flags)o.unshift(o.at(-1));else{const e={flags:1,x:(o[0].x+o.at(-1).x)/2,y:(o[0].y+o.at(-1).y)/2};o.unshift(e),o.push(e)}for(a(o[0].x,o[0].y),r=1,u=o.length;r<u;r++)1&o[r].flags?n(o[r].x,o[r].y):1&o[r+1].flags?(i(o[r].x,o[r].y,o[r+1].x,o[r+1].y),r++):i(o[r].x,o[r].y,(o[r].x+o[r+1].x)/2,(o[r].y+o[r+1].y)/2);m=e+1}}}function y(e,t,r,n){function i(e,r){t.push({cmd:"moveTo",args:[e,r]})}function o(e,r){t.push({cmd:"lineTo",args:[e,r]})}function c(e,r,a,n,i,s){t.push({cmd:"bezierCurveTo",args:[e,r,a,n,i,s]})}const l=[];let h=0,u=0,d=0;!function e(p){let g=0;for(;g<p.length;){let b,v,w,A,S,x,k,C,_,T=!1,E=p[g++];switch(E){case 1:case 3:case 18:case 23:d+=l.length>>1,T=!0;break;case 4:u+=l.pop(),i(h,u),T=!0;break;case 5:for(;l.length>0;)h+=l.shift(),u+=l.shift(),o(h,u);break;case 6:for(;l.length>0&&(h+=l.shift(),o(h,u),0!==l.length);)u+=l.shift(),o(h,u);break;case 7:for(;l.length>0&&(u+=l.shift(),o(h,u),0!==l.length);)h+=l.shift(),o(h,u);break;case 8:for(;l.length>0;)b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+l.shift(),c(b,w,v,A,h,u);break;case 10:if(C=l.pop(),_=null,r.isCFFCIDFont){const e=r.fdSelect.getFDIndex(n);if(e>=0&&e<r.fdArray.length){const t=r.fdArray[e];let a;t.privateDict?.subrsIndex&&(a=t.privateDict.subrsIndex.objects),a&&(C+=f(a),_=a[C])}else(0,a.warn)("Invalid fd index for glyph index.")}else _=r.subrs[C+r.subrsBias];_&&e(_);break;case 11:return;case 12:switch(E=p[g++],E){case 34:b=h+l.shift(),v=b+l.shift(),S=u+l.shift(),h=v+l.shift(),c(b,u,v,S,h,S),b=h+l.shift(),v=b+l.shift(),h=v+l.shift(),c(b,S,v,u,h,u);break;case 35:b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+l.shift(),c(b,w,v,A,h,u),b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+l.shift(),c(b,w,v,A,h,u),l.pop();break;case 36:b=h+l.shift(),S=u+l.shift(),v=b+l.shift(),x=S+l.shift(),h=v+l.shift(),c(b,S,v,x,h,x),b=h+l.shift(),v=b+l.shift(),k=x+l.shift(),h=v+l.shift(),c(b,x,v,k,h,u);break;case 37:const e=h,t=u;b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+l.shift(),c(b,w,v,A,h,u),b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v,u=A,Math.abs(h-e)>Math.abs(u-t)?h+=l.shift():u+=l.shift(),c(b,w,v,A,h,u);break;default:throw new a.FormatError(`unknown operator: 12 ${E}`)}break;case 14:if(l.length>=4){const e=l.pop(),a=l.pop();u=l.pop(),h=l.pop(),t.push({cmd:"save"},{cmd:"translate",args:[h,u]});let n=m(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[e]]));y(r.glyphs[n.glyphId],t,r,n.glyphId),t.push({cmd:"restore"}),n=m(r.cmap,String.fromCharCode(r.glyphNameMap[s.StandardEncoding[a]])),y(r.glyphs[n.glyphId],t,r,n.glyphId)}return;case 19:case 20:d+=l.length>>1,g+=d+7>>3,T=!0;break;case 21:u+=l.pop(),h+=l.pop(),i(h,u),T=!0;break;case 22:h+=l.pop(),i(h,u),T=!0;break;case 24:for(;l.length>2;)b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+l.shift(),c(b,w,v,A,h,u);h+=l.shift(),u+=l.shift(),o(h,u);break;case 25:for(;l.length>6;)h+=l.shift(),u+=l.shift(),o(h,u);b=h+l.shift(),w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+l.shift(),c(b,w,v,A,h,u);break;case 26:for(l.length%2&&(h+=l.shift());l.length>0;)b=h,w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v,u=A+l.shift(),c(b,w,v,A,h,u);break;case 27:for(l.length%2&&(u+=l.shift());l.length>0;)b=h+l.shift(),w=u,v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A,c(b,w,v,A,h,u);break;case 28:l.push((p[g]<<24|p[g+1]<<16)>>16),g+=2;break;case 29:C=l.pop()+r.gsubrsBias,_=r.gsubrs[C],_&&e(_);break;case 30:for(;l.length>0&&(b=h,w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+(1===l.length?l.shift():0),c(b,w,v,A,h,u),0!==l.length);)b=h+l.shift(),w=u,v=b+l.shift(),A=w+l.shift(),u=A+l.shift(),h=v+(1===l.length?l.shift():0),c(b,w,v,A,h,u);break;case 31:for(;l.length>0&&(b=h+l.shift(),w=u,v=b+l.shift(),A=w+l.shift(),u=A+l.shift(),h=v+(1===l.length?l.shift():0),c(b,w,v,A,h,u),0!==l.length);)b=h,w=u+l.shift(),v=b+l.shift(),A=w+l.shift(),h=v+l.shift(),u=A+(1===l.length?l.shift():0),c(b,w,v,A,h,u);break;default:if(E<32)throw new a.FormatError(`unknown operator: ${E}`);E<247?l.push(E-139):E<251?l.push(256*(E-247)+p[g++]+108):E<255?l.push(256*-(E-251)-p[g++]-108):(l.push((p[g]<<24|p[g+1]<<16|p[g+2]<<8|p[g+3])/65536),g+=4)}T&&(l.length=0)}}(e)}const v=[];class w{constructor(e){this.constructor===w&&(0,a.unreachable)("Cannot initialize CompiledFont."),this.fontMatrix=e,this.compiledGlyphs=Object.create(null),this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(e){const{charCode:t,glyphId:r}=m(this.cmap,e);let a=this.compiledGlyphs[r];if(!a)try{a=this.compileGlyph(this.glyphs[r],r),this.compiledGlyphs[r]=a}catch(e){throw this.compiledGlyphs[r]=v,void 0===this.compiledCharCodeToGlyphId[t]&&(this.compiledCharCodeToGlyphId[t]=r),e}return void 0===this.compiledCharCodeToGlyphId[t]&&(this.compiledCharCodeToGlyphId[t]=r),a}compileGlyph(e,t){if(!e||0===e.length||14===e[0])return v;let r=this.fontMatrix;if(this.isCFFCIDFont){const e=this.fdSelect.getFDIndex(t);e>=0&&e<this.fdArray.length?r=this.fdArray[e].getByName("FontMatrix")||a.FONT_IDENTITY_MATRIX:(0,a.warn)("Invalid fd index for glyph index.")}const n=[{cmd:"save"},{cmd:"transform",args:r.slice()},{cmd:"scale",args:["size","-size"]}];return this.compileGlyphImpl(e,n,t),n.push({cmd:"restore"}),n}compileGlyphImpl(){(0,a.unreachable)("Children classes should implement this.")}hasBuiltPath(e){const{charCode:t,glyphId:r}=m(this.cmap,e);return void 0!==this.compiledGlyphs[r]&&void 0!==this.compiledCharCodeToGlyphId[t]}}class A extends w{constructor(e,t,r){super(r||[488e-6,0,0,488e-6,0,0]),this.glyphs=e,this.cmap=t}compileGlyphImpl(e,t){b(e,t,this)}}class S extends w{constructor(e,t,r,a){super(r||[.001,0,0,.001,0,0]),this.glyphs=e.glyphs,this.gsubrs=e.gsubrs||[],this.subrs=e.subrs||[],this.cmap=t,this.glyphNameMap=a||(0,i.getGlyphsUnicode)(),this.gsubrsBias=f(this.gsubrs),this.subrsBias=f(this.subrs),this.isCFFCIDFont=e.isCFFCIDFont,this.fdSelect=e.fdSelect,this.fdArray=e.fdArray}compileGlyphImpl(e,t,r){y(e,t,this,r)}}t.FontRendererFactory=class{static create(e,t){const r=new Uint8Array(e.data);let n,i,s,o,h,u;const d=l(r,4);for(let e=0,f=12;e<d;e++,f+=16){const e=(0,a.bytesToString)(r.subarray(f,f+4)),d=c(r,f+8),m=c(r,f+12);switch(e){case"cmap":n=p(r,d);break;case"glyf":i=r.subarray(d,d+m);break;case"loca":s=r.subarray(d,d+m);break;case"head":u=l(r,d+18),h=l(r,d+50);break;case"CFF ":o=g(r,d,d+m,t)}}if(i){const t=u?[1/u,0,0,1/u,0,0]:e.fontMatrix;return new A(function(e,t,r){let a,n;r?(a=4,n=c):(a=2,n=(e,t)=>2*l(e,t));const i=[];let s=n(t,0);for(let r=a;r<t.length;r+=a){const a=n(t,r);i.push(e.subarray(s,a)),s=a}return i}(i,s,h),n,t)}return new S(o,n,e.fontMatrix,e.glyphNameMap)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getMetrics=t.getFontBasicMetrics=void 0;var a=r(3);const n=(0,a.getLookupTableFactory)((function(e){e.Courier=600,e["Courier-Bold"]=600,e["Courier-BoldOblique"]=600,e["Courier-Oblique"]=600,e.Helvetica=(0,a.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Bold"]=(0,a.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-BoldOblique"]=(0,a.getLookupTableFactory)((function(e){e.space=278,e.exclam=333,e.quotedbl=474,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=722,e.quoteright=278,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=333,e.semicolon=333,e.less=584,e.equal=584,e.greater=584,e.question=611,e.at=975,e.A=722,e.B=722,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=556,e.K=722,e.L=611,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=584,e.underscore=556,e.quoteleft=278,e.a=556,e.b=611,e.c=556,e.d=611,e.e=556,e.f=333,e.g=611,e.h=611,e.i=278,e.j=278,e.k=556,e.l=278,e.m=889,e.n=611,e.o=611,e.p=611,e.q=611,e.r=389,e.s=556,e.t=333,e.u=611,e.v=556,e.w=778,e.x=556,e.y=556,e.z=500,e.braceleft=389,e.bar=280,e.braceright=389,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=238,e.quotedblleft=500,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=611,e.fl=611,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=556,e.bullet=350,e.quotesinglbase=278,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=611,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=278,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=611,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=722,e.aacute=556,e.Ucircumflex=722,e.yacute=556,e.scommaaccent=556,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=611,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=556,e.aring=556,e.Ncommaaccent=722,e.lacute=278,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=556,e.scedilla=556,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=611,e.acircumflex=556,e.Amacron=722,e.rcaron=389,e.ccedilla=556,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=743,e.Umacron=722,e.uring=611,e.threesuperior=333,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=584,e.uacute=611,e.Tcaron=611,e.partialdiff=494,e.ydieresis=556,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=556,e.nacute=611,e.umacron=611,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=280,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=611,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=389,e.eogonek=556,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=556,e.zacute=500,e.iogonek=278,e.Oacute=778,e.oacute=611,e.amacron=556,e.sacute=556,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=611,e.twosuperior=333,e.Odieresis=778,e.mu=611,e.igrave=278,e.ohungarumlaut=611,e.Eogonek=667,e.dcroat=611,e.threequarters=834,e.Scedilla=667,e.lcaron=400,e.Kcommaaccent=722,e.Lacute=611,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=611,e.onehalf=834,e.lessequal=549,e.ocircumflex=611,e.ntilde=611,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=611,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=611,e.Ccaron=722,e.ugrave=611,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=611,e.Rcommaaccent=722,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=556,e.minus=584,e.Icircumflex=278,e.ncaron=611,e.tcommaaccent=333,e.logicalnot=584,e.odieresis=611,e.udieresis=611,e.notequal=549,e.gcommaaccent=611,e.eth=611,e.zcaron=500,e.ncommaaccent=611,e.onesuperior=333,e.imacron=278,e.Euro=556})),e["Helvetica-Oblique"]=(0,a.getLookupTableFactory)((function(e){e.space=278,e.exclam=278,e.quotedbl=355,e.numbersign=556,e.dollar=556,e.percent=889,e.ampersand=667,e.quoteright=222,e.parenleft=333,e.parenright=333,e.asterisk=389,e.plus=584,e.comma=278,e.hyphen=333,e.period=278,e.slash=278,e.zero=556,e.one=556,e.two=556,e.three=556,e.four=556,e.five=556,e.six=556,e.seven=556,e.eight=556,e.nine=556,e.colon=278,e.semicolon=278,e.less=584,e.equal=584,e.greater=584,e.question=556,e.at=1015,e.A=667,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=722,e.I=278,e.J=500,e.K=667,e.L=556,e.M=833,e.N=722,e.O=778,e.P=667,e.Q=778,e.R=722,e.S=667,e.T=611,e.U=722,e.V=667,e.W=944,e.X=667,e.Y=667,e.Z=611,e.bracketleft=278,e.backslash=278,e.bracketright=278,e.asciicircum=469,e.underscore=556,e.quoteleft=222,e.a=556,e.b=556,e.c=500,e.d=556,e.e=556,e.f=278,e.g=556,e.h=556,e.i=222,e.j=222,e.k=500,e.l=222,e.m=833,e.n=556,e.o=556,e.p=556,e.q=556,e.r=333,e.s=500,e.t=278,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=500,e.braceleft=334,e.bar=260,e.braceright=334,e.asciitilde=584,e.exclamdown=333,e.cent=556,e.sterling=556,e.fraction=167,e.yen=556,e.florin=556,e.section=556,e.currency=556,e.quotesingle=191,e.quotedblleft=333,e.guillemotleft=556,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=556,e.dagger=556,e.daggerdbl=556,e.periodcentered=278,e.paragraph=537,e.bullet=350,e.quotesinglbase=222,e.quotedblbase=333,e.quotedblright=333,e.guillemotright=556,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=611,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=370,e.Lslash=556,e.Oslash=778,e.OE=1e3,e.ordmasculine=365,e.ae=889,e.dotlessi=278,e.lslash=222,e.oslash=611,e.oe=944,e.germandbls=611,e.Idieresis=278,e.eacute=556,e.abreve=556,e.uhungarumlaut=556,e.ecaron=556,e.Ydieresis=667,e.divide=584,e.Yacute=667,e.Acircumflex=667,e.aacute=556,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=500,e.ecircumflex=556,e.Uring=722,e.Udieresis=722,e.aogonek=556,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=737,e.Emacron=667,e.ccaron=500,e.aring=556,e.Ncommaaccent=722,e.lacute=222,e.agrave=556,e.Tcommaaccent=611,e.Cacute=722,e.atilde=556,e.Edotaccent=667,e.scaron=500,e.scedilla=500,e.iacute=278,e.lozenge=471,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=556,e.Amacron=667,e.rcaron=333,e.ccedilla=500,e.Zdotaccent=611,e.Thorn=667,e.Omacron=778,e.Racute=722,e.Sacute=667,e.dcaron=643,e.Umacron=722,e.uring=556,e.threesuperior=333,e.Ograve=778,e.Agrave=667,e.Abreve=667,e.multiply=584,e.uacute=556,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=556,e.edieresis=556,e.cacute=500,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=278,e.plusminus=584,e.brokenbar=260,e.registered=737,e.Gbreve=778,e.Idotaccent=278,e.summation=600,e.Egrave=667,e.racute=333,e.omacron=556,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=222,e.tcaron=317,e.eogonek=556,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=556,e.zacute=500,e.iogonek=222,e.Oacute=778,e.oacute=556,e.amacron=556,e.sacute=500,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=333,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=556,e.Eogonek=667,e.dcroat=556,e.threequarters=834,e.Scedilla=667,e.lcaron=299,e.Kcommaaccent=667,e.Lacute=556,e.trademark=1e3,e.edotaccent=556,e.Igrave=278,e.Imacron=278,e.Lcaron=556,e.onehalf=834,e.lessequal=549,e.ocircumflex=556,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=556,e.gbreve=556,e.onequarter=834,e.Scaron=667,e.Scommaaccent=667,e.Ohungarumlaut=778,e.degree=400,e.ograve=556,e.Ccaron=722,e.ugrave=556,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=556,e.Rcommaaccent=722,e.Lcommaaccent=556,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=778,e.zdotaccent=500,e.Ecaron=667,e.Iogonek=278,e.kcommaaccent=500,e.minus=584,e.Icircumflex=278,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=584,e.odieresis=556,e.udieresis=556,e.notequal=549,e.gcommaaccent=556,e.eth=556,e.zcaron=500,e.ncommaaccent=556,e.onesuperior=333,e.imacron=278,e.Euro=556})),e.Symbol=(0,a.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.universal=713,e.numbersign=500,e.existential=549,e.percent=833,e.ampersand=778,e.suchthat=439,e.parenleft=333,e.parenright=333,e.asteriskmath=500,e.plus=549,e.comma=250,e.minus=549,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=549,e.equal=549,e.greater=549,e.question=444,e.congruent=549,e.Alpha=722,e.Beta=667,e.Chi=722,e.Delta=612,e.Epsilon=611,e.Phi=763,e.Gamma=603,e.Eta=722,e.Iota=333,e.theta1=631,e.Kappa=722,e.Lambda=686,e.Mu=889,e.Nu=722,e.Omicron=722,e.Pi=768,e.Theta=741,e.Rho=556,e.Sigma=592,e.Tau=611,e.Upsilon=690,e.sigma1=439,e.Omega=768,e.Xi=645,e.Psi=795,e.Zeta=611,e.bracketleft=333,e.therefore=863,e.bracketright=333,e.perpendicular=658,e.underscore=500,e.radicalex=500,e.alpha=631,e.beta=549,e.chi=549,e.delta=494,e.epsilon=439,e.phi=521,e.gamma=411,e.eta=603,e.iota=329,e.phi1=603,e.kappa=549,e.lambda=549,e.mu=576,e.nu=521,e.omicron=549,e.pi=549,e.theta=521,e.rho=549,e.sigma=603,e.tau=439,e.upsilon=576,e.omega1=713,e.omega=686,e.xi=493,e.psi=686,e.zeta=494,e.braceleft=480,e.bar=200,e.braceright=480,e.similar=549,e.Euro=750,e.Upsilon1=620,e.minute=247,e.lessequal=549,e.fraction=167,e.infinity=713,e.florin=500,e.club=753,e.diamond=753,e.heart=753,e.spade=753,e.arrowboth=1042,e.arrowleft=987,e.arrowup=603,e.arrowright=987,e.arrowdown=603,e.degree=400,e.plusminus=549,e.second=411,e.greaterequal=549,e.multiply=549,e.proportional=713,e.partialdiff=494,e.bullet=460,e.divide=549,e.notequal=549,e.equivalence=549,e.approxequal=549,e.ellipsis=1e3,e.arrowvertex=603,e.arrowhorizex=1e3,e.carriagereturn=658,e.aleph=823,e.Ifraktur=686,e.Rfraktur=795,e.weierstrass=987,e.circlemultiply=768,e.circleplus=768,e.emptyset=823,e.intersection=768,e.union=768,e.propersuperset=713,e.reflexsuperset=713,e.notsubset=713,e.propersubset=713,e.reflexsubset=713,e.element=713,e.notelement=713,e.angle=768,e.gradient=713,e.registerserif=790,e.copyrightserif=790,e.trademarkserif=890,e.product=823,e.radical=549,e.dotmath=250,e.logicalnot=713,e.logicaland=603,e.logicalor=603,e.arrowdblboth=1042,e.arrowdblleft=987,e.arrowdblup=603,e.arrowdblright=987,e.arrowdbldown=603,e.lozenge=494,e.angleleft=329,e.registersans=790,e.copyrightsans=790,e.trademarksans=786,e.summation=713,e.parenlefttp=384,e.parenleftex=384,e.parenleftbt=384,e.bracketlefttp=384,e.bracketleftex=384,e.bracketleftbt=384,e.bracelefttp=494,e.braceleftmid=494,e.braceleftbt=494,e.braceex=494,e.angleright=329,e.integral=274,e.integraltp=686,e.integralex=686,e.integralbt=686,e.parenrighttp=384,e.parenrightex=384,e.parenrightbt=384,e.bracketrighttp=384,e.bracketrightex=384,e.bracketrightbt=384,e.bracerighttp=494,e.bracerightmid=494,e.bracerightbt=494,e.apple=790})),e["Times-Roman"]=(0,a.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=408,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=564,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=278,e.semicolon=278,e.less=564,e.equal=564,e.greater=564,e.question=444,e.at=921,e.A=722,e.B=667,e.C=667,e.D=722,e.E=611,e.F=556,e.G=722,e.H=722,e.I=333,e.J=389,e.K=722,e.L=611,e.M=889,e.N=722,e.O=722,e.P=556,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=722,e.W=944,e.X=722,e.Y=722,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=469,e.underscore=500,e.quoteleft=333,e.a=444,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=500,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=500,e.o=500,e.p=500,e.q=500,e.r=333,e.s=389,e.t=278,e.u=500,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=480,e.bar=200,e.braceright=480,e.asciitilde=541,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=180,e.quotedblleft=444,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=453,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=444,e.quotedblright=444,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=444,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=889,e.ordfeminine=276,e.Lslash=611,e.Oslash=722,e.OE=889,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=444,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=722,e.divide=564,e.Yacute=722,e.Acircumflex=722,e.aacute=444,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=444,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=444,e.Ncommaaccent=722,e.lacute=278,e.agrave=444,e.Tcommaaccent=611,e.Cacute=667,e.atilde=444,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=444,e.Amacron=722,e.rcaron=333,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=556,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=588,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=722,e.Abreve=722,e.multiply=564,e.uacute=500,e.Tcaron=611,e.partialdiff=476,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=444,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=722,e.Iacute=333,e.plusminus=564,e.brokenbar=200,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=333,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=326,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=444,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=344,e.Kcommaaccent=722,e.Lacute=611,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=333,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=722,e.zdotaccent=444,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=500,e.minus=564,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=564,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Bold"]=(0,a.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=1e3,e.ampersand=833,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=930,e.A=722,e.B=667,e.C=722,e.D=722,e.E=667,e.F=611,e.G=778,e.H=778,e.I=389,e.J=500,e.K=778,e.L=667,e.M=944,e.N=722,e.O=778,e.P=611,e.Q=778,e.R=722,e.S=556,e.T=667,e.U=722,e.V=722,e.W=1e3,e.X=722,e.Y=722,e.Z=667,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=581,e.underscore=500,e.quoteleft=333,e.a=500,e.b=556,e.c=444,e.d=556,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=333,e.k=556,e.l=278,e.m=833,e.n=556,e.o=500,e.p=556,e.q=556,e.r=444,e.s=389,e.t=333,e.u=556,e.v=500,e.w=722,e.x=500,e.y=500,e.z=444,e.braceleft=394,e.bar=220,e.braceright=394,e.asciitilde=520,e.exclamdown=333,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=540,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=1e3,e.ordfeminine=300,e.Lslash=667,e.Oslash=778,e.OE=1e3,e.ordmasculine=330,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=556,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=722,e.divide=570,e.Yacute=722,e.Acircumflex=722,e.aacute=500,e.Ucircumflex=722,e.yacute=500,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=667,e.Cacute=722,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=722,e.Gcommaaccent=778,e.ucircumflex=556,e.acircumflex=500,e.Amacron=722,e.rcaron=444,e.ccedilla=444,e.Zdotaccent=667,e.Thorn=611,e.Omacron=778,e.Racute=722,e.Sacute=556,e.dcaron=672,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=778,e.Agrave=722,e.Abreve=722,e.multiply=570,e.uacute=556,e.Tcaron=667,e.partialdiff=494,e.ydieresis=500,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=778,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=444,e.omacron=500,e.Zacute=667,e.Zcaron=667,e.greaterequal=549,e.Eth=722,e.Ccedilla=722,e.lcommaaccent=278,e.tcaron=416,e.eogonek=444,e.Uogonek=722,e.Aacute=722,e.Adieresis=722,e.egrave=444,e.zacute=444,e.iogonek=278,e.Oacute=778,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=778,e.Ugrave=722,e.Delta=612,e.thorn=556,e.twosuperior=300,e.Odieresis=778,e.mu=556,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=556,e.threequarters=750,e.Scedilla=556,e.lcaron=394,e.Kcommaaccent=778,e.Lacute=667,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=667,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=778,e.degree=400,e.ograve=500,e.Ccaron=722,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=444,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=722,e.Lcommaaccent=667,e.Atilde=722,e.Aogonek=722,e.Aring=722,e.Otilde=778,e.zdotaccent=444,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=556,e.minus=570,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=333,e.logicalnot=570,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=444,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-BoldItalic"]=(0,a.getLookupTableFactory)((function(e){e.space=250,e.exclam=389,e.quotedbl=555,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=570,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=570,e.equal=570,e.greater=570,e.question=500,e.at=832,e.A=667,e.B=667,e.C=667,e.D=722,e.E=667,e.F=667,e.G=722,e.H=778,e.I=389,e.J=500,e.K=667,e.L=611,e.M=889,e.N=722,e.O=722,e.P=611,e.Q=722,e.R=667,e.S=556,e.T=611,e.U=722,e.V=667,e.W=889,e.X=667,e.Y=611,e.Z=611,e.bracketleft=333,e.backslash=278,e.bracketright=333,e.asciicircum=570,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=333,e.g=500,e.h=556,e.i=278,e.j=278,e.k=500,e.l=278,e.m=778,e.n=556,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=556,e.v=444,e.w=667,e.x=500,e.y=444,e.z=389,e.braceleft=348,e.bar=220,e.braceright=348,e.asciitilde=570,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=278,e.quotedblleft=500,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=556,e.fl=556,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=500,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=500,e.quotedblright=500,e.guillemotright=500,e.ellipsis=1e3,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=1e3,e.AE=944,e.ordfeminine=266,e.Lslash=611,e.Oslash=722,e.OE=944,e.ordmasculine=300,e.ae=722,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=722,e.germandbls=500,e.Idieresis=389,e.eacute=444,e.abreve=500,e.uhungarumlaut=556,e.ecaron=444,e.Ydieresis=611,e.divide=570,e.Yacute=611,e.Acircumflex=667,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=556,e.Edieresis=667,e.Dcroat=722,e.commaaccent=250,e.copyright=747,e.Emacron=667,e.ccaron=444,e.aring=500,e.Ncommaaccent=722,e.lacute=278,e.agrave=500,e.Tcommaaccent=611,e.Cacute=667,e.atilde=500,e.Edotaccent=667,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=494,e.Rcaron=667,e.Gcommaaccent=722,e.ucircumflex=556,e.acircumflex=500,e.Amacron=667,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=611,e.Thorn=611,e.Omacron=722,e.Racute=667,e.Sacute=556,e.dcaron=608,e.Umacron=722,e.uring=556,e.threesuperior=300,e.Ograve=722,e.Agrave=667,e.Abreve=667,e.multiply=570,e.uacute=556,e.Tcaron=611,e.partialdiff=494,e.ydieresis=444,e.Nacute=722,e.icircumflex=278,e.Ecircumflex=667,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=556,e.umacron=556,e.Ncaron=722,e.Iacute=389,e.plusminus=570,e.brokenbar=220,e.registered=747,e.Gbreve=722,e.Idotaccent=389,e.summation=600,e.Egrave=667,e.racute=389,e.omacron=500,e.Zacute=611,e.Zcaron=611,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=366,e.eogonek=444,e.Uogonek=722,e.Aacute=667,e.Adieresis=667,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=576,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=667,e.dcroat=500,e.threequarters=750,e.Scedilla=556,e.lcaron=382,e.Kcommaaccent=667,e.Lacute=611,e.trademark=1e3,e.edotaccent=444,e.Igrave=389,e.Imacron=389,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=556,e.Uhungarumlaut=722,e.Eacute=667,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=556,e.Scommaaccent=556,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=556,e.radical=549,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=722,e.otilde=500,e.Rcommaaccent=667,e.Lcommaaccent=611,e.Atilde=667,e.Aogonek=667,e.Aring=667,e.Otilde=722,e.zdotaccent=389,e.Ecaron=667,e.Iogonek=389,e.kcommaaccent=500,e.minus=606,e.Icircumflex=389,e.ncaron=556,e.tcommaaccent=278,e.logicalnot=606,e.odieresis=500,e.udieresis=556,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=556,e.onesuperior=300,e.imacron=278,e.Euro=500})),e["Times-Italic"]=(0,a.getLookupTableFactory)((function(e){e.space=250,e.exclam=333,e.quotedbl=420,e.numbersign=500,e.dollar=500,e.percent=833,e.ampersand=778,e.quoteright=333,e.parenleft=333,e.parenright=333,e.asterisk=500,e.plus=675,e.comma=250,e.hyphen=333,e.period=250,e.slash=278,e.zero=500,e.one=500,e.two=500,e.three=500,e.four=500,e.five=500,e.six=500,e.seven=500,e.eight=500,e.nine=500,e.colon=333,e.semicolon=333,e.less=675,e.equal=675,e.greater=675,e.question=500,e.at=920,e.A=611,e.B=611,e.C=667,e.D=722,e.E=611,e.F=611,e.G=722,e.H=722,e.I=333,e.J=444,e.K=667,e.L=556,e.M=833,e.N=667,e.O=722,e.P=611,e.Q=722,e.R=611,e.S=500,e.T=556,e.U=722,e.V=611,e.W=833,e.X=611,e.Y=556,e.Z=556,e.bracketleft=389,e.backslash=278,e.bracketright=389,e.asciicircum=422,e.underscore=500,e.quoteleft=333,e.a=500,e.b=500,e.c=444,e.d=500,e.e=444,e.f=278,e.g=500,e.h=500,e.i=278,e.j=278,e.k=444,e.l=278,e.m=722,e.n=500,e.o=500,e.p=500,e.q=500,e.r=389,e.s=389,e.t=278,e.u=500,e.v=444,e.w=667,e.x=444,e.y=444,e.z=389,e.braceleft=400,e.bar=275,e.braceright=400,e.asciitilde=541,e.exclamdown=389,e.cent=500,e.sterling=500,e.fraction=167,e.yen=500,e.florin=500,e.section=500,e.currency=500,e.quotesingle=214,e.quotedblleft=556,e.guillemotleft=500,e.guilsinglleft=333,e.guilsinglright=333,e.fi=500,e.fl=500,e.endash=500,e.dagger=500,e.daggerdbl=500,e.periodcentered=250,e.paragraph=523,e.bullet=350,e.quotesinglbase=333,e.quotedblbase=556,e.quotedblright=556,e.guillemotright=500,e.ellipsis=889,e.perthousand=1e3,e.questiondown=500,e.grave=333,e.acute=333,e.circumflex=333,e.tilde=333,e.macron=333,e.breve=333,e.dotaccent=333,e.dieresis=333,e.ring=333,e.cedilla=333,e.hungarumlaut=333,e.ogonek=333,e.caron=333,e.emdash=889,e.AE=889,e.ordfeminine=276,e.Lslash=556,e.Oslash=722,e.OE=944,e.ordmasculine=310,e.ae=667,e.dotlessi=278,e.lslash=278,e.oslash=500,e.oe=667,e.germandbls=500,e.Idieresis=333,e.eacute=444,e.abreve=500,e.uhungarumlaut=500,e.ecaron=444,e.Ydieresis=556,e.divide=675,e.Yacute=556,e.Acircumflex=611,e.aacute=500,e.Ucircumflex=722,e.yacute=444,e.scommaaccent=389,e.ecircumflex=444,e.Uring=722,e.Udieresis=722,e.aogonek=500,e.Uacute=722,e.uogonek=500,e.Edieresis=611,e.Dcroat=722,e.commaaccent=250,e.copyright=760,e.Emacron=611,e.ccaron=444,e.aring=500,e.Ncommaaccent=667,e.lacute=278,e.agrave=500,e.Tcommaaccent=556,e.Cacute=667,e.atilde=500,e.Edotaccent=611,e.scaron=389,e.scedilla=389,e.iacute=278,e.lozenge=471,e.Rcaron=611,e.Gcommaaccent=722,e.ucircumflex=500,e.acircumflex=500,e.Amacron=611,e.rcaron=389,e.ccedilla=444,e.Zdotaccent=556,e.Thorn=611,e.Omacron=722,e.Racute=611,e.Sacute=500,e.dcaron=544,e.Umacron=722,e.uring=500,e.threesuperior=300,e.Ograve=722,e.Agrave=611,e.Abreve=611,e.multiply=675,e.uacute=500,e.Tcaron=556,e.partialdiff=476,e.ydieresis=444,e.Nacute=667,e.icircumflex=278,e.Ecircumflex=611,e.adieresis=500,e.edieresis=444,e.cacute=444,e.nacute=500,e.umacron=500,e.Ncaron=667,e.Iacute=333,e.plusminus=675,e.brokenbar=275,e.registered=760,e.Gbreve=722,e.Idotaccent=333,e.summation=600,e.Egrave=611,e.racute=389,e.omacron=500,e.Zacute=556,e.Zcaron=556,e.greaterequal=549,e.Eth=722,e.Ccedilla=667,e.lcommaaccent=278,e.tcaron=300,e.eogonek=444,e.Uogonek=722,e.Aacute=611,e.Adieresis=611,e.egrave=444,e.zacute=389,e.iogonek=278,e.Oacute=722,e.oacute=500,e.amacron=500,e.sacute=389,e.idieresis=278,e.Ocircumflex=722,e.Ugrave=722,e.Delta=612,e.thorn=500,e.twosuperior=300,e.Odieresis=722,e.mu=500,e.igrave=278,e.ohungarumlaut=500,e.Eogonek=611,e.dcroat=500,e.threequarters=750,e.Scedilla=500,e.lcaron=300,e.Kcommaaccent=667,e.Lacute=556,e.trademark=980,e.edotaccent=444,e.Igrave=333,e.Imacron=333,e.Lcaron=611,e.onehalf=750,e.lessequal=549,e.ocircumflex=500,e.ntilde=500,e.Uhungarumlaut=722,e.Eacute=611,e.emacron=444,e.gbreve=500,e.onequarter=750,e.Scaron=500,e.Scommaaccent=500,e.Ohungarumlaut=722,e.degree=400,e.ograve=500,e.Ccaron=667,e.ugrave=500,e.radical=453,e.Dcaron=722,e.rcommaaccent=389,e.Ntilde=667,e.otilde=500,e.Rcommaaccent=611,e.Lcommaaccent=556,e.Atilde=611,e.Aogonek=611,e.Aring=611,e.Otilde=722,e.zdotaccent=389,e.Ecaron=611,e.Iogonek=333,e.kcommaaccent=444,e.minus=675,e.Icircumflex=333,e.ncaron=500,e.tcommaaccent=278,e.logicalnot=675,e.odieresis=500,e.udieresis=500,e.notequal=549,e.gcommaaccent=500,e.eth=500,e.zcaron=389,e.ncommaaccent=500,e.onesuperior=300,e.imacron=278,e.Euro=500})),e.ZapfDingbats=(0,a.getLookupTableFactory)((function(e){e.space=278,e.a1=974,e.a2=961,e.a202=974,e.a3=980,e.a4=719,e.a5=789,e.a119=790,e.a118=791,e.a117=690,e.a11=960,e.a12=939,e.a13=549,e.a14=855,e.a15=911,e.a16=933,e.a105=911,e.a17=945,e.a18=974,e.a19=755,e.a20=846,e.a21=762,e.a22=761,e.a23=571,e.a24=677,e.a25=763,e.a26=760,e.a27=759,e.a28=754,e.a6=494,e.a7=552,e.a8=537,e.a9=577,e.a10=692,e.a29=786,e.a30=788,e.a31=788,e.a32=790,e.a33=793,e.a34=794,e.a35=816,e.a36=823,e.a37=789,e.a38=841,e.a39=823,e.a40=833,e.a41=816,e.a42=831,e.a43=923,e.a44=744,e.a45=723,e.a46=749,e.a47=790,e.a48=792,e.a49=695,e.a50=776,e.a51=768,e.a52=792,e.a53=759,e.a54=707,e.a55=708,e.a56=682,e.a57=701,e.a58=826,e.a59=815,e.a60=789,e.a61=789,e.a62=707,e.a63=687,e.a64=696,e.a65=689,e.a66=786,e.a67=787,e.a68=713,e.a69=791,e.a70=785,e.a71=791,e.a72=873,e.a73=761,e.a74=762,e.a203=762,e.a75=759,e.a204=759,e.a76=892,e.a77=892,e.a78=788,e.a79=784,e.a81=438,e.a82=138,e.a83=277,e.a84=415,e.a97=392,e.a98=392,e.a99=668,e.a100=668,e.a89=390,e.a90=390,e.a93=317,e.a94=317,e.a91=276,e.a92=276,e.a205=509,e.a85=509,e.a206=410,e.a86=410,e.a87=234,e.a88=234,e.a95=334,e.a96=334,e.a101=732,e.a102=544,e.a103=544,e.a104=910,e.a106=667,e.a107=760,e.a108=760,e.a112=776,e.a111=595,e.a110=694,e.a109=626,e.a120=788,e.a121=788,e.a122=788,e.a123=788,e.a124=788,e.a125=788,e.a126=788,e.a127=788,e.a128=788,e.a129=788,e.a130=788,e.a131=788,e.a132=788,e.a133=788,e.a134=788,e.a135=788,e.a136=788,e.a137=788,e.a138=788,e.a139=788,e.a140=788,e.a141=788,e.a142=788,e.a143=788,e.a144=788,e.a145=788,e.a146=788,e.a147=788,e.a148=788,e.a149=788,e.a150=788,e.a151=788,e.a152=788,e.a153=788,e.a154=788,e.a155=788,e.a156=788,e.a157=788,e.a158=788,e.a159=788,e.a160=894,e.a161=838,e.a163=1016,e.a164=458,e.a196=748,e.a165=924,e.a192=748,e.a166=918,e.a167=927,e.a168=928,e.a169=928,e.a170=834,e.a171=873,e.a172=828,e.a173=924,e.a162=924,e.a174=917,e.a175=930,e.a176=931,e.a177=463,e.a178=883,e.a179=836,e.a193=836,e.a180=867,e.a199=867,e.a181=696,e.a200=696,e.a182=874,e.a201=874,e.a183=760,e.a184=946,e.a197=771,e.a185=865,e.a194=771,e.a198=888,e.a186=967,e.a195=888,e.a187=831,e.a188=873,e.a189=927,e.a190=970,e.a191=918}))}));t.getMetrics=n;const i=(0,a.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}}));t.getFontBasicMetrics=i},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlyfTable=void 0,t.GlyfTable=class{constructor({glyfTable:e,isGlyphLocationsLong:t,locaTable:a,numGlyphs:n}){this.glyphs=[];const i=new DataView(a.buffer,a.byteOffset,a.byteLength),s=new DataView(e.buffer,e.byteOffset,e.byteLength),o=t?4:2;let c=t?i.getUint32(0):2*i.getUint16(0),l=0;for(let e=0;e<n;e++){l+=o;const e=t?i.getUint32(l):2*i.getUint16(l);if(e===c){this.glyphs.push(new r({}));continue}const a=r.parse(c,s);this.glyphs.push(a),c=e}}getSize(){return this.glyphs.reduce(((e,t)=>e+(t.getSize()+3&-4)),0)}write(){const e=this.getSize(),t=new DataView(new ArrayBuffer(e)),r=e>131070,a=r?4:2,n=new DataView(new ArrayBuffer((this.glyphs.length+1)*a));r?n.setUint32(0,0):n.setUint16(0,0);let i=0,s=0;for(const e of this.glyphs)i+=e.write(i,t),i=i+3&-4,s+=a,r?n.setUint32(s,i):n.setUint16(s,i>>1);return{isLocationLong:r,loca:new Uint8Array(n.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,r=this.glyphs.length;t<r;t++)this.glyphs[t].scale(e[t])}};class r{constructor({header:e=null,simple:t=null,composites:r=null}){this.header=e,this.simple=t,this.composites=r}static parse(e,t){const[n,o]=a.parse(e,t);if(e+=n,o.numberOfContours<0){const a=[];for(;;){const[r,n]=s.parse(e,t);if(e+=r,a.push(n),!(32&n.flags))break}return new r({header:o,composites:a})}const c=i.parse(e,t,o.numberOfContours);return new r({header:o,simple:c})}getSize(){if(!this.header)return 0;const e=this.simple?this.simple.getSize():this.composites.reduce(((e,t)=>e+t.getSize()),0);return this.header.getSize()+e}write(e,t){if(!this.header)return 0;const r=e;if(e+=this.header.write(e,t),this.simple)e+=this.simple.write(e,t);else for(const r of this.composites)e+=r.write(e,t);return e-r}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;if(this.header.scale(t,e),this.simple)this.simple.scale(t,e);else for(const r of this.composites)r.scale(t,e)}}class a{constructor({numberOfContours:e,xMin:t,yMin:r,xMax:a,yMax:n}){this.numberOfContours=e,this.xMin=t,this.yMin=r,this.xMax=a,this.yMax=n}static parse(e,t){return[10,new a({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){return t.setInt16(e,this.numberOfContours),t.setInt16(e+2,this.xMin),t.setInt16(e+4,this.yMin),t.setInt16(e+6,this.xMax),t.setInt16(e+8,this.yMax),10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t),this.xMax=Math.round(e+(this.xMax-e)*t)}}class n{constructor({flags:e,xCoordinates:t,yCoordinates:r}){this.xCoordinates=t,this.yCoordinates=r,this.flags=e}}class i{constructor({contours:e,instructions:t}){this.contours=e,this.instructions=t}static parse(e,t,r){const a=[];for(let n=0;n<r;n++){const r=t.getUint16(e);e+=2,a.push(r)}const s=a[r-1]+1,o=t.getUint16(e);e+=2;const c=new Uint8Array(t).slice(e,e+o);e+=o;const l=[];for(let r=0;r<s;e++,r++){let a=t.getUint8(e);if(l.push(a),8&a){const n=t.getUint8(++e);a^=8;for(let e=0;e<n;e++)l.push(a);r+=n}}const h=[];let u=[],d=[],f=[];const p=[];let g=0,m=0;for(let r=0;r<s;r++){const n=l[r];if(2&n){const r=t.getUint8(e++);m+=16&n?r:-r,u.push(m)}else 16&n||(m+=t.getInt16(e),e+=2),u.push(m);a[g]===r&&(g++,h.push(u),u=[])}m=0,g=0;for(let r=0;r<s;r++){const i=l[r];if(4&i){const r=t.getUint8(e++);m+=32&i?r:-r,d.push(m)}else 32&i||(m+=t.getInt16(e),e+=2),d.push(m);f.push(1&i|64&i),a[g]===r&&(u=h[g],g++,p.push(new n({flags:f,xCoordinates:u,yCoordinates:d})),d=[],f=[])}return new i({contours:p,instructions:c})}getSize(){let e=2*this.contours.length+2+this.instructions.length,t=0,r=0;for(const a of this.contours){e+=a.flags.length;for(let n=0,i=a.xCoordinates.length;n<i;n++){const i=a.xCoordinates[n],s=a.yCoordinates[n];let o=Math.abs(i-t);o>255?e+=2:o>0&&(e+=1),t=i,o=Math.abs(s-r),o>255?e+=2:o>0&&(e+=1),r=s}}return e}write(e,t){const r=e,a=[],n=[],i=[];let s=0,o=0;for(const r of this.contours){for(let e=0,t=r.xCoordinates.length;e<t;e++){let t=r.flags[e];const c=r.xCoordinates[e];let l=c-s;if(0===l)t|=16,a.push(0);else{const e=Math.abs(l);e<=255?(t|=l>=0?18:2,a.push(e)):a.push(l)}s=c;const h=r.yCoordinates[e];if(l=h-o,0===l)t|=32,n.push(0);else{const e=Math.abs(l);e<=255?(t|=l>=0?36:4,n.push(e)):n.push(l)}o=h,i.push(t)}t.setUint16(e,a.length-1),e+=2}t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length);for(const r of i)t.setUint8(e++,r);for(let r=0,n=a.length;r<n;r++){const n=a[r],s=i[r];2&s?t.setUint8(e++,n):16&s||(t.setInt16(e,n),e+=2)}for(let r=0,a=n.length;r<a;r++){const a=n[r],s=i[r];4&s?t.setUint8(e++,a):32&s||(t.setInt16(e,a),e+=2)}return e-r}scale(e,t){for(const r of this.contours)if(0!==r.xCoordinates.length)for(let a=0,n=r.xCoordinates.length;a<n;a++)r.xCoordinates[a]=Math.round(e+(r.xCoordinates[a]-e)*t)}}class s{constructor({flags:e,glyphIndex:t,argument1:r,argument2:a,transf:n,instructions:i}){this.flags=e,this.glyphIndex=t,this.argument1=r,this.argument2=a,this.transf=n,this.instructions=i}static parse(e,t){const r=e,a=[];let n=t.getUint16(e);const i=t.getUint16(e+2);let o,c;e+=4,1&n?(2&n?(o=t.getInt16(e),c=t.getInt16(e+2)):(o=t.getUint16(e),c=t.getUint16(e+2)),e+=4,n^=1):(2&n?(o=t.getInt8(e),c=t.getInt8(e+1)):(o=t.getUint8(e),c=t.getUint8(e+1)),e+=2),8&n?(a.push(t.getUint16(e)),e+=2):64&n?(a.push(t.getUint16(e),t.getUint16(e+2)),e+=4):128&n&&(a.push(t.getUint16(e),t.getUint16(e+2),t.getUint16(e+4),t.getUint16(e+6)),e+=8);let l=null;if(256&n){const r=t.getUint16(e);e+=2,l=new Uint8Array(t).slice(e,e+r),e+=r}return[e-r,new s({flags:n,glyphIndex:i,argument1:o,argument2:c,transf:a,instructions:l})]}getSize(){let e=4+2*this.transf.length;return 256&this.flags&&(e+=2+this.instructions.length),e+=2,2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2),e}write(e,t){const r=e;return 2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1),t.setUint16(e,this.flags),t.setUint16(e+2,this.glyphIndex),e+=4,1&this.flags?(2&this.flags?(t.setInt16(e,this.argument1),t.setInt16(e+2,this.argument2)):(t.setUint16(e,this.argument1),t.setUint16(e+2,this.argument2)),e+=4):(t.setUint8(e,this.argument1),t.setUint8(e+1,this.argument2),e+=2),256&this.flags&&(t.setUint16(e,this.instructions.length),e+=2,this.instructions.length&&(new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e),e+=this.instructions.length)),e-r}scale(e,t){}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OpenTypeFileBuilder=void 0;var a=r(3),n=r(2);function i(e,t,r){e[t]=r>>8&255,e[t+1]=255&r}function s(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function o(e,t,r){if(r instanceof Uint8Array)e.set(r,t);else if("string"==typeof r)for(let a=0,n=r.length;a<n;a++)e[t++]=255&r.charCodeAt(a);else for(const a of r)e[t++]=255&a}class c{constructor(e){this.sfnt=e,this.tables=Object.create(null)}static getSearchParams(e,t){let r=1,a=0;for(;(r^e)>r;)r<<=1,a++;const n=r*t;return{range:n,entry:a,rangeShift:t*e-n}}toArray(){let e=this.sfnt;const t=this.tables,r=Object.keys(t);r.sort();const l=r.length;let h,u,d,f,p,g=12+16*l;const m=[g];for(h=0;h<l;h++)f=t[r[h]],g+=(f.length+3&-4)>>>0,m.push(g);const b=new Uint8Array(g);for(h=0;h<l;h++)f=t[r[h]],o(b,m[h],f);"true"===e&&(e=(0,n.string32)(65536)),b[0]=255&e.charCodeAt(0),b[1]=255&e.charCodeAt(1),b[2]=255&e.charCodeAt(2),b[3]=255&e.charCodeAt(3),i(b,4,l);const y=c.getSearchParams(l,16);for(i(b,6,y.range),i(b,8,y.entry),i(b,10,y.rangeShift),g=12,h=0;h<l;h++){p=r[h],b[g]=255&p.charCodeAt(0),b[g+1]=255&p.charCodeAt(1),b[g+2]=255&p.charCodeAt(2),b[g+3]=255&p.charCodeAt(3);let e=0;for(u=m[h],d=m[h+1];u<d;u+=4)e=e+(0,a.readUint32)(b,u)>>>0;s(b,g+4,e),s(b,g+8,m[h]),s(b,g+12,t[p].length),g+=16}return b}addTable(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}t.OpenTypeFileBuilder=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Type1Font=void 0;var a=r(35),n=r(2),i=r(38),s=r(3),o=r(8),c=r(49);function l(e,t,r){const a=e.length,n=t.length,i=a-n;let o=r,c=!1;for(;o<i;){let r=0;for(;r<n&&e[o+r]===t[r];)r++;if(r>=n){for(o+=r;o<a&&(0,s.isWhiteSpace)(e[o]);)o++;c=!0;break}o++}return{found:c,length:o}}t.Type1Font=class{constructor(e,t,r){let a=r.length1,s=r.length2,h=t.peekBytes(6);const u=128===h[0]&&1===h[1];u&&(t.skip(6),a=h[5]<<24|h[4]<<16|h[3]<<8|h[2]);const d=function(e,t){const r=[101,101,120,101,99],a=e.pos;let i,s,c,h;try{i=e.getBytes(t),s=i.length}catch{}if(s===t&&(c=l(i,r,t-2*r.length),c.found&&c.length===t))return{stream:new o.Stream(i),length:t};for((0,n.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'),e.pos=a;c=l(e.peekBytes(2048),r,0),0!==c.length;)if(e.pos+=c.length,c.found){h=e.pos-a;break}return e.pos=a,h?{stream:new o.Stream(e.getBytes(h)),length:h}:((0,n.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'),{stream:new o.Stream(e.getBytes(t)),length:t})}(t,a);new c.Type1Parser(d.stream,!1,i.SEAC_ANALYSIS_ENABLED).extractFontHeader(r),u&&(h=t.getBytes(6),s=h[5]<<24|h[4]<<16|h[3]<<8|h[2]);const f=function(e){const t=e.getBytes();if(0===t.length)throw new n.FormatError("getEexecBlock - no font program found.");return{stream:new o.Stream(t),length:t.length}}(t),p=new c.Type1Parser(f.stream,!0,i.SEAC_ANALYSIS_ENABLED).extractFontProgram(r);for(const e in p.properties)r[e]=p.properties[e];const g=p.charstrings,m=this.getType2Charstrings(g),b=this.getType2Subrs(p.subrs);this.charstrings=g,this.data=this.wrap(e,m,this.charstrings,b,r),this.seacs=this.getSeacs(p.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const e=[".notdef"];for(const{glyphName:t}of this.charstrings)e.push(t);return e}getGlyphMapping(e){const t=this.charstrings;if(e.composite){const r=Object.create(null);for(let a=0,n=t.length;a<n;a++)r[e.cMap.charCodeOf(a)]=a+1;return r}const r=[".notdef"];let a,n;for(n=0;n<t.length;n++)r.push(t[n].glyphName);const s=e.builtInEncoding;if(s){a=Object.create(null);for(const e in s)n=r.indexOf(s[e]),n>=0&&(a[e]=n)}return(0,i.type1FontGlyphMapping)(e,a,r)}hasGlyphId(e){return!(e<0||e>=this.numGlyphs)&&(0===e||this.charstrings[e-1].charstring.length>0)}getSeacs(e){const t=[];for(let r=0,a=e.length;r<a;r++){const a=e[r];a.seac&&(t[r+1]=a.seac)}return t}getType2Charstrings(e){const t=[];for(const r of e)t.push(r.charstring);return t}getType2Subrs(e){let t=0;const r=e.length;t=r<1133?107:r<33769?1131:32768;const a=[];let n;for(n=0;n<t;n++)a.push([11]);for(n=0;n<r;n++)a.push(e[n]);return a}wrap(e,t,r,n,i){const s=new a.CFF;s.header=new a.CFFHeader(1,0,4,4),s.names=[e];const o=new a.CFFTopDict;o.setByName("version",391),o.setByName("Notice",392),o.setByName("FullName",393),o.setByName("FamilyName",394),o.setByName("Weight",395),o.setByName("Encoding",null),o.setByName("FontMatrix",i.fontMatrix),o.setByName("FontBBox",i.bbox),o.setByName("charset",null),o.setByName("CharStrings",null),o.setByName("Private",null),s.topDict=o;const c=new a.CFFStrings;c.add("Version 0.11"),c.add("See original notice"),c.add(e),c.add(e),c.add("Medium"),s.strings=c,s.globalSubrIndex=new a.CFFIndex;const l=t.length,h=[".notdef"];let u,d;for(u=0;u<l;u++){const e=r[u].glyphName;-1===a.CFFStandardStrings.indexOf(e)&&c.add(e),h.push(e)}s.charset=new a.CFFCharset(!1,0,h);const f=new a.CFFIndex;for(f.add([139,14]),u=0;u<l;u++)f.add(t[u]);s.charStrings=f;const p=new a.CFFPrivateDict;p.setByName("Subrs",null);const g=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(u=0,d=g.length;u<d;u++){const e=g[u];if(!(e in i.privateData))continue;const t=i.privateData[e];if(Array.isArray(t))for(let e=t.length-1;e>0;e--)t[e]-=t[e-1];p.setByName(e,t)}s.topDict.privateDict=p;const m=new a.CFFIndex;for(u=0,d=n.length;u<d;u++)m.add(n[u]);return p.subrsIndex=m,new a.CFFCompiler(s).compile()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Type1Parser=void 0;var a=r(37),n=r(3),i=r(8),s=r(2);const o=[4],c=[5],l=[6],h=[7],u=[8],d=[12,35],f=[14],p=[21],g=[22],m=[30],b=[31];class y{constructor(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}convert(e,t,r){const a=e.length;let n,i,y,v=!1;for(let w=0;w<a;w++){let a=e[w];if(a<32){switch(12===a&&(a=(a<<8)+e[++w]),a){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){v=!0;break}const e=this.stack.pop();this.stack.push(0,e);break}v=this.executeCommand(1,o);break;case 5:v=this.executeCommand(2,c);break;case 6:v=this.executeCommand(1,l);break;case 7:v=this.executeCommand(1,h);break;case 8:v=this.executeCommand(6,u);break;case 10:if(this.stack.length<1){v=!0;break}if(y=this.stack.pop(),!t[y]){v=!0;break}v=this.convert(t[y],t,r);break;case 11:return v;case 13:if(this.stack.length<2){v=!0;break}n=this.stack.pop(),i=this.stack.pop(),this.lsb=i,this.width=n,this.stack.push(n,i),v=this.executeCommand(2,g);break;case 14:this.output.push(f[0]);break;case 21:if(this.flexing)break;v=this.executeCommand(2,p);break;case 22:if(this.flexing){this.stack.push(0);break}v=this.executeCommand(1,g);break;case 30:v=this.executeCommand(4,m);break;case 31:v=this.executeCommand(4,b);break;case 3078:if(r){const e=this.stack.at(-5);this.seac=this.stack.splice(-4,4),this.seac[0]+=this.lsb-e,v=this.executeCommand(0,f)}else v=this.executeCommand(4,f);break;case 3079:if(this.stack.length<4){v=!0;break}this.stack.pop(),n=this.stack.pop();const e=this.stack.pop();i=this.stack.pop(),this.lsb=i,this.width=n,this.stack.push(n,i,e),v=this.executeCommand(3,p);break;case 3084:if(this.stack.length<2){v=!0;break}const w=this.stack.pop(),A=this.stack.pop();this.stack.push(A/w);break;case 3088:if(this.stack.length<2){v=!0;break}y=this.stack.pop();const S=this.stack.pop();if(0===y&&3===S){const e=this.stack.splice(-17,17);this.stack.push(e[2]+e[0],e[3]+e[1],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14]),v=this.executeCommand(13,d,!0),this.flexing=!1,this.stack.push(e[15],e[16])}else 1===y&&0===S&&(this.flexing=!0);break;case 3089:break;default:(0,s.warn)('Unknown type 1 charstring command of "'+a+'"')}if(v)break}else a<=246?a-=139:a=a<=250?256*(a-247)+e[++w]+108:a<=254?-256*(a-251)-e[++w]-108:(255&e[++w])<<24|(255&e[++w])<<16|(255&e[++w])<<8|255&e[++w],this.stack.push(a)}return v}executeCommand(e,t,r){const a=this.stack.length;if(e>a)return!0;const n=a-e;for(let e=n;e<a;e++){let t=this.stack[e];Number.isInteger(t)?this.output.push(28,t>>8&255,255&t):(t=65536*t|0,this.output.push(255,t>>24&255,t>>16&255,t>>8&255,255&t))}return this.output.push(...t),r?this.stack.splice(n,e):this.stack.length=0,!1}}function v(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function w(e,t,r){if(r>=e.length)return new Uint8Array(0);let a,n,i=0|t;for(a=0;a<r;a++)i=52845*(e[a]+i)+22719&65535;const s=e.length-r,o=new Uint8Array(s);for(a=r,n=0;n<s;a++,n++){const t=e[a];o[n]=t^i>>8,i=52845*(t+i)+22719&65535}return o}function A(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}t.Type1Parser=class{constructor(e,t,r){if(t){const t=e.getBytes(),r=!((v(t[0])||(0,n.isWhiteSpace)(t[0]))&&v(t[1])&&v(t[2])&&v(t[3])&&v(t[4])&&v(t[5])&&v(t[6])&&v(t[7]));e=new i.Stream(r?w(t,55665,4):function(e,t,r){let a=0|t;const n=e.length,i=new Uint8Array(n>>>1);let s,o;for(s=0,o=0;s<n;s++){const t=e[s];if(!v(t))continue;let r;for(s++;s<n&&!v(r=e[s]);)s++;if(s<n){const e=parseInt(String.fromCharCode(t,r),16);i[o++]=e^a>>8,a=52845*(e+a)+22719&65535}}return i.slice(r,o)}(t,55665,4))}this.seacAnalysisEnabled=!!r,this.stream=e,this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}readInt(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){return this.stream.skip(-2),this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,n.isWhiteSpace)(t))break;t=this.nextChar()}if(A(t))return this.nextChar(),String.fromCharCode(t);let r="";do{r+=String.fromCharCode(t),t=this.nextChar()}while(t>=0&&!(0,n.isWhiteSpace)(t)&&!A(t));return r}readCharStrings(e,t){return-1===t?e:w(e,4330,t)}extractFontProgram(e){const t=this.stream,r=[],a=[],n=Object.create(null);n.lenIV=4;const i={subrs:[],charstrings:[],properties:{privateData:n}};let s,o,c,l;for(;null!==(s=this.getToken());)if("/"===s)switch(s=this.getToken(),s){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();s=this.getToken(),null!==s&&"end"!==s;){if("/"!==s)continue;const e=this.getToken();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=i.properties.privateData.lenIV;const r=this.readCharStrings(c,l);this.nextChar(),s=this.getToken(),"noaccess"===s?this.getToken():"/"===s&&this.prevChar(),a.push({glyph:e,encoded:r})}break;case"Subrs":for(this.readInt(),this.getToken();"dup"===this.getToken();){const e=this.readInt();o=this.readInt(),this.getToken(),c=o>0?t.getBytes(o):new Uint8Array(0),l=i.properties.privateData.lenIV;const a=this.readCharStrings(c,l);this.nextChar(),s=this.getToken(),"noaccess"===s&&this.getToken(),r[e]=a}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const e=this.readNumberArray();e.length>0&&e.length;break;case"StemSnapH":case"StemSnapV":i.properties.privateData[s]=this.readNumberArray();break;case"StdHW":case"StdVW":i.properties.privateData[s]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":i.properties.privateData[s]=this.readNumber();break;case"ExpansionFactor":i.properties.privateData[s]=this.readNumber()||.06;break;case"ForceBold":i.properties.privateData[s]=this.readBoolean()}for(const{encoded:t,glyph:n}of a){const a=new y,s=a.convert(t,r,this.seacAnalysisEnabled);let o=a.output;s&&(o=[14]);const c={glyphName:n,charstring:o,width:a.width,lsb:a.lsb,seac:a.seac};if(".notdef"===n?i.charstrings.unshift(c):i.charstrings.push(c),e.builtInEncoding){const t=e.builtInEncoding.indexOf(n);t>-1&&void 0===e.widths[t]&&t>=e.firstChar&&t<=e.lastChar&&(e.widths[t]=a.width)}}return i}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t)switch(t=this.getToken(),t){case"FontMatrix":const r=this.readNumberArray();e.fontMatrix=r;break;case"Encoding":const n=this.getToken();let i;if(/^\d+$/.test(n)){i=[];const e=0|parseInt(n,10);this.getToken();for(let r=0;r<e;r++){for(t=this.getToken();"dup"!==t&&"def"!==t;)if(t=this.getToken(),null===t)return;if("def"===t)break;const e=this.readInt();this.getToken();const r=this.getToken();i[e]=r,this.getToken()}}else i=(0,a.getEncoding)(n);e.builtInEncoding=i;break;case"FontBBox":const s=this.readNumberArray();e.ascent=Math.max(s[3],s[1]),e.descent=Math.min(s[1],s[3]),e.ascentScaled=!0}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Pattern=void 0,t.clearPatternCaches=function(){m=Object.create(null)},t.getTilingPatternIR=function(e,t,r){const n=t.getArray("Matrix"),i=a.Util.normalizeRect(t.getArray("BBox")),s=t.get("XStep"),o=t.get("YStep"),c=t.get("PaintType"),l=t.get("TilingType");if(i[2]-i[0]==0||i[3]-i[1]==0)throw new a.FormatError(`Invalid getTilingPatternIR /BBox array: [${i}].`);return["TilingPattern",r,e,n,i,s,o,c,l]};var a=r(2),n=r(5),i=r(12),s=r(3);const o=2,c=3,l=4,h=5,u=6,d=7;t.Pattern=class{constructor(){(0,a.unreachable)("Cannot initialize Pattern.")}static parseShading(e,t,r,i,f){const g=e instanceof n.BaseStream?e.dict:e,m=g.get("ShadingType");try{switch(m){case o:case c:return new p(g,t,r,i,f);case l:case h:case u:case d:return new y(e,t,r,i,f);default:throw new a.FormatError("Unsupported ShadingType: "+m)}}catch(e){if(e instanceof s.MissingDataException)throw e;return(0,a.warn)(e),new v}}};class f{static SMALL_NUMBER=1e-6;constructor(){this.constructor===f&&(0,a.unreachable)("Cannot initialize BaseShading.")}getIR(){(0,a.unreachable)("Abstract method `getIR` called.")}}class p extends f{constructor(e,t,r,n,s){super(),this.coordsArr=e.getArray("Coords"),this.shadingType=e.get("ShadingType");const o=i.ColorSpace.parse({cs:e.getRaw("CS")||e.getRaw("ColorSpace"),xref:t,resources:r,pdfFunctionFactory:n,localColorSpaceCache:s}),l=e.getArray("BBox");this.bbox=Array.isArray(l)&&4===l.length?a.Util.normalizeRect(l):null;let h=0,u=1;if(e.has("Domain")){const t=e.getArray("Domain");h=t[0],u=t[1]}let d=!1,p=!1;if(e.has("Extend")){const t=e.getArray("Extend");d=t[0],p=t[1]}if(!(this.shadingType!==c||d&&p)){const[e,t,r,n,i,s]=this.coordsArr,o=Math.hypot(e-n,t-i);r<=s+o&&s<=r+o&&(0,a.warn)("Unsupported radial gradient.")}this.extendStart=d,this.extendEnd=p;const g=e.getRaw("Function"),m=n.createFromArray(g),b=(u-h)/840,y=this.colorStops=[];if(h>=u||b<=0)return void(0,a.info)("Bad shading domain.");const v=new Float32Array(o.numComps),w=new Float32Array(1);let A,S=0;w[0]=h,m(w,0,v,0);let x=o.getRgb(v,0);const k=a.Util.makeHexColor(x[0],x[1],x[2]);y.push([0,k]);let C=1;w[0]=h+b,m(w,0,v,0);let _=o.getRgb(v,0),T=_[0]-x[0]+1,E=_[1]-x[1]+1,O=_[2]-x[2]+1,F=_[0]-x[0]-1,P=_[1]-x[1]-1,I=_[2]-x[2]-1;for(let e=2;e<840;e++){w[0]=h+e*b,m(w,0,v,0),A=o.getRgb(v,0);const t=e-S;if(T=Math.min(T,(A[0]-x[0]+1)/t),E=Math.min(E,(A[1]-x[1]+1)/t),O=Math.min(O,(A[2]-x[2]+1)/t),F=Math.max(F,(A[0]-x[0]-1)/t),P=Math.max(P,(A[1]-x[1]-1)/t),I=Math.max(I,(A[2]-x[2]-1)/t),!(F<=T&&P<=E&&I<=O)){const e=a.Util.makeHexColor(_[0],_[1],_[2]);y.push([C/840,e]),T=A[0]-_[0]+1,E=A[1]-_[1]+1,O=A[2]-_[2]+1,F=A[0]-_[0]-1,P=A[1]-_[1]-1,I=A[2]-_[2]-1,S=C,x=_}C=e,_=A}const M=a.Util.makeHexColor(_[0],_[1],_[2]);y.push([1,M]);let R="transparent";e.has("Background")&&(A=o.getRgb(e.get("Background"),0),R=a.Util.makeHexColor(A[0],A[1],A[2])),d||(y.unshift([0,R]),y[1][0]+=f.SMALL_NUMBER),p||(y.at(-1)[0]-=f.SMALL_NUMBER,y.push([1,R])),this.colorStops=y}getIR(){const e=this.coordsArr,t=this.shadingType;let r,n,i,s,l;return t===o?(n=[e[0],e[1]],i=[e[2],e[3]],s=null,l=null,r="axial"):t===c?(n=[e[0],e[1]],i=[e[3],e[4]],s=e[2],l=e[5],r="radial"):(0,a.unreachable)(`getPattern type unknown: ${t}`),["RadialAxial",r,this.bbox,this.colorStops,n,i,s,l]}}class g{constructor(e,t){this.stream=e,this.context=t,this.buffer=0,this.bufferLength=0;const r=t.numComps;this.tmpCompsBuf=new Float32Array(r);const a=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(a):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const e=this.stream.getByte();return!(e<0||(this.buffer=e,this.bufferLength=8,0))}readBits(e){let t=this.buffer,r=this.bufferLength;if(32===e){if(0===r)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;t=t<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();const e=this.stream.getByte();return this.buffer=e&(1<<r)-1,(t<<8-r|(255&e)>>r)>>>0}if(8===e&&0===r)return this.stream.getByte();for(;r<e;)t=t<<8|this.stream.getByte(),r+=8;return r-=e,this.bufferLength=r,this.buffer=t&(1<<r)-1,t>>r}align(){this.buffer=0,this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const e=this.context.bitsPerCoordinate,t=this.readBits(e),r=this.readBits(e),a=this.context.decode,n=e<32?1/((1<<e)-1):2.3283064365386963e-10;return[t*n*(a[1]-a[0])+a[0],r*n*(a[3]-a[2])+a[2]]}readComponents(){const e=this.context.numComps,t=this.context.bitsPerComponent,r=t<32?1/((1<<t)-1):2.3283064365386963e-10,a=this.context.decode,n=this.tmpCompsBuf;for(let i=0,s=4;i<e;i++,s+=2){const e=this.readBits(t);n[i]=e*r*(a[s+1]-a[s])+a[s]}const i=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(n,0,i,0),this.context.colorSpace.getRgb(i,0)}}let m=Object.create(null);function b(e){return m[e]||=function(e){const t=[];for(let r=0;r<=e;r++){const a=r/e,n=1-a;t.push(new Float32Array([n**3,3*a*n**2,3*a**2*n,a**3]))}return t}(e)}class y extends f{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(e,t,r,s,o){if(super(),!(e instanceof n.BaseStream))throw new a.FormatError("Mesh data is not a stream");const c=e.dict;this.shadingType=c.get("ShadingType");const f=c.getArray("BBox");this.bbox=Array.isArray(f)&&4===f.length?a.Util.normalizeRect(f):null;const p=i.ColorSpace.parse({cs:c.getRaw("CS")||c.getRaw("ColorSpace"),xref:t,resources:r,pdfFunctionFactory:s,localColorSpaceCache:o});this.background=c.has("Background")?p.getRgb(c.get("Background"),0):null;const m=c.getRaw("Function"),b=m?s.createFromArray(m):null;this.coords=[],this.colors=[],this.figures=[];const y={bitsPerCoordinate:c.get("BitsPerCoordinate"),bitsPerComponent:c.get("BitsPerComponent"),bitsPerFlag:c.get("BitsPerFlag"),decode:c.getArray("Decode"),colorFn:b,colorSpace:p,numComps:b?1:p.numComps},v=new g(e,y);let w=!1;switch(this.shadingType){case l:this._decodeType4Shading(v);break;case h:const e=0|c.get("VerticesPerRow");if(e<2)throw new a.FormatError("Invalid VerticesPerRow");this._decodeType5Shading(v,e);break;case u:this._decodeType6Shading(v),w=!0;break;case d:this._decodeType7Shading(v),w=!0;break;default:(0,a.unreachable)("Unsupported mesh type.")}if(w){this._updateBounds();for(let e=0,t=this.figures.length;e<t;e++)this._buildFigureFromPatch(e)}this._updateBounds(),this._packData()}_decodeType4Shading(e){const t=this.coords,r=this.colors,n=[],i=[];let s=0;for(;e.hasData;){const o=e.readFlag(),c=e.readCoordinate(),l=e.readComponents();if(0===s){if(!(0<=o&&o<=2))throw new a.FormatError("Unknown type4 flag");switch(o){case 0:s=3;break;case 1:i.push(i.at(-2),i.at(-1)),s=1;break;case 2:i.push(i.at(-3),i.at(-1)),s=1}n.push(o)}i.push(t.length),t.push(c),r.push(l),s--,e.align()}this.figures.push({type:"triangles",coords:new Int32Array(i),colors:new Int32Array(i)})}_decodeType5Shading(e,t){const r=this.coords,a=this.colors,n=[];for(;e.hasData;){const t=e.readCoordinate(),i=e.readComponents();n.push(r.length),r.push(t),a.push(i)}this.figures.push({type:"lattice",coords:new Int32Array(n),colors:new Int32Array(n),verticesPerRow:t})}_decodeType6Shading(e){const t=this.coords,r=this.colors,n=new Int32Array(16),i=new Int32Array(4);for(;e.hasData;){const s=e.readFlag();if(!(0<=s&&s<=3))throw new a.FormatError("Unknown type6 flag");const o=t.length;for(let r=0,a=0!==s?8:12;r<a;r++)t.push(e.readCoordinate());const c=r.length;for(let t=0,a=0!==s?2:4;t<a;t++)r.push(e.readComponents());let l,h,u,d;switch(s){case 0:n[12]=o+3,n[13]=o+4,n[14]=o+5,n[15]=o+6,n[8]=o+2,n[11]=o+7,n[4]=o+1,n[7]=o+8,n[0]=o,n[1]=o+11,n[2]=o+10,n[3]=o+9,i[2]=c+1,i[3]=c+2,i[0]=c,i[1]=c+3;break;case 1:l=n[12],h=n[13],u=n[14],d=n[15],n[12]=d,n[13]=o+0,n[14]=o+1,n[15]=o+2,n[8]=u,n[11]=o+3,n[4]=h,n[7]=o+4,n[0]=l,n[1]=o+7,n[2]=o+6,n[3]=o+5,l=i[2],h=i[3],i[2]=h,i[3]=c,i[0]=l,i[1]=c+1;break;case 2:l=n[15],h=n[11],n[12]=n[3],n[13]=o+0,n[14]=o+1,n[15]=o+2,n[8]=n[7],n[11]=o+3,n[4]=h,n[7]=o+4,n[0]=l,n[1]=o+7,n[2]=o+6,n[3]=o+5,l=i[3],i[2]=i[1],i[3]=c,i[0]=l,i[1]=c+1;break;case 3:n[12]=n[0],n[13]=o+0,n[14]=o+1,n[15]=o+2,n[8]=n[1],n[11]=o+3,n[4]=n[2],n[7]=o+4,n[0]=n[3],n[1]=o+7,n[2]=o+6,n[3]=o+5,i[2]=i[0],i[3]=c,i[0]=i[1],i[1]=c+1}n[5]=t.length,t.push([(-4*t[n[0]][0]-t[n[15]][0]+6*(t[n[4]][0]+t[n[1]][0])-2*(t[n[12]][0]+t[n[3]][0])+3*(t[n[13]][0]+t[n[7]][0]))/9,(-4*t[n[0]][1]-t[n[15]][1]+6*(t[n[4]][1]+t[n[1]][1])-2*(t[n[12]][1]+t[n[3]][1])+3*(t[n[13]][1]+t[n[7]][1]))/9]),n[6]=t.length,t.push([(-4*t[n[3]][0]-t[n[12]][0]+6*(t[n[2]][0]+t[n[7]][0])-2*(t[n[0]][0]+t[n[15]][0])+3*(t[n[4]][0]+t[n[14]][0]))/9,(-4*t[n[3]][1]-t[n[12]][1]+6*(t[n[2]][1]+t[n[7]][1])-2*(t[n[0]][1]+t[n[15]][1])+3*(t[n[4]][1]+t[n[14]][1]))/9]),n[9]=t.length,t.push([(-4*t[n[12]][0]-t[n[3]][0]+6*(t[n[8]][0]+t[n[13]][0])-2*(t[n[0]][0]+t[n[15]][0])+3*(t[n[11]][0]+t[n[1]][0]))/9,(-4*t[n[12]][1]-t[n[3]][1]+6*(t[n[8]][1]+t[n[13]][1])-2*(t[n[0]][1]+t[n[15]][1])+3*(t[n[11]][1]+t[n[1]][1]))/9]),n[10]=t.length,t.push([(-4*t[n[15]][0]-t[n[0]][0]+6*(t[n[11]][0]+t[n[14]][0])-2*(t[n[12]][0]+t[n[3]][0])+3*(t[n[2]][0]+t[n[8]][0]))/9,(-4*t[n[15]][1]-t[n[0]][1]+6*(t[n[11]][1]+t[n[14]][1])-2*(t[n[12]][1]+t[n[3]][1])+3*(t[n[2]][1]+t[n[8]][1]))/9]),this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(i)})}}_decodeType7Shading(e){const t=this.coords,r=this.colors,n=new Int32Array(16),i=new Int32Array(4);for(;e.hasData;){const s=e.readFlag();if(!(0<=s&&s<=3))throw new a.FormatError("Unknown type7 flag");const o=t.length;for(let r=0,a=0!==s?12:16;r<a;r++)t.push(e.readCoordinate());const c=r.length;for(let t=0,a=0!==s?2:4;t<a;t++)r.push(e.readComponents());let l,h,u,d;switch(s){case 0:n[12]=o+3,n[13]=o+4,n[14]=o+5,n[15]=o+6,n[8]=o+2,n[9]=o+13,n[10]=o+14,n[11]=o+7,n[4]=o+1,n[5]=o+12,n[6]=o+15,n[7]=o+8,n[0]=o,n[1]=o+11,n[2]=o+10,n[3]=o+9,i[2]=c+1,i[3]=c+2,i[0]=c,i[1]=c+3;break;case 1:l=n[12],h=n[13],u=n[14],d=n[15],n[12]=d,n[13]=o+0,n[14]=o+1,n[15]=o+2,n[8]=u,n[9]=o+9,n[10]=o+10,n[11]=o+3,n[4]=h,n[5]=o+8,n[6]=o+11,n[7]=o+4,n[0]=l,n[1]=o+7,n[2]=o+6,n[3]=o+5,l=i[2],h=i[3],i[2]=h,i[3]=c,i[0]=l,i[1]=c+1;break;case 2:l=n[15],h=n[11],n[12]=n[3],n[13]=o+0,n[14]=o+1,n[15]=o+2,n[8]=n[7],n[9]=o+9,n[10]=o+10,n[11]=o+3,n[4]=h,n[5]=o+8,n[6]=o+11,n[7]=o+4,n[0]=l,n[1]=o+7,n[2]=o+6,n[3]=o+5,l=i[3],i[2]=i[1],i[3]=c,i[0]=l,i[1]=c+1;break;case 3:n[12]=n[0],n[13]=o+0,n[14]=o+1,n[15]=o+2,n[8]=n[1],n[9]=o+9,n[10]=o+10,n[11]=o+3,n[4]=n[2],n[5]=o+8,n[6]=o+11,n[7]=o+4,n[0]=n[3],n[1]=o+7,n[2]=o+6,n[3]=o+5,i[2]=i[0],i[3]=c,i[0]=i[1],i[1]=c+1}this.figures.push({type:"patch",coords:new Int32Array(n),colors:new Int32Array(i)})}}_buildFigureFromPatch(e){const t=this.figures[e];(0,a.assert)("patch"===t.type,"Unexpected patch mesh figure");const r=this.coords,n=this.colors,i=t.coords,s=t.colors,o=Math.min(r[i[0]][0],r[i[3]][0],r[i[12]][0],r[i[15]][0]),c=Math.min(r[i[0]][1],r[i[3]][1],r[i[12]][1],r[i[15]][1]),l=Math.max(r[i[0]][0],r[i[3]][0],r[i[12]][0],r[i[15]][0]),h=Math.max(r[i[0]][1],r[i[3]][1],r[i[12]][1],r[i[15]][1]);let u=Math.ceil((l-o)*y.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));u=Math.max(y.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(y.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,u));let d=Math.ceil((h-c)*y.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));d=Math.max(y.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,Math.min(y.MAX_SPLIT_PATCH_CHUNKS_AMOUNT,d));const f=u+1,p=new Int32Array((d+1)*f),g=new Int32Array((d+1)*f);let m=0;const v=new Uint8Array(3),w=new Uint8Array(3),A=n[s[0]],S=n[s[1]],x=n[s[2]],k=n[s[3]],C=b(d),_=b(u);for(let e=0;e<=d;e++){v[0]=(A[0]*(d-e)+x[0]*e)/d|0,v[1]=(A[1]*(d-e)+x[1]*e)/d|0,v[2]=(A[2]*(d-e)+x[2]*e)/d|0,w[0]=(S[0]*(d-e)+k[0]*e)/d|0,w[1]=(S[1]*(d-e)+k[1]*e)/d|0,w[2]=(S[2]*(d-e)+k[2]*e)/d|0;for(let t=0;t<=u;t++,m++){if(!(0!==e&&e!==d||0!==t&&t!==u))continue;let a=0,s=0,o=0;for(let n=0;n<=3;n++)for(let c=0;c<=3;c++,o++){const l=C[e][n]*_[t][c];a+=r[i[o]][0]*l,s+=r[i[o]][1]*l}p[m]=r.length,r.push([a,s]),g[m]=n.length;const c=new Uint8Array(3);c[0]=(v[0]*(u-t)+w[0]*t)/u|0,c[1]=(v[1]*(u-t)+w[1]*t)/u|0,c[2]=(v[2]*(u-t)+w[2]*t)/u|0,n.push(c)}}p[0]=i[0],g[0]=s[0],p[u]=i[3],g[u]=s[1],p[f*d]=i[12],g[f*d]=s[2],p[f*d+u]=i[15],g[f*d+u]=s[3],this.figures[e]={type:"lattice",coords:p,colors:g,verticesPerRow:f}}_updateBounds(){let e=this.coords[0][0],t=this.coords[0][1],r=e,a=t;for(let n=1,i=this.coords.length;n<i;n++){const i=this.coords[n][0],s=this.coords[n][1];e=e>i?i:e,t=t>s?s:t,r=r<i?i:r,a=a<s?s:a}this.bounds=[e,t,r,a]}_packData(){let e,t,r,a;const n=this.coords,i=new Float32Array(2*n.length);for(e=0,r=0,t=n.length;e<t;e++){const t=n[e];i[r++]=t[0],i[r++]=t[1]}this.coords=i;const s=this.colors,o=new Uint8Array(3*s.length);for(e=0,r=0,t=s.length;e<t;e++){const t=s[e];o[r++]=t[0],o[r++]=t[1],o[r++]=t[2]}this.colors=o;const c=this.figures;for(e=0,t=c.length;e<t;e++){const t=c[e],n=t.coords,i=t.colors;for(r=0,a=n.length;r<a;r++)n[r]*=2,i[r]*=3}}getIR(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.bbox,this.background]}}class v extends f{getIR(){return["Dummy"]}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getXfaFontDict=function(e){const t=function(e){const t=d(e);if(!t)return null;const{baseWidths:r,baseMapping:a,factors:n}=t,i=n?r.map(((e,t)=>e*n[t])):r;let s,o=-2;const c=[];for(const[e,t]of a.map(((e,t)=>[e,t])).sort((([e],[t])=>e-t)))-1!==e&&(e===o+1?(s.push(i[t]),o+=1):(o=e,s=[i[t]],c.push(e,s)));return c}(e),r=new n.Dict(null);r.set("BaseFont",n.Name.get(e)),r.set("Type",n.Name.get("Font")),r.set("Subtype",n.Name.get("CIDFontType2")),r.set("Encoding",n.Name.get("Identity-H")),r.set("CIDToGIDMap",n.Name.get("Identity")),r.set("W",t),r.set("FirstChar",t[0]),r.set("LastChar",t.at(-2)+t.at(-1).length-1);const a=new n.Dict(null);r.set("FontDescriptor",a);const i=new n.Dict(null);return i.set("Ordering","Identity"),i.set("Registry","Adobe"),i.set("Supplement",0),r.set("CIDSystemInfo",i),r},t.getXfaFontName=d;var a=r(52),n=r(4),i=r(53),s=r(54),o=r(55),c=r(56),l=r(3),h=r(38);const u=(0,l.getLookupTableFactory)((function(e){e["MyriadPro-Regular"]=e["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:o.MyriadProRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:o.MyriadProRegularMetrics},e["MyriadPro-Bold"]=e["PdfJS-Fallback-Bold"]={name:"LiberationSans-Bold",factors:o.MyriadProBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:o.MyriadProBoldMetrics},e["MyriadPro-It"]=e["MyriadPro-Italic"]=e["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:o.MyriadProItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:o.MyriadProItalicMetrics},e["MyriadPro-BoldIt"]=e["MyriadPro-BoldItalic"]=e["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:o.MyriadProBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:o.MyriadProBoldItalicMetrics},e.ArialMT=e.Arial=e["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping},e["Arial-BoldMT"]=e["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping},e["Arial-ItalicMT"]=e["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping},e["Arial-BoldItalicMT"]=e["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping},e["Calibri-Regular"]={name:"LiberationSans-Regular",factors:a.CalibriRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:a.CalibriRegularMetrics},e["Calibri-Bold"]={name:"LiberationSans-Bold",factors:a.CalibriBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:a.CalibriBoldMetrics},e["Calibri-Italic"]={name:"LiberationSans-Italic",factors:a.CalibriItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:a.CalibriItalicMetrics},e["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:a.CalibriBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:a.CalibriBoldItalicMetrics},e["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:c.SegoeuiRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:c.SegoeuiRegularMetrics},e["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:c.SegoeuiBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:c.SegoeuiBoldMetrics},e["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:c.SegoeuiItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:c.SegoeuiItalicMetrics},e["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:c.SegoeuiBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:c.SegoeuiBoldItalicMetrics},e["Helvetica-Regular"]=e.Helvetica={name:"LiberationSans-Regular",factors:i.HelveticaRegularFactors,baseWidths:s.LiberationSansRegularWidths,baseMapping:s.LiberationSansRegularMapping,metrics:i.HelveticaRegularMetrics},e["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:i.HelveticaBoldFactors,baseWidths:s.LiberationSansBoldWidths,baseMapping:s.LiberationSansBoldMapping,metrics:i.HelveticaBoldMetrics},e["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:i.HelveticaItalicFactors,baseWidths:s.LiberationSansItalicWidths,baseMapping:s.LiberationSansItalicMapping,metrics:i.HelveticaItalicMetrics},e["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:i.HelveticaBoldItalicFactors,baseWidths:s.LiberationSansBoldItalicWidths,baseMapping:s.LiberationSansBoldItalicMapping,metrics:i.HelveticaBoldItalicMetrics}}));function d(e){const t=(0,h.normalizeFontName)(e);return u()[t]}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CalibriRegularMetrics=t.CalibriRegularFactors=t.CalibriItalicMetrics=t.CalibriItalicFactors=t.CalibriBoldMetrics=t.CalibriBoldItalicMetrics=t.CalibriBoldItalicFactors=t.CalibriBoldFactors=void 0,t.CalibriBoldFactors=[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],t.CalibriBoldMetrics={lineHeight:1.2207,lineGap:.2207},t.CalibriBoldItalicFactors=[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],t.CalibriBoldItalicMetrics={lineHeight:1.2207,lineGap:.2207},t.CalibriItalicFactors=[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],t.CalibriItalicMetrics={lineHeight:1.2207,lineGap:.2207},t.CalibriRegularFactors=[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],t.CalibriRegularMetrics={lineHeight:1.2207,lineGap:.2207}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HelveticaRegularMetrics=t.HelveticaRegularFactors=t.HelveticaItalicMetrics=t.HelveticaItalicFactors=t.HelveticaBoldMetrics=t.HelveticaBoldItalicMetrics=t.HelveticaBoldItalicFactors=t.HelveticaBoldFactors=void 0,t.HelveticaBoldFactors=[.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],t.HelveticaBoldMetrics={lineHeight:1.2,lineGap:.2},t.HelveticaBoldItalicFactors=[.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],t.HelveticaBoldItalicMetrics={lineHeight:1.35,lineGap:.2},t.HelveticaItalicFactors=[.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],t.HelveticaItalicMetrics={lineHeight:1.35,lineGap:.2},t.HelveticaRegularFactors=[.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],t.HelveticaRegularMetrics={lineHeight:1.2,lineGap:.2}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LiberationSansRegularWidths=t.LiberationSansRegularMapping=t.LiberationSansItalicWidths=t.LiberationSansItalicMapping=t.LiberationSansBoldWidths=t.LiberationSansBoldMapping=t.LiberationSansBoldItalicWidths=t.LiberationSansBoldItalicMapping=void 0,t.LiberationSansBoldWidths=[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],t.LiberationSansBoldMapping=[-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],t.LiberationSansBoldItalicWidths=[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],t.LiberationSansBoldItalicMapping=[-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],t.LiberationSansItalicWidths=[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],t.LiberationSansItalicMapping=[-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],t.LiberationSansRegularWidths=[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],t.LiberationSansRegularMapping=[-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]},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MyriadProRegularMetrics=t.MyriadProRegularFactors=t.MyriadProItalicMetrics=t.MyriadProItalicFactors=t.MyriadProBoldMetrics=t.MyriadProBoldItalicMetrics=t.MyriadProBoldItalicFactors=t.MyriadProBoldFactors=void 0,t.MyriadProBoldFactors=[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],t.MyriadProBoldMetrics={lineHeight:1.2,lineGap:.2},t.MyriadProBoldItalicFactors=[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],t.MyriadProBoldItalicMetrics={lineHeight:1.2,lineGap:.2},t.MyriadProItalicFactors=[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],t.MyriadProItalicMetrics={lineHeight:1.2,lineGap:.2},t.MyriadProRegularFactors=[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],t.MyriadProRegularMetrics={lineHeight:1.2,lineGap:.2}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SegoeuiRegularMetrics=t.SegoeuiRegularFactors=t.SegoeuiItalicMetrics=t.SegoeuiItalicFactors=t.SegoeuiBoldMetrics=t.SegoeuiBoldItalicMetrics=t.SegoeuiBoldItalicFactors=t.SegoeuiBoldFactors=void 0,t.SegoeuiBoldFactors=[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],t.SegoeuiBoldMetrics={lineHeight:1.33008,lineGap:0},t.SegoeuiBoldItalicFactors=[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],t.SegoeuiBoldItalicMetrics={lineHeight:1.33008,lineGap:0},t.SegoeuiItalicFactors=[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],t.SegoeuiItalicMetrics={lineHeight:1.33008,lineGap:0},t.SegoeuiRegularFactors=[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],t.SegoeuiRegularMetrics={lineHeight:1.33008,lineGap:0}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostScriptEvaluator=t.PostScriptCompiler=t.PDFFunctionFactory=void 0,t.isPDFFunction=function(e){let t;if(e instanceof a.Dict)t=e;else{if(!(e instanceof s.BaseStream))return!1;t=e.dict}return t.has("FunctionType")};var a=r(4),n=r(2),i=r(58),s=r(5),o=r(59);function c(e){if(!Array.isArray(e))return null;const t=e.length;for(let r=0;r<t;r++)if("number"!=typeof e[r]){const r=new Array(t);for(let a=0;a<t;a++)r[a]=+e[a];return r}return e}t.PDFFunctionFactory=class{constructor({xref:e,isEvalSupported:t=!0}){this.xref=e,this.isEvalSupported=!1!==t}create(e){const t=this.getCached(e);if(t)return t;const r=l.parse({xref:this.xref,isEvalSupported:this.isEvalSupported,fn:e instanceof a.Ref?this.xref.fetch(e):e});return this._cache(e,r),r}createFromArray(e){const t=this.getCached(e);if(t)return t;const r=l.parseArray({xref:this.xref,isEvalSupported:this.isEvalSupported,fnObj:e instanceof a.Ref?this.xref.fetch(e):e});return this._cache(e,r),r}getCached(e){let t;if(e instanceof a.Ref?t=e:e instanceof a.Dict?t=e.objId:e instanceof s.BaseStream&&(t=e.dict?.objId),t){const e=this._localFunctionCache.getByRef(t);if(e)return e}return null}_cache(e,t){if(!t)throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.');let r;e instanceof a.Ref?r=e:e instanceof a.Dict?r=e.objId:e instanceof s.BaseStream&&(r=e.dict?.objId),r&&this._localFunctionCache.set(null,r,t)}get _localFunctionCache(){return(0,n.shadow)(this,"_localFunctionCache",new o.LocalFunctionCache)}};class l{static getSampleArray(e,t,r,a){let n,i,s=1;for(n=0,i=e.length;n<i;n++)s*=e[n];s*=t;const o=new Array(s);let c=0,l=0;const h=1/(2**r-1),u=a.getBytes((s*r+7)/8);let d=0;for(n=0;n<s;n++){for(;c<r;)l<<=8,l|=u[d++],c+=8;c-=r,o[n]=(l>>c)*h,l&=(1<<c)-1}return o}static parse({xref:e,isEvalSupported:t,fn:r}){const a=r.dict||r;switch(a.get("FunctionType")){case 0:return this.constructSampled({xref:e,isEvalSupported:t,fn:r,dict:a});case 1:break;case 2:return this.constructInterpolated({xref:e,isEvalSupported:t,dict:a});case 3:return this.constructStiched({xref:e,isEvalSupported:t,dict:a});case 4:return this.constructPostScript({xref:e,isEvalSupported:t,fn:r,dict:a})}throw new n.FormatError("Unknown type of function")}static parseArray({xref:e,isEvalSupported:t,fnObj:r}){if(!Array.isArray(r))return this.parse({xref:e,isEvalSupported:t,fn:r});const a=[];for(const n of r)a.push(this.parse({xref:e,isEvalSupported:t,fn:e.fetchIfRef(n)}));return function(e,t,r,n){for(let i=0,s=a.length;i<s;i++)a[i](e,t,r,n+i)}}static constructSampled({xref:e,isEvalSupported:t,fn:r,dict:a}){function i(e){const t=e.length,r=[];let a=0;for(let n=0;n<t;n+=2)r[a++]=[e[n],e[n+1]];return r}function s(e,t,r,a,n){return a+(n-a)/(r-t)*(e-t)}let o=c(a.getArray("Domain")),l=c(a.getArray("Range"));if(!o||!l)throw new n.FormatError("No domain or range");const h=o.length/2,u=l.length/2;o=i(o),l=i(l);const d=c(a.getArray("Size")),f=a.get("BitsPerSample"),p=a.get("Order")||1;1!==p&&(0,n.info)("No support for cubic spline interpolation: "+p);let g=c(a.getArray("Encode"));if(g)g=i(g);else{g=[];for(let e=0;e<h;++e)g.push([0,d[e]-1])}let m=c(a.getArray("Decode"));m=m?i(m):l;const b=this.getSampleArray(d,u,f,r);return function(e,t,r,a){const n=1<<h,i=new Float64Array(n),c=new Uint32Array(n);let f,p;for(p=0;p<n;p++)i[p]=1;let y=u,v=1;for(f=0;f<h;++f){const r=o[f][0],a=o[f][1];let l=s(Math.min(Math.max(e[t+f],r),a),r,a,g[f][0],g[f][1]);const h=d[f];l=Math.min(Math.max(l,0),h-1);const u=l<h-1?Math.floor(l):l-1,m=u+1-l,b=l-u,w=u*y,A=w+y;for(p=0;p<n;p++)p&v?(i[p]*=b,c[p]+=A):(i[p]*=m,c[p]+=w);y*=h,v<<=1}for(p=0;p<u;++p){let e=0;for(f=0;f<n;f++)e+=b[c[f]+p]*i[f];e=s(e,0,1,m[p][0],m[p][1]),r[a+p]=Math.min(Math.max(e,l[p][0]),l[p][1])}}}static constructInterpolated({xref:e,isEvalSupported:t,dict:r}){const a=c(r.getArray("C0"))||[0],n=c(r.getArray("C1"))||[1],i=r.get("N"),s=[];for(let e=0,t=a.length;e<t;++e)s.push(n[e]-a[e]);const o=s.length;return function(e,t,r,n){const c=1===i?e[t]:e[t]**i;for(let e=0;e<o;++e)r[n+e]=a[e]+c*s[e]}}static constructStiched({xref:e,isEvalSupported:t,dict:r}){const a=c(r.getArray("Domain"));if(!a)throw new n.FormatError("No domain");if(1!=a.length/2)throw new n.FormatError("Bad domain for stiched function");const i=[];for(const a of r.get("Functions"))i.push(this.parse({xref:e,isEvalSupported:t,fn:e.fetchIfRef(a)}));const s=c(r.getArray("Bounds")),o=c(r.getArray("Encode")),l=new Float32Array(1);return function(e,t,r,n){const c=function(e,t,r){return e>r?e=r:e<t&&(e=t),e}(e[t],a[0],a[1]),h=s.length;let u;for(u=0;u<h&&!(c<s[u]);++u);let d=a[0];u>0&&(d=s[u-1]);let f=a[1];u<s.length&&(f=s[u]);const p=o[2*u],g=o[2*u+1];l[0]=d===f?p:p+(c-d)*(g-p)/(f-d),i[u](l,0,r,n)}}static constructPostScript({xref:e,isEvalSupported:t,fn:r,dict:a}){const s=c(a.getArray("Domain")),o=c(a.getArray("Range"));if(!s)throw new n.FormatError("No domain.");if(!o)throw new n.FormatError("No range.");const l=new i.PostScriptLexer(r),h=new i.PostScriptParser(l).parse();if(t&&n.FeatureTest.isEvalSupported){const e=(new k).compile(h,s,o);if(e)return new Function("src","srcOffset","dest","destOffset",e)}(0,n.info)("Unable to compile PS function");const d=o.length>>1,f=s.length>>1,p=new u(h),g=Object.create(null);let m=8192;const b=new Float32Array(f);return function(e,t,r,a){let n,i,s="";const c=b;for(n=0;n<f;n++)i=e[t+n],c[n]=i,s+=i+"_";const l=g[s];if(void 0!==l)return void r.set(l,a);const h=new Float32Array(d),u=p.execute(c),y=u.length-d;for(n=0;n<d;n++){i=u[y+n];let e=o[2*n];i<e?i=e:(e=o[2*n+1],i>e&&(i=e)),h[n]=i}m>0&&(m--,g[s]=h),r.set(h,a)}}}class h{static MAX_STACK_SIZE=100;constructor(e){this.stack=e?Array.from(e):[]}push(e){if(this.stack.length>=h.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(e)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(e){if(this.stack.length+e>=h.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const t=this.stack;for(let r=t.length-e,a=e-1;a>=0;a--,r++)t.push(t[r])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const r=this.stack,a=r.length-e,n=r.length-1,i=a+(t-Math.floor(t/e)*e);for(let e=a,t=n;e<t;e++,t--){const a=r[e];r[e]=r[t],r[t]=a}for(let e=a,t=i-1;e<t;e++,t--){const a=r[e];r[e]=r[t],r[t]=a}for(let e=i,t=n;e<t;e++,t--){const a=r[e];r[e]=r[t],r[t]=a}}}class u{constructor(e){this.operators=e}execute(e){const t=new h(e);let r=0;const a=this.operators,i=a.length;let s,o,c;for(;r<i;)if(s=a[r++],"number"!=typeof s)switch(s){case"jz":c=t.pop(),o=t.pop(),o||(r=c);break;case"j":o=t.pop(),r=o;break;case"abs":o=t.pop(),t.push(Math.abs(o));break;case"add":c=t.pop(),o=t.pop(),t.push(o+c);break;case"and":c=t.pop(),o=t.pop(),"boolean"==typeof o&&"boolean"==typeof c?t.push(o&&c):t.push(o&c);break;case"atan":c=t.pop(),o=t.pop(),o=Math.atan2(o,c)/Math.PI*180,o<0&&(o+=360),t.push(o);break;case"bitshift":c=t.pop(),o=t.pop(),o>0?t.push(o<<c):t.push(o>>c);break;case"ceiling":o=t.pop(),t.push(Math.ceil(o));break;case"copy":o=t.pop(),t.copy(o);break;case"cos":o=t.pop(),t.push(Math.cos(o%360/180*Math.PI));break;case"cvi":o=0|t.pop(),t.push(o);break;case"cvr":break;case"div":c=t.pop(),o=t.pop(),t.push(o/c);break;case"dup":t.copy(1);break;case"eq":c=t.pop(),o=t.pop(),t.push(o===c);break;case"exch":t.roll(2,1);break;case"exp":c=t.pop(),o=t.pop(),t.push(o**c);break;case"false":t.push(!1);break;case"floor":o=t.pop(),t.push(Math.floor(o));break;case"ge":c=t.pop(),o=t.pop(),t.push(o>=c);break;case"gt":c=t.pop(),o=t.pop(),t.push(o>c);break;case"idiv":c=t.pop(),o=t.pop(),t.push(o/c|0);break;case"index":o=t.pop(),t.index(o);break;case"le":c=t.pop(),o=t.pop(),t.push(o<=c);break;case"ln":o=t.pop(),t.push(Math.log(o));break;case"log":o=t.pop(),t.push(Math.log10(o));break;case"lt":c=t.pop(),o=t.pop(),t.push(o<c);break;case"mod":c=t.pop(),o=t.pop(),t.push(o%c);break;case"mul":c=t.pop(),o=t.pop(),t.push(o*c);break;case"ne":c=t.pop(),o=t.pop(),t.push(o!==c);break;case"neg":o=t.pop(),t.push(-o);break;case"not":o=t.pop(),"boolean"==typeof o?t.push(!o):t.push(~o);break;case"or":c=t.pop(),o=t.pop(),"boolean"==typeof o&&"boolean"==typeof c?t.push(o||c):t.push(o|c);break;case"pop":t.pop();break;case"roll":c=t.pop(),o=t.pop(),t.roll(o,c);break;case"round":o=t.pop(),t.push(Math.round(o));break;case"sin":o=t.pop(),t.push(Math.sin(o%360/180*Math.PI));break;case"sqrt":o=t.pop(),t.push(Math.sqrt(o));break;case"sub":c=t.pop(),o=t.pop(),t.push(o-c);break;case"true":t.push(!0);break;case"truncate":o=t.pop(),o=o<0?Math.ceil(o):Math.floor(o),t.push(o);break;case"xor":c=t.pop(),o=t.pop(),"boolean"==typeof o&&"boolean"==typeof c?t.push(o!==c):t.push(o^c);break;default:throw new n.FormatError(`Unknown operator ${s}`)}else t.push(s);return t.stack}}t.PostScriptEvaluator=u;class d{constructor(e){this.type=e}visit(e){(0,n.unreachable)("abstract method")}}class f extends d{constructor(e,t,r){super("args"),this.index=e,this.min=t,this.max=r}visit(e){e.visitArgument(this)}}class p extends d{constructor(e){super("literal"),this.number=e,this.min=e,this.max=e}visit(e){e.visitLiteral(this)}}class g extends d{constructor(e,t,r,a,n){super("binary"),this.op=e,this.arg1=t,this.arg2=r,this.min=a,this.max=n}visit(e){e.visitBinaryOperation(this)}}class m extends d{constructor(e,t){super("max"),this.arg=e,this.min=e.min,this.max=t}visit(e){e.visitMin(this)}}class b extends d{constructor(e,t,r){super("var"),this.index=e,this.min=t,this.max=r}visit(e){e.visitVariable(this)}}class y extends d{constructor(e,t){super("definition"),this.variable=e,this.arg=t}visit(e){e.visitVariableDefinition(this)}}class v{constructor(){this.parts=[]}visitArgument(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")}visitVariable(e){this.parts.push("v",e.index)}visitLiteral(e){this.parts.push(e.number)}visitBinaryOperation(e){this.parts.push("("),e.arg1.visit(this),this.parts.push(" ",e.op," "),e.arg2.visit(this),this.parts.push(")")}visitVariableDefinition(e){this.parts.push("var "),e.variable.visit(this),this.parts.push(" = "),e.arg.visit(this),this.parts.push(";")}visitMin(e){this.parts.push("Math.min("),e.arg.visit(this),this.parts.push(", ",e.max,")")}toString(){return this.parts.join("")}}function w(e,t){return"literal"===t.type&&0===t.number?e:"literal"===e.type&&0===e.number?t:"literal"===t.type&&"literal"===e.type?new p(e.number+t.number):new g("+",e,t,e.min+t.min,e.max+t.max)}function A(e,t){if("literal"===t.type){if(0===t.number)return new p(0);if(1===t.number)return e;if("literal"===e.type)return new p(e.number*t.number)}if("literal"===e.type){if(0===e.number)return new p(0);if(1===e.number)return t}const r=Math.min(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max),a=Math.max(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max);return new g("*",e,t,r,a)}function S(e,t){if("literal"===t.type){if(0===t.number)return e;if("literal"===e.type)return new p(e.number-t.number)}return"binary"===t.type&&"-"===t.op&&"literal"===e.type&&1===e.number&&"literal"===t.arg1.type&&1===t.arg1.number?t.arg2:new g("-",e,t,e.min-t.max,e.max-t.min)}function x(e,t){return e.min>=t?new p(t):e.max<=t?e:new m(e,t)}class k{compile(e,t,r){const a=[],n=[],i=t.length>>1,s=r.length>>1;let o,c,l,h,u,d,g,m,k=0;for(let e=0;e<i;e++)a.push(new f(e,t[2*e],t[2*e+1]));for(let t=0,r=e.length;t<r;t++)if(m=e[t],"number"!=typeof m)switch(m){case"add":if(a.length<2)return null;h=a.pop(),l=a.pop(),a.push(w(l,h));break;case"cvr":if(a.length<1)return null;break;case"mul":if(a.length<2)return null;h=a.pop(),l=a.pop(),a.push(A(l,h));break;case"sub":if(a.length<2)return null;h=a.pop(),l=a.pop(),a.push(S(l,h));break;case"exch":if(a.length<2)return null;u=a.pop(),d=a.pop(),a.push(u,d);break;case"pop":if(a.length<1)return null;a.pop();break;case"index":if(a.length<1)return null;if(l=a.pop(),"literal"!==l.type)return null;if(o=l.number,o<0||!Number.isInteger(o)||a.length<o)return null;if(u=a[a.length-o-1],"literal"===u.type||"var"===u.type){a.push(u);break}g=new b(k++,u.min,u.max),a[a.length-o-1]=g,a.push(g),n.push(new y(g,u));break;case"dup":if(a.length<1)return null;if("number"==typeof e[t+1]&&"gt"===e[t+2]&&e[t+3]===t+7&&"jz"===e[t+4]&&"pop"===e[t+5]&&e[t+6]===e[t+1]){l=a.pop(),a.push(x(l,e[t+1])),t+=6;break}if(u=a.at(-1),"literal"===u.type||"var"===u.type){a.push(u);break}g=new b(k++,u.min,u.max),a[a.length-1]=g,a.push(g),n.push(new y(g,u));break;case"roll":if(a.length<2)return null;if(h=a.pop(),l=a.pop(),"literal"!==h.type||"literal"!==l.type)return null;if(c=h.number,o=l.number,o<=0||!Number.isInteger(o)||!Number.isInteger(c)||a.length<o)return null;if(c=(c%o+o)%o,0===c)break;a.push(...a.splice(a.length-o,o-c));break;default:return null}else a.push(new p(m));if(a.length!==s)return null;const C=[];for(const e of n){const t=new v;e.visit(t),C.push(t.toString())}for(let e=0,t=a.length;e<t;e++){const t=a[e],n=new v;t.visit(n);const i=r[2*e],s=r[2*e+1],o=[n.toString()];i>t.min&&(o.unshift("Math.max(",i,", "),o.push(")")),s<t.max&&(o.unshift("Math.min(",s,", "),o.push(")")),o.unshift("dest[destOffset + ",e,"] = "),o.push(";"),C.push(o.join(""))}return C.join("\n")}}t.PostScriptCompiler=k},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PostScriptParser=t.PostScriptLexer=void 0;var a=r(2),n=r(4),i=r(3);t.PostScriptParser=class{constructor(e){this.lexer=e,this.operators=[],this.token=null,this.prev=null}nextToken(){this.prev=this.token,this.token=this.lexer.getToken()}accept(e){return this.token.type===e&&(this.nextToken(),!0)}expect(e){if(this.accept(e))return!0;throw new a.FormatError(`Unexpected symbol: found ${this.token.type} expected ${e}.`)}parse(){return this.nextToken(),this.expect(s.LBRACE),this.parseBlock(),this.expect(s.RBRACE),this.operators}parseBlock(){for(;;)if(this.accept(s.NUMBER))this.operators.push(this.prev.value);else if(this.accept(s.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(s.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(s.RBRACE),this.accept(s.IF))this.operators[e]=this.operators.length,this.operators[e+1]="jz";else{if(!this.accept(s.LBRACE))throw new a.FormatError("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const r=this.operators.length;this.parseBlock(),this.expect(s.RBRACE),this.expect(s.IFELSE),this.operators[t]=this.operators.length,this.operators[t+1]="j",this.operators[e]=r,this.operators[e+1]="jz"}}}};const s={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class o{static get opCache(){return(0,a.shadow)(this,"opCache",Object.create(null))}constructor(e,t){this.type=e,this.value=t}static getOperator(e){return o.opCache[e]||=new o(s.OPERATOR,e)}static get LBRACE(){return(0,a.shadow)(this,"LBRACE",new o(s.LBRACE,"{"))}static get RBRACE(){return(0,a.shadow)(this,"RBRACE",new o(s.RBRACE,"}"))}static get IF(){return(0,a.shadow)(this,"IF",new o(s.IF,"IF"))}static get IFELSE(){return(0,a.shadow)(this,"IFELSE",new o(s.IFELSE,"IFELSE"))}}t.PostScriptLexer=class{constructor(e){this.stream=e,this.nextChar(),this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(t<0)return n.EOF;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!(0,i.isWhiteSpace)(t))break;t=this.nextChar()}switch(0|t){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(s.NUMBER,this.getNumber());case 123:return this.nextChar(),o.LBRACE;case 125:return this.nextChar(),o.RBRACE}const r=this.strBuf;for(r.length=0,r[0]=String.fromCharCode(t);(t=this.nextChar())>=0&&(t>=65&&t<=90||t>=97&&t<=122);)r.push(String.fromCharCode(t));const a=r.join("");switch(a.toLowerCase()){case"if":return o.IF;case"ifelse":return o.IFELSE;default:return o.getOperator(a)}}getNumber(){let e=this.currentChar;const t=this.strBuf;for(t.length=0,t[0]=String.fromCharCode(e);(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));const r=parseFloat(t.join(""));if(isNaN(r))throw new a.FormatError(`Invalid floating point number: ${r}`);return r}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegionalImageCache=t.LocalTilingPatternCache=t.LocalImageCache=t.LocalGStateCache=t.LocalFunctionCache=t.LocalColorSpaceCache=t.GlobalImageCache=void 0;var a=r(2),n=r(4);class i{constructor(e){this.constructor===i&&(0,a.unreachable)("Cannot initialize BaseLocalCache."),this._onlyRefs=!0===e?.onlyRefs,this._onlyRefs||(this._nameRefMap=new Map,this._imageMap=new Map),this._imageCache=new n.RefSetCache}getByName(e){this._onlyRefs&&(0,a.unreachable)("Should not call `getByName` method.");const t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,r){(0,a.unreachable)("Abstract method `set` called.")}}t.LocalImageCache=class extends i{set(e,t=null,r){if("string"!=typeof e)throw new Error('LocalImageCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}},t.LocalColorSpaceCache=class extends i{set(e=null,t=null,r){if("string"!=typeof e&&!t)throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.');if(t){if(this._imageCache.has(t))return;return null!==e&&this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}},t.LocalFunctionCache=class extends i{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw new Error('LocalFunctionCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}},t.LocalGStateCache=class extends i{set(e,t=null,r){if("string"!=typeof e)throw new Error('LocalGStateCache.set - expected "name" argument.');if(t){if(this._imageCache.has(t))return;return this._nameRefMap.set(e,t),void this._imageCache.put(t,r)}this._imageMap.has(e)||this._imageMap.set(e,r)}},t.LocalTilingPatternCache=class extends i{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw new Error('LocalTilingPatternCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}},t.RegionalImageCache=class extends i{constructor(e){super({onlyRefs:!0})}set(e=null,t,r){if(!t)throw new Error('RegionalImageCache.set - expected "ref" argument.');this._imageCache.has(t)||this._imageCache.put(t,r)}};class s{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=5*a.MAX_IMAGE_SIZE_TO_CACHE;constructor(){this._refCache=new n.RefSetCache,this._imageCache=new n.RefSetCache}get _byteSize(){let e=0;for(const t of this._imageCache)e+=t.byteSize;return e}get _cacheLimitReached(){return!(this._imageCache.size<s.MIN_IMAGES_TO_CACHE||this._byteSize<s.MAX_BYTE_SIZE)}shouldCache(e,t){let r=this._refCache.get(e);return r||(r=new Set,this._refCache.put(e,r)),r.add(t),!(r.size<s.NUM_PAGES_THRESHOLD||!this._imageCache.has(e)&&this._cacheLimitReached)}addByteSize(e,t){const r=this._imageCache.get(e);r&&(r.byteSize||(r.byteSize=t))}getData(e,t){const r=this._refCache.get(e);if(!r)return null;if(r.size<s.NUM_PAGES_THRESHOLD)return null;const a=this._imageCache.get(e);return a?(r.add(t),a):null}setData(e,t){if(!this._refCache.has(e))throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.');this._imageCache.has(e)||(this._cacheLimitReached?(0,a.warn)("GlobalImageCache.setData - cache limit reached."):this._imageCache.put(e,t))}clear(e=!1){e||this._refCache.clear(),this._imageCache.clear()}}t.GlobalImageCache=s},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.bidi=function(e,t=-1,r=!1){let p=!0;const g=e.length;if(0===g||r)return u(e,p,r);d.length=g,f.length=g;let m,b,y=0;for(m=0;m<g;++m){d[m]=e.charAt(m);const t=e.charCodeAt(m);let r="L";t<=255?r=n[t]:1424<=t&&t<=1524?r="R":1536<=t&&t<=1791?(r=i[255&t],r||(0,a.warn)("Bidi: invalid Unicode character "+t.toString(16))):(1792<=t&&t<=2220||64336<=t&&t<=65023||65136<=t&&t<=65279)&&(r="AL"),"R"!==r&&"AL"!==r&&"AN"!==r||y++,f[m]=r}if(0===y)return p=!0,u(e,p);-1===t&&(y/g<.3&&g>4?(p=!0,t=0):(p=!1,t=1));const v=[];for(m=0;m<g;++m)v[m]=t;const w=s(t)?"R":"L",A=w,S=A;let x,k=A;for(m=0;m<g;++m)"NSM"===f[m]?f[m]=k:k=f[m];for(k=A,m=0;m<g;++m)x=f[m],"EN"===x?f[m]="AL"===k?"AN":"EN":"R"!==x&&"L"!==x&&"AL"!==x||(k=x);for(m=0;m<g;++m)x=f[m],"AL"===x&&(f[m]="R");for(m=1;m<g-1;++m)"ES"===f[m]&&"EN"===f[m-1]&&"EN"===f[m+1]&&(f[m]="EN"),"CS"!==f[m]||"EN"!==f[m-1]&&"AN"!==f[m-1]||f[m+1]!==f[m-1]||(f[m]=f[m-1]);for(m=0;m<g;++m)if("EN"===f[m]){for(let e=m-1;e>=0&&"ET"===f[e];--e)f[e]="EN";for(let e=m+1;e<g&&"ET"===f[e];++e)f[e]="EN"}for(m=0;m<g;++m)x=f[m],"WS"!==x&&"ES"!==x&&"ET"!==x&&"CS"!==x||(f[m]="ON");for(k=A,m=0;m<g;++m)x=f[m],"EN"===x?f[m]="L"===k?"L":"EN":"R"!==x&&"L"!==x||(k=x);for(m=0;m<g;++m)if("ON"===f[m]){const e=c(f,m+1,"ON");let t=A;m>0&&(t=f[m-1]);let r=S;e+1<g&&(r=f[e+1]),"L"!==t&&(t="R"),"L"!==r&&(r="R"),t===r&&l(f,m,e,t),m=e-1}for(m=0;m<g;++m)"ON"===f[m]&&(f[m]=w);for(m=0;m<g;++m)x=f[m],o(v[m])?"R"===x?v[m]+=1:"AN"!==x&&"EN"!==x||(v[m]+=2):"L"!==x&&"AN"!==x&&"EN"!==x||(v[m]+=1);let C,_=-1,T=99;for(m=0,b=v.length;m<b;++m)C=v[m],_<C&&(_=C),T>C&&s(C)&&(T=C);for(C=_;C>=T;--C){let e=-1;for(m=0,b=v.length;m<b;++m)v[m]<C?e>=0&&(h(d,e,m),e=-1):e<0&&(e=m);e>=0&&h(d,e,v.length)}for(m=0,b=d.length;m<b;++m){const e=d[m];"<"!==e&&">"!==e||(d[m]="")}return u(d.join(""),p)};var a=r(2);const n=["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"],i=["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 s(e){return!!(1&e)}function o(e){return!(1&e)}function c(e,t,r){let a,n;for(a=t,n=e.length;a<n;++a)if(e[a]!==r)return a;return a}function l(e,t,r,a){for(let n=t;n<r;++n)e[n]=a}function h(e,t,r){for(let a=t,n=r-1;a<n;++a,--n){const t=e[a];e[a]=e[n],e[n]=t}}function u(e,t,r=!1){let a="ltr";return r?a="ttb":t||(a="rtl"),{str:e,dir:a}}const d=[],f=[]},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFontSubstitution=function(e,t,r,d,f){const p=d=(0,a.normalizeFontName)(d);let g=e.get(p);if(g)return g;let m=l.get(d);if(!m)for(const[e,t]of h)if(d.startsWith(e)){d=`${t}${d.substring(e.length)}`,m=l.get(d);break}let b=!1;m||(m=l.get(f),b=!0);const y=`${t.getDocId()}_s${t.createFontId()}`;if(!m){if(!(0,n.validateFontName)(d))return e.set(p,null),null;const t=/bold/gi.test(d),r=/oblique|italic/gi.test(d);return g={css:y,guessFallback:!0,loadedName:y,baseFontName:d,src:`local(${d})`,style:t&&r&&c||t&&s||r&&o||i},e.set(p,g),g}const v=[];b&&(0,n.validateFontName)(d)&&v.push(`local(${d})`);const{style:w,ultimate:A}=u(m,v,r),S=null===A;return g={css:`${y}${S?"":`,${A}`}`,guessFallback:S,loadedName:y,baseFontName:d,src:v.join(","),style:w},e.set(p,g),g};var a=r(38),n=r(3);const i={style:"normal",weight:"normal"},s={style:"normal",weight:"bold"},o={style:"italic",weight:"normal"},c={style:"italic",weight:"bold"},l=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:i,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:s,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:o,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:c,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:i,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:s,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:o,ultimate:"sans-serif"}],["Helvetica-BoldOblique",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:c,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono"],style:i,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:s,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:o,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:c,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:i,fallback:"Helvetica"}],["ArialNarrow-Bold",{alias:"ArialNarrow",style:s,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:o,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:c,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:i,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:s,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:o,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:c,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:i}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),h=new Map([["Arial-Black","ArialBlack"]]);function u({alias:e,local:t,path:r,fallback:a,style:n,ultimate:i},h,d,f=!0,p=!0,g=""){const m={style:null,ultimate:null};if(t){const e=g?` ${g}`:"";for(const r of t)h.push(`local(${r}${e})`)}if(e){const t=l.get(e),i=g||function(e){switch(e){case s:return"Bold";case o:return"Italic";case c:return"Bold Italic";default:if("bold"===e?.weight)return"Bold";if("italic"===e?.style)return"Italic"}return""}(n);Object.assign(m,u(t,h,d,f&&!a,p&&!r,i))}if(n&&(m.style=n),i&&(m.ultimate=i),f&&a){const e=l.get(a),{ultimate:t}=u(e,h,d,f,p&&!r,g);m.ultimate||=t}return p&&r&&d&&h.push(`url(${d}${r})`),m}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImageResizer=void 0;var a=r(2);class n{constructor(e,t){this._imgData=e,this._isMask=t}static needsToBeResized(e,t){if(e<=this._goodSquareLength&&t<=this._goodSquareLength)return!1;const{MAX_DIM:r}=this;if(e>r||t>r)return!0;const a=e*t;return this._hasMaxArea?a>this.MAX_AREA:!(a<this._goodSquareLength**2)&&(this._areGoodDims(e,t)?(this._goodSquareLength=Math.max(this._goodSquareLength,Math.floor(Math.sqrt(e*t))),!1):(this._goodSquareLength=this._guessMax(this._goodSquareLength,r,128,0),a>(this.MAX_AREA=this._goodSquareLength**2)))}static get MAX_DIM(){return(0,a.shadow)(this,"MAX_DIM",this._guessMax(2048,65537,0,1))}static get MAX_AREA(){return this._hasMaxArea=!0,(0,a.shadow)(this,"MAX_AREA",this._guessMax(n._goodSquareLength,this.MAX_DIM,128,0)**2)}static set MAX_AREA(e){e>=0&&(this._hasMaxArea=!0,(0,a.shadow)(this,"MAX_AREA",e))}static setMaxArea(e){this._hasMaxArea||(this.MAX_AREA=e>>2)}static _areGoodDims(e,t){try{const r=new OffscreenCanvas(e,t),a=r.getContext("2d");a.fillRect(0,0,1,1);const n=a.getImageData(0,0,1,1).data[3];return r.width=r.height=1,0!==n}catch{return!1}}static _guessMax(e,t,r,a){for(;e+r+1<t;){const r=Math.floor((e+t)/2),n=a||r;this._areGoodDims(r,n)?e=r:t=r}return e}static async createImage(e,t=!1){return new n(e,t)._createImage()}async _createImage(){const e=this._encodeBMP(),t=new Blob([e.buffer],{type:"image/bmp"}),r=createImageBitmap(t),{MAX_AREA:a,MAX_DIM:i}=n,{_imgData:s}=this,{width:o,height:c}=s,l=Math.max(o/i,c/i,Math.sqrt(o*c/a)),h=Math.max(l,2),u=Math.round(10*(l+1.25))/10/h,d=Math.floor(Math.log2(u)),f=new Array(d+2).fill(2);f[0]=h,f.splice(-1,1,u/(1<<d));let p=o,g=c,m=await r;for(const e of f){const t=p,r=g;p=Math.floor(p/e)-1,g=Math.floor(g/e)-1;const a=new OffscreenCanvas(p,g);a.getContext("2d").drawImage(m,0,0,t,r,0,0,p,g),m=a.transferToImageBitmap()}return s.data=null,s.bitmap=m,s.width=p,s.height=g,s}_encodeBMP(){const{width:e,height:t,kind:r}=this._imgData;let n,i=this._imgData.data,s=new Uint8Array(0),o=s,c=0;switch(r){case a.ImageKind.GRAYSCALE_1BPP:{n=1,s=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const r=e+7>>3,a=r+3&-4;if(r!==a){const e=new Uint8Array(a*t);let n=0;for(let s=0,o=t*r;s<o;s+=r,n+=a)e.set(i.subarray(s,s+r),n);i=e}break}case a.ImageKind.RGB_24BPP:if(n=24,3&e){const r=3*e,a=r+3&-4,n=a-r,s=new Uint8Array(a*t);let o=0;for(let e=0,a=t*r;e<a;e+=r){const t=i.subarray(e,e+r);for(let e=0;e<r;e+=3)s[o++]=t[e+2],s[o++]=t[e+1],s[o++]=t[e];o+=n}i=s}else for(let e=0,t=i.length;e<t;e+=3){const t=i[e];i[e]=i[e+2],i[e+2]=t}break;case a.ImageKind.RGBA_32BPP:n=32,c=3,o=new Uint8Array(68);const r=new DataView(o.buffer);a.FeatureTest.isLittleEndian?(r.setUint32(0,255,!0),r.setUint32(4,65280,!0),r.setUint32(8,16711680,!0),r.setUint32(12,4278190080,!0)):(r.setUint32(0,4278190080,!0),r.setUint32(4,16711680,!0),r.setUint32(8,65280,!0),r.setUint32(12,255,!0));break;default:throw new Error("invalid format")}let l=0;const h=40+o.length,u=14+h+s.length+i.length,d=new Uint8Array(u),f=new DataView(d.buffer);return f.setUint16(l,19778,!0),l+=2,f.setUint32(l,u,!0),l+=4,f.setUint32(l,0,!0),l+=4,f.setUint32(l,14+h+s.length,!0),l+=4,f.setUint32(l,h,!0),l+=4,f.setInt32(l,e,!0),l+=4,f.setInt32(l,-t,!0),l+=4,f.setUint16(l,1,!0),l+=2,f.setUint16(l,n,!0),l+=2,f.setUint32(l,c,!0),l+=4,f.setUint32(l,0,!0),l+=4,f.setInt32(l,0,!0),l+=4,f.setInt32(l,0,!0),l+=4,f.setUint32(l,s.length/4,!0),l+=4,f.setUint32(l,0,!0),l+=4,d.set(o,l),l+=o.length,d.set(s,l),l+=s.length,d.set(i,l),d}}t.ImageResizer=n,n._goodSquareLength=2048},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var a=r(2);const n=3285377520,i=4294901760,s=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:n,this.h2=e?4294967295&e:n}update(e){let t,r;if("string"==typeof e){t=new Uint8Array(2*e.length),r=0;for(let a=0,n=e.length;a<n;a++){const n=e.charCodeAt(a);n<=255?t[r++]=n:(t[r++]=n>>>8,t[r++]=255&n)}}else{if(!(0,a.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),r=t.byteLength}const n=r>>2,o=r-4*n,c=new Uint32Array(t.buffer,0,n);let l=0,h=0,u=this.h1,d=this.h2;const f=3432918353,p=461845907,g=11601,m=13715;for(let e=0;e<n;e++)1&e?(l=c[e],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,u^=l,u=u<<13|u>>>19,u=5*u+3864292196):(h=c[e],h=h*f&i|h*g&s,h=h<<15|h>>>17,h=h*p&i|h*m&s,d^=h,d=d<<13|d>>>19,d=5*d+3864292196);switch(l=0,o){case 3:l^=t[4*n+2]<<16;case 2:l^=t[4*n+1]<<8;case 1:l^=t[4*n],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,1&n?u^=l:d^=l}this.h1=u,this.h2=d}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&i|36045*e&s,t=4283543511*t&i|(2950163797*(t<<16|e>>>16)&i)>>>16,e^=t>>>1,e=444984403*e&i|60499*e&s,t=3301882366*t&i|(3120437893*(t<<16|e>>>16)&i)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorList=void 0;var a=r(2);function n(e,t,r,a,n){let i=e;for(let e=0,r=t.length-1;e<r;e++){const r=t[e];i=i[r]||=[]}i[t.at(-1)]={checkFn:r,iterateFn:a,processFn:n}}const i=[];n(i,[a.OPS.save,a.OPS.transform,a.OPS.paintInlineImageXObject,a.OPS.restore],null,(function(e,t){const r=e.fnArray,n=(t-(e.iCurr-3))%4;switch(n){case 0:return r[t]===a.OPS.save;case 1:return r[t]===a.OPS.transform;case 2:return r[t]===a.OPS.paintInlineImageXObject;case 3:return r[t]===a.OPS.restore}throw new Error(`iterateInlineImageGroup - invalid pos: ${n}`)}),(function(e,t){const r=e.fnArray,n=e.argsArray,i=e.iCurr,s=i-3,o=i-2,c=i-1,l=Math.min(Math.floor((t-s)/4),200);if(l<10)return t-(t-s)%4;let h=0;const u=[];let d=0,f=1,p=1;for(let e=0;e<l;e++){const t=n[o+(e<<2)],r=n[c+(e<<2)][0];f+r.width>1e3&&(h=Math.max(h,f),p+=d+2,f=0,d=0),u.push({transform:t,x:f,y:p,w:r.width,h:r.height}),f+=r.width+2,d=Math.max(d,r.height)}const g=Math.max(h,f)+1,m=p+d+1,b=new Uint8Array(g*m*4),y=g<<2;for(let e=0;e<l;e++){const t=n[c+(e<<2)][0].data,r=u[e].w<<2;let a=0,i=u[e].x+u[e].y*g<<2;b.set(t.subarray(0,r),i-y);for(let n=0,s=u[e].h;n<s;n++)b.set(t.subarray(a,a+r),i),a+=r,i+=y;for(b.set(t.subarray(a-r,a),i);i>=0;)t[i-4]=t[i],t[i-3]=t[i+1],t[i-2]=t[i+2],t[i-1]=t[i+3],t[i+r]=t[i+r-4],t[i+r+1]=t[i+r-3],t[i+r+2]=t[i+r-2],t[i+r+3]=t[i+r-1],i-=y}const v={width:g,height:m};if(e.isOffscreenCanvasSupported){const e=new OffscreenCanvas(g,m);e.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(b.buffer),g,m),0,0),v.bitmap=e.transferToImageBitmap(),v.data=null}else v.kind=a.ImageKind.RGBA_32BPP,v.data=b;return r.splice(s,4*l,a.OPS.paintInlineImageXObjectGroup),n.splice(s,4*l,[v,u]),s+1})),n(i,[a.OPS.save,a.OPS.transform,a.OPS.paintImageMaskXObject,a.OPS.restore],null,(function(e,t){const r=e.fnArray,n=(t-(e.iCurr-3))%4;switch(n){case 0:return r[t]===a.OPS.save;case 1:return r[t]===a.OPS.transform;case 2:return r[t]===a.OPS.paintImageMaskXObject;case 3:return r[t]===a.OPS.restore}throw new Error(`iterateImageMaskGroup - invalid pos: ${n}`)}),(function(e,t){const r=e.fnArray,n=e.argsArray,i=e.iCurr,s=i-3,o=i-2,c=i-1;let l=Math.floor((t-s)/4);if(l<10)return t-(t-s)%4;let h,u,d=!1;const f=n[c][0],p=n[o][0],g=n[o][1],m=n[o][2],b=n[o][3];if(g===m){d=!0,h=o+4;let e=c+4;for(let t=1;t<l;t++,h+=4,e+=4)if(u=n[h],n[e][0]!==f||u[0]!==p||u[1]!==g||u[2]!==m||u[3]!==b){t<10?d=!1:l=t;break}}if(d){l=Math.min(l,1e3);const e=new Float32Array(2*l);h=o;for(let t=0;t<l;t++,h+=4)u=n[h],e[t<<1]=u[4],e[1+(t<<1)]=u[5];r.splice(s,4*l,a.OPS.paintImageMaskXObjectRepeat),n.splice(s,4*l,[f,p,g,m,b,e])}else{l=Math.min(l,100);const e=[];for(let t=0;t<l;t++){u=n[o+(t<<2)];const r=n[c+(t<<2)][0];e.push({data:r.data,width:r.width,height:r.height,interpolate:r.interpolate,count:r.count,transform:u})}r.splice(s,4*l,a.OPS.paintImageMaskXObjectGroup),n.splice(s,4*l,[e])}return s+1})),n(i,[a.OPS.save,a.OPS.transform,a.OPS.paintImageXObject,a.OPS.restore],(function(e){const t=e.argsArray,r=e.iCurr-2;return 0===t[r][1]&&0===t[r][2]}),(function(e,t){const r=e.fnArray,n=e.argsArray,i=(t-(e.iCurr-3))%4;switch(i){case 0:return r[t]===a.OPS.save;case 1:if(r[t]!==a.OPS.transform)return!1;const i=e.iCurr-2,s=n[i][0],o=n[i][3];return n[t][0]===s&&0===n[t][1]&&0===n[t][2]&&n[t][3]===o;case 2:if(r[t]!==a.OPS.paintImageXObject)return!1;const c=n[e.iCurr-1][0];return n[t][0]===c;case 3:return r[t]===a.OPS.restore}throw new Error(`iterateImageGroup - invalid pos: ${i}`)}),(function(e,t){const r=e.fnArray,n=e.argsArray,i=e.iCurr,s=i-3,o=i-2,c=n[i-1][0],l=n[o][0],h=n[o][3],u=Math.min(Math.floor((t-s)/4),1e3);if(u<3)return t-(t-s)%4;const d=new Float32Array(2*u);let f=o;for(let e=0;e<u;e++,f+=4){const t=n[f];d[e<<1]=t[4],d[1+(e<<1)]=t[5]}const p=[c,l,h,d];return r.splice(s,4*u,a.OPS.paintImageXObjectRepeat),n.splice(s,4*u,p),s+1})),n(i,[a.OPS.beginText,a.OPS.setFont,a.OPS.setTextMatrix,a.OPS.showText,a.OPS.endText],null,(function(e,t){const r=e.fnArray,n=e.argsArray,i=(t-(e.iCurr-4))%5;switch(i){case 0:return r[t]===a.OPS.beginText;case 1:return r[t]===a.OPS.setFont;case 2:return r[t]===a.OPS.setTextMatrix;case 3:if(r[t]!==a.OPS.showText)return!1;const i=e.iCurr-3,s=n[i][0],o=n[i][1];return n[t][0]===s&&n[t][1]===o;case 4:return r[t]===a.OPS.endText}throw new Error(`iterateShowTextGroup - invalid pos: ${i}`)}),(function(e,t){const r=e.fnArray,a=e.argsArray,n=e.iCurr,i=n-4,s=n-3,o=n-2,c=n-1,l=n,h=a[s][0],u=a[s][1];let d=Math.min(Math.floor((t-i)/5),1e3);if(d<3)return t-(t-i)%5;let f=i;i>=4&&r[i-4]===r[s]&&r[i-3]===r[o]&&r[i-2]===r[c]&&r[i-1]===r[l]&&a[i-4][0]===h&&a[i-4][1]===u&&(d++,f-=5);let p=f+4;for(let e=1;e<d;e++)r.splice(p,3),a.splice(p,3),p+=2;return p+1}));class s{constructor(e){this.queue=e}_optimize(){}push(e,t){this.queue.fnArray.push(e),this.queue.argsArray.push(t),this._optimize()}flush(){}reset(){}}class o extends s{constructor(e){super(e),this.state=null,this.context={iCurr:0,fnArray:e.fnArray,argsArray:e.argsArray,isOffscreenCanvasSupported:!1},this.match=null,this.lastProcessed=0}set isOffscreenCanvasSupported(e){this.context.isOffscreenCanvasSupported=e}_optimize(){const e=this.queue.fnArray;let t=this.lastProcessed,r=e.length,a=this.state,n=this.match;if(!a&&!n&&t+1===r&&!i[e[t]])return void(this.lastProcessed=r);const s=this.context;for(;t<r;){if(n){if((0,n.iterateFn)(s,t)){t++;continue}if(t=(0,n.processFn)(s,t+1),r=e.length,n=null,a=null,t>=r)break}a=(a||i)[e[t]],a&&!Array.isArray(a)?(s.iCurr=t,t++,!a.checkFn||(0,a.checkFn)(s)?(n=a,a=null):a=null):t++}this.state=a,this.match=n,this.lastProcessed=t}flush(){for(;this.match;){const e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e),this.match=null,this.state=null,this._optimize()}}reset(){this.state=null,this.match=null,this.lastProcessed=0}}class c{static CHUNK_SIZE=1e3;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;constructor(e=0,t){this._streamSink=t,this.fnArray=[],this.argsArray=[],this.optimizer=!t||e&a.RenderingIntentFlag.OPLIST?new s(this):new o(this),this.dependencies=new Set,this._totalLength=0,this.weight=0,this._resolved=t?null:Promise.resolve()}set isOffscreenCanvasSupported(e){this.optimizer.isOffscreenCanvasSupported=e}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addOp(e,t){this.optimizer.push(e,t),this.weight++,this._streamSink&&(this.weight>=c.CHUNK_SIZE||this.weight>=c.CHUNK_SIZE_ABOUT&&(e===a.OPS.restore||e===a.OPS.endText))&&this.flush()}addImageOps(e,t,r){void 0!==r&&this.addOp(a.OPS.beginMarkedContentProps,["OC",r]),this.addOp(e,t),void 0!==r&&this.addOp(a.OPS.endMarkedContent,[])}addDependency(e){this.dependencies.has(e)||(this.dependencies.add(e),this.addOp(a.OPS.dependency,[e]))}addDependencies(e){for(const t of e)this.addDependency(t)}addOpList(e){if(e instanceof c){for(const t of e.dependencies)this.dependencies.add(t);for(let t=0,r=e.length;t<r;t++)this.addOp(e.fnArray[t],e.argsArray[t])}else(0,a.warn)('addOpList - ignoring invalid "opList" parameter.')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){const e=[],{fnArray:t,argsArray:r,length:n}=this;for(let i=0;i<n;i++)switch(t[i]){case a.OPS.paintInlineImageXObject:case a.OPS.paintInlineImageXObjectGroup:case a.OPS.paintImageMaskXObject:const t=r[i][0];!t.cached&&t.data?.buffer instanceof ArrayBuffer&&e.push(t.data.buffer)}return e}flush(e=!1,t=null){this.optimizer.flush();const r=this.length;this._totalLength+=r,this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:r},1,this._transfers),this.dependencies.clear(),this.fnArray.length=0,this.argsArray.length=0,this.weight=0,this.optimizer.reset()}}t.OperatorList=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFImage=void 0;var a=r(2),n=r(28),i=r(5),s=r(12),o=r(18),c=r(62),l=r(26),h=r(30),u=r(4);function d(e,t,r,a){return(e=t+e*r)<0?e=0:e>a&&(e=a),e}function f(e,t,r,a,n,i){const s=n*i;let o;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);const c=r/n,l=a/i;let h,u,d,f,p=0;const g=new Uint16Array(n),m=r;for(h=0;h<n;h++)g[h]=Math.floor(h*c);for(h=0;h<i;h++)for(d=Math.floor(h*l)*m,u=0;u<n;u++)f=d+g[u],o[p++]=e[f];return o}class p{constructor({xref:e,res:t,image:r,isInline:n=!1,smask:o=null,mask:c=null,isMask:l=!1,pdfFunctionFactory:d,localColorSpaceCache:f}){this.image=r;const g=r.dict,m=g.get("F","Filter");let b;if(m instanceof u.Name)b=m.name;else if(Array.isArray(m)){const t=e.fetchIfRef(m[0]);t instanceof u.Name&&(b=t.name)}switch(b){case"JPXDecode":const e=new h.JpxImage;e.parseImageProperties(r.stream),r.stream.reset(),r.width=e.width,r.height=e.height,r.bitsPerComponent=e.bitsPerComponent,r.numComps=e.componentsCount;break;case"JBIG2Decode":r.bitsPerComponent=1,r.numComps=1}let y=g.get("W","Width"),v=g.get("H","Height");if(Number.isInteger(r.width)&&r.width>0&&Number.isInteger(r.height)&&r.height>0&&(r.width!==y||r.height!==v)&&((0,a.warn)("PDFImage - using the Width/Height of the image data, rather than the image dictionary."),y=r.width,v=r.height),y<1||v<1)throw new a.FormatError(`Invalid image width: ${y} or height: ${v}`);this.width=y,this.height=v,this.interpolate=g.get("I","Interpolate"),this.imageMask=g.get("IM","ImageMask")||!1,this.matte=g.get("Matte")||!1;let w=r.bitsPerComponent;if(!w&&(w=g.get("BPC","BitsPerComponent"),!w)){if(!this.imageMask)throw new a.FormatError(`Bits per component missing in image: ${this.imageMask}`);w=1}if(this.bpc=w,!this.imageMask){let i=g.getRaw("CS")||g.getRaw("ColorSpace");if(!i)switch((0,a.info)("JPX images (which do not require color spaces)"),r.numComps){case 1:i=u.Name.get("DeviceGray");break;case 3:i=u.Name.get("DeviceRGB");break;case 4:i=u.Name.get("DeviceCMYK");break;default:throw new Error(`JPX images with ${r.numComps} color components not supported.`)}this.colorSpace=s.ColorSpace.parse({cs:i,xref:e,resources:n?t:null,pdfFunctionFactory:d,localColorSpaceCache:f}),this.numComps=this.colorSpace.numComps}if(this.decode=g.getArray("D","Decode"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,w)||l&&!s.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<<w)-1;this.decodeCoefficients=[],this.decodeAddends=[];const t="Indexed"===this.colorSpace?.name;for(let r=0,a=0;r<this.decode.length;r+=2,++a){const n=this.decode[r],i=this.decode[r+1];this.decodeCoefficients[a]=t?(i-n)/e:i-n,this.decodeAddends[a]=t?n:e*n}}o?this.smask=new p({xref:e,res:t,image:o,isInline:n,pdfFunctionFactory:d,localColorSpaceCache:f}):c&&(c instanceof i.BaseStream?c.dict.get("IM","ImageMask")?this.mask=new p({xref:e,res:t,image:c,isInline:n,isMask:!0,pdfFunctionFactory:d,localColorSpaceCache:f}):(0,a.warn)("Ignoring /Mask in image without /ImageMask."):this.mask=c)}static async buildImage({xref:e,res:t,image:r,isInline:n=!1,pdfFunctionFactory:s,localColorSpaceCache:o}){const c=r;let l=null,h=null;const u=r.dict.get("SMask"),d=r.dict.get("Mask");return u?u instanceof i.BaseStream?l=u:(0,a.warn)("Unsupported /SMask format."):d&&(d instanceof i.BaseStream||Array.isArray(d)?h=d:(0,a.warn)("Unsupported /Mask format.")),new p({xref:e,res:t,image:c,isInline:n,smask:l,mask:h,pdfFunctionFactory:s,localColorSpaceCache:o})}static createRawMask({imgArray:e,width:t,height:r,imageIsFromDecodeStream:a,inverseDecode:n,interpolate:i}){const s=(t+7>>3)*r,o=e.byteLength;let c,l;if(!a||n&&s!==o?n?(c=new Uint8Array(s),c.set(e),c.fill(255,o)):c=new Uint8Array(e):c=e,n)for(l=0;l<o;l++)c[l]^=255;return{data:c,width:t,height:r,interpolate:i}}static async createMask({imgArray:e,width:t,height:r,imageIsFromDecodeStream:i,inverseDecode:s,interpolate:o,isOffscreenCanvasSupported:l=!1}){const h=1===t&&1===r&&s===(0===e.length||!!(128&e[0]));if(h)return{isSingleOpaquePixel:h};if(l){if(c.ImageResizer.needsToBeResized(t,r)){const i=new Uint8ClampedArray(t*r*4);return(0,n.convertBlackAndWhiteToRGBA)({src:e,dest:i,width:t,height:r,nonBlackColor:0,inverseDecode:s}),c.ImageResizer.createImage({kind:a.ImageKind.RGBA_32BPP,data:i,width:t,height:r,interpolate:o})}const i=new OffscreenCanvas(t,r),l=i.getContext("2d"),h=l.createImageData(t,r);return(0,n.convertBlackAndWhiteToRGBA)({src:e,dest:h.data,width:t,height:r,nonBlackColor:0,inverseDecode:s}),l.putImageData(h,0,0),{data:null,width:t,height:r,interpolate:o,bitmap:i.transferToImageBitmap()}}return this.createRawMask({imgArray:e,width:t,height:r,inverseDecode:s,imageIsFromDecodeStream:i,interpolate:o})}get drawWidth(){return Math.max(this.width,this.smask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(e){const t=this.bpc,r=this.numComps,a=this.decodeAddends,n=this.decodeCoefficients,i=(1<<t)-1;let s,o;if(1===t){for(s=0,o=e.length;s<o;s++)e[s]=+!e[s];return}let c=0;for(s=0,o=this.width*this.height;s<o;s++)for(let t=0;t<r;t++)e[c]=d(e[c],a[t],n[t],i),c++}getComponents(e){const t=this.bpc;if(8===t)return e;const r=this.width,a=this.height,n=this.numComps,i=r*a*n;let s,o=0;s=t<=8?new Uint8Array(i):t<=16?new Uint16Array(i):new Uint32Array(i);const c=r*n,l=(1<<t)-1;let h,u,d=0;if(1===t){let t,r,n;for(let i=0;i<a;i++){for(r=d+(-8&c),n=d+c;d<r;)u=e[o++],s[d]=u>>7&1,s[d+1]=u>>6&1,s[d+2]=u>>5&1,s[d+3]=u>>4&1,s[d+4]=u>>3&1,s[d+5]=u>>2&1,s[d+6]=u>>1&1,s[d+7]=1&u,d+=8;if(d<n)for(u=e[o++],t=128;d<n;)s[d++]=+!!(u&t),t>>=1}}else{let r=0;for(u=0,d=0,h=i;d<h;++d){for(d%c==0&&(u=0,r=0);r<t;)u=u<<8|e[o++],r+=8;const a=r-t;let n=u>>a;n<0?n=0:n>l&&(n=l),s[d]=n,u&=(1<<a)-1,r=a}}return s}fillOpacity(e,t,r,n,i){const s=this.smask,o=this.mask;let c,l,h,u,d,g;if(s)l=s.width,h=s.height,c=new Uint8ClampedArray(l*h),s.fillGrayBuffer(c),l===t&&h===r||(c=f(c,s.bpc,l,h,t,r));else if(o)if(o instanceof p){for(l=o.width,h=o.height,c=new Uint8ClampedArray(l*h),o.numComps=1,o.fillGrayBuffer(c),u=0,d=l*h;u<d;++u)c[u]=255-c[u];l===t&&h===r||(c=f(c,o.bpc,l,h,t,r))}else{if(!Array.isArray(o))throw new a.FormatError("Unknown mask format.");{c=new Uint8ClampedArray(t*r);const e=this.numComps;for(u=0,d=t*r;u<d;++u){let t=0;const r=u*e;for(g=0;g<e;++g){const e=i[r+g],a=2*g;if(e<o[a]||e>o[a+1]){t=255;break}}c[u]=t}}}if(c)for(u=0,g=3,d=t*n;u<d;++u,g+=4)e[g]=c[u];else for(u=0,g=3,d=t*n;u<d;++u,g+=4)e[g]=255}undoPreblend(e,t,r){const a=this.smask?.matte;if(!a)return;const n=this.colorSpace.getRgb(a,0),i=n[0],s=n[1],o=n[2],c=t*r*4;for(let t=0;t<c;t+=4){const r=e[t+3];if(0===r){e[t]=255,e[t+1]=255,e[t+2]=255;continue}const a=255/r;e[t]=(e[t]-i)*a+i,e[t+1]=(e[t+1]-s)*a+s,e[t+2]=(e[t+2]-o)*a+o}}async createImageData(e=!1,t=!1){const r=this.drawWidth,n=this.drawHeight,i={width:r,height:n,interpolate:this.interpolate,kind:0,data:null},s=this.numComps,o=this.width,h=this.height,u=this.bpc,d=o*s*u+7>>3,f=t&&c.ImageResizer.needsToBeResized(r,n);if(!e){let e;if("DeviceGray"===this.colorSpace.name&&1===u?e=a.ImageKind.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==u||this.needsDecode||(e=a.ImageKind.RGB_24BPP),e&&!this.smask&&!this.mask&&r===o&&n===h){const s=this.getImageBytes(h*d,{});if(t)return f?c.ImageResizer.createImage({data:s,kind:e,width:r,height:n,interpolate:this.interpolate},this.needsDecode):this.createBitmap(e,o,h,s);if(i.kind=e,i.data=s,this.needsDecode){(0,a.assert)(e===a.ImageKind.GRAYSCALE_1BPP,"PDFImage.createImageData: The image must be grayscale.");const t=i.data;for(let e=0,r=t.length;e<r;e++)t[e]^=255}return i}if(this.image instanceof l.JpegStream&&!this.smask&&!this.mask&&!this.needsDecode){let e=h*d;if(t&&!f){let t=!1;switch(this.colorSpace.name){case"DeviceGray":e*=4,t=!0;break;case"DeviceRGB":e=e/3*4,t=!0;break;case"DeviceCMYK":t=!0}if(t){const t=this.getImageBytes(e,{drawWidth:r,drawHeight:n,forceRGBA:!0});return this.createBitmap(a.ImageKind.RGBA_32BPP,r,n,t)}}else switch(this.colorSpace.name){case"DeviceGray":e*=3;case"DeviceRGB":case"DeviceCMYK":return i.kind=a.ImageKind.RGB_24BPP,i.data=this.getImageBytes(e,{drawWidth:r,drawHeight:n,forceRGB:!0}),f?c.ImageResizer.createImage(i):i}}}const p=this.getImageBytes(h*d,{internal:!0}),g=0|p.length/d*n/h,m=this.getComponents(p);let b,y,v,w,A,S;return t&&!f&&(v=new OffscreenCanvas(r,n),w=v.getContext("2d"),A=w.createImageData(r,n),S=A.data),i.kind=a.ImageKind.RGBA_32BPP,e||this.smask||this.mask?(t&&!f||(S=new Uint8ClampedArray(r*n*4)),b=1,y=!0,this.fillOpacity(S,r,n,g,m)):(!t||f?(i.kind=a.ImageKind.RGB_24BPP,S=new Uint8ClampedArray(r*n*3),b=0):(new Uint32Array(S.buffer).fill(a.FeatureTest.isLittleEndian?4278190080:255),b=1),y=!1),this.needsDecode&&this.decodeBuffer(m),this.colorSpace.fillRgb(S,o,h,r,n,g,u,m,b),y&&this.undoPreblend(S,r,g),t&&!f?(w.putImageData(A,0,0),{data:null,width:r,height:n,bitmap:v.transferToImageBitmap(),interpolate:this.interpolate}):(i.data=S,f?c.ImageResizer.createImage(i):i)}fillGrayBuffer(e){const t=this.numComps;if(1!==t)throw new a.FormatError(`Reading gray scale from a color image: ${t}`);const r=this.width,n=this.height,i=this.bpc,s=r*t*i+7>>3,o=this.getImageBytes(n*s,{internal:!0}),c=this.getComponents(o);let l,h;if(1===i){if(h=r*n,this.needsDecode)for(l=0;l<h;++l)e[l]=c[l]-1&255;else for(l=0;l<h;++l)e[l]=255&-c[l];return}this.needsDecode&&this.decodeBuffer(c),h=r*n;const u=255/((1<<i)-1);for(l=0;l<h;++l)e[l]=u*c[l]}createBitmap(e,t,r,i){const s=new OffscreenCanvas(t,r),o=s.getContext("2d");let c;return e===a.ImageKind.RGBA_32BPP?c=new ImageData(i,t,r):(c=o.createImageData(t,r),(0,n.convertToRGBA)({kind:e,src:i,dest:new Uint32Array(c.data.buffer),width:t,height:r,inverseDecode:this.needsDecode})),o.putImageData(c,0,0),{data:null,width:t,height:r,bitmap:s.transferToImageBitmap(),interpolate:this.interpolate}}getImageBytes(e,{drawWidth:t,drawHeight:r,forceRGBA:n=!1,forceRGB:i=!1,internal:s=!1}){this.image.reset(),this.image.drawWidth=t||this.width,this.image.drawHeight=r||this.height,this.image.forceRGBA=!!n,this.image.forceRGB=!!i;const c=this.image.getBytes(e);return s||this.image instanceof o.DecodeStream?c:((0,a.assert)(c instanceof Uint8Array,'PDFImage.getImageBytes: Unsupported "imageBytes" type.'),new Uint8Array(c))}}t.PDFImage=p},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Catalog=void 0;var a=r(3),n=r(2),i=r(4),s=r(67),o=r(5),c=r(68),l=r(12),h=r(69),u=r(59),d=r(70),f=r(72);function p(e){return e instanceof i.Dict&&(e=e.get("D")),Array.isArray(e)?e:null}class g{constructor(e,t){if(this.pdfManager=e,this.xref=t,this._catDict=t.getCatalogObj(),!(this._catDict instanceof i.Dict))throw new n.FormatError("Catalog object is not a dictionary.");this.toplevelPagesDict,this._actualNumPages=null,this.fontCache=new i.RefSetCache,this.builtInCMapCache=new Map,this.standardFontDataCache=new Map,this.globalImageCache=new u.GlobalImageCache,this.pageKidsCountCache=new i.RefSetCache,this.pageIndexCache=new i.RefSetCache,this.nonBlendModesSet=new i.RefSet,this.systemFontCache=new Map}cloneDict(){return this._catDict.clone()}get version(){const e=this._catDict.get("Version");if(e instanceof i.Name){if(a.PDF_VERSION_REGEXP.test(e.name))return(0,n.shadow)(this,"version",e.name);(0,n.warn)(`Invalid PDF catalog version: ${e.name}`)}return(0,n.shadow)(this,"version",null)}get lang(){const e=this._catDict.get("Lang");return(0,n.shadow)(this,"lang","string"==typeof e?(0,n.stringToPDFString)(e):null)}get needsRendering(){const e=this._catDict.get("NeedsRendering");return(0,n.shadow)(this,"needsRendering","boolean"==typeof e&&e)}get collection(){let e=null;try{const t=this._catDict.get("Collection");t instanceof i.Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.info)("Cannot fetch Collection entry; assuming no collection is present.")}return(0,n.shadow)(this,"collection",e)}get acroForm(){let e=null;try{const t=this._catDict.get("AcroForm");t instanceof i.Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.info)("Cannot fetch AcroForm entry; assuming no forms are present.")}return(0,n.shadow)(this,"acroForm",e)}get acroFormRef(){const e=this._catDict.getRaw("AcroForm");return(0,n.shadow)(this,"acroFormRef",e instanceof i.Ref?e:null)}get metadata(){const e=this._catDict.getRaw("Metadata");if(!(e instanceof i.Ref))return(0,n.shadow)(this,"metadata",null);let t=null;try{const r=this.xref.fetch(e,!this.xref.encrypt?.encryptMetadata);if(r instanceof o.BaseStream&&r.dict instanceof i.Dict){const e=r.dict.get("Type"),a=r.dict.get("Subtype");if((0,i.isName)(e,"Metadata")&&(0,i.isName)(a,"XML")){const e=(0,n.stringToUTF8String)(r.getString());e&&(t=new d.MetadataParser(e).serializable)}}}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.info)(`Skipping invalid Metadata: "${e}".`)}return(0,n.shadow)(this,"metadata",t)}get markInfo(){let e=null;try{e=this._readMarkInfo()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.warn)("Unable to read mark info.")}return(0,n.shadow)(this,"markInfo",e)}_readMarkInfo(){const e=this._catDict.get("MarkInfo");if(!(e instanceof i.Dict))return null;const t={Marked:!1,UserProperties:!1,Suspects:!1};for(const r in t){const a=e.get(r);"boolean"==typeof a&&(t[r]=a)}return t}get structTreeRoot(){let e=null;try{e=this._readStructTreeRoot()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.warn)("Unable read to structTreeRoot info.")}return(0,n.shadow)(this,"structTreeRoot",e)}_readStructTreeRoot(){const e=this._catDict.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof i.Dict))return null;const r=new f.StructTreeRoot(t,e);return r.init(),r}get toplevelPagesDict(){const e=this._catDict.get("Pages");if(!(e instanceof i.Dict))throw new n.FormatError("Invalid top-level pages dictionary.");return(0,n.shadow)(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this._readDocumentOutline()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.warn)("Unable to read document outline.")}return(0,n.shadow)(this,"documentOutline",e)}_readDocumentOutline(){let e=this._catDict.get("Outlines");if(!(e instanceof i.Dict))return null;if(e=e.getRaw("First"),!(e instanceof i.Ref))return null;const t={items:[]},r=[{obj:e,parent:t}],a=new i.RefSet;a.put(e);const s=this.xref,o=new Uint8ClampedArray(3);for(;r.length>0;){const t=r.shift(),c=s.fetchIfRef(t.obj);if(null===c)continue;if(!c.has("Title"))throw new n.FormatError("Invalid outline item encountered.");const h={url:null,dest:null,action:null};g.parseDestDictionary({destDict:c,resultObj:h,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const u=c.get("Title"),d=c.get("F")||0,f=c.getArray("C"),p=c.get("Count");let m=o;!Array.isArray(f)||3!==f.length||0===f[0]&&0===f[1]&&0===f[2]||(m=l.ColorSpace.singletons.rgb.getRgb(f,0));const b={action:h.action,attachment:h.attachment,dest:h.dest,url:h.url,unsafeUrl:h.unsafeUrl,newWindow:h.newWindow,setOCGState:h.setOCGState,title:(0,n.stringToPDFString)(u),color:m,count:Number.isInteger(p)?p:void 0,bold:!!(2&d),italic:!!(1&d),items:[]};t.parent.items.push(b),e=c.getRaw("First"),e instanceof i.Ref&&!a.has(e)&&(r.push({obj:e,parent:b}),a.put(e)),e=c.getRaw("Next"),e instanceof i.Ref&&!a.has(e)&&(r.push({obj:e,parent:t.parent}),a.put(e))}return t.items.length>0?t.items:null}get permissions(){let e=null;try{e=this._readPermissions()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.warn)("Unable to read permissions.")}return(0,n.shadow)(this,"permissions",e)}_readPermissions(){const e=this.xref.trailer.get("Encrypt");if(!(e instanceof i.Dict))return null;let t=e.get("P");if("number"!=typeof t)return null;t+=2**32;const r=[];for(const e in n.PermissionFlag){const a=n.PermissionFlag[e];t&a&&r.push(a)}return r}get optionalContentConfig(){let e=null;try{const t=this._catDict.get("OCProperties");if(!t)return(0,n.shadow)(this,"optionalContentConfig",null);const r=t.get("D");if(!r)return(0,n.shadow)(this,"optionalContentConfig",null);const a=t.get("OCGs");if(!Array.isArray(a))return(0,n.shadow)(this,"optionalContentConfig",null);const s=[],o=[];for(const e of a){if(!(e instanceof i.Ref))continue;o.push(e);const t=this.xref.fetchIfRef(e);s.push({id:e.toString(),name:"string"==typeof t.get("Name")?(0,n.stringToPDFString)(t.get("Name")):null,intent:"string"==typeof t.get("Intent")?(0,n.stringToPDFString)(t.get("Intent")):null})}e=this._readOptionalContentConfig(r,o),e.groups=s}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.warn)(`Unable to read optional content config: ${e}`)}return(0,n.shadow)(this,"optionalContentConfig",e)}_readOptionalContentConfig(e,t){function r(e){const r=[];if(Array.isArray(e))for(const a of e)a instanceof i.Ref&&t.includes(a)&&r.push(a.toString());return r}function a(e,r=0){if(!Array.isArray(e))return null;const a=[];for(const n of e){if(n instanceof i.Ref&&t.includes(n)){c.put(n),a.push(n.toString());continue}const e=s(n,r);e&&a.push(e)}if(r>0)return a;const n=[];for(const e of t)c.has(e)||n.push(e.toString());return n.length&&a.push({name:null,order:n}),a}function s(e,t){if(++t>l)return(0,n.warn)("parseNestedOrder - reached MAX_NESTED_LEVELS."),null;const r=o.fetchIfRef(e);if(!Array.isArray(r))return null;const i=o.fetchIfRef(r[0]);if("string"!=typeof i)return null;const s=a(r.slice(1),t);return s&&s.length?{name:(0,n.stringToPDFString)(i),order:s}:null}const o=this.xref,c=new i.RefSet,l=10;return{name:"string"==typeof e.get("Name")?(0,n.stringToPDFString)(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?(0,n.stringToPDFString)(e.get("Creator")):null,baseState:e.get("BaseState")instanceof i.Name?e.get("BaseState").name:null,on:r(e.get("ON")),off:r(e.get("OFF")),order:a(e.get("Order")),groups:null}}setActualNumPages(e=null){this._actualNumPages=e}get hasActualNumPages(){return null!==this._actualNumPages}get _pagesCount(){const e=this.toplevelPagesDict.get("Count");if(!Number.isInteger(e))throw new n.FormatError("Page count in top-level pages dictionary is not an integer.");return(0,n.shadow)(this,"_pagesCount",e)}get numPages(){return this.hasActualNumPages?this._actualNumPages:this._pagesCount}get destinations(){const e=this._readDests(),t=Object.create(null);if(e instanceof s.NameTree)for(const[r,a]of e.getAll()){const e=p(a);e&&(t[(0,n.stringToPDFString)(r)]=e)}else e instanceof i.Dict&&e.forEach((function(e,r){const a=p(r);a&&(t[e]=a)}));return(0,n.shadow)(this,"destinations",t)}getDestination(e){const t=this._readDests();if(t instanceof s.NameTree){const r=p(t.get(e));if(r)return r;const a=this.destinations[e];if(a)return(0,n.warn)(`Found "${e}" at an incorrect position in the NameTree.`),a}else if(t instanceof i.Dict){const r=p(t.get(e));if(r)return r}return null}_readDests(){const e=this._catDict.get("Names");return e?.has("Dests")?new s.NameTree(e.getRaw("Dests"),this.xref):this._catDict.has("Dests")?this._catDict.get("Dests"):void 0}get pageLabels(){let e=null;try{e=this._readPageLabels()}catch(e){if(e instanceof a.MissingDataException)throw e;(0,n.warn)("Unable to read page labels.")}return(0,n.shadow)(this,"pageLabels",e)}_readPageLabels(){const e=this._catDict.getRaw("PageLabels");if(!e)return null;const t=new Array(this.numPages);let r=null,o="";const c=new s.NumberTree(e,this.xref).getAll();let l="",h=1;for(let e=0,s=this.numPages;e<s;e++){const s=c.get(e);if(void 0!==s){if(!(s instanceof i.Dict))throw new n.FormatError("PageLabel is not a dictionary.");if(s.has("Type")&&!(0,i.isName)(s.get("Type"),"PageLabel"))throw new n.FormatError("Invalid type in PageLabel dictionary.");if(s.has("S")){const e=s.get("S");if(!(e instanceof i.Name))throw new n.FormatError("Invalid style in PageLabel dictionary.");r=e.name}else r=null;if(s.has("P")){const e=s.get("P");if("string"!=typeof e)throw new n.FormatError("Invalid prefix in PageLabel dictionary.");o=(0,n.stringToPDFString)(e)}else o="";if(s.has("St")){const e=s.get("St");if(!(Number.isInteger(e)&&e>=1))throw new n.FormatError("Invalid start in PageLabel dictionary.");h=e}else h=1}switch(r){case"D":l=h;break;case"R":case"r":l=(0,a.toRomanNumerals)(h,"r"===r);break;case"A":case"a":const e=26,t="a"===r?97:65,i=h-1;l=String.fromCharCode(t+i%e).repeat(Math.floor(i/e)+1);break;default:if(r)throw new n.FormatError(`Invalid style "${r}" in PageLabel dictionary.`);l=""}t[e]=o+l,h++}return t}get pageLayout(){const e=this._catDict.get("PageLayout");let t="";if(e instanceof i.Name)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"TwoColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return(0,n.shadow)(this,"pageLayout",t)}get pageMode(){const e=this._catDict.get("PageMode");let t="UseNone";if(e instanceof i.Name)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return(0,n.shadow)(this,"pageMode",t)}get viewerPreferences(){const e=this._catDict.get("ViewerPreferences");if(!(e instanceof i.Dict))return(0,n.shadow)(this,"viewerPreferences",null);let t=null;for(const r of e.getKeys()){const a=e.get(r);let s;switch(r){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof a&&(s=a);break;case"NonFullScreenPageMode":if(a instanceof i.Name)switch(a.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":s=a.name;break;default:s="UseNone"}break;case"Direction":if(a instanceof i.Name)switch(a.name){case"L2R":case"R2L":s=a.name;break;default:s="L2R"}break;case"ViewArea":case"ViewClip":case"PrintArea":case"PrintClip":if(a instanceof i.Name)switch(a.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":s=a.name;break;default:s="CropBox"}break;case"PrintScaling":if(a instanceof i.Name)switch(a.name){case"None":case"AppDefault":s=a.name;break;default:s="AppDefault"}break;case"Duplex":if(a instanceof i.Name)switch(a.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":s=a.name;break;default:s="None"}break;case"PrintPageRange":Array.isArray(a)&&a.length%2==0&&a.every(((e,t,r)=>Number.isInteger(e)&&e>0&&(0===t||e>=r[t-1])&&e<=this.numPages))&&(s=a);break;case"NumCopies":Number.isInteger(a)&&a>0&&(s=a);break;default:(0,n.warn)(`Ignoring non-standard key in ViewerPreferences: ${r}.`);continue}void 0!==s?(t||(t=Object.create(null)),t[r]=s):(0,n.warn)(`Bad value, for key "${r}", in ViewerPreferences: ${a}.`)}return(0,n.shadow)(this,"viewerPreferences",t)}get openAction(){const e=this._catDict.get("OpenAction"),t=Object.create(null);if(e instanceof i.Dict){const r=new i.Dict(this.xref);r.set("A",e);const a={url:null,dest:null,action:null};g.parseDestDictionary({destDict:r,resultObj:a}),Array.isArray(a.dest)?t.dest=a.dest:a.action&&(t.action=a.action)}else Array.isArray(e)&&(t.dest=e);return(0,n.shadow)(this,"openAction",(0,n.objectSize)(t)>0?t:null)}get attachments(){const e=this._catDict.get("Names");let t=null;if(e instanceof i.Dict&&e.has("EmbeddedFiles")){const r=new s.NameTree(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,a]of r.getAll()){const r=new h.FileSpec(a,this.xref);t||(t=Object.create(null)),t[(0,n.stringToPDFString)(e)]=r.serializable}}return(0,n.shadow)(this,"attachments",t)}get xfaImages(){const e=this._catDict.get("Names");let t=null;if(e instanceof i.Dict&&e.has("XFAImages")){const r=new s.NameTree(e.getRaw("XFAImages"),this.xref);for(const[e,a]of r.getAll())t||(t=new i.Dict(this.xref)),t.set((0,n.stringToPDFString)(e),a)}return(0,n.shadow)(this,"xfaImages",t)}_collectJavaScript(){const e=this._catDict.get("Names");let t=null;function r(e,r){if(!(r instanceof i.Dict))return;if(!(0,i.isName)(r.get("S"),"JavaScript"))return;let a=r.get("JS");if(a instanceof o.BaseStream)a=a.getString();else if("string"!=typeof a)return;a=(0,n.stringToPDFString)(a).replaceAll("\0",""),a&&(t||=new Map).set(e,a)}if(e instanceof i.Dict&&e.has("JavaScript")){const t=new s.NameTree(e.getRaw("JavaScript"),this.xref);for(const[e,a]of t.getAll())r((0,n.stringToPDFString)(e),a)}const a=this._catDict.get("OpenAction");return a&&r("OpenAction",a),t}get jsActions(){const e=this._collectJavaScript();let t=(0,a.collectActions)(this.xref,this._catDict,n.DocumentActionEventType);if(e){t||=Object.create(null);for(const[r,a]of e)r in t?t[r].push(a):t[r]=[a]}return(0,n.shadow)(this,"jsActions",t)}async fontFallback(e,t){const r=await Promise.all(this.fontCache);for(const a of r)if(a.loadedName===e)return void a.fallback(t)}async cleanup(e=!1){(0,c.clearGlobalCaches)(),this.globalImageCache.clear(e),this.pageKidsCountCache.clear(),this.pageIndexCache.clear(),this.nonBlendModesSet.clear();const t=await Promise.all(this.fontCache);for(const{dict:e}of t)delete e.cacheKey;this.fontCache.clear(),this.builtInCMapCache.clear(),this.standardFontDataCache.clear(),this.systemFontCache.clear()}async getPageDict(e){const t=[this.toplevelPagesDict],r=new i.RefSet,a=this._catDict.getRaw("Pages");a instanceof i.Ref&&r.put(a);const s=this.xref,o=this.pageKidsCountCache,c=this.pageIndexCache;let l=0;for(;t.length;){const a=t.pop();if(a instanceof i.Ref){const h=o.get(a);if(h>=0&&l+h<=e){l+=h;continue}if(r.has(a))throw new n.FormatError("Pages tree contains circular reference.");r.put(a);const u=await s.fetchAsync(a);if(u instanceof i.Dict){let t=u.getRaw("Type");if(t instanceof i.Ref&&(t=await s.fetchAsync(t)),(0,i.isName)(t,"Page")||!u.has("Kids")){if(o.has(a)||o.put(a,1),c.has(a)||c.put(a,l),l===e)return[u,a];l++;continue}}t.push(u);continue}if(!(a instanceof i.Dict))throw new n.FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:h}=a;let u=a.getRaw("Count");if(u instanceof i.Ref&&(u=await s.fetchAsync(u)),Number.isInteger(u)&&u>=0&&(h&&!o.has(h)&&o.put(h,u),l+u<=e)){l+=u;continue}let d=a.getRaw("Kids");if(d instanceof i.Ref&&(d=await s.fetchAsync(d)),!Array.isArray(d)){let t=a.getRaw("Type");if(t instanceof i.Ref&&(t=await s.fetchAsync(t)),(0,i.isName)(t,"Page")||!a.has("Kids")){if(l===e)return[a,null];l++;continue}throw new n.FormatError("Page dictionary kids object is not an array.")}for(let e=d.length-1;e>=0;e--)t.push(d[e])}throw new Error(`Page index ${e} not found.`)}async getAllPageDicts(e=!1){const{ignoreErrors:t}=this.pdfManager.evaluatorOptions,r=[{currentNode:this.toplevelPagesDict,posInKids:0}],s=new i.RefSet,o=this._catDict.getRaw("Pages");o instanceof i.Ref&&s.put(o);const c=new Map,l=this.xref,h=this.pageIndexCache;let u=0;function d(r){if(r instanceof a.XRefEntryException&&!e)throw r;e&&t&&0===u&&((0,n.warn)(`getAllPageDicts - Skipping invalid first page: "${r}".`),r=i.Dict.empty),c.set(u++,[r,null])}for(;r.length>0;){const e=r.at(-1),{currentNode:t,posInKids:a}=e;let o=t.getRaw("Kids");if(o instanceof i.Ref)try{o=await l.fetchAsync(o)}catch(e){d(e);break}if(!Array.isArray(o)){d(new n.FormatError("Page dictionary kids object is not an array."));break}if(a>=o.length){r.pop();continue}const g=o[a];let m;if(g instanceof i.Ref){if(s.has(g)){d(new n.FormatError("Pages tree contains circular reference."));break}s.put(g);try{m=await l.fetchAsync(g)}catch(e){d(e);break}}else m=g;if(!(m instanceof i.Dict)){d(new n.FormatError("Page dictionary kid reference points to wrong type of object."));break}let b=m.getRaw("Type");if(b instanceof i.Ref)try{b=await l.fetchAsync(b)}catch(e){d(e);break}(0,i.isName)(b,"Page")||!m.has("Kids")?(f=m,(p=g instanceof i.Ref?g:null)&&!h.has(p)&&h.put(p,u),c.set(u++,[f,p])):r.push({currentNode:m,posInKids:0}),e.posInKids++}var f,p;return c}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const r=this.xref;let a=0;const s=t=>function(t){let a,s=0;return r.fetchAsync(t).then((function(r){if((0,i.isRefsEqual)(t,e)&&!(0,i.isDict)(r,"Page")&&!(r instanceof i.Dict&&!r.has("Type")&&r.has("Contents")))throw new n.FormatError("The reference does not point to a /Page dictionary.");if(!r)return null;if(!(r instanceof i.Dict))throw new n.FormatError("Node must be a dictionary.");return a=r.getRaw("Parent"),r.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof i.Dict))throw new n.FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;const o=[];let c=!1;for(const a of e){if(!(a instanceof i.Ref))throw new n.FormatError("Kid must be a reference.");if((0,i.isRefsEqual)(a,t)){c=!0;break}o.push(r.fetchAsync(a).then((function(e){if(!(e instanceof i.Dict))throw new n.FormatError("Kid node must be a dictionary.");e.has("Count")?s+=e.get("Count"):s++})))}if(!c)throw new n.FormatError("Kid reference not found in parent's kids.");return Promise.all(o).then((function(){return[s,a]}))}))}(t).then((t=>{if(!t)return this.pageIndexCache.put(e,a),a;const[r,n]=t;return a+=r,s(n)}));return s(e)}get baseUrl(){const e=this._catDict.get("URI");if(e instanceof i.Dict){const t=e.get("Base");if("string"==typeof t){const e=(0,n.createValidAbsoluteUrl)(t,null,{tryConvertEncoding:!0});if(e)return(0,n.shadow)(this,"baseUrl",e.href)}}return(0,n.shadow)(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:e,resultObj:t,docBaseUrl:r=null,docAttachments:s=null}){if(!(e instanceof i.Dict))return void(0,n.warn)("parseDestDictionary: `destDict` must be a dictionary.");let c,l,h=e.get("A");if(h instanceof i.Dict||(e.has("Dest")?h=e.get("Dest"):(h=e.get("AA"),h instanceof i.Dict&&(h.has("D")?h=h.get("D"):h.has("U")&&(h=h.get("U"))))),h instanceof i.Dict){const e=h.get("S");if(!(e instanceof i.Name))return void(0,n.warn)("parseDestDictionary: Invalid type in Action dictionary.");const r=e.name;switch(r){case"ResetForm":const e=h.get("Flags"),u=!(1&("number"==typeof e?e:0)),d=[],f=[];for(const e of h.get("Fields")||[])e instanceof i.Ref?f.push(e.toString()):"string"==typeof e&&d.push((0,n.stringToPDFString)(e));t.resetForm={fields:d,refs:f,include:u};break;case"URI":c=h.get("URI"),c instanceof i.Name&&(c="/"+c.name);break;case"GoTo":l=h.get("D");break;case"Launch":case"GoToR":const p=h.get("F");p instanceof i.Dict?c=p.get("F")||null:"string"==typeof p&&(c=p);let g=h.get("D");if(g&&(g instanceof i.Name&&(g=g.name),"string"==typeof c)){const e=c.split("#")[0];"string"==typeof g?c=e+"#"+g:Array.isArray(g)&&(c=e+"#"+JSON.stringify(g))}const m=h.get("NewWindow");"boolean"==typeof m&&(t.newWindow=m);break;case"GoToE":const b=h.get("T");let y;if(s&&b instanceof i.Dict){const e=b.get("R"),t=b.get("N");(0,i.isName)(e,"C")&&"string"==typeof t&&(y=s[(0,n.stringToPDFString)(t)])}y?t.attachment=y:(0,n.warn)('parseDestDictionary - unimplemented "GoToE" action.');break;case"Named":const v=h.get("N");v instanceof i.Name&&(t.action=v.name);break;case"SetOCGState":const w=h.get("State"),A=h.get("PreserveRB");if(!Array.isArray(w)||0===w.length)break;const S=[];for(const e of w)if(e instanceof i.Name)switch(e.name){case"ON":case"OFF":case"Toggle":S.push(e.name)}else e instanceof i.Ref&&S.push(e.toString());if(S.length!==w.length)break;t.setOCGState={state:S,preserveRB:"boolean"!=typeof A||A};break;case"JavaScript":const x=h.get("JS");let k;x instanceof o.BaseStream?k=x.getString():"string"==typeof x&&(k=x);const C=k&&(0,a.recoverJsURL)((0,n.stringToPDFString)(k));if(C){c=C.url,t.newWindow=C.newWindow;break}default:if("JavaScript"===r||"SubmitForm"===r)break;(0,n.warn)(`parseDestDictionary - unsupported action: "${r}".`)}}else e.has("Dest")&&(l=e.get("Dest"));if("string"==typeof c){const e=(0,n.createValidAbsoluteUrl)(c,r,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(t.url=e.href),t.unsafeUrl=c}l&&(l instanceof i.Name&&(l=l.name),"string"==typeof l?t.dest=(0,n.stringToPDFString)(l):Array.isArray(l)&&(t.dest=l))}}t.Catalog=g},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberTree=t.NameTree=void 0;var a=r(4),n=r(2);class i{constructor(e,t,r){this.constructor===i&&(0,n.unreachable)("Cannot initialize NameOrNumberTree."),this.root=e,this.xref=t,this._type=r}getAll(){const e=new Map;if(!this.root)return e;const t=this.xref,r=new a.RefSet;r.put(this.root);const i=[this.root];for(;i.length>0;){const s=t.fetchIfRef(i.shift());if(!(s instanceof a.Dict))continue;if(s.has("Kids")){const e=s.get("Kids");if(!Array.isArray(e))continue;for(const t of e){if(r.has(t))throw new n.FormatError(`Duplicate entry in "${this._type}" tree.`);i.push(t),r.put(t)}continue}const o=s.get(this._type);if(Array.isArray(o))for(let r=0,a=o.length;r<a;r+=2)e.set(t.fetchIfRef(o[r]),t.fetchIfRef(o[r+1]))}return e}get(e){if(!this.root)return null;const t=this.xref;let r=t.fetchIfRef(this.root),a=0;for(;r.has("Kids");){if(++a>10)return(0,n.warn)(`Search depth limit reached for "${this._type}" tree.`),null;const i=r.get("Kids");if(!Array.isArray(i))return null;let s=0,o=i.length-1;for(;s<=o;){const a=s+o>>1,n=t.fetchIfRef(i[a]),c=n.get("Limits");if(e<t.fetchIfRef(c[0]))o=a-1;else{if(!(e>t.fetchIfRef(c[1]))){r=n;break}s=a+1}}if(s>o)return null}const i=r.get(this._type);if(Array.isArray(i)){let r=0,a=i.length-2;for(;r<=a;){const n=r+a>>1,s=n+(1&n),o=t.fetchIfRef(i[s]);if(e<o)a=s-2;else{if(!(e>o))return t.fetchIfRef(i[s+1]);r=s+2}}}return null}}t.NameTree=class extends i{constructor(e,t){super(e,t,"Names")}},t.NumberTree=class extends i{constructor(e,t){super(e,t,"Nums")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearGlobalCaches=function(){(0,a.clearPatternCaches)(),(0,n.clearPrimitiveCaches)(),(0,i.clearUnicodeCaches)()};var a=r(50),n=r(4),i=r(40)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileSpec=void 0;var a=r(2),n=r(5),i=r(4);function s(e){return e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null}t.FileSpec=class{constructor(e,t){e instanceof i.Dict&&(this.xref=t,this.root=e,e.has("FS")&&(this.fs=e.get("FS")),this.description=e.has("Desc")?(0,a.stringToPDFString)(e.get("Desc")):"",e.has("RF")&&(0,a.warn)("Related file specifications are not supported"),this.contentAvailable=!0,e.has("EF")||(this.contentAvailable=!1,(0,a.warn)("Non-embedded file specifications are not supported")))}get filename(){if(!this._filename&&this.root){const e=s(this.root)||"unnamed";this._filename=(0,a.stringToPDFString)(e).replaceAll("\\\\","\\").replaceAll("\\/","/").replaceAll("\\","/")}return this._filename}get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=s(this.root.get("EF")));let e=null;if(this.contentRef){const t=this.xref.fetchIfRef(this.contentRef);t instanceof n.BaseStream?e=t.getBytes():(0,a.warn)("Embedded file specification points to non-existing/invalid content")}else(0,a.warn)("Embedded file specification does not have a content");return e}get serializable(){return{filename:this.filename,content:this.content}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataParser=void 0;var a=r(71);t.MetadataParser=class{constructor(e){e=this._repair(e);const t=new a.SimpleXMLParser({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map,this._data=e,t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replaceAll(/>\\376\\377([^<]+)/g,(function(e,t){const r=t.replaceAll(/\\([0-3])([0-7])([0-7])/g,(function(e,t,r,a){return String.fromCharCode(64*t+8*r+1*a)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(e,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.`)})),a=[">"];for(let e=0,t=r.length;e<t;e+=2){const t=256*r.charCodeAt(e)+r.charCodeAt(e+1);t>=32&&t<127&&60!==t&&62!==t&&38!==t?a.push(String.fromCharCode(t)):a.push("&#x"+(65536+t).toString(16).substring(1)+";")}return a.join("")}))}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filter((e=>"rdf:li"===e.nodeName))}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,r=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,r.map((e=>e.textContent.trim())))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName)for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling;if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const e of t.childNodes)if("rdf:description"===e.nodeName)for(const t of e.childNodes){const e=t.nodeName;switch(e){case"#text":continue;case"dc:creator":case"dc:subject":this._parseArray(t);continue}this._metadataMap.set(e,t.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XMLParserErrorCode=t.XMLParserBase=t.SimpleXMLParser=t.SimpleDOMNode=void 0;var a=r(3);const n={NoError:0,EndOfDocument:-1,UnterminatedCdat:-2,UnterminatedXmlDeclaration:-3,UnterminatedDoctypeDeclaration:-4,UnterminatedComment:-5,MalformedElement:-6,OutOfMemory:-7,UnterminatedAttributeValue:-8,UnterminatedElement:-9,ElementNeverBegun:-10};function i(e,t){const r=e[t];return" "===r||"\n"===r||"\r"===r||"\t"===r}t.XMLParserErrorCode=n;class s{_resolveEntities(e){return e.replaceAll(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"';case"apos":return"'"}return this.onResolveEntity(t)}))}_parseContent(e,t){const r=[];let a=t;function n(){for(;a<e.length&&i(e,a);)++a}for(;a<e.length&&!i(e,a)&&">"!==e[a]&&"/"!==e[a];)++a;const s=e.substring(t,a);for(n();a<e.length&&">"!==e[a]&&"/"!==e[a]&&"?"!==e[a];){n();let t="",s="";for(;a<e.length&&!i(e,a)&&"="!==e[a];)t+=e[a],++a;if(n(),"="!==e[a])return null;++a,n();const o=e[a];if('"'!==o&&"'"!==o)return null;const c=e.indexOf(o,++a);if(c<0)return null;s=e.substring(a,c),r.push({name:t,value:this._resolveEntities(s)}),a=c+1,n()}return{name:s,attributes:r,parsed:a-t}}_parseProcessingInstruction(e,t){let r=t;for(;r<e.length&&!i(e,r)&&">"!==e[r]&&"?"!==e[r]&&"/"!==e[r];)++r;const a=e.substring(t,r);!function(){for(;r<e.length&&i(e,r);)++r}();const n=r;for(;r<e.length&&("?"!==e[r]||">"!==e[r+1]);)++r;return{name:a,value:e.substring(n,r),parsed:r-t}}parseXml(e){let t=0;for(;t<e.length;){let r=t;if("<"===e[t]){let t;switch(++r,e[r]){case"/":if(++r,t=e.indexOf(">",r),t<0)return void this.onError(n.UnterminatedElement);this.onEndElement(e.substring(r,t)),r=t+1;break;case"?":++r;const a=this._parseProcessingInstruction(e,r);if("?>"!==e.substring(r+a.parsed,r+a.parsed+2))return void this.onError(n.UnterminatedXmlDeclaration);this.onPi(a.name,a.value),r+=a.parsed+2;break;case"!":if("--"===e.substring(r+1,r+3)){if(t=e.indexOf("--\x3e",r+3),t<0)return void this.onError(n.UnterminatedComment);this.onComment(e.substring(r+3,t)),r=t+3}else if("[CDATA["===e.substring(r+1,r+8)){if(t=e.indexOf("]]>",r+8),t<0)return void this.onError(n.UnterminatedCdat);this.onCdata(e.substring(r+8,t)),r=t+3}else{if("DOCTYPE"!==e.substring(r+1,r+8))return void this.onError(n.MalformedElement);{const a=e.indexOf("[",r+8);let i=!1;if(t=e.indexOf(">",r+8),t<0)return void this.onError(n.UnterminatedDoctypeDeclaration);if(a>0&&t>a){if(t=e.indexOf("]>",r+8),t<0)return void this.onError(n.UnterminatedDoctypeDeclaration);i=!0}const s=e.substring(r+8,t+(i?1:0));this.onDoctype(s),r=t+(i?2:1)}}break;default:const i=this._parseContent(e,r);if(null===i)return void this.onError(n.MalformedElement);let s=!1;if("/>"===e.substring(r+i.parsed,r+i.parsed+2))s=!0;else if(">"!==e.substring(r+i.parsed,r+i.parsed+1))return void this.onError(n.UnterminatedElement);this.onBeginElement(i.name,i.attributes,s),r+=i.parsed+(s?2:1)}}else{for(;r<e.length&&"<"!==e[r];)r++;const a=e.substring(t,r);this.onText(this._resolveEntities(a))}t=r}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,r){}onEndElement(e){}onError(e){}}t.XMLParserBase=s;class o{constructor(e,t){this.nodeName=e,this.nodeValue=t,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes?.[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(e){return e.textContent})).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(e,t){if(t>=e.length)return this;const r=e[t];if(r.name.startsWith("#")&&t<e.length-1)return this.searchNode(e,t+1);const a=[];let n=this;for(;;){if(r.name===n.nodeName){if(0!==r.pos){if(0===a.length)return null;{const[i]=a.pop();let s=0;for(const a of i.childNodes)if(r.name===a.nodeName){if(s===r.pos)return a.searchNode(e,t+1);s++}return n.searchNode(e,t+1)}}{const r=n.searchNode(e,t+1);if(null!==r)return r}}if(n.childNodes?.length>0)a.push([n,0]),n=n.childNodes[0];else{if(0===a.length)return null;for(;0!==a.length;){const[e,t]=a.pop(),r=t+1;if(r<e.childNodes.length){a.push([e,r]),n=e.childNodes[r];break}}if(0===a.length)return null}}}dump(e){if("#text"!==this.nodeName){if(e.push(`<${this.nodeName}`),this.attributes)for(const t of this.attributes)e.push(` ${t.name}="${(0,a.encodeToXmlString)(t.value)}"`);if(this.hasChildNodes()){e.push(">");for(const t of this.childNodes)t.dump(e);e.push(`</${this.nodeName}>`)}else this.nodeValue?e.push(`>${(0,a.encodeToXmlString)(this.nodeValue)}</${this.nodeName}>`):e.push("/>")}else e.push((0,a.encodeToXmlString)(this.nodeValue))}}t.SimpleDOMNode=o,t.SimpleXMLParser=class extends s{constructor({hasAttributes:e=!1,lowerCaseName:t=!1}){super(),this._currentFragment=null,this._stack=null,this._errorCode=n.NoError,this._hasAttributes=e,this._lowerCaseName=t}parseFromString(e){if(this._currentFragment=[],this._stack=[],this._errorCode=n.NoError,this.parseXml(e),this._errorCode!==n.NoError)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function(e){for(let t=0,r=e.length;t<r;t++)if(!i(e,t))return!1;return!0}(e))return;const t=new o("#text",e);this._currentFragment.push(t)}onCdata(e){const t=new o("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,r){this._lowerCaseName&&(e=e.toLowerCase());const a=new o(e);a.childNodes=[],this._hasAttributes&&(a.attributes=t),this._currentFragment.push(a),r||(this._stack.push(this._currentFragment),this._currentFragment=a.childNodes)}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment.at(-1);if(!t)return null;for(const e of t.childNodes)e.parentNode=t;return t}onError(e){this._errorCode=e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StructTreeRoot=t.StructTreePage=void 0;var a=r(2),n=r(4),i=r(67),s=r(73);const o=1,c=2,l=3,h=4,u=5;class d{constructor(e,t){this.dict=e,this.ref=t instanceof n.Ref?t:null,this.roleMap=new Map,this.structParentIds=null}init(){this.readRoleMap()}#x(e,t,r){if(!(e instanceof n.Ref)||t<0)return;this.structParentIds||=new n.RefSetCache;let a=this.structParentIds.get(e);a||(a=[],this.structParentIds.put(e,a)),a.push([t,r])}addAnnotationIdToPage(e,t){this.#x(e,t,h)}readRoleMap(){const e=this.dict.get("RoleMap");e instanceof n.Dict&&e.forEach(((e,t)=>{t instanceof n.Name&&this.roleMap.set(e,t.name)}))}static async canCreateStructureTree({catalogRef:e,pdfManager:t,newAnnotationsByPage:r}){if(!(e instanceof n.Ref))return(0,a.warn)("Cannot save the struct tree: no catalog reference."),!1;let i=0,s=!0;for(const[e,o]of r){const{ref:r}=await t.getPage(e);if(!(r instanceof n.Ref)){(0,a.warn)(`Cannot save the struct tree: page ${e} has no ref.`),s=!0;break}for(const e of o)e.accessibilityData?.type&&(e.parentTreeId=i++,s=!1)}if(s){for(const e of r.values())for(const t of e)delete t.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:e,xref:t,catalogRef:r,pdfManager:a,newRefs:i}){const o=a.catalog.cloneDict(),c=t.getNewTemporaryRef();o.set("StructTreeRoot",c);const l=[];await(0,s.writeObject)(r,o,l,t),i.push({ref:r,data:l.join("")});const h=new n.Dict(t);h.set("Type",n.Name.get("StructTreeRoot"));const u=t.getNewTemporaryRef();h.set("ParentTree",u);const d=[];h.set("K",d);const f=new n.Dict(t),p=[];f.set("Nums",p);const g=await this.#k({newAnnotationsByPage:e,structTreeRootRef:c,kids:d,nums:p,xref:t,pdfManager:a,newRefs:i,buffer:l});h.set("ParentTreeNextKey",g),l.length=0,await(0,s.writeObject)(u,f,l,t),i.push({ref:u,data:l.join("")}),l.length=0,await(0,s.writeObject)(c,h,l,t),i.push({ref:c,data:l.join("")})}async canUpdateStructTree({pdfManager:e,newAnnotationsByPage:t}){if(!this.ref)return(0,a.warn)("Cannot update the struct tree: no root reference."),!1;let r=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(r)||r<0)return(0,a.warn)("Cannot update the struct tree: invalid next key."),!1;const i=this.dict.get("ParentTree");if(!(i instanceof n.Dict))return(0,a.warn)("Cannot update the struct tree: ParentTree isn't a dict."),!1;const s=i.get("Nums");if(!Array.isArray(s))return(0,a.warn)("Cannot update the struct tree: nums isn't an array."),!1;const{numPages:o}=e.catalog;for(const r of t.keys()){const{pageDict:t,ref:i}=await e.getPage(r);if(!(i instanceof n.Ref))return(0,a.warn)(`Cannot save the struct tree: page ${r} has no ref.`),!1;const s=t.get("StructParents");if(!Number.isInteger(s)||s<0||s>=o)return(0,a.warn)(`Cannot save the struct tree: page ${r} has no id.`),!1}let c=!0;for(const[a,n]of t){const{pageDict:t}=await e.getPage(a);d.#C({elements:n,xref:this.dict.xref,pageDict:t,parentTree:i});for(const e of n)e.accessibilityData?.type&&(e.parentTreeId=r++,c=!1)}if(c){for(const e of t.values())for(const t of e)delete t.parentTreeId,delete t.structTreeParent;return!1}return!0}async updateStructureTree({newAnnotationsByPage:e,pdfManager:t,newRefs:r}){const a=this.dict.xref,i=this.dict.clone(),o=this.ref;let c,l=i.getRaw("ParentTree");l instanceof n.Ref?c=a.fetch(l):(c=l,l=a.getNewTemporaryRef(),i.set("ParentTree",l)),c=c.clone();let h=c.getRaw("Nums"),u=null;h instanceof n.Ref&&(u=h,h=a.fetch(u)),h=h.slice(),u||c.set("Nums",h);let f=i.getRaw("K"),p=null;f instanceof n.Ref?(p=f,f=a.fetch(p)):(p=a.getNewTemporaryRef(),i.set("K",p)),f=Array.isArray(f)?f.slice():[f];const g=[],m=await d.#k({newAnnotationsByPage:e,structTreeRootRef:o,kids:f,nums:h,xref:a,pdfManager:t,newRefs:r,buffer:g});i.set("ParentTreeNextKey",m),g.length=0,await(0,s.writeObject)(p,f,g,a),r.push({ref:p,data:g.join("")}),u&&(g.length=0,await(0,s.writeObject)(u,h,g,a),r.push({ref:u,data:g.join("")})),g.length=0,await(0,s.writeObject)(l,c,g,a),r.push({ref:l,data:g.join("")}),g.length=0,await(0,s.writeObject)(o,i,g,a),r.push({ref:o,data:g.join("")})}static async#k({newAnnotationsByPage:e,structTreeRootRef:t,kids:r,nums:a,xref:i,pdfManager:o,newRefs:c,buffer:l}){const h=n.Name.get("OBJR");let u=-1/0;for(const[d,f]of e){const{ref:e}=await o.getPage(d);for(const{accessibilityData:{type:o,title:d,lang:p,alt:g,expanded:m,actualText:b},ref:y,parentTreeId:v,structTreeParent:w}of f){u=Math.max(u,v);const f=i.getNewTemporaryRef(),A=new n.Dict(i);A.set("S",n.Name.get(o)),d&&A.set("T",d),p&&A.set("Lang",p),g&&A.set("Alt",g),m&&A.set("E",m),b&&A.set("ActualText",b),w?await this.#_({structTreeParent:w,tagDict:A,newTagRef:f,fallbackRef:t,xref:i,newRefs:c,buffer:l}):A.set("P",t);const S=new n.Dict(i);A.set("K",S),S.set("Type",h),S.set("Pg",e),S.set("Obj",y),l.length=0,await(0,s.writeObject)(f,A,l,i),c.push({ref:f,data:l.join("")}),a.push(v,f),r.push(f)}}return u+1}static#C({elements:e,xref:t,pageDict:r,parentTree:a}){const s=new Map;for(const t of e)if(t.structTreeParentId){const e=parseInt(t.structTreeParentId.split("_mc")[1],10);s.set(e,t)}const o=r.get("StructParents"),c=new i.NumberTree(a,t).get(o);if(!Array.isArray(c))return;const l=(e,r,a)=>{const i=s.get(e);if(i){const e=r.getRaw("P"),s=t.fetchIfRef(e);return e instanceof n.Ref&&s instanceof n.Dict&&(i.structTreeParent={ref:a,dict:r}),!0}return!1};for(const e of c){if(!(e instanceof n.Ref))continue;const r=t.fetch(e),a=r.get("K");if(Number.isInteger(a))l(a,r,e);else if(Array.isArray(a))for(let n of a)if(n=t.fetchIfRef(n),Number.isInteger(n)&&l(n,r,e))break}}static async#_({structTreeParent:{ref:e,dict:t},tagDict:r,newTagRef:i,fallbackRef:o,xref:c,newRefs:l,buffer:h}){const u=t.getRaw("P");let d=c.fetchIfRef(u);r.set("P",u);let f,p=!1,g=d.getRaw("K");if(g instanceof n.Ref?f=c.fetch(g):(f=g,g=c.getNewTemporaryRef(),d=d.clone(),d.set("K",g),p=!0),Array.isArray(f)){const t=f.indexOf(e);if(!(t>=0))return(0,a.warn)("Cannot update the struct tree: parent kid not found."),void r.set("P",o);f=f.slice(),f.splice(t+1,0,i)}else f instanceof n.Dict&&(f=[g,i],g=c.getNewTemporaryRef(),d.set("K",g),p=!0);h.length=0,await(0,s.writeObject)(g,f,h,c),l.push({ref:g,data:h.join("")}),p&&(h.length=0,await(0,s.writeObject)(u,d,h,c),l.push({ref:u,data:h.join("")}))}}t.StructTreeRoot=d;class f{constructor(e,t){this.tree=e,this.dict=t,this.kids=[],this.parseKids()}get role(){const e=this.dict.get("S"),t=e instanceof n.Name?e.name:"",{root:r}=this.tree;return r.roleMap.has(t)?r.roleMap.get(t):t}parseKids(){let e=null;const t=this.dict.getRaw("Pg");t instanceof n.Ref&&(e=t.toString());const r=this.dict.get("K");if(Array.isArray(r))for(const t of r){const r=this.parseKid(e,t);r&&this.kids.push(r)}else{const t=this.parseKid(e,r);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new p({type:o,mcid:t,pageObjId:e});let r=null;if(t instanceof n.Ref?r=this.dict.xref.fetch(t):t instanceof n.Dict&&(r=t),!r)return null;const a=r.getRaw("Pg");a instanceof n.Ref&&(e=a.toString());const i=r.get("Type")instanceof n.Name?r.get("Type").name:null;if("MCR"===i){if(this.tree.pageDict.objId!==e)return null;const t=r.getRaw("Stm");return new p({type:c,refObjId:t instanceof n.Ref?t.toString():null,pageObjId:e,mcid:r.get("MCID")})}if("OBJR"===i){if(this.tree.pageDict.objId!==e)return null;const t=r.getRaw("Obj");return new p({type:l,refObjId:t instanceof n.Ref?t.toString():null,pageObjId:e})}return new p({type:u,dict:r})}}class p{constructor({type:e,dict:t=null,mcid:r=null,pageObjId:a=null,refObjId:n=null}){this.type=e,this.dict=t,this.mcid=r,this.pageObjId=a,this.refObjId=n,this.parentNode=null}}t.StructTreePage=class{constructor(e,t){this.root=e,this.rootDict=e?e.dict:null,this.pageDict=t,this.nodes=[]}parse(e){if(!this.root||!this.rootDict)return;const t=this.rootDict.get("ParentTree");if(!t)return;const r=this.pageDict.get("StructParents"),a=e instanceof n.Ref&&this.root.structParentIds?.get(e);if(!Number.isInteger(r)&&!a)return;const s=new Map,o=new i.NumberTree(t,this.rootDict.xref);if(Number.isInteger(r)){const e=o.get(r);if(Array.isArray(e))for(const t of e)t instanceof n.Ref&&this.addNode(this.rootDict.xref.fetch(t),s)}if(a)for(const[e,t]of a){const r=o.get(e);if(r){const e=this.addNode(this.rootDict.xref.fetchIfRef(r),s);1===e?.kids?.length&&e.kids[0].type===l&&(e.kids[0].type=t)}}}addNode(e,t,r=0){if(r>40)return(0,a.warn)("StructTree MAX_DEPTH reached."),null;if(t.has(e))return t.get(e);const i=new f(this,e);t.set(e,i);const s=e.get("P");if(!s||(0,n.isName)(s.get("Type"),"StructTreeRoot"))return this.addTopLevelNode(e,i)||t.delete(e),i;const o=this.addNode(s,t,r+1);if(!o)return i;let c=!1;for(const t of o.kids)t.type===u&&t.dict===e&&(t.parentNode=i,c=!0);return c||t.delete(e),i}addTopLevelNode(e,t){const r=this.rootDict.get("K");if(!r)return!1;if(r instanceof n.Dict)return r.objId===e.objId&&(this.nodes[0]=t,!0);if(!Array.isArray(r))return!0;let a=!1;for(let n=0;n<r.length;n++){const i=r[n];i?.toString()===e.objId&&(this.nodes[n]=t,a=!0)}return a}get serializable(){function e(t,r,n=0){if(n>40)return void(0,a.warn)("StructTree too deep to be fully serialized.");const i=Object.create(null);i.role=t.role,i.children=[],r.children.push(i);const s=t.dict.get("Alt");"string"==typeof s&&(i.alt=(0,a.stringToPDFString)(s));const d=t.dict.get("Lang");"string"==typeof d&&(i.lang=(0,a.stringToPDFString)(d));for(const r of t.kids){const t=r.type===u?r.parentNode:null;t?e(t,i,n+1):r.type===o||r.type===c?i.children.push({type:"content",id:`p${r.pageObjId}_mc${r.mcid}`}):r.type===l?i.children.push({type:"object",id:r.refObjId}):r.type===h&&i.children.push({type:"annotation",id:`${a.AnnotationPrefix}${r.refObjId}`})}}const t=Object.create(null);t.children=[],t.role="Root";for(const r of this.nodes)r&&e(r,t);return t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.incrementalUpdate=async function({originalData:e,xrefInfo:t,newRefs:r,xref:o=null,hasXfa:u=!1,xfaDatasetsRef:d=null,hasXfaDatasetsEntry:f=!1,needAppearances:m,acroFormRef:b=null,acroForm:y=null,xfaData:v=null}){await async function({xref:e,acroForm:t,acroFormRef:r,hasXfa:n,hasXfaDatasetsEntry:i,xfaDatasetsRef:s,needAppearances:o,newRefs:c}){if(!n||i||s||(0,a.warn)("XFA - Cannot save it"),!o&&(!n||!s||i))return;const h=t.clone();if(n&&!i){const e=t.get("XFA").slice();e.splice(2,0,"datasets"),e.splice(3,0,s),h.set("XFA",e)}o&&h.set("NeedAppearances",!0);const u=[];await l(r,h,u,e),c.push({ref:r,data:u.join("")})}({xref:o,acroForm:y,acroFormRef:b,hasXfa:u,hasXfaDatasetsEntry:f,xfaDatasetsRef:d,needAppearances:m,newRefs:r}),u&&function({xfaData:e,xfaDatasetsRef:t,newRefs:r,xref:n}){null===e&&(e=function(e,t){const r=new s.SimpleXMLParser({hasAttributes:!0}).parseFromString(e);for(const{xfa:e}of t){if(!e)continue;const{path:t,value:n}=e;if(!t)continue;const o=(0,i.parseXFAPath)(t);let c=r.documentElement.searchNode(o,0);!c&&o.length>1&&(c=r.documentElement.searchNode([o.at(-1)],0)),c?c.childNodes=Array.isArray(n)?n.map((e=>new s.SimpleDOMNode("value",e))):[new s.SimpleDOMNode("#text",n)]:(0,a.warn)(`Node not found for path: ${t}`)}const n=[];return r.documentElement.dump(n),n.join("")}(n.fetchIfRef(t).getString(),r));const o=n.encrypt;o&&(e=o.createCipherTransform(t.num,t.gen).encryptString(e));const c=`${t.num} ${t.gen} obj\n<< /Type /EmbeddedFile /Length ${e.length}>>\nstream\n`+e+"\nendstream\nendobj\n";r.push({ref:t,data:c})}({xfaData:v,xfaDatasetsRef:d,newRefs:r,xref:o});const w=new n.Dict(null),A=t.newRef;let S,x;const k=e.at(-1);10===k||13===k?(S=[],x=e.length):(S=["\n"],x=e.length+1),w.set("Size",A.num+1),w.set("Prev",t.startXRef),w.set("Type",n.Name.get("XRef")),null!==t.rootRef&&w.set("Root",t.rootRef),null!==t.infoRef&&w.set("Info",t.infoRef),null!==t.encryptRef&&w.set("Encrypt",t.encryptRef),r.push({ref:A,data:""}),r=r.sort(((e,t)=>e.ref.num-t.ref.num));const C=[[0,1,65535]],_=[0,1];let T=0;for(const{ref:e,data:t}of r)T=Math.max(T,x),C.push([1,x,Math.min(e.gen,65535)]),x+=t.length,_.push(e.num,1),S.push(t);if(w.set("Index",_),Array.isArray(t.fileIds)&&t.fileIds.length>0){const e=function(e,t){const r=Math.floor(Date.now()/1e3),n=t.filename||"",i=[r.toString(),n,e.toString()];let s=i.reduce(((e,t)=>e+t.length),0);for(const e of Object.values(t.info))i.push(e),s+=e.length;const o=new Uint8Array(s);let l=0;for(const e of i)g(e,l,o),l+=e.length;return(0,a.bytesToString)((0,c.calculateMD5)(o))}(x,t);w.set("ID",[t.fileIds[0],e])}const E=[1,Math.ceil(Math.log2(T)/8),2],O=(E[0]+E[1]+E[2])*C.length;w.set("W",E),w.set("Length",O),S.push(`${A.num} ${A.gen} obj\n`),await h(w,S,null),S.push(" stream\n");const F=S.reduce(((e,t)=>e+t.length),0),P=`\nendstream\nendobj\nstartxref\n${x}\n%%EOF\n`,I=new Uint8Array(e.length+F+O+P.length);I.set(e);let M=e.length;for(const e of S)g(e,M,I),M+=e.length;for(const[e,t,r]of C)M=p(e,E[0],M,I),M=p(t,E[1],M,I),M=p(r,E[2],M,I);return g(P,M,I),I},t.writeDict=h,t.writeObject=l;var a=r(2),n=r(4),i=r(3),s=r(71),o=r(5),c=r(74);async function l(e,t,r,{encrypt:a=null}){const i=a?.createCipherTransform(e.num,e.gen);r.push(`${e.num} ${e.gen} obj\n`),t instanceof n.Dict?await h(t,r,i):t instanceof o.BaseStream?await u(t,r,i):Array.isArray(t)&&await d(t,r,i),r.push("\nendobj\n")}async function h(e,t,r){t.push("<<");for(const a of e.getKeys())t.push(` /${(0,i.escapePDFName)(a)} `),await f(e.getRaw(a),t,r);t.push(">>")}async function u(e,t,r){let i=e.getString();const{dict:s}=e,[o,c]=await Promise.all([s.getAsync("Filter"),s.getAsync("DecodeParms")]),l=Array.isArray(o)?await s.xref.fetchIfRefAsync(o[0]):o,u=(0,n.isName)(l,"FlateDecode");if("undefined"!=typeof CompressionStream&&(i.length>=256||u))try{const e=(0,a.stringToBytes)(i),t=new CompressionStream("deflate"),r=t.writable.getWriter();r.write(e),r.close();const l=await new Response(t.readable).arrayBuffer();let h,d;i=(0,a.bytesToString)(new Uint8Array(l)),o?u||(h=Array.isArray(o)?[n.Name.get("FlateDecode"),...o]:[n.Name.get("FlateDecode"),o],c&&(d=Array.isArray(c)?[null,...c]:[null,c])):h=n.Name.get("FlateDecode"),h&&s.set("Filter",h),d&&s.set("DecodeParms",d)}catch(e){(0,a.info)(`writeStream - cannot compress data: "${e}".`)}r&&(i=r.encryptString(i)),s.set("Length",i.length),await h(s,t,r),t.push(" stream\n",i,"\nendstream")}async function d(e,t,r){t.push("[");let a=!0;for(const n of e)a?a=!1:t.push(" "),await f(n,t,r);t.push("]")}async function f(e,t,r){e instanceof n.Name?t.push(`/${(0,i.escapePDFName)(e.name)}`):e instanceof n.Ref?t.push(`${e.num} ${e.gen} R`):Array.isArray(e)?await d(e,t,r):"string"==typeof e?(r&&(e=r.encryptString(e)),t.push(`(${(0,i.escapeString)(e)})`)):"number"==typeof e?t.push((0,i.numberToString)(e)):"boolean"==typeof e?t.push(e.toString()):e instanceof n.Dict?await h(e,t,r):e instanceof o.BaseStream?await u(e,t,r):null===e?t.push("null"):(0,a.warn)(`Unhandled value in writer: ${typeof e}, please file a bug.`)}function p(e,t,r,a){for(let n=t+r-1;n>r-1;n--)a[n]=255&e,e>>=8;return r+t}function g(e,t,r){for(let a=0,n=e.length;a<n;a++)r[t+a]=255&e.charCodeAt(a)}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateSHA256=t.calculateMD5=t.PDF20=t.PDF17=t.CipherTransformFactory=t.ARCFourCipher=t.AES256Cipher=t.AES128Cipher=void 0,t.calculateSHA384=u,t.calculateSHA512=void 0;var a=r(2),n=r(4),i=r(75);class s{constructor(e){this.a=0,this.b=0;const t=new Uint8Array(256),r=e.length;for(let e=0;e<256;++e)t[e]=e;for(let a=0,n=0;a<256;++a){const i=t[a];n=n+i+e[a%r]&255,t[a]=t[n],t[n]=i}this.s=t}encryptBlock(e){let t=this.a,r=this.b;const a=this.s,n=e.length,i=new Uint8Array(n);for(let s=0;s<n;++s){t=t+1&255;const n=a[t];r=r+n&255;const o=a[r];a[t]=o,a[r]=n,i[s]=e[s]^a[n+o&255]}return this.a=t,this.b=r,i}decryptBlock(e){return this.encryptBlock(e)}encrypt(e){return this.encryptBlock(e)}}t.ARCFourCipher=s;const o=function(){const e=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]),t=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]);return function(r,a,n){let i=1732584193,s=-271733879,o=-1732584194,c=271733878;const l=n+72&-64,h=new Uint8Array(l);let u,d;for(u=0;u<n;++u)h[u]=r[a++];h[u++]=128;const f=l-8;for(;u<f;)h[u++]=0;h[u++]=n<<3&255,h[u++]=n>>5&255,h[u++]=n>>13&255,h[u++]=n>>21&255,h[u++]=n>>>29&255,h[u++]=0,h[u++]=0,h[u++]=0;const p=new Int32Array(16);for(u=0;u<l;){for(d=0;d<16;++d,u+=4)p[d]=h[u]|h[u+1]<<8|h[u+2]<<16|h[u+3]<<24;let r,a,n=i,l=s,f=o,g=c;for(d=0;d<64;++d){d<16?(r=l&f|~l&g,a=d):d<32?(r=g&l|~g&f,a=5*d+1&15):d<48?(r=l^f^g,a=3*d+5&15):(r=f^(l|~g),a=7*d&15);const i=g,s=n+r+t[d]+p[a]|0,o=e[d];g=f,f=l,l=l+(s<<o|s>>>32-o)|0,n=i}i=i+n|0,s=s+l|0,o=o+f|0,c=c+g|0}return new Uint8Array([255&i,i>>8&255,i>>16&255,i>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255,255&o,o>>8&255,o>>16&255,o>>>24&255,255&c,c>>8&255,c>>16&255,c>>>24&255])}}();t.calculateMD5=o;class c{constructor(e,t){this.high=0|e,this.low=0|t}and(e){this.high&=e.high,this.low&=e.low}xor(e){this.high^=e.high,this.low^=e.low}or(e){this.high|=e.high,this.low|=e.low}shiftRight(e){e>=32?(this.low=this.high>>>e-32|0,this.high=0):(this.low=this.low>>>e|this.high<<32-e,this.high=this.high>>>e|0)}shiftLeft(e){e>=32?(this.high=this.low<<e-32,this.low=0):(this.high=this.high<<e|this.low>>>32-e,this.low<<=e)}rotateRight(e){let t,r;32&e?(r=this.low,t=this.high):(t=this.low,r=this.high),e&=31,this.low=t>>>e|r<<32-e,this.high=r>>>e|t<<32-e}not(){this.high=~this.high,this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let r=(this.high>>>0)+(e.high>>>0);t>4294967295&&(r+=1),this.low=0|t,this.high=0|r}copyTo(e,t){e[t]=this.high>>>24&255,e[t+1]=this.high>>16&255,e[t+2]=this.high>>8&255,e[t+3]=255&this.high,e[t+4]=this.low>>>24&255,e[t+5]=this.low>>16&255,e[t+6]=this.low>>8&255,e[t+7]=255&this.low}assign(e){this.high=e.high,this.low=e.low}}const l=function(){function e(e,t){return e>>>t|e<<32-t}function t(e,t,r){return e&t^~e&r}function r(e,t,r){return e&t^e&r^t&r}function a(t){return e(t,2)^e(t,13)^e(t,22)}function n(t){return e(t,6)^e(t,11)^e(t,25)}function i(t){return e(t,7)^e(t,18)^t>>>3}const s=[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];return function(o,c,l){let h=1779033703,u=3144134277,d=1013904242,f=2773480762,p=1359893119,g=2600822924,m=528734635,b=1541459225;const y=64*Math.ceil((l+9)/64),v=new Uint8Array(y);let w,A;for(w=0;w<l;++w)v[w]=o[c++];v[w++]=128;const S=y-8;for(;w<S;)v[w++]=0;v[w++]=0,v[w++]=0,v[w++]=0,v[w++]=l>>>29&255,v[w++]=l>>21&255,v[w++]=l>>13&255,v[w++]=l>>5&255,v[w++]=l<<3&255;const x=new Uint32Array(64);for(w=0;w<y;){for(A=0;A<16;++A)x[A]=v[w]<<24|v[w+1]<<16|v[w+2]<<8|v[w+3],w+=4;for(A=16;A<64;++A)x[A]=0|(e(k=x[A-2],17)^e(k,19)^k>>>10)+x[A-7]+i(x[A-15])+x[A-16];let o,c,l=h,y=u,S=d,C=f,_=p,T=g,E=m,O=b;for(A=0;A<64;++A)o=O+n(_)+t(_,T,E)+s[A]+x[A],c=a(l)+r(l,y,S),O=E,E=T,T=_,_=C+o|0,C=S,S=y,y=l,l=o+c|0;h=h+l|0,u=u+y|0,d=d+S|0,f=f+C|0,p=p+_|0,g=g+T|0,m=m+E|0,b=b+O|0}var k;return new Uint8Array([h>>24&255,h>>16&255,h>>8&255,255&h,u>>24&255,u>>16&255,u>>8&255,255&u,d>>24&255,d>>16&255,d>>8&255,255&d,f>>24&255,f>>16&255,f>>8&255,255&f,p>>24&255,p>>16&255,p>>8&255,255&p,g>>24&255,g>>16&255,g>>8&255,255&g,m>>24&255,m>>16&255,m>>8&255,255&m,b>>24&255,b>>16&255,b>>8&255,255&b])}}();t.calculateSHA256=l;const h=function(){function e(e,t,r,a,n){e.assign(t),e.and(r),n.assign(t),n.not(),n.and(a),e.xor(n)}function t(e,t,r,a,n){e.assign(t),e.and(r),n.assign(t),n.and(a),e.xor(n),n.assign(r),n.and(a),e.xor(n)}function r(e,t,r){e.assign(t),e.rotateRight(28),r.assign(t),r.rotateRight(34),e.xor(r),r.assign(t),r.rotateRight(39),e.xor(r)}function a(e,t,r){e.assign(t),e.rotateRight(14),r.assign(t),r.rotateRight(18),e.xor(r),r.assign(t),r.rotateRight(41),e.xor(r)}function n(e,t,r){e.assign(t),e.rotateRight(1),r.assign(t),r.rotateRight(8),e.xor(r),r.assign(t),r.shiftRight(7),e.xor(r)}function i(e,t,r){e.assign(t),e.rotateRight(19),r.assign(t),r.rotateRight(61),e.xor(r),r.assign(t),r.shiftRight(6),e.xor(r)}const s=[new c(1116352408,3609767458),new c(1899447441,602891725),new c(3049323471,3964484399),new c(3921009573,2173295548),new c(961987163,4081628472),new c(1508970993,3053834265),new c(2453635748,2937671579),new c(2870763221,3664609560),new c(3624381080,2734883394),new c(310598401,1164996542),new c(607225278,1323610764),new c(1426881987,3590304994),new c(1925078388,4068182383),new c(2162078206,991336113),new c(2614888103,633803317),new c(3248222580,3479774868),new c(3835390401,2666613458),new c(4022224774,944711139),new c(264347078,2341262773),new c(604807628,2007800933),new c(770255983,1495990901),new c(1249150122,1856431235),new c(1555081692,3175218132),new c(1996064986,2198950837),new c(2554220882,3999719339),new c(2821834349,766784016),new c(2952996808,2566594879),new c(3210313671,3203337956),new c(3336571891,1034457026),new c(3584528711,2466948901),new c(113926993,3758326383),new c(338241895,168717936),new c(666307205,1188179964),new c(773529912,1546045734),new c(1294757372,1522805485),new c(1396182291,2643833823),new c(1695183700,2343527390),new c(1986661051,1014477480),new c(2177026350,1206759142),new c(2456956037,344077627),new c(2730485921,1290863460),new c(2820302411,3158454273),new c(3259730800,3505952657),new c(3345764771,106217008),new c(3516065817,3606008344),new c(3600352804,1432725776),new c(4094571909,1467031594),new c(275423344,851169720),new c(430227734,3100823752),new c(506948616,1363258195),new c(659060556,3750685593),new c(883997877,3785050280),new c(958139571,3318307427),new c(1322822218,3812723403),new c(1537002063,2003034995),new c(1747873779,3602036899),new c(1955562222,1575990012),new c(2024104815,1125592928),new c(2227730452,2716904306),new c(2361852424,442776044),new c(2428436474,593698344),new c(2756734187,3733110249),new c(3204031479,2999351573),new c(3329325298,3815920427),new c(3391569614,3928383900),new c(3515267271,566280711),new c(3940187606,3454069534),new c(4118630271,4000239992),new c(116418474,1914138554),new c(174292421,2731055270),new c(289380356,3203993006),new c(460393269,320620315),new c(685471733,587496836),new c(852142971,1086792851),new c(1017036298,365543100),new c(1126000580,2618297676),new c(1288033470,3409855158),new c(1501505948,4234509866),new c(1607167915,987167468),new c(1816402316,1246189591)];return function(o,l,h,u=!1){let d,f,p,g,m,b,y,v;u?(d=new c(3418070365,3238371032),f=new c(1654270250,914150663),p=new c(2438529370,812702999),g=new c(355462360,4144912697),m=new c(1731405415,4290775857),b=new c(2394180231,1750603025),y=new c(3675008525,1694076839),v=new c(1203062813,3204075428)):(d=new c(1779033703,4089235720),f=new c(3144134277,2227873595),p=new c(1013904242,4271175723),g=new c(2773480762,1595750129),m=new c(1359893119,2917565137),b=new c(2600822924,725511199),y=new c(528734635,4215389547),v=new c(1541459225,327033209));const w=128*Math.ceil((h+17)/128),A=new Uint8Array(w);let S,x;for(S=0;S<h;++S)A[S]=o[l++];A[S++]=128;const k=w-16;for(;S<k;)A[S++]=0;A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=0,A[S++]=h>>>29&255,A[S++]=h>>21&255,A[S++]=h>>13&255,A[S++]=h>>5&255,A[S++]=h<<3&255;const C=new Array(80);for(S=0;S<80;S++)C[S]=new c(0,0);let _=new c(0,0),T=new c(0,0),E=new c(0,0),O=new c(0,0),F=new c(0,0),P=new c(0,0),I=new c(0,0),M=new c(0,0);const R=new c(0,0),D=new c(0,0),N=new c(0,0),L=new c(0,0);let B,j;for(S=0;S<w;){for(x=0;x<16;++x)C[x].high=A[S]<<24|A[S+1]<<16|A[S+2]<<8|A[S+3],C[x].low=A[S+4]<<24|A[S+5]<<16|A[S+6]<<8|A[S+7],S+=8;for(x=16;x<80;++x)B=C[x],i(B,C[x-2],L),B.add(C[x-7]),n(N,C[x-15],L),B.add(N),B.add(C[x-16]);for(_.assign(d),T.assign(f),E.assign(p),O.assign(g),F.assign(m),P.assign(b),I.assign(y),M.assign(v),x=0;x<80;++x)R.assign(M),a(N,F,L),R.add(N),e(N,F,P,I,L),R.add(N),R.add(s[x]),R.add(C[x]),r(D,_,L),t(N,_,T,E,L),D.add(N),B=M,M=I,I=P,P=F,O.add(R),F=O,O=E,E=T,T=_,B.assign(R),B.add(D),_=B;d.add(_),f.add(T),p.add(E),g.add(O),m.add(F),b.add(P),y.add(I),v.add(M)}return u?(j=new Uint8Array(48),d.copyTo(j,0),f.copyTo(j,8),p.copyTo(j,16),g.copyTo(j,24),m.copyTo(j,32),b.copyTo(j,40)):(j=new Uint8Array(64),d.copyTo(j,0),f.copyTo(j,8),p.copyTo(j,16),g.copyTo(j,24),m.copyTo(j,32),b.copyTo(j,40),y.copyTo(j,48),v.copyTo(j,56)),j}}();function u(e,t,r){return h(e,t,r,!0)}t.calculateSHA512=h;class d{decryptBlock(e){return e}encrypt(e){return e}}class f{constructor(){this.constructor===f&&(0,a.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 e=0;e<256;e++)this._mixCol[e]=e<128?e<<1:e<<1^27;this.buffer=new Uint8Array(16),this.bufferPosition=0}_expandKey(e){(0,a.unreachable)("Cannot call `_expandKey` on the base class")}_decrypt(e,t){let r,a,n;const i=new Uint8Array(16);i.set(e);for(let e=0,r=this._keySize;e<16;++e,++r)i[e]^=t[r];for(let e=this._cyclesOfRepetition-1;e>=1;--e){r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],a=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=a,r=i[15],a=i[11],n=i[7],i[15]=i[3],i[11]=r,i[7]=a,i[3]=n;for(let e=0;e<16;++e)i[e]=this._inv_s[i[e]];for(let r=0,a=16*e;r<16;++r,++a)i[r]^=t[a];for(let e=0;e<16;e+=4){const t=this._mix[i[e]],a=this._mix[i[e+1]],n=this._mix[i[e+2]],s=this._mix[i[e+3]];r=t^a>>>8^a<<24^n>>>16^n<<16^s>>>24^s<<8,i[e]=r>>>24&255,i[e+1]=r>>16&255,i[e+2]=r>>8&255,i[e+3]=255&r}}r=i[13],i[13]=i[9],i[9]=i[5],i[5]=i[1],i[1]=r,r=i[14],a=i[10],i[14]=i[6],i[10]=i[2],i[6]=r,i[2]=a,r=i[15],a=i[11],n=i[7],i[15]=i[3],i[11]=r,i[7]=a,i[3]=n;for(let e=0;e<16;++e)i[e]=this._inv_s[i[e]],i[e]^=t[e];return i}_encrypt(e,t){const r=this._s;let a,n,i;const s=new Uint8Array(16);s.set(e);for(let e=0;e<16;++e)s[e]^=t[e];for(let e=1;e<this._cyclesOfRepetition;e++){for(let e=0;e<16;++e)s[e]=r[s[e]];i=s[1],s[1]=s[5],s[5]=s[9],s[9]=s[13],s[13]=i,i=s[2],n=s[6],s[2]=s[10],s[6]=s[14],s[10]=i,s[14]=n,i=s[3],n=s[7],a=s[11],s[3]=s[15],s[7]=i,s[11]=n,s[15]=a;for(let e=0;e<16;e+=4){const t=s[e+0],r=s[e+1],n=s[e+2],i=s[e+3];a=t^r^n^i,s[e+0]^=a^this._mixCol[t^r],s[e+1]^=a^this._mixCol[r^n],s[e+2]^=a^this._mixCol[n^i],s[e+3]^=a^this._mixCol[i^t]}for(let r=0,a=16*e;r<16;++r,++a)s[r]^=t[a]}for(let e=0;e<16;++e)s[e]=r[s[e]];i=s[1],s[1]=s[5],s[5]=s[9],s[9]=s[13],s[13]=i,i=s[2],n=s[6],s[2]=s[10],s[6]=s[14],s[10]=i,s[14]=n,i=s[3],n=s[7],a=s[11],s[3]=s[15],s[7]=i,s[11]=n,s[15]=a;for(let e=0,r=this._keySize;e<16;++e,++r)s[e]^=t[r];return s}_decryptBlock2(e,t){const r=e.length;let a=this.buffer,n=this.bufferPosition;const i=[];let s=this.iv;for(let t=0;t<r;++t){if(a[n]=e[t],++n,n<16)continue;const r=this._decrypt(a,this._key);for(let e=0;e<16;++e)r[e]^=s[e];s=a,i.push(r),a=new Uint8Array(16),n=0}if(this.buffer=a,this.bufferLength=n,this.iv=s,0===i.length)return new Uint8Array(0);let o=16*i.length;if(t){const e=i.at(-1);let t=e[15];if(t<=16){for(let r=15,a=16-t;r>=a;--r)if(e[r]!==t){t=0;break}o-=t,i[i.length-1]=e.subarray(0,16-t)}}const c=new Uint8Array(o);for(let e=0,t=0,r=i.length;e<r;++e,t+=16)c.set(i[e],t);return c}decryptBlock(e,t,r=null){const a=e.length,n=this.buffer;let i=this.bufferPosition;if(r)this.iv=r;else{for(let t=0;i<16&&t<a;++t,++i)n[i]=e[t];if(i<16)return this.bufferLength=i,new Uint8Array(0);this.iv=n,e=e.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=this._decryptBlock2,this.decryptBlock(e,t)}encrypt(e,t){const r=e.length;let a=this.buffer,n=this.bufferPosition;const i=[];t||(t=new Uint8Array(16));for(let s=0;s<r;++s){if(a[n]=e[s],++n,n<16)continue;for(let e=0;e<16;++e)a[e]^=t[e];const r=this._encrypt(a,this._key);t=r,i.push(r),a=new Uint8Array(16),n=0}if(this.buffer=a,this.bufferLength=n,this.iv=t,0===i.length)return new Uint8Array(0);const s=16*i.length,o=new Uint8Array(s);for(let e=0,t=0,r=i.length;e<r;++e,t+=16)o.set(i[e],t);return o}}class p extends f{constructor(e){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(e)}_expandKey(e){const t=this._s,r=this._rcon,a=new Uint8Array(176);a.set(e);for(let e=16,n=1;e<176;++n){let i=a[e-3],s=a[e-2],o=a[e-1],c=a[e-4];i=t[i],s=t[s],o=t[o],c=t[c],i^=r[n];for(let t=0;t<4;++t)a[e]=i^=a[e-16],e++,a[e]=s^=a[e-16],e++,a[e]=o^=a[e-16],e++,a[e]=c^=a[e-16],e++}return a}}t.AES128Cipher=p;class g extends f{constructor(e){super(),this._cyclesOfRepetition=14,this._keySize=224,this._key=this._expandKey(e)}_expandKey(e){const t=this._s,r=new Uint8Array(240);r.set(e);let a,n,i,s,o=1;for(let e=32,c=1;e<240;++c){e%32==16?(a=t[a],n=t[n],i=t[i],s=t[s]):e%32==0&&(a=r[e-3],n=r[e-2],i=r[e-1],s=r[e-4],a=t[a],n=t[n],i=t[i],s=t[s],a^=o,(o<<=1)>=256&&(o=255&(27^o)));for(let t=0;t<4;++t)r[e]=a^=r[e-32],e++,r[e]=n^=r[e-32],e++,r[e]=i^=r[e-32],e++,r[e]=s^=r[e-32],e++}return r}}t.AES256Cipher=g;class m{checkOwnerPassword(e,t,r,n){const i=new Uint8Array(e.length+56);i.set(e,0),i.set(t,e.length),i.set(r,e.length+t.length);const s=l(i,0,i.length);return(0,a.isArrayEqual)(s,n)}checkUserPassword(e,t,r){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);const i=l(n,0,n.length);return(0,a.isArrayEqual)(i,r)}getOwnerKey(e,t,r,a){const n=new Uint8Array(e.length+56);n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length);const i=l(n,0,n.length);return new g(i).decryptBlock(a,!1,new Uint8Array(16))}getUserKey(e,t,r){const a=new Uint8Array(e.length+8);a.set(e,0),a.set(t,e.length);const n=l(a,0,a.length);return new g(n).decryptBlock(r,!1,new Uint8Array(16))}}t.PDF17=m;class b{_hash(e,t,r){let a=l(t,0,t.length).subarray(0,32),n=[0],i=0;for(;i<64||n.at(-1)>i-32;){const t=e.length+a.length+r.length,s=new Uint8Array(t);let o=0;s.set(e,o),o+=e.length,s.set(a,o),o+=a.length,s.set(r,o);const c=new Uint8Array(64*t);for(let e=0,r=0;e<64;e++,r+=t)c.set(s,r);n=new p(a.subarray(0,16)).encrypt(c,a.subarray(16,32));const d=n.slice(0,16).reduce(((e,t)=>e+t),0)%3;0===d?a=l(n,0,n.length):1===d?a=u(n,0,n.length):2===d&&(a=h(n,0,n.length)),i++}return a.subarray(0,32)}checkOwnerPassword(e,t,r,n){const i=new Uint8Array(e.length+56);i.set(e,0),i.set(t,e.length),i.set(r,e.length+t.length);const s=this._hash(e,i,r);return(0,a.isArrayEqual)(s,n)}checkUserPassword(e,t,r){const n=new Uint8Array(e.length+8);n.set(e,0),n.set(t,e.length);const i=this._hash(e,n,[]);return(0,a.isArrayEqual)(i,r)}getOwnerKey(e,t,r,a){const n=new Uint8Array(e.length+56);n.set(e,0),n.set(t,e.length),n.set(r,e.length+t.length);const i=this._hash(e,n,r);return new g(i).decryptBlock(a,!1,new Uint8Array(16))}getUserKey(e,t,r){const a=new Uint8Array(e.length+8);a.set(e,0),a.set(t,e.length);const n=this._hash(e,a,[]);return new g(n).decryptBlock(r,!1,new Uint8Array(16))}}t.PDF20=b;class y{constructor(e,t){this.StringCipherConstructor=e,this.StreamCipherConstructor=t}createStream(e,t){const r=new this.StreamCipherConstructor;return new i.DecryptStream(e,t,(function(e,t){return r.decryptBlock(e,t)}))}decryptString(e){const t=new this.StringCipherConstructor;let r=(0,a.stringToBytes)(e);return r=t.decryptBlock(r,!0),(0,a.bytesToString)(r)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof f){const r=16-e.length%16;e+=String.fromCharCode(r).repeat(r);const n=new Uint8Array(16);if("undefined"!=typeof crypto)crypto.getRandomValues(n);else for(let e=0;e<16;e++)n[e]=Math.floor(256*Math.random());let i=(0,a.stringToBytes)(e);i=t.encrypt(i,n);const s=new Uint8Array(16+i.length);return s.set(n),s.set(i,16),(0,a.bytesToString)(s)}let r=(0,a.stringToBytes)(e);return r=t.encrypt(r),(0,a.bytesToString)(r)}}class v{static#T=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]);#E(e,t,r,a,n,i,s,o,c,l,h,u){if(t){const e=Math.min(127,t.length);t=t.subarray(0,e)}else t=[];const d=6===e?new b:new m;return d.checkUserPassword(t,o,s)?d.getUserKey(t,c,h):t.length&&d.checkOwnerPassword(t,a,i,r)?d.getOwnerKey(t,n,i,l):null}#O(e,t,r,a,n,i,c,l){const h=40+r.length+e.length,u=new Uint8Array(h);let d,f,p=0;if(t)for(f=Math.min(32,t.length);p<f;++p)u[p]=t[p];for(d=0;p<32;)u[p++]=v.#T[d++];for(d=0,f=r.length;d<f;++d)u[p++]=r[d];for(u[p++]=255&n,u[p++]=n>>8&255,u[p++]=n>>16&255,u[p++]=n>>>24&255,d=0,f=e.length;d<f;++d)u[p++]=e[d];i>=4&&!l&&(u[p++]=255,u[p++]=255,u[p++]=255,u[p++]=255);let g=o(u,0,p);const m=c>>3;if(i>=3)for(d=0;d<50;++d)g=o(g,0,m);const b=g.subarray(0,m);let y,w;if(i>=3){for(p=0;p<32;++p)u[p]=v.#T[p];for(d=0,f=e.length;d<f;++d)u[p++]=e[d];y=new s(b),w=y.encryptBlock(o(u,0,p)),f=b.length;const t=new Uint8Array(f);for(d=1;d<=19;++d){for(let e=0;e<f;++e)t[e]=b[e]^d;y=new s(t),w=y.encryptBlock(w)}for(d=0,f=w.length;d<f;++d)if(a[d]!==w[d])return null}else for(y=new s(b),w=y.encryptBlock(v.#T),d=0,f=w.length;d<f;++d)if(a[d]!==w[d])return null;return b}#F(e,t,r,a){const n=new Uint8Array(32);let i=0;const c=Math.min(32,e.length);for(;i<c;++i)n[i]=e[i];let l=0;for(;i<32;)n[i++]=v.#T[l++];let h=o(n,0,i);const u=a>>3;if(r>=3)for(l=0;l<50;++l)h=o(h,0,h.length);let d,f;if(r>=3){f=t;const e=new Uint8Array(u);for(l=19;l>=0;l--){for(let t=0;t<u;++t)e[t]=h[t]^l;d=new s(e),f=d.encryptBlock(f)}}else d=new s(h.subarray(0,u)),f=d.encryptBlock(t);return f}#P(e,t,r,a=!1){const n=new Uint8Array(r.length+9),i=r.length;let s;for(s=0;s<i;++s)n[s]=r[s];return n[s++]=255&e,n[s++]=e>>8&255,n[s++]=e>>16&255,n[s++]=255&t,n[s++]=t>>8&255,a&&(n[s++]=115,n[s++]=65,n[s++]=108,n[s++]=84),o(n,0,s).subarray(0,Math.min(r.length+5,16))}#I(e,t,r,i,o){if(!(t instanceof n.Name))throw new a.FormatError("Invalid crypt filter name.");const c=this,l=e.get(t.name),h=l?.get("CFM");if(!h||"None"===h.name)return function(){return new d};if("V2"===h.name)return function(){return new s(c.#P(r,i,o,!1))};if("AESV2"===h.name)return function(){return new p(c.#P(r,i,o,!0))};if("AESV3"===h.name)return function(){return new g(o)};throw new a.FormatError("Unknown crypto method")}constructor(e,t,r){const i=e.get("Filter");if(!(0,n.isName)(i,"Standard"))throw new a.FormatError("unknown encryption method");this.filterName=i.name,this.dict=e;const s=e.get("V");if(!Number.isInteger(s)||1!==s&&2!==s&&4!==s&&5!==s)throw new a.FormatError("unsupported encryption algorithm");this.algorithm=s;let o=e.get("Length");if(!o)if(s<=3)o=40;else{const t=e.get("CF"),r=e.get("StmF");if(t instanceof n.Dict&&r instanceof n.Name){t.suppressEncryption=!0;const e=t.get(r.name);o=e?.get("Length")||128,o<40&&(o<<=3)}}if(!Number.isInteger(o)||o<40||o%8!=0)throw new a.FormatError("invalid key length");const c=(0,a.stringToBytes)(e.get("O")),l=(0,a.stringToBytes)(e.get("U")),h=c.subarray(0,32),u=l.subarray(0,32),d=e.get("P"),f=e.get("R"),p=(4===s||5===s)&&!1!==e.get("EncryptMetadata");this.encryptMetadata=p;const g=(0,a.stringToBytes)(t);let m,b;if(r){if(6===f)try{r=(0,a.utf8StringToString)(r)}catch{(0,a.warn)("CipherTransformFactory: Unable to convert UTF8 encoded password.")}m=(0,a.stringToBytes)(r)}if(5!==s)b=this.#O(g,m,h,u,d,f,o,p);else{const t=c.subarray(32,40),r=c.subarray(40,48),n=l.subarray(0,48),i=l.subarray(32,40),s=l.subarray(40,48),o=(0,a.stringToBytes)(e.get("OE")),d=(0,a.stringToBytes)(e.get("UE")),p=(0,a.stringToBytes)(e.get("Perms"));b=this.#E(f,m,h,t,r,n,u,i,s,o,d,p)}if(!b&&!r)throw new a.PasswordException("No password given",a.PasswordResponses.NEED_PASSWORD);if(!b&&r){const e=this.#F(m,h,f,o);b=this.#O(g,e,h,u,d,f,o,p)}if(!b)throw new a.PasswordException("Incorrect Password",a.PasswordResponses.INCORRECT_PASSWORD);if(this.encryptionKey=b,s>=4){const t=e.get("CF");t instanceof n.Dict&&(t.suppressEncryption=!0),this.cf=t,this.stmf=e.get("StmF")||n.Name.get("Identity"),this.strf=e.get("StrF")||n.Name.get("Identity"),this.eff=e.get("EFF")||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new y(this.#I(this.cf,this.strf,e,t,this.encryptionKey),this.#I(this.cf,this.stmf,e,t,this.encryptionKey));const r=this.#P(e,t,this.encryptionKey,!1),a=function(){return new s(r)};return new y(a,a)}}t.CipherTransformFactory=v},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecryptStream=void 0;var a=r(18);class n extends a.DecodeStream{constructor(e,t,r){super(t),this.str=e,this.dict=e.dict,this.decrypt=r,this.nextChunk=null,this.initialized=!1}readBlock(){let e;if(this.initialized?e=this.nextChunk:(e=this.str.getBytes(512),this.initialized=!0),!e||0===e.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(512);const t=this.nextChunk?.length>0;e=(0,this.decrypt)(e,!t);const r=this.bufferLength,a=r+e.length;this.ensureBuffer(a).set(e,r),this.bufferLength=a}}t.DecryptStream=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectLoader=void 0;var a=r(4),n=r(5),i=r(3),s=r(2);function o(e,t){if(e instanceof a.Dict)e=e.getRawValues();else if(e instanceof n.BaseStream)e=e.dict.getRawValues();else if(!Array.isArray(e))return;for(const i of e)((r=i)instanceof a.Ref||r instanceof a.Dict||r instanceof n.BaseStream||Array.isArray(r))&&t.push(i);var r}t.ObjectLoader=class{constructor(e,t,r){this.dict=e,this.keys=t,this.xref=r,this.refSet=null}async load(){if(this.xref.stream.isDataLoaded)return;const{keys:e,dict:t}=this;this.refSet=new a.RefSet;const r=[];for(const a of e){const e=t.getRaw(a);void 0!==e&&r.push(e)}return this._walk(r)}async _walk(e){const t=[],r=[];for(;e.length;){let c=e.pop();if(c instanceof a.Ref){if(this.refSet.has(c))continue;try{this.refSet.put(c),c=this.xref.fetch(c)}catch(e){if(!(e instanceof i.MissingDataException)){(0,s.warn)(`ObjectLoader._walk - requesting all data: "${e}".`),this.refSet=null;const{manager:t}=this.xref.stream;return t.requestAllChunks()}t.push(c),r.push({begin:e.begin,end:e.end})}}if(c instanceof n.BaseStream){const e=c.getBaseStreams();if(e){let a=!1;for(const t of e)t.isDataLoaded||(a=!0,r.push({begin:t.start,end:t.end}));a&&t.push(c)}}o(c,e)}if(r.length){await this.xref.stream.manager.requestRanges(r);for(const e of t)e instanceof a.Ref&&this.refSet.remove(e);return this._walk(t)}this.refSet=null}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XFAFactory=void 0;var a=r(78),n=r(79),i=r(89),s=r(85),o=r(84),c=r(2),l=r(90),h=r(100);class u{constructor(e){try{this.root=(new l.XFAParser).parse(u._createDocument(e));const t=new n.Binder(this.root);this.form=t.bind(),this.dataHandler=new i.DataHandler(this.root,t.getData()),this.form[a.$globalData].template=this.form}catch(e){(0,c.warn)(`XFA - an error occurred during parsing and binding: ${e}`)}}isValid(){return this.root&&this.form}_createPagesHelper(){const e=this.form[a.$toPages]();return new Promise(((t,r)=>{const a=()=>{try{const r=e.next();r.done?t(r.value):setTimeout(a,0)}catch(e){r(e)}};setTimeout(a,0)}))}async _createPages(){try{this.pages=await this._createPagesHelper(),this.dims=this.pages.children.map((e=>{const{width:t,height:r}=e.attributes.style;return[0,0,parseInt(t),parseInt(r)]}))}catch(e){(0,c.warn)(`XFA - an error occurred during layout: ${e}`)}}getBoundingBox(e){return this.dims[e]}async getNumPages(){return this.pages||await this._createPages(),this.dims.length}setImages(e){this.form[a.$globalData].images=e}setFonts(e){this.form[a.$globalData].fontFinder=new s.FontFinder(e);const t=[];for(let e of this.form[a.$globalData].usedTypefaces)e=(0,o.stripQuotes)(e),this.form[a.$globalData].fontFinder.find(e)||t.push(e);return t.length>0?t:null}appendFonts(e,t){this.form[a.$globalData].fontFinder.add(e,t)}async getPages(){this.pages||await this._createPages();const e=this.pages;return this.pages=null,e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}static getRichTextAsHtml(e){if(!e||"string"!=typeof e)return null;try{let t=new l.XFAParser(h.XhtmlNamespace,!0).parse(e);if(!["body","xhtml"].includes(t[a.$nodeName])){const e=h.XhtmlNamespace.body({});e[a.$appendChild](t),t=e}const r=t[a.$toHTML]();if(!r.success)return null;const{html:n}=r,{attributes:i}=n;return i&&(i.class&&(i.class=i.class.filter((e=>!e.startsWith("xfa")))),i.dir="auto"),{html:n,str:t[a.$text]()}}catch(e){(0,c.warn)(`XFA - an error occurred during parsing of rich text: ${e}`)}return null}}t.XFAFactory=u},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.$uid=t.$toStyle=t.$toString=t.$toPages=t.$toHTML=t.$text=t.$tabIndex=t.$setValue=t.$setSetAttributes=t.$setId=t.$searchNode=t.$root=t.$resolvePrototypes=t.$removeChild=t.$pushPara=t.$pushGlyphs=t.$popPara=t.$onText=t.$onChildCheck=t.$onChild=t.$nsAttributes=t.$nodeName=t.$namespaceId=t.$lastAttribute=t.$isUsable=t.$isTransparent=t.$isThereMoreWidth=t.$isSplittable=t.$isNsAgnostic=t.$isDescendent=t.$isDataValue=t.$isCDATAXml=t.$isBindable=t.$insertAt=t.$indexOf=t.$ids=t.$hasSettableValue=t.$globalData=t.$getTemplateRoot=t.$getSubformParent=t.$getRealChildrenByNameIt=t.$getParent=t.$getNextPage=t.$getExtra=t.$getDataValue=t.$getContainedChildren=t.$getChildrenByNameIt=t.$getChildrenByName=t.$getChildrenByClass=t.$getChildren=t.$getAvailableSpace=t.$getAttributes=t.$getAttributeIt=t.$flushHTML=t.$finalize=t.$extra=t.$dump=t.$data=t.$content=t.$consumed=t.$clone=t.$cleanup=t.$cleanPage=t.$clean=t.$childrenToHTML=t.$appendChild=t.$addHTML=t.$acceptWhitespace=void 0;const r=Symbol();t.$acceptWhitespace=r;const a=Symbol();t.$addHTML=a;const n=Symbol();t.$appendChild=n;const i=Symbol();t.$childrenToHTML=i;const s=Symbol();t.$clean=s;const o=Symbol();t.$cleanPage=o;const c=Symbol();t.$cleanup=c;const l=Symbol();t.$clone=l;const h=Symbol();t.$consumed=h;const u=Symbol("content");t.$content=u;const d=Symbol("data");t.$data=d;const f=Symbol();t.$dump=f;const p=Symbol("extra");t.$extra=p;const g=Symbol();t.$finalize=g;const m=Symbol();t.$flushHTML=m;const b=Symbol();t.$getAttributeIt=b;const y=Symbol();t.$getAttributes=y;const v=Symbol();t.$getAvailableSpace=v;const w=Symbol();t.$getChildrenByClass=w;const A=Symbol();t.$getChildrenByName=A;const S=Symbol();t.$getChildrenByNameIt=S;const x=Symbol();t.$getDataValue=x;const k=Symbol();t.$getExtra=k;const C=Symbol();t.$getRealChildrenByNameIt=C;const _=Symbol();t.$getChildren=_;const T=Symbol();t.$getContainedChildren=T;const E=Symbol();t.$getNextPage=E;const O=Symbol();t.$getSubformParent=O;const F=Symbol();t.$getParent=F;const P=Symbol();t.$getTemplateRoot=P;const I=Symbol();t.$globalData=I;const M=Symbol();t.$hasSettableValue=M;const R=Symbol();t.$ids=R;const D=Symbol();t.$indexOf=D;const N=Symbol();t.$insertAt=N;const L=Symbol();t.$isCDATAXml=L;const B=Symbol();t.$isBindable=B;const j=Symbol();t.$isDataValue=j;const $=Symbol();t.$isDescendent=$;const U=Symbol();t.$isNsAgnostic=U;const z=Symbol();t.$isSplittable=z;const H=Symbol();t.$isThereMoreWidth=H;const X=Symbol();t.$isTransparent=X;const W=Symbol();t.$isUsable=W;const G=Symbol();t.$lastAttribute=G;const q=Symbol("namespaceId");t.$namespaceId=q;const V=Symbol("nodeName");t.$nodeName=V;const K=Symbol();t.$nsAttributes=K;const Y=Symbol();t.$onChild=Y;const Z=Symbol();t.$onChildCheck=Z;const J=Symbol();t.$onText=J;const Q=Symbol();t.$pushGlyphs=Q;const ee=Symbol();t.$popPara=ee;const te=Symbol();t.$pushPara=te;const re=Symbol();t.$removeChild=re;const ae=Symbol("root");t.$root=ae;const ne=Symbol();t.$resolvePrototypes=ne;const ie=Symbol();t.$searchNode=ie;const se=Symbol();t.$setId=se;const oe=Symbol();t.$setSetAttributes=oe;const ce=Symbol();t.$setValue=ce;const le=Symbol();t.$tabIndex=le;const he=Symbol();t.$text=he;const ue=Symbol();t.$toPages=ue;const de=Symbol();t.$toHTML=de;const fe=Symbol();t.$toString=fe;const pe=Symbol();t.$toStyle=pe;const ge=Symbol("uid");t.$uid=ge},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Binder=void 0;var a=r(78),n=r(80),i=r(88),s=r(87),o=r(81),c=r(2);const l=o.NamespaceIds.datasets.id;function h(e){const t=new n.Text({});return t[a.$content]=e,t}t.Binder=class{constructor(e){this.root=e,this.datasets=e.datasets,this.data=e.datasets?.data||new s.XmlObject(o.NamespaceIds.datasets.id,"data"),this.emptyMerge=0===this.data[a.$getChildren]().length,this.root.form=this.form=e.template[a.$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(e,t,r){if(e[a.$data]=t,e[a.$hasSettableValue]())if(t[a.$isDataValue]()){const r=t[a.$getDataValue]();e[a.$setValue](h(r))}else if(e instanceof n.Field&&"multiSelect"===e.ui?.choiceList?.open){const r=t[a.$getChildren]().map((e=>e[a.$content].trim())).join("\n");e[a.$setValue](h(r))}else this._isConsumeData()&&(0,c.warn)("XFA - Nodes haven't the same type.");else!t[a.$isDataValue]()||this._isMatchTemplate()?this._bindElement(e,t):(0,c.warn)("XFA - Nodes haven't the same type.")}_findDataByNameToConsume(e,t,r,n){if(!e)return null;let i,s;for(let n=0;n<3;n++){for(i=r[a.$getRealChildrenByNameIt](e,!1,!0);s=i.next().value,s;)if(t===s[a.$isDataValue]())return s;if(r[a.$namespaceId]===o.NamespaceIds.datasets.id&&"data"===r[a.$nodeName])break;r=r[a.$getParent]()}return n?(i=this.data[a.$getRealChildrenByNameIt](e,!0,!1),s=i.next().value,s||(i=this.data[a.$getAttributeIt](e,!0),s=i.next().value,s?.[a.$isDataValue]()?s:null)):null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:r,target:o,connection:l}of e.setProperty.children){if(l)continue;if(!r)continue;const h=(0,i.searchNode)(this.root,t,r,!1,!1);if(!h){(0,c.warn)(`XFA - Invalid reference: ${r}.`);continue}const[u]=h;if(!u[a.$isDescendent](this.data)){(0,c.warn)("XFA - Invalid node: must be a data node.");continue}const d=(0,i.searchNode)(this.root,e,o,!1,!1);if(!d){(0,c.warn)(`XFA - Invalid target: ${o}.`);continue}const[f]=d;if(!f[a.$isDescendent](e)){(0,c.warn)("XFA - Invalid target: must be a property or subproperty.");continue}const p=f[a.$getParent]();if(f instanceof n.SetProperty||p instanceof n.SetProperty){(0,c.warn)("XFA - Invalid target: cannot be a setProperty or one of its properties.");continue}if(f instanceof n.BindItems||p instanceof n.BindItems){(0,c.warn)("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const g=u[a.$text](),m=f[a.$nodeName];if(f instanceof s.XFAAttribute){const e=Object.create(null);e[m]=g;const t=Reflect.construct(Object.getPrototypeOf(p).constructor,[e]);p[m]=t[m]}else f.hasOwnProperty(a.$content)?(f[a.$data]=u,f[a.$content]=g,f[a.$finalize]()):(0,c.warn)("XFA - Invalid node to use in setProperty")}}_bindItems(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const t of e.items.children)e[a.$removeChild](t);e.items.clear();const r=new n.Items({}),s=new n.Items({});e[a.$appendChild](r),e.items.push(r),e[a.$appendChild](s),e.items.push(s);for(const{ref:n,labelRef:o,valueRef:l,connection:u}of e.bindItems.children){if(u)continue;if(!n)continue;const e=(0,i.searchNode)(this.root,t,n,!1,!1);if(e)for(const t of e){if(!t[a.$isDescendent](this.datasets)){(0,c.warn)(`XFA - Invalid ref (${n}): must be a datasets child.`);continue}const e=(0,i.searchNode)(this.root,t,o,!0,!1);if(!e){(0,c.warn)(`XFA - Invalid label: ${o}.`);continue}const[u]=e;if(!u[a.$isDescendent](this.datasets)){(0,c.warn)("XFA - Invalid label: must be a datasets child.");continue}const d=(0,i.searchNode)(this.root,t,l,!0,!1);if(!d){(0,c.warn)(`XFA - Invalid value: ${l}.`);continue}const[f]=d;if(!f[a.$isDescendent](this.datasets)){(0,c.warn)("XFA - Invalid value: must be a datasets child.");continue}const p=h(u[a.$text]()),g=h(f[a.$text]());r[a.$appendChild](p),r.text.push(p),s[a.$appendChild](g),s.text.push(g)}else(0,c.warn)(`XFA - Invalid reference: ${n}.`)}}_bindOccurrences(e,t,r){let n;if(t.length>1&&(n=e[a.$clone](),n[a.$removeChild](n.occur),n.occur=null),this._bindValue(e,t[0],r),this._setProperties(e,t[0]),this._bindItems(e,t[0]),1===t.length)return;const i=e[a.$getParent](),s=e[a.$nodeName],o=i[a.$indexOf](e);for(let e=1,c=t.length;e<c;e++){const c=t[e],l=n[a.$clone]();i[s].push(l),i[a.$insertAt](o+e,l),this._bindValue(l,c,r),this._setProperties(l,c),this._bindItems(l,c)}}_createOccurrences(e){if(!this.emptyMerge)return;const{occur:t}=e;if(!t||t.initial<=1)return;const r=e[a.$getParent](),n=e[a.$nodeName];if(!(r[n]instanceof s.XFAObjectArray))return;let i;i=e.name?r[n].children.filter((t=>t.name===e.name)).length:r[n].children.length;const o=r[a.$indexOf](e)+1,c=t.initial-i;if(c){const t=e[a.$clone]();t[a.$removeChild](t.occur),t.occur=null,r[n].push(t),r[a.$insertAt](o,t);for(let e=1;e<c;e++){const i=t[a.$clone]();r[n].push(i),r[a.$insertAt](o+e,i)}}}_getOccurInfo(e){const{name:t,occur:r}=e;if(!r||!t)return[1,1];const a=-1===r.max?1/0:r.max;return[r.min,a]}_setAndBind(e,t){this._setProperties(e,t),this._bindItems(e,t),this._bindElement(e,t)}_bindElement(e,t){const r=[];this._createOccurrences(e);for(const n of e[a.$getChildren]()){if(n[a.$data])continue;if(void 0===this._mergeMode&&"subform"===n[a.$nodeName]){this._mergeMode="consumeData"===n.mergeMode;const e=t[a.$getChildren]();if(e.length>0)this._bindOccurrences(n,[e[0]],null);else if(this.emptyMerge){const e=t[a.$namespaceId]===l?-1:t[a.$namespaceId],r=n[a.$data]=new s.XmlObject(e,n.name||"root");t[a.$appendChild](r),this._bindElement(n,r)}continue}if(!n[a.$isBindable]())continue;let e=!1,o=null,h=null,u=null;if(n.bind){switch(n.bind.match){case"none":this._setAndBind(n,t);continue;case"global":e=!0;break;case"dataRef":if(!n.bind.ref){(0,c.warn)(`XFA - ref is empty in node ${n[a.$nodeName]}.`),this._setAndBind(n,t);continue}h=n.bind.ref}n.bind.picture&&(o=n.bind.picture[a.$content])}const[d,f]=this._getOccurInfo(n);if(h){if(u=(0,i.searchNode)(this.root,t,h,!0,!1),null===u){if(u=(0,i.createDataNode)(this.data,t,h),!u)continue;this._isConsumeData()&&(u[a.$consumed]=!0),this._setAndBind(n,u);continue}this._isConsumeData()&&(u=u.filter((e=>!e[a.$consumed]))),u.length>f?u=u.slice(0,f):0===u.length&&(u=null),u&&this._isConsumeData()&&u.forEach((e=>{e[a.$consumed]=!0}))}else{if(!n.name){this._setAndBind(n,t);continue}if(this._isConsumeData()){const r=[];for(;r.length<f;){const i=this._findDataByNameToConsume(n.name,n[a.$hasSettableValue](),t,e);if(!i)break;i[a.$consumed]=!0,r.push(i)}u=r.length>0?r:null}else{if(u=t[a.$getRealChildrenByNameIt](n.name,!1,this.emptyMerge).next().value,!u){if(0===d){r.push(n);continue}const e=t[a.$namespaceId]===l?-1:t[a.$namespaceId];u=n[a.$data]=new s.XmlObject(e,n.name),this.emptyMerge&&(u[a.$consumed]=!0),t[a.$appendChild](u),this._setAndBind(n,u);continue}this.emptyMerge&&(u[a.$consumed]=!0),u=[u]}}u?this._bindOccurrences(n,u,o):d>0?this._setAndBind(n,t):r.push(n)}r.forEach((e=>e[a.$getParent]()[a.$removeChild](e)))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Value=t.Text=t.TemplateNamespace=t.Template=t.SetProperty=t.Items=t.Field=t.BindItems=void 0;var a=r(78),n=r(81),i=r(82),s=r(83),o=r(87),c=r(84),l=r(2),h=r(85),u=r(3),d=r(88);const f=n.NamespaceIds.template.id,p="http://www.w3.org/2000/svg",g=/^H(\d+)$/,m=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"]),b=[[[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 y(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[a.$getExtra]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}function v(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function w(e,t){if(!e.value){const t=new Rt({});e[a.$appendChild](t),e.value=t}e.value[a.$setValue](t)}function*A(e){for(const t of e[a.$getChildren]())t instanceof wt?yield*t[a.$getContainedChildren]():yield t}function S(e){return"error"===e.validate?.nullTest}function x(e){for(;e;){if(!e.traversal)return void(e[a.$tabIndex]=e[a.$getParent]()[a.$tabIndex]);if(e[a.$tabIndex])return;let t=null;for(const r of e.traversal[a.$getChildren]())if("next"===r.operation){t=r;break}if(!t||!t.ref)return void(e[a.$tabIndex]=e[a.$getParent]()[a.$tabIndex]);const r=e[a.$getTemplateRoot]();e[a.$tabIndex]=++r[a.$tabIndex];const n=r[a.$searchNode](t.ref,e);if(!n)return;e=n[0]}}function k(e,t){const r=e.assist;if(r){const e=r[a.$toHTML]();e&&(t.title=e);const n=r.role.match(g);if(n){const e="heading",r=n[1];t.role=e,t["aria-level"]=r}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const r=e[a.$getParent]();"row"===r.layout&&(t.role="TH"===r.assist?.role?"columnheader":"cell")}}function C(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[a.$content]?t.speak[a.$content]:t.toolTip?t.toolTip[a.$content]:null}function _(e){return c.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:e}]})}function T(e){const t=e[a.$getTemplateRoot]();null===t[a.$extra].firstUnsplittable&&(t[a.$extra].firstUnsplittable=e,t[a.$extra].noLayoutFailure=!0)}function E(e){const t=e[a.$getTemplateRoot]();t[a.$extra].firstUnsplittable===e&&(t[a.$extra].noLayoutFailure=!1)}function O(e){if(e[a.$extra])return!1;if(e[a.$extra]=Object.create(null),"auto"===e.targetType)return!1;const t=e[a.$getTemplateRoot]();let r=null;if(e.target){if(r=t[a.$searchNode](e.target,e[a.$getParent]()),!r)return!1;r=r[0]}const{currentPageArea:n,currentContentArea:i}=t[a.$extra];if("pageArea"===e.targetType)return r instanceof Qe||(r=null),e.startNew?(e[a.$extra].target=r||n,!0):!(!r||r===n||(e[a.$extra].target=r,0));r instanceof ee||(r=null);const s=r&&r[a.$getParent]();let o,c=s;if(e.startNew)if(r){const e=s.contentArea.children,t=e.indexOf(i),a=e.indexOf(r);-1!==t&&t<a&&(c=null),o=a-1}else o=n.contentArea.children.indexOf(i);else{if(!r||r===i)return!1;o=s.contentArea.children.indexOf(r)-1,c=s===n?null:s}return e[a.$extra].target=c,e[a.$extra].index=o,!0}function F(e,t,r){const n=e[a.$getTemplateRoot](),i=n[a.$extra].noLayoutFailure,s=t[a.$getSubformParent];t[a.$getSubformParent]=()=>e,n[a.$extra].noLayoutFailure=!0;const o=t[a.$toHTML](r);e[a.$addHTML](o.html,o.bbox),n[a.$extra].noLayoutFailure=i,t[a.$getSubformParent]=s}class P extends o.StringObject{constructor(e){super(f,"appearanceFilter"),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class I extends o.XFAObject{constructor(e){super(f,"arc",!0),this.circular=(0,c.getInteger)({data:e.circular,defaultValue:0,validate:e=>1===e}),this.hand=(0,c.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.startAngle=(0,c.getFloat)({data:e.startAngle,defaultValue:0,validate:e=>!0}),this.sweepAngle=(0,c.getFloat)({data:e.sweepAngle,defaultValue:360,validate:e=>!0}),this.use=e.use||"",this.usehref=e.usehref||"",this.edge=null,this.fill=null}[a.$toHTML](){const e=this.edge||new ue({}),t=e[a.$toStyle](),r=Object.create(null);let n;"visible"===this.fill?.presence?Object.assign(r,this.fill[a.$toStyle]()):r.fill="transparent",r.strokeWidth=(0,s.measureToString)("visible"===e.presence?e.thickness:0),r.stroke=t.color;const i={xmlns:p,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)n={name:"ellipse",attributes:{xmlns:p,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:r}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,a=this.sweepAngle>180?1:0,[s,o,c,l]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(e+t)),50*(1-Math.sin(e+t))];n={name:"path",attributes:{xmlns:p,d:`M ${s} ${o} A 50 50 0 ${a} 0 ${c} ${l}`,vectorEffect:"non-scaling-stroke",style:r}},Object.assign(i,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const o={name:"svg",children:[n],attributes:i};return v(this[a.$getParent]()[a.$getParent]())?c.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[o]}):(o.attributes.style.position="absolute",c.HTMLResult.success(o))}}class M extends o.XFAObject{constructor(e){super(f,"area",!0),this.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.id=e.id||"",this.name=e.name||"",this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.x=(0,c.getMeasurement)(e.x,"0pt"),this.y=(0,c.getMeasurement)(e.y,"0pt"),this.desc=null,this.extras=null,this.area=new o.XFAObjectArray,this.draw=new o.XFAObjectArray,this.exObject=new o.XFAObjectArray,this.exclGroup=new o.XFAObjectArray,this.field=new o.XFAObjectArray,this.subform=new o.XFAObjectArray,this.subformSet=new o.XFAObjectArray}*[a.$getContainedChildren](){yield*A(this)}[a.$isTransparent](){return!0}[a.$isBindable](){return!0}[a.$addHTML](e,t){const[r,n,i,s]=t;this[a.$extra].width=Math.max(this[a.$extra].width,r+i),this[a.$extra].height=Math.max(this[a.$extra].height,n+s),this[a.$extra].children.push(e)}[a.$getAvailableSpace](){return this[a.$extra].availableSpace}[a.$toHTML](e){const t=(0,s.toStyle)(this,"position"),r={style:t,id:this[a.$uid],class:["xfaArea"]};(0,s.isPrintOnly)(this)&&r.class.push("xfaPrintOnly"),this.name&&(r.xfaName=this.name);const n=[];this[a.$extra]={children:n,width:0,height:0,availableSpace:e};const i=this[a.$childrenToHTML]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!i.success)return i.isBreak()?i:(delete this[a.$extra],c.HTMLResult.FAILURE);t.width=(0,s.measureToString)(this[a.$extra].width),t.height=(0,s.measureToString)(this[a.$extra].height);const o={name:"div",attributes:r,children:n},l=[this.x,this.y,this[a.$extra].width,this[a.$extra].height];return delete this[a.$extra],c.HTMLResult.success(o,l)}}class R extends o.XFAObject{constructor(e){super(f,"assist",!0),this.id=e.id||"",this.role=e.role||"",this.use=e.use||"",this.usehref=e.usehref||"",this.speak=null,this.toolTip=null}[a.$toHTML](){return this.toolTip?.[a.$content]||null}}class D extends o.XFAObject{constructor(e){super(f,"barcode",!0),this.charEncoding=(0,c.getKeyword)({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)}),this.checksum=(0,c.getStringOption)(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]),this.dataColumnCount=(0,c.getInteger)({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0}),this.dataLength=(0,c.getInteger)({data:e.dataLength,defaultValue:-1,validate:e=>e>=0}),this.dataPrep=(0,c.getStringOption)(e.dataPrep,["none","flateCompress"]),this.dataRowCount=(0,c.getInteger)({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0}),this.endChar=e.endChar||"",this.errorCorrectionLevel=(0,c.getInteger)({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e>=0&&e<=8}),this.id=e.id||"",this.moduleHeight=(0,c.getMeasurement)(e.moduleHeight,"5mm"),this.moduleWidth=(0,c.getMeasurement)(e.moduleWidth,"0.25mm"),this.printCheckDigit=(0,c.getInteger)({data:e.printCheckDigit,defaultValue:0,validate:e=>1===e}),this.rowColumnRatio=(0,c.getRatio)(e.rowColumnRatio),this.startChar=e.startChar||"",this.textLocation=(0,c.getStringOption)(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]),this.truncate=(0,c.getInteger)({data:e.truncate,defaultValue:0,validate:e=>1===e}),this.type=(0,c.getStringOption)(e.type?e.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,c.getStringOption)(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]),this.use=e.use||"",this.usehref=e.usehref||"",this.wideNarrowRatio=(0,c.getRatio)(e.wideNarrowRatio),this.encrypt=null,this.extras=null}}class N extends o.XFAObject{constructor(e){super(f,"bind",!0),this.match=(0,c.getStringOption)(e.match,["once","dataRef","global","none"]),this.ref=e.ref||"",this.picture=null}}class L extends o.XFAObject{constructor(e){super(f,"bindItems"),this.connection=e.connection||"",this.labelRef=e.labelRef||"",this.ref=e.ref||"",this.valueRef=e.valueRef||""}}t.BindItems=L;class B extends o.XFAObject{constructor(e){super(f,"bookend"),this.id=e.id||"",this.leader=e.leader||"",this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||""}}class j extends o.Option01{constructor(e){super(f,"boolean"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$toHTML](e){return _(1===this[a.$content]?"1":"0")}}class $ extends o.XFAObject{constructor(e){super(f,"border",!0),this.break=(0,c.getStringOption)(e.break,["close","open"]),this.hand=(0,c.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.corner=new o.XFAObjectArray(4),this.edge=new o.XFAObjectArray(4),this.extras=null,this.fill=null,this.margin=null}[a.$getExtra](){if(!this[a.$extra]){const e=this.edge.children.slice();if(e.length<4){const t=e.at(-1)||new ue({});for(let r=e.length;r<4;r++)e.push(t)}const t=e.map((e=>e.thickness)),r=[0,0,0,0];this.margin&&(r[0]=this.margin.topInset,r[1]=this.margin.rightInset,r[2]=this.margin.bottomInset,r[3]=this.margin.leftInset),this[a.$extra]={widths:t,insets:r,edges:e}}return this[a.$extra]}[a.$toStyle](){const{edges:e}=this[a.$getExtra](),t=e.map((e=>{const t=e[a.$toStyle]();return t.color||="#000000",t})),r=Object.create(null);if(this.margin&&Object.assign(r,this.margin[a.$toStyle]()),"visible"===this.fill?.presence&&Object.assign(r,this.fill[a.$toStyle]()),this.corner.children.some((e=>0!==e.radius))){const e=this.corner.children.map((e=>e[a.$toStyle]()));if(2===e.length||3===e.length){const t=e.at(-1);for(let r=e.length;r<4;r++)e.push(t)}r.borderRadius=e.map((e=>e.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":r.borderStyle="";break;case"inactive":r.borderStyle="none";break;default:r.borderStyle=t.map((e=>e.style)).join(" ")}return r.borderWidth=t.map((e=>e.width)).join(" "),r.borderColor=t.map((e=>e.color)).join(" "),r}}class U extends o.XFAObject{constructor(e){super(f,"break",!0),this.after=(0,c.getStringOption)(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.afterTarget=e.afterTarget||"",this.before=(0,c.getStringOption)(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]),this.beforeTarget=e.beforeTarget||"",this.bookendLeader=e.bookendLeader||"",this.bookendTrailer=e.bookendTrailer||"",this.id=e.id||"",this.overflowLeader=e.overflowLeader||"",this.overflowTarget=e.overflowTarget||"",this.overflowTrailer=e.overflowTrailer||"",this.startNew=(0,c.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class z extends o.XFAObject{constructor(e){super(f,"breakAfter",!0),this.id=e.id||"",this.leader=e.leader||"",this.startNew=(0,c.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.target=e.target||"",this.targetType=(0,c.getStringOption)(e.targetType,["auto","contentArea","pageArea"]),this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||"",this.script=null}}class H extends o.XFAObject{constructor(e){super(f,"breakBefore",!0),this.id=e.id||"",this.leader=e.leader||"",this.startNew=(0,c.getInteger)({data:e.startNew,defaultValue:0,validate:e=>1===e}),this.target=e.target||"",this.targetType=(0,c.getStringOption)(e.targetType,["auto","contentArea","pageArea"]),this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||"",this.script=null}[a.$toHTML](e){return this[a.$extra]={},c.HTMLResult.FAILURE}}class X extends o.XFAObject{constructor(e){super(f,"button",!0),this.highlight=(0,c.getStringOption)(e.highlight,["inverted","none","outline","push"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[a.$toHTML](e){const t=this[a.$getParent]()[a.$getParent](),r={name:"button",attributes:{id:this[a.$uid],class:["xfaButton"],style:{}},children:[]};for(const e of t.event.children){if("click"!==e.activity||!e.script)continue;const t=(0,u.recoverJsURL)(e.script[a.$content]);if(!t)continue;const n=(0,s.fixURL)(t.url);n&&r.children.push({name:"a",attributes:{id:"link"+this[a.$uid],href:n,newWindow:t.newWindow,class:["xfaLink"],style:{}},children:[]})}return c.HTMLResult.success(r)}}class W extends o.XFAObject{constructor(e){super(f,"calculate",!0),this.id=e.id||"",this.override=(0,c.getStringOption)(e.override,["disabled","error","ignore","warning"]),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.message=null,this.script=null}}class G extends o.XFAObject{constructor(e){super(f,"caption",!0),this.id=e.id||"",this.placement=(0,c.getStringOption)(e.placement,["left","bottom","inline","right","top"]),this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.reserve=Math.ceil((0,c.getMeasurement)(e.reserve)),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.font=null,this.margin=null,this.para=null,this.value=null}[a.$setValue](e){w(this,e)}[a.$getExtra](e){if(!this[a.$extra]){let{width:t,height:r}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":r=this.reserve<=0?r:this.reserve}this[a.$extra]=(0,s.layoutNode)(this,{width:t,height:r})}return this[a.$extra]}[a.$toHTML](e){if(!this.value)return c.HTMLResult.EMPTY;this[a.$pushPara]();const t=this.value[a.$toHTML](e).html;if(!t)return this[a.$popPara](),c.HTMLResult.EMPTY;const r=this.reserve;if(this.reserve<=0){const{w:t,h:r}=this[a.$getExtra](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=r}}const n=[];"string"==typeof t?n.push({name:"#text",value:t}):n.push(t);const i=(0,s.toStyle)(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(i.width=(0,s.measureToString)(this.reserve));break;case"top":case"bottom":this.reserve>0&&(i.height=(0,s.measureToString)(this.reserve))}return(0,s.setPara)(this,null,t),this[a.$popPara](),this.reserve=r,c.HTMLResult.success({name:"div",attributes:{style:i,class:["xfaCaption"]},children:n})}}class q extends o.StringObject{constructor(e){super(f,"certificate"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class V extends o.XFAObject{constructor(e){super(f,"certificates",!0),this.credentialServerPolicy=(0,c.getStringOption)(e.credentialServerPolicy,["optional","required"]),this.id=e.id||"",this.url=e.url||"",this.urlPolicy=e.urlPolicy||"",this.use=e.use||"",this.usehref=e.usehref||"",this.encryption=null,this.issuers=null,this.keyUsage=null,this.oids=null,this.signing=null,this.subjectDNs=null}}class K extends o.XFAObject{constructor(e){super(f,"checkButton",!0),this.id=e.id||"",this.mark=(0,c.getStringOption)(e.mark,["default","check","circle","cross","diamond","square","star"]),this.shape=(0,c.getStringOption)(e.shape,["square","round"]),this.size=(0,c.getMeasurement)(e.size,"10pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)("margin"),r=(0,s.measureToString)(this.size);let n,i,o;t.width=t.height=r;const l=this[a.$getParent]()[a.$getParent](),h=l.items.children.length&&l.items.children[0][a.$toHTML]().html||[],u={on:(void 0!==h[0]?h[0]:"on").toString(),off:(void 0!==h[1]?h[1]:"off").toString()},d=(l.value?.[a.$text]()||"off")===u.on||void 0,f=l[a.$getSubformParent](),p=l[a.$uid];let g;f instanceof Se?(o=f[a.$uid],n="radio",i="xfaRadio",g=f[a.$data]?.[a.$uid]||f[a.$uid]):(n="checkbox",i="xfaCheckbox",g=l[a.$data]?.[a.$uid]||l[a.$uid]);const m={name:"input",attributes:{class:[i],style:t,fieldId:p,dataId:g,type:n,checked:d,xfaOn:u.on,xfaOff:u.off,"aria-label":C(l),"aria-required":!1}};return o&&(m.attributes.name=o),S(l)&&(m.attributes["aria-required"]=!0,m.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[m]})}}class Y extends o.XFAObject{constructor(e){super(f,"choiceList",!0),this.commitOn=(0,c.getStringOption)(e.commitOn,["select","exit"]),this.id=e.id||"",this.open=(0,c.getStringOption)(e.open,["userControl","always","multiSelect","onEntry"]),this.textEntry=(0,c.getInteger)({data:e.textEntry,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","margin"),r=this[a.$getParent]()[a.$getParent](),n={fontSize:`calc(${r.font?.size||10}px * var(--scale-factor))`},i=[];if(r.items.children.length>0){const e=r.items;let t=0,s=0;2===e.children.length&&(t=e.children[0].save,s=1-t);const o=e.children[t][a.$toHTML]().html,c=e.children[s][a.$toHTML]().html;let l=!1;const h=r.value?.[a.$text]()||"";for(let e=0,t=o.length;e<t;e++){const t={name:"option",attributes:{value:c[e]||o[e],style:n},value:o[e]};c[e]===h&&(t.attributes.selected=l=!0),i.push(t)}l||i.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const o={class:["xfaSelect"],fieldId:r[a.$uid],dataId:r[a.$data]?.[a.$uid]||r[a.$uid],style:t,"aria-label":C(r),"aria-required":!1};return S(r)&&(o["aria-required"]=!0,o.required=!0),"multiSelect"===this.open&&(o.multiple=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:i,attributes:o}]})}}class Z extends o.XFAObject{constructor(e){super(f,"color",!0),this.cSpace=(0,c.getStringOption)(e.cSpace,["SRGB"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.value=e.value?(0,c.getColor)(e.value):"",this.extras=null}[a.$hasSettableValue](){return!1}[a.$toStyle](){return this.value?l.Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class J extends o.XFAObject{constructor(e){super(f,"comb"),this.id=e.id||"",this.numberOfCells=(0,c.getInteger)({data:e.numberOfCells,defaultValue:0,validate:e=>e>=0}),this.use=e.use||"",this.usehref=e.usehref||""}}class Q extends o.XFAObject{constructor(e){super(f,"connect",!0),this.connection=e.connection||"",this.id=e.id||"",this.ref=e.ref||"",this.usage=(0,c.getStringOption)(e.usage,["exportAndImport","exportOnly","importOnly"]),this.use=e.use||"",this.usehref=e.usehref||"",this.picture=null}}class ee extends o.XFAObject{constructor(e){super(f,"contentArea",!0),this.h=(0,c.getMeasurement)(e.h),this.id=e.id||"",this.name=e.name||"",this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.w=(0,c.getMeasurement)(e.w),this.x=(0,c.getMeasurement)(e.x,"0pt"),this.y=(0,c.getMeasurement)(e.y,"0pt"),this.desc=null,this.extras=null}[a.$toHTML](e){const t={left:(0,s.measureToString)(this.x),top:(0,s.measureToString)(this.y),width:(0,s.measureToString)(this.w),height:(0,s.measureToString)(this.h)},r=["xfaContentarea"];return(0,s.isPrintOnly)(this)&&r.push("xfaPrintOnly"),c.HTMLResult.success({name:"div",children:[],attributes:{style:t,class:r,id:this[a.$uid]}})}}class te extends o.XFAObject{constructor(e){super(f,"corner",!0),this.id=e.id||"",this.inverted=(0,c.getInteger)({data:e.inverted,defaultValue:0,validate:e=>1===e}),this.join=(0,c.getStringOption)(e.join,["square","round"]),this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.radius=(0,c.getMeasurement)(e.radius),this.stroke=(0,c.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,c.getMeasurement)(e.thickness,"0.5pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[a.$toStyle](){const e=(0,s.toStyle)(this,"visibility");return e.radius=(0,s.measureToString)("square"===this.join?0:this.radius),e}}class re extends o.ContentObject{constructor(e){super(f,"date"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){const e=this[a.$content].trim();this[a.$content]=e?new Date(e):null}[a.$toHTML](e){return _(this[a.$content]?this[a.$content].toString():"")}}class ae extends o.ContentObject{constructor(e){super(f,"dateTime"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){const e=this[a.$content].trim();this[a.$content]=e?new Date(e):null}[a.$toHTML](e){return _(this[a.$content]?this[a.$content].toString():"")}}class ne extends o.XFAObject{constructor(e){super(f,"dateTimeEdit",!0),this.hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.picker=(0,c.getStringOption)(e.picker,["host","none"]),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin"),r=this[a.$getParent]()[a.$getParent](),n={name:"input",attributes:{type:"text",fieldId:r[a.$uid],dataId:r[a.$data]?.[a.$uid]||r[a.$uid],class:["xfaTextfield"],style:t,"aria-label":C(r),"aria-required":!1}};return S(r)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}class ie extends o.ContentObject{constructor(e){super(f,"decimal"),this.fracDigits=(0,c.getInteger)({data:e.fracDigits,defaultValue:2,validate:e=>!0}),this.id=e.id||"",this.leadDigits=(0,c.getInteger)({data:e.leadDigits,defaultValue:-1,validate:e=>!0}),this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){const e=parseFloat(this[a.$content].trim());this[a.$content]=isNaN(e)?null:e}[a.$toHTML](e){return _(null!==this[a.$content]?this[a.$content].toString():"")}}class se extends o.XFAObject{constructor(e){super(f,"defaultUi",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class oe extends o.XFAObject{constructor(e){super(f,"desc",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new o.XFAObjectArray,this.date=new o.XFAObjectArray,this.dateTime=new o.XFAObjectArray,this.decimal=new o.XFAObjectArray,this.exData=new o.XFAObjectArray,this.float=new o.XFAObjectArray,this.image=new o.XFAObjectArray,this.integer=new o.XFAObjectArray,this.text=new o.XFAObjectArray,this.time=new o.XFAObjectArray}}class ce extends o.OptionObject{constructor(e){super(f,"digestMethod",["","SHA1","SHA256","SHA512","RIPEMD160"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class le extends o.XFAObject{constructor(e){super(f,"digestMethods",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.digestMethod=new o.XFAObjectArray}}class he extends o.XFAObject{constructor(e){super(f,"draw",!0),this.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?(0,c.getMeasurement)(e.h):"",this.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.locale=e.locale||"",this.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),this.minH=(0,c.getMeasurement)(e.minH,"0pt"),this.minW=(0,c.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(e.relevant),this.rotate=(0,c.getInteger)({data:e.rotate,defaultValue:0,validate:e=>e%90==0}),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,c.getMeasurement)(e.w):"",this.x=(0,c.getMeasurement)(e.x,"0pt"),this.y=(0,c.getMeasurement)(e.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 o.XFAObjectArray}[a.$setValue](e){w(this,e)}[a.$toHTML](e){if(x(this),"hidden"===this.presence||"inactive"===this.presence)return c.HTMLResult.EMPTY;(0,s.fixDimensions)(this),this[a.$pushPara]();const t=this.w,r=this.h,{w:n,h:o,isBroken:l}=(0,s.layoutNode)(this,e);if(n&&""===this.w){if(l&&this[a.$getSubformParent]()[a.$isThereMoreWidth]())return this[a.$popPara](),c.HTMLResult.FAILURE;this.w=n}if(o&&""===this.h&&(this.h=o),T(this),!(0,i.checkDimensions)(this,e))return this.w=t,this.h=r,this[a.$popPara](),c.HTMLResult.FAILURE;E(this);const h=(0,s.toStyle)(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");(0,s.setMinMaxDimensions)(this,h),h.margin&&(h.padding=h.margin,delete h.margin);const u=["xfaDraw"];this.font&&u.push("xfaFont"),(0,s.isPrintOnly)(this)&&u.push("xfaPrintOnly");const d={style:h,id:this[a.$uid],class:u};this.name&&(d.xfaName=this.name);const f={name:"div",attributes:d,children:[]};k(this,d);const p=(0,s.computeBbox)(this,f,e),g=this.value?this.value[a.$toHTML](e).html:null;return null===g?(this.w=t,this.h=r,this[a.$popPara](),c.HTMLResult.success((0,s.createWrapper)(this,f),p)):(f.children.push(g),(0,s.setPara)(this,h,g),this.w=t,this.h=r,this[a.$popPara](),c.HTMLResult.success((0,s.createWrapper)(this,f),p))}}class ue extends o.XFAObject{constructor(e){super(f,"edge",!0),this.cap=(0,c.getStringOption)(e.cap,["square","butt","round"]),this.id=e.id||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.stroke=(0,c.getStringOption)(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]),this.thickness=(0,c.getMeasurement)(e.thickness,"0.5pt"),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[a.$toStyle](){const e=(0,s.toStyle)(this,"visibility");if(Object.assign(e,{linecap:this.cap,width:(0,s.measureToString)(this.thickness),color:this.color?this.color[a.$toStyle]():"#000000",style:""}),"visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style="solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}class de extends o.OptionObject{constructor(e){super(f,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class fe extends o.XFAObject{constructor(e){super(f,"encodings",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.encoding=new o.XFAObjectArray}}class pe extends o.XFAObject{constructor(e){super(f,"encrypt",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=null}}class ge extends o.XFAObject{constructor(e){super(f,"encryptData",!0),this.id=e.id||"",this.operation=(0,c.getStringOption)(e.operation,["encrypt","decrypt"]),this.target=e.target||"",this.use=e.use||"",this.usehref=e.usehref||"",this.filter=null,this.manifest=null}}class me extends o.XFAObject{constructor(e){super(f,"encryption",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new o.XFAObjectArray}}class be extends o.OptionObject{constructor(e){super(f,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class ye extends o.XFAObject{constructor(e){super(f,"encryptionMethods",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.encryptionMethod=new o.XFAObjectArray}}class ve extends o.XFAObject{constructor(e){super(f,"event",!0),this.activity=(0,c.getStringOption)(e.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=e.id||"",this.listen=(0,c.getStringOption)(e.listen,["refOnly","refAndDescendents"]),this.name=e.name||"",this.ref=e.ref||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.encryptData=null,this.execute=null,this.script=null,this.signData=null,this.submit=null}}class we extends o.ContentObject{constructor(e){super(f,"exData"),this.contentType=e.contentType||"",this.href=e.href||"",this.id=e.id||"",this.maxLength=(0,c.getInteger)({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1}),this.name=e.name||"",this.rid=e.rid||"",this.transferEncoding=(0,c.getStringOption)(e.transferEncoding,["none","base64","package"]),this.use=e.use||"",this.usehref=e.usehref||""}[a.$isCDATAXml](){return"text/html"===this.contentType}[a.$onChild](e){return("text/html"===this.contentType&&e[a.$namespaceId]===n.NamespaceIds.xhtml.id||"text/xml"===this.contentType)&&(this[a.$content]=e,!0)}[a.$toHTML](e){return"text/html"===this.contentType&&this[a.$content]?this[a.$content][a.$toHTML](e):c.HTMLResult.EMPTY}}class Ae extends o.XFAObject{constructor(e){super(f,"exObject",!0),this.archive=e.archive||"",this.classId=e.classId||"",this.codeBase=e.codeBase||"",this.codeType=e.codeType||"",this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.boolean=new o.XFAObjectArray,this.date=new o.XFAObjectArray,this.dateTime=new o.XFAObjectArray,this.decimal=new o.XFAObjectArray,this.exData=new o.XFAObjectArray,this.exObject=new o.XFAObjectArray,this.float=new o.XFAObjectArray,this.image=new o.XFAObjectArray,this.integer=new o.XFAObjectArray,this.text=new o.XFAObjectArray,this.time=new o.XFAObjectArray}}class Se extends o.XFAObject{constructor(e){super(f,"exclGroup",!0),this.access=(0,c.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=e.accessKey||"",this.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?(0,c.getMeasurement)(e.h):"",this.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.layout=(0,c.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),this.minH=(0,c.getMeasurement)(e.minH,"0pt"),this.minW=(0,c.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,c.getMeasurement)(e.w):"",this.x=(0,c.getMeasurement)(e.x,"0pt"),this.y=(0,c.getMeasurement)(e.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 o.XFAObjectArray,this.event=new o.XFAObjectArray,this.field=new o.XFAObjectArray,this.setProperty=new o.XFAObjectArray}[a.$isBindable](){return!0}[a.$hasSettableValue](){return!0}[a.$setValue](e){for(const t of this.field.children){if(!t.value){const e=new Rt({});t[a.$appendChild](e),t.value=e}t.value[a.$setValue](e)}}[a.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[a.$extra].attempt&&this[a.$extra].numberInLine>0||this[a.$getParent]()[a.$isThereMoreWidth]()}[a.$isSplittable](){const e=this[a.$getSubformParent]();return!!e[a.$isSplittable]()&&(void 0!==this[a.$extra]._isSplittable?this[a.$extra]._isSplittable:"position"===this.layout||this.layout.includes("row")?(this[a.$extra]._isSplittable=!1,!1):!(e.layout?.endsWith("-tb")&&0!==e[a.$extra].numberInLine||(this[a.$extra]._isSplittable=!0,0)))}[a.$flushHTML](){return(0,i.flushHTML)(this)}[a.$addHTML](e,t){(0,i.addHTML)(this,e,t)}[a.$getAvailableSpace](){return(0,i.getAvailableSpace)(this)}[a.$toHTML](e){if(x(this),"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;(0,s.fixDimensions)(this);const t=[],r={id:this[a.$uid],class:[]};(0,s.setAccess)(this,r.class),this[a.$extra]||(this[a.$extra]=Object.create(null)),Object.assign(this[a.$extra],{children:t,attributes:r,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const n=this[a.$isSplittable]();if(n||T(this),!(0,i.checkDimensions)(this,e))return c.HTMLResult.FAILURE;const o=new Set(["field"]);if(this.layout.includes("row")){const e=this[a.$getSubformParent]().columnWidths;Array.isArray(e)&&e.length>0&&(this[a.$extra].columnWidths=e,this[a.$extra].currentColumn=0)}const l=(0,s.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),h=["xfaExclgroup"],u=(0,s.layoutClass)(this);u&&h.push(u),(0,s.isPrintOnly)(this)&&h.push("xfaPrintOnly"),r.style=l,r.class=h,this.name&&(r.xfaName=this.name),this[a.$pushPara]();const d="lr-tb"===this.layout||"rl-tb"===this.layout,f=d?2:1;for(;this[a.$extra].attempt<f;this[a.$extra].attempt++){d&&1===this[a.$extra].attempt&&(this[a.$extra].numberInLine=0);const e=this[a.$childrenToHTML]({filter:o,include:!0});if(e.success)break;if(e.isBreak())return this[a.$popPara](),e;if(d&&0===this[a.$extra].attempt&&0===this[a.$extra].numberInLine&&!this[a.$getTemplateRoot]()[a.$extra].noLayoutFailure){this[a.$extra].attempt=f;break}}if(this[a.$popPara](),n||E(this),this[a.$extra].attempt===f)return n||delete this[a.$extra],c.HTMLResult.FAILURE;let p=0,g=0;this.margin&&(p=this.margin.leftInset+this.margin.rightInset,g=this.margin.topInset+this.margin.bottomInset);const m=Math.max(this[a.$extra].width+p,this.w||0),b=Math.max(this[a.$extra].height+g,this.h||0),y=[this.x,this.y,m,b];""===this.w&&(l.width=(0,s.measureToString)(m)),""===this.h&&(l.height=(0,s.measureToString)(b));const v={name:"div",attributes:r,children:t};return k(this,r),delete this[a.$extra],c.HTMLResult.success((0,s.createWrapper)(this,v),y)}}class xe extends o.XFAObject{constructor(e){super(f,"execute"),this.connection=e.connection||"",this.executeType=(0,c.getStringOption)(e.executeType,["import","remerge"]),this.id=e.id||"",this.runAt=(0,c.getStringOption)(e.runAt,["client","both","server"]),this.use=e.use||"",this.usehref=e.usehref||""}}class ke extends o.XFAObject{constructor(e){super(f,"extras",!0),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new o.XFAObjectArray,this.date=new o.XFAObjectArray,this.dateTime=new o.XFAObjectArray,this.decimal=new o.XFAObjectArray,this.exData=new o.XFAObjectArray,this.extras=new o.XFAObjectArray,this.float=new o.XFAObjectArray,this.image=new o.XFAObjectArray,this.integer=new o.XFAObjectArray,this.text=new o.XFAObjectArray,this.time=new o.XFAObjectArray}}class Ce extends o.XFAObject{constructor(e){super(f,"field",!0),this.access=(0,c.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),this.accessKey=e.accessKey||"",this.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.h=e.h?(0,c.getMeasurement)(e.h):"",this.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.locale=e.locale||"",this.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),this.minH=(0,c.getMeasurement)(e.minH,"0pt"),this.minW=(0,c.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(e.relevant),this.rotate=(0,c.getInteger)({data:e.rotate,defaultValue:0,validate:e=>e%90==0}),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,c.getMeasurement)(e.w):"",this.x=(0,c.getMeasurement)(e.x,"0pt"),this.y=(0,c.getMeasurement)(e.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 o.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 o.XFAObjectArray,this.connect=new o.XFAObjectArray,this.event=new o.XFAObjectArray,this.setProperty=new o.XFAObjectArray}[a.$isBindable](){return!0}[a.$setValue](e){w(this,e)}[a.$toHTML](e){if(x(this),!this.ui){let e;switch(this.ui=new It({}),this.ui[a.$globalData]=this[a.$globalData],this[a.$appendChild](this.ui),this.items.children.length){case 0:e=new _t({}),this.ui.textEdit=e;break;case 1:e=new K({}),this.ui.checkButton=e;break;case 2:e=new Y({}),this.ui.choiceList=e}this.ui[a.$appendChild](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return c.HTMLResult.EMPTY;this.caption&&delete this.caption[a.$extra],this[a.$pushPara]();const t=this.caption?this.caption[a.$toHTML](e).html:null,r=this.w,n=this.h;let o=0,l=0;this.margin&&(o=this.margin.leftInset+this.margin.rightInset,l=this.margin.topInset+this.margin.bottomInset);let u=null;if(""===this.w||""===this.h){let t=null,r=null,n=0,i=0;if(this.ui.checkButton)n=i=this.ui.checkButton.size;else{const{w:t,h:r}=(0,s.layoutNode)(this,e);null!==t?(n=t,i=r):i=(0,h.getMetrics)(this.font,!0).lineNoGap}if(u=y(this.ui[a.$getExtra]()),n+=u.w,i+=u.h,this.caption){const{w:s,h:o,isBroken:l}=this.caption[a.$getExtra](e);if(l&&this[a.$getSubformParent]()[a.$isThereMoreWidth]())return this[a.$popPara](),c.HTMLResult.FAILURE;switch(t=s,r=o,this.caption.placement){case"left":case"right":case"inline":t+=n;break;case"top":case"bottom":r+=i}}else t=n,r=i;t&&""===this.w&&(t+=o,this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<t?t:this.minW)),r&&""===this.h&&(r+=l,this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<r?r:this.minH))}if(this[a.$popPara](),(0,s.fixDimensions)(this),T(this),!(0,i.checkDimensions)(this,e))return this.w=r,this.h=n,this[a.$popPara](),c.HTMLResult.FAILURE;E(this);const d=(0,s.toStyle)(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");(0,s.setMinMaxDimensions)(this,d);const f=["xfaField"];this.font&&f.push("xfaFont"),(0,s.isPrintOnly)(this)&&f.push("xfaPrintOnly");const p={style:d,id:this[a.$uid],class:f};d.margin&&(d.padding=d.margin,delete d.margin),(0,s.setAccess)(this,f),this.name&&(p.xfaName=this.name);const g=[],m={name:"div",attributes:p,children:g};k(this,p);const b=this.border?this.border[a.$toStyle]():null,v=(0,s.computeBbox)(this,m,e),w=this.ui[a.$toHTML]().html;if(!w)return Object.assign(d,b),c.HTMLResult.success((0,s.createWrapper)(this,m),v);this[a.$tabIndex]&&(w.children?.[0]?w.children[0].attributes.tabindex=this[a.$tabIndex]:w.attributes.tabindex=this[a.$tabIndex]),w.attributes.style||(w.attributes.style=Object.create(null));let A=null;if(this.ui.button?(1===w.children.length&&([A]=w.children.splice(0,1)),Object.assign(w.attributes.style,b)):Object.assign(d,b),g.push(w),this.value)if(this.ui.imageEdit)w.children.push(this.value[a.$toHTML]().html);else if(!this.ui.button){let e="";if(this.value.exData)e=this.value.exData[a.$text]();else if(this.value.text)e=this.value.text[a.$getExtra]();else{const t=this.value[a.$toHTML]().html;null!==t&&(e=t.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(w.children[0].attributes.maxLength=this.value.text.maxChars),e&&(this.ui.numericEdit&&(e=parseFloat(e),e=isNaN(e)?"":e.toString()),"textarea"===w.children[0].name?w.children[0].attributes.textContent=e:w.children[0].attributes.value=e)}if(!this.ui.imageEdit&&w.children?.[0]&&this.h){u=u||y(this.ui[a.$getExtra]());let t=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){t=this.caption.reserve,t<=0&&(t=this.caption[a.$getExtra](e).h);const r=this.h-t-l-u.h;w.children[0].attributes.style.height=(0,s.measureToString)(r)}else w.children[0].attributes.style.height="100%"}if(A&&w.children.push(A),!t)return w.attributes.class&&w.attributes.class.push("xfaLeft"),this.w=r,this.h=n,c.HTMLResult.success((0,s.createWrapper)(this,m),v);if(this.ui.button)return d.padding&&delete d.padding,"div"===t.name&&(t.name="span"),w.children.push(t),c.HTMLResult.success(m,v);switch(this.ui.checkButton&&(t.attributes.class[0]="xfaCaptionForCheckButton"),w.attributes.class||(w.attributes.class=[]),w.children.splice(0,0,t),this.caption.placement){case"left":case"inline":w.attributes.class.push("xfaLeft");break;case"right":w.attributes.class.push("xfaRight");break;case"top":w.attributes.class.push("xfaTop");break;case"bottom":w.attributes.class.push("xfaBottom")}return this.w=r,this.h=n,c.HTMLResult.success((0,s.createWrapper)(this,m),v)}}t.Field=Ce;class _e extends o.XFAObject{constructor(e){super(f,"fill",!0),this.id=e.id||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null,this.linear=null,this.pattern=null,this.radial=null,this.solid=null,this.stipple=null}[a.$toStyle](){const e=this[a.$getParent](),t=e[a.$getParent]()[a.$getParent](),r=Object.create(null);let n="color",i=n;e instanceof $&&(n="background-color",i="background",t instanceof It&&(r.backgroundColor="white")),(e instanceof lt||e instanceof I)&&(n=i="fill",r.fill="white");for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"color"===e)continue;const t=this[e];if(!(t instanceof o.XFAObject))continue;const s=t[a.$toStyle](this.color);return s&&(r[s.startsWith("#")?n:i]=s),r}if(this.color?.value){const e=this.color[a.$toStyle]();r[e.startsWith("#")?n:i]=e}return r}}class Te extends o.XFAObject{constructor(e){super(f,"filter",!0),this.addRevocationInfo=(0,c.getStringOption)(e.addRevocationInfo,["","required","optional","none"]),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.version=(0,c.getInteger)({data:this.version,defaultValue:5,validate:e=>e>=1&&e<=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 Ee extends o.ContentObject{constructor(e){super(f,"float"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){const e=parseFloat(this[a.$content].trim());this[a.$content]=isNaN(e)?null:e}[a.$toHTML](e){return _(null!==this[a.$content]?this[a.$content].toString():"")}}class Oe extends o.XFAObject{constructor(e){super(f,"font",!0),this.baselineShift=(0,c.getMeasurement)(e.baselineShift),this.fontHorizontalScale=(0,c.getFloat)({data:e.fontHorizontalScale,defaultValue:100,validate:e=>e>=0}),this.fontVerticalScale=(0,c.getFloat)({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0}),this.id=e.id||"",this.kerningMode=(0,c.getStringOption)(e.kerningMode,["none","pair"]),this.letterSpacing=(0,c.getMeasurement)(e.letterSpacing,"0"),this.lineThrough=(0,c.getInteger)({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e}),this.lineThroughPeriod=(0,c.getStringOption)(e.lineThroughPeriod,["all","word"]),this.overline=(0,c.getInteger)({data:e.overline,defaultValue:0,validate:e=>1===e||2===e}),this.overlinePeriod=(0,c.getStringOption)(e.overlinePeriod,["all","word"]),this.posture=(0,c.getStringOption)(e.posture,["normal","italic"]),this.size=(0,c.getMeasurement)(e.size,"10pt"),this.typeface=e.typeface||"Courier",this.underline=(0,c.getInteger)({data:e.underline,defaultValue:0,validate:e=>1===e||2===e}),this.underlinePeriod=(0,c.getStringOption)(e.underlinePeriod,["all","word"]),this.use=e.use||"",this.usehref=e.usehref||"",this.weight=(0,c.getStringOption)(e.weight,["normal","bold"]),this.extras=null,this.fill=null}[a.$clean](e){super[a.$clean](e),this[a.$globalData].usedTypefaces.add(this.typeface)}[a.$toStyle](){const e=(0,s.toStyle)(this,"fill"),t=e.color;return t&&("#000000"===t?delete e.color:t.startsWith("#")||(e.background=t,e.backgroundClip="text",e.color="transparent")),this.baselineShift&&(e.verticalAlign=(0,s.measureToString)(this.baselineShift)),e.fontKerning="none"===this.kerningMode?"none":"normal",e.letterSpacing=(0,s.measureToString)(this.letterSpacing),0!==this.lineThrough&&(e.textDecoration="line-through",2===this.lineThrough&&(e.textDecorationStyle="double")),0!==this.overline&&(e.textDecoration="overline",2===this.overline&&(e.textDecorationStyle="double")),e.fontStyle=this.posture,e.fontSize=(0,s.measureToString)(.99*this.size),(0,s.setFontFamily)(this,this,this[a.$globalData].fontFinder,e),0!==this.underline&&(e.textDecoration="underline",2===this.underline&&(e.textDecorationStyle="double")),e.fontWeight=this.weight,e}}class Fe extends o.XFAObject{constructor(e){super(f,"format",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.picture=null}}class Pe extends o.StringObject{constructor(e){super(f,"handler"),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Ie extends o.XFAObject{constructor(e){super(f,"hyphenation"),this.excludeAllCaps=(0,c.getInteger)({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e}),this.excludeInitialCap=(0,c.getInteger)({data:e.excludeInitialCap,defaultValue:0,validate:e=>1===e}),this.hyphenate=(0,c.getInteger)({data:e.hyphenate,defaultValue:0,validate:e=>1===e}),this.id=e.id||"",this.pushCharacterCount=(0,c.getInteger)({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0}),this.remainCharacterCount=(0,c.getInteger)({data:e.remainCharacterCount,defaultValue:3,validate:e=>e>=0}),this.use=e.use||"",this.usehref=e.usehref||"",this.wordCharacterCount=(0,c.getInteger)({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}class Me extends o.StringObject{constructor(e){super(f,"image"),this.aspect=(0,c.getStringOption)(e.aspect,["fit","actual","height","none","width"]),this.contentType=e.contentType||"",this.href=e.href||"",this.id=e.id||"",this.name=e.name||"",this.transferEncoding=(0,c.getStringOption)(e.transferEncoding,["base64","none","package"]),this.use=e.use||"",this.usehref=e.usehref||""}[a.$toHTML](){if(this.contentType&&!m.has(this.contentType.toLowerCase()))return c.HTMLResult.EMPTY;let e=this[a.$globalData].images&&this[a.$globalData].images.get(this.href);if(!e&&(this.href||!this[a.$content]))return c.HTMLResult.EMPTY;if(e||"base64"!==this.transferEncoding||(e=(0,l.stringToBytes)(atob(this[a.$content]))),!e)return c.HTMLResult.EMPTY;if(!this.contentType){for(const[t,r]of b)if(e.length>t.length&&t.every(((t,r)=>t===e[r]))){this.contentType=r;break}if(!this.contentType)return c.HTMLResult.EMPTY}const t=new Blob([e],{type:this.contentType});let r;switch(this.aspect){case"fit":case"actual":break;case"height":r={height:"100%",objectFit:"fill"};break;case"none":r={width:"100%",height:"100%",objectFit:"fill"};break;case"width":r={width:"100%",objectFit:"fill"}}const n=this[a.$getParent]();return c.HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:r,src:URL.createObjectURL(t),alt:n?C(n[a.$getParent]()):null}})}}class Re extends o.XFAObject{constructor(e){super(f,"imageEdit",!0),this.data=(0,c.getStringOption)(e.data,["link","embed"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}[a.$toHTML](e){return"embed"===this.data?c.HTMLResult.success({name:"div",children:[],attributes:{}}):c.HTMLResult.EMPTY}}class De extends o.ContentObject{constructor(e){super(f,"integer"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){const e=parseInt(this[a.$content].trim(),10);this[a.$content]=isNaN(e)?null:e}[a.$toHTML](e){return _(null!==this[a.$content]?this[a.$content].toString():"")}}class Ne extends o.XFAObject{constructor(e){super(f,"issuers",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new o.XFAObjectArray}}class Le extends o.XFAObject{constructor(e){super(f,"items",!0),this.id=e.id||"",this.name=e.name||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.ref=e.ref||"",this.save=(0,c.getInteger)({data:e.save,defaultValue:0,validate:e=>1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new o.XFAObjectArray,this.date=new o.XFAObjectArray,this.dateTime=new o.XFAObjectArray,this.decimal=new o.XFAObjectArray,this.exData=new o.XFAObjectArray,this.float=new o.XFAObjectArray,this.image=new o.XFAObjectArray,this.integer=new o.XFAObjectArray,this.text=new o.XFAObjectArray,this.time=new o.XFAObjectArray}[a.$toHTML](){const e=[];for(const t of this[a.$getChildren]())e.push(t[a.$text]());return c.HTMLResult.success(e)}}t.Items=Le;class Be extends o.XFAObject{constructor(e){super(f,"keep",!0),this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact=(0,c.getStringOption)(e.intact,t),this.next=(0,c.getStringOption)(e.next,t),this.previous=(0,c.getStringOption)(e.previous,t),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}}class je extends o.XFAObject{constructor(e){super(f,"keyUsage");const t=["","yes","no"];this.crlSign=(0,c.getStringOption)(e.crlSign,t),this.dataEncipherment=(0,c.getStringOption)(e.dataEncipherment,t),this.decipherOnly=(0,c.getStringOption)(e.decipherOnly,t),this.digitalSignature=(0,c.getStringOption)(e.digitalSignature,t),this.encipherOnly=(0,c.getStringOption)(e.encipherOnly,t),this.id=e.id||"",this.keyAgreement=(0,c.getStringOption)(e.keyAgreement,t),this.keyCertSign=(0,c.getStringOption)(e.keyCertSign,t),this.keyEncipherment=(0,c.getStringOption)(e.keyEncipherment,t),this.nonRepudiation=(0,c.getStringOption)(e.nonRepudiation,t),this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class $e extends o.XFAObject{constructor(e){super(f,"line",!0),this.hand=(0,c.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.slope=(0,c.getStringOption)(e.slope,["\\","/"]),this.use=e.use||"",this.usehref=e.usehref||"",this.edge=null}[a.$toHTML](){const e=this[a.$getParent]()[a.$getParent](),t=this.edge||new ue({}),r=t[a.$toStyle](),n=Object.create(null),i="visible"===t.presence?t.thickness:0;let o,l,h,u;n.strokeWidth=(0,s.measureToString)(i),n.stroke=r.color;let d="100%",f="100%";e.w<=i?([o,l,h,u]=["50%",0,"50%","100%"],d=n.strokeWidth):e.h<=i?([o,l,h,u]=[0,"50%","100%","50%"],f=n.strokeWidth):"\\"===this.slope?[o,l,h,u]=[0,0,"100%","100%"]:[o,l,h,u]=[0,"100%","100%",0];const g={name:"svg",children:[{name:"line",attributes:{xmlns:p,x1:o,y1:l,x2:h,y2:u,style:n}}],attributes:{xmlns:p,width:d,height:f,style:{overflow:"visible"}}};return v(e)?c.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[g]}):(g.attributes.style.position="absolute",c.HTMLResult.success(g))}}class Ue extends o.XFAObject{constructor(e){super(f,"linear",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["toRight","toBottom","toLeft","toTop"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[a.$toStyle](e){return e=e?e[a.$toStyle]():"#FFFFFF",`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[a.$toStyle]():"#000000"})`}}class ze extends o.ContentObject{constructor(e){super(f,"lockDocument"),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){this[a.$content]=(0,c.getStringOption)(this[a.$content],["auto","0","1"])}}class He extends o.XFAObject{constructor(e){super(f,"manifest",!0),this.action=(0,c.getStringOption)(e.action,["include","all","exclude"]),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.ref=new o.XFAObjectArray}}class Xe extends o.XFAObject{constructor(e){super(f,"margin",!0),this.bottomInset=(0,c.getMeasurement)(e.bottomInset,"0"),this.id=e.id||"",this.leftInset=(0,c.getMeasurement)(e.leftInset,"0"),this.rightInset=(0,c.getMeasurement)(e.rightInset,"0"),this.topInset=(0,c.getMeasurement)(e.topInset,"0"),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[a.$toStyle](){return{margin:(0,s.measureToString)(this.topInset)+" "+(0,s.measureToString)(this.rightInset)+" "+(0,s.measureToString)(this.bottomInset)+" "+(0,s.measureToString)(this.leftInset)}}}class We extends o.XFAObject{constructor(e){super(f,"mdp"),this.id=e.id||"",this.permissions=(0,c.getInteger)({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e}),this.signatureType=(0,c.getStringOption)(e.signatureType,["filler","author"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Ge extends o.XFAObject{constructor(e){super(f,"medium"),this.id=e.id||"",this.imagingBBox=(0,c.getBBox)(e.imagingBBox),this.long=(0,c.getMeasurement)(e.long),this.orientation=(0,c.getStringOption)(e.orientation,["portrait","landscape"]),this.short=(0,c.getMeasurement)(e.short),this.stock=e.stock||"",this.trayIn=(0,c.getStringOption)(e.trayIn,["auto","delegate","pageFront"]),this.trayOut=(0,c.getStringOption)(e.trayOut,["auto","delegate"]),this.use=e.use||"",this.usehref=e.usehref||""}}class qe extends o.XFAObject{constructor(e){super(f,"message",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.text=new o.XFAObjectArray}}class Ve extends o.XFAObject{constructor(e){super(f,"numericEdit",!0),this.hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.comb=null,this.extras=null,this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin"),r=this[a.$getParent]()[a.$getParent](),n={name:"input",attributes:{type:"text",fieldId:r[a.$uid],dataId:r[a.$data]?.[a.$uid]||r[a.$uid],class:["xfaTextfield"],style:t,"aria-label":C(r),"aria-required":!1}};return S(r)&&(n.attributes["aria-required"]=!0,n.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[n]})}}class Ke extends o.XFAObject{constructor(e){super(f,"occur",!0),this.id=e.id||"",this.initial=""!==e.initial?(0,c.getInteger)({data:e.initial,defaultValue:"",validate:e=>!0}):"",this.max=""!==e.max?(0,c.getInteger)({data:e.max,defaultValue:1,validate:e=>!0}):"",this.min=""!==e.min?(0,c.getInteger)({data:e.min,defaultValue:1,validate:e=>!0}):"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[a.$clean](){const e=this[a.$getParent](),t=this.min;""===this.min&&(this.min=e instanceof Qe||e instanceof et?0:1),""===this.max&&(this.max=""===t?e instanceof Qe||e instanceof et?-1:1:this.min),-1!==this.max&&this.max<this.min&&(this.max=this.min),""===this.initial&&(this.initial=e instanceof kt?1:this.min)}}class Ye extends o.StringObject{constructor(e){super(f,"oid"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Ze extends o.XFAObject{constructor(e){super(f,"oids",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.oid=new o.XFAObjectArray}}class Je extends o.XFAObject{constructor(e){super(f,"overflow"),this.id=e.id||"",this.leader=e.leader||"",this.target=e.target||"",this.trailer=e.trailer||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$getExtra](){if(!this[a.$extra]){const e=this[a.$getParent](),t=this[a.$getTemplateRoot](),r=t[a.$searchNode](this.target,e),n=t[a.$searchNode](this.leader,e),i=t[a.$searchNode](this.trailer,e);this[a.$extra]={target:r?.[0]||null,leader:n?.[0]||null,trailer:i?.[0]||null,addLeader:!1,addTrailer:!1}}return this[a.$extra]}}class Qe extends o.XFAObject{constructor(e){super(f,"pageArea",!0),this.blankOrNotBlank=(0,c.getStringOption)(e.blankOrNotBlank,["any","blank","notBlank"]),this.id=e.id||"",this.initialNumber=(0,c.getInteger)({data:e.initialNumber,defaultValue:1,validate:e=>!0}),this.name=e.name||"",this.numbered=(0,c.getInteger)({data:e.numbered,defaultValue:1,validate:e=>!0}),this.oddOrEven=(0,c.getStringOption)(e.oddOrEven,["any","even","odd"]),this.pagePosition=(0,c.getStringOption)(e.pagePosition,["any","first","last","only","rest"]),this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.desc=null,this.extras=null,this.medium=null,this.occur=null,this.area=new o.XFAObjectArray,this.contentArea=new o.XFAObjectArray,this.draw=new o.XFAObjectArray,this.exclGroup=new o.XFAObjectArray,this.field=new o.XFAObjectArray,this.subform=new o.XFAObjectArray}[a.$isUsable](){return this[a.$extra]?!this.occur||-1===this.occur.max||this[a.$extra].numberOfUse<this.occur.max:(this[a.$extra]={numberOfUse:0},!0)}[a.$cleanPage](){delete this[a.$extra]}[a.$getNextPage](){this[a.$extra]||(this[a.$extra]={numberOfUse:0});const e=this[a.$getParent]();return"orderedOccurrence"===e.relation&&this[a.$isUsable]()?(this[a.$extra].numberOfUse+=1,this):e[a.$getNextPage]()}[a.$getAvailableSpace](){return this[a.$extra].space||{width:0,height:0}}[a.$toHTML](){this[a.$extra]||(this[a.$extra]={numberOfUse:1});const e=[];this[a.$extra].children=e;const t=Object.create(null);if(this.medium&&this.medium.short&&this.medium.long){if(t.width=(0,s.measureToString)(this.medium.short),t.height=(0,s.measureToString)(this.medium.long),this[a.$extra].space={width:this.medium.short,height:this.medium.long},"landscape"===this.medium.orientation){const e=t.width;t.width=t.height,t.height=e,this[a.$extra].space={width:this.medium.long,height:this.medium.short}}}else(0,l.warn)("XFA - No medium specified in pageArea: please file a bug.");return this[a.$childrenToHTML]({filter:new Set(["area","draw","field","subform"]),include:!0}),this[a.$childrenToHTML]({filter:new Set(["contentArea"]),include:!0}),c.HTMLResult.success({name:"div",children:e,attributes:{class:["xfaPage"],id:this[a.$uid],style:t,xfaName:this.name}})}}class et extends o.XFAObject{constructor(e){super(f,"pageSet",!0),this.duplexImposition=(0,c.getStringOption)(e.duplexImposition,["longEdge","shortEdge"]),this.id=e.id||"",this.name=e.name||"",this.relation=(0,c.getStringOption)(e.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]),this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.occur=null,this.pageArea=new o.XFAObjectArray,this.pageSet=new o.XFAObjectArray}[a.$cleanPage](){for(const e of this.pageArea.children)e[a.$cleanPage]();for(const e of this.pageSet.children)e[a.$cleanPage]()}[a.$isUsable](){return!this.occur||-1===this.occur.max||this[a.$extra].numberOfUse<this.occur.max}[a.$getNextPage](){if(this[a.$extra]||(this[a.$extra]={numberOfUse:1,pageIndex:-1,pageSetIndex:-1}),"orderedOccurrence"===this.relation){if(this[a.$extra].pageIndex+1<this.pageArea.children.length)return this[a.$extra].pageIndex+=1,this.pageArea.children[this[a.$extra].pageIndex][a.$getNextPage]();if(this[a.$extra].pageSetIndex+1<this.pageSet.children.length)return this[a.$extra].pageSetIndex+=1,this.pageSet.children[this[a.$extra].pageSetIndex][a.$getNextPage]();if(this[a.$isUsable]())return this[a.$extra].numberOfUse+=1,this[a.$extra].pageIndex=-1,this[a.$extra].pageSetIndex=-1,this[a.$getNextPage]();const e=this[a.$getParent]();return e instanceof et?e[a.$getNextPage]():(this[a.$cleanPage](),this[a.$getNextPage]())}const e=this[a.$getTemplateRoot]()[a.$extra].pageNumber,t=e%2==0?"even":"odd",r=0===e?"first":"rest";let n=this.pageArea.children.find((e=>e.oddOrEven===t&&e.pagePosition===r));return n||(n=this.pageArea.children.find((e=>"any"===e.oddOrEven&&e.pagePosition===r)),n||(n=this.pageArea.children.find((e=>"any"===e.oddOrEven&&"any"===e.pagePosition)),n||this.pageArea.children[0]))}}class tt extends o.XFAObject{constructor(e){super(f,"para",!0),this.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.lineHeight=e.lineHeight?(0,c.getMeasurement)(e.lineHeight,"0pt"):"",this.marginLeft=e.marginLeft?(0,c.getMeasurement)(e.marginLeft,"0pt"):"",this.marginRight=e.marginRight?(0,c.getMeasurement)(e.marginRight,"0pt"):"",this.orphans=(0,c.getInteger)({data:e.orphans,defaultValue:0,validate:e=>e>=0}),this.preserve=e.preserve||"",this.radixOffset=e.radixOffset?(0,c.getMeasurement)(e.radixOffset,"0pt"):"",this.spaceAbove=e.spaceAbove?(0,c.getMeasurement)(e.spaceAbove,"0pt"):"",this.spaceBelow=e.spaceBelow?(0,c.getMeasurement)(e.spaceBelow,"0pt"):"",this.tabDefault=e.tabDefault?(0,c.getMeasurement)(this.tabDefault):"",this.tabStops=(e.tabStops||"").trim().split(/\s+/).map(((e,t)=>t%2==1?(0,c.getMeasurement)(e):e)),this.textIndent=e.textIndent?(0,c.getMeasurement)(e.textIndent,"0pt"):"",this.use=e.use||"",this.usehref=e.usehref||"",this.vAlign=(0,c.getStringOption)(e.vAlign,["top","bottom","middle"]),this.widows=(0,c.getInteger)({data:e.widows,defaultValue:0,validate:e=>e>=0}),this.hyphenation=null}[a.$toStyle](){const e=(0,s.toStyle)(this,"hAlign");return""!==this.marginLeft&&(e.paddingLeft=(0,s.measureToString)(this.marginLeft)),""!==this.marginRight&&(e.paddingight=(0,s.measureToString)(this.marginRight)),""!==this.spaceAbove&&(e.paddingTop=(0,s.measureToString)(this.spaceAbove)),""!==this.spaceBelow&&(e.paddingBottom=(0,s.measureToString)(this.spaceBelow)),""!==this.textIndent&&(e.textIndent=(0,s.measureToString)(this.textIndent),(0,s.fixTextIndent)(e)),this.lineHeight>0&&(e.lineHeight=(0,s.measureToString)(this.lineHeight)),""!==this.tabDefault&&(e.tabSize=(0,s.measureToString)(this.tabDefault)),this.tabStops.length,this.hyphenatation&&Object.assign(e,this.hyphenatation[a.$toStyle]()),e}}class rt extends o.XFAObject{constructor(e){super(f,"passwordEdit",!0),this.hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.passwordChar=e.passwordChar||"*",this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.margin=null}}class at extends o.XFAObject{constructor(e){super(f,"pattern",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horizontal","vertical"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[a.$toStyle](e){e=e?e[a.$toStyle]():"#FFFFFF";const t=this.color?this.color[a.$toStyle]():"#000000",r="repeating-linear-gradient",n=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`${r}(to top,${n}) ${r}(to right,${n})`;case"crossDiagonal":return`${r}(45deg,${n}) ${r}(-45deg,${n})`;case"diagonalLeft":return`${r}(45deg,${n})`;case"diagonalRight":return`${r}(-45deg,${n})`;case"horizontal":return`${r}(to top,${n})`;case"vertical":return`${r}(to right,${n})`}return""}}class nt extends o.StringObject{constructor(e){super(f,"picture"),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class it extends o.XFAObject{constructor(e){super(f,"proto",!0),this.appearanceFilter=new o.XFAObjectArray,this.arc=new o.XFAObjectArray,this.area=new o.XFAObjectArray,this.assist=new o.XFAObjectArray,this.barcode=new o.XFAObjectArray,this.bindItems=new o.XFAObjectArray,this.bookend=new o.XFAObjectArray,this.boolean=new o.XFAObjectArray,this.border=new o.XFAObjectArray,this.break=new o.XFAObjectArray,this.breakAfter=new o.XFAObjectArray,this.breakBefore=new o.XFAObjectArray,this.button=new o.XFAObjectArray,this.calculate=new o.XFAObjectArray,this.caption=new o.XFAObjectArray,this.certificate=new o.XFAObjectArray,this.certificates=new o.XFAObjectArray,this.checkButton=new o.XFAObjectArray,this.choiceList=new o.XFAObjectArray,this.color=new o.XFAObjectArray,this.comb=new o.XFAObjectArray,this.connect=new o.XFAObjectArray,this.contentArea=new o.XFAObjectArray,this.corner=new o.XFAObjectArray,this.date=new o.XFAObjectArray,this.dateTime=new o.XFAObjectArray,this.dateTimeEdit=new o.XFAObjectArray,this.decimal=new o.XFAObjectArray,this.defaultUi=new o.XFAObjectArray,this.desc=new o.XFAObjectArray,this.digestMethod=new o.XFAObjectArray,this.digestMethods=new o.XFAObjectArray,this.draw=new o.XFAObjectArray,this.edge=new o.XFAObjectArray,this.encoding=new o.XFAObjectArray,this.encodings=new o.XFAObjectArray,this.encrypt=new o.XFAObjectArray,this.encryptData=new o.XFAObjectArray,this.encryption=new o.XFAObjectArray,this.encryptionMethod=new o.XFAObjectArray,this.encryptionMethods=new o.XFAObjectArray,this.event=new o.XFAObjectArray,this.exData=new o.XFAObjectArray,this.exObject=new o.XFAObjectArray,this.exclGroup=new o.XFAObjectArray,this.execute=new o.XFAObjectArray,this.extras=new o.XFAObjectArray,this.field=new o.XFAObjectArray,this.fill=new o.XFAObjectArray,this.filter=new o.XFAObjectArray,this.float=new o.XFAObjectArray,this.font=new o.XFAObjectArray,this.format=new o.XFAObjectArray,this.handler=new o.XFAObjectArray,this.hyphenation=new o.XFAObjectArray,this.image=new o.XFAObjectArray,this.imageEdit=new o.XFAObjectArray,this.integer=new o.XFAObjectArray,this.issuers=new o.XFAObjectArray,this.items=new o.XFAObjectArray,this.keep=new o.XFAObjectArray,this.keyUsage=new o.XFAObjectArray,this.line=new o.XFAObjectArray,this.linear=new o.XFAObjectArray,this.lockDocument=new o.XFAObjectArray,this.manifest=new o.XFAObjectArray,this.margin=new o.XFAObjectArray,this.mdp=new o.XFAObjectArray,this.medium=new o.XFAObjectArray,this.message=new o.XFAObjectArray,this.numericEdit=new o.XFAObjectArray,this.occur=new o.XFAObjectArray,this.oid=new o.XFAObjectArray,this.oids=new o.XFAObjectArray,this.overflow=new o.XFAObjectArray,this.pageArea=new o.XFAObjectArray,this.pageSet=new o.XFAObjectArray,this.para=new o.XFAObjectArray,this.passwordEdit=new o.XFAObjectArray,this.pattern=new o.XFAObjectArray,this.picture=new o.XFAObjectArray,this.radial=new o.XFAObjectArray,this.reason=new o.XFAObjectArray,this.reasons=new o.XFAObjectArray,this.rectangle=new o.XFAObjectArray,this.ref=new o.XFAObjectArray,this.script=new o.XFAObjectArray,this.setProperty=new o.XFAObjectArray,this.signData=new o.XFAObjectArray,this.signature=new o.XFAObjectArray,this.signing=new o.XFAObjectArray,this.solid=new o.XFAObjectArray,this.speak=new o.XFAObjectArray,this.stipple=new o.XFAObjectArray,this.subform=new o.XFAObjectArray,this.subformSet=new o.XFAObjectArray,this.subjectDN=new o.XFAObjectArray,this.subjectDNs=new o.XFAObjectArray,this.submit=new o.XFAObjectArray,this.text=new o.XFAObjectArray,this.textEdit=new o.XFAObjectArray,this.time=new o.XFAObjectArray,this.timeStamp=new o.XFAObjectArray,this.toolTip=new o.XFAObjectArray,this.traversal=new o.XFAObjectArray,this.traverse=new o.XFAObjectArray,this.ui=new o.XFAObjectArray,this.validate=new o.XFAObjectArray,this.value=new o.XFAObjectArray,this.variables=new o.XFAObjectArray}}class st extends o.XFAObject{constructor(e){super(f,"radial",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["toEdge","toCenter"]),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[a.$toStyle](e){e=e?e[a.$toStyle]():"#FFFFFF";const t=this.color?this.color[a.$toStyle]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class ot extends o.StringObject{constructor(e){super(f,"reason"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class ct extends o.XFAObject{constructor(e){super(f,"reasons",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.reason=new o.XFAObjectArray}}class lt extends o.XFAObject{constructor(e){super(f,"rectangle",!0),this.hand=(0,c.getStringOption)(e.hand,["even","left","right"]),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.corner=new o.XFAObjectArray(4),this.edge=new o.XFAObjectArray(4),this.fill=null}[a.$toHTML](){const e=this.edge.children.length?this.edge.children[0]:new ue({}),t=e[a.$toStyle](),r=Object.create(null);"visible"===this.fill?.presence?Object.assign(r,this.fill[a.$toStyle]()):r.fill="transparent",r.strokeWidth=(0,s.measureToString)("visible"===e.presence?e.thickness:0),r.stroke=t.color;const n=(this.corner.children.length?this.corner.children[0]:new te({}))[a.$toStyle](),i={name:"svg",children:[{name:"rect",attributes:{xmlns:p,width:"100%",height:"100%",x:0,y:0,rx:n.radius,ry:n.radius,style:r}}],attributes:{xmlns:p,style:{overflow:"visible"},width:"100%",height:"100%"}};return v(this[a.$getParent]()[a.$getParent]())?c.HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[i]}):(i.attributes.style.position="absolute",c.HTMLResult.success(i))}}class ht extends o.StringObject{constructor(e){super(f,"ref"),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||""}}class ut extends o.StringObject{constructor(e){super(f,"script"),this.binding=e.binding||"",this.contentType=e.contentType||"",this.id=e.id||"",this.name=e.name||"",this.runAt=(0,c.getStringOption)(e.runAt,["client","both","server"]),this.use=e.use||"",this.usehref=e.usehref||""}}class dt extends o.XFAObject{constructor(e){super(f,"setProperty"),this.connection=e.connection||"",this.ref=e.ref||"",this.target=e.target||""}}t.SetProperty=dt;class ft extends o.XFAObject{constructor(e){super(f,"signData",!0),this.id=e.id||"",this.operation=(0,c.getStringOption)(e.operation,["sign","clear","verify"]),this.ref=e.ref||"",this.target=e.target||"",this.use=e.use||"",this.usehref=e.usehref||"",this.filter=null,this.manifest=null}}class pt extends o.XFAObject{constructor(e){super(f,"signature",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["PDF1.3","PDF1.6"]),this.use=e.use||"",this.usehref=e.usehref||"",this.border=null,this.extras=null,this.filter=null,this.manifest=null,this.margin=null}}class gt extends o.XFAObject{constructor(e){super(f,"signing",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.certificate=new o.XFAObjectArray}}class mt extends o.XFAObject{constructor(e){super(f,"solid",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null}[a.$toStyle](e){return e?e[a.$toStyle]():"#FFFFFF"}}class bt extends o.StringObject{constructor(e){super(f,"speak"),this.disable=(0,c.getInteger)({data:e.disable,defaultValue:0,validate:e=>1===e}),this.id=e.id||"",this.priority=(0,c.getStringOption)(e.priority,["custom","caption","name","toolTip"]),this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}}class yt extends o.XFAObject{constructor(e){super(f,"stipple",!0),this.id=e.id||"",this.rate=(0,c.getInteger)({data:e.rate,defaultValue:50,validate:e=>e>=0&&e<=100}),this.use=e.use||"",this.usehref=e.usehref||"",this.color=null,this.extras=null}[a.$toStyle](e){const t=this.rate/100;return l.Util.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}class vt extends o.XFAObject{constructor(e){super(f,"subform",!0),this.access=(0,c.getStringOption)(e.access,["open","nonInteractive","protected","readOnly"]),this.allowMacro=(0,c.getInteger)({data:e.allowMacro,defaultValue:0,validate:e=>1===e}),this.anchorType=(0,c.getStringOption)(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]),this.colSpan=(0,c.getInteger)({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e}),this.columnWidths=(e.columnWidths||"").trim().split(/\s+/).map((e=>"-1"===e?-1:(0,c.getMeasurement)(e))),this.h=e.h?(0,c.getMeasurement)(e.h):"",this.hAlign=(0,c.getStringOption)(e.hAlign,["left","center","justify","justifyAll","radix","right"]),this.id=e.id||"",this.layout=(0,c.getStringOption)(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]),this.locale=e.locale||"",this.maxH=(0,c.getMeasurement)(e.maxH,"0pt"),this.maxW=(0,c.getMeasurement)(e.maxW,"0pt"),this.mergeMode=(0,c.getStringOption)(e.mergeMode,["consumeData","matchTemplate"]),this.minH=(0,c.getMeasurement)(e.minH,"0pt"),this.minW=(0,c.getMeasurement)(e.minW,"0pt"),this.name=e.name||"",this.presence=(0,c.getStringOption)(e.presence,["visible","hidden","inactive","invisible"]),this.relevant=(0,c.getRelevant)(e.relevant),this.restoreState=(0,c.getStringOption)(e.restoreState,["manual","auto"]),this.scope=(0,c.getStringOption)(e.scope,["name","none"]),this.use=e.use||"",this.usehref=e.usehref||"",this.w=e.w?(0,c.getMeasurement)(e.w):"",this.x=(0,c.getMeasurement)(e.x,"0pt"),this.y=(0,c.getMeasurement)(e.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 o.XFAObjectArray,this.breakAfter=new o.XFAObjectArray,this.breakBefore=new o.XFAObjectArray,this.connect=new o.XFAObjectArray,this.draw=new o.XFAObjectArray,this.event=new o.XFAObjectArray,this.exObject=new o.XFAObjectArray,this.exclGroup=new o.XFAObjectArray,this.field=new o.XFAObjectArray,this.proto=new o.XFAObjectArray,this.setProperty=new o.XFAObjectArray,this.subform=new o.XFAObjectArray,this.subformSet=new o.XFAObjectArray}[a.$getSubformParent](){const e=this[a.$getParent]();return e instanceof wt?e[a.$getSubformParent]():e}[a.$isBindable](){return!0}[a.$isThereMoreWidth](){return this.layout.endsWith("-tb")&&0===this[a.$extra].attempt&&this[a.$extra].numberInLine>0||this[a.$getParent]()[a.$isThereMoreWidth]()}*[a.$getContainedChildren](){yield*A(this)}[a.$flushHTML](){return(0,i.flushHTML)(this)}[a.$addHTML](e,t){(0,i.addHTML)(this,e,t)}[a.$getAvailableSpace](){return(0,i.getAvailableSpace)(this)}[a.$isSplittable](){const e=this[a.$getSubformParent]();return!!e[a.$isSplittable]()&&(void 0!==this[a.$extra]._isSplittable?this[a.$extra]._isSplittable:"position"===this.layout||this.layout.includes("row")||this.keep&&"none"!==this.keep.intact?(this[a.$extra]._isSplittable=!1,!1):!(e.layout?.endsWith("-tb")&&0!==e[a.$extra].numberInLine||(this[a.$extra]._isSplittable=!0,0)))}[a.$toHTML](e){if(x(this),this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new z({targetType:this.break.after,target:this.break.afterTarget,startNew:this.break.startNew.toString()});e[a.$globalData]=this[a.$globalData],this[a.$appendChild](e),this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new H({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});e[a.$globalData]=this[a.$globalData],this[a.$appendChild](e),this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new Je({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break.overflowTrailer});e[a.$globalData]=this[a.$globalData],this[a.$appendChild](e),this.overflow.push(e)}this[a.$removeChild](this.break),this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return c.HTMLResult.EMPTY;if((this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&(0,l.warn)("XFA - Several breakBefore or breakAfter in subforms: please file a bug."),this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(O(e))return c.HTMLResult.breakNode(e)}if(this[a.$extra]?.afterBreakAfter)return c.HTMLResult.EMPTY;(0,s.fixDimensions)(this);const t=[],r={id:this[a.$uid],class:[]};(0,s.setAccess)(this,r.class),this[a.$extra]||(this[a.$extra]=Object.create(null)),Object.assign(this[a.$extra],{children:t,line:null,attributes:r,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const n=this[a.$getTemplateRoot](),o=n[a.$extra].noLayoutFailure,h=this[a.$isSplittable]();if(h||T(this),!(0,i.checkDimensions)(this,e))return c.HTMLResult.FAILURE;const u=new Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[a.$getSubformParent]().columnWidths;Array.isArray(e)&&e.length>0&&(this[a.$extra].columnWidths=e,this[a.$extra].currentColumn=0)}const d=(0,s.toStyle)(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),f=["xfaSubform"],p=(0,s.layoutClass)(this);if(p&&f.push(p),r.style=d,r.class=f,this.name&&(r.xfaName=this.name),this.overflow){const t=this.overflow[a.$getExtra]();t.addLeader&&(t.addLeader=!1,F(this,t.leader,e))}this[a.$pushPara]();const g="lr-tb"===this.layout||"rl-tb"===this.layout,m=g?2:1;for(;this[a.$extra].attempt<m;this[a.$extra].attempt++){g&&1===this[a.$extra].attempt&&(this[a.$extra].numberInLine=0);const e=this[a.$childrenToHTML]({filter:u,include:!0});if(e.success)break;if(e.isBreak())return this[a.$popPara](),e;if(g&&0===this[a.$extra].attempt&&0===this[a.$extra].numberInLine&&!n[a.$extra].noLayoutFailure){this[a.$extra].attempt=m;break}}if(this[a.$popPara](),h||E(this),n[a.$extra].noLayoutFailure=o,this[a.$extra].attempt===m)return this.overflow&&(this[a.$getTemplateRoot]()[a.$extra].overflowNode=this.overflow),h||delete this[a.$extra],c.HTMLResult.FAILURE;if(this.overflow){const t=this.overflow[a.$getExtra]();t.addTrailer&&(t.addTrailer=!1,F(this,t.trailer,e))}let b=0,y=0;this.margin&&(b=this.margin.leftInset+this.margin.rightInset,y=this.margin.topInset+this.margin.bottomInset);const v=Math.max(this[a.$extra].width+b,this.w||0),w=Math.max(this[a.$extra].height+y,this.h||0),A=[this.x,this.y,v,w];if(""===this.w&&(d.width=(0,s.measureToString)(v)),""===this.h&&(d.height=(0,s.measureToString)(w)),("0px"===d.width||"0px"===d.height)&&0===t.length)return c.HTMLResult.EMPTY;const S={name:"div",attributes:r,children:t};k(this,r);const C=c.HTMLResult.success((0,s.createWrapper)(this,S),A);if(this.breakAfter.children.length>=1){const e=this.breakAfter.children[0];if(O(e))return this[a.$extra].afterBreakAfter=C,c.HTMLResult.breakNode(e)}return delete this[a.$extra],C}}class wt extends o.XFAObject{constructor(e){super(f,"subformSet",!0),this.id=e.id||"",this.name=e.name||"",this.relation=(0,c.getStringOption)(e.relation,["ordered","choice","unordered"]),this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.usehref||"",this.bookend=null,this.break=null,this.desc=null,this.extras=null,this.occur=null,this.overflow=null,this.breakAfter=new o.XFAObjectArray,this.breakBefore=new o.XFAObjectArray,this.subform=new o.XFAObjectArray,this.subformSet=new o.XFAObjectArray}*[a.$getContainedChildren](){yield*A(this)}[a.$getSubformParent](){let e=this[a.$getParent]();for(;!(e instanceof vt);)e=e[a.$getParent]();return e}[a.$isBindable](){return!0}}class At extends o.ContentObject{constructor(e){super(f,"subjectDN"),this.delimiter=e.delimiter||",",this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){this[a.$content]=new Map(this[a.$content].split(this.delimiter).map((e=>((e=e.split("=",2))[0]=e[0].trim(),e))))}}class St extends o.XFAObject{constructor(e){super(f,"subjectDNs",!0),this.id=e.id||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||"",this.subjectDN=new o.XFAObjectArray}}class xt extends o.XFAObject{constructor(e){super(f,"submit",!0),this.embedPDF=(0,c.getInteger)({data:e.embedPDF,defaultValue:0,validate:e=>1===e}),this.format=(0,c.getStringOption)(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]),this.id=e.id||"",this.target=e.target||"",this.textEncoding=(0,c.getKeyword)({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\d{2}/)}),this.use=e.use||"",this.usehref=e.usehref||"",this.xdpContent=e.xdpContent||"",this.encrypt=null,this.encryptData=new o.XFAObjectArray,this.signData=new o.XFAObjectArray}}class kt extends o.XFAObject{constructor(e){super(f,"template",!0),this.baseProfile=(0,c.getStringOption)(e.baseProfile,["full","interactiveForms"]),this.extras=null,this.subform=new o.XFAObjectArray}[a.$finalize](){0===this.subform.children.length&&(0,l.warn)("XFA - No subforms in template node."),this.subform.children.length>=2&&(0,l.warn)("XFA - Several subforms in template node: please file a bug."),this[a.$tabIndex]=5e3}[a.$isSplittable](){return!0}[a.$searchNode](e,t){return e.startsWith("#")?[this[a.$ids].get(e.slice(1))]:(0,d.searchNode)(this,t,e,!0,!0)}*[a.$toPages](){if(!this.subform.children.length)return c.HTMLResult.success({name:"div",children:[]});this[a.$extra]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const e=this.subform.children[0];e.pageSet[a.$cleanPage]();const t=e.pageSet.pageArea.children,r={name:"div",children:[]};let n=null,i=null,s=null;if(e.breakBefore.children.length>=1?(i=e.breakBefore.children[0],s=i.target):e.subform.children.length>=1&&e.subform.children[0].breakBefore.children.length>=1?(i=e.subform.children[0].breakBefore.children[0],s=i.target):e.break?.beforeTarget?(i=e.break,s=i.beforeTarget):e.subform.children.length>=1&&e.subform.children[0].break?.beforeTarget&&(i=e.subform.children[0].break,s=i.beforeTarget),i){const e=this[a.$searchNode](s,i[a.$getParent]());e instanceof Qe&&(n=e,i[a.$extra]={})}n||(n=t[0]),n[a.$extra]={numberOfUse:1};const o=n[a.$getParent]();let h;o[a.$extra]={numberOfUse:1,pageIndex:o.pageArea.children.indexOf(n),pageSetIndex:0};let u=null,d=null,f=!0,p=0,g=0;for(;;){if(f)p=0;else if(r.children.pop(),3==++p)return(0,l.warn)("XFA - Something goes wrong: please file a bug."),r;h=null,this[a.$extra].currentPageArea=n;const t=n[a.$toHTML]().html;r.children.push(t),u&&(this[a.$extra].noLayoutFailure=!0,t.children.push(u[a.$toHTML](n[a.$extra].space).html),u=null),d&&(this[a.$extra].noLayoutFailure=!0,t.children.push(d[a.$toHTML](n[a.$extra].space).html),d=null);const i=n.contentArea.children,s=t.children.filter((e=>e.attributes.class.includes("xfaContentarea")));f=!1,this[a.$extra].firstUnsplittable=null,this[a.$extra].noLayoutFailure=!1;const o=t=>{const r=e[a.$flushHTML]();r&&(f||=r.children?.length>0,s[t].children.push(r))};for(let t=g,n=i.length;t<n;t++){const n=this[a.$extra].currentContentArea=i[t],c={width:n.w,height:n.h};g=0,u&&(s[t].children.push(u[a.$toHTML](c).html),u=null),d&&(s[t].children.push(d[a.$toHTML](c).html),d=null);const l=e[a.$toHTML](c);if(l.success)return l.html?(f||=l.html.children?.length>0,s[t].children.push(l.html)):!f&&r.children.length>1&&r.children.pop(),r;if(l.isBreak()){const e=l.breakNode;if(o(t),"auto"===e.targetType)continue;e.leader&&(u=this[a.$searchNode](e.leader,e[a.$getParent]()),u=u?u[0]:null),e.trailer&&(d=this[a.$searchNode](e.trailer,e[a.$getParent]()),d=d?d[0]:null),"pageArea"===e.targetType?(h=e[a.$extra].target,t=1/0):e[a.$extra].target?(h=e[a.$extra].target,g=e[a.$extra].index+1,t=1/0):t=e[a.$extra].index}else if(this[a.$extra].overflowNode){const e=this[a.$extra].overflowNode;this[a.$extra].overflowNode=null;const r=e[a.$getExtra](),n=r.target;r.addLeader=null!==r.leader,r.addTrailer=null!==r.trailer,o(t);const s=t;if(t=1/0,n instanceof Qe)h=n;else if(n instanceof ee){const e=i.indexOf(n);-1!==e?e>s?t=e-1:g=e:(h=n[a.$getParent](),g=h.contentArea.children.indexOf(n))}}else o(t)}this[a.$extra].pageNumber+=1,h&&(h[a.$isUsable]()?h[a.$extra].numberOfUse+=1:h=null),n=h||n[a.$getNextPage](),yield null}}}t.Template=kt;class Ct extends o.ContentObject{constructor(e){super(f,"text"),this.id=e.id||"",this.maxChars=(0,c.getInteger)({data:e.maxChars,defaultValue:0,validate:e=>e>=0}),this.name=e.name||"",this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$acceptWhitespace](){return!0}[a.$onChild](e){return e[a.$namespaceId]===n.NamespaceIds.xhtml.id?(this[a.$content]=e,!0):((0,l.warn)(`XFA - Invalid content in Text: ${e[a.$nodeName]}.`),!1)}[a.$onText](e){this[a.$content]instanceof o.XFAObject||super[a.$onText](e)}[a.$finalize](){"string"==typeof this[a.$content]&&(this[a.$content]=this[a.$content].replaceAll("\r\n","\n"))}[a.$getExtra](){return"string"==typeof this[a.$content]?this[a.$content].split(/[\u2029\u2028\n]/).reduce(((e,t)=>(t&&e.push(t),e)),[]).join("\n"):this[a.$content][a.$text]()}[a.$toHTML](e){if("string"==typeof this[a.$content]){const e=_(this[a.$content]).html;return this[a.$content].includes("\u2029")?(e.name="div",e.children=[],this[a.$content].split("\u2029").map((e=>e.split(/[\u2028\n]/).reduce(((e,t)=>(e.push({name:"span",value:t},{name:"br"}),e)),[]))).forEach((t=>{e.children.push({name:"p",children:t})}))):/[\u2028\n]/.test(this[a.$content])&&(e.name="div",e.children=[],this[a.$content].split(/[\u2028\n]/).forEach((t=>{e.children.push({name:"span",value:t},{name:"br"})}))),c.HTMLResult.success(e)}return this[a.$content][a.$toHTML](e)}}t.Text=Ct;class _t extends o.XFAObject{constructor(e){super(f,"textEdit",!0),this.allowRichText=(0,c.getInteger)({data:e.allowRichText,defaultValue:0,validate:e=>1===e}),this.hScrollPolicy=(0,c.getStringOption)(e.hScrollPolicy,["auto","off","on"]),this.id=e.id||"",this.multiLine=(0,c.getInteger)({data:e.multiLine,defaultValue:"",validate:e=>0===e||1===e}),this.use=e.use||"",this.usehref=e.usehref||"",this.vScrollPolicy=(0,c.getStringOption)(e.vScrollPolicy,["auto","off","on"]),this.border=null,this.comb=null,this.extras=null,this.margin=null}[a.$toHTML](e){const t=(0,s.toStyle)(this,"border","font","margin");let r;const n=this[a.$getParent]()[a.$getParent]();return""===this.multiLine&&(this.multiLine=n instanceof he?1:0),r=1===this.multiLine?{name:"textarea",attributes:{dataId:n[a.$data]?.[a.$uid]||n[a.$uid],fieldId:n[a.$uid],class:["xfaTextfield"],style:t,"aria-label":C(n),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:n[a.$data]?.[a.$uid]||n[a.$uid],fieldId:n[a.$uid],class:["xfaTextfield"],style:t,"aria-label":C(n),"aria-required":!1}},S(n)&&(r.attributes["aria-required"]=!0,r.attributes.required=!0),c.HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class Tt extends o.StringObject{constructor(e){super(f,"time"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}[a.$finalize](){const e=this[a.$content].trim();this[a.$content]=e?new Date(e):null}[a.$toHTML](e){return _(this[a.$content]?this[a.$content].toString():"")}}class Et extends o.XFAObject{constructor(e){super(f,"timeStamp"),this.id=e.id||"",this.server=e.server||"",this.type=(0,c.getStringOption)(e.type,["optional","required"]),this.use=e.use||"",this.usehref=e.usehref||""}}class Ot extends o.StringObject{constructor(e){super(f,"toolTip"),this.id=e.id||"",this.rid=e.rid||"",this.use=e.use||"",this.usehref=e.usehref||""}}class Ft extends o.XFAObject{constructor(e){super(f,"traversal",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.traverse=new o.XFAObjectArray}}class Pt extends o.XFAObject{constructor(e){super(f,"traverse",!0),this.id=e.id||"",this.operation=(0,c.getStringOption)(e.operation,["next","back","down","first","left","right","up"]),this.ref=e.ref||"",this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.script=null}get name(){return this.operation}[a.$isTransparent](){return!1}}class It extends o.XFAObject{constructor(e){super(f,"ui",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.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}[a.$getExtra](){if(void 0===this[a.$extra]){for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"picture"===e)continue;const t=this[e];if(t instanceof o.XFAObject)return this[a.$extra]=t,t}this[a.$extra]=null}return this[a.$extra]}[a.$toHTML](e){const t=this[a.$getExtra]();return t?t[a.$toHTML](e):c.HTMLResult.EMPTY}}class Mt extends o.XFAObject{constructor(e){super(f,"validate",!0),this.formatTest=(0,c.getStringOption)(e.formatTest,["warning","disabled","error"]),this.id=e.id||"",this.nullTest=(0,c.getStringOption)(e.nullTest,["disabled","error","warning"]),this.scriptTest=(0,c.getStringOption)(e.scriptTest,["error","disabled","warning"]),this.use=e.use||"",this.usehref=e.usehref||"",this.extras=null,this.message=null,this.picture=null,this.script=null}}class Rt extends o.XFAObject{constructor(e){super(f,"value",!0),this.id=e.id||"",this.override=(0,c.getInteger)({data:e.override,defaultValue:0,validate:e=>1===e}),this.relevant=(0,c.getRelevant)(e.relevant),this.use=e.use||"",this.usehref=e.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}[a.$setValue](e){const t=this[a.$getParent]();if(t instanceof Ce&&t.ui?.imageEdit)return this.image||(this.image=new Me({}),this[a.$appendChild](this.image)),void(this.image[a.$content]=e[a.$content]);const r=e[a.$nodeName];if(null===this[r]){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];t instanceof o.XFAObject&&(this[e]=null,this[a.$removeChild](t))}this[e[a.$nodeName]]=e,this[a.$appendChild](e)}else this[r][a.$content]=e[a.$content]}[a.$text](){if(this.exData)return"string"==typeof this.exData[a.$content]?this.exData[a.$content].trim():this.exData[a.$content][a.$text]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof o.XFAObject)return(t[a.$content]||"").toString().trim()}return null}[a.$toHTML](e){for(const t of Object.getOwnPropertyNames(this)){const r=this[t];if(r instanceof o.XFAObject)return r[a.$toHTML](e)}return c.HTMLResult.EMPTY}}t.Value=Rt;class Dt extends o.XFAObject{constructor(e){super(f,"variables",!0),this.id=e.id||"",this.use=e.use||"",this.usehref=e.usehref||"",this.boolean=new o.XFAObjectArray,this.date=new o.XFAObjectArray,this.dateTime=new o.XFAObjectArray,this.decimal=new o.XFAObjectArray,this.exData=new o.XFAObjectArray,this.float=new o.XFAObjectArray,this.image=new o.XFAObjectArray,this.integer=new o.XFAObjectArray,this.manifest=new o.XFAObjectArray,this.script=new o.XFAObjectArray,this.text=new o.XFAObjectArray,this.time=new o.XFAObjectArray}[a.$isTransparent](){return!0}}class Nt{static[n.$buildXFAObject](e,t){if(Nt.hasOwnProperty(e)){const r=Nt[e](t);return r[a.$setSetAttributes](t),r}}static appearanceFilter(e){return new P(e)}static arc(e){return new I(e)}static area(e){return new M(e)}static assist(e){return new R(e)}static barcode(e){return new D(e)}static bind(e){return new N(e)}static bindItems(e){return new L(e)}static bookend(e){return new B(e)}static boolean(e){return new j(e)}static border(e){return new $(e)}static break(e){return new U(e)}static breakAfter(e){return new z(e)}static breakBefore(e){return new H(e)}static button(e){return new X(e)}static calculate(e){return new W(e)}static caption(e){return new G(e)}static certificate(e){return new q(e)}static certificates(e){return new V(e)}static checkButton(e){return new K(e)}static choiceList(e){return new Y(e)}static color(e){return new Z(e)}static comb(e){return new J(e)}static connect(e){return new Q(e)}static contentArea(e){return new ee(e)}static corner(e){return new te(e)}static date(e){return new re(e)}static dateTime(e){return new ae(e)}static dateTimeEdit(e){return new ne(e)}static decimal(e){return new ie(e)}static defaultUi(e){return new se(e)}static desc(e){return new oe(e)}static digestMethod(e){return new ce(e)}static digestMethods(e){return new le(e)}static draw(e){return new he(e)}static edge(e){return new ue(e)}static encoding(e){return new de(e)}static encodings(e){return new fe(e)}static encrypt(e){return new pe(e)}static encryptData(e){return new ge(e)}static encryption(e){return new me(e)}static encryptionMethod(e){return new be(e)}static encryptionMethods(e){return new ye(e)}static event(e){return new ve(e)}static exData(e){return new we(e)}static exObject(e){return new Ae(e)}static exclGroup(e){return new Se(e)}static execute(e){return new xe(e)}static extras(e){return new ke(e)}static field(e){return new Ce(e)}static fill(e){return new _e(e)}static filter(e){return new Te(e)}static float(e){return new Ee(e)}static font(e){return new Oe(e)}static format(e){return new Fe(e)}static handler(e){return new Pe(e)}static hyphenation(e){return new Ie(e)}static image(e){return new Me(e)}static imageEdit(e){return new Re(e)}static integer(e){return new De(e)}static issuers(e){return new Ne(e)}static items(e){return new Le(e)}static keep(e){return new Be(e)}static keyUsage(e){return new je(e)}static line(e){return new $e(e)}static linear(e){return new Ue(e)}static lockDocument(e){return new ze(e)}static manifest(e){return new He(e)}static margin(e){return new Xe(e)}static mdp(e){return new We(e)}static medium(e){return new Ge(e)}static message(e){return new qe(e)}static numericEdit(e){return new Ve(e)}static occur(e){return new Ke(e)}static oid(e){return new Ye(e)}static oids(e){return new Ze(e)}static overflow(e){return new Je(e)}static pageArea(e){return new Qe(e)}static pageSet(e){return new et(e)}static para(e){return new tt(e)}static passwordEdit(e){return new rt(e)}static pattern(e){return new at(e)}static picture(e){return new nt(e)}static proto(e){return new it(e)}static radial(e){return new st(e)}static reason(e){return new ot(e)}static reasons(e){return new ct(e)}static rectangle(e){return new lt(e)}static ref(e){return new ht(e)}static script(e){return new ut(e)}static setProperty(e){return new dt(e)}static signData(e){return new ft(e)}static signature(e){return new pt(e)}static signing(e){return new gt(e)}static solid(e){return new mt(e)}static speak(e){return new bt(e)}static stipple(e){return new yt(e)}static subform(e){return new vt(e)}static subformSet(e){return new wt(e)}static subjectDN(e){return new At(e)}static subjectDNs(e){return new St(e)}static submit(e){return new xt(e)}static template(e){return new kt(e)}static text(e){return new Ct(e)}static textEdit(e){return new _t(e)}static time(e){return new Tt(e)}static timeStamp(e){return new Et(e)}static toolTip(e){return new Ot(e)}static traversal(e){return new Ft(e)}static traverse(e){return new Pt(e)}static ui(e){return new It(e)}static validate(e){return new Mt(e)}static value(e){return new Rt(e)}static variables(e){return new Dt(e)}}t.TemplateNamespace=Nt},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NamespaceIds=t.$buildXFAObject=void 0;const r=Symbol();t.$buildXFAObject=r,t.NamespaceIds={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addHTML=function(e,t,r){const s=e[a.$extra],o=s.availableSpace,[c,l,h,u]=r;switch(e.layout){case"position":s.width=Math.max(s.width,c+h),s.height=Math.max(s.height,l+u),s.children.push(t);break;case"lr-tb":case"rl-tb":s.line&&1!==s.attempt||(s.line=i(e,[]),s.children.push(s.line),s.numberInLine=0),s.numberInLine+=1,s.line.children.push(t),0===s.attempt?(s.currentWidth+=h,s.height=Math.max(s.height,s.prevHeight+u)):(s.currentWidth=h,s.prevHeight=s.height,s.height+=u,s.attempt=0),s.width=Math.max(s.width,s.currentWidth);break;case"rl-row":case"row":{s.children.push(t),s.width+=h,s.height=Math.max(s.height,u);const e=(0,n.measureToString)(s.height);for(const t of s.children)t.attributes.style.height=e;break}case"table":case"tb":s.width=Math.min(o.width,Math.max(s.width,h)),s.height+=u,s.children.push(t)}},t.checkDimensions=function(e,t){if(null===e[a.$getTemplateRoot]()[a.$extra].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const r=e[a.$getSubformParent](),n=r[a.$extra]?.attempt||0,[,i,s,o]=function(e){let t,r,a=""===e.w?NaN:e.w,n=""===e.h?NaN:e.h,[i,s]=[0,0];switch(e.anchorType||""){case"bottomCenter":[i,s]=[a/2,n];break;case"bottomLeft":[i,s]=[0,n];break;case"bottomRight":[i,s]=[a,n];break;case"middleCenter":[i,s]=[a/2,n/2];break;case"middleLeft":[i,s]=[0,n/2];break;case"middleRight":[i,s]=[a,n/2];break;case"topCenter":[i,s]=[a/2,0];break;case"topRight":[i,s]=[a,0]}switch(e.rotate||0){case 0:[t,r]=[-i,-s];break;case 90:[t,r]=[-s,i],[a,n]=[n,-a];break;case 180:[t,r]=[i,s],[a,n]=[-a,-n];break;case 270:[t,r]=[s,-i],[a,n]=[-n,a]}return[e.x+t+Math.min(0,a),e.y+r+Math.min(0,n),Math.abs(a),Math.abs(n)]}(e);switch(r.layout){case"lr-tb":case"rl-tb":return 0===n?e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure?""!==e.w?Math.round(s-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(o-t.height)>2)&&(""!==e.w?Math.round(s-t.width)<=2||0===r[a.$extra].numberInLine&&t.height>2:t.width>2):!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||!(""!==e.h&&Math.round(o-t.height)>2)&&(""===e.w||Math.round(s-t.width)<=2||!r[a.$isThereMoreWidth]())&&t.height>2;case"table":case"tb":return!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||(""===e.h||e[a.$isSplittable]()?(""===e.w||Math.round(s-t.width)<=2||!r[a.$isThereMoreWidth]())&&t.height>2:Math.round(o-t.height)<=2);case"position":return!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||(""===e.h||Math.round(o+i-t.height)<=2||o+i>e[a.$getTemplateRoot]()[a.$extra].currentContentArea.h);case"rl-row":case"row":return!!e[a.$getTemplateRoot]()[a.$extra].noLayoutFailure||""===e.h||Math.round(o-t.height)<=2;default:return!0}},t.flushHTML=function(e){if(!e[a.$extra])return null;const t={name:"div",attributes:e[a.$extra].attributes,children:e[a.$extra].children};if(e[a.$extra].failingNode){const r=e[a.$extra].failingNode[a.$flushHTML]();r&&(e.layout.endsWith("-tb")?t.children.push(i(e,[r])):t.children.push(r))}return 0===t.children.length?null:t},t.getAvailableSpace=function(e){const t=e[a.$extra].availableSpace,r=e.margin?e.margin.topInset+e.margin.bottomInset:0,n=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[a.$extra].attempt?{width:t.width-n-e[a.$extra].currentWidth,height:t.height-r-e[a.$extra].prevHeight}:{width:t.width-n,height:t.height-r-e[a.$extra].height};case"rl-row":case"row":return{width:e[a.$extra].columnWidths.slice(e[a.$extra].currentColumn).reduce(((e,t)=>e+t)),height:t.height-n};case"table":case"tb":return{width:t.width-n,height:t.height-r-e[a.$extra].height};default:return t}};var a=r(78),n=r(83);function i(e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.computeBbox=function(e,t,r){let n;if(""!==e.w&&""!==e.h)n=[e.x,e.y,e.w,e.h];else{if(!r)return null;let i=e.w;if(""===i){if(0===e.maxW){const t=e[a.$getSubformParent]();i="position"===t.layout&&""!==t.w?0:e.minW}else i=Math.min(e.maxW,r.width);t.attributes.style.width=l(i)}let s=e.h;if(""===s){if(0===e.maxH){const t=e[a.$getSubformParent]();s="position"===t.layout&&""!==t.h?0:e.minH}else s=Math.min(e.maxH,r.height);t.attributes.style.height=l(s)}n=[e.x,e.y,i,s]}return n},t.createWrapper=function(e,t){const{attributes:r}=t,{style:n}=r,i={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};if(r.class.push("xfaWrapped"),e.border){const{widths:r,insets:s}=e.border[a.$extra];let o,c,l=s[0],h=s[3];const u=s[0]+s[2],f=s[1]+s[3];switch(e.border.hand){case"even":l-=r[0]/2,h-=r[3]/2,o=`calc(100% + ${(r[1]+r[3])/2-f}px)`,c=`calc(100% + ${(r[0]+r[2])/2-u}px)`;break;case"left":l-=r[0],h-=r[3],o=`calc(100% + ${r[1]+r[3]-f}px)`,c=`calc(100% + ${r[0]+r[2]-u}px)`;break;case"right":o=f?`calc(100% - ${f}px)`:"100%",c=u?`calc(100% - ${u}px)`:"100%"}const p=["xfaBorder"];d(e.border)&&p.push("xfaPrintOnly");const g={name:"div",attributes:{class:p,style:{top:`${l}px`,left:`${h}px`,width:o,height:c}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])void 0!==n[e]&&(g.attributes.style[e]=n[e],delete n[e]);i.children.push(g,t)}else i.children.push(t);for(const e of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])void 0!==n[e]&&(i.attributes.style[e]=n[e],delete n[e]);return i.attributes.style.position="absolute"===n.position?"absolute":"relative",delete n.position,n.alignSelf&&(i.attributes.style.alignSelf=n.alignSelf,delete n.alignSelf),i},t.fixDimensions=function(e){const t=e[a.$getSubformParent]();if(t.layout?.includes("row")){const r=t[a.$extra],n=e.colSpan;let i;i=-1===n?r.columnWidths.slice(r.currentColumn).reduce(((e,t)=>e+t),0):r.columnWidths.slice(r.currentColumn,r.currentColumn+n).reduce(((e,t)=>e+t),0),isNaN(i)||(e.w=i)}t.layout&&"position"!==t.layout&&(e.x=e.y=0),"table"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=e.columnWidths.reduce(((e,t)=>e+t),0))},t.fixTextIndent=function(e){const t=(0,i.getMeasurement)(e.textIndent,"0px");if(t>=0)return;const r="padding"+("left"==("right"===e.textAlign?"right":"left")?"Left":"Right"),a=(0,i.getMeasurement)(e[r],"0px");e[r]=a-t+"px"},t.fixURL=function(e){const t=(0,n.createValidAbsoluteUrl)(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null},t.isPrintOnly=d,t.layoutClass=function(e){switch(e.layout){case"position":default: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"}},t.layoutNode=function(e,t){let r=null,n=null,i=!1;if((!e.w||!e.h)&&e.value){let s=0,o=0;e.margin&&(s=e.margin.leftInset+e.margin.rightInset,o=e.margin.topInset+e.margin.bottomInset);let c=null,l=null;e.para&&(l=Object.create(null),c=""===e.para.lineHeight?null:e.para.lineHeight,l.top=""===e.para.spaceAbove?0:e.para.spaceAbove,l.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow,l.left=""===e.para.marginLeft?0:e.para.marginLeft,l.right=""===e.para.marginRight?0:e.para.marginRight);let h=e.font;if(!h){const t=e[a.$getTemplateRoot]();let r=e[a.$getParent]();for(;r&&r!==t;){if(r.font){h=r.font;break}r=r[a.$getParent]()}}const d=(e.w||t.width)-s,f=e[a.$globalData].fontFinder;if(e.value.exData&&e.value.exData[a.$content]&&"text/html"===e.value.exData.contentType){const t=u(e.value.exData[a.$content],h,l,c,f,d);n=t.width,r=t.height,i=t.isBroken}else{const t=e.value[a.$text]();if(t){const e=u(t,h,l,c,f,d);n=e.width,r=e.height,i=e.isBroken}}null===n||e.w||(n+=s),null===r||e.h||(r+=o)}return{w:n,h:r,isBroken:i}},t.measureToString=l,t.setAccess=function(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}},t.setFontFamily=function(e,t,r,a){if(!r)return void delete a.fontFamily;const n=(0,i.stripQuotes)(e.typeface);a.fontFamily=`"${n}"`;const o=r.find(n);if(o){const{fontFamily:r}=o.regular.cssFontInfo;r!==n&&(a.fontFamily=`"${r}"`);const i=f(t);if(i&&""!==i.lineHeight)return;if(a.lineHeight)return;const c=(0,s.selectFont)(e,o);c&&(a.lineHeight=Math.max(1.2,c.lineHeight))}},t.setMinMaxDimensions=function(e,t){"position"===e[a.$getSubformParent]().layout&&(e.minW>0&&(t.minWidth=l(e.minW)),e.maxW>0&&(t.maxWidth=l(e.maxW)),e.minH>0&&(t.minHeight=l(e.minH)),e.maxH>0&&(t.maxHeight=l(e.maxH)))},t.setPara=function(e,t,r){if(r.attributes.class?.includes("xfaRich")){t&&(""===e.h&&(t.height="auto"),""===e.w&&(t.width="auto"));const n=f(e);if(n){const e=r.attributes.style;switch(e.display="flex",e.flexDirection="column",n.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=n[a.$toStyle]();for(const[r,a]of Object.entries(t))r in e||(e[r]=a)}}},t.toStyle=function(e,...t){const r=Object.create(null);for(const i of t){const t=e[i];if(null!==t)if(h.hasOwnProperty(i))h[i](e,r);else if(t instanceof c.XFAObject){const e=t[a.$toStyle]();e?Object.assign(r,e):(0,n.warn)(`(DEBUG) - XFA - style for ${i} not implemented yet`)}}return r};var a=r(78),n=r(2),i=r(84),s=r(85),o=r(86),c=r(87);function l(e){return"string"==typeof e?"0px":Number.isInteger(e)?`${e}px`:`${e.toFixed(2)}px`}const h={anchorType(e,t){const r=e[a.$getSubformParent]();if(r&&(!r.layout||"position"===r.layout))switch("transform"in t||(t.transform=""),e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft":t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";break;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}},dimensions(e,t){const r=e[a.$getSubformParent]();let n=e.w;const i=e.h;if(r.layout?.includes("row")){const t=r[a.$extra],i=e.colSpan;let s;-1===i?(s=t.columnWidths.slice(t.currentColumn).reduce(((e,t)=>e+t),0),t.currentColumn=0):(s=t.columnWidths.slice(t.currentColumn,t.currentColumn+i).reduce(((e,t)=>e+t),0),t.currentColumn=(t.currentColumn+e.colSpan)%t.columnWidths.length),isNaN(s)||(n=e.w=s)}t.width=""!==n?l(n):"auto",t.height=""!==i?l(i):"auto"},position(e,t){const r=e[a.$getSubformParent]();r?.layout&&"position"!==r.layout||(t.position="absolute",t.left=l(e.x),t.top=l(e.y))},rotate(e,t){e.rotate&&("transform"in t||(t.transform=""),t.transform+=`rotate(-${e.rotate}deg)`,t.transformOrigin="top left")},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inactive":t.display="none"}},hAlign(e,t){if("para"===e[a.$nodeName])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[a.$toStyle]().margin)}};function u(e,t,r,n,i,s){const c=new o.TextMeasure(t,r,n,i);return"string"==typeof e?c.addString(e):e[a.$pushGlyphs](c),c.compute(s)}function d(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function f(e){const t=e[a.$getTemplateRoot]()[a.$extra].paraStack;return t.length?t.at(-1):null}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLResult=void 0,t.getBBox=function(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};const r=e.trim().split(/\s*,\s*/).map((e=>o(e,"-1")));if(r.length<4||r[2]<0||r[3]<0)return{x:t,y:t,width:t,height:t};const[a,n,i,s]=r;return{x:a,y:n,width:i,height:s}},t.getColor=function(e,t=[0,0,0]){let[r,a,n]=t;if(!e)return{r,g:a,b:n};const i=e.trim().split(/\s*,\s*/).map((e=>Math.min(Math.max(0,parseInt(e.trim(),10)),255))).map((e=>isNaN(e)?0:e));return i.length<3||([r,a,n]=i),{r,g:a,b:n}},t.getFloat=function({data:e,defaultValue:t,validate:r}){if(!e)return t;e=e.trim();const a=parseFloat(e);return!isNaN(a)&&r(a)?a:t},t.getInteger=function({data:e,defaultValue:t,validate:r}){if(!e)return t;e=e.trim();const a=parseInt(e,10);return!isNaN(a)&&r(a)?a:t},t.getKeyword=s,t.getMeasurement=o,t.getRatio=function(e){if(!e)return{num:1,den:1};const t=e.trim().split(/\s*:\s*/).map((e=>parseFloat(e))).filter((e=>!isNaN(e)));if(1===t.length&&t.push(1),0===t.length)return{num:1,den:1};const[r,a]=t;return{num:r,den:a}},t.getRelevant=function(e){return e?e.trim().split(/\s+/).map((e=>({excluded:"-"===e[0],viewname:e.substring(1)}))):[]},t.getStringOption=function(e,t){return s({data:e,defaultValue:t[0],validate:e=>t.includes(e)})},t.stripQuotes=function(e){return e.startsWith("'")||e.startsWith('"')?e.slice(1,-1):e};var a=r(2);const n={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},i=/([+-]?\d+\.?\d*)(.*)/;function s({data:e,defaultValue:t,validate:r}){return e&&r(e=e.trim())?e:t}function o(e,t="0"){if(t||="0",!e)return o(t);const r=e.trim().match(i);if(!r)return o(t);const[,a,s]=r,c=parseFloat(a);if(isNaN(c))return o(t);if(0===c)return 0;const l=n[s];return l?l(c):c}class c{static get FAILURE(){return(0,a.shadow)(this,"FAILURE",new c(!1,null,null,null))}static get EMPTY(){return(0,a.shadow)(this,"EMPTY",new c(!0,null,null,null))}constructor(e,t,r,a){this.success=e,this.html=t,this.bbox=r,this.breakNode=a}isBreak(){return!!this.breakNode}static breakNode(e){return new c(!1,null,null,e)}static success(e,t=null){return new c(!0,e,t,null)}}t.HTMLResult=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontFinder=void 0,t.getMetrics=function(e,t=!1){let r=null;if(e){const t=(0,n.stripQuotes)(e.typeface),i=e[a.$globalData].fontFinder.find(t);r=s(e,i)}if(!r)return{lineHeight:12,lineGap:2,lineNoGap:10};const i=e.size||10,o=r.lineHeight?Math.max(t?0:1.2,r.lineHeight):1.2,c=void 0===r.lineGap?.2:r.lineGap;return{lineHeight:o*i,lineGap:c*i,lineNoGap:Math.max(1,o-c)*i}},t.selectFont=s;var a=r(78),n=r(84),i=r(2);function s(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}t.FontFinder=class{constructor(e){this.fonts=new Map,this.cache=new Map,this.warned=new Set,this.defaultFont=null,this.add(e)}add(e,t=null){for(const t of e)this.addPdfFont(t);for(const e of this.fonts.values())e.regular||(e.regular=e.italic||e.bold||e.bolditalic);if(!t||0===t.size)return;const r=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const e of t)this.fonts.set(e,r)}addPdfFont(e){const t=e.cssFontInfo,r=t.fontFamily;let a=this.fonts.get(r);a||(a=Object.create(null),this.fonts.set(r,a),this.defaultFont||(this.defaultFont=a));let n="";const i=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?n=i>=700?"bolditalic":"italic":i>=700&&(n="bold"),n||((e.name.includes("Bold")||e.psName?.includes("Bold"))&&(n="bold"),(e.name.includes("Italic")||e.name.endsWith("It")||e.psName?.includes("Italic")||e.psName?.endsWith("It"))&&(n+="italic")),n||(n="regular"),a[n]=e}getDefault(){return this.defaultFont}find(e,t=!0){let r=this.fonts.get(e)||this.cache.get(e);if(r)return r;const a=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let n=e.replaceAll(a,"");if(r=this.fonts.get(n),r)return this.cache.set(e,r),r;n=n.toLowerCase();const s=[];for(const[e,t]of this.fonts.entries())e.replaceAll(a,"").toLowerCase().startsWith(n)&&s.push(t);if(0===s.length)for(const[,e]of this.fonts.entries())e.regular.name?.replaceAll(a,"").toLowerCase().startsWith(n)&&s.push(e);if(0===s.length){n=n.replaceAll(/psmt|mt/gi,"");for(const[e,t]of this.fonts.entries())e.replaceAll(a,"").toLowerCase().startsWith(n)&&s.push(t)}if(0===s.length)for(const e of this.fonts.values())e.regular.name?.replaceAll(a,"").toLowerCase().startsWith(n)&&s.push(e);return s.length>=1?(1!==s.length&&t&&(0,i.warn)(`XFA - Too many choices to guess the correct font: ${e}`),this.cache.set(e,s[0]),s[0]):(t&&!this.warned.has(e)&&(this.warned.add(e),(0,i.warn)(`XFA - Cannot find the font: ${e}`)),null)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextMeasure=void 0;var a=r(85);class n{constructor(e,t,r,n){if(this.lineHeight=r,this.paraMargin=t||{top:0,bottom:0,left:0,right:0},!e)return void([this.pdfFont,this.xfaFont]=this.defaultFont(n));this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing:e.letterSpacing};const i=n.find(e.typeface);i?(this.pdfFont=(0,a.selectFont)(e,i),this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(n))):[this.pdfFont,this.xfaFont]=this.defaultFont(n)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!1)||e.getDefault();if(t?.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"normal",size:10,letterSpacing:0}]}}class i{constructor(e,t,r,a){this.fontFinder=a,this.stack=[new n(e,t,r,a)]}pushData(e,t,r){const a=this.stack.at(-1);for(const t of["typeface","posture","weight","size","letterSpacing"])e[t]||(e[t]=a.xfaFont[t]);for(const e of["top","bottom","left","right"])isNaN(t[e])&&(t[e]=a.paraMargin[e]);const i=new n(e,t,r||a.lineHeight,this.fontFinder);i.pdfFont||(i.pdfFont=a.pdfFont),this.stack.push(i)}popFont(){this.stack.pop()}topFont(){return this.stack.at(-1)}}t.TextMeasure=class{constructor(e,t,r,a){this.glyphs=[],this.fontSelector=new i(e,t,r,a),this.extraHeight=0}pushData(e,t,r){this.fontSelector.pushData(e,t,r)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extraHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),r=t.xfaFont.size;if(t.pdfFont){const a=t.xfaFont.letterSpacing,n=t.pdfFont,i=n.lineHeight||1.2,s=t.lineHeight||Math.max(1.2,i)*r,o=i-(void 0===n.lineGap?.2:n.lineGap),c=Math.max(1,o)*r,l=r/1e3,h=n.defaultWidth||n.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\u2029\n]/)){const e=n.encodeString(t).join(""),r=n.charsToGlyphs(e);for(const e of r){const t=e.width||h;this.glyphs.push([t*l+a,s,c,e.unicode,!1])}this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}else{for(const t of e.split(/[\u2029\n]/)){for(const e of t.split(""))this.glyphs.push([r,1.2*r,r,e,!1]);this.glyphs.push([0,0,0,"\n",!0])}this.glyphs.pop()}}compute(e){let t=-1,r=0,a=0,n=0,i=0,s=0,o=!1,c=!0;for(let l=0,h=this.glyphs.length;l<h;l++){const[h,u,d,f,p]=this.glyphs[l],g=" "===f,m=c?d:u;p?(a=Math.max(a,i),i=0,n+=s,s=m,t=-1,r=0,c=!1):g?i+h>e?(a=Math.max(a,i),i=0,n+=s,s=m,t=-1,r=0,o=!0,c=!1):(s=Math.max(m,s),r=i,i+=h,t=l):i+h>e?(n+=s,s=m,-1!==t?(l=t,a=Math.max(a,r),i=0,t=-1,r=0):(a=Math.max(a,i),i=h),o=!0,c=!1):(i+=h,s=Math.max(m,s))}return a=Math.max(a,i),n+=s+this.extraHeight,{width:1.02*a,height:n,isBroken:o}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XmlObject=t.XFAObjectArray=t.XFAObject=t.XFAAttribute=t.StringObject=t.OptionObject=t.Option10=t.Option01=t.IntegerObject=t.ContentObject=void 0;var a=r(78),n=r(84),i=r(2),s=r(3),o=r(81),c=r(88);const l=Symbol(),h=Symbol(),u=Symbol(),d=Symbol("_children"),f=Symbol(),p=Symbol(),g=Symbol(),m=Symbol(),b=Symbol(),y=Symbol(),v=Symbol(),w=Symbol(),A=Symbol(),S=Symbol("parent"),x=Symbol(),k=Symbol(),C=Symbol();let _=0;const T=o.NamespaceIds.datasets.id;class E{constructor(e,t,r=!1){this[a.$namespaceId]=e,this[a.$nodeName]=t,this[v]=r,this[S]=null,this[d]=[],this[a.$uid]=`${t}${_++}`,this[a.$globalData]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(e){let t=this,r=null;for(const{name:n,index:i}of e){for(let e=0,s=isFinite(i)?i:0;e<=s;e++){const e=t[a.$namespaceId]===T?-1:t[a.$namespaceId];r=new P(e,n),t[a.$appendChild](r)}t=r}return r}[a.$onChild](e){if(!this[v]||!this[a.$onChildCheck](e))return!1;const t=e[a.$nodeName],r=this[t];if(!(r instanceof O))return null!==r&&this[a.$removeChild](r),this[t]=e,this[a.$appendChild](e),!0;if(r.push(e))return this[a.$appendChild](e),!0;let n="";return this.id?n=` (id: ${this.id})`:this.name&&(n=` (name: ${this.name} ${this.h.value})`),(0,i.warn)(`XFA - node "${this[a.$nodeName]}"${n} has already enough "${t}"!`),!1}[a.$onChildCheck](e){return this.hasOwnProperty(e[a.$nodeName])&&e[a.$namespaceId]===this[a.$namespaceId]}[a.$isNsAgnostic](){return!1}[a.$acceptWhitespace](){return!1}[a.$isCDATAXml](){return!1}[a.$isBindable](){return!1}[a.$popPara](){this.para&&this[a.$getTemplateRoot]()[a.$extra].paraStack.pop()}[a.$pushPara](){this[a.$getTemplateRoot]()[a.$extra].paraStack.push(this.para)}[a.$setId](e){this.id&&this[a.$namespaceId]===o.NamespaceIds.template.id&&e.set(this.id,this)}[a.$getTemplateRoot](){return this[a.$globalData].template}[a.$isSplittable](){return!1}[a.$isThereMoreWidth](){return!1}[a.$appendChild](e){e[S]=this,this[d].push(e),!e[a.$globalData]&&this[a.$globalData]&&(e[a.$globalData]=this[a.$globalData])}[a.$removeChild](e){const t=this[d].indexOf(e);this[d].splice(t,1)}[a.$hasSettableValue](){return this.hasOwnProperty("value")}[a.$setValue](e){}[a.$onText](e){}[a.$finalize](){}[a.$clean](e){delete this[v],this[a.$cleanup]&&(e.clean(this[a.$cleanup]),delete this[a.$cleanup])}[a.$indexOf](e){return this[d].indexOf(e)}[a.$insertAt](e,t){t[S]=this,this[d].splice(e,0,t),!t[a.$globalData]&&this[a.$globalData]&&(t[a.$globalData]=this[a.$globalData])}[a.$isTransparent](){return!this.name}[a.$lastAttribute](){return""}[a.$text](){return 0===this[d].length?this[a.$content]:this[d].map((e=>e[a.$text]())).join("")}get[u](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this[e]instanceof E||this[e]instanceof O)break;t.add(e)}}return(0,i.shadow)(this,u,e._attributes)}[a.$isDescendent](e){let t=this;for(;t;){if(t===e)return!0;t=t[a.$getParent]()}return!1}[a.$getParent](){return this[S]}[a.$getSubformParent](){return this[a.$getParent]()}[a.$getChildren](e=null){return e?this[e]:this[d]}[a.$dump](){const e=Object.create(null);this[a.$content]&&(e.$content=this[a.$content]);for(const t of Object.getOwnPropertyNames(this)){const r=this[t];null!==r&&(r instanceof E?e[t]=r[a.$dump]():r instanceof O?r.isEmpty()||(e[t]=r.dump()):e[t]=r)}return e}[a.$toStyle](){return null}[a.$toHTML](){return n.HTMLResult.EMPTY}*[a.$getContainedChildren](){for(const e of this[a.$getChildren]())yield e}*[m](e,t){for(const r of this[a.$getContainedChildren]())if(!e||t===e.has(r[a.$nodeName])){const e=this[a.$getAvailableSpace](),t=r[a.$toHTML](e);t.success||(this[a.$extra].failingNode=r),yield t}}[a.$flushHTML](){return null}[a.$addHTML](e,t){this[a.$extra].children.push(e)}[a.$getAvailableSpace](){}[a.$childrenToHTML]({filter:e=null,include:t=!0}){if(this[a.$extra].generator){const e=this[a.$getAvailableSpace](),t=this[a.$extra].failingNode[a.$toHTML](e);if(!t.success)return t;t.html&&this[a.$addHTML](t.html,t.bbox),delete this[a.$extra].failingNode}else this[a.$extra].generator=this[m](e,t);for(;;){const e=this[a.$extra].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[a.$addHTML](t.html,t.bbox)}return this[a.$extra].generator=null,n.HTMLResult.EMPTY}[a.$setSetAttributes](e){this[k]=new Set(Object.keys(e))}[y](e){const t=this[u],r=this[k];return[...e].filter((e=>t.has(e)&&!r.has(e)))}[a.$resolvePrototypes](e,t=new Set){for(const r of this[d])r[x](e,t)}[x](e,t){const r=this[b](e,t);r?this[l](r,e,t):this[a.$resolvePrototypes](e,t)}[b](e,t){const{use:r,usehref:n}=this;if(!r&&!n)return null;let s=null,o=null,h=null,u=r;if(n?(u=n,n.startsWith("#som(")&&n.endsWith(")")?o=n.slice(5,-1):n.startsWith(".#som(")&&n.endsWith(")")?o=n.slice(6,-1):n.startsWith("#")?h=n.slice(1):n.startsWith(".#")&&(h=n.slice(2))):r.startsWith("#")?h=r.slice(1):o=r,this.use=this.usehref="",h?s=e.get(h):(s=(0,c.searchNode)(e.get(a.$root),this,o,!0,!1),s&&(s=s[0])),!s)return(0,i.warn)(`XFA - Invalid prototype reference: ${u}.`),null;if(s[a.$nodeName]!==this[a.$nodeName])return(0,i.warn)(`XFA - Incompatible prototype: ${s[a.$nodeName]} !== ${this[a.$nodeName]}.`),null;if(t.has(s))return(0,i.warn)("XFA - Cycle detected in prototypes use."),null;t.add(s);const d=s[b](e,t);return d&&s[l](d,e,t),s[a.$resolvePrototypes](e,t),t.delete(s),s}[l](e,t,r){if(r.has(e))(0,i.warn)("XFA - Cycle detected in prototypes use.");else{!this[a.$content]&&e[a.$content]&&(this[a.$content]=e[a.$content]),new Set(r).add(e);for(const t of this[y](e[k]))this[t]=e[t],this[k]&&this[k].add(t);for(const n of Object.getOwnPropertyNames(this)){if(this[u].has(n))continue;const i=this[n],s=e[n];if(i instanceof O){for(const e of i[d])e[x](t,r);for(let n=i[d].length,o=s[d].length;n<o;n++){const s=e[d][n][a.$clone]();if(!i.push(s))break;s[S]=this,this[d].push(s),s[x](t,r)}}else if(null===i){if(null!==s){const e=s[a.$clone]();e[S]=this,this[n]=e,this[d].push(e),e[x](t,r)}}else i[a.$resolvePrototypes](t,r),s&&i[l](s,t,r)}}}static[f](e){return Array.isArray(e)?e.map((e=>E[f](e))):"object"==typeof e&&null!==e?Object.assign({},e):e}[a.$clone](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Object.getOwnPropertySymbols(this))try{e[t]=this[t]}catch{(0,i.shadow)(e,t,this[t])}e[a.$uid]=`${e[a.$nodeName]}${_++}`,e[d]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[u].has(t)){e[t]=E[f](this[t]);continue}const r=this[t];e[t]=r instanceof O?new O(r[w]):null}for(const t of this[d]){const r=t[a.$nodeName],n=t[a.$clone]();e[d].push(n),n[S]=e,null===e[r]?e[r]=n:e[r][d].push(n)}return e}[a.$getChildren](e=null){return e?this[d].filter((t=>t[a.$nodeName]===e)):this[d]}[a.$getChildrenByClass](e){return this[e]}[a.$getChildrenByName](e,t,r=!0){return Array.from(this[a.$getChildrenByNameIt](e,t,r))}*[a.$getChildrenByNameIt](e,t,r=!0){if("parent"!==e){for(const r of this[d])r[a.$nodeName]===e&&(yield r),r.name===e&&(yield r),(t||r[a.$isTransparent]())&&(yield*r[a.$getChildrenByNameIt](e,t,!1));r&&this[u].has(e)&&(yield new F(this,e,this[e]))}else yield this[S]}}t.XFAObject=E;class O{constructor(e=1/0){this[w]=e,this[d]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(e){return this[d].length<=this[w]?(this[d].push(e),!0):((0,i.warn)(`XFA - node "${e[a.$nodeName]}" accepts no more than ${this[w]} children`),!1)}isEmpty(){return 0===this[d].length}dump(){return 1===this[d].length?this[d][0][a.$dump]():this[d].map((e=>e[a.$dump]()))}[a.$clone](){const e=new O(this[w]);return e[d]=this[d].map((e=>e[a.$clone]())),e}get children(){return this[d]}clear(){this[d].length=0}}t.XFAObjectArray=O;class F{constructor(e,t,r){this[S]=e,this[a.$nodeName]=t,this[a.$content]=r,this[a.$consumed]=!1,this[a.$uid]="attribute"+_++}[a.$getParent](){return this[S]}[a.$isDataValue](){return!0}[a.$getDataValue](){return this[a.$content].trim()}[a.$setValue](e){e=e.value||"",this[a.$content]=e.toString()}[a.$text](){return this[a.$content]}[a.$isDescendent](e){return this[S]===e||this[S][a.$isDescendent](e)}}t.XFAAttribute=F;class P extends E{constructor(e,t,r={}){if(super(e,t),this[a.$content]="",this[p]=null,"#text"!==t){const e=new Map;this[h]=e;for(const[t,a]of Object.entries(r))e.set(t,new F(this,t,a));if(r.hasOwnProperty(a.$nsAttributes)){const e=r[a.$nsAttributes].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[p]=!1:"dataValue"===e&&(this[p]=!0))}}this[a.$consumed]=!1}[a.$toString](e){const t=this[a.$nodeName];if("#text"===t)return void e.push((0,s.encodeToXmlString)(this[a.$content]));const r=(0,i.utf8StringToString)(t),n=this[a.$namespaceId]===T?"xfa:":"";e.push(`<${n}${r}`);for(const[t,r]of this[h].entries()){const n=(0,i.utf8StringToString)(t);e.push(` ${n}="${(0,s.encodeToXmlString)(r[a.$content])}"`)}if(null!==this[p]&&(this[p]?e.push(' xfa:dataNode="dataValue"'):e.push(' xfa:dataNode="dataGroup"')),this[a.$content]||0!==this[d].length){if(e.push(">"),this[a.$content])"string"==typeof this[a.$content]?e.push((0,s.encodeToXmlString)(this[a.$content])):this[a.$content][a.$toString](e);else for(const t of this[d])t[a.$toString](e);e.push(`</${n}${r}>`)}else e.push("/>")}[a.$onChild](e){if(this[a.$content]){const e=new P(this[a.$namespaceId],"#text");this[a.$appendChild](e),e[a.$content]=this[a.$content],this[a.$content]=""}return this[a.$appendChild](e),!0}[a.$onText](e){this[a.$content]+=e}[a.$finalize](){if(this[a.$content]&&this[d].length>0){const e=new P(this[a.$namespaceId],"#text");this[a.$appendChild](e),e[a.$content]=this[a.$content],delete this[a.$content]}}[a.$toHTML](){return"#text"===this[a.$nodeName]?n.HTMLResult.success({name:"#text",value:this[a.$content]}):n.HTMLResult.EMPTY}[a.$getChildren](e=null){return e?this[d].filter((t=>t[a.$nodeName]===e)):this[d]}[a.$getAttributes](){return this[h]}[a.$getChildrenByClass](e){const t=this[h].get(e);return void 0!==t?t:this[a.$getChildren](e)}*[a.$getChildrenByNameIt](e,t){const r=this[h].get(e);r&&(yield r);for(const r of this[d])r[a.$nodeName]===e&&(yield r),t&&(yield*r[a.$getChildrenByNameIt](e,t))}*[a.$getAttributeIt](e,t){const r=this[h].get(e);!r||t&&r[a.$consumed]||(yield r);for(const r of this[d])yield*r[a.$getAttributeIt](e,t)}*[a.$getRealChildrenByNameIt](e,t,r){for(const n of this[d])n[a.$nodeName]!==e||r&&n[a.$consumed]||(yield n),t&&(yield*n[a.$getRealChildrenByNameIt](e,t,r))}[a.$isDataValue](){return null===this[p]?0===this[d].length||this[d][0][a.$namespaceId]===o.NamespaceIds.xhtml.id:this[p]}[a.$getDataValue](){return null===this[p]?0===this[d].length?this[a.$content].trim():this[d][0][a.$namespaceId]===o.NamespaceIds.xhtml.id?this[d][0][a.$text]().trim():null:this[a.$content].trim()}[a.$setValue](e){e=e.value||"",this[a.$content]=e.toString()}[a.$dump](e=!1){const t=Object.create(null);e&&(t.$ns=this[a.$namespaceId]),this[a.$content]&&(t.$content=this[a.$content]),t.$name=this[a.$nodeName],t.children=[];for(const r of this[d])t.children.push(r[a.$dump](e));t.attributes=Object.create(null);for(const[e,r]of this[h])t.attributes[e]=r[a.$content];return t}}t.XmlObject=P;class I extends E{constructor(e,t){super(e,t),this[a.$content]=""}[a.$onText](e){this[a.$content]+=e}[a.$finalize](){}}t.ContentObject=I;class M extends I{constructor(e,t,r){super(e,t),this[A]=r}[a.$finalize](){this[a.$content]=(0,n.getKeyword)({data:this[a.$content],defaultValue:this[A][0],validate:e=>this[A].includes(e)})}[a.$clean](e){super[a.$clean](e),delete this[A]}}t.OptionObject=M;class R extends I{[a.$finalize](){this[a.$content]=this[a.$content].trim()}}t.StringObject=R;class D extends I{constructor(e,t,r,a){super(e,t),this[g]=r,this[C]=a}[a.$finalize](){this[a.$content]=(0,n.getInteger)({data:this[a.$content],defaultValue:this[g],validate:this[C]})}[a.$clean](e){super[a.$clean](e),delete this[g],delete this[C]}}t.IntegerObject=D,t.Option01=class extends D{constructor(e,t){super(e,t,0,(e=>1===e))}},t.Option10=class extends D{constructor(e,t){super(e,t,1,(e=>0===e))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createDataNode=function(e,t,r){const i=h(r);if(!i)return null;if(i.some((e=>e.operator===o.dotDot)))return null;const s=c.get(i[0].name);let l=0;s?(e=s(e,t),l=1):e=t||e;for(let t=i.length;l<t;l++){const{name:t,operator:r,index:s}=i[l];if(!isFinite(s))return i[l].index=0,e.createNodes(i.slice(l));let c;switch(r){case o.dot:c=e[a.$getChildrenByName](t,!1);break;case o.dotDot:c=e[a.$getChildrenByName](t,!0);break;case o.dotHash:c=e[a.$getChildrenByClass](t),c=c.isXFAObjectArray?c.children:[c]}if(0===c.length)return e.createNodes(i.slice(l));if(!(s<c.length))return i[l].index=s-c.length,e.createNodes(i.slice(l));{const t=c[s];if(!t.isXFAObject)return(0,n.warn)("XFA - Cannot create a node."),null;e=t}}return null},t.searchNode=function(e,t,r,n=!0,i=!0){const s=h(r,n);if(!s)return null;const u=c.get(s[0].name);let d,f=0;u?(d=!0,e=[u(e,t)],f=1):(d=null===t,e=[t||e]);for(let r=s.length;f<r;f++){const{name:r,cacheName:n,operator:c,index:h}=s[f],u=[];for(const t of e){if(!t.isXFAObject)continue;let e,s;if(i&&(s=l.get(t),s||(s=new Map,l.set(t,s)),e=s.get(n)),!e){switch(c){case o.dot:e=t[a.$getChildrenByName](r,!1);break;case o.dotDot:e=t[a.$getChildrenByName](r,!0);break;case o.dotHash:e=t[a.$getChildrenByClass](r),e=e.isXFAObjectArray?e.children:[e]}i&&s.set(n,e)}e.length>0&&u.push(e)}if(0!==u.length||d||0!==f)e=isFinite(h)?u.filter((e=>h<e.length)).map((e=>e[h])):u.flat();else{const r=t[a.$getParent]();if(!(t=r))return null;f=-1,e=[t]}}return 0===e.length?null:e};var a=r(78),n=r(2);const i=/^[^.[]+/,s=/^[^\]]+/,o={dot:0,dotDot:1,dotHash:2,dotBracket:3,dotParen:4},c=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[a.$getChildren]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),l=new WeakMap;function h(e,t,r=!0){let a=e.match(i);if(!a)return null;let[c]=a;const l=[{name:c,cacheName:"."+c,index:0,js:null,formCalc:null,operator:o.dot}];let h=c.length;for(;h<e.length;){const d=h;if("["===e.charAt(h++)){if(a=e.slice(h).match(s),!a)return(0,n.warn)("XFA - Invalid index in SOM expression"),null;l.at(-1).index="*"===(u=(u=a[0]).trim())?1/0:parseInt(u,10)||0,h+=a[0].length+1;continue}let f;switch(e.charAt(h)){case".":if(!t)return null;h++,f=o.dotDot;break;case"#":h++,f=o.dotHash;break;case"[":if(r)return(0,n.warn)("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."),null;f=o.dotBracket;break;case"(":if(r)return(0,n.warn)("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."),null;f=o.dotParen;break;default:f=o.dot}if(a=e.slice(h).match(i),!a)break;[c]=a,h+=c.length,l.push({name:c,cacheName:e.slice(d,h),operator:f,index:0,js:null,formCalc:null})}var u;return l}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataHandler=void 0;var a=r(78);t.DataHandler=class{constructor(e,t){this.data=t,this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[a.$getChildren]()]];for(;t.length>0;){const r=t.at(-1),[n,i]=r;if(n+1===i.length){t.pop();continue}const s=i[++r[0]],o=e.get(s[a.$uid]);if(o)s[a.$setValue](o);else{const t=s[a.$getAttributes]();for(const r of t.values()){const t=e.get(r[a.$uid]);if(t){r[a.$setValue](t);break}}}const c=s[a.$getChildren]();c.length>0&&t.push([-1,c])}const r=['<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">'];if(this.dataset)for(const e of this.dataset[a.$getChildren]())"data"!==e[a.$nodeName]&&e[a.$toString](r);return this.data[a.$toString](r),r.push("</xfa:datasets>"),r.join("")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XFAParser=void 0;var a=r(78),n=r(71),i=r(91),s=r(2);class o extends n.XMLParserBase{constructor(e=null,t=!1){super(),this._builder=new i.Builder(e),this._stack=[],this._globalData={usedTypefaces:new Set},this._ids=new Map,this._current=this._builder.buildRoot(this._ids),this._errorCode=n.XMLParserErrorCode.NoError,this._whiteRegex=/^\s+$/,this._nbsps=/\xa0+/g,this._richText=t}parse(e){if(this.parseXml(e),this._errorCode===n.XMLParserErrorCode.NoError)return this._current[a.$finalize](),this._current.element}onText(e){e=e.replace(this._nbsps,(e=>e.slice(1)+" ")),this._richText||this._current[a.$acceptWhitespace]()?this._current[a.$onText](e,this._richText):this._whiteRegex.test(e)||this._current[a.$onText](e.trim())}onCdata(e){this._current[a.$onText](e)}_mkAttributes(e,t){let r=null,n=null;const i=Object.create({});for(const{name:o,value:c}of e)if("xmlns"===o)r?(0,s.warn)(`XFA - multiple namespace definition in <${t}>`):r=c;else if(o.startsWith("xmlns:")){const e=o.substring(6);n||(n=[]),n.push({prefix:e,value:c})}else{const e=o.indexOf(":");if(-1===e)i[o]=c;else{let t=i[a.$nsAttributes];t||(t=i[a.$nsAttributes]=Object.create(null));const[r,n]=[o.slice(0,e),o.slice(e+1)];(t[r]||=Object.create(null))[n]=c}}return[r,n,i]}_getNameAndPrefix(e,t){const r=e.indexOf(":");return-1===r?[e,null]:[e.substring(r+1),t?"":e.substring(0,r)]}onBeginElement(e,t,r){const[n,i,s]=this._mkAttributes(t,e),[o,c]=this._getNameAndPrefix(e,this._builder.isNsAgnostic()),l=this._builder.build({nsPrefix:c,name:o,attributes:s,namespace:n,prefixes:i});if(l[a.$globalData]=this._globalData,r)return l[a.$finalize](),this._current[a.$onChild](l)&&l[a.$setId](this._ids),void l[a.$clean](this._builder);this._stack.push(this._current),this._current=l}onEndElement(e){const t=this._current;if(t[a.$isCDATAXml]()&&"string"==typeof t[a.$content]){const e=new o;e._globalData=this._globalData;const r=e.parse(t[a.$content]);t[a.$content]=null,t[a.$onChild](r)}t[a.$finalize](),this._current=this._stack.pop(),this._current[a.$onChild](t)&&t[a.$setId](this._ids),t[a.$clean](this._builder)}onError(e){this._errorCode=e}}t.XFAParser=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;var a=r(81),n=r(78),i=r(92),s=r(80),o=r(101),c=r(2),l=r(87);class h extends l.XFAObject{constructor(e){super(-1,"root",Object.create(null)),this.element=null,this[n.$ids]=e}[n.$onChild](e){return this.element=e,!0}[n.$finalize](){super[n.$finalize](),this.element.template instanceof s.Template&&(this[n.$ids].set(n.$root,this.element),this.element.template[n.$resolvePrototypes](this[n.$ids]),this.element.template[n.$ids]=this[n.$ids])}}class u extends l.XFAObject{constructor(){super(-1,"",Object.create(null))}[n.$onChild](e){return!1}}t.Builder=class{constructor(e=null){this._namespaceStack=[],this._nsAgnosticLevel=0,this._namespacePrefixes=new Map,this._namespaces=new Map,this._nextNsId=Math.max(...Object.values(a.NamespaceIds).map((({id:e})=>e))),this._currentNamespace=e||new o.UnknownNamespace(++this._nextNsId)}buildRoot(e){return new h(e)}build({nsPrefix:e,name:t,attributes:r,namespace:s,prefixes:o}){const c=null!==s;if(c&&(this._namespaceStack.push(this._currentNamespace),this._currentNamespace=this._searchNamespace(s)),o&&this._addNamespacePrefix(o),r.hasOwnProperty(n.$nsAttributes)){const e=i.NamespaceSetUp.datasets,t=r[n.$nsAttributes];let a=null;for(const[r,n]of Object.entries(t))if(this._getNamespaceToUse(r)===e){a={xfa:n};break}a?r[n.$nsAttributes]=a:delete r[n.$nsAttributes]}const l=this._getNamespaceToUse(e),h=l?.[a.$buildXFAObject](t,r)||new u;return h[n.$isNsAgnostic]()&&this._nsAgnosticLevel++,(c||o||h[n.$isNsAgnostic]())&&(h[n.$cleanup]={hasNamespace:c,prefixes:o,nsAgnostic:h[n.$isNsAgnostic]()}),h}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[r,{check:n}]of Object.entries(a.NamespaceIds))if(n(e)){if(t=i.NamespaceSetUp[r],t)return this._namespaces.set(e,t),t;break}return t=new o.UnknownNamespace(++this._nextNsId),this._namespaces.set(e,t),t}_addNamespacePrefix(e){for(const{prefix:t,value:r}of e){const e=this._searchNamespace(r);let a=this._namespacePrefixes.get(t);a||(a=[],this._namespacePrefixes.set(t,a)),a.push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);return t?.length>0?t.at(-1):((0,c.warn)(`Unknown namespace prefix: ${e}.`),null)}clean(e){const{hasNamespace:t,prefixes:r,nsAgnostic:a}=e;t&&(this._currentNamespace=this._namespaceStack.pop()),r&&r.forEach((({prefix:e})=>{this._namespacePrefixes.get(e).pop()})),a&&this._nsAgnosticLevel--}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NamespaceSetUp=void 0;var a=r(93),n=r(94),i=r(95),s=r(96),o=r(97),c=r(98),l=r(80),h=r(99),u=r(100);const d={config:a.ConfigNamespace,connection:n.ConnectionSetNamespace,datasets:i.DatasetsNamespace,localeSet:s.LocaleSetNamespace,signature:o.SignatureNamespace,stylesheet:c.StylesheetNamespace,template:l.TemplateNamespace,xdp:h.XdpNamespace,xhtml:u.XhtmlNamespace};t.NamespaceSetUp=d},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigNamespace=void 0;var a=r(81),n=r(78),i=r(87),s=r(84),o=r(2);const c=a.NamespaceIds.config.id;class l extends i.XFAObject{constructor(e){super(c,"acrobat",!0),this.acrobat7=null,this.autoSave=null,this.common=null,this.validate=null,this.validateApprovalSignatures=null,this.submitUrl=new i.XFAObjectArray}}class h extends i.XFAObject{constructor(e){super(c,"acrobat7",!0),this.dynamicRender=null}}class u extends i.OptionObject{constructor(e){super(c,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class d extends i.OptionObject{constructor(e){super(c,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class f extends i.Option01{constructor(e){super(c,"addSilentPrint")}}class p extends i.Option01{constructor(e){super(c,"addViewerPreferences")}}class g extends i.Option10{constructor(e){super(c,"adjustData")}}class m extends i.IntegerObject{constructor(e){super(c,"adobeExtensionLevel",0,(e=>e>=1&&e<=8))}}class b extends i.XFAObject{constructor(e){super(c,"agent",!0),this.name=e.name?e.name.trim():"",this.common=new i.XFAObjectArray}}class y extends i.ContentObject{constructor(e){super(c,"alwaysEmbed")}}class v extends i.StringObject{constructor(e){super(c,"amd")}}class w extends i.XFAObject{constructor(e){super(c,"area"),this.level=(0,s.getInteger)({data:e.level,defaultValue:0,validate:e=>e>=1&&e<=3}),this.name=(0,s.getStringOption)(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class A extends i.OptionObject{constructor(e){super(c,"attributes",["preserve","delegate","ignore"])}}class S extends i.OptionObject{constructor(e){super(c,"autoSave",["disabled","enabled"])}}class x extends i.StringObject{constructor(e){super(c,"base")}}class k extends i.XFAObject{constructor(e){super(c,"batchOutput"),this.format=(0,s.getStringOption)(e.format,["none","concat","zip","zipCompress"])}}class C extends i.ContentObject{constructor(e){super(c,"behaviorOverride")}[n.$finalize](){this[n.$content]=new Map(this[n.$content].trim().split(/\s+/).filter((e=>e.includes(":"))).map((e=>e.split(":",2))))}}class _ extends i.XFAObject{constructor(e){super(c,"cache",!0),this.templateCache=null}}class T extends i.Option01{constructor(e){super(c,"change")}}class E extends i.XFAObject{constructor(e){super(c,"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 i.XFAObjectArray}}class O extends i.XFAObject{constructor(e){super(c,"compress"),this.scope=(0,s.getStringOption)(e.scope,["imageOnly","document"])}}class F extends i.Option01{constructor(e){super(c,"compressLogicalStructure")}}class P extends i.Option10{constructor(e){super(c,"compressObjectStream")}}class I extends i.XFAObject{constructor(e){super(c,"compression",!0),this.compressLogicalStructure=null,this.compressObjectStream=null,this.level=null,this.type=null}}class M extends i.XFAObject{constructor(e){super(c,"config",!0),this.acrobat=null,this.present=null,this.trace=null,this.agent=new i.XFAObjectArray}}class R extends i.OptionObject{constructor(e){super(c,"conformance",["A","B"])}}class D extends i.Option01{constructor(e){super(c,"contentCopy")}}class N extends i.IntegerObject{constructor(e){super(c,"copies",1,(e=>e>=1))}}class L extends i.StringObject{constructor(e){super(c,"creator")}}class B extends i.IntegerObject{constructor(e){super(c,"currentPage",0,(e=>e>=0))}}class j extends i.XFAObject{constructor(e){super(c,"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 i.XFAObjectArray,this.transform=new i.XFAObjectArray}}class $ extends i.XFAObject{constructor(e){super(c,"debug",!0),this.uri=null}}class U extends i.ContentObject{constructor(e){super(c,"defaultTypeface"),this.writingScript=(0,s.getStringOption)(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","TraditionalChinese","Vietnamese"])}}class z extends i.OptionObject{constructor(e){super(c,"destination",["pdf","pcl","ps","webClient","zpl"])}}class H extends i.Option01{constructor(e){super(c,"documentAssembly")}}class X extends i.XFAObject{constructor(e){super(c,"driver",!0),this.name=e.name?e.name.trim():"",this.fontInfo=null,this.xdc=null}}class W extends i.OptionObject{constructor(e){super(c,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"])}}class G extends i.OptionObject{constructor(e){super(c,"dynamicRender",["forbidden","required"])}}class q extends i.Option01{constructor(e){super(c,"embed")}}class V extends i.Option01{constructor(e){super(c,"encrypt")}}class K extends i.XFAObject{constructor(e){super(c,"encryption",!0),this.encrypt=null,this.encryptionLevel=null,this.permissions=null}}class Y extends i.OptionObject{constructor(e){super(c,"encryptionLevel",["40bit","128bit"])}}class Z extends i.StringObject{constructor(e){super(c,"enforce")}}class J extends i.XFAObject{constructor(e){super(c,"equate"),this.force=(0,s.getInteger)({data:e.force,defaultValue:1,validate:e=>0===e}),this.from=e.from||"",this.to=e.to||""}}class Q extends i.XFAObject{constructor(e){super(c,"equateRange"),this.from=e.from||"",this.to=e.to||"",this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\+([0-9a-fA-F]+)/,r=this._unicodeRange;for(let a of r.split(",").map((e=>e.trim())).filter((e=>!!e)))a=a.split("-",2).map((e=>{const r=e.match(t);return r?parseInt(r[1],16):0})),1===a.length&&a.push(a[0]),e.push(a);return(0,o.shadow)(this,"unicodeRange",e)}}class ee extends i.ContentObject{constructor(e){super(c,"exclude")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s+/).filter((e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)))}}class te extends i.StringObject{constructor(e){super(c,"excludeNS")}}class re extends i.OptionObject{constructor(e){super(c,"flipLabel",["usePrinterSetting","on","off"])}}class ae extends i.XFAObject{constructor(e){super(c,"fontInfo",!0),this.embed=null,this.map=null,this.subsetBelow=null,this.alwaysEmbed=new i.XFAObjectArray,this.defaultTypeface=new i.XFAObjectArray,this.neverEmbed=new i.XFAObjectArray}}class ne extends i.Option01{constructor(e){super(c,"formFieldFilling")}}class ie extends i.StringObject{constructor(e){super(c,"groupParent")}}class se extends i.OptionObject{constructor(e){super(c,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class oe extends i.StringObject{constructor(e){super(c,"includeXDPContent")}}class ce extends i.OptionObject{constructor(e){super(c,"incrementalLoad",["none","forwardOnly"])}}class le extends i.Option01{constructor(e){super(c,"incrementalMerge")}}class he extends i.Option01{constructor(e){super(c,"interactive")}}class ue extends i.OptionObject{constructor(e){super(c,"jog",["usePrinterSetting","none","pageSet"])}}class de extends i.XFAObject{constructor(e){super(c,"labelPrinter",!0),this.name=(0,s.getStringOption)(e.name,["zpl","dpl","ipl","tcpl"]),this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class fe extends i.OptionObject{constructor(e){super(c,"layout",["paginate","panel"])}}class pe extends i.IntegerObject{constructor(e){super(c,"level",0,(e=>e>0))}}class ge extends i.Option01{constructor(e){super(c,"linearized")}}class me extends i.StringObject{constructor(e){super(c,"locale")}}class be extends i.StringObject{constructor(e){super(c,"localeSet")}}class ye extends i.XFAObject{constructor(e){super(c,"log",!0),this.mode=null,this.threshold=null,this.to=null,this.uri=null}}class ve extends i.XFAObject{constructor(e){super(c,"map",!0),this.equate=new i.XFAObjectArray,this.equateRange=new i.XFAObjectArray}}class we extends i.XFAObject{constructor(e){super(c,"mediumInfo",!0),this.map=null}}class Ae extends i.XFAObject{constructor(e){super(c,"message",!0),this.msgId=null,this.severity=null}}class Se extends i.XFAObject{constructor(e){super(c,"messaging",!0),this.message=new i.XFAObjectArray}}class xe extends i.OptionObject{constructor(e){super(c,"mode",["append","overwrite"])}}class ke extends i.Option01{constructor(e){super(c,"modifyAnnots")}}class Ce extends i.IntegerObject{constructor(e){super(c,"msgId",1,(e=>e>=1))}}class _e extends i.StringObject{constructor(e){super(c,"nameAttr")}}class Te extends i.ContentObject{constructor(e){super(c,"neverEmbed")}}class Ee extends i.IntegerObject{constructor(e){super(c,"numberOfCopies",null,(e=>e>=2&&e<=5))}}class Oe extends i.XFAObject{constructor(e){super(c,"openAction",!0),this.destination=null}}class Fe extends i.XFAObject{constructor(e){super(c,"output",!0),this.to=null,this.type=null,this.uri=null}}class Pe extends i.StringObject{constructor(e){super(c,"outputBin")}}class Ie extends i.XFAObject{constructor(e){super(c,"outputXSL",!0),this.uri=null}}class Me extends i.OptionObject{constructor(e){super(c,"overprint",["none","both","draw","field"])}}class Re extends i.StringObject{constructor(e){super(c,"packets")}[n.$finalize](){"*"!==this[n.$content]&&(this[n.$content]=this[n.$content].trim().split(/\s+/).filter((e=>["config","datasets","template","xfdf","xslt"].includes(e))))}}class De extends i.XFAObject{constructor(e){super(c,"pageOffset"),this.x=(0,s.getInteger)({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0}),this.y=(0,s.getInteger)({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class Ne extends i.StringObject{constructor(e){super(c,"pageRange")}[n.$finalize](){const e=this[n.$content].trim().split(/\s+/).map((e=>parseInt(e,10))),t=[];for(let r=0,a=e.length;r<a;r+=2)t.push(e.slice(r,r+2));this[n.$content]=t}}class Le extends i.OptionObject{constructor(e){super(c,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}class Be extends i.OptionObject{constructor(e){super(c,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class je extends i.IntegerObject{constructor(e){super(c,"part",1,(e=>!1))}}class $e extends i.XFAObject{constructor(e){super(c,"pcl",!0),this.name=e.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 Ue extends i.XFAObject{constructor(e){super(c,"pdf",!0),this.name=e.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 ze extends i.XFAObject{constructor(e){super(c,"pdfa",!0),this.amd=null,this.conformance=null,this.includeXDPContent=null,this.part=null}}class He extends i.XFAObject{constructor(e){super(c,"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 Xe extends i.Option01{constructor(e){super(c,"pickTrayByPDFSize")}}class We extends i.StringObject{constructor(e){super(c,"picture")}}class Ge extends i.Option01{constructor(e){super(c,"plaintextMetadata")}}class qe extends i.OptionObject{constructor(e){super(c,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Ve extends i.XFAObject{constructor(e){super(c,"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 i.XFAObjectArray,this.labelPrinter=new i.XFAObjectArray,this.pcl=new i.XFAObjectArray,this.pdf=new i.XFAObjectArray,this.ps=new i.XFAObjectArray,this.submitUrl=new i.XFAObjectArray,this.webClient=new i.XFAObjectArray,this.zpl=new i.XFAObjectArray}}class Ke extends i.Option01{constructor(e){super(c,"print")}}class Ye extends i.Option01{constructor(e){super(c,"printHighQuality")}}class Ze extends i.OptionObject{constructor(e){super(c,"printScaling",["appdefault","noScaling"])}}class Je extends i.StringObject{constructor(e){super(c,"printerName")}}class Qe extends i.StringObject{constructor(e){super(c,"producer")}}class et extends i.XFAObject{constructor(e){super(c,"ps",!0),this.name=e.name||"",this.batchOutput=null,this.fontInfo=null,this.jog=null,this.mediumInfo=null,this.outputBin=null,this.staple=null,this.xdc=null}}class tt extends i.ContentObject{constructor(e){super(c,"range")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s*,\s*/,2).map((e=>e.split("-").map((e=>parseInt(e.trim(),10))))).filter((e=>e.every((e=>!isNaN(e))))).map((e=>(1===e.length&&e.push(e[0]),e)))}}class rt extends i.ContentObject{constructor(e){super(c,"record")}[n.$finalize](){this[n.$content]=this[n.$content].trim();const e=parseInt(this[n.$content],10);!isNaN(e)&&e>=0&&(this[n.$content]=e)}}class at extends i.ContentObject{constructor(e){super(c,"relevant")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s+/)}}class nt extends i.ContentObject{constructor(e){super(c,"rename")}[n.$finalize](){this[n.$content]=this[n.$content].trim(),(this[n.$content].toLowerCase().startsWith("xml")||new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*","u").test(this[n.$content]))&&(0,o.warn)("XFA - Rename: invalid XFA name")}}class it extends i.OptionObject{constructor(e){super(c,"renderPolicy",["server","client"])}}class st extends i.OptionObject{constructor(e){super(c,"runScripts",["both","client","none","server"])}}class ot extends i.XFAObject{constructor(e){super(c,"script",!0),this.currentPage=null,this.exclude=null,this.runScripts=null}}class ct extends i.OptionObject{constructor(e){super(c,"scriptModel",["XFA","none"])}}class lt extends i.OptionObject{constructor(e){super(c,"severity",["ignore","error","information","trace","warning"])}}class ht extends i.XFAObject{constructor(e){super(c,"silentPrint",!0),this.addSilentPrint=null,this.printerName=null}}class ut extends i.XFAObject{constructor(e){super(c,"staple"),this.mode=(0,s.getStringOption)(e.mode,["usePrinterSetting","on","off"])}}class dt extends i.StringObject{constructor(e){super(c,"startNode")}}class ft extends i.IntegerObject{constructor(e){super(c,"startPage",0,(e=>!0))}}class pt extends i.OptionObject{constructor(e){super(c,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class gt extends i.StringObject{constructor(e){super(c,"submitUrl")}}class mt extends i.IntegerObject{constructor(e){super(c,"subsetBelow",100,(e=>e>=0&&e<=100))}}class bt extends i.Option01{constructor(e){super(c,"suppressBanner")}}class yt extends i.Option01{constructor(e){super(c,"tagged")}}class vt extends i.XFAObject{constructor(e){super(c,"template",!0),this.base=null,this.relevant=null,this.startPage=null,this.uri=null,this.xsl=null}}class wt extends i.OptionObject{constructor(e){super(c,"threshold",["trace","error","information","warning"])}}class At extends i.OptionObject{constructor(e){super(c,"to",["null","memory","stderr","stdout","system","uri"])}}class St extends i.XFAObject{constructor(e){super(c,"templateCache"),this.maxEntries=(0,s.getInteger)({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class xt extends i.XFAObject{constructor(e){super(c,"trace",!0),this.area=new i.XFAObjectArray}}class kt extends i.XFAObject{constructor(e){super(c,"transform",!0),this.groupParent=null,this.ifEmpty=null,this.nameAttr=null,this.picture=null,this.presence=null,this.rename=null,this.whitespace=null}}class Ct extends i.OptionObject{constructor(e){super(c,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class _t extends i.StringObject{constructor(e){super(c,"uri")}}class Tt extends i.OptionObject{constructor(e){super(c,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class Et extends i.ContentObject{constructor(e){super(c,"validateApprovalSignatures")}[n.$finalize](){this[n.$content]=this[n.$content].trim().split(/\s+/).filter((e=>["docReady","postSign"].includes(e)))}}class Ot extends i.OptionObject{constructor(e){super(c,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Ft extends i.OptionObject{constructor(e){super(c,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class Pt extends i.XFAObject{constructor(e){super(c,"VersionControl"),this.outputBelow=(0,s.getStringOption)(e.outputBelow,["warn","error","update"]),this.sourceAbove=(0,s.getStringOption)(e.sourceAbove,["warn","error"]),this.sourceBelow=(0,s.getStringOption)(e.sourceBelow,["update","maintain"])}}class It extends i.XFAObject{constructor(e){super(c,"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 Mt extends i.XFAObject{constructor(e){super(c,"webClient",!0),this.name=e.name?e.name.trim():"",this.fontInfo=null,this.xdc=null}}class Rt extends i.OptionObject{constructor(e){super(c,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Dt extends i.ContentObject{constructor(e){super(c,"window")}[n.$finalize](){const e=this[n.$content].trim().split(/\s*,\s*/,2).map((e=>parseInt(e,10)));e.some((e=>isNaN(e)))?this[n.$content]=[0,0]:(1===e.length&&e.push(e[0]),this[n.$content]=e)}}class Nt extends i.XFAObject{constructor(e){super(c,"xdc",!0),this.uri=new i.XFAObjectArray,this.xsl=new i.XFAObjectArray}}class Lt extends i.XFAObject{constructor(e){super(c,"xdp",!0),this.packets=null}}class Bt extends i.XFAObject{constructor(e){super(c,"xsl",!0),this.debug=null,this.uri=null}}class jt extends i.XFAObject{constructor(e){super(c,"zpl",!0),this.name=e.name?e.name.trim():"",this.batchOutput=null,this.flipLabel=null,this.fontInfo=null,this.xdc=null}}class $t{static[a.$buildXFAObject](e,t){if($t.hasOwnProperty(e))return $t[e](t)}static acrobat(e){return new l(e)}static acrobat7(e){return new h(e)}static ADBE_JSConsole(e){return new u(e)}static ADBE_JSDebugger(e){return new d(e)}static addSilentPrint(e){return new f(e)}static addViewerPreferences(e){return new p(e)}static adjustData(e){return new g(e)}static adobeExtensionLevel(e){return new m(e)}static agent(e){return new b(e)}static alwaysEmbed(e){return new y(e)}static amd(e){return new v(e)}static area(e){return new w(e)}static attributes(e){return new A(e)}static autoSave(e){return new S(e)}static base(e){return new x(e)}static batchOutput(e){return new k(e)}static behaviorOverride(e){return new C(e)}static cache(e){return new _(e)}static change(e){return new T(e)}static common(e){return new E(e)}static compress(e){return new O(e)}static compressLogicalStructure(e){return new F(e)}static compressObjectStream(e){return new P(e)}static compression(e){return new I(e)}static config(e){return new M(e)}static conformance(e){return new R(e)}static contentCopy(e){return new D(e)}static copies(e){return new N(e)}static creator(e){return new L(e)}static currentPage(e){return new B(e)}static data(e){return new j(e)}static debug(e){return new $(e)}static defaultTypeface(e){return new U(e)}static destination(e){return new z(e)}static documentAssembly(e){return new H(e)}static driver(e){return new X(e)}static duplexOption(e){return new W(e)}static dynamicRender(e){return new G(e)}static embed(e){return new q(e)}static encrypt(e){return new V(e)}static encryption(e){return new K(e)}static encryptionLevel(e){return new Y(e)}static enforce(e){return new Z(e)}static equate(e){return new J(e)}static equateRange(e){return new Q(e)}static exclude(e){return new ee(e)}static excludeNS(e){return new te(e)}static flipLabel(e){return new re(e)}static fontInfo(e){return new ae(e)}static formFieldFilling(e){return new ne(e)}static groupParent(e){return new ie(e)}static ifEmpty(e){return new se(e)}static includeXDPContent(e){return new oe(e)}static incrementalLoad(e){return new ce(e)}static incrementalMerge(e){return new le(e)}static interactive(e){return new he(e)}static jog(e){return new ue(e)}static labelPrinter(e){return new de(e)}static layout(e){return new fe(e)}static level(e){return new pe(e)}static linearized(e){return new ge(e)}static locale(e){return new me(e)}static localeSet(e){return new be(e)}static log(e){return new ye(e)}static map(e){return new ve(e)}static mediumInfo(e){return new we(e)}static message(e){return new Ae(e)}static messaging(e){return new Se(e)}static mode(e){return new xe(e)}static modifyAnnots(e){return new ke(e)}static msgId(e){return new Ce(e)}static nameAttr(e){return new _e(e)}static neverEmbed(e){return new Te(e)}static numberOfCopies(e){return new Ee(e)}static openAction(e){return new Oe(e)}static output(e){return new Fe(e)}static outputBin(e){return new Pe(e)}static outputXSL(e){return new Ie(e)}static overprint(e){return new Me(e)}static packets(e){return new Re(e)}static pageOffset(e){return new De(e)}static pageRange(e){return new Ne(e)}static pagination(e){return new Le(e)}static paginationOverride(e){return new Be(e)}static part(e){return new je(e)}static pcl(e){return new $e(e)}static pdf(e){return new Ue(e)}static pdfa(e){return new ze(e)}static permissions(e){return new He(e)}static pickTrayByPDFSize(e){return new Xe(e)}static picture(e){return new We(e)}static plaintextMetadata(e){return new Ge(e)}static presence(e){return new qe(e)}static present(e){return new Ve(e)}static print(e){return new Ke(e)}static printHighQuality(e){return new Ye(e)}static printScaling(e){return new Ze(e)}static printerName(e){return new Je(e)}static producer(e){return new Qe(e)}static ps(e){return new et(e)}static range(e){return new tt(e)}static record(e){return new rt(e)}static relevant(e){return new at(e)}static rename(e){return new nt(e)}static renderPolicy(e){return new it(e)}static runScripts(e){return new st(e)}static script(e){return new ot(e)}static scriptModel(e){return new ct(e)}static severity(e){return new lt(e)}static silentPrint(e){return new ht(e)}static staple(e){return new ut(e)}static startNode(e){return new dt(e)}static startPage(e){return new ft(e)}static submitFormat(e){return new pt(e)}static submitUrl(e){return new gt(e)}static subsetBelow(e){return new mt(e)}static suppressBanner(e){return new bt(e)}static tagged(e){return new yt(e)}static template(e){return new vt(e)}static templateCache(e){return new St(e)}static threshold(e){return new wt(e)}static to(e){return new At(e)}static trace(e){return new xt(e)}static transform(e){return new kt(e)}static type(e){return new Ct(e)}static uri(e){return new _t(e)}static validate(e){return new Tt(e)}static validateApprovalSignatures(e){return new Et(e)}static validationMessaging(e){return new Ot(e)}static version(e){return new Ft(e)}static versionControl(e){return new Pt(e)}static viewerPreferences(e){return new It(e)}static webClient(e){return new Mt(e)}static whitespace(e){return new Rt(e)}static window(e){return new Dt(e)}static xdc(e){return new Nt(e)}static xdp(e){return new Lt(e)}static xsl(e){return new Bt(e)}static zpl(e){return new jt(e)}}t.ConfigNamespace=$t},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionSetNamespace=void 0;var a=r(81),n=r(87);const i=a.NamespaceIds.connectionSet.id;class s extends n.XFAObject{constructor(e){super(i,"connectionSet",!0),this.wsdlConnection=new n.XFAObjectArray,this.xmlConnection=new n.XFAObjectArray,this.xsdConnection=new n.XFAObjectArray}}class o extends n.XFAObject{constructor(e){super(i,"effectiveInputPolicy"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class c extends n.XFAObject{constructor(e){super(i,"effectiveOutputPolicy"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class l extends n.StringObject{constructor(e){super(i,"operation"),this.id=e.id||"",this.input=e.input||"",this.name=e.name||"",this.output=e.output||"",this.use=e.use||"",this.usehref=e.usehref||""}}class h extends n.StringObject{constructor(e){super(i,"rootElement"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class u extends n.StringObject{constructor(e){super(i,"soapAction"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class d extends n.StringObject{constructor(e){super(i,"soapAddress"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class f extends n.StringObject{constructor(e){super(i,"uri"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class p extends n.StringObject{constructor(e){super(i,"wsdlAddress"),this.id=e.id||"",this.name=e.name||"",this.use=e.use||"",this.usehref=e.usehref||""}}class g extends n.XFAObject{constructor(e){super(i,"wsdlConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.effectiveInputPolicy=null,this.effectiveOutputPolicy=null,this.operation=null,this.soapAction=null,this.soapAddress=null,this.wsdlAddress=null}}class m extends n.XFAObject{constructor(e){super(i,"xmlConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.uri=null}}class b extends n.XFAObject{constructor(e){super(i,"xsdConnection",!0),this.dataDescription=e.dataDescription||"",this.name=e.name||"",this.rootElement=null,this.uri=null}}class y{static[a.$buildXFAObject](e,t){if(y.hasOwnProperty(e))return y[e](t)}static connectionSet(e){return new s(e)}static effectiveInputPolicy(e){return new o(e)}static effectiveOutputPolicy(e){return new c(e)}static operation(e){return new l(e)}static rootElement(e){return new h(e)}static soapAction(e){return new u(e)}static soapAddress(e){return new d(e)}static uri(e){return new f(e)}static wsdlAddress(e){return new p(e)}static wsdlConnection(e){return new g(e)}static xmlConnection(e){return new m(e)}static xsdConnection(e){return new b(e)}}t.ConnectionSetNamespace=y},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetsNamespace=void 0;var a=r(78),n=r(81),i=r(87);const s=n.NamespaceIds.datasets.id;class o extends i.XmlObject{constructor(e){super(s,"data",e)}[a.$isNsAgnostic](){return!0}}class c extends i.XFAObject{constructor(e){super(s,"datasets",!0),this.data=null,this.Signature=null}[a.$onChild](e){const t=e[a.$nodeName];("data"===t&&e[a.$namespaceId]===s||"Signature"===t&&e[a.$namespaceId]===n.NamespaceIds.signature.id)&&(this[t]=e),this[a.$appendChild](e)}}class l{static[n.$buildXFAObject](e,t){if(l.hasOwnProperty(e))return l[e](t)}static datasets(e){return new c(e)}static data(e){return new o(e)}}t.DatasetsNamespace=l},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocaleSetNamespace=void 0;var a=r(81),n=r(87),i=r(84);const s=a.NamespaceIds.localeSet.id;class o extends n.XFAObject{constructor(e){super(s,"calendarSymbols",!0),this.name="gregorian",this.dayNames=new n.XFAObjectArray(2),this.eraNames=null,this.meridiemNames=null,this.monthNames=new n.XFAObjectArray(2)}}class c extends n.StringObject{constructor(e){super(s,"currencySymbol"),this.name=(0,i.getStringOption)(e.name,["symbol","isoname","decimal"])}}class l extends n.XFAObject{constructor(e){super(s,"currencySymbols",!0),this.currencySymbol=new n.XFAObjectArray(3)}}class h extends n.StringObject{constructor(e){super(s,"datePattern"),this.name=(0,i.getStringOption)(e.name,["full","long","med","short"])}}class u extends n.XFAObject{constructor(e){super(s,"datePatterns",!0),this.datePattern=new n.XFAObjectArray(4)}}class d extends n.ContentObject{constructor(e){super(s,"dateTimeSymbols")}}class f extends n.StringObject{constructor(e){super(s,"day")}}class p extends n.XFAObject{constructor(e){super(s,"dayNames",!0),this.abbr=(0,i.getInteger)({data:e.abbr,defaultValue:0,validate:e=>1===e}),this.day=new n.XFAObjectArray(7)}}class g extends n.StringObject{constructor(e){super(s,"era")}}class m extends n.XFAObject{constructor(e){super(s,"eraNames",!0),this.era=new n.XFAObjectArray(2)}}class b extends n.XFAObject{constructor(e){super(s,"locale",!0),this.desc=e.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 y extends n.XFAObject{constructor(e){super(s,"localeSet",!0),this.locale=new n.XFAObjectArray}}class v extends n.StringObject{constructor(e){super(s,"meridiem")}}class w extends n.XFAObject{constructor(e){super(s,"meridiemNames",!0),this.meridiem=new n.XFAObjectArray(2)}}class A extends n.StringObject{constructor(e){super(s,"month")}}class S extends n.XFAObject{constructor(e){super(s,"monthNames",!0),this.abbr=(0,i.getInteger)({data:e.abbr,defaultValue:0,validate:e=>1===e}),this.month=new n.XFAObjectArray(12)}}class x extends n.StringObject{constructor(e){super(s,"numberPattern"),this.name=(0,i.getStringOption)(e.name,["full","long","med","short"])}}class k extends n.XFAObject{constructor(e){super(s,"numberPatterns",!0),this.numberPattern=new n.XFAObjectArray(4)}}class C extends n.StringObject{constructor(e){super(s,"numberSymbol"),this.name=(0,i.getStringOption)(e.name,["decimal","grouping","percent","minus","zero"])}}class _ extends n.XFAObject{constructor(e){super(s,"numberSymbols",!0),this.numberSymbol=new n.XFAObjectArray(5)}}class T extends n.StringObject{constructor(e){super(s,"timePattern"),this.name=(0,i.getStringOption)(e.name,["full","long","med","short"])}}class E extends n.XFAObject{constructor(e){super(s,"timePatterns",!0),this.timePattern=new n.XFAObjectArray(4)}}class O extends n.XFAObject{constructor(e){super(s,"typeFace",!0),this.name=""|e.name}}class F extends n.XFAObject{constructor(e){super(s,"typeFaces",!0),this.typeFace=new n.XFAObjectArray}}class P{static[a.$buildXFAObject](e,t){if(P.hasOwnProperty(e))return P[e](t)}static calendarSymbols(e){return new o(e)}static currencySymbol(e){return new c(e)}static currencySymbols(e){return new l(e)}static datePattern(e){return new h(e)}static datePatterns(e){return new u(e)}static dateTimeSymbols(e){return new d(e)}static day(e){return new f(e)}static dayNames(e){return new p(e)}static era(e){return new g(e)}static eraNames(e){return new m(e)}static locale(e){return new b(e)}static localeSet(e){return new y(e)}static meridiem(e){return new v(e)}static meridiemNames(e){return new w(e)}static month(e){return new A(e)}static monthNames(e){return new S(e)}static numberPattern(e){return new x(e)}static numberPatterns(e){return new k(e)}static numberSymbol(e){return new C(e)}static numberSymbols(e){return new _(e)}static timePattern(e){return new T(e)}static timePatterns(e){return new E(e)}static typeFace(e){return new O(e)}static typeFaces(e){return new F(e)}}t.LocaleSetNamespace=P},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureNamespace=void 0;var a=r(81),n=r(87);const i=a.NamespaceIds.signature.id;class s extends n.XFAObject{constructor(e){super(i,"signature",!0)}}class o{static[a.$buildXFAObject](e,t){if(o.hasOwnProperty(e))return o[e](t)}static signature(e){return new s(e)}}t.SignatureNamespace=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StylesheetNamespace=void 0;var a=r(81),n=r(87);const i=a.NamespaceIds.stylesheet.id;class s extends n.XFAObject{constructor(e){super(i,"stylesheet",!0)}}class o{static[a.$buildXFAObject](e,t){if(o.hasOwnProperty(e))return o[e](t)}static stylesheet(e){return new s(e)}}t.StylesheetNamespace=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XdpNamespace=void 0;var a=r(81),n=r(78),i=r(87);const s=a.NamespaceIds.xdp.id;class o extends i.XFAObject{constructor(e){super(s,"xdp",!0),this.uuid=e.uuid||"",this.timeStamp=e.timeStamp||"",this.config=null,this.connectionSet=null,this.datasets=null,this.localeSet=null,this.stylesheet=new i.XFAObjectArray,this.template=null}[n.$onChildCheck](e){const t=a.NamespaceIds[e[n.$nodeName]];return t&&e[n.$namespaceId]===t.id}}class c{static[a.$buildXFAObject](e,t){if(c.hasOwnProperty(e))return c[e](t)}static xdp(e){return new o(e)}}t.XdpNamespace=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XhtmlNamespace=void 0;var a=r(78),n=r(81),i=r(83),s=r(84),o=r(87);const c=n.NamespaceIds.xhtml.id,l=Symbol(),h=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"]),u=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,Math.min(parseInt(e)/100)).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>(e=t.fontSize=(0,s.getMeasurement)(e),(0,i.measureToString)(.99*e))],["letter-spacing",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["line-height",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-bottom",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-left",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-right",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["margin-top",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["text-indent",e=>(0,i.measureToString)((0,s.getMeasurement)(e))],["font-family",e=>e],["vertical-align",e=>(0,i.measureToString)((0,s.getMeasurement)(e))]]),d=/\s+/g,f=/[\r\n]+/g,p=/\r\n?/g;function g(e,t,r){const n=Object.create(null);if(!e)return n;const o=Object.create(null);for(const[t,r]of e.split(";").map((e=>e.split(":",2)))){const e=u.get(t);if(""===e)continue;let a=r;e&&(a="string"==typeof e?e:e(r,o)),t.endsWith("scale")?n.transform=n.transform?`${n[t]} ${a}`:a:n[t.replaceAll(/-([a-zA-Z])/g,((e,t)=>t.toUpperCase()))]=a}if(n.fontFamily&&(0,i.setFontFamily)({typeface:n.fontFamily,weight:n.fontWeight||"normal",posture:n.fontStyle||"normal",size:o.fontSize||0},t,t[a.$globalData].fontFinder,n),r&&n.verticalAlign&&"0px"!==n.verticalAlign&&n.fontSize){const e=.583,t=.333,r=(0,s.getMeasurement)(n.fontSize);n.fontSize=(0,i.measureToString)(r*e),n.verticalAlign=(0,i.measureToString)(Math.sign((0,s.getMeasurement)(n.verticalAlign))*r*t)}return r&&n.fontSize&&(n.fontSize=`calc(${n.fontSize} * var(--scale-factor))`),(0,i.fixTextIndent)(n),n}const m=new Set(["body","html"]);class b extends o.XmlObject{constructor(e,t){super(c,t),this[l]=!1,this.style=e.style||""}[a.$clean](e){var t;super[a.$clean](e),this.style=(t=this).style?t.style.trim().split(/\s*;\s*/).filter((e=>!!e)).map((e=>e.split(/\s*:\s*/,2))).filter((([e,r])=>("font-family"===e&&t[a.$globalData].usedTypefaces.add(r),h.has(e)))).map((e=>e.join(":"))).join(";"):""}[a.$acceptWhitespace](){return!m.has(this[a.$nodeName])}[a.$onText](e,t=!1){t?this[l]=!0:(e=e.replaceAll(f,""),this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(d," "))),e&&(this[a.$content]+=e)}[a.$pushGlyphs](e,t=!0){const r=Object.create(null),n={top:NaN,bottom:NaN,left:NaN,right:NaN};let i=null;for(const[e,t]of this.style.split(";").map((e=>e.split(":",2))))switch(e){case"font-family":r.typeface=(0,s.stripQuotes)(t);break;case"font-size":r.size=(0,s.getMeasurement)(t);break;case"font-weight":r.weight=t;break;case"font-style":r.posture=t;break;case"letter-spacing":r.letterSpacing=(0,s.getMeasurement)(t);break;case"margin":const e=t.split(/ \t/).map((e=>(0,s.getMeasurement)(e)));switch(e.length){case 1:n.top=n.bottom=n.left=n.right=e[0];break;case 2:n.top=n.bottom=e[0],n.left=n.right=e[1];break;case 3:n.top=e[0],n.bottom=e[2],n.left=n.right=e[1];break;case 4:n.top=e[0],n.left=e[1],n.bottom=e[2],n.right=e[3]}break;case"margin-top":n.top=(0,s.getMeasurement)(t);break;case"margin-bottom":n.bottom=(0,s.getMeasurement)(t);break;case"margin-left":n.left=(0,s.getMeasurement)(t);break;case"margin-right":n.right=(0,s.getMeasurement)(t);break;case"line-height":i=(0,s.getMeasurement)(t)}if(e.pushData(r,n,i),this[a.$content])e.addString(this[a.$content]);else for(const t of this[a.$getChildren]())"#text"!==t[a.$nodeName]?t[a.$pushGlyphs](e):e.addString(t[a.$content]);t&&e.popFont()}[a.$toHTML](e){const t=[];if(this[a.$extra]={children:t},this[a.$childrenToHTML]({}),0===t.length&&!this[a.$content])return s.HTMLResult.EMPTY;let r;return r=this[l]?this[a.$content]?this[a.$content].replaceAll(p,"\n"):void 0:this[a.$content]||void 0,s.HTMLResult.success({name:this[a.$nodeName],attributes:{href:this.href,style:g(this.style,this,this[l])},children:t,value:r})}}class y extends b{constructor(e){super(e,"a"),this.href=(0,i.fixURL)(e.href)||""}}class v extends b{constructor(e){super(e,"b")}[a.$pushGlyphs](e){e.pushFont({weight:"bold"}),super[a.$pushGlyphs](e),e.popFont()}}class w extends b{constructor(e){super(e,"body")}[a.$toHTML](e){const t=super[a.$toHTML](e),{html:r}=t;return r?(r.name="div",r.attributes.class=["xfaRich"],t):s.HTMLResult.EMPTY}}class A extends b{constructor(e){super(e,"br")}[a.$text](){return"\n"}[a.$pushGlyphs](e){e.addString("\n")}[a.$toHTML](e){return s.HTMLResult.success({name:"br"})}}class S extends b{constructor(e){super(e,"html")}[a.$toHTML](e){const t=[];if(this[a.$extra]={children:t},this[a.$childrenToHTML]({}),0===t.length)return s.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[a.$content]||""});if(1===t.length){const e=t[0];if(e.attributes?.class.includes("xfaRich"))return s.HTMLResult.success(e)}return s.HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},children:t})}}class x extends b{constructor(e){super(e,"i")}[a.$pushGlyphs](e){e.pushFont({posture:"italic"}),super[a.$pushGlyphs](e),e.popFont()}}class k extends b{constructor(e){super(e,"li")}}class C extends b{constructor(e){super(e,"ol")}}class _ extends b{constructor(e){super(e,"p")}[a.$pushGlyphs](e){super[a.$pushGlyphs](e,!1),e.addString("\n"),e.addPara(),e.popFont()}[a.$text](){return this[a.$getParent]()[a.$getChildren]().at(-1)===this?super[a.$text]():super[a.$text]()+"\n"}}class T extends b{constructor(e){super(e,"span")}}class E extends b{constructor(e){super(e,"sub")}}class O extends b{constructor(e){super(e,"sup")}}class F extends b{constructor(e){super(e,"ul")}}class P{static[n.$buildXFAObject](e,t){if(P.hasOwnProperty(e))return P[e](t)}static a(e){return new y(e)}static b(e){return new v(e)}static body(e){return new w(e)}static br(e){return new A(e)}static html(e){return new S(e)}static i(e){return new x(e)}static li(e){return new k(e)}static ol(e){return new C(e)}static p(e){return new _(e)}static span(e){return new T(e)}static sub(e){return new E(e)}static sup(e){return new O(e)}static ul(e){return new F(e)}}t.XhtmlNamespace=P},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNamespace=void 0;var a=r(81),n=r(87);class i{constructor(e){this.namespaceId=e}[a.$buildXFAObject](e,t){return new n.XmlObject(this.namespaceId,e,t)}}t.UnknownNamespace=i},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetReader=void 0;var a=r(2),n=r(3),i=r(71);function s(e){try{return(0,a.stringToUTF8String)(e)}catch(t){return(0,a.warn)(`UTF-8 decoding failed: "${t}".`),e}}class o extends i.SimpleXMLParser{constructor(e){super(e),this.node=null}onEndElement(e){const t=super.onEndElement(e);if(t&&"xfa:datasets"===e)throw this.node=t,new Error("Aborting DatasetXMLParser.")}}t.DatasetReader=class{constructor(e){if(e.datasets)this.node=new i.SimpleXMLParser({hasAttributes:!0}).parseFromString(e.datasets).documentElement;else{const t=new o({hasAttributes:!0});try{t.parseFromString(e["xdp:xdp"])}catch{}this.node=t.node}}getValue(e){if(!this.node||!e)return"";const t=this.node.searchNode((0,n.parseXFAPath)(e),0);if(!t)return"";const r=t.firstChild;return"value"===r?.nodeName?t.children.map((e=>s(e.textContent))):s(t.textContent)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XRef=void 0;var a=r(2),n=r(4),i=r(16),s=r(3),o=r(5),c=r(74);t.XRef=class{#M=null;constructor(e,t){this.stream=e,this.pdfManager=t,this.entries=[],this._xrefStms=new Set,this._cacheMap=new Map,this._pendingRefs=new n.RefSet,this._newPersistentRefNum=null,this._newTemporaryRefNum=null}getNewPersistentRef(e){null===this._newPersistentRefNum&&(this._newPersistentRefNum=this.entries.length||1);const t=this._newPersistentRefNum++;return this._cacheMap.set(t,e),n.Ref.get(t,0)}getNewTemporaryRef(){return null===this._newTemporaryRefNum&&(this._newTemporaryRefNum=this.entries.length||1),n.Ref.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){this._newTemporaryRefNum=null}setStartXRef(e){this.startXRefQueue=[e]}parse(e=!1){let t,r,i;e?((0,a.warn)("Indexing all PDF objects"),t=this.indexObjects()):t=this.readXRef(),t.assignXref(this),this.trailer=t;try{r=t.get("Encrypt")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)(`XRef.parse - Invalid "Encrypt" reference: "${e}".`)}if(r instanceof n.Dict){const e=t.get("ID"),a=e?.length?e[0]:"";r.suppressEncryption=!0,this.encrypt=new c.CipherTransformFactory(r,a,this.pdfManager.password)}try{i=t.get("Root")}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)(`XRef.parse - Invalid "Root" reference: "${e}".`)}if(i instanceof n.Dict)try{if(i.get("Pages")instanceof n.Dict)return void(this.root=i)}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.warn)(`XRef.parse - Invalid "Pages" reference: "${e}".`)}if(!e)throw new s.XRefParseException;throw new a.InvalidPDFException("Invalid Root reference.")}processXRefTable(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});const t=this.readXRefTable(e);if(!(0,n.isCmd)(t,"trailer"))throw new a.FormatError("Invalid XRef table: could not find trailer dictionary");let r=e.getObj();if(r instanceof n.Dict||!r.dict||(r=r.dict),!(r instanceof n.Dict))throw new a.FormatError("Invalid XRef table: could not parse trailer dictionary");return delete this.tableState,r}readXRefTable(e){const t=e.lexer.stream,r=this.tableState;let i;for(t.pos=r.streamPos,e.buf1=r.parserBuf1,e.buf2=r.parserBuf2;;){if(!("firstEntryNum"in r)||!("entryCount"in r)){if((0,n.isCmd)(i=e.getObj(),"trailer"))break;r.firstEntryNum=i,r.entryCount=e.getObj()}let s=r.firstEntryNum;const o=r.entryCount;if(!Number.isInteger(s)||!Number.isInteger(o))throw new a.FormatError("Invalid XRef table: wrong types in subsection header");for(let i=r.entryNum;i<o;i++){r.streamPos=t.pos,r.entryNum=i,r.parserBuf1=e.buf1,r.parserBuf2=e.buf2;const c={};c.offset=e.getObj(),c.gen=e.getObj();const l=e.getObj();if(l instanceof n.Cmd)switch(l.cmd){case"f":c.free=!0;break;case"n":c.uncompressed=!0}if(!Number.isInteger(c.offset)||!Number.isInteger(c.gen)||!c.free&&!c.uncompressed)throw new a.FormatError(`Invalid entry in XRef subsection: ${s}, ${o}`);0===i&&c.free&&1===s&&(s=0),this.entries[i+s]||(this.entries[i+s]=c)}r.entryNum=0,r.streamPos=t.pos,r.parserBuf1=e.buf1,r.parserBuf2=e.buf2,delete r.firstEntryNum,delete r.entryCount}if(this.entries[0]&&!this.entries[0].free)throw new a.FormatError("Invalid XRef table: unexpected first object");return i}processXRefStream(e){if(!("streamState"in this)){const t=e.dict,r=t.get("W");let a=t.get("Index");a||(a=[0,t.get("Size")]),this.streamState={entryRanges:a,byteWidths:r,entryNum:0,streamPos:e.pos}}return this.readXRefStream(e),delete this.streamState,e.dict}readXRefStream(e){const t=this.streamState;e.pos=t.streamPos;const[r,n,i]=t.byteWidths,s=t.entryRanges;for(;s.length>0;){const[o,c]=s;if(!Number.isInteger(o)||!Number.isInteger(c))throw new a.FormatError(`Invalid XRef range fields: ${o}, ${c}`);if(!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(i))throw new a.FormatError(`Invalid XRef entry fields length: ${o}, ${c}`);for(let s=t.entryNum;s<c;++s){t.entryNum=s,t.streamPos=e.pos;let c=0,l=0,h=0;for(let t=0;t<r;++t){const t=e.getByte();if(-1===t)throw new a.FormatError("Invalid XRef byteWidths 'type'.");c=c<<8|t}0===r&&(c=1);for(let t=0;t<n;++t){const t=e.getByte();if(-1===t)throw new a.FormatError("Invalid XRef byteWidths 'offset'.");l=l<<8|t}for(let t=0;t<i;++t){const t=e.getByte();if(-1===t)throw new a.FormatError("Invalid XRef byteWidths 'generation'.");h=h<<8|t}const u={};switch(u.offset=l,u.gen=h,c){case 0:u.free=!0;break;case 1:u.uncompressed=!0;break;case 2:break;default:throw new a.FormatError(`Invalid XRef entry type: ${c}`)}this.entries[o+s]||(this.entries[o+s]=u)}t.entryNum=0,t.streamPos=e.pos,s.splice(0,2)}}indexObjects(){function e(e,t){let r="",a=e[t];for(;10!==a&&13!==a&&60!==a&&!(++t>=e.length);)r+=String.fromCharCode(a),a=e[t];return r}function t(e,t,r){const a=r.length,n=e.length;let i=0;for(;t<n;){let n=0;for(;n<a&&e[t+n]===r[n];)++n;if(n>=a)break;t++,i++}return i}const r=/\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g,o=/\b(startxref|\d+\s+\d+\s+obj)\b/g,c=/^(\d+)\s+(\d+)\s+obj\b/,l=new Uint8Array([116,114,97,105,108,101,114]),h=new Uint8Array([115,116,97,114,116,120,114,101,102]),u=new Uint8Array([47,88,82,101,102]);this.entries.length=0,this._cacheMap.clear();const d=this.stream;d.pos=0;const f=d.getBytes(),p=(0,a.bytesToString)(f),g=f.length;let m=d.start;const b=[],y=[];for(;m<g;){let n=f[m];if(9===n||10===n||13===n||32===n){++m;continue}if(37===n){do{if(++m,m>=g)break;n=f[m]}while(10!==n&&13!==n);continue}const v=e(f,m);let w;if(v.startsWith("xref")&&(4===v.length||/\s/.test(v[4])))m+=t(f,m,l),b.push(m),m+=t(f,m,h);else if(w=c.exec(v)){const e=0|w[1],n=0|w[2],o=m+v.length;let c,l=!1;if(this.entries[e]){if(this.entries[e].gen===n)try{new i.Parser({lexer:new i.Lexer(d.makeSubStream(o))}).getObj(),l=!0}catch(e){e instanceof s.ParserEOFException?(0,a.warn)(`indexObjects -- checking object (${v}): "${e}".`):l=!0}}else l=!0;l&&(this.entries[e]={offset:m-d.start,gen:n,uncompressed:!0}),r.lastIndex=o;const h=r.exec(p);h?(c=r.lastIndex+1-m,"endobj"!==h[1]&&((0,a.warn)(`indexObjects: Found "${h[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`),c-=h[1].length+1)):c=g-m;const b=f.subarray(m,m+c),A=t(b,0,u);A<c&&b[A+5]<64&&(y.push(m-d.start),this._xrefStms.add(m-d.start)),m+=c}else if(v.startsWith("trailer")&&(7===v.length||/\s/.test(v[7]))){b.push(m);const e=m+v.length;let t;o.lastIndex=e;const r=o.exec(p);r?(t=o.lastIndex+1-m,"startxref"!==r[1]&&((0,a.warn)(`indexObjects: Found "${r[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`),t-=r[1].length+1)):t=g-m,m+=t}else m+=v.length+1}for(const e of y)this.startXRefQueue.push(e),this.readXRef(!0);const v=[];let w,A,S=!1;for(const e of b){d.pos=e;const t=new i.Parser({lexer:new i.Lexer(d),xref:this,allowStreams:!0,recoveryMode:!0}),r=t.getObj();if(!(0,n.isCmd)(r,"trailer"))continue;const a=t.getObj();a instanceof n.Dict&&(v.push(a),a.has("Encrypt")&&(S=!0))}for(const e of[...v,"genFallback",...v]){if("genFallback"===e){if(!A)break;this._generationFallback=!0;continue}let t=!1;try{const r=e.get("Root");if(!(r instanceof n.Dict))continue;const a=r.get("Pages");if(!(a instanceof n.Dict))continue;const i=a.get("Count");Number.isInteger(i)&&(t=!0)}catch(e){A=e;continue}if(t&&(!S||e.has("Encrypt"))&&e.has("ID"))return e;w=e}if(w)return w;if(this.topDict)return this.topDict;throw new a.InvalidPDFException("Invalid PDF structure.")}readXRef(e=!1){const t=this.stream,r=new Set;for(;this.startXRefQueue.length;){try{const e=this.startXRefQueue[0];if(r.has(e)){(0,a.warn)("readXRef - skipping XRef table since it was already parsed."),this.startXRefQueue.shift();continue}r.add(e),t.pos=e+t.start;const s=new i.Parser({lexer:new i.Lexer(t),xref:this,allowStreams:!0});let c,l=s.getObj();if((0,n.isCmd)(l,"xref"))c=this.processXRefTable(s),this.topDict||(this.topDict=c),l=c.get("XRefStm"),Number.isInteger(l)&&!this._xrefStms.has(l)&&(this._xrefStms.add(l),this.startXRefQueue.push(l),this.#M??=l);else{if(!Number.isInteger(l))throw new a.FormatError("Invalid XRef stream header");if(!(Number.isInteger(s.getObj())&&(0,n.isCmd)(s.getObj(),"obj")&&(l=s.getObj())instanceof o.BaseStream))throw new a.FormatError("Invalid XRef stream");if(c=this.processXRefStream(l),this.topDict||(this.topDict=c),!c)throw new a.FormatError("Failed to read XRef stream")}l=c.get("Prev"),Number.isInteger(l)?this.startXRefQueue.push(l):l instanceof n.Ref&&this.startXRefQueue.push(l.num)}catch(e){if(e instanceof s.MissingDataException)throw e;(0,a.info)("(while reading XRef): "+e)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!e)throw new s.XRefParseException}get lastXRefStreamPos(){return this.#M??(this._xrefStms.size>0?Math.max(...this._xrefStms):null)}getEntry(e){const t=this.entries[e];return t&&!t.free&&t.offset?t:null}fetchIfRef(e,t=!1){return e instanceof n.Ref?this.fetch(e,t):e}fetch(e,t=!1){if(!(e instanceof n.Ref))throw new Error("ref object is not a reference");const r=e.num,i=this._cacheMap.get(r);if(void 0!==i)return i instanceof n.Dict&&!i.objId&&(i.objId=e.toString()),i;let s=this.getEntry(r);if(null===s)return this._cacheMap.set(r,s),s;if(this._pendingRefs.has(e))return this._pendingRefs.remove(e),(0,a.warn)(`Ignoring circular reference: ${e}.`),n.CIRCULAR_REF;this._pendingRefs.put(e);try{s=s.uncompressed?this.fetchUncompressed(e,s,t):this.fetchCompressed(e,s,t),this._pendingRefs.remove(e)}catch(t){throw this._pendingRefs.remove(e),t}return s instanceof n.Dict?s.objId=e.toString():s instanceof o.BaseStream&&(s.dict.objId=e.toString()),s}fetchUncompressed(e,t,r=!1){const c=e.gen;let l=e.num;if(t.gen!==c){const i=`Inconsistent generation in XRef: ${e}`;if(this._generationFallback&&t.gen<c)return(0,a.warn)(i),this.fetchUncompressed(n.Ref.get(l,t.gen),t,r);throw new s.XRefEntryException(i)}const h=this.stream.makeSubStream(t.offset+this.stream.start),u=new i.Parser({lexer:new i.Lexer(h),xref:this,allowStreams:!0}),d=u.getObj(),f=u.getObj(),p=u.getObj();if(d!==l||f!==c||!(p instanceof n.Cmd))throw new s.XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`);if("obj"!==p.cmd){if(p.cmd.startsWith("obj")&&(l=parseInt(p.cmd.substring(3),10),!Number.isNaN(l)))return l;throw new s.XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`)}return(t=this.encrypt&&!r?u.getObj(this.encrypt.createCipherTransform(l,c)):u.getObj())instanceof o.BaseStream||this._cacheMap.set(l,t),t}fetchCompressed(e,t,r=!1){const c=t.offset,l=this.fetch(n.Ref.get(c,0));if(!(l instanceof o.BaseStream))throw new a.FormatError("bad ObjStm stream");const h=l.dict.get("First"),u=l.dict.get("N");if(!Number.isInteger(h)||!Number.isInteger(u))throw new a.FormatError("invalid first and n parameters for ObjStm stream");let d=new i.Parser({lexer:new i.Lexer(l),xref:this,allowStreams:!0});const f=new Array(u),p=new Array(u);for(let e=0;e<u;++e){const t=d.getObj();if(!Number.isInteger(t))throw new a.FormatError(`invalid object number in the ObjStm stream: ${t}`);const r=d.getObj();if(!Number.isInteger(r))throw new a.FormatError(`invalid object offset in the ObjStm stream: ${r}`);f[e]=t,p[e]=r}const g=(l.start||0)+h,m=new Array(u);for(let e=0;e<u;++e){const t=e<u-1?p[e+1]-p[e]:void 0;if(t<0)throw new a.FormatError("Invalid offset in the ObjStm stream.");d=new i.Parser({lexer:new i.Lexer(l.makeSubStream(g+p[e],t,l.dict)),xref:this,allowStreams:!0});const r=d.getObj();if(m[e]=r,r instanceof o.BaseStream)continue;const n=f[e],s=this.entries[n];s&&s.offset===c&&s.gen===e&&this._cacheMap.set(n,r)}if(void 0===(t=m[t.gen]))throw new s.XRefEntryException(`Bad (compressed) XRef entry: ${e}`);return t}async fetchIfRefAsync(e,t){return e instanceof n.Ref?this.fetchAsync(e,t):e}async fetchAsync(e,t){try{return this.fetch(e,t)}catch(r){if(!(r instanceof s.MissingDataException))throw r;return await this.pdfManager.requestRange(r.begin,r.end),this.fetchAsync(e,t)}}getCatalogObj(){return this.root}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var a=r(2);const n=1,i=2,s=1,o=2,c=3,l=4,h=5,u=6,d=7,f=8;function p(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,a.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"PasswordException":return new a.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new a.UnknownErrorException(e.message,e.details);default:return new a.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,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=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this.#R(t);if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===n)r.resolve(t.data);else{if(t.callback!==i)throw new Error("Unexpected callback case");r.reject(p(t.reason))}return}const a=this.actionHandler[t.action];if(!a)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(a(t.data))})).then((function(a){r.postMessage({sourceName:e,targetName:s,callback:n,callbackId:t.callbackId,data:a})}),(function(a){r.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,reason:p(a)})}))}else t.streamId?this.#D(t):a(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const n=this.callbackId++,i=new a.PromiseCapability;this.callbackCapabilities[n]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,r,n){const i=this.streamId++,o=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:r=>{const s=new a.PromiseCapability;return this.streamControllers[i]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:o,targetName:c,action:e,streamId:i,data:t,desiredSize:r.desiredSize},n),s.promise},pull:e=>{const t=new a.PromiseCapability;return this.streamControllers[i].pullCall=t,l.postMessage({sourceName:o,targetName:c,stream:u,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,a.assert)(e instanceof Error,"cancel must have a valid reason");const t=new a.PromiseCapability;return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,l.postMessage({sourceName:o,targetName:c,stream:s,streamId:i,reason:p(e)}),t.promise}},r)}#D(e){const t=e.streamId,r=this.sourceName,n=e.sourceName,i=this.comObj,s=this,o=this.actionHandler[e.action],u={enqueue(e,s=1,o){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=s,c>0&&this.desiredSize<=0&&(this.sinkCapability=new a.PromiseCapability,this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:n,stream:l,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:c,streamId:t}),delete s.streamSinks[t])},error(e){(0,a.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:h,streamId:t,reason:p(e)}))},sinkCapability:new a.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise((function(t){t(o(e.data,u))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,reason:p(e)})}))}#R(e){const t=e.streamId,r=this.sourceName,n=e.sourceName,i=this.comObj,g=this.streamControllers[t],m=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(p(e.reason));break;case d:e.success?g.pullCall.resolve():g.pullCall.reject(p(e.reason));break;case u:if(!m){i.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0});break}m.desiredSize<=0&&e.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=e.desiredSize,new Promise((function(e){e(m.onPull?.())})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,reason:p(e)})}));break;case l:if((0,a.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case c:if((0,a.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),this.#N(g,t);break;case h:(0,a.assert)(g,"error should have stream controller"),g.controller.error(p(e.reason)),this.#N(g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(p(e.reason)),this.#N(g,t);break;case s:if(!m)break;new Promise((function(t){t(m.onCancel?.(p(e.reason)))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:o,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:n,stream:o,streamId:t,reason:p(e)})})),m.sinkCapability.reject(p(e.reason)),m.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#N(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFWorkerStream=void 0;var a=r(2);t.PDFWorkerStream=class{constructor(e){this._msgHandler=e,this._contentLength=null,this._fullRequestReader=null,this._rangeRequestReaders=[]}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once."),this._fullRequestReader=new n(this._msgHandler),this._fullRequestReader}getRangeReader(e,t){const r=new i(e,t,this._msgHandler);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class n{constructor(e){this._msgHandler=e,this.onProgress=null,this._contentLength=null,this._isRangeSupported=!1,this._isStreamingSupported=!1;const t=this._msgHandler.sendWithStream("GetReader");this._reader=t.getReader(),this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((e=>{this._isStreamingSupported=e.isStreamingSupported,this._isRangeSupported=e.isRangeSupported,this._contentLength=e.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:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class i{constructor(e,t,r){this._msgHandler=r,this.onProgress=null;const a=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=a.getReader()}get isStreamingSupported(){return!1}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}}],t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,r),i.exports}var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"WorkerMessageHandler",{enumerable:!0,get:function(){return t.WorkerMessageHandler}});var t=r(1)})(),a})(),e.exports=t.pdfjsWorker=r()},237:()=>{},492:()=>{},640:()=>{},671:()=>{},710:(e,t,r)=>{e.exports=function e(t,r,a){function n(s,o){if(!r[s]){if(!t[s]){if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,(function(e){return n(t[s][1][e]||e)}),l,l.exports,e,t,r,a)}return r[s].exports}for(var i=void 0,s=0;s<a.length;s++)n(a[s]);return n}({1:[function(e,t,r){"use strict";var a=e("./utils"),n=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,n,s,o,c,l,h=[],u=0,d=e.length,f=d,p="string"!==a.getTypeOf(e);u<e.length;)f=d-u,n=p?(t=e[u++],r=u<d?e[u++]:0,u<d?e[u++]:0):(t=e.charCodeAt(u++),r=u<d?e.charCodeAt(u++):0,u<d?e.charCodeAt(u++):0),s=t>>2,o=(3&t)<<4|r>>4,c=1<f?(15&r)<<2|n>>6:64,l=2<f?63&n:64,h.push(i.charAt(s)+i.charAt(o)+i.charAt(c)+i.charAt(l));return h.join("")},r.decode=function(e){var t,r,a,s,o,c,l=0,h=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&f--,e.charAt(e.length-2)===i.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=n.uint8array?new Uint8Array(0|f):new Array(0|f);l<e.length;)t=i.indexOf(e.charAt(l++))<<2|(s=i.indexOf(e.charAt(l++)))>>4,r=(15&s)<<4|(o=i.indexOf(e.charAt(l++)))>>2,a=(3&o)<<6|(c=i.indexOf(e.charAt(l++))),d[h++]=t,64!==o&&(d[h++]=r),64!==c&&(d[h++]=a);return d}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var a=e("./external"),n=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function o(e,t,r,a,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=a,this.compressedContent=n}o.prototype={getContentWorker:function(){var e=new n(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new n(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new s("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var a=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var a=e("./utils"),n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==a.getTypeOf(e)?function(e,t,r,a){var i=n,s=a+r;e^=-1;for(var o=a;o<s;o++)e=e>>>8^i[255&(e^t[o])];return~e}(0|t,e,e.length,0):function(e,t,r,a){var i=n,s=a+r;e^=-1;for(var o=a;o<s;o++)e=e>>>8^i[255&(e^t.charCodeAt(o))];return~e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var a=null;a="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:a}},{lie:37}],7:[function(e,t,r){"use strict";var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),o=a?"uint8array":"array";function c(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",i.inherits(c,s),c.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(i.transformTo(o,e.data),!1)},c.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new c("Deflate",e)},r.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function a(e,t){var r,a="";for(r=0;r<t;r++)a+=String.fromCharCode(255&e),e>>>=8;return a}function n(e,t,r,n,s,h){var u,d,f=e.file,p=e.compression,g=h!==o.utf8encode,m=i.transformTo("string",h(f.name)),b=i.transformTo("string",o.utf8encode(f.name)),y=f.comment,v=i.transformTo("string",h(y)),w=i.transformTo("string",o.utf8encode(y)),A=b.length!==f.name.length,S=w.length!==y.length,x="",k="",C="",_=f.dir,T=f.date,E={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(E.crc32=e.crc32,E.compressedSize=e.compressedSize,E.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),g||!A&&!S||(O|=2048);var F=0,P=0;_&&(F|=16),"UNIX"===s?(P=798,F|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(f.unixPermissions,_)):(P=20,F|=function(e){return 63&(e||0)}(f.dosPermissions)),u=T.getUTCHours(),u<<=6,u|=T.getUTCMinutes(),u<<=5,u|=T.getUTCSeconds()/2,d=T.getUTCFullYear()-1980,d<<=4,d|=T.getUTCMonth()+1,d<<=5,d|=T.getUTCDate(),A&&(k=a(1,1)+a(c(m),4)+b,x+="up"+a(k.length,2)+k),S&&(C=a(1,1)+a(c(v),4)+w,x+="uc"+a(C.length,2)+C);var I="";return I+="\n\0",I+=a(O,2),I+=p.magic,I+=a(u,2),I+=a(d,2),I+=a(E.crc32,4),I+=a(E.compressedSize,4),I+=a(E.uncompressedSize,4),I+=a(m.length,2),I+=a(x.length,2),{fileRecord:l.LOCAL_FILE_HEADER+I+m+x,dirRecord:l.CENTRAL_FILE_HEADER+a(P,2)+I+a(v.length,2)+"\0\0\0\0"+a(F,4)+a(n,4)+m+x+v}}var i=e("../utils"),s=e("../stream/GenericWorker"),o=e("../utf8"),c=e("../crc32"),l=e("../signature");function h(e,t,r,a){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=a,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(h,s),h.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-a-1))/r:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+a(e.crc32,4)+a(e.compressedSize,4)+a(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,s){var o=i.transformTo("string",s(n));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(e,2)+a(e,2)+a(t,4)+a(r,4)+a(o.length,2)+o}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},h.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(e){var t=this._sources;if(!s.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},h.prototype.lock=function(){s.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var a=e("../compressions"),n=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var i=new n(t.streamFiles,r,t.platform,t.encodeFileName),s=0;try{e.forEach((function(e,r){s++;var n=function(e,t){var r=e||t,n=a[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(r.options.compression,t.compression),o=r.options.compressionOptions||t.compressionOptions||{},c=r.dir,l=r.date;r._compressWorker(n,o).withStreamInfo("file",{name:e,dir:c,date:l,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(i)})),i.entriesCount=s}catch(e){i.error(e)}return i}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new a;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(a.prototype=e("./object")).loadAsync=e("./load"),a.support=e("./support"),a.defaults=e("./defaults"),a.version="3.10.1",a.loadAsync=function(e,t){return(new a).loadAsync(e,t)},a.external=e("./external"),t.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var a=e("./utils"),n=e("./external"),i=e("./utf8"),s=e("./zipEntries"),o=e("./stream/Crc32Probe"),c=e("./nodejsUtils");function l(e){return new n.Promise((function(t,r){var a=e.decompressed.getContentWorker().pipe(new o);a.on("error",(function(e){r(e)})).on("end",(function(){a.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}t.exports=function(e,t){var r=this;return t=a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),c.isNode&&c.isStream(e)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var r=new s(t);return r.load(e),r})).then((function(e){var r=[n.Promise.resolve(e)],a=e.files;if(t.checkCRC32)for(var i=0;i<a.length;i++)r.push(l(a[i]));return n.Promise.all(r)})).then((function(e){for(var n=e.shift(),i=n.files,s=0;s<i.length;s++){var o=i[s],c=o.fileNameStr,l=a.resolve(o.fileNameStr);r.file(l,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders}),o.dir||(r.file(l).unsafeOriginalName=c)}return n.zipComment.length&&(r.comment=n.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var a=e("../utils"),n=e("../stream/GenericWorker");function i(e,t){n.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}a.inherits(i,n),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},i.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var a=e("readable-stream").Readable;function n(e,t,r){a.call(this,t),this._helper=e;var n=this;e.on("data",(function(e,t){n.push(e)||n._helper.pause(),r&&r(t)})).on("error",(function(e){n.emit("error",e)})).on("end",(function(){n.push(null)}))}e("../utils").inherits(n,a),n.prototype._read=function(){this._helper.resume()},t.exports=n},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function a(e,t,r){var a,n=i.getTypeOf(t),o=i.extend(r||{},c);o.date=o.date||new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(e=g(e)),o.createFolders&&(a=p(e))&&m.call(this,a,!0);var u="string"===n&&!1===o.binary&&!1===o.base64;r&&void 0!==r.binary||(o.binary=!u),(t instanceof l&&0===t.uncompressedSize||o.dir||!t||0===t.length)&&(o.base64=!1,o.binary=!0,t="",o.compression="STORE",n="string");var b=null;b=t instanceof l||t instanceof s?t:d.isNode&&d.isStream(t)?new f(e,t):i.prepareContent(e,t,o.binary,o.optimizedBinaryString,o.base64);var y=new h(e,b,o);this.files[e]=y}var n=e("./utf8"),i=e("./utils"),s=e("./stream/GenericWorker"),o=e("./stream/StreamHelper"),c=e("./defaults"),l=e("./compressedObject"),h=e("./zipObject"),u=e("./generate"),d=e("./nodejsUtils"),f=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:c.createFolders,e=g(e),this.files[e]||a.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function b(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,a;for(t in this.files)a=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,a)},filter:function(e){var t=[];return this.forEach((function(r,a){e(r,a)&&t.push(a)})),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,a.call(this,e,t,r),this;if(b(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(e){if(!e)return this;if(b(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=m.call(this,t),a=this.clone();return a.root=r.name,a},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),a=0;a<r.length;a++)delete this.files[r[a].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");i.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var a=r.comment||this.comment||"";t=u.generateWorker(this,r,a)}catch(e){(t=new s("error")).error(e)}return new o(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=y},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){"use strict";t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var a=e("./DataReader");function n(e){a.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(n,a),n.prototype.byteAt=function(e){return this.data[this.zero+e]},n.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2),n=e.charCodeAt(3),i=this.length-4;0<=i;--i)if(this.data[i]===t&&this.data[i+1]===r&&this.data[i+2]===a&&this.data[i+3]===n)return i-this.zero;return-1},n.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2),n=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&a===i[2]&&n===i[3]},n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var a=e("../utils");function n(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return a.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=n},{"../utils":32}],19:[function(e,t,r){"use strict";var a=e("./Uint8ArrayReader");function n(e){a.call(this,e)}e("../utils").inherits(n,a),n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var a=e("./DataReader");function n(e){a.call(this,e)}e("../utils").inherits(n,a),n.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},n.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var a=e("./ArrayReader");function n(e){a.call(this,e)}e("../utils").inherits(n,a),n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var a=e("../utils"),n=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),o=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");t.exports=function(e){var t=a.getTypeOf(e);return a.checkSupport(t),"string"!==t||n.uint8array?"nodebuffer"===t?new o(e):n.uint8array?new c(a.transformTo("uint8array",e)):new i(a.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var a=e("./GenericWorker"),n=e("../utils");function i(e){a.call(this,"ConvertWorker to "+e),this.destType=e}n.inherits(i,a),i.prototype.processChunk=function(e){this.push({data:n.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var a=e("./GenericWorker"),n=e("../crc32");function i(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,a),i.prototype.processChunk=function(e){this.streamInfo.crc32=n(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var a=e("../utils"),n=e("./GenericWorker");function i(e){n.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}a.inherits(i,n),i.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}n.prototype.processChunk.call(this,e)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var a=e("../utils"),n=e("./GenericWorker");function i(e){n.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}a.inherits(i,n),i.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function a(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}a.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=a},{}],29:[function(e,t,r){"use strict";var a=e("../utils"),n=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),o=e("../support"),c=e("../external"),l=null;if(o.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function h(e,t){return new c.Promise((function(r,n){var i=[],o=e._internalType,c=e._outputType,l=e._mimeType;e.on("data",(function(e,r){i.push(e),t&&t(r)})).on("error",(function(e){i=[],n(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return a.newBlob(a.transformTo("arraybuffer",t),r);case"base64":return s.encode(t);default:return a.transformTo(e,t)}}(c,function(e,t){var r,a=0,n=null,i=0;for(r=0;r<t.length;r++)i+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(n=new Uint8Array(i),r=0;r<t.length;r++)n.set(t[r],a),a+=t[r].length;return n;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(o,i),l);r(e)}catch(e){n(e)}i=[]})).resume()}))}function u(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,a.checkSupport(s),this._worker=e.pipe(new n(s)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}u.prototype={accumulate:function(e){return h(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,(function(e){t.call(r,e.data,e.meta)})):this._worker.on(e,(function(){a.delay(t,arguments,r)})),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(a.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var a=new ArrayBuffer(0);try{r.blob=0===new Blob([a],{type:"application/zip"}).size}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(a),r.blob=0===n.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){"use strict";for(var a=e("./utils"),n=e("./support"),i=e("./nodejsUtils"),s=e("./stream/GenericWorker"),o=new Array(256),c=0;c<256;c++)o[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function h(){s.call(this,"utf-8 encode")}o[254]=o[254]=1,r.utf8encode=function(e){return n.nodebuffer?i.newBufferFrom(e,"utf-8"):function(e){var t,r,a,i,s,o=e.length,c=0;for(i=0;i<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(a=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(a-56320),i++),c+=r<128?1:r<2048?2:r<65536?3:4;for(t=n.uint8array?new Uint8Array(c):new Array(c),i=s=0;s<c;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(a=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(a-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},r.utf8decode=function(e){return n.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,c=new Array(2*s);for(t=r=0;t<s;)if((n=e[t++])<128)c[r++]=n;else if(4<(i=o[n]))c[r++]=65533,t+=i-1;else{for(n&=2===i?31:3===i?15:7;1<i&&t<s;)n=n<<6|63&e[t++],i--;1<i?c[r++]=65533:n<65536?c[r++]=n:(n-=65536,c[r++]=55296|n>>10&1023,c[r++]=56320|1023&n)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),a.applyFromCharCode(c)}(e=a.transformTo(n.uint8array?"uint8array":"array",e))},a.inherits(l,s),l.prototype.processChunk=function(e){var t=a.transformTo(n.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var i=t;(t=new Uint8Array(i.length+this.leftOver.length)).set(this.leftOver,0),t.set(i,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}(t),c=t;s!==t.length&&(n.uint8array?(c=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(c=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:r.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,a.inherits(h,s),h.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var a=e("./support"),n=e("./base64"),i=e("./nodejsUtils"),s=e("./external");function o(e){return e}function c(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(r){try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return a.append(e),a.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(e,t,r){var a=[],n=0,i=e.length;if(i<=r)return String.fromCharCode.apply(null,e);for(;n<i;)"array"===t||"nodebuffer"===t?a.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,i)))):a.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,i)))),n+=r;return a.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&1===String.fromCharCode.apply(null,i.allocBuffer(1)).length}catch(e){return!1}}()}};function h(e){var t=65536,a=r.getTypeOf(e),n=!0;if("uint8array"===a?n=l.applyCanBeUsed.uint8array:"nodebuffer"===a&&(n=l.applyCanBeUsed.nodebuffer),n)for(;1<t;)try{return l.stringifyByChunk(e,a,t)}catch(e){t=Math.floor(t/2)}return l.stringifyByChar(e)}function u(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=h;var d={};d.string={string:o,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,i.allocBuffer(e.length))}},d.array={string:h,array:o,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(e)}},d.arraybuffer={string:function(e){return h(new Uint8Array(e))},array:function(e){return u(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:o,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return i.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:h,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:o,nodebuffer:function(e){return i.newBufferFrom(e)}},d.nodebuffer={string:h,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:o},r.transformTo=function(e,t){if(t=t||"",!e)return t;r.checkSupport(e);var a=r.getTypeOf(t);return d[a][e](t)},r.resolve=function(e){for(var t=e.split("/"),r=[],a=0;a<t.length;a++){var n=t[a];"."===n||""===n&&0!==a&&a!==t.length-1||(".."===n?r.pop():r.push(n))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":a.nodebuffer&&i.isBuffer(e)?"nodebuffer":a.uint8array&&e instanceof Uint8Array?"uint8array":a.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!a[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,a="";for(r=0;r<(e||"").length;r++)a+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return a},r.delay=function(e,t,r){setImmediate((function(){e.apply(r||null,t||[])}))},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,i,o,l){return s.Promise.resolve(t).then((function(e){return a.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new s.Promise((function(t,r){var a=new FileReader;a.onload=function(e){t(e.target.result)},a.onerror=function(e){r(e.target.error)},a.readAsArrayBuffer(e)})):e})).then((function(t){var h=r.getTypeOf(t);return h?("arraybuffer"===h?t=r.transformTo("uint8array",t):"string"===h&&(l?t=n.decode(t):i&&!0!==o&&(t=function(e){return c(e,a.uint8array?new Uint8Array(e.length):new Array(e.length))}(t))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var a=e("./reader/readerFor"),n=e("./utils"),i=e("./signature"),s=e("./zipEntry"),o=e("./support");function c(e){this.files=[],this.loadOptions=e}c.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(t)+", expected "+n.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var a=this.reader.readString(4)===t;return this.reader.setIndex(r),a},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=n.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,a=this.zip64EndOfCentralSize-44;0<a;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var a=t-r;if(0<a)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=a);else if(a<0)throw new Error("Corrupted zip: missing "+Math.abs(a)+" bytes.")},prepareReader:function(e){this.reader=a(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var a=e("./reader/readerFor"),n=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),o=e("./utf8"),c=e("./compressions"),l=e("./support");function h(e,t){this.options=e,this.loadOptions=t}h.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in c)if(Object.prototype.hasOwnProperty.call(c,t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=a(this.extraFields[1].value);this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,a,n=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<n;)t=e.readInt(2),r=e.readInt(2),a=e.readData(r),this.extraFields[t]={id:t,length:r,value:a};e.setIndex(n)},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=n.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var a=this.findExtraFieldUnicodeComment();if(null!==a)this.fileCommentStr=a;else{var i=n.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=a(e.value);return 1!==t.readInt(1)||s(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=a(e.value);return 1!==t.readInt(1)||s(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function a(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var n=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),s=e("./utf8"),o=e("./compressedObject"),c=e("./stream/GenericWorker");a.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var a="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!a&&(t=t.pipe(new s.Utf8EncodeWorker)),!i&&a&&(t=t.pipe(new s.Utf8DecodeWorker))}catch(e){(t=new c("error")).error(e)}return new n(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof c?this._data:new i(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<l.length;u++)a.prototype[l[u]]=h;t.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,a){(function(e){"use strict";var r,a,n=e.MutationObserver||e.WebKitMutationObserver;if(n){var i=0,s=new n(h),o=e.document.createTextNode("");s.observe(o,{characterData:!0}),r=function(){o.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){h(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(h,0)};else{var c=new e.MessageChannel;c.port1.onmessage=h,r=function(){c.port2.postMessage(0)}}var l=[];function h(){var e,t;a=!0;for(var r=l.length;r;){for(t=l,l=[],e=-1;++e<r;)t[e]();r=l.length}a=!1}t.exports=function(e){1!==l.push(e)||a||r()}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var a=e("immediate");function n(){}var i={},s=["REJECTED"],o=["FULFILLED"],c=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==n&&f(this,e)}function h(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function u(e,t,r){a((function(){var a;try{a=t(r)}catch(a){return i.reject(e,a)}a===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,a)}))}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var r=!1;function a(t){r||(r=!0,i.reject(e,t))}function n(t){r||(r=!0,i.resolve(e,t))}var s=p((function(){t(n,a)}));"error"===s.status&&a(s.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=l).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===o||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(n);return this.state!==c?u(r,this.state===o?e:t,this.outcome):this.queue.push(new h(r,e,t)),r},h.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){u(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){i.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){u(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=p(d,t);if("error"===r.status)return i.reject(e,r.value);var a=r.value;if(a)f(e,a);else{e.state=o,e.outcome=t;for(var n=-1,s=e.queue.length;++n<s;)e.queue[n].callFulfilled(t)}return e},i.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:i.resolve(new this(n),e)},l.reject=function(e){var t=new this(n);return i.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,a=!1;if(!r)return this.resolve([]);for(var s=new Array(r),o=0,c=-1,l=new this(n);++c<r;)h(e[c],c);return l;function h(e,n){t.resolve(e).then((function(e){s[n]=e,++o!==r||a||(a=!0,i.resolve(l,s))}),(function(e){a||(a=!0,i.reject(l,e))}))}},l.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,a=!1;if(!r)return this.resolve([]);for(var s,o=-1,c=new this(n);++o<r;)s=e[o],t.resolve(s).then((function(e){a||(a=!0,i.resolve(c,e))}),(function(e){a||(a=!0,i.reject(c,e))}));return c}},{immediate:36}],38:[function(e,t,r){"use strict";var a={};(0,e("./lib/utils/common").assign)(a,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var a=e("./zlib/deflate"),n=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/messages"),o=e("./zlib/zstream"),c=Object.prototype.toString,l=0,h=-1,u=0,d=8;function f(e){if(!(this instanceof f))return new f(e);this.options=n.assign({level:h,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(s[r]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?i.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=a.deflateSetDictionary(this.strm,p))!==l)throw new Error(s[r]);this._dict_set=!0}}function p(e,t){var r=new f(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}f.prototype.push=function(e,t){var r,s,o=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=i.string2buf(e):"[object ArrayBuffer]"===c.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new n.Buf8(h),o.next_out=0,o.avail_out=h),1!==(r=a.deflate(o,s))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==o.avail_out&&(0!==o.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(n.shrinkBuf(o.output,o.next_out))):this.onData(n.shrinkBuf(o.output,o.next_out)))}while((0<o.avail_in||0===o.avail_out)&&1!==r);return 4===s?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==s||(this.onEnd(l),!(o.avail_out=0))},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=f,r.deflate=p,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var a=e("./zlib/inflate"),n=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),o=e("./zlib/messages"),c=e("./zlib/zstream"),l=e("./zlib/gzheader"),h=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=a.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(o[r]);this.header=new l,a.inflateGetHeader(this.strm,this.header)}function d(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}u.prototype.push=function(e,t){var r,o,c,l,u,d,f=this.strm,p=this.options.chunkSize,g=this.options.dictionary,m=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?f.input=i.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new n.Buf8(p),f.next_out=0,f.avail_out=p),(r=a.inflate(f,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(d="string"==typeof g?i.string2buf(g):"[object ArrayBuffer]"===h.call(g)?new Uint8Array(g):g,r=a.inflateSetDictionary(this.strm,d)),r===s.Z_BUF_ERROR&&!0===m&&(r=s.Z_OK,m=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);f.next_out&&(0!==f.avail_out&&r!==s.Z_STREAM_END&&(0!==f.avail_in||o!==s.Z_FINISH&&o!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(c=i.utf8border(f.output,f.next_out),l=f.next_out-c,u=i.buf2string(f.output,c),f.next_out=l,f.avail_out=p-l,l&&n.arraySet(f.output,f.output,c,l,0),this.onData(u)):this.onData(n.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(m=!0)}while((0<f.avail_in||0===f.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(o=s.Z_FINISH),o===s.Z_FINISH?(r=a.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):o!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(f.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=u,r.inflate=d,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},r.ungzip=d},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,a,n){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+a),n);else for(var i=0;i<a;i++)e[n+i]=t[r+i]},flattenChunks:function(e){var t,r,a,n,i,s;for(t=a=0,r=e.length;t<r;t++)a+=e[t].length;for(s=new Uint8Array(a),t=n=0,r=e.length;t<r;t++)i=e[t],s.set(i,n),n+=i.length;return s}},i={arraySet:function(e,t,r,a,n){for(var i=0;i<a;i++)e[n+i]=t[r+i]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,n)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(a)},{}],42:[function(e,t,r){"use strict";var a=e("./common"),n=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(e){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){i=!1}for(var s=new a.Buf8(256),o=0;o<256;o++)s[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function c(e,t){if(t<65537&&(e.subarray&&i||!e.subarray&&n))return String.fromCharCode.apply(null,a.shrinkBuf(e,t));for(var r="",s=0;s<t;s++)r+=String.fromCharCode(e[s]);return r}s[254]=s[254]=1,r.string2buf=function(e){var t,r,n,i,s,o=e.length,c=0;for(i=0;i<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),c+=r<128?1:r<2048?2:r<65536?3:4;for(t=new a.Buf8(c),i=s=0;s<c;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return c(e,e.length)},r.binstring2buf=function(e){for(var t=new a.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,a,n,i,o=t||e.length,l=new Array(2*o);for(r=a=0;r<o;)if((n=e[r++])<128)l[a++]=n;else if(4<(i=s[n]))l[a++]=65533,r+=i-1;else{for(n&=2===i?31:3===i?15:7;1<i&&r<o;)n=n<<6|63&e[r++],i--;1<i?l[a++]=65533:n<65536?l[a++]=n:(n-=65536,l[a++]=55296|n>>10&1023,l[a++]=56320|1023&n)}return c(l,a)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,a){for(var n=65535&e,i=e>>>16&65535,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;i=i+(n=n+t[a++]|0)|0,--s;);n%=65521,i%=65521}return n|i<<16}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var a=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=a,s=n+r;e^=-1;for(var o=n;o<s;o++)e=e>>>8^i[255&(e^t[o])];return~e}},{}],46:[function(e,t,r){"use strict";var a,n=e("../utils/common"),i=e("./trees"),s=e("./adler32"),o=e("./crc32"),c=e("./messages"),l=0,h=4,u=0,d=-2,f=-1,p=4,g=2,m=8,b=9,y=286,v=30,w=19,A=2*y+1,S=15,x=3,k=258,C=k+x+1,_=42,T=113,E=1,O=2,F=3,P=4;function I(e,t){return e.msg=c[t],t}function M(e){return(e<<1)-(4<e?9:0)}function R(e){for(var t=e.length;0<=--t;)e[t]=0}function D(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(n.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){i._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,D(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function B(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function j(e,t){var r,a,n=e.max_chain_length,i=e.strstart,s=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-C?e.strstart-(e.w_size-C):0,l=e.window,h=e.w_mask,u=e.prev,d=e.strstart+k,f=l[i+s-1],p=l[i+s];e.prev_length>=e.good_match&&(n>>=2),o>e.lookahead&&(o=e.lookahead);do{if(l[(r=t)+s]===p&&l[r+s-1]===f&&l[r]===l[i]&&l[++r]===l[i+1]){i+=2,r++;do{}while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&i<d);if(a=k-(d-i),i=d-k,s<a){if(e.match_start=t,o<=(s=a))break;f=l[i+s-1],p=l[i+s]}}}while((t=u[t&h])>c&&0!=--n);return s<=e.lookahead?s:e.lookahead}function $(e){var t,r,a,i,c,l,h,u,d,f,p=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-C)){for(n.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=r=e.hash_size;a=e.head[--t],e.head[t]=p<=a?a-p:0,--r;);for(t=r=p;a=e.prev[--t],e.prev[t]=p<=a?a-p:0,--r;);i+=p}if(0===e.strm.avail_in)break;if(l=e.strm,h=e.window,u=e.strstart+e.lookahead,f=void 0,(d=i)<(f=l.avail_in)&&(f=d),r=0===f?0:(l.avail_in-=f,n.arraySet(h,l.input,l.next_in,f,u),1===l.state.wrap?l.adler=s(l.adler,h,f,u):2===l.state.wrap&&(l.adler=o(l.adler,h,f,u)),l.next_in+=f,l.total_in+=f,f),e.lookahead+=r,e.lookahead+e.insert>=x)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+x-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<x)););}while(e.lookahead<C&&0!==e.strm.avail_in)}function U(e,t){for(var r,a;;){if(e.lookahead<C){if($(e),e.lookahead<C&&t===l)return E;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-C&&(e.match_length=j(e,r)),e.match_length>=x)if(a=i._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else a=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(N(e,!1),0===e.strm.avail_out))return E}return e.insert=e.strstart<x-1?e.strstart:x-1,t===h?(N(e,!0),0===e.strm.avail_out?F:P):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?E:O}function z(e,t){for(var r,a,n;;){if(e.lookahead<C){if($(e),e.lookahead<C&&t===l)return E;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=x-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-C&&(e.match_length=j(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===x&&4096<e.strstart-e.match_start)&&(e.match_length=x-1)),e.prev_length>=x&&e.match_length<=e.prev_length){for(n=e.strstart+e.lookahead-x,a=i._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=x-1,e.strstart++,a&&(N(e,!1),0===e.strm.avail_out))return E}else if(e.match_available){if((a=i._tr_tally(e,0,e.window[e.strstart-1]))&&N(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return E}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=i._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<x-1?e.strstart:x-1,t===h?(N(e,!0),0===e.strm.avail_out?F:P):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?E:O}function H(e,t,r,a,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=a,this.func=n}function X(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new n.Buf16(2*A),this.dyn_dtree=new n.Buf16(2*(2*v+1)),this.bl_tree=new n.Buf16(2*(2*w+1)),R(this.dyn_ltree),R(this.dyn_dtree),R(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new n.Buf16(S+1),this.heap=new n.Buf16(2*y+1),R(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new n.Buf16(2*y+1),R(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function W(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=g,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?_:T,e.adler=2===t.wrap?0:1,t.last_flush=l,i._tr_init(t),u):I(e,d)}function G(e){var t=W(e);return t===u&&function(e){e.window_size=2*e.w_size,R(e.head),e.max_lazy_match=a[e.level].max_lazy,e.good_match=a[e.level].good_length,e.nice_match=a[e.level].nice_length,e.max_chain_length=a[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0}(e.state),t}function q(e,t,r,a,i,s){if(!e)return d;var o=1;if(t===f&&(t=6),a<0?(o=0,a=-a):15<a&&(o=2,a-=16),i<1||b<i||r!==m||a<8||15<a||t<0||9<t||s<0||p<s)return I(e,d);8===a&&(a=9);var c=new X;return(e.state=c).strm=e,c.wrap=o,c.gzhead=null,c.w_bits=a,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=i+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+x-1)/x),c.window=new n.Buf8(2*c.w_size),c.head=new n.Buf16(c.hash_size),c.prev=new n.Buf16(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new n.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=s,c.method=r,G(e)}a=[new H(0,0,0,0,(function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if($(e),0===e.lookahead&&t===l)return E;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var a=e.block_start+r;if((0===e.strstart||e.strstart>=a)&&(e.lookahead=e.strstart-a,e.strstart=a,N(e,!1),0===e.strm.avail_out))return E;if(e.strstart-e.block_start>=e.w_size-C&&(N(e,!1),0===e.strm.avail_out))return E}return e.insert=0,t===h?(N(e,!0),0===e.strm.avail_out?F:P):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),E)})),new H(4,4,8,4,U),new H(4,5,16,8,U),new H(4,6,32,32,U),new H(4,4,16,16,z),new H(8,16,32,32,z),new H(8,16,128,128,z),new H(8,32,128,256,z),new H(32,128,258,1024,z),new H(32,258,258,4096,z)],r.deflateInit=function(e,t){return q(e,t,m,15,8,0)},r.deflateInit2=q,r.deflateReset=G,r.deflateResetKeep=W,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,u):d},r.deflate=function(e,t){var r,n,s,c;if(!e||!e.state||5<t||t<0)return e?I(e,d):d;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&t!==h)return I(e,0===e.avail_out?-5:d);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===_)if(2===n.wrap)e.adler=0,L(n,31),L(n,139),L(n,8),n.gzhead?(L(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),L(n,255&n.gzhead.time),L(n,n.gzhead.time>>8&255),L(n,n.gzhead.time>>16&255),L(n,n.gzhead.time>>24&255),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(L(n,255&n.gzhead.extra.length),L(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=o(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(L(n,0),L(n,0),L(n,0),L(n,0),L(n,0),L(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),L(n,3),n.status=T);else{var f=m+(n.w_bits-8<<4)<<8;f|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(f|=32),f+=31-f%31,n.status=T,B(n,f),0!==n.strstart&&(B(n,e.adler>>>16),B(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(s=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>s&&(e.adler=o(e.adler,n.pending_buf,n.pending-s,s)),D(e),s=n.pending,n.pending!==n.pending_buf_size));)L(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>s&&(e.adler=o(e.adler,n.pending_buf,n.pending-s,s)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){s=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(e.adler=o(e.adler,n.pending_buf,n.pending-s,s)),D(e),s=n.pending,n.pending===n.pending_buf_size)){c=1;break}c=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,L(n,c)}while(0!==c);n.gzhead.hcrc&&n.pending>s&&(e.adler=o(e.adler,n.pending_buf,n.pending-s,s)),0===c&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){s=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(e.adler=o(e.adler,n.pending_buf,n.pending-s,s)),D(e),s=n.pending,n.pending===n.pending_buf_size)){c=1;break}c=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,L(n,c)}while(0!==c);n.gzhead.hcrc&&n.pending>s&&(e.adler=o(e.adler,n.pending_buf,n.pending-s,s)),0===c&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&D(e),n.pending+2<=n.pending_buf_size&&(L(n,255&e.adler),L(n,e.adler>>8&255),e.adler=0,n.status=T)):n.status=T),0!==n.pending){if(D(e),0===e.avail_out)return n.last_flush=-1,u}else if(0===e.avail_in&&M(t)<=M(r)&&t!==h)return I(e,-5);if(666===n.status&&0!==e.avail_in)return I(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var p=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&($(e),0===e.lookahead)){if(t===l)return E;break}if(e.match_length=0,r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return E}return e.insert=0,t===h?(N(e,!0),0===e.strm.avail_out?F:P):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?E:O}(n,t):3===n.strategy?function(e,t){for(var r,a,n,s,o=e.window;;){if(e.lookahead<=k){if($(e),e.lookahead<=k&&t===l)return E;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0<e.strstart&&(a=o[n=e.strstart-1])===o[++n]&&a===o[++n]&&a===o[++n]){s=e.strstart+k;do{}while(a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&a===o[++n]&&n<s);e.match_length=k-(s-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=i._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=i._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return E}return e.insert=0,t===h?(N(e,!0),0===e.strm.avail_out?F:P):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?E:O}(n,t):a[n.level].func(n,t);if(p!==F&&p!==P||(n.status=666),p===E||p===F)return 0===e.avail_out&&(n.last_flush=-1),u;if(p===O&&(1===t?i._tr_align(n):5!==t&&(i._tr_stored_block(n,0,0,!1),3===t&&(R(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),D(e),0===e.avail_out))return n.last_flush=-1,u}return t!==h?u:n.wrap<=0?1:(2===n.wrap?(L(n,255&e.adler),L(n,e.adler>>8&255),L(n,e.adler>>16&255),L(n,e.adler>>24&255),L(n,255&e.total_in),L(n,e.total_in>>8&255),L(n,e.total_in>>16&255),L(n,e.total_in>>24&255)):(B(n,e.adler>>>16),B(n,65535&e.adler)),D(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?u:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==_&&69!==t&&73!==t&&91!==t&&103!==t&&t!==T&&666!==t?I(e,d):(e.state=null,t===T?I(e,-3):u):d},r.deflateSetDictionary=function(e,t){var r,a,i,o,c,l,h,f,p=t.length;if(!e||!e.state)return d;if(2===(o=(r=e.state).wrap)||1===o&&r.status!==_||r.lookahead)return d;for(1===o&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===o&&(R(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new n.Buf8(r.w_size),n.arraySet(f,t,p-r.w_size,r.w_size,0),t=f,p=r.w_size),c=e.avail_in,l=e.next_in,h=e.input,e.avail_in=p,e.next_in=0,e.input=t,$(r);r.lookahead>=x;){for(a=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[a+x-1])&r.hash_mask,r.prev[a&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=a,a++,--i;);r.strstart=a,r.lookahead=x-1,$(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,e.next_in=l,e.input=h,e.avail_in=c,r.wrap=o,u},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,a,n,i,s,o,c,l,h,u,d,f,p,g,m,b,y,v,w,A,S,x,k,C,_;r=e.state,a=e.next_in,C=e.input,n=a+(e.avail_in-5),i=e.next_out,_=e.output,s=i-(t-e.avail_out),o=i+(e.avail_out-257),c=r.dmax,l=r.wsize,h=r.whave,u=r.wnext,d=r.window,f=r.hold,p=r.bits,g=r.lencode,m=r.distcode,b=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(f+=C[a++]<<p,p+=8,f+=C[a++]<<p,p+=8),v=g[f&b];t:for(;;){if(f>>>=w=v>>>24,p-=w,0==(w=v>>>16&255))_[i++]=65535&v;else{if(!(16&w)){if(!(64&w)){v=g[(65535&v)+(f&(1<<w)-1)];continue t}if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}A=65535&v,(w&=15)&&(p<w&&(f+=C[a++]<<p,p+=8),A+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=C[a++]<<p,p+=8,f+=C[a++]<<p,p+=8),v=m[f&y];r:for(;;){if(f>>>=w=v>>>24,p-=w,!(16&(w=v>>>16&255))){if(!(64&w)){v=m[(65535&v)+(f&(1<<w)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(S=65535&v,p<(w&=15)&&(f+=C[a++]<<p,(p+=8)<w&&(f+=C[a++]<<p,p+=8)),c<(S+=f&(1<<w)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(f>>>=w,p-=w,(w=i-s)<S){if(h<(w=S-w)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=d,(x=0)===u){if(x+=l-w,w<A){for(A-=w;_[i++]=d[x++],--w;);x=i-S,k=_}}else if(u<w){if(x+=l+u-w,(w-=u)<A){for(A-=w;_[i++]=d[x++],--w;);if(x=0,u<A){for(A-=w=u;_[i++]=d[x++],--w;);x=i-S,k=_}}}else if(x+=u-w,w<A){for(A-=w;_[i++]=d[x++],--w;);x=i-S,k=_}for(;2<A;)_[i++]=k[x++],_[i++]=k[x++],_[i++]=k[x++],A-=3;A&&(_[i++]=k[x++],1<A&&(_[i++]=k[x++]))}else{for(x=i-S;_[i++]=_[x++],_[i++]=_[x++],_[i++]=_[x++],2<(A-=3););A&&(_[i++]=_[x++],1<A&&(_[i++]=_[x++]))}break}}break}}while(a<n&&i<o);a-=A=p>>3,f&=(1<<(p-=A<<3))-1,e.next_in=a,e.next_out=i,e.avail_in=a<n?n-a+5:5-(a-n),e.avail_out=i<o?o-i+257:257-(i-o),r.hold=f,r.bits=p}},{}],49:[function(e,t,r){"use strict";var a=e("../utils/common"),n=e("./adler32"),i=e("./crc32"),s=e("./inffast"),o=e("./inftrees"),c=1,l=2,h=0,u=-2,d=1,f=852,p=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function m(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function b(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=d,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new a.Buf32(f),t.distcode=t.distdyn=new a.Buf32(p),t.sane=1,t.back=-1,h):u}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,b(e)):u}function v(e,t){var r,a;return e&&e.state?(a=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?u:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=r,a.wbits=t,y(e))):u}function w(e,t){var r,a;return e?(a=new m,(e.state=a).window=null,(r=v(e,t))!==h&&(e.state=null),r):u}var A,S,x=!0;function k(e){if(x){var t;for(A=new a.Buf32(512),S=new a.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,A,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(l,e.lens,0,32,S,0,e.work,{bits:5}),x=!1}e.lencode=A,e.lenbits=9,e.distcode=S,e.distbits=5}function C(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new a.Buf8(s.wsize)),n>=s.wsize?(a.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),a.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(a.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=y,r.inflateReset2=v,r.inflateResetKeep=b,r.inflateInit=function(e){return w(e,15)},r.inflateInit2=w,r.inflate=function(e,t){var r,f,p,m,b,y,v,w,A,S,x,_,T,E,O,F,P,I,M,R,D,N,L,B,j=0,$=new a.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;12===(r=e.state).mode&&(r.mode=13),b=e.next_out,p=e.output,v=e.avail_out,m=e.next_in,f=e.input,y=e.avail_in,w=r.hold,A=r.bits,S=y,x=v,N=h;e:for(;;)switch(r.mode){case d:if(0===r.wrap){r.mode=13;break}for(;A<16;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(2&r.wrap&&35615===w){$[r.check=0]=255&w,$[1]=w>>>8&255,r.check=i(r.check,$,2,0),A=w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",r.mode=30;break}if(A-=4,D=8+(15&(w>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<D,e.adler=r.check=1,r.mode=512&w?10:12,A=w=0;break;case 2:for(;A<16;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(r.flags=w,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=w>>8&1),512&r.flags&&($[0]=255&w,$[1]=w>>>8&255,r.check=i(r.check,$,2,0)),A=w=0,r.mode=3;case 3:for(;A<32;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}r.head&&(r.head.time=w),512&r.flags&&($[0]=255&w,$[1]=w>>>8&255,$[2]=w>>>16&255,$[3]=w>>>24&255,r.check=i(r.check,$,4,0)),A=w=0,r.mode=4;case 4:for(;A<16;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}r.head&&(r.head.xflags=255&w,r.head.os=w>>8),512&r.flags&&($[0]=255&w,$[1]=w>>>8&255,r.check=i(r.check,$,2,0)),A=w=0,r.mode=5;case 5:if(1024&r.flags){for(;A<16;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}r.length=w,r.head&&(r.head.extra_len=w),512&r.flags&&($[0]=255&w,$[1]=w>>>8&255,r.check=i(r.check,$,2,0)),A=w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(y<(_=r.length)&&(_=y),_&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),a.arraySet(r.head.extra,f,m,_,D)),512&r.flags&&(r.check=i(r.check,f,_,m)),y-=_,m+=_,r.length-=_),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===y)break e;for(_=0;D=f[m+_++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D)),D&&_<y;);if(512&r.flags&&(r.check=i(r.check,f,_,m)),y-=_,m+=_,D)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===y)break e;for(_=0;D=f[m+_++],r.head&&D&&r.length<65536&&(r.head.comment+=String.fromCharCode(D)),D&&_<y;);if(512&r.flags&&(r.check=i(r.check,f,_,m)),y-=_,m+=_,D)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;A<16;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(w!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}A=w=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;A<32;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}e.adler=r.check=g(w),A=w=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=b,e.avail_out=v,e.next_in=m,e.avail_in=y,r.hold=w,r.bits=A,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){w>>>=7&A,A-=7&A,r.mode=27;break}for(;A<3;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}switch(r.last=1&w,A-=1,3&(w>>>=1)){case 0:r.mode=14;break;case 1:if(k(r),r.mode=20,6!==t)break;w>>>=2,A-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}w>>>=2,A-=2;break;case 14:for(w>>>=7&A,A-=7&A;A<32;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&w,A=w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(_=r.length){if(y<_&&(_=y),v<_&&(_=v),0===_)break e;a.arraySet(p,f,m,_,b),y-=_,m+=_,v-=_,b+=_,r.length-=_;break}r.mode=12;break;case 17:for(;A<14;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(r.nlen=257+(31&w),w>>>=5,A-=5,r.ndist=1+(31&w),w>>>=5,A-=5,r.ncode=4+(15&w),w>>>=4,A-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;A<3;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}r.lens[U[r.have++]]=7&w,w>>>=3,A-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},N=o(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,N){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;F=(j=r.lencode[w&(1<<r.lenbits)-1])>>>16&255,P=65535&j,!((O=j>>>24)<=A);){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(P<16)w>>>=O,A-=O,r.lens[r.have++]=P;else{if(16===P){for(B=O+2;A<B;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(w>>>=O,A-=O,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}D=r.lens[r.have-1],_=3+(3&w),w>>>=2,A-=2}else if(17===P){for(B=O+3;A<B;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}A-=O,D=0,_=3+(7&(w>>>=O)),w>>>=3,A-=3}else{for(B=O+7;A<B;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}A-=O,D=0,_=11+(127&(w>>>=O)),w>>>=7,A-=7}if(r.have+_>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=D}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,L={bits:r.lenbits},N=o(c,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,N){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},N=o(l,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,N){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=y&&258<=v){e.next_out=b,e.avail_out=v,e.next_in=m,e.avail_in=y,r.hold=w,r.bits=A,s(e,x),b=e.next_out,p=e.output,v=e.avail_out,m=e.next_in,f=e.input,y=e.avail_in,w=r.hold,A=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;F=(j=r.lencode[w&(1<<r.lenbits)-1])>>>16&255,P=65535&j,!((O=j>>>24)<=A);){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(F&&!(240&F)){for(I=O,M=F,R=P;F=(j=r.lencode[R+((w&(1<<I+M)-1)>>I)])>>>16&255,P=65535&j,!(I+(O=j>>>24)<=A);){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}w>>>=I,A-=I,r.back+=I}if(w>>>=O,A-=O,r.back+=O,r.length=P,0===F){r.mode=26;break}if(32&F){r.back=-1,r.mode=12;break}if(64&F){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&F,r.mode=22;case 22:if(r.extra){for(B=r.extra;A<B;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}r.length+=w&(1<<r.extra)-1,w>>>=r.extra,A-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;F=(j=r.distcode[w&(1<<r.distbits)-1])>>>16&255,P=65535&j,!((O=j>>>24)<=A);){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(!(240&F)){for(I=O,M=F,R=P;F=(j=r.distcode[R+((w&(1<<I+M)-1)>>I)])>>>16&255,P=65535&j,!(I+(O=j>>>24)<=A);){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}w>>>=I,A-=I,r.back+=I}if(w>>>=O,A-=O,r.back+=O,64&F){e.msg="invalid distance code",r.mode=30;break}r.offset=P,r.extra=15&F,r.mode=24;case 24:if(r.extra){for(B=r.extra;A<B;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}r.offset+=w&(1<<r.extra)-1,w>>>=r.extra,A-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===v)break e;if(_=x-v,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}T=_>r.wnext?(_-=r.wnext,r.wsize-_):r.wnext-_,_>r.length&&(_=r.length),E=r.window}else E=p,T=b-r.offset,_=r.length;for(v<_&&(_=v),v-=_,r.length-=_;p[b++]=E[T++],--_;);0===r.length&&(r.mode=21);break;case 26:if(0===v)break e;p[b++]=r.length,v--,r.mode=21;break;case 27:if(r.wrap){for(;A<32;){if(0===y)break e;y--,w|=f[m++]<<A,A+=8}if(x-=v,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?i(r.check,p,x,b-x):n(r.check,p,x,b-x)),x=v,(r.flags?w:g(w))!==r.check){e.msg="incorrect data check",r.mode=30;break}A=w=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;A<32;){if(0===y)break e;y--,w+=f[m++]<<A,A+=8}if(w!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}A=w=0}r.mode=29;case 29:N=1;break e;case 30:N=-3;break e;case 31:return-4;default:return u}return e.next_out=b,e.avail_out=v,e.next_in=m,e.avail_in=y,r.hold=w,r.bits=A,(r.wsize||x!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&C(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(S-=e.avail_in,x-=e.avail_out,e.total_in+=S,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?i(r.check,p,x,e.next_out-x):n(r.check,p,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==S&&0===x||4===t)&&N===h&&(N=-5),N)},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,h},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,h):u},r.inflateSetDictionary=function(e,t){var r,a=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&n(1,t,a,0)!==r.check?-3:C(e,t,a,a)?(r.mode=31,-4):(r.havedict=1,h):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var a=e("../utils/common"),n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],o=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,c,l,h,u,d){var f,p,g,m,b,y,v,w,A,S=d.bits,x=0,k=0,C=0,_=0,T=0,E=0,O=0,F=0,P=0,I=0,M=null,R=0,D=new a.Buf16(16),N=new a.Buf16(16),L=null,B=0;for(x=0;x<=15;x++)D[x]=0;for(k=0;k<c;k++)D[t[r+k]]++;for(T=S,_=15;1<=_&&0===D[_];_--);if(_<T&&(T=_),0===_)return l[h++]=20971520,l[h++]=20971520,d.bits=1,0;for(C=1;C<_&&0===D[C];C++);for(T<C&&(T=C),x=F=1;x<=15;x++)if(F<<=1,(F-=D[x])<0)return-1;if(0<F&&(0===e||1!==_))return-1;for(N[1]=0,x=1;x<15;x++)N[x+1]=N[x]+D[x];for(k=0;k<c;k++)0!==t[r+k]&&(u[N[t[r+k]]++]=k);if(y=0===e?(M=L=u,19):1===e?(M=n,R-=257,L=i,B-=257,256):(M=s,L=o,-1),x=C,b=h,O=k=I=0,g=-1,m=(P=1<<(E=T))-1,1===e&&852<P||2===e&&592<P)return 1;for(;;){for(v=x-O,A=u[k]<y?(w=0,u[k]):u[k]>y?(w=L[B+u[k]],M[R+u[k]]):(w=96,0),f=1<<x-O,C=p=1<<E;l[b+(I>>O)+(p-=f)]=v<<24|w<<16|A,0!==p;);for(f=1<<x-1;I&f;)f>>=1;if(0!==f?(I&=f-1,I+=f):I=0,k++,0==--D[x]){if(x===_)break;x=t[r+u[k]]}if(T<x&&(I&m)!==g){for(0===O&&(O=T),b+=C,F=1<<(E=x-O);E+O<_&&!((F-=D[E+O])<=0);)E++,F<<=1;if(P+=1<<E,1===e&&852<P||2===e&&592<P)return 1;l[g=I&m]=T<<24|E<<16|b-h}}return 0!==I&&(l[b+I]=x-O<<24|64<<16),d.bits=T,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var a=e("../utils/common"),n=0,i=1;function s(e){for(var t=e.length;0<=--t;)e[t]=0}var o=0,c=29,l=256,h=l+1+c,u=30,d=19,f=2*h+1,p=15,g=16,m=7,b=256,y=16,v=17,w=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],C=new Array(2*(h+2));s(C);var _=new Array(2*u);s(_);var T=new Array(512);s(T);var E=new Array(256);s(E);var O=new Array(c);s(O);var F,P,I,M=new Array(u);function R(e,t,r,a,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=a,this.max_length=n,this.has_stree=e&&e.length}function D(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function N(e){return e<256?T[e]:T[256+(e>>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function B(e,t,r){e.bi_valid>g-r?(e.bi_buf|=t<<e.bi_valid&65535,L(e,e.bi_buf),e.bi_buf=t>>g-e.bi_valid,e.bi_valid+=r-g):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function j(e,t,r){B(e,r[2*t],r[2*t+1])}function $(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function U(e,t,r){var a,n,i=new Array(p+1),s=0;for(a=1;a<=p;a++)i[a]=s=s+r[a-1]<<1;for(n=0;n<=t;n++){var o=e[2*n+1];0!==o&&(e[2*n]=$(i[o]++,o))}}function z(e){var t;for(t=0;t<h;t++)e.dyn_ltree[2*t]=0;for(t=0;t<u;t++)e.dyn_dtree[2*t]=0;for(t=0;t<d;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*b]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function H(e){8<e.bi_valid?L(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function X(e,t,r,a){var n=2*t,i=2*r;return e[n]<e[i]||e[n]===e[i]&&a[t]<=a[r]}function W(e,t,r){for(var a=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&X(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!X(t,a,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=a}function G(e,t,r){var a,n,i,s,o=0;if(0!==e.last_lit)for(;a=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],n=e.pending_buf[e.l_buf+o],o++,0===a?j(e,n,t):(j(e,(i=E[n])+l+1,t),0!==(s=A[i])&&B(e,n-=O[i],s),j(e,i=N(--a),r),0!==(s=S[i])&&B(e,a-=M[i],s)),o<e.last_lit;);j(e,b,t)}function q(e,t){var r,a,n,i=t.dyn_tree,s=t.stat_desc.static_tree,o=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=f,r=0;r<c;r++)0!==i[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):i[2*r+1]=0;for(;e.heap_len<2;)i[2*(n=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[n]=0,e.opt_len--,o&&(e.static_len-=s[2*n+1]);for(t.max_code=l,r=e.heap_len>>1;1<=r;r--)W(e,i,r);for(n=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],W(e,i,1),a=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=a,i[2*n]=i[2*r]+i[2*a],e.depth[n]=(e.depth[r]>=e.depth[a]?e.depth[r]:e.depth[a])+1,i[2*r+1]=i[2*a+1]=n,e.heap[1]=n++,W(e,i,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,a,n,i,s,o,c=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,m=t.stat_desc.max_length,b=0;for(i=0;i<=p;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<f;r++)m<(i=c[2*c[2*(a=e.heap[r])+1]+1]+1)&&(i=m,b++),c[2*a+1]=i,l<a||(e.bl_count[i]++,s=0,g<=a&&(s=d[a-g]),o=c[2*a],e.opt_len+=o*(i+s),u&&(e.static_len+=o*(h[2*a+1]+s)));if(0!==b){do{for(i=m-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[m]--,b-=2}while(0<b);for(i=m;0!==i;i--)for(a=e.bl_count[i];0!==a;)l<(n=e.heap[--r])||(c[2*n+1]!==i&&(e.opt_len+=(i-c[2*n+1])*c[2*n],c[2*n+1]=i),a--)}}(e,t),U(i,l,e.bl_count)}function V(e,t,r){var a,n,i=-1,s=t[1],o=0,c=7,l=4;for(0===s&&(c=138,l=3),t[2*(r+1)+1]=65535,a=0;a<=r;a++)n=s,s=t[2*(a+1)+1],++o<c&&n===s||(o<l?e.bl_tree[2*n]+=o:0!==n?(n!==i&&e.bl_tree[2*n]++,e.bl_tree[2*y]++):o<=10?e.bl_tree[2*v]++:e.bl_tree[2*w]++,i=n,l=(o=0)===s?(c=138,3):n===s?(c=6,3):(c=7,4))}function K(e,t,r){var a,n,i=-1,s=t[1],o=0,c=7,l=4;for(0===s&&(c=138,l=3),a=0;a<=r;a++)if(n=s,s=t[2*(a+1)+1],!(++o<c&&n===s)){if(o<l)for(;j(e,n,e.bl_tree),0!=--o;);else 0!==n?(n!==i&&(j(e,n,e.bl_tree),o--),j(e,y,e.bl_tree),B(e,o-3,2)):o<=10?(j(e,v,e.bl_tree),B(e,o-3,3)):(j(e,w,e.bl_tree),B(e,o-11,7));i=n,l=(o=0)===s?(c=138,3):n===s?(c=6,3):(c=7,4)}}s(M);var Y=!1;function Z(e,t,r,n){B(e,(o<<1)+(n?1:0),3),function(e,t,r,n){H(e),n&&(L(e,r),L(e,~r)),a.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}r._tr_init=function(e){Y||(function(){var e,t,r,a,n,i=new Array(p+1);for(a=r=0;a<c-1;a++)for(O[a]=r,e=0;e<1<<A[a];e++)E[r++]=a;for(E[r-1]=a,a=n=0;a<16;a++)for(M[a]=n,e=0;e<1<<S[a];e++)T[n++]=a;for(n>>=7;a<u;a++)for(M[a]=n<<7,e=0;e<1<<S[a]-7;e++)T[256+n++]=a;for(t=0;t<=p;t++)i[t]=0;for(e=0;e<=143;)C[2*e+1]=8,e++,i[8]++;for(;e<=255;)C[2*e+1]=9,e++,i[9]++;for(;e<=279;)C[2*e+1]=7,e++,i[7]++;for(;e<=287;)C[2*e+1]=8,e++,i[8]++;for(U(C,h+1,i),e=0;e<u;e++)_[2*e+1]=5,_[2*e]=$(e,5);F=new R(C,A,l+1,h,p),P=new R(_,S,0,u,p),I=new R(new Array(0),x,0,d,m)}(),Y=!0),e.l_desc=new D(e.dyn_ltree,F),e.d_desc=new D(e.dyn_dtree,P),e.bl_desc=new D(e.bl_tree,I),e.bi_buf=0,e.bi_valid=0,z(e)},r._tr_stored_block=Z,r._tr_flush_block=function(e,t,r,a){var s,o,c=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return n;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return i;for(t=32;t<l;t++)if(0!==e.dyn_ltree[2*t])return i;return n}(e)),q(e,e.l_desc),q(e,e.d_desc),c=function(e){var t;for(V(e,e.dyn_ltree,e.l_desc.max_code),V(e,e.dyn_dtree,e.d_desc.max_code),q(e,e.bl_desc),t=d-1;3<=t&&0===e.bl_tree[2*k[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=s&&(s=o)):s=o=r+5,r+4<=s&&-1!==t?Z(e,t,r,a):4===e.strategy||o===s?(B(e,2+(a?1:0),3),G(e,C,_)):(B(e,4+(a?1:0),3),function(e,t,r,a){var n;for(B(e,t-257,5),B(e,r-1,5),B(e,a-4,4),n=0;n<a;n++)B(e,e.bl_tree[2*k[n]+1],3);K(e,e.dyn_ltree,t-1),K(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),G(e,e.dyn_ltree,e.dyn_dtree)),z(e),a&&H(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(E[r]+l+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){B(e,2,3),j(e,b,C),function(e){16===e.bi_valid?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,a){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var r,a,n,i,s=1,o={},c=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,r="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){d(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(i="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",f,!1):e.attachEvent("onmessage",f),function(t){e.postMessage(i+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){d(e.data)},function(e){n.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(a=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):function(e){setTimeout(d,0,e)},h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var n={callback:e,args:t};return o[s]=n,r(s),s++},h.clearImmediate=u}function u(e){delete o[e]}function d(e){if(c)setTimeout(d,0,e);else{var r=o[e];if(r){c=!0;try{!function(e){var r=e.callback,a=e.args;switch(a.length){case 0:r();break;case 1:r(a[0]);break;case 2:r(a[0],a[1]);break;case 3:r(a[0],a[1],a[2]);break;default:r.apply(t,a)}}(r)}finally{u(e),c=!1}}}}function f(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&d(+t.data.slice(i.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)},748:(module,__unused_webpack_exports,__webpack_require__)=>{var root,factory;root=globalThis,factory=()=>(()=>{"use strict";var __webpack_modules__=[,(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationReplyType=t.AnnotationPrefix=t.AnnotationMode=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||o(t)},t.bytesToString=h,t.createValidAbsoluteUrl=function(e,t=null,r=null){if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);t?.length>=2&&(e=`http://${e}`)}if(r.tryConvertEncoding)try{e=p(e)}catch{}}const a=t?new URL(e,t):new URL(e);if(function(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch{}return null},t.getModificationDate=function(e=new Date){return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getUuid=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();const e=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(255*Math.random());return h(e)},t.getVerbosityLevel=function(){return i},t.info=function(e){i>=n.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"==typeof e&&void 0!==e?.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(e[r]!==t[r])return!1;return!0},t.isNodeJS=void 0,t.normalizeUnicode=function(e){return g||(g=/([\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,m=new Map([["ﬅ","ſt"]])),e.replaceAll(g,((e,t,r)=>t?t.normalize("NFKC"):m.get(r)))},t.objectFromMap=function(e){const t=Object.create(null);for(const[r,a]of e)t[r]=a;return t},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(i=e)},t.shadow=c,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=u,t.stringToPDFString=function(e){if(e[0]>="ï"){let t;if("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const r=new TextDecoder(t,{fatal:!0}),a=u(e);return r.decode(a)}catch(e){s(`stringToPDFString: "${e}".`)}}const t=[];for(let r=0,a=e.length;r<a;r++){const a=f[e.charCodeAt(r)];t.push(a?String.fromCharCode(a):e.charAt(r))}return t.join("")},t.stringToUTF8String=p,t.unreachable=o,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=s;const r=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=r,t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.MAX_IMAGE_SIZE_TO_CACHE=1e7,t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35;const a=.35/1.35;t.BASELINE_FACTOR=a,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},t.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"};const n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n,t.CMapCompressionType={NONE:0,BINARY:1},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let i=n.WARNINGS;function s(e){i>=n.WARNINGS&&console.log(`Warning: ${e}`)}function o(e){throw new Error(e)}function c(e,t,r,a=!1){return Object.defineProperty(e,t,{value:r,enumerable:!a,configurable:!0,writable:!1}),r}const l=function(){function e(t,r){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}();function h(e){"object"==typeof e&&void 0!==e?.length||o("Invalid argument for bytesToString");const t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);const a=[];for(let n=0;n<t;n+=r){const i=Math.min(n+r,t),s=e.subarray(n,i);a.push(String.fromCharCode.apply(null,s))}return a.join("")}function u(e){"string"!=typeof e&&o("Invalid argument for stringToBytes");const t=e.length,r=new Uint8Array(t);for(let a=0;a<t;++a)r[a]=255&e.charCodeAt(a);return r}t.BaseException=l,t.PasswordException=class extends l{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends l{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends l{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends l{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends l{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends l{constructor(e){super(e,"FormatError")}},t.AbortException=class extends l{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return c(this,"isLittleEndian",function(){const e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){return c(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return c(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?c(this,"platform",{isWin:!1,isMac:!1}):c(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return c(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};const d=[...Array(256).keys()].map((e=>e.toString(16).padStart(2,"0")));t.Util=class{static makeHexColor(e,t,r){return`#${d[e]}${d[t]}${d[r]}`}static scaleMinMax(e,t){let r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,e[1]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}static getAxialAlignedBoundingBox(e,t){const r=this.applyTransform(e,t),a=this.applyTransform(e.slice(2,4),t),n=this.applyTransform([e[0],e[3]],t),i=this.applyTransform([e[2],e[1]],t);return[Math.min(r[0],a[0],n[0],i[0]),Math.min(r[1],a[1],n[1],i[1]),Math.max(r[0],a[0],n[0],i[0]),Math.max(r[1],a[1],n[1],i[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],a=e[0]*t[1]+e[1]*t[3],n=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],s=(r+i)/2,o=Math.sqrt((r+i)**2-4*(r*i-n*a))/2,c=s+o||1,l=s-o||1;return[Math.sqrt(c),Math.sqrt(l)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),a=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>a)return null;const n=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return n>i?null:[r,n,a,i]}static bezierBoundingBox(e,t,r,a,n,i,s,o){const c=[],l=[[],[]];let h,u,d,f,p,g,m,b;for(let l=0;l<2;++l)if(0===l?(u=6*e-12*r+6*n,h=-3*e+9*r-9*n+3*s,d=3*r-3*e):(u=6*t-12*a+6*i,h=-3*t+9*a-9*i+3*o,d=3*a-3*t),Math.abs(h)<1e-12){if(Math.abs(u)<1e-12)continue;f=-d/u,0<f&&f<1&&c.push(f)}else m=u*u-4*d*h,b=Math.sqrt(m),m<0||(p=(-u+b)/(2*h),0<p&&p<1&&c.push(p),g=(-u-b)/(2*h),0<g&&g<1&&c.push(g));let y,v=c.length;const w=v;for(;v--;)f=c[v],y=1-f,l[0][v]=y*y*y*e+3*y*y*f*r+3*y*f*f*n+f*f*f*s,l[1][v]=y*y*y*t+3*y*y*f*a+3*y*f*f*i+f*f*f*o;return l[0][w]=e,l[1][w]=t,l[0][w+1]=s,l[1][w+1]=o,l[0].length=l[1].length=w+2,[Math.min(...l[0]),Math.min(...l[1]),Math.max(...l[0]),Math.max(...l[1])]}};const f=[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 p(e){return decodeURIComponent(escape(e))}t.PromiseCapability=class{#e=!1;constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{this.#e=!0,e(t)},this.reject=e=>{this.#e=!0,t(e)}}))}get settled(){return this.#e}};let g=null,m=null;t.AnnotationPrefix="pdfjs_internal_id_"},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{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;function getDocument(e){if("string"==typeof e||e instanceof URL?e={url:e}:(0,_util.isArrayBuffer)(e)&&(e={data:e}),"object"!=typeof e)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const t=new PDFDocumentLoadingTask,{docId:r}=t,a=e.url?getUrlProp(e.url):null,n=e.data?getDataProp(e.data):null,i=e.httpHeaders||null,s=!0===e.withCredentials,o=e.password??null,c=e.range instanceof PDFDataRangeTransport?e.range:null,l=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let h=e.worker instanceof PDFWorker?e.worker:null;const u=e.verbosity,d="string"!=typeof e.docBaseUrl||(0,_display_utils.isDataScheme)(e.docBaseUrl)?null:e.docBaseUrl,f="string"==typeof e.cMapUrl?e.cMapUrl:null,p=!1!==e.cMapPacked,g=e.CMapReaderFactory||DefaultCMapReaderFactory,m="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,b=e.StandardFontDataFactory||DefaultStandardFontDataFactory,y=!0!==e.stopAtErrors,v=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,w=!1!==e.isEvalSupported,A="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!_util.isNodeJS,S=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,x="boolean"==typeof e.disableFontFace?e.disableFontFace:_util.isNodeJS,k=!0===e.fontExtraProperties,C=!0===e.enableXfa,_=e.ownerDocument||globalThis.document,T=!0===e.disableRange,E=!0===e.disableStream,O=!0===e.disableAutoFetch,F=!0===e.pdfBug,P=c?c.length:e.length??NaN,I="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!_util.isNodeJS&&!x,M="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:g===_display_utils.DOMCMapReaderFactory&&b===_display_utils.DOMStandardFontDataFactory&&f&&m&&(0,_display_utils.isValidFetchUrl)(f,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(m,document.baseURI),R=e.canvasFactory||new DefaultCanvasFactory({ownerDocument:_}),D=e.filterFactory||new DefaultFilterFactory({docId:r,ownerDocument:_});(0,_util.setVerbosityLevel)(u);const N={canvasFactory:R,filterFactory:D};if(M||(N.cMapReaderFactory=new g({baseUrl:f,isCompressed:p}),N.standardFontDataFactory=new b({baseUrl:m})),!h){const e={verbosity:u,port:_worker_options.GlobalWorkerOptions.workerPort};h=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=h}const L={docId:r,apiVersion:"3.11.174",data:n,password:o,disableAutoFetch:O,rangeChunkSize:l,length:P,docBaseUrl:d,enableXfa:C,evaluatorOptions:{maxImageSize:v,disableFontFace:x,ignoreErrors:y,isEvalSupported:w,isOffscreenCanvasSupported:A,canvasMaxAreaInBytes:S,fontExtraProperties:k,useSystemFonts:I,cMapUrl:M?f:null,standardFontDataUrl:M?m:null}},B={ignoreErrors:y,isEvalSupported:w,disableFontFace:x,fontExtraProperties:k,enableXfa:C,ownerDocument:_,disableAutoFetch:O,pdfBug:F,styleElement:null};return h.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(h,L),o=new Promise((function(e){let t;var r;c?t=new _transport_stream.PDFDataTransportStream({length:P,initialData:c.initialData,progressiveDone:c.progressiveDone,contentDispositionFilename:c.contentDispositionFilename,disableRange:T,disableStream:E},c):n||(r={url:a,length:P,httpHeaders:i,withCredentials:s,rangeChunkSize:l,disableRange:T,disableStream:E},t=_util.isNodeJS?new _displayNode_stream.PDFNodeStream(r):(0,_display_utils.isValidFetchUrl)(r.url)?new _displayFetch_stream.PDFFetchStream(r):new _displayNetwork.PDFNetworkStream(r)),e(t)}));return Promise.all([e,o]).then((function([e,a]){if(t.destroyed)throw new Error("Loading aborted");const n=new _message_handler.MessageHandler(r,e,h.port),i=new WorkerTransport(n,t,a,B,N);t._transport=i,n.send("Ready",null)}))})).catch(t._capability.reject),t}async function _fetchDocument(e,t){if(e.destroyed)throw new Error("Worker was destroyed");const r=await e.messageHandler.sendWithPromise("GetDocRequest",t,t.data?[t.data.buffer]:null);if(e.destroyed)throw new Error("Worker was destroyed");return r}function getUrlProp(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(_util.isNodeJS&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(e){if(_util.isNodeJS&&"undefined"!=typeof Buffer&&e instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return(0,_util.stringToBytes)(e);if("object"==typeof e&&!isNaN(e?.length)||(0,_util.isArrayBuffer)(e))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;class PDFDocumentLoadingTask{static#L=0;constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+PDFDocumentLoadingTask.#L++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await(this._transport?.destroy())}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(e,t,r=!1,a=null){this.length=e,this.initialData=t,this.progressiveDone=r,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const r of this._rangeListeners)r(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const r of this._progressListeners)r(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then((e=>{if(!e)return e;const t=[];for(const r in e)t.push(...e[r]);return t})))})}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(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}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(e=!1){return this._transport.startCleanup(e||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{#B=null;#j=!1;constructor(e,t,r,a=!1){this._pageIndex=e,this._pageInfo=t,this._transport=r,this._stats=a?new _display_utils.StatTimer:null,this._pdfBug=a,this.commonObjs=r.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:e,rotation:t=this.rotate,offsetX:r=0,offsetY:a=0,dontFlip:n=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:r,offsetY:a,dontFlip:n})}getAnnotations({intent:e="display"}={}){const t=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t.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(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:r="display",annotationMode:a=_util.AnnotationMode.ENABLE,transform:n=null,background:i=null,optionalContentConfigPromise:s=null,annotationCanvasMap:o=null,pageColors:c=null,printAnnotationStorage:l=null}){this._stats?.time("Overall");const h=this._transport.getRenderingIntent(r,a,l);this.#j=!1,this.#$(),s||(s=this._transport.getOptionalContentConfig());let u=this._intentStates.get(h.cacheKey);u||(u=Object.create(null),this._intentStates.set(h.cacheKey,u)),u.streamReaderCancelTimeout&&(clearTimeout(u.streamReaderCancelTimeout),u.streamReaderCancelTimeout=null);const d=!!(h.renderingIntent&_util.RenderingIntentFlag.PRINT);u.displayReadyCapability||(u.displayReadyCapability=new _util.PromiseCapability,u.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(h));const f=e=>{u.renderTasks.delete(p),(this._maybeCleanupAfterRender||d)&&(this.#j=!0),this.#U(!d),e?(p.capability.reject(e),this._abortOperatorList({intentState:u,reason:e instanceof Error?e:new Error(e)})):p.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")},p=new InternalRenderTask({callback:f,params:{canvasContext:e,viewport:t,transform:n,background:i},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:o,operatorList:u.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!d,pdfBug:this._pdfBug,pageColors:c});(u.renderTasks||=new Set).add(p);const g=p.task;return Promise.all([u.displayReadyCapability.promise,s]).then((([e,t])=>{this.destroyed?f():(this._stats?.time("Rendering"),p.initializeGraphics({transparency:e,optionalContentConfig:t}),p.operatorListChanged())})).catch(f),g}getOperatorList({intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:r=null}={}){const a=this._transport.getRenderingIntent(e,t,r,!0);let n,i=this._intentStates.get(a.cacheKey);return i||(i=Object.create(null),this._intentStates.set(a.cacheKey,i)),i.opListReadCapability||(n=Object.create(null),n.operatorListChanged=function(){i.operatorList.lastChunk&&(i.opListReadCapability.resolve(i.operatorList),i.renderTasks.delete(n))},i.opListReadCapability=new _util.PromiseCapability,(i.renderTasks||=new Set).add(n),i.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(a)),i.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then((e=>_xfa_text.XfaText.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,r){const a=t.getReader(),n={items:[],styles:Object.create(null)};!function t(){a.read().then((function({value:r,done:a}){a?e(n):(Object.assign(n.styles,r.styles),n.items.push(...r.items),t())}),r)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const r of t.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),this.#j=!1,this.#$(),Promise.all(e)}cleanup(e=!1){this.#j=!0;const t=this.#U(!1);return e&&t&&(this._stats&&=new _display_utils.StatTimer),t}#U(e=!1){if(this.#$(),!this.#j||this.destroyed)return!1;if(e)return this.#B=setTimeout((()=>{this.#B=null,this.#U(!1)}),DELAYED_CLEANUP_TIMEOUT),!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#j=!1,!0}#$(){this.#B&&(clearTimeout(this.#B),this.#B=null)}_startRenderPage(e,t){const r=this._intentStates.get(t);r&&(this._stats?.timeEnd("Page Request"),r.displayReadyCapability?.resolve(e))}_renderPageChunk(e,t){for(let r=0,a=e.length;r<a;r++)t.operatorList.fnArray.push(e.fnArray[r]),t.operatorList.argsArray.push(e.argsArray[r]);t.operatorList.lastChunk=e.lastChunk,t.operatorList.separateAnnots=e.separateAnnots;for(const e of t.renderTasks)e.operatorListChanged();e.lastChunk&&this.#U(!0)}_pumpOperatorList({renderingIntent:e,cacheKey:t,annotationStorageSerializable:r}){const{map:a,transfers:n}=r,i=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:a},n).getReader(),s=this._intentStates.get(t);s.streamReader=i;const o=()=>{i.read().then((({value:e,done:t})=>{t?s.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,s),o())}),(e=>{if(s.streamReader=null,!this._transport.destroyed){if(s.operatorList){s.operatorList.lastChunk=!0;for(const e of s.renderTasks)e.operatorListChanged();this.#U(!0)}if(s.displayReadyCapability)s.displayReadyCapability.reject(e);else{if(!s.opListReadCapability)throw e;s.opListReadCapability.reject(e)}}}))};o()}_abortOperatorList({intentState:e,reason:t,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(t instanceof _display_utils.RenderingCancelledException){let r=RENDERING_CANCELLED_TIMEOUT;return t.extraDelay>0&&t.extraDelay<1e3&&(r+=t.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})}),r))}}if(e.streamReader.cancel(new _util.AbortException(t.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,r]of this._intentStates)if(r===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#z=new Set;#H=Promise.resolve();postMessage(e,t){const r={data:structuredClone(e,t?{transfer:t}:null)};this.#H.then((()=>{for(const e of this.#z)e.call(this,r)}))}addEventListener(e,t){this.#z.add(t)}removeEventListener(e,t){this.#z.delete(t)}terminate(){this.#z.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_util.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const e=document?.currentScript?.src;e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch{return!1}const a=new URL(t,r);return r.origin===a.origin},PDFWorkerUtil.createCDNWrapper=function(e){const t=`importScripts("${e}");`;return URL.createObjectURL(new Blob([t]))};class PDFWorker{static#X;constructor({name:e=null,port:t=null,verbosity:r=(0,_util.getVerbosityLevel)()}={}){if(this.name=e,this.destroyed=!1,this.verbosity=r,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,t){if(PDFWorker.#X?.has(t))throw new Error("Cannot use more than one PDFWorker per port.");return(PDFWorker.#X||=new WeakMap).set(t,this),void this._initializeFromPort(t)}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:e}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,e)||(e=PDFWorkerUtil.createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),r=new _message_handler.MessageHandler("main","worker",t),a=()=>{t.removeEventListener("error",n),r.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},n=()=>{this._webWorker||a()};t.addEventListener("error",n),r.on("test",(e=>{t.removeEventListener("error",n),this.destroyed?a():e?(this._messageHandler=r,this._port=t,this._webWorker=t,this._readyCapability.resolve(),r.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),r.destroy(),t.terminate())})),r.on("ready",(e=>{if(t.removeEventListener("error",n),this.destroyed)a();else try{i()}catch{this._setupFakeWorker()}}));const i=()=>{const e=new Uint8Array;r.send("test",e,[e.buffer])};return void i()}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((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const r="fake"+PDFWorkerUtil.fakeWorkerId++,a=new _message_handler.MessageHandler(r+"_worker",r,t);e.setup(a,t);const n=new _message_handler.MessageHandler(r,r+"_worker",t);this._messageHandler=n,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#X?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const t=this.#X?.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS){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())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#W=new Map;#G=new Map;#q=new Map;#V=null;constructor(e,t,r,a,n){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:a.ownerDocument,styleElement:a.styleElement}),this._params=a,this.canvasFactory=n.canvasFactory,this.filterFactory=n.filterFactory,this.cMapReaderFactory=n.cMapReaderFactory,this.standardFontDataFactory=n.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}#K(e,t=null){const r=this.#W.get(e);if(r)return r;const a=this.messageHandler.sendWithPromise(e,t);return this.#W.set(e,a),a}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(e,t=_util.AnnotationMode.ENABLE,r=null,a=!1){let n=_util.RenderingIntentFlag.DISPLAY,i=_annotation_storage.SerializableEmpty;switch(e){case"any":n=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":n=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${e}`)}switch(t){case _util.AnnotationMode.DISABLE:n+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:n+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:n+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,i=(n&_util.RenderingIntentFlag.PRINT&&r instanceof _annotation_storage.PrintAnnotationStorage?r:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${t}`)}return a&&(n+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:n,cacheKey:`${n}_${i.hash}`,annotationStorageSerializable:i}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this.#V?.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const t of this.#G.values())e.push(t._destroy());this.#G.clear(),this.#q.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#W.clear(),this.filterFactory.destroy(),this._networkStream?.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:r}){r?t.close():((0,_util.assert)(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(e=>{const r=new _util.PromiseCapability,a=this._fullReader;return a.headersReady.then((()=>{a.isStreamingSupported&&a.isRangeSupported||(this._lastProgress&&t.onProgress?.(this._lastProgress),a.onProgress=e=>{t.onProgress?.({loaded:e.loaded,total:e.total})}),r.resolve({isStreamingSupported:a.isStreamingSupported,isRangeSupported:a.isRangeSupported,contentLength:a.contentLength})}),r.reject),r.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const r=this._networkStream.getRangeReader(e.begin,e.end);r?(t.onPull=()=>{r.read().then((function({value:e,done:r}){r?t.close():((0,_util.assert)(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{r.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(e,this))})),e.on("DocException",(function(e){let r;switch(e.name){case"PasswordException":r=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":r=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(r)})),e.on("PasswordRequest",(e=>{if(this.#V=new _util.PromiseCapability,t.onPassword){const r=e=>{e instanceof Error?this.#V.reject(e):this.#V.resolve({password:e})};try{t.onPassword(r,e.code)}catch(e){this.#V.reject(e)}}else this.#V.reject(new _util.PasswordException(e.message,e.code));return this.#V.promise})),e.on("DataLoaded",(e=>{t.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||this.#G.get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(([t,r,a])=>{if(!this.destroyed&&!this.commonObjs.has(t))switch(r){case"Font":const n=this._params;if("error"in a){const e=a.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(t,e);break}const i=n.pdfBug&&globalThis.FontInspector?.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,s=new _font_loader.FontFaceObject(a,{isEvalSupported:n.isEvalSupported,disableFontFace:n.disableFontFace,ignoreErrors:n.ignoreErrors,inspectFont:i});this.fontLoader.bind(s).catch((r=>e.sendWithPromise("FontFallback",{id:t}))).finally((()=>{!n.fontExtraProperties&&s.data&&(s.data=null),this.commonObjs.resolve(t,s)}));break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(t,a);break;default:throw new Error(`Got unknown common object type ${r}`)}})),e.on("obj",(([e,t,r,a])=>{if(this.destroyed)return;const n=this.#G.get(t);if(!n.objs.has(e))switch(r){case"Image":if(n.objs.resolve(e,a),a){let e;if(a.bitmap){const{width:t,height:r}=a;e=t*r*4}else e=a.data?.length||0;e>_util.MAX_IMAGE_SIZE_TO_CACHE&&(n._maybeCleanupAfterRender=!0)}break;case"Pattern":n.objs.resolve(e,a);break;default:throw new Error(`Got unknown object type ${r}`)}})),e.on("DocProgress",(e=>{this.destroyed||t.onProgress?.({loaded:e.loaded,total:e.total})})),e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:e,transfers:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,r=this.#q.get(t);if(r)return r;const a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed");const r=new PDFPageProxy(t,e,this,this._params.pdfBug);return this.#G.set(t,r),r}));return this.#q.set(t,a),a}getPageIndex(e){return"object"!=typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#K("GetFieldObjects")}hasJSActions(){return this.#K("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}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 this.#K("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((e=>new _optional_content_config.OptionalContentConfig(e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=this.#W.get(e);if(t)return t;const r=this.messageHandler.sendWithPromise(e,null).then((e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));return this.#W.set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of this.#G.values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),this.#W.clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:e,enableXfa:t}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e,enableXfa:t})}}class PDFObjects{#Y=Object.create(null);#Z(e){return this.#Y[e]||={capability:new _util.PromiseCapability,data:null}}get(e,t=null){if(t){const r=this.#Z(e);return r.capability.promise.then((()=>t(r.data))),null}const r=this.#Y[e];if(!r?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){const t=this.#Y[e];return t?.capability.settled||!1}resolve(e,t=null){const r=this.#Z(e);r.data=t,r.capability.resolve()}clear(){for(const e in this.#Y){const{data:t}=this.#Y[e];t?.bitmap?.close()}this.#Y=Object.create(null)}}class RenderTask{#J=null;constructor(e){this.#J=e,this.onContinue=null}get promise(){return this.#J.capability.promise}cancel(e=0){this.#J.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this.#J.operatorList;if(!e)return!1;const{annotationCanvasMap:t}=this.#J;return e.form||e.canvas&&t?.size>0}}exports.RenderTask=RenderTask;class InternalRenderTask{static#Q=new WeakSet;constructor({callback:e,params:t,objs:r,commonObjs:a,annotationCanvasMap:n,operatorList:i,pageIndex:s,canvasFactory:o,filterFactory:c,useRequestAnimationFrame:l=!1,pdfBug:h=!1,pageColors:u=null}){this.callback=e,this.params=t,this.objs=r,this.commonObjs=a,this.annotationCanvasMap=n,this.operatorListIdx=null,this.operatorList=i,this._pageIndex=s,this.canvasFactory=o,this.filterFactory=c,this._pdfBug=h,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===l&&"undefined"!=typeof window,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=t.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#Q.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#Q.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:r,viewport:a,transform:n,background:i}=this.params;this.gfx=new _canvas.CanvasGraphics(r,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:n,viewport:a,transparency:e,background:i}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),InternalRenderTask.#Q.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,t))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}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(),InternalRenderTask.#Q.delete(this._canvas),this.callback())))}}const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SerializableEmpty=t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var a=r(1),n=r(4),i=r(8);const s=Object.freeze({map:null,hash:"",transfers:void 0});t.SerializableEmpty=s;class o{#ee=!1;#te=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const r=this.#te.get(e);return void 0===r?t:Object.assign(t,r)}getRawValue(e){return this.#te.get(e)}remove(e){if(this.#te.delete(e),0===this.#te.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of this.#te.values())if(e instanceof n.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){const r=this.#te.get(e);let a=!1;if(void 0!==r)for(const[e,n]of Object.entries(t))r[e]!==n&&(a=!0,r[e]=n);else a=!0,this.#te.set(e,t);a&&this.#re(),t instanceof n.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#te.has(e)}getAll(){return this.#te.size>0?(0,a.objectFromMap)(this.#te):null}setAll(e){for(const[t,r]of Object.entries(e))this.setValue(t,r)}get size(){return this.#te.size}#re(){this.#ee||(this.#ee=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#ee&&(this.#ee=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new c(this)}get serializable(){if(0===this.#te.size)return s;const e=new Map,t=new i.MurmurHash3_64,r=[],a=Object.create(null);let o=!1;for(const[r,i]of this.#te){const s=i instanceof n.AnnotationEditor?i.serialize(!1,a):i;s&&(e.set(r,s),t.update(`${r}:${JSON.stringify(s)}`),o||=!!s.bitmap)}if(o)for(const t of e.values())t.bitmap&&r.push(t.bitmap);return e.size>0?{map:e,hash:t.hexdigest(),transfers:r}:s}}t.AnnotationStorage=o;class c extends o{#ae;constructor(e){super();const{map:t,hash:r,transfers:a}=e.serializable,n=structuredClone(t,a?{transfer:a}:null);this.#ae={map:n,hash:r,transfers:a}}get print(){(0,a.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#ae}}t.PrintAnnotationStorage=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var a=r(5),n=r(1),i=r(6);class s{#ne="";#ie=!1;#se=null;#oe=null;#ce=null;#le=!1;#he=null;#ue=this.focusin.bind(this);#de=this.focusout.bind(this);#fe=!1;#pe=!1;#ge=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#me=!1;#be=s._zIndex++;static _borderLineWidth=-1;static _colorManager=new a.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(e){this.constructor===s&&(0,n.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;const{rotation:t,rawDims:{pageWidth:r,pageHeight:a,pageX:i,pageY:o}}=this.parent.viewport;this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,a],this.pageTranslation=[i,o];const[c,l]=this.parentDimensions;this.x=e.x/c,this.y=e.y/l,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,n.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){const t=new o({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(e,t=null){if(s._l10nPromise||=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map((t=>[t,e.get(t)]))),t?.strings)for(const r of t.strings)s._l10nPromise.set(r,e.get(r));if(-1!==s._borderLineWidth)return;const r=getComputedStyle(document.documentElement);s._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){(0,n.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#me}set _isDraggable(e){this.#me=e,this.div?.classList.toggle("draggable",e)}center(){const[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#be}setParent(e){null!==e&&(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#fe?this.#fe=!1:this.parent.setSelected(this))}focusout(e){if(!this._focusEventsAllowed)return;if(!this.isAttachedToDOM)return;const t=e.relatedTarget;t?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,r,a){const[n,i]=this.parentDimensions;[r,a]=this.screenToPageTranslation(r,a),this.x=(e+r)/n,this.y=(t+a)/i,this.fixAndSetPosition()}#ye([e,t],r,a){[r,a]=this.screenToPageTranslation(r,a),this.x+=r/e,this.y+=a/t,this.fixAndSetPosition()}translate(e,t){this.#ye(this.parentDimensions,e,t)}translateInPage(e,t){this.#ye(this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){const[r,a]=this.parentDimensions;if(this.x+=e/r,this.y+=t/a,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:n,y:i}=this;const[s,o]=this.#ve();n+=s,i+=o,this.div.style.left=`${(100*n).toFixed(2)}%`,this.div.style.top=`${(100*i).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}#ve(){const[e,t]=this.parentDimensions,{_borderLineWidth:r}=s,a=r/e,n=r/t;switch(this.rotation){case 90:return[-a,n];case 180:return[a,n];case 270:return[a,-n];default:return[-a,-n]}}fixAndSetPosition(){const[e,t]=this.pageDimensions;let{x:r,y:a,width:n,height:i}=this;switch(n*=e,i*=t,r*=e,a*=t,this.rotation){case 0:r=Math.max(0,Math.min(e-n,r)),a=Math.max(0,Math.min(t-i,a));break;case 90:r=Math.max(0,Math.min(e-i,r)),a=Math.min(t,Math.max(n,a));break;case 180:r=Math.min(e,Math.max(n,r)),a=Math.min(t,Math.max(i,a));break;case 270:r=Math.min(e,Math.max(i,r)),a=Math.max(0,Math.min(t-n,a))}this.x=r/=e,this.y=a/=t;const[s,o]=this.#ve();r+=s,a+=o;const{style:c}=this.div;c.left=`${(100*r).toFixed(2)}%`,c.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}static#we(e,t,r){switch(r){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}screenToPageTranslation(e,t){return s.#we(e,t,this.parentRotation)}pageTranslationToScreen(e,t){return s.#we(e,t,360-this.parentRotation)}#Ae(e){switch(e){case 90:{const[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,t]=this.pageDimensions;return[0,e/t,-t/e,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:e,pageDimensions:[t,r]}=this,a=t*e,i=r*e;return n.FeatureTest.isCSSRoundSupported?[Math.round(a),Math.round(i)]:[a,i]}setDims(e,t){const[r,a]=this.parentDimensions;this.div.style.width=`${(100*e/r).toFixed(2)}%`,this.#le||(this.div.style.height=`${(100*t/a).toFixed(2)}%`),this.#se?.classList.toggle("small",e<s.SMALL_EDITOR_SIZE||t<s.SMALL_EDITOR_SIZE)}fixDims(){const{style:e}=this.div,{height:t,width:r}=e,a=r.endsWith("%"),n=!this.#le&&t.endsWith("%");if(a&&n)return;const[i,s]=this.parentDimensions;a||(e.width=`${(100*parseFloat(r)/i).toFixed(2)}%`),this.#le||n||(e.height=`${(100*parseFloat(t)/s).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#Se(){if(this.#he)return;this.#he=document.createElement("div"),this.#he.classList.add("resizers");const e=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||e.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const t of e){const e=document.createElement("div");this.#he.append(e),e.classList.add("resizer",t),e.addEventListener("pointerdown",this.#xe.bind(this,t)),e.addEventListener("contextmenu",i.noContextMenu)}this.div.prepend(this.#he)}#xe(e,t){t.preventDefault();const{isMac:r}=n.FeatureTest.platform;if(0!==t.button||t.ctrlKey&&r)return;const a=this.#ke.bind(this,e),i=this._isDraggable;this._isDraggable=!1;const s={passive:!0,capture:!0};window.addEventListener("pointermove",a,s);const o=this.x,c=this.y,l=this.width,h=this.height,u=this.parent.div.style.cursor,d=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor;const f=()=>{this._isDraggable=i,window.removeEventListener("pointerup",f),window.removeEventListener("blur",f),window.removeEventListener("pointermove",a,s),this.parent.div.style.cursor=u,this.div.style.cursor=d;const e=this.x,t=this.y,r=this.width,n=this.height;e===o&&t===c&&r===l&&n===h||this.addCommands({cmd:()=>{this.width=r,this.height=n,this.x=e,this.y=t;const[a,i]=this.parentDimensions;this.setDims(a*r,i*n),this.fixAndSetPosition()},undo:()=>{this.width=l,this.height=h,this.x=o,this.y=c;const[e,t]=this.parentDimensions;this.setDims(e*l,t*h),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",f),window.addEventListener("blur",f)}#ke(e,t){const[r,a]=this.parentDimensions,n=this.x,i=this.y,o=this.width,c=this.height,l=s.MIN_SIZE/r,h=s.MIN_SIZE/a,u=e=>Math.round(1e4*e)/1e4,d=this.#Ae(this.rotation),f=(e,t)=>[d[0]*e+d[2]*t,d[1]*e+d[3]*t],p=this.#Ae(360-this.rotation);let g,m,b=!1,y=!1;switch(e){case"topLeft":b=!0,g=(e,t)=>[0,0],m=(e,t)=>[e,t];break;case"topMiddle":g=(e,t)=>[e/2,0],m=(e,t)=>[e/2,t];break;case"topRight":b=!0,g=(e,t)=>[e,0],m=(e,t)=>[0,t];break;case"middleRight":y=!0,g=(e,t)=>[e,t/2],m=(e,t)=>[0,t/2];break;case"bottomRight":b=!0,g=(e,t)=>[e,t],m=(e,t)=>[0,0];break;case"bottomMiddle":g=(e,t)=>[e/2,t],m=(e,t)=>[e/2,0];break;case"bottomLeft":b=!0,g=(e,t)=>[0,t],m=(e,t)=>[e,0];break;case"middleLeft":y=!0,g=(e,t)=>[0,t/2],m=(e,t)=>[e,t/2]}const v=g(o,c),w=m(o,c);let A=f(...w);const S=u(n+A[0]),x=u(i+A[1]);let k=1,C=1,[_,T]=this.screenToPageTranslation(t.movementX,t.movementY);var E,O;if([_,T]=(E=_/r,O=T/a,[p[0]*E+p[2]*O,p[1]*E+p[3]*O]),b){const e=Math.hypot(o,c);k=C=Math.max(Math.min(Math.hypot(w[0]-v[0]-_,w[1]-v[1]-T)/e,1/o,1/c),l/o,h/c)}else y?k=Math.max(l,Math.min(1,Math.abs(w[0]-v[0]-_)))/o:C=Math.max(h,Math.min(1,Math.abs(w[1]-v[1]-T)))/c;const F=u(o*k),P=u(c*C);A=f(...m(F,P));const I=S-A[0],M=x-A[1];this.width=F,this.height=P,this.x=I,this.y=M,this.setDims(r*F,a*P),this.fixAndSetPosition()}async addAltTextButton(){if(this.#se)return;const e=this.#se=document.createElement("button");e.className="altText";const t=await s._l10nPromise.get("editor_alt_text_button_label");if(e.textContent=t,e.setAttribute("aria-label",t),e.tabIndex="0",e.addEventListener("contextmenu",i.noContextMenu),e.addEventListener("pointerdown",(e=>e.stopPropagation())),e.addEventListener("click",(e=>{e.preventDefault(),this._uiManager.editAltText(this)}),{capture:!0}),e.addEventListener("keydown",(t=>{t.target===e&&"Enter"===t.key&&(t.preventDefault(),this._uiManager.editAltText(this))})),this.#Ce(),this.div.append(e),!s.SMALL_EDITOR_SIZE){const t=40;s.SMALL_EDITOR_SIZE=Math.min(128,Math.round(e.getBoundingClientRect().width*(1+t/100)))}}async#Ce(){const e=this.#se;if(!e)return;if(!this.#ne&&!this.#ie)return e.classList.remove("done"),void this.#oe?.remove();s._l10nPromise.get("editor_alt_text_edit_button_label").then((t=>{e.setAttribute("aria-label",t)}));let t=this.#oe;if(!t){this.#oe=t=document.createElement("span"),t.className="tooltip",t.setAttribute("role","tooltip");const r=t.id=`alt-text-tooltip-${this.id}`;e.setAttribute("aria-describedby",r);const a=100;e.addEventListener("mouseenter",(()=>{this.#ce=setTimeout((()=>{this.#ce=null,this.#oe.classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})}),a)})),e.addEventListener("mouseleave",(()=>{clearTimeout(this.#ce),this.#ce=null,this.#oe?.classList.remove("show")}))}e.classList.add("done"),t.innerText=this.#ie?await s._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#ne,t.parentNode||e.append(t)}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#ne,decorative:this.#ie}}set altTextData({altText:e,decorative:t}){this.#ne===e&&this.#ie===t||(this.#ne=e,this.#ie=t,this.#Ce())}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",this.#ue),this.div.addEventListener("focusout",this.#de);const[e,t]=this.parentDimensions;this.parentRotation%180!=0&&(this.div.style.maxWidth=`${(100*t/e).toFixed(2)}%`,this.div.style.maxHeight=`${(100*e/t).toFixed(2)}%`);const[r,n]=this.getInitialTranslation();return this.translate(r,n),(0,a.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(e){const{isMac:t}=n.FeatureTest.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(this.#fe=!0,this.#_e(e))}#_e(e){if(!this._isDraggable)return;const t=this._uiManager.isSelected(this);let r,a;this._uiManager.setUpDragSession(),t&&(r={passive:!0,capture:!0},a=e=>{const[t,r]=this.screenToPageTranslation(e.movementX,e.movementY);this._uiManager.dragSelectedEditors(t,r)},window.addEventListener("pointermove",a,r));const i=()=>{if(window.removeEventListener("pointerup",i),window.removeEventListener("blur",i),t&&window.removeEventListener("pointermove",a,r),this.#fe=!1,!this._uiManager.endDragSession()){const{isMac:t}=n.FeatureTest.platform;e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",i),window.addEventListener("blur",i)}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(e,t,r){e.changeParent(this),this.x=t,this.y=r,this.fixAndSetPosition()}getRect(e,t){const r=this.parentScale,[a,n]=this.pageDimensions,[i,s]=this.pageTranslation,o=e/r,c=t/r,l=this.x*a,h=this.y*n,u=this.width*a,d=this.height*n;switch(this.rotation){case 0:return[l+o+i,n-h-c-d+s,l+o+u+i,n-h-c+s];case 90:return[l+c+i,n-h+o+s,l+c+d+i,n-h+o+u+s];case 180:return[l-o-u+i,n-h+c+s,l-o+i,n-h+c+d+s];case 270:return[l-c-d+i,n-h-o-u+s,l-c+i,n-h-o+s];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[r,a,n,i]=e,s=n-r,o=i-a;switch(this.rotation){case 0:return[r,t-i,s,o];case 90:return[r,t-a,o,s];case 180:return[n,t-a,s,o];case 270:return[n,t-i,o,s];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#ge=!0}disableEditMode(){this.#ge=!1}isInEditMode(){return this.#ge}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#ue),this.div?.addEventListener("focusout",this.#de)}serialize(e=!1,t=null){(0,n.unreachable)("An editor must be serializable")}static deserialize(e,t,r){const a=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:r});a.rotation=e.rotation;const[n,i]=a.pageDimensions,[s,o,c,l]=a.getRectInCurrentCoords(e.rect,i);return a.x=s/n,a.y=o/i,a.width=c/n,a.height=l/i,a}remove(){this.div.removeEventListener("focusin",this.#ue),this.div.removeEventListener("focusout",this.#de),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#se?.remove(),this.#se=null,this.#oe=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#Se(),this.#he.classList.remove("hidden"))}select(){this.makeResizable(),this.div?.classList.add("selectedEditor")}unselect(){this.#he?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(e,t){}disableEditing(){this.#se&&(this.#se.hidden=!0)}enableEditing(){this.#se&&(this.#se.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#pe}set isEditing(e){this.#pe=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){this.#le=!0;const r=e/t,{style:a}=this.div;a.aspectRatio=r,a.height="auto"}static get MIN_SIZE(){return 16}}t.AnnotationEditor=s;class o extends s{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,r){for(const a of r)t.addEventListener(a,e[a].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")};var a=r(1),n=r(6);class i{#Te=0;getId(){return`${a.AnnotationEditorPrefix}${this.#Te++}`}}class s{#Ee=(0,a.getUuid)();#Te=0;#Oe=null;static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d"),t=new Image;t.src='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>';const r=t.decode().then((()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0])));return(0,a.shadow)(this,"_isSVGFittingCanvas",r)}async#Fe(e,t){this.#Oe||=new Map;let r=this.#Oe.get(e);if(null===r)return null;if(r?.bitmap)return r.refCounter+=1,r;try{let e;if(r||={bitmap:null,id:`image_${this.#Ee}_${this.#Te++}`,refCounter:0,isSvg:!1},"string"==typeof t){r.url=t;const a=await fetch(t);if(!a.ok)throw new Error(a.statusText);e=await a.blob()}else e=r.file=t;if("image/svg+xml"===e.type){const t=s._isSVGFittingCanvas,a=new FileReader,n=new Image,i=new Promise(((e,i)=>{n.onload=()=>{r.bitmap=n,r.isSvg=!0,e()},a.onload=async()=>{const e=r.svgUrl=a.result;n.src=await t?`${e}#svgView(preserveAspectRatio(none))`:e},n.onerror=a.onerror=i}));a.readAsDataURL(e),await i}else r.bitmap=await createImageBitmap(e);r.refCounter=1}catch(e){console.error(e),r=null}return this.#Oe.set(e,r),r&&this.#Oe.set(r.id,r),r}async getFromFile(e){const{lastModified:t,name:r,size:a,type:n}=e;return this.#Fe(`${t}_${r}_${a}_${n}`,e)}async getFromUrl(e){return this.#Fe(e,e)}async getFromId(e){this.#Oe||=new Map;const t=this.#Oe.get(e);return t?t.bitmap?(t.refCounter+=1,t):t.file?this.getFromFile(t.file):this.getFromUrl(t.url):null}getSvgUrl(e){const t=this.#Oe.get(e);return t?.isSvg?t.svgUrl:null}deleteId(e){this.#Oe||=new Map;const t=this.#Oe.get(e);t&&(t.refCounter-=1,0===t.refCounter&&(t.bitmap=null))}isValidId(e){return e.startsWith(`image_${this.#Ee}_`)}}class o{#Pe=[];#Ie=!1;#Me;#Re=-1;constructor(e=128){this.#Me=e}add({cmd:e,undo:t,mustExec:r,type:a=NaN,overwriteIfSameType:n=!1,keepUndo:i=!1}){if(r&&e(),this.#Ie)return;const s={cmd:e,undo:t,type:a};if(-1===this.#Re)return this.#Pe.length>0&&(this.#Pe.length=0),this.#Re=0,void this.#Pe.push(s);if(n&&this.#Pe[this.#Re].type===a)return i&&(s.undo=this.#Pe[this.#Re].undo),void(this.#Pe[this.#Re]=s);const o=this.#Re+1;o===this.#Me?this.#Pe.splice(0,1):(this.#Re=o,o<this.#Pe.length&&this.#Pe.splice(o)),this.#Pe.push(s)}undo(){-1!==this.#Re&&(this.#Ie=!0,this.#Pe[this.#Re].undo(),this.#Ie=!1,this.#Re-=1)}redo(){this.#Re<this.#Pe.length-1&&(this.#Re+=1,this.#Ie=!0,this.#Pe[this.#Re].cmd(),this.#Ie=!1)}hasSomethingToUndo(){return-1!==this.#Re}hasSomethingToRedo(){return this.#Re<this.#Pe.length-1}destroy(){this.#Pe=null}}t.CommandManager=o;class c{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:t}=a.FeatureTest.platform;for(const[r,a,n={}]of e)for(const e of r){const r=e.startsWith("mac+");t&&r?(this.callbacks.set(e.slice(4),{callback:a,options:n}),this.allKeys.add(e.split("+").at(-1))):t||r||(this.callbacks.set(e,{callback:a,options:n}),this.allKeys.add(e.split("+").at(-1)))}}#De(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);const t=this.buffer.join("+");return this.buffer.length=0,t}exec(e,t){if(!this.allKeys.has(t.key))return;const r=this.callbacks.get(this.#De(t));if(!r)return;const{callback:a,options:{bubbles:n=!1,args:i=[],checker:s=null}}=r;s&&!s(e,t)||(a.bind(e,...i)(),n||(t.stopPropagation(),t.preventDefault()))}}t.KeyboardManager=c;class l{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const e=new Map([["CanvasText",null],["Canvas",null]]);return(0,n.getColorValues)(e),(0,a.shadow)(this,"_colors",e)}convert(e){const t=(0,n.getRGB)(e);if(!window.matchMedia("(forced-colors: active)").matches)return t;for(const[e,r]of this._colors)if(r.every(((e,r)=>e===t[r])))return l._colorsMapping.get(e);return t}getHexCode(e){const t=this._colors.get(e);return t?a.Util.makeHexColor(...t):e}}t.ColorManager=l;class h{#Ne=null;#Le=new Map;#Be=new Map;#je=null;#$e=null;#Ue=new o;#ze=0;#He=new Set;#Xe=null;#We=null;#Ge=new Set;#qe=null;#Ve=new i;#Ke=!1;#Ye=!1;#Ze=null;#Je=a.AnnotationEditorType.NONE;#Qe=new Set;#et=null;#tt=this.blur.bind(this);#rt=this.focus.bind(this);#at=this.copy.bind(this);#nt=this.cut.bind(this);#it=this.paste.bind(this);#st=this.keydown.bind(this);#ot=this.onEditingAction.bind(this);#ct=this.onPageChanging.bind(this);#lt=this.onScaleChanging.bind(this);#ht=this.onRotationChanging.bind(this);#ut={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#dt=[0,0];#ft=null;#pt=null;#gt=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const e=h.prototype,t=e=>{const{activeElement:t}=document;return t&&e.#pt.contains(t)&&e.hasSomethingToControl()},r=this.TRANSLATE_SMALL,n=this.TRANSLATE_BIG;return(0,a.shadow)(this,"_keyboardManager",new c([[["ctrl+a","mac+meta+a"],e.selectAll],[["ctrl+z","mac+meta+z"],e.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-r,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-n,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[r,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[n,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-r],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-n],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,r],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,n],checker:t}]]))}constructor(e,t,r,a,i,s){this.#pt=e,this.#gt=t,this.#je=r,this._eventBus=a,this._eventBus._on("editingaction",this.#ot),this._eventBus._on("pagechanging",this.#ct),this._eventBus._on("scalechanging",this.#lt),this._eventBus._on("rotationchanging",this.#ht),this.#$e=i.annotationStorage,this.#qe=i.filterFactory,this.#et=s,this.viewParameters={realScale:n.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#mt(),this.#bt(),this._eventBus._off("editingaction",this.#ot),this._eventBus._off("pagechanging",this.#ct),this._eventBus._off("scalechanging",this.#lt),this._eventBus._off("rotationchanging",this.#ht);for(const e of this.#Be.values())e.destroy();this.#Be.clear(),this.#Le.clear(),this.#Ge.clear(),this.#Ne=null,this.#Qe.clear(),this.#Ue.destroy(),this.#je.destroy()}get hcmFilter(){return(0,a.shadow)(this,"hcmFilter",this.#et?this.#qe.addHCMFilter(this.#et.foreground,this.#et.background):"none")}get direction(){return(0,a.shadow)(this,"direction",getComputedStyle(this.#pt).direction)}editAltText(e){this.#je?.editAltText(this,e)}onPageChanging({pageNumber:e}){this.#ze=e-1}focusMainContainer(){this.#pt.focus()}findParent(e,t){for(const r of this.#Be.values()){const{x:a,y:n,width:i,height:s}=r.div.getBoundingClientRect();if(e>=a&&e<=a+i&&t>=n&&t<=n+s)return r}return null}disableUserSelect(e=!1){this.#gt.classList.toggle("noUserSelect",e)}addShouldRescale(e){this.#Ge.add(e)}removeShouldRescale(e){this.#Ge.delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*n.PixelsPerInch.PDF_TO_CSS_UNITS;for(const e of this.#Ge)e.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}addToAnnotationStorage(e){e.isEmpty()||!this.#$e||this.#$e.has(e.id)||this.#$e.setValue(e.id,e)}#yt(){window.addEventListener("focus",this.#rt),window.addEventListener("blur",this.#tt)}#bt(){window.removeEventListener("focus",this.#rt),window.removeEventListener("blur",this.#tt)}blur(){if(!this.hasSelection)return;const{activeElement:e}=document;for(const t of this.#Qe)if(t.div.contains(e)){this.#Ze=[t,e],t._focusEventsAllowed=!1;break}}focus(){if(!this.#Ze)return;const[e,t]=this.#Ze;this.#Ze=null,t.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0}),t.focus()}#vt(){window.addEventListener("keydown",this.#st,{capture:!0})}#mt(){window.removeEventListener("keydown",this.#st,{capture:!0})}#wt(){document.addEventListener("copy",this.#at),document.addEventListener("cut",this.#nt),document.addEventListener("paste",this.#it)}#At(){document.removeEventListener("copy",this.#at),document.removeEventListener("cut",this.#nt),document.removeEventListener("paste",this.#it)}addEditListeners(){this.#vt(),this.#wt()}removeEditListeners(){this.#mt(),this.#At()}copy(e){if(e.preventDefault(),this.#Ne?.commitOrRemove(),!this.hasSelection)return;const t=[];for(const e of this.#Qe){const r=e.serialize(!0);r&&t.push(r)}0!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();const{clipboardData:t}=e;for(const e of t.items)for(const t of this.#We)if(t.isHandlingMimeForPasting(e.type))return void t.paste(e,this.currentLayer);let r=t.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(e){return void(0,a.warn)(`paste: "${e.message}".`)}if(!Array.isArray(r))return;this.unselectAll();const n=this.currentLayer;try{const e=[];for(const t of r){const r=n.deserialize(t);if(!r)return;e.push(r)}const t=()=>{for(const t of e)this.#St(t);this.#xt(e)},a=()=>{for(const t of e)t.remove()};this.addCommands({cmd:t,undo:a,mustExec:!0})}catch(e){(0,a.warn)(`paste: "${e.message}".`)}}keydown(e){this.getActive()?.shouldGetKeyboardEvents()||h._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","delete","selectAll"].includes(e.name)&&this[e.name]()}#kt(e){Object.entries(e).some((([e,t])=>this.#ut[e]!==t))&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#ut,e)})}#Ct(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#yt(),this.#vt(),this.#wt(),this.#kt({isEditing:this.#Je!==a.AnnotationEditorType.NONE,isEmpty:this.#_t(),hasSomethingToUndo:this.#Ue.hasSomethingToUndo(),hasSomethingToRedo:this.#Ue.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#bt(),this.#mt(),this.#At(),this.#kt({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#We){this.#We=e;for(const e of this.#We)this.#Ct(e.defaultPropertiesToUpdate)}}getId(){return this.#Ve.getId()}get currentLayer(){return this.#Be.get(this.#ze)}getLayer(e){return this.#Be.get(e)}get currentPageIndex(){return this.#ze}addLayer(e){this.#Be.set(e.pageIndex,e),this.#Ke?e.enable():e.disable()}removeLayer(e){this.#Be.delete(e.pageIndex)}updateMode(e,t=null){if(this.#Je!==e){if(this.#Je=e,e===a.AnnotationEditorType.NONE)return this.setEditingState(!1),void this.#Tt();this.setEditingState(!0),this.#Et(),this.unselectAll();for(const t of this.#Be.values())t.updateMode(e);if(t)for(const e of this.#Le.values())if(e.annotationElementId===t){this.setSelected(e),e.enterInEditMode();break}}}updateToolbar(e){e!==this.#Je&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(this.#We)if(e!==a.AnnotationEditorParamsType.CREATE){for(const r of this.#Qe)r.updateParams(e,t);for(const r of this.#We)r.updateDefaultParams(e,t)}else this.currentLayer.addNewEditor(e)}enableWaiting(e=!1){if(this.#Ye!==e){this.#Ye=e;for(const t of this.#Be.values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}#Et(){if(!this.#Ke){this.#Ke=!0;for(const e of this.#Be.values())e.enable()}}#Tt(){if(this.unselectAll(),this.#Ke){this.#Ke=!1;for(const e of this.#Be.values())e.disable()}}getEditors(e){const t=[];for(const r of this.#Le.values())r.pageIndex===e&&t.push(r);return t}getEditor(e){return this.#Le.get(e)}addEditor(e){this.#Le.set(e.id,e)}removeEditor(e){this.#Le.delete(e.id),this.unselect(e),e.annotationElementId&&this.#He.has(e.annotationElementId)||this.#$e?.remove(e.id)}addDeletedAnnotationElement(e){this.#He.add(e.annotationElementId),e.deleted=!0}isDeletedAnnotationElement(e){return this.#He.has(e)}removeDeletedAnnotationElement(e){this.#He.delete(e.annotationElementId),e.deleted=!1}#St(e){const t=this.#Be.get(e.pageIndex);t?t.addOrRebuild(e):this.addEditor(e)}setActiveEditor(e){this.#Ne!==e&&(this.#Ne=e,e&&this.#Ct(e.propertiesToUpdate))}toggleSelected(e){if(this.#Qe.has(e))return this.#Qe.delete(e),e.unselect(),void this.#kt({hasSelectedEditor:this.hasSelection});this.#Qe.add(e),e.select(),this.#Ct(e.propertiesToUpdate),this.#kt({hasSelectedEditor:!0})}setSelected(e){for(const t of this.#Qe)t!==e&&t.unselect();this.#Qe.clear(),this.#Qe.add(e),e.select(),this.#Ct(e.propertiesToUpdate),this.#kt({hasSelectedEditor:!0})}isSelected(e){return this.#Qe.has(e)}unselect(e){e.unselect(),this.#Qe.delete(e),this.#kt({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#Qe.size}undo(){this.#Ue.undo(),this.#kt({hasSomethingToUndo:this.#Ue.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#_t()})}redo(){this.#Ue.redo(),this.#kt({hasSomethingToUndo:!0,hasSomethingToRedo:this.#Ue.hasSomethingToRedo(),isEmpty:this.#_t()})}addCommands(e){this.#Ue.add(e),this.#kt({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#_t()})}#_t(){if(0===this.#Le.size)return!0;if(1===this.#Le.size)for(const e of this.#Le.values())return e.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...this.#Qe];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)this.#St(t)},mustExec:!0})}commitOrRemove(){this.#Ne?.commitOrRemove()}hasSomethingToControl(){return this.#Ne||this.hasSelection}#xt(e){this.#Qe.clear();for(const t of e)t.isEmpty()||(this.#Qe.add(t),t.select());this.#kt({hasSelectedEditor:!0})}selectAll(){for(const e of this.#Qe)e.commit();this.#xt(this.#Le.values())}unselectAll(){if(this.#Ne)this.#Ne.commitOrRemove();else if(this.hasSelection){for(const e of this.#Qe)e.unselect();this.#Qe.clear(),this.#kt({hasSelectedEditor:!1})}}translateSelectedEditors(e,t,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;this.#dt[0]+=e,this.#dt[1]+=t;const[a,n]=this.#dt,i=[...this.#Qe];this.#ft&&clearTimeout(this.#ft),this.#ft=setTimeout((()=>{this.#ft=null,this.#dt[0]=this.#dt[1]=0,this.addCommands({cmd:()=>{for(const e of i)this.#Le.has(e.id)&&e.translateInPage(a,n)},undo:()=>{for(const e of i)this.#Le.has(e.id)&&e.translateInPage(-a,-n)},mustExec:!1})}),1e3);for(const r of i)r.translateInPage(e,t)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#Xe=new Map;for(const e of this.#Qe)this.#Xe.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#Xe)return!1;this.disableUserSelect(!1);const e=this.#Xe;this.#Xe=null;let t=!1;for(const[{x:r,y:a,pageIndex:n},i]of e)i.newX=r,i.newY=a,i.newPageIndex=n,t||=r!==i.savedX||a!==i.savedY||n!==i.savedPageIndex;if(!t)return!1;const r=(e,t,r,a)=>{if(this.#Le.has(e.id)){const n=this.#Be.get(a);n?e._setParentAndPosition(n,t,r):(e.pageIndex=a,e.x=t,e.y=r)}};return this.addCommands({cmd:()=>{for(const[t,{newX:a,newY:n,newPageIndex:i}]of e)r(t,a,n,i)},undo:()=>{for(const[t,{savedX:a,savedY:n,savedPageIndex:i}]of e)r(t,a,n,i)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(this.#Xe)for(const r of this.#Xe.keys())r.drag(e,t)}rebuild(e){if(null===e.parent){const t=this.getLayer(e.pageIndex);t?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}isActive(e){return this.#Ne===e}getActive(){return this.#Ne}getMode(){return this.#Je}get imageManager(){return(0,a.shadow)(this,"imageManager",new s)}}t.AnnotationEditorUIManager=h},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMFilterFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const r of e.keys()){t.style.color=r;const a=window.getComputedStyle(t).color;e.set(r,y(a))}t.remove()},t.getCurrentTransform=function(e){const{a:t,b:r,c:a,d:n,e:i,f:s}=e.getTransform();return[t,r,a,n,i,s]},t.getCurrentTransformInverse=function(e){const{a:t,b:r,c:a,d:n,e:i,f:s}=e.getTransform().invertSelf();return[t,r,a,n,i,s]},t.getFilenameFromUrl=function(e,t=!1){return t||([e]=e.split(/[#?]/,1)),e.substring(e.lastIndexOf("/")+1)},t.getPdfFilenameFromUrl=function(e,t="document.pdf"){if("string"!=typeof e)return t;if(g(e))return(0,n.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const r=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,a=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let i=r.exec(a[1])||r.exec(a[2])||r.exec(a[3]);if(i&&(i=i[0],i.includes("%")))try{i=r.exec(decodeURIComponent(i))[0]}catch{}return i||t},t.getRGB=y,t.getXfaPageViewport=function(e,{scale:t=1,rotation:r=0}){const{width:a,height:n}=e.attributes.style,i=[0,0,parseInt(a),parseInt(n)];return new f({viewBox:i,scale:t,rotation:r})},t.isDataScheme=g,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=m,t.loadScript=function(e,t=!1){return new Promise(((r,a)=>{const n=document.createElement("script");n.src=e,n.onload=function(e){t&&n.remove(),r(e)},n.onerror=function(){a(new Error(`Cannot load script at: ${n.src}`))},(document.head||document.documentElement).append(n)}))},t.noContextMenu=function(e){e.preventDefault()},t.setLayerDimensions=function(e,t,r=!1,a=!0){if(t instanceof f){const{pageWidth:a,pageHeight:i}=t.rawDims,{style:s}=e,o=n.FeatureTest.isCSSRoundSupported,c=`var(--scale-factor) * ${a}px`,l=`var(--scale-factor) * ${i}px`,h=o?`round(${c}, 1px)`:`calc(${c})`,u=o?`round(${l}, 1px)`:`calc(${l})`;r&&t.rotation%180!=0?(s.width=u,s.height=h):(s.width=h,s.height=u)}a&&e.setAttribute("data-main-rotation",t.rotation)};var a=r(7),n=r(1);const i="http://www.w3.org/2000/svg";class s{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}t.PixelsPerInch=s;class o extends a.BaseFilterFactory{#Ot;#Ft;#L;#Pt;#It;#Mt;#Rt;#Dt;#Nt;#Lt;#Te=0;constructor({docId:e,ownerDocument:t=globalThis.document}={}){super(),this.#L=e,this.#Pt=t}get#Oe(){return this.#Ot||=new Map}get#Bt(){if(!this.#Ft){const e=this.#Pt.createElement("div"),{style:t}=e;t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1;const r=this.#Pt.createElementNS(i,"svg");r.setAttribute("width",0),r.setAttribute("height",0),this.#Ft=this.#Pt.createElementNS(i,"defs"),e.append(r),r.append(this.#Ft),this.#Pt.body.append(e)}return this.#Ft}addFilter(e){if(!e)return"none";let t,r,a,n,i=this.#Oe.get(e);if(i)return i;if(1===e.length){const i=e[0],s=new Array(256);for(let e=0;e<256;e++)s[e]=i[e]/255;n=t=r=a=s.join(",")}else{const[i,s,o]=e,c=new Array(256),l=new Array(256),h=new Array(256);for(let e=0;e<256;e++)c[e]=i[e]/255,l[e]=s[e]/255,h[e]=o[e]/255;t=c.join(","),r=l.join(","),a=h.join(","),n=`${t}${r}${a}`}if(i=this.#Oe.get(n),i)return this.#Oe.set(e,i),i;const s=`g_${this.#L}_transfer_map_${this.#Te++}`,o=`url(#${s})`;this.#Oe.set(e,o),this.#Oe.set(n,o);const c=this.#jt(s);return this.#$t(t,r,a,c),o}addHCMFilter(e,t){const r=`${e}-${t}`;if(this.#Mt===r)return this.#Rt;if(this.#Mt=r,this.#Rt="none",this.#It?.remove(),!e||!t)return this.#Rt;const a=this.#Ut(e);e=n.Util.makeHexColor(...a);const i=this.#Ut(t);if(t=n.Util.makeHexColor(...i),this.#Bt.style.color="","#000000"===e&&"#ffffff"===t||e===t)return this.#Rt;const s=new Array(256);for(let e=0;e<=255;e++){const t=e/255;s[e]=t<=.03928?t/12.92:((t+.055)/1.055)**2.4}const o=s.join(","),c=`g_${this.#L}_hcm_filter`,l=this.#Dt=this.#jt(c);this.#$t(o,o,o,l),this.#zt(l);const h=(e,t)=>{const r=a[e]/255,n=i[e]/255,s=new Array(t+1);for(let e=0;e<=t;e++)s[e]=r+e/t*(n-r);return s.join(",")};return this.#$t(h(0,5),h(1,5),h(2,5),l),this.#Rt=`url(#${c})`,this.#Rt}addHighlightHCMFilter(e,t,r,a){const n=`${e}-${t}-${r}-${a}`;if(this.#Nt===n)return this.#Lt;if(this.#Nt=n,this.#Lt="none",this.#Dt?.remove(),!e||!t)return this.#Lt;const[i,s]=[e,t].map(this.#Ut.bind(this));let o=Math.round(.2126*i[0]+.7152*i[1]+.0722*i[2]),c=Math.round(.2126*s[0]+.7152*s[1]+.0722*s[2]),[l,h]=[r,a].map(this.#Ut.bind(this));c<o&&([o,c,l,h]=[c,o,h,l]),this.#Bt.style.color="";const u=(e,t,r)=>{const a=new Array(256),n=(c-o)/r,i=e/255,s=(t-e)/(255*r);let l=0;for(let e=0;e<=r;e++){const t=Math.round(o+e*n),r=i+e*s;for(let e=l;e<=t;e++)a[e]=r;l=t+1}for(let e=l;e<256;e++)a[e]=a[l-1];return a.join(",")},d=`g_${this.#L}_hcm_highlight_filter`,f=this.#Dt=this.#jt(d);return this.#zt(f),this.#$t(u(l[0],h[0],5),u(l[1],h[1],5),u(l[2],h[2],5),f),this.#Lt=`url(#${d})`,this.#Lt}destroy(e=!1){e&&(this.#Rt||this.#Lt)||(this.#Ft&&(this.#Ft.parentNode.parentNode.remove(),this.#Ft=null),this.#Ot&&(this.#Ot.clear(),this.#Ot=null),this.#Te=0)}#zt(e){const t=this.#Pt.createElementNS(i,"feColorMatrix");t.setAttribute("type","matrix"),t.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"),e.append(t)}#jt(e){const t=this.#Pt.createElementNS(i,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),this.#Bt.append(t),t}#Ht(e,t,r){const a=this.#Pt.createElementNS(i,t);a.setAttribute("type","discrete"),a.setAttribute("tableValues",r),e.append(a)}#$t(e,t,r,a){const n=this.#Pt.createElementNS(i,"feComponentTransfer");a.append(n),this.#Ht(n,"feFuncR",e),this.#Ht(n,"feFuncG",t),this.#Ht(n,"feFuncB",r)}#Ut(e){return this.#Bt.style.color=e,y(getComputedStyle(this.#Bt).getPropertyValue("color"))}}t.DOMFilterFactory=o;class c extends a.BaseCanvasFactory{constructor({ownerDocument:e=globalThis.document}={}){super(),this._document=e}_createCanvas(e,t){const r=this._document.createElement("canvas");return r.width=e,r.height=t,r}}async function l(e,t=!1){if(m(e,document.baseURI)){const r=await fetch(e);if(!r.ok)throw new Error(r.statusText);return t?new Uint8Array(await r.arrayBuffer()):(0,n.stringToBytes)(await r.text())}return new Promise(((r,a)=>{const i=new XMLHttpRequest;i.open("GET",e,!0),t&&(i.responseType="arraybuffer"),i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(200===i.status||0===i.status){let e;if(t&&i.response?e=new Uint8Array(i.response):!t&&i.responseText&&(e=(0,n.stringToBytes)(i.responseText)),e)return void r(e)}a(new Error(i.statusText))}},i.send(null)}))}t.DOMCanvasFactory=c;class h extends a.BaseCMapReaderFactory{_fetchData(e,t){return l(e,this.isCompressed).then((e=>({cMapData:e,compressionType:t})))}}t.DOMCMapReaderFactory=h;class u extends a.BaseStandardFontDataFactory{_fetchData(e){return l(e,!0)}}t.DOMStandardFontDataFactory=u;class d extends a.BaseSVGFactory{_createSVG(e){return document.createElementNS(i,e)}}t.DOMSVGFactory=d;class f{constructor({viewBox:e,scale:t,rotation:r,offsetX:a=0,offsetY:n=0,dontFlip:i=!1}){this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=a,this.offsetY=n;const s=(e[2]+e[0])/2,o=(e[3]+e[1])/2;let c,l,h,u,d,f,p,g;switch((r%=360)<0&&(r+=360),r){case 180:c=-1,l=0,h=0,u=1;break;case 90:c=0,l=1,h=1,u=0;break;case 270:c=0,l=-1,h=-1,u=0;break;case 0:c=1,l=0,h=0,u=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}i&&(h=-h,u=-u),0===c?(d=Math.abs(o-e[1])*t+a,f=Math.abs(s-e[0])*t+n,p=(e[3]-e[1])*t,g=(e[2]-e[0])*t):(d=Math.abs(s-e[0])*t+a,f=Math.abs(o-e[1])*t+n,p=(e[2]-e[0])*t,g=(e[3]-e[1])*t),this.transform=[c*t,l*t,h*t,u*t,d-c*t*s-h*t*o,f-l*t*s-u*t*o],this.width=p,this.height=g}get rawDims(){const{viewBox:e}=this;return(0,n.shadow)(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:r=this.offsetX,offsetY:a=this.offsetY,dontFlip:n=!1}={}){return new f({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:r,offsetY:a,dontFlip:n})}convertToViewportPoint(e,t){return n.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=n.Util.applyTransform([e[0],e[1]],this.transform),r=n.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}convertToPdfPoint(e,t){return n.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=f;class p extends n.BaseException{constructor(e,t=0){super(e,"RenderingCancelledException"),this.extraDelay=t}}function g(e){const t=e.length;let r=0;for(;r<t&&""===e[r].trim();)r++;return"data:"===e.substring(r,r+5).toLowerCase()}function m(e,t){try{const{protocol:r}=t?new URL(e,t):new URL(e);return"http:"===r||"https:"===r}catch{return!1}}let b;function y(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(16711680&t)>>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):((0,n.warn)(`Not a valid color format: "${e}"`),[0,0,0])}t.RenderingCancelledException=p,t.StatTimer=class{started=Object.create(null);times=[];time(e){e in this.started&&(0,n.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,n.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:e}of this.times)t=Math.max(e.length,t);for(const{name:r,start:a,end:n}of this.times)e.push(`${r.padEnd(t)} ${n-a}ms\n`);return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||"string"!=typeof e)return null;b||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const t=b.exec(e);if(!t)return null;const r=parseInt(t[1],10);let a=parseInt(t[2],10);a=a>=1&&a<=12?a-1:0;let n=parseInt(t[3],10);n=n>=1&&n<=31?n:1;let i=parseInt(t[4],10);i=i>=0&&i<=23?i:0;let s=parseInt(t[5],10);s=s>=0&&s<=59?s:0;let o=parseInt(t[6],10);o=o>=0&&o<=59?o:0;const c=t[7]||"Z";let l=parseInt(t[8],10);l=l>=0&&l<=23?l:0;let h=parseInt(t[9],10)||0;return h=h>=0&&h<=59?h:0,"-"===c?(i+=l,s+=h):"+"===c&&(i-=l,s-=h),new Date(Date.UTC(r,a,n,i,s,o))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var a=r(1);class n{constructor(){this.constructor===n&&(0,a.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addHighlightHCMFilter(e,t,r,a){return"none"}destroy(e=!1){}}t.BaseFilterFactory=n;class i{constructor(){this.constructor===i&&(0,a.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const r=this._createCanvas(e,t);return{canvas:r,context:r.getContext("2d")}}reset(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,a.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=i;class s{constructor({baseUrl:e=null,isCompressed:t=!0}){this.constructor===s&&(0,a.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),r=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE;return this._fetchData(t,r).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)}))}_fetchData(e,t){(0,a.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=s;class o{constructor({baseUrl:e=null}){this.constructor===o&&(0,a.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetchData(t).catch((e=>{throw new Error(`Unable to load font data at: ${t}`)}))}_fetchData(e){(0,a.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=o;class c{constructor(){this.constructor===c&&(0,a.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t,r=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const a=this._createSVG("svg:svg");return a.setAttribute("version","1.1"),r||(a.setAttribute("width",`${e}px`),a.setAttribute("height",`${t}px`)),a.setAttribute("preserveAspectRatio","none"),a.setAttribute("viewBox",`0 0 ${e} ${t}`),a}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,a.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var a=r(1);const n=3285377520,i=4294901760,s=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:n,this.h2=e?4294967295&e:n}update(e){let t,r;if("string"==typeof e){t=new Uint8Array(2*e.length),r=0;for(let a=0,n=e.length;a<n;a++){const n=e.charCodeAt(a);n<=255?t[r++]=n:(t[r++]=n>>>8,t[r++]=255&n)}}else{if(!(0,a.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),r=t.byteLength}const n=r>>2,o=r-4*n,c=new Uint32Array(t.buffer,0,n);let l=0,h=0,u=this.h1,d=this.h2;const f=3432918353,p=461845907,g=11601,m=13715;for(let e=0;e<n;e++)1&e?(l=c[e],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,u^=l,u=u<<13|u>>>19,u=5*u+3864292196):(h=c[e],h=h*f&i|h*g&s,h=h<<15|h>>>17,h=h*p&i|h*m&s,d^=h,d=d<<13|d>>>19,d=5*d+3864292196);switch(l=0,o){case 3:l^=t[4*n+2]<<16;case 2:l^=t[4*n+1]<<8;case 1:l^=t[4*n],l=l*f&i|l*g&s,l=l<<15|l>>>17,l=l*p&i|l*m&s,1&n?u^=l:d^=l}this.h1=u,this.h2=d}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&i|36045*e&s,t=4283543511*t&i|(2950163797*(t<<16|e>>>16)&i)>>>16,e^=t>>>1,e=444984403*e&i|60499*e&s,t=3301882366*t&i|(3120437893*(t<<16|e>>>16)&i)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var a=r(1);t.FontLoader=class{#Xt=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:t=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#Xt.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(e){if(e&&!this.#Xt.has(e.loadedName))if((0,a.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:t,src:r,style:n}=e,i=new FontFace(t,r,n);this.addNativeFontFace(i);try{await i.load(),this.#Xt.add(t)}catch{(0,a.warn)(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(i)}}else(0,a.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo)return void await this.loadSystemFont(e.systemFontInfo);if(this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(r){throw(0,a.warn)(`Failed to load font '${t.family}': '${r}'.`),e.disableFontFace=!0,r}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const r=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,r)}))}}get isFontLoadingAPISupported(){const e=!!this._document?.fonts;return(0,a.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(a.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,a.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,r={done:!1,complete:function(){for((0,a.assert)(!r.done,"completeRequest() cannot be called twice."),r.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(r),r}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,a.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function r(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function n(e,t,r,a){return e.substring(0,t)+a+e.substring(t+r)}let i,s;const o=this._document.createElement("canvas");o.width=1,o.height=1;const c=o.getContext("2d");let l=0;const h=`lt${Date.now()}${this.loadTestFontId++}`;let u=this._loadTestFont;u=n(u,976,h.length,h);const d=1482184792;let f=r(u,16);for(i=0,s=h.length-3;i<s;i+=4)f=f-d+r(h,i)|0;i<h.length&&(f=f-d+r(h+"XXX",i)|0),u=n(u,16,4,(0,a.string32)(f));const p=`@font-face {font-family:"${h}";src:url(data:font/opentype;base64,${btoa(u)});}`;this.insertRule(p);const g=this._document.createElement("div");g.style.visibility="hidden",g.style.width=g.style.height="10px",g.style.position="absolute",g.style.top=g.style.left="0px";for(const t of[e.loadedName,h]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=t,g.append(e)}this._document.body.append(g),function e(t,r){if(++l>30)return(0,a.warn)("Load test font never loaded."),void r();c.font="30px "+t,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?r():setTimeout(e.bind(null,t,r))}(h,(()=>{g.remove(),t.complete()}))}},t.FontFaceObject=class{constructor(e,{isEvalSupported:t=!0,disableFontFace:r=!1,ignoreErrors:a=!1,inspectFont:n=null}){this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.isEvalSupported=!1!==t,this.disableFontFace=!0===r,this.ignoreErrors=!0===a,this._inspectFont=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,a.bytesToString)(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let r;if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),r=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${t}}`}else r=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this._inspectFont?.(this,t),r}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let r;try{r=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return(0,a.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&a.FeatureTest.isEvalSupported){const e=[];for(const t of r){const r=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",r,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const a of r)"scale"===a.cmd&&(a.args=[t,-t]),e[a.cmd].apply(e,a.args)}}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var a=r(7);r(1);const n=function(e){return new Promise(((t,r)=>{__webpack_require__(237).readFile(e,((e,a)=>{!e&&a?t(new Uint8Array(a)):r(new Error(e))}))}))};class i extends a.BaseFilterFactory{}t.NodeFilterFactory=i;class s extends a.BaseCanvasFactory{_createCanvas(e,t){return __webpack_require__(640).createCanvas(e,t)}}t.NodeCanvasFactory=s;class o extends a.BaseCMapReaderFactory{_fetchData(e,t){return n(e).then((e=>({cMapData:e,compressionType:t})))}}t.NodeCMapReaderFactory=o;class c extends a.BaseStandardFontDataFactory{_fetchData(e){return n(e)}}t.NodeStandardFontDataFactory=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var a=r(1),n=r(6),i=r(12),s=r(13);const o=4096,c=16;class l{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,r){let a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),a}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function h(e,t,r,a,i,s,o,c,l,h){const[u,d,f,p,g,m]=(0,n.getCurrentTransform)(e);if(0===d&&0===f){const n=o*u+g,b=Math.round(n),y=c*p+m,v=Math.round(y),w=(o+l)*u+g,A=Math.abs(Math.round(w)-b)||1,S=(c+h)*p+m,x=Math.abs(Math.round(S)-v)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(p),b,v),e.drawImage(t,r,a,i,s,0,0,A,x),e.setTransform(u,d,f,p,g,m),[A,x]}if(0===u&&0===p){const n=c*f+g,b=Math.round(n),y=o*d+m,v=Math.round(y),w=(c+h)*f+g,A=Math.abs(Math.round(w)-b)||1,S=(o+l)*d+m,x=Math.abs(Math.round(S)-v)||1;return e.setTransform(0,Math.sign(d),Math.sign(f),0,b,v),e.drawImage(t,r,a,i,s,0,0,x,A),e.setTransform(u,d,f,p,g,m),[x,A]}return e.drawImage(t,r,a,i,s,o,c,l,h),[Math.hypot(u,d)*l,Math.hypot(f,p)*h]}class u{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=a.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=a.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=a.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,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,r){[t,r]=a.Util.applyTransform([t,r],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,r),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,r)}updateRectMinMax(e,t){const r=a.Util.applyTransform(t,e),n=a.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,r[0],n[0]),this.minY=Math.min(this.minY,r[1],n[1]),this.maxX=Math.max(this.maxX,r[0],n[0]),this.maxY=Math.max(this.maxY,r[1],n[1])}updateScalingPathMinMax(e,t){a.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,r,n,i,s,o,c,l,h){const u=a.Util.bezierBoundingBox(t,r,n,i,s,o,c,l);if(h)return h[0]=Math.min(h[0],u[0],u[2]),h[1]=Math.max(h[1],u[0],u[2]),h[2]=Math.min(h[2],u[1],u[3]),void(h[3]=Math.max(h[3],u[1],u[3]));this.updateRectMinMax(e,u)}getPathBoundingBox(e=i.PathType.FILL,t=null){const r=[this.minX,this.minY,this.maxX,this.maxY];if(e===i.PathType.STROKE){t||(0,a.unreachable)("Stroke bounding box must include transform.");const e=a.Util.singularValueDecompose2dScale(t),n=e[0]*this.lineWidth/2,i=e[1]*this.lineWidth/2;r[0]-=n,r[1]-=i,r[2]+=n,r[3]+=i}return r}updateClipFromPath(){const e=a.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=i.PathType.FILL,t=null){return a.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function d(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);const r=t.height,n=t.width,i=r%c,s=(r-i)/c,o=0===i?s:s+1,l=e.createImageData(n,c);let h,u=0;const d=t.data,f=l.data;let p,g,m,b;if(t.kind===a.ImageKind.GRAYSCALE_1BPP){const t=d.byteLength,r=new Uint32Array(f.buffer,0,f.byteLength>>2),b=r.length,y=n+7>>3,v=4294967295,w=a.FeatureTest.isLittleEndian?4278190080:255;for(p=0;p<o;p++){for(m=p<s?c:i,h=0,g=0;g<m;g++){const e=t-u;let a=0;const i=e>y?n:8*e-7,s=-8&i;let o=0,c=0;for(;a<s;a+=8)c=d[u++],r[h++]=128&c?v:w,r[h++]=64&c?v:w,r[h++]=32&c?v:w,r[h++]=16&c?v:w,r[h++]=8&c?v:w,r[h++]=4&c?v:w,r[h++]=2&c?v:w,r[h++]=1&c?v:w;for(;a<i;a++)0===o&&(c=d[u++],o=128),r[h++]=c&o?v:w,o>>=1}for(;h<b;)r[h++]=0;e.putImageData(l,0,p*c)}}else if(t.kind===a.ImageKind.RGBA_32BPP){for(g=0,b=n*c*4,p=0;p<s;p++)f.set(d.subarray(u,u+b)),u+=b,e.putImageData(l,0,g),g+=c;p<o&&(b=n*i*4,f.set(d.subarray(u,u+b)),e.putImageData(l,0,g))}else{if(t.kind!==a.ImageKind.RGB_24BPP)throw new Error(`bad image kind: ${t.kind}`);for(m=c,b=n*m,p=0;p<o;p++){for(p>=s&&(m=i,b=n*m),h=0,g=b;g--;)f[h++]=d[u++],f[h++]=d[u++],f[h++]=d[u++],f[h++]=255;e.putImageData(l,0,p*c)}}}function f(e,t){if(t.bitmap)return void e.drawImage(t.bitmap,0,0);const r=t.height,a=t.width,n=r%c,i=(r-n)/c,o=0===n?i:i+1,l=e.createImageData(a,c);let h=0;const u=t.data,d=l.data;for(let t=0;t<o;t++){const r=t<i?c:n;({srcPos:h}=(0,s.convertBlackAndWhiteToRGBA)({src:u,srcPos:h,dest:d,width:a,height:r,nonBlackColor:0})),e.putImageData(l,0,t*c)}}function p(e,t){const r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const a of r)void 0!==e[a]&&(t[a]=e[a]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function g(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),!a.isNodeJS){const{filter:t}=e;"none"!==t&&""!==t&&(e.filter="none")}}function m(e,t,r,a){const n=e.length;for(let i=3;i<n;i+=4){const n=e[i];if(0===n)e[i-3]=t,e[i-2]=r,e[i-1]=a;else if(n<255){const s=255-n;e[i-3]=e[i-3]*n+t*s>>8,e[i-2]=e[i-2]*n+r*s>>8,e[i-1]=e[i-1]*n+a*s>>8}}}function b(e,t,r){const a=e.length,n=1/255;for(let i=3;i<a;i+=4){const a=r?r[e[i]]:e[i];t[i]=t[i]*a*n|0}}function y(e,t,r){const a=e.length;for(let n=3;n<a;n+=4){const a=77*e[n-3]+152*e[n-2]+28*e[n-1];t[n]=r?t[n]*r[a>>8]>>8:t[n]*a>>16}}function v(e,t,r,a){const n=a[0],i=a[1],s=a[2]-n,o=a[3]-i;0!==s&&0!==o&&(function(e,t,r,a,n,i,s,o,c,l,h){const u=!!i,d=u?i[0]:0,f=u?i[1]:0,p=u?i[2]:0,g="Luminosity"===n?y:b,v=Math.min(a,Math.ceil(1048576/r));for(let n=0;n<a;n+=v){const i=Math.min(v,a-n),b=e.getImageData(o-l,n+(c-h),r,i),y=t.getImageData(o,n+c,r,i);u&&m(b.data,d,f,p),g(b.data,y.data,s),t.putImageData(y,o,n+c)}}(t.context,r,s,o,t.subtype,t.backdrop,t.transferMap,n,i,t.offsetX,t.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}function w(e,t){const r=a.Util.singularValueDecompose2dScale(e);r[0]=Math.fround(r[0]),r[1]=Math.fround(r[1]);const i=Math.fround((globalThis.devicePixelRatio||1)*n.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:r[0]<=i||r[1]<=i}const A=["butt","round","square"],S=["miter","round","bevel"],x={},k={};class C{constructor(e,t,r,a,n,{optionalContentConfig:i,markedContentStack:s=null},o,c){this.ctx=e,this.current=new u(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=a,this.filterFactory=n,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=s||[],this.optionalContentConfig=i,this.cachedCanvases=new l(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=c,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:r=!1,background:a=null}){const i=this.ctx.canvas.width,s=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=a||"#ffffff",this.ctx.fillRect(0,0,i,s),this.ctx.fillStyle=o,r){const e=this.cachedCanvases.getCanvas("transparent",i,s);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,n.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),g(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=(0,n.getCurrentTransform)(this.ctx)}executeOperatorList(e,t,r,n){const i=e.argsArray,s=e.fnArray;let o=t||0;const c=i.length;if(c===o)return o;const l=c-o>10&&"function"==typeof r,h=l?Date.now()+15:0;let u=0;const d=this.commonObjs,f=this.objs;let p;for(;;){if(void 0!==n&&o===n.nextBreakPoint)return n.breakIt(o,r),o;if(p=s[o],p!==a.OPS.dependency)this[p].apply(this,i[o]);else for(const e of i[o]){const t=e.startsWith("g_")?d:f;if(!t.has(e))return t.get(e,r),o}if(o++,o===c)return o;if(l&&++u>10){if(Date.now()>h)return r(),o;u=0}}}#Wt(){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)}endDrawing(){this.#Wt(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#Gt()}#Gt(){if(this.pageColors){const e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==e){const t=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t}}}_scaleImage(e,t){const r=e.width,a=e.height;let n,i,s=Math.max(Math.hypot(t[0],t[1]),1),o=Math.max(Math.hypot(t[2],t[3]),1),c=r,l=a,h="prescale1";for(;s>2&&c>1||o>2&&l>1;){let t=c,r=l;s>2&&c>1&&(t=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c/2),s/=c/t),o>2&&l>1&&(r=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,o/=l/r),n=this.cachedCanvases.getCanvas(h,t,r),i=n.context,i.clearRect(0,0,t,r),i.drawImage(e,0,0,c,l,0,0,t,r),e=n.canvas,c=t,l=r,h="prescale1"===h?"prescale2":"prescale1"}return{img:e,paintWidth:c,paintHeight:l}}_createMaskCanvas(e){const t=this.ctx,{width:r,height:s}=e,o=this.current.fillColor,c=this.current.patternFill,l=(0,n.getCurrentTransform)(t);let u,d,p,g;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;d=JSON.stringify(c?l:[l.slice(0,4),o]),u=this._cachedBitmapsMap.get(t),u||(u=new Map,this._cachedBitmapsMap.set(t,u));const r=u.get(d);if(r&&!c)return{canvas:r,offsetX:Math.round(Math.min(l[0],l[2])+l[4]),offsetY:Math.round(Math.min(l[1],l[3])+l[5])};p=r}p||(g=this.cachedCanvases.getCanvas("maskCanvas",r,s),f(g.context,e));let m=a.Util.transform(l,[1/r,0,0,-1/s,0,0]);m=a.Util.transform(m,[1,0,0,1,0,-s]);const b=a.Util.applyTransform([0,0],m),y=a.Util.applyTransform([r,s],m),v=a.Util.normalizeRect([b[0],b[1],y[0],y[1]]),A=Math.round(v[2]-v[0])||1,S=Math.round(v[3]-v[1])||1,x=this.cachedCanvases.getCanvas("fillCanvas",A,S),k=x.context,C=Math.min(b[0],y[0]),_=Math.min(b[1],y[1]);k.translate(-C,-_),k.transform(...m),p||(p=this._scaleImage(g.canvas,(0,n.getCurrentTransformInverse)(k)),p=p.img,u&&c&&u.set(d,p)),k.imageSmoothingEnabled=w((0,n.getCurrentTransform)(k),e.interpolate),h(k,p,0,0,p.width,p.height,0,0,r,s),k.globalCompositeOperation="source-in";const T=a.Util.transform((0,n.getCurrentTransformInverse)(k),[1,0,0,1,-C,-_]);return k.fillStyle=c?o.getPattern(t,this,T,i.PathType.FILL):o,k.fillRect(0,0,r,s),u&&!c&&(this.cachedCanvases.delete("fillCanvas"),u.set(d,x.canvas)),{canvas:x.canvas,offsetX:Math.round(C),offsetY:Math.round(_)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=A[e]}setLineJoin(e){this.ctx.lineJoin=S[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){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)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,r="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(r,e,t);this.suspendedCtx=this.ctx,this.ctx=a.context;const i=this.ctx;i.setTransform(...(0,n.getCurrentTransform)(this.suspendedCtx)),p(this.suspendedCtx,i),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,r){t.translate(e,r),this.__originalTranslate(e,r)},e.scale=function(e,r){t.scale(e,r),this.__originalScale(e,r)},e.transform=function(e,r,a,n,i,s){t.transform(e,r,a,n,i,s),this.__originalTransform(e,r,a,n,i,s)},e.setTransform=function(e,r,a,n,i,s){t.setTransform(e,r,a,n,i,s),this.__originalSetTransform(e,r,a,n,i,s)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,r){t.moveTo(e,r),this.__originalMoveTo(e,r)},e.lineTo=function(e,r){t.lineTo(e,r),this.__originalLineTo(e,r)},e.bezierCurveTo=function(e,r,a,n,i,s){t.bezierCurveTo(e,r,a,n,i,s),this.__originalBezierCurveTo(e,r,a,n,i,s)},e.rect=function(e,r,a,n){t.rect(e,r,a,n),this.__originalRect(e,r,a,n)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(i,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(),p(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask;v(this.suspendedCtx,t,this.ctx,e),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(p(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),p(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,r,a,n,i){this.ctx.transform(e,t,r,a,n,i),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,t,r){const i=this.ctx,s=this.current;let o,c,l=s.x,h=s.y;const u=(0,n.getCurrentTransform)(i),d=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],f=d?r.slice(0):null;for(let r=0,n=0,p=e.length;r<p;r++)switch(0|e[r]){case a.OPS.rectangle:l=t[n++],h=t[n++];const e=t[n++],r=t[n++],p=l+e,g=h+r;i.moveTo(l,h),0===e||0===r?i.lineTo(p,g):(i.lineTo(p,h),i.lineTo(p,g),i.lineTo(l,g)),d||s.updateRectMinMax(u,[l,h,p,g]),i.closePath();break;case a.OPS.moveTo:l=t[n++],h=t[n++],i.moveTo(l,h),d||s.updatePathMinMax(u,l,h);break;case a.OPS.lineTo:l=t[n++],h=t[n++],i.lineTo(l,h),d||s.updatePathMinMax(u,l,h);break;case a.OPS.curveTo:o=l,c=h,l=t[n+4],h=t[n+5],i.bezierCurveTo(t[n],t[n+1],t[n+2],t[n+3],l,h),s.updateCurvePathMinMax(u,o,c,t[n],t[n+1],t[n+2],t[n+3],l,h,f),n+=6;break;case a.OPS.curveTo2:o=l,c=h,i.bezierCurveTo(l,h,t[n],t[n+1],t[n+2],t[n+3]),s.updateCurvePathMinMax(u,o,c,l,h,t[n],t[n+1],t[n+2],t[n+3],f),l=t[n+2],h=t[n+3],n+=4;break;case a.OPS.curveTo3:o=l,c=h,l=t[n+2],h=t[n+3],i.bezierCurveTo(t[n],t[n+1],l,h,l,h),s.updateCurvePathMinMax(u,o,c,t[n],t[n+1],l,h,l,h,f),n+=4;break;case a.OPS.closePath:i.closePath()}d&&s.updateScalingPathMinMax(u,f),s.setCurrentPoint(l,h)}closePath(){this.ctx.closePath()}stroke(e=!0){const t=this.ctx,r=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof r&&r?.getPattern?(t.save(),t.strokeStyle=r.getPattern(t,this,(0,n.getCurrentTransformInverse)(t),i.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(e=!0){const t=this.ctx,r=this.current.fillColor;let a=!1;this.current.patternFill&&(t.save(),t.fillStyle=r.getPattern(t,this,(0,n.getCurrentTransformInverse)(t),i.PathType.FILL),a=!0);const s=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==s&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),a&&t.restore(),e&&this.consumePath(s)}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=x}eoClip(){this.pendingClip=k}beginText(){this.current.textMatrix=a.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(const r of e)t.setTransform(...r.transform),t.translate(r.x,r.y),r.addToPath(t,r.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(e,t){const r=this.commonObjs.get(e),n=this.current;if(!r)throw new Error(`Can't find font for ${e}`);if(n.fontMatrix=r.fontMatrix||a.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,a.warn)("Invalid font matrix for font "+e),t<0?(t=-t,n.fontDirection=-1):n.fontDirection=1,this.current.font=r,this.current.fontSize=t,r.isType3Font)return;const i=r.loadedName||"sans-serif",s=r.systemFontInfo?.css||`"${i}", ${r.fallbackName}`;let o="normal";r.black?o="900":r.bold&&(o="bold");const c=r.italic?"italic":"normal";let l=t;t<16?l=16:t>100&&(l=100),this.current.fontSizeScale=t/l,this.ctx.font=`${c} ${o} ${l}px ${s}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,r,a,n,i){this.current.textMatrix=[e,t,r,a,n,i],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,r,i){const s=this.ctx,o=this.current,c=o.font,l=o.textRenderingMode,h=o.fontSize/o.fontSizeScale,u=l&a.TextRenderingMode.FILL_STROKE_MASK,d=!!(l&a.TextRenderingMode.ADD_TO_PATH_FLAG),f=o.patternFill&&!c.missingFile;let p;(c.disableFontFace||d||f)&&(p=c.getPathGenerator(this.commonObjs,e)),c.disableFontFace||f?(s.save(),s.translate(t,r),s.beginPath(),p(s,h),i&&s.setTransform(...i),u!==a.TextRenderingMode.FILL&&u!==a.TextRenderingMode.FILL_STROKE||s.fill(),u!==a.TextRenderingMode.STROKE&&u!==a.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore()):(u!==a.TextRenderingMode.FILL&&u!==a.TextRenderingMode.FILL_STROKE||s.fillText(e,t,r),u!==a.TextRenderingMode.STROKE&&u!==a.TextRenderingMode.FILL_STROKE||s.strokeText(e,t,r)),d&&(this.pendingTextPaths||=[]).push({transform:(0,n.getCurrentTransform)(s),x:t,y:r,fontSize:h,addToPath:p})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let r=!1;for(let e=3;e<t.length;e+=4)if(t[e]>0&&t[e]<255){r=!0;break}return(0,a.shadow)(this,"isFontSubpixelAAEnabled",r)}showText(e){const t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);const s=t.fontSize;if(0===s)return;const o=this.ctx,c=t.fontSizeScale,l=t.charSpacing,h=t.wordSpacing,u=t.fontDirection,d=t.textHScale*u,f=e.length,p=r.vertical,g=p?1:-1,m=r.defaultVMetrics,b=s*t.fontMatrix[0],y=t.textRenderingMode===a.TextRenderingMode.FILL&&!r.disableFontFace&&!t.patternFill;let v;if(o.save(),o.transform(...t.textMatrix),o.translate(t.x,t.y+t.textRise),u>0?o.scale(d,-1):o.scale(d,1),t.patternFill){o.save();const e=t.fillColor.getPattern(o,this,(0,n.getCurrentTransformInverse)(o),i.PathType.FILL);v=(0,n.getCurrentTransform)(o),o.restore(),o.fillStyle=e}let w=t.lineWidth;const A=t.textMatrixScale;if(0===A||0===w){const e=t.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;e!==a.TextRenderingMode.STROKE&&e!==a.TextRenderingMode.FILL_STROKE||(w=this.getSinglePixelWidth())}else w/=A;if(1!==c&&(o.scale(c,c),w/=c),o.lineWidth=w,r.isInvalidPDFjsFont){const r=[];let a=0;for(const t of e)r.push(t.unicode),a+=t.width;return o.fillText(r.join(""),0,0),t.x+=a*b*d,o.restore(),void this.compose()}let S,x=0;for(S=0;S<f;++S){const t=e[S];if("number"==typeof t){x+=g*t*s/1e3;continue}let a=!1;const n=(t.isSpace?h:0)+l,i=t.fontChar,d=t.accent;let f,w,A=t.width;if(p){const e=t.vmetric||m,r=-(t.vmetric?e[1]:.5*A)*b,a=e[2]*b;A=e?-e[0]:A,f=r/c,w=(x+a)/c}else f=x/c,w=0;if(r.remeasure&&A>0){const e=1e3*o.measureText(i).width/s*c;if(A<e&&this.isFontSubpixelAAEnabled){const t=A/e;a=!0,o.save(),o.scale(t,1),f/=t}else A!==e&&(f+=(A-e)/2e3*s/c)}if(this.contentVisible&&(t.isInFont||r.missingFile))if(y&&!d)o.fillText(i,f,w);else if(this.paintChar(i,f,w,v),d){const e=f+s*d.offset.x/c,t=w-s*d.offset.y/c;this.paintChar(d.fontChar,e,t,v)}x+=p?A*b-n*u:A*b+n*u,a&&o.restore()}p?t.y-=x:t.x+=x*d,o.restore(),this.compose()}showType3Text(e){const t=this.ctx,r=this.current,n=r.font,i=r.fontSize,s=r.fontDirection,o=n.vertical?1:-1,c=r.charSpacing,l=r.wordSpacing,h=r.textHScale*s,u=r.fontMatrix||a.FONT_IDENTITY_MATRIX,d=e.length;let f,p,g,m;if(r.textRenderingMode!==a.TextRenderingMode.INVISIBLE&&0!==i){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...r.textMatrix),t.translate(r.x,r.y),t.scale(h,s),f=0;f<d;++f){if(p=e[f],"number"==typeof p){m=o*p*i/1e3,this.ctx.translate(m,0),r.x+=m*h;continue}const s=(p.isSpace?l:0)+c,d=n.charProcOperatorList[p.operatorListId];d?(this.contentVisible&&(this.processingType3=p,this.save(),t.scale(i,i),t.transform(...u),this.executeOperatorList(d),this.restore()),g=a.Util.applyTransform([p.width,0],u)[0]*i+s,t.translate(g,0),r.x+=g*h):(0,a.warn)(`Type3 character "${p.operatorListId}" is not available.`)}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,r,a,n,i){this.ctx.rect(r,a,n-r,i-a),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;if("TilingPattern"===e[0]){const r=e[1],a=this.baseTransform||(0,n.getCurrentTransform)(this.ctx),s={createCanvasGraphics:e=>new C(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new i.TilingPattern(e,r,this.ctx,s,a)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,r){const n=a.Util.makeHexColor(e,t,r);this.ctx.strokeStyle=n,this.current.strokeColor=n}setFillRGBColor(e,t,r){const n=a.Util.makeHexColor(e,t,r);this.ctx.fillStyle=n,this.current.fillColor=n,this.current.patternFill=!1}_getPattern(e,t=null){let r;return this.cachedPatterns.has(e)?r=this.cachedPatterns.get(e):(r=(0,i.getShadingPattern)(this.getObject(e)),this.cachedPatterns.set(e,r)),t&&(r.matrix=t),r}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const r=this._getPattern(e);t.fillStyle=r.getPattern(t,this,(0,n.getCurrentTransformInverse)(t),i.PathType.SHADING);const s=(0,n.getCurrentTransformInverse)(t);if(s){const{width:e,height:r}=t.canvas,[n,i,o,c]=a.Util.getAxialAlignedBoundingBox([0,0,e,r],s);this.ctx.fillRect(n,i,o-n,c-i)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,a.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,a.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,n.getCurrentTransform)(this.ctx),t)){const e=t[2]-t[0],r=t[3]-t[1];this.ctx.rect(t[0],t[1],e,r),this.current.updateRectMinMax((0,n.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||(0,a.info)("TODO: Support non-isolated groups."),e.knockout&&(0,a.warn)("Knockout groups not supported.");const r=(0,n.getCurrentTransform)(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let i=a.Util.getAxialAlignedBoundingBox(e.bbox,(0,n.getCurrentTransform)(t));const s=[0,0,t.canvas.width,t.canvas.height];i=a.Util.intersect(i,s)||[0,0,0,0];const c=Math.floor(i[0]),l=Math.floor(i[1]);let h=Math.max(Math.ceil(i[2])-c,1),u=Math.max(Math.ceil(i[3])-l,1),d=1,f=1;h>o&&(d=h/o,h=o),u>o&&(f=u/o,u=o),this.current.startNewPathAndClipBox([0,0,h,u]);let g="groupAt"+this.groupLevel;e.smask&&(g+="_smask_"+this.smaskCounter++%2);const m=this.cachedCanvases.getCanvas(g,h,u),b=m.context;b.scale(1/d,1/f),b.translate(-c,-l),b.transform(...r),e.smask?this.smaskStack.push({canvas:m.canvas,context:b,offsetX:c,offsetY:l,scaleX:d,scaleY:f,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(c,l),t.scale(d,f),t.save()),p(t,b),this.ctx=b,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,r=this.groupStack.pop();if(this.ctx=r,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=(0,n.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const r=a.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(r)}}beginAnnotation(e,t,r,i,s){if(this.#Wt(),g(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const i=t[2]-t[0],o=t[3]-t[1];if(s&&this.annotationCanvasMap){(r=r.slice())[4]-=t[0],r[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=i,t[3]=o;const[s,c]=a.Util.singularValueDecompose2dScale((0,n.getCurrentTransform)(this.ctx)),{viewportScale:l}=this,h=Math.ceil(i*this.outputScaleX*l),u=Math.ceil(o*this.outputScaleY*l);this.annotationCanvas=this.canvasFactory.create(h,u);const{canvas:d,context:f}=this.annotationCanvas;this.annotationCanvasMap.set(e,d),this.annotationCanvas.savedCtx=this.ctx,this.ctx=f,this.ctx.save(),this.ctx.setTransform(s,0,0,-c,0,o*c),g(this.ctx)}else g(this.ctx),this.ctx.rect(t[0],t[1],i,o),this.ctx.clip(),this.endPath()}this.current=new u(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...r),this.transform(...i)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#Gt(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const r=this.ctx,a=this.processingType3;if(a&&(void 0===a.compiled&&(a.compiled=function(e){const{width:t,height:r}=e;if(t>1e3||r>1e3)return null;const a=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),n=t+1;let i,s,o,c=new Uint8Array(n*(r+1));const l=t+7&-8;let h=new Uint8Array(l*r),u=0;for(const t of e.data){let e=128;for(;e>0;)h[u++]=t&e?0:255,e>>=1}let d=0;for(u=0,0!==h[u]&&(c[0]=1,++d),s=1;s<t;s++)h[u]!==h[u+1]&&(c[s]=h[u]?2:1,++d),u++;for(0!==h[u]&&(c[s]=2,++d),i=1;i<r;i++){u=i*l,o=i*n,h[u-l]!==h[u]&&(c[o]=h[u]?1:8,++d);let e=(h[u]?4:0)+(h[u-l]?8:0);for(s=1;s<t;s++)e=(e>>2)+(h[u+1]?4:0)+(h[u-l+1]?8:0),a[e]&&(c[o+s]=a[e],++d),u++;if(h[u-l]!==h[u]&&(c[o+s]=h[u]?2:4,++d),d>1e3)return null}for(u=l*(r-1),o=i*n,0!==h[u]&&(c[o]=8,++d),s=1;s<t;s++)h[u]!==h[u+1]&&(c[o+s]=h[u]?4:8,++d),u++;if(0!==h[u]&&(c[o+s]=4,++d),d>1e3)return null;const f=new Int32Array([0,n,-1,0,-n,0,0,0,1]),p=new Path2D;for(i=0;d&&i<=r;i++){let e=i*n;const r=e+t;for(;e<r&&!c[e];)e++;if(e===r)continue;p.moveTo(e%n,i);const a=e;let s=c[e];do{const t=f[s];do{e+=t}while(!c[e]);const r=c[e];5!==r&&10!==r?(s=r,c[e]=0):(s=r&51*s>>4,c[e]&=s>>2|s<<2),p.lineTo(e%n,e/n|0),c[e]||--d}while(a!==e);--i}return h=null,c=null,function(e){e.save(),e.scale(1/t,-1/r),e.translate(0,-r),e.fill(p),e.beginPath(),e.restore()}}(e)),a.compiled))return void a.compiled(r);const n=this._createMaskCanvas(e),i=n.canvas;r.save(),r.setTransform(1,0,0,1,0,0),r.drawImage(i,n.offsetX,n.offsetY),r.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,r=0,i=0,s,o){if(!this.contentVisible)return;e=this.getObject(e.data,e);const c=this.ctx;c.save();const l=(0,n.getCurrentTransform)(c);c.transform(t,r,i,s,0,0);const h=this._createMaskCanvas(e);c.setTransform(1,0,0,1,h.offsetX-l[4],h.offsetY-l[5]);for(let e=0,n=o.length;e<n;e+=2){const n=a.Util.transform(l,[t,r,i,s,o[e],o[e+1]]),[u,d]=a.Util.applyTransform([0,0],n);c.drawImage(h.canvas,u,d)}c.restore(),this.compose()}paintImageMaskXObjectGroup(e){if(!this.contentVisible)return;const t=this.ctx,r=this.current.fillColor,a=this.current.patternFill;for(const s of e){const{data:e,width:o,height:c,transform:l}=s,u=this.cachedCanvases.getCanvas("maskCanvas",o,c),d=u.context;d.save(),f(d,this.getObject(e,s)),d.globalCompositeOperation="source-in",d.fillStyle=a?r.getPattern(d,this,(0,n.getCurrentTransformInverse)(t),i.PathType.FILL):r,d.fillRect(0,0,o,c),d.restore(),t.save(),t.transform(...l),t.scale(1,-1),h(t,u.canvas,0,0,o,c,0,-1,1,1),t.restore()}this.compose()}paintImageXObject(e){if(!this.contentVisible)return;const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,a.warn)("Dependent image isn't ready yet")}paintImageXObjectRepeat(e,t,r,n){if(!this.contentVisible)return;const i=this.getObject(e);if(!i)return void(0,a.warn)("Dependent image isn't ready yet");const s=i.width,o=i.height,c=[];for(let e=0,a=n.length;e<a;e+=2)c.push({transform:[t,0,0,r,n[e],n[e+1]],x:0,y:0,w:s,h:o});this.paintInlineImageXObjectGroup(i,c)}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if("none"===this.current.transferMaps)return e.bitmap;const{bitmap:t,width:r,height:a}=e,n=this.cachedCanvases.getCanvas("inlineImage",r,a),i=n.context;return i.filter=this.current.transferMaps,i.drawImage(t,0,0),i.filter="none",n.canvas}paintInlineImageXObject(e){if(!this.contentVisible)return;const t=e.width,r=e.height,i=this.ctx;if(this.save(),!a.isNodeJS){const{filter:e}=i;"none"!==e&&""!==e&&(i.filter="none")}let s;if(i.scale(1/t,-1/r),e.bitmap)s=this.applyTransferMapsToBitmap(e);else if("function"==typeof HTMLElement&&e instanceof HTMLElement||!e.data)s=e;else{const a=this.cachedCanvases.getCanvas("inlineImage",t,r).context;d(a,e),s=this.applyTransferMapsToCanvas(a)}const o=this._scaleImage(s,(0,n.getCurrentTransformInverse)(i));i.imageSmoothingEnabled=w((0,n.getCurrentTransform)(i),e.interpolate),h(i,o.img,0,0,o.paintWidth,o.paintHeight,0,-r,t,r),this.compose(),this.restore()}paintInlineImageXObjectGroup(e,t){if(!this.contentVisible)return;const r=this.ctx;let a;if(e.bitmap)a=e.bitmap;else{const t=e.width,r=e.height,n=this.cachedCanvases.getCanvas("inlineImage",t,r).context;d(n,e),a=this.applyTransferMapsToCanvas(n)}for(const e of t)r.save(),r.transform(...e.transform),r.scale(1,-1),h(r,a,e.x,e.y,e.w,e.h,0,-1,1,1),r.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){const t=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e);const r=this.ctx;this.pendingClip&&(t||(this.pendingClip===k?r.clip("evenodd"):r.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),r.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const e=(0,n.getCurrentTransform)(this.ctx);if(0===e[1]&&0===e[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{const t=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),a=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,a)/t}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){const{lineWidth:e}=this.current,{a:t,b:r,c:a,d:n}=this.ctx.getTransform();let i,s;if(0===r&&0===a){const r=Math.abs(t),a=Math.abs(n);if(r===a)if(0===e)i=s=1/r;else{const t=r*e;i=s=t<1?1/t:1}else if(0===e)i=1/r,s=1/a;else{const t=r*e,n=a*e;i=t<1?1/t:1,s=n<1?1/n:1}}else{const o=Math.abs(t*n-r*a),c=Math.hypot(t,r),l=Math.hypot(a,n);if(0===e)i=l/o,s=c/o;else{const t=e*o;i=l>t?l/t:1,s=c>t?c/t:1}}this._cachedScaleForStroking[0]=i,this._cachedScaleForStroking[1]=s}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:r}=this.current,[a,n]=this.getScaleForStroking();if(t.lineWidth=r||1,1===a&&1===n)return void t.stroke();const i=t.getLineDash();if(e&&t.save(),t.scale(a,n),i.length>0){const e=Math.max(a,n);t.setLineDash(i.map((t=>t/e))),t.lineDashOffset/=e}t.stroke(),e&&t.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}t.CanvasGraphics=C;for(const e in a.OPS)void 0!==C.prototype[e]&&(C.prototype[a.OPS[e]]=C.prototype[e])},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new c(e);case"Mesh":return new u(e);case"Dummy":return new d}throw new Error(`Unknown IR type: ${e[0]}`)};var a=r(1),n=r(6);const i={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function s(e,t){if(!t)return;const r=t[2]-t[0],a=t[3]-t[1],n=new Path2D;n.rect(t[0],t[1],r,a),e.clip(n)}t.PathType=i;class o{constructor(){this.constructor===o&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,a.unreachable)("Abstract method `getPattern` called.")}}class c extends o{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,r,o){let c;if(o===i.STROKE||o===i.FILL){const i=t.current.getClippedPathBoundingBox(o,(0,n.getCurrentTransform)(e))||[0,0,0,0],l=Math.ceil(i[2]-i[0])||1,h=Math.ceil(i[3]-i[1])||1,u=t.cachedCanvases.getCanvas("pattern",l,h,!0),d=u.context;d.clearRect(0,0,d.canvas.width,d.canvas.height),d.beginPath(),d.rect(0,0,d.canvas.width,d.canvas.height),d.translate(-i[0],-i[1]),r=a.Util.transform(r,[1,0,0,1,i[0],i[1]]),d.transform(...t.baseTransform),this.matrix&&d.transform(...this.matrix),s(d,this._bbox),d.fillStyle=this._createGradient(d),d.fill(),c=e.createPattern(u.canvas,"no-repeat");const f=new DOMMatrix(r);c.setTransform(f)}else s(e,this._bbox),c=this._createGradient(e);return c}}function l(e,t,r,a,n,i,s,o){const c=t.coords,l=t.colors,h=e.data,u=4*e.width;let d;c[r+1]>c[a+1]&&(d=r,r=a,a=d,d=i,i=s,s=d),c[a+1]>c[n+1]&&(d=a,a=n,n=d,d=s,s=o,o=d),c[r+1]>c[a+1]&&(d=r,r=a,a=d,d=i,i=s,s=d);const f=(c[r]+t.offsetX)*t.scaleX,p=(c[r+1]+t.offsetY)*t.scaleY,g=(c[a]+t.offsetX)*t.scaleX,m=(c[a+1]+t.offsetY)*t.scaleY,b=(c[n]+t.offsetX)*t.scaleX,y=(c[n+1]+t.offsetY)*t.scaleY;if(p>=y)return;const v=l[i],w=l[i+1],A=l[i+2],S=l[s],x=l[s+1],k=l[s+2],C=l[o],_=l[o+1],T=l[o+2],E=Math.round(p),O=Math.round(y);let F,P,I,M,R,D,N,L;for(let e=E;e<=O;e++){if(e<m){const t=e<p?0:(p-e)/(p-m);F=f-(f-g)*t,P=v-(v-S)*t,I=w-(w-x)*t,M=A-(A-k)*t}else{let t;t=e>y?1:m===y?0:(m-e)/(m-y),F=g-(g-b)*t,P=S-(S-C)*t,I=x-(x-_)*t,M=k-(k-T)*t}let t;t=e<p?0:e>y?1:(p-e)/(p-y),R=f-(f-b)*t,D=v-(v-C)*t,N=w-(w-_)*t,L=A-(A-T)*t;const r=Math.round(Math.min(F,R)),a=Math.round(Math.max(F,R));let n=u*e+4*r;for(let e=r;e<=a;e++)t=(F-e)/(F-R),t<0?t=0:t>1&&(t=1),h[n++]=P-(P-D)*t|0,h[n++]=I-(I-N)*t|0,h[n++]=M-(M-L)*t|0,h[n++]=255}}function h(e,t,r){const a=t.coords,n=t.colors;let i,s;switch(t.type){case"lattice":const o=t.verticesPerRow,c=Math.floor(a.length/o)-1,h=o-1;for(i=0;i<c;i++){let t=i*o;for(let i=0;i<h;i++,t++)l(e,r,a[t],a[t+1],a[t+o],n[t],n[t+1],n[t+o]),l(e,r,a[t+o+1],a[t+1],a[t+o],n[t+o+1],n[t+1],n[t+o])}break;case"triangles":for(i=0,s=a.length;i<s;i+=3)l(e,r,a[i],a[i+1],a[i+2],n[i],n[i+1],n[i+2]);break;default:throw new Error("illegal figure")}}class u extends o{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(e,t,r){const a=Math.floor(this._bounds[0]),n=Math.floor(this._bounds[1]),i=Math.ceil(this._bounds[2])-a,s=Math.ceil(this._bounds[3])-n,o=Math.min(Math.ceil(Math.abs(i*e[0]*1.1)),3e3),c=Math.min(Math.ceil(Math.abs(s*e[1]*1.1)),3e3),l=i/o,u=s/c,d={coords:this._coords,colors:this._colors,offsetX:-a,offsetY:-n,scaleX:1/l,scaleY:1/u},f=o+4,p=c+4,g=r.getCanvas("mesh",f,p,!1),m=g.context,b=m.createImageData(o,c);if(t){const e=b.data;for(let r=0,a=e.length;r<a;r+=4)e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=255}for(const e of this._figures)h(b,e,d);return m.putImageData(b,2,2),{canvas:g.canvas,offsetX:a-2*l,offsetY:n-2*u,scaleX:l,scaleY:u}}getPattern(e,t,r,o){let c;if(s(e,this._bbox),o===i.SHADING)c=a.Util.singularValueDecompose2dScale((0,n.getCurrentTransform)(e));else if(c=a.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=a.Util.singularValueDecompose2dScale(this.matrix);c=[c[0]*e[0],c[1]*e[1]]}const l=this._createMeshCanvas(c,o===i.SHADING?null:this._background,t.cachedCanvases);return o!==i.SHADING&&(e.setTransform(...t.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(l.offsetX,l.offsetY),e.scale(l.scaleX,l.scaleY),e.createPattern(l.canvas,"no-repeat")}}class d extends o{getPattern(){return"hotpink"}}const f=1,p=2;class g{static MAX_PATTERN_SIZE=3e3;constructor(e,t,r,a,n){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=r,this.canvasGraphicsFactory=a,this.baseTransform=n}createPatternCanvas(e){const t=this.operatorList,r=this.bbox,i=this.xstep,s=this.ystep,o=this.paintType,c=this.tilingType,l=this.color,h=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+c);const u=r[0],d=r[1],f=r[2],p=r[3],g=a.Util.singularValueDecompose2dScale(this.matrix),m=a.Util.singularValueDecompose2dScale(this.baseTransform),b=[g[0]*m[0],g[1]*m[1]],y=this.getSizeAndScale(i,this.ctx.canvas.width,b[0]),v=this.getSizeAndScale(s,this.ctx.canvas.height,b[1]),w=e.cachedCanvases.getCanvas("pattern",y.size,v.size,!0),A=w.context,S=h.createCanvasGraphics(A);S.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,o,l);let x=u,k=d,C=f,_=p;return u<0&&(x=0,C+=Math.abs(u)),d<0&&(k=0,_+=Math.abs(d)),A.translate(-y.scale*x,-v.scale*k),S.transform(y.scale,0,0,v.scale,0,0),A.save(),this.clipBbox(S,x,k,C,_),S.baseTransform=(0,n.getCurrentTransform)(S.ctx),S.executeOperatorList(t),S.endDrawing(),{canvas:w.canvas,scaleX:y.scale,scaleY:v.scale,offsetX:x,offsetY:k}}getSizeAndScale(e,t,r){e=Math.abs(e);const a=Math.max(g.MAX_PATTERN_SIZE,t);let n=Math.ceil(e*r);return n>=a?n=a:r=n/e,{scale:r,size:n}}clipBbox(e,t,r,a,i){const s=a-t,o=i-r;e.ctx.rect(t,r,s,o),e.current.updateRectMinMax((0,n.getCurrentTransform)(e.ctx),[t,r,a,i]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,r){const n=e.ctx,i=e.current;switch(t){case f:const e=this.ctx;n.fillStyle=e.fillStyle,n.strokeStyle=e.strokeStyle,i.fillColor=e.fillStyle,i.strokeColor=e.strokeStyle;break;case p:const s=a.Util.makeHexColor(r[0],r[1],r[2]);n.fillStyle=s,n.strokeStyle=s,i.fillColor=s,i.strokeColor=s;break;default:throw new a.FormatError(`Unsupported paint type: ${t}`)}}getPattern(e,t,r,n){let s=r;n!==i.SHADING&&(s=a.Util.transform(s,t.baseTransform),this.matrix&&(s=a.Util.transform(s,this.matrix)));const o=this.createPatternCanvas(t);let c=new DOMMatrix(s);c=c.translate(o.offsetX,o.offsetY),c=c.scale(1/o.scaleX,1/o.scaleY);const l=e.createPattern(o.canvas,"repeat");return l.setTransform(c),l}}t.TilingPattern=g},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=n,t.convertToRGBA=function(e){switch(e.kind){case a.ImageKind.GRAYSCALE_1BPP:return n(e);case a.ImageKind.RGB_24BPP:return function({src:e,srcPos:t=0,dest:r,destPos:n=0,width:i,height:s}){let o=0;const c=e.length>>2,l=new Uint32Array(e.buffer,t,c);if(a.FeatureTest.isLittleEndian){for(;o<c-2;o+=3,n+=4){const e=l[o],t=l[o+1],a=l[o+2];r[n]=4278190080|e,r[n+1]=e>>>24|t<<8|4278190080,r[n+2]=t>>>16|a<<16|4278190080,r[n+3]=a>>>8|4278190080}for(let t=4*o,a=e.length;t<a;t+=3)r[n++]=e[t]|e[t+1]<<8|e[t+2]<<16|4278190080}else{for(;o<c-2;o+=3,n+=4){const e=l[o],t=l[o+1],a=l[o+2];r[n]=255|e,r[n+1]=e<<24|t>>>8|255,r[n+2]=t<<16|a>>>16|255,r[n+3]=a<<8|255}for(let t=4*o,a=e.length;t<a;t+=3)r[n++]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|255}return{srcPos:t,destPos:n}}(e)}return null},t.grayToRGBA=function(e,t){if(a.FeatureTest.isLittleEndian)for(let r=0,a=e.length;r<a;r++)t[r]=65793*e[r]|4278190080;else for(let r=0,a=e.length;r<a;r++)t[r]=16843008*e[r]|255};var a=r(1);function n({src:e,srcPos:t=0,dest:r,width:n,height:i,nonBlackColor:s=4294967295,inverseDecode:o=!1}){const c=a.FeatureTest.isLittleEndian?4278190080:255,[l,h]=o?[s,c]:[c,s],u=n>>3,d=7&n,f=e.length;r=new Uint32Array(r.buffer);let p=0;for(let a=0;a<i;a++){for(const a=t+u;t<a;t++){const a=t<f?e[t]:255;r[p++]=128&a?h:l,r[p++]=64&a?h:l,r[p++]=32&a?h:l,r[p++]=16&a?h:l,r[p++]=8&a?h:l,r[p++]=4&a?h:l,r[p++]=2&a?h:l,r[p++]=1&a?h:l}if(0===d)continue;const a=t<f?e[t++]:255;for(let e=0;e<d;e++)r[p++]=a&1<<7-e?h:l}return{srcPos:t,destPos:p}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const r=Object.create(null);t.GlobalWorkerOptions=r,r.workerPort=null,r.workerSrc=""},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var a=r(1);const n=1,i=2,s=1,o=2,c=3,l=4,h=5,u=6,d=7,f=8;function p(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,a.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new a.AbortException(e.message);case"MissingPDFException":return new a.MissingPDFException(e.message);case"PasswordException":return new a.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new a.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new a.UnknownErrorException(e.message,e.details);default:return new a.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,r){this.sourceName=e,this.targetName=t,this.comObj=r,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=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this.#R(t);if(t.callback){const e=t.callbackId,r=this.callbackCapabilities[e];if(!r)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],t.callback===n)r.resolve(t.data);else{if(t.callback!==i)throw new Error("Unexpected callback case");r.reject(p(t.reason))}return}const a=this.actionHandler[t.action];if(!a)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,s=t.sourceName;new Promise((function(e){e(a(t.data))})).then((function(a){r.postMessage({sourceName:e,targetName:s,callback:n,callbackId:t.callbackId,data:a})}),(function(a){r.postMessage({sourceName:e,targetName:s,callback:i,callbackId:t.callbackId,reason:p(a)})}))}else t.streamId?this.#D(t):a(t.data)},r.addEventListener("message",this._onComObjOnMessage)}on(e,t){const r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=t}send(e,t,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},r)}sendWithPromise(e,t,r){const n=this.callbackId++,i=new a.PromiseCapability;this.callbackCapabilities[n]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},r)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,r,n){const i=this.streamId++,o=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:r=>{const s=new a.PromiseCapability;return this.streamControllers[i]={controller:r,startCall:s,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:o,targetName:c,action:e,streamId:i,data:t,desiredSize:r.desiredSize},n),s.promise},pull:e=>{const t=new a.PromiseCapability;return this.streamControllers[i].pullCall=t,l.postMessage({sourceName:o,targetName:c,stream:u,streamId:i,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,a.assert)(e instanceof Error,"cancel must have a valid reason");const t=new a.PromiseCapability;return this.streamControllers[i].cancelCall=t,this.streamControllers[i].isClosed=!0,l.postMessage({sourceName:o,targetName:c,stream:s,streamId:i,reason:p(e)}),t.promise}},r)}#D(e){const t=e.streamId,r=this.sourceName,n=e.sourceName,i=this.comObj,s=this,o=this.actionHandler[e.action],u={enqueue(e,s=1,o){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=s,c>0&&this.desiredSize<=0&&(this.sinkCapability=new a.PromiseCapability,this.ready=this.sinkCapability.promise),i.postMessage({sourceName:r,targetName:n,stream:l,streamId:t,chunk:e},o)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:c,streamId:t}),delete s.streamSinks[t])},error(e){(0,a.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:r,targetName:n,stream:h,streamId:t,reason:p(e)}))},sinkCapability:new a.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[t]=u,new Promise((function(t){t(o(e.data,u))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:n,stream:f,streamId:t,reason:p(e)})}))}#R(e){const t=e.streamId,r=this.sourceName,n=e.sourceName,i=this.comObj,g=this.streamControllers[t],m=this.streamSinks[t];switch(e.stream){case f:e.success?g.startCall.resolve():g.startCall.reject(p(e.reason));break;case d:e.success?g.pullCall.resolve():g.pullCall.reject(p(e.reason));break;case u:if(!m){i.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0});break}m.desiredSize<=0&&e.desiredSize>0&&m.sinkCapability.resolve(),m.desiredSize=e.desiredSize,new Promise((function(e){e(m.onPull?.())})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:n,stream:d,streamId:t,reason:p(e)})}));break;case l:if((0,a.assert)(g,"enqueue should have stream controller"),g.isClosed)break;g.controller.enqueue(e.chunk);break;case c:if((0,a.assert)(g,"close should have stream controller"),g.isClosed)break;g.isClosed=!0,g.controller.close(),this.#N(g,t);break;case h:(0,a.assert)(g,"error should have stream controller"),g.controller.error(p(e.reason)),this.#N(g,t);break;case o:e.success?g.cancelCall.resolve():g.cancelCall.reject(p(e.reason)),this.#N(g,t);break;case s:if(!m)break;new Promise((function(t){t(m.onCancel?.(p(e.reason)))})).then((function(){i.postMessage({sourceName:r,targetName:n,stream:o,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:r,targetName:n,stream:o,streamId:t,reason:p(e)})})),m.sinkCapability.reject(p(e.reason)),m.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#N(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var a=r(1);t.Metadata=class{#qt;#Vt;constructor({parsedData:e,rawData:t}){this.#qt=e,this.#Vt=t}getRaw(){return this.#Vt}get(e){return this.#qt.get(e)??null}getAll(){return(0,a.objectFromMap)(this.#qt)}has(e){return this.#qt.has(e)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var a=r(1),n=r(8);const i=Symbol("INTERNAL");class s{#Kt=!0;constructor(e,t){this.name=e,this.intent=t}get visible(){return this.#Kt}_setVisible(e,t){e!==i&&(0,a.unreachable)("Internal method `_setVisible` called."),this.#Kt=t}}t.OptionalContentConfig=class{#Yt=null;#Zt=new Map;#Jt=null;#Qt=null;constructor(e){if(this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,this.#Qt=e.order;for(const t of e.groups)this.#Zt.set(t.id,new s(t.name,t.intent));if("OFF"===e.baseState)for(const e of this.#Zt.values())e._setVisible(i,!1);for(const t of e.on)this.#Zt.get(t)._setVisible(i,!0);for(const t of e.off)this.#Zt.get(t)._setVisible(i,!1);this.#Jt=this.getHash()}}#er(e){const t=e.length;if(t<2)return!0;const r=e[0];for(let n=1;n<t;n++){const t=e[n];let i;if(Array.isArray(t))i=this.#er(t);else{if(!this.#Zt.has(t))return(0,a.warn)(`Optional content group not found: ${t}`),!0;i=this.#Zt.get(t).visible}switch(r){case"And":if(!i)return!1;break;case"Or":if(i)return!0;break;case"Not":return!i;default:return!0}}return"And"===r}isVisible(e){if(0===this.#Zt.size)return!0;if(!e)return(0,a.warn)("Optional content group not defined."),!0;if("OCG"===e.type)return this.#Zt.has(e.id)?this.#Zt.get(e.id).visible:((0,a.warn)(`Optional content group not found: ${e.id}`),!0);if("OCMD"===e.type){if(e.expression)return this.#er(e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!this.#Zt.has(t))return(0,a.warn)(`Optional content group not found: ${t}`),!0;if(this.#Zt.get(t).visible)return!0}return!1}if("AllOn"===e.policy){for(const t of e.ids){if(!this.#Zt.has(t))return(0,a.warn)(`Optional content group not found: ${t}`),!0;if(!this.#Zt.get(t).visible)return!1}return!0}if("AnyOff"===e.policy){for(const t of e.ids){if(!this.#Zt.has(t))return(0,a.warn)(`Optional content group not found: ${t}`),!0;if(!this.#Zt.get(t).visible)return!0}return!1}if("AllOff"===e.policy){for(const t of e.ids){if(!this.#Zt.has(t))return(0,a.warn)(`Optional content group not found: ${t}`),!0;if(this.#Zt.get(t).visible)return!1}return!0}return(0,a.warn)(`Unknown optional content policy ${e.policy}.`),!0}return(0,a.warn)(`Unknown group type ${e.type}.`),!0}setVisibility(e,t=!0){this.#Zt.has(e)?(this.#Zt.get(e)._setVisible(i,!!t),this.#Yt=null):(0,a.warn)(`Optional content group not found: ${e}`)}get hasInitialVisibility(){return null===this.#Jt||this.getHash()===this.#Jt}getOrder(){return this.#Zt.size?this.#Qt?this.#Qt.slice():[...this.#Zt.keys()]:null}getGroups(){return this.#Zt.size>0?(0,a.objectFromMap)(this.#Zt):null}getGroup(e){return this.#Zt.get(e)||null}getHash(){if(null!==this.#Yt)return this.#Yt;const e=new n.MurmurHash3_64;for(const[t,r]of this.#Zt)e.update(`${t}:${r.visible}`);return this.#Yt=e.hexdigest()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var a=r(1),n=r(6);t.PDFDataTransportStream=class{constructor({length:e,initialData:t,progressiveDone:r=!1,contentDispositionFilename:n=null,disableRange:i=!1,disableStream:s=!1},o){if((0,a.assert)(o,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=r,this._contentDispositionFilename=n,t?.length>0){const e=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=o,this._isStreamingSupported=!s,this._isRangeSupported=!i,this._contentLength=e,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:e,chunk:t}){const r=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{const t=this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(r),!0)}));(0,a.assert)(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){void 0===e.total?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new i(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new s(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}};class i{constructor(e,t,r=!1,a=null){this._stream=e,this._done=r||!1,this._filename=(0,n.isPdfFile)(a)?a:null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.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 e=new a.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class s{constructor(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.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 e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new a.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var a=r(1),n=r(20);function i(e,t,r){return{method:"GET",headers:e,signal:r.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function s(e){const t=new Headers;for(const r in e){const a=e[r];void 0!==a&&t.append(r,a)}return t}function o(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:((0,a.warn)(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}t.PDFFetchStream=class{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(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new c(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=new l(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class c{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 a.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=s(this._stream.httpHeaders);const r=t.url;fetch(r,i(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,r);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:i,suggestedLength:s}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=s||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new a.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(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:o(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class l{constructor(e,t,r){this._stream=e,this._reader=null,this._loaded=0;const o=e.source;this._withCredentials=o.withCredentials||!1,this._readCapability=new a.PromiseCapability,this._isStreamingSupported=!o.disableStream,this._abortController=new AbortController,this._headers=s(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${r-1}`);const c=o.url;fetch(c,i(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,n.validateResponseStatus)(e.status))throw(0,n.createResponseStatusError)(e.status,c);this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:o(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new a.MissingPDFException('Missing PDF "'+t+'".'):new a.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,n.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if((0,i.isPdfFile)(e))return e}return null},t.validateRangeRequestCapabilities=function({getResponseHeader:e,isHttp:t,rangeChunkSize:r,disableRange:a}){const n={allowRangeRequests:!1,suggestedLength:void 0},i=parseInt(e("Content-Length"),10);return Number.isInteger(i)?(n.suggestedLength=i,i<=2*r||a||!t||"bytes"!==e("Accept-Ranges")||"identity"!==(e("Content-Encoding")||"identity")||(n.allowRangeRequests=!0),n):n},t.validateResponseStatus=function(e){return 200===e||206===e};var a=r(1),n=r(21),i=r(6)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,r=n("filename\\*","i").exec(e);if(r){r=r[1];let e=o(r);return e=unescape(e),e=c(e),e=l(e),s(e)}if(r=function(e){const t=[];let r;const a=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=a.exec(e));){let[,e,a,n]=r;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[a,n]}const i=[];for(let e=0;e<t.length&&e in t;++e){let[r,a]=t[e];a=o(a),r&&(a=unescape(a),0===e&&(a=c(a))),i.push(a)}return i.join("")}(e),r)return s(l(r));if(r=n("filename","i").exec(e),r){r=r[1];let e=o(r);return e=l(e),s(e)}function n(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function i(e,r){if(e){if(!/^[\x00-\xFF]+$/.test(r))return r;try{const n=new TextDecoder(e,{fatal:!0}),i=(0,a.stringToBytes)(r);r=n.decode(i),t=!1}catch{}}return r}function s(e){return t&&/[\x80-\xff]/.test(e)&&(e=i("utf-8",e),t&&(e=i("iso-8859-1",e))),e}function o(e){if(e.startsWith('"')){const t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){const r=t[e].indexOf('"');-1!==r&&(t[e]=t[e].slice(0,r),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function c(e){const t=e.indexOf("'");return-1===t?e:i(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function l(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(e,t,r,a){if("q"===r||"Q"===r)return i(t,a=(a=a.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))})));try{a=atob(a)}catch{}return i(t,a)}))}return""};var a=r(1)},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var a=r(1),n=r(20);class i{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,r){const a={begin:e,end:t};for(const e in r)a[e]=r[e];return this.request(a)}requestFull(e){return this.request(e)}request(e){const t=new XMLHttpRequest,r=this.currXhrId++,a=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const e in this.httpHeaders){const r=this.httpHeaders[e];void 0!==r&&t.setRequestHeader(e,r)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),a.expectedStatus=206):a.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),a.onHeadersReceived=e.onHeadersReceived,a.onDone=e.onDone,a.onError=e.onError,a.onProgress=e.onProgress,t.send(null),r}onProgress(e,t){const r=this.pendingRequests[e];r&&r.onProgress?.(t)}onStateChange(e,t){const r=this.pendingRequests[e];if(!r)return;const n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4!==n.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===n.status&&this.isHttp)return void r.onError?.(n.status);const i=n.status||200;if((200!==i||206!==r.expectedStatus)&&i!==r.expectedStatus)return void r.onError?.(n.status);const s=function(e){const t=e.response;return"string"!=typeof t?t:(0,a.stringToBytes)(t).buffer}(n);if(206===i){const e=n.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);r.onDone({begin:parseInt(t[1],10),chunk:s})}else s?r.onDone({begin:0,chunk:s}):r.onError?.(n.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new i(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new s(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const r=new o(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class s{constructor(e,t){this._manager=e;const r={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(r),this._headersReceivedCapability=new a.PromiseCapability,this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.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 e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=e=>t.getResponseHeader(e),{allowRangeRequests:a,suggestedLength:i}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});a&&(this._isRangeSupported=!0),this._contentLength=i||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,n.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.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 e=new a.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class o{constructor(e,t,r){this._manager=e;const a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,r,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,n.createResponseStatusError)(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new a.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var a=r(1),n=r(20);const i=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=__webpack_require__(671),r=t.parse(e);return"file:"===r.protocol||r.host?r:/^[a-z]:[/\\]/i.test(e)?t.parse(`file:///${e}`):(r.host||(r.protocol="file:"),r)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,a.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new u(this):new l(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const r=this.isFsUrl?new d(this,e,t):new h(this,e,t);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class s{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=new a.PromiseCapability,this._headersCapability=new a.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(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=new a.PromiseCapability,this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new a.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class o{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new a.PromiseCapability;const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=new a.PromiseCapability,this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function c(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class l extends s{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new a.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const r=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:i,suggestedLength:s}=(0,n.validateRangeRequestCapabilities)({getResponseHeader:r,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=s||this._contentLength,this._filename=(0,n.extractFilenameFromHeader)(r)};if(this._request=null,"http:"===this._url.protocol){const r=__webpack_require__(492);this._request=r.request(c(this._url,e.httpHeaders),t)}else{const r=__webpack_require__(815);this._request=r.request(c(this._url,e.httpHeaders),t)}this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class h extends o{constructor(e,t,r){super(e),this._httpHeaders={};for(const t in e.httpHeaders){const r=e.httpHeaders[t];void 0!==r&&(this._httpHeaders[t]=r)}this._httpHeaders.Range=`bytes=${t}-${r-1}`;const n=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new a.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};if(this._request=null,"http:"===this._url.protocol){const e=__webpack_require__(492);this._request=e.request(c(this._url,this._httpHeaders),n)}else{const e=__webpack_require__(815);this._request=e.request(c(this._url,this._httpHeaders),n)}this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class u extends s{constructor(e){super(e);let t=decodeURIComponent(this._url.path);i.test(this._url.href)&&(t=t.replace(/^\//,""));const r=__webpack_require__(237);r.lstat(t,((e,n)=>{if(e)return"ENOENT"===e.code&&(e=new a.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=n.size,this._setReadableStream(r.createReadStream(t)),this._headersCapability.resolve()}))}}class d extends o{constructor(e,t,r){super(e);let a=decodeURIComponent(this._url.path);i.test(this._url.href)&&(a=a.replace(/^\//,""));const n=__webpack_require__(237);this._setReadableStream(n.createReadStream(a,{start:t,end:r-1}))}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var a=r(6),n=r(1);const i="normal",s="normal",o="#000000",c=["butt","round","square"],l=["miter","round","bevel"],h=function(e,t="",r=!1){if(URL.createObjectURL&&"undefined"!=typeof Blob&&!r)return URL.createObjectURL(new Blob([e],{type:t}));const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n=`data:${t};base64,`;for(let t=0,r=e.length;t<r;t+=3){const i=255&e[t],s=255&e[t+1],o=255&e[t+2];n+=a[i>>2]+a[(3&i)<<4|s>>4]+a[t+1<r?(15&s)<<2|o>>6:64]+a[t+2<r?63&o:64]}return n},u=function(){const e=new Uint8Array([137,80,78,71,13,10,26,10]),t=new Int32Array(256);for(let e=0;e<256;e++){let r=e;for(let e=0;e<8;e++)r=1&r?3988292384^r>>1&2147483647:r>>1&2147483647;t[e]=r}function r(e,r,a,n){let i=n;const s=r.length;a[i]=s>>24&255,a[i+1]=s>>16&255,a[i+2]=s>>8&255,a[i+3]=255&s,i+=4,a[i]=255&e.charCodeAt(0),a[i+1]=255&e.charCodeAt(1),a[i+2]=255&e.charCodeAt(2),a[i+3]=255&e.charCodeAt(3),i+=4,a.set(r,i),i+=r.length;const o=function(e,r,a){let n=-1;for(let i=r;i<a;i++){const r=255&(n^e[i]);n=n>>>8^t[r]}return~n}(a,n+4,i);a[i]=o>>24&255,a[i+1]=o>>16&255,a[i+2]=o>>8&255,a[i+3]=255&o}function a(e){let t=e.length;const r=65535,a=Math.ceil(t/r),n=new Uint8Array(2+t+5*a+4);let i=0;n[i++]=120,n[i++]=156;let s=0;for(;t>r;)n[i++]=0,n[i++]=255,n[i++]=255,n[i++]=0,n[i++]=0,n.set(e.subarray(s,s+r),i),i+=r,s+=r,t-=r;n[i++]=1,n[i++]=255&t,n[i++]=t>>8&255,n[i++]=255&~t,n[i++]=(65535&~t)>>8&255,n.set(e.subarray(s),i),i+=e.length-s;const o=function(e,t,r){let a=1,n=0;for(let i=t;i<r;++i)a=(a+(255&e[i]))%65521,n=(n+a)%65521;return n<<16|a}(e,0,e.length);return n[i++]=o>>24&255,n[i++]=o>>16&255,n[i++]=o>>8&255,n[i++]=255&o,n}function i(t,i,s,o){const c=t.width,l=t.height;let u,d,f;const p=t.data;switch(i){case n.ImageKind.GRAYSCALE_1BPP:d=0,u=1,f=c+7>>3;break;case n.ImageKind.RGB_24BPP:d=2,u=8,f=3*c;break;case n.ImageKind.RGBA_32BPP:d=6,u=8,f=4*c;break;default:throw new Error("invalid format")}const g=new Uint8Array((1+f)*l);let m=0,b=0;for(let e=0;e<l;++e)g[m++]=0,g.set(p.subarray(b,b+f),m),b+=f,m+=f;if(i===n.ImageKind.GRAYSCALE_1BPP&&o){m=0;for(let e=0;e<l;e++){m++;for(let e=0;e<f;e++)g[m++]^=255}}const y=new Uint8Array([c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,u,d,0,0,0]),v=function(e){if(!n.isNodeJS)return a(e);try{const t=parseInt(process.versions.node)>=8?e:Buffer.from(e),r=__webpack_require__(787).deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return a(e)}(g),w=e.length+36+y.length+v.length,A=new Uint8Array(w);let S=0;return A.set(e,S),S+=e.length,r("IHDR",y,A,S),S+=12+y.length,r("IDATA",v,A,S),S+=12+v.length,r("IEND",new Uint8Array(0),A,S),h(A,"image/png",s)}return function(e,t,r){return i(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t,r)}}();class d{constructor(){this.fontSizeScale=1,this.fontWeight=s,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.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=o,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(e,t){this.x=e,this.y=t}}function f(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substring(0,"."===t[r]?r:r+1)}function p(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${f(e[0])} ${f(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${f(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${f(e[4])} ${f(e[5])})`;return`matrix(${f(e[0])} ${f(e[1])} ${f(e[2])} ${f(e[3])} ${f(e[4])} ${f(e[5])})`}let g=0,m=0,b=0;t.SVGGraphics=class{constructor(e,t,r=!1){(0,a.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new a.DOMSVGFactory,this.current=new d,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r,this._operatorIdMapping=[];for(const e in n.OPS)this._operatorIdMapping[n.OPS[e]]=e}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,r=e.argsArray;for(let e=0,a=t.length;e<a;e++)if(t[e]===n.OPS.dependency)for(const t of r[e]){const e=t.startsWith("g_")?this.commonObjs:this.objs,r=new Promise((r=>{e.get(t,r)}));this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,r,a,i,s){const o=[e,t,r,a,i,s];this.transformMatrix=n.Util.transform(this.transformMatrix,o),this.tgrp=null}getSVG(e,t){this.viewport=t;const r=this._initialize(t);return this.loadDependencies(e).then((()=>(this.transformMatrix=n.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),r)))}convertOpList(e){const t=this._operatorIdMapping,r=e.argsArray,a=e.fnArray,n=[];for(let e=0,i=a.length;e<i;e++){const i=a[e];n.push({fnId:i,fn:t[i],args:r[e]})}return function(e){let t=[];const r=[];for(const a of e)"save"!==a.fn?"restore"===a.fn?t=r.pop():t.push(a):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t.at(-1).items);return t}(n)}executeOpTree(e){for(const t of e){const e=t.fn,r=t.fnId,a=t.args;switch(0|r){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(a);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(a[0],a[1]);break;case n.OPS.setFont:this.setFont(a);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(a[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(a[0],a[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(a[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(a[0]);break;case n.OPS.setHScale:this.setHScale(a[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(a[0],a[1],a[2],a[3],a[4],a[5]);break;case n.OPS.setTextRise:this.setTextRise(a[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(a[0]);break;case n.OPS.setLineWidth:this.setLineWidth(a[0]);break;case n.OPS.setLineJoin:this.setLineJoin(a[0]);break;case n.OPS.setLineCap:this.setLineCap(a[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(a[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(a[0],a[1],a[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(a[0],a[1],a[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(a);break;case n.OPS.setFillColorN:this.setFillColorN(a);break;case n.OPS.shadingFill:this.shadingFill(a[0]);break;case n.OPS.setDash:this.setDash(a[0],a[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(a[0]);break;case n.OPS.setFlatness:this.setFlatness(a[0]);break;case n.OPS.setGState:this.setGState(a[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(a[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(a[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(a[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(a[0],a[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(a[0],a[1],a[2],a[3],a[4],a[5]);break;case n.OPS.constructPath:this.constructPath(a[0],a[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,n.warn)(`Unimplemented operator ${e}`)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,r,a,n,i){const s=this.current;s.textMatrix=s.lineMatrix=[e,t,r,a,n,i],s.textMatrixScale=Math.hypot(e,t),s.x=s.lineX=0,s.y=s.lineY=0,s.xcoords=[],s.ycoords=[],s.tspan=this.svgFactory.createElement("svg:tspan"),s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",`${f(s.fontSize)}px`),s.tspan.setAttributeNS(null,"y",f(-s.y)),s.txtElement=this.svgFactory.createElement("svg:text"),s.txtElement.append(s.tspan)}beginText(){const e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=n.IDENTITY_MATRIX,e.lineMatrix=n.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){const r=this.current;r.x=r.lineX+=e,r.y=r.lineY+=t,r.xcoords=[],r.ycoords=[],r.tspan=this.svgFactory.createElement("svg:tspan"),r.tspan.setAttributeNS(null,"font-family",r.fontFamily),r.tspan.setAttributeNS(null,"font-size",`${f(r.fontSize)}px`),r.tspan.setAttributeNS(null,"y",f(-r.y))}showText(e){const t=this.current,r=t.font,a=t.fontSize;if(0===a)return;const c=t.fontSizeScale,l=t.charSpacing,h=t.wordSpacing,u=t.fontDirection,d=t.textHScale*u,g=r.vertical,m=g?1:-1,b=r.defaultVMetrics,y=a*t.fontMatrix[0];let v=0;for(const n of e){if(null===n){v+=u*h;continue}if("number"==typeof n){v+=m*n*a/1e3;continue}const e=(n.isSpace?h:0)+l,i=n.fontChar;let s,o,d=n.width;if(g){let e;const t=n.vmetric||b;e=n.vmetric?t[1]:.5*d,e=-e*y;const r=t[2]*y;d=t?-t[0]:d,s=e/c,o=(v+r)/c}else s=v/c,o=0;(n.isInFont||r.missingFile)&&(t.xcoords.push(t.x+s),g&&t.ycoords.push(-t.y+o),t.tspan.textContent+=i),v+=g?d*y-e*u:d*y+e*u}t.tspan.setAttributeNS(null,"x",t.xcoords.map(f).join(" ")),g?t.tspan.setAttributeNS(null,"y",t.ycoords.map(f).join(" ")):t.tspan.setAttributeNS(null,"y",f(-t.y)),g?t.y-=v:t.x+=v*d,t.tspan.setAttributeNS(null,"font-family",t.fontFamily),t.tspan.setAttributeNS(null,"font-size",`${f(t.fontSize)}px`),t.fontStyle!==i&&t.tspan.setAttributeNS(null,"font-style",t.fontStyle),t.fontWeight!==s&&t.tspan.setAttributeNS(null,"font-weight",t.fontWeight);const w=t.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;if(w===n.TextRenderingMode.FILL||w===n.TextRenderingMode.FILL_STROKE?(t.fillColor!==o&&t.tspan.setAttributeNS(null,"fill",t.fillColor),t.fillAlpha<1&&t.tspan.setAttributeNS(null,"fill-opacity",t.fillAlpha)):t.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?t.tspan.setAttributeNS(null,"fill","transparent"):t.tspan.setAttributeNS(null,"fill","none"),w===n.TextRenderingMode.STROKE||w===n.TextRenderingMode.FILL_STROKE){const e=1/(t.textMatrixScale||1);this._setStrokeAttributes(t.tspan,e)}let A=t.textMatrix;0!==t.textRise&&(A=A.slice(),A[5]+=t.textRise),t.txtElement.setAttributeNS(null,"transform",`${p(A)} scale(${f(d)}, -1)`),t.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.txtElement.append(t.tspan),t.txtgrp.append(t.txtElement),this._ensureTransformGroup().append(t.txtElement)}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.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 t=h(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); }\n`}setFont(e){const t=this.current,r=this.commonObjs.get(e[0]);let a=e[1];t.font=r,!this.embedFonts||r.missingFile||this.embeddedFonts[r.loadedName]||(this.addFontStyle(r),this.embeddedFonts[r.loadedName]=r),t.fontMatrix=r.fontMatrix||n.FONT_IDENTITY_MATRIX;let i="normal";r.black?i="900":r.bold&&(i="bold");const s=r.italic?"italic":"normal";a<0?(a=-a,t.fontDirection=-1):t.fontDirection=1,t.fontSize=a,t.fontFamily=r.loadedName,t.fontWeight=i,t.fontStyle=s,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",f(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){const e=this.current;e.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement?.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){e>0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=c[e]}setLineJoin(e){this.current.lineJoin=l[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,r){this.current.strokeColor=n.Util.makeHexColor(e,t,r)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,r){this.current.fillColor=n.Util.makeHexColor(e,t,r),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const{width:t,height:r}=this.viewport,a=n.Util.inverseTransform(this.transformMatrix),[i,s,o,c]=n.Util.getAxialAlignedBoundingBox([0,0,t,r],a),l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x",i),l.setAttributeNS(null,"y",s),l.setAttributeNS(null,"width",o-i),l.setAttributeNS(null,"height",c-s),l.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&l.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(l)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],r=e[2],a=e[3]||n.IDENTITY_MATRIX,[i,s,o,c]=e[4],l=e[5],h=e[6],u=e[7],d="shading"+b++,[f,p,g,m]=n.Util.normalizeRect([...n.Util.applyTransform([i,s],a),...n.Util.applyTransform([o,c],a)]),[y,v]=n.Util.singularValueDecompose2dScale(a),w=l*y,A=h*v,S=this.svgFactory.createElement("svg:pattern");S.setAttributeNS(null,"id",d),S.setAttributeNS(null,"patternUnits","userSpaceOnUse"),S.setAttributeNS(null,"width",w),S.setAttributeNS(null,"height",A),S.setAttributeNS(null,"x",`${f}`),S.setAttributeNS(null,"y",`${p}`);const x=this.svg,k=this.transformMatrix,C=this.current.fillColor,_=this.current.strokeColor,T=this.svgFactory.create(g-f,m-p);if(this.svg=T,this.transformMatrix=a,2===u){const e=n.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(r)),this.svg=x,this.transformMatrix=k,this.current.fillColor=C,this.current.strokeColor=_,S.append(T.childNodes[0]),this.defs.append(S),`url(#${d})`}_makeShadingPattern(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading"+b++,r=e[3];let a;switch(e[1]){case"axial":const r=e[4],n=e[5];a=this.svgFactory.createElement("svg:linearGradient"),a.setAttributeNS(null,"id",t),a.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),a.setAttributeNS(null,"x1",r[0]),a.setAttributeNS(null,"y1",r[1]),a.setAttributeNS(null,"x2",n[0]),a.setAttributeNS(null,"y2",n[1]);break;case"radial":const i=e[4],s=e[5],o=e[6],c=e[7];a=this.svgFactory.createElement("svg:radialGradient"),a.setAttributeNS(null,"id",t),a.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),a.setAttributeNS(null,"cx",s[0]),a.setAttributeNS(null,"cy",s[1]),a.setAttributeNS(null,"r",c),a.setAttributeNS(null,"fx",i[0]),a.setAttributeNS(null,"fy",i[1]),a.setAttributeNS(null,"fr",o);break;default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of r){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),a.append(t)}return this.defs.append(a),`url(#${t})`;case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const r=this.current;let a=r.x,i=r.y,s=[],o=0;for(const r of e)switch(0|r){case n.OPS.rectangle:a=t[o++],i=t[o++];const e=a+t[o++],r=i+t[o++];s.push("M",f(a),f(i),"L",f(e),f(i),"L",f(e),f(r),"L",f(a),f(r),"Z");break;case n.OPS.moveTo:a=t[o++],i=t[o++],s.push("M",f(a),f(i));break;case n.OPS.lineTo:a=t[o++],i=t[o++],s.push("L",f(a),f(i));break;case n.OPS.curveTo:a=t[o+4],i=t[o+5],s.push("C",f(t[o]),f(t[o+1]),f(t[o+2]),f(t[o+3]),f(a),f(i)),o+=6;break;case n.OPS.curveTo2:s.push("C",f(a),f(i),f(t[o]),f(t[o+1]),f(t[o+2]),f(t[o+3])),a=t[o+2],i=t[o+3],o+=4;break;case n.OPS.curveTo3:a=t[o+2],i=t[o+3],s.push("C",f(t[o]),f(t[o+1]),f(a),f(i),f(a),f(i)),o+=4;break;case n.OPS.closePath:s.push("Z")}s=s.join(" "),r.path&&e.length>0&&e[0]!==n.OPS.rectangle&&e[0]!==n.OPS.moveTo?s=r.path.getAttributeNS(null,"d")+s:(r.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(r.path)),r.path.setAttributeNS(null,"d",s),r.path.setAttributeNS(null,"fill","none"),r.element=r.path,r.setCurrentPoint(a,i)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath"+g++,r=this.svgFactory.createElement("svg:clipPath");r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"transform",p(this.transformMatrix));const a=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?a.setAttributeNS(null,"clip-rule","evenodd"):a.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,r.append(a),this.defs.append(r),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;r.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,r]of e)switch(t){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);break;case"CA":this.setStrokeAlpha(r);break;case"ca":this.setFillAlpha(r);break;default:(0,n.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e,t=1){const r=this.current;let a=r.dashArray;1!==t&&a.length>0&&(a=a.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",r.strokeColor),e.setAttributeNS(null,"stroke-opacity",r.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",f(r.miterLimit)),e.setAttributeNS(null,"stroke-linecap",r.lineCap),e.setAttributeNS(null,"stroke-linejoin",r.lineJoin),e.setAttributeNS(null,"stroke-width",f(t*r.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",a.map(f).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",f(t*r.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,n.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const r=e.width,a=e.height,n=u(e,this.forceDataSchema,!!t),i=this.svgFactory.createElement("svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",f(r)),i.setAttributeNS(null,"height",f(a)),this.current.element=i,this.clip("nonzero");const s=this.svgFactory.createElement("svg:image");s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n),s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y",f(-a)),s.setAttributeNS(null,"width",f(r)+"px"),s.setAttributeNS(null,"height",f(a)+"px"),s.setAttributeNS(null,"transform",`scale(${f(1/r)} ${f(-1/a)})`),t?t.append(s):this._ensureTransformGroup().append(s)}paintImageMaskXObject(e){const t=this.getObject(e.data,e);if(t.bitmap)return void(0,n.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const r=this.current,a=t.width,i=t.height,s=r.fillColor;r.maskId="mask"+m++;const o=this.svgFactory.createElement("svg:mask");o.setAttributeNS(null,"id",r.maskId);const c=this.svgFactory.createElement("svg:rect");c.setAttributeNS(null,"x","0"),c.setAttributeNS(null,"y","0"),c.setAttributeNS(null,"width",f(a)),c.setAttributeNS(null,"height",f(i)),c.setAttributeNS(null,"fill",s),c.setAttributeNS(null,"mask",`url(#${r.maskId})`),this.defs.append(o),this._ensureTransformGroup().append(c),this.paintInlineImageXObject(t,o)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],r=t[3]-t[1],a=this.svgFactory.createElement("svg:rect");a.setAttributeNS(null,"x",t[0]),a.setAttributeNS(null,"y",t[1]),a.setAttributeNS(null,"width",f(e)),a.setAttributeNS(null,"height",f(r)),this.current.element=a,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),r=this.svgFactory.createElement("svg:defs");t.append(r),this.defs=r;const a=this.svgFactory.createElement("svg:g");return a.setAttributeNS(null,"transform",p(e.transform)),t.append(a),this.svg=a,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",p(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class r{static textContent(e){const t=[],a={items:t,styles:Object.create(null)};return function e(a){if(!a)return;let n=null;const i=a.name;if("#text"===i)n=a.value;else{if(!r.shouldBuildText(i))return;a?.attributes?.textContent?n=a.attributes.textContent:a.value&&(n=a.value)}if(null!==n&&t.push({str:n}),a.children)for(const t of a.children)e(t)}(e),a}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=r},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,n.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);const{container:t,viewport:r}=e,a=getComputedStyle(t),i=a.getPropertyValue("visibility"),s=parseFloat(a.getPropertyValue("--scale-factor"));"visible"===i&&(!s||Math.abs(s-r.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 o=new h(e);return o._render(),o},t.updateTextLayer=function({container:e,viewport:t,textDivs:r,textDivProperties:a,isOffscreenCanvasSupported:i,mustRotate:s=!0,mustRescale:c=!0}){if(s&&(0,n.setLayerDimensions)(e,{rotation:t.rotation}),c){const e=o(0,i),n={prevFontSize:null,prevFontFamily:null,div:null,scale:t.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e};for(const e of r)n.properties=a.get(e),n.div=e,l(n)}};var a=r(1),n=r(6);const i=30,s=new Map;function o(e,t){let r;if(t&&a.FeatureTest.isOffscreenCanvasSupported)r=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{const t=document.createElement("canvas");t.width=t.height=e,r=t.getContext("2d",{alpha:!1})}return r}function c(e,t,r){const n=document.createElement("span"),c={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(n);const l=a.Util.transform(e._transform,t.transform);let h=Math.atan2(l[1],l[0]);const u=r[t.fontName];u.vertical&&(h+=Math.PI/2);const d=Math.hypot(l[2],l[3]),f=d*function(e,t){const r=s.get(e);if(r)return r;const a=o(i,t);a.font=`30px ${e}`;const n=a.measureText("");let c=n.fontBoundingBoxAscent,l=Math.abs(n.fontBoundingBoxDescent);if(c){const t=c/(c+l);return s.set(e,t),a.canvas.width=a.canvas.height=0,t}a.strokeStyle="red",a.clearRect(0,0,i,i),a.strokeText("g",0,0);let h=a.getImageData(0,0,i,i).data;l=0;for(let e=h.length-1-3;e>=0;e-=4)if(h[e]>0){l=Math.ceil(e/4/i);break}a.clearRect(0,0,i,i),a.strokeText("A",0,i),h=a.getImageData(0,0,i,i).data,c=0;for(let e=0,t=h.length;e<t;e+=4)if(h[e]>0){c=i-Math.floor(e/4/i);break}if(a.canvas.width=a.canvas.height=0,c){const t=c/(c+l);return s.set(e,t),t}return s.set(e,.8),.8}(u.fontFamily,e._isOffscreenCanvasSupported);let p,g;0===h?(p=l[4],g=l[5]-f):(p=l[4]+f*Math.sin(h),g=l[5]-f*Math.cos(h));const m="calc(var(--scale-factor)*",b=n.style;e._container===e._rootContainer?(b.left=`${(100*p/e._pageWidth).toFixed(2)}%`,b.top=`${(100*g/e._pageHeight).toFixed(2)}%`):(b.left=`${m}${p.toFixed(2)}px)`,b.top=`${m}${g.toFixed(2)}px)`),b.fontSize=`${m}${d.toFixed(2)}px)`,b.fontFamily=u.fontFamily,c.fontSize=d,n.setAttribute("role","presentation"),n.textContent=t.str,n.dir=t.dir,e._fontInspectorEnabled&&(n.dataset.fontName=t.fontName),0!==h&&(c.angle=h*(180/Math.PI));let y=!1;if(t.str.length>1)y=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),r=Math.abs(t.transform[3]);e!==r&&Math.max(e,r)/Math.min(e,r)>1.5&&(y=!0)}y&&(c.canvasWidth=u.vertical?t.height:t.width),e._textDivProperties.set(n,c),e._isReadableStream&&e._layoutText(n)}function l(e){const{div:t,scale:r,properties:a,ctx:n,prevFontSize:i,prevFontFamily:s}=e,{style:o}=t;let c="";if(0!==a.canvasWidth&&a.hasText){const{fontFamily:l}=o,{canvasWidth:h,fontSize:u}=a;i===u&&s===l||(n.font=`${u*r}px ${l}`,e.prevFontSize=u,e.prevFontFamily=l);const{width:d}=n.measureText(t.textContent);d>0&&(c=`scaleX(${h*r/d})`)}0!==a.angle&&(c=`rotate(${a.angle}deg) ${c}`),c.length>0&&(o.transform=c)}class h{constructor({textContentSource:e,container:t,viewport:r,textDivs:i,textDivProperties:s,textContentItemsStr:c,isOffscreenCanvasSupported:l}){this._textContentSource=e,this._isReadableStream=e instanceof ReadableStream,this._container=this._rootContainer=t,this._textDivs=i||[],this._textContentItemsStr=c||[],this._isOffscreenCanvasSupported=l,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._textDivProperties=s||new WeakMap,this._canceled=!1,this._capability=new a.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:r.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:o(0,l)};const{pageWidth:h,pageHeight:u,pageX:d,pageY:f}=r.rawDims;this._transform=[1,0,0,-1,-d,f+u],this._pageWidth=h,this._pageHeight=u,(0,n.setLayerDimensions)(t,r),this._capability.promise.finally((()=>{this._layoutTextParams=null})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new a.AbortException("TextLayer task cancelled.")).catch((()=>{})),this._reader=null),this._capability.reject(new a.AbortException("TextLayer task cancelled."))}_processItems(e,t){for(const r of e)if(void 0!==r.str)this._textContentItemsStr.push(r.str),c(this,r,t);else if("beginMarkedContentProps"===r.type||"beginMarkedContent"===r.type){const e=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==r.id&&this._container.setAttribute("id",`${r.id}`),e.append(this._container)}else"endMarkedContent"===r.type&&(this._container=this._container.parentNode)}_layoutText(e){const t=this._layoutTextParams.properties=this._textDivProperties.get(e);if(this._layoutTextParams.div=e,l(this._layoutTextParams),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this._container.append(e)}}_render(){const e=new a.PromiseCapability;let t=Object.create(null);if(this._isReadableStream){const r=()=>{this._reader.read().then((({value:a,done:n})=>{n?e.resolve():(Object.assign(t,a.styles),this._processItems(a.items,t),r())}),e.reject)};this._reader=this._textContentSource.getReader(),r()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:t,styles:r}=this._textContentSource;this._processItems(t,r),e.resolve()}}e.promise.then((()=>{t=null,function(e){if(e._canceled)return;const t=e._textDivs,r=e._capability;if(t.length>1e5)r.resolve();else{if(!e._isReadableStream)for(const r of t)e._layoutText(r);r.resolve()}}(this)}),this._capability.reject)}}t.TextLayerRenderTask=h},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var a=r(1),n=r(4),i=r(28),s=r(33),o=r(6),c=r(34);class l{#tr;#rr=!1;#ar=null;#nr=this.pointerup.bind(this);#ir=this.pointerdown.bind(this);#sr=new Map;#or=!1;#cr=!1;#lr=!1;#hr;static _initialized=!1;constructor({uiManager:e,pageIndex:t,div:r,accessibilityManager:a,annotationLayer:n,viewport:o,l10n:h}){const u=[i.FreeTextEditor,s.InkEditor,c.StampEditor];if(!l._initialized){l._initialized=!0;for(const e of u)e.initialize(h)}e.registerEditorTypes(u),this.#hr=e,this.pageIndex=t,this.div=r,this.#tr=a,this.#ar=n,this.viewport=o,this.#hr.addLayer(this)}get isEmpty(){return 0===this.#sr.size}updateToolbar(e){this.#hr.updateToolbar(e)}updateMode(e=this.#hr.getMode()){this.#ur(),e===a.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),e!==a.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",e===a.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",e===a.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",e===a.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(e){if(e||this.#hr.getMode()===a.AnnotationEditorType.INK){if(!e)for(const e of this.#sr.values())if(e.isEmpty())return void e.setInBackground();this.#dr({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(e){this.#hr.setEditingState(e)}addCommands(e){this.#hr.addCommands(e)}enable(){this.div.style.pointerEvents="auto";const e=new Set;for(const t of this.#sr.values())t.enableEditing(),t.annotationElementId&&e.add(t.annotationElementId);if(!this.#ar)return;const t=this.#ar.getEditableAnnotations();for(const r of t){if(r.hide(),this.#hr.isDeletedAnnotationElement(r.data.id))continue;if(e.has(r.data.id))continue;const t=this.deserialize(r);t&&(this.addOrRebuild(t),t.enableEditing())}}disable(){this.#lr=!0,this.div.style.pointerEvents="none";const e=new Set;for(const t of this.#sr.values())t.disableEditing(),t.annotationElementId&&null===t.serialize()?(this.getEditableAnnotation(t.annotationElementId)?.show(),t.remove()):e.add(t.annotationElementId);if(this.#ar){const t=this.#ar.getEditableAnnotations();for(const r of t){const{id:t}=r.data;e.has(t)||this.#hr.isDeletedAnnotationElement(t)||r.show()}}this.#ur(),this.isEmpty&&(this.div.hidden=!0),this.#lr=!1}getEditableAnnotation(e){return this.#ar?.getEditableAnnotation(e)||null}setActiveEditor(e){this.#hr.getActive()!==e&&this.#hr.setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",this.#ir),this.div.addEventListener("pointerup",this.#nr)}disableClick(){this.div.removeEventListener("pointerdown",this.#ir),this.div.removeEventListener("pointerup",this.#nr)}attach(e){this.#sr.set(e.id,e);const{annotationElementId:t}=e;t&&this.#hr.isDeletedAnnotationElement(t)&&this.#hr.removeDeletedAnnotationElement(e)}detach(e){this.#sr.delete(e.id),this.#tr?.removePointerInTextLayer(e.contentDiv),!this.#lr&&e.annotationElementId&&this.#hr.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#hr.removeEditor(e),e.div.contains(document.activeElement)&&setTimeout((()=>{this.#hr.focusMainContainer()}),0),e.div.remove(),e.isAttachedToDOM=!1,this.#cr||this.addInkEditorIfNeeded(!1)}changeParent(e){e.parent!==this&&(e.annotationElementId&&(this.#hr.addDeletedAnnotationElement(e.annotationElementId),n.AnnotationEditor.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(this.changeParent(e),this.#hr.addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(),this.#hr.addToAnnotationStorage(e)}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;const{activeElement:t}=document;e.div.contains(t)&&(e._focusEventsAllowed=!1,setTimeout((()=>{e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",(()=>{e._focusEventsAllowed=!0}),{once:!0}),t.focus())}),0)),e._structTreeParentId=this.#tr?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#hr.getId()}#fr(e){switch(this.#hr.getMode()){case a.AnnotationEditorType.FREETEXT:return new i.FreeTextEditor(e);case a.AnnotationEditorType.INK:return new s.InkEditor(e);case a.AnnotationEditorType.STAMP:return new c.StampEditor(e)}return null}pasteEditor(e,t){this.#hr.updateToolbar(e),this.#hr.updateMode(e);const{offsetX:r,offsetY:a}=this.#pr(),n=this.getNextId(),i=this.#fr({parent:this,id:n,x:r,y:a,uiManager:this.#hr,isCentered:!0,...t});i&&this.add(i)}deserialize(e){switch(e.annotationType??e.annotationEditorType){case a.AnnotationEditorType.FREETEXT:return i.FreeTextEditor.deserialize(e,this,this.#hr);case a.AnnotationEditorType.INK:return s.InkEditor.deserialize(e,this,this.#hr);case a.AnnotationEditorType.STAMP:return c.StampEditor.deserialize(e,this,this.#hr)}return null}#dr(e,t){const r=this.getNextId(),a=this.#fr({parent:this,id:r,x:e.offsetX,y:e.offsetY,uiManager:this.#hr,isCentered:t});return a&&this.add(a),a}#pr(){const{x:e,y:t,width:r,height:a}=this.div.getBoundingClientRect(),n=Math.max(0,e),i=Math.max(0,t),s=(n+Math.min(window.innerWidth,e+r))/2-e,o=(i+Math.min(window.innerHeight,t+a))/2-t,[c,l]=this.viewport.rotation%180==0?[s,o]:[o,s];return{offsetX:c,offsetY:l}}addNewEditor(){this.#dr(this.#pr(),!0)}setSelected(e){this.#hr.setSelected(e)}toggleSelected(e){this.#hr.toggleSelected(e)}isSelected(e){return this.#hr.isSelected(e)}unselect(e){this.#hr.unselect(e)}pointerup(e){const{isMac:t}=a.FeatureTest.platform;0!==e.button||e.ctrlKey&&t||e.target===this.div&&this.#or&&(this.#or=!1,this.#rr?this.#hr.getMode()!==a.AnnotationEditorType.STAMP?this.#dr(e,!1):this.#hr.unselectAll():this.#rr=!0)}pointerdown(e){if(this.#or)return void(this.#or=!1);const{isMac:t}=a.FeatureTest.platform;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;this.#or=!0;const r=this.#hr.getActive();this.#rr=!r||r.isEmpty()}findNewParent(e,t,r){const a=this.#hr.findParent(t,r);return null!==a&&a!==this&&(a.changeParent(e),!0)}destroy(){this.#hr.getActive()?.parent===this&&(this.#hr.commitOrRemove(),this.#hr.setActiveEditor(null));for(const e of this.#sr.values())this.#tr?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#sr.clear(),this.#hr.removeLayer(this)}#ur(){this.#cr=!0;for(const e of this.#sr.values())e.isEmpty()&&e.remove();this.#cr=!1}render({viewport:e}){this.viewport=e,(0,o.setLayerDimensions)(this.div,e);for(const e of this.#hr.getEditors(this.pageIndex))this.add(e);this.updateMode()}update({viewport:e}){this.#hr.commitOrRemove(),this.viewport=e,(0,o.setLayerDimensions)(this.div,{rotation:e.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}}t.AnnotationEditorLayer=l},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var a=r(1),n=r(5),i=r(4),s=r(29);class o extends i.AnnotationEditor{#gr=this.editorDivBlur.bind(this);#mr=this.editorDivFocus.bind(this);#br=this.editorDivInput.bind(this);#yr=this.editorDivKeydown.bind(this);#vr;#wr="";#Ar=`${this.id}-editor`;#Sr;#xr=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const e=o.prototype,t=e=>e.isEmpty(),r=n.AnnotationEditorUIManager.TRANSLATE_SMALL,i=n.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,a.shadow)(this,"_keyboardManager",new n.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[r,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[i,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,r],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,i],checker:t}]]))}static _type="freetext";constructor(e){super({...e,name:"freeTextEditor"}),this.#vr=e.color||o._defaultColor||i.AnnotationEditor._defaultLineColor,this.#Sr=e.fontSize||o._defaultFontSize}static initialize(e){i.AnnotationEditor.initialize(e,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case a.AnnotationEditorParamsType.FREETEXT_SIZE:o._defaultFontSize=t;break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:o._defaultColor=t}}updateParams(e,t){switch(e){case a.AnnotationEditorParamsType.FREETEXT_SIZE:this.#kr(t);break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Cr(t)}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,o._defaultFontSize],[a.AnnotationEditorParamsType.FREETEXT_COLOR,o._defaultColor||i.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,this.#Sr],[a.AnnotationEditorParamsType.FREETEXT_COLOR,this.#vr]]}#kr(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#Sr)*this.parentScale),this.#Sr=e,this.#_r()},r=this.#Sr;this.addCommands({cmd:()=>{t(e)},undo:()=>{t(r)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Cr(e){const t=this.#vr;this.addCommands({cmd:()=>{this.#vr=this.editorDiv.style.color=e},undo:()=>{this.#vr=this.editorDiv.style.color=t},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){const e=this.parentScale;return[-o._internalPadding*e,-(o._internalPadding+this.#Sr)*e]}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(a.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",this.#yr),this.editorDiv.addEventListener("focus",this.#mr),this.editorDiv.addEventListener("blur",this.#gr),this.editorDiv.addEventListener("input",this.#br))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#Ar),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#yr),this.editorDiv.removeEventListener("focus",this.#mr),this.editorDiv.removeEventListener("blur",this.#gr),this.editorDiv.removeEventListener("input",this.#br),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width?this.#Tr():(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.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()}#Er(){const e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;const t=[];for(const r of e)t.push(r.innerText.replace(/\r\n?|\n/,""));return t.join("\n")}#_r(){const[e,t]=this.parentDimensions;let r;if(this.isAttachedToDOM)r=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,a=t.style.display;t.style.display="hidden",e.div.append(this.div),r=t.getBoundingClientRect(),t.remove(),t.style.display=a}this.rotation%180==this.parentRotation%180?(this.width=r.width/e,this.height=r.height/t):(this.width=r.height/e,this.height=r.width/t),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const e=this.#wr,t=this.#wr=this.#Er().trimEnd();if(e===t)return;const r=e=>{this.#wr=e,e?(this.#Or(),this._uiManager.rebuild(this),this.#_r()):this.remove()};this.addCommands({cmd:()=>{r(t)},undo:()=>{r(e)},mustExec:!1}),this.#_r()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){o._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){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 e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#Ar),this.enableEditing(),i.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then((e=>this.editorDiv?.setAttribute("aria-label",e))),i.AnnotationEditor._l10nPromise.get("free_text2_default_content").then((e=>this.editorDiv?.setAttribute("default-content",e))),this.editorDiv.contentEditable=!0;const{style:r}=this.editorDiv;if(r.fontSize=`calc(${this.#Sr}px * var(--scale-factor))`,r.color=this.#vr,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,n.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[r,a]=this.parentDimensions;if(this.annotationElementId){const{position:n}=this.#xr;let[i,s]=this.getInitialTranslation();[i,s]=this.pageTranslationToScreen(i,s);const[o,c]=this.pageDimensions,[l,h]=this.pageTranslation;let u,d;switch(this.rotation){case 0:u=e+(n[0]-l)/o,d=t+this.height-(n[1]-h)/c;break;case 90:u=e+(n[0]-l)/o,d=t-(n[1]-h)/c,[i,s]=[s,-i];break;case 180:u=e-this.width+(n[0]-l)/o,d=t-(n[1]-h)/c,[i,s]=[-i,-s];break;case 270:u=e+(n[0]-l-this.height*c)/o,d=t+(n[1]-h-this.width*o)/c,[i,s]=[-s,i]}this.setAt(u*r,d*a,i,s)}else this.setAt(e*r,t*a,this.width*r,this.height*a);this.#Or(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}#Or(){if(this.editorDiv.replaceChildren(),this.#wr)for(const e of this.#wr.split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}}get contentDiv(){return this.editorDiv}static deserialize(e,t,r){let n=null;if(e instanceof s.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:t,fontColor:r},rect:i,rotation:s,id:o},textContent:c,textPosition:l,parent:{page:{pageNumber:h}}}=e;if(!c||0===c.length)return null;n=e={annotationType:a.AnnotationEditorType.FREETEXT,color:Array.from(r),fontSize:t,value:c.join("\n"),position:l,pageIndex:h-1,rect:i,rotation:s,id:o,deleted:!1}}const i=super.deserialize(e,t,r);return i.#Sr=e.fontSize,i.#vr=a.Util.makeHexColor(...e.color),i.#wr=e.value,i.annotationElementId=e.id||null,i.#xr=n,i}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};const t=o._internalPadding*this.parentScale,r=this.getRect(t,t),n=i.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#vr),s={annotationType:a.AnnotationEditorType.FREETEXT,color:n,fontSize:this.#Sr,value:this.#wr,pageIndex:this.pageIndex,rect:r,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return e?s:this.annotationElementId&&!this.#Fr(s)?null:(s.id=this.annotationElementId,s)}#Fr(e){const{value:t,fontSize:r,color:a,rect:n,pageIndex:i}=this.#xr;return e.value!==t||e.fontSize!==r||e.rect.some(((e,t)=>Math.abs(e-n[t])>=1))||e.color.some(((e,t)=>e!==a[t]))||e.pageIndex!==i}#Tr(e=!1){if(!this.annotationElementId)return;if(this.#_r(),!e&&(0===this.width||0===this.height))return void setTimeout((()=>this.#Tr(!0)),0);const t=o._internalPadding*this.parentScale;this.#xr.rect=this.getRect(t,t)}}t.FreeTextEditor=o},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StampAnnotationElement=t.InkAnnotationElement=t.FreeTextAnnotationElement=t.AnnotationLayer=void 0;var a=r(1),n=r(6),i=r(3),s=r(30),o=r(31),c=r(32);const l=1e3,h=new WeakSet;function u(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class d{static create(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new p(e);case a.AnnotationType.TEXT:return new g(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new b(e);case"Btn":return e.data.radioButton?new w(e):e.data.checkBox?new v(e):new A(e);case"Ch":return new S(e);case"Sig":return new y(e)}return new m(e);case a.AnnotationType.POPUP:return new x(e);case a.AnnotationType.FREETEXT:return new C(e);case a.AnnotationType.LINE:return new _(e);case a.AnnotationType.SQUARE:return new T(e);case a.AnnotationType.CIRCLE:return new E(e);case a.AnnotationType.POLYLINE:return new O(e);case a.AnnotationType.CARET:return new P(e);case a.AnnotationType.INK:return new I(e);case a.AnnotationType.POLYGON:return new F(e);case a.AnnotationType.HIGHLIGHT:return new M(e);case a.AnnotationType.UNDERLINE:return new R(e);case a.AnnotationType.SQUIGGLY:return new D(e);case a.AnnotationType.STRIKEOUT:return new N(e);case a.AnnotationType.STAMP:return new L(e);case a.AnnotationType.FILEATTACHMENT:return new B(e);default:return new f(e)}}}class f{#Pr=!1;constructor(e,{isRenderable:t=!1,ignoreBorder:r=!1,createQuadrilaterals:a=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(r)),a&&this._createQuadrilaterals()}static _hasPopupData({titleObj:e,contentsObj:t,richText:r}){return!!(e?.str||t?.str||r?.str)}get hasPopupData(){return f._hasPopupData(this.data)}_createContainer(e){const{data:t,parent:{page:r,viewport:n}}=this,i=document.createElement("section");i.setAttribute("data-annotation-id",t.id),this instanceof m||(i.tabIndex=l),i.style.zIndex=this.parent.zIndex++,this.data.popupRef&&i.setAttribute("aria-haspopup","dialog"),t.noRotate&&i.classList.add("norotate");const{pageWidth:s,pageHeight:o,pageX:c,pageY:h}=n.rawDims;if(!t.rect||this instanceof x){const{rotation:e}=t;return t.hasOwnCanvas||0===e||this.setRotation(e,i),i}const{width:d,height:f}=u(t.rect),p=a.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(!e&&t.borderStyle.width>0){i.style.borderWidth=`${t.borderStyle.width}px`;const e=t.borderStyle.horizontalCornerRadius,r=t.borderStyle.verticalCornerRadius;if(e>0||r>0){const t=`calc(${e}px * var(--scale-factor)) / calc(${r}px * var(--scale-factor))`;i.style.borderRadius=t}else if(this instanceof w){const e=`calc(${d}px * var(--scale-factor)) / calc(${f}px * var(--scale-factor))`;i.style.borderRadius=e}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}const n=t.borderColor||null;n?(this.#Pr=!0,i.style.borderColor=a.Util.makeHexColor(0|n[0],0|n[1],0|n[2])):i.style.borderWidth=0}i.style.left=100*(p[0]-c)/s+"%",i.style.top=100*(p[1]-h)/o+"%";const{rotation:g}=t;return t.hasOwnCanvas||0===g?(i.style.width=100*d/s+"%",i.style.height=100*f/o+"%"):this.setRotation(g,i),i}setRotation(e,t=this.container){if(!this.data.rect)return;const{pageWidth:r,pageHeight:a}=this.parent.viewport.rawDims,{width:n,height:i}=u(this.data.rect);let s,o;e%180==0?(s=100*n/r,o=100*i/a):(s=100*i/r,o=100*n/a),t.style.width=`${s}%`,t.style.height=`${o}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,r)=>{const a=r.detail[e],n=a[0],i=a.slice(1);r.target.style[t]=s.ColorConverters[`${n}_HTML`](i),this.annotationStorage.setValue(this.data.id,{[t]:s.ColorConverters[`${n}_rgb`](i)})};return(0,a.shadow)(this,"_commonActions",{display:e=>{const{display:t}=e.detail,r=t%2==1;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:r,noPrint:1===t||2===t})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{const{hidden:t}=e.detail;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:t,noView:t})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const r=this._commonActions;for(const a of Object.keys(t.detail)){const n=e[a]||r[a];n?.(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const r=this._commonActions;for(const[a,n]of Object.entries(t)){const i=r[a];i&&(i({detail:{[a]:n},target:e}),delete t[a])}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:e}=this.data;if(!e)return;const[t,r,a,n]=this.data.rect;if(1===e.length){const[,{x:i,y:s},{x:o,y:c}]=e[0];if(a===i&&n===s&&t===o&&r===c)return}const{style:i}=this.container;let s;if(this.#Pr){const{borderColor:e,borderWidth:t}=i;i.borderWidth=0,s=["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="${e}" stroke-width="${t}">`],this.container.classList.add("hasBorder")}const o=a-t,c=n-r,{svgFactory:l}=this,h=l.createElement("svg");h.classList.add("quadrilateralsContainer"),h.setAttribute("width",0),h.setAttribute("height",0);const u=l.createElement("defs");h.append(u);const d=l.createElement("clipPath"),f=`clippath_${this.data.id}`;d.setAttribute("id",f),d.setAttribute("clipPathUnits","objectBoundingBox"),u.append(d);for(const[,{x:r,y:a},{x:i,y:h}]of e){const e=l.createElement("rect"),u=(i-t)/o,f=(n-a)/c,p=(r-i)/o,g=(a-h)/c;e.setAttribute("x",u),e.setAttribute("y",f),e.setAttribute("width",p),e.setAttribute("height",g),d.append(e),s?.push(`<rect vector-effect="non-scaling-stroke" x="${u}" y="${f}" width="${p}" height="${g}"/>`)}this.#Pr&&(s.push("</g></svg>')"),i.backgroundImage=s.join("")),this.container.append(h),this.container.style.clipPath=`url(#${f})`}_createPopup(){const{container:e,data:t}=this;e.setAttribute("aria-haspopup","dialog");const r=new x({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:`popup_${t.id}`,rotation:t.rotation},parent:this.parent,elements:[this]});this.parent.div.append(r.render())}render(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const r=[];if(this._fieldObjects){const n=this._fieldObjects[e];if(n)for(const{page:e,id:i,exportValues:s}of n){if(-1===e)continue;if(i===t)continue;const n="string"==typeof s?s:null,o=document.querySelector(`[data-element-id="${i}"]`);!o||h.has(o)?r.push({id:i,exportValue:n,domElement:o}):(0,a.warn)(`_getElementsByName - element not allowed: ${i}`)}return r}for(const a of document.getElementsByName(e)){const{exportValue:e}=a,n=a.getAttribute("data-element-id");n!==t&&h.has(a)&&r.push({id:n,exportValue:e,domElement:a})}return r}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",(()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})}))}}class p extends f{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,r=document.createElement("a");r.setAttribute("data-element-id",e.id);let a=!1;return e.url?(t.addLinkAttributes(r,e.url,e.newWindow),a=!0):e.action?(this._bindNamedAction(r,e.action),a=!0):e.attachment?(this._bindAttachment(r,e.attachment),a=!0):e.setOCGState?(this.#Ir(r,e.setOCGState),a=!0):e.dest?(this._bindLink(r,e.dest),a=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,e),a=!0),e.resetForm?(this._bindResetFormAction(r,e.resetForm),a=!0):this.isTooltipOnly&&!a&&(this._bindLink(r,""),a=!0)),this.container.classList.add("linkAnnotation"),a&&this.container.append(r),this.container}#Mr(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&this.#Mr()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#Mr()}_bindAttachment(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,t.content,t.filename),!1),this.#Mr()}#Ir(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#Mr()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const a of Object.keys(t.actions)){const n=r.get(a);n&&(e[n]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:a}}),!1))}e.onclick||(e.onclick=()=>!1),this.#Mr()}_bindResetFormAction(e,t){const r=e.onclick;if(r||(e.href=this.linkService.getAnchorUrl("")),this.#Mr(),!this._fieldObjects)return(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(r||(e.onclick=()=>!1));e.onclick=()=>{r?.();const{fields:e,refs:n,include:i}=t,s=[];if(0!==e.length||0!==n.length){const t=new Set(n);for(const r of e){const e=this._fieldObjects[r]||[];for(const{id:r}of e)t.add(r)}for(const e of Object.values(this._fieldObjects))for(const r of e)t.has(r.id)===i&&s.push(r)}else for(const e of Object.values(this._fieldObjects))s.push(...e);const o=this.annotationStorage,c=[];for(const e of s){const{id:t}=e;switch(c.push(t),e.type){case"text":{const r=e.defaultValue||"";o.setValue(t,{value:r});break}case"checkbox":case"radiobutton":{const r=e.defaultValue===e.exportValues;o.setValue(t,{value:r});break}case"combobox":case"listbox":{const r=e.defaultValue||"";o.setValue(t,{value:r});break}default:continue}const r=document.querySelector(`[data-element-id="${t}"]`);r&&(h.has(r)?r.dispatchEvent(new Event("resetform")):(0,a.warn)(`_bindResetFormAction - element not allowed: ${t}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}}),!1}}}class g extends f{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class m extends f{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&("CANVAS"===e.previousSibling?.nodeName&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){const{isWin:t,isMac:r}=a.FeatureTest.platform;return t&&e.ctrlKey||r&&e.metaKey}_setEventListener(e,t,r,a,n){r.includes("mouse")?e.addEventListener(r,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:n(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(r,(e=>{if("blur"===r){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===r){if(t.focused)return;t.focused=!0}n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:n(e)}})}))}_setEventListeners(e,t,r,a){for(const[n,i]of r)("Action"===i||this.data.actions?.[i])&&("Focus"!==i&&"Blur"!==i||(t||={focused:!1}),this._setEventListener(e,t,n,i,a),"Focus"!==i||this.data.actions?.Blur?"Blur"!==i||this.data.actions?.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":a.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,n=this.data.defaultAppearanceData.fontSize||9,i=e.style;let s;const o=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(a.LINE_FACTOR*n))||1);s=Math.min(n,o(t/a.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(n,o(e/a.LINE_FACTOR))}i.fontSize=`calc(${s}px * var(--scale-factor))`,i.color=a.Util.makeHexColor(r[0],r[1],r[2]),null!==this.data.textAlignment&&(i.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class b extends m{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,r,a){const n=this.annotationStorage;for(const i of this._getElementsByName(e.name,e.id))i.domElement&&(i.domElement[t]=r),n.setValue(i.id,{[a]:r})}render(){const e=this.annotationStorage,t=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){const a=e.getValue(t,{value:this.data.fieldValue});let n=a.value||"";const i=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;i&&n.length>i&&(n=n.slice(0,i));let s=a.formattedValue||this.data.textContent?.join("\n")||null;s&&this.data.comb&&(s=s.replaceAll(/\s+/g,""));const o={userValue:n,formattedValue:s,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=s??n,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type="text",r.setAttribute("value",s??n),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),h.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=l,this._setRequired(r,this.data.required),i&&(r.maxLength=i),r.addEventListener("input",(a=>{e.setValue(t,{value:a.target.value}),this.setPropertyOnSiblings(r,"value",a.target.value,"value"),o.formattedValue=null})),r.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue??"";r.value=o.userValue=t,o.formattedValue=null}));let c=e=>{const{formattedValue:t}=o;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",(e=>{if(o.focused)return;const{target:t}=e;o.userValue&&(t.value=o.userValue),o.lastCommittedValue=t.value,o.commitKey=1,o.focused=!0})),r.addEventListener("updatefromsandbox",(r=>{this.showElementAndHideCanvas(r.target);const a={value(r){o.userValue=r.detail.value??"",e.setValue(t,{value:o.userValue.toString()}),r.target.value=o.userValue},formattedValue(r){const{formattedValue:a}=r.detail;o.formattedValue=a,null!=a&&r.target!==document.activeElement&&(r.target.value=a),e.setValue(t,{formattedValue:a})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:r=>{const{charLimit:a}=r.detail,{target:n}=r;if(0===a)return void n.removeAttribute("maxLength");n.setAttribute("maxLength",a);let i=o.userValue;!i||i.length<=a||(i=i.slice(0,a),n.value=o.userValue=i,e.setValue(t,{value:i}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,willCommit:!0,commitKey:1,selStart:n.selectionStart,selEnd:n.selectionEnd}}))}};this._dispatchEventFromSandbox(a,r)})),r.addEventListener("keydown",(e=>{o.commitKey=1;let r=-1;if("Escape"===e.key?r=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(o.commitKey=3):r=2,-1===r)return;const{value:a}=e.target;o.lastCommittedValue!==a&&(o.lastCommittedValue=a,o.userValue=a,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:a,willCommit:!0,commitKey:r,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const a=c;c=null,r.addEventListener("blur",(e=>{if(!o.focused||!e.relatedTarget)return;o.focused=!1;const{value:r}=e.target;o.userValue=r,o.lastCommittedValue!==r&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:o.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),a(e)})),this.data.actions?.Keystroke&&r.addEventListener("beforeinput",(e=>{o.lastCommittedValue=null;const{data:r,target:a}=e,{value:n,selectionStart:i,selectionEnd:s}=a;let c=i,l=s;switch(e.inputType){case"deleteWordBackward":{const e=n.substring(0,i).match(/\w*[^\w]*$/);e&&(c-=e[0].length);break}case"deleteWordForward":{const e=n.substring(i).match(/^[^\w]*\w*/);e&&(l+=e[0].length);break}case"deleteContentBackward":i===s&&(c-=1);break;case"deleteContentForward":i===s&&(l+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,change:r||"",willCommit:!1,selStart:c,selEnd:l}})})),this._setEventListeners(r,o,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(c&&r.addEventListener("blur",c),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/i;r.classList.add("comb"),r.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell";return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class y extends m{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class v extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,r=t.id;let a=e.getValue(r,{value:t.exportValue===t.fieldValue}).value;"string"==typeof a&&(a="Off"!==a,e.setValue(r,{value:a})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const n=document.createElement("input");return h.add(n),n.setAttribute("data-element-id",r),n.disabled=t.readOnly,this._setRequired(n,this.data.required),n.type="checkbox",n.name=t.fieldName,a&&n.setAttribute("checked",!0),n.setAttribute("exportValue",t.exportValue),n.tabIndex=l,n.addEventListener("change",(a=>{const{name:n,checked:i}=a.target;for(const a of this._getElementsByName(n,r)){const r=i&&a.exportValue===t.exportValue;a.domElement&&(a.domElement.checked=r),e.setValue(a.id,{value:r})}e.setValue(r,{value:i})})),n.addEventListener("resetform",(e=>{const r=t.defaultFieldValue||"Off";e.target.checked=r===t.exportValue})),this.enableScripting&&this.hasJSActions&&(n.addEventListener("updatefromsandbox",(t=>{const a={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(r,{value:t.target.checked})}};this._dispatchEventFromSandbox(a,t)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class w extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const e=this.annotationStorage,t=this.data,r=t.id;let a=e.getValue(r,{value:t.fieldValue===t.buttonValue}).value;"string"==typeof a&&(a=a!==t.buttonValue,e.setValue(r,{value:a}));const n=document.createElement("input");if(h.add(n),n.setAttribute("data-element-id",r),n.disabled=t.readOnly,this._setRequired(n,this.data.required),n.type="radio",n.name=t.fieldName,a&&n.setAttribute("checked",!0),n.tabIndex=l,n.addEventListener("change",(t=>{const{name:a,checked:n}=t.target;for(const t of this._getElementsByName(a,r))e.setValue(t.id,{value:!1});e.setValue(r,{value:n})})),n.addEventListener("resetform",(e=>{const r=t.defaultFieldValue;e.target.checked=null!=r&&r===t.buttonValue})),this.enableScripting&&this.hasJSActions){const a=t.buttonValue;n.addEventListener("updatefromsandbox",(t=>{const n={value:t=>{const n=a===t.detail.value;for(const a of this._getElementsByName(t.target.name)){const t=n&&a.id===r;a.domElement&&(a.domElement.checked=t),e.setValue(a.id,{value:t})}}};this._dispatchEventFromSandbox(n,t)})),this._setEventListeners(n,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class A extends p{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(e.title=this.data.alternativeText);const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class S extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const e=this.annotationStorage,t=this.data.id,r=e.getValue(t,{value:this.data.fieldValue}),a=document.createElement("select");h.add(a),a.setAttribute("data-element-id",t),a.disabled=this.data.readOnly,this._setRequired(a,this.data.required),a.name=this.data.fieldName,a.tabIndex=l;let n=this.data.combo&&this.data.options.length>0;this.data.combo||(a.size=this.data.options.length,this.data.multiSelect&&(a.multiple=!0)),a.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const e of a.options)e.selected=e.value===t}));for(const e of this.data.options){const t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,r.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),n=!1),a.append(t)}let i=null;if(n){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),a.prepend(e),i=()=>{e.remove(),a.removeEventListener("input",i),i=null},a.addEventListener("input",i)}const s=e=>{const t=e?"value":"textContent",{options:r,multiple:n}=a;return n?Array.prototype.filter.call(r,(e=>e.selected)).map((e=>e[t])):-1===r.selectedIndex?null:r[r.selectedIndex][t]};let o=s(!1);const c=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(a.addEventListener("updatefromsandbox",(r=>{const n={value(r){i?.();const n=r.detail.value,c=new Set(Array.isArray(n)?n:[n]);for(const e of a.options)e.selected=c.has(e.value);e.setValue(t,{value:s(!0)}),o=s(!1)},multipleSelection(e){a.multiple=!0},remove(r){const n=a.options,i=r.detail.remove;n[i].selected=!1,a.remove(i),n.length>0&&-1===Array.prototype.findIndex.call(n,(e=>e.selected))&&(n[0].selected=!0),e.setValue(t,{value:s(!0),items:c(r)}),o=s(!1)},clear(r){for(;0!==a.length;)a.remove(0);e.setValue(t,{value:null,items:[]}),o=s(!1)},insert(r){const{index:n,displayValue:i,exportValue:l}=r.detail.insert,h=a.children[n],u=document.createElement("option");u.textContent=i,u.value=l,h?h.before(u):a.append(u),e.setValue(t,{value:s(!0),items:c(r)}),o=s(!1)},items(r){const{items:n}=r.detail;for(;0!==a.length;)a.remove(0);for(const e of n){const{displayValue:t,exportValue:r}=e,n=document.createElement("option");n.textContent=t,n.value=r,a.append(n)}a.options.length>0&&(a.options[0].selected=!0),e.setValue(t,{value:s(!0),items:c(r)}),o=s(!1)},indices(r){const a=new Set(r.detail.indices);for(const e of r.target.options)e.selected=a.has(e.index);e.setValue(t,{value:s(!0)}),o=s(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(n,r)})),a.addEventListener("input",(r=>{const a=s(!0);e.setValue(t,{value:a}),r.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,changeEx:a,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(a,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):a.addEventListener("input",(function(r){e.setValue(t,{value:s(!0)})})),this.data.combo&&this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class x extends f{constructor(e){const{data:t,elements:r}=e;super(e,{isRenderable:f._hasPopupData(t)}),this.elements=r}render(){this.container.classList.add("popupAnnotation");const e=new k({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}),t=[];for(const r of this.elements)r.popup=e,t.push(r.data.id),r.addHighlightArea();return this.container.setAttribute("aria-controls",t.map((e=>`${a.AnnotationPrefix}${e}`)).join(",")),this.container}}class k{#Rr=null;#Dr=this.#Nr.bind(this);#Lr=this.#Br.bind(this);#jr=this.#$r.bind(this);#Ur=this.#zr.bind(this);#vr=null;#pt=null;#Hr=null;#Xr=null;#Wr=null;#Gr=null;#qr=!1;#Vr=null;#Kr=null;#Yr=null;#Zr=null;#Jr=!1;constructor({container:e,color:t,elements:r,titleObj:a,modificationDate:i,contentsObj:s,richText:o,parent:c,rect:l,parentRect:h,open:u}){this.#pt=e,this.#Zr=a,this.#Hr=s,this.#Yr=o,this.#Wr=c,this.#vr=t,this.#Kr=l,this.#Gr=h,this.#Xr=r;const d=n.PDFDateString.toDateObject(i);d&&(this.#Rr=c.l10n.get("annotation_date_string",{date:d.toLocaleDateString(),time:d.toLocaleTimeString()})),this.trigger=r.flatMap((e=>e.getElementsToTriggerPopup()));for(const e of this.trigger)e.addEventListener("click",this.#Ur),e.addEventListener("mouseenter",this.#jr),e.addEventListener("mouseleave",this.#Lr),e.classList.add("popupTriggerArea");for(const e of r)e.container?.addEventListener("keydown",this.#Dr);this.#pt.hidden=!0,u&&this.#zr()}render(){if(this.#Vr)return;const{page:{view:e},viewport:{rawDims:{pageWidth:t,pageHeight:r,pageX:n,pageY:i}}}=this.#Wr,s=this.#Vr=document.createElement("div");if(s.className="popup",this.#vr){const e=s.style.outlineColor=a.Util.makeHexColor(...this.#vr);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))s.style.backgroundColor=`color-mix(in srgb, ${e} 30%, white)`;else{const e=.7;s.style.backgroundColor=a.Util.makeHexColor(...this.#vr.map((t=>Math.floor(e*(255-t)+t))))}}const o=document.createElement("span");o.className="header";const l=document.createElement("h1");if(o.append(l),({dir:l.dir,str:l.textContent}=this.#Zr),s.append(o),this.#Rr){const e=document.createElement("span");e.classList.add("popupDate"),this.#Rr.then((t=>{e.textContent=t})),o.append(e)}const h=this.#Hr,u=this.#Yr;if(!u?.str||h?.str&&h.str!==u.str){const e=this._formatContents(h);s.append(e)}else c.XfaLayer.render({xfaHtml:u.html,intent:"richText",div:s}),s.lastChild.classList.add("richText","popupContent");let d=!!this.#Gr,f=d?this.#Gr:this.#Kr;for(const e of this.#Xr)if(!f||null!==a.Util.intersect(e.data.rect,f)){f=e.data.rect,d=!0;break}const p=a.Util.normalizeRect([f[0],e[3]-f[1]+e[1],f[2],e[3]-f[3]+e[1]]),g=d?f[2]-f[0]+5:0,m=p[0]+g,b=p[1],{style:y}=this.#pt;y.left=100*(m-n)/t+"%",y.top=100*(b-i)/r+"%",this.#pt.append(s)}_formatContents({str:e,dir:t}){const r=document.createElement("p");r.classList.add("popupContent"),r.dir=t;const a=e.split(/(?:\r\n?|\n)/);for(let e=0,t=a.length;e<t;++e){const n=a[e];r.append(document.createTextNode(n)),e<t-1&&r.append(document.createElement("br"))}return r}#Nr(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||("Enter"===e.key||"Escape"===e.key&&this.#qr)&&this.#zr()}#zr(){this.#qr=!this.#qr,this.#qr?(this.#$r(),this.#pt.addEventListener("click",this.#Ur),this.#pt.addEventListener("keydown",this.#Dr)):(this.#Br(),this.#pt.removeEventListener("click",this.#Ur),this.#pt.removeEventListener("keydown",this.#Dr))}#$r(){this.#Vr||this.render(),this.isVisible?this.#qr&&this.#pt.classList.add("focused"):(this.#pt.hidden=!1,this.#pt.style.zIndex=parseInt(this.#pt.style.zIndex)+1e3)}#Br(){this.#pt.classList.remove("focused"),!this.#qr&&this.isVisible&&(this.#pt.hidden=!0,this.#pt.style.zIndex=parseInt(this.#pt.style.zIndex)-1e3)}forceHide(){this.#Jr=this.isVisible,this.#Jr&&(this.#pt.hidden=!0)}maybeShow(){this.#Jr&&(this.#Jr=!1,this.#pt.hidden=!1)}get isVisible(){return!1===this.#pt.hidden}}class C extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=a.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const t of this.textContent){const r=document.createElement("span");r.textContent=t,e.append(r)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}t.FreeTextAnnotationElement=C;class _ extends f{#Qr=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const e=this.data,{width:t,height:r}=u(e.rect),a=this.svgFactory.create(t,r,!0),n=this.#Qr=this.svgFactory.createElement("svg:line");return n.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),n.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),n.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),n.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),a.append(n),this.container.append(a),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Qr}addHighlightArea(){this.container.classList.add("highlightArea")}}class T extends f{#ea=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const e=this.data,{width:t,height:r}=u(e.rect),a=this.svgFactory.create(t,r,!0),n=e.borderStyle.width,i=this.#ea=this.svgFactory.createElement("svg:rect");return i.setAttribute("x",n/2),i.setAttribute("y",n/2),i.setAttribute("width",t-n),i.setAttribute("height",r-n),i.setAttribute("stroke-width",n||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.append(i),this.container.append(a),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ea}addHighlightArea(){this.container.classList.add("highlightArea")}}class E extends f{#ta=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const e=this.data,{width:t,height:r}=u(e.rect),a=this.svgFactory.create(t,r,!0),n=e.borderStyle.width,i=this.#ta=this.svgFactory.createElement("svg:ellipse");return i.setAttribute("cx",t/2),i.setAttribute("cy",r/2),i.setAttribute("rx",t/2-n/2),i.setAttribute("ry",r/2-n/2),i.setAttribute("stroke-width",n||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.append(i),this.container.append(a),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ta}addHighlightArea(){this.container.classList.add("highlightArea")}}class O extends f{#ra=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:r}=u(e.rect),a=this.svgFactory.create(t,r,!0);let n=[];for(const t of e.vertices){const r=t.x-e.rect[0],a=e.rect[3]-t.y;n.push(r+","+a)}n=n.join(" ");const i=this.#ra=this.svgFactory.createElement(this.svgElementName);return i.setAttribute("points",n),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),a.append(i),this.container.append(a),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#ra}addHighlightArea(){this.container.classList.add("highlightArea")}}class F extends O{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class P extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class I extends f{#aa=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=a.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:r}=u(e.rect),a=this.svgFactory.create(t,r,!0);for(const t of e.inkLists){let r=[];for(const a of t){const t=a.x-e.rect[0],n=e.rect[3]-a.y;r.push(`${t},${n}`)}r=r.join(" ");const n=this.svgFactory.createElement(this.svgElementName);this.#aa.push(n),n.setAttribute("points",r),n.setAttribute("stroke-width",e.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","transparent"),!e.popupRef&&this.hasPopupData&&this._createPopup(),a.append(n)}return this.container.append(a),this.container}getElementsToTriggerPopup(){return this.#aa}addHighlightArea(){this.container.classList.add("highlightArea")}}t.InkAnnotationElement=I;class M extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class R extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class D extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class N extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class L extends f{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}t.StampAnnotationElement=L;class B extends f{#na=null;constructor(e){super(e,{isRenderable:!0});const{filename:t,content:r}=this.data.file;this.filename=(0,n.getFilenameFromUrl)(t,!0),this.content=r,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,filename:t,content:r})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:e,data:t}=this;let r;t.hasAppearance||0===t.fillAlpha?r=document.createElement("div"):(r=document.createElement("img"),r.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name)?"paperclip":"pushpin"}.svg`,t.fillAlpha&&t.fillAlpha<1&&(r.style=`filter: opacity(${Math.round(100*t.fillAlpha)}%);`)),r.addEventListener("dblclick",this.#ia.bind(this)),this.#na=r;const{isMac:n}=a.FeatureTest.platform;return e.addEventListener("keydown",(e=>{"Enter"===e.key&&(n?e.metaKey:e.ctrlKey)&&this.#ia()})),!t.popupRef&&this.hasPopupData?this._createPopup():r.classList.add("popupTriggerArea"),e.append(r),e}getElementsToTriggerPopup(){return this.#na}addHighlightArea(){this.container.classList.add("highlightArea")}#ia(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}t.AnnotationLayer=class{#tr=null;#sa=null;#oa=new Map;constructor({div:e,accessibilityManager:t,annotationCanvasMap:r,l10n:a,page:n,viewport:i}){this.div=e,this.#tr=t,this.#sa=r,this.l10n=a,this.page=n,this.viewport=i,this.zIndex=0,this.l10n||=o.NullL10n}#ca(e,t){const r=e.firstChild||e;r.id=`${a.AnnotationPrefix}${t}`,this.div.append(e),this.#tr?.moveElementInDOM(this.div,e,r,!1)}async render(e){const{annotations:t}=e,r=this.div;(0,n.setLayerDimensions)(r,this.viewport);const s=new Map,o={data:null,layer:r,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new n.DOMSVGFactory,annotationStorage:e.annotationStorage||new i.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const e of t){if(e.noHTML)continue;const t=e.annotationType===a.AnnotationType.POPUP;if(t){const t=s.get(e.id);if(!t)continue;o.elements=t}else{const{width:t,height:r}=u(e.rect);if(t<=0||r<=0)continue}o.data=e;const r=d.create(o);if(!r.isRenderable)continue;if(!t&&e.popupRef){const t=s.get(e.popupRef);t?t.push(r):s.set(e.popupRef,[r])}r.annotationEditorType>0&&this.#oa.set(r.data.id,r);const n=r.render();e.hidden&&(n.style.visibility="hidden"),this.#ca(n,e.id)}this.#la(),await this.l10n.translate(r)}update({viewport:e}){const t=this.div;this.viewport=e,(0,n.setLayerDimensions)(t,{rotation:e.rotation}),this.#la(),t.hidden=!1}#la(){if(!this.#sa)return;const e=this.div;for(const[t,r]of this.#sa){const a=e.querySelector(`[data-annotation-id="${t}"]`);if(!a)continue;const{firstChild:n}=a;n?"CANVAS"===n.nodeName?n.replaceWith(r):n.before(r):a.append(r)}this.#sa.clear()}getEditableAnnotations(){return Array.from(this.#oa.values())}getEditableAnnotation(e){return this.#oa.get(e)}}},(e,t)=>{function r(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function a(e){return Math.max(0,Math.min(255,255*e))}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G([e,t,r,a]){return["G",1-Math.min(1,.3*e+.59*r+.11*t+a)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=a(e),e,e]}static G_HTML([e]){const t=r(e);return`#${t}${t}${t}`}static RGB_G([e,t,r]){return["G",.3*e+.59*t+.11*r]}static RGB_rgb(e){return e.map(a)}static RGB_HTML(e){return`#${e.map(r).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,r,a]){return["RGB",1-Math.min(1,e+a),1-Math.min(1,r+a),1-Math.min(1,t+a)]}static CMYK_rgb([e,t,r,n]){return[a(1-Math.min(1,e+n)),a(1-Math.min(1,r+n)),a(1-Math.min(1,t+n))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,r]){const a=1-e,n=1-t,i=1-r;return["CMYK",a,n,i,Math.min(a,n,i)]}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=a;const r={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"};function a(e,t){switch(e){case"find_match_count":e=`find_match_count[${1===t.total?"one":"other"}]`;break;case"find_match_count_limit":e=`find_match_count_limit[${1===t.limit?"one":"other"}]`}return r[e]||""}r.print_progress_percent="{{progress}}%";const n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",get:async(e,t=null,r=a(e,t))=>function(e,t){return t?e.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,((e,r)=>r in t?t[r]:"{{"+r+"}}")):e}(r,t),async translate(e){}};t.NullL10n=n},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var a=r(25);t.XfaLayer=class{static setupStorage(e,t,r,a,n){const i=a.getValue(t,{value:null});switch(r.name){case"textarea":if(null!==i.value&&(e.textContent=i.value),"print"===n)break;e.addEventListener("input",(e=>{a.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===r.attributes.type||"checkbox"===r.attributes.type){if(i.value===r.attributes.xfaOn?e.setAttribute("checked",!0):i.value===r.attributes.xfaOff&&e.removeAttribute("checked"),"print"===n)break;e.addEventListener("change",(e=>{a.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==i.value&&e.setAttribute("value",i.value),"print"===n)break;e.addEventListener("input",(e=>{a.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==i.value){e.setAttribute("value",i.value);for(const e of r.children)e.attributes.value===i.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",(e=>{const r=e.target.options,n=-1===r.selectedIndex?"":r[r.selectedIndex].value;a.setValue(t,{value:n})}))}}static setAttributes({html:e,element:t,storage:r=null,intent:a,linkService:n}){const{attributes:i}=t,s=e instanceof HTMLAnchorElement;"radio"===i.type&&(i.name=`${i.name}-${a}`);for(const[t,r]of Object.entries(i))if(null!=r)switch(t){case"class":r.length&&e.setAttribute(t,r.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",r);break;case"style":Object.assign(e.style,r);break;case"textContent":e.textContent=r;break;default:(!s||"href"!==t&&"newWindow"!==t)&&e.setAttribute(t,r)}s&&n.addLinkAttributes(e,i.href,i.newWindow),r&&i.dataId&&this.setupStorage(e,i.dataId,t,r)}static render(e){const t=e.annotationStorage,r=e.linkService,n=e.xfaHtml,i=e.intent||"display",s=document.createElement(n.name);n.attributes&&this.setAttributes({html:s,element:n,intent:i,linkService:r});const o=[[n,-1,s]],c=e.div;if(c.append(s),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;c.style.transform=t}"richText"!==i&&c.setAttribute("class","xfaLayer xfaFont");const l=[];for(;o.length>0;){const[e,n,s]=o.at(-1);if(n+1===e.children.length){o.pop();continue}const c=e.children[++o.at(-1)[1]];if(null===c)continue;const{name:h}=c;if("#text"===h){const e=document.createTextNode(c.value);l.push(e),s.append(e);continue}const u=c?.attributes?.xmlns?document.createElementNS(c.attributes.xmlns,h):document.createElement(h);if(s.append(u),c.attributes&&this.setAttributes({html:u,element:c,storage:t,intent:i,linkService:r}),c.children&&c.children.length>0)o.push([c,-1,u]);else if(c.value){const e=document.createTextNode(c.value);a.XfaText.shouldBuildText(h)&&l.push(e),u.append(e)}}for(const e of c.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:l}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0;var a=r(1),n=r(4),i=r(29),s=r(6),o=r(5);class c extends n.AnnotationEditor{#ha=0;#ua=0;#da=this.canvasPointermove.bind(this);#fa=this.canvasPointerleave.bind(this);#pa=this.canvasPointerup.bind(this);#ga=this.canvasPointerdown.bind(this);#ma=new Path2D;#ba=!1;#ya=!1;#va=!1;#wa=null;#Aa=0;#Sa=0;#xa=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(e){super({...e,name:"inkEditor"}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.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(e){n.AnnotationEditor.initialize(e,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:c._defaultThickness=t;break;case a.AnnotationEditorParamsType.INK_COLOR:c._defaultColor=t;break;case a.AnnotationEditorParamsType.INK_OPACITY:c._defaultOpacity=t/100}}updateParams(e,t){switch(e){case a.AnnotationEditorParamsType.INK_THICKNESS:this.#ka(t);break;case a.AnnotationEditorParamsType.INK_COLOR:this.#Cr(t);break;case a.AnnotationEditorParamsType.INK_OPACITY:this.#Ca(t)}}static get defaultPropertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,c._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,c._defaultColor||n.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*c._defaultOpacity)]]}get propertiesToUpdate(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||c._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,this.color||c._defaultColor||n.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??c._defaultOpacity))]]}#ka(e){const t=this.thickness;this.addCommands({cmd:()=>{this.thickness=e,this.#_a()},undo:()=>{this.thickness=t,this.#_a()},mustExec:!0,type:a.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Cr(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,this.#Ta()},undo:()=>{this.color=t,this.#Ta()},mustExec:!0,type:a.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Ca(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,this.#Ta()},undo:()=>{this.opacity=t,this.#Ta()},mustExec:!0,type:a.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),null!==this.div&&(this.canvas||(this.#Ea(),this.#Oa()),this.isAttachedToDOM||(this.parent.add(this),this.#Fa()),this.#_a()))}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#wa.disconnect(),this.#wa=null,super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,r=this.width*e,a=this.height*t;this.setDimensions(r,a)}enableEditMode(){this.#ba||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#ga))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#ga))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Pa(){const{parentRotation:e,parentDimensions:[t,r]}=this;switch(e){case 90:return[0,r,r,t];case 180:return[t,r,t,r];case 270:return[t,0,r,t];default:return[0,0,t,r]}}#Ia(){const{ctx:e,color:t,opacity:r,thickness:a,parentScale:n,scaleFactor:i}=this;e.lineWidth=a*n/i,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${t}${(0,o.opacityToHex)(r)}`}#Ma(e,t){this.canvas.addEventListener("contextmenu",s.noContextMenu),this.canvas.addEventListener("pointerleave",this.#fa),this.canvas.addEventListener("pointermove",this.#da),this.canvas.addEventListener("pointerup",this.#pa),this.canvas.removeEventListener("pointerdown",this.#ga),this.isEditing=!0,this.#va||(this.#va=!0,this.#Fa(),this.thickness||=c._defaultThickness,this.color||=c._defaultColor||n.AnnotationEditor._defaultLineColor,this.opacity??=c._defaultOpacity),this.currentPath.push([e,t]),this.#ya=!1,this.#Ia(),this.#xa=()=>{this.#Ra(),this.#xa&&window.requestAnimationFrame(this.#xa)},window.requestAnimationFrame(this.#xa)}#Da(e,t){const[r,a]=this.currentPath.at(-1);if(this.currentPath.length>1&&e===r&&t===a)return;const n=this.currentPath;let i=this.#ma;if(n.push([e,t]),this.#ya=!0,n.length<=2)return i.moveTo(...n[0]),void i.lineTo(e,t);3===n.length&&(this.#ma=i=new Path2D,i.moveTo(...n[0])),this.#Na(i,...n.at(-3),...n.at(-2),e,t)}#La(){if(0===this.currentPath.length)return;const e=this.currentPath.at(-1);this.#ma.lineTo(...e)}#Ba(e,t){let r;if(this.#xa=null,e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),this.#Da(e,t),this.#La(),1!==this.currentPath.length)r=this.#ja();else{const a=[e,t];r=[[a,a.slice(),a.slice(),a]]}const a=this.#ma,n=this.currentPath;this.currentPath=[],this.#ma=new Path2D,this.addCommands({cmd:()=>{this.allRawPaths.push(n),this.paths.push(r),this.bezierPath2D.push(a),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#Ea(),this.#Oa()),this.#_a())},mustExec:!0})}#Ra(){if(!this.#ya)return;this.#ya=!1;Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map((e=>e[0])),r=e.map((e=>e[1])),{ctx:a}=(Math.min(...t),Math.max(...t),Math.min(...r),Math.max(...r),this);a.save(),a.clearRect(0,0,this.canvas.width,this.canvas.height);for(const e of this.bezierPath2D)a.stroke(e);a.stroke(this.#ma),a.restore()}#Na(e,t,r,a,n,i,s){const o=(t+a)/2,c=(r+n)/2,l=(a+i)/2,h=(n+s)/2;e.bezierCurveTo(o+2*(a-o)/3,c+2*(n-c)/3,l+2*(a-l)/3,h+2*(n-h)/3,l,h)}#ja(){const e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];const t=[];let r,[a,n]=e[0];for(r=1;r<e.length-2;r++){const[i,s]=e[r],[o,c]=e[r+1],l=(i+o)/2,h=(s+c)/2,u=[a+2*(i-a)/3,n+2*(s-n)/3],d=[l+2*(i-l)/3,h+2*(s-h)/3];t.push([[a,n],u,d,[l,h]]),[a,n]=[l,h]}const[i,s]=e[r],[o,c]=e[r+1],l=[a+2*(i-a)/3,n+2*(s-n)/3],h=[o+2*(i-o)/3,c+2*(s-c)/3];return t.push([[a,n],l,h,[o,c]]),t}#Ta(){if(this.isEmpty())return void this.#$a();this.#Ia();const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),this.#$a();for(const e of this.bezierPath2D)t.stroke(e)}commit(){this.#ba||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#ba=!0,this.div.classList.add("disabled"),this.#_a(!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!this.#ba&&(this.setInForeground(),e.preventDefault(),"mouse"!==e.type&&this.div.focus(),this.#Ma(e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),this.#Da(e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),this.#Ua(e)}canvasPointerleave(e){this.#Ua(e)}#Ua(e){this.canvas.removeEventListener("pointerleave",this.#fa),this.canvas.removeEventListener("pointermove",this.#da),this.canvas.removeEventListener("pointerup",this.#pa),this.canvas.addEventListener("pointerdown",this.#ga),setTimeout((()=>{this.canvas.removeEventListener("contextmenu",s.noContextMenu)}),10),this.#Ba(e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#Ea(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",n.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then((e=>this.canvas?.setAttribute("aria-label",e))),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#Oa(){this.#wa=new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&this.setDimensions(t.width,t.height)})),this.#wa.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#ba}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),n.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then((e=>this.div?.setAttribute("aria-label",e)));const[r,a,i,s]=this.#Pa();if(this.setAt(r,a,0,0),this.setDims(i,s),this.#Ea(),this.width){const[r,a]=this.parentDimensions;this.setAspectRatio(this.width*r,this.height*a),this.setAt(e*r,t*a,this.width*r,this.height*a),this.#va=!0,this.#Fa(),this.setDims(this.width*r,this.height*a),this.#Ta(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#Oa(),this.div}#Fa(){if(!this.#va)return;const[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),this.#$a()}setDimensions(e,t){const r=Math.round(e),a=Math.round(t);if(this.#Aa===r&&this.#Sa===a)return;this.#Aa=r,this.#Sa=a,this.canvas.style.visibility="hidden";const[n,i]=this.parentDimensions;this.width=e/n,this.height=t/i,this.fixAndSetPosition(),this.#ba&&this.#za(e,t),this.#Fa(),this.#Ta(),this.canvas.style.visibility="visible",this.fixDims()}#za(e,t){const r=this.#Ha(),a=(e-r)/this.#ua,n=(t-r)/this.#ha;this.scaleFactor=Math.min(a,n)}#$a(){const e=this.#Ha()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static#Xa(e){const t=new Path2D;for(let r=0,a=e.length;r<a;r++){const[a,n,i,s]=e[r];0===r&&t.moveTo(...a),t.bezierCurveTo(n[0],n[1],i[0],i[1],s[0],s[1])}return t}static#Wa(e,t,r){const[a,n,i,s]=t;switch(r){case 0:for(let t=0,r=e.length;t<r;t+=2)e[t]+=a,e[t+1]=s-e[t+1];break;case 90:for(let t=0,r=e.length;t<r;t+=2){const r=e[t];e[t]=e[t+1]+a,e[t+1]=r+n}break;case 180:for(let t=0,r=e.length;t<r;t+=2)e[t]=i-e[t],e[t+1]+=n;break;case 270:for(let t=0,r=e.length;t<r;t+=2){const r=e[t];e[t]=i-e[t+1],e[t+1]=s-r}break;default:throw new Error("Invalid rotation")}return e}static#Ga(e,t,r){const[a,n,i,s]=t;switch(r){case 0:for(let t=0,r=e.length;t<r;t+=2)e[t]-=a,e[t+1]=s-e[t+1];break;case 90:for(let t=0,r=e.length;t<r;t+=2){const r=e[t];e[t]=e[t+1]-n,e[t+1]=r-a}break;case 180:for(let t=0,r=e.length;t<r;t+=2)e[t]=i-e[t],e[t+1]-=n;break;case 270:for(let t=0,r=e.length;t<r;t+=2){const r=e[t];e[t]=s-e[t+1],e[t+1]=i-r}break;default:throw new Error("Invalid rotation")}return e}#qa(e,t,r,a){const n=[],i=this.thickness/2,s=e*t+i,o=e*r+i;for(const t of this.paths){const r=[],i=[];for(let a=0,n=t.length;a<n;a++){const[c,l,h,u]=t[a],d=e*c[0]+s,f=e*c[1]+o,p=e*l[0]+s,g=e*l[1]+o,m=e*h[0]+s,b=e*h[1]+o,y=e*u[0]+s,v=e*u[1]+o;0===a&&(r.push(d,f),i.push(d,f)),r.push(p,g,m,b,y,v),i.push(p,g),a===n-1&&i.push(y,v)}n.push({bezier:c.#Wa(r,a,this.rotation),points:c.#Wa(i,a,this.rotation)})}return n}#Va(){let e=1/0,t=-1/0,r=1/0,n=-1/0;for(const i of this.paths)for(const[s,o,c,l]of i){const i=a.Util.bezierBoundingBox(...s,...o,...c,...l);e=Math.min(e,i[0]),r=Math.min(r,i[1]),t=Math.max(t,i[2]),n=Math.max(n,i[3])}return[e,r,t,n]}#Ha(){return this.#ba?Math.ceil(this.thickness*this.parentScale):0}#_a(e=!1){if(this.isEmpty())return;if(!this.#ba)return void this.#Ta();const t=this.#Va(),r=this.#Ha();this.#ua=Math.max(n.AnnotationEditor.MIN_SIZE,t[2]-t[0]),this.#ha=Math.max(n.AnnotationEditor.MIN_SIZE,t[3]-t[1]);const a=Math.ceil(r+this.#ua*this.scaleFactor),i=Math.ceil(r+this.#ha*this.scaleFactor),[s,o]=this.parentDimensions;this.width=a/s,this.height=i/o,this.setAspectRatio(a,i);const c=this.translationX,l=this.translationY;this.translationX=-t[0],this.translationY=-t[1],this.#Fa(),this.#Ta(),this.#Aa=a,this.#Sa=i,this.setDims(a,i);const h=e?r/this.scaleFactor/2:0;this.translate(c-this.translationX-h,l-this.translationY-h)}static deserialize(e,t,r){if(e instanceof i.InkAnnotationElement)return null;const s=super.deserialize(e,t,r);s.thickness=e.thickness,s.color=a.Util.makeHexColor(...e.color),s.opacity=e.opacity;const[o,l]=s.pageDimensions,h=s.width*o,u=s.height*l,d=s.parentScale,f=e.thickness/2;s.#ba=!0,s.#Aa=Math.round(h),s.#Sa=Math.round(u);const{paths:p,rect:g,rotation:m}=e;for(let{bezier:e}of p){e=c.#Ga(e,g,m);const t=[];s.paths.push(t);let r=d*(e[0]-f),a=d*(e[1]-f);for(let n=2,i=e.length;n<i;n+=6){const i=d*(e[n]-f),s=d*(e[n+1]-f),o=d*(e[n+2]-f),c=d*(e[n+3]-f),l=d*(e[n+4]-f),h=d*(e[n+5]-f);t.push([[r,a],[i,s],[o,c],[l,h]]),r=l,a=h}const n=this.#Xa(t);s.bezierPath2D.push(n)}const b=s.#Va();return s.#ua=Math.max(n.AnnotationEditor.MIN_SIZE,b[2]-b[0]),s.#ha=Math.max(n.AnnotationEditor.MIN_SIZE,b[3]-b[1]),s.#za(h,u),s}serialize(){if(this.isEmpty())return null;const e=this.getRect(0,0),t=n.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:a.AnnotationEditorType.INK,color:t,thickness:this.thickness,opacity:this.opacity,paths:this.#qa(this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId}}}t.InkEditor=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StampEditor=void 0;var a=r(1),n=r(4),i=r(6),s=r(29);class o extends n.AnnotationEditor{#Ka=null;#Ya=null;#Za=null;#Ja=null;#Qa=null;#en=null;#wa=null;#tn=null;#rn=!1;#an=!1;static _type="stamp";constructor(e){super({...e,name:"stampEditor"}),this.#Ja=e.bitmapUrl,this.#Qa=e.bitmapFile}static initialize(e){n.AnnotationEditor.initialize(e)}static get supportedTypes(){return(0,a.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((e=>`image/${e}`)))}static get supportedTypesStr(){return(0,a.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(a.AnnotationEditorType.STAMP,{bitmapFile:e.getAsFile()})}#nn(e,t=!1){e?(this.#Ka=e.bitmap,t||(this.#Ya=e.id,this.#rn=e.isSvg),this.#Ea()):this.remove()}#in(){this.#Za=null,this._uiManager.enableWaiting(!1),this.#en&&this.div.focus()}#sn(){if(this.#Ya)return this._uiManager.enableWaiting(!0),void this._uiManager.imageManager.getFromId(this.#Ya).then((e=>this.#nn(e,!0))).finally((()=>this.#in()));if(this.#Ja){const e=this.#Ja;return this.#Ja=null,this._uiManager.enableWaiting(!0),void(this.#Za=this._uiManager.imageManager.getFromUrl(e).then((e=>this.#nn(e))).finally((()=>this.#in())))}if(this.#Qa){const e=this.#Qa;return this.#Qa=null,this._uiManager.enableWaiting(!0),void(this.#Za=this._uiManager.imageManager.getFromFile(e).then((e=>this.#nn(e))).finally((()=>this.#in())))}const e=document.createElement("input");e.type="file",e.accept=o.supportedTypesStr,this.#Za=new Promise((t=>{e.addEventListener("change",(async()=>{if(e.files&&0!==e.files.length){this._uiManager.enableWaiting(!0);const t=await this._uiManager.imageManager.getFromFile(e.files[0]);this.#nn(t)}else this.remove();t()})),e.addEventListener("cancel",(()=>{this.remove(),t()}))})).finally((()=>this.#in())),e.click()}remove(){this.#Ya&&(this.#Ka=null,this._uiManager.imageManager.deleteId(this.#Ya),this.#en?.remove(),this.#en=null,this.#wa?.disconnect(),this.#wa=null),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#Ya&&this.#sn(),this.isAttachedToDOM||this.parent.add(this))):this.#Ya&&this.#sn()}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#Za||this.#Ka||this.#Ja||this.#Qa)}get isResizable(){return!0}render(){if(this.div)return this.div;let e,t;if(this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.#Ka?this.#Ea():this.#sn(),this.width){const[r,a]=this.parentDimensions;this.setAt(e*r,t*a,this.width*r,this.height*a)}return this.div}#Ea(){const{div:e}=this;let{width:t,height:r}=this.#Ka;const[a,n]=this.pageDimensions,i=.75;if(this.width)t=this.width*a,r=this.height*n;else if(t>i*a||r>i*n){const e=Math.min(i*a/t,i*n/r);t*=e,r*=e}const[s,o]=this.parentDimensions;this.setDims(t*s/a,r*o/n),this._uiManager.enableWaiting(!1);const c=this.#en=document.createElement("canvas");e.append(c),e.hidden=!1,this.#on(t,r),this.#Oa(),this.#an||(this.parent.addUndoableEditor(this),this.#an=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#cn(e,t){const[r,a]=this.parentDimensions;this.width=e/r,this.height=t/a,this.setDims(e,t),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,null!==this.#tn&&clearTimeout(this.#tn),this.#tn=setTimeout((()=>{this.#tn=null,this.#on(e,t)}),200)}#ln(e,t){const{width:r,height:a}=this.#Ka;let n=r,i=a,s=this.#Ka;for(;n>2*e||i>2*t;){const r=n,a=i;n>2*e&&(n=n>=16384?Math.floor(n/2)-1:Math.ceil(n/2)),i>2*t&&(i=i>=16384?Math.floor(i/2)-1:Math.ceil(i/2));const o=new OffscreenCanvas(n,i);o.getContext("2d").drawImage(s,0,0,r,a,0,0,n,i),s=o.transferToImageBitmap()}return s}#on(e,t){e=Math.ceil(e),t=Math.ceil(t);const r=this.#en;if(!r||r.width===e&&r.height===t)return;r.width=e,r.height=t;const a=this.#rn?this.#Ka:this.#ln(e,t),n=r.getContext("2d");n.filter=this._uiManager.hcmFilter,n.drawImage(a,0,0,a.width,a.height,0,0,e,t)}#hn(e){if(e){if(this.#rn){const e=this._uiManager.imageManager.getSvgUrl(this.#Ya);if(e)return e}const e=document.createElement("canvas");return({width:e.width,height:e.height}=this.#Ka),e.getContext("2d").drawImage(this.#Ka,0,0),e.toDataURL()}if(this.#rn){const[e,t]=this.pageDimensions,r=Math.round(this.width*e*i.PixelsPerInch.PDF_TO_CSS_UNITS),a=Math.round(this.height*t*i.PixelsPerInch.PDF_TO_CSS_UNITS),n=new OffscreenCanvas(r,a);return n.getContext("2d").drawImage(this.#Ka,0,0,this.#Ka.width,this.#Ka.height,0,0,r,a),n.transferToImageBitmap()}return structuredClone(this.#Ka)}#Oa(){this.#wa=new ResizeObserver((e=>{const t=e[0].contentRect;t.width&&t.height&&this.#cn(t.width,t.height)})),this.#wa.observe(this.div)}static deserialize(e,t,r){if(e instanceof s.StampAnnotationElement)return null;const a=super.deserialize(e,t,r),{rect:n,bitmapUrl:i,bitmapId:o,isSvg:c,accessibilityData:l}=e;o&&r.imageManager.isValidId(o)?a.#Ya=o:a.#Ja=i,a.#rn=c;const[h,u]=a.pageDimensions;return a.width=(n[2]-n[0])/h,a.height=(n[3]-n[1])/u,l&&(a.altTextData=l),a}serialize(e=!1,t=null){if(this.isEmpty())return null;const r={annotationType:a.AnnotationEditorType.STAMP,bitmapId:this.#Ya,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#rn,structTreeParentId:this._structTreeParentId};if(e)return r.bitmapUrl=this.#hn(!0),r.accessibilityData=this.altTextData,r;const{decorative:n,altText:i}=this.altTextData;if(!n&&i&&(r.accessibilityData={type:"Figure",alt:i}),null===t)return r;t.stamps||=new Map;const s=this.#rn?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(t.stamps.has(this.#Ya)){if(this.#rn){const e=t.stamps.get(this.#Ya);s>e.area&&(e.area=s,e.serialized.bitmap.close(),e.serialized.bitmap=this.#hn(!1))}}else t.stamps.set(this.#Ya,{area:s,serialized:r}),r.bitmap=this.#hn(!1);return r}}t.StampEditor=o}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__w_pdfjs_require__),r.exports}var __nested_webpack_exports__={};return(()=>{var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return i.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return s.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"DOMSVGFactory",{enumerable:!0,get:function(){return a.DOMSVGFactory}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return c.GlobalWorkerOptions}}),Object.defineProperty(e,"ImageKind",{enumerable:!0,get:function(){return t.ImageKind}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return r.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return a.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return r.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return a.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return a.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return r.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return l.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return r.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return r.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return a.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return a.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return a.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return a.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return a.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return a.loadScript}}),Object.defineProperty(e,"noContextMenu",{enumerable:!0,get:function(){return a.noContextMenu}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return n.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return a.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return n.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return r.version}});var t=__w_pdfjs_require__(1),r=__w_pdfjs_require__(2),a=__w_pdfjs_require__(6),n=__w_pdfjs_require__(26),i=__w_pdfjs_require__(27),s=__w_pdfjs_require__(5),o=__w_pdfjs_require__(29),c=__w_pdfjs_require__(14),l=__w_pdfjs_require__(32)})(),__nested_webpack_exports__})(),module.exports=root.pdfjsLib=factory()},787:()=>{},815:()=>{},920:(e,t,r)=>{("undefined"!=typeof window?window:{}).pdfjsWorker=r(114)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};return(()=>{"use strict";function e(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i,s,o=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(a=i.call(r)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){l=!0,n=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw n}}return o}}(e,r)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function a(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function n(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,o(a.key),a)}}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=i(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}__webpack_require__.d(__webpack_exports__,{YF:()=>Ju,zZ:()=>Nu,tl:()=>Vt,Gd:()=>I,YS:()=>jt,default:()=>Qu});const c=function(){return t=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container="string"==typeof t?document.getElementById(t):t,!this.container)throw new Error("Container element bulunamadı");this.options=Object.assign({darkMode:!1,toolbar:!0,zoom:{default:1,min:.5,max:3,step:.1},popup:!1,mouseWheelZoom:!0,statusBar:!1,documentList:{enabled:!0,width:300}},r),this.container.classList.add("udv-container"),this.options.darkMode&&this.container.classList.add("dark-mode"),this.adapters={},this.currentDocument=null,this.currentAdapter=null,this.documentList=[],this.errorMsg=document.createElement("div"),this.errorMsg.className="udv-error",this.errorMsg.style.display="none",this.loader=document.createElement("div"),this.loader.className="udv-loader",this.loader.innerHTML='<div class="udv-spinner"></div><div class="udv-loading-text">Yükleniyor...</div>',this.loader.style.display="none",this._buildUI(),this.viewerArea&&(this.viewerArea.appendChild(this.errorMsg),this.viewerArea.appendChild(this.loader)),this.popupOverlay=null,this.popupContainer=null,this.options.mouseWheelZoom&&this._initMouseWheelZoom()},r=[{key:"_buildUI",value:function(){this.viewerPanel=document.createElement("div"),this.viewerPanel.className="udv-viewer-panel",this.container.appendChild(this.viewerPanel),this.options.toolbar&&this._buildToolbar(),this.viewerArea=document.createElement("div"),this.viewerArea.className="udv-viewer-area",this.viewerPanel.appendChild(this.viewerArea),this.viewerArea.addEventListener("scroll",this._handleScroll.bind(this)),this.options.statusBar&&this._buildStatusBar()}},{key:"_handleScroll",value:function(e){var t=this;this.currentAdapter&&(this._scrollTimeout&&clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout((function(){"function"==typeof t.currentAdapter.getCurrentPageFromScroll&&Promise.resolve(t.currentAdapter.getCurrentPageFromScroll()).then((function(){t.updatePageInfo()})).catch((function(e){console.error("Scroll sayfa tespiti hatası:",e)}))}),100))}},{key:"open",value:function(){var e=this;if(!this.popupOverlay||!this.popupOverlay.classList.contains("active")){if(!this.popupOverlay){this.popupOverlay=document.createElement("div"),this.popupOverlay.className="udv-popup-overlay",this.popupContainer=document.createElement("div"),this.popupContainer.className="udv-popup-container";var t=document.createElement("button");t.className="udv-close-btn",t.innerHTML='<i class="fas fa-times"></i>',t.addEventListener("click",(function(){return e.close()})),t.title="Kapat",this.popupContainer.appendChild(t),this.popupOverlay.appendChild(this.popupContainer),document.body.appendChild(this.popupOverlay),document.addEventListener("keydown",(function(t){"Escape"===t.key&&e.popupOverlay.classList.contains("active")&&e.close()})),this.popupOverlay.addEventListener("click",(function(t){t.target===e.popupOverlay&&e.close()}))}if(this.originalParent=this.container.parentNode,this.originalNextSibling=this.container.nextSibling,document.body.style.overflow="hidden",this.container.parentNode!==this.popupContainer&&this.popupContainer.appendChild(this.container),this.popupOverlay.classList.add("active"),this.currentAdapter&&("function"==typeof this.currentAdapter.adjustToScreen&&setTimeout((function(){e.currentAdapter.adjustToScreen(!0)}),300),"function"==typeof this.currentAdapter._applyZoom&&setTimeout((function(){e.currentAdapter._applyZoom()}),100)),this.options.mouseWheelZoom){var r=this.container.querySelector(".udv-zoom-tip");r&&setTimeout((function(){r.classList.add("visible"),setTimeout((function(){r.classList.remove("visible")}),3e3)}),500)}}}},{key:"close",value:function(){var e=this;this.popupOverlay&&this.popupOverlay.classList.contains("active")&&(this.popupOverlay.classList.remove("active"),document.body.style.overflow="",setTimeout((function(){if(e.originalParent)try{e.originalNextSibling?e.originalParent.insertBefore(e.container,e.originalNextSibling):e.originalParent.appendChild(e.container),e.currentAdapter&&("function"==typeof e.currentAdapter._applyZoom&&setTimeout((function(){e.currentAdapter._applyZoom()}),50),"function"==typeof e.currentAdapter.adjustToScreen&&setTimeout((function(){e.currentAdapter.adjustToScreen(!1)}),100))}catch(e){console.error("Container taşınırken hata oluştu:",e)}}),300))}},{key:"togglePopup",value:function(){this.popupOverlay&&this.popupOverlay.classList.contains("active")?this.close():this.open()}},{key:"_initMouseWheelZoom",value:function(){var e=this;this.viewerArea.addEventListener("wheel",(function(t){if(t.ctrlKey){t.preventDefault(),t.deltaY<0?e.zoomIn():e.zoomOut();var r=e.container.querySelector(".udv-zoom-tip");r&&(r.classList.add("visible"),setTimeout((function(){r.classList.remove("visible")}),1500))}}))}},{key:"loadDocument",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{if(!e){var n=new Error("Geçerli bir belge belirtilmelidir");return console.error("Belge yükleme hatası:",n.message),this.showError(n.message),Promise.reject(n)}if(console.log("Belge yükleme başlatılıyor:",{type:i(e),isFile:e instanceof File,isBlob:e instanceof Blob,isReferenceId:"object"===i(e)&&!e.type&&!e.name&&(e.referenceId||e.id),name:e.name||("string"==typeof e?e:"Bilinmiyor"),size:e instanceof Blob?e.size:"Bilinmiyor",mime:e.type||"Belirtilmemiş"}),this.showLoader(),this.hideError(),this.currentDocument=e,e instanceof Blob&&0===e.size){var s=new Error("Belge boş (0 byte)");return console.error("Belge yükleme hatası:",s.message),this.hideLoader(),this.showError(s.message),Promise.reject(s)}try{var o=this._detectFileType(e);if(console.log("Belge tipi belirlendi:",o),this.currentAdapter){console.log("Önceki adaptör temizleniyor ve yok ediliyor");try{this.currentAdapter.destroy()}catch(e){console.error("Önceki adaptör temizlenirken hata oluştu:",e)}this.currentAdapter=null}if(!this.viewerArea)throw console.error("viewerArea bulunamadı, görüntüleme yapılamaz"),new Error("Görüntüleme alanı hazırlanamadı");this.viewerArea.innerHTML="",this.errorMsg&&this.viewerArea.appendChild(this.errorMsg),this.loader&&this.viewerArea.appendChild(this.loader);var c,l=a(a({},this.options),{},{viewer:this,container:this.viewerArea});switch(o){case"pdf":console.log("PDF adaptörü oluşturuluyor"),c=new I(this.viewerArea,l);break;case"word":console.log("Word adaptörü oluşturuluyor"),c=new jt(this.viewerArea,l);break;case"image":console.log("Görüntü adaptörü oluşturuluyor"),c=new Vt(this.viewerArea,l);break;case"excel":console.log("Excel adaptörü oluşturuluyor"),c=new Nu(this.viewerArea,l);break;case"api":console.log("API adaptörü oluşturuluyor"),c=new Ju(this.viewerArea,l);break;default:var h=new Error("Desteklenmeyen belge türü: ".concat(o));return console.error("Belge yükleme hatası:",h.message),this.hideLoader(),this.showError(h.message),Promise.reject(h)}return this.currentAdapter=c,this.options.popup&&setTimeout((function(){t.open()}),200),console.log("Belge adaptöre gönderiliyor:",{adapter:c.constructor.name,document:e.name||"İsimsiz belge"}),c.loadDocument(e,a(a({},r),{},{onSuccess:function(){t.hideLoader(),t.updateZoomLabel(),t.updatePageInfo(),console.log("Belge başarıyla yüklendi"),r.onSuccess&&r.onSuccess()},onError:function(e){t.hideLoader();var a=e.message||"Bilinmeyen hata";console.error("Belge yükleme hatası:",a),t.showError("Belge yüklenirken hata oluştu: ".concat(a)),r.onError&&r.onError(e)},onProgress:function(e){r.onProgress&&r.onProgress(e)}})).catch((function(e){t.hideLoader();var r=e.message||"Bilinmeyen hata";return console.error("Belge yükleme hatası (uncaught):",r),t.showError("Belge yüklenirken beklenmeyen bir hata oluştu: ".concat(r)),Promise.reject(e)}))}catch(n){return this.hideLoader(),console.error("Belge yükleme işleminde beklenmeyen hata:",n),this.showError("Belge yüklenirken beklenmeyen bir hata oluştu: ".concat(n.message)),Promise.reject(n)}}catch(n){return console.error("Kritik belge yükleme hatası:",n),this.hideLoader(),this.showError("Belge yüklenirken kritik bir hata oluştu: ".concat(n.message)),Promise.reject(n)}}},{key:"_detectFileType",value:function(e){if("string"==typeof e){if(e.startsWith("data:application/pdf;base64,")||e.startsWith("data:application/pdf;filename=generated.pdf;base64,"))return"pdf";if(e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,")||e.startsWith("data:application/msword;base64,"))return"word";if(e.startsWith("data:image/"))return"image";if(e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,")||e.startsWith("data:application/vnd.ms-excel;base64,"))return"excel";if(e.startsWith("data:"))return"unknown";var t=e.toLowerCase();return t.endsWith(".pdf")||t.includes("pdf")?"pdf":t.endsWith(".docx")||t.endsWith(".doc")||t.includes("word")?"word":t.endsWith(".xlsx")||t.endsWith(".xls")||t.includes("excel")?"excel":t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".png")||t.endsWith(".gif")||t.endsWith(".bmp")||t.includes("image")?"image":"api"}if("object"===i(e)&&null!==e&&!e.type&&!e.name&&!e.size&&(e.referenceId||e.id||e.reference||e.docId))return"api";if(e instanceof Blob||e instanceof File){var r=e.type.toLowerCase();if(r.includes("pdf"))return"pdf";if(r.includes("word")||r.includes("openxmlformats-officedocument.wordprocessingml")||r.includes("msword"))return"word";if(r.includes("excel")||r.includes("openxmlformats-officedocument.spreadsheetml")||r.includes("ms-excel"))return"excel";if(r.includes("image/"))return"image";if(e.name){var a=e.name.toLowerCase();if(a.endsWith(".pdf"))return"pdf";if(a.endsWith(".docx")||a.endsWith(".doc"))return"word";if(a.endsWith(".xlsx")||a.endsWith(".xls"))return"excel";if(a.endsWith(".jpg")||a.endsWith(".jpeg")||a.endsWith(".png")||a.endsWith(".gif")||a.endsWith(".bmp"))return"image"}}return"unknown"}},{key:"showLoader",value:function(){this.loader&&this.loader.style?this.loader.style.display="flex":console.warn("Loader elementi bulunamadı")}},{key:"hideLoader",value:function(){this.loader&&this.loader.style?this.loader.style.display="none":console.warn("Loader elementi bulunamadı")}},{key:"showError",value:function(e){this.errorMsg?(this.errorMsg.textContent=e,this.errorMsg.style&&(this.errorMsg.style.display="block")):console.error("Hata mesajı elementi bulunamadı:",e)}},{key:"hideError",value:function(){this.errorMsg&&this.errorMsg.style?this.errorMsg.style.display="none":console.warn("Hata mesajı elementi bulunamadı")}},{key:"zoomIn",value:function(){this.currentAdapter&&(this.currentAdapter.zoomIn(),this.updateZoomLabel())}},{key:"zoomOut",value:function(){this.currentAdapter&&(this.currentAdapter.zoomOut(),this.updateZoomLabel())}},{key:"resetZoom",value:function(){this.currentAdapter&&(this.currentAdapter.resetZoom(),this.updateZoomLabel())}},{key:"updateZoomLabel",value:function(){if(this.zoomLabel&&this.currentAdapter){var e=this.currentAdapter.getZoom();this.zoomLabel.textContent="%".concat(Math.round(100*e))}}},{key:"previousPage",value:function(){var e=this;if(!this.currentAdapter||"function"!=typeof this.currentAdapter.previousPage)return Promise.resolve(!1);try{return Promise.resolve(this.currentAdapter.previousPage()).then((function(t){return e.updatePageInfo().then((function(){return t}))})).catch((function(e){return console.error("Önceki sayfaya giderken hata:",e),!1}))}catch(e){return console.error("Önceki sayfaya giderken beklenmeyen hata:",e),Promise.resolve(!1)}}},{key:"nextPage",value:function(){var e=this;if(!this.currentAdapter||"function"!=typeof this.currentAdapter.nextPage)return Promise.resolve(!1);try{return Promise.resolve(this.currentAdapter.nextPage()).then((function(t){return e.updatePageInfo().then((function(){return t}))})).catch((function(e){return console.error("Sonraki sayfaya giderken hata:",e),!1}))}catch(e){return console.error("Sonraki sayfaya giderken beklenmeyen hata:",e),Promise.resolve(!1)}}},{key:"updatePageInfo",value:function(){var t=this;if(!this.pageInfo||!this.currentAdapter)return Promise.resolve();try{return"function"==typeof this.currentAdapter.getCurrentPage&&"function"==typeof this.currentAdapter.getPageCount?Promise.all([Promise.resolve(this.currentAdapter.getCurrentPage()),Promise.resolve(this.currentAdapter.getPageCount())]).then((function(r){var a=e(r,2),n=a[0],i=a[1],s="number"==typeof n?n:n&&"function"==typeof n.then?1:Number(n)||1,o="number"==typeof i?i:i&&"function"==typeof i.then?1:Number(i)||1,c=t.pageInfo.querySelector(".udv-current-page"),l=t.pageInfo.querySelector(".udv-total-pages");return c&&(c.textContent=s.toString()),l&&(l.textContent=o.toString()),t.pageInfo.style.display="block",console.log("Sayfa bilgisi güncellendi: ".concat(s,"/").concat(o)),{current:s,total:o}})).catch((function(e){console.error("Sayfa bilgisi alınırken hata:",e);var r=t.pageInfo.querySelector(".udv-current-page"),a=t.pageInfo.querySelector(".udv-total-pages");return r&&(r.textContent="?"),a&&(a.textContent="?"),t.pageInfo.style.display="block",{current:0,total:0}})):(this.pageInfo.style.display="none",console.warn("Adaptörde getCurrentPage veya getPageCount metotları yok"),Promise.resolve({current:0,total:0}))}catch(e){return console.error("Sayfa bilgisi güncellenirken hata:",e),this.pageInfo.style.display="none",Promise.resolve({current:0,total:0})}}},{key:"updatePageLabel",value:function(e){if(this.pageInfo){var t=this.pageInfo.querySelector(".udv-current-page");t&&(t.textContent=e.toString())}}},{key:"rotate",value:function(){this.currentAdapter&&"function"==typeof this.currentAdapter.rotate&&this.currentAdapter.rotate()}},{key:"download",value:function(){if(this.currentDocument){if("string"==typeof this.currentDocument){var e=document.createElement("a");return e.href=this.currentDocument,e.download=this.currentDocument.split("/").pop(),e.target="_blank",void e.click()}var t=URL.createObjectURL(this.currentDocument),r=document.createElement("a");if(r.href=t,this.currentDocument.name)r.download=this.currentDocument.name;else{var a=this._detectFileType(this.currentDocument);r.download="document".concat({pdf:".pdf",word:".docx",image:".jpg",excel:".xlsx"}[a]||"")}r.click(),URL.revokeObjectURL(t)}}},{key:"toggleFullscreen",value:function(){var e=this;document.fullscreenElement?document.exitFullscreen():this.container.requestFullscreen().catch((function(t){e.showError("Tam ekran moduna geçilemedi: ".concat(t.message))}))}},{key:"isDocumentLoaded",value:function(){return!!this.currentDocument&&!!this.currentAdapter}},{key:"_buildToolbar",value:function(){var e=this;this.toolbar=document.createElement("div"),this.toolbar.className="udv-toolbar";var t=document.createElement("div");t.className="udv-btn-group";var r=document.createElement("button");r.className="udv-btn",r.innerHTML='<i class="fas fa-search-minus"></i>',r.title="Uzaklaştır",r.setAttribute("data-tooltip","Uzaklaştır (-)"),r.addEventListener("click",(function(){return e.zoomOut()}));var a=document.createElement("button");a.className="udv-btn",a.innerHTML='<span style="font-size: 12px; font-weight: bold;">100%</span>',a.title="Varsayılan Zoom",a.setAttribute("data-tooltip","Varsayılan Zoom (%100)"),a.addEventListener("click",(function(){return e.resetZoom()})),this.zoomLabel=document.createElement("span"),this.zoomLabel.className="udv-zoom-label",this.zoomLabel.textContent="%100",this.zoomLabel.setAttribute("data-tooltip","Mevcut Zoom Seviyesi");var n=document.createElement("button");n.className="udv-btn",n.innerHTML='<i class="fas fa-search-plus"></i>',n.title="Yakınlaştır",n.setAttribute("data-tooltip","Yakınlaştır (+)"),n.addEventListener("click",(function(){return e.zoomIn()})),t.appendChild(r),t.appendChild(a),t.appendChild(n);var i=document.createElement("div");i.className="udv-btn-group";var s=document.createElement("button");s.className="udv-btn",s.innerHTML='<i class="fas fa-chevron-left"></i>',s.title="Önceki Sayfa",s.setAttribute("data-tooltip","Önceki Sayfa (←)"),s.addEventListener("click",(function(){return e.previousPage()})),this.pageInfo=document.createElement("div"),this.pageInfo.className="udv-page-info",this.pageInfo.innerHTML='<span class="udv-current-page">0</span>/<span class="udv-total-pages">0</span>',this.pageInfo.setAttribute("data-tooltip","Sayfa Numarası");var o=document.createElement("button");o.className="udv-btn",o.innerHTML='<i class="fas fa-chevron-right"></i>',o.title="Sonraki Sayfa",o.setAttribute("data-tooltip","Sonraki Sayfa (→)"),o.addEventListener("click",(function(){return e.nextPage()})),i.appendChild(s),i.appendChild(o);var c=document.createElement("div");c.className="udv-btn-group";var l=document.createElement("button");l.className="udv-btn",l.innerHTML='<i class="fas fa-sync"></i>',l.title="Döndür",l.setAttribute("data-tooltip","Dökümanı Döndür"),l.addEventListener("click",(function(){return e.rotate()}));var h=document.createElement("button");h.className="udv-btn",h.innerHTML='<i class="fas fa-download"></i>',h.title="İndir",h.setAttribute("data-tooltip","Dökümanı İndir"),h.addEventListener("click",(function(){return e.download()})),c.appendChild(l),c.appendChild(h);var u=document.createElement("div");u.className="udv-btn-group";var d=document.createElement("button");d.className="udv-btn",d.innerHTML='<i class="fas fa-expand"></i>',d.title="Tam Ekran",d.setAttribute("data-tooltip","Tam Ekran Modu (F)"),d.addEventListener("click",(function(){return e.toggleFullscreen()}));var f=document.createElement("button");f.className="udv-btn",f.innerHTML='<i class="fas fa-external-link-alt"></i>',f.title="Popup Modu",f.setAttribute("data-tooltip","Popup Modunda Aç"),f.addEventListener("click",(function(){e.togglePopup()})),u.appendChild(d),u.appendChild(f),this.toolbar.appendChild(t),this.toolbar.appendChild(this.zoomLabel);var p=document.createElement("div");p.className="udv-spacer",this.toolbar.appendChild(p),this.toolbar.appendChild(i),this.toolbar.appendChild(this.pageInfo);var g=document.createElement("div");g.className="udv-spacer",this.toolbar.appendChild(g),this.toolbar.appendChild(c),this.toolbar.appendChild(u),this.viewerPanel.appendChild(this.toolbar)}},{key:"_buildStatusBar",value:function(){this.statusBar=document.createElement("div"),this.statusBar.className="udv-status-bar";var e=document.createElement("div");e.className="udv-zoom-info",e.textContent="Yakınlaştırma: %100";var t=document.createElement("div");t.className="udv-file-info",t.textContent="",this.statusBar.appendChild(e),this.statusBar.appendChild(t),this.viewerPanel.appendChild(this.statusBar)}},{key:"destroy",value:function(){try{if(console.log("UniversalDocViewer: destroy metodu çağrıldı"),this.currentAdapter){try{this.currentAdapter.destroy()}catch(e){console.error("Adaptör temizlenirken hata oluştu:",e)}this.currentAdapter=null}this.viewerArea&&this.viewerArea.removeEventListener("scroll",this._handleScroll.bind(this)),this.popupOverlay&&this.popupOverlay.parentNode&&(this.popupOverlay.parentNode.removeChild(this.popupOverlay),this.popupOverlay=null,this.popupContainer=null),this.viewerPanel&&(this.toolbar&&this.toolbar.querySelectorAll("button").forEach((function(e){e.replaceWith(e.cloneNode(!0))})),this.viewerPanel.innerHTML=""),this.container&&(this.container.innerHTML="",this.container.classList.remove("udv-container","dark-mode")),this.currentDocument=null,this.viewerArea=null,this.toolbar=null,this.viewerPanel=null,this.errorMsg=null,this.loader=null,this.pageInfo=null,this.zoomLabel=null,console.log("UniversalDocViewer: başarıyla temizlendi")}catch(e){console.error("UniversalDocViewer temizlenirken beklenmeyen hata:",e)}}}],r&&s(t.prototype,r),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return(t=p(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,p(a.key),a)}}function p(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=l(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var g=function(){return e=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t){var a=new Error("BaseViewerAdapter: Container element is required for viewer adapter");throw console.error(a),a}this.container=t,this.config=r,this.config.zoom=u(u({},{min:.5,max:2,default:1,step:.25}),r.zoom||{}),this.zoomLevel=this.config.zoom.default,this.zoomLevels=[.5,.75,1,1.25,1.5,1.75,2],this.currentPage=1,this.pageCount=1,this._scrollHandler=null,this._initScrollListener(),console.log("BaseViewerAdapter: Adaptör oluşturuldu",{container:t.tagName,zoom:this.zoomLevel})},t=[{key:"_initScrollListener",value:function(){this._removeScrollListener(),this._scrollHandler=this._handleScroll.bind(this),this.container&&this.container.addEventListener("scroll",this._scrollHandler,{passive:!0})}},{key:"_removeScrollListener",value:function(){this._scrollHandler&&this.container&&(this.container.removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null)}},{key:"_handleScroll",value:function(e){}},{key:"_updateVisiblePage",value:function(e){e!==this.currentPage&&(this.currentPage=e,this.config.onPageChange&&this.config.onPageChange(e),window.universalDocViewer&&window.universalDocViewer.updatePageLabel(e))}},{key:"setZoom",value:function(e){return this.zoomLevel=Math.min(Math.max(e,this.config.zoom.min),this.config.zoom.max),this._applyZoom(),this.zoomLevel}},{key:"zoomIn",value:function(){var e=this.zoomLevels.indexOf(this.zoomLevel);return e<this.zoomLevels.length-1?this.setZoom(this.zoomLevels[e+1]):this.zoomLevel}},{key:"zoomOut",value:function(){var e=this.zoomLevels.indexOf(this.zoomLevel);return e>0?this.setZoom(this.zoomLevels[e-1]):this.zoomLevel}},{key:"resetZoom",value:function(){return this.setZoom(this.config.zoom.default)}},{key:"getZoom",value:function(){return this.zoomLevel}},{key:"loadDocument",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Error("loadDocument method must be implemented by subclass");return console.error("BaseViewerAdapter:",r.message),t.onError&&t.onError(r),Promise.reject(r)}},{key:"getCurrentPage",value:function(){return this.currentPage}},{key:"getPageCount",value:function(){return this.pageCount}},{key:"_applyZoom",value:function(){return console.warn("BaseViewerAdapter: _applyZoom() metodu alt sınıf tarafından uygulanmadı"),Promise.resolve(this.zoomLevel)}},{key:"nextPage",value:function(){return this.currentPage<this.pageCount&&this.currentPage++,this.currentPage}},{key:"previousPage",value:function(){return this.currentPage>1&&this.currentPage--,this.currentPage}},{key:"showError",value:function(e){try{if(console.error("Görüntüleyici hatası:",e),!this.container)return void console.error("Görüntüleyici hatası: Container bulunamadı");var t=this.container.querySelector(".udv-adapter-error");if(t)return void(t.innerHTML="<p>".concat(e,"</p>"));var r=document.createElement("div");r.className="udv-adapter-error",r.style.padding="20px",r.style.margin="20px auto",r.style.maxWidth="80%",r.style.backgroundColor="#ffebee",r.style.color="#c62828",r.style.borderRadius="4px",r.style.boxShadow="0 1px 3px rgba(0,0,0,0.1)",r.style.textAlign="center",r.style.fontSize="14px",r.innerHTML="<p>".concat(e,"</p>"),this.container.appendChild(r)}catch(e){console.error("Hata mesajı gösterilirken bir sorun oluştu:",e)}}},{key:"_decodeBase64",value:function(e){var t=this;return new Promise((function(r,a){try{var n,i=e;-1!==e.indexOf("base64,")&&(i=e.split("base64,")[1]);try{n=atob(i)}catch(e){console.warn("atob kullanılamadı, alternatif yöntem deneniyor:",e),n=t._manualBase64Decode(i)}for(var s=n.length,o=new Uint8Array(s),c=0;c<s;c++)o[c]=n.charCodeAt(c);r(o)}catch(e){console.error("Base64 decode hatası:",e),a(new Error("Base64 veri çözümlenirken hata oluştu: "+e.message))}}))}},{key:"_manualBase64Decode",value:function(e){for(var t,r=e.replace(/=+$/,""),a="",n=0,i=0,s=0;t=r.charAt(s++);){var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(t);-1!==o&&(i=n%4?64*i+o:o,n++%4&&(a+=String.fromCharCode(255&i>>(-2*n&6))))}return a}},{key:"destroy",value:function(){this._removeScrollListener(),console.log("BaseViewerAdapter: destroy metodu çağrıldı"),this.container=null}}],t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),m=__webpack_require__(748);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function y(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function w(){w=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function h(e,t,r,a){var i=t&&t.prototype instanceof y?t:y,s=Object.create(i.prototype),o=new I(a||[]);return n(s,"_invoke",{value:E(e,r,o)}),s}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",f="suspendedYield",p="executing",g="completed",m={};function y(){}function v(){}function A(){}var S={};l(S,s,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(M([])));k&&k!==r&&a.call(k,s)&&(S=k);var C=A.prototype=y.prototype=Object.create(S);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(n,i,s,o){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==b(h)&&a.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,o)}),(function(e){r("throw",e,s,o)})):t.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,o)}))}o(c.arg)}var i;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return i=i?i.then(n,n):n()}})}function E(t,r,a){var n=d;return function(i,s){if(n===p)throw Error("Generator is already running");if(n===g){if("throw"===i)throw s;return{value:e,done:!0}}for(a.method=i,a.arg=s;;){var o=a.delegate;if(o){var c=O(o,a);if(c){if(c===m)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===d)throw n=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=p;var l=u(t,r,a);if("normal"===l.type){if(n=a.done?g:f,l.arg===m)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(n=g,a.method="throw",a.arg=l.arg)}}}function O(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),m;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function M(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(b(t)+" is not iterable")}return v.prototype=A,n(C,"constructor",{value:A,configurable:!0}),n(A,"constructor",{value:v,configurable:!0}),v.displayName=l(A,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,l(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},_(T.prototype),l(T.prototype,o,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,a,n,i){void 0===i&&(i=Promise);var s=new T(h(e,r,a,n),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},_(C),l(C,c,"Generator"),l(C,s,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=M,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(a,n){return o.type="throw",o.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=a.call(s,"catchLoc"),l=a.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;P(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:M(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),m}},t}function A(e,t,r,a,n,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(a,n)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function s(e){A(i,a,n,s,o,"next",e)}function o(e){A(i,a,n,s,o,"throw",e)}s(void 0)}))}}function x(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,k(a.key),a)}}function k(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=b(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}function C(e,t,r){return t=E(t),function(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,r||[],E(e).constructor):t.apply(e,r))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function T(){return T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=E(e)););return e}(e,t);if(a){var n=Object.getOwnPropertyDescriptor(a,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},T.apply(null,arguments)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var F=__webpack_require__(920);m.GlobalWorkerOptions.workerSrc=F;var P,I=function(e){function t(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=C(this,t,[e,a])).pdf=null,r.scale=a.defaultZoom||1,r.canvas=null,r.ctx=null,r.pageCanvases=new Map,r.lastZoomLevel=r.zoomLevel,!(e&&e instanceof HTMLElement))throw new Error("Geçerli bir görüntüleme alanı bulunamadı");return r.container.style.cssText="\n      width: 100%;\n      height: 100%;\n      position: relative;\n      display: flex;\n      flex-direction: column;\n    ",r.pdfContainer=document.createElement("div"),r.pdfContainer.className="udv-pdf-container",r.pdfContainer.style.cssText="\n      width: 100%;\n      height: 100%;\n      overflow-y: scroll;\n      overflow-x: hidden;\n      position: relative;\n      padding: 20px;\n      box-sizing: border-box;\n      background-color: #f8f8f8;\n    ",r.container.appendChild(r.pdfContainer),r._initScrollListener(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(t,e),r=t,a=[{key:"_initScrollListener",value:function(){var e=this;this._removeScrollListener(),this._scrollHandler=function(t){e._handleScroll(t)},this.pdfContainer&&this.pdfContainer.addEventListener("scroll",this._scrollHandler,{passive:!0})}},{key:"_removeScrollListener",value:function(){this._scrollHandler&&(this.pdfContainer&&this.pdfContainer.removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null)}},{key:"_handleScroll",value:function(e){var t=this;this.documentLoaded&&this.pdfContainer&&(this._scrollTimeout||(this._scrollTimeout=setTimeout((function(){t._scrollTimeout=null;var e=t.pdfContainer.querySelectorAll(".pdf-page");if(e&&0!==e.length){for(var r=t.pdfContainer.getBoundingClientRect(),a=r.top,n=r.height,i=a+n/2,s=null,o=0,c=1/0,l=0;l<e.length;l++){var h=e[l],u=h.getBoundingClientRect(),d=Math.max(u.top,a),f=Math.min(u.bottom,a+n),p=Math.max(0,f-d)/u.height,g=u.top+u.height/2,m=Math.abs(g-i);p>=.3&&(null===s||p>1.2*o||p>=.8*o&&m<.8*c)&&(s=h,o=p,c=m)}if(s){var b=parseInt(s.dataset.pageNumber);isNaN(b)||b===t.currentPage||t._updateVisiblePage(b)}}}),200)))}},{key:"_updateVisiblePage",value:function(e){if(this.currentPage=e,this.config.viewer&&"function"==typeof this.config.viewer.updatePageLabel)try{this.config.viewer.updatePageLabel(e)}catch(e){console.error("PDFViewerAdapter: Toolbar güncelleme hatası:",e)}}},{key:"loadDocument",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(){var a=S(w().mark((function a(n,i){var s,o,c;return w().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(a.prev=0,console.log("PDFViewerAdapter: Yeni PDF yükleniyor"),t.pdf&&(t.pdf.destroy(),t.pdf=null),t.pageCanvases.clear(),t.currentPage=1,a.prev=5,"string"!=typeof e){a.next=17;break}if(!e.startsWith("data:application/pdf;base64,")&&!e.startsWith("data:;base64,")){a.next=14;break}return a.next=10,t._decodeBase64(e);case 10:o=a.sent,s=m.getDocument({data:o}),a.next=15;break;case 14:s=m.getDocument({url:e});case 15:a.next=33;break;case 17:if(!(e instanceof Uint8Array)){a.next=21;break}s=m.getDocument({data:e}),a.next=33;break;case 21:if(!(e instanceof ArrayBuffer)){a.next=25;break}s=m.getDocument({data:new Uint8Array(e)}),a.next=33;break;case 25:if(!(e instanceof Blob||e instanceof File)){a.next=32;break}return a.next=28,t._readFileAsArrayBuffer(e);case 28:c=a.sent,s=m.getDocument({data:new Uint8Array(c)}),a.next=33;break;case 32:throw new Error("Desteklenmeyen PDF kaynağı tipi");case 33:return a.next=35,s.promise;case 35:return t.pdf=a.sent,console.log("PDFViewerAdapter: PDF yüklendi, toplam ".concat(t.pdf.numPages," sayfa")),t.pageCount=t.pdf.numPages,t.documentLoaded=!0,a.next=41,t._renderAllPages();case 41:r.onSuccess&&r.onSuccess(),n(t.pdf),a.next=51;break;case 45:a.prev=45,a.t0=a.catch(5),console.error("PDF yükleme veya render hatası:",a.t0),t.showError("PDF yüklenirken hata: ".concat(a.t0.message)),r.onError&&r.onError(a.t0),i(a.t0);case 51:a.next=57;break;case 53:a.prev=53,a.t1=a.catch(0),console.error("Beklenmeyen hata:",a.t1),i(a.t1);case 57:case"end":return a.stop()}}),a,null,[[0,53],[5,45]])})));return function(e,t){return a.apply(this,arguments)}}())}},{key:"_readFileAsArrayBuffer",value:function(e){return new Promise((function(t,r){var a=new FileReader;a.onload=function(){return t(a.result)},a.onerror=function(e){console.error("Dosya okuma hatası:",e),r(e)},a.readAsArrayBuffer(e)}))}},{key:"_renderAllPages",value:(d=S(w().mark((function e(){var t,r,a,n,i;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.pdf){e.next=4;break}return console.error("PDF yüklü değil, render işlemi yapılamıyor"),e.abrupt("return",Promise.reject(new Error("PDF yüklenmedi")));case 4:if(this.container&&this.container instanceof HTMLElement){e.next=7;break}return console.error("Container geçerli değil, render işlemi yapılamıyor"),e.abrupt("return",Promise.reject(new Error("Geçerli container bulunamadı")));case 7:this.pdfContainer&&(this.pdfContainer.innerHTML=""),this.pageCanvases.clear(),(t=document.createElement("div")).className="pdf-pages-wrapper",t.style.cssText="\n        width: 100%;\n        min-height: 100%;\n        position: relative;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        gap: 20px;\n        padding-bottom: 20px;\n      ",this.pdfContainer.appendChild(t),r=this.pageCount,a=[],n=1;case 16:if(!(n<=r)){e.next=32;break}return e.prev=17,e.next=20,this._renderSinglePage(n);case 20:(i=e.sent).style.cssText="\n            margin: 0 auto;\n            background-color: white;\n            box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n            position: relative;\n          ",t.appendChild(i),a.push(i),e.next=29;break;case 26:e.prev=26,e.t0=e.catch(17),console.error("Sayfa ".concat(n," render edilirken hata:"),e.t0);case 29:n++,e.next=16;break;case 32:return this._removeScrollListener(),this._initScrollListener(),this.currentPage=1,this.config.viewer&&"function"==typeof this.config.viewer.updatePageLabel&&this.config.viewer.updatePageLabel(this.currentPage),e.abrupt("return",a);case 39:return e.prev=39,e.t1=e.catch(0),console.error("PDF sayfaları render edilirken hata:",e.t1),e.abrupt("return",Promise.reject(e.t1));case 43:case"end":return e.stop()}}),e,this,[[0,39],[17,26]])}))),function(){return d.apply(this,arguments)})},{key:"_renderSinglePage",value:(u=S(w().mark((function e(t){var r,a,n,i,s,o;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.pdf){e.next=3;break}throw new Error("PDF yüklenmedi");case 3:if(this.pdfContainer&&this.pdfContainer.isConnected){e.next=12;break}if(console.warn("Sayfa ".concat(t,": pdfContainer bulunamadı veya DOM'da değil, yeniden oluşturuluyor")),this.pdfContainer&&this.pdfContainer.parentNode&&this.pdfContainer.parentNode.removeChild(this.pdfContainer),this.pdfContainer=document.createElement("div"),this.pdfContainer.className="udv-pdf-container",this.pdfContainer.style.cssText="width:100%; height:auto; overflow:auto; position:relative;",this.container&&this.container instanceof HTMLElement){e.next=11;break}throw new Error("Geçerli container bulunamadı");case 11:this.container.appendChild(this.pdfContainer);case 12:return e.next=14,this.pdf.getPage(t);case 14:if(r=e.sent,a=r.getViewport({scale:this.scale}),(n=document.createElement("div")).className="pdf-page",n.dataset.pageNumber=t.toString(),n.id="pdf-page-".concat(t),n.style.cssText="margin:0 auto 20px auto; background-color:white; position:relative; box-shadow: 0 2px 8px rgba(0,0,0,0.1);",(i=document.createElement("canvas")).className="udv-pdf-canvas",i.width=a.width,i.height=a.height,s=i.getContext("2d")){e.next=28;break}throw new Error("Canvas context oluşturulamadı");case 28:n.appendChild(i),e.prev=29,this.pdfContainer.appendChild(n),e.next=37;break;case 33:throw e.prev=33,e.t0=e.catch(29),console.error("Sayfa ".concat(t," DOM'a eklenirken hata:"),e.t0),e.t0;case 37:return this.pageCanvases.set(t,{container:n,canvas:i,ctx:s}),o={canvasContext:s,viewport:a},e.prev=39,e.next=42,r.render(o).promise;case 42:return e.abrupt("return",n);case 45:throw e.prev=45,e.t1=e.catch(39),console.error("Sayfa ".concat(t," render işlemi başarısız:"),e.t1),e.t1;case 49:e.next=55;break;case 51:throw e.prev=51,e.t2=e.catch(0),console.error("Sayfa ".concat(t," işlenirken hata:"),e.t2),e.t2;case 55:case"end":return e.stop()}}),e,this,[[0,51],[29,33],[39,45]])}))),function(e){return u.apply(this,arguments)})},{key:"goToPage",value:(h=S(w().mark((function e(t){var r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t<1||t>this.pageCount)){e.next=2;break}return e.abrupt("return",Promise.resolve(this.currentPage));case 2:return(r=this.pdfContainer.querySelector("#pdf-page-".concat(t)))&&(r.scrollIntoView({behavior:"smooth",block:"start"}),this.currentPage=t),e.abrupt("return",Promise.resolve(t));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"nextPage",value:(l=S(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.currentPage<this.pageCount)){e.next=2;break}return e.abrupt("return",this.goToPage(this.currentPage+1));case 2:return e.abrupt("return",Promise.resolve(this.currentPage));case 3:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"previousPage",value:(c=S(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.currentPage>1)){e.next=2;break}return e.abrupt("return",this.goToPage(this.currentPage-1));case 2:return e.abrupt("return",Promise.resolve(this.currentPage));case 3:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"getCurrentPageFromScroll",value:(o=S(w().mark((function e(){var t,r,a,n,i,s,o,c,l,h,u,d;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.pdfContainer&&this.pageCanvases&&0!==this.pageCanvases.size){e.next=2;break}return e.abrupt("return",Promise.resolve(this.currentPage));case 2:for(t=this.pdfContainer.getBoundingClientRect(),r=this.pdfContainer.scrollTop,a=this.pdfContainer.clientHeight,n=r+a/2,i=1,s=Number.MAX_VALUE,o=1;o<=this.pageCount;o++)(c=this.pdfContainer.querySelector("#pdf-page-".concat(o)))&&(l=c.getBoundingClientRect(),h=l.top-t.top+r,u=h+l.height/2,(d=Math.abs(n-u))<s&&(s=d,i=o));return i!==this.currentPage&&(this.currentPage=i),e.abrupt("return",Promise.resolve(this.currentPage));case 11:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"_applyZoom",value:function(){var e=this,t=Date.now();return this._lastZoomTime&&t-this._lastZoomTime<100?(clearTimeout(this._zoomTimeoutId),this._zoomTimeoutId=setTimeout((function(){return e._applyZoomImpl()}),50),Promise.resolve(this.zoomLevel)):(this._lastZoomTime=t,this._applyZoomImpl())}},{key:"_applyZoomImpl",value:function(){var e=this,t=this.pdfContainer;if(!t||!this.pdf||0===this.pageCanvases.size)return Promise.resolve(this.zoomLevel);var r=t.scrollTop,a=t.scrollLeft,n=t.clientHeight,i=t.clientWidth,s=r+n/2,o=a+i/2,c=this.zoomLevel/(this.lastZoomLevel||1);this.scale=this.zoomLevel;var l=[],h=t.querySelector(".pdf-pages-wrapper");h&&(h.style.gap="".concat(20*this.scale,"px"),h.style.paddingBottom="".concat(20*this.scale,"px"));var u=new Set,d=t.getBoundingClientRect(),f=d.top,p=f+d.height,g=d.height;t.querySelectorAll(".pdf-page").forEach((function(e){var t=e.getBoundingClientRect(),r=parseInt(e.dataset.pageNumber);t.bottom>=f-g&&t.top<=p+g&&u.add(r)}));for(var m=function(){var t=e.pageCanvases.get(b);if(!t)return 1;var r=t.container,a=t.canvas;r&&a&&e.pdf.getPage(b).then((function(t){var n=t.getViewport({scale:e.scale});a.style.width="".concat(n.width,"px"),a.style.height="".concat(n.height,"px"),r.style.width="".concat(n.width,"px"),r.style.height="".concat(n.height,"px")}))},b=1;b<=this.pageCount;b++)m();var v,w=y(u);try{var A=function(){var t=v.value,r=e.pageCanvases.get(t);if(!r)return 1;var a=r.canvas,n=r.ctx;if(a&&n){var i=e.pdf.getPage(t).then((function(t){var r=t.getViewport({scale:e.scale});return a.width=r.width,a.height=r.height,t.render({canvasContext:n,viewport:r,enableWebGL:!0,renderInteractiveForms:!1}).promise})).catch((function(e){console.error("Sayfa ".concat(t," zoom sırasında render edilirken hata:"),e)}));l.push(i)}};for(w.s();!(v=w.n()).done;)A()}catch(e){w.e(e)}finally{w.f()}return requestIdleCallback((function(){for(var t=function(t){if(!u.has(t)){var r=e.pageCanvases.get(t);if(!r)return 1;var a=r.canvas,n=r.ctx;a&&n&&e.pdf.getPage(t).then((function(t){var r=t.getViewport({scale:e.scale});return a.width=r.width,a.height=r.height,t.render({canvasContext:n,viewport:r,enableWebGL:!0,renderInteractiveForms:!1}).promise})).catch((function(e){console.error("Sayfa ".concat(t," arka planda render edilirken hata:"),e)}))}},r=1;r<=e.pageCount;r++)t(r)})),this.lastZoomLevel=this.zoomLevel,Promise.all(l).then((function(){var r=s*c,a=o*c;return t.scrollTop=r-n/2,t.scrollLeft=a-i/2,e.zoomLevel}))}},{key:"getCurrentPage",value:(s=S(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.currentPage);case 1:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getPageCount",value:(i=S(w().mark((function e(){return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.pageCount);case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"destroy",value:function(){console.log("PDFViewerAdapter destroy metodu çağrıldı"),this.pdf&&(console.log("PDF dokümanı serbest bırakılıyor"),this.pdf.destroy(),this.pdf=null),this.pageCanvases.clear();try{this.pdfContainer&&(console.log("PDF container içeriği temizleniyor"),this.pdfContainer.innerHTML="",this.pdfContainer.parentNode&&(console.log("PDF container DOM'dan kaldırılıyor"),this.pdfContainer.parentNode.removeChild(this.pdfContainer)))}catch(e){console.error("PDF container temizlenirken hata:",e)}var e,r,a,n,i;this.canvas=null,this.ctx=null,this.pdfContainer=null,this.pageCount=1,this._removeScrollListener(),(e=t,r="destroy",a=this,i=T(E(1&(n=3)?e.prototype:e),r,a),2&n&&"function"==typeof i?function(e){return i.apply(a,e)}:i)([]),console.log("PDFViewerAdapter destroy tamamlandı")}}],a&&x(r.prototype,a),n&&x(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,n,i,s,o,c,l,h,u,d}(g),M=__webpack_require__(710);function R(e){return/^[^"'].*\s.*[^"']$/.test(e)?`'${e}'`:e}function D(e){let t=e.lastIndexOf("/")+1;return[0==t?"":e.substring(0,t),0==t?e:e.substring(t)]}function N(e,t){try{const r="http://docx/";return new URL(e,r+t).toString().substring(r.length)}catch{return`${t}${e}`}}function L(e,t){return e.reduce(((e,r)=>(e[t(r)]=r,e)),{})}function B(e){return e&&"object"==typeof e&&!Array.isArray(e)}function j(e,...t){if(!t.length)return e;const r=t.shift();if(B(e)&&B(r))for(const t in r)if(B(r[t])){j(e[t]??(e[t]={}),r[t])}else e[t]=r[t];return j(e,...t)}function U(e){return Array.isArray(e)?e:[e]}!function(e){e.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",e.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",e.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",e.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",e.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",e.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",e.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",e.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",e.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",e.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",e.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",e.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",e.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",e.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",e.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",e.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",e.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",e.Comments="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",e.CommentsExtended="http://schemas.microsoft.com/office/2011/relationships/commentsExtended",e.AltChunk="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk"}(P||(P={}));const z="http://schemas.openxmlformats.org/wordprocessingml/2006/main",H={mul:.05,unit:"pt"},X={mul:1/12700,unit:"pt"},W={mul:.5,unit:"pt"},G={mul:.125,unit:"pt",min:.25,max:12},q={mul:1,unit:"pt"},V={mul:.02,unit:"%"};function K(e,t=H){if(null==e||/.+(p[xt]|[%])$/.test(e))return e;var r=parseInt(e)*t.mul;return t.min&&t.max&&(r=function(e,t,r){return t>e?t:r<e?r:e}(r,t.min,t.max)),`${r.toFixed(2)}${t.unit}`}function Y(e,t,r){if(e.namespaceURI!=z)return!1;switch(e.localName){case"color":t.color=r.attr(e,"val");break;case"sz":t.fontSize=r.lengthAttr(e,"val",W);break;default:return!1}return!0}class Z{elements(e,t=null){const r=[];for(let a=0,n=e.childNodes.length;a<n;a++){let n=e.childNodes.item(a);1!=n.nodeType||null!=t&&n.localName!=t||r.push(n)}return r}element(e,t){for(let r=0,a=e.childNodes.length;r<a;r++){let a=e.childNodes.item(r);if(1==a.nodeType&&a.localName==t)return a}return null}elementAttr(e,t,r){var a=this.element(e,t);return a?this.attr(a,r):void 0}attrs(e){return Array.from(e.attributes)}attr(e,t){for(let r=0,a=e.attributes.length;r<a;r++){let a=e.attributes.item(r);if(a.localName==t)return a.value}return null}intAttr(e,t,r=null){var a=this.attr(e,t);return a?parseInt(a):r}hexAttr(e,t,r=null){var a=this.attr(e,t);return a?parseInt(a,16):r}floatAttr(e,t,r=null){var a=this.attr(e,t);return a?parseFloat(a):r}boolAttr(e,t,r=null){return function(e,t=!1){switch(e){case"1":case"on":case"true":return!0;case"0":case"off":case"false":return!1;default:return t}}(this.attr(e,t),r)}lengthAttr(e,t,r=H){return K(this.attr(e,t),r)}}const J=new Z;class Q{constructor(e,t){this._package=e,this.path=t}async load(){this.rels=await this._package.loadRelationships(this.path);const e=await this._package.load(this.path),t=this._package.parseXmlDocument(e);this._package.options.keepOrigin&&(this._xmlDocument=t),this.parseXml(t.firstElementChild)}save(){var e;this._package.update(this.path,(e=this._xmlDocument,(new XMLSerializer).serializeToString(e)))}parseXml(e){}}const ee={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function te(e,t){return t.elements(e).map((e=>function(e,t){let r={name:t.attr(e,"name"),embedFontRefs:[]};for(let a of t.elements(e))switch(a.localName){case"family":r.family=t.attr(a,"val");break;case"altName":r.altName=t.attr(a,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":r.embedFontRefs.push(re(a,t))}return r}(e,t)))}function re(e,t){return{id:t.attr(e,"id"),key:t.attr(e,"fontKey"),type:ee[e.localName]}}class ae extends Q{parseXml(e){this.fonts=te(e,this._package.xmlParser)}}class ne{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new Z}get(e){const t=function(e){return e.startsWith("/")?e.substr(1):e}(e);return this._zip.files[t]??this._zip.files[t.replace(/\//g,"\\")]}update(e,t){this._zip.file(e,t)}static async load(e,t){const r=await M.loadAsync(e);return new ne(r,t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){return this.get(e)?.async(t)??Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(null!=e){const[r,a]=D(e);t=`${r}_rels/${a}.rels`}const r=await this.load(t);return r?(a=this.parseXmlDocument(r).firstElementChild,(n=this.xmlParser).elements(a).map((e=>({id:n.attr(e,"Id"),type:n.attr(e,"Type"),target:n.attr(e,"Target"),targetMode:n.attr(e,"TargetMode")})))):null;var a,n}parseXmlDocument(e){return function(e,t=!1){var r;t&&(e=e.replace(/<[?].*[?]>/,"")),e=65279===(r=e).charCodeAt(0)?r.substring(1):r;const a=(new DOMParser).parseFromString(e,"application/xml"),n=(i=a,i.getElementsByTagName("parsererror")[0]?.textContent);var i;if(n)throw new Error(n);return a}(e,this.options.trimXmlDeclaration)}}class ie extends Q{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function se(e,t){return{type:t.attr(e,"val"),color:t.attr(e,"color"),size:t.lengthAttr(e,"sz",G),offset:t.lengthAttr(e,"space",q),frame:t.boolAttr(e,"frame"),shadow:t.boolAttr(e,"shadow")}}function oe(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"left":r.left=se(a,t);break;case"top":r.top=se(a,t);break;case"right":r.right=se(a,t);break;case"bottom":r.bottom=se(a,t)}return r}var ce,le;function he(e,t=J){var r={};for(let a of t.elements(e))switch(a.localName){case"pgSz":r.pageSize={width:t.lengthAttr(a,"w"),height:t.lengthAttr(a,"h"),orientation:t.attr(a,"orient")};break;case"type":r.type=t.attr(a,"val");break;case"pgMar":r.pageMargins={left:t.lengthAttr(a,"left"),right:t.lengthAttr(a,"right"),top:t.lengthAttr(a,"top"),bottom:t.lengthAttr(a,"bottom"),header:t.lengthAttr(a,"header"),footer:t.lengthAttr(a,"footer"),gutter:t.lengthAttr(a,"gutter")};break;case"cols":r.columns=ue(a,t);break;case"headerReference":(r.headerRefs??(r.headerRefs=[])).push(fe(a,t));break;case"footerReference":(r.footerRefs??(r.footerRefs=[])).push(fe(a,t));break;case"titlePg":r.titlePage=t.boolAttr(a,"val",!0);break;case"pgBorders":r.pageBorders=oe(a,t);break;case"pgNumType":r.pageNumber=de(a,t)}return r}function ue(e,t){return{numberOfColumns:t.intAttr(e,"num"),space:t.lengthAttr(e,"space"),separator:t.boolAttr(e,"sep"),equalWidth:t.boolAttr(e,"equalWidth",!0),columns:t.elements(e,"col").map((e=>({width:t.lengthAttr(e,"w"),space:t.lengthAttr(e,"space")})))}}function de(e,t){return{chapSep:t.attr(e,"chapSep"),chapStyle:t.attr(e,"chapStyle"),format:t.attr(e,"fmt"),start:t.intAttr(e,"start")}}function fe(e,t){return{id:t.attr(e,"id"),type:t.attr(e,"type")}}function pe(e,t){let r={};for(let a of t.elements(e))ge(a,r,t);return r}function ge(e,t,r){return!!Y(e,t,r)}function me(e,t){let r={};for(let a of t.elements(e))be(a,r,t);return r}function be(e,t,r){if(e.namespaceURI!=z)return!1;if(Y(e,t,r))return!0;switch(e.localName){case"tabs":t.tabs=function(e,t){return t.elements(e,"tab").map((e=>({position:t.lengthAttr(e,"pos"),leader:t.attr(e,"leader"),style:t.attr(e,"val")})))}(e,r);break;case"sectPr":t.sectionProps=he(e,r);break;case"numPr":t.numbering=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"numId":r.id=t.attr(a,"val");break;case"ilvl":r.level=t.intAttr(a,"val")}return r}(e,r);break;case"spacing":return t.lineSpacing=function(e,t){return{before:t.lengthAttr(e,"before"),after:t.lengthAttr(e,"after"),line:t.intAttr(e,"line"),lineRule:t.attr(e,"lineRule")}}(e,r),!1;case"textAlignment":return t.textAlignment=r.attr(e,"val"),!1;case"keepLines":t.keepLines=r.boolAttr(e,"val",!0);break;case"keepNext":t.keepNext=r.boolAttr(e,"val",!0);break;case"pageBreakBefore":t.pageBreakBefore=r.boolAttr(e,"val",!0);break;case"outlineLvl":t.outlineLevel=r.intAttr(e,"val");break;case"pStyle":t.styleName=r.attr(e,"val");break;case"rPr":t.runProps=pe(e,r);break;default:return!1}return!0}function ye(e,t){let r={id:t.attr(e,"numId"),overrides:[]};for(let a of t.elements(e))switch(a.localName){case"abstractNumId":r.abstractId=t.attr(a,"val");break;case"lvlOverride":r.overrides.push(Ae(a,t))}return r}function ve(e,t){let r={id:t.attr(e,"abstractNumId"),levels:[]};for(let a of t.elements(e))switch(a.localName){case"name":r.name=t.attr(a,"val");break;case"multiLevelType":r.multiLevelType=t.attr(a,"val");break;case"numStyleLink":r.numberingStyleLink=t.attr(a,"val");break;case"styleLink":r.styleLink=t.attr(a,"val");break;case"lvl":r.levels.push(we(a,t))}return r}function we(e,t){let r={level:t.intAttr(e,"ilvl")};for(let a of t.elements(e))switch(a.localName){case"start":r.start=t.attr(a,"val");break;case"lvlRestart":r.restart=t.intAttr(a,"val");break;case"numFmt":r.format=t.attr(a,"val");break;case"lvlText":r.text=t.attr(a,"val");break;case"lvlJc":r.justification=t.attr(a,"val");break;case"lvlPicBulletId":r.bulletPictureId=t.attr(a,"val");break;case"pStyle":r.paragraphStyle=t.attr(a,"val");break;case"pPr":r.paragraphProps=me(a,t);break;case"rPr":r.runProps=pe(a,t)}return r}function Ae(e,t){let r={level:t.intAttr(e,"ilvl")};for(let a of t.elements(e))switch(a.localName){case"startOverride":r.start=t.intAttr(a,"val");break;case"lvl":r.numberingLevel=we(a,t)}return r}function Se(e,t){var r=t.element(e,"pict"),a=r&&t.element(r,"shape"),n=a&&t.element(a,"imagedata");return n?{id:t.attr(e,"numPicBulletId"),referenceId:t.attr(n,"id"),style:t.attr(a,"style")}:null}!function(e){e.Continuous="continuous",e.NextPage="nextPage",e.NextColumn="nextColumn",e.EvenPage="evenPage",e.OddPage="oddPage"}(ce||(ce={}));class xe extends Q{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,function(e,t){let r={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let a of t.elements(e))switch(a.localName){case"num":r.numberings.push(ye(a,t));break;case"abstractNum":r.abstractNumberings.push(ve(a,t));break;case"numPicBullet":r.bulletPictures.push(Se(a,t))}return r}(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class ke extends Q{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}!function(e){e.Document="document",e.Paragraph="paragraph",e.Run="run",e.Break="break",e.NoBreakHyphen="noBreakHyphen",e.Table="table",e.Row="row",e.Cell="cell",e.Hyperlink="hyperlink",e.SmartTag="smartTag",e.Drawing="drawing",e.Image="image",e.Text="text",e.Tab="tab",e.Symbol="symbol",e.BookmarkStart="bookmarkStart",e.BookmarkEnd="bookmarkEnd",e.Footer="footer",e.Header="header",e.FootnoteReference="footnoteReference",e.EndnoteReference="endnoteReference",e.Footnote="footnote",e.Endnote="endnote",e.SimpleField="simpleField",e.ComplexField="complexField",e.Instruction="instruction",e.VmlPicture="vmlPicture",e.MmlMath="mmlMath",e.MmlMathParagraph="mmlMathParagraph",e.MmlFraction="mmlFraction",e.MmlFunction="mmlFunction",e.MmlFunctionName="mmlFunctionName",e.MmlNumerator="mmlNumerator",e.MmlDenominator="mmlDenominator",e.MmlRadical="mmlRadical",e.MmlBase="mmlBase",e.MmlDegree="mmlDegree",e.MmlSuperscript="mmlSuperscript",e.MmlSubscript="mmlSubscript",e.MmlPreSubSuper="mmlPreSubSuper",e.MmlSubArgument="mmlSubArgument",e.MmlSuperArgument="mmlSuperArgument",e.MmlNary="mmlNary",e.MmlDelimiter="mmlDelimiter",e.MmlRun="mmlRun",e.MmlEquationArray="mmlEquationArray",e.MmlLimit="mmlLimit",e.MmlLimitLower="mmlLimitLower",e.MmlMatrix="mmlMatrix",e.MmlMatrixRow="mmlMatrixRow",e.MmlBox="mmlBox",e.MmlBar="mmlBar",e.MmlGroupChar="mmlGroupChar",e.VmlElement="vmlElement",e.Inserted="inserted",e.Deleted="deleted",e.DeletedText="deletedText",e.Comment="comment",e.CommentReference="commentReference",e.CommentRangeStart="commentRangeStart",e.CommentRangeEnd="commentRangeEnd",e.AltChunk="altChunk"}(le||(le={}));class Ce{constructor(){this.children=[],this.cssStyle={}}}class _e extends Ce{constructor(){super(...arguments),this.type=le.Header}}class Te extends Ce{constructor(){super(...arguments),this.type=le.Footer}}class Ee extends Q{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class Oe extends Ee{createRootElement(){return new _e}}class Fe extends Ee{createRootElement(){return new Te}}function Pe(e){if(void 0!==e)return parseInt(e)}class Ie extends Q{parseXml(e){this.props=function(e,t){const r={};for(let a of t.elements(e))switch(a.localName){case"Template":r.template=a.textContent;break;case"Pages":r.pages=Pe(a.textContent);break;case"Words":r.words=Pe(a.textContent);break;case"Characters":r.characters=Pe(a.textContent);break;case"Application":r.application=a.textContent;break;case"Lines":r.lines=Pe(a.textContent);break;case"Paragraphs":r.paragraphs=Pe(a.textContent);break;case"Company":r.company=a.textContent;break;case"AppVersion":r.appVersion=a.textContent}return r}(e,this._package.xmlParser)}}class Me extends Q{parseXml(e){this.props=function(e,t){const r={};for(let a of t.elements(e))switch(a.localName){case"title":r.title=a.textContent;break;case"description":r.description=a.textContent;break;case"subject":r.subject=a.textContent;break;case"creator":r.creator=a.textContent;break;case"keywords":r.keywords=a.textContent;break;case"language":r.language=a.textContent;break;case"lastModifiedBy":r.lastModifiedBy=a.textContent;break;case"revision":a.textContent&&(r.revision=parseInt(a.textContent))}return r}(e,this._package.xmlParser)}}class Re{}function De(e,t){var r={name:t.attr(e,"name"),colors:{}};for(let i of t.elements(e)){var a=t.element(i,"srgbClr"),n=t.element(i,"sysClr");a?r.colors[i.localName]=t.attr(a,"val"):n&&(r.colors[i.localName]=t.attr(n,"lastClr"))}return r}function Ne(e,t){var r={name:t.attr(e,"name")};for(let a of t.elements(e))switch(a.localName){case"majorFont":r.majorFont=Le(a,t);break;case"minorFont":r.minorFont=Le(a,t)}return r}function Le(e,t){return{latinTypeface:t.elementAttr(e,"latin","typeface"),eaTypeface:t.elementAttr(e,"ea","typeface"),csTypeface:t.elementAttr(e,"cs","typeface")}}class Be extends Q{constructor(e,t){super(e,t)}parseXml(e){this.theme=function(e,t){var r=new Re,a=t.element(e,"themeElements");for(let e of t.elements(a))switch(e.localName){case"clrScheme":r.colorScheme=De(e,t);break;case"fontScheme":r.fontScheme=Ne(e,t)}return r}(e,this._package.xmlParser)}}class je{}class $e extends je{constructor(){super(...arguments),this.type=le.Footnote}}class Ue extends je{constructor(){super(...arguments),this.type=le.Endnote}}class ze extends Q{constructor(e,t,r){super(e,t),this._documentParser=r}}class He extends ze{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",$e)}}class Xe extends ze{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",Ue)}}function We(e,t){var r={defaultNoteIds:[]};for(let a of t.elements(e))switch(a.localName){case"numFmt":r.nummeringFormat=t.attr(a,"val");break;case"footnote":case"endnote":r.defaultNoteIds.push(t.attr(a,"id"))}return r}class Ge extends Q{constructor(e,t){super(e,t)}parseXml(e){this.settings=function(e,t){var r={};for(let a of t.elements(e))switch(a.localName){case"defaultTabStop":r.defaultTabStop=t.lengthAttr(a,"val");break;case"footnotePr":r.footnoteProps=We(a,t);break;case"endnotePr":r.endnoteProps=We(a,t);break;case"autoHyphenation":r.autoHyphenation=t.boolAttr(a,"val")}return r}(e,this._package.xmlParser)}}class qe extends Q{parseXml(e){this.props=function(e,t){return t.elements(e,"property").map((e=>{const r=e.firstChild;return{formatId:t.attr(e,"fmtid"),name:t.attr(e,"name"),type:r.nodeName,value:r.textContent}}))}(e,this._package.xmlParser)}}class Ve extends Q{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.comments=this._documentParser.parseComments(e),this.commentMap=L(this.comments,(e=>e.id))}}class Ke extends Q{constructor(e,t){super(e,t),this.comments=[]}parseXml(e){const t=this._package.xmlParser;for(let r of t.elements(e,"commentEx"))this.comments.push({paraId:t.attr(r,"paraId"),paraIdParent:t.attr(r,"paraIdParent"),done:t.boolAttr(r,"done")});this.commentMap=L(this.comments,(e=>e.paraId))}}const Ye=[{type:P.OfficeDocument,target:"word/document.xml"},{type:P.ExtendedProperties,target:"docProps/app.xml"},{type:P.CoreProperties,target:"docProps/core.xml"},{type:P.CustomProperties,target:"docProps/custom.xml"}];class Ze{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var a=new Ze;return a._options=r,a._parser=t,a._package=await ne.load(e,r),a.rels=await a._package.loadRelationships(),await Promise.all(Ye.map((e=>{const t=a.rels.find((t=>t.type===e.type))??e;return a.loadRelationshipPart(t.target,t.type)}))),a}save(e="blob"){return this._package.save(e)}async loadRelationshipPart(e,t){if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let r=null;switch(t){case P.OfficeDocument:this.documentPart=r=new ie(this._package,e,this._parser);break;case P.FontTable:this.fontTablePart=r=new ae(this._package,e);break;case P.Numbering:this.numberingPart=r=new xe(this._package,e,this._parser);break;case P.Styles:this.stylesPart=r=new ke(this._package,e,this._parser);break;case P.Theme:this.themePart=r=new Be(this._package,e);break;case P.Footnotes:this.footnotesPart=r=new He(this._package,e,this._parser);break;case P.Endnotes:this.endnotesPart=r=new Xe(this._package,e,this._parser);break;case P.Footer:r=new Fe(this._package,e,this._parser);break;case P.Header:r=new Oe(this._package,e,this._parser);break;case P.CoreProperties:this.corePropsPart=r=new Me(this._package,e);break;case P.ExtendedProperties:this.extendedPropsPart=r=new Ie(this._package,e);break;case P.CustomProperties:r=new qe(this._package,e);break;case P.Settings:this.settingsPart=r=new Ge(this._package,e);break;case P.Comments:this.commentsPart=r=new Ve(this._package,e,this._parser);break;case P.CommentsExtended:this.commentsExtendedPart=r=new Ke(this._package,e)}if(null==r)return Promise.resolve(null);if(this.partsMap[e]=r,this.parts.push(r),await r.load(),r.rels?.length>0){const[e]=D(r.path);await Promise.all(r.rels.map((t=>this.loadRelationshipPart(N(t.target,e),t.type))))}return r}async loadDocumentImage(e,t){const r=await this.loadResource(t??this.documentPart,e,"blob");return this.blobToURL(r)}async loadNumberingImage(e){const t=await this.loadResource(this.numberingPart,e,"blob");return this.blobToURL(t)}async loadFont(e,t){const r=await this.loadResource(this.fontTablePart,e,"uint8array");return r?this.blobToURL(new Blob([Je(r,t)])):r}async loadAltChunk(e,t){return await this.loadResource(t??this.documentPart,e,"string")}blobToURL(e){return e?this._options.useBase64URL?function(e){return new Promise(((t,r)=>{const a=new FileReader;a.onloadend=()=>t(a.result),a.onerror=()=>r(),a.readAsDataURL(e)}))}(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var r=(t.rels??this.rels).find((t=>t.id==e));const a=t?D(t.path)[0]:"";return r?this.partsMap[N(r.target,a)]:null}getPathById(e,t){const r=e.rels.find((e=>e.id==t)),[a]=D(e.path);return r?N(r.target,a):null}loadResource(e,t,r){const a=this.getPathById(e,t);return a?this._package.load(a,r):Promise.resolve(null)}}function Je(e,t){const r=t.replace(/{|}|-/g,""),a=new Array(16);for(let e=0;e<16;e++)a[16-e-1]=parseInt(r.substr(2*e,2),16);for(let t=0;t<32;t++)e[t]=e[t]^a[t%16];return e}function Qe(e,t){return{type:le.BookmarkEnd,id:t.attr(e,"id")}}class et extends Ce{constructor(){super(...arguments),this.type=le.VmlElement,this.attrs={}}}function tt(e,t){var r=new et;switch(e.localName){case"rect":r.tagName="rect",Object.assign(r.attrs,{width:"100%",height:"100%"});break;case"oval":r.tagName="ellipse",Object.assign(r.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":r.tagName="line";break;case"shape":r.tagName="g";break;case"textbox":r.tagName="foreignObject",Object.assign(r.attrs,{width:"100%",height:"100%"});break;default:return null}for(const t of J.attrs(e))switch(t.localName){case"style":r.cssStyleText=t.value;break;case"fillcolor":r.attrs.fill=t.value;break;case"from":const[e,a]=at(t.value);Object.assign(r.attrs,{x1:e,y1:a});break;case"to":const[n,i]=at(t.value);Object.assign(r.attrs,{x2:n,y2:i})}for(const a of J.elements(e))switch(a.localName){case"stroke":Object.assign(r.attrs,rt(a));break;case"fill":Object.assign(r.attrs,{});break;case"imagedata":r.tagName="image",Object.assign(r.attrs,{width:"100%",height:"100%"}),r.imageHref={id:J.attr(a,"id"),title:J.attr(a,"title")};break;case"txbxContent":r.children.push(...t.parseBodyElements(a));break;default:const e=tt(a,t);e&&r.children.push(e)}return r}function rt(e){return{stroke:J.attr(e,"color"),"stroke-width":J.lengthAttr(e,"weight",X)??"1px"}}function at(e){return e.split(",")}class nt extends Ce{constructor(){super(...arguments),this.type=le.Comment}}class it extends Ce{constructor(e){super(),this.id=e,this.type=le.CommentReference}}class st extends Ce{constructor(e){super(),this.id=e,this.type=le.CommentRangeStart}}class ot extends Ce{constructor(e){super(),this.id=e,this.type=le.CommentRangeEnd}}var ct="inherit",lt="black",ht="black",ut="transparent";const dt=[],ft={oMath:le.MmlMath,oMathPara:le.MmlMathParagraph,f:le.MmlFraction,func:le.MmlFunction,fName:le.MmlFunctionName,num:le.MmlNumerator,den:le.MmlDenominator,rad:le.MmlRadical,deg:le.MmlDegree,e:le.MmlBase,sSup:le.MmlSuperscript,sSub:le.MmlSubscript,sPre:le.MmlPreSubSuper,sup:le.MmlSuperArgument,sub:le.MmlSubArgument,d:le.MmlDelimiter,nary:le.MmlNary,eqArr:le.MmlEquationArray,lim:le.MmlLimit,limLow:le.MmlLimitLower,m:le.MmlMatrix,mr:le.MmlMatrixRow,box:le.MmlBox,bar:le.MmlBar,groupChr:le.MmlGroupChar};class pt{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,r){var a=[];for(let n of J.elements(e,t)){const e=new r;e.id=J.attr(n,"id"),e.noteType=J.attr(n,"type"),e.children=this.parseBodyElements(n),a.push(e)}return a}parseComments(e){var t=[];for(let r of J.elements(e,"comment")){const e=new nt;e.id=J.attr(r,"id"),e.author=J.attr(r,"author"),e.initials=J.attr(r,"initials"),e.date=J.attr(r,"date"),e.children=this.parseBodyElements(r),t.push(e)}return t}parseDocumentFile(e){var t=J.element(e,"body"),r=J.element(e,"background"),a=J.element(t,"sectPr");return{type:le.Document,children:this.parseBodyElements(t),props:a?he(a,J):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=mt.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(let r of J.elements(e))switch(r.localName){case"p":t.push(this.parseParagraph(r));break;case"altChunk":t.push(this.parseAltChunk(r));break;case"tbl":t.push(this.parseTable(r));break;case"sdt":t.push(...this.parseSdt(r,(e=>this.parseBodyElements(e))))}return t}parseStylesFile(e){var t=[];return mt.foreach(e,(e=>{switch(e.localName){case"style":t.push(this.parseStyle(e));break;case"docDefaults":t.push(this.parseDefaultStyles(e))}})),t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};return mt.foreach(e,(e=>{switch(e.localName){case"rPrDefault":var r=J.element(e,"rPr");r&&t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})});break;case"pPrDefault":var a=J.element(e,"pPr");a&&t.styles.push({target:"p",values:this.parseDefaultProperties(a,{})})}})),t}parseStyle(e){var t={id:J.attr(e,"styleId"),isDefault:J.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(J.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span"}return mt.foreach(e,(e=>{switch(e.localName){case"basedOn":t.basedOn=J.attr(e,"val");break;case"name":t.name=J.attr(e,"val");break;case"link":t.linked=J.attr(e,"val");break;case"next":t.next=J.attr(e,"val");break;case"aliases":t.aliases=J.attr(e,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(e,{})}),t.paragraphProps=me(e,J);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(e,{})}),t.runProps=pe(e,J);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(e,{})});break;case"tblStylePr":for(let r of this.parseTableStyle(e))t.styles.push(r);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${e.localName}`)}})),t}parseTableStyle(e){var t=[],r=J.attr(e,"type"),a="",n="";switch(r){case"firstRow":n=".first-row",a="tr.first-row td";break;case"lastRow":n=".last-row",a="tr.last-row td";break;case"firstCol":n=".first-col",a="td.first-col";break;case"lastCol":n=".last-col",a="td.last-col";break;case"band1Vert":n=":not(.no-vband)",a="td.odd-col";break;case"band2Vert":n=":not(.no-vband)",a="td.even-col";break;case"band1Horz":n=":not(.no-hband)",a="tr.odd-row";break;case"band2Horz":n=":not(.no-hband)",a="tr.even-row";break;default:return[]}return mt.foreach(e,(e=>{switch(e.localName){case"pPr":t.push({target:`${a} p`,mod:n,values:this.parseDefaultProperties(e,{})});break;case"rPr":t.push({target:`${a} span`,mod:n,values:this.parseDefaultProperties(e,{})});break;case"tblPr":case"tcPr":t.push({target:a,mod:n,values:this.parseDefaultProperties(e,{})})}})),t}parseNumberingFile(e){var t=[],r={},a=[];return mt.foreach(e,(e=>{switch(e.localName){case"abstractNum":this.parseAbstractNumbering(e,a).forEach((e=>t.push(e)));break;case"numPicBullet":a.push(this.parseNumberingPicBullet(e));break;case"num":var n=J.attr(e,"numId"),i=J.elementAttr(e,"abstractNumId","val");r[i]=n}})),t.forEach((e=>e.id=r[e.id])),t}parseNumberingPicBullet(e){var t=J.element(e,"pict"),r=t&&J.element(t,"shape"),a=r&&J.element(r,"imagedata");return a?{id:J.intAttr(e,"numPicBulletId"),src:J.attr(a,"id"),style:J.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],a=J.attr(e,"abstractNumId");return mt.foreach(e,(e=>{if("lvl"===e.localName)r.push(this.parseNumberingLevel(a,e,t))})),r}parseNumberingLevel(e,t,r){var a={id:e,level:J.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return mt.foreach(t,(e=>{switch(e.localName){case"start":a.start=J.intAttr(e,"val");break;case"pPr":this.parseDefaultProperties(e,a.pStyle);break;case"rPr":this.parseDefaultProperties(e,a.rStyle);break;case"lvlPicBulletId":var t=J.intAttr(e,"val");a.bullet=r.find((e=>e?.id==t));break;case"lvlText":a.levelText=J.attr(e,"val");break;case"pStyle":a.pStyleName=J.attr(e,"val");break;case"numFmt":a.format=J.attr(e,"val");break;case"suff":a.suff=J.attr(e,"val")}})),a}parseSdt(e,t){const r=J.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){return{type:le.Inserted,children:t(e)?.children??[]}}parseDeleted(e,t){return{type:le.Deleted,children:t(e)?.children??[]}}parseAltChunk(e){return{type:le.AltChunk,children:[],id:J.attr(e,"id")}}parseParagraph(e){var t,r,a={type:le.Paragraph,children:[]};for(let n of J.elements(e))switch(n.localName){case"pPr":this.parseParagraphProperties(n,a);break;case"r":a.children.push(this.parseRun(n,a));break;case"hyperlink":a.children.push(this.parseHyperlink(n,a));break;case"smartTag":a.children.push(this.parseSmartTag(n,a));break;case"bookmarkStart":a.children.push((t=n,r=J,{type:le.BookmarkStart,id:r.attr(t,"id"),name:r.attr(t,"name"),colFirst:r.intAttr(t,"colFirst"),colLast:r.intAttr(t,"colLast")}));break;case"bookmarkEnd":a.children.push(Qe(n,J));break;case"commentRangeStart":a.children.push(new st(J.attr(n,"id")));break;case"commentRangeEnd":a.children.push(new ot(J.attr(n,"id")));break;case"oMath":case"oMathPara":a.children.push(this.parseMathElement(n));break;case"sdt":a.children.push(...this.parseSdt(n,(e=>this.parseParagraph(e).children)));break;case"ins":a.children.push(this.parseInserted(n,(e=>this.parseParagraph(e))));break;case"del":a.children.push(this.parseDeleted(n,(e=>this.parseParagraph(e))))}return a}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,(e=>{if(be(e,t,J))return!0;switch(e.localName){case"pStyle":t.styleName=J.attr(e,"val");break;case"cnfStyle":t.className=bt.classNameOfCnfStyle(e);break;case"framePr":this.parseFrame(e,t);break;case"rPr":break;default:return!1}return!0}))}parseFrame(e,t){"drop"==J.attr(e,"dropCap")&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:le.Hyperlink,parent:t,children:[]};return r.anchor=J.attr(e,"anchor"),r.id=J.attr(e,"id"),mt.foreach(e,(e=>{if("r"===e.localName)r.children.push(this.parseRun(e,r))})),r}parseSmartTag(e,t){var r={type:le.SmartTag,parent:t,children:[]},a=J.attr(e,"uri"),n=J.attr(e,"element");return a&&(r.uri=a),n&&(r.element=n),mt.foreach(e,(e=>{if("r"===e.localName)r.children.push(this.parseRun(e,r))})),r}parseRun(e,t){var r={type:le.Run,parent:t,children:[]};return mt.foreach(e,(e=>{switch((e=this.checkAlternateContent(e)).localName){case"t":r.children.push({type:le.Text,text:e.textContent});break;case"delText":r.children.push({type:le.DeletedText,text:e.textContent});break;case"commentReference":r.children.push(new it(J.attr(e,"id")));break;case"fldSimple":r.children.push({type:le.SimpleField,instruction:J.attr(e,"instr"),lock:J.boolAttr(e,"lock",!1),dirty:J.boolAttr(e,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:le.Instruction,text:e.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:le.ComplexField,charType:J.attr(e,"fldCharType"),lock:J.boolAttr(e,"lock",!1),dirty:J.boolAttr(e,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:le.NoBreakHyphen});break;case"br":r.children.push({type:le.Break,break:J.attr(e,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:le.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:le.Symbol,font:R(J.attr(e,"font")),char:J.attr(e,"char")});break;case"tab":r.children.push({type:le.Tab});break;case"footnoteReference":r.children.push({type:le.FootnoteReference,id:J.attr(e,"id")});break;case"endnoteReference":r.children.push({type:le.EndnoteReference,id:J.attr(e,"id")});break;case"drawing":let t=this.parseDrawing(e);t&&(r.children=[t]);break;case"pict":r.children.push(this.parseVmlPicture(e));break;case"rPr":this.parseRunProperties(e,r)}})),r}parseMathElement(e){const t=`${e.localName}Pr`,r={type:ft[e.localName],children:[]};for(const n of J.elements(e)){if(ft[n.localName])r.children.push(this.parseMathElement(n));else if("r"==n.localName){var a=this.parseRun(n);a.type=le.MmlRun,r.children.push(a)}else n.localName==t&&(r.props=this.parseMathProperies(n))}return r}parseMathProperies(e){const t={};for(const r of J.elements(e))switch(r.localName){case"chr":t.char=J.attr(r,"val");break;case"vertJc":t.verticalJustification=J.attr(r,"val");break;case"pos":t.position=J.attr(r,"val");break;case"degHide":t.hideDegree=J.boolAttr(r,"val");break;case"begChr":t.beginChar=J.attr(r,"val");break;case"endChr":t.endChar=J.attr(r,"val")}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,(e=>{switch(e.localName){case"rStyle":t.styleName=J.attr(e,"val");break;case"vertAlign":t.verticalAlign=bt.valueOfVertAlign(e,!0);break;default:return!1}return!0}))}parseVmlPicture(e){const t={type:le.VmlPicture,children:[]};for(const r of J.elements(e)){const e=tt(r,this);e&&t.children.push(e)}return t}checkAlternateContent(e){if("AlternateContent"!=e.localName)return e;var t=J.element(e,"Choice");if(t){var r=J.attr(t,"Requires"),a=e.lookupNamespaceURI(r);if(dt.includes(a))return t.firstElementChild}return J.element(e,"Fallback")?.firstElementChild}parseDrawing(e){for(var t of J.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:le.Drawing,children:[],cssStyle:{}},r="anchor"==e.localName;let a=null,n=J.boolAttr(e,"simplePos");J.boolAttr(e,"behindDoc");let i={relative:"page",align:"left",offset:"0"},s={relative:"page",align:"top",offset:"0"};for(var o of J.elements(e))switch(o.localName){case"simplePos":n&&(i.offset=J.lengthAttr(o,"x",X),s.offset=J.lengthAttr(o,"y",X));break;case"extent":t.cssStyle.width=J.lengthAttr(o,"cx",X),t.cssStyle.height=J.lengthAttr(o,"cy",X);break;case"positionH":case"positionV":if(!n){let e="positionH"==o.localName?i:s;var c=J.element(o,"align"),l=J.element(o,"posOffset");e.relative=J.attr(o,"relativeFrom")??e.relative,c&&(e.align=c.textContent),l&&(e.offset=mt.sizeValue(l,X))}break;case"wrapTopAndBottom":a="wrapTopAndBottom";break;case"wrapNone":a="wrapNone";break;case"graphic":var h=this.parseGraphic(o);h&&t.children.push(h)}return"wrapTopAndBottom"==a?(t.cssStyle.display="block",i.align&&(t.cssStyle["text-align"]=i.align,t.cssStyle.width="100%")):"wrapNone"==a?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",i.offset&&(t.cssStyle.left=i.offset),s.offset&&(t.cssStyle.top=s.offset)):!r||"left"!=i.align&&"right"!=i.align||(t.cssStyle.float=i.align),t}parseGraphic(e){var t=J.element(e,"graphicData");for(let e of J.elements(t))if("pic"===e.localName)return this.parsePicture(e);return null}parsePicture(e){var t={type:le.Image,src:"",cssStyle:{}},r=J.element(e,"blipFill"),a=J.element(r,"blip");t.src=J.attr(a,"embed");var n=J.element(e,"spPr"),i=J.element(n,"xfrm");for(var s of(t.cssStyle.position="relative",J.elements(i)))switch(s.localName){case"ext":t.cssStyle.width=J.lengthAttr(s,"cx",X),t.cssStyle.height=J.lengthAttr(s,"cy",X);break;case"off":t.cssStyle.left=J.lengthAttr(s,"x",X),t.cssStyle.top=J.lengthAttr(s,"y",X)}return t}parseTable(e){var t={type:le.Table,children:[]};return mt.foreach(e,(e=>{switch(e.localName){case"tr":t.children.push(this.parseTableRow(e));break;case"tblGrid":t.columns=this.parseTableColumns(e);break;case"tblPr":this.parseTableProperties(e,t)}})),t}parseTableColumns(e){var t=[];return mt.foreach(e,(e=>{if("gridCol"===e.localName)t.push({width:J.lengthAttr(e,"w")})})),t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,(e=>{switch(e.localName){case"tblStyle":t.styleName=J.attr(e,"val");break;case"tblLook":t.className=bt.classNameOftblLook(e);break;case"tblpPr":this.parseTablePosition(e,t);break;case"tblStyleColBandSize":t.colBandSize=J.intAttr(e,"val");break;case"tblStyleRowBandSize":t.rowBandSize=J.intAttr(e,"val");break;default:return!1}return!0})),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto"}}parseTablePosition(e,t){var r=J.lengthAttr(e,"topFromText"),a=J.lengthAttr(e,"bottomFromText"),n=J.lengthAttr(e,"rightFromText"),i=J.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=bt.addSize(t.cssStyle["margin-bottom"],a),t.cssStyle["margin-left"]=bt.addSize(t.cssStyle["margin-left"],i),t.cssStyle["margin-right"]=bt.addSize(t.cssStyle["margin-right"],n),t.cssStyle["margin-top"]=bt.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:le.Row,children:[]};return mt.foreach(e,(e=>{switch(e.localName){case"tc":t.children.push(this.parseTableCell(e));break;case"trPr":this.parseTableRowProperties(e,t)}})),t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,(e=>{switch(e.localName){case"cnfStyle":t.className=bt.classNameOfCnfStyle(e);break;case"tblHeader":t.isHeader=J.boolAttr(e,"val");break;default:return!1}return!0}))}parseTableCell(e){var t={type:le.Cell,children:[]};return mt.foreach(e,(e=>{switch(e.localName){case"tbl":t.children.push(this.parseTable(e));break;case"p":t.children.push(this.parseParagraph(e));break;case"tcPr":this.parseTableCellProperties(e,t)}})),t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,(e=>{switch(e.localName){case"gridSpan":t.span=J.intAttr(e,"val",null);break;case"vMerge":t.verticalMerge=J.attr(e,"val")??"continue";break;case"cnfStyle":t.className=bt.classNameOfCnfStyle(e);break;default:return!1}return!0})),this.parseTableCellVerticalText(e,t)}parseTableCellVerticalText(e,t){const r={btLr:{writingMode:"vertical-rl",transform:"rotate(180deg)"},lrTb:{writingMode:"vertical-lr",transform:"none"},tbRl:{writingMode:"vertical-rl",transform:"none"}};mt.foreach(e,(e=>{if("textDirection"===e.localName){const a=J.attr(e,"val"),n=r[a]||{writingMode:"horizontal-tb"};t.cssStyle["writing-mode"]=n.writingMode,t.cssStyle.transform=n.transform}}))}parseDefaultProperties(e,t=null,r=null,a=null){return t=t||{},mt.foreach(e,(n=>{if(!a?.(n))switch(n.localName){case"jc":t["text-align"]=bt.valueOfJc(n);break;case"textAlignment":t["vertical-align"]=bt.valueOfTextAlignment(n);break;case"color":t.color=mt.colorAttr(n,"val",null,lt);break;case"sz":t["font-size"]=t["min-height"]=J.lengthAttr(n,"val",W);break;case"shd":t["background-color"]=mt.colorAttr(n,"fill",null,ct);break;case"highlight":t["background-color"]=mt.colorAttr(n,"val",null,ut);break;case"vertAlign":break;case"position":t.verticalAlign=J.lengthAttr(n,"val",W);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=bt.valueOfSize(n,"w");break;case"trHeight":this.parseTrHeight(n,t);break;case"strike":t["text-decoration"]=J.boolAttr(n,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=J.boolAttr(n,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=J.boolAttr(n,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=J.boolAttr(n,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=J.boolAttr(n,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(n,t);break;case"ind":case"tblInd":this.parseIndentation(n,t);break;case"rFonts":this.parseFont(n,t);break;case"tblBorders":this.parseBorderProperties(n,r||t);break;case"tblCellSpacing":t["border-spacing"]=bt.valueOfMargin(n),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(n,t);break;case"bdr":t.border=bt.valueOfBorder(n);break;case"tcBorders":this.parseBorderProperties(n,t);break;case"vanish":J.boolAttr(n,"val",!0)&&(t.display="none");break;case"kern":case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(n,r||t);break;case"tblLayout":t["table-layout"]=bt.valueOfTblLayout(n);break;case"vAlign":t["vertical-align"]=bt.valueOfTextAlignment(n);break;case"spacing":"pPr"==e.localName&&this.parseSpacing(n,t);break;case"wordWrap":J.boolAttr(n,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=J.boolAttr(n,"val",!0)?"none":"auto";break;case"lang":t.$lang=J.attr(n,"val");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${e.localName}.${n.localName}`)}})),t}parseUnderline(e,t){var r=J.attr(e,"val");if(null!=r){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":t["text-decoration"]="underline dotted";break;case"double":t["text-decoration"]="underline double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"none":t["text-decoration"]="none"}var a=mt.colorAttr(e,"color");a&&(t["text-decoration-color"]=a)}}parseFont(e,t){var r=[J.attr(e,"ascii"),bt.themeValue(e,"asciiTheme"),J.attr(e,"eastAsia")].filter((e=>e)).map((e=>R(e)));r.length>0&&(t["font-family"]=[...new Set(r)].join(", "))}parseIndentation(e,t){var r=J.lengthAttr(e,"firstLine"),a=J.lengthAttr(e,"hanging"),n=J.lengthAttr(e,"left"),i=J.lengthAttr(e,"start"),s=J.lengthAttr(e,"right"),o=J.lengthAttr(e,"end");r&&(t["text-indent"]=r),a&&(t["text-indent"]=`-${a}`),(n||i)&&(t["margin-left"]=n||i),(s||o)&&(t["margin-right"]=s||o)}parseSpacing(e,t){var r=J.lengthAttr(e,"before"),a=J.lengthAttr(e,"after"),n=J.intAttr(e,"line",null),i=J.attr(e,"lineRule");if(r&&(t["margin-top"]=r),a&&(t["margin-bottom"]=a),null!==n)switch(i){case"auto":t["line-height"]=`${(n/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${n/20}pt)`;break;default:t["line-height"]=t["min-height"]=n/20+"pt"}}parseMarginProperties(e,t){mt.foreach(e,(e=>{switch(e.localName){case"left":t["padding-left"]=bt.valueOfMargin(e);break;case"right":t["padding-right"]=bt.valueOfMargin(e);break;case"top":t["padding-top"]=bt.valueOfMargin(e);break;case"bottom":t["padding-bottom"]=bt.valueOfMargin(e)}}))}parseTrHeight(e,t){J.attr(e,"hRule"),t.height=J.lengthAttr(e,"val")}parseBorderProperties(e,t){mt.foreach(e,(e=>{switch(e.localName){case"start":case"left":t["border-left"]=bt.valueOfBorder(e);break;case"end":case"right":t["border-right"]=bt.valueOfBorder(e);break;case"top":t["border-top"]=bt.valueOfBorder(e);break;case"bottom":t["border-bottom"]=bt.valueOfBorder(e)}}))}}const gt=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class mt{static foreach(e,t){for(var r=0;r<e.childNodes.length;r++){let a=e.childNodes[r];a.nodeType==Node.ELEMENT_NODE&&t(a)}}static colorAttr(e,t,r=null,a="black"){var n=J.attr(e,t);if(n)return"auto"==n?a:gt.includes(n)?n:`#${n}`;var i=J.attr(e,"themeColor");return i?`var(--docx-${i}-color)`:r}static sizeValue(e,t=H){return K(e.textContent,t)}}class bt{static themeValue(e,t){var r=J.attr(e,t);return r?`var(--docx-${r}-font)`:null}static valueOfSize(e,t){var r=H;switch(J.attr(e,"type")){case"dxa":break;case"pct":r=V;break;case"auto":return"auto"}return J.lengthAttr(e,t,r)}static valueOfMargin(e){return J.lengthAttr(e,"w")}static valueOfBorder(e){if("nil"==J.attr(e,"val"))return"none";var t=mt.colorAttr(e,"color");return`${J.lengthAttr(e,"sz",G)} solid ${"auto"==t?ht:t}`}static valueOfTblLayout(e){return"fixed"==J.attr(e,"val")?"fixed":"auto"}static classNameOfCnfStyle(e){const t=J.attr(e,"val");return["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"].filter(((e,r)=>"1"==t[r])).join(" ")}static valueOfJc(e){var t=J.attr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t}static valueOfVertAlign(e,t=!1){var r=J.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=J.attr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t}static addSize(e,t){return null==e?t:null==t?e:`calc(${e} + ${t})`}static classNameOftblLook(e){const t=J.hexAttr(e,"val",0);let r="";return(J.boolAttr(e,"firstRow")||32&t)&&(r+=" first-row"),(J.boolAttr(e,"lastRow")||64&t)&&(r+=" last-row"),(J.boolAttr(e,"firstColumn")||128&t)&&(r+=" first-col"),(J.boolAttr(e,"lastColumn")||256&t)&&(r+=" last-col"),(J.boolAttr(e,"noHBand")||512&t)&&(r+=" no-hband"),(J.boolAttr(e,"noVBand")||1024&t)&&(r+=" no-vband"),r.trim()}}const yt={pos:0,leader:"none",style:"left"};function vt(e,t,r,a=.75){const n=e.closest("p"),i=e.getBoundingClientRect(),s=n.getBoundingClientRect(),o=getComputedStyle(n),c=t?.length>0?t.map((e=>({pos:wt(e.position),leader:e.leader,style:e.style}))).sort(((e,t)=>e.pos-t.pos)):[yt],l=c[c.length-1],h=s.width*a,u=wt(r);let d=l.pos+u;if(d<h)for(;d<h&&c.length<50;d+=u)c.push({...yt,pos:d});const f=parseFloat(o.marginLeft),p=s.left+f,g=(i.left-p)*a,m=c.find((e=>"clear"!=e.style&&e.pos>g));if(null==m)return;let b=1;if("right"==m.style||"center"==m.style){const t=Array.from(n.querySelectorAll(`.${e.className}`)),r=t.indexOf(e)+1,i=document.createRange();i.setStart(e,1),r<t.length?i.setEndBefore(t[r]):i.setEndAfter(n);const o="center"==m.style?.5:1,c=i.getBoundingClientRect(),l=c.left+o*c.width-(s.left-f);b=m.pos-l*a}else b=m.pos-g;switch(e.innerHTML="&nbsp;",e.style.textDecoration="inherit",e.style.wordSpacing=`${b.toFixed(0)}pt`,m.leader){case"dot":case"middleDot":e.style.textDecoration="underline",e.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":e.style.textDecoration="underline"}}function wt(e){return parseFloat(e)}const At="http://www.w3.org/2000/svg",St="http://www.w3.org/1998/Math/MathML";class xt{constructor(e){this.htmlDocument=e,this.className="docx",this.styleMap={},this.currentPart=null,this.tableVerticalMerges=[],this.currentVerticalMerge=null,this.tableCellPositions=[],this.currentCellPosition=null,this.footnoteMap={},this.endnoteMap={},this.currentEndnoteIds=[],this.usedHederFooterParts=[],this.currentTabs=[],this.commentMap={},this.tasks=[],this.postRenderTasks=[]}async render(e,t,r=null,a){this.document=e,this.options=a,this.className=a.className,this.rootSelector=a.inWrapper?`.${this.className}-wrapper`:":root",this.styleMap=null,this.tasks=[],this.options.renderComments&&globalThis.Highlight&&(this.commentHighlight=new Highlight),kt(r=r||t),kt(t),r.appendChild(this.createComment("docxjs library predefined styles")),r.appendChild(this.renderDefaultStyle()),e.themePart&&(r.appendChild(this.createComment("docxjs document theme values")),this.renderTheme(e.themePart,r)),null!=e.stylesPart&&(this.styleMap=this.processStyles(e.stylesPart.styles),r.appendChild(this.createComment("docxjs document styles")),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(this.prodessNumberings(e.numberingPart.domNumberings),r.appendChild(this.createComment("docxjs document numbering styles")),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),e.footnotesPart&&(this.footnoteMap=L(e.footnotesPart.notes,(e=>e.id))),e.endnotesPart&&(this.endnoteMap=L(e.endnotesPart.notes,(e=>e.id))),e.settingsPart&&(this.defaultTabSize=e.settingsPart.settings?.defaultTabStop),!a.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var n=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(n)):Ct(t,n),this.commentHighlight&&a.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.postRenderTasks.forEach((e=>e())),await Promise.allSettled(this.tasks),this.refreshTabStops()}renderTheme(e,t){const r={},a=e.theme?.fontScheme;a&&(a.majorFont&&(r["--docx-majorHAnsi-font"]=a.majorFont.latinTypeface),a.minorFont&&(r["--docx-minorHAnsi-font"]=a.minorFont.latinTypeface));const n=e.theme?.colorScheme;if(n)for(let[e,t]of Object.entries(n.colors))r[`--docx-${e}-color`]=`#${t}`;const i=this.styleToString(`.${this.className}`,r);t.appendChild(this.createStyleElement(i))}renderFontTable(e,t){for(let r of e.fonts)for(let e of r.embedFontRefs)this.tasks.push(this.document.loadFont(e.id,e.key).then((a=>{const n={"font-family":R(r.name),src:`url(${a})`};"bold"!=e.type&&"boldItalic"!=e.type||(n["font-weight"]="bold"),"italic"!=e.type&&"boldItalic"!=e.type||(n["font-style"]="italic");const i=this.styleToString("@font-face",n);t.appendChild(this.createComment(`docxjs ${r.name} font`)),t.appendChild(this.createStyleElement(i))})))}processStyleName(e){return e?`${this.className}_${function(e){return e?.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}(e)}`:this.className}processStyles(e){const t=L(e.filter((e=>null!=e.id)),(e=>e.id));for(const a of e.filter((e=>e.basedOn))){var r=t[a.basedOn];if(r){a.paragraphProps=j(a.paragraphProps,r.paragraphProps),a.runProps=j(a.runProps,r.runProps);for(const e of r.styles){const t=a.styles.find((t=>t.target==e.target));t?this.copyStyleProperties(e.values,t.values):a.styles.push({...e,values:{...e.values}})}}else this.options.debug&&console.warn(`Can't find base style ${a.basedOn}`)}for(let t of e)t.cssName=this.processStyleName(t.id);return t}prodessNumberings(e){for(let t of e.filter((e=>e.pStyleName))){const e=this.findStyle(t.pStyleName);e?.paragraphProps?.numbering&&(e.paragraphProps.numbering.level=t.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==le.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var r of t.children)r.cssStyle=this.copyStyleProperties(e.cellStyle,r.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(r)}copyStyleProperties(e,t,r=null){if(!e)return t;for(var a of(null==t&&(t={}),null==r&&(r=Object.getOwnPropertyNames(e)),r))e.hasOwnProperty(a)&&!t.hasOwnProperty(a)&&(t[a]=e[a]);return t}createPageElement(e,t){var r=this.createElement("section",{className:e});return t&&(t.pageMargins&&(r.style.paddingLeft=t.pageMargins.left,r.style.paddingRight=t.pageMargins.right,r.style.paddingTop=t.pageMargins.top,r.style.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(r.style.width=t.pageSize.width),this.options.ignoreHeight||(r.style.minHeight=t.pageSize.height))),r}createSectionContent(e){var t=this.createElement("article");return e.columns&&e.columns.numberOfColumns&&(t.style.columnCount=`${e.columns.numberOfColumns}`,t.style.columnGap=e.columns.space,e.columns.separator&&(t.style.columnRule="1px solid black")),t}renderSections(e){const t=[];this.processElement(e);const r=this.splitBySection(e.children,e.props),a=this.groupByPageBreaks(r);let n=null;for(let r=0,s=a.length;r<s;r++){this.currentFootnoteIds=[];let o=a[r][0].sectProps;const c=this.createPageElement(this.className,o);this.renderStyleValues(e.cssStyle,c),this.options.renderHeaders&&this.renderHeaderFooter(o.headerRefs,o,t.length,n!=o,c);for(const e of a[r]){var i=this.createSectionContent(e.sectProps);this.renderElements(e.elements,i),c.appendChild(i),o=e.sectProps}this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,c),this.options.renderEndnotes&&r==s-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,c),this.options.renderFooters&&this.renderHeaderFooter(o.footerRefs,o,t.length,n!=o,c),t.push(c),n=o}return t}renderHeaderFooter(e,t,r,a,n){if(e){var i=(t.titlePage&&a?e.find((e=>"first"==e.type)):null)??(r%2==1?e.find((e=>"even"==e.type)):null)??e.find((e=>"default"==e.type)),s=i&&this.document.findPartByRelId(i.id,this.document.documentPart);if(s){this.currentPart=s,this.usedHederFooterParts.includes(s.path)||(this.processElement(s.rootElement),this.usedHederFooterParts.push(s.path));const[e]=this.renderElements([s.rootElement],n);t?.pageMargins&&(s.rootElement.type===le.Header?(e.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,e.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):s.rootElement.type===le.Footer&&(e.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,e.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type==le.Break&&("lastRenderedPageBreak"==e.break?!this.options.ignoreLastRenderedPageBreak:"page"==e.break)}isPageBreakSection(e,t){return!!e&&(!!t&&(e.pageSize?.orientation!=t.pageSize?.orientation||e.pageSize?.width!=t.pageSize?.width||e.pageSize?.height!=t.pageSize?.height))}splitBySection(e,t){var r={sectProps:null,elements:[],pageBreak:!1},a=[r];for(let t of e){if(t.type==le.Paragraph){const e=this.findStyle(t.styleName);e?.paragraphProps?.pageBreakBefore&&(r.sectProps=n,r.pageBreak=!0,r={sectProps:null,elements:[],pageBreak:!1},a.push(r))}if(r.elements.push(t),t.type==le.Paragraph){const e=t;var n=e.sectionProps,i=-1,s=-1;if(this.options.breakPages&&e.children&&(i=e.children.findIndex((e=>-1!=(s=e.children?.findIndex(this.isPageBreakElement.bind(this))??-1)))),(n||-1!=i)&&(r.sectProps=n,r.pageBreak=-1!=i,r={sectProps:null,elements:[],pageBreak:!1},a.push(r)),-1!=i){let a=e.children[i],n=s<a.children.length-1;if(i<e.children.length-1||n){var o=t.children,c={...t,children:o.slice(i)};if(t.children=o.slice(0,i),r.elements.push(c),n){let e=a.children,r={...a,children:e.slice(0,s)};t.children.push(r),a.children=e.slice(s)}}}}}let l=null;for(let e=a.length-1;e>=0;e--)null==a[e].sectProps?a[e].sectProps=l??t:l=a[e].sectProps;return a}groupByPageBreaks(e){let t,r=[];const a=[r];for(let n of e)r.push(n),(this.options.ignoreLastRenderedPageBreak||n.pageBreak||this.isPageBreakSection(t,n.sectProps))&&a.push(r=[]),t=n.sectProps;return a.filter((e=>e.length>0))}renderWrapper(e){return this.createElement("div",{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=`\n.${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } \n.${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }`;this.options.hideWrapperOnPrint&&(t=`@media not print { ${t} }`);var r=`${t}\n.${e} { color: black; hyphens: auto; text-underline-position: from-font; }\nsection.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }\nsection.${e}>article { margin-bottom: auto; z-index: 1; }\nsection.${e}>footer { z-index: 1; }\n.${e} table { border-collapse: collapse; }\n.${e} table td, .${e} table th { vertical-align: top; }\n.${e} p { margin: 0pt; min-height: 1em; }\n.${e} span { white-space: pre-wrap; overflow-wrap: break-word; }\n.${e} a { color: inherit; text-decoration: inherit; }\n.${e} svg { fill: transparent; }\n`;return this.options.renderComments&&(r+=`\n.${e}-comment-ref { cursor: default; }\n.${e}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; }\n.${e}-comment-ref:hover~.${e}-comment-popover { display: block; }\n.${e}-comment-author,.${e}-comment-date { font-size: 0.875rem; color: #888; }\n`),this.createStyleElement(r)}renderNumbering(e,t){var r="",a=[];for(var n of e){var i=`p.${this.numberingClass(n.id,n.level)}`,s="none";if(n.bullet){let e=`--${this.className}-${n.bullet.src}`.toLowerCase();r+=this.styleToString(`${i}:before`,{content:"' '",display:"inline-block",background:`var(${e})`},n.bullet.style),this.tasks.push(this.document.loadNumberingImage(n.bullet.src).then((r=>{var a=`${this.rootSelector} { ${e}: url(${r}) }`;t.appendChild(this.createStyleElement(a))})))}else if(n.levelText){let e=this.numberingCounter(n.id,n.level);const t=e+" "+(n.start-1);n.level>0&&(r+=this.styleToString(`p.${this.numberingClass(n.id,n.level-1)}`,{"counter-set":t})),a.push(t),r+=this.styleToString(`${i}:before`,{content:this.levelTextToContent(n.levelText,n.suff,n.id,this.numFormatToCssValue(n.format)),"counter-increment":e,...n.rStyle})}else s=this.numFormatToCssValue(n.format);r+=this.styleToString(i,{display:"list-item","list-style-position":"inside","list-style-type":s,...n.pStyle})}return a.length>0&&(r+=this.styleToString(this.rootSelector,{"counter-reset":a.join(" ")})),this.createStyleElement(r)}renderStyles(e){var t="";const r=this.styleMap,a=L(e.filter((e=>e.isDefault)),(e=>e.target));for(const o of e){var n=o.styles;if(o.linked){var i=o.linked&&r[o.linked];i?n=n.concat(i.styles):this.options.debug&&console.warn(`Can't find linked style ${o.linked}`)}for(const e of n){var s=`${o.target??""}.${o.cssName}`;o.target!=e.target&&(s+=` ${e.target}`),a[o.target]==o&&(s=`.${this.className} ${o.target}, `+s),t+=this.styleToString(s,e.values)}}return this.createStyleElement(t)}renderNotes(e,t,r){var a=e.map((e=>t[e])).filter((e=>e));if(a.length>0){var n=this.createElement("ol",null,this.renderElements(a));r.appendChild(n)}}renderElement(e){switch(e.type){case le.Paragraph:return this.renderParagraph(e);case le.BookmarkStart:return this.renderBookmarkStart(e);case le.BookmarkEnd:return null;case le.Run:return this.renderRun(e);case le.Table:return this.renderTable(e);case le.Row:return this.renderTableRow(e);case le.Cell:return this.renderTableCell(e);case le.Hyperlink:return this.renderHyperlink(e);case le.SmartTag:return this.renderSmartTag(e);case le.Drawing:return this.renderDrawing(e);case le.Image:return this.renderImage(e);case le.Text:case le.Text:return this.renderText(e);case le.DeletedText:return this.renderDeletedText(e);case le.Tab:return this.renderTab(e);case le.Symbol:return this.renderSymbol(e);case le.Break:return this.renderBreak(e);case le.Footer:return this.renderContainer(e,"footer");case le.Header:return this.renderContainer(e,"header");case le.Footnote:case le.Endnote:return this.renderContainer(e,"li");case le.FootnoteReference:return this.renderFootnoteReference(e);case le.EndnoteReference:return this.renderEndnoteReference(e);case le.NoBreakHyphen:return this.createElement("wbr");case le.VmlPicture:return this.renderVmlPicture(e);case le.VmlElement:return this.renderVmlElement(e);case le.MmlMath:return this.renderContainerNS(e,St,"math",{xmlns:St});case le.MmlMathParagraph:return this.renderContainer(e,"span");case le.MmlFraction:return this.renderContainerNS(e,St,"mfrac");case le.MmlBase:return this.renderContainerNS(e,St,e.parent.type==le.MmlMatrixRow?"mtd":"mrow");case le.MmlNumerator:case le.MmlDenominator:case le.MmlFunction:case le.MmlLimit:case le.MmlBox:return this.renderContainerNS(e,St,"mrow");case le.MmlGroupChar:return this.renderMmlGroupChar(e);case le.MmlLimitLower:return this.renderContainerNS(e,St,"munder");case le.MmlMatrix:return this.renderContainerNS(e,St,"mtable");case le.MmlMatrixRow:return this.renderContainerNS(e,St,"mtr");case le.MmlRadical:return this.renderMmlRadical(e);case le.MmlSuperscript:return this.renderContainerNS(e,St,"msup");case le.MmlSubscript:return this.renderContainerNS(e,St,"msub");case le.MmlDegree:case le.MmlSuperArgument:case le.MmlSubArgument:return this.renderContainerNS(e,St,"mn");case le.MmlFunctionName:return this.renderContainerNS(e,St,"ms");case le.MmlDelimiter:return this.renderMmlDelimiter(e);case le.MmlRun:return this.renderMmlRun(e);case le.MmlNary:return this.renderMmlNary(e);case le.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case le.MmlBar:return this.renderMmlBar(e);case le.MmlEquationArray:return this.renderMllList(e);case le.Inserted:return this.renderInserted(e);case le.Deleted:return this.renderDeleted(e);case le.CommentRangeStart:return this.renderCommentRangeStart(e);case le.CommentRangeEnd:return this.renderCommentRangeEnd(e);case le.CommentReference:return this.renderCommentReference(e);case le.AltChunk:return this.renderAltChunk(e)}return null}renderElements(e,t){if(null==e)return null;var r=e.flatMap((e=>this.renderElement(e))).filter((e=>null!=e));return t&&Ct(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderElements(e.children))}renderContainerNS(e,t,r,a){return this.createElementNS(t,r,a,this.renderElements(e.children))}renderParagraph(e){var t=this.renderContainer(e,"p");const r=this.findStyle(e.styleName);e.tabs??(e.tabs=r?.paragraphProps?.tabs),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);const a=e.numbering??r?.paragraphProps?.numbering;return a&&t.classList.add(this.numberingClass(a.id,a.level)),t}renderRunProperties(e,t){this.renderCommonProperties(e,t)}renderCommonProperties(e,t){null!=t&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=t.fontSize))}renderHyperlink(e){var t=this.renderContainer(e,"a");this.renderStyleValues(e.cssStyle,t);let r="";if(e.id){const t=this.document.documentPart.rels.find((t=>t.id==e.id&&"External"===t.targetMode));r=t?.target??r}return e.anchor&&(r+=`#${e.anchor}`),t.href=r,t}renderSmartTag(e){return this.renderContainer(e,"span")}renderCommentRangeStart(e){if(!this.options.renderComments)return null;const t=new Range;this.commentHighlight?.add(t);const r=this.htmlDocument.createComment(`start of comment #${e.id}`);return this.later((()=>t.setStart(r,0))),this.commentMap[e.id]=t,r}renderCommentRangeEnd(e){if(!this.options.renderComments)return null;const t=this.commentMap[e.id],r=this.htmlDocument.createComment(`end of comment #${e.id}`);return this.later((()=>t?.setEnd(r,0))),r}renderCommentReference(e){if(!this.options.renderComments)return null;var t=this.document.commentsPart?.commentMap[e.id];if(!t)return null;const r=new DocumentFragment,a=this.createElement("span",{className:`${this.className}-comment-ref`},["💬"]),n=this.createElement("div",{className:`${this.className}-comment-popover`});return this.renderCommentContent(t,n),r.appendChild(this.htmlDocument.createComment(`comment #${t.id} by ${t.author} on ${t.date}`)),r.appendChild(a),r.appendChild(n),r}renderAltChunk(e){if(!this.options.renderAltChunks)return null;var t=this.createElement("iframe");return this.tasks.push(this.document.loadAltChunk(e.id,this.currentPart).then((e=>{t.srcdoc=e}))),t}renderCommentContent(e,t){t.appendChild(this.createElement("div",{className:`${this.className}-comment-author`},[e.author])),t.appendChild(this.createElement("div",{className:`${this.className}-comment-date`},[new Date(e.date).toLocaleString()])),this.renderElements(e.children,t)}renderDrawing(e){var t=this.renderContainer(e,"div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderStyleValues(e.cssStyle,t),t}renderImage(e){let t=this.createElement("img");return this.renderStyleValues(e.cssStyle,t),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then((e=>{t.src=e}))),t}renderText(e){return this.htmlDocument.createTextNode(e.text)}renderDeletedText(e){return this.options.renderEndnotes?this.htmlDocument.createTextNode(e.text):null}renderBreak(e){return"textWrapping"==e.break?this.createElement("br"):null}renderInserted(e){return this.options.renderChanges?this.renderContainer(e,"ins"):this.renderElements(e.children)}renderDeleted(e){return this.options.renderChanges?this.renderContainer(e,"del"):null}renderSymbol(e){var t=this.createElement("span");return t.style.fontFamily=e.font,t.innerHTML=`&#x${e.char};`,t}renderFootnoteReference(e){var t=this.createElement("sup");return this.currentFootnoteIds.push(e.id),t.textContent=`${this.currentFootnoteIds.length}`,t}renderEndnoteReference(e){var t=this.createElement("sup");return this.currentEndnoteIds.push(e.id),t.textContent=`${this.currentEndnoteIds.length}`,t}renderTab(e){var t=this.createElement("span");if(t.innerHTML="&emsp;",this.options.experimental){t.className=this.tabStopClass();var r=function(e,t){var r=e.parent;for(;null!=r&&r.type!=t;)r=r.parent;return r}(e,le.Paragraph)?.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){return this.createElement("span",{id:e.name})}renderRun(e){if(e.fieldRun)return null;const t=this.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){const r=this.createElement(e.verticalAlign);this.renderElements(e.children,r),t.appendChild(r)}else this.renderElements(e.children,t);return t}renderTable(e){let t=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderElements(e.children,t),this.renderStyleValues(e.cssStyle,t),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),t}renderTableColumns(e){let t=this.createElement("colgroup");for(let r of e){let e=this.createElement("col");r.width&&(e.style.width=r.width),t.appendChild(e)}return t}renderTableRow(e){let t=this.renderContainer(e,"tr");return this.currentCellPosition.col=0,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.currentCellPosition.row++,t}renderTableCell(e){let t=this.renderContainer(e,"td");const r=this.currentCellPosition.col;return e.verticalMerge?"restart"==e.verticalMerge?(this.currentVerticalMerge[r]=t,t.rowSpan=1):this.currentVerticalMerge[r]&&(this.currentVerticalMerge[r].rowSpan+=1,t.style.display="none"):this.currentVerticalMerge[r]=null,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){return this.renderContainer(e,"div")}renderVmlElement(e){var t=this.createSvgElement("svg");t.setAttribute("style",e.cssStyleText);const r=this.renderVmlChildElement(e);return e.imageHref?.id&&this.tasks.push(this.document?.loadDocumentImage(e.imageHref.id,this.currentPart).then((e=>r.setAttribute("href",e)))),t.appendChild(r),requestAnimationFrame((()=>{const e=t.firstElementChild.getBBox();t.setAttribute("width",`${Math.ceil(e.x+e.width)}`),t.setAttribute("height",`${Math.ceil(e.y+e.height)}`)})),t}renderVmlChildElement(e){const t=this.createSvgElement(e.tagName);Object.entries(e.attrs).forEach((([e,r])=>t.setAttribute(e,r)));for(let r of e.children)r.type==le.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...U(this.renderElement(r)));return t}renderMmlRadical(e){const t=e.children.find((e=>e.type==le.MmlBase));if(e.props?.hideDegree)return this.createElementNS(St,"msqrt",null,this.renderElements([t]));const r=e.children.find((e=>e.type==le.MmlDegree));return this.createElementNS(St,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){const t=[];return t.push(this.createElementNS(St,"mo",null,[e.props.beginChar??"("])),t.push(...this.renderElements(e.children)),t.push(this.createElementNS(St,"mo",null,[e.props.endChar??")"])),this.createElementNS(St,"mrow",null,t)}renderMmlNary(e){const t=[],r=L(e.children,(e=>e.type)),a=r[le.MmlSuperArgument],n=r[le.MmlSubArgument],i=a?this.createElementNS(St,"mo",null,U(this.renderElement(a))):null,s=n?this.createElementNS(St,"mo",null,U(this.renderElement(n))):null,o=this.createElementNS(St,"mo",null,[e.props?.char??"∫"]);return i||s?t.push(this.createElementNS(St,"munderover",null,[o,s,i])):i?t.push(this.createElementNS(St,"mover",null,[o,i])):s?t.push(this.createElementNS(St,"munder",null,[o,s])):t.push(o),t.push(...this.renderElements(r[le.MmlBase].children)),this.createElementNS(St,"mrow",null,t)}renderMmlPreSubSuper(e){const t=[],r=L(e.children,(e=>e.type)),a=r[le.MmlSuperArgument],n=r[le.MmlSubArgument],i=a?this.createElementNS(St,"mo",null,U(this.renderElement(a))):null,s=n?this.createElementNS(St,"mo",null,U(this.renderElement(n))):null,o=this.createElementNS(St,"mo",null);return t.push(this.createElementNS(St,"msubsup",null,[o,s,i])),t.push(...this.renderElements(r[le.MmlBase].children)),this.createElementNS(St,"mrow",null,t)}renderMmlGroupChar(e){const t="bot"===e.props.verticalJustification?"mover":"munder",r=this.renderContainerNS(e,St,t);return e.props.char&&r.appendChild(this.createElementNS(St,"mo",null,[e.props.char])),r}renderMmlBar(e){const t=this.renderContainerNS(e,St,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline"}return t}renderMmlRun(e){const t=this.createElementNS(St,"ms",null,this.renderElements(e.children));return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),t}renderMllList(e){const t=this.createElementNS(St,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t);for(let r of this.renderElements(e.children))t.appendChild(this.createElementNS(St,"mtr",null,[this.createElementNS(St,"mtd",null,[r])]));return t}renderStyleValues(e,t){for(let r in e)r.startsWith("$")?t.setAttribute(r.slice(1),e[r]):t.style[r]=e[r]}renderClass(e,t){e.className&&(t.className=e.className),e.styleName&&t.classList.add(this.processStyleName(e.styleName))}findStyle(e){return e&&this.styleMap?.[e]}numberingClass(e,t){return`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,r=null){let a=`${e} {\r\n`;for(const e in t)e.startsWith("$")||(a+=`  ${e}: ${t[e]};\r\n`);return r&&(a+=r),a+"}\r\n"}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,a){return`"${e.replace(/%\d*/g,(e=>{let t=parseInt(e.substring(1),10)-1;return`"counter(${this.numberingCounter(r,t)}, ${a})"`}))}${{tab:"\\9",space:"\\a0"}[t]??""}"`}numFormatToCssValue(e){return{none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"}[e]??e}refreshTabStops(){this.options.experimental&&setTimeout((()=>{const e=function(e=document.body){const t=document.createElement("div");t.style.width="100pt",e.appendChild(t);const r=100/t.offsetWidth;return e.removeChild(t),r}();for(let t of this.currentTabs)vt(t.span,t.stops,this.defaultTabSize,e)}),500)}createElementNS(e,t,r,a){var n=e?this.htmlDocument.createElementNS(e,t):this.htmlDocument.createElement(t);return Object.assign(n,r),a&&Ct(n,a),n}createElement(e,t,r){return this.createElementNS(void 0,e,t,r)}createSvgElement(e,t,r){return this.createElementNS(At,e,t,r)}createStyleElement(e){return this.createElement("style",{innerHTML:e})}createComment(e){return this.htmlDocument.createComment(e)}later(e){this.postRenderTasks.push(e)}}function kt(e){e.innerHTML=""}function Ct(e,t){t.forEach((t=>{return e.appendChild("string"==typeof(r=t)||r instanceof String?document.createTextNode(t):t);var r}))}const _t={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,hideWrapperOnPrint:!1,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1,renderAltChunks:!0};async function Tt(e,t,r,a){const n=await function(e,t){const r={..._t,...t};return Ze.load(e,new pt(r),r)}(e,a);return await async function(e,t,r,a){const n={..._t,...a},i=new xt(window.document);return await i.render(e,t,r,n)}(n,t,r,a),n}function Et(){Et=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function h(e,t,r,a){var i=t&&t.prototype instanceof b?t:b,s=Object.create(i.prototype),o=new F(a||[]);return n(s,"_invoke",{value:_(e,r,o)}),s}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",f="suspendedYield",p="executing",g="completed",m={};function b(){}function y(){}function v(){}var w={};l(w,s,(function(){return this}));var A=Object.getPrototypeOf,S=A&&A(A(P([])));S&&S!==r&&a.call(S,s)&&(w=S);var x=v.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(n,i,s,o){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==Pt(h)&&a.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,o)}),(function(e){r("throw",e,s,o)})):t.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,o)}))}o(c.arg)}var i;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return i=i?i.then(n,n):n()}})}function _(t,r,a){var n=d;return function(i,s){if(n===p)throw Error("Generator is already running");if(n===g){if("throw"===i)throw s;return{value:e,done:!0}}for(a.method=i,a.arg=s;;){var o=a.delegate;if(o){var c=T(o,a);if(c){if(c===m)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===d)throw n=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=p;var l=u(t,r,a);if("normal"===l.type){if(n=a.done?g:f,l.arg===m)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(n=g,a.method="throw",a.arg=l.arg)}}}function T(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),m;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Pt(t)+" is not iterable")}return y.prototype=v,n(x,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(C.prototype),l(C.prototype,o,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,a,n,i){void 0===i&&(i=Promise);var s=new C(h(e,r,a,n),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(x),l(x,c,"Generator"),l(x,s,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=P,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(a,n){return o.type="throw",o.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=a.call(s,"catchLoc"),l=a.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;O(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:P(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),m}},t}function Ot(e,t,r,a,n,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(a,n)}function Ft(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function s(e){Ot(i,a,n,s,o,"next",e)}function o(e){Ot(i,a,n,s,o,"throw",e)}s(void 0)}))}}function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function It(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Mt(a.key),a)}}function Mt(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=Pt(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:t+""}function Rt(e,t,r){return t=Lt(t),function(e,t){if(t&&("object"==Pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dt()?Reflect.construct(t,r||[],Lt(e).constructor):t.apply(e,r))}function Dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dt=function(){return!!e})()}function Nt(){return Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Lt(e)););return e}(e,t);if(a){var n=Object.getOwnPropertyDescriptor(a,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},Nt.apply(null,arguments)}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function Bt(e,t){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bt(e,t)}var jt=function(e){function t(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=Rt(this,t,[e,a]),!(e&&e instanceof HTMLElement))throw console.error("WordViewerAdapter: Geçerli bir container elementi sağlanmalı"),new Error("Geçerli bir görüntüleme alanı bulunamadı");a.viewer&&(r.config.viewer=a.viewer,console.log("WordViewerAdapter: Viewer referansı kaydedildi")),console.log("WordViewerAdapter: Adaptör oluşturuluyor",{containerType:e.tagName,containerId:e.id,containerClass:e.className}),r.wordContainer=document.createElement("div"),r.wordContainer.className="udv-word-container",r.wordContainer.style.cssText="\n      width: 100%;\n      height: 100%;\n      overflow: auto;\n      position: relative;\n      background-color: #f8f8f8;\n      padding: 20px;\n    ";try{r.container.appendChild(r.wordContainer),console.log("WordViewerAdapter: Word container DOM'a eklendi"),r._initScrollListener()}catch(e){throw console.error("WordViewerAdapter: Word container eklenirken hata:",e),new Error("Word container'ı oluşturulamadı: "+e.message)}return r.zoomContainer=document.createElement("div"),r.zoomContainer.className="udv-word-zoom-container",r.zoomContainer.style.cssText="\n      transform-origin: center top;\n      transform: scale(".concat(r.zoomLevel,");\n      width: 100%;\n      min-height: 100%;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n    "),r.wordContainer.appendChild(r.zoomContainer),r.lastZoomLevel=r.zoomLevel,r.documentLoaded=!1,r.pageCount=1,r.currentPage=1,r.wordOptions=Object.assign({className:"udv-word-content",inWrapper:!0,breakPages:!0,ignoreLastRenderedPageBreak:!1,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0},a.wordOptions||{}),r.styleElement=null,r._addCustomStyles(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bt(e,t)}(t,e),r=t,a=[{key:"_addCustomStyles",value:function(){this.styleElement&&this.styleElement.parentNode&&this.styleElement.parentNode.removeChild(this.styleElement),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",this.styleElement.textContent="\n      .udv-word-container {\n        font-family: Arial, sans-serif;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        justify-content: flex-start;\n      }\n      .udv-word-zoom-container {\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n        max-width: 100%;\n        transform-origin: center top !important;\n      }\n      .udv-word-content-wrapper{\n        background-color: transparent !important;\n        margin: 0 auto !important;\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n      }\n\n      .udv-word-content {\n        background-color: white;\n        box-shadow: 0 0 2px rgba(0,0,0,0.5) !important;\n      }\n      .udv-word-page {\n        margin-bottom: 20px;\n        padding: 20px;\n        border: 1px solid #ddd;\n        background-color: white;\n      }\n      .udv-word-error {\n        color: #e74c3c;\n        padding: 20px;\n        text-align: center;\n        background-color: #ffeaea;\n        border: 1px solid #e74c3c;\n        border-radius: 4px;\n        margin: 20px 0;\n      }\n      /* Sayfa seçici stilleri */\n      .udv-word-page-controls {\n        position: sticky;\n        bottom: 0;\n        left: 0;\n        width: 100%;\n        background-color: rgba(255,255,255,0.9);\n        padding: 10px;\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        border-top: 1px solid #eee;\n        z-index: 1000;\n      }\n      .udv-word-page-button {\n        background-color: #f5f5f5;\n        border: 1px solid #ddd;\n        border-radius: 4px;\n        padding: 5px 10px;\n        margin: 0 5px;\n        cursor: pointer;\n        font-size: 14px;\n      }\n      .udv-word-page-button:hover {\n        background-color: #e5e5e5;\n      }\n      .udv-word-page-button:disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n      }\n      .udv-word-page-info {\n        margin: 0 10px;\n        font-size: 14px;\n      }\n    ",document.head.appendChild(this.styleElement),console.log("WordViewerAdapter: Özel stiller eklendi")}},{key:"_initScrollListener",value:function(){this._removeScrollListener(),this._scrollHandler=this._handleScroll.bind(this),this.wordContainer&&this.wordContainer.addEventListener("scroll",this._scrollHandler,{passive:!0})}},{key:"_removeScrollListener",value:function(){this._scrollHandler&&this.wordContainer&&(this.wordContainer.removeEventListener("scroll",this._scrollHandler),this._scrollHandler=null)}},{key:"loadDocument",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.log("WordViewerAdapter: Word belgesi yükleniyor",{type:Pt(e),isFile:e instanceof File,isBlob:e instanceof Blob,isArrayBuffer:e instanceof ArrayBuffer,name:e.name||"İsimsiz"}),!this.wordContainer||!this.container){var a=new Error("Geçerli bir container bulunamadı");return console.error("WordViewerAdapter yükleme hatası:",a),r.onError&&r.onError(a),Promise.reject(a)}return this._showLoadingMessage(),this.zoomContainer.innerHTML="",this.documentLoaded=!1,this.wordContainer.style.overflow="auto",this._loadDocumentSource(e).then((function(e){if(!e||0===e.byteLength)throw new Error("Yüklenen belge boş veya geçersiz.");return console.log("WordViewerAdapter: Word belgesi başarıyla yüklendi, render başlatılıyor..."),Tt(e,t.zoomContainer,null,t.wordOptions).then((function(){console.log("WordViewerAdapter: Word belgesi başarıyla render edildi"),t.zoomContainer.querySelectorAll(".docx-wrapper").forEach((function(e){e.style.margin="0 auto",e.style.maxWidth="100%"}));var e=t.zoomContainer.querySelectorAll("section.udv-word-content");return t.pageCount=e.length||1,console.log("WordViewerAdapter: Toplam sayfa sayısı:",t.pageCount),e.forEach((function(e,t){e.dataset.pageNumber=(t+1).toString(),e.id="word-page-".concat(t+1),e.classList.add("udv-word-page")})),t.currentPage=1,t._applyZoom(),t.documentLoaded=!0,console.log("WordViewerAdapter: Word belgesi yükleme tamamlandı"),t._removeLoadingMessage(),r.onSuccess&&r.onSuccess(),t}))})).catch((function(e){throw console.error("WordViewerAdapter: Word belgesi yükleme hatası:",e),t.showError("Word belgesi görüntülenemedi: ".concat(e.message)),r.onError&&r.onError(e),e}))}},{key:"_loadDocumentSource",value:function(e){var t=this;return new Promise((function(r,a){if(!e)return a(new Error("Geçerli bir doküman kaynağı belirtilmelidir"));if(e instanceof ArrayBuffer)return r(e);if(e instanceof Uint8Array)return r(e.buffer);if(e instanceof File||e instanceof Blob){var n=new FileReader;return n.onload=function(e){return r(e.target.result)},n.onerror=function(e){return a(new Error("Dosya okuma hatası: "+e.target.error.message))},void n.readAsArrayBuffer(e)}if("string"==typeof e&&(e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,")||e.startsWith("data:application/msword;base64,")||e.startsWith("data:application/docx;base64,")||e.startsWith("data:;base64,")||t._isBase64(e)))try{var i=e;e.includes("base64,")&&(i=e.split("base64,")[1]),i=i.replace(/\s/g,"");for(var s=atob(i),o=new Uint8Array(s.length),c=0;c<s.length;c++)o[c]=s.charCodeAt(c);return r(o.buffer)}catch(e){return console.error("Base64 dönüştürme hatası:",e),a(new Error("Base64 dönüştürme hatası: "+e.message))}if("string"==typeof e)return console.log("URL üzerinden belge indiriliyor:",e),void fetch(e).then((function(e){if(!e.ok)throw new Error("Doküman indirilemedi: ".concat(e.status," ").concat(e.statusText));return e.arrayBuffer()})).then((function(e){return r(e)})).catch((function(e){return a(e)}));a(new Error("Desteklenmeyen doküman kaynağı. String URL, Base64, File, Blob veya ArrayBuffer olmalıdır."))}))}},{key:"_isBase64",value:function(e){if("string"!=typeof e)return!1;try{if(/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/.test(e)){var t=e.substring(0,100);return atob(t),!0}return!1}catch(e){return!1}}},{key:"_showLoadingMessage",value:function(){this._removeLoadingMessage();var e=document.createElement("div");e.className="udv-word-loading",e.style.cssText="\n      position: absolute;\n      top: 50%;\n      left: 50%;\n      transform: translate(-50%, -50%);\n      text-align: center;\n      padding: 20px;\n      background-color: white;\n      border-radius: 4px;\n      box-shadow: 0 0 10px rgba(0,0,0,0.1);\n    ",e.textContent="Word belgesi yükleniyor...",this.wordContainer.appendChild(e)}},{key:"_removeLoadingMessage",value:function(){var e=this.wordContainer.querySelector(".udv-word-loading");e&&e.parentNode.removeChild(e)}},{key:"showError",value:function(e){console.error("WordViewerAdapter: Hata:",e),this._removeLoadingMessage();var t=document.createElement("div");t.className="udv-word-error",t.textContent=e,this.zoomContainer.innerHTML="",this.zoomContainer.appendChild(t)}},{key:"_applyZoom",value:function(){if(this.zoomContainer){var e=this.wordContainer,t=e.scrollTop,r=e.clientHeight,a=t+r/2,n=this.zoomLevel/(this.lastZoomLevel||1);this.zoomContainer.style.transform="scale(".concat(this.zoomLevel,")"),this.lastZoomLevel=this.zoomLevel,this.zoomContainer.querySelectorAll(".docx-wrapper").forEach((function(e){e.style.margin="0 auto",e.style.maxWidth="100%"})),this.zoomLevel>1?this.wordContainer.style.overflow="auto":(this.wordContainer.style.overflowY="auto",this.wordContainer.style.overflowX="auto"),setTimeout((function(){var t=a*n-r/2;e.scrollTop=t}),10)}return Promise.resolve(this.zoomLevel)}},{key:"goToPage",value:(l=Ft(Et().mark((function e(t){var r;return Et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.documentLoaded){e.next=3;break}return console.warn("WordViewerAdapter: Belge yüklenmedi, sayfa değiştirilemez"),e.abrupt("return",Promise.resolve(this.currentPage));case 3:if(!(t<1||t>this.pageCount)){e.next=6;break}return console.warn("WordViewerAdapter: Geçersiz sayfa numarası: ".concat(t,", kullanılabilir sayfa aralığı: 1-").concat(this.pageCount)),e.abrupt("return",Promise.resolve(this.currentPage));case 6:return(r=this.zoomContainer.querySelector("#word-page-".concat(t)))?(r.scrollIntoView({behavior:"smooth",block:"start",inline:"center"}),this.currentPage=t):console.warn("WordViewerAdapter: #word-page-".concat(t," elementi bulunamadı")),e.abrupt("return",Promise.resolve(this.currentPage));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"nextPage",value:(c=Ft(Et().mark((function e(){return Et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.currentPage<this.pageCount)){e.next=2;break}return e.abrupt("return",this.goToPage(this.currentPage+1));case 2:return e.abrupt("return",Promise.resolve(this.currentPage));case 3:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"previousPage",value:(o=Ft(Et().mark((function e(){return Et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.currentPage>1)){e.next=2;break}return e.abrupt("return",this.goToPage(this.currentPage-1));case 2:return e.abrupt("return",Promise.resolve(this.currentPage));case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getCurrentPage",value:(s=Ft(Et().mark((function e(){return Et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(this.currentPage));case 1:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getPageCount",value:(i=Ft(Et().mark((function e(){return Et().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(this.pageCount));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_handleScroll",value:function(e){var t=this;this.documentLoaded&&this.wordContainer&&(this._scrollTimeout||(this._scrollTimeout=setTimeout((function(){t._scrollTimeout=null;var e=t.zoomContainer.querySelectorAll("section.udv-word-content");if(e&&0!==e.length){for(var r=t.wordContainer.getBoundingClientRect(),a=r.top,n=r.height,i=a+n/2,s=null,o=0,c=1/0,l=0;l<e.length;l++){var h=e[l],u=h.getBoundingClientRect(),d=Math.max(u.top,a),f=Math.min(u.bottom,a+n),p=Math.max(0,f-d)/u.height,g=u.top+u.height/2,m=Math.abs(g-i);p>=.3&&(null===s||p>1.2*o||p>=.8*o&&m<.8*c)&&(s=h,o=p,c=m)}if(s){var b=parseInt(s.dataset.pageNumber);isNaN(b)||t._updateVisiblePage(b)}}}),200)))}},{key:"_updateVisiblePage",value:function(e){this.currentPage=e,this.config.viewer&&"function"==typeof this.config.viewer.updatePageLabel&&this.config.viewer.updatePageLabel(e)}},{key:"destroy",value:function(){this._scrollTimeout&&(clearTimeout(this._scrollTimeout),this._scrollTimeout=null),console.log("WordViewerAdapter destroy metodu çağrıldı");try{this.styleElement&&this.styleElement.parentNode&&(console.log("Word stil elementi temizleniyor"),this.styleElement.parentNode.removeChild(this.styleElement),this.styleElement=null),this.zoomContainer&&(console.log("Word zoom container içeriği temizleniyor"),this.zoomContainer.innerHTML=""),this.wordContainer&&(console.log("Word container içeriği temizleniyor"),this.wordContainer.parentNode&&(console.log("Word container DOM'dan kaldırılıyor"),this.wordContainer.parentNode.removeChild(this.wordContainer)))}catch(e){console.error("Word container temizlenirken hata:",e)}var e,r,a,n,i;this.wordContainer=null,this.zoomContainer=null,this.documentLoaded=!1,(e=t,r="destroy",a=this,i=Nt(Lt(1&(n=3)?e.prototype:e),r,a),2&n&&"function"==typeof i?function(e){return i.apply(a,e)}:i)([]),console.log("WordViewerAdapter destroy tamamlandı")}}],a&&It(r.prototype,a),n&&It(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,n,i,s,o,c,l}(g);function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function Ut(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,zt(a.key),a)}}function zt(e){var t=function(e,t){if("object"!=$t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=$t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$t(t)?t:t+""}function Ht(e,t,r){return t=Gt(t),function(e,t){if(t&&("object"==$t(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Xt()?Reflect.construct(t,r||[],Gt(e).constructor):t.apply(e,r))}function Xt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xt=function(){return!!e})()}function Wt(){return Wt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Gt(e)););return e}(e,t);if(a){var n=Object.getOwnPropertyDescriptor(a,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},Wt.apply(null,arguments)}function Gt(e){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gt(e)}function qt(e,t){return qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qt(e,t)}var Vt=function(e){function t(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=Ht(this,t,[e,a]),!(e&&e instanceof HTMLElement))throw console.error("ImageViewerAdapter: Geçerli bir container elementi sağlanmalı"),new Error("Geçerli bir görüntüleme alanı bulunamadı");console.log("ImageViewerAdapter: Adaptör oluşturuluyor",{containerType:e.tagName,containerId:e.id,containerClass:e.className}),r.imageContainer=document.createElement("div"),r.imageContainer.className="udv-image-container",r.imageContainer.style.cssText="\n      width: 100%;\n      height: 100%;\n      overflow: auto;\n      position: relative;\n      background-color: #f8f8f8;\n    ";try{r.container.appendChild(r.imageContainer),console.log("ImageViewerAdapter: Image container DOM'a eklendi")}catch(e){throw console.error("ImageViewerAdapter: Image container eklenirken hata:",e),new Error("Görüntü container'ı oluşturulamadı: "+e.message)}return r.imageWrapper=document.createElement("div"),r.imageWrapper.className="udv-image-wrapper",r.imageWrapper.style.cssText="\n      position: absolute;\n      left: 0;\n      top: 0;\n      right: 0;\n      transform-origin: top left;\n    ",r.imageContainer.appendChild(r.imageWrapper),r.imageElement=null,r.imageLoaded=!1,r.originalWidth=0,r.originalHeight=0,r.rotationDegree=0,r.isPanning=!1,r.startX=0,r.startY=0,r.panX=0,r.panY=0,r.lastZoomLevel=r.zoomLevel,r._initPanEvents(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qt(e,t)}(t,e),r=t,a=[{key:"_initPanEvents",value:function(){var e=this;if(this.imageContainer){var t=function(t){e.zoomLevel<=1||(e.isPanning=!0,e.startX="mousedown"===t.type?t.clientX:t.touches[0].clientX,e.startY="mousedown"===t.type?t.clientY:t.touches[0].clientY,e.imageContainer.style.cursor="grabbing",t.preventDefault())},r=function(t){if(e.isPanning){t.preventDefault();var r="mousemove"===t.type?t.clientX:t.touches[0].clientX,a="mousemove"===t.type?t.clientY:t.touches[0].clientY,n=r-e.startX,i=a-e.startY;e.imageContainer.scrollLeft-=n,e.imageContainer.scrollTop-=i,e.startX=r,e.startY=a}},a=function(){e.isPanning=!1,e.imageContainer.style.cursor=e.zoomLevel>1?"grab":"default"};this.imageContainer.addEventListener("mousedown",t),window.addEventListener("mousemove",r),window.addEventListener("mouseup",a),this.imageContainer.addEventListener("touchstart",t),window.addEventListener("touchmove",r),window.addEventListener("touchend",a)}}},{key:"_applyTransform",value:function(){if(this.imageWrapper&&this.imageLoaded){var e=this.imageContainer.getBoundingClientRect(),t=this.imageWrapper.getBoundingClientRect(),r=(t.width*this.zoomLevel-e.width)/2,a=(t.height*this.zoomLevel-e.height)/2;this.panX=Math.max(Math.min(this.panX,r),-r),this.panY=Math.max(Math.min(this.panY,a),-a),this.imageWrapper.style.transform="\n      translate(".concat(this.panX,"px, ").concat(this.panY,"px) \n      scale(").concat(this.zoomLevel,") \n      rotate(").concat(this.rotationDegree,"deg)\n    ")}}},{key:"loadDocument",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.log("ImageViewerAdapter: Görüntü yükleniyor",{type:$t(e),isFile:e instanceof File,isBlob:e instanceof Blob,name:e.name||"İsimsiz"}),!this.imageContainer||!this.container){var a=new Error("Geçerli bir container bulunamadı");return console.error("ImageViewerAdapter yükleme hatası:",a),r.onError&&r.onError(a),Promise.reject(a)}try{this.imageWrapper.innerHTML="",this.imageElement=document.createElement("img"),this.imageElement.className="udv-image",this.imageElement.style.cssText="\n        display: block;\n        width: auto;\n        height: auto;\n        box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n      ";var n=document.createElement("div");if(n.className="udv-image-loading",n.textContent="Görüntü yükleniyor...",n.style.padding="20px",n.style.textAlign="center",n.style.color="#555",this.imageWrapper.appendChild(n),e instanceof File||e instanceof Blob)return console.log("ImageViewerAdapter: Blob veya File nesnesi tespit edildi, dosyadan yükleniyor"),this._loadFromBlob(e,r);if("string"!=typeof e){var i=new Error("Görüntü URL'i geçerli bir string değil");return console.error("ImageViewerAdapter yükleme hatası:",i),this.showError(i.message),r.onError&&r.onError(i),Promise.reject(i)}return console.log("ImageViewerAdapter: URL'den görüntü yükleniyor:",e.substring(0,100)+"..."),new Promise((function(a,n){t.imageElement.onload=function(){t.imageWrapper.innerHTML="",t.imageWrapper.appendChild(t.imageElement),t.originalWidth=t.imageElement.naturalWidth,t.originalHeight=t.imageElement.naturalHeight;var e=t.imageContainer.clientWidth,n=t.imageContainer.clientHeight;if(t.originalWidth>e){var i=(t.originalWidth-e)/2;t.imageWrapper.style.left="-".concat(i,"px"),requestAnimationFrame((function(){t.imageContainer.scrollLeft=i}))}else{var s=(e-t.originalWidth)/2;t.imageWrapper.style.left="".concat(s,"px")}if(t.originalHeight<=n){var o=(n-t.originalHeight)/2;t.imageWrapper.style.top="".concat(o,"px")}else t.imageWrapper.style.top="0";console.log("ImageViewerAdapter: Görüntü başarıyla yüklendi",{width:t.originalWidth,height:t.originalHeight,containerWidth:e,containerHeight:n,scrollable:t.originalWidth>e}),t._applyZoom(),t.pageCount=1,t.currentPage=1,t.imageLoaded=!0,r.onSuccess&&r.onSuccess(),a(t)},t.imageElement.onerror=function(e){console.error("ImageViewerAdapter: Görüntü yükleme hatası:",e),t.showError("Görüntü yüklenirken hata oluştu"),r.onError&&r.onError(e),n(new Error("Görüntü yüklenemedi"))},t.imageElement.src=e}))}catch(a){return console.error("ImageViewerAdapter: Beklenmeyen hata:",a),this.showError("Görüntü yüklenirken beklenmeyen hata: ".concat(a.message)),r.onError&&r.onError(a),Promise.reject(a)}}},{key:"_loadFromBlob",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(console.log("ImageViewerAdapter: Blob/File'dan görüntü yükleniyor",{blobType:e.type,blobSize:e.size,blobName:e.name||"N/A"}),!this.imageElement){var a=new Error("Görüntü elementi oluşturulmadı");return console.error("ImageViewerAdapter: _loadFromBlob hatası -",a.message),r.onError&&r.onError(a),Promise.reject(a)}return new Promise((function(a,n){var i=new FileReader;i.onload=function(e){console.log("ImageViewerAdapter: Dosya okundu, görüntü yükleniyor"),t.imageElement.onload=function(){if(t.imageWrapper){t.imageWrapper.innerHTML="",t.imageWrapper.appendChild(t.imageElement),t.originalWidth=t.imageElement.naturalWidth,t.originalHeight=t.imageElement.naturalHeight;var e=t.imageContainer.clientWidth,i=t.imageContainer.clientHeight;if(t.originalWidth>e){var s=(t.originalWidth-e)/2;t.imageWrapper.style.left="-".concat(s,"px"),requestAnimationFrame((function(){t.imageContainer.scrollLeft=s}))}else{var o=(e-t.originalWidth)/2;t.imageWrapper.style.left="".concat(o,"px")}if(t.originalHeight<=i){var c=(i-t.originalHeight)/2;t.imageWrapper.style.top="".concat(c,"px")}else t.imageWrapper.style.top="0";console.log("ImageViewerAdapter: Blob görüntüsü başarıyla yüklendi",{width:t.originalWidth,height:t.originalHeight,containerWidth:e,containerHeight:i,scrollable:t.originalWidth>e}),t._applyZoom(),t.pageCount=1,t.currentPage=1,t.imageLoaded=!0,r.onSuccess&&r.onSuccess(),a(t)}else{var l=new Error("Image container bulunamadı");console.error("ImageViewerAdapter: _loadFromBlob hatası -",l.message),t.showError(l.message),r.onError&&r.onError(l),n(l)}},t.imageElement.onerror=function(e){console.error("ImageViewerAdapter: Blob görüntü yükleme hatası -",e),t.showError("Görüntü yüklenirken hata oluştu"),r.onError&&r.onError(e),n(new Error("Görüntü yüklenemedi"))};try{t.imageElement.src=e.target.result}catch(e){console.error("ImageViewerAdapter: src atama hatası -",e),t.showError("Görüntü kaynağı ayarlanamadı"),r.onError&&r.onError(e),n(e)}},i.onerror=function(e){console.error("ImageViewerAdapter: Dosya okuma hatası -",e),t.showError("Dosya okunamadı"),r.onError&&r.onError(e),n(e)};try{i.readAsDataURL(e)}catch(e){console.error("ImageViewerAdapter: readAsDataURL hatası -",e),t.showError("Dosya okunamadı: "+e.message),r.onError&&r.onError(e),n(e)}}))}},{key:"_applyZoom",value:function(){if(!this.imageWrapper||!this.imageLoaded)return Promise.resolve(this.zoomLevel);var e=this.imageContainer,t=this.imageWrapper,r=e.scrollLeft,a=e.scrollTop,n=e.clientHeight,i=e.clientWidth,s=r+i/2,o=a+n/2,c=this.zoomLevel/(this.lastZoomLevel||1),l=this.originalWidth*this.zoomLevel,h=this.originalHeight*this.zoomLevel;if(t.style.transform="scale(".concat(this.zoomLevel,")"),l<=i)t.style.left="".concat((i-l)/2,"px");else{var u=(l-i)/2;t.style.left="-".concat(u,"px"),setTimeout((function(){var t=s*c-i/2,r=o*c-n/2;e.scrollLeft=t,e.scrollTop=r}),50)}return t.style.top=h<=n?"".concat((n-h)/2,"px"):"0",e.style.cursor=this.zoomLevel>1?"grab":"default",this.lastZoomLevel=this.zoomLevel,Promise.resolve(this.zoomLevel)}},{key:"rotate",value:function(){return this.rotationDegree=(this.rotationDegree+90)%360,this._applyRotation()}},{key:"_applyRotation",value:function(){if(this.imageElement&&this.imageLoaded)if(this.imageElement.style.transform="scale(".concat(this.zoomLevel,") rotate(").concat(this.rotationDegree,"deg)"),90===this.rotationDegree||270===this.rotationDegree){var e=this.originalHeight/this.originalWidth,t=this.imageContainer.clientWidth,r=t*e;this.imageElement.style.maxWidth="".concat(r,"px"),this.imageElement.style.maxHeight="".concat(t,"px")}else this.imageElement.style.maxWidth="100%",this.imageElement.style.maxHeight="100%";return this.rotationDegree}},{key:"destroy",value:function(){console.log("ImageViewerAdapter destroy metodu çağrıldı");try{this.imageContainer&&(console.log("Image container içeriği temizleniyor"),this.imageContainer.innerHTML="",this.imageContainer.parentNode&&(console.log("Image container DOM'dan kaldırılıyor"),this.imageContainer.parentNode.removeChild(this.imageContainer))),this.imageElement&&this.imageElement.src&&this.imageElement.src.startsWith("blob:")&&URL.revokeObjectURL(this.imageElement.src)}catch(e){console.error("Image container temizlenirken hata:",e)}var e,r,a,n,i;this.imageElement=null,this.imageContainer=null,this.imageLoaded=!1,this.rotationDegree=0,(e=t,r="destroy",a=this,i=Wt(Gt(1&(n=3)?e.prototype:e),r,a),2&n&&"function"==typeof i?function(e){return i.apply(a,e)}:i)([]),this._removePanEvents(),console.log("ImageViewerAdapter destroy tamamlandı")}},{key:"_removePanEvents",value:function(){this.imageContainer&&(this.imageContainer.removeEventListener("mousedown",this._startPan),this.imageContainer.removeEventListener("touchstart",this._startPan),window.removeEventListener("mousemove",this._doPan),window.removeEventListener("touchmove",this._doPan),window.removeEventListener("mouseup",this._endPan),window.removeEventListener("touchend",this._endPan))}}],a&&Ut(r.prototype,a),n&&Ut(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,n}(g),Kt={version:"0.18.5"},Yt=1200,Zt=1252,Jt=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Qt={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},er=function(e){-1!=Jt.indexOf(e)&&(Zt=Qt[0]=e)};var tr=function(e){Yt=e,er(e)};function rr(){tr(1200),er(1252)}function ar(e){for(var t=[],r=0,a=e.length;r<a;++r)t[r]=e.charCodeAt(r);return t}function nr(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var ir,sr=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return 255==t&&254==r?function(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}(e.slice(2)):254==t&&255==r?nr(e.slice(2)):65279==t?e.slice(1):e},or=function(e){return String.fromCharCode(e)},cr=function(e){return String.fromCharCode(e)};var lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function hr(e){for(var t="",r=0,a=0,n=0,i=0,s=0,o=0,c=0,l=0;l<e.length;)i=(r=e.charCodeAt(l++))>>2,s=(3&r)<<4|(a=e.charCodeAt(l++))>>4,o=(15&a)<<2|(n=e.charCodeAt(l++))>>6,c=63&n,isNaN(a)?o=c=64:isNaN(n)&&(c=64),t+=lr.charAt(i)+lr.charAt(s)+lr.charAt(o)+lr.charAt(c);return t}function ur(e){var t="",r=0,a=0,n=0,i=0,s=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)r=lr.indexOf(e.charAt(c++))<<2|(i=lr.indexOf(e.charAt(c++)))>>4,t+=String.fromCharCode(r),a=(15&i)<<4|(s=lr.indexOf(e.charAt(c++)))>>2,64!==s&&(t+=String.fromCharCode(a)),n=(3&s)<<6|(o=lr.indexOf(e.charAt(c++))),64!==o&&(t+=String.fromCharCode(n));return t}var dr=function(){return"undefined"!=typeof Buffer&&"undefined"!=typeof process&&void 0!==process.versions&&!!process.versions.node}(),fr=function(){if("undefined"!=typeof Buffer){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(t){e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function pr(e){return dr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}function gr(e){return dr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}var mr=function(e){return dr?fr(e,"binary"):e.split("").map((function(e){return 255&e.charCodeAt(0)}))};function br(e){if(Array.isArray(e))return e.map((function(e){return String.fromCharCode(e)})).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function yr(e){if("undefined"==typeof ArrayBuffer)throw new Error("Unsupported");if(e instanceof ArrayBuffer)return yr(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var vr=dr?function(e){return Buffer.concat(e.map((function(e){return Buffer.isBuffer(e)?e:fr(e)})))}:function(e){if("undefined"!=typeof Uint8Array){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var a=new Uint8Array(r),n=0;for(t=0,r=0;t<e.length;r+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)a.set(e[t],r);else{if("string"==typeof e[t])throw"wtf";a.set(new Uint8Array(e[t]),r)}return a}return[].concat.apply([],e.map((function(e){return Array.isArray(e)?e:[].slice.call(e)})))};var wr=/\u0000/g,Ar=/[\u0001-\u0006]/g;function Sr(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function xr(e,t){var r=""+e;return r.length>=t?r:Ia("0",t-r.length)+r}function kr(e,t){var r=""+e;return r.length>=t?r:Ia(" ",t-r.length)+r}function Cr(e,t){var r=""+e;return r.length>=t?r:r+Ia(" ",t-r.length)}var _r=Math.pow(2,32);function Tr(e,t){return e>_r||e<-_r?function(e,t){var r=""+Math.round(e);return r.length>=t?r:Ia("0",t-r.length)+r}(e,t):function(e,t){var r=""+e;return r.length>=t?r:Ia("0",t-r.length)+r}(Math.round(e),t)}function Er(e,t){return t=t||0,e.length>=7+t&&103==(32|e.charCodeAt(t))&&101==(32|e.charCodeAt(t+1))&&110==(32|e.charCodeAt(t+2))&&101==(32|e.charCodeAt(t+3))&&114==(32|e.charCodeAt(t+4))&&97==(32|e.charCodeAt(t+5))&&108==(32|e.charCodeAt(t+6))}var Or=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Fr=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];var Pr={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Ir={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},Mr={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Rr(e,t,r){for(var a=e<0?-1:1,n=e*a,i=0,s=1,o=0,c=1,l=0,h=0,u=Math.floor(n);l<t&&(o=(u=Math.floor(n))*s+i,h=u*l+c,!(n-u<5e-8));)n=1/(n-u),i=s,s=o,c=l,l=h;if(h>t&&(l>t?(h=c,o=i):(h=l,o=s)),!r)return[0,a*o,h];var d=Math.floor(a*o/h);return[d,a*o-d*h,h]}function Dr(e,t,r){if(e>2958465||e<0)return null;var a=0|e,n=Math.floor(86400*(e-a)),i=0,s=[],o={D:a,T:n,u:86400*(e-a)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(a+=1462),o.u>.9999&&(o.u=0,86400==++n&&(o.T=n=0,++a,++o.D)),60===a)s=r?[1317,10,29]:[1900,2,29],i=3;else if(0===a)s=r?[1317,8,29]:[1900,1,0],i=6;else{a>60&&--a;var c=new Date(1900,0,1);c.setDate(c.getDate()+a-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],i=c.getDay(),a<60&&(i=(i+6)%7),r&&(i=function(e,t){t[0]-=581;var r=e.getDay();e<60&&(r=(r+6)%7);return r}(c,s))}return o.y=s[0],o.m=s[1],o.d=s[2],o.S=n%60,n=Math.floor(n/60),o.M=n%60,n=Math.floor(n/60),o.H=n,o.q=i,o}var Nr=new Date(1899,11,31,0,0,0),Lr=Nr.getTime(),Br=new Date(1900,2,1,0,0,0);function jr(e,t){var r=e.getTime();return t?r-=1262304e5:e>=Br&&(r+=864e5),(r-(Lr+6e4*(e.getTimezoneOffset()-Nr.getTimezoneOffset())))/864e5}function $r(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function Ur(e){var t,r=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return t=r>=-4&&r<=-1?e.toPrecision(10+r):Math.abs(r)<=9?function(e){var t=e<0?12:11,r=$r(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10)).length<=t?r:e.toExponential(5)}(e):10===r?e.toFixed(10).substr(0,12):function(e){var t=$r(e.toFixed(11));return t.length>(e<0?12:11)||"0"===t||"-0"===t?e.toPrecision(6):t}(e),$r(function(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(t.toUpperCase()))}function zr(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):Ur(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return la(14,jr(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function Hr(e,t,r,a){var n,i="",s=0,o=0,c=r.y,l=0;switch(e){case 98:c=r.y+543;case 121:switch(t.length){case 1:case 2:n=c%100,l=2;break;default:n=c%1e4,l=4}break;case 109:switch(t.length){case 1:case 2:n=r.m,l=t.length;break;case 3:return Fr[r.m-1][1];case 5:return Fr[r.m-1][0];default:return Fr[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:n=r.d,l=t.length;break;case 3:return Or[r.q][0];default:return Or[r.q][1]}break;case 104:switch(t.length){case 1:case 2:n=1+(r.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:n=r.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:n=r.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if("s"!=t&&"ss"!=t&&".0"!=t&&".00"!=t&&".000"!=t)throw"bad second format: "+t;return 0!==r.u||"s"!=t&&"ss"!=t?(o=a>=2?3===a?1e3:100:1===a?10:1,(s=Math.round(o*(r.S+r.u)))>=60*o&&(s=0),"s"===t?0===s?"0":""+s/o:(i=xr(s,2+a),"ss"===t?i.substr(0,2):"."+i.substr(2,t.length-1))):xr(r.S,t.length);case 90:switch(t){case"[h]":case"[hh]":n=24*r.D+r.H;break;case"[m]":case"[mm]":n=60*(24*r.D+r.H)+r.M;break;case"[s]":case"[ss]":n=60*(60*(24*r.D+r.H)+r.M)+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}l=3===t.length?1:2;break;case 101:n=c,l=1}return l>0?xr(n,l):""}function Xr(e){if(e.length<=3)return e;for(var t=e.length%3,r=e.substr(0,t);t!=e.length;t+=3)r+=(r.length>0?",":"")+e.substr(t,3);return r}var Wr=/%/g;function Gr(e,t){var r,a=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+Gr(e,-t);var n=e.indexOf(".");-1===n&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),-1===(r=(t/Math.pow(10,i)).toPrecision(a+1+(n+i)%n)).indexOf("e")){var s=Math.floor(Math.log(t)*Math.LOG10E);for(-1===r.indexOf(".")?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);"0."===r.substr(0,2);)r=(r=r.charAt(0)+r.substr(2,n)+"."+r.substr(2+n)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,(function(e,t,r,a){return t+r+a.substr(0,(n+i)%n)+"."+a.substr(i)+"E"}))}else r=t.toExponential(a);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var qr=/# (\?+)( ?)\/( ?)(\d+)/;var Vr=/^#*0*\.([0#]+)/,Kr=/\).*[0#]/,Yr=/\(###\) ###\\?-####/;function Zr(e){for(var t,r="",a=0;a!=e.length;++a)switch(t=e.charCodeAt(a)){case 35:break;case 63:r+=" ";break;case 48:r+="0";break;default:r+=String.fromCharCode(t)}return r}function Jr(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function Qr(e,t){var r=e-Math.floor(e),a=Math.pow(10,t);return t<(""+Math.round(r*a)).length?0:Math.round(r*a)}function ea(e,t,r){if(40===e.charCodeAt(0)&&!t.match(Kr)){var a=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ea("n",a,r):"("+ea("n",a,-r)+")"}if(44===t.charCodeAt(t.length-1))return function(e,t,r){for(var a=t.length-1;44===t.charCodeAt(a-1);)--a;return aa(e,t.substr(0,a),r/Math.pow(10,3*(t.length-a)))}(e,t,r);if(-1!==t.indexOf("%"))return function(e,t,r){var a=t.replace(Wr,""),n=t.length-a.length;return aa(e,a,r*Math.pow(10,2*n))+Ia("%",n)}(e,t,r);if(-1!==t.indexOf("E"))return Gr(t,r);if(36===t.charCodeAt(0))return"$"+ea(e,t.substr(" "==t.charAt(1)?2:1),r);var n,i,s,o,c=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+Tr(c,t.length);if(t.match(/^[#?]+$/))return"0"===(n=Tr(r,0))&&(n=""),n.length>t.length?n:Zr(t.substr(0,t.length-n.length))+n;if(i=t.match(qr))return function(e,t,r){var a=parseInt(e[4],10),n=Math.round(t*a),i=Math.floor(n/a),s=n-i*a,o=a;return r+(0===i?"":""+i)+" "+(0===s?Ia(" ",e[1].length+1+e[4].length):kr(s,e[1].length)+e[2]+"/"+e[3]+xr(o,e[4].length))}(i,c,l);if(t.match(/^#+0+$/))return l+Tr(c,t.length-t.indexOf("0"));if(i=t.match(Vr))return n=Jr(r,i[1].length).replace(/^([^\.]+)$/,"$1."+Zr(i[1])).replace(/\.$/,"."+Zr(i[1])).replace(/\.(\d*)$/,(function(e,t){return"."+t+Ia("0",Zr(i[1]).length-t.length)})),-1!==t.indexOf("0.")?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+Jr(c,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+Xr(Tr(c,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ea(e,t,-r):Xr(""+(Math.floor(r)+function(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}(r,i[1].length)))+"."+xr(Qr(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return ea(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=Sr(ea(e,t.replace(/[\\-]/g,""),r)),s=0,Sr(Sr(t.replace(/\\/g,"")).replace(/[0#]/g,(function(e){return s<n.length?n.charAt(s++):"0"===e?"0":""})));if(t.match(Yr))return"("+(n=ea(e,"##########",r)).substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var h="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),o=Rr(c,Math.pow(10,s)-1,!1),n=""+l," "==(h=aa("n",i[1],o[1])).charAt(h.length-1)&&(h=h.substr(0,h.length-1)+"0"),n+=h+i[2]+"/"+i[3],(h=Cr(o[2],s)).length<i[4].length&&(h=Zr(i[4].substr(i[4].length-h.length))+h),n+=h;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),l+((o=Rr(c,Math.pow(10,s)-1,!0))[0]||(o[1]?"":"0"))+" "+(o[1]?kr(o[1],s)+i[2]+"/"+i[3]+Cr(o[2],s):Ia(" ",2*s+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return n=Tr(r,0),t.length<=n.length?n:Zr(t.substr(0,t.length-n.length))+n;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=n.indexOf(".");var u=t.indexOf(".")-s,d=t.length-n.length-u;return Zr(t.substr(0,u)+n+t.substr(t.length-d))}if(i=t.match(/^00,000\.([#0]*0)$/))return s=Qr(r,i[1].length),r<0?"-"+ea(e,t,-r):Xr(function(e){return e<2147483647&&e>-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,(function(e){return"00,"+(e.length<3?xr(0,3-e.length):"")+e}))+"."+xr(s,i[1].length);switch(t){case"###,##0.00":return ea(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var f=Xr(Tr(c,0));return"0"!==f?l+f:"";case"###,###.00":return ea(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return ea(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function ta(e,t){var r,a=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+ta(e,-t);var n=e.indexOf(".");-1===n&&(n=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%n;if(i<0&&(i+=n),!(r=(t/Math.pow(10,i)).toPrecision(a+1+(n+i)%n)).match(/[Ee]/)){var s=Math.floor(Math.log(t)*Math.LOG10E);-1===r.indexOf(".")?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,(function(e,t,r,a){return t+r+a.substr(0,(n+i)%n)+"."+a.substr(i)+"E"}))}else r=t.toExponential(a);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function ra(e,t,r){if(40===e.charCodeAt(0)&&!t.match(Kr)){var a=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ra("n",a,r):"("+ra("n",a,-r)+")"}if(44===t.charCodeAt(t.length-1))return function(e,t,r){for(var a=t.length-1;44===t.charCodeAt(a-1);)--a;return aa(e,t.substr(0,a),r/Math.pow(10,3*(t.length-a)))}(e,t,r);if(-1!==t.indexOf("%"))return function(e,t,r){var a=t.replace(Wr,""),n=t.length-a.length;return aa(e,a,r*Math.pow(10,2*n))+Ia("%",n)}(e,t,r);if(-1!==t.indexOf("E"))return ta(t,r);if(36===t.charCodeAt(0))return"$"+ra(e,t.substr(" "==t.charAt(1)?2:1),r);var n,i,s,o,c=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+xr(c,t.length);if(t.match(/^[#?]+$/))return n=""+r,0===r&&(n=""),n.length>t.length?n:Zr(t.substr(0,t.length-n.length))+n;if(i=t.match(qr))return function(e,t,r){return r+(0===t?"":""+t)+Ia(" ",e[1].length+2+e[4].length)}(i,c,l);if(t.match(/^#+0+$/))return l+xr(c,t.length-t.indexOf("0"));if(i=t.match(Vr))return n=(n=(""+r).replace(/^([^\.]+)$/,"$1."+Zr(i[1])).replace(/\.$/,"."+Zr(i[1]))).replace(/\.(\d*)$/,(function(e,t){return"."+t+Ia("0",Zr(i[1]).length-t.length)})),-1!==t.indexOf("0.")?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+Xr(""+c);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ra(e,t,-r):Xr(""+r)+"."+Ia("0",i[1].length);if(i=t.match(/^#,#*,#0/))return ra(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=Sr(ra(e,t.replace(/[\\-]/g,""),r)),s=0,Sr(Sr(t.replace(/\\/g,"")).replace(/[0#]/g,(function(e){return s<n.length?n.charAt(s++):"0"===e?"0":""})));if(t.match(Yr))return"("+(n=ra(e,"##########",r)).substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var h="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),o=Rr(c,Math.pow(10,s)-1,!1),n=""+l," "==(h=aa("n",i[1],o[1])).charAt(h.length-1)&&(h=h.substr(0,h.length-1)+"0"),n+=h+i[2]+"/"+i[3],(h=Cr(o[2],s)).length<i[4].length&&(h=Zr(i[4].substr(i[4].length-h.length))+h),n+=h;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),l+((o=Rr(c,Math.pow(10,s)-1,!0))[0]||(o[1]?"":"0"))+" "+(o[1]?kr(o[1],s)+i[2]+"/"+i[3]+Cr(o[2],s):Ia(" ",2*s+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return n=""+r,t.length<=n.length?n:Zr(t.substr(0,t.length-n.length))+n;if(i=t.match(/^([#0]+)\.([#0]+)$/)){n=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=n.indexOf(".");var u=t.indexOf(".")-s,d=t.length-n.length-u;return Zr(t.substr(0,u)+n+t.substr(t.length-d))}if(i=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+ra(e,t,-r):Xr(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,(function(e){return"00,"+(e.length<3?xr(0,3-e.length):"")+e}))+"."+xr(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var f=Xr(""+c);return"0"!==f?l+f:"";default:if(t.match(/\.[0#?]*$/))return ra(e,t.slice(0,t.lastIndexOf(".")),r)+Zr(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function aa(e,t,r){return(0|r)===r?ra(e,t,r):ea(e,t,r)}var na=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ia(e){for(var t=0,r="",a="";t<e.length;)switch(r=e.charAt(t)){case"G":Er(e,t)&&(t+=6),t++;break;case'"':for(;34!==e.charCodeAt(++t)&&t<e.length;);++t;break;case"\\":case"_":t+=2;break;case"@":++t;break;case"B":case"b":if("1"===e.charAt(t+1)||"2"===e.charAt(t+1))return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if("A/P"===e.substr(t,3).toUpperCase())return!0;if("AM/PM"===e.substr(t,5).toUpperCase())return!0;if("上午/下午"===e.substr(t,5).toUpperCase())return!0;++t;break;case"[":for(a=r;"]"!==e.charAt(t++)&&t<e.length;)a+=e.charAt(t);if(a.match(na))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||"\\"==r&&"-"==e.charAt(t+1)&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t," "!=e.charAt(t)&&"*"!=e.charAt(t)||++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;default:++t}return!1}var sa=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function oa(e,t){if(null==t)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0}return!1}function ca(e,t){var r=function(e){for(var t=[],r=!1,a=0,n=0;a<e.length;++a)switch(e.charCodeAt(a)){case 34:r=!r;break;case 95:case 42:case 92:++a;break;case 59:t[t.length]=e.substr(n,a-n),n=a+1}if(t[t.length]=e.substr(n),!0===r)throw new Error("Format |"+e+"| unterminated string ");return t}(e),a=r.length,n=r[a-1].indexOf("@");if(a<4&&n>-1&&--a,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if("number"!=typeof t)return[4,4===r.length||n>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=n>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=n>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=n>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"]}var i=t>0?r[0]:t<0?r[1]:r[2];if(-1===r[0].indexOf("[")&&-1===r[1].indexOf("["))return[a,i];if(null!=r[0].match(/\[[=<>]/)||null!=r[1].match(/\[[=<>]/)){var s=r[0].match(sa),o=r[1].match(sa);return oa(t,s)?[a,r[0]]:oa(t,o)?[a,r[1]]:[a,r[null!=s&&null!=o?2:1]]}return[a,i]}function la(e,t,r){null==r&&(r={});var a="";switch(typeof e){case"string":a="m/d/yy"==e&&r.dateNF?r.dateNF:e;break;case"number":null==(a=14==e&&r.dateNF?r.dateNF:(null!=r.table?r.table:Pr)[e])&&(a=r.table&&r.table[Ir[e]]||Pr[Ir[e]]),null==a&&(a=Mr[e]||"General")}if(Er(a,0))return zr(t,r);t instanceof Date&&(t=jr(t,r.date1904));var n=ca(a,t);if(Er(n[1]))return zr(t,r);if(!0===t)t="TRUE";else if(!1===t)t="FALSE";else if(""===t||null==t)return"";return function(e,t,r,a){for(var n,i,s,o=[],c="",l=0,h="",u="t",d="H";l<e.length;)switch(h=e.charAt(l)){case"G":if(!Er(e,l))throw new Error("unrecognized character "+h+" in "+e);o[o.length]={t:"G",v:"General"},l+=7;break;case'"':for(c="";34!==(s=e.charCodeAt(++l))&&l<e.length;)c+=String.fromCharCode(s);o[o.length]={t:"t",v:c},++l;break;case"\\":var f=e.charAt(++l),p="("===f||")"===f?f:"t";o[o.length]={t:p,v:f},++l;break;case"_":o[o.length]={t:"t",v:" "},l+=2;break;case"@":o[o.length]={t:"T",v:t},++l;break;case"B":case"b":if("1"===e.charAt(l+1)||"2"===e.charAt(l+1)){if(null==n&&null==(n=Dr(t,r,"2"===e.charAt(l+1))))return"";o[o.length]={t:"X",v:e.substr(l,2)},u=h,l+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":h=h.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0)return"";if(null==n&&null==(n=Dr(t,r)))return"";for(c=h;++l<e.length&&e.charAt(l).toLowerCase()===h;)c+=h;"m"===h&&"h"===u.toLowerCase()&&(h="M"),"h"===h&&(h=d),o[o.length]={t:h,v:c},u=h;break;case"A":case"a":case"上":var g={t:h,v:h};if(null==n&&(n=Dr(t,r)),"A/P"===e.substr(l,3).toUpperCase()?(null!=n&&(g.v=n.H>=12?"P":"A"),g.t="T",d="h",l+=3):"AM/PM"===e.substr(l,5).toUpperCase()?(null!=n&&(g.v=n.H>=12?"PM":"AM"),g.t="T",l+=5,d="h"):"上午/下午"===e.substr(l,5).toUpperCase()?(null!=n&&(g.v=n.H>=12?"下午":"上午"),g.t="T",l+=5,d="h"):(g.t="t",++l),null==n&&"T"===g.t)return"";o[o.length]=g,u=h;break;case"[":for(c=h;"]"!==e.charAt(l++)&&l<e.length;)c+=e.charAt(l);if("]"!==c.slice(-1))throw'unterminated "[" block: |'+c+"|";if(c.match(na)){if(null==n&&null==(n=Dr(t,r)))return"";o[o.length]={t:"Z",v:c.toLowerCase()},u=c.charAt(1)}else c.indexOf("$")>-1&&(c=(c.match(/\$([^-\[\]]*)/)||[])[1]||"$",ia(e)||(o[o.length]={t:"t",v:c}));break;case".":if(null!=n){for(c=h;++l<e.length&&"0"===(h=e.charAt(l));)c+=h;o[o.length]={t:"s",v:c};break}case"0":case"#":for(c=h;++l<e.length&&"0#?.,E+-%".indexOf(h=e.charAt(l))>-1;)c+=h;o[o.length]={t:"n",v:c};break;case"?":for(c=h;e.charAt(++l)===h;)c+=h;o[o.length]={t:h,v:c},u=h;break;case"*":++l," "!=e.charAt(l)&&"*"!=e.charAt(l)||++l;break;case"(":case")":o[o.length]={t:1===a?"t":h,v:h},++l;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(c=h;l<e.length&&"0123456789".indexOf(e.charAt(++l))>-1;)c+=e.charAt(l);o[o.length]={t:"D",v:c};break;case" ":o[o.length]={t:h,v:h},++l;break;case"$":o[o.length]={t:"t",v:"$"},++l;break;default:if(-1===",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(h))throw new Error("unrecognized character "+h+" in "+e);o[o.length]={t:"t",v:h},++l}var m,b=0,y=0;for(l=o.length-1,u="t";l>=0;--l)switch(o[l].t){case"h":case"H":o[l].t=d,u="h",b<1&&(b=1);break;case"s":(m=o[l].v.match(/\.0+$/))&&(y=Math.max(y,m[0].length-1)),b<3&&(b=3);case"d":case"y":case"M":case"e":u=o[l].t;break;case"m":"s"===u&&(o[l].t="M",b<2&&(b=2));break;case"X":break;case"Z":b<1&&o[l].v.match(/[Hh]/)&&(b=1),b<2&&o[l].v.match(/[Mm]/)&&(b=2),b<3&&o[l].v.match(/[Ss]/)&&(b=3)}switch(b){case 0:break;case 1:n.u>=.5&&(n.u=0,++n.S),n.S>=60&&(n.S=0,++n.M),n.M>=60&&(n.M=0,++n.H);break;case 2:n.u>=.5&&(n.u=0,++n.S),n.S>=60&&(n.S=0,++n.M)}var v,w="";for(l=0;l<o.length;++l)switch(o[l].t){case"t":case"T":case" ":case"D":break;case"X":o[l].v="",o[l].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":o[l].v=Hr(o[l].t.charCodeAt(0),o[l].v,n,y),o[l].t="t";break;case"n":case"?":for(v=l+1;null!=o[v]&&("?"===(h=o[v].t)||"D"===h||(" "===h||"t"===h)&&null!=o[v+1]&&("?"===o[v+1].t||"t"===o[v+1].t&&"/"===o[v+1].v)||"("===o[l].t&&(" "===h||"n"===h||")"===h)||"t"===h&&("/"===o[v].v||" "===o[v].v&&null!=o[v+1]&&"?"==o[v+1].t));)o[l].v+=o[v].v,o[v]={v:"",t:";"},++v;w+=o[l].v,l=v-1;break;case"G":o[l].t="t",o[l].v=zr(t,r)}var A,S,x="";if(w.length>0){40==w.charCodeAt(0)?(A=t<0&&45===w.charCodeAt(0)?-t:t,S=aa("n",w,A)):(S=aa("n",w,A=t<0&&a>1?-t:t),A<0&&o[0]&&"t"==o[0].t&&(S=S.substr(1),o[0].v="-"+o[0].v)),v=S.length-1;var k=o.length;for(l=0;l<o.length;++l)if(null!=o[l]&&"t"!=o[l].t&&o[l].v.indexOf(".")>-1){k=l;break}var C=o.length;if(k===o.length&&-1===S.indexOf("E")){for(l=o.length-1;l>=0;--l)null!=o[l]&&-1!=="n?".indexOf(o[l].t)&&(v>=o[l].v.length-1?(v-=o[l].v.length,o[l].v=S.substr(v+1,o[l].v.length)):v<0?o[l].v="":(o[l].v=S.substr(0,v+1),v=-1),o[l].t="t",C=l);v>=0&&C<o.length&&(o[C].v=S.substr(0,v+1)+o[C].v)}else if(k!==o.length&&-1===S.indexOf("E")){for(v=S.indexOf(".")-1,l=k;l>=0;--l)if(null!=o[l]&&-1!=="n?".indexOf(o[l].t)){for(i=o[l].v.indexOf(".")>-1&&l===k?o[l].v.indexOf(".")-1:o[l].v.length-1,x=o[l].v.substr(i+1);i>=0;--i)v>=0&&("0"===o[l].v.charAt(i)||"#"===o[l].v.charAt(i))&&(x=S.charAt(v--)+x);o[l].v=x,o[l].t="t",C=l}for(v>=0&&C<o.length&&(o[C].v=S.substr(0,v+1)+o[C].v),v=S.indexOf(".")+1,l=k;l<o.length;++l)if(null!=o[l]&&(-1!=="n?(".indexOf(o[l].t)||l===k)){for(i=o[l].v.indexOf(".")>-1&&l===k?o[l].v.indexOf(".")+1:0,x=o[l].v.substr(0,i);i<o[l].v.length;++i)v<S.length&&(x+=S.charAt(v++));o[l].v=x,o[l].t="t",C=l}}}for(l=0;l<o.length;++l)null!=o[l]&&"n?".indexOf(o[l].t)>-1&&(A=a>1&&t<0&&l>0&&"-"===o[l-1].v?-t:t,o[l].v=aa(o[l].t,o[l].v,A),o[l].t="t");var _="";for(l=0;l!==o.length;++l)null!=o[l]&&(_+=o[l].v);return _}(n[1],t,r,n[0])}function ha(e,t){if("number"!=typeof t){t=+t||-1;for(var r=0;r<392;++r)if(null!=Pr[r]){if(Pr[r]==e){t=r;break}}else t<0&&(t=r);t<0&&(t=391)}return Pr[t]=e,t}function ua(){var e;e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',Pr=e}var da={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},fa=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;var pa=function(){var e={};e.version="1.2.0";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}();var r=function(e){var t=0,r=0,a=0,n="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(a=0;256!=a;++a)n[a]=e[a];for(a=0;256!=a;++a)for(r=e[a],t=256+a;t<4096;t+=256)r=n[t]=r>>>8^e[255&r];var i=[];for(a=1;16!=a;++a)i[a-1]="undefined"!=typeof Int32Array?n.subarray(256*a,256*a+256):n.slice(256*a,256*a+256);return i}(t),a=r[0],n=r[1],i=r[2],s=r[3],o=r[4],c=r[5],l=r[6],h=r[7],u=r[8],d=r[9],f=r[10],p=r[11],g=r[12],m=r[13],b=r[14];return e.table=t,e.bstr=function(e,r){for(var a=~r,n=0,i=e.length;n<i;)a=a>>>8^t[255&(a^e.charCodeAt(n++))];return~a},e.buf=function(e,r){for(var y=~r,v=e.length-15,w=0;w<v;)y=b[e[w++]^255&y]^m[e[w++]^y>>8&255]^g[e[w++]^y>>16&255]^p[e[w++]^y>>>24]^f[e[w++]]^d[e[w++]]^u[e[w++]]^h[e[w++]]^l[e[w++]]^c[e[w++]]^o[e[w++]]^s[e[w++]]^i[e[w++]]^n[e[w++]]^a[e[w++]]^t[e[w++]];for(v+=15;w<v;)y=y>>>8^t[255&(y^e[w++])];return~y},e.str=function(e,r){for(var a=~r,n=0,i=e.length,s=0,o=0;n<i;)(s=e.charCodeAt(n++))<128?a=a>>>8^t[255&(a^s)]:s<2048?a=(a=a>>>8^t[255&(a^(192|s>>6&31))])>>>8^t[255&(a^(128|63&s))]:s>=55296&&s<57344?(s=64+(1023&s),o=1023&e.charCodeAt(n++),a=(a=(a=(a=a>>>8^t[255&(a^(240|s>>8&7))])>>>8^t[255&(a^(128|s>>2&63))])>>>8^t[255&(a^(128|o>>6&15|(3&s)<<4))])>>>8^t[255&(a^(128|63&o))]):a=(a=(a=a>>>8^t[255&(a^(224|s>>12&15))])>>>8^t[255&(a^(128|s>>6&63))])>>>8^t[255&(a^(128|63&s))];return~a},e}(),ga=function(){var e,t={};function r(e){if("/"==e.charAt(e.length-1))return-1===e.slice(0,-1).indexOf("/")?e:r(e.slice(0,-1));var t=e.lastIndexOf("/");return-1===t?e:e.slice(0,t+1)}function a(e){if("/"==e.charAt(e.length-1))return a(e.slice(0,-1));var t=e.lastIndexOf("/");return-1===t?e:e.slice(t+1)}function n(e,t){"string"==typeof t&&(t=new Date(t));var r=t.getHours();r=(r=r<<6|t.getMinutes())<<5|t.getSeconds()>>>1,e.write_shift(2,r);var a=t.getFullYear()-1980;a=(a=a<<4|t.getMonth()+1)<<5|t.getDate(),e.write_shift(2,a)}function i(e){hi(e,0);for(var t={},r=0;e.l<=e.length-4;){var a=e.read_shift(2),n=e.read_shift(2),i=e.l+n,s={};if(21589===a)1&(r=e.read_shift(1))&&(s.mtime=e.read_shift(4)),n>5&&(2&r&&(s.atime=e.read_shift(4)),4&r&&(s.ctime=e.read_shift(4))),s.mtime&&(s.mt=new Date(1e3*s.mtime));e.l=i,t[a]=s}return t}function s(){return e||(e={})}function o(e,t){if(80==e[0]&&75==e[1])return ne(e,t);if(109==(32|e[0])&&105==(32|e[1]))return function(e,t){if("mime-version:"!=S(e.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var r=t&&t.root||"",a=(dr&&Buffer.isBuffer(e)?e.toString("binary"):S(e)).split("\r\n"),n=0,i="";for(n=0;n<a.length;++n)if(i=a[n],/^Content-Location:/i.test(i)&&(i=i.slice(i.indexOf("file")),r||(r=i.slice(0,i.lastIndexOf("/")+1)),i.slice(0,r.length)!=r))for(;r.length>0&&(r=(r=r.slice(0,r.length-1)).slice(0,r.lastIndexOf("/")+1),i.slice(0,r.length)!=r););var s=(a[1]||"").match(/boundary="(.*?)"/);if(!s)throw new Error("MAD cannot find boundary");var o="--"+(s[1]||""),c=[],l=[],h={FileIndex:c,FullPaths:l};d(h);var u,f=0;for(n=0;n<a.length;++n){var p=a[n];p!==o&&p!==o+"--"||(f++&&he(h,a.slice(u,n),r),u=n)}return h}(e,t);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var r,a,n,i,s,o,f=512,p=[],g=e.slice(0,512);hi(g,0);var m=function(e){if(80==e[e.l]&&75==e[e.l+1])return[0,0];e.chk(y,"Header Signature: "),e.l+=16;var t=e.read_shift(2,"u");return[e.read_shift(2,"u"),t]}(g);switch(r=m[0]){case 3:f=512;break;case 4:f=4096;break;case 0:if(0==m[1])return ne(e,t);default:throw new Error("Major Version: Expected 3 or 4 saw "+r)}512!==f&&hi(g=e.slice(0,f),28);var v=e.slice(0,f);!function(e,t){var r=9;switch(e.l+=2,r=e.read_shift(2)){case 9:if(3!=t)throw new Error("Sector Shift: Expected 9 saw "+r);break;case 12:if(4!=t)throw new Error("Sector Shift: Expected 12 saw "+r);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+r)}e.chk("0600","Mini Sector Shift: "),e.chk("000000000000","Reserved: ")}(g,r);var w=g.read_shift(4,"i");if(3===r&&0!==w)throw new Error("# Directory Sectors: Expected 0 saw "+w);g.l+=4,i=g.read_shift(4,"i"),g.l+=4,g.chk("00100000","Mini Stream Cutoff Size: "),s=g.read_shift(4,"i"),a=g.read_shift(4,"i"),o=g.read_shift(4,"i"),n=g.read_shift(4,"i");for(var A=-1,x=0;x<109&&!((A=g.read_shift(4,"i"))<0);++x)p[x]=A;var k=function(e,t){for(var r=Math.ceil(e.length/t)-1,a=[],n=1;n<r;++n)a[n-1]=e.slice(n*t,(n+1)*t);return a[r-1]=e.slice(r*t),a}(e,f);l(o,n,k,f,p);var C=function(e,t,r,a){var n=e.length,i=[],s=[],o=[],c=[],l=a-1,h=0,u=0,d=0,f=0;for(h=0;h<n;++h)if(o=[],(d=h+t)>=n&&(d-=n),!s[d]){c=[];var p=[];for(u=d;u>=0;){p[u]=!0,s[u]=!0,o[o.length]=u,c.push(e[u]);var g=r[Math.floor(4*u/a)];if(a<4+(f=4*u&l))throw new Error("FAT boundary crossed: "+u+" 4 "+a);if(!e[g])break;if(p[u=ri(e[g],f)])break}i[d]={nodes:o,data:Pn([c])}}return i}(k,i,p,f);C[i].name="!Directory",a>0&&s!==b&&(C[s].name="!MiniFAT"),C[p[0]].name="!FAT",C.fat_addrs=p,C.ssz=f;var _=[],T=[],E=[];!function(e,t,r,a,n,i,s,o){for(var l,d=0,f=a.length?2:0,p=t[e].data,g=0,m=0;g<p.length;g+=128){var y=p.slice(g,g+128);hi(y,64),m=y.read_shift(2),l=Mn(y,0,m-f),a.push(l);var v={name:l,type:y.read_shift(1),color:y.read_shift(1),L:y.read_shift(4,"i"),R:y.read_shift(4,"i"),C:y.read_shift(4,"i"),clsid:y.read_shift(16),state:y.read_shift(4,"i"),start:0,size:0};0!==y.read_shift(2)+y.read_shift(2)+y.read_shift(2)+y.read_shift(2)&&(v.ct=u(y,y.l-8)),0!==y.read_shift(2)+y.read_shift(2)+y.read_shift(2)+y.read_shift(2)&&(v.mt=u(y,y.l-8)),v.start=y.read_shift(4,"i"),v.size=y.read_shift(4,"i"),v.size<0&&v.start<0&&(v.size=v.type=0,v.start=b,v.name=""),5===v.type?(d=v.start,n>0&&d!==b&&(t[d].name="!StreamData")):v.size>=4096?(v.storage="fat",void 0===t[v.start]&&(t[v.start]=h(r,v.start,t.fat_addrs,t.ssz)),t[v.start].name=v.name,v.content=t[v.start].data.slice(0,v.size)):(v.storage="minifat",v.size<0?v.size=0:d!==b&&v.start!==b&&t[d]&&(v.content=c(v,t[d].data,(t[o]||{}).data))),v.content&&hi(v.content,0),i[l]=v,s.push(v)}}(i,C,k,_,a,{},T,s),function(e,t,r){for(var a=0,n=0,i=0,s=0,o=0,c=r.length,l=[],h=[];a<c;++a)l[a]=h[a]=a,t[a]=r[a];for(;o<h.length;++o)n=e[a=h[o]].L,i=e[a].R,s=e[a].C,l[a]===a&&(-1!==n&&l[n]!==n&&(l[a]=l[n]),-1!==i&&l[i]!==i&&(l[a]=l[i])),-1!==s&&(l[s]=a),-1!==n&&a!=l[a]&&(l[n]=l[a],h.lastIndexOf(n)<o&&h.push(n)),-1!==i&&a!=l[a]&&(l[i]=l[a],h.lastIndexOf(i)<o&&h.push(i));for(a=1;a<c;++a)l[a]===a&&(-1!==i&&l[i]!==i?l[a]=l[i]:-1!==n&&l[n]!==n&&(l[a]=l[n]));for(a=1;a<c;++a)if(0!==e[a].type){if((o=a)!=l[o])do{o=l[o],t[a]=t[o]+"/"+t[a]}while(0!==o&&-1!==l[o]&&o!=l[o]);l[a]=-1}for(t[0]+="/",a=1;a<c;++a)2!==e[a].type&&(t[a]+="/")}(T,E,_),_.shift();var O={FileIndex:T,FullPaths:E};return t&&t.raw&&(O.raw={header:v,sectors:k}),O}function c(e,t,r){for(var a=e.start,n=e.size,i=[],s=a;r&&n>0&&s>=0;)i.push(t.slice(s*m,s*m+m)),n-=m,s=ri(r,4*s);return 0===i.length?di(0):vr(i).slice(0,e.size)}function l(e,t,r,a,n){var i=b;if(e===b){if(0!==t)throw new Error("DIFAT chain shorter than expected")}else if(-1!==e){var s=r[e],o=(a>>>2)-1;if(!s)return;for(var c=0;c<o&&(i=ri(s,4*c))!==b;++c)n.push(i);l(ri(s,a-4),t-1,r,a,n)}}function h(e,t,r,a,n){var i=[],s=[];n||(n=[]);var o=a-1,c=0,l=0;for(c=t;c>=0;){n[c]=!0,i[i.length]=c,s.push(e[c]);var h=r[Math.floor(4*c/a)];if(a<4+(l=4*c&o))throw new Error("FAT boundary crossed: "+c+" 4 "+a);if(!e[h])break;c=ri(e[h],l)}return{nodes:i,data:Pn([s])}}function u(e,t){return new Date(1e3*(ti(e,t+4)/1e7*Math.pow(2,32)+ti(e,t)/1e7-11644473600))}function d(e,t){var r=t||{},a=r.root||"Root Entry";if(e.FullPaths||(e.FullPaths=[]),e.FileIndex||(e.FileIndex=[]),e.FullPaths.length!==e.FileIndex.length)throw new Error("inconsistent CFB structure");0===e.FullPaths.length&&(e.FullPaths[0]=a+"/",e.FileIndex[0]={name:a,type:5}),r.CLSID&&(e.FileIndex[0].clsid=r.CLSID),function(e){var t="Sh33tJ5";if(ga.find(e,"/"+t))return;var r=di(4);r[0]=55,r[1]=r[3]=50,r[2]=54,e.FileIndex.push({name:t,type:2,content:r,size:4,L:69,R:69,C:69}),e.FullPaths.push(e.FullPaths[0]+t),f(e)}(e)}function f(e,t){d(e);for(var n=!1,i=!1,s=e.FullPaths.length-1;s>=0;--s){var o=e.FileIndex[s];switch(o.type){case 0:i?n=!0:(e.FileIndex.pop(),e.FullPaths.pop());break;case 1:case 2:case 5:i=!0,isNaN(o.R*o.L*o.C)&&(n=!0),o.R>-1&&o.L>-1&&o.R==o.L&&(n=!0);break;default:n=!0}}if(n||t){var c=new Date(1987,1,19),l=0,h=Object.create?Object.create(null):{},u=[];for(s=0;s<e.FullPaths.length;++s)h[e.FullPaths[s]]=!0,0!==e.FileIndex[s].type&&u.push([e.FullPaths[s],e.FileIndex[s]]);for(s=0;s<u.length;++s){var f=r(u[s][0]);(i=h[f])||(u.push([f,{name:a(f).replace("/",""),type:1,clsid:w,ct:c,mt:c,content:null}]),h[f]=!0)}for(u.sort((function(e,t){return function(e,t){for(var r=e.split("/"),a=t.split("/"),n=0,i=0,s=Math.min(r.length,a.length);n<s;++n){if(i=r[n].length-a[n].length)return i;if(r[n]!=a[n])return r[n]<a[n]?-1:1}return r.length-a.length}(e[0],t[0])})),e.FullPaths=[],e.FileIndex=[],s=0;s<u.length;++s)e.FullPaths[s]=u[s][0],e.FileIndex[s]=u[s][1];for(s=0;s<u.length;++s){var p=e.FileIndex[s],g=e.FullPaths[s];if(p.name=a(g).replace("/",""),p.L=p.R=p.C=-(p.color=1),p.size=p.content?p.content.length:0,p.start=0,p.clsid=p.clsid||w,0===s)p.C=u.length>1?1:-1,p.size=0,p.type=5;else if("/"==g.slice(-1)){for(l=s+1;l<u.length&&r(e.FullPaths[l])!=g;++l);for(p.C=l>=u.length?-1:l,l=s+1;l<u.length&&r(e.FullPaths[l])!=r(g);++l);p.R=l>=u.length?-1:l,p.type=1}else r(e.FullPaths[s+1]||"")==r(g)&&(p.R=s+1),p.type=2}}}function p(e,t){var r=t||{};if("mad"==r.fileType)return function(e,t){for(var r=t||{},a=r.boundary||"SheetJS",n=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(a="------="+a).slice(2)+'"',"","",""],i=e.FullPaths[0],s=i,o=e.FileIndex[0],c=1;c<e.FullPaths.length;++c)if(s=e.FullPaths[c].slice(i.length),(o=e.FileIndex[c]).size&&o.content&&"Sh33tJ5"!=s){s=s.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,(function(e){return"_x"+e.charCodeAt(0).toString(16)+"_"})).replace(/[\u0080-\uFFFF]/g,(function(e){return"_u"+e.charCodeAt(0).toString(16)+"_"}));for(var l=o.content,h=dr&&Buffer.isBuffer(l)?l.toString("binary"):S(l),u=0,d=Math.min(1024,h.length),f=0,p=0;p<=d;++p)(f=h.charCodeAt(p))>=32&&f<128&&++u;var g=u>=4*d/5;n.push(a),n.push("Content-Location: "+(r.root||"file:///C:/SheetJS/")+s),n.push("Content-Transfer-Encoding: "+(g?"quoted-printable":"base64")),n.push("Content-Type: "+oe(o,s)),n.push(""),n.push(g?le(h):ce(h))}return n.push(a+"--\r\n"),n.join("\r\n")}(e,r);if(f(e),"zip"===r.fileType)return function(e,t){var r=t||{},a=[],i=[],s=di(1),o=r.compression?8:0,c=0;0;var l=0,h=0,u=0,d=0,f=e.FullPaths[0],p=f,g=e.FileIndex[0],m=[],b=0;for(l=1;l<e.FullPaths.length;++l)if(p=e.FullPaths[l].slice(f.length),(g=e.FileIndex[l]).size&&g.content&&"Sh33tJ5"!=p){var y=u,v=di(p.length);for(h=0;h<p.length;++h)v.write_shift(1,127&p.charCodeAt(h));v=v.slice(0,v.l),m[d]=pa.buf(g.content,0);var w=g.content;8==o&&(w=x(w)),(s=di(30)).write_shift(4,67324752),s.write_shift(2,20),s.write_shift(2,c),s.write_shift(2,o),g.mt?n(s,g.mt):s.write_shift(4,0),s.write_shift(-4,8&c?0:m[d]),s.write_shift(4,8&c?0:w.length),s.write_shift(4,8&c?0:g.content.length),s.write_shift(2,v.length),s.write_shift(2,0),u+=s.length,a.push(s),u+=v.length,a.push(v),u+=w.length,a.push(w),8&c&&((s=di(12)).write_shift(-4,m[d]),s.write_shift(4,w.length),s.write_shift(4,g.content.length),u+=s.l,a.push(s)),(s=di(46)).write_shift(4,33639248),s.write_shift(2,0),s.write_shift(2,20),s.write_shift(2,c),s.write_shift(2,o),s.write_shift(4,0),s.write_shift(-4,m[d]),s.write_shift(4,w.length),s.write_shift(4,g.content.length),s.write_shift(2,v.length),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(4,0),s.write_shift(4,y),b+=s.l,i.push(s),b+=v.length,i.push(v),++d}return s=di(22),s.write_shift(4,101010256),s.write_shift(2,0),s.write_shift(2,0),s.write_shift(2,d),s.write_shift(2,d),s.write_shift(4,b),s.write_shift(4,u),s.write_shift(2,0),vr([vr(a),vr(i),s])}(e,r);var a=function(e){for(var t=0,r=0,a=0;a<e.FileIndex.length;++a){var n=e.FileIndex[a];if(n.content){var i=n.content.length;i>0&&(i<4096?t+=i+63>>6:r+=i+511>>9)}}for(var s=e.FullPaths.length+3>>2,o=t+127>>7,c=(t+7>>3)+r+s+o,l=c+127>>7,h=l<=109?0:Math.ceil((l-109)/127);c+l+h+127>>7>l;)h=++l<=109?0:Math.ceil((l-109)/127);var u=[1,h,l,o,s,r,t,0];return e.FileIndex[0].size=t<<6,u[7]=(e.FileIndex[0].start=u[0]+u[1]+u[2]+u[3]+u[4]+u[5])+(u[6]+7>>3),u}(e),i=di(a[7]<<9),s=0,o=0;for(s=0;s<8;++s)i.write_shift(1,v[s]);for(s=0;s<8;++s)i.write_shift(2,0);for(i.write_shift(2,62),i.write_shift(2,3),i.write_shift(2,65534),i.write_shift(2,9),i.write_shift(2,6),s=0;s<3;++s)i.write_shift(2,0);for(i.write_shift(4,0),i.write_shift(4,a[2]),i.write_shift(4,a[0]+a[1]+a[2]+a[3]-1),i.write_shift(4,0),i.write_shift(4,4096),i.write_shift(4,a[3]?a[0]+a[1]+a[2]-1:b),i.write_shift(4,a[3]),i.write_shift(-4,a[1]?a[0]-1:b),i.write_shift(4,a[1]),s=0;s<109;++s)i.write_shift(-4,s<a[2]?a[1]+s:-1);if(a[1])for(o=0;o<a[1];++o){for(;s<236+127*o;++s)i.write_shift(-4,s<a[2]?a[1]+s:-1);i.write_shift(-4,o===a[1]-1?b:o+1)}var c=function(e){for(o+=e;s<o-1;++s)i.write_shift(-4,s+1);e&&(++s,i.write_shift(-4,b))};for(o=s=0,o+=a[1];s<o;++s)i.write_shift(-4,A.DIFSECT);for(o+=a[2];s<o;++s)i.write_shift(-4,A.FATSECT);c(a[3]),c(a[4]);for(var l=0,h=0,u=e.FileIndex[0];l<e.FileIndex.length;++l)(u=e.FileIndex[l]).content&&((h=u.content.length)<4096||(u.start=o,c(h+511>>9)));for(c(a[6]+7>>3);511&i.l;)i.write_shift(-4,A.ENDOFCHAIN);for(o=s=0,l=0;l<e.FileIndex.length;++l)(u=e.FileIndex[l]).content&&(!(h=u.content.length)||h>=4096||(u.start=o,c(h+63>>6)));for(;511&i.l;)i.write_shift(-4,A.ENDOFCHAIN);for(s=0;s<a[4]<<2;++s){var d=e.FullPaths[s];if(d&&0!==d.length){u=e.FileIndex[s],0===s&&(u.start=u.size?u.start-1:b);var p=0===s&&r.root||u.name;if(h=2*(p.length+1),i.write_shift(64,p,"utf16le"),i.write_shift(2,h),i.write_shift(1,u.type),i.write_shift(1,u.color),i.write_shift(-4,u.L),i.write_shift(-4,u.R),i.write_shift(-4,u.C),u.clsid)i.write_shift(16,u.clsid,"hex");else for(l=0;l<4;++l)i.write_shift(4,0);i.write_shift(4,u.state||0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,u.start),i.write_shift(4,u.size),i.write_shift(4,0)}else{for(l=0;l<17;++l)i.write_shift(4,0);for(l=0;l<3;++l)i.write_shift(4,-1);for(l=0;l<12;++l)i.write_shift(4,0)}}for(s=1;s<e.FileIndex.length;++s)if((u=e.FileIndex[s]).size>=4096)if(i.l=u.start+1<<9,dr&&Buffer.isBuffer(u.content))u.content.copy(i,i.l,0,u.size),i.l+=u.size+511&-512;else{for(l=0;l<u.size;++l)i.write_shift(1,u.content[l]);for(;511&l;++l)i.write_shift(1,0)}for(s=1;s<e.FileIndex.length;++s)if((u=e.FileIndex[s]).size>0&&u.size<4096)if(dr&&Buffer.isBuffer(u.content))u.content.copy(i,i.l,0,u.size),i.l+=u.size+63&-64;else{for(l=0;l<u.size;++l)i.write_shift(1,u.content[l]);for(;63&l;++l)i.write_shift(1,0)}if(dr)i.l=i.length;else for(;i.l<i.length;)i.write_shift(1,0);return i}t.version="1.2.1";var g,m=64,b=-2,y="d0cf11e0a1b11ae1",v=[208,207,17,224,161,177,26,225],w="00000000000000000000000000000000",A={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:b,FREESECT:-1,HEADER_SIGNATURE:y,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:w,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function S(e){for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function x(e){return g?g.deflateRawSync(e):K(e)}var k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],C=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],_=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];for(var T,E,O="undefined"!=typeof Uint8Array,F=O?new Uint8Array(256):[],P=0;P<256;++P)F[P]=(E=void 0,255&((E=139536&((T=P)<<1|T<<11)|558144&(T<<5|T<<15))>>16|E>>8|E));function I(e,t){var r=F[255&e];return t<=8?r>>>8-t:(r=r<<8|F[e>>8&255],t<=16?r>>>16-t:(r=r<<8|F[e>>16&255])>>>24-t)}function M(e,t){var r=7&t,a=t>>>3;return(e[a]|(r<=6?0:e[a+1]<<8))>>>r&3}function R(e,t){var r=7&t,a=t>>>3;return(e[a]|(r<=5?0:e[a+1]<<8))>>>r&7}function D(e,t){var r=7&t,a=t>>>3;return(e[a]|(r<=3?0:e[a+1]<<8))>>>r&31}function N(e,t){var r=7&t,a=t>>>3;return(e[a]|(r<=1?0:e[a+1]<<8))>>>r&127}function L(e,t,r){var a=7&t,n=t>>>3,i=(1<<r)-1,s=e[n]>>>a;return r<8-a?s&i:(s|=e[n+1]<<8-a,r<16-a?s&i:(s|=e[n+2]<<16-a,r<24-a?s&i:(s|=e[n+3]<<24-a)&i))}function B(e,t,r){var a=7&t,n=t>>>3;return a<=5?e[n]|=(7&r)<<a:(e[n]|=r<<a&255,e[n+1]=(7&r)>>8-a),t+3}function j(e,t,r){return r=(1&r)<<(7&t),e[t>>>3]|=r,t+1}function $(e,t,r){var a=t>>>3;return r<<=7&t,e[a]|=255&r,r>>>=8,e[a+1]=r,t+8}function U(e,t,r){var a=t>>>3;return r<<=7&t,e[a]|=255&r,r>>>=8,e[a+1]=255&r,e[a+2]=r>>>8,t+16}function z(e,t){var r=e.length,a=2*r>t?2*r:t+5,n=0;if(r>=t)return e;if(dr){var i=gr(a);if(e.copy)e.copy(i);else for(;n<e.length;++n)i[n]=e[n];return i}if(O){var s=new Uint8Array(a);if(s.set)s.set(e);else for(;n<r;++n)s[n]=e[n];return s}return e.length=a,e}function H(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=0;return t}function X(e,t,r){var a=1,n=0,i=0,s=0,o=0,c=e.length,l=O?new Uint16Array(32):H(32);for(i=0;i<32;++i)l[i]=0;for(i=c;i<r;++i)e[i]=0;c=e.length;var h=O?new Uint16Array(c):H(c);for(i=0;i<c;++i)l[n=e[i]]++,a<n&&(a=n),h[i]=0;for(l[0]=0,i=1;i<=a;++i)l[i+16]=o=o+l[i-1]<<1;for(i=0;i<c;++i)0!=(o=e[i])&&(h[i]=l[o+16]++);var u=0;for(i=0;i<c;++i)if(0!=(u=e[i]))for(o=I(h[i],a)>>a-u,s=(1<<a+4-u)-1;s>=0;--s)t[o|s<<u]=15&u|i<<4;return a}var W=O?new Uint16Array(512):H(512),G=O?new Uint16Array(32):H(32);if(!O){for(var q=0;q<512;++q)W[q]=0;for(q=0;q<32;++q)G[q]=0}!function(){for(var e=[],t=0;t<32;t++)e.push(5);X(e,G,32);var r=[];for(t=0;t<=143;t++)r.push(8);for(;t<=255;t++)r.push(9);for(;t<=279;t++)r.push(7);for(;t<=287;t++)r.push(8);X(r,W,288)}();var V=function(){for(var e=O?new Uint8Array(32768):[],t=0,r=0;t<_.length-1;++t)for(;r<_[t+1];++r)e[r]=t;for(;r<32768;++r)e[r]=29;var a=O?new Uint8Array(259):[];for(t=0,r=0;t<C.length-1;++t)for(;r<C[t+1];++r)a[r]=t;return function(t,r){return t.length<8?function(e,t){for(var r=0;r<e.length;){var a=Math.min(65535,e.length-r),n=r+a==e.length;for(t.write_shift(1,+n),t.write_shift(2,a),t.write_shift(2,65535&~a);a-- >0;)t[t.l++]=e[r++]}return t.l}(t,r):function(t,r){for(var n=0,i=0,s=O?new Uint16Array(32768):[];i<t.length;){var o=Math.min(65535,t.length-i);if(o<10){for(7&(n=B(r,n,+!(i+o!=t.length)))&&(n+=8-(7&n)),r.l=n/8|0,r.write_shift(2,o),r.write_shift(2,65535&~o);o-- >0;)r[r.l++]=t[i++];n=8*r.l}else{n=B(r,n,+!(i+o!=t.length)+2);for(var c=0;o-- >0;){var l=t[i],h=-1,u=0;if((h=s[c=32767&(c<<5^l)])&&((h|=-32768&i)>i&&(h-=32768),h<i))for(;t[h+u]==t[i+u]&&u<250;)++u;if(u>2){(l=a[u])<=22?n=$(r,n,F[l+1]>>1)-1:($(r,n,3),$(r,n+=5,F[l-23]>>5),n+=3);var d=l<8?0:l-4>>2;d>0&&(U(r,n,u-C[l]),n+=d),l=e[i-h],n=$(r,n,F[l]>>3),n-=3;var f=l<4?0:l-2>>1;f>0&&(U(r,n,i-h-_[l]),n+=f);for(var p=0;p<u;++p)s[c]=32767&i,c=32767&(c<<5^t[i]),++i;o-=u-1}else l<=143?l+=48:n=j(r,n,1),n=$(r,n,F[l]),s[c]=32767&i,++i}n=$(r,n,0)-1}}return r.l=(n+7)/8|0,r.l}(t,r)}}();function K(e){var t=di(50+Math.floor(1.1*e.length)),r=V(e,t);return t.slice(0,r)}var Y=O?new Uint16Array(32768):H(32768),Z=O?new Uint16Array(32768):H(32768),J=O?new Uint16Array(128):H(128),Q=1,ee=1;function te(e,t){var r=D(e,t)+257,a=D(e,t+=5)+1,n=function(e,t){var r=7&t,a=t>>>3;return(e[a]|(r<=4?0:e[a+1]<<8))>>>r&15}(e,t+=5)+4;t+=4;for(var i=0,s=O?new Uint8Array(19):H(19),o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=1,l=O?new Uint8Array(8):H(8),h=O?new Uint8Array(8):H(8),u=s.length,d=0;d<n;++d)s[k[d]]=i=R(e,t),c<i&&(c=i),l[i]++,t+=3;var f=0;for(l[0]=0,d=1;d<=c;++d)h[d]=f=f+l[d-1]<<1;for(d=0;d<u;++d)0!=(f=s[d])&&(o[d]=h[f]++);var p=0;for(d=0;d<u;++d)if(0!=(p=s[d])){f=F[o[d]]>>8-p;for(var g=(1<<7-p)-1;g>=0;--g)J[f|g<<p]=7&p|d<<3}var m=[];for(c=1;m.length<r+a;)switch(t+=7&(f=J[N(e,t)]),f>>>=3){case 16:for(i=3+M(e,t),t+=2,f=m[m.length-1];i-- >0;)m.push(f);break;case 17:for(i=3+R(e,t),t+=3;i-- >0;)m.push(0);break;case 18:for(i=11+N(e,t),t+=7;i-- >0;)m.push(0);break;default:m.push(f),c<f&&(c=f)}var b=m.slice(0,r),y=m.slice(r);for(d=r;d<286;++d)b[d]=0;for(d=a;d<30;++d)y[d]=0;return Q=X(b,Y,286),ee=X(y,Z,30),t}function re(e,t){var r=function(e,t){if(3==e[0]&&!(3&e[1]))return[pr(t),2];for(var r=0,a=0,n=gr(t||1<<18),i=0,s=n.length>>>0,o=0,c=0;!(1&a);)if(a=R(e,r),r+=3,a>>>1!=0)for(a>>1==1?(o=9,c=5):(r=te(e,r),o=Q,c=ee);;){!t&&s<i+32767&&(s=(n=z(n,i+32767)).length);var l=L(e,r,o),h=a>>>1==1?W[l]:Y[l];if(r+=15&h,(h>>>=4)>>>8&255){if(256==h)break;var u=(h-=257)<8?0:h-4>>2;u>5&&(u=0);var d=i+C[h];u>0&&(d+=L(e,r,u),r+=u),l=L(e,r,c),r+=15&(h=a>>>1==1?G[l]:Z[l]);var f=(h>>>=4)<4?0:h-2>>1,p=_[h];for(f>0&&(p+=L(e,r,f),r+=f),!t&&s<d&&(s=(n=z(n,d+100)).length);i<d;)n[i]=n[i-p],++i}else n[i++]=h}else{7&r&&(r+=8-(7&r));var g=e[r>>>3]|e[1+(r>>>3)]<<8;if(r+=32,g>0)for(!t&&s<i+g&&(s=(n=z(n,i+g)).length);g-- >0;)n[i++]=e[r>>>3],r+=8}return t?[n,r+7>>>3]:[n.slice(0,i),r+7>>>3]}(e.slice(e.l||0),t);return e.l+=r[1],r[0]}function ae(e,t){if(!e)throw new Error(t);"undefined"!=typeof console&&console.error(t)}function ne(e,t){var r=e;hi(r,0);var a={FileIndex:[],FullPaths:[]};d(a,{root:t.root});for(var n=r.length-4;(80!=r[n]||75!=r[n+1]||5!=r[n+2]||6!=r[n+3])&&n>=0;)--n;r.l=n+4,r.l+=4;var s=r.read_shift(2);r.l+=6;var o=r.read_shift(4);for(r.l=o,n=0;n<s;++n){r.l+=20;var c=r.read_shift(4),l=r.read_shift(4),h=r.read_shift(2),u=r.read_shift(2),f=r.read_shift(2);r.l+=8;var p=r.read_shift(4),g=i(r.slice(r.l+h,r.l+h+u));r.l+=h+u+f;var m=r.l;r.l=p+4,ie(r,c,l,a,g),r.l=m}return a}function ie(e,t,r,a,n){e.l+=2;var s=e.read_shift(2),o=e.read_shift(2),c=function(e){var t=65535&e.read_shift(2),r=65535&e.read_shift(2),a=new Date,n=31&r,i=15&(r>>>=5);r>>>=4,a.setMilliseconds(0),a.setFullYear(r+1980),a.setMonth(i-1),a.setDate(n);var s=31&t,o=63&(t>>>=5);return t>>>=6,a.setHours(t),a.setMinutes(o),a.setSeconds(s<<1),a}(e);if(8257&s)throw new Error("Unsupported ZIP encryption");e.read_shift(4);for(var l=e.read_shift(4),h=e.read_shift(4),u=e.read_shift(2),d=e.read_shift(2),f="",p=0;p<u;++p)f+=String.fromCharCode(e[e.l++]);if(d){var m=i(e.slice(e.l,e.l+d));(m[21589]||{}).mt&&(c=m[21589].mt),((n||{})[21589]||{}).mt&&(c=n[21589].mt)}e.l+=d;var b=e.slice(e.l,e.l+l);switch(o){case 8:b=function(e,t){if(!g)return re(e,t);var r=new(0,g.InflateRaw),a=r._processChunk(e.slice(e.l),r._finishFlushFlag);return e.l+=r.bytesRead,a}(e,h);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+o)}var y=!1;8&s&&(134695760==e.read_shift(4)&&(e.read_shift(4),y=!0),l=e.read_shift(4),h=e.read_shift(4)),l!=t&&ae(y,"Bad compressed size: "+t+" != "+l),h!=r&&ae(y,"Bad uncompressed size: "+r+" != "+h),ue(a,f,b,{unsafe:!0,mt:c})}var se={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function oe(e,t){if(e.ctype)return e.ctype;var r=e.name||"",a=r.match(/\.([^\.]+)$/);return a&&se[a[1]]||t&&(a=(r=t).match(/[\.\\]([^\.\\])+$/))&&se[a[1]]?se[a[1]]:"application/octet-stream"}function ce(e){for(var t=hr(e),r=[],a=0;a<t.length;a+=76)r.push(t.slice(a,a+76));return r.join("\r\n")+"\r\n"}function le(e){var t=e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,(function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"="+(1==t.length?"0"+t:t)}));"\n"==(t=t.replace(/ $/gm,"=20").replace(/\t$/gm,"=09")).charAt(0)&&(t="=0D"+t.slice(1));for(var r=[],a=(t=t.replace(/\r(?!\n)/gm,"=0D").replace(/\n\n/gm,"\n=0A").replace(/([^\r\n])\n/gm,"$1=0A")).split("\r\n"),n=0;n<a.length;++n){var i=a[n];if(0!=i.length)for(var s=0;s<i.length;){var o=76,c=i.slice(s,s+o);"="==c.charAt(o-1)?o--:"="==c.charAt(o-2)?o-=2:"="==c.charAt(o-3)&&(o-=3),c=i.slice(s,s+o),(s+=o)<i.length&&(c+="="),r.push(c)}else r.push("")}return r.join("\r\n")}function he(e,t,r){for(var a,n="",i="",s="",o=0;o<10;++o){var c=t[o];if(!c||c.match(/^\s*$/))break;var l=c.match(/^(.*?):\s*([^\s].*)$/);if(l)switch(l[1].toLowerCase()){case"content-location":n=l[2].trim();break;case"content-type":s=l[2].trim();break;case"content-transfer-encoding":i=l[2].trim()}}switch(++o,i.toLowerCase()){case"base64":a=mr(ur(t.slice(o).join("")));break;case"quoted-printable":a=function(e){for(var t=[],r=0;r<e.length;++r){for(var a=e[r];r<=e.length&&"="==a.charAt(a.length-1);)a=a.slice(0,a.length-1)+e[++r];t.push(a)}for(var n=0;n<t.length;++n)t[n]=t[n].replace(/[=][0-9A-Fa-f]{2}/g,(function(e){return String.fromCharCode(parseInt(e.slice(1),16))}));return mr(t.join("\r\n"))}(t.slice(o));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+i)}var h=ue(e,n.slice(r.length),a,{unsafe:!0});s&&(h.ctype=s)}function ue(e,t,r,n){var i=n&&n.unsafe;i||d(e);var s=!i&&ga.find(e,t);if(!s){var o=e.FullPaths[0];t.slice(0,o.length)==o?o=t:("/"!=o.slice(-1)&&(o+="/"),o=(o+t).replace("//","/")),s={name:a(t),type:2},e.FileIndex.push(s),e.FullPaths.push(o),i||ga.utils.cfb_gc(e)}return s.content=r,s.size=r?r.length:0,n&&(n.CLSID&&(s.clsid=n.CLSID),n.mt&&(s.mt=n.mt),n.ct&&(s.ct=n.ct)),s}return t.find=function(e,t){var r=e.FullPaths.map((function(e){return e.toUpperCase()})),a=r.map((function(e){var t=e.split("/");return t[t.length-("/"==e.slice(-1)?2:1)]})),n=!1;47===t.charCodeAt(0)?(n=!0,t=r[0].slice(0,-1)+t):n=-1!==t.indexOf("/");var i=t.toUpperCase(),s=!0===n?r.indexOf(i):a.indexOf(i);if(-1!==s)return e.FileIndex[s];var o=!i.match(Ar);for(i=i.replace(wr,""),o&&(i=i.replace(Ar,"!")),s=0;s<r.length;++s){if((o?r[s].replace(Ar,"!"):r[s]).replace(wr,"")==i)return e.FileIndex[s];if((o?a[s].replace(Ar,"!"):a[s]).replace(wr,"")==i)return e.FileIndex[s]}return null},t.read=function(t,r){var a=r&&r.type;switch(a||dr&&Buffer.isBuffer(t)&&(a="buffer"),a||"base64"){case"file":return function(t,r){return s(),o(e.readFileSync(t),r)}(t,r);case"base64":return o(mr(ur(t)),r);case"binary":return o(mr(t),r)}return o(t,r)},t.parse=o,t.write=function(t,r){var a=p(t,r);switch(r&&r.type||"buffer"){case"file":return s(),e.writeFileSync(r.filename,a),a;case"binary":return"string"==typeof a?a:S(a);case"base64":return hr("string"==typeof a?a:S(a));case"buffer":if(dr)return Buffer.isBuffer(a)?a:fr(a);case"array":return"string"==typeof a?mr(a):a}return a},t.writeFile=function(t,r,a){s();var n=p(t,a);e.writeFileSync(r,n)},t.utils={cfb_new:function(e){var t={};return d(t,e),t},cfb_add:ue,cfb_del:function(e,t){d(e);var r=ga.find(e,t);if(r)for(var a=0;a<e.FileIndex.length;++a)if(e.FileIndex[a]==r)return e.FileIndex.splice(a,1),e.FullPaths.splice(a,1),!0;return!1},cfb_mov:function(e,t,r){d(e);var n=ga.find(e,t);if(n)for(var i=0;i<e.FileIndex.length;++i)if(e.FileIndex[i]==n)return e.FileIndex[i].name=a(r),e.FullPaths[i]=r,!0;return!1},cfb_gc:function(e){f(e,!0)},ReadShift:ni,CheckField:li,prep_blob:hi,bconcat:vr,use_zlib:function(e){try{var t=new(0,e.InflateRaw);if(t._processChunk(new Uint8Array([3,0]),t._finishFlushFlag),!t.bytesRead)throw new Error("zlib does not expose bytesRead");g=e}catch(e){console.error("cannot use native zlib: "+(e.message||e))}},_deflateRaw:K,_inflateRaw:re,consts:A},t}();let ma;function ba(e){for(var t=Object.keys(e),r=[],a=0;a<t.length;++a)Object.prototype.hasOwnProperty.call(e,t[a])&&r.push(t[a]);return r}function ya(e){for(var t=[],r=ba(e),a=0;a!==r.length;++a)t[e[r[a]]]=r[a];return t}var va=new Date(1899,11,30,0,0,0);function wa(e,t){var r=e.getTime();return t&&(r-=1263168e5),(r-(va.getTime()+6e4*(e.getTimezoneOffset()-va.getTimezoneOffset())))/864e5}var Aa=new Date,Sa=va.getTime()+6e4*(Aa.getTimezoneOffset()-va.getTimezoneOffset()),xa=Aa.getTimezoneOffset();function ka(e){var t=new Date;return t.setTime(24*e*60*60*1e3+Sa),t.getTimezoneOffset()!==xa&&t.setTime(t.getTime()+6e4*(t.getTimezoneOffset()-xa)),t}function Ca(e){var t=0,r=0,a=!1,n=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!n)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=1;i!=n.length;++i)if(n[i]){switch(r=1,i>3&&(a=!0),n[i].slice(n[i].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+n[i].slice(n[i].length-1));case"D":r*=24;case"H":r*=60;case"M":if(!a)throw new Error("Unsupported ISO Duration Field: M");r*=60}t+=r*parseInt(n[i],10)}return t}var _a=new Date("2017-02-19T19:06:09.000Z"),Ta=isNaN(_a.getFullYear())?new Date("2/19/17"):_a,Ea=2017==Ta.getFullYear();function Oa(e,t){var r=new Date(e);if(Ea)return t>0?r.setTime(r.getTime()+60*r.getTimezoneOffset()*1e3):t<0&&r.setTime(r.getTime()-60*r.getTimezoneOffset()*1e3),r;if(e instanceof Date)return e;if(1917==Ta.getFullYear()&&!isNaN(r.getFullYear())){var a=r.getFullYear();return e.indexOf(""+a)>-1||r.setFullYear(r.getFullYear()+100),r}var n=e.match(/\d+/g)||["2017","2","19","0","0","0"],i=new Date(+n[0],+n[1]-1,+n[2],+n[3]||0,+n[4]||0,+n[5]||0);return e.indexOf("Z")>-1&&(i=new Date(i.getTime()-60*i.getTimezoneOffset()*1e3)),i}function Fa(e,t){if(dr&&Buffer.isBuffer(e)){if(t){if(255==e[0]&&254==e[1])return mn(e.slice(2).toString("utf16le"));if(254==e[1]&&255==e[2])return mn(nr(e.slice(2).toString("binary")))}return e.toString("binary")}if("undefined"!=typeof TextDecoder)try{if(t){if(255==e[0]&&254==e[1])return mn(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return mn(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"€":"","‚":"",ƒ:"","„":"","…":"","†":"","‡":"",ˆ:"","‰":"",Š:"","‹":"",Œ:"",Ž:"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"",š:"","›":"",œ:"",ž:"",Ÿ:""};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,(function(e){return r[e]||e}))}catch(e){}for(var a=[],n=0;n!=e.length;++n)a.push(String.fromCharCode(e[n]));return a.join("")}function Pa(e){if("undefined"!=typeof JSON&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if("object"!=typeof e||null==e)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=Pa(e[r]));return t}function Ia(e,t){for(var r="";r.length<t;)r+=e;return r}function Ma(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,a=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,(function(){return r*=100,""}));return isNaN(t=Number(a))?(a=a.replace(/[(](.*)[)]/,(function(e,t){return r=-r,t})),isNaN(t=Number(a))?t:t/r):t/r}var Ra=["january","february","march","april","may","june","july","august","september","october","november","december"];function Da(e){var t=new Date(e),r=new Date(NaN),a=t.getYear(),n=t.getMonth(),i=t.getDate();if(isNaN(i))return r;var s=e.toLowerCase();if(s.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if((s=s.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"")).length>3&&-1==Ra.indexOf(s))return r}else if(s.match(/[a-z]/))return r;return a<0||a>8099?r:(n>0||i>1)&&101!=a?t:e.match(/[^-0-9:,\/\\]/)?r:t}var Na=function(){var e=5=="abacaba".split(/(:?b)/i).length;return function(t,r,a){if(e||"string"==typeof r)return t.split(r);for(var n=t.split(r),i=[n[0]],s=1;s<n.length;++s)i.push(a),i.push(n[s]);return i}}();function La(e){return e?e.content&&e.type?Fa(e.content,!0):e.data?sr(e.data):e.asNodeBuffer&&dr?sr(e.asNodeBuffer().toString("binary")):e.asBinary?sr(e.asBinary()):e._data&&e._data.getContent?sr(Fa(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function Ba(e){if(!e)return null;if(e.data)return ar(e.data);if(e.asNodeBuffer&&dr)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return"string"==typeof t?ar(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function ja(e,t){for(var r=e.FullPaths||ba(e.files),a=t.toLowerCase().replace(/[\/]/g,"\\"),n=a.replace(/\\/g,"/"),i=0;i<r.length;++i){var s=r[i].replace(/^Root Entry[\/]/,"").toLowerCase();if(a==s||n==s)return e.files?e.files[r[i]]:e.FileIndex[i]}return null}function $a(e,t){var r=ja(e,t);if(null==r)throw new Error("Cannot find file "+t+" in zip");return r}function Ua(e,t,r){if(!r)return(a=$a(e,t))&&".bin"===a.name.slice(-4)?Ba(a):La(a);var a;if(!t)return null;try{return Ua(e,t)}catch(e){return null}}function za(e,t,r){if(!r)return La($a(e,t));if(!t)return null;try{return za(e,t)}catch(e){return null}}function Ha(e,t,r){if(!r)return Ba($a(e,t));if(!t)return null;try{return Ha(e,t)}catch(e){return null}}function Xa(e){for(var t=e.FullPaths||ba(e.files),r=[],a=0;a<t.length;++a)"/"!=t[a].slice(-1)&&r.push(t[a].replace(/^Root Entry[\/]/,""));return r.sort()}function Wa(e,t,r){if(e.FullPaths){var a;if("string"==typeof r)return a=dr?fr(r):function(e){for(var t=[],r=0,a=e.length+250,n=pr(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)n[r++]=s;else if(s<2048)n[r++]=192|s>>6&31,n[r++]=128|63&s;else if(s>=55296&&s<57344){s=64+(1023&s);var o=1023&e.charCodeAt(++i);n[r++]=240|s>>8&7,n[r++]=128|s>>2&63,n[r++]=128|o>>6&15|(3&s)<<4,n[r++]=128|63&o}else n[r++]=224|s>>12&15,n[r++]=128|s>>6&63,n[r++]=128|63&s;r>a&&(t.push(n.slice(0,r)),r=0,n=pr(65535),a=65530)}return t.push(n.slice(0,r)),vr(t)}(r),ga.utils.cfb_add(e,t,a);ga.utils.cfb_add(e,t,r)}else e.file(t,r)}function Ga(e,t){switch(t.type){case"base64":return ga.read(e,{type:"base64"});case"binary":return ga.read(e,{type:"binary"});case"buffer":case"array":return ga.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function qa(e,t){if("/"==e.charAt(0))return e.slice(1);var r=t.split("/");"/"!=t.slice(-1)&&r.pop();for(var a=e.split("/");0!==a.length;){var n=a.shift();".."===n?r.pop():"."!==n&&r.push(n)}return r.join("/")}var Va='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n',Ka=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,Ya=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/gm,Za=Va.match(Ya)?Ya:/<[^>]*>/g,Ja=/<\w*:/,Qa=/<(\/?)\w+:/;function en(e,t,r){for(var a={},n=0,i=0;n!==e.length&&(32!==(i=e.charCodeAt(n))&&10!==i&&13!==i);++n);if(t||(a[0]=e.slice(0,n)),n===e.length)return a;var s=e.match(Ka),o=0,c="",l=0,h="",u="",d=1;if(s)for(l=0;l!=s.length;++l){for(u=s[l],i=0;i!=u.length&&61!==u.charCodeAt(i);++i);for(h=u.slice(0,i).trim();32==u.charCodeAt(i+1);)++i;for(d=34==(n=u.charCodeAt(i+1))||39==n?1:0,c=u.slice(i+1+d,u.length-d),o=0;o!=h.length&&58!==h.charCodeAt(o);++o);if(o===h.length)h.indexOf("_")>0&&(h=h.slice(0,h.indexOf("_"))),a[h]=c,r||(a[h.toLowerCase()]=c);else{var f=(5===o&&"xmlns"===h.slice(0,5)?"xmlns":"")+h.slice(o+1);if(a[f]&&"ext"==h.slice(o-3,o))continue;a[f]=c,r||(a[f.toLowerCase()]=c)}}return a}function tn(e){return e.replace(Qa,"<$1")}var rn={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},an=ya(rn),nn=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/gi,t=/_x([\da-fA-F]{4})_/gi;return function r(a){var n=a+"",i=n.indexOf("<![CDATA[");if(-1==i)return n.replace(e,(function(e,t){return rn[e]||String.fromCharCode(parseInt(t,e.indexOf("x")>-1?16:10))||e})).replace(t,(function(e,t){return String.fromCharCode(parseInt(t,16))}));var s=n.indexOf("]]>");return r(n.slice(0,i))+n.slice(i+9,s)+r(n.slice(s+3))}}(),sn=/[&<>'"]/g;var on=/[\u0000-\u001f]/g;function cn(e){return(e+"").replace(sn,(function(e){return an[e]})).replace(/\n/g,"<br/>").replace(on,(function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"}))}var ln=function(){var e=/&#(\d+);/g;function t(e,t){return String.fromCharCode(parseInt(t,10))}return function(r){return r.replace(e,t)}}();function hn(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function un(e){for(var t="",r=0,a=0,n=0,i=0,s=0,o=0;r<e.length;)(a=e.charCodeAt(r++))<128?t+=String.fromCharCode(a):(n=e.charCodeAt(r++),a>191&&a<224?(s=(31&a)<<6,s|=63&n,t+=String.fromCharCode(s)):(i=e.charCodeAt(r++),a<240?t+=String.fromCharCode((15&a)<<12|(63&n)<<6|63&i):(o=((7&a)<<18|(63&n)<<12|(63&i)<<6|63&(s=e.charCodeAt(r++)))-65536,t+=String.fromCharCode(55296+(o>>>10&1023)),t+=String.fromCharCode(56320+(1023&o)))));return t}function dn(e){var t,r,a,n=pr(2*e.length),i=1,s=0,o=0;for(r=0;r<e.length;r+=i)i=1,(a=e.charCodeAt(r))<128?t=a:a<224?(t=64*(31&a)+(63&e.charCodeAt(r+1)),i=2):a<240?(t=4096*(15&a)+64*(63&e.charCodeAt(r+1))+(63&e.charCodeAt(r+2)),i=3):(i=4,t=262144*(7&a)+4096*(63&e.charCodeAt(r+1))+64*(63&e.charCodeAt(r+2))+(63&e.charCodeAt(r+3)),o=55296+((t-=65536)>>>10&1023),t=56320+(1023&t)),0!==o&&(n[s++]=255&o,n[s++]=o>>>8,o=0),n[s++]=t%256,n[s++]=t>>>8;return n.slice(0,s).toString("ucs2")}function fn(e){return fr(e,"binary").toString("utf8")}var pn="foo bar bazâð£",gn=dr&&(fn(pn)==un(pn)&&fn||dn(pn)==un(pn)&&dn)||un,mn=dr?function(e){return fr(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,a=0,n=0;r<e.length;)switch(a=e.charCodeAt(r++),!0){case a<128:t.push(String.fromCharCode(a));break;case a<2048:t.push(String.fromCharCode(192+(a>>6))),t.push(String.fromCharCode(128+(63&a)));break;case a>=55296&&a<57344:a-=55296,n=e.charCodeAt(r++)-56320+(a<<10),t.push(String.fromCharCode(240+(n>>18&7))),t.push(String.fromCharCode(144+(n>>12&63))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(63&n)));break;default:t.push(String.fromCharCode(224+(a>>12))),t.push(String.fromCharCode(128+(a>>6&63))),t.push(String.fromCharCode(128+(63&a)))}return t.join("")},bn=function(){var e={};return function(t,r){var a=t+"|"+(r||"");return e[a]?e[a]:e[a]=new RegExp("<(?:\\w+:)?"+t+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+t+">",r||"")}}(),yn=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map((function(e){return[new RegExp("&"+e[0]+";","ig"),e[1]]}));return function(t){for(var r=t.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^>]*>/g,""),a=0;a<e.length;++a)r=r.replace(e[a][0],e[a][1]);return r}}(),vn=function(){var e={};return function(t){return void 0!==e[t]?e[t]:e[t]=new RegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}(),wn=/<\/?(?:vt:)?variant>/g,An=/<(?:vt:)([^>]*)>([\s\S]*)</;function Sn(e,t){var r=en(e),a=e.match(vn(r.baseType))||[],n=[];if(a.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+a.length+" != "+r.size);return n}return a.forEach((function(e){var t=e.replace(wn,"").match(An);t&&n.push({v:gn(t[2]),t:t[1]})})),n}var xn=/(^\s|\s$|\n)/;function kn(e){return ba(e).map((function(t){return" "+t+'="'+e[t]+'"'})).join("")}function Cn(e,t,r){return"<"+e+(null!=r?kn(r):"")+(null!=t?(t.match(xn)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function _n(e){if(dr&&Buffer.isBuffer(e))return e.toString("utf8");if("string"==typeof e)return e;if("undefined"!=typeof Uint8Array&&e instanceof Uint8Array)return gn(br(yr(e)));throw new Error("Bad input format: expected Buffer or string")}var Tn=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/gm,En="http://schemas.openxmlformats.org/package/2006/content-types",On=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];var Fn=function(e){for(var t=[],r=0;r<e[0].length;++r)if(e[0][r])for(var a=0,n=e[0][r].length;a<n;a+=10240)t.push.apply(t,e[0][r].slice(a,a+10240));return t},Pn=dr?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map((function(e){return Buffer.isBuffer(e)?e:fr(e)}))):Fn(e)}:Fn,In=function(e,t,r){for(var a=[],n=t;n<r;n+=2)a.push(String.fromCharCode(Qn(e,n)));return a.join("").replace(wr,"")},Mn=dr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(wr,""):In(e,t,r)}:In,Rn=function(e,t,r){for(var a=[],n=t;n<t+r;++n)a.push(("0"+e[n].toString(16)).slice(-2));return a.join("")},Dn=dr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):Rn(e,t,r)}:Rn,Nn=function(e,t,r){for(var a=[],n=t;n<r;n++)a.push(String.fromCharCode(Jn(e,n)));return a.join("")},Ln=dr?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf8",t,r):Nn(e,t,r)}:Nn,Bn=function(e,t){var r=ti(e,t);return r>0?Ln(e,t+4,t+4+r-1):""},jn=Bn,$n=function(e,t){var r=ti(e,t);return r>0?Ln(e,t+4,t+4+r-1):""},Un=$n,zn=function(e,t){var r=2*ti(e,t);return r>0?Ln(e,t+4,t+4+r-1):""},Hn=zn,Xn=function(e,t){var r=ti(e,t);return r>0?Mn(e,t+4,t+4+r):""},Wn=Xn,Gn=function(e,t){var r=ti(e,t);return r>0?Ln(e,t+4,t+4+r):""},qn=Gn,Vn=function(e,t){return function(e,t){for(var r=1-2*(e[t+7]>>>7),a=((127&e[t+7])<<4)+(e[t+6]>>>4&15),n=15&e[t+6],i=5;i>=0;--i)n=256*n+e[t+i];return 2047==a?0==n?r*(1/0):NaN:(0==a?a=-1022:(a-=1023,n+=Math.pow(2,52)),r*Math.pow(2,a-52)*n)}(e,t)},Kn=Vn,Yn=function(e){return Array.isArray(e)||"undefined"!=typeof Uint8Array&&e instanceof Uint8Array};function Zn(){Mn=function(e,t,r){return ir.utils.decode(1200,e.slice(t,r)).replace(wr,"")},Ln=function(e,t,r){return ir.utils.decode(65001,e.slice(t,r))},jn=function(e,t){var r=ti(e,t);return r>0?ir.utils.decode(Zt,e.slice(t+4,t+4+r-1)):""},Un=function(e,t){var r=ti(e,t);return r>0?ir.utils.decode(Yt,e.slice(t+4,t+4+r-1)):""},Hn=function(e,t){var r=2*ti(e,t);return r>0?ir.utils.decode(1200,e.slice(t+4,t+4+r-1)):""},Wn=function(e,t){var r=ti(e,t);return r>0?ir.utils.decode(1200,e.slice(t+4,t+4+r)):""},qn=function(e,t){var r=ti(e,t);return r>0?ir.utils.decode(65001,e.slice(t+4,t+4+r)):""}}dr&&(jn=function(e,t){if(!Buffer.isBuffer(e))return Bn(e,t);var r=e.readUInt32LE(t);return r>0?e.toString("utf8",t+4,t+4+r-1):""},Un=function(e,t){if(!Buffer.isBuffer(e))return $n(e,t);var r=e.readUInt32LE(t);return r>0?e.toString("utf8",t+4,t+4+r-1):""},Hn=function(e,t){if(!Buffer.isBuffer(e))return zn(e,t);var r=2*e.readUInt32LE(t);return e.toString("utf16le",t+4,t+4+r-1)},Wn=function(e,t){if(!Buffer.isBuffer(e))return Xn(e,t);var r=e.readUInt32LE(t);return e.toString("utf16le",t+4,t+4+r)},qn=function(e,t){if(!Buffer.isBuffer(e))return Gn(e,t);var r=e.readUInt32LE(t);return e.toString("utf8",t+4,t+4+r)},Kn=function(e,t){return Buffer.isBuffer(e)?e.readDoubleLE(t):Vn(e,t)},Yn=function(e){return Buffer.isBuffer(e)||Array.isArray(e)||"undefined"!=typeof Uint8Array&&e instanceof Uint8Array}),void 0!==ir&&Zn();var Jn=function(e,t){return e[t]},Qn=function(e,t){return 256*e[t+1]+e[t]},ei=function(e,t){var r=256*e[t+1]+e[t];return r<32768?r:-1*(65535-r+1)},ti=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},ri=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},ai=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function ni(e,t){var r,a,n,i,s,o,c="",l=[];switch(t){case"dbcs":if(o=this.l,dr&&Buffer.isBuffer(this))c=this.slice(this.l,this.l+2*e).toString("utf16le");else for(s=0;s<e;++s)c+=String.fromCharCode(Qn(this,o)),o+=2;e*=2;break;case"utf8":c=Ln(this,this.l,this.l+e);break;case"utf16le":e*=2,c=Mn(this,this.l,this.l+e);break;case"wstr":if(void 0===ir)return ni.call(this,e,"dbcs");c=ir.utils.decode(Yt,this.slice(this.l,this.l+2*e)),e*=2;break;case"lpstr-ansi":c=jn(this,this.l),e=4+ti(this,this.l);break;case"lpstr-cp":c=Un(this,this.l),e=4+ti(this,this.l);break;case"lpwstr":c=Hn(this,this.l),e=4+2*ti(this,this.l);break;case"lpp4":e=4+ti(this,this.l),c=Wn(this,this.l),2&e&&(e+=2);break;case"8lpp4":e=4+ti(this,this.l),c=qn(this,this.l),3&e&&(e+=4-(3&e));break;case"cstr":for(e=0,c="";0!==(n=Jn(this,this.l+e++));)l.push(or(n));c=l.join("");break;case"_wstr":for(e=0,c="";0!==(n=Qn(this,this.l+e));)l.push(or(n)),e+=2;e+=2,c=l.join("");break;case"dbcs-cont":for(c="",o=this.l,s=0;s<e;++s){if(this.lens&&-1!==this.lens.indexOf(o))return n=Jn(this,o),this.l=o+1,i=ni.call(this,e-s,n?"dbcs-cont":"sbcs-cont"),l.join("")+i;l.push(or(Qn(this,o))),o+=2}c=l.join(""),e*=2;break;case"cpstr":if(void 0!==ir){c=ir.utils.decode(Yt,this.slice(this.l,this.l+e));break}case"sbcs-cont":for(c="",o=this.l,s=0;s!=e;++s){if(this.lens&&-1!==this.lens.indexOf(o))return n=Jn(this,o),this.l=o+1,i=ni.call(this,e-s,n?"dbcs-cont":"sbcs-cont"),l.join("")+i;l.push(or(Jn(this,o))),o+=1}c=l.join("");break;default:switch(e){case 1:return r=Jn(this,this.l),this.l++,r;case 2:return r=("i"===t?ei:Qn)(this,this.l),this.l+=2,r;case 4:case-4:return"i"!==t&&128&this[this.l+3]?(a=ti(this,this.l),this.l+=4,a):(r=(e>0?ri:ai)(this,this.l),this.l+=4,r);case 8:case-8:if("f"===t)return a=8==e?Kn(this,this.l):Kn([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,a;e=8;case 16:c=Dn(this,this.l,e)}}return this.l+=e,c}var ii=function(e,t,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},si=function(e,t,r){e[r]=255&t,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},oi=function(e,t,r){e[r]=255&t,e[r+1]=t>>>8&255};function ci(e,t,r){var a=0,n=0;if("dbcs"===r){for(n=0;n!=t.length;++n)oi(this,t.charCodeAt(n),this.l+2*n);a=2*t.length}else if("sbcs"===r){if(void 0!==ir&&874==Zt)for(n=0;n!=t.length;++n){var i=ir.utils.encode(Zt,t.charAt(n));this[this.l+n]=i[0]}else for(t=t.replace(/[^\x00-\x7F]/g,"_"),n=0;n!=t.length;++n)this[this.l+n]=255&t.charCodeAt(n);a=t.length}else{if("hex"===r){for(;n<e;++n)this[this.l++]=parseInt(t.slice(2*n,2*n+2),16)||0;return this}if("utf16le"===r){var s=Math.min(this.l+e,this.length);for(n=0;n<Math.min(t.length,e);++n){var o=t.charCodeAt(n);this[this.l++]=255&o,this[this.l++]=o>>8}for(;this.l<s;)this[this.l++]=0;return this}switch(e){case 1:a=1,this[this.l]=255&t;break;case 2:a=2,this[this.l]=255&t,t>>>=8,this[this.l+1]=255&t;break;case 3:a=3,this[this.l]=255&t,t>>>=8,this[this.l+1]=255&t,t>>>=8,this[this.l+2]=255&t;break;case 4:a=4,ii(this,t,this.l);break;case 8:if(a=8,"f"===r){!function(e,t,r){var a=(t<0||1/t==-1/0?1:0)<<7,n=0,i=0,s=a?-t:t;isFinite(s)?0==s?n=i=0:(n=Math.floor(Math.log(s)/Math.LN2),i=s*Math.pow(2,52-n),n<=-1023&&(!isFinite(i)||i<Math.pow(2,52))?n=-1022:(i-=Math.pow(2,52),n+=1023)):(n=2047,i=isNaN(t)?26985:0);for(var o=0;o<=5;++o,i/=256)e[r+o]=255&i;e[r+6]=(15&n)<<4|15&i,e[r+7]=n>>4|a}(this,t,this.l);break}case 16:break;case-4:a=4,si(this,t,this.l)}}return this.l+=a,this}function li(e,t){var r=Dn(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function hi(e,t){e.l=t,e.read_shift=ni,e.chk=li,e.write_shift=ci}function ui(e,t){e.l+=t}function di(e){var t=pr(e);return hi(t,0),t}function fi(e,t,r){if(e){var a,n,i;hi(e,e.l||0);for(var s=e.length,o=0,c=0;e.l<s;){128&(o=e.read_shift(1))&&(o=(127&o)+((127&e.read_shift(1))<<7));var l=Sh[o]||Sh[65535];for(i=127&(a=e.read_shift(1)),n=1;n<4&&128&a;++n)i+=(127&(a=e.read_shift(1)))<<7*n;c=e.l+i;var h=l.f&&l.f(e,i,r);if(e.l=c,t(h,l,o))return}}}function pi(){var e=[],t=dr?256:2048,r=function(e){var t=di(e);return hi(t,0),t},a=r(t),n=function(){a&&(a.length>a.l&&((a=a.slice(0,a.l)).l=a.length),a.length>0&&e.push(a),a=null)},i=function(e){return a&&e<a.length-a.l?a:(n(),a=r(Math.max(e+1,t)))};return{next:i,push:function(e){n(),null==(a=e).l&&(a.l=a.length),i(t)},end:function(){return n(),vr(e)},_bufs:e}}function gi(e,t,r){var a=Pa(e);if(t.s?(a.cRel&&(a.c+=t.s.c),a.rRel&&(a.r+=t.s.r)):(a.cRel&&(a.c+=t.c),a.rRel&&(a.r+=t.r)),!r||r.biff<12){for(;a.c>=256;)a.c-=256;for(;a.r>=65536;)a.r-=65536}return a}function mi(e,t,r){var a=Pa(e);return a.s=gi(a.s,t.s,r),a.e=gi(a.e,t.s,r),a}function bi(e,t){if(e.cRel&&e.c<0)for(e=Pa(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=Pa(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=ki(e);return e.cRel||null==e.cRel||(r=r.replace(/^([A-Z])/,"$$$1")),e.rRel||null==e.rRel||(r=function(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(r)),r}function yi(e,t){return 0!=e.s.r||e.s.rRel||e.e.r!=(t.biff>=12?1048575:t.biff>=8?65536:16384)||e.e.rRel?0!=e.s.c||e.s.cRel||e.e.c!=(t.biff>=12?16383:255)||e.e.cRel?bi(e.s,t.biff)+":"+bi(e.e,t.biff):(e.s.rRel?"":"$")+wi(e.s.r)+":"+(e.e.rRel?"":"$")+wi(e.e.r):(e.s.cRel?"":"$")+Si(e.s.c)+":"+(e.e.cRel?"":"$")+Si(e.e.c)}function vi(e){return parseInt(e.replace(/\$(\d+)$/,"$1"),10)-1}function wi(e){return""+(e+1)}function Ai(e){for(var t=e.replace(/^\$([A-Z])/,"$1"),r=0,a=0;a!==t.length;++a)r=26*r+t.charCodeAt(a)-64;return r-1}function Si(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function xi(e){for(var t=0,r=0,a=0;a<e.length;++a){var n=e.charCodeAt(a);n>=48&&n<=57?t=10*t+(n-48):n>=65&&n<=90&&(r=26*r+(n-64))}return{c:r-1,r:t-1}}function ki(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function Ci(e){var t=e.indexOf(":");return-1==t?{s:xi(e),e:xi(e)}:{s:xi(e.slice(0,t)),e:xi(e.slice(t+1))}}function _i(e,t){return void 0===t||"number"==typeof t?_i(e.s,e.e):("string"!=typeof e&&(e=ki(e)),"string"!=typeof t&&(t=ki(t)),e==t?e:e+":"+t)}function Ti(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,a=0,n=0,i=e.length;for(r=0;a<i&&!((n=e.charCodeAt(a)-64)<1||n>26);++a)r=26*r+n;for(t.s.c=--r,r=0;a<i&&!((n=e.charCodeAt(a)-48)<0||n>9);++a)r=10*r+n;if(t.s.r=--r,a===i||10!=n)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++a,r=0;a!=i&&!((n=e.charCodeAt(a)-64)<1||n>26);++a)r=26*r+n;for(t.e.c=--r,r=0;a!=i&&!((n=e.charCodeAt(a)-48)<0||n>9);++a)r=10*r+n;return t.e.r=--r,t}function Ei(e,t){var r="d"==e.t&&t instanceof Date;if(null!=e.z)try{return e.w=la(e.z,r?wa(t):t)}catch(e){}try{return e.w=la((e.XF||{}).numFmtId||(r?14:0),r?wa(t):t)}catch(e){return""+t}}function Oi(e,t,r){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),"e"==e.t?rs[e.v]||e.v:Ei(e,null==t?e.v:t))}function Fi(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",a={};return a[r]=e,{SheetNames:[r],Sheets:a}}function Pi(e,t,r){var a=r||{},n=e?Array.isArray(e):a.dense;var i=e||(n?[]:{}),s=0,o=0;if(i&&null!=a.origin){if("number"==typeof a.origin)s=a.origin;else{var c="string"==typeof a.origin?xi(a.origin):a.origin;s=c.r,o=c.c}i["!ref"]||(i["!ref"]="A1:A1")}var l={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var h=Ti(i["!ref"]);l.s.c=h.s.c,l.s.r=h.s.r,l.e.c=Math.max(l.e.c,h.e.c),l.e.r=Math.max(l.e.r,h.e.r),-1==s&&(l.e.r=s=h.e.r+1)}for(var u=0;u!=t.length;++u)if(t[u]){if(!Array.isArray(t[u]))throw new Error("aoa_to_sheet expects an array of arrays");for(var d=0;d!=t[u].length;++d)if(void 0!==t[u][d]){var f={v:t[u][d]},p=s+u,g=o+d;if(l.s.r>p&&(l.s.r=p),l.s.c>g&&(l.s.c=g),l.e.r<p&&(l.e.r=p),l.e.c<g&&(l.e.c=g),!t[u][d]||"object"!=typeof t[u][d]||Array.isArray(t[u][d])||t[u][d]instanceof Date)if(Array.isArray(f.v)&&(f.f=t[u][d][1],f.v=f.v[0]),null===f.v)if(f.f)f.t="n";else if(a.nullError)f.t="e",f.v=0;else{if(!a.sheetStubs)continue;f.t="z"}else"number"==typeof f.v?f.t="n":"boolean"==typeof f.v?f.t="b":f.v instanceof Date?(f.z=a.dateNF||Pr[14],a.cellDates?(f.t="d",f.w=la(f.z,wa(f.v))):(f.t="n",f.v=wa(f.v),f.w=la(f.z,f.v))):f.t="s";else f=t[u][d];if(n)i[p]||(i[p]=[]),i[p][g]&&i[p][g].z&&(f.z=i[p][g].z),i[p][g]=f;else{var m=ki({c:g,r:p});i[m]&&i[m].z&&(f.z=i[m].z),i[m]=f}}}return l.s.c<1e7&&(i["!ref"]=_i(l)),i}function Ii(e,t){return Pi(null,e,t)}function Mi(e){var t=e.read_shift(4);return 0===t?"":e.read_shift(t,"dbcs")}function Ri(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function Di(e,t){var r=e.l,a=e.read_shift(1),n=Mi(e),i=[],s={t:n,h:n};if(1&a){for(var o=e.read_shift(4),c=0;c!=o;++c)i.push(Ri(e));s.r=i}else s.r=[{ich:0,ifnt:0}];return e.l=r+t,s}var Ni=Di;function Li(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function Bi(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}var ji=Mi;function $i(e){var t=e.read_shift(4);return 0===t||4294967295===t?"":e.read_shift(t,"dbcs")}var Ui=Mi,zi=$i;function Hi(e){var t=e.slice(e.l,e.l+4),r=1&t[0],a=2&t[0];e.l+=4;var n=0===a?Kn([0,0,0,0,252&t[0],t[1],t[2],t[3]],0):ri(t,0)>>2;return r?n/100:n}function Xi(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var Wi=Xi;function Gi(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function qi(e,t){var r=e.read_shift(4);switch(r){case 0:return"";case 4294967295:case 4294967294:return{2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"}[e.read_shift(4)]||""}if(r>400)throw new Error("Unsupported Clipboard: "+r.toString(16));return e.l-=4,e.read_shift(0,1==t?"lpstr":"lpwstr")}var Vi=80,Ki=[Vi,81],Yi={1:{n:"CodePage",t:2},2:{n:"Category",t:Vi},3:{n:"PresentationFormat",t:Vi},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:Vi},15:{n:"Company",t:Vi},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:Vi},27:{n:"ContentStatus",t:Vi},28:{n:"Language",t:Vi},29:{n:"Version",t:Vi},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},Zi={1:{n:"CodePage",t:2},2:{n:"Title",t:Vi},3:{n:"Subject",t:Vi},4:{n:"Author",t:Vi},5:{n:"Keywords",t:Vi},6:{n:"Comments",t:Vi},7:{n:"Template",t:Vi},8:{n:"LastAuthor",t:Vi},9:{n:"RevNumber",t:Vi},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:Vi},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},Ji={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},Qi=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function es(e){return e.map((function(e){return[e>>16&255,e>>8&255,255&e]}))}var ts=Pa(es([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),rs={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},as={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},ns={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};var is={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function ss(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function os(e,t){var r={"!id":{}};if(!e)return r;"/"!==t.charAt(0)&&(t="/"+t);var a={};return(e.match(Za)||[]).forEach((function(e){var n=en(e);if("<Relationship"===n[0]){var i={};i.Type=n.Type,i.Target=n.Target,i.Id=n.Id,n.TargetMode&&(i.TargetMode=n.TargetMode);var s="External"===n.TargetMode?n.Target:qa(n.Target,t);r[s]=i,a[n.Id]=i}})),r["!id"]=a,r}var cs=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],ls=function(){for(var e=new Array(cs.length),t=0;t<cs.length;++t){var r=cs[t],a="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+a+"[^>]*>([\\s\\S]*?)</"+a+">")}return e}();function hs(e){var t={};e=gn(e);for(var r=0;r<cs.length;++r){var a=cs[r],n=e.match(ls[r]);null!=n&&n.length>0&&(t[a[1]]=nn(n[1])),"date"===a[2]&&t[a[1]]&&(t[a[1]]=Oa(t[a[1]]))}return t}var us=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function ds(e,t,r,a){var n=[];if("string"==typeof e)n=Sn(e,a);else for(var i=0;i<e.length;++i)n=n.concat(e[i].map((function(e){return{v:e}})));var s="string"==typeof t?Sn(t,a).map((function(e){return e.v})):t,o=0,c=0;if(s.length>0)for(var l=0;l!==n.length;l+=2){switch(c=+n[l+1].v,n[l].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":r.Worksheets=c,r.SheetNames=s.slice(o,o+c);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":r.NamedRanges=c,r.DefinedNames=s.slice(o,o+c);break;case"Charts":case"Diagramme":r.Chartsheets=c,r.ChartNames=s.slice(o,o+c)}o+=c}}var fs=/<[^>]+>[^<]*/g;var ps,gs={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function ms(e,t,r){ps||(ps=ya(gs)),e[t=ps[t]||t]=r}function bs(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date(1e3*(r/1e7*Math.pow(2,32)+t/1e7-11644473600)).toISOString().replace(/\.000/,"")}function ys(e,t,r){var a=e.l,n=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-a&3;)++e.l;return n}function vs(e,t,r){var a=e.read_shift(0,"lpwstr");return r&&(e.l+=4-(a.length+1&3)&3),a}function ws(e,t,r){return 31===t?vs(e):ys(e,0,r)}function As(e,t,r){return ws(e,t,!1===r?0:4)}function Ss(e){var t=e.l,r=Cs(e,81);return 0==e[e.l]&&0==e[e.l+1]&&e.l-t&2&&(e.l+=2),[r,Cs(e,3)]}function xs(e,t){for(var r=e.read_shift(4),a={},n=0;n!=r;++n){var i=e.read_shift(4),s=e.read_shift(4);a[i]=e.read_shift(s,1200===t?"utf16le":"utf8").replace(wr,"").replace(Ar,"!"),1200===t&&s%2&&(e.l+=2)}return 3&e.l&&(e.l=e.l>>3<<2),a}function ks(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(3&t)>0&&(e.l+=4-(3&t)&3),r}function Cs(e,t,r){var a,n=e.read_shift(2),i=r||{};if(e.l+=2,12!==t&&n!==t&&-1===Ki.indexOf(t)&&(4126!=(65534&t)||4126!=(65534&n)))throw new Error("Expected type "+t+" saw "+n);switch(12===t?n:t){case 2:return a=e.read_shift(2,"i"),i.raw||(e.l+=2),a;case 3:return a=e.read_shift(4,"i");case 11:return 0!==e.read_shift(4);case 19:return a=e.read_shift(4);case 30:return ys(e,0,4).replace(wr,"");case 31:return vs(e);case 64:return bs(e);case 65:return ks(e);case 71:return function(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}(e);case 80:return As(e,n,!i.raw).replace(wr,"");case 81:return function(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return ws(e,t,0)}(e,n).replace(wr,"");case 4108:return function(e){for(var t=e.read_shift(4),r=[],a=0;a<t/2;++a)r.push(Ss(e));return r}(e);case 4126:case 4127:return 4127==n?function(e){for(var t=e.read_shift(4),r=[],a=0;a!=t;++a){var n=e.l;r[a]=e.read_shift(0,"lpwstr").replace(wr,""),e.l-n&2&&(e.l+=2)}return r}(e):function(e){for(var t=e.read_shift(4),r=[],a=0;a!=t;++a)r[a]=e.read_shift(0,"lpstr-cp").replace(wr,"");return r}(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function _s(e,t){var r=e.l,a=e.read_shift(4),n=e.read_shift(4),i=[],s=0,o=0,c=-1,l={};for(s=0;s!=n;++s){var h=e.read_shift(4),u=e.read_shift(4);i[s]=[h,u+r]}i.sort((function(e,t){return e[1]-t[1]}));var d={};for(s=0;s!=n;++s){if(e.l!==i[s][1]){var f=!0;if(s>0&&t)switch(t[i[s-1][0]].t){case 2:e.l+2===i[s][1]&&(e.l+=2,f=!1);break;case 80:case 4108:e.l<=i[s][1]&&(e.l=i[s][1],f=!1)}if((!t||0==s)&&e.l<=i[s][1]&&(f=!1,e.l=i[s][1]),f)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(t){var p=t[i[s][0]];if(d[p.n]=Cs(e,p.t,{raw:!0}),"version"===p.p&&(d[p.n]=String(d[p.n]>>16)+"."+("0000"+String(65535&d[p.n])).slice(-4)),"CodePage"==p.n)switch(d[p.n]){case 0:d[p.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:tr(o=d[p.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+d[p.n])}}else if(1===i[s][0]){if(o=d.CodePage=Cs(e,2),tr(o),-1!==c){var g=e.l;e.l=i[c][1],l=xs(e,o),e.l=g}}else if(0===i[s][0]){if(0===o){c=s,e.l=i[s+1][1];continue}l=xs(e,o)}else{var m,b=l[i[s][0]];switch(e[e.l]){case 65:e.l+=4,m=ks(e);break;case 30:case 31:e.l+=4,m=As(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,m=e.read_shift(4,"i");break;case 19:e.l+=4,m=e.read_shift(4);break;case 5:e.l+=4,m=e.read_shift(8,"f");break;case 11:e.l+=4,m=Os(e,4);break;case 64:e.l+=4,m=Oa(bs(e));break;default:throw new Error("unparsed value: "+e[e.l])}d[b]=m}}return e.l=r+a,d}function Ts(e,t,r){var a=e.content;if(!a)return{};hi(a,0);var n,i,s,o,c=0;a.chk("feff","Byte Order: "),a.read_shift(2);var l=a.read_shift(4),h=a.read_shift(16);if(h!==ga.utils.consts.HEADER_CLSID&&h!==r)throw new Error("Bad PropertySet CLSID "+h);if(1!==(n=a.read_shift(4))&&2!==n)throw new Error("Unrecognized #Sets: "+n);if(i=a.read_shift(16),o=a.read_shift(4),1===n&&o!==a.l)throw new Error("Length mismatch: "+o+" !== "+a.l);2===n&&(s=a.read_shift(16),c=a.read_shift(4));var u,d=_s(a,t),f={SystemIdentifier:l};for(var p in d)f[p]=d[p];if(f.FMTID=i,1===n)return f;if(c-a.l==2&&(a.l+=2),a.l!==c)throw new Error("Length mismatch 2: "+a.l+" !== "+c);try{u=_s(a,null)}catch(e){}for(p in u)f[p]=u[p];return f.FMTID=[i,s],f}function Es(e,t){return e.read_shift(t),null}function Os(e,t){return 1===e.read_shift(t)}function Fs(e){return e.read_shift(2,"u")}function Ps(e,t){return function(e,t,r){for(var a=[],n=e.l+t;e.l<n;)a.push(r(e,n-e.l));if(n!==e.l)throw new Error("Slurp error");return a}(e,t,Fs)}function Is(e,t,r){var a=e.read_shift(r&&r.biff>=12?2:1),n="sbcs-cont",i=Yt;(r&&r.biff>=8&&(Yt=1200),r&&8!=r.biff)?12==r.biff&&(n="wstr"):e.read_shift(1)&&(n="dbcs-cont");r.biff>=2&&r.biff<=5&&(n="cpstr");var s=a?e.read_shift(a,n):"";return Yt=i,s}function Ms(e){var t=Yt;Yt=1200;var r,a=e.read_shift(2),n=e.read_shift(1),i=4&n,s=8&n,o=1+(1&n),c=0,l={};s&&(c=e.read_shift(2)),i&&(r=e.read_shift(4));var h=2==o?"dbcs-cont":"sbcs-cont",u=0===a?"":e.read_shift(a,h);return s&&(e.l+=4*c),i&&(e.l+=r),l.t=u,s||(l.raw="<t>"+l.t+"</t>",l.r=l.t),Yt=t,l}function Rs(e,t,r){if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}return 0===e.read_shift(1)?e.read_shift(t,"sbcs-cont"):e.read_shift(t,"dbcs-cont")}function Ds(e,t,r){var a=e.read_shift(r&&2==r.biff?1:2);return 0===a?(e.l++,""):Rs(e,a,r)}function Ns(e,t,r){if(r.biff>5)return Ds(e,0,r);var a=e.read_shift(1);return 0===a?(e.l++,""):e.read_shift(a,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function Ls(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return function(e){var t=e.read_shift(4),r=e.l,a=!1;t>24&&(e.l+=t-24,"795881f43b1d7f48af2c825dc4852763"===e.read_shift(16)&&(a=!0),e.l=r);var n=e.read_shift((a?t-24:t)>>1,"utf16le").replace(wr,"");return a&&(e.l+=24),n}(e);case"0303000000000000c000000000000046":return function(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var a=e.read_shift(0,"lpstr-ansi");if(e.l+=2,57005!=e.read_shift(2))throw new Error("Bad FileMoniker");if(0===e.read_shift(4))return r+a.replace(/\\/g,"/");var n=e.read_shift(4);if(3!=e.read_shift(2))throw new Error("Bad FileMoniker");return r+e.read_shift(n>>1,"utf16le").replace(wr,"")}(e);default:throw new Error("Unsupported Moniker "+r)}}function Bs(e){var t=e.read_shift(4);return t>0?e.read_shift(t,"utf16le").replace(wr,""):""}function js(e){return[e.read_shift(1),e.read_shift(1),e.read_shift(1),e.read_shift(1)]}function $s(e,t){var r=js(e);return r[3]=0,r}function Us(e){return{r:e.read_shift(2),c:e.read_shift(2),ixfe:e.read_shift(2)}}function zs(e,t,r){var a=r.biff>8?4:2;return[e.read_shift(a),e.read_shift(a,"i"),e.read_shift(a,"i")]}function Hs(e){return[e.read_shift(2),Hi(e)]}function Xs(e){var t=e.read_shift(2),r=e.read_shift(2);return{s:{c:e.read_shift(2),r:t},e:{c:e.read_shift(2),r}}}function Ws(e){var t=e.read_shift(2),r=e.read_shift(2);return{s:{c:e.read_shift(1),r:t},e:{c:e.read_shift(1),r}}}var Gs=Ws;function qs(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),a=e.read_shift(2);return e.l+=12,[r,t,a]}function Vs(e){e.l+=2,e.l+=e.read_shift(2)}var Ks={0:Vs,4:Vs,5:Vs,6:Vs,7:function(e){return e.l+=4,e.cf=e.read_shift(2),{}},8:Vs,9:Vs,10:Vs,11:Vs,12:Vs,13:function(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t},14:Vs,15:Vs,16:Vs,17:Vs,18:Vs,19:Vs,20:Vs,21:qs};function Ys(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),(t-=2)>=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function Zs(e,t,r){var a=0;r&&2==r.biff||(a=e.read_shift(2));var n=e.read_shift(2);return r&&2==r.biff&&(a=1-(n>>15),n&=32767),[{Unsynced:1&a,DyZero:(2&a)>>1,ExAsc:(4&a)>>2,ExDsc:(8&a)>>3},n]}var Js=Ns;function Qs(e,t,r){var a=e.l+t,n=8!=r.biff&&r.biff?2:4,i=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(2),c=e.read_shift(2);return e.l=a,{s:{r:i,c:o},e:{r:s,c}}}function eo(e,t,r){var a=Us(e);2!=r.biff&&9!=t||++e.l;var n=function(e){var t=e.read_shift(1);return 1===e.read_shift(1)?t:1===t}(e);return a.val=n,a.t=!0===n||!1===n?"b":"e",a}var to=function(e,t,r){return 0===t?"":Ns(e,0,r)};function ro(e,t,r){var a,n=e.read_shift(2),i={fBuiltIn:1&n,fWantAdvise:n>>>1&1,fWantPict:n>>>2&1,fOle:n>>>3&1,fOleLink:n>>>4&1,cf:n>>>5&1023,fIcon:n>>>15&1};return 14849===r.sbcch&&(a=function(e,t,r){e.l+=4,t-=4;var a=e.l+t,n=Is(e,0,r),i=e.read_shift(2);if(i!==(a-=e.l))throw new Error("Malformed AddinUdf: padding = "+a+" != "+i);return e.l+=i,n}(e,t-2,r)),i.body=a||e.read_shift(t-2),"string"==typeof a&&(i.Name=a),i}var ao=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function no(e,t,r){var a=e.l+t,n=e.read_shift(2),i=e.read_shift(1),s=e.read_shift(1),o=e.read_shift(r&&2==r.biff?1:2),c=0;(!r||r.biff>=5)&&(5!=r.biff&&(e.l+=2),c=e.read_shift(2),5==r.biff&&(e.l+=2),e.l+=4);var l=Rs(e,s,r);32&n&&(l=ao[l.charCodeAt(0)]);var h=a-e.l;r&&2==r.biff&&--h;var u=a!=e.l&&0!==o&&h>0?function(e,t,r,a){var n,i=e.l+t,s=qc(e,a,r);i!==e.l&&(n=Gc(e,i-e.l,s,r));return[s,n]}(e,h,r,o):[];return{chKey:i,Name:l,itab:c,rgce:u}}function io(e,t,r){if(r.biff<8)return function(e,t,r){3==e[e.l+1]&&e[e.l]++;var a=Is(e,0,r);return 3==a.charCodeAt(0)?a.slice(1):a}(e,0,r);for(var a=[],n=e.l+t,i=e.read_shift(r.biff>8?4:2);0!=i--;)a.push(zs(e,r.biff,r));if(e.l!=n)throw new Error("Bad ExternSheet: "+e.l+" != "+n);return a}function so(e,t,r){var a=Gs(e,6);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[a,Qc(e,t,r)]}var oo={8:function(e,t){var r=e.l+t;e.l+=10;var a=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var n=e.read_shift(1);return e.l+=n,e.l=r,{fmt:a}}};function co(e,t,r){if(!r.cellStyles)return ui(e,t);var a=r&&r.biff>=12?4:2,n=e.read_shift(a),i=e.read_shift(a),s=e.read_shift(a),o=e.read_shift(a),c=e.read_shift(2);2==a&&(e.l+=2);var l={s:n,e:i,w:s,ixfe:o,flags:c};return(r.biff>=5||!r.biff)&&(l.level=c>>8&7),l}var lo=Us,ho=Ps,uo=Ds;var fo=[2,3,48,49,131,139,140,245],po=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=ya({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(t,r){var a=r||{};a.dateNF||(a.dateNF="yyyymmdd");var n=Ii(function(t,r){var a=[],n=pr(1);switch(r.type){case"base64":n=mr(ur(t));break;case"binary":n=mr(t);break;case"buffer":case"array":n=t}hi(n,0);var i=n.read_shift(1),s=!!(136&i),o=!1,c=!1;switch(i){case 2:case 3:case 131:case 139:case 245:break;case 48:case 49:o=!0,s=!0;break;case 140:c=!0;break;default:throw new Error("DBF Unsupported Version: "+i.toString(16))}var l=0,h=521;2==i&&(l=n.read_shift(2)),n.l+=3,2!=i&&(l=n.read_shift(4)),l>1048576&&(l=1e6),2!=i&&(h=n.read_shift(2));var u=n.read_shift(2),d=r.codepage||1252;2!=i&&(n.l+=16,n.read_shift(1),0!==n[n.l]&&(d=e[n[n.l]]),n.l+=1,n.l+=2),c&&(n.l+=36);for(var f=[],p={},g=Math.min(n.length,2==i?521:h-10-(o?264:0)),m=c?32:11;n.l<g&&13!=n[n.l];)switch((p={}).name=ir.utils.decode(d,n.slice(n.l,n.l+m)).replace(/[\u0000\r\n].*$/g,""),n.l+=m,p.type=String.fromCharCode(n.read_shift(1)),2==i||c||(p.offset=n.read_shift(4)),p.len=n.read_shift(1),2==i&&(p.offset=n.read_shift(2)),p.dec=n.read_shift(1),p.name.length&&f.push(p),2!=i&&(n.l+=c?13:14),p.type){case"B":o&&8==p.len||!r.WTF||console.log("Skipping "+p.name+":"+p.type);break;case"G":case"P":r.WTF&&console.log("Skipping "+p.name+":"+p.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+p.type)}if(13!==n[n.l]&&(n.l=h-1),13!==n.read_shift(1))throw new Error("DBF Terminator not found "+n.l+" "+n[n.l]);n.l=h;var b=0,y=0;for(a[0]=[],y=0;y!=f.length;++y)a[0][y]=f[y].name;for(;l-- >0;)if(42!==n[n.l])for(++n.l,a[++b]=[],y=0,y=0;y!=f.length;++y){var v=n.slice(n.l,n.l+f[y].len);n.l+=f[y].len,hi(v,0);var w=ir.utils.decode(d,v);switch(f[y].type){case"C":w.trim().length&&(a[b][y]=w.replace(/\s+$/,""));break;case"D":8===w.length?a[b][y]=new Date(+w.slice(0,4),+w.slice(4,6)-1,+w.slice(6,8)):a[b][y]=w;break;case"F":a[b][y]=parseFloat(w.trim());break;case"+":case"I":a[b][y]=c?2147483648^v.read_shift(-4,"i"):v.read_shift(4,"i");break;case"L":switch(w.trim().toUpperCase()){case"Y":case"T":a[b][y]=!0;break;case"N":case"F":a[b][y]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+w+"|")}break;case"M":if(!s)throw new Error("DBF Unexpected MEMO for type "+i.toString(16));a[b][y]="##MEMO##"+(c?parseInt(w.trim(),10):v.read_shift(4));break;case"N":(w=w.replace(/\u0000/g,"").trim())&&"."!=w&&(a[b][y]=+w||0);break;case"@":a[b][y]=new Date(v.read_shift(-8,"f")-621356832e5);break;case"T":a[b][y]=new Date(864e5*(v.read_shift(4)-2440588)+v.read_shift(4));break;case"Y":a[b][y]=v.read_shift(4,"i")/1e4+v.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":a[b][y]=-v.read_shift(-8,"f");break;case"B":if(o&&8==f[y].len){a[b][y]=v.read_shift(8,"f");break}case"G":case"P":v.l+=f[y].len;break;case"0":if("_NullFlags"===f[y].name)break;default:throw new Error("DBF Unsupported data type "+f[y].type)}}else n.l+=u;if(2!=i&&n.l<n.length&&26!=n[n.l++])throw new Error("DBF EOF Marker missing "+(n.l-1)+" of "+n.length+" "+n[n.l-1].toString(16));return r&&r.sheetRows&&(a=a.slice(0,r.sheetRows)),r.DBF=f,a}(t,a),a);return n["!cols"]=a.DBF.map((function(e){return{wch:e.len,DBF:e}})),delete a.DBF,n}var a={B:8,C:250,L:1,D:8,"?":0,"":0};return{to_workbook:function(e,t){try{return Fi(r(e,t),t)}catch(e){if(t&&t.WTF)throw e}return{SheetNames:[],Sheets:{}}},to_sheet:r,from_sheet:function(e,r){var n=r||{};if(+n.codepage>=0&&tr(+n.codepage),"string"==n.type)throw new Error("Cannot write DBF to JS string");var i=pi(),s=pu(e,{header:1,raw:!0,cellDates:!0}),o=s[0],c=s.slice(1),l=e["!cols"]||[],h=0,u=0,d=0,f=1;for(h=0;h<o.length;++h)if(((l[h]||{}).DBF||{}).name)o[h]=l[h].DBF.name,++d;else if(null!=o[h]){if(++d,"number"==typeof o[h]&&(o[h]=o[h].toString(10)),"string"!=typeof o[h])throw new Error("DBF Invalid column name "+o[h]+" |"+typeof o[h]+"|");if(o.indexOf(o[h])!==h)for(u=0;u<1024;++u)if(-1==o.indexOf(o[h]+"_"+u)){o[h]+="_"+u;break}}var p=Ti(e["!ref"]),g=[],m=[],b=[];for(h=0;h<=p.e.c-p.s.c;++h){var y="",v="",w=0,A=[];for(u=0;u<c.length;++u)null!=c[u][h]&&A.push(c[u][h]);if(0!=A.length&&null!=o[h]){for(u=0;u<A.length;++u){switch(typeof A[u]){case"number":v="B";break;case"string":default:v="C";break;case"boolean":v="L";break;case"object":v=A[u]instanceof Date?"D":"C"}w=Math.max(w,String(A[u]).length),y=y&&y!=v?"C":v}w>250&&(w=250),"C"==(v=((l[h]||{}).DBF||{}).type)&&l[h].DBF.len>w&&(w=l[h].DBF.len),"B"==y&&"N"==v&&(y="N",b[h]=l[h].DBF.dec,w=l[h].DBF.len),m[h]="C"==y||"N"==v?w:a[y]||0,f+=m[h],g[h]=y}else g[h]="?"}var S=i.next(32);for(S.write_shift(4,318902576),S.write_shift(4,c.length),S.write_shift(2,296+32*d),S.write_shift(2,f),h=0;h<4;++h)S.write_shift(4,0);for(S.write_shift(4,(+t[Zt]||3)<<8),h=0,u=0;h<o.length;++h)if(null!=o[h]){var x=i.next(32),k=(o[h].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);x.write_shift(1,k,"sbcs"),x.write_shift(1,"?"==g[h]?"C":g[h],"sbcs"),x.write_shift(4,u),x.write_shift(1,m[h]||a[g[h]]||0),x.write_shift(1,b[h]||0),x.write_shift(1,2),x.write_shift(4,0),x.write_shift(1,0),x.write_shift(4,0),x.write_shift(4,0),u+=m[h]||a[g[h]]||0}var C=i.next(264);for(C.write_shift(4,13),h=0;h<65;++h)C.write_shift(4,0);for(h=0;h<c.length;++h){var _=i.next(f);for(_.write_shift(1,0),u=0;u<o.length;++u)if(null!=o[u])switch(g[u]){case"L":_.write_shift(1,null==c[h][u]?63:c[h][u]?84:70);break;case"B":_.write_shift(8,c[h][u]||0,"f");break;case"N":var T="0";for("number"==typeof c[h][u]&&(T=c[h][u].toFixed(b[u]||0)),d=0;d<m[u]-T.length;++d)_.write_shift(1,32);_.write_shift(1,T,"sbcs");break;case"D":c[h][u]?(_.write_shift(4,("0000"+c[h][u].getFullYear()).slice(-4),"sbcs"),_.write_shift(2,("00"+(c[h][u].getMonth()+1)).slice(-2),"sbcs"),_.write_shift(2,("00"+c[h][u].getDate()).slice(-2),"sbcs")):_.write_shift(8,"00000000","sbcs");break;case"C":var E=String(null!=c[h][u]?c[h][u]:"").slice(0,m[u]);for(_.write_shift(1,E,"sbcs"),d=0;d<m[u]-E.length;++d)_.write_shift(1,32)}}return i.next(1).write_shift(1,26),i.end()}}}(),go=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("N("+ba(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(t,r){var a=e[r];return"number"==typeof a?cr(a):a},a=function(e,t,r){var a=t.charCodeAt(0)-32<<4|r.charCodeAt(0)-48;return 59==a?e:cr(a)};function n(e,n){var i,s=e.split(/[\n\r]+/),o=-1,c=-1,l=0,h=0,u=[],d=[],f=null,p={},g=[],m=[],b=[],y=0;for(+n.codepage>=0&&tr(+n.codepage);l!==s.length;++l){y=0;var v,w=s[l].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,a).replace(t,r),A=w.replace(/;;/g,"\0").split(";").map((function(e){return e.replace(/\u0000/g,";")})),S=A[0];if(w.length>0)switch(S){case"ID":case"E":case"B":case"O":case"W":break;case"P":"P"==A[1].charAt(0)&&d.push(w.slice(3).replace(/;;/g,";"));break;case"C":var x=!1,k=!1,C=!1,_=!1,T=-1,E=-1;for(h=1;h<A.length;++h)switch(A[h].charAt(0)){case"A":case"G":break;case"X":c=parseInt(A[h].slice(1))-1,k=!0;break;case"Y":for(o=parseInt(A[h].slice(1))-1,k||(c=0),i=u.length;i<=o;++i)u[i]=[];break;case"K":'"'===(v=A[h].slice(1)).charAt(0)?v=v.slice(1,v.length-1):"TRUE"===v?v=!0:"FALSE"===v?v=!1:isNaN(Ma(v))?isNaN(Da(v).getDate())||(v=Oa(v)):(v=Ma(v),null!==f&&ia(f)&&(v=ka(v))),void 0!==ir&&"string"==typeof v&&"string"!=(n||{}).type&&(n||{}).codepage&&(v=ir.utils.decode(n.codepage,v)),x=!0;break;case"E":_=!0;var O=Ac(A[h].slice(1),{r:o,c});u[o][c]=[u[o][c],O];break;case"S":C=!0,u[o][c]=[u[o][c],"S5S"];break;case"R":T=parseInt(A[h].slice(1))-1;break;case"C":E=parseInt(A[h].slice(1))-1;break;default:if(n&&n.WTF)throw new Error("SYLK bad record "+w)}if(x&&(u[o][c]&&2==u[o][c].length?u[o][c][0]=v:u[o][c]=v,f=null),C){if(_)throw new Error("SYLK shared formula cannot have own formula");var F=T>-1&&u[T][E];if(!F||!F[1])throw new Error("SYLK shared formula cannot find base");u[o][c][1]=kc(F[1],{r:o-T,c:c-E})}break;case"F":var P=0;for(h=1;h<A.length;++h)switch(A[h].charAt(0)){case"X":c=parseInt(A[h].slice(1))-1,++P;break;case"Y":for(o=parseInt(A[h].slice(1))-1,i=u.length;i<=o;++i)u[i]=[];break;case"M":y=parseInt(A[h].slice(1))/20;break;case"F":case"G":case"S":case"D":case"N":break;case"P":f=d[parseInt(A[h].slice(1))];break;case"W":for(b=A[h].slice(1).split(" "),i=parseInt(b[0],10);i<=parseInt(b[1],10);++i)y=parseInt(b[2],10),m[i-1]=0===y?{hidden:!0}:{wch:y},Zo(m[i-1]);break;case"C":m[c=parseInt(A[h].slice(1))-1]||(m[c]={});break;case"R":g[o=parseInt(A[h].slice(1))-1]||(g[o]={}),y>0?(g[o].hpt=y,g[o].hpx=ec(y)):0===y&&(g[o].hidden=!0);break;default:if(n&&n.WTF)throw new Error("SYLK bad record "+w)}P<1&&(f=null);break;default:if(n&&n.WTF)throw new Error("SYLK bad record "+w)}}return g.length>0&&(p["!rows"]=g),m.length>0&&(p["!cols"]=m),n&&n.sheetRows&&(u=u.slice(0,n.sheetRows)),[u,p]}function i(e,t){var r=function(e,t){switch(t.type){case"base64":return n(ur(e),t);case"binary":return n(e,t);case"buffer":return n(dr&&Buffer.isBuffer(e)?e.toString("binary"):br(e),t);case"array":return n(Fa(e),t)}throw new Error("Unrecognized type "+t.type)}(e,t),a=r[0],i=r[1],s=Ii(a,t);return ba(i).forEach((function(e){s[e]=i[e]})),s}function s(e,t,r,a){var n="C;Y"+(r+1)+";X"+(a+1)+";K";switch(e.t){case"n":n+=e.v||0,e.f&&!e.F&&(n+=";E"+xc(e.f,{r,c:a}));break;case"b":n+=e.v?"TRUE":"FALSE";break;case"e":n+=e.w||e.v;break;case"d":n+='"'+(e.w||e.v)+'"';break;case"s":n+='"'+e.v.replace(/"/g,"").replace(/;/g,";;")+'"'}return n}return e["|"]=254,{to_workbook:function(e,t){return Fi(i(e,t),t)},to_sheet:i,from_sheet:function(e,t){var r,a,n=["ID;PWXL;N;E"],i=[],o=Ti(e["!ref"]),c=Array.isArray(e),l="\r\n";n.push("P;PGeneral"),n.push("F;P0;DG0G8;M255"),e["!cols"]&&(a=n,e["!cols"].forEach((function(e,t){var r="F;W"+(t+1)+" "+(t+1)+" ";e.hidden?r+="0":("number"!=typeof e.width||e.wpx||(e.wpx=Go(e.width)),"number"!=typeof e.wpx||e.wch||(e.wch=qo(e.wpx)),"number"==typeof e.wch&&(r+=Math.round(e.wch)))," "!=r.charAt(r.length-1)&&a.push(r)}))),e["!rows"]&&function(e,t){t.forEach((function(t,r){var a="F;";t.hidden?a+="M0;":t.hpt?a+="M"+20*t.hpt+";":t.hpx&&(a+="M"+20*Qo(t.hpx)+";"),a.length>2&&e.push(a+"R"+(r+1))}))}(n,e["!rows"]),n.push("B;Y"+(o.e.r-o.s.r+1)+";X"+(o.e.c-o.s.c+1)+";D"+[o.s.c,o.s.r,o.e.c,o.e.r].join(" "));for(var h=o.s.r;h<=o.e.r;++h)for(var u=o.s.c;u<=o.e.c;++u){var d=ki({r:h,c:u});(r=c?(e[h]||[])[u]:e[d])&&(null!=r.v||r.f&&!r.F)&&i.push(s(r,0,h,u))}return n.join(l)+l+i.join(l)+l+"E"+l}}}(),mo=function(){function e(e,t){for(var r=e.split("\n"),a=-1,n=-1,i=0,s=[];i!==r.length;++i)if("BOT"!==r[i].trim()){if(!(a<0)){for(var o=r[i].trim().split(","),c=o[0],l=o[1],h=r[++i]||"";1&(h.match(/["]/g)||[]).length&&i<r.length-1;)h+="\n"+r[++i];switch(h=h.trim(),+c){case-1:if("BOT"===h){s[++a]=[],n=0;continue}if("EOD"!==h)throw new Error("Unrecognized DIF special command "+h);break;case 0:"TRUE"===h?s[a][n]=!0:"FALSE"===h?s[a][n]=!1:isNaN(Ma(l))?isNaN(Da(l).getDate())?s[a][n]=l:s[a][n]=Oa(l):s[a][n]=Ma(l),++n;break;case 1:(h=(h=h.slice(1,h.length-1)).replace(/""/g,'"'))&&h.match(/^=".*"$/)&&(h=h.slice(2,-1)),s[a][n++]=""!==h?h:null}if("EOD"===h)break}}else s[++a]=[],n=0;return t&&t.sheetRows&&(s=s.slice(0,t.sheetRows)),s}function t(t,r){return Ii(function(t,r){switch(r.type){case"base64":return e(ur(t),r);case"binary":return e(t,r);case"buffer":return e(dr&&Buffer.isBuffer(t)?t.toString("binary"):br(t),r);case"array":return e(Fa(t),r)}throw new Error("Unrecognized type "+r.type)}(t,r),r)}return{to_workbook:function(e,r){return Fi(t(e,r),r)},to_sheet:t,from_sheet:function(){var e=function(e,t,r,a,n){e.push(t),e.push(r+","+a),e.push('"'+n.replace(/"/g,'""')+'"')},t=function(e,t,r,a){e.push(t+","+r),e.push(1==t?'"'+a.replace(/"/g,'""')+'"':a)};return function(r){var a,n=[],i=Ti(r["!ref"]),s=Array.isArray(r);e(n,"TABLE",0,1,"sheetjs"),e(n,"VECTORS",0,i.e.r-i.s.r+1,""),e(n,"TUPLES",0,i.e.c-i.s.c+1,""),e(n,"DATA",0,0,"");for(var o=i.s.r;o<=i.e.r;++o){t(n,-1,0,"BOT");for(var c=i.s.c;c<=i.e.c;++c){var l=ki({r:o,c});if(a=s?(r[o]||[])[c]:r[l])switch(a.t){case"n":var h=a.w;h||null==a.v||(h=a.v),null==h?a.f&&!a.F?t(n,1,0,"="+a.f):t(n,1,0,""):t(n,0,h,"V");break;case"b":t(n,0,a.v?1:0,a.v?"TRUE":"FALSE");break;case"s":t(n,1,0,isNaN(a.v)?a.v:'="'+a.v+'"');break;case"d":a.w||(a.w=la(a.z||Pr[14],wa(Oa(a.v)))),t(n,0,a.w,"V");break;default:t(n,1,0,"")}else t(n,1,0,"")}}t(n,-1,0,"EOD");return n.join("\r\n")}}()}}(),bo=function(){function e(e){return e.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function t(e,t){return Ii(function(e,t){for(var r=e.split("\n"),a=-1,n=-1,i=0,s=[];i!==r.length;++i){var o=r[i].trim().split(":");if("cell"===o[0]){var c=xi(o[1]);if(s.length<=c.r)for(a=s.length;a<=c.r;++a)s[a]||(s[a]=[]);switch(a=c.r,n=c.c,o[2]){case"t":s[a][n]=o[3].replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,"\n");break;case"v":s[a][n]=+o[3];break;case"vtf":var l=o[o.length-1];case"vtc":"nl"===o[3]?s[a][n]=!!+o[4]:s[a][n]=+o[4],"vtf"==o[2]&&(s[a][n]=[s[a][n],l])}}}return t&&t.sheetRows&&(s=s.slice(0,t.sheetRows)),s}(e,t),t)}var r=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join("\n"),a=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join("\n")+"\n",n=["# SocialCalc Spreadsheet Control Save","part:sheet"].join("\n"),i="--SocialCalcSpreadsheetControlSave--";function s(t){if(!t||!t["!ref"])return"";for(var r,a=[],n=[],i="",s=Ci(t["!ref"]),o=Array.isArray(t),c=s.s.r;c<=s.e.r;++c)for(var l=s.s.c;l<=s.e.c;++l)if(i=ki({r:c,c:l}),(r=o?(t[c]||[])[l]:t[i])&&null!=r.v&&"z"!==r.t){switch(n=["cell",i,"t"],r.t){case"s":case"str":n.push(e(r.v));break;case"n":r.f?(n[2]="vtf",n[3]="n",n[4]=r.v,n[5]=e(r.f)):(n[2]="v",n[3]=r.v);break;case"b":n[2]="vt"+(r.f?"f":"c"),n[3]="nl",n[4]=r.v?"1":"0",n[5]=e(r.f||(r.v?"TRUE":"FALSE"));break;case"d":var h=wa(Oa(r.v));n[2]="vtc",n[3]="nd",n[4]=""+h,n[5]=r.w||la(r.z||Pr[14],h);break;case"e":continue}a.push(n.join(":"))}return a.push("sheet:c:"+(s.e.c-s.s.c+1)+":r:"+(s.e.r-s.s.r+1)+":tvf:1"),a.push("valueformat:1:text-wiki"),a.join("\n")}return{to_workbook:function(e,r){return Fi(t(e,r),r)},to_sheet:t,from_sheet:function(e){return[r,a,n,a,s(e),i].join("\n")}}}(),yo=function(){function e(e,t,r,a,n){n.raw?t[r][a]=e:""===e||("TRUE"===e?t[r][a]=!0:"FALSE"===e?t[r][a]=!1:isNaN(Ma(e))?isNaN(Da(e).getDate())?t[r][a]=e:t[r][a]=Oa(e):t[r][a]=Ma(e))}var t={44:",",9:"\t",59:";",124:"|"},r={44:3,9:2,59:1,124:0};function a(e){for(var a={},n=!1,i=0,s=0;i<e.length;++i)34==(s=e.charCodeAt(i))?n=!n:!n&&s in t&&(a[s]=(a[s]||0)+1);for(i in s=[],a)Object.prototype.hasOwnProperty.call(a,i)&&s.push([a[i],i]);if(!s.length)for(i in a=r)Object.prototype.hasOwnProperty.call(a,i)&&s.push([a[i],i]);return s.sort((function(e,t){return e[0]-t[0]||r[e[1]]-r[t[1]]})),t[s.pop()[1]]||44}function n(e,t){var r=t||{},n="";var i=r.dense?[]:{},s={s:{c:0,r:0},e:{c:0,r:0}};"sep="==e.slice(0,4)?13==e.charCodeAt(5)&&10==e.charCodeAt(6)?(n=e.charAt(4),e=e.slice(7)):13==e.charCodeAt(5)||10==e.charCodeAt(5)?(n=e.charAt(4),e=e.slice(6)):n=a(e.slice(0,1024)):n=r&&r.FS?r.FS:a(e.slice(0,1024));var o=0,c=0,l=0,h=0,u=0,d=n.charCodeAt(0),f=!1,p=0,g=e.charCodeAt(0);e=e.replace(/\r\n/gm,"\n");var m,b,y=null!=r.dateNF?(m=r.dateNF,b=(b="number"==typeof m?Pr[m]:m).replace(fa,"(\\d+)"),new RegExp("^"+b+"$")):null;function v(){var t=e.slice(h,u),a={};if('"'==t.charAt(0)&&'"'==t.charAt(t.length-1)&&(t=t.slice(1,-1).replace(/""/g,'"')),0===t.length)a.t="z";else if(r.raw)a.t="s",a.v=t;else if(0===t.trim().length)a.t="s",a.v=t;else if(61==t.charCodeAt(0))34==t.charCodeAt(1)&&34==t.charCodeAt(t.length-1)?(a.t="s",a.v=t.slice(2,-1).replace(/""/g,'"')):1!=t.length?(a.t="n",a.f=t.slice(1)):(a.t="s",a.v=t);else if("TRUE"==t)a.t="b",a.v=!0;else if("FALSE"==t)a.t="b",a.v=!1;else if(isNaN(l=Ma(t)))if(!isNaN(Da(t).getDate())||y&&t.match(y)){a.z=r.dateNF||Pr[14];var n=0;y&&t.match(y)&&(t=function(e,t,r){var a=-1,n=-1,i=-1,s=-1,o=-1,c=-1;(t.match(fa)||[]).forEach((function(e,t){var l=parseInt(r[t+1],10);switch(e.toLowerCase().charAt(0)){case"y":a=l;break;case"d":i=l;break;case"h":s=l;break;case"s":c=l;break;case"m":s>=0?o=l:n=l}})),c>=0&&-1==o&&n>=0&&(o=n,n=-1);var l=(""+(a>=0?a:(new Date).getFullYear())).slice(-4)+"-"+("00"+(n>=1?n:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);7==l.length&&(l="0"+l),8==l.length&&(l="20"+l);var h=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return-1==s&&-1==o&&-1==c?l:-1==a&&-1==n&&-1==i?h:l+"T"+h}(0,r.dateNF,t.match(y)||[]),n=1),r.cellDates?(a.t="d",a.v=Oa(t,n)):(a.t="n",a.v=wa(Oa(t,n))),!1!==r.cellText&&(a.w=la(a.z,a.v instanceof Date?wa(a.v):a.v)),r.cellNF||delete a.z}else a.t="s",a.v=t;else a.t="n",!1!==r.cellText&&(a.w=t),a.v=l;if("z"==a.t||(r.dense?(i[o]||(i[o]=[]),i[o][c]=a):i[ki({c,r:o})]=a),h=u+1,g=e.charCodeAt(h),s.e.c<c&&(s.e.c=c),s.e.r<o&&(s.e.r=o),p==d)++c;else if(c=0,++o,r.sheetRows&&r.sheetRows<=o)return!0}e:for(;u<e.length;++u)switch(p=e.charCodeAt(u)){case 34:34===g&&(f=!f);break;case d:case 10:case 13:if(!f&&v())break e}return u-h>0&&v(),i["!ref"]=_i(s),i}function i(t,r){return r&&r.PRN?r.FS||"sep="==t.slice(0,4)||t.indexOf("\t")>=0||t.indexOf(",")>=0||t.indexOf(";")>=0?n(t,r):Ii(function(t,r){var a=r||{},n=[];if(!t||0===t.length)return n;for(var i=t.split(/[\r\n]/),s=i.length-1;s>=0&&0===i[s].length;)--s;for(var o=10,c=0,l=0;l<=s;++l)-1==(c=i[l].indexOf(" "))?c=i[l].length:c++,o=Math.max(o,c);for(l=0;l<=s;++l){n[l]=[];var h=0;for(e(i[l].slice(0,o).trim(),n,l,h,a),h=1;h<=(i[l].length-o)/10+1;++h)e(i[l].slice(o+10*(h-1),o+10*h).trim(),n,l,h,a)}return a.sheetRows&&(n=n.slice(0,a.sheetRows)),n}(t,r),r):n(t,r)}function s(e,t){var r="",a="string"==t.type?[0,0,0,0]:lu(e,t);switch(t.type){case"base64":r=ur(e);break;case"binary":case"string":r=e;break;case"buffer":r=65001==t.codepage?e.toString("utf8"):t.codepage&&void 0!==ir?ir.utils.decode(t.codepage,e):dr&&Buffer.isBuffer(e)?e.toString("binary"):br(e);break;case"array":r=Fa(e);break;default:throw new Error("Unrecognized type "+t.type)}return 239==a[0]&&187==a[1]&&191==a[2]?r=gn(r.slice(3)):"string"!=t.type&&"buffer"!=t.type&&65001==t.codepage?r=gn(r):"binary"==t.type&&void 0!==ir&&t.codepage&&(r=ir.utils.decode(t.codepage,ir.utils.encode(28591,r))),"socialcalc:version:"==r.slice(0,19)?bo.to_sheet("string"==t.type?r:gn(r),t):i(r,t)}return{to_workbook:function(e,t){return Fi(s(e,t),t)},to_sheet:s,from_sheet:function(e){for(var t,r=[],a=Ti(e["!ref"]),n=Array.isArray(e),i=a.s.r;i<=a.e.r;++i){for(var s=[],o=a.s.c;o<=a.e.c;++o){var c=ki({r:i,c:o});if((t=n?(e[i]||[])[o]:e[c])&&null!=t.v){for(var l=(t.w||(Oi(t),t.w)||"").slice(0,10);l.length<10;)l+=" ";s.push(l+(0===o?" ":""))}else s.push("          ")}r.push(s.join(""))}return r.join("\n")}}}();var vo=function(){function e(e,t,r){if(e){hi(e,e.l||0);for(var a=r.Enum||b;e.l<e.length;){var n=e.read_shift(2),i=a[n]||a[65535],s=e.read_shift(2),o=e.l+s,c=i.f&&i.f(e,s,r);if(e.l=o,t(c,i,n))return}}}function t(t,r){if(!t)return t;var a=r||{};var n=a.dense?[]:{},i="Sheet1",s="",o=0,c={},l=[],h=[],u={s:{r:0,c:0},e:{r:0,c:0}},d=a.sheetRows||0;if(0==t[2]&&(8==t[3]||9==t[3])&&t.length>=16&&5==t[14]&&108===t[15])throw new Error("Unsupported Works 3 for Mac file");if(2==t[2])a.Enum=b,e(t,(function(e,t,r){switch(r){case 0:a.vers=e,e>=4096&&(a.qpro=!0);break;case 6:u=e;break;case 204:e&&(s=e);break;case 222:s=e;break;case 15:case 51:a.qpro||(e[1].v=e[1].v.slice(1));case 13:case 14:case 16:14==r&&!(112&~e[2])&&(15&e[2])>1&&(15&e[2])<15&&(e[1].z=a.dateNF||Pr[14],a.cellDates&&(e[1].t="d",e[1].v=ka(e[1].v))),a.qpro&&e[3]>o&&(n["!ref"]=_i(u),c[i]=n,l.push(i),n=a.dense?[]:{},u={s:{r:0,c:0},e:{r:0,c:0}},o=e[3],i=s||"Sheet"+(o+1),s="");var h=a.dense?(n[e[0].r]||[])[e[0].c]:n[ki(e[0])];if(h){h.t=e[1].t,h.v=e[1].v,null!=e[1].z&&(h.z=e[1].z),null!=e[1].f&&(h.f=e[1].f);break}a.dense?(n[e[0].r]||(n[e[0].r]=[]),n[e[0].r][e[0].c]=e[1]):n[ki(e[0])]=e[1]}}),a);else{if(26!=t[2]&&14!=t[2])throw new Error("Unrecognized LOTUS BOF "+t[2]);a.Enum=y,14==t[2]&&(a.qpro=!0,t.l=0),e(t,(function(e,t,r){switch(r){case 204:i=e;break;case 22:e[1].v=e[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(e[3]>o&&(n["!ref"]=_i(u),c[i]=n,l.push(i),n=a.dense?[]:{},u={s:{r:0,c:0},e:{r:0,c:0}},o=e[3],i="Sheet"+(o+1)),d>0&&e[0].r>=d)break;a.dense?(n[e[0].r]||(n[e[0].r]=[]),n[e[0].r][e[0].c]=e[1]):n[ki(e[0])]=e[1],u.e.c<e[0].c&&(u.e.c=e[0].c),u.e.r<e[0].r&&(u.e.r=e[0].r);break;case 27:e[14e3]&&(h[e[14e3][0]]=e[14e3][1]);break;case 1537:h[e[0]]=e[1],e[0]==o&&(i=e[1])}}),a)}if(n["!ref"]=_i(u),c[s||i]=n,l.push(s||i),!h.length)return{SheetNames:l,Sheets:c};for(var f={},p=[],g=0;g<h.length;++g)c[l[g]]?(p.push(h[g]||l[g]),f[h[g]]=c[h[g]]||c[l[g]]):(p.push(h[g]),f[h[g]]={"!ref":"A1"});return{SheetNames:p,Sheets:f}}function r(e,t,r){var a=[{c:0,r:0},{t:"n",v:0},0,0];return r.qpro&&20768!=r.vers?(a[0].c=e.read_shift(1),a[3]=e.read_shift(1),a[0].r=e.read_shift(2),e.l+=2):(a[2]=e.read_shift(1),a[0].c=e.read_shift(2),a[0].r=e.read_shift(2)),a}function a(e,t,a){var n=e.l+t,i=r(e,0,a);if(i[1].t="s",20768==a.vers){e.l++;var s=e.read_shift(1);return i[1].v=e.read_shift(s,"utf8"),i}return a.qpro&&e.l++,i[1].v=e.read_shift(n-e.l,"cstr"),i}function n(e,t,r){var a=di(7+r.length);a.write_shift(1,255),a.write_shift(2,t),a.write_shift(2,e),a.write_shift(1,39);for(var n=0;n<a.length;++n){var i=r.charCodeAt(n);a.write_shift(1,i>=128?95:i)}return a.write_shift(1,0),a}function i(e,t,r){var a=di(7);return a.write_shift(1,255),a.write_shift(2,t),a.write_shift(2,e),a.write_shift(2,r,"i"),a}function s(e,t,r){var a=di(13);return a.write_shift(1,255),a.write_shift(2,t),a.write_shift(2,e),a.write_shift(8,r,"f"),a}function o(e,t,r){var a=32768&t;return t=(a?e:0)+((t&=-32769)>=8192?t-16384:t),(a?"":"$")+(r?Si(t):wi(t))}var c={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},l=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function h(e){var t=[{c:0,r:0},{t:"n",v:0},0];return t[0].r=e.read_shift(2),t[3]=e[e.l++],t[0].c=e[e.l++],t}function u(e,t,r,a){var n=di(6+a.length);n.write_shift(2,e),n.write_shift(1,r),n.write_shift(1,t),n.write_shift(1,39);for(var i=0;i<a.length;++i){var s=a.charCodeAt(i);n.write_shift(1,s>=128?95:s)}return n.write_shift(1,0),n}function d(e,t){var r=h(e),a=e.read_shift(4),n=e.read_shift(4),i=e.read_shift(2);if(65535==i)return 0===a&&3221225472===n?(r[1].t="e",r[1].v=15):0===a&&3489660928===n?(r[1].t="e",r[1].v=42):r[1].v=0,r;var s=32768&i;return i=(32767&i)-16446,r[1].v=(1-2*s)*(n*Math.pow(2,i+32)+a*Math.pow(2,i)),r}function f(e,t,r,a){var n=di(14);if(n.write_shift(2,e),n.write_shift(1,r),n.write_shift(1,t),0==a)return n.write_shift(4,0),n.write_shift(4,0),n.write_shift(2,65535),n;var i,s=0,o=0,c=0;return a<0&&(s=1,a=-a),o=0|Math.log2(a),2147483648&(c=(a/=Math.pow(2,o-31))>>>0)||(++o,c=(a/=2)>>>0),a-=c,c|=2147483648,c>>>=0,i=(a*=Math.pow(2,32))>>>0,n.write_shift(4,i),n.write_shift(4,c),o+=16383+(s?32768:0),n.write_shift(2,o),n}function p(e,t){var r=h(e),a=e.read_shift(8,"f");return r[1].v=a,r}function g(e,t){return 0==e[e.l+t-1]?e.read_shift(t,"cstr"):""}function m(e,t){var r=di(5+e.length);r.write_shift(2,14e3),r.write_shift(2,t);for(var a=0;a<e.length;++a){var n=e.charCodeAt(a);r[r.l++]=n>127?95:n}return r[r.l++]=0,r}var b={0:{n:"BOF",f:Fs},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function(e,t,r){var a={s:{c:0,r:0},e:{c:0,r:0}};return 8==t&&r.qpro?(a.s.c=e.read_shift(1),e.l++,a.s.r=e.read_shift(2),a.e.c=e.read_shift(1),e.l++,a.e.r=e.read_shift(2),a):(a.s.c=e.read_shift(2),a.s.r=e.read_shift(2),12==t&&r.qpro&&(e.l+=2),a.e.c=e.read_shift(2),a.e.r=e.read_shift(2),12==t&&r.qpro&&(e.l+=2),65535==a.s.c&&(a.s.c=a.e.c=a.s.r=a.e.r=0),a)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function(e,t,a){var n=r(e,0,a);return n[1].v=e.read_shift(2,"i"),n}},14:{n:"NUMBER",f:function(e,t,a){var n=r(e,0,a);return n[1].v=e.read_shift(8,"f"),n}},15:{n:"LABEL",f:a},16:{n:"FORMULA",f:function(e,t,a){var n=e.l+t,i=r(e,0,a);if(i[1].v=e.read_shift(8,"f"),a.qpro)e.l=n;else{var s=e.read_shift(2);!function(e,t){hi(e,0);var r=[],a=0,n="",i="",s="",h="";for(;e.l<e.length;){var u=e[e.l++];switch(u){case 0:r.push(e.read_shift(8,"f"));break;case 1:i=o(t[0].c,e.read_shift(2),!0),n=o(t[0].r,e.read_shift(2),!1),r.push(i+n);break;case 2:var d=o(t[0].c,e.read_shift(2),!0),f=o(t[0].r,e.read_shift(2),!1);i=o(t[0].c,e.read_shift(2),!0),n=o(t[0].r,e.read_shift(2),!1),r.push(d+f+":"+i+n);break;case 3:if(e.l<e.length)return void console.error("WK1 premature formula end");break;case 4:r.push("("+r.pop()+")");break;case 5:r.push(e.read_shift(2));break;case 6:for(var p="";u=e[e.l++];)p+=String.fromCharCode(u);r.push('"'+p.replace(/"/g,'""')+'"');break;case 8:r.push("-"+r.pop());break;case 23:r.push("+"+r.pop());break;case 22:r.push("NOT("+r.pop()+")");break;case 20:case 21:h=r.pop(),s=r.pop(),r.push(["AND","OR"][u-20]+"("+s+","+h+")");break;default:if(u<32&&l[u])h=r.pop(),s=r.pop(),r.push(s+l[u]+h);else{if(!c[u])return u<=7?console.error("WK1 invalid opcode "+u.toString(16)):u<=24?console.error("WK1 unsupported op "+u.toString(16)):u<=30?console.error("WK1 invalid opcode "+u.toString(16)):u<=115?console.error("WK1 unsupported function opcode "+u.toString(16)):console.error("WK1 unrecognized opcode "+u.toString(16));if(69==(a=c[u][1])&&(a=e[e.l++]),a>r.length)return void console.error("WK1 bad formula parse 0x"+u.toString(16)+":|"+r.join("|")+"|");var g=r.slice(-a);r.length-=a,r.push(c[u][0]+"("+g.join(",")+")")}}}1==r.length?t[1].f=""+r[0]:console.error("WK1 bad formula parse |"+r.join("|")+"|")}(e.slice(e.l,e.l+s),i),e.l+=s}return i}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:a},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:g},222:{n:"SHEETNAMELP",f:function(e,t){var r=e[e.l++];r>t-1&&(r=t-1);for(var a="";a.length<r;)a+=String.fromCharCode(e[e.l++]);return a}},65535:{n:""}},y={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:function(e,t){var r=h(e);return r[1].t="s",r[1].v=e.read_shift(t-4,"cstr"),r}},23:{n:"NUMBER17",f:d},24:{n:"NUMBER18",f:function(e,t){var r=h(e);r[1].v=e.read_shift(2);var a=r[1].v>>1;if(1&r[1].v)switch(7&a){case 0:a=5e3*(a>>3);break;case 1:a=500*(a>>3);break;case 2:a=(a>>3)/20;break;case 3:a=(a>>3)/200;break;case 4:a=(a>>3)/2e3;break;case 5:a=(a>>3)/2e4;break;case 6:a=(a>>3)/16;break;case 7:a=(a>>3)/64}return r[1].v=a,r}},25:{n:"FORMULA19",f:function(e,t){var r=d(e);return e.l+=t-14,r}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function(e,t){for(var r={},a=e.l+t;e.l<a;){var n=e.read_shift(2);if(14e3==n){for(r[n]=[0,""],r[n][0]=e.read_shift(2);e[e.l];)r[n][1]+=String.fromCharCode(e[e.l]),e.l++;e.l++}}return r}},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:function(e,t){var r=h(e),a=e.read_shift(4);return r[1].v=a>>6,r}},38:{n:"??"},39:{n:"NUMBER27",f:p},40:{n:"FORMULA28",f:function(e,t){var r=p(e);return e.l+=t-10,r}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:g},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function(e,t,r){if(r.qpro&&!(t<21)){var a=e.read_shift(1);return e.l+=17,e.l+=1,e.l+=2,[a,e.read_shift(t-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:function(e,t){var r=t||{};if(+r.codepage>=0&&tr(+r.codepage),"string"==r.type)throw new Error("Cannot write WK1 to JS string");var a,o,c=pi(),l=Ti(e["!ref"]),h=Array.isArray(e),u=[];kh(c,0,(a=1030,(o=di(2)).write_shift(2,a),o)),kh(c,6,function(e){var t=di(8);return t.write_shift(2,e.s.c),t.write_shift(2,e.s.r),t.write_shift(2,e.e.c),t.write_shift(2,e.e.r),t}(l));for(var d=Math.min(l.e.r,8191),f=l.s.r;f<=d;++f)for(var p=wi(f),g=l.s.c;g<=l.e.c;++g){f===l.s.r&&(u[g]=Si(g));var m=u[g]+p,b=h?(e[f]||[])[g]:e[m];if(b&&"z"!=b.t)if("n"==b.t)(0|b.v)==b.v&&b.v>=-32768&&b.v<=32767?kh(c,13,i(f,g,b.v)):kh(c,14,s(f,g,b.v));else kh(c,15,n(f,g,Oi(b).slice(0,239)))}return kh(c,1),c.end()},book_to_wk3:function(e,t){var r=t||{};if(+r.codepage>=0&&tr(+r.codepage),"string"==r.type)throw new Error("Cannot write WK3 to JS string");var a=pi();kh(a,0,function(e){var t=di(26);t.write_shift(2,4096),t.write_shift(2,4),t.write_shift(4,0);for(var r=0,a=0,n=0,i=0;i<e.SheetNames.length;++i){var s=e.SheetNames[i],o=e.Sheets[s];if(o&&o["!ref"]){++n;var c=Ci(o["!ref"]);r<c.e.r&&(r=c.e.r),a<c.e.c&&(a=c.e.c)}}r>8191&&(r=8191);return t.write_shift(2,r),t.write_shift(1,n),t.write_shift(1,a),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(1,1),t.write_shift(1,2),t.write_shift(4,0),t.write_shift(4,0),t}(e));for(var n=0,i=0;n<e.SheetNames.length;++n)(e.Sheets[e.SheetNames[n]]||{})["!ref"]&&kh(a,27,m(e.SheetNames[n],i++));var s=0;for(n=0;n<e.SheetNames.length;++n){var o=e.Sheets[e.SheetNames[n]];if(o&&o["!ref"]){for(var c=Ti(o["!ref"]),l=Array.isArray(o),h=[],d=Math.min(c.e.r,8191),p=c.s.r;p<=d;++p)for(var g=wi(p),b=c.s.c;b<=c.e.c;++b){p===c.s.r&&(h[b]=Si(b));var y=h[b]+g,v=l?(o[p]||[])[b]:o[y];if(v&&"z"!=v.t)if("n"==v.t)kh(a,23,f(p,b,s,v.v));else kh(a,22,u(p,b,s,Oi(v).slice(0,239)))}++s}}return kh(a,1),a.end()},to_workbook:function(e,r){switch(r.type){case"base64":return t(mr(ur(e)),r);case"binary":return t(mr(e),r);case"buffer":case"array":return t(e,r)}throw"Unsupported type "+r.type}}}();var wo=function(){var e=bn("t"),t=bn("rPr");function r(r){var a=r.match(e);if(!a)return{t:"s",v:""};var n={t:"s",v:nn(a[1])},i=r.match(t);return i&&(n.s=function(e){var t={},r=e.match(Za),a=0,n=!1;if(r)for(;a!=r.length;++a){var i=en(r[a]);switch(i[0].replace(/\w*:/g,"")){case"<condense":case"<extend":break;case"<shadow":if(!i.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if("1"==i.val)break;t.cp=Qt[parseInt(i.val,10)];break;case"<outline":if(!i.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=i.val;break;case"<sz":t.sz=i.val;break;case"<strike":if(!i.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!i.val)break;switch(i.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting"}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if("0"==i.val)break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if("0"==i.val)break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":i.rgb&&(t.color=i.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=i.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=i.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":case"<scheme":case"<scheme>":case"<scheme/>":case"</scheme>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(47!==i[0].charCodeAt(1)&&!n)throw new Error("Unrecognized rich format "+i[0])}}return t}(i[1])),n}var a=/<(?:\w+:)?r>/g,n=/<\/(?:\w+:)?r>/;return function(e){return e.replace(a,"").split(n).map(r).filter((function(e){return e.v}))}}(),Ao=function(){var e=/(\r\n|\n)/g;function t(t){var r=[[],t.v,[]];return t.v?(t.s&&function(e,t,r){var a=[];e.u&&a.push("text-decoration: underline;"),e.uval&&a.push("text-underline-style:"+e.uval+";"),e.sz&&a.push("font-size:"+e.sz+"pt;"),e.outline&&a.push("text-effect: outline;"),e.shadow&&a.push("text-shadow: auto;"),t.push('<span style="'+a.join("")+'">'),e.b&&(t.push("<b>"),r.push("</b>")),e.i&&(t.push("<i>"),r.push("</i>")),e.strike&&(t.push("<s>"),r.push("</s>"));var n=e.valign||"";"superscript"==n||"super"==n?n="sup":"subscript"==n&&(n="sub"),""!=n&&(t.push("<"+n+">"),r.push("</"+n+">")),r.push("</span>")}(t.s,r[0],r[2]),r[0].join("")+r[1].replace(e,"<br/>")+r[2].join("")):""}return function(e){return e.map(t).join("")}}(),So=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,xo=/<(?:\w+:)?r>/,ko=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function Co(e,t){var r=!t||t.cellHTML,a={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(a.t=nn(gn(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),a.r=gn(e),r&&(a.h=cn(a.t))):e.match(xo)&&(a.r=gn(e),a.t=nn(gn((e.replace(ko,"").match(So)||[]).join("").replace(Za,""))),r&&(a.h=Ao(wo(a.r)))),a):{t:""}}var _o=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,To=/<(?:\w+:)?(?:si|sstItem)>/g,Eo=/<\/(?:\w+:)?(?:si|sstItem)>/;function Oo(e){if(void 0!==ir)return ir.utils.encode(Zt,e);for(var t=[],r=e.split(""),a=0;a<r.length;++a)t[a]=r[a].charCodeAt(0);return t}function Fo(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function Po(e){for(var t=e.read_shift(4),r=e.l+t-4,a={},n=e.read_shift(4),i=[];n-- >0;)i.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(a.name=e.read_shift(0,"lpp4"),a.comps=i,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return a}function Io(e){var t=function(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=Fo(e,4),t.U=Fo(e,4),t.W=Fo(e,4),t}(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),4!=e.read_shift(4))throw new Error("Bad !Primary record");return t}function Mo(e,t){var r=e.l+t,a={};a.Flags=63&e.read_shift(4),e.l+=4,a.AlgID=e.read_shift(4);var n=!1;switch(a.AlgID){case 26126:case 26127:case 26128:n=36==a.Flags;break;case 26625:n=4==a.Flags;break;case 0:n=16==a.Flags||4==a.Flags||36==a.Flags;break;default:throw"Unrecognized encryption algorithm: "+a.AlgID}if(!n)throw new Error("Encryption Flags/AlgID mismatch");return a.AlgIDHash=e.read_shift(4),a.KeySize=e.read_shift(4),a.ProviderType=e.read_shift(4),e.l+=8,a.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,a}function Ro(e,t){var r={},a=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,a),e.l=a,r}function Do(e){if(36!=(63&e.read_shift(4)))throw new Error("EncryptionInfo mismatch");var t=e.read_shift(4);return{t:"Std",h:Mo(e,t),v:Ro(e,e.length-e.l)}}function No(){throw new Error("File is password-protected: ECMA-376 Extensible")}function Lo(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),a={};return r.replace(Za,(function(e){var r=en(e);switch(tn(r[0])){case"<?xml":case"<encryption":case"</encryption>":case"</keyEncryptors>":case"</keyEncryptor>":break;case"<keyData":t.forEach((function(e){a[e]=r[e]}));break;case"<dataIntegrity":a.encryptedHmacKey=r.encryptedHmacKey,a.encryptedHmacValue=r.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":a.encs=[];break;case"<keyEncryptor":a.uri=r.uri;break;case"<encryptedKey":a.encs.push(r);break;default:throw r[0]}})),a}function Bo(e){var t,r,a=0,n=Oo(e),i=n.length+1;for((t=pr(i))[0]=n.length,r=1;r!=i;++r)t[r]=n[r-1];for(r=i-1;r>=0;--r)a=((16384&a?1:0)|a<<1&32767)^t[r];return 52811^a}var jo=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],a=function(e,t){return 255&((r=e^t)/2|128*r);var r};return function(n){for(var i,s,o,c=Oo(n),l=function(e){for(var a=t[e.length-1],n=104,i=e.length-1;i>=0;--i)for(var s=e[i],o=0;7!=o;++o)64&s&&(a^=r[n]),s*=2,--n;return a}(c),h=c.length,u=pr(16),d=0;16!=d;++d)u[d]=0;for(1&~h||(i=l>>8,u[h]=a(e[0],i),--h,i=255&l,s=c[c.length-1],u[h]=a(s,i));h>0;)i=l>>8,u[--h]=a(c[h],i),i=255&l,u[--h]=a(c[h],i);for(h=15,o=15-c.length;o>0;)i=l>>8,u[h]=a(e[o],i),--o,i=255&l,u[--h]=a(c[h],i),--h,--o;return u}}(),$o=function(e){var t=0,r=jo(e);return function(e){var a=function(e,t,r,a,n){var i,s;for(n||(n=t),a||(a=jo(e)),i=0;i!=t.length;++i)s=t[i],s=255&((s^=a[r])>>5|s<<3),n[i]=s,++r;return[n,r,a]}("",e,t,r);return t=a[1],a[0]}};function Uo(e,t,r){var a=r||{};return a.Info=e.read_shift(2),e.l-=2,1===a.Info?a.Data=function(e){var t={},r=t.EncryptionVersionInfo=Fo(e,4);if(1!=r.Major||1!=r.Minor)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}(e):a.Data=function(e,t){var r={},a=r.EncryptionVersionInfo=Fo(e,4);if(t-=4,2!=a.Minor)throw new Error("unrecognized minor version code: "+a.Minor);if(a.Major>4||a.Major<2)throw new Error("unrecognized major version code: "+a.Major);r.Flags=e.read_shift(4),t-=4;var n=e.read_shift(4);return t-=4,r.EncryptionHeader=Mo(e,n),t-=n,r.EncryptionVerifier=Ro(e,t),r}(e,t),a}var zo=function(){function e(e,r){switch(r.type){case"base64":return t(ur(e),r);case"binary":return t(e,r);case"buffer":return t(dr&&Buffer.isBuffer(e)?e.toString("binary"):br(e),r);case"array":return t(Fa(e),r)}throw new Error("Unrecognized type "+r.type)}function t(e,t){var r=(t||{}).dense?[]:{},a=e.match(/\\trowd.*?\\row\b/g);if(!a.length)throw new Error("RTF missing table");var n={s:{c:0,r:0},e:{c:0,r:a.length-1}};return a.forEach((function(e,t){Array.isArray(r)&&(r[t]=[]);for(var a,i=/\\\w+\b/g,s=0,o=-1;a=i.exec(e);){if("\\cell"===a[0]){var c=e.slice(s,i.lastIndex-a[0].length);if(" "==c[0]&&(c=c.slice(1)),++o,c.length){var l={v:c,t:"s"};Array.isArray(r)?r[t][o]=l:r[ki({r:t,c:o})]=l}}s=i.lastIndex}o>n.e.c&&(n.e.c=o)})),r["!ref"]=_i(n),r}return{to_workbook:function(t,r){return Fi(e(t,r),r)},to_sheet:e,from_sheet:function(e){for(var t,r=["{\\rtf1\\ansi"],a=Ti(e["!ref"]),n=Array.isArray(e),i=a.s.r;i<=a.e.r;++i){r.push("\\trowd\\trautofit1");for(var s=a.s.c;s<=a.e.c;++s)r.push("\\cellx"+(s+1));for(r.push("\\pard\\intbl"),s=a.s.c;s<=a.e.c;++s){var o=ki({r:i,c:s});(t=n?(e[i]||[])[s]:e[o])&&(null!=t.v||t.f&&!t.F)&&(r.push(" "+(t.w||(Oi(t),t.w))),r.push("\\cell"))}r.push("\\pard\\intbl\\row")}return r.join("")+"}"}}}();function Ho(e){for(var t=0,r=1;3!=t;++t)r=256*r+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function Xo(e,t){if(0===t)return e;var r,a,n=function(e){var t=e[0]/255,r=e[1]/255,a=e[2]/255,n=Math.max(t,r,a),i=Math.min(t,r,a),s=n-i;if(0===s)return[0,0,t];var o,c=0,l=n+i;switch(o=s/(l>1?2-l:l),n){case t:c=((r-a)/s+6)%6;break;case r:c=(a-t)/s+2;break;case a:c=(t-r)/s+4}return[c/6,o,l/2]}((a=(r=e).slice("#"===r[0]?1:0).slice(0,6),[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]));return n[2]=t<0?n[2]*(1+t):1-(1-n[2])*(1-t),Ho(function(e){var t,r=e[0],a=e[1],n=e[2],i=2*a*(n<.5?n:1-n),s=n-i/2,o=[s,s,s],c=6*r;if(0!==a)switch(0|c){case 0:case 6:t=i*c,o[0]+=i,o[1]+=t;break;case 1:t=i*(2-c),o[0]+=t,o[1]+=i;break;case 2:t=i*(c-2),o[1]+=i,o[2]+=t;break;case 3:t=i*(4-c),o[1]+=t,o[2]+=i;break;case 4:t=i*(c-4),o[2]+=i,o[0]+=t;break;case 5:t=i*(6-c),o[2]+=t,o[0]+=i}for(var l=0;3!=l;++l)o[l]=Math.round(255*o[l]);return o}(n))}var Wo=6;function Go(e){return Math.floor((e+Math.round(128/Wo)/256)*Wo)}function qo(e){return Math.floor((e-5)/Wo*100+.5)/100}function Vo(e){return Math.round((e*Wo+5)/Wo*256)/256}function Ko(e){return Vo(qo(Go(e)))}function Yo(e){var t=Math.abs(e-Ko(e)),r=Wo;if(t>.005)for(Wo=1;Wo<15;++Wo)Math.abs(e-Ko(e))<=t&&(t=Math.abs(e-Ko(e)),r=Wo);Wo=r}function Zo(e){e.width?(e.wpx=Go(e.width),e.wch=qo(e.wpx),e.MDW=Wo):e.wpx?(e.wch=qo(e.wpx),e.width=Vo(e.wch),e.MDW=Wo):"number"==typeof e.wch&&(e.width=Vo(e.wch),e.wpx=Go(e.width),e.MDW=Wo),e.customWidth&&delete e.customWidth}var Jo=96;function Qo(e){return 96*e/Jo}function ec(e){return e*Jo/96}var tc={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};var rc=["numFmtId","fillId","fontId","borderId","xfId"],ac=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];var nc=function(){var e=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,t=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,r=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,a=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,n=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(i,s,o){var c,l={};return i?((c=(i=i.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"")).match(e))&&function(e,t,r){t.NumberFmt=[];for(var a=ba(Pr),n=0;n<a.length;++n)t.NumberFmt[a[n]]=Pr[a[n]];var i=e[0].match(Za);if(i)for(n=0;n<i.length;++n){var s=en(i[n]);switch(tn(s[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":case"</numFmt>":break;case"<numFmt":var o=nn(gn(s.formatCode)),c=parseInt(s.numFmtId,10);if(t.NumberFmt[c]=o,c>0){if(c>392){for(c=392;c>60&&null!=t.NumberFmt[c];--c);t.NumberFmt[c]=o}ha(o,c)}break;default:if(r.WTF)throw new Error("unrecognized "+s[0]+" in numFmts")}}}(c,l,o),(c=i.match(a))&&function(e,t,r,a){t.Fonts=[];var n={},i=!1;(e[0].match(Za)||[]).forEach((function(e){var s=en(e);switch(tn(s[0])){case"<fonts":case"<fonts>":case"</fonts>":case"<font":case"<font>":case"<name/>":case"</name>":case"<sz/>":case"</sz>":case"<vertAlign/>":case"</vertAlign>":case"<family/>":case"</family>":case"<scheme/>":case"</scheme>":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"</font>":case"<font/>":t.Fonts.push(n),n={};break;case"<name":s.val&&(n.name=gn(s.val));break;case"<b":n.bold=s.val?hn(s.val):1;break;case"<b/>":n.bold=1;break;case"<i":n.italic=s.val?hn(s.val):1;break;case"<i/>":n.italic=1;break;case"<u":switch(s.val){case"none":n.underline=0;break;case"single":n.underline=1;break;case"double":n.underline=2;break;case"singleAccounting":n.underline=33;break;case"doubleAccounting":n.underline=34}break;case"<u/>":n.underline=1;break;case"<strike":n.strike=s.val?hn(s.val):1;break;case"<strike/>":n.strike=1;break;case"<outline":n.outline=s.val?hn(s.val):1;break;case"<outline/>":n.outline=1;break;case"<shadow":n.shadow=s.val?hn(s.val):1;break;case"<shadow/>":n.shadow=1;break;case"<condense":n.condense=s.val?hn(s.val):1;break;case"<condense/>":n.condense=1;break;case"<extend":n.extend=s.val?hn(s.val):1;break;case"<extend/>":n.extend=1;break;case"<sz":s.val&&(n.sz=+s.val);break;case"<vertAlign":s.val&&(n.vertAlign=s.val);break;case"<family":s.val&&(n.family=parseInt(s.val,10));break;case"<scheme":s.val&&(n.scheme=s.val);break;case"<charset":if("1"==s.val)break;s.codepage=Qt[parseInt(s.val,10)];break;case"<color":if(n.color||(n.color={}),s.auto&&(n.color.auto=hn(s.auto)),s.rgb)n.color.rgb=s.rgb.slice(-6);else if(s.indexed){n.color.index=parseInt(s.indexed,10);var o=ts[n.color.index];81==n.color.index&&(o=ts[1]),o||(o=ts[1]),n.color.rgb=o[0].toString(16)+o[1].toString(16)+o[2].toString(16)}else s.theme&&(n.color.theme=parseInt(s.theme,10),s.tint&&(n.color.tint=parseFloat(s.tint)),s.theme&&r.themeElements&&r.themeElements.clrScheme&&(n.color.rgb=Xo(r.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)));break;case"<AlternateContent":case"<ext":i=!0;break;case"</AlternateContent>":case"</ext>":i=!1;break;default:if(a&&a.WTF&&!i)throw new Error("unrecognized "+s[0]+" in fonts")}}))}(c,l,s,o),(c=i.match(r))&&function(e,t,r,a){t.Fills=[];var n={},i=!1;(e[0].match(Za)||[]).forEach((function(e){var r=en(e);switch(tn(r[0])){case"<fills":case"<fills>":case"</fills>":case"</fill>":case"<gradientFill>":case"<patternFill/>":case"</patternFill>":case"<bgColor/>":case"</bgColor>":case"<fgColor/>":case"</fgColor>":case"<stop":case"<stop/>":case"</stop>":case"<color":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<fill>":case"<fill":case"<fill/>":n={},t.Fills.push(n);break;case"<gradientFill":case"</gradientFill>":t.Fills.push(n),n={};break;case"<patternFill":case"<patternFill>":r.patternType&&(n.patternType=r.patternType);break;case"<bgColor":n.bgColor||(n.bgColor={}),r.indexed&&(n.bgColor.indexed=parseInt(r.indexed,10)),r.theme&&(n.bgColor.theme=parseInt(r.theme,10)),r.tint&&(n.bgColor.tint=parseFloat(r.tint)),r.rgb&&(n.bgColor.rgb=r.rgb.slice(-6));break;case"<fgColor":n.fgColor||(n.fgColor={}),r.theme&&(n.fgColor.theme=parseInt(r.theme,10)),r.tint&&(n.fgColor.tint=parseFloat(r.tint)),null!=r.rgb&&(n.fgColor.rgb=r.rgb.slice(-6));break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(a&&a.WTF&&!i)throw new Error("unrecognized "+r[0]+" in fills")}}))}(c,l,0,o),(c=i.match(n))&&function(e,t,r,a){t.Borders=[];var n={},i=!1;(e[0].match(Za)||[]).forEach((function(e){var r=en(e);switch(tn(r[0])){case"<borders":case"<borders>":case"</borders>":case"</border>":case"<left/>":case"<left":case"<left>":case"</left>":case"<right/>":case"<right":case"<right>":case"</right>":case"<top/>":case"<top":case"<top>":case"</top>":case"<bottom/>":case"<bottom":case"<bottom>":case"</bottom>":case"<diagonal":case"<diagonal>":case"<diagonal/>":case"</diagonal>":case"<horizontal":case"<horizontal>":case"<horizontal/>":case"</horizontal>":case"<vertical":case"<vertical>":case"<vertical/>":case"</vertical>":case"<start":case"<start>":case"<start/>":case"</start>":case"<end":case"<end>":case"<end/>":case"</end>":case"<color":case"<color>":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<border":case"<border>":case"<border/>":n={},r.diagonalUp&&(n.diagonalUp=hn(r.diagonalUp)),r.diagonalDown&&(n.diagonalDown=hn(r.diagonalDown)),t.Borders.push(n);break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(a&&a.WTF&&!i)throw new Error("unrecognized "+r[0]+" in borders")}}))}(c,l,0,o),(c=i.match(t))&&function(e,t,r){var a;t.CellXf=[];var n=!1;(e[0].match(Za)||[]).forEach((function(e){var i=en(e),s=0;switch(tn(i[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":case"</xf>":case"</alignment>":case"<protection":case"</protection>":case"<protection/>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<xf":case"<xf/>":for(delete(a=i)[0],s=0;s<rc.length;++s)a[rc[s]]&&(a[rc[s]]=parseInt(a[rc[s]],10));for(s=0;s<ac.length;++s)a[ac[s]]&&(a[ac[s]]=hn(a[ac[s]]));if(t.NumberFmt&&a.numFmtId>392)for(s=392;s>60;--s)if(t.NumberFmt[a.numFmtId]==t.NumberFmt[s]){a.numFmtId=s;break}t.CellXf.push(a);break;case"<alignment":case"<alignment/>":var o={};i.vertical&&(o.vertical=i.vertical),i.horizontal&&(o.horizontal=i.horizontal),null!=i.textRotation&&(o.textRotation=i.textRotation),i.indent&&(o.indent=i.indent),i.wrapText&&(o.wrapText=hn(i.wrapText)),a.alignment=o;break;case"<AlternateContent":case"<ext":n=!0;break;case"</AlternateContent>":case"</ext>":n=!1;break;default:if(r&&r.WTF&&!n)throw new Error("unrecognized "+i[0]+" in cellXfs")}}))}(c,l,o),l):l}}();var ic=ui;var sc=ui;var oc=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function cc(e,t,r){t.themeElements.clrScheme=[];var a={};(e[0].match(Za)||[]).forEach((function(e){var n=en(e);switch(n[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":a.rgb=n.val;break;case"<a:sysClr":a.rgb=n.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":"/"===n[0].charAt(1)?(t.themeElements.clrScheme[oc.indexOf(n[0])]=a,a={}):a.name=n[0].slice(3,n[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+n[0]+" in clrScheme")}}))}function lc(){}function hc(){}var uc=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,dc=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,fc=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;var pc=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function gc(e,t){var r;e&&0!==e.length||(e=mc());var a={};if(!(r=e.match(pc)))throw new Error("themeElements not found in theme");return function(e,t,r){var a;t.themeElements={},[["clrScheme",uc,cc],["fontScheme",dc,lc],["fmtScheme",fc,hc]].forEach((function(n){if(!(a=e.match(n[1])))throw new Error(n[0]+" not found in themeElements");n[2](a,t,r)}))}(r[0],a,t),a.raw=e,a}function mc(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var r=[Va];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function bc(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:case 4:e.l+=4;break;case 1:t.xclrValue=function(e,t){return ui(e,t)}(e,4);break;case 2:t.xclrValue=js(e);break;case 3:t.xclrValue=function(e){return e.read_shift(4)}(e)}return e.l+=8,t}function yc(e){var t=e.read_shift(2),r=e.read_shift(2)-4,a=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:a[1]=bc(e);break;case 6:a[1]=function(e,t){return ui(e,t)}(e,r);break;case 14:case 15:a[1]=e.read_shift(1===r?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return a}function vc(e,t,r,a){var n,i=Array.isArray(e);t.forEach((function(t){var s=xi(t.ref);if(i?(e[s.r]||(e[s.r]=[]),n=e[s.r][s.c]):n=e[t.ref],!n){n={t:"z"},i?e[s.r][s.c]=n:e[t.ref]=n;var o=Ti(e["!ref"]||"BDWGO1000001:A1");o.s.r>s.r&&(o.s.r=s.r),o.e.r<s.r&&(o.e.r=s.r),o.s.c>s.c&&(o.s.c=s.c),o.e.c<s.c&&(o.e.c=s.c);var c=_i(o);c!==e["!ref"]&&(e["!ref"]=c)}n.c||(n.c=[]);var l={a:t.author,t:t.t,r:t.r,T:r};t.h&&(l.h=t.h);for(var h=n.c.length-1;h>=0;--h){if(!r&&n.c[h].T)return;r&&!n.c[h].T&&n.c.splice(h,1)}if(r&&a)for(h=0;h<a.length;++h)if(l.a==a[h].id){l.a=a[h].name||l.a;break}n.c.push(l)}))}var wc=Mi;var Ac=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(e,r,a,n){var i=!1,s=!1;0==a.length?s=!0:"["==a.charAt(0)&&(s=!0,a=a.slice(1,-1)),0==n.length?i=!0:"["==n.charAt(0)&&(i=!0,n=n.slice(1,-1));var o=a.length>0?0|parseInt(a,10):0,c=n.length>0?0|parseInt(n,10):0;return i?c+=t.c:--c,s?o+=t.r:--o,r+(i?"":"$")+Si(c)+(s?"":"$")+wi(o)}return function(a,n){return t=n,a.replace(e,r)}}(),Sc=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,xc=function(){return function(e,t){return e.replace(Sc,(function(e,r,a,n,i,s){var o=Ai(n)-(a?0:t.c),c=vi(s)-(i?0:t.r);return r+"R"+(0==c?"":i?c+1:"["+c+"]")+"C"+(0==o?"":a?o+1:"["+o+"]")}))}}();function kc(e,t){return e.replace(Sc,(function(e,r,a,n,i,s){return r+("$"==a?a+n:Si(Ai(n)+t.c))+("$"==i?i+s:wi(vi(s)+t.r))}))}function Cc(e,t,r){var a=Ci(t).s,n=xi(r);return kc(e,{r:n.r-a.r,c:n.c-a.c})}function _c(e){return e.replace(/_xlfn\./g,"")}function Tc(e){e.l+=1}function Ec(e,t){var r=e.read_shift(1==t?1:2);return[16383&r,r>>14&1,r>>15&1]}function Oc(e,t,r){var a=2;if(r){if(r.biff>=2&&r.biff<=5)return Fc(e);12==r.biff&&(a=4)}var n=e.read_shift(a),i=e.read_shift(a),s=Ec(e,2),o=Ec(e,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:o[0],cRel:o[1],rRel:o[2]}}}function Fc(e){var t=Ec(e,2),r=Ec(e,2),a=e.read_shift(1),n=e.read_shift(1);return{s:{r:t[0],c:a,cRel:t[1],rRel:t[2]},e:{r:r[0],c:n,cRel:r[1],rRel:r[2]}}}function Pc(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return function(e){var t=Ec(e,2),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}(e);var a=e.read_shift(r&&12==r.biff?4:2),n=Ec(e,2);return{r:a,c:n[0],cRel:n[1],rRel:n[2]}}function Ic(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:255&r,fQuoted:!!(16384&r),cRel:r>>15,rRel:r>>15}}function Mc(e){var t=1&e[e.l+1];return e.l+=4,[t,1]}function Rc(e){return[e.read_shift(1),e.read_shift(1)]}function Dc(e,t){var r=[e.read_shift(1)];if(12==t)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2}switch(r[0]){case 4:r[1]=Os(e,1)?"TRUE":"FALSE",12!=t&&(e.l+=7);break;case 37:case 16:r[1]=rs[e[e.l]],e.l+=12==t?4:8;break;case 0:e.l+=8;break;case 1:r[1]=Gi(e);break;case 2:r[1]=Ns(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function Nc(e,t,r){for(var a=e.read_shift(12==r.biff?4:2),n=[],i=0;i!=a;++i)n.push((12==r.biff?Wi:Xs)(e,8));return n}function Lc(e,t,r){var a=0,n=0;12==r.biff?(a=e.read_shift(4),n=e.read_shift(4)):(n=1+e.read_shift(1),a=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--a,0==--n&&(n=256));for(var i=0,s=[];i!=a&&(s[i]=[]);++i)for(var o=0;o!=n;++o)s[i][o]=Dc(e,r.biff);return s}function Bc(e,t,r){return e.l+=2,[Ic(e)]}function jc(e){return e.l+=6,[]}function $c(e){return e.l+=2,[Fs(e),1&e.read_shift(2)]}var Uc=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];var zc={1:{n:"PtgExp",f:function(e,t,r){return e.l++,r&&12==r.biff?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(r&&2==r.biff?1:2)]}},2:{n:"PtgTbl",f:ui},3:{n:"PtgAdd",f:Tc},4:{n:"PtgSub",f:Tc},5:{n:"PtgMul",f:Tc},6:{n:"PtgDiv",f:Tc},7:{n:"PtgPower",f:Tc},8:{n:"PtgConcat",f:Tc},9:{n:"PtgLt",f:Tc},10:{n:"PtgLe",f:Tc},11:{n:"PtgEq",f:Tc},12:{n:"PtgGe",f:Tc},13:{n:"PtgGt",f:Tc},14:{n:"PtgNe",f:Tc},15:{n:"PtgIsect",f:Tc},16:{n:"PtgUnion",f:Tc},17:{n:"PtgRange",f:Tc},18:{n:"PtgUplus",f:Tc},19:{n:"PtgUminus",f:Tc},20:{n:"PtgPercent",f:Tc},21:{n:"PtgParen",f:Tc},22:{n:"PtgMissArg",f:Tc},23:{n:"PtgStr",f:function(e,t,r){return e.l++,Is(e,0,r)}},26:{n:"PtgSheet",f:function(e,t,r){return e.l+=5,e.l+=2,e.l+=2==r.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function(e,t,r){return e.l+=2==r.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function(e){return e.l++,rs[e.read_shift(1)]}},29:{n:"PtgBool",f:function(e){return e.l++,0!==e.read_shift(1)}},30:{n:"PtgInt",f:function(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function(e){return e.l++,Gi(e)}},32:{n:"PtgArray",f:function(e,t,r){var a=(96&e[e.l++])>>5;return e.l+=2==r.biff?6:12==r.biff?14:7,[a]}},33:{n:"PtgFunc",f:function(e,t,r){var a=(96&e[e.l])>>5;e.l+=1;var n=e.read_shift(r&&r.biff<=3?1:2);return[ll[n],cl[n],a]}},34:{n:"PtgFuncVar",f:function(e,t,r){var a=e[e.l++],n=e.read_shift(1),i=r&&r.biff<=3?[88==a?-1:0,e.read_shift(1)]:function(e){return[e[e.l+1]>>7,32767&e.read_shift(2)]}(e);return[n,(0===i[0]?cl:ol)[i[1]]]}},35:{n:"PtgName",f:function(e,t,r){var a=e.read_shift(1)>>>5&3,n=!r||r.biff>=8?4:2,i=e.read_shift(n);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[a,0,i]}},36:{n:"PtgRef",f:function(e,t,r){var a=(96&e[e.l])>>5;return e.l+=1,[a,Pc(e,0,r)]}},37:{n:"PtgArea",f:function(e,t,r){return[(96&e[e.l++])>>5,Oc(e,r.biff>=2&&r.biff,r)]}},38:{n:"PtgMemArea",f:function(e,t,r){var a=e.read_shift(1)>>>5&3;return e.l+=r&&2==r.biff?3:4,[a,e.read_shift(r&&2==r.biff?1:2)]}},39:{n:"PtgMemErr",f:ui},40:{n:"PtgMemNoMem",f:ui},41:{n:"PtgMemFunc",f:function(e,t,r){return[e.read_shift(1)>>>5&3,e.read_shift(r&&2==r.biff?1:2)]}},42:{n:"PtgRefErr",f:function(e,t,r){var a=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,12==r.biff&&(e.l+=2),[a]}},43:{n:"PtgAreaErr",f:function(e,t,r){var a=(96&e[e.l++])>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[a]}},44:{n:"PtgRefN",f:function(e,t,r){var a=(96&e[e.l])>>5;e.l+=1;var n=function(e,t,r){var a=r&&r.biff?r.biff:8;if(a>=2&&a<=5)return function(e){var t=e.read_shift(2),r=e.read_shift(1),a=(32768&t)>>15,n=(16384&t)>>14;return t&=16383,1==a&&t>=8192&&(t-=16384),1==n&&r>=128&&(r-=256),{r:t,c:r,cRel:n,rRel:a}}(e);var n=e.read_shift(a>=12?4:2),i=e.read_shift(2),s=(16384&i)>>14,o=(32768&i)>>15;if(i&=16383,1==o)for(;n>524287;)n-=1048576;if(1==s)for(;i>8191;)i-=16384;return{r:n,c:i,cRel:s,rRel:o}}(e,0,r);return[a,n]}},45:{n:"PtgAreaN",f:function(e,t,r){var a=(96&e[e.l++])>>5,n=function(e,t,r){if(r.biff<8)return Fc(e);var a=e.read_shift(12==r.biff?4:2),n=e.read_shift(12==r.biff?4:2),i=Ec(e,2),s=Ec(e,2);return{s:{r:a,c:i[0],cRel:i[1],rRel:i[2]},e:{r:n,c:s[0],cRel:s[1],rRel:s[2]}}}(e,0,r);return[a,n]}},46:{n:"PtgMemAreaN",f:function(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function(e,t,r){return 5==r.biff?function(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var a=e.read_shift(2);return e.l+=12,[t,r,a]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function(e,t,r){var a=(96&e[e.l])>>5;e.l+=1;var n=e.read_shift(2);return r&&5==r.biff&&(e.l+=12),[a,n,Pc(e,0,r)]}},59:{n:"PtgArea3d",f:function(e,t,r){var a=(96&e[e.l++])>>5,n=e.read_shift(2,"i");if(r)switch(r.biff){case 5:e.l+=12;break;case 12:0}return[a,n,Oc(e,0,r)]}},60:{n:"PtgRefErr3d",f:function(e,t,r){var a=(96&e[e.l++])>>5,n=e.read_shift(2),i=4;if(r)switch(r.biff){case 5:i=15;break;case 12:i=6}return e.l+=i,[a,n]}},61:{n:"PtgAreaErr3d",f:function(e,t,r){var a=(96&e[e.l++])>>5,n=e.read_shift(2),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12}return e.l+=i,[a,n]}},255:{}},Hc={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},Xc={1:{n:"PtgElfLel",f:$c},2:{n:"PtgElfRw",f:Bc},3:{n:"PtgElfCol",f:Bc},6:{n:"PtgElfRwV",f:Bc},7:{n:"PtgElfColV",f:Bc},10:{n:"PtgElfRadical",f:Bc},11:{n:"PtgElfRadicalS",f:jc},13:{n:"PtgElfColS",f:jc},15:{n:"PtgElfColSV",f:jc},16:{n:"PtgElfRadicalLel",f:$c},25:{n:"PtgList",f:function(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),a=e.read_shift(4),n=e.read_shift(2),i=e.read_shift(2);return{ixti:t,coltype:3&r,rt:Uc[r>>2&31],idx:a,c:n,C:i}}},29:{n:"PtgSxName",f:function(e){return e.l+=2,[e.read_shift(4)]}},255:{}},Wc={0:{n:"PtgAttrNoop",f:function(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function(e,t,r){var a=255&e[e.l+1]?1:0;return e.l+=r&&2==r.biff?3:4,[a]}},2:{n:"PtgAttrIf",f:function(e,t,r){var a=255&e[e.l+1]?1:0;return e.l+=2,[a,e.read_shift(r&&2==r.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function(e,t,r){e.l+=2;for(var a=e.read_shift(r&&2==r.biff?1:2),n=[],i=0;i<=a;++i)n.push(e.read_shift(r&&2==r.biff?1:2));return n}},8:{n:"PtgAttrGoto",f:function(e,t,r){var a=255&e[e.l+1]?1:0;return e.l+=2,[a,e.read_shift(r&&2==r.biff?1:2)]}},16:{n:"PtgAttrSum",f:function(e,t,r){e.l+=r&&2==r.biff?3:4}},32:{n:"PtgAttrBaxcel",f:Mc},33:{n:"PtgAttrBaxcel",f:Mc},64:{n:"PtgAttrSpace",f:function(e){return e.read_shift(2),Rc(e)}},65:{n:"PtgAttrSpaceSemi",f:function(e){return e.read_shift(2),Rc(e)}},128:{n:"PtgAttrIfError",f:function(e){var t=255&e[e.l+1]?1:0;return e.l+=2,[t,e.read_shift(2)]}},255:{}};function Gc(e,t,r,a){if(a.biff<8)return ui(e,t);for(var n=e.l+t,i=[],s=0;s!==r.length;++s)switch(r[s][0]){case"PtgArray":r[s][1]=Lc(e,0,a),i.push(r[s][1]);break;case"PtgMemArea":r[s][2]=Nc(e,r[s][1],a),i.push(r[s][2]);break;case"PtgExp":a&&12==a.biff&&(r[s][1][1]=e.read_shift(4),i.push(r[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[s][0]}return 0!==(t=n-e.l)&&i.push(ui(e,t)),i}function qc(e,t,r){for(var a,n,i=e.l+t,s=[];i!=e.l;)t=i-e.l,n=e[e.l],a=zc[n]||zc[Hc[n]],24!==n&&25!==n||(a=(24===n?Xc:Wc)[e[e.l+1]]),a&&a.f?s.push([a.n,a.f(e,t,r)]):ui(e,t);return s}function Vc(e){for(var t=[],r=0;r<e.length;++r){for(var a=e[r],n=[],i=0;i<a.length;++i){var s=a[i];if(s)if(2===s[0])n.push('"'+s[1].replace(/"/g,'""')+'"');else n.push(s[1]);else n.push("")}t.push(n.join(","))}return t.join(";")}var Kc={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function Yc(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var a=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),0==t?"":e.XTI[t-1];if(!a)return"SH33TJSERR1";var n="";if(r.biff>8)switch(e[a[0]][0]){case 357:return n=-1==a[1]?"#REF":e.SheetNames[a[1]],a[1]==a[2]?n:n+":"+e.SheetNames[a[2]];case 358:return null!=r.SID?e.SheetNames[r.SID]:"SH33TJSSAME"+e[a[0]][0];default:return"SH33TJSSRC"+e[a[0]][0]}switch(e[a[0]][0][0]){case 1025:return n=-1==a[1]?"#REF":e.SheetNames[a[1]]||"SH33TJSERR3",a[1]==a[2]?n:n+":"+e.SheetNames[a[2]];case 14849:return e[a[0]].slice(1).map((function(e){return e.Name})).join(";;");default:return e[a[0]][0][3]?(n=-1==a[1]?"#REF":e[a[0]][0][3][a[1]]||"SH33TJSERR4",a[1]==a[2]?n:n+":"+e[a[0]][0][3][a[2]]):"SH33TJSERR2"}}function Zc(e,t,r){var a=Yc(e,t,r);return"#REF"==a?a:function(e,t){if(!(e||t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}(a,r)}function Jc(e,t,r,a,n){var i,s,o,c,l=n&&n.biff||8,h={s:{c:0,r:0},e:{c:0,r:0}},u=[],d=0,f=0,p="";if(!e[0]||!e[0][0])return"";for(var g=-1,m="",b=0,y=e[0].length;b<y;++b){var v=e[0][b];switch(v[0]){case"PtgUminus":u.push("-"+u.pop());break;case"PtgUplus":u.push("+"+u.pop());break;case"PtgPercent":u.push(u.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(i=u.pop(),s=u.pop(),g>=0){switch(e[0][g][1][0]){case 0:m=Ia(" ",e[0][g][1][1]);break;case 1:m=Ia("\r",e[0][g][1][1]);break;default:if(m="",n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}s+=m,g=-1}u.push(s+Kc[v[0]]+i);break;case"PtgIsect":i=u.pop(),s=u.pop(),u.push(s+" "+i);break;case"PtgUnion":i=u.pop(),s=u.pop(),u.push(s+","+i);break;case"PtgRange":i=u.pop(),s=u.pop(),u.push(s+":"+i);break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":o=gi(v[1][1],h,n),u.push(bi(o,l));break;case"PtgRefN":o=r?gi(v[1][1],r,n):v[1][1],u.push(bi(o,l));break;case"PtgRef3d":d=v[1][1],o=gi(v[1][2],h,n);p=Zc(a,d,n);u.push(p+"!"+bi(o,l));break;case"PtgFunc":case"PtgFuncVar":var w=v[1][0],A=v[1][1];w||(w=0);var S=0==(w&=127)?[]:u.slice(-w);u.length-=w,"User"===A&&(A=S.shift()),u.push(A+"("+S.join(",")+")");break;case"PtgBool":u.push(v[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":u.push(v[1]);break;case"PtgNum":u.push(String(v[1]));break;case"PtgStr":u.push('"'+v[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":c=mi(v[1][1],r?{s:r}:h,n),u.push(yi(c,n));break;case"PtgArea":c=mi(v[1][1],h,n),u.push(yi(c,n));break;case"PtgArea3d":d=v[1][1],c=v[1][2],p=Zc(a,d,n),u.push(p+"!"+yi(c,n));break;case"PtgAttrSum":u.push("SUM("+u.pop()+")");break;case"PtgName":f=v[1][2];var x=(a.names||[])[f-1]||(a[0]||[])[f],k=x?x.Name:"SH33TJSNAME"+String(f);k&&"_xlfn."==k.slice(0,6)&&!n.xlfn&&(k=k.slice(6)),u.push(k);break;case"PtgNameX":var C,_=v[1][1];if(f=v[1][2],!(n.biff<=5)){var T="";if(14849==((a[_]||[])[0]||[])[0]||(1025==((a[_]||[])[0]||[])[0]?a[_][f]&&a[_][f].itab>0&&(T=a.SheetNames[a[_][f].itab-1]+"!"):T=a.SheetNames[f-1]+"!"),a[_]&&a[_][f])T+=a[_][f].Name;else if(a[0]&&a[0][f])T+=a[0][f].Name;else{var E=(Yc(a,_,n)||"").split(";;");E[f-1]?T=E[f-1]:T+="SH33TJSERRX"}u.push(T);break}_<0&&(_=-_),a[_]&&(C=a[_][f]),C||(C={Name:"SH33TJSERRY"}),u.push(C.Name);break;case"PtgParen":var O="(",F=")";if(g>=0){switch(m="",e[0][g][1][0]){case 2:O=Ia(" ",e[0][g][1][1])+O;break;case 3:O=Ia("\r",e[0][g][1][1])+O;break;case 4:F=Ia(" ",e[0][g][1][1])+F;break;case 5:F=Ia("\r",e[0][g][1][1])+F;break;default:if(n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}g=-1}u.push(O+u.pop()+F);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":u.push("#REF!");break;case"PtgExp":o={c:v[1][1],r:v[1][0]};var P={c:r.c,r:r.r};if(a.sharedf[ki(o)]){var I=a.sharedf[ki(o)];u.push(Jc(I,h,P,a,n))}else{var M=!1;for(i=0;i!=a.arrayf.length;++i)if(s=a.arrayf[i],!(o.c<s[0].s.c||o.c>s[0].e.c||o.r<s[0].s.r||o.r>s[0].e.r)){u.push(Jc(s[1],h,P,a,n)),M=!0;break}M||u.push(v[1])}break;case"PtgArray":u.push("{"+Vc(v[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=b;break;case"PtgMissArg":u.push("");break;case"PtgList":u.push("Table"+v[1].idx+"[#"+v[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(v))}if(3!=n.biff&&g>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][b][0])){var R=!0;switch((v=e[0][g])[1][0]){case 4:R=!1;case 0:m=Ia(" ",v[1][1]);break;case 5:R=!1;case 1:m=Ia("\r",v[1][1]);break;default:if(m="",n.WTF)throw new Error("Unexpected PtgAttrSpaceType "+v[1][0])}u.push((R?m:"")+u.pop()+(R?"":m)),g=-1}}if(u.length>1&&n.WTF)throw new Error("bad formula stack");return u[0]}function Qc(e,t,r){var a,n=e.l+t,i=2==r.biff?1:2,s=e.read_shift(i);if(65535==s)return[[],ui(e,t-2)];var o=qc(e,s,r);return t!==s+i&&(a=Gc(e,t-s-i,o,r)),e.l=n,[o,a]}function el(e,t,r){var a,n=e.l+t,i=e.read_shift(2),s=qc(e,i,r);return 65535==i?[[],ui(e,t-2)]:(t!==i+2&&(a=Gc(e,n-i-2,s,r)),[s,a])}function tl(e,t,r){var a=e.l+t,n=Us(e);2==r.biff&&++e.l;var i=function(e){var t;if(65535!==Qn(e,e.l+6))return[Gi(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=1===e[e.l+2],e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}(e),s=e.read_shift(1);2!=r.biff&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var o=function(e,t,r){var a,n=e.l+t,i=2==r.biff?1:2,s=e.read_shift(i);if(65535==s)return[[],ui(e,t-2)];var o=qc(e,s,r);return t!==s+i&&(a=Gc(e,t-s-i,o,r)),e.l=n,[o,a]}(e,a-e.l,r);return{cell:n,val:i[0],formula:o,shared:s>>3&1,tt:i[1]}}function rl(e,t,r){var a=e.read_shift(4),n=qc(e,a,r),i=e.read_shift(4);return[n,i>0?Gc(e,i,n,r):null]}var al=rl,nl=rl,il=rl,sl=rl,ol={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},cl={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},ll={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function hl(e){return"of:"==e.slice(0,3)&&(e=e.slice(3)),61==e.charCodeAt(0)&&61==(e=e.slice(1)).charCodeAt(0)&&(e=e.slice(1)),(e=(e=(e=e.replace(/COM\.MICROSOFT\./g,"")).replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,(function(e,t){return t.replace(/\./g,"")}))).replace(/\[.(#[A-Z]*[?!])\]/g,"$1")).replace(/[;~]/g,",").replace(/\|/g,";")}function ul(e){var t=e.split(":");return[t[0].split(".")[0],t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var dl={},fl={};function pl(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];"xlml"==t&&(r=[1,1,1,1,.5,.5]),null==e.left&&(e.left=r[0]),null==e.right&&(e.right=r[1]),null==e.top&&(e.top=r[2]),null==e.bottom&&(e.bottom=r[3]),null==e.header&&(e.header=r[4]),null==e.footer&&(e.footer=r[5])}}function gl(e,t,r,a,n,i){try{a.cellNF&&(e.z=Pr[t])}catch(e){if(a.WTF)throw e}if("z"!==e.t||a.cellStyles){if("d"===e.t&&"string"==typeof e.v&&(e.v=Oa(e.v)),(!a||!1!==a.cellText)&&"z"!==e.t)try{if(null==Pr[t]&&ha(da[t]||"General",t),"e"===e.t)e.w=e.w||rs[e.v];else if(0===t)if("n"===e.t)(0|e.v)===e.v?e.w=e.v.toString(10):e.w=Ur(e.v);else if("d"===e.t){var s=wa(e.v);e.w=(0|s)===s?s.toString(10):Ur(s)}else{if(void 0===e.v)return"";e.w=zr(e.v,fl)}else"d"===e.t?e.w=la(t,wa(e.v),fl):e.w=la(t,e.v,fl)}catch(e){if(a.WTF)throw e}if(a.cellStyles&&null!=r)try{e.s=i.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=Xo(n.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),a.WTF&&(e.s.fgColor.raw_rgb=n.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=Xo(n.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),a.WTF&&(e.s.bgColor.raw_rgb=n.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(e){if(a.WTF&&i.Fills)throw e}}}var ml=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,bl=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,yl=/<(?:\w:)?hyperlink [^>]*>/gm,vl=/"(\w*:\w*)"/,wl=/<(?:\w:)?col\b[^>]*[\/]?>/g,Al=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,Sl=/<(?:\w:)?pageMargins[^>]*\/>/g,xl=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,kl=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,Cl=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function _l(e,t,r,a,n,i,s){if(!e)return e;a||(a={"!id":{}});var o=t.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},l="",h="",u=e.match(bl);u?(l=e.slice(0,u.index),h=e.slice(u.index+u[0].length)):l=h=e;var d=l.match(xl);d?Tl(d[0],o,n,r):(d=l.match(kl))&&function(e,t,r,a,n){Tl(e.slice(0,e.indexOf(">")),r,a,n)}(d[0],d[1],o,n,r);var f=(l.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(f>0){var p=l.slice(f,f+50).match(vl);p&&function(e,t){var r=Ti(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=_i(r))}(o,p[1])}var g=l.match(Cl);g&&g[1]&&function(e,t){t.Views||(t.Views=[{}]);(e.match(El)||[]).forEach((function(e,r){var a=en(e);t.Views[r]||(t.Views[r]={}),+a.zoomScale&&(t.Views[r].zoom=+a.zoomScale),hn(a.rightToLeft)&&(t.Views[r].RTL=!0)}))}(g[1],n);var m=[];if(t.cellStyles){var b=l.match(wl);b&&function(e,t){for(var r=!1,a=0;a!=t.length;++a){var n=en(t[a],!0);n.hidden&&(n.hidden=hn(n.hidden));var i=parseInt(n.min,10)-1,s=parseInt(n.max,10)-1;for(n.outlineLevel&&(n.level=+n.outlineLevel||0),delete n.min,delete n.max,n.width=+n.width,!r&&n.width&&(r=!0,Yo(n.width)),Zo(n);i<=s;)e[i++]=Pa(n)}}(m,b)}u&&Ol(u[1],o,t,c,i,s);var y=h.match(Al);y&&(o["!autofilter"]=function(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}(y[0]));var v=[],w=h.match(ml);if(w)for(f=0;f!=w.length;++f)v[f]=Ti(w[f].slice(w[f].indexOf('"')+1));var A=h.match(yl);A&&function(e,t,r){for(var a=Array.isArray(e),n=0;n!=t.length;++n){var i=en(gn(t[n]),!0);if(!i.ref)return;var s=((r||{})["!id"]||[])[i.id];s?(i.Target=s.Target,i.location&&(i.Target+="#"+nn(i.location))):(i.Target="#"+nn(i.location),s={Target:i.Target,TargetMode:"Internal"}),i.Rel=s,i.tooltip&&(i.Tooltip=i.tooltip,delete i.tooltip);for(var o=Ti(i.ref),c=o.s.r;c<=o.e.r;++c)for(var l=o.s.c;l<=o.e.c;++l){var h=ki({c:l,r:c});a?(e[c]||(e[c]=[]),e[c][l]||(e[c][l]={t:"z",v:void 0}),e[c][l].l=i):(e[h]||(e[h]={t:"z",v:void 0}),e[h].l=i)}}}(o,A,a);var S,x,k=h.match(Sl);if(k&&(o["!margins"]=(S=en(k[0]),x={},["left","right","top","bottom","header","footer"].forEach((function(e){S[e]&&(x[e]=parseFloat(S[e]))})),x)),!o["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(o["!ref"]=_i(c)),t.sheetRows>0&&o["!ref"]){var C=Ti(o["!ref"]);t.sheetRows<=+C.e.r&&(C.e.r=t.sheetRows-1,C.e.r>c.e.r&&(C.e.r=c.e.r),C.e.r<C.s.r&&(C.s.r=C.e.r),C.e.c>c.e.c&&(C.e.c=c.e.c),C.e.c<C.s.c&&(C.s.c=C.e.c),o["!fullref"]=o["!ref"],o["!ref"]=_i(C))}return m.length>0&&(o["!cols"]=m),v.length>0&&(o["!merges"]=v),o}function Tl(e,t,r,a){var n=en(e);r.Sheets[a]||(r.Sheets[a]={}),n.codeName&&(r.Sheets[a].CodeName=nn(gn(n.codeName)))}var El=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;var Ol=function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,a=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,n=/ref=["']([^"']*)["']/,i=bn("v"),s=bn("f");return function(o,c,l,h,u,d){for(var f,p,g,m,b,y=0,v="",w=[],A=[],S=0,x=0,k=0,C="",_=0,T=0,E=0,O=0,F=Array.isArray(d.CellXf),P=[],I=[],M=Array.isArray(c),R=[],D={},N=!1,L=!!l.sheetStubs,B=o.split(t),j=0,$=B.length;j!=$;++j){var U=(v=B[j].trim()).length;if(0!==U){var z=0;e:for(y=0;y<U;++y)switch(v[y]){case">":if("/"!=v[y-1]){++y;break e}if(l&&l.cellStyles){if(_=null!=(p=en(v.slice(z,y),!0)).r?parseInt(p.r,10):_+1,T=-1,l.sheetRows&&l.sheetRows<_)continue;D={},N=!1,p.ht&&(N=!0,D.hpt=parseFloat(p.ht),D.hpx=ec(D.hpt)),"1"==p.hidden&&(N=!0,D.hidden=!0),null!=p.outlineLevel&&(N=!0,D.level=+p.outlineLevel),N&&(R[_-1]=D)}break;case"<":z=y}if(z>=y)break;if(_=null!=(p=en(v.slice(z,y),!0)).r?parseInt(p.r,10):_+1,T=-1,!(l.sheetRows&&l.sheetRows<_)){h.s.r>_-1&&(h.s.r=_-1),h.e.r<_-1&&(h.e.r=_-1),l&&l.cellStyles&&(D={},N=!1,p.ht&&(N=!0,D.hpt=parseFloat(p.ht),D.hpx=ec(D.hpt)),"1"==p.hidden&&(N=!0,D.hidden=!0),null!=p.outlineLevel&&(N=!0,D.level=+p.outlineLevel),N&&(R[_-1]=D)),w=v.slice(y).split(e);for(var H=0;H!=w.length&&"<"==w[H].trim().charAt(0);++H);for(w=w.slice(H),y=0;y!=w.length;++y)if(0!==(v=w[y].trim()).length){if(A=v.match(r),S=y,x=0,k=0,v="<c "+("<"==v.slice(0,1)?">":"")+v,null!=A&&2===A.length){for(S=0,C=A[1],x=0;x!=C.length&&!((k=C.charCodeAt(x)-64)<1||k>26);++x)S=26*S+k;T=--S}else++T;for(x=0;x!=v.length&&62!==v.charCodeAt(x);++x);if(++x,(p=en(v.slice(0,x),!0)).r||(p.r=ki({r:_-1,c:T})),f={t:""},null!=(A=(C=v.slice(x)).match(i))&&""!==A[1]&&(f.v=nn(A[1])),l.cellFormula){if(null!=(A=C.match(s))&&""!==A[1]){if(f.f=nn(gn(A[1])).replace(/\r\n/g,"\n"),l.xlfn||(f.f=_c(f.f)),A[0].indexOf('t="array"')>-1)f.F=(C.match(n)||[])[1],f.F.indexOf(":")>-1&&P.push([Ti(f.F),f.F]);else if(A[0].indexOf('t="shared"')>-1){m=en(A[0]);var X=nn(gn(A[1]));l.xlfn||(X=_c(X)),I[parseInt(m.si,10)]=[m,X,p.r]}}else(A=C.match(/<f[^>]*\/>/))&&I[(m=en(A[0])).si]&&(f.f=Cc(I[m.si][1],I[m.si][2],p.r));var W=xi(p.r);for(x=0;x<P.length;++x)W.r>=P[x][0].s.r&&W.r<=P[x][0].e.r&&W.c>=P[x][0].s.c&&W.c<=P[x][0].e.c&&(f.F=P[x][1])}if(null==p.t&&void 0===f.v)if(f.f||f.F)f.v=0,f.t="n";else{if(!L)continue;f.t="z"}else f.t=p.t||"n";switch(h.s.c>T&&(h.s.c=T),h.e.c<T&&(h.e.c=T),f.t){case"n":if(""==f.v||null==f.v){if(!L)continue;f.t="z"}else f.v=parseFloat(f.v);break;case"s":if(void 0===f.v){if(!L)continue;f.t="z"}else g=dl[parseInt(f.v,10)],f.v=g.t,f.r=g.r,l.cellHTML&&(f.h=g.h);break;case"str":f.t="s",f.v=null!=f.v?gn(f.v):"",l.cellHTML&&(f.h=cn(f.v));break;case"inlineStr":A=C.match(a),f.t="s",null!=A&&(g=Co(A[1]))?(f.v=g.t,l.cellHTML&&(f.h=g.h)):f.v="";break;case"b":f.v=hn(f.v);break;case"d":l.cellDates?f.v=Oa(f.v,1):(f.v=wa(Oa(f.v,1)),f.t="n");break;case"e":l&&!1===l.cellText||(f.w=f.v),f.v=as[f.v]}if(E=O=0,b=null,F&&void 0!==p.s&&null!=(b=d.CellXf[p.s])&&(null!=b.numFmtId&&(E=b.numFmtId),l.cellStyles&&null!=b.fillId&&(O=b.fillId)),gl(f,E,O,l,u,d),l.cellDates&&F&&"n"==f.t&&ia(Pr[E])&&(f.t="d",f.v=ka(f.v)),p.cm&&l.xlmeta){var G=(l.xlmeta.Cell||[])[+p.cm-1];G&&"XLDAPR"==G.type&&(f.D=!0)}if(M){var q=xi(p.r);c[q.r]||(c[q.r]=[]),c[q.r][q.c]=f}else c[p.r]=f}}}}R.length>0&&(c["!rows"]=R)}}();var Fl=Wi;function Pl(e){return[Bi(e),Gi(e),"n"]}var Il=Wi;var Ml=["left","right","top","bottom","header","footer"];function Rl(e,t,r,a,n,i){var s=i||{"!type":"chart"};if(!e)return i;var o=0,c=0,l="A",h={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach((function(e){var t=function(e){var t,r=[],a=e.match(/^<c:numCache>/);(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/gm)||[]).forEach((function(e){var t=e.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);t&&(r[+t[1]]=a?+t[2]:t[2])}));var n=nn((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/gm)||[]).forEach((function(e){t=e.replace(/<.*?>/g,"")})),[r,n,t]}(e);h.s.r=h.s.c=0,h.e.c=o,l=Si(o),t[0].forEach((function(e,r){s[l+wi(r)]={t:"n",v:e,z:t[1]},c=r})),h.e.r<c&&(h.e.r=c),++o})),o>0&&(s["!ref"]=_i(h)),s}var Dl=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],Nl=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],Ll=[],Bl=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function jl(e,t){for(var r=0;r!=e.length;++r)for(var a=e[r],n=0;n!=t.length;++n){var i=t[n];if(null==a[i[0]])a[i[0]]=i[1];else switch(i[2]){case"bool":"string"==typeof a[i[0]]&&(a[i[0]]=hn(a[i[0]]));break;case"int":"string"==typeof a[i[0]]&&(a[i[0]]=parseInt(a[i[0]],10))}}}function $l(e,t){for(var r=0;r!=t.length;++r){var a=t[r];if(null==e[a[0]])e[a[0]]=a[1];else switch(a[2]){case"bool":"string"==typeof e[a[0]]&&(e[a[0]]=hn(e[a[0]]));break;case"int":"string"==typeof e[a[0]]&&(e[a[0]]=parseInt(e[a[0]],10))}}}function Ul(e){$l(e.WBProps,Dl),$l(e.CalcPr,Bl),jl(e.WBView,Nl),jl(e.Sheets,Ll),fl.date1904=hn(e.WBProps.date1904)}var zl="][*?/\\".split("");function Hl(e,t){if(e.length>31){if(t)return!1;throw new Error("Sheet names cannot exceed 31 chars")}var r=!0;return zl.forEach((function(a){if(-1!=e.indexOf(a)){if(!t)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");r=!1}})),r}var Xl=/<\w+:workbook/;function Wl(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function Gl(e,t,r){return".bin"===t.slice(-4)?function(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},a=[],n=!1;t||(t={}),t.biff=12;var i=[],s=[[]];return s.SheetNames=[],s.XTI=[],Sh[16]={n:"BrtFRTArchID$",f:Wl},fi(e,(function(e,o,c){switch(c){case 156:s.SheetNames.push(e.name),r.Sheets.push(e);break;case 153:r.WBProps=e;break;case 39:null!=e.Sheet&&(t.SID=e.Sheet),e.Ref=Jc(e.Ptg,0,null,s,t),delete t.SID,delete e.Ptg,i.push(e);break;case 1036:case 361:case 2071:case 158:case 143:case 664:case 353:case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:case 16:break;case 357:case 358:case 355:case 667:s[0].length?s.push([c,e]):s[0]=[c,e],s[s.length-1].XTI=[];break;case 362:0===s.length&&(s[0]=[],s[0].XTI=[]),s[s.length-1].XTI=s[s.length-1].XTI.concat(e),s.XTI=s.XTI.concat(e);break;case 35:case 37:a.push(c),n=!0;break;case 36:case 38:a.pop(),n=!1;break;default:if(o.T);else if(!n||t.WTF&&37!=a[a.length-1]&&35!=a[a.length-1])throw new Error("Unexpected record 0x"+c.toString(16))}}),t),Ul(r),r.Names=i,r.supbooks=s,r}(e,r):function(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},a=!1,n="xmlns",i={},s=0;if(e.replace(Za,(function(o,c){var l=en(o);switch(tn(l[0])){case"<?xml":case"</workbook>":case"<fileVersion/>":case"</fileVersion>":case"<fileSharing":case"<fileSharing/>":case"</workbookPr>":case"<workbookProtection":case"<workbookProtection/>":case"<bookViews":case"<bookViews>":case"</bookViews>":case"</workbookView>":case"<sheets":case"<sheets>":case"</sheets>":case"</sheet>":case"<functionGroups":case"<functionGroups/>":case"<functionGroup":case"<externalReferences":case"</externalReferences>":case"<externalReferences>":case"<externalReference":case"<definedNames/>":case"<definedName/>":case"</calcPr>":case"<oleSize":case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":case"<customWorkbookView":case"</customWorkbookView>":case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":case"<pivotCache":case"<smartTagPr":case"<smartTagPr/>":case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":case"<smartTagType":case"<webPublishing":case"<webPublishing/>":case"<fileRecoveryPr":case"<fileRecoveryPr/>":case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":case"<webPublishObject":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":case"<ArchID":case"<revisionPtr":break;case"<workbook":o.match(Xl)&&(n="xmlns"+o.match(/<(\w+):/)[1]),r.xmlns=l[n];break;case"<fileVersion":delete l[0],r.AppVersion=l;break;case"<workbookPr":case"<workbookPr/>":Dl.forEach((function(e){if(null!=l[e[0]])switch(e[2]){case"bool":r.WBProps[e[0]]=hn(l[e[0]]);break;case"int":r.WBProps[e[0]]=parseInt(l[e[0]],10);break;default:r.WBProps[e[0]]=l[e[0]]}})),l.codeName&&(r.WBProps.CodeName=gn(l.codeName));break;case"<workbookView":case"<workbookView/>":delete l[0],r.WBView.push(l);break;case"<sheet":switch(l.state){case"hidden":l.Hidden=1;break;case"veryHidden":l.Hidden=2;break;default:l.Hidden=0}delete l.state,l.name=nn(gn(l.name)),delete l[0],r.Sheets.push(l);break;case"<definedNames>":case"<definedNames":case"<ext":case"<AlternateContent":case"<AlternateContent>":a=!0;break;case"</definedNames>":case"</ext>":case"</AlternateContent>":a=!1;break;case"<definedName":(i={}).Name=gn(l.name),l.comment&&(i.Comment=l.comment),l.localSheetId&&(i.Sheet=+l.localSheetId),hn(l.hidden||"0")&&(i.Hidden=!0),s=c+o.length;break;case"</definedName>":i.Ref=nn(gn(e.slice(s,c))),r.Names.push(i);break;case"<calcPr":case"<calcPr/>":delete l[0],r.CalcPr=l;break;default:if(!a&&t.WTF)throw new Error("unrecognized "+l[0]+" in workbook")}return o})),-1===On.indexOf(r.xmlns))throw new Error("Unknown Namespace: "+r.xmlns);return Ul(r),r}(e,r)}function ql(e,t,r,a,n,i,s,o){return".bin"===t.slice(-4)?function(e,t,r,a,n,i,s){if(!e)return e;var o=t||{};a||(a={"!id":{}});var c,l,h,u,d,f,p,g,m,b,y=o.dense?[]:{},v={s:{r:2e6,c:2e6},e:{r:0,c:0}},w=[],A=!1,S=!1,x=[];o.biff=12,o["!row"]=0;var k=0,C=!1,_=[],T={},E=o.supbooks||n.supbooks||[[]];if(E.sharedf=T,E.arrayf=_,E.SheetNames=n.SheetNames||n.Sheets.map((function(e){return e.name})),!o.supbooks&&(o.supbooks=E,n.Names))for(var O=0;O<n.Names.length;++O)E[0][O+1]=n.Names[O];var F,P,I=[],M=[],R=!1;if(Sh[16]={n:"BrtShortReal",f:Pl},fi(e,(function(e,t,O){if(!S)switch(O){case 148:c=e;break;case 0:l=e,o.sheetRows&&o.sheetRows<=l.r&&(S=!0),m=wi(d=l.r),o["!row"]=l.r,(e.hidden||e.hpt||null!=e.level)&&(e.hpt&&(e.hpx=ec(e.hpt)),M[e.r]=e);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(h={t:e[2]},e[2]){case"n":h.v=e[1];break;case"s":g=dl[e[1]],h.v=g.t,h.r=g.r;break;case"b":h.v=!!e[1];break;case"e":h.v=e[1],!1!==o.cellText&&(h.w=rs[h.v]);break;case"str":h.t="s",h.v=e[1];break;case"is":h.t="s",h.v=e[1].t}if((u=s.CellXf[e[0].iStyleRef])&&gl(h,u.numFmtId,null,o,i,s),f=-1==e[0].c?f+1:e[0].c,o.dense?(y[d]||(y[d]=[]),y[d][f]=h):y[Si(f)+m]=h,o.cellFormula){for(C=!1,k=0;k<_.length;++k){var D=_[k];l.r>=D[0].s.r&&l.r<=D[0].e.r&&f>=D[0].s.c&&f<=D[0].e.c&&(h.F=_i(D[0]),C=!0)}!C&&e.length>3&&(h.f=e[3])}if(v.s.r>l.r&&(v.s.r=l.r),v.s.c>f&&(v.s.c=f),v.e.r<l.r&&(v.e.r=l.r),v.e.c<f&&(v.e.c=f),o.cellDates&&u&&"n"==h.t&&ia(Pr[u.numFmtId])){var N=Dr(h.v);N&&(h.t="d",h.v=new Date(N.y,N.m-1,N.d,N.H,N.M,N.S,N.u))}F&&("XLDAPR"==F.type&&(h.D=!0),F=void 0),P&&(P=void 0);break;case 1:case 12:if(!o.sheetStubs||A)break;h={t:"z",v:void 0},f=-1==e[0].c?f+1:e[0].c,o.dense?(y[d]||(y[d]=[]),y[d][f]=h):y[Si(f)+m]=h,v.s.r>l.r&&(v.s.r=l.r),v.s.c>f&&(v.s.c=f),v.e.r<l.r&&(v.e.r=l.r),v.e.c<f&&(v.e.c=f),F&&("XLDAPR"==F.type&&(h.D=!0),F=void 0),P&&(P=void 0);break;case 176:x.push(e);break;case 49:F=((o.xlmeta||{}).Cell||[])[e-1];break;case 494:var L=a["!id"][e.relId];for(L?(e.Target=L.Target,e.loc&&(e.Target+="#"+e.loc),e.Rel=L):""==e.relId&&(e.Target="#"+e.loc),d=e.rfx.s.r;d<=e.rfx.e.r;++d)for(f=e.rfx.s.c;f<=e.rfx.e.c;++f)o.dense?(y[d]||(y[d]=[]),y[d][f]||(y[d][f]={t:"z",v:void 0}),y[d][f].l=e):(p=ki({c:f,r:d}),y[p]||(y[p]={t:"z",v:void 0}),y[p].l=e);break;case 426:if(!o.cellFormula)break;_.push(e),(b=o.dense?y[d][f]:y[Si(f)+m]).f=Jc(e[1],0,{r:l.r,c:f},E,o),b.F=_i(e[0]);break;case 427:if(!o.cellFormula)break;T[ki(e[0].s)]=e[1],(b=o.dense?y[d][f]:y[Si(f)+m]).f=Jc(e[1],0,{r:l.r,c:f},E,o);break;case 60:if(!o.cellStyles)break;for(;e.e>=e.s;)I[e.e--]={width:e.w/256,hidden:!!(1&e.flags),level:e.level},R||(R=!0,Yo(e.w/256)),Zo(I[e.e+1]);break;case 161:y["!autofilter"]={ref:_i(e)};break;case 476:y["!margins"]=e;break;case 147:n.Sheets[r]||(n.Sheets[r]={}),e.name&&(n.Sheets[r].CodeName=e.name),(e.above||e.left)&&(y["!outline"]={above:e.above,left:e.left});break;case 137:n.Views||(n.Views=[{}]),n.Views[0]||(n.Views[0]={}),e.RTL&&(n.Views[0].RTL=!0);break;case 485:case 64:case 1053:case 151:case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:A=!0;break;case 36:A=!1;break;case 37:w.push(O),A=!0;break;case 38:w.pop(),A=!1;break;default:if(t.T);else if(!A||o.WTF)throw new Error("Unexpected record 0x"+O.toString(16))}}),o),delete o.supbooks,delete o["!row"],!y["!ref"]&&(v.s.r<2e6||c&&(c.e.r>0||c.e.c>0||c.s.r>0||c.s.c>0))&&(y["!ref"]=_i(c||v)),o.sheetRows&&y["!ref"]){var D=Ti(y["!ref"]);o.sheetRows<=+D.e.r&&(D.e.r=o.sheetRows-1,D.e.r>v.e.r&&(D.e.r=v.e.r),D.e.r<D.s.r&&(D.s.r=D.e.r),D.e.c>v.e.c&&(D.e.c=v.e.c),D.e.c<D.s.c&&(D.s.c=D.e.c),y["!fullref"]=y["!ref"],y["!ref"]=_i(D))}return x.length>0&&(y["!merges"]=x),I.length>0&&(y["!cols"]=I),M.length>0&&(y["!rows"]=M),y}(e,a,r,n,i,s,o):_l(e,a,r,n,i,s,o)}function Vl(e,t,r,a,n,i,s,o){return".bin"===t.slice(-4)?function(e,t,r,a,n){if(!e)return e;a||(a={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},s=[],o=!1;return fi(e,(function(e,a,c){switch(c){case 550:i["!rel"]=e;break;case 651:n.Sheets[r]||(n.Sheets[r]={}),e.name&&(n.Sheets[r].CodeName=e.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:s.push(c);break;case 38:s.pop();break;default:if(a.T>0)s.push(c);else if(a.T<0)s.pop();else if(!o||t.WTF)throw new Error("Unexpected record 0x"+c.toString(16))}}),t),a["!id"][i["!rel"]]&&(i["!drawel"]=a["!id"][i["!rel"]]),i}(e,a,r,n,i):function(e,t,r,a,n){if(!e)return e;a||(a={"!id":{}});var i,s={"!type":"chart","!drawel":null,"!rel":""},o=e.match(xl);return o&&Tl(o[0],0,n,r),(i=e.match(/drawing r:id="(.*?)"/))&&(s["!rel"]=i[1]),a["!id"][s["!rel"]]&&(s["!drawel"]=a["!id"][s["!rel"]]),s}(e,0,r,n,i)}function Kl(e,t,r,a){return".bin"===t.slice(-4)?function(e,t,r){var a={NumberFmt:[]};for(var n in Pr)a.NumberFmt[n]=Pr[n];a.CellXf=[],a.Fonts=[];var i=[],s=!1;return fi(e,(function(e,n,o){switch(o){case 44:a.NumberFmt[e[0]]=e[1],ha(e[1],e[0]);break;case 43:a.Fonts.push(e),null!=e.color.theme&&t&&t.themeElements&&t.themeElements.clrScheme&&(e.color.rgb=Xo(t.themeElements.clrScheme[e.color.theme].rgb,e.color.tint||0));break;case 1025:case 45:case 46:case 48:case 507:case 572:case 475:case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 47:617==i[i.length-1]&&a.CellXf.push(e);break;case 35:s=!0;break;case 36:s=!1;break;case 37:i.push(o),s=!0;break;case 38:i.pop(),s=!1;break;default:if(n.T>0)i.push(o);else if(n.T<0)i.pop();else if(!s||r.WTF&&37!=i[i.length-1])throw new Error("Unexpected record 0x"+o.toString(16))}})),a}(e,r,a):nc(e,r,a)}function Yl(e,t,r){return".bin"===t.slice(-4)?function(e,t){var r=[],a=!1;return fi(e,(function(e,n,i){switch(i){case 159:r.Count=e[0],r.Unique=e[1];break;case 19:r.push(e);break;case 160:return!0;case 35:a=!0;break;case 36:a=!1;break;default:if(n.T,!a||t.WTF)throw new Error("Unexpected record 0x"+i.toString(16))}})),r}(e,r):function(e,t){var r=[],a="";if(!e)return r;var n=e.match(_o);if(n){a=n[2].replace(To,"").split(Eo);for(var i=0;i!=a.length;++i){var s=Co(a[i].trim(),t);null!=s&&(r[r.length]=s)}n=en(n[1]),r.Count=n.count,r.Unique=n.uniqueCount}return r}(e,r)}function Zl(e,t,r){return".bin"===t.slice(-4)?function(e,t){var r=[],a=[],n={},i=!1;return fi(e,(function(e,s,o){switch(o){case 632:a.push(e);break;case 635:n=e;break;case 637:n.t=e.t,n.h=e.h,n.r=e.r;break;case 636:if(n.author=a[n.iauthor],delete n.iauthor,t.sheetRows&&n.rfx&&t.sheetRows<=n.rfx.r)break;n.t||(n.t=""),delete n.rfx,r.push(n);break;case 3072:case 37:case 38:break;case 35:i=!0;break;case 36:i=!1;break;default:if(s.T);else if(!i||t.WTF)throw new Error("Unexpected record 0x"+o.toString(16))}})),r}(e,r):function(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var r=[],a=[],n=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);n&&n[1]&&n[1].split(/<\/\w*:?author>/).forEach((function(e){if(""!==e&&""!==e.trim()){var t=e.match(/<(?:\w+:)?author[^>]*>(.*)/);t&&r.push(t[1])}}));var i=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return i&&i[1]&&i[1].split(/<\/\w*:?comment>/).forEach((function(e){if(""!==e&&""!==e.trim()){var n=e.match(/<(?:\w+:)?comment[^>]*>/);if(n){var i=en(n[0]),s={author:i.authorId&&r[i.authorId]||"sheetjsghost",ref:i.ref,guid:i.guid},o=xi(i.ref);if(!(t.sheetRows&&t.sheetRows<=o.r)){var c=e.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),l=!!c&&!!c[1]&&Co(c[1])||{r:"",t:"",h:""};s.r=l.r,"<t></t>"==l.r&&(l.t=l.h=""),s.t=(l.t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),t.cellHTML&&(s.h=l.h),a.push(s)}}}})),a}(e,r)}function Jl(e,t,r){return".bin"===t.slice(-4)?function(e){var t=[];return fi(e,(function(e,r,a){if(63===a)t.push(e);else if(!r.T)throw new Error("Unexpected record 0x"+a.toString(16))})),t}(e):function(e){var t=[];if(!e)return t;var r=1;return(e.match(Za)||[]).forEach((function(e){var a=en(e);switch(a[0]){case"<?xml":case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete a[0],a.i?r=a.i:a.i=r,t.push(a)}})),t}(e)}function Ql(e,t,r,a){if(".bin"===r.slice(-4))return function(e,t,r,a){if(!e)return e;var n=a||{},i=!1;fi(e,(function(e,t,r){switch(r){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:i=!0;break;case 36:i=!1;break;default:if(t.T);else if(!i||n.WTF)throw new Error("Unexpected record 0x"+r.toString(16))}}),n)}(e,0,0,a)}function eh(e,t,r){return".bin"===t.slice(-4)?function(e,t,r){var a={Types:[],Cell:[],Value:[]},n=r||{},i=[],s=!1,o=2;return fi(e,(function(e,t,r){switch(r){case 335:a.Types.push({name:e.name});break;case 51:e.forEach((function(e){1==o?a.Cell.push({type:a.Types[e[0]-1].name,index:e[1]}):0==o&&a.Value.push({type:a.Types[e[0]-1].name,index:e[1]})}));break;case 337:o=e?1:0;break;case 338:o=2;break;case 35:i.push(r),s=!0;break;case 36:i.pop(),s=!1;break;default:if(t.T);else if(!s||n.WTF&&35!=i[i.length-1])throw new Error("Unexpected record 0x"+r.toString(16))}})),a}(e,0,r):function(e,t,r){var a={Types:[],Cell:[],Value:[]};if(!e)return a;var n,i=!1,s=2;return e.replace(Za,(function(e){var t=en(e);switch(tn(t[0])){case"<?xml":case"<metadata":case"</metadata>":case"<metadataTypes":case"</metadataTypes>":case"</metadataType>":case"</futureMetadata>":case"<bk>":case"</bk>":case"</rc>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<metadataType":a.Types.push({name:t.name});break;case"<futureMetadata":for(var o=0;o<a.Types.length;++o)a.Types[o].name==t.name&&(n=a.Types[o]);break;case"<rc":1==s?a.Cell.push({type:a.Types[t.t-1].name,index:+t.v}):0==s&&a.Value.push({type:a.Types[t.t-1].name,index:+t.v});break;case"<cellMetadata":s=1;break;case"</cellMetadata>":case"</valueMetadata>":s=2;break;case"<valueMetadata":s=0;break;case"<ext":i=!0;break;case"</ext>":i=!1;break;case"<rvb":if(!n)break;n.offsets||(n.offsets=[]),n.offsets.push(+t.i);break;default:if(!i&&r.WTF)throw new Error("unrecognized "+t[0]+" in metadata")}return e})),a}(e,0,r)}var th,rh=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,ah=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function nh(e,t){var r=e.split(/\s+/),a=[];if(t||(a[0]=r[0]),1===r.length)return a;var n,i,s,o=e.match(rh);if(o)for(s=0;s!=o.length;++s)-1===(i=(n=o[s].match(ah))[1].indexOf(":"))?a[n[1]]=n[2].slice(1,n[2].length-1):a["xmlns:"===n[1].slice(0,6)?"xmlns"+n[1].slice(6):n[1].slice(i+1)]=n[2].slice(1,n[2].length-1);return a}function ih(e){var t={};if(1===e.split(/\s+/).length)return t;var r,a,n,i=e.match(rh);if(i)for(n=0;n!=i.length;++n)-1===(a=(r=i[n].match(ah))[1].indexOf(":"))?t[r[1]]=r[2].slice(1,r[2].length-1):t["xmlns:"===r[1].slice(0,6)?"xmlns"+r[1].slice(6):r[1].slice(a+1)]=r[2].slice(1,r[2].length-1);return t}function sh(e,t,r,a){var n=a;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":n=hn(a);break;case"i2":case"int":n=parseInt(a,10);break;case"r4":case"float":n=parseFloat(a);break;case"date":case"dateTime.tz":n=Oa(a);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[nn(t)]=n}function oh(e,t,r){if("z"!==e.t){if(!r||!1!==r.cellText)try{"e"===e.t?e.w=e.w||rs[e.v]:"General"===t?"n"===e.t?(0|e.v)===e.v?e.w=e.v.toString(10):e.w=Ur(e.v):e.w=zr(e.v):e.w=(a=t||"General",n=e.v,"General"===(i=th[a]||nn(a))?zr(n):la(i,n))}catch(e){if(r.WTF)throw e}var a,n,i;try{var s=th[t]||t||"General";if(r.cellNF&&(e.z=s),r.cellDates&&"n"==e.t&&ia(s)){var o=Dr(e.v);o&&(e.t="d",e.v=new Date(o.y,o.m-1,o.d,o.H,o.M,o.S,o.u))}}catch(e){if(r.WTF)throw e}}}function ch(e,t,r){if(r.cellStyles&&t.Interior){var a=t.Interior;a.Pattern&&(a.patternType=tc[a.Pattern]||a.Pattern)}e[t.ID]=t}function lh(e,t,r,a,n,i,s,o,c,l){var h="General",u=a.StyleID,d={};l=l||{};var f=[],p=0;for(void 0===u&&o&&(u=o.StyleID),void 0===u&&s&&(u=s.StyleID);void 0!==i[u]&&(i[u].nf&&(h=i[u].nf),i[u].Interior&&f.push(i[u].Interior),i[u].Parent);)u=i[u].Parent;switch(r.Type){case"Boolean":a.t="b",a.v=hn(e);break;case"String":a.t="s",a.r=ln(nn(e)),a.v=e.indexOf("<")>-1?nn(t||e).replace(/<.*?>/g,""):a.r;break;case"DateTime":"Z"!=e.slice(-1)&&(e+="Z"),a.v=(Oa(e)-new Date(Date.UTC(1899,11,30)))/864e5,a.v!=a.v?a.v=nn(e):a.v<60&&(a.v=a.v-1),h&&"General"!=h||(h="yyyy-mm-dd");case"Number":void 0===a.v&&(a.v=+e),a.t||(a.t="n");break;case"Error":a.t="e",a.v=as[e],!1!==l.cellText&&(a.w=e);break;default:""==e&&""==t?a.t="z":(a.t="s",a.v=ln(t||e))}if(oh(a,h,l),!1!==l.cellFormula)if(a.Formula){var g=nn(a.Formula);61==g.charCodeAt(0)&&(g=g.slice(1)),a.f=Ac(g,n),delete a.Formula,"RC"==a.ArrayRange?a.F=Ac("RC:RC",n):a.ArrayRange&&(a.F=Ac(a.ArrayRange,n),c.push([Ti(a.F),a.F]))}else for(p=0;p<c.length;++p)n.r>=c[p][0].s.r&&n.r<=c[p][0].e.r&&n.c>=c[p][0].s.c&&n.c<=c[p][0].e.c&&(a.F=c[p][1]);l.cellStyles&&(f.forEach((function(e){!d.patternType&&e.patternType&&(d.patternType=e.patternType)})),a.s=d),void 0!==a.StyleID&&(a.ixfe=a.StyleID)}function hh(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e.v=e.w=e.ixfe=void 0}function uh(e,t){var r=t||{};ua();var a=sr(_n(e));"binary"!=r.type&&"array"!=r.type&&"base64"!=r.type||(a=void 0!==ir?ir.utils.decode(65001,ar(a)):gn(a));var n,i=a.slice(0,1024).toLowerCase(),s=!1;if((1023&(i=i.replace(/".*?"/g,"")).indexOf(">"))>Math.min(1023&i.indexOf(","),1023&i.indexOf(";"))){var o=Pa(r);return o.type="string",yo.to_workbook(a,o)}if(-1==i.indexOf("<?xml")&&["html","table","head","meta","script","style","div"].forEach((function(e){i.indexOf("<"+e)>=0&&(s=!0)})),s)return function(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||0==r.length)throw new Error("Invalid HTML: could not find <table>");if(1==r.length)return Fi(Ch(r[0],t),t);var a={SheetNames:[],Sheets:{}};return r.forEach((function(e,r){Su(a,Ch(e,t),"Sheet"+(r+1))})),a}(a,r);th={"General Number":"General","General Date":Pr[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":Pr[15],"Short Date":Pr[14],"Long Time":Pr[19],"Medium Time":Pr[18],"Short Time":Pr[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:Pr[2],Standard:Pr[4],Percent:Pr[10],Scientific:Pr[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var c,l=[];var h,u={},d=[],f=r.dense?[]:{},p="",g={},m={},b=nh('<Data ss:Type="String">'),y=0,v=0,w=0,A={s:{r:2e6,c:2e6},e:{r:0,c:0}},S={},x={},k="",C=0,_=[],T={},E={},O=0,F=[],P=[],I={},M=[],R=!1,D=[],N=[],L={},B=0,j=0,$={Sheets:[],WBProps:{date1904:!1}},U={};Tn.lastIndex=0,a=a.replace(/<!--([\s\S]*?)-->/gm,"");for(var z="";n=Tn.exec(a);)switch(n[3]=(z=n[3]).toLowerCase()){case"data":if("data"==z){if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"))}else"/"!==n[0].charAt(n[0].length-2)&&l.push([n[3],!0]);break}if(l[l.length-1][1])break;"/"===n[1]?lh(a.slice(y,n.index),k,b,"comment"==l[l.length-1][0]?I:g,{c:v,r:w},S,M[v],m,D,r):(k="",b=nh(n[0]),y=n.index+n[0].length);break;case"cell":if("/"===n[1])if(P.length>0&&(g.c=P),(!r.sheetRows||r.sheetRows>w)&&void 0!==g.v&&(r.dense?(f[w]||(f[w]=[]),f[w][v]=g):f[Si(v)+wi(w)]=g),g.HRef&&(g.l={Target:nn(g.HRef)},g.HRefScreenTip&&(g.l.Tooltip=g.HRefScreenTip),delete g.HRef,delete g.HRefScreenTip),(g.MergeAcross||g.MergeDown)&&(B=v+(0|parseInt(g.MergeAcross,10)),j=w+(0|parseInt(g.MergeDown,10)),_.push({s:{c:v,r:w},e:{c:B,r:j}})),r.sheetStubs)if(g.MergeAcross||g.MergeDown){for(var H=v;H<=B;++H)for(var X=w;X<=j;++X)(H>v||X>w)&&(r.dense?(f[X]||(f[X]=[]),f[X][H]={t:"z"}):f[Si(H)+wi(X)]={t:"z"});v=B+1}else++v;else g.MergeAcross?v=B+1:++v;else(g=ih(n[0])).Index&&(v=+g.Index-1),v<A.s.c&&(A.s.c=v),v>A.e.c&&(A.e.c=v),"/>"===n[0].slice(-2)&&++v,P=[];break;case"row":"/"===n[1]||"/>"===n[0].slice(-2)?(w<A.s.r&&(A.s.r=w),w>A.e.r&&(A.e.r=w),"/>"===n[0].slice(-2)&&(m=nh(n[0])).Index&&(w=+m.Index-1),v=0,++w):((m=nh(n[0])).Index&&(w=+m.Index-1),L={},("0"==m.AutoFitHeight||m.Height)&&(L.hpx=parseInt(m.Height,10),L.hpt=Qo(L.hpx),N[w]=L),"1"==m.Hidden&&(L.hidden=!0,N[w]=L));break;case"worksheet":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"));d.push(p),A.s.r<=A.e.r&&A.s.c<=A.e.c&&(f["!ref"]=_i(A),r.sheetRows&&r.sheetRows<=A.e.r&&(f["!fullref"]=f["!ref"],A.e.r=r.sheetRows-1,f["!ref"]=_i(A))),_.length&&(f["!merges"]=_),M.length>0&&(f["!cols"]=M),N.length>0&&(f["!rows"]=N),u[p]=f}else A={s:{r:2e6,c:2e6},e:{r:0,c:0}},w=v=0,l.push([n[3],!1]),c=nh(n[0]),p=nn(c.Name),f=r.dense?[]:{},_=[],D=[],N=[],U={name:p,Hidden:0},$.Sheets.push(U);break;case"table":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"))}else{if("/>"==n[0].slice(-2))break;l.push([n[3],!1]),M=[],R=!1}break;case"style":"/"===n[1]?ch(S,x,r):x=nh(n[0]);break;case"numberformat":x.nf=nn(nh(n[0]).Format||"General"),th[x.nf]&&(x.nf=th[x.nf]);for(var W=0;392!=W&&Pr[W]!=x.nf;++W);if(392==W)for(W=57;392!=W;++W)if(null==Pr[W]){ha(x.nf,W);break}break;case"column":if("table"!==l[l.length-1][0])break;if((h=nh(n[0])).Hidden&&(h.hidden=!0,delete h.Hidden),h.Width&&(h.wpx=parseInt(h.Width,10)),!R&&h.wpx>10){R=!0,Wo=6;for(var G=0;G<M.length;++G)M[G]&&Zo(M[G])}R&&Zo(h),M[h.Index-1||M.length]=h;for(var q=0;q<+h.Span;++q)M[M.length]=Pa(h);break;case"namedrange":if("/"===n[1])break;$.Names||($.Names=[]);var V=en(n[0]),K={Name:V.Name,Ref:Ac(V.RefersTo.slice(1),{r:0,c:0})};$.Sheets.length>0&&(K.Sheet=$.Sheets.length-1),$.Names.push(K);break;case"namedcell":case"b":case"i":case"u":case"s":case"em":case"h2":case"h3":case"sub":case"sup":case"span":case"alignment":case"borders":case"border":case"protection":case"paragraphs":case"name":case"pixelsperinch":case"null":break;case"font":if("/>"===n[0].slice(-2))break;"/"===n[1]?k+=a.slice(C,n.index):C=n.index+n[0].length;break;case"interior":if(!r.cellStyles)break;x.Interior=nh(n[0]);break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if("/>"===n[0].slice(-2))break;"/"===n[1]?ms(T,z,a.slice(O,n.index)):O=n.index+n[0].length;break;case"styles":case"workbook":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"))}else l.push([n[3],!1]);break;case"comment":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"));hh(I),P.push(I)}else l.push([n[3],!1]),I={a:(c=nh(n[0])).Author};break;case"autofilter":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"))}else if("/"!==n[0].charAt(n[0].length-2)){var Y=nh(n[0]);f["!autofilter"]={ref:Ac(Y.Range).replace(/\$/g,"")},l.push([n[3],!0])}break;case"datavalidation":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"))}else"/"!==n[0].charAt(n[0].length-2)&&l.push([n[3],!0]);break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if("/"===n[1]){if((c=l.pop())[0]!==n[3])throw new Error("Bad state: "+c.join("|"))}else"/"!==n[0].charAt(n[0].length-2)&&l.push([n[3],!0]);break;default:if(0==l.length&&"document"==n[3])return Lh(a,r);if(0==l.length&&"uof"==n[3])return Lh(a,r);var Z=!0;switch(l[l.length-1][0]){case"officedocumentsettings":switch(n[3]){case"allowpng":case"removepersonalinformation":case"downloadcomponents":case"locationofcomponents":case"colors":case"color":case"index":case"rgb":case"targetscreensize":case"readonlyrecommended":break;default:Z=!1}break;case"componentoptions":switch(n[3]){case"toolbar":case"hideofficelogo":case"spreadsheetautofit":case"label":case"caption":case"maxheight":case"maxwidth":case"nextsheetnumber":break;default:Z=!1}break;case"excelworkbook":switch(n[3]){case"date1904":$.WBProps.date1904=!0;break;case"windowheight":case"windowwidth":case"windowtopx":case"windowtopy":case"tabratio":case"protectstructure":case"protectwindow":case"protectwindows":case"activesheet":case"displayinknotes":case"firstvisiblesheet":case"supbook":case"sheetname":case"sheetindex":case"sheetindexfirst":case"sheetindexlast":case"dll":case"acceptlabelsinformulas":case"donotsavelinkvalues":case"iteration":case"maxiterations":case"maxchange":case"path":case"xct":case"count":case"selectedsheets":case"calculation":case"uncalced":case"startupprompt":case"crn":case"externname":case"formula":case"colfirst":case"collast":case"wantadvise":case"boolean":case"error":case"text":case"ole":case"noautorecover":case"publishobjects":case"donotcalculatebeforesave":case"number":case"refmoder1c1":case"embedsavesmarttags":break;default:Z=!1}break;case"workbookoptions":switch(n[3]){case"owcversion":case"height":case"width":break;default:Z=!1}break;case"worksheetoptions":switch(n[3]){case"visible":if("/>"===n[0].slice(-2));else if("/"===n[1])switch(a.slice(O,n.index)){case"SheetHidden":U.Hidden=1;break;case"SheetVeryHidden":U.Hidden=2}else O=n.index+n[0].length;break;case"header":f["!margins"]||pl(f["!margins"]={},"xlml"),isNaN(+en(n[0]).Margin)||(f["!margins"].header=+en(n[0]).Margin);break;case"footer":f["!margins"]||pl(f["!margins"]={},"xlml"),isNaN(+en(n[0]).Margin)||(f["!margins"].footer=+en(n[0]).Margin);break;case"pagemargins":var J=en(n[0]);f["!margins"]||pl(f["!margins"]={},"xlml"),isNaN(+J.Top)||(f["!margins"].top=+J.Top),isNaN(+J.Left)||(f["!margins"].left=+J.Left),isNaN(+J.Right)||(f["!margins"].right=+J.Right),isNaN(+J.Bottom)||(f["!margins"].bottom=+J.Bottom);break;case"displayrighttoleft":$.Views||($.Views=[]),$.Views[0]||($.Views[0]={}),$.Views[0].RTL=!0;break;case"freezepanes":case"frozennosplit":case"splithorizontal":case"splitvertical":case"donotdisplaygridlines":case"activerow":case"activecol":case"toprowbottompane":case"leftcolumnrightpane":case"unsynced":case"print":case"printerrors":case"panes":case"scale":case"pane":case"number":case"layout":case"pagesetup":case"selected":case"protectobjects":case"enableselection":case"protectscenarios":case"validprinterinfo":case"horizontalresolution":case"verticalresolution":case"numberofcopies":case"activepane":case"toprowvisible":case"leftcolumnvisible":case"fittopage":case"rangeselection":case"papersizeindex":case"pagelayoutzoom":case"pagebreakzoom":case"filteron":case"fitwidth":case"fitheight":case"commentslayout":case"zoom":case"lefttoright":case"gridlines":case"allowsort":case"allowfilter":case"allowinsertrows":case"allowdeleterows":case"allowinsertcols":case"allowdeletecols":case"allowinserthyperlinks":case"allowformatcells":case"allowsizecols":case"allowsizerows":case"tabcolorindex":case"donotdisplayheadings":case"showpagelayoutzoom":case"blackandwhite":case"donotdisplayzeros":case"displaypagebreak":case"rowcolheadings":case"donotdisplayoutline":case"noorientation":case"allowusepivottables":case"zeroheight":case"viewablerange":case"selection":case"protectcontents":break;case"nosummaryrowsbelowdetail":f["!outline"]||(f["!outline"]={}),f["!outline"].above=!0;break;case"nosummarycolumnsrightdetail":f["!outline"]||(f["!outline"]={}),f["!outline"].left=!0;break;default:Z=!1}break;case"pivottable":case"pivotcache":switch(n[3]){case"immediateitemsondrop":case"showpagemultipleitemlabel":case"compactrowindent":case"location":case"pivotfield":case"orientation":case"layoutform":case"layoutsubtotallocation":case"layoutcompactrow":case"position":case"pivotitem":case"datatype":case"datafield":case"sourcename":case"parentfield":case"ptlineitems":case"ptlineitem":case"countofsameitems":case"item":case"itemtype":case"ptsource":case"cacheindex":case"consolidationreference":case"filename":case"reference":case"nocolumngrand":case"norowgrand":case"blanklineafteritems":case"hidden":case"subtotal":case"basefield":case"mapchilditems":case"function":case"refreshonfileopen":case"printsettitles":case"mergelabels":case"defaultversion":case"refreshname":case"refreshdate":case"refreshdatecopy":case"versionlastrefresh":case"versionlastupdate":case"versionupdateablemin":case"versionrefreshablemin":case"calculation":break;default:Z=!1}break;case"pagebreaks":switch(n[3]){case"colbreaks":case"colbreak":case"rowbreaks":case"rowbreak":case"colstart":case"colend":case"rowend":break;default:Z=!1}break;case"autofilter":switch(n[3]){case"autofiltercolumn":case"autofiltercondition":case"autofilterand":case"autofilteror":break;default:Z=!1}break;case"querytable":switch(n[3]){case"id":case"autoformatfont":case"autoformatpattern":case"querysource":case"querytype":case"enableredirections":case"refreshedinxl9":case"urlstring":case"htmltables":case"connection":case"commandtext":case"refreshinfo":case"notitles":case"nextid":case"columninfo":case"overwritecells":case"donotpromptforfile":case"textwizardsettings":case"source":case"number":case"decimal":case"thousandseparator":case"trailingminusnumbers":case"formatsettings":case"fieldtype":case"delimiters":case"tab":case"comma":case"autoformatname":case"versionlastedit":case"versionlastrefresh":break;default:Z=!1}break;case"datavalidation":switch(n[3]){case"range":case"type":case"min":case"max":case"sort":case"descending":case"order":case"casesensitive":case"value":case"errorstyle":case"errormessage":case"errortitle":case"inputmessage":case"inputtitle":case"combohide":case"inputhide":case"condition":case"qualifier":case"useblank":case"value1":case"value2":case"format":case"cellrangelist":break;default:Z=!1}break;case"sorting":case"conditionalformatting":switch(n[3]){case"range":case"type":case"min":case"max":case"sort":case"descending":case"order":case"casesensitive":case"value":case"errorstyle":case"errormessage":case"errortitle":case"cellrangelist":case"inputmessage":case"inputtitle":case"combohide":case"inputhide":case"condition":case"qualifier":case"useblank":case"value1":case"value2":case"format":break;default:Z=!1}break;case"mapinfo":case"schema":case"data":switch(n[3]){case"map":case"entry":case"range":case"xpath":case"field":case"xsdtype":case"filteron":case"aggregate":case"elementtype":case"attributetype":case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":case"row":break;default:Z=!1}break;case"smarttags":break;default:Z=!1}if(Z)break;if(n[3].match(/!\[CDATA/))break;if(!l[l.length-1][1])throw"Unrecognized tag: "+n[3]+"|"+l.join("|");if("customdocumentproperties"===l[l.length-1][0]){if("/>"===n[0].slice(-2))break;"/"===n[1]?sh(E,z,F,a.slice(O,n.index)):(F=n,O=n.index+n[0].length);break}if(r.WTF)throw"Unrecognized tag: "+n[3]+"|"+l.join("|")}var Q={};return r.bookSheets||r.bookProps||(Q.Sheets=u),Q.SheetNames=d,Q.Workbook=$,Q.SSF=Pa(Pr),Q.Props=T,Q.Custprops=E,Q}function dh(e,t){switch(nu(t=t||{}),t.type||"base64"){case"base64":return uh(ur(e),t);case"binary":case"buffer":case"file":return uh(e,t);case"array":return uh(br(e),t)}}function fh(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=function(e){return qi(e,1)}(r),r.length-r.l<=4)return t;var a=r.read_shift(4);return 0==a||a>40?t:(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4||1907505652!==(a=r.read_shift(4))?t:(t.UnicodeClipboardFormat=function(e){return qi(e,2)}(r),0==(a=r.read_shift(4))||a>40?t:(r.l-=4,void(t.Reserved2=r.read_shift(0,"lpwstr")))))}var ph=[60,1084,2066,2165,2175];function gh(e,t,r,a,n){var i=a,s=[],o=r.slice(r.l,r.l+i);if(n&&n.enc&&n.enc.insitu&&o.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:case 133:break;default:n.enc.insitu(o)}s.push(o),r.l+=i;for(var c=Qn(r,r.l),l=xh[c],h=0;null!=l&&ph.indexOf(c)>-1;)i=Qn(r,r.l+2),h=r.l+4,2066==c?h+=4:2165!=c&&2175!=c||(h+=12),o=r.slice(h,r.l+4+i),s.push(o),r.l+=4+i,l=xh[c=Qn(r,r.l)];var u=vr(s);hi(u,0);var d=0;u.lens=[];for(var f=0;f<s.length;++f)u.lens.push(d),d+=s[f].length;if(u.length<a)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+u.length+" < "+a;return t.f(u,u.length,n)}function mh(e,t,r){if("z"!==e.t&&e.XF){var a=0;try{a=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=Pr[a])}catch(e){if(t.WTF)throw e}if(!t||!1!==t.cellText)try{"e"===e.t?e.w=e.w||rs[e.v]:0===a||"General"==a?"n"===e.t?(0|e.v)===e.v?e.w=e.v.toString(10):e.w=Ur(e.v):e.w=zr(e.v):e.w=la(a,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(e){if(t.WTF)throw e}if(t.cellDates&&a&&"n"==e.t&&ia(Pr[a]||String(a))){var n=Dr(e.v);n&&(e.t="d",e.v=new Date(n.y,n.m-1,n.d,n.H,n.M,n.S,n.u))}}}function bh(e,t,r){return{v:e,ixfe:t,t:r}}function yh(e,t){var r={opts:{}},a={};var n,i,s,o,c,l,h,u,d=t.dense?[]:{},f={},p={},g=null,m=[],b="",y={},v="",w={},A=[],S=[],x=[],k={Sheets:[],WBProps:{date1904:!1},Views:[{}]},C={},_=function(e){return e<8?ts[e]:e<64&&x[e-8]||ts[e]},T=function(e,t,r){if(!(L>1||r.sheetRows&&e.r>=r.sheetRows)){if(r.cellStyles&&t.XF&&t.XF.data&&function(e,t,r){var a,n=t.XF.data;n&&n.patternType&&r&&r.cellStyles&&(t.s={},t.s.patternType=n.patternType,(a=Ho(_(n.icvFore)))&&(t.s.fgColor={rgb:a}),(a=Ho(_(n.icvBack)))&&(t.s.bgColor={rgb:a}))}(0,t,r),delete t.ixfe,delete t.XF,n=e,v=ki(e),p&&p.s&&p.e||(p={s:{r:0,c:0},e:{r:0,c:0}}),e.r<p.s.r&&(p.s.r=e.r),e.c<p.s.c&&(p.s.c=e.c),e.r+1>p.e.r&&(p.e.r=e.r+1),e.c+1>p.e.c&&(p.e.c=e.c+1),r.cellFormula&&t.f)for(var a=0;a<A.length;++a)if(!(A[a][0].s.c>e.c||A[a][0].s.r>e.r||A[a][0].e.c<e.c||A[a][0].e.r<e.r)){t.F=_i(A[a][0]),A[a][0].s.c==e.c&&A[a][0].s.r==e.r||delete t.f,t.f&&(t.f=""+Jc(A[a][1],0,e,R,E));break}r.dense?(d[e.r]||(d[e.r]=[]),d[e.r][e.c]=t):d[v]=t}},E={enc:!1,sbcch:0,snames:[],sharedf:w,arrayf:A,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(E.password=t.password);var O=[],F=[],P=[],I=[],M=!1,R=[];R.SheetNames=E.snames,R.sharedf=E.sharedf,R.arrayf=E.arrayf,R.names=[],R.XTI=[];var D,N=0,L=0,B=0,j=[],$=[];E.codepage=1200,tr(1200);for(var U=!1;e.l<e.length-1;){var z=e.l,H=e.read_shift(2);if(0===H&&10===N)break;var X=e.l===e.length?0:e.read_shift(2),W=xh[H];if(W&&W.f){if(t.bookSheets&&133===N&&133!==H)break;if(N=H,2===W.r||12==W.r){var G=e.read_shift(2);if(X-=2,!E.enc&&G!==H&&((255&G)<<8|G>>8)!==H)throw new Error("rt mismatch: "+G+"!="+H);12==W.r&&(e.l+=10,X-=10)}var q={};if(q=10===H?W.f(e,X,E):gh(H,W,e,X,E),0==L&&-1===[9,521,1033,2057].indexOf(N))continue;switch(H){case 34:r.opts.Date1904=k.WBProps.date1904=q;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(E.enc||(e.l=0),E.enc=q,!t.password)throw new Error("File is password-protected");if(null==q.valid)throw new Error("Encryption scheme unsupported");if(!q.valid)throw new Error("Password is incorrect");break;case 92:E.lastuser=q;break;case 66:var V=Number(q);switch(V){case 21010:V=1200;break;case 32768:V=1e4;break;case 32769:V=1252}tr(E.codepage=V),U=!0;break;case 317:E.rrtabid=q;break;case 25:E.winlocked=q;break;case 439:r.opts.RefreshAll=q;break;case 12:r.opts.CalcCount=q;break;case 16:r.opts.CalcDelta=q;break;case 17:r.opts.CalcIter=q;break;case 13:r.opts.CalcMode=q;break;case 14:r.opts.CalcPrecision=q;break;case 95:r.opts.CalcSaveRecalc=q;break;case 15:E.CalcRefMode=q;break;case 2211:r.opts.FullCalc=q;break;case 129:q.fDialog&&(d["!type"]="dialog"),q.fBelow||((d["!outline"]||(d["!outline"]={})).above=!0),q.fRight||((d["!outline"]||(d["!outline"]={})).left=!0);break;case 224:S.push(q);break;case 430:R.push([q]),R[R.length-1].XTI=[];break;case 35:case 547:R[R.length-1].push(q);break;case 24:case 536:D={Name:q.Name,Ref:Jc(q.rgce,0,null,R,E)},q.itab>0&&(D.Sheet=q.itab-1),R.names.push(D),R[0]||(R[0]=[],R[0].XTI=[]),R[R.length-1].push(q),"_xlnm._FilterDatabase"==q.Name&&q.itab>0&&q.rgce&&q.rgce[0]&&q.rgce[0][0]&&"PtgArea3d"==q.rgce[0][0][0]&&($[q.itab-1]={ref:_i(q.rgce[0][0][1][2])});break;case 22:E.ExternCount=q;break;case 23:0==R.length&&(R[0]=[],R[0].XTI=[]),R[R.length-1].XTI=R[R.length-1].XTI.concat(q),R.XTI=R.XTI.concat(q);break;case 2196:if(E.biff<8)break;null!=D&&(D.Comment=q[1]);break;case 18:d["!protect"]=q;break;case 19:0!==q&&E.WTF&&console.error("Password verifier: "+q);break;case 133:f[q.pos]=q,E.snames.push(q.name);break;case 10:if(--L)break;if(p.e){if(p.e.r>0&&p.e.c>0){if(p.e.r--,p.e.c--,d["!ref"]=_i(p),t.sheetRows&&t.sheetRows<=p.e.r){var K=p.e.r;p.e.r=t.sheetRows-1,d["!fullref"]=d["!ref"],d["!ref"]=_i(p),p.e.r=K}p.e.r++,p.e.c++}O.length>0&&(d["!merges"]=O),F.length>0&&(d["!objects"]=F),P.length>0&&(d["!cols"]=P),I.length>0&&(d["!rows"]=I),k.Sheets.push(C)}""===b?y=d:a[b]=d,d=t.dense?[]:{};break;case 9:case 521:case 1033:case 2057:if(8===E.biff&&(E.biff={9:2,521:3,1033:4}[H]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[q.BIFFVer]||8),E.biffguess=0==q.BIFFVer,0==q.BIFFVer&&4096==q.dt&&(E.biff=5,U=!0,tr(E.codepage=28591)),8==E.biff&&0==q.BIFFVer&&16==q.dt&&(E.biff=2),L++)break;if(d=t.dense?[]:{},E.biff<8&&!U&&(U=!0,tr(E.codepage=t.codepage||1252)),E.biff<5||0==q.BIFFVer&&4096==q.dt){""===b&&(b="Sheet1"),p={s:{r:0,c:0},e:{r:0,c:0}};var Y={pos:e.l-X,name:b};f[Y.pos]=Y,E.snames.push(b)}else b=(f[z]||{name:""}).name;32==q.dt&&(d["!type"]="chart"),64==q.dt&&(d["!type"]="macro"),O=[],F=[],E.arrayf=A=[],P=[],I=[],M=!1,C={Hidden:(f[z]||{hs:0}).hs,name:b};break;case 515:case 3:case 2:"chart"==d["!type"]&&(t.dense?(d[q.r]||[])[q.c]:d[ki({c:q.c,r:q.r})])&&++q.c,l={ixfe:q.ixfe,XF:S[q.ixfe]||{},v:q.val,t:"n"},B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:q.c,r:q.r},l,t);break;case 5:case 517:l={ixfe:q.ixfe,XF:S[q.ixfe],v:q.val,t:q.t},B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:q.c,r:q.r},l,t);break;case 638:l={ixfe:q.ixfe,XF:S[q.ixfe],v:q.rknum,t:"n"},B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:q.c,r:q.r},l,t);break;case 189:for(var Z=q.c;Z<=q.C;++Z){var J=q.rkrec[Z-q.c][0];l={ixfe:J,XF:S[J],v:q.rkrec[Z-q.c][1],t:"n"},B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:Z,r:q.r},l,t)}break;case 6:case 518:case 1030:if("String"==q.val){g=q;break}if((l=bh(q.val,q.cell.ixfe,q.tt)).XF=S[l.ixfe],t.cellFormula){var Q=q.formula;if(Q&&Q[0]&&Q[0][0]&&"PtgExp"==Q[0][0][0]){var ee=Q[0][0][1][0],te=Q[0][0][1][1],re=ki({r:ee,c:te});w[re]?l.f=""+Jc(q.formula,0,q.cell,R,E):l.F=((t.dense?(d[ee]||[])[te]:d[re])||{}).F}else l.f=""+Jc(q.formula,0,q.cell,R,E)}B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T(q.cell,l,t),g=q;break;case 7:case 519:if(!g)throw new Error("String record expects Formula");g.val=q,(l=bh(q,g.cell.ixfe,"s")).XF=S[l.ixfe],t.cellFormula&&(l.f=""+Jc(g.formula,0,g.cell,R,E)),B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T(g.cell,l,t),g=null;break;case 33:case 545:A.push(q);var ae=ki(q[0].s);if(i=t.dense?(d[q[0].s.r]||[])[q[0].s.c]:d[ae],t.cellFormula&&i){if(!g)break;if(!ae||!i)break;i.f=""+Jc(q[1],0,q[0],R,E),i.F=_i(q[0])}break;case 1212:if(!t.cellFormula)break;if(v){if(!g)break;w[ki(g.cell)]=q[0],((i=t.dense?(d[g.cell.r]||[])[g.cell.c]:d[ki(g.cell)])||{}).f=""+Jc(q[0],0,n,R,E)}break;case 253:l=bh(m[q.isst].t,q.ixfe,"s"),m[q.isst].h&&(l.h=m[q.isst].h),l.XF=S[l.ixfe],B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:q.c,r:q.r},l,t);break;case 513:t.sheetStubs&&(l={ixfe:q.ixfe,XF:S[q.ixfe],t:"z"},B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:q.c,r:q.r},l,t));break;case 190:if(t.sheetStubs)for(var ne=q.c;ne<=q.C;++ne){var ie=q.ixfe[ne-q.c];l={ixfe:ie,XF:S[ie],t:"z"},B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:ne,r:q.r},l,t)}break;case 214:case 516:case 4:(l=bh(q.val,q.ixfe,"s")).XF=S[l.ixfe],B>0&&(l.z=j[l.ixfe>>8&63]),mh(l,t,r.opts.Date1904),T({c:q.c,r:q.r},l,t);break;case 0:case 512:1===L&&(p=q);break;case 252:m=q;break;case 1054:if(4==E.biff){j[B++]=q[1];for(var se=0;se<B+163&&Pr[se]!=q[1];++se);se>=163&&ha(q[1],B+163)}else ha(q[1],q[0]);break;case 30:j[B++]=q;for(var oe=0;oe<B+163&&Pr[oe]!=q;++oe);oe>=163&&ha(q,B+163);break;case 229:O=O.concat(q);break;case 93:F[q.cmo[0]]=E.lastobj=q;break;case 438:E.lastobj.TxO=q;break;case 127:E.lastobj.ImData=q;break;case 440:for(c=q[0].s.r;c<=q[0].e.r;++c)for(o=q[0].s.c;o<=q[0].e.c;++o)(i=t.dense?(d[c]||[])[o]:d[ki({c:o,r:c})])&&(i.l=q[1]);break;case 2048:for(c=q[0].s.r;c<=q[0].e.r;++c)for(o=q[0].s.c;o<=q[0].e.c;++o)(i=t.dense?(d[c]||[])[o]:d[ki({c:o,r:c})])&&i.l&&(i.l.Tooltip=q[1]);break;case 28:if(E.biff<=5&&E.biff>=2)break;i=t.dense?(d[q[0].r]||[])[q[0].c]:d[ki(q[0])];var ce=F[q[2]];i||(t.dense?(d[q[0].r]||(d[q[0].r]=[]),i=d[q[0].r][q[0].c]={t:"z"}):i=d[ki(q[0])]={t:"z"},p.e.r=Math.max(p.e.r,q[0].r),p.s.r=Math.min(p.s.r,q[0].r),p.e.c=Math.max(p.e.c,q[0].c),p.s.c=Math.min(p.s.c,q[0].c)),i.c||(i.c=[]),s={a:q[1],t:ce.TxO.t},i.c.push(s);break;case 2173:S[q.ixfe],q.ext.forEach((function(e){e[0]}));break;case 125:if(!E.cellStyles)break;for(;q.e>=q.s;)P[q.e--]={width:q.w/256,level:q.level||0,hidden:!!(1&q.flags)},M||(M=!0,Yo(q.w/256)),Zo(P[q.e+1]);break;case 520:var le={};null!=q.level&&(I[q.r]=le,le.level=q.level),q.hidden&&(I[q.r]=le,le.hidden=!0),q.hpt&&(I[q.r]=le,le.hpt=q.hpt,le.hpx=ec(q.hpt));break;case 38:case 39:case 40:case 41:d["!margins"]||pl(d["!margins"]={}),d["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[H]]=q;break;case 161:d["!margins"]||pl(d["!margins"]={}),d["!margins"].header=q.header,d["!margins"].footer=q.footer;break;case 574:q.RTL&&(k.Views[0].RTL=!0);break;case 146:x=q;break;case 2198:u=q;break;case 140:h=q;break;case 442:b?C.CodeName=q||C.name:k.WBProps.CodeName=q||"ThisWorkbook"}}else W||console.error("Missing Info for XLS Record 0x"+H.toString(16)),e.l+=X}return r.SheetNames=ba(f).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return f[e].name})),t.bookSheets||(r.Sheets=a),!r.SheetNames.length&&y["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=y)):r.Preamble=y,r.Sheets&&$.forEach((function(e,t){r.Sheets[r.SheetNames[t]]["!autofilter"]=e})),r.Strings=m,r.SSF=Pa(Pr),E.enc&&(r.Encryption=E.enc),u&&(r.Themes=u),r.Metadata={},void 0!==h&&(r.Metadata.Country=h),R.names.length>0&&(k.Names=R.names),r.Workbook=k,r}var vh="e0859ff2f94f6810ab9108002b27b3d9",wh="02d5cdd59c2e1b10939708002b2cf9ae";function Ah(e,t){var r,a,n,i;if(t||(t={}),nu(t),rr(),t.codepage&&er(t.codepage),e.FullPaths){if(ga.find(e,"/encryption"))throw new Error("File is password-protected");r=ga.find(e,"!CompObj"),a=ga.find(e,"/Workbook")||ga.find(e,"/Book")}else{switch(t.type){case"base64":e=mr(ur(e));break;case"binary":e=mr(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e))}hi(e,0),a={content:e}}if(r&&fh(r),t.bookProps&&!t.bookSheets)n={};else{var s=dr?"buffer":"array";if(a&&a.content)n=yh(a.content,t);else if((i=ga.find(e,"PerfectOffice_MAIN"))&&i.content)n=vo.to_workbook(i.content,(t.type=s,t));else{if(!(i=ga.find(e,"NativeContent_MAIN"))||!i.content)throw(i=ga.find(e,"MN0"))&&i.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");n=vo.to_workbook(i.content,(t.type=s,t))}t.bookVBA&&e.FullPaths&&ga.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(n.vbaraw=function(e){var t=ga.utils.cfb_new({root:"R"});return e.FullPaths.forEach((function(r,a){if("/"!==r.slice(-1)&&r.match(/_VBA_PROJECT_CUR/)){var n=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");ga.utils.cfb_add(t,n,e.FileIndex[a].content)}})),ga.write(t)}(e))}var o={};return e.FullPaths&&function(e,t,r){var a=ga.find(e,"/!DocumentSummaryInformation");if(a&&a.size>0)try{var n=Ts(a,Yi,wh);for(var i in n)t[i]=n[i]}catch(e){if(r.WTF)throw e}var s=ga.find(e,"/!SummaryInformation");if(s&&s.size>0)try{var o=Ts(s,Zi,vh);for(var c in o)null==t[c]&&(t[c]=o[c])}catch(e){if(r.WTF)throw e}t.HeadingPairs&&t.TitlesOfParts&&(ds(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}(e,o,t),n.Props=n.Custprops=o,t.bookFiles&&(n.cfb=e),n}var Sh={0:{f:function(e,t){var r={},a=e.l+t;r.r=e.read_shift(4),e.l+=4;var n=e.read_shift(2);e.l+=1;var i=e.read_shift(1);return e.l=a,7&i&&(r.level=7&i),16&i&&(r.hidden=!0),32&i&&(r.hpt=n/20),r}},1:{f:function(e){return[Li(e)]}},2:{f:function(e){return[Li(e),Hi(e),"n"]}},3:{f:function(e){return[Li(e),e.read_shift(1),"e"]}},4:{f:function(e){return[Li(e),e.read_shift(1),"b"]}},5:{f:function(e){return[Li(e),Gi(e),"n"]}},6:{f:function(e){return[Li(e),Mi(e),"str"]}},7:{f:function(e){return[Li(e),e.read_shift(4),"s"]}},8:{f:function(e,t,r){var a=e.l+t,n=Li(e);n.r=r["!row"];var i=[n,Mi(e),"str"];if(r.cellFormula){e.l+=2;var s=nl(e,a-e.l,r);i[3]=Jc(s,0,n,r.supbooks,r)}else e.l=a;return i}},9:{f:function(e,t,r){var a=e.l+t,n=Li(e);n.r=r["!row"];var i=[n,Gi(e),"n"];if(r.cellFormula){e.l+=2;var s=nl(e,a-e.l,r);i[3]=Jc(s,0,n,r.supbooks,r)}else e.l=a;return i}},10:{f:function(e,t,r){var a=e.l+t,n=Li(e);n.r=r["!row"];var i=[n,e.read_shift(1),"b"];if(r.cellFormula){e.l+=2;var s=nl(e,a-e.l,r);i[3]=Jc(s,0,n,r.supbooks,r)}else e.l=a;return i}},11:{f:function(e,t,r){var a=e.l+t,n=Li(e);n.r=r["!row"];var i=[n,e.read_shift(1),"e"];if(r.cellFormula){e.l+=2;var s=nl(e,a-e.l,r);i[3]=Jc(s,0,n,r.supbooks,r)}else e.l=a;return i}},12:{f:function(e){return[Bi(e)]}},13:{f:function(e){return[Bi(e),Hi(e),"n"]}},14:{f:function(e){return[Bi(e),e.read_shift(1),"e"]}},15:{f:function(e){return[Bi(e),e.read_shift(1),"b"]}},16:{f:Pl},17:{f:function(e){return[Bi(e),Mi(e),"str"]}},18:{f:function(e){return[Bi(e),e.read_shift(4),"s"]}},19:{f:Di},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:function(e,t,r){var a=e.l+t;e.l+=4,e.l+=1;var n=e.read_shift(4),i=Ui(e),s=il(e,0,r),o=$i(e);e.l=a;var c={Name:i,Ptg:s};return n<268435455&&(c.Sheet=n),o&&(c.Comment=o),c}},40:{},42:{},43:{f:function(e,t,r){var a={};a.sz=e.read_shift(2)/20;var n=function(e){var t=e.read_shift(1);return e.l++,{fBold:1&t,fItalic:2&t,fUnderline:4&t,fStrikeout:8&t,fOutline:16&t,fShadow:32&t,fCondense:64&t,fExtend:128&t}}(e);switch(n.fItalic&&(a.italic=1),n.fCondense&&(a.condense=1),n.fExtend&&(a.extend=1),n.fShadow&&(a.shadow=1),n.fOutline&&(a.outline=1),n.fStrikeout&&(a.strike=1),700===e.read_shift(2)&&(a.bold=1),e.read_shift(2)){case 1:a.vertAlign="superscript";break;case 2:a.vertAlign="subscript"}var i=e.read_shift(1);0!=i&&(a.underline=i);var s=e.read_shift(1);s>0&&(a.family=s);var o=e.read_shift(1);switch(o>0&&(a.charset=o),e.l++,a.color=function(e){var t={},r=e.read_shift(1)>>>1,a=e.read_shift(1),n=e.read_shift(2,"i"),i=e.read_shift(1),s=e.read_shift(1),o=e.read_shift(1);switch(e.l++,r){case 0:t.auto=1;break;case 1:t.index=a;var c=ts[a];c&&(t.rgb=Ho(c));break;case 2:t.rgb=Ho([i,s,o]);break;case 3:t.theme=a}return 0!=n&&(t.tint=n>0?n/32767:n/32768),t}(e),e.read_shift(1)){case 1:a.scheme="major";break;case 2:a.scheme="minor"}return a.name=Mi(e),a}},44:{f:function(e,t){return[e.read_shift(2),Mi(e)]}},45:{f:ic},46:{f:sc},47:{f:function(e,t){var r=e.l+t,a=e.read_shift(2),n=e.read_shift(2);return e.l=r,{ixfe:a,numFmtId:n}}},48:{},49:{f:function(e){return e.read_shift(4,"i")}},50:{},51:{f:function(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:co},62:{f:function(e){return[Li(e),Di(e),"is"]}},63:{f:function(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=ki(r);var a=e.read_shift(1);return 2&a&&(t.l="1"),8&a&&(t.a="1"),t}},64:{f:function(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:ui,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function(e){var t=e.read_shift(2);return e.l+=28,{RTL:32&t}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function(e,t){var r={},a=e[e.l];return++e.l,r.above=!(64&a),r.left=!(128&a),e.l+=18,r.name=ji(e,t-19),r}},148:{f:Fl,p:16},151:{f:function(){}},152:{},153:{f:function(e,t){var r={},a=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var n=t>8?Mi(e):"";return n.length>0&&(r.CodeName=n),r.autoCompressPictures=!!(65536&a),r.backupFile=!!(64&a),r.checkCompatibility=!!(4096&a),r.date1904=!!(1&a),r.filterPrivacy=!!(8&a),r.hidePivotFieldList=!!(1024&a),r.promptedSolutions=!!(16&a),r.publishItems=!!(2048&a),r.refreshAllConnections=!!(262144&a),r.saveExternalLinkValues=!!(128&a),r.showBorderUnselectedTables=!!(4&a),r.showInkAnnotation=!!(32&a),r.showObjects=["all","placeholders","none"][a>>13&3],r.showPivotChartFilter=!!(32768&a),r.updateLinks=["userSet","never","always"][a>>8&3],r}},154:{},155:{},156:{f:function(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=zi(e,t-8),r.name=Mi(e),r}},157:{},158:{},159:{T:1,f:function(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:Wi},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:Il},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:Mi(e)}}},336:{T:-1},337:{f:function(e){return e.l+=4,0!=e.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:zi},357:{},358:{},359:{},360:{T:1},361:{},362:{f:io},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function(e,t,r){var a=e.l+t,n=Xi(e),i=e.read_shift(1),s=[n];if(s[2]=i,r.cellFormula){var o=al(e,a-e.l,r);s[1]=o}else e.l=a;return s}},427:{f:function(e,t,r){var a=e.l+t,n=[Wi(e,16)];if(r.cellFormula){var i=sl(e,a-e.l,r);n[1]=i,e.l=a}else e.l=a;return n}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function(e){var t={};return Ml.forEach((function(r){t[r]=Gi(e)})),t}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function(e,t){var r=e.l+t,a=Wi(e,16),n=$i(e),i=Mi(e),s=Mi(e),o=Mi(e);e.l=r;var c={rfx:a,relId:n,loc:i,display:o};return s&&(c.Tooltip=s),c}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:zi},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:wc},633:{T:1},634:{T:-1},635:{T:1,f:function(e){var t={};t.iauthor=e.read_shift(4);var r=Wi(e,16);return t.rfx=r.s,t.ref=ki(r.s),e.l+=16,t}},636:{T:-1},637:{f:Ni},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function(e,t){return e.l+=10,{name:Mi(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},xh={6:{f:tl},10:{f:Es},12:{f:Fs},13:{f:Fs},14:{f:Os},15:{f:Os},16:{f:Gi},17:{f:Os},18:{f:Os},19:{f:Fs},20:{f:to},21:{f:to},23:{f:io},24:{f:no},25:{f:Os},26:{},27:{},28:{f:function(e,t,r){return function(e,t,r){if(!(r.biff<8)){var a=e.read_shift(2),n=e.read_shift(2),i=e.read_shift(2),s=e.read_shift(2),o=Ns(e,0,r);return r.biff<8&&e.read_shift(1),[{r:a,c:n},o,s,i]}}(e,0,r)}},29:{},34:{f:Os},35:{f:ro},38:{f:Gi},39:{f:Gi},40:{f:Gi},41:{f:Gi},42:{f:Os},43:{f:Os},47:{f:function(e,t,r){var a={Type:r.biff>=8?e.read_shift(2):0};return a.Type?Uo(e,t-2,a):function(e,t,r,a){var n={key:Fs(e),verificationBytes:Fs(e)};r.password&&(n.verifier=Bo(r.password)),a.valid=n.verificationBytes===n.verifier,a.valid&&(a.insitu=$o(r.password))}(e,r.biff,r,a),a}},49:{f:function(e,t,r){var a={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10}return a.name=Is(e,0,r),a}},51:{f:Fs},60:{},61:{f:function(e){return{Pos:[e.read_shift(2),e.read_shift(2)],Dim:[e.read_shift(2),e.read_shift(2)],Flags:e.read_shift(2),CurTab:e.read_shift(2),FirstTab:e.read_shift(2),Selected:e.read_shift(2),TabRatio:e.read_shift(2)}}},64:{f:Os},65:{f:function(){}},66:{f:Fs},77:{},80:{},81:{},82:{},85:{f:Fs},89:{},90:{},91:{},92:{f:function(e,t,r){if(r.enc)return e.l+=t,"";var a=e.l,n=Ns(e,0,r);return e.read_shift(t+a-e.l),n}},93:{f:function(e,t,r){if(r&&r.biff<8)return function(e,t,r){e.l+=4;var a=e.read_shift(2),n=e.read_shift(2),i=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var s=[];return s.push((oo[a]||ui)(e,t,r)),{cmo:[n,a,i],ft:s}}(e,t,r);var a=qs(e),n=function(e,t){for(var r=e.l+t,a=[];e.l<r;){var n=e.read_shift(2);e.l-=2;try{a.push(Ks[n](e,r-e.l))}catch(t){return e.l=r,a}}return e.l!=r&&(e.l=r),a}(e,t-22,a[1]);return{cmo:a,ft:n}}},94:{},95:{f:Os},96:{},97:{},99:{f:Os},125:{f:co},128:{f:function(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(0!==t[0]&&t[0]--,0!==t[1]&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}},129:{f:function(e,t,r){var a=r&&8==r.biff||2==t?e.read_shift(2):(e.l+=t,0);return{fDialog:16&a,fBelow:64&a,fRight:128&a}}},130:{f:Fs},131:{f:Os},132:{f:Os},133:{f:function(e,t,r){var a=e.read_shift(4),n=3&e.read_shift(1),i=e.read_shift(1);switch(i){case 0:i="Worksheet";break;case 1:i="Macrosheet";break;case 2:i="Chartsheet";break;case 6:i="VBAModule"}var s=Is(e,0,r);return 0===s.length&&(s="Sheet1"),{pos:a,hs:n,dt:i,name:s}}},134:{},140:{f:function(e){var t,r=[0,0];return t=e.read_shift(2),r[0]=Ji[t]||t,t=e.read_shift(2),r[1]=Ji[t]||t,r}},141:{f:Fs},144:{},146:{f:function(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push($s(e));return r}},151:{},152:{},153:{},154:{},155:{},156:{f:Fs},157:{},158:{},160:{f:ho},161:{f:function(e,t){var r={};return t<32||(e.l+=16,r.header=Gi(e),r.footer=Gi(e),e.l+=2),r}},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:function(e,t){for(var r=e.l+t-2,a=e.read_shift(2),n=e.read_shift(2),i=[];e.l<r;)i.push(Hs(e));if(e.l!==r)throw new Error("MulRK read error");var s=e.read_shift(2);if(i.length!=s-n+1)throw new Error("MulRK length mismatch");return{r:a,c:n,C:s,rkrec:i}}},190:{f:function(e,t){for(var r=e.l+t-2,a=e.read_shift(2),n=e.read_shift(2),i=[];e.l<r;)i.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var s=e.read_shift(2);if(i.length!=s-n+1)throw new Error("MulBlank length mismatch");return{r:a,c:n,C:s,ixfe:i}}},193:{f:Es},197:{},198:{},199:{},200:{},201:{},202:{f:Os},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:Fs},220:{},221:{f:Os},222:{},224:{f:function(e,t,r){var a={};return a.ifnt=e.read_shift(2),a.numFmtId=e.read_shift(2),a.flags=e.read_shift(2),a.fStyle=a.flags>>2&1,a.data=function(e,t,r,a){var n={},i=e.read_shift(4),s=e.read_shift(4),o=e.read_shift(4),c=e.read_shift(2);return n.patternType=Qi[o>>26],a.cellStyles?(n.alc=7&i,n.fWrap=i>>3&1,n.alcV=i>>4&7,n.fJustLast=i>>7&1,n.trot=i>>8&255,n.cIndent=i>>16&15,n.fShrinkToFit=i>>20&1,n.iReadOrder=i>>22&2,n.fAtrNum=i>>26&1,n.fAtrFnt=i>>27&1,n.fAtrAlc=i>>28&1,n.fAtrBdr=i>>29&1,n.fAtrPat=i>>30&1,n.fAtrProt=i>>31&1,n.dgLeft=15&s,n.dgRight=s>>4&15,n.dgTop=s>>8&15,n.dgBottom=s>>12&15,n.icvLeft=s>>16&127,n.icvRight=s>>23&127,n.grbitDiag=s>>30&3,n.icvTop=127&o,n.icvBottom=o>>7&127,n.icvDiag=o>>14&127,n.dgDiag=o>>21&15,n.icvFore=127&c,n.icvBack=c>>7&127,n.fsxButton=c>>14&1,n):n}(e,0,a.fStyle,r),a}},225:{f:function(e,t){return 0===t||e.read_shift(2),1200}},226:{f:Es},227:{},229:{f:function(e,t){for(var r=[],a=e.read_shift(2);a--;)r.push(Xs(e));return r}},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:function(e,t){for(var r=e.l+t,a=e.read_shift(4),n=e.read_shift(4),i=[],s=0;s!=n&&e.l<r;++s)i.push(Ms(e));return i.Count=a,i.Unique=n,i}},253:{f:function(e){var t=Us(e);return t.isst=e.read_shift(4),t}},255:{f:function(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:Ps},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:Os},353:{f:Es},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:function(e,t,r){var a=e.l+t,n=e.read_shift(2),i=e.read_shift(2);if(r.sbcch=i,1025==i||14849==i)return[i,n];if(i<1||i>255)throw new Error("Unexpected SupBook type: "+i);for(var s=Rs(e,i),o=[];a>e.l;)o.push(Ds(e));return[i,n,s,o]}},431:{f:Os},432:{},433:{},434:{},437:{},438:{f:function(e,t,r){var a=e.l,n="";try{e.l+=4;var i=(r.lastobj||{cmo:[0,0]}).cmo[1];-1==[0,5,7,11,12,14].indexOf(i)?e.l+=6:function(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}(e);var s=e.read_shift(2);e.read_shift(2),Fs(e);var o=e.read_shift(2);e.l+=o;for(var c=1;c<e.lens.length-1;++c){if(e.l-a!=e.lens[c])throw new Error("TxO: bad continue record");var l=e[e.l];if((n+=Rs(e,e.lens[c+1]-e.lens[c]-1)).length>=(l?s:2*s))break}if(n.length!==s&&n.length!==2*s)throw new Error("cchText: "+s+" != "+n.length);return e.l=a+t,{t:n}}catch(r){return e.l=a+t,{t:n}}}},439:{f:Os},440:{f:function(e,t){var r=Xs(e);e.l+=16;var a=function(e,t){var r=e.l+t,a=e.read_shift(4);if(2!==a)throw new Error("Unrecognized streamVersion: "+a);var n=e.read_shift(2);e.l+=2;var i,s,o,c,l,h,u="";16&n&&(i=Bs(e,e.l)),128&n&&(s=Bs(e,e.l)),257&~n||(o=Bs(e,e.l)),1==(257&n)&&(c=Ls(e,e.l)),8&n&&(u=Bs(e,e.l)),32&n&&(l=e.read_shift(16)),64&n&&(h=bs(e)),e.l=r;var d=s||o||c||"";d&&u&&(d+="#"+u),d||(d="#"+u),2&n&&"/"==d.charAt(0)&&"/"!=d.charAt(1)&&(d="file://"+d);var f={Target:d};return l&&(f.guid=l),h&&(f.time=h),i&&(f.Tooltip=i),f}(e,t-24);return[r,a]}},441:{},442:{f:Ds},443:{},444:{f:Fs},445:{},446:{},448:{f:Es},449:{f:function(e){return e.read_shift(2),e.read_shift(4)},r:2},450:{f:Es},512:{f:Qs},513:{f:lo},515:{f:function(e,t,r){r.biffguess&&2==r.biff&&(r.biff=5);var a=Us(e),n=Gi(e);return a.val=n,a}},516:{f:function(e,t,r){r.biffguess&&2==r.biff&&(r.biff=5),e.l;var a=Us(e);2==r.biff&&e.l++;var n=Ds(e,e.l,r);return a.val=n,a}},517:{f:eo},519:{f:uo},520:{f:function(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var a=e.read_shift(1);return e.l+=3,7&a&&(t.level=7&a),32&a&&(t.hidden=!0),64&a&&(t.hpt=r/20),t}},523:{},545:{f:so},549:{f:Zs},566:{},574:{f:function(e,t,r){return r&&r.biff>=2&&r.biff<5?{}:{RTL:64&e.read_shift(2)}}},638:{f:function(e){var t=e.read_shift(2),r=e.read_shift(2),a=Hs(e);return{r:t,c:r,ixfe:a[0],rknum:a[1]}}},659:{},1048:{},1054:{f:function(e,t,r){return[e.read_shift(2),Ns(e,0,r)]}},1084:{},1212:{f:function(e,t,r){var a=Ws(e);e.l++;var n=e.read_shift(1);return[el(e,t-=8,r),n,a]}},2048:{f:function(e,t){e.read_shift(2);var r=Xs(e),a=e.read_shift((t-10)/2,"dbcs-cont");return[r,a=a.replace(wr,"")]}},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:Ys},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:Es},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:function(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t},r:12},2173:{f:function(e,t){e.l,e.l+=2;var r=e.read_shift(2);e.l+=2;for(var a=e.read_shift(2),n=[];a-- >0;)n.push(yc(e,e.l));return{ixfe:r,ext:n}},r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:Os,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:function(e,t,r){if(!(r.biff<8)){var a=e.read_shift(2),n=e.read_shift(2);return[Rs(e,a,r),Rs(e,n,r)]}e.l+=t},r:12},2197:{},2198:{f:function(e,t,r){var a=e.l+t;if(124226!==e.read_shift(4))if(r.cellStyles){var n,i=e.slice(e.l);e.l=a;try{n=Ga(i,{type:"array"})}catch(e){return}var s=za(n,"theme/theme/theme1.xml",!0);if(s)return gc(s,r)}else e.l=a},r:12},2199:{},2200:{},2201:{},2202:{f:function(e){return[0!==e.read_shift(4),0!==e.read_shift(4),e.read_shift(4)]},r:12},2203:{f:Es},2204:{},2205:{},2206:{},2207:{},2211:{f:function(e){var t=function(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}(e);if(2211!=t.type)throw new Error("Invalid Future Record "+t.type);return 0!==e.read_shift(4)}},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:Fs},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:function(e,t,r){var a={area:!1};if(5!=r.biff)return e.l+=t,a;var n=e.read_shift(1);return e.l+=3,16&n&&(a.area=!0),a}},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:function(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push($s(e));return r}},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:Qs},1:{},2:{f:function(e){var t=Us(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}},3:{f:function(e){var t=Us(e);++e.l;var r=Gi(e);return t.t="n",t.val=r,t}},4:{f:function(e,t,r){r.biffguess&&5==r.biff&&(r.biff=2);var a=Us(e);++e.l;var n=Ns(e,0,r);return a.t="str",a.val=n,a}},5:{f:eo},7:{f:function(e){var t=e.read_shift(1);return 0===t?(e.l++,""):e.read_shift(t,"sbcs-cont")}},8:{},9:{f:Ys},11:{},22:{f:Fs},30:{f:Js},31:{},32:{},33:{f:so},36:{},37:{f:Zs},50:{f:function(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}},62:{},52:{},67:{},68:{f:Fs},69:{},86:{},126:{},127:{f:function(e){var t=e.read_shift(2),r=e.read_shift(2),a=e.read_shift(4),n={fmt:t,env:r,len:a,data:e.slice(e.l,e.l+a)};return e.l+=a,n}},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:function(e,t,r){var a=e.l+t,n=Us(e),i=e.read_shift(2),s=Rs(e,i,r);return e.l=a,n.t="str",n.val=s,n}},223:{},234:{},354:{},421:{},518:{f:tl},521:{f:Ys},536:{f:no},547:{f:ro},561:{},579:{},1030:{f:tl},1033:{f:Ys},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function kh(e,t,r,a){var n=t;if(!isNaN(n)){var i=a||(r||[]).length||0,s=e.next(4);s.write_shift(2,n),s.write_shift(2,i),i>0&&Yn(r)&&e.push(r)}}function Ch(e,t){var r=t||{};var a=r.dense?[]:{},n=(e=e.replace(/<!--.*?-->/g,"")).match(/<table/i);if(!n)throw new Error("Invalid HTML: could not find <table>");var i=e.match(/<\/table/i),s=n.index,o=i&&i.index||e.length,c=Na(e.slice(s,o),/(:?<tr[^>]*>)/i,"<tr>"),l=-1,h=0,u=0,d=0,f={s:{r:1e7,c:1e7},e:{r:0,c:0}},p=[];for(s=0;s<c.length;++s){var g=c[s].trim(),m=g.slice(0,3).toLowerCase();if("<tr"!=m){if("<td"==m||"<th"==m){var b=g.split(/<\/t[dh]>/i);for(o=0;o<b.length;++o){var y=b[o].trim();if(y.match(/<t[dh]/i)){for(var v=y,w=0;"<"==v.charAt(0)&&(w=v.indexOf(">"))>-1;)v=v.slice(w+1);for(var A=0;A<p.length;++A){var S=p[A];S.s.c==h&&S.s.r<l&&l<=S.e.r&&(h=S.e.c+1,A=-1)}var x=en(y.slice(0,y.indexOf(">")));d=x.colspan?+x.colspan:1,((u=+x.rowspan)>1||d>1)&&p.push({s:{r:l,c:h},e:{r:l+(u||1)-1,c:h+d-1}});var k=x.t||x["data-t"]||"";if(v.length)if(v=yn(v),f.s.r>l&&(f.s.r=l),f.e.r<l&&(f.e.r=l),f.s.c>h&&(f.s.c=h),f.e.c<h&&(f.e.c=h),v.length){var C={t:"s",v};r.raw||!v.trim().length||"s"==k||("TRUE"===v?C={t:"b",v:!0}:"FALSE"===v?C={t:"b",v:!1}:isNaN(Ma(v))?isNaN(Da(v).getDate())||(C={t:"d",v:Oa(v)},r.cellDates||(C={t:"n",v:wa(C.v)}),C.z=r.dateNF||Pr[14]):C={t:"n",v:Ma(v)}),r.dense?(a[l]||(a[l]=[]),a[l][h]=C):a[ki({r:l,c:h})]=C,h+=d}else h+=d;else h+=d}}}}else{if(++l,r.sheetRows&&r.sheetRows<=l){--l;break}h=0}}return a["!ref"]=_i(f),p.length&&(a["!merges"]=p),a}function _h(e,t,r,a){for(var n=e["!merges"]||[],i=[],s=t.s.c;s<=t.e.c;++s){for(var o=0,c=0,l=0;l<n.length;++l)if(!(n[l].s.r>r||n[l].s.c>s||n[l].e.r<r||n[l].e.c<s)){if(n[l].s.r<r||n[l].s.c<s){o=-1;break}o=n[l].e.r-n[l].s.r+1,c=n[l].e.c-n[l].s.c+1;break}if(!(o<0)){var h=ki({r,c:s}),u=a.dense?(e[r]||[])[s]:e[h],d=u&&null!=u.v&&(u.h||cn(u.w||(Oi(u),u.w)||""))||"",f={};o>1&&(f.rowspan=o),c>1&&(f.colspan=c),a.editable?d='<span contenteditable="true">'+d+"</span>":u&&(f["data-t"]=u&&u.t||"z",null!=u.v&&(f["data-v"]=u.v),null!=u.z&&(f["data-z"]=u.z),u.l&&"#"!=(u.l.Target||"#").charAt(0)&&(d='<a href="'+u.l.Target+'">'+d+"</a>")),f.id=(a.id||"sjs")+"-"+h,i.push(Cn("td",d,f))}}return"<tr>"+i.join("")+"</tr>"}var Th='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',Eh="</body></html>";function Oh(e,t,r){return[].join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function Fh(e,t){var r=t||{},a=null!=r.header?r.header:Th,n=null!=r.footer?r.footer:Eh,i=[a],s=Ci(e["!ref"]);r.dense=Array.isArray(e),i.push(Oh(0,0,r));for(var o=s.s.r;o<=s.e.r;++o)i.push(_h(e,s,o,r));return i.push("</table>"+n),i.join("")}function Ph(e,t,r){var a=r||{};var n=0,i=0;if(null!=a.origin)if("number"==typeof a.origin)n=a.origin;else{var s="string"==typeof a.origin?xi(a.origin):a.origin;n=s.r,i=s.c}var o=t.getElementsByTagName("tr"),c=Math.min(a.sheetRows||1e7,o.length),l={s:{r:0,c:0},e:{r:n,c:i}};if(e["!ref"]){var h=Ci(e["!ref"]);l.s.r=Math.min(l.s.r,h.s.r),l.s.c=Math.min(l.s.c,h.s.c),l.e.r=Math.max(l.e.r,h.e.r),l.e.c=Math.max(l.e.c,h.e.c),-1==n&&(l.e.r=n=h.e.r+1)}var u=[],d=0,f=e["!rows"]||(e["!rows"]=[]),p=0,g=0,m=0,b=0,y=0,v=0;for(e["!cols"]||(e["!cols"]=[]);p<o.length&&g<c;++p){var w=o[p];if(Mh(w)){if(a.display)continue;f[g]={hidden:!0}}var A=w.children;for(m=b=0;m<A.length;++m){var S=A[m];if(!a.display||!Mh(S)){var x=S.hasAttribute("data-v")?S.getAttribute("data-v"):S.hasAttribute("v")?S.getAttribute("v"):yn(S.innerHTML),k=S.getAttribute("data-z")||S.getAttribute("z");for(d=0;d<u.length;++d){var C=u[d];C.s.c==b+i&&C.s.r<g+n&&g+n<=C.e.r&&(b=C.e.c+1-i,d=-1)}v=+S.getAttribute("colspan")||1,((y=+S.getAttribute("rowspan")||1)>1||v>1)&&u.push({s:{r:g+n,c:b+i},e:{r:g+n+(y||1)-1,c:b+i+(v||1)-1}});var _={t:"s",v:x},T=S.getAttribute("data-t")||S.getAttribute("t")||"";null!=x&&(0==x.length?_.t=T||"z":a.raw||0==x.trim().length||"s"==T||("TRUE"===x?_={t:"b",v:!0}:"FALSE"===x?_={t:"b",v:!1}:isNaN(Ma(x))?isNaN(Da(x).getDate())||(_={t:"d",v:Oa(x)},a.cellDates||(_={t:"n",v:wa(_.v)}),_.z=a.dateNF||Pr[14]):_={t:"n",v:Ma(x)})),void 0===_.z&&null!=k&&(_.z=k);var E="",O=S.getElementsByTagName("A");if(O&&O.length)for(var F=0;F<O.length&&(!O[F].hasAttribute("href")||"#"==(E=O[F].getAttribute("href")).charAt(0));++F);E&&"#"!=E.charAt(0)&&(_.l={Target:E}),a.dense?(e[g+n]||(e[g+n]=[]),e[g+n][b+i]=_):e[ki({c:b+i,r:g+n})]=_,l.e.c<b+i&&(l.e.c=b+i),b+=v}}++g}return u.length&&(e["!merges"]=(e["!merges"]||[]).concat(u)),l.e.r=Math.max(l.e.r,g-1+n),e["!ref"]=_i(l),g>=c&&(e["!fullref"]=_i((l.e.r=o.length-p+g-1+n,l))),e}function Ih(e,t){return Ph((t||{}).dense?[]:{},e,t)}function Mh(e){var t="",r=function(e){return e.ownerDocument.defaultView&&"function"==typeof e.ownerDocument.defaultView.getComputedStyle?e.ownerDocument.defaultView.getComputedStyle:"function"==typeof getComputedStyle?getComputedStyle:null}(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),"none"===t}var Rh={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function Dh(e,t){var r=t||{};var a,n,i,s,o,c,l,h,u=_n(e),d=[],f={name:""},p="",g=0,m={},b=[],y=r.dense?[]:{},v={value:""},w="",A=0,S=[],x=-1,k=-1,C={s:{r:1e6,c:1e7},e:{r:0,c:0}},_=0,T={},E=[],O={},F=[],P=1,I=1,M=[],R={Names:[]},D={},N=["",""],L=[],B={},j="",$=0,U=!1,z=!1,H=0;for(Tn.lastIndex=0,u=u.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");o=Tn.exec(u);)switch(o[3]=o[3].replace(/_.*$/,"")){case"table":case"工作表":"/"===o[1]?(C.e.c>=C.s.c&&C.e.r>=C.s.r?y["!ref"]=_i(C):y["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=C.e.r&&(y["!fullref"]=y["!ref"],C.e.r=r.sheetRows-1,y["!ref"]=_i(C)),E.length&&(y["!merges"]=E),F.length&&(y["!rows"]=F),i.name=i["名称"]||i.name,"undefined"!=typeof JSON&&JSON.stringify(i),b.push(i.name),m[i.name]=y,z=!1):"/"!==o[0].charAt(o[0].length-2)&&(i=en(o[0],!1),x=k=-1,C.s.r=C.s.c=1e7,C.e.r=C.e.c=0,y=r.dense?[]:{},E=[],F=[],z=!0);break;case"table-row-group":"/"===o[1]?--_:++_;break;case"table-row":case"行":if("/"===o[1]){x+=P,P=1;break}if((s=en(o[0],!1))["行号"]?x=s["行号"]-1:-1==x&&(x=0),(P=+s["number-rows-repeated"]||1)<10)for(H=0;H<P;++H)_>0&&(F[x+H]={level:_});k=-1;break;case"covered-table-cell":"/"!==o[1]&&++k,r.sheetStubs&&(r.dense?(y[x]||(y[x]=[]),y[x][k]={t:"z"}):y[ki({r:x,c:k})]={t:"z"}),w="",S=[];break;case"table-cell":case"数据":if("/"===o[0].charAt(o[0].length-2))++k,v=en(o[0],!1),I=parseInt(v["number-columns-repeated"]||"1",10),c={t:"z",v:null},v.formula&&0!=r.cellFormula&&(c.f=hl(nn(v.formula))),"string"==(v["数据类型"]||v["value-type"])&&(c.t="s",c.v=nn(v["string-value"]||""),r.dense?(y[x]||(y[x]=[]),y[x][k]=c):y[ki({r:x,c:k})]=c),k+=I-1;else if("/"!==o[1]){w="",A=0,S=[],I=1;var X=P?x+P-1:x;if(++k>C.e.c&&(C.e.c=k),k<C.s.c&&(C.s.c=k),x<C.s.r&&(C.s.r=x),X>C.e.r&&(C.e.r=X),L=[],B={},c={t:(v=en(o[0],!1))["数据类型"]||v["value-type"],v:null},r.cellFormula)if(v.formula&&(v.formula=nn(v.formula)),v["number-matrix-columns-spanned"]&&v["number-matrix-rows-spanned"]&&(O={s:{r:x,c:k},e:{r:x+(parseInt(v["number-matrix-rows-spanned"],10)||0)-1,c:k+(parseInt(v["number-matrix-columns-spanned"],10)||0)-1}},c.F=_i(O),M.push([O,c.F])),v.formula)c.f=hl(v.formula);else for(H=0;H<M.length;++H)x>=M[H][0].s.r&&x<=M[H][0].e.r&&k>=M[H][0].s.c&&k<=M[H][0].e.c&&(c.F=M[H][1]);switch((v["number-columns-spanned"]||v["number-rows-spanned"])&&(O={s:{r:x,c:k},e:{r:x+(parseInt(v["number-rows-spanned"],10)||0)-1,c:k+(parseInt(v["number-columns-spanned"],10)||0)-1}},E.push(O)),v["number-columns-repeated"]&&(I=parseInt(v["number-columns-repeated"],10)),c.t){case"boolean":c.t="b",c.v=hn(v["boolean-value"]);break;case"float":case"percentage":case"currency":c.t="n",c.v=parseFloat(v.value);break;case"date":c.t="d",c.v=Oa(v["date-value"]),r.cellDates||(c.t="n",c.v=wa(c.v)),c.z="m/d/yy";break;case"time":c.t="n",c.v=Ca(v["time-value"])/86400,r.cellDates&&(c.t="d",c.v=ka(c.v)),c.z="HH:MM:SS";break;case"number":c.t="n",c.v=parseFloat(v["数据数值"]);break;default:if("string"!==c.t&&"text"!==c.t&&c.t)throw new Error("Unsupported value type "+c.t);c.t="s",null!=v["string-value"]&&(w=nn(v["string-value"]),S=[])}}else{if(U=!1,"s"===c.t&&(c.v=w||"",S.length&&(c.R=S),U=0==A),D.Target&&(c.l=D),L.length>0&&(c.c=L,L=[]),w&&!1!==r.cellText&&(c.w=w),U&&(c.t="z",delete c.v),(!U||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=x))for(var W=0;W<P;++W){if(I=parseInt(v["number-columns-repeated"]||"1",10),r.dense)for(y[x+W]||(y[x+W]=[]),y[x+W][k]=0==W?c:Pa(c);--I>0;)y[x+W][k+I]=Pa(c);else for(y[ki({r:x+W,c:k})]=c;--I>0;)y[ki({r:x+W,c:k+I})]=Pa(c);C.e.c<=k&&(C.e.c=k)}k+=(I=parseInt(v["number-columns-repeated"]||"1",10))-1,I=0,c={},w="",S=[]}D={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if("/"===o[1]){if((a=d.pop())[0]!==o[3])throw"Bad state: "+a}else"/"!==o[0].charAt(o[0].length-2)&&d.push([o[3],!0]);break;case"annotation":if("/"===o[1]){if((a=d.pop())[0]!==o[3])throw"Bad state: "+a;B.t=w,S.length&&(B.R=S),B.a=j,L.push(B)}else"/"!==o[0].charAt(o[0].length-2)&&d.push([o[3],!1]);j="",$=0,w="",A=0,S=[];break;case"creator":"/"===o[1]?j=u.slice($,o.index):$=o.index+o[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if("/"===o[1]){if((a=d.pop())[0]!==o[3])throw"Bad state: "+a}else"/"!==o[0].charAt(o[0].length-2)&&d.push([o[3],!1]);w="",A=0,S=[];break;case"scientific-number":case"currency-symbol":case"currency-style":case"script":case"libraries":case"automatic-styles":case"default-style":case"page-layout":case"style":case"map":case"font-face":case"paragraph-properties":case"table-properties":case"table-column-properties":case"table-row-properties":case"table-cell-properties":case"fraction":case"boolean-style":case"boolean":case"text-style":case"text-content":case"text-properties":case"embedded-text":case"body":case"电子表格":case"forms":case"table-column":case"table-header-rows":case"table-rows":case"table-column-group":case"table-header-columns":case"table-columns":case"null-date":case"graphic-properties":case"calculation-settings":case"named-expressions":case"label-range":case"label-ranges":case"named-expression":case"sort":case"sort-by":case"sort-groups":case"tab":case"line-break":case"span":case"s":case"date":case"object":case"title":case"标题":case"desc":case"binary-data":case"table-source":case"scenario":case"iteration":case"content-validations":case"content-validation":case"help-message":case"error-message":case"database-ranges":case"filter":case"filter-and":case"filter-or":case"filter-condition":case"list-level-style-bullet":case"list-level-style-number":case"list-level-properties":case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":case"event-listener":case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":case"config-item":case"page-number":case"page-count":case"time":case"cell-range-source":case"detective":case"operation":case"highlighted-range":case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":case"rect":case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":case"properties":case"property":case"table-protection":case"data-pilot-grand-total":case"office-document-common-attrs":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if("/"===o[1]){if(T[f.name]=p,(a=d.pop())[0]!==o[3])throw"Bad state: "+a}else"/"!==o[0].charAt(o[0].length-2)&&(p="",f=en(o[0],!1),d.push([o[3],!0]));break;case"number":case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(d[d.length-1][0]){case"time-style":case"date-style":n=en(o[0],!1),p+=Rh[o[3]]["long"===n.style?1:0]}break;case"text":if("/>"===o[0].slice(-2))break;if("/"===o[1])switch(d[d.length-1][0]){case"number-style":case"date-style":case"time-style":p+=u.slice(g,o.index)}else g=o.index+o[0].length;break;case"named-range":N=ul((n=en(o[0],!1))["cell-range-address"]);var G={Name:n.name,Ref:N[0]+"!"+N[1]};z&&(G.Sheet=b.length),R.Names.push(G);break;case"p":case"文本串":if(["master-styles"].indexOf(d[d.length-1][0])>-1)break;if("/"!==o[1]||v&&v["string-value"])en(o[0],!1),A=o.index+o[0].length;else{var q=(l=u.slice(A,o.index),h=void 0,h=l.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,(function(e,t){return Array(parseInt(t,10)+1).join(" ")})).replace(/<text:tab[^>]*\/>/g,"\t").replace(/<text:line-break\/>/g,"\n"),[nn(h.replace(/<[^>]*>/g,""))]);w=(w.length>0?w+"\n":"")+q[0]}break;case"database-range":if("/"===o[1])break;try{m[(N=ul(en(o[0])["target-range-address"]))[0]]["!autofilter"]={ref:N[1]}}catch(e){}break;case"a":if("/"!==o[1]){if(!(D=en(o[0],!1)).href)break;D.Target=nn(D.href),delete D.href,"#"==D.Target.charAt(0)&&D.Target.indexOf(".")>-1?(N=ul(D.Target.slice(1)),D.Target="#"+N[0]+"!"+N[1]):D.Target.match(/^\.\.[\\\/]/)&&(D.Target=D.Target.slice(3))}break;default:switch(o[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(r.WTF)throw new Error(o)}}var V={Sheets:m,SheetNames:b,Workbook:R};return r.bookSheets&&delete V.Sheets,V}function Nh(e,t){t=t||{},ja(e,"META-INF/manifest.xml")&&function(e,t){for(var r,a,n=_n(e);r=Tn.exec(n);)switch(r[3]){case"manifest":break;case"file-entry":if("/"==(a=en(r[0],!1)).path&&"application/vnd.oasis.opendocument.spreadsheet"!==a.type)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw r}}(Ua(e,"META-INF/manifest.xml"),t);var r=za(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var a=Dh(gn(r),t);return ja(e,"meta.xml")&&(a.Props=hs(Ua(e,"meta.xml"))),a}function Lh(e,t){return Dh(e,t)}function Bh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function jh(e){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(e):gn(br(e))}function $h(e){var t=e.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(t),a=0;return e.forEach((function(e){r.set(e,a),a+=e.length})),r}function Uh(e){return 16843009*((e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135)>>>24}function zh(e,t){var r=t?t[0]:0,a=127&e[r];e:if(e[r++]>=128){if(a|=(127&e[r])<<7,e[r++]<128)break e;if(a|=(127&e[r])<<14,e[r++]<128)break e;if(a|=(127&e[r])<<21,e[r++]<128)break e;if(a+=(127&e[r])*Math.pow(2,28),++r,e[r++]<128)break e;if(a+=(127&e[r])*Math.pow(2,35),++r,e[r++]<128)break e;if(a+=(127&e[r])*Math.pow(2,42),++r,e[r++]<128)break e}return t&&(t[0]=r),a}function Hh(e){var t=0,r=127&e[t];e:if(e[t++]>=128){if(r|=(127&e[t])<<7,e[t++]<128)break e;if(r|=(127&e[t])<<14,e[t++]<128)break e;if(r|=(127&e[t])<<21,e[t++]<128)break e;r|=(127&e[t])<<28}return r}function Xh(e){for(var t=[],r=[0];r[0]<e.length;){var a,n=r[0],i=zh(e,r),s=7&i,o=0;if(0==(i=Math.floor(i/8)))break;switch(s){case 0:for(var c=r[0];e[r[0]++]>=128;);a=e.slice(c,r[0]);break;case 5:o=4,a=e.slice(r[0],r[0]+o),r[0]+=o;break;case 1:o=8,a=e.slice(r[0],r[0]+o),r[0]+=o;break;case 2:o=zh(e,r),a=e.slice(r[0],r[0]+o),r[0]+=o;break;default:throw new Error("PB Type ".concat(s," for Field ").concat(i," at offset ").concat(n))}var l={data:a,type:s};null==t[i]?t[i]=[l]:t[i].push(l)}return t}function Wh(e,t){return(null==e?void 0:e.map((function(e){return t(e.data)})))||[]}function Gh(e){for(var t,r=[],a=[0];a[0]<e.length;){var n=zh(e,a),i=Xh(e.slice(a[0],a[0]+n));a[0]+=n;var s={id:Hh(i[1][0].data),messages:[]};i[2].forEach((function(t){var r=Xh(t.data),n=Hh(r[3][0].data);s.messages.push({meta:r,data:e.slice(a[0],a[0]+n)}),a[0]+=n})),(null==(t=i[3])?void 0:t[0])&&(s.merge=Hh(i[3][0].data)>>>0>0),r.push(s)}return r}function qh(e,t){if(0!=e)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],a=zh(t,r),n=[];r[0]<t.length;){var i=3&t[r[0]];if(0!=i){var s=0,o=0;if(1==i?(o=4+(t[r[0]]>>2&7),s=(224&t[r[0]++])<<3,s|=t[r[0]++]):(o=1+(t[r[0]++]>>2),2==i?(s=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(s=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),n=[$h(n)],0==s)throw new Error("Invalid offset 0");if(s>n[0].length)throw new Error("Invalid offset beyond length");if(o>=s)for(n.push(n[0].slice(-s)),o-=s;o>=n[n.length-1].length;)n.push(n[n.length-1]),o-=n[n.length-1].length;n.push(n[0].slice(-s,-s+o))}else{var c=t[r[0]++]>>2;if(c<60)++c;else{var l=c-59;c=t[r[0]],l>1&&(c|=t[r[0]+1]<<8),l>2&&(c|=t[r[0]+2]<<16),l>3&&(c|=t[r[0]+3]<<24),c>>>=0,c++,r[0]+=l}n.push(t.slice(r[0],r[0]+c)),r[0]+=c}}var h=$h(n);if(h.length!=a)throw new Error("Unexpected length: ".concat(h.length," != ").concat(a));return h}function Vh(e){for(var t=[],r=0;r<e.length;){var a=e[r++],n=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(qh(a,e.slice(r,r+n))),r+=n}if(r!==e.length)throw new Error("data is not a valid framed stream!");return $h(t)}function Kh(e,t,r){var a,n=Bh(e),i=n.getUint32(8,!0),s=12,o=-1,c=-1,l=NaN,h=NaN,u=new Date(2001,0,1);switch(1&i&&(l=function(e,t){for(var r=(127&e[t+15])<<7|e[t+14]>>1,a=1&e[t+14],n=t+13;n>=t;--n)a=256*a+e[n];return(128&e[t+15]?-a:a)*Math.pow(10,r-6176)}(e,s),s+=16),2&i&&(h=n.getFloat64(s,!0),s+=8),4&i&&(u.setTime(u.getTime()+1e3*n.getFloat64(s,!0)),s+=8),8&i&&(c=n.getUint32(s,!0),s+=4),16&i&&(o=n.getUint32(s,!0),s+=4),e[1]){case 0:break;case 2:case 10:a={t:"n",v:l};break;case 3:a={t:"s",v:t[c]};break;case 5:a={t:"d",v:u};break;case 6:a={t:"b",v:h>0};break;case 7:a={t:"n",v:h/86400};break;case 8:a={t:"e",v:0};break;case 9:if(!(o>-1))throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(31&i," : ").concat(e.slice(0,4)));a={t:"s",v:r[o]};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(31&i," : ").concat(e.slice(0,4)))}return a}function Yh(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return function(e,t,r,a){var n,i=Bh(e),s=i.getUint32(4,!0),o=(a>1?12:8)+4*Uh(s&(a>1?3470:398)),c=-1,l=-1,h=NaN,u=new Date(2001,0,1);switch(512&s&&(c=i.getUint32(o,!0),o+=4),o+=4*Uh(s&(a>1?12288:4096)),16&s&&(l=i.getUint32(o,!0),o+=4),32&s&&(h=i.getFloat64(o,!0),o+=8),64&s&&(u.setTime(u.getTime()+1e3*i.getFloat64(o,!0)),o+=8),e[2]){case 0:break;case 2:n={t:"n",v:h};break;case 3:n={t:"s",v:t[l]};break;case 5:n={t:"d",v:u};break;case 6:n={t:"b",v:h>0};break;case 7:n={t:"n",v:h/86400};break;case 8:n={t:"e",v:0};break;case 9:if(c>-1)n={t:"s",v:r[c]};else if(l>-1)n={t:"s",v:t[l]};else{if(isNaN(h))throw new Error("Unsupported cell type ".concat(e.slice(0,4)));n={t:"n",v:h}}break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return n}(e,t,r,e[0]);case 5:return Kh(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function Zh(e){return zh(Xh(e)[1][0].data)}function Jh(e,t){var r=Xh(t.data),a=Hh(r[1][0].data),n=r[3],i=[];return(n||[]).forEach((function(t){var r=Xh(t.data),n=Hh(r[1][0].data)>>>0;switch(a){case 1:i[n]=jh(r[3][0].data);break;case 8:var s=Xh(e[Zh(r[9][0].data)][0].data),o=e[Zh(s[1][0].data)][0],c=Hh(o.meta[1][0].data);if(2001!=c)throw new Error("2000 unexpected reference to ".concat(c));var l=Xh(o.data);i[n]=l[3].map((function(e){return jh(e.data)})).join("")}})),i}function Qh(e,t){var r,a=Xh(t.data),n=(null==(r=null==a?void 0:a[7])?void 0:r[0])?Hh(a[7][0].data)>>>0>0?1:0:-1,i=Wh(a[5],(function(e){return function(e,t){var r,a,n,i,s,o,c,l,h,u,d,f,p,g,m,b,y=Xh(e),v=Hh(y[1][0].data)>>>0,w=Hh(y[2][0].data)>>>0,A=(null==(a=null==(r=y[8])?void 0:r[0])?void 0:a.data)&&Hh(y[8][0].data)>0||!1;if((null==(i=null==(n=y[7])?void 0:n[0])?void 0:i.data)&&0!=t)m=null==(o=null==(s=y[7])?void 0:s[0])?void 0:o.data,b=null==(l=null==(c=y[6])?void 0:c[0])?void 0:l.data;else{if(!(null==(u=null==(h=y[4])?void 0:h[0])?void 0:u.data)||1==t)throw"NUMBERS Tile missing ".concat(t," cell storage");m=null==(f=null==(d=y[4])?void 0:d[0])?void 0:f.data,b=null==(g=null==(p=y[3])?void 0:p[0])?void 0:g.data}for(var S=A?4:1,x=Bh(m),k=[],C=0;C<m.length/2;++C){var _=x.getUint16(2*C,!0);_<65535&&k.push([C,_])}if(k.length!=w)throw"Expected ".concat(w," cells, found ").concat(k.length);var T=[];for(C=0;C<k.length-1;++C)T[k[C][0]]=b.subarray(k[C][1]*S,k[C+1][1]*S);return k.length>=1&&(T[k[k.length-1][0]]=b.subarray(k[k.length-1][1]*S)),{R:v,cells:T}}(e,n)}));return{nrows:Hh(a[4][0].data)>>>0,data:i.reduce((function(e,t){return e[t.R]||(e[t.R]=[]),t.cells.forEach((function(r,a){if(e[t.R][a])throw new Error("Duplicate cell r=".concat(t.R," c=").concat(a));e[t.R][a]=r})),e}),[])}}function eu(e,t){var r={"!ref":"A1"},a=e[Zh(Xh(t.data)[2][0].data)],n=Hh(a[0].meta[1][0].data);if(6001!=n)throw new Error("6000 unexpected reference to ".concat(n));return function(e,t,r){var a,n=Xh(t.data),i={s:{r:0,c:0},e:{r:0,c:0}};if(i.e.r=(Hh(n[6][0].data)>>>0)-1,i.e.r<0)throw new Error("Invalid row varint ".concat(n[6][0].data));if(i.e.c=(Hh(n[7][0].data)>>>0)-1,i.e.c<0)throw new Error("Invalid col varint ".concat(n[7][0].data));r["!ref"]=_i(i);var s=Xh(n[4][0].data),o=Jh(e,e[Zh(s[4][0].data)][0]),c=(null==(a=s[17])?void 0:a[0])?Jh(e,e[Zh(s[17][0].data)][0]):[],l=Xh(s[3][0].data),h=0;l[1].forEach((function(t){var a=Xh(t.data),n=e[Zh(a[2][0].data)][0],i=Hh(n.meta[1][0].data);if(6002!=i)throw new Error("6001 unexpected reference to ".concat(i));var s=Qh(0,n);s.data.forEach((function(e,t){e.forEach((function(e,a){var n=ki({r:h+t,c:a}),i=Yh(e,o,c);i&&(r[n]=i)}))})),h+=s.nrows}))}(e,a[0],r),r}function tu(e,t){var r={SheetNames:[],Sheets:{}};if(Wh(Xh(t.data)[1],Zh).forEach((function(t){e[t].forEach((function(t){if(2==Hh(t.meta[1][0].data)){var a=function(e,t){var r,a=Xh(t.data),n={name:(null==(r=a[1])?void 0:r[0])?jh(a[1][0].data):"",sheets:[]};return Wh(a[2],Zh).forEach((function(t){e[t].forEach((function(t){6e3==Hh(t.meta[1][0].data)&&n.sheets.push(eu(e,t))}))})),n}(e,t);a.sheets.forEach((function(e,t){Su(r,e,0==t?a.name:a.name+"_"+t,!0)}))}}))})),0==r.SheetNames.length)throw new Error("Empty NUMBERS file");return r}function ru(e){var t,r,a,n,i={},s=[];if(e.FullPaths.forEach((function(e){if(e.match(/\.iwpv2/))throw new Error("Unsupported password protection")})),e.FileIndex.forEach((function(e){if(e.name.match(/\.iwa$/)){var t,r;try{t=Vh(e.content)}catch(t){return console.log("?? "+e.content.length+" "+(t.message||t))}try{r=Gh(t)}catch(e){return console.log("## "+(e.message||e))}r.forEach((function(e){i[e.id]=e.messages,s.push(e.id)}))}})),!s.length)throw new Error("File has no messages");var o=(null==(n=null==(a=null==(r=null==(t=null==i?void 0:i[1])?void 0:t[0])?void 0:r.meta)?void 0:a[1])?void 0:n[0].data)&&1==Hh(i[1][0].meta[1][0].data)&&i[1][0];if(o||s.forEach((function(e){i[e].forEach((function(e){if(1==Hh(e.meta[1][0].data)>>>0){if(o)throw new Error("Document has multiple roots");o=e}}))})),!o)throw new Error("Cannot find Document root");return tu(i,o)}function au(e){return function(t){for(var r=0;r!=e.length;++r){var a=e[r];void 0===t[a[0]]&&(t[a[0]]=a[1]),"n"===a[2]&&(t[a[0]]=Number(t[a[0]]))}}}function nu(e){au([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function iu(e,t,r,a,n,i,s,o,c,l,h,u){try{i[a]=os(za(e,r,!0),t);var d,f=Ua(e,t);switch(o){case"sheet":d=ql(f,t,n,c,i[a],l,h,u);break;case"chart":if(!(d=Vl(f,t,n,c,i[a],l))||!d["!drawel"])break;var p=qa(d["!drawel"].Target,t),g=ss(p),m=function(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}(za(e,p,!0),os(za(e,g,!0),p)),b=qa(m,p),y=ss(b);d=Rl(za(e,b,!0),0,0,os(za(e,y,!0),b),0,d);break;case"macro":w=t,i[a],w.slice(-4),d={"!type":"macro"};break;case"dialog":d=function(e,t){return t.slice(-4),{"!type":"dialog"}}(0,t,0,0,i[a]);break;default:throw new Error("Unrecognized sheet type "+o)}s[a]=d;var v=[];i&&i[a]&&ba(i[a]).forEach((function(r){var n="";if(i[a][r].Type==is.CMNT){n=qa(i[a][r].Target,t);var s=Zl(Ua(e,n,!0),n,c);if(!s||!s.length)return;vc(d,s,!1)}i[a][r].Type==is.TCMNT&&(n=qa(i[a][r].Target,t),v=v.concat(function(e,t){var r=[],a=!1,n={},i=0;return e.replace(Za,(function(s,o){var c=en(s);switch(tn(c[0])){case"<?xml":case"<ThreadedComments":case"</ThreadedComments>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<threadedComment":n={author:c.personId,guid:c.id,ref:c.ref,T:1};break;case"</threadedComment>":null!=n.t&&r.push(n);break;case"<text>":case"<text":i=o+s.length;break;case"</text>":n.t=e.slice(i,o).replace(/\r\n/g,"\n").replace(/\r/g,"\n");break;case"<mentions":case"<mentions>":case"<ext":a=!0;break;case"</mentions>":case"</ext>":a=!1;break;default:if(!a&&t.WTF)throw new Error("unrecognized "+c[0]+" in threaded comments")}return s})),r}(Ua(e,n,!0),c)))})),v&&v.length&&vc(d,v,!0,c.people||[])}catch(e){if(c.WTF)throw e}var w}function su(e){return"/"==e.charAt(0)?e.slice(1):e}function ou(e,t){if(ua(),nu(t=t||{}),ja(e,"META-INF/manifest.xml"))return Nh(e,t);if(ja(e,"objectdata.xml"))return Nh(e,t);if(ja(e,"Index/Document.iwa")){if("undefined"==typeof Uint8Array)throw new Error("NUMBERS file parsing requires Uint8Array support");if(void 0!==ru){if(e.FileIndex)return ru(e);var r=ga.utils.cfb_new();return Xa(e).forEach((function(t){Wa(r,t,Ha(e,t))})),ru(r)}throw new Error("Unsupported NUMBERS file")}if(!ja(e,"[Content_Types].xml")){if(ja(e,"index.xml.gz"))throw new Error("Unsupported NUMBERS 08 file");if(ja(e,"index.xml"))throw new Error("Unsupported NUMBERS 09 file");throw new Error("Unsupported ZIP file")}var a,n,i=Xa(e),s=function(e){var t={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};if(!e||!e.match)return t;var r={};if((e.match(Za)||[]).forEach((function(e){var a=en(e);switch(a[0].replace(Ja,"<")){case"<?xml":break;case"<Types":t.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[a.Extension]=a.ContentType;break;case"<Override":void 0!==t[ns[a.ContentType]]&&t[ns[a.ContentType]].push(a.PartName)}})),t.xmlns!==En)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}(za(e,"[Content_Types].xml")),o=!1;if(0===s.workbooks.length&&Ua(e,n="xl/workbook.xml",!0)&&s.workbooks.push(n),0===s.workbooks.length){if(!Ua(e,n="xl/workbook.bin",!0))throw new Error("Could not find workbook");s.workbooks.push(n),o=!0}"bin"==s.workbooks[0].slice(-3)&&(o=!0);var c={},l={};if(!t.bookSheets&&!t.bookProps){if(dl=[],s.sst)try{dl=Yl(Ua(e,su(s.sst)),s.sst,t)}catch(e){if(t.WTF)throw e}t.cellStyles&&s.themes.length&&(c=function(e,t,r){return gc(e,r)}(za(e,s.themes[0].replace(/^\//,""),!0)||"",s.themes[0],t)),s.style&&(l=Kl(Ua(e,su(s.style)),s.style,c,t))}s.links.map((function(r){try{os(za(e,ss(su(r))),r);return Ql(Ua(e,su(r)),0,r,t)}catch(e){}}));var h=Gl(Ua(e,su(s.workbooks[0])),s.workbooks[0],t),u={},d="";s.coreprops.length&&((d=Ua(e,su(s.coreprops[0]),!0))&&(u=hs(d)),0!==s.extprops.length&&(d=Ua(e,su(s.extprops[0]),!0))&&function(e,t,r){var a={};t||(t={}),e=gn(e),us.forEach((function(r){var n=(e.match(bn(r[0]))||[])[1];switch(r[2]){case"string":n&&(t[r[1]]=nn(n));break;case"bool":t[r[1]]="true"===n;break;case"raw":var i=e.match(new RegExp("<"+r[0]+"[^>]*>([\\s\\S]*?)</"+r[0]+">"));i&&i.length>0&&(a[r[1]]=i[1])}})),a.HeadingPairs&&a.TitlesOfParts&&ds(a.HeadingPairs,a.TitlesOfParts,t,r)}(d,u,t));var f={};t.bookSheets&&!t.bookProps||0!==s.custprops.length&&(d=za(e,su(s.custprops[0]),!0))&&(f=function(e,t){var r={},a="",n=e.match(fs);if(n)for(var i=0;i!=n.length;++i){var s=n[i],o=en(s);switch(o[0]){case"<?xml":case"<Properties":break;case"<property":a=nn(o.name);break;case"</property>":a=null;break;default:if(0===s.indexOf("<vt:")){var c=s.split(">"),l=c[0].slice(4),h=c[1];switch(l){case"lpstr":case"bstr":case"lpwstr":case"cy":case"error":r[a]=nn(h);break;case"bool":r[a]=hn(h);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[a]=parseInt(h,10);break;case"r4":case"r8":case"decimal":r[a]=parseFloat(h);break;case"filetime":case"date":r[a]=Oa(h);break;default:if("/"==l.slice(-1))break;t.WTF&&"undefined"!=typeof console&&console.warn("Unexpected",s,l,c)}}else if("</"===s.slice(0,2));else if(t.WTF)throw new Error(s)}}return r}(d,t));var p={};if((t.bookSheets||t.bookProps)&&(h.Sheets?a=h.Sheets.map((function(e){return e.name})):u.Worksheets&&u.SheetNames.length>0&&(a=u.SheetNames),t.bookProps&&(p.Props=u,p.Custprops=f),t.bookSheets&&void 0!==a&&(p.SheetNames=a),t.bookSheets?p.SheetNames:t.bookProps))return p;a={};var g={};t.bookDeps&&s.calcchain&&(g=Jl(Ua(e,su(s.calcchain)),s.calcchain));var m,b,y=0,v={},w=h.Sheets;u.Worksheets=w.length,u.SheetNames=[];for(var A=0;A!=w.length;++A)u.SheetNames[A]=w[A].name;var S=o?"bin":"xml",x=s.workbooks[0].lastIndexOf("/"),k=(s.workbooks[0].slice(0,x+1)+"_rels/"+s.workbooks[0].slice(x+1)+".rels").replace(/^\//,"");ja(e,k)||(k="xl/_rels/workbook."+S+".rels");var C=os(za(e,k,!0),k.replace(/_rels.*/,"s5s"));(s.metadata||[]).length>=1&&(t.xlmeta=eh(Ua(e,su(s.metadata[0])),s.metadata[0],t)),(s.people||[]).length>=1&&(t.people=function(e,t){var r=[],a=!1;return e.replace(Za,(function(e){var n=en(e);switch(tn(n[0])){case"<?xml":case"<personList":case"</personList>":case"</person>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<person":r.push({name:n.displayname,id:n.id});break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(!a&&t.WTF)throw new Error("unrecognized "+n[0]+" in threaded comments")}return e})),r}(Ua(e,su(s.people[0])),t)),C&&(C=function(e,t){if(!e)return 0;try{e=t.map((function(t){return t.id||(t.id=t.strRelID),[t.name,e["!id"][t.id].Target,(r=e["!id"][t.id].Type,is.WS.indexOf(r)>-1?"sheet":is.CS&&r==is.CS?"chart":is.DS&&r==is.DS?"dialog":is.MS&&r==is.MS?"macro":r&&r.length?r:"sheet")];var r}))}catch(e){return null}return e&&0!==e.length?e:null}(C,h.Sheets));var _=Ua(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(y=0;y!=u.Worksheets;++y){var T="sheet";if(C&&C[y]?(m="xl/"+C[y][1].replace(/[\/]?xl\//,""),ja(e,m)||(m=C[y][1]),ja(e,m)||(m=k.replace(/_rels\/.*$/,"")+C[y][1]),T=C[y][2]):m=(m="xl/worksheets/sheet"+(y+1-_)+"."+S).replace(/sheet0\./,"sheet."),b=m.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&null!=t.sheets)switch(typeof t.sheets){case"number":if(y!=t.sheets)continue e;break;case"string":if(u.SheetNames[y].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var E=!1,O=0;O!=t.sheets.length;++O)"number"==typeof t.sheets[O]&&t.sheets[O]==y&&(E=1),"string"==typeof t.sheets[O]&&t.sheets[O].toLowerCase()==u.SheetNames[y].toLowerCase()&&(E=1);if(!E)continue e}}iu(e,m,b,u.SheetNames[y],y,v,a,T,t,h,c,l)}return p={Directory:s,Workbook:h,Props:u,Custprops:f,Deps:g,Sheets:a,SheetNames:u.SheetNames,Strings:dl,Styles:l,Themes:c,SSF:Pa(Pr)},t&&t.bookFiles&&(e.files?(p.keys=i,p.files=e.files):(p.keys=[],p.files={},e.FullPaths.forEach((function(t,r){t=t.replace(/^Root Entry[\/]/,""),p.keys.push(t),p.files[t]=e.FileIndex[r]})))),t&&t.bookVBA&&(s.vba.length>0?p.vbaraw=Ua(e,su(s.vba[0]),!0):s.defaults&&"application/vnd.ms-office.vbaProject"===s.defaults.bin&&(p.vbaraw=Ua(e,"xl/vbaProject.bin",!0))),p}function cu(e,t){var r,a,n=t||{},i="Workbook",s=ga.find(e,i);try{if(i="/!DataSpaces/Version",!(s=ga.find(e,i))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);if(r=s.content,(a={}).id=r.read_shift(0,"lpp4"),a.R=Fo(r,4),a.U=Fo(r,4),a.W=Fo(r,4),i="/!DataSpaces/DataSpaceMap",!(s=ga.find(e,i))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);var o=function(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(Po(e));return t}(s.content);if(1!==o.length||1!==o[0].comps.length||0!==o[0].comps[0].t||"StrongEncryptionDataSpace"!==o[0].name||"EncryptedPackage"!==o[0].comps[0].v)throw new Error("ECMA-376 Encrypted file bad "+i);if(i="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",!(s=ga.find(e,i))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);var c=function(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}(s.content);if(1!=c.length||"StrongEncryptionTransform"!=c[0])throw new Error("ECMA-376 Encrypted file bad "+i);if(i="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",!(s=ga.find(e,i))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);Io(s.content)}catch(e){}if(i="/EncryptionInfo",!(s=ga.find(e,i))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);var l=function(e){var t=Fo(e);switch(t.Minor){case 2:return[t.Minor,Do(e)];case 3:return[t.Minor,No()];case 4:return[t.Minor,Lo(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}(s.content);if(i="/EncryptedPackage",!(s=ga.find(e,i))||!s.content)throw new Error("ECMA-376 Encrypted file missing "+i);if(4==l[0]&&"undefined"!=typeof decrypt_agile)return decrypt_agile(l[1],s.content,n.password||"",n);if(2==l[0]&&"undefined"!=typeof decrypt_std76)return decrypt_std76(l[1],s.content,n.password||"",n);throw new Error("File is password-protected")}function lu(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=ur(e.slice(0,12));break;case"binary":r=e;break;default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function hu(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return dh(e.slice(r),t);default:break e}return yo.to_workbook(e,t)}function uu(e,t,r,a){return a?(r.type="string",yo.to_workbook(e,r)):yo.to_workbook(t,r)}function du(e,t){rr();var r=t||{};if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return du(new Uint8Array(e),((r=Pa(r)).type="array",r));"undefined"!=typeof Uint8Array&&e instanceof Uint8Array&&!r.type&&(r.type="undefined"!=typeof Deno?"buffer":"array");var a,n=e,i=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),fl={},r.dateNF&&(fl.dateNF=r.dateNF),r.type||(r.type=dr&&Buffer.isBuffer(e)?"buffer":"base64"),"file"==r.type&&(r.type=dr?"buffer":"binary",n=function(e){if(void 0!==ma)return ma.readFileSync(e);if("undefined"!=typeof Deno)return Deno.readFileSync(e);if("undefined"!=typeof $&&"undefined"!=typeof File&&"undefined"!=typeof Folder)try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(e){if(!e.message||!e.message.match(/onstruct/))throw e}throw new Error("Cannot access file "+e)}(e),"undefined"==typeof Uint8Array||dr||(r.type="array")),"string"==r.type&&(i=!0,r.type="binary",r.codepage=65001,n=function(e){return e.match(/[^\x00-\x7F]/)?mn(e):e}(e)),"array"==r.type&&"undefined"!=typeof Uint8Array&&e instanceof Uint8Array&&"undefined"!=typeof ArrayBuffer){var s=new ArrayBuffer(3),o=new Uint8Array(s);if(o.foo="bar",!o.foo)return(r=Pa(r)).type="array",du(yr(n),r)}switch((a=lu(n,r))[0]){case 208:if(207===a[1]&&17===a[2]&&224===a[3]&&161===a[4]&&177===a[5]&&26===a[6]&&225===a[7])return function(e,t){return ga.find(e,"EncryptedPackage")?cu(e,t):Ah(e,t)}(ga.read(n,r),r);break;case 9:if(a[1]<=8)return Ah(n,r);break;case 60:return dh(n,r);case 73:if(73===a[1]&&42===a[2]&&0===a[3])throw new Error("TIFF Image File is not a spreadsheet");if(68===a[1])return function(e,t){var r=t||{},a=!!r.WTF;r.WTF=!0;try{var n=go.to_workbook(e,r);return r.WTF=a,n}catch(n){if(r.WTF=a,!n.message.match(/SYLK bad record ID/)&&a)throw n;return yo.to_workbook(e,t)}}(n,r);break;case 84:if(65===a[1]&&66===a[2]&&76===a[3])return mo.to_workbook(n,r);break;case 80:return 75===a[1]&&a[2]<9&&a[3]<9?function(e,t){var r=e,a=t||{};return a.type||(a.type=dr&&Buffer.isBuffer(e)?"buffer":"base64"),ou(Ga(r,a),a)}(n,r):uu(e,n,r,i);case 239:return 60===a[3]?dh(n,r):uu(e,n,r,i);case 255:if(254===a[1])return function(e,t){var r=e;return"base64"==t.type&&(r=ur(r)),r=ir.utils.decode(1200,r.slice(2),"str"),t.type="binary",hu(r,t)}(n,r);if(0===a[1]&&2===a[2]&&0===a[3])return vo.to_workbook(n,r);break;case 0:if(0===a[1]){if(a[2]>=2&&0===a[3])return vo.to_workbook(n,r);if(0===a[2]&&(8===a[3]||9===a[3]))return vo.to_workbook(n,r)}break;case 3:case 131:case 139:case 140:return po.to_workbook(n,r);case 123:if(92===a[1]&&114===a[2]&&116===a[3])return zo.to_workbook(n,r);break;case 10:case 13:case 32:return function(e,t){var r="",a=lu(e,t);switch(t.type){case"base64":r=ur(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=Fa(e);break;default:throw new Error("Unrecognized type "+t.type)}return 239==a[0]&&187==a[1]&&191==a[2]&&(r=gn(r)),t.type="binary",hu(r,t)}(n,r);case 137:if(80===a[1]&&78===a[2]&&71===a[3])throw new Error("PNG Image File is not a spreadsheet")}return fo.indexOf(a[0])>-1&&a[2]<=12&&a[3]<=31?po.to_workbook(n,r):uu(e,n,r,i)}function fu(e,t,r,a,n,i,s,o){var c=wi(r),l=o.defval,h=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),u=!0,d=1===n?[]:{};if(1!==n)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:r,enumerable:!1})}catch(e){d.__rowNum__=r}else d.__rowNum__=r;if(!s||e[r])for(var f=t.s.c;f<=t.e.c;++f){var p=s?e[r][f]:e[a[f]+c];if(void 0!==p&&void 0!==p.t){var g=p.v;switch(p.t){case"z":if(null==g)break;continue;case"e":g=0==g?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+p.t)}if(null!=i[f]){if(null==g)if("e"==p.t&&null===g)d[i[f]]=null;else if(void 0!==l)d[i[f]]=l;else{if(!h||null!==g)continue;d[i[f]]=null}else d[i[f]]=h&&("n"!==p.t||"n"===p.t&&!1!==o.rawNumbers)?g:Oi(p,g,o);null!=g&&(u=!1)}}else{if(void 0===l)continue;null!=i[f]&&(d[i[f]]=l)}}return{row:d,isempty:u}}function pu(e,t){if(null==e||null==e["!ref"])return[];var r={t:"n",v:0},a=0,n=1,i=[],s=0,o="",c={s:{r:0,c:0},e:{r:0,c:0}},l=t||{},h=null!=l.range?l.range:e["!ref"];switch(1===l.header?a=1:"A"===l.header?a=2:Array.isArray(l.header)?a=3:null==l.header&&(a=0),typeof h){case"string":c=Ti(h);break;case"number":(c=Ti(e["!ref"])).s.r=h;break;default:c=h}a>0&&(n=0);var u=wi(c.s.r),d=[],f=[],p=0,g=0,m=Array.isArray(e),b=c.s.r,y=0,v={};m&&!e[b]&&(e[b]=[]);var w=l.skipHidden&&e["!cols"]||[],A=l.skipHidden&&e["!rows"]||[];for(y=c.s.c;y<=c.e.c;++y)if(!(w[y]||{}).hidden)switch(d[y]=Si(y),r=m?e[b][y]:e[d[y]+u],a){case 1:i[y]=y-c.s.c;break;case 2:i[y]=d[y];break;case 3:i[y]=l.header[y-c.s.c];break;default:if(null==r&&(r={w:"__EMPTY",t:"s"}),o=s=Oi(r,null,l),g=v[s]||0){do{o=s+"_"+g++}while(v[o]);v[s]=g,v[o]=1}else v[s]=1;i[y]=o}for(b=c.s.r+n;b<=c.e.r;++b)if(!(A[b]||{}).hidden){var S=fu(e,c,b,d,a,i,m,l);(!1===S.isempty||(1===a?!1!==l.blankrows:l.blankrows))&&(f[p++]=S.row)}return f.length=p,f}var gu=/"/g;function mu(e,t,r,a,n,i,s,o){for(var c=!0,l=[],h="",u=wi(r),d=t.s.c;d<=t.e.c;++d)if(a[d]){var f=o.dense?(e[r]||[])[d]:e[a[d]+u];if(null==f)h="";else if(null!=f.v){c=!1,h=""+(o.rawNumbers&&"n"==f.t?f.v:Oi(f,null,o));for(var p=0,g=0;p!==h.length;++p)if((g=h.charCodeAt(p))===n||g===i||34===g||o.forceQuotes){h='"'+h.replace(gu,'""')+'"';break}"ID"==h&&(h='"ID"')}else null==f.f||f.F?h="":(c=!1,(h="="+f.f).indexOf(",")>=0&&(h='"'+h.replace(gu,'""')+'"'));l.push(h)}return!1===o.blankrows&&c?null:l.join(s)}function bu(e,t){var r=[],a=null==t?{}:t;if(null==e||null==e["!ref"])return"";var n=Ti(e["!ref"]),i=void 0!==a.FS?a.FS:",",s=i.charCodeAt(0),o=void 0!==a.RS?a.RS:"\n",c=o.charCodeAt(0),l=new RegExp(("|"==i?"\\|":i)+"+$"),h="",u=[];a.dense=Array.isArray(e);for(var d=a.skipHidden&&e["!cols"]||[],f=a.skipHidden&&e["!rows"]||[],p=n.s.c;p<=n.e.c;++p)(d[p]||{}).hidden||(u[p]=Si(p));for(var g=0,m=n.s.r;m<=n.e.r;++m)(f[m]||{}).hidden||null!=(h=mu(e,n,m,u,s,c,i,a))&&(a.strip&&(h=h.replace(l,"")),(h||!1!==a.blankrows)&&r.push((g++?o:"")+h));return delete a.dense,r.join("")}function yu(e,t){t||(t={}),t.FS="\t",t.RS="\n";var r=bu(e,t);if(void 0===ir||"string"==t.type)return r;var a=ir.utils.encode(1200,r,"str");return String.fromCharCode(255)+String.fromCharCode(254)+a}function vu(e,t,r){var a,n=r||{},i=+!n.skipHeader,s=e||{},o=0,c=0;if(s&&null!=n.origin)if("number"==typeof n.origin)o=n.origin;else{var l="string"==typeof n.origin?xi(n.origin):n.origin;o=l.r,c=l.c}var h={s:{c:0,r:0},e:{c,r:o+t.length-1+i}};if(s["!ref"]){var u=Ti(s["!ref"]);h.e.c=Math.max(h.e.c,u.e.c),h.e.r=Math.max(h.e.r,u.e.r),-1==o&&(o=u.e.r+1,h.e.r=o+t.length-1+i)}else-1==o&&(o=0,h.e.r=t.length-1+i);var d=n.header||[],f=0;t.forEach((function(e,t){ba(e).forEach((function(r){-1==(f=d.indexOf(r))&&(d[f=d.length]=r);var l=e[r],h="z",u="",p=ki({c:c+f,r:o+t+i});a=wu(s,p),!l||"object"!=typeof l||l instanceof Date?("number"==typeof l?h="n":"boolean"==typeof l?h="b":"string"==typeof l?h="s":l instanceof Date?(h="d",n.cellDates||(h="n",l=wa(l)),u=n.dateNF||Pr[14]):null===l&&n.nullError&&(h="e",l=0),a?(a.t=h,a.v=l,delete a.w,delete a.R,u&&(a.z=u)):s[p]=a={t:h,v:l},u&&(a.z=u)):s[p]=l}))})),h.e.c=Math.max(h.e.c,c+d.length-1);var p=wi(o);if(i)for(f=0;f<d.length;++f)s[Si(f+c)+p]={t:"s",v:d[f]};return s["!ref"]=_i(h),s}function wu(e,t,r){if("string"==typeof t){if(Array.isArray(e)){var a=xi(t);return e[a.r]||(e[a.r]=[]),e[a.r][a.c]||(e[a.r][a.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return wu(e,ki("number"!=typeof t?t:{r:t,c:r||0}))}function Au(){return{SheetNames:[],Sheets:{}}}function Su(e,t,r,a){var n=1;if(!r)for(;n<=65535&&-1!=e.SheetNames.indexOf(r="Sheet"+n);++n,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(a&&e.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);n=i&&+i[2]||0;var s=i&&i[1]||r;for(++n;n<=65535&&-1!=e.SheetNames.indexOf(r=s+n);++n);}if(Hl(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function xu(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}var ku={encode_col:Si,encode_row:wi,encode_cell:ki,encode_range:_i,decode_col:Ai,decode_row:vi,split_cell:function(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")},decode_cell:xi,decode_range:Ci,format_cell:Oi,sheet_add_aoa:Pi,sheet_add_json:vu,sheet_add_dom:Ph,aoa_to_sheet:Ii,json_to_sheet:function(e,t){return vu(null,e,t)},table_to_sheet:Ih,table_to_book:function(e,t){return Fi(Ih(e,t),t)},sheet_to_csv:bu,sheet_to_txt:yu,sheet_to_json:pu,sheet_to_html:Fh,sheet_to_formulae:function(e){var t,r="",a="";if(null==e||null==e["!ref"])return[];var n,i=Ti(e["!ref"]),s="",o=[],c=[],l=Array.isArray(e);for(n=i.s.c;n<=i.e.c;++n)o[n]=Si(n);for(var h=i.s.r;h<=i.e.r;++h)for(s=wi(h),n=i.s.c;n<=i.e.c;++n)if(r=o[n]+s,a="",void 0!==(t=l?(e[h]||[])[n]:e[r])){if(null!=t.F){if(r=t.F,!t.f)continue;a=t.f,-1==r.indexOf(":")&&(r=r+":"+r)}if(null!=t.f)a=t.f;else{if("z"==t.t)continue;if("n"==t.t&&null!=t.v)a=""+t.v;else if("b"==t.t)a=t.v?"TRUE":"FALSE";else if(void 0!==t.w)a="'"+t.w;else{if(void 0===t.v)continue;a="s"==t.t?"'"+t.v:""+t.v}}c[c.length]=r+"="+a}return c},sheet_to_row_object_array:pu,sheet_get_cell:wu,book_new:Au,book_append_sheet:Su,book_set_sheet_visibility:function(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var a=function(e,t){if("number"==typeof t){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}if("string"==typeof t){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}throw new Error("Cannot find sheet |"+t+"|")}(e,t);switch(e.Workbook.Sheets[a]||(e.Workbook.Sheets[a]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[a].Hidden=r},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:xu,cell_set_internal_link:function(e,t,r){return xu(e,"#"+t,r)},cell_add_comment:function(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})},sheet_set_array_formula:function(e,t,r,a){for(var n="string"!=typeof t?t:Ti(t),i="string"==typeof t?t:_i(t),s=n.s.r;s<=n.e.r;++s)for(var o=n.s.c;o<=n.e.c;++o){var c=wu(e,s,o);c.t="n",c.F=i,delete c.v,s==n.s.r&&o==n.s.c&&(c.f=r,a&&(c.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};Kt.version;function Cu(e){return Cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cu(e)}function _u(){_u=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function h(e,t,r,a){var i=t&&t.prototype instanceof b?t:b,s=Object.create(i.prototype),o=new F(a||[]);return n(s,"_invoke",{value:_(e,r,o)}),s}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d="suspendedStart",f="suspendedYield",p="executing",g="completed",m={};function b(){}function y(){}function v(){}var w={};l(w,s,(function(){return this}));var A=Object.getPrototypeOf,S=A&&A(A(P([])));S&&S!==r&&a.call(S,s)&&(w=S);var x=v.prototype=b.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(n,i,s,o){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==Cu(h)&&a.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,s,o)}),(function(e){r("throw",e,s,o)})):t.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,o)}))}o(c.arg)}var i;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return i=i?i.then(n,n):n()}})}function _(t,r,a){var n=d;return function(i,s){if(n===p)throw Error("Generator is already running");if(n===g){if("throw"===i)throw s;return{value:e,done:!0}}for(a.method=i,a.arg=s;;){var o=a.delegate;if(o){var c=T(o,a);if(c){if(c===m)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===d)throw n=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=p;var l=u(t,r,a);if("normal"===l.type){if(n=a.done?g:f,l.arg===m)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(n=g,a.method="throw",a.arg=l.arg)}}}function T(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),m;var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var s=i.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Cu(t)+" is not iterable")}return y.prototype=v,n(x,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(C.prototype),l(C.prototype,o,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,a,n,i){void 0===i&&(i=Promise);var s=new C(h(e,r,a,n),i);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(x),l(x,c,"Generator"),l(x,s,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=P,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(a,n){return o.type="throw",o.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=a.call(s,"catchLoc"),l=a.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;O(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:P(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),m}},t}function Tu(e,t,r,a,n,i,s){try{var o=e[i](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(a,n)}function Eu(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var i=e.apply(t,r);function s(e){Tu(i,a,n,s,o,"next",e)}function o(e){Tu(i,a,n,s,o,"throw",e)}s(void 0)}))}}function Ou(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Fu(a.key),a)}}function Fu(e){var t=function(e,t){if("object"!=Cu(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=Cu(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Cu(t)?t:t+""}function Pu(e,t,r){return t=Ru(t),function(e,t){if(t&&("object"==Cu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Iu()?Reflect.construct(t,r||[],Ru(e).constructor):t.apply(e,r))}function Iu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Iu=function(){return!!e})()}function Mu(){return Mu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Ru(e)););return e}(e,t);if(a){var n=Object.getOwnPropertyDescriptor(a,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},Mu.apply(null,arguments)}function Ru(e){return Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ru(e)}function Du(e,t){return Du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Du(e,t)}var Nu=function(e){function t(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=Pu(this,t,[e,a]),!(e&&e instanceof HTMLElement))throw new Error("Geçerli bir görüntüleme alanı bulunamadı");return r.container.style.overflow="auto",r.container.style.position="relative",r.container.style.width="100%",r.container.style.height="100%",r.styleElement=null,r.workbook=null,r.activeSheet=0,r.sheets=[],r.tabsContainer=null,r.contentContainer=null,r.viewerStyles="\n      .udv-excel-viewer {\n        width: 100%;\n        height: 100%;\n        font-family: 'Segoe UI', Arial, sans-serif;\n        color: #333;\n        display: flex;\n        flex-direction: column;\n        background-color: #f9f9f9;\n      }\n      .udv-excel-tabs {\n        display: flex;\n        overflow-x: auto;\n        background-color: #f0f0f0;\n        border-bottom: 1px solid #e0e0e0;\n        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n        z-index: 10;\n        scrollbar-width: thin;\n        position: sticky;\n        top: 0;\n      }\n      .udv-excel-tabs::-webkit-scrollbar {\n        height: 5px;\n      }\n      .udv-excel-tabs::-webkit-scrollbar-thumb {\n        background: #cdcdcd;\n        border-radius: 10px;\n      }\n      .udv-excel-tab {\n        padding: 12px 20px;\n        cursor: pointer;\n        background-color: #f0f0f0;\n        border: none;\n        border-right: 1px solid #e0e0e0;\n        outline: none;\n        transition: all 0.2s ease;\n        font-size: 14px;\n        white-space: nowrap;\n        position: relative;\n        margin-bottom: -1px;\n      }\n      .udv-excel-tab:hover {\n        background-color: #e8e8e8;\n      }\n      .udv-excel-tab.active {\n        background-color: #ffffff;\n        color: #217346; /* Excel yeşili */\n        border-bottom: 2px solid #217346;\n        font-weight: 500;\n      }\n      .udv-excel-content {\n        flex: 1;\n        overflow: auto;\n        padding: 0;\n        background-color: white;\n        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);\n        border-radius: 0 0 4px 4px;\n      }\n      .udv-excel-sheet {\n        padding: 0;\n        background-color: white;\n        width: 100%;\n        height: 100%;\n      }\n      table {\n        border-collapse: collapse;\n        width: 100%;\n        font-size: 14px;\n        margin-bottom: 0;\n        border: 1px solid #e0e0e0;\n      }\n      thead {\n        position: sticky;\n        top: 0;\n        z-index: 9;\n      }\n      th, td {\n        border: 1px solid #e0e0e0;\n        padding: 10px;\n        text-align: left;\n        position: relative;\n      }\n      th {\n        background-color: #f3f9f5; /* Hafif yeşil arka plan */\n        font-weight: 600;\n        color: #217346; /* Excel yeşili */\n        border-bottom: 2px solid #217346;\n        white-space: nowrap;\n        position: sticky;\n        top: 0;\n        z-index: 5;\n      }\n      /* Satır numaraları için stil */\n      .row-num-cell {\n        background-color: #f3f9f5;\n        color: #217346;\n        font-weight: 600;\n        text-align: center;\n        width: 40px;\n        min-width: 40px;\n        border-right: 2px solid #217346;\n      }\n      /* Boş köşe hücresi (sol üst köşe) */\n      .corner-cell {\n        background-color: #f3f9f5;\n        border-bottom: 2px solid #217346;\n        border-right: 2px solid #217346;\n      }\n      tr:nth-child(even) {\n        background-color: #f9f9f9;\n      }\n      tr:hover {\n        background-color: #f0f7f3; /* Hover durumunda hafif yeşil */\n      }\n      /* Sayfalama stilleri */\n      .udv-excel-pagination {\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n        padding: 12px 8px;\n        background-color: #f9f9f9;\n        border-top: 1px solid #e0e0e0;\n        border-radius: 0 0 4px 4px;\n        margin-top: 10px;\n      }\n      .udv-excel-pagination-info {\n        font-size: 13px;\n        color: #666;\n      }\n      .udv-excel-pagination-controls {\n        display: flex;\n        gap: 5px;\n      }\n      .udv-excel-btn {\n        background-color: white;\n        border: 1px solid #d0d0d0;\n        border-radius: 4px;\n        padding: 6px 12px;\n        cursor: pointer;\n        transition: all 0.2s;\n        font-size: 13px;\n      }\n      .udv-excel-btn:hover:not(:disabled) {\n        background-color: #f0f7f3;\n        border-color: #217346;\n      }\n      .udv-excel-btn:disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n      }\n      .udv-excel-error {\n        color: #e74c3c;\n        padding: 20px;\n        text-align: center;\n        background-color: #ffeaea;\n        border: 1px solid #e74c3c;\n        border-radius: 4px;\n        margin: 20px 0;\n        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n      }\n      .udv-excel-loading {\n        padding: 20px;\n        text-align: center;\n        color: #555;\n        background-color: white;\n        border-radius: 4px;\n        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n      }\n\n      // Boş veri mesajı için stil ekleyin\n      .udv-excel-empty {\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        width: 100%;\n        height: 100%;\n        min-height: 300px;\n        background-color: #ffffff;\n      }\n      \n      .udv-excel-empty-card {\n        background: white;\n        padding: 30px;\n        max-width: 400px;\n        width: 100%;\n        text-align: center;\n      }\n      \n      .udv-excel-empty-icon {\n        font-size: 48px;\n        margin-bottom: 15px;\n        display: inline-block;\n      }\n      \n      .udv-excel-empty-message {\n        font-size: 20px;\n        color: #333;\n        margin-bottom: 10px;\n        font-weight: 500;\n      }\n      \n      .udv-excel-empty-details {\n        font-size: 14px;\n        color: #666;\n        line-height: 1.4;\n      }\n      \n      .udv-excel-empty-action {\n        display: inline-block;\n        background-color: #217346;\n        color: white;\n        border: none;\n        border-radius: 4px;\n        padding: 8px 16px;\n        font-size: 14px;\n        font-weight: 500;\n        cursor: pointer;\n        text-decoration: none;\n      }\n      \n      .udv-excel-empty-action:hover {\n        background-color: #1a5c38;\n      }\n    ",r.documentLoaded=!1,r.zoomContainer=null,r.lastZoomLevel=r.zoomLevel,r.pagination={currentPage:1,totalPages:1,rowsPerPage:50},r.excelOptions={tableStyle:"border-collapse: collapse; width: 100%; font-size: 14px;",cellStyle:"border: 1px solid #ddd; padding: 8px; text-align: left;",headerStyle:"background-color: #f2f2f2; font-weight: bold;"},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Du(e,t)}(t,e),r=t,a=[{key:"loadDocument",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._clearContainer(),this._readExcelDocument(e).then((function(e){return t.workbook=e,t.sheets=e.SheetNames,t.activeSheet=0,t._createTabs(),t._renderSheet(t.activeSheet),t.documentLoaded=!0,t.currentPage=1,t.pageCount=t.sheets.length,r.onSuccess&&r.onSuccess(),{type:"excel",sheetCount:t.sheets.length,activeSheet:t.sheets[t.activeSheet]}})).catch((function(e){throw console.error("Excel yükleme hatası:",e),t.showError("Excel dosyası yüklenirken hata oluştu: ".concat(e.message)),r.onError&&r.onError(e),e}))}},{key:"_readExcelDocument",value:function(e){return new Promise((function(t,r){if("string"==typeof e){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){if(200===a.status){var e=a.response;try{var n=du(e,{type:"array"});t(n)}catch(e){r(new Error("Excel dosyası okunamadı: "+e.message))}}else r(new Error("Excel dosyası indirilemedi: HTTP "+a.status))},a.onerror=function(){r(new Error("Excel dosyası indirilemedi: Ağ hatası"))},a.send()}else if(e instanceof File||e instanceof Blob){var n=new FileReader;n.onload=function(e){try{var a=du(e.target.result,{type:"array"});t(a)}catch(e){r(new Error("Excel dosyası okunamadı: "+e.message))}},n.onerror=function(){r(new Error("Excel dosyası okunamadı: Dosya okuma hatası"))},n.readAsArrayBuffer(e)}else r(new Error("Excel dokümanı bir URL, File veya Blob olmalıdır"))}))}},{key:"_clearContainer",value:function(){if(this.container){this.container.innerHTML="",this.styleElement||(this.styleElement=document.createElement("style"),this.styleElement.textContent=this.viewerStyles,document.head.appendChild(this.styleElement)),this.container.style.height="100%",this.container.style.display="flex",this.container.style.flexDirection="column",this.zoomContainer=document.createElement("div"),this.zoomContainer.className="udv-zoom-container",this.zoomContainer.style.transformOrigin="top left",this.zoomContainer.style.transform="scale(".concat(this.zoomLevel,")"),this.zoomContainer.style.height="100%",this.zoomContainer.style.display="flex",this.zoomContainer.style.flexDirection="column",this.container.appendChild(this.zoomContainer);var e=document.createElement("div");e.className="udv-excel-viewer",e.style.height="100%",this.zoomContainer.appendChild(e),this.tabsContainer=document.createElement("div"),this.tabsContainer.className="udv-excel-tabs",e.appendChild(this.tabsContainer),this.contentContainer=document.createElement("div"),this.contentContainer.className="udv-excel-content",this.contentContainer.style.height="calc(100% - 41px)",e.appendChild(this.contentContainer)}}},{key:"_createTabs",value:function(){var e=this;this.tabsContainer&&this.sheets.length>0&&(this.tabsContainer.innerHTML="",this.sheets.forEach((function(t,r){var a=document.createElement("div");a.className="udv-excel-tab",a.textContent=t,a.dataset.index=r,r===e.activeSheet&&a.classList.add("active"),a.addEventListener("click",(function(){e._onTabClick(r)})),e.tabsContainer.appendChild(a)})))}},{key:"_onTabClick",value:function(e){if(e!==this.activeSheet){this.activeSheet=e;var t=this.tabsContainer.querySelectorAll(".udv-excel-tab");t.forEach((function(e){return e.classList.remove("active")})),t[e].classList.add("active"),this.currentPage=e+1,this._renderSheet(e)}}},{key:"_renderSheet",value:function(e){if(this.contentContainer&&this.workbook){this.contentContainer.innerHTML="";var t=document.createElement("div");t.className="udv-excel-sheet active";var r=this.sheets[e],a=this.workbook.Sheets[r];this._isWorksheetEmpty(a)?(t.innerHTML=this._createEmptyDataMessage(r),t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center"):(t.innerHTML=this._worksheetToHTML(a),this._addPaginationControls(t,a)),this.contentContainer.appendChild(t)}}},{key:"_isWorksheetEmpty",value:function(e){if(!e||!e["!ref"]||"A1"===e["!ref"])return!0;var t=ku.decode_range(e["!ref"]);if(t.e.r<=0)return!0;for(var r=!1,a=0;a<=t.e.r;a++){for(var n=0;n<=t.e.c;n++){var i=e[ku.encode_cell({r:a,c:n})];if(i&&void 0!==i.v&&null!==i.v&&""!==i.v){r=!0;break}}if(r)break}return!r}},{key:"_createEmptyDataMessage",value:function(e){return'\n      <div class="udv-excel-empty">\n        <div class="udv-excel-empty-card">\n          <div class="udv-excel-empty-icon">\n            📈\n          </div>\n          <div class="udv-excel-empty-message">\n            No Data Available\n          </div>\n          <div class="udv-excel-empty-details">\n            Sheet "'.concat(e,'" is empty or contains no displayable data.\n            The worksheet might be blank or contain only formatting.\n          </div>\n        </div>\n      </div>\n    ')}},{key:"_worksheetToHTML",value:function(e){var t=ku.decode_range(e["!ref"]||"A1"),r=t.e.r+1;this.pagination.currentPage=1,this.pagination.totalPages=Math.ceil(r/this.pagination.rowsPerPage);var a=Math.min(0+this.pagination.rowsPerPage,r),n="<table>";n+="<thead><tr>",n+='<th class="corner-cell"></th>';for(var i=0;i<=t.e.c;i++){var s=ku.encode_col(i);n+="<th>".concat(s,"</th>")}n+="</tr></thead><tbody>";for(var o=0;o<a;o++){n+="<tr>",n+='<td class="row-num-cell">'.concat(o+1,"</td>");for(var c=0;c<=t.e.c;c++){var l=e[ku.encode_cell({r:o,c})],h="",u="",d="";if(l){if(h=ku.format_cell(l),"n"===l.t?(u="numeric-cell",d="text-align: right;"):"d"===l.t?u="date-cell":"b"===l.t?(u="boolean-cell",h="TRUE"===h?"Evet":"Hayır"):"e"===l.t&&(u="error-cell",d="color: #d32f2f;"),l.s&&l.s.font&&(l.s.font.bold&&(d+="font-weight: bold;"),l.s.font.italic&&(d+="font-style: italic;"),l.s.font.underline&&(d+="text-decoration: underline;"),l.s.font.color)){var f=l.s.font.color.rgb||"";f&&(d+="color: #".concat(f,";"))}if(l.s&&l.s.fill&&l.s.fill.bgColor){var p=l.s.fill.bgColor.rgb||"";p&&(d+="background-color: #".concat(p,";"))}}n+='<td class="'.concat(u,'" style="').concat(d,'">').concat(h,"</td>")}n+="</tr>"}return n+="</tbody></table>"}},{key:"_addPaginationControls",value:function(e,t){var r=this,a=ku.decode_range(t["!ref"]||"A1").e.r+1;if(this.pagination.totalPages=Math.ceil(a/this.pagination.rowsPerPage),!(this.pagination.totalPages<=1)){var n=document.createElement("div");n.className="udv-excel-pagination";var i=document.createElement("span");i.className="udv-excel-pagination-info",i.textContent="Sayfa ".concat(this.pagination.currentPage,"/").concat(this.pagination.totalPages," (Toplam ").concat(a," satır)");var s=document.createElement("div");s.className="udv-excel-pagination-controls";var o=document.createElement("button");o.className="udv-excel-btn",o.textContent="««",o.title="İlk Sayfa",o.disabled=1===this.pagination.currentPage,o.addEventListener("click",(function(){return r._changePage(1,t,e)}));var c=document.createElement("button");c.className="udv-excel-btn",c.textContent="«",c.title="Önceki Sayfa",c.disabled=1===this.pagination.currentPage,c.addEventListener("click",(function(){return r._changePage(r.pagination.currentPage-1,t,e)}));var l=document.createElement("button");l.className="udv-excel-btn",l.textContent="»",l.title="Sonraki Sayfa",l.disabled=this.pagination.currentPage===this.pagination.totalPages,l.addEventListener("click",(function(){return r._changePage(r.pagination.currentPage+1,t,e)}));var h=document.createElement("button");h.className="udv-excel-btn",h.textContent="»»",h.title="Son Sayfa",h.disabled=this.pagination.currentPage===this.pagination.totalPages,h.addEventListener("click",(function(){return r._changePage(r.pagination.totalPages,t,e)})),s.appendChild(o),s.appendChild(c),s.appendChild(l),s.appendChild(h),n.appendChild(i),n.appendChild(s),e.appendChild(n)}}},{key:"_changePage",value:function(e,t,r){this.pagination.currentPage=e;var a=ku.decode_range(t["!ref"]||"A1"),n=a.e.r+1,i=this.pagination.rowsPerPage,s=(e-1)*i+1,o=Math.min(s+i,n),c="<table>";c+="<thead><tr>",c+='<th class="corner-cell"></th>';for(var l=0;l<=a.e.c;l++){var h=ku.encode_col(l);c+="<th>".concat(h,"</th>")}c+="</tr></thead><tbody>";for(var u=s;u<o;u++){c+="<tr>",c+='<td class="row-num-cell">'.concat(u+1,"</td>");for(var d=0;d<=a.e.c;d++){var f=t[ku.encode_cell({r:u,c:d})],p="",g="",m="";f&&(p=ku.format_cell(f),"n"===f.t?(g="numeric-cell",m="text-align: right;"):"d"===f.t?g="date-cell":"b"===f.t?(g="boolean-cell",p="TRUE"===p?"Evet":"Hayır"):"e"===f.t&&(g="error-cell",m="color: #d32f2f;")),c+='<td class="'.concat(g,'" style="').concat(m,'">').concat(p,"</td>")}c+="</tr>"}c+="</tbody></table>";var b=r.querySelector("table");b&&(b.outerHTML=c);var y=r.querySelector(".udv-excel-pagination-info");y&&(y.textContent="Sayfa ".concat(e,"/").concat(this.pagination.totalPages," (Toplam ").concat(n," satır)"));var v=r.querySelectorAll(".udv-excel-btn");4===v.length&&(v[0].disabled=v[1].disabled=1===e,v[2].disabled=v[3].disabled=e===this.pagination.totalPages)}},{key:"_applyZoom",value:function(){if(this.zoomContainer&&this.container){var e=this.container,t=e.scrollTop,r=e.scrollLeft,a=e.clientHeight,n=e.clientWidth,i=r+n/2,s=t+a/2,o=this.zoomLevel/(this.lastZoomLevel||1);this.zoomContainer.style.transform="scale(".concat(this.zoomLevel,")"),this.lastZoomLevel=this.zoomLevel,this.zoomContainer.style.width=100/this.zoomLevel+"%",setTimeout((function(){var t=i*o-n/2,r=s*o-a/2;e.scrollLeft=t,e.scrollTop=r}),50)}return Promise.resolve(this.zoomLevel)}},{key:"nextPage",value:(s=Eu(_u().mark((function e(){var t;return _u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.sheets&&this.sheets.length>0)){e.next=5;break}if(!((t=this.activeSheet+1)<this.sheets.length)){e.next=5;break}return this._onTabClick(t),e.abrupt("return",Promise.resolve(t+1));case 5:return e.abrupt("return",Promise.resolve(this.currentPage));case 6:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"previousPage",value:(i=Eu(_u().mark((function e(){var t;return _u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.sheets&&this.sheets.length>0)){e.next=5;break}if(!((t=this.activeSheet-1)>=0)){e.next=5;break}return this._onTabClick(t),e.abrupt("return",Promise.resolve(t+1));case 5:return e.abrupt("return",Promise.resolve(this.currentPage));case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"destroy",value:function(){console.log("ExcelViewerAdapter destroy metodu çağrıldı");try{this.styleElement&&this.styleElement.parentNode&&(console.log("Excel stil elementi temizleniyor"),this.styleElement.parentNode.removeChild(this.styleElement),this.styleElement=null),this.contentContainer&&(console.log("Excel içerik container temizleniyor"),this.contentContainer.innerHTML=""),this.tabsContainer&&(console.log("Excel tabs container temizleniyor"),this.tabsContainer.innerHTML=""),this.zoomContainer&&this.zoomContainer.parentNode&&(console.log("Excel zoom container DOM'dan kaldırılıyor"),this.zoomContainer.parentNode.removeChild(this.zoomContainer)),this.container&&(console.log("Excel ana container temizleniyor"),this.container.innerHTML="")}catch(e){console.error("Excel container temizlenirken hata:",e)}var e,r,a,n,i;this.workbook=null,this.sheets=[],this.contentContainer=null,this.tabsContainer=null,this.zoomContainer=null,this.styleElement=null,(e=t,r="destroy",a=this,i=Mu(Ru(1&(n=3)?e.prototype:e),r,a),2&n&&"function"==typeof i?function(e){return i.apply(a,e)}:i)([]),console.log("ExcelViewerAdapter destroy tamamlandı")}}],a&&Ou(r.prototype,a),n&&Ou(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,n,i,s}(g);function Lu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i,s,o=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(a=i.call(r)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){l=!0,n=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw n}}return o}}(e,t)||Bu(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bu(e,t){if(e){if("string"==typeof e)return ju(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ju(e,t):void 0}}function ju(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function $u(e){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(e)}function Uu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function zu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uu(Object(r),!0).forEach((function(t){Hu(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Hu(e,t,r){return(t=Wu(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xu(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Wu(a.key),a)}}function Wu(e){var t=function(e,t){if("object"!=$u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=$u(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$u(t)?t:t+""}function Gu(e,t,r){return t=Yu(t),function(e,t){if(t&&("object"==$u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qu()?Reflect.construct(t,r||[],Yu(e).constructor):t.apply(e,r))}function qu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qu=function(){return!!e})()}function Vu(e,t,r,a){var n=Ku(Yu(1&a?e.prototype:e),t,r);return 2&a&&"function"==typeof n?function(e){return n.apply(r,e)}:n}function Ku(){return Ku="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Yu(e)););return e}(e,t);if(a){var n=Object.getOwnPropertyDescriptor(a,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},Ku.apply(null,arguments)}function Yu(e){return Yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yu(e)}function Zu(e,t){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zu(e,t)}var Ju=function(e){function t(e){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=Gu(this,t,[e,a])).apiConfig=zu({url:a.apiUrl||"",method:a.apiMethod||"GET",headers:a.apiHeaders||{"Content-Type":"application/json"},queryParams:a.apiQueryParams||{},bodyParams:a.apiBodyParams||{}},a.apiConfig),r.documentAdapters={pdf:I,word:jt,image:Vt,excel:Nu},r.currentAdapter=null,r.contentContainer=document.createElement("div"),r.contentContainer.className="udv-api-container",r.contentContainer.style.width="100%",r.contentContainer.style.height="100%",r.contentContainer.style.overflow="auto",r.container.appendChild(r.contentContainer),r.loadingElement=null,r.loadingTimeout=null,r.errorTimeout=null,console.log("ApiViewerAdapter: Adaptör oluşturuldu",{apiUrl:r.apiConfig.url,method:r.apiConfig.method}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zu(e,t)}(t,e),r=t,a=[{key:"loadDocument",value:function(e){var t,r=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._clearTimeouts(),this.contentContainer.innerHTML="",this.loadingElement=document.createElement("div"),this.loadingElement.className="udv-api-loading",this.loadingElement.textContent="Belge yükleniyor...",this.loadingElement.style.padding="20px",this.loadingElement.style.textAlign="center",this.loadingElement.style.color="#555",this.contentContainer.appendChild(this.loadingElement),"string"==typeof e&&(e.startsWith("data:application/pdf;base64,")||e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,")||e.startsWith("data:image/")||e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,")||e.startsWith("data:;base64,")))return console.log("ApiViewerAdapter: Base64 formatında belge tespit edildi, direkt görüntüleniyor"),this._handleBase64Document(e,a);if("string"==typeof e)t=e;else{if("object"!==$u(e)||null===e){var n=new Error("Geçersiz belge kaynağı. String referenceId veya referenceId içeren bir obje olmalıdır");return console.error("ApiViewerAdapter yükleme hatası:",n),this._handleError(n.message,a),Promise.reject(n)}if(!(t=e.referenceId||e.id||e.reference||e.docId)){var i=new Error("Belge referansı (referenceId) bulunamadı");return console.error("ApiViewerAdapter yükleme hatası:",i),this._handleError(i.message,a),Promise.reject(i)}}if(console.log("ApiViewerAdapter: ".concat(t," referanslı belge yükleniyor")),!this.apiConfig.url){var s=new Error("API URL tanımlanmamış. apiUrl yapılandırma parametresini ayarlayın");return console.error("ApiViewerAdapter yapılandırma hatası:",s),this._handleError(s.message,a),Promise.reject(s)}return this._fetchDocumentFromApi(t,a).then((function(e){return r._handleBase64Document(e,a)})).catch((function(e){return console.error("Belge yükleme hatası:",e),r._handleError("Belge yüklenirken bir hata oluştu: ".concat(e.message),a),Promise.reject(e)}))}},{key:"_handleError",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.loadingElement&&this.loadingElement.parentNode&&(this.loadingElement.parentNode.removeChild(this.loadingElement),this.loadingElement=null),this.showError(e),r.onError&&r.onError(new Error(e)),this.errorTimeout=setTimeout((function(){t.contentContainer.querySelectorAll(".udv-error").forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}));var e=document.createElement("div");e.className="udv-empty-state",e.textContent="Belge yüklenemedi",e.style.padding="20px",e.style.textAlign="center",e.style.color="#777",e.style.fontSize="14px",e.style.marginTop="100px",t.contentContainer.appendChild(e)}),5e3)}},{key:"_clearTimeouts",value:function(){this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.errorTimeout&&(clearTimeout(this.errorTimeout),this.errorTimeout=null)}},{key:"_fetchDocumentFromApi",value:function(e){var t=this,r=this.apiConfig.url;if(r=r.replace(/{referenceId}/g,e).replace(/{id}/g,e),Object.keys(this.apiConfig.queryParams).length>0){var a=new URLSearchParams;Object.entries(this.apiConfig.queryParams).forEach((function(t){var r=Lu(t,2),n=r[0],i=r[1];a.append(n,String(i).replace(/{referenceId}/g,e))})),this.apiConfig.referenceIdQueryParam&&a.append(this.apiConfig.referenceIdQueryParam,e),r+=(r.includes("?")?"&":"?")+a.toString()}var n=null;if("GET"!==this.apiConfig.method&&"HEAD"!==this.apiConfig.method){var i=zu({},this.apiConfig.bodyParams);this.apiConfig.referenceIdBodyParam?i[this.apiConfig.referenceIdBodyParam]=e:Object.values(i).includes(e)||(i.referenceId=e),n=JSON.stringify(i)}return console.log("API isteği gönderiliyor:",{url:r,method:this.apiConfig.method,headers:this.apiConfig.headers,body:n?JSON.parse(n):null}),this.loadingTimeout=setTimeout((function(){if(t.loadingElement&&t.loadingElement.parentNode){t.loadingElement.parentNode.removeChild(t.loadingElement),t.loadingElement=null;var e=document.createElement("div");e.className="udv-loading-timeout",e.textContent="Belge yükleme işlemi uzun sürüyor...",e.style.padding="20px",e.style.textAlign="center",e.style.color="#777",t.contentContainer.appendChild(e)}}),2e4),fetch(r,{method:this.apiConfig.method,headers:this.apiConfig.headers,body:n,credentials:this.apiConfig.withCredentials?"include":"same-origin"}).then((function(e){if(!e.ok)throw new Error("API isteği başarısız: ".concat(e.status," ").concat(e.statusText));return e.json()})).then((function(e){t.loadingTimeout&&(clearTimeout(t.loadingTimeout),t.loadingTimeout=null);var r=t._extractBase64FromResponse(e);if(!r)throw new Error("API yanıtında base64 formatında belge bulunamadı");return r})).catch((function(e){throw console.error("API isteği hatası:",e),t.loadingTimeout&&(clearTimeout(t.loadingTimeout),t.loadingTimeout=null),new Error("Belge yüklenemedi: ".concat(e.message))}))}},{key:"_extractBase64FromResponse",value:function(e){if(this.apiConfig.responseDataPath){var t,r=e,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Bu(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var a=0,n=function(){};return{s:n,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw i}}}}(this.apiConfig.responseDataPath.split("."));try{for(a.s();!(t=a.n()).done;){var n=t.value;if(!r||"object"!==$u(r)||!(n in r))return console.error("API yanıtında '".concat(n,"' alanı bulunamadı:"),e),null;r=r[n]}}catch(e){a.e(e)}finally{a.f()}return r}for(var i=0,s=["base64","base64Content","content","document","documentContent","fileContent","data"];i<s.length;i++){var o=s[i];if(e&&"object"===$u(e)&&o in e){var c=e[o];if("string"==typeof c&&(c.startsWith("data:")||this._isBase64(c)))return c}}return"string"==typeof e&&(e.startsWith("data:")||this._isBase64(e))?e:(console.error("API yanıtında base64 içerik bulunamadı:",e),null)}},{key:"_handleBase64Document",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.loadingElement&&this.loadingElement.parentNode&&(this.loadingElement.parentNode.removeChild(this.loadingElement),this.loadingElement=null),this._clearTimeouts(),this.currentAdapter&&(this.currentAdapter.destroy(),this.currentAdapter=null);var a=this._detectDocumentType(e);if(!a){var n=new Error("Belge türü belirlenemedi veya desteklenmiyor");return console.error("ApiViewerAdapter yükleme hatası:",n),this._handleError(n.message,r),Promise.reject(n)}console.log("ApiViewerAdapter: Belge türü '".concat(a,"' olarak tespit edildi")),this.contentContainer.innerHTML="";var i=this.documentAdapters[a];if(!i){var s=new Error("'".concat(a,"' türü için adaptör bulunamadı"));return console.error("ApiViewerAdapter yükleme hatası:",s),this._handleError(s.message,r),Promise.reject(s)}try{return this.currentAdapter=new i(this.contentContainer,this.config),this.currentAdapter.loadDocument(e,zu(zu({},r),{},{onSuccess:function(){t.zoomLevel=t.currentAdapter.getZoom(),t.currentPage=t.currentAdapter.getCurrentPage(),t.pageCount=t.currentAdapter.getPageCount(),console.log("ApiViewerAdapter: Belge başarıyla yüklendi ve görüntülendi"),r.onSuccess&&r.onSuccess()},onError:function(e){t._handleError(e.message,r)}}))}catch(n){return console.error("Adaptör oluşturma hatası:",n),this._handleError("Belge görüntüleyici oluşturulurken bir hata oluştu: ".concat(n.message),r),Promise.reject(n)}}},{key:"_detectDocumentType",value:function(e){if(!e||"string"!=typeof e)return null;if(e.startsWith("data:")){if(e.startsWith("data:application/pdf"))return"pdf";if(e.startsWith("data:application/vnd.openxmlformats-officedocument.wordprocessingml.document"))return"word";if(e.startsWith("data:image/"))return"image";if(e.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"))return"excel"}return e.startsWith("JVBERi0")?"pdf":e.startsWith("UEsDBBQ")?"word":e.startsWith("iVBORw0K")||e.startsWith("/9j/")?"image":null}},{key:"_isBase64",value:function(e){return"string"==typeof e&&/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{key:"_applyZoom",value:function(){var e=this;return this.currentAdapter&&"function"==typeof this.currentAdapter._applyZoom?(this.currentAdapter.zoomLevel=this.zoomLevel,this.currentAdapter._applyZoom().then((function(t){return e.zoomLevel=e.currentAdapter.getZoom(),e.zoomLevel}))):Promise.resolve(this.zoomLevel)}},{key:"zoomIn",value:function(){if(this.currentAdapter){var e=this.currentAdapter.zoomIn();return this.zoomLevel=this.currentAdapter.getZoom(),e}return Vu(t,"zoomIn",this,3)([])}},{key:"zoomOut",value:function(){if(this.currentAdapter){var e=this.currentAdapter.zoomOut();return this.zoomLevel=this.currentAdapter.getZoom(),e}return Vu(t,"zoomOut",this,3)([])}},{key:"nextPage",value:function(){return this.currentAdapter&&"function"==typeof this.currentAdapter.nextPage?this.currentPage=this.currentAdapter.nextPage():Vu(t,"nextPage",this,3)([]),this.currentPage}},{key:"previousPage",value:function(){return this.currentAdapter&&"function"==typeof this.currentAdapter.previousPage?this.currentPage=this.currentAdapter.previousPage():Vu(t,"previousPage",this,3)([]),this.currentPage}},{key:"destroy",value:function(){this._clearTimeouts(),this.currentAdapter&&(this.currentAdapter.destroy(),this.currentAdapter=null),this.contentContainer&&this.container&&this.container.removeChild(this.contentContainer),this.contentContainer=null,this.loadingElement=null,Vu(t,"destroy",this,3)([])}}],a&&Xu(r.prototype,a),n&&Xu(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,n}(g);"undefined"!=typeof window&&(window.UniversalDocViewer=c,document.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("dms-document-viewer");if(e){var t=new c(e,{defaultZoom:1,toolbar:!0,mouseWheelZoom:!0});window.documentViewer=t;var r=document.querySelector(".udv-btn-test");r&&r.addEventListener("click",(function(){var e=document.createElement("input");e.type="file",e.accept=".pdf,.docx,.xlsx,.png,.jpg,.jpeg",e.addEventListener("change",(function(e){if(e.target.files.length>0){var r=e.target.files[0];t.loadDocument(r)}})),e.click()}))}})));const Qu=c})(),__webpack_exports__=__webpack_exports__.default,__webpack_exports__})()));