{"ast":null,"code":"/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2023 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @licend The above is the entire license notice for the\n * JavaScript code in this page\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n  if (typeof exports === 'object' && typeof module === 'object') module.exports = root.pdfjsLib = factory();else if (typeof define === 'function' && define.amd) define(\"pdfjs-dist/build/pdf\", [], () => {\n    return root.pdfjsLib = factory();\n  });else if (typeof exports === 'object') exports[\"pdfjs-dist/build/pdf\"] = root.pdfjsLib = factory();else root[\"pdfjs-dist/build/pdf\"] = root.pdfjsLib = factory();\n})(globalThis, () => {\n  return (/******/(() => {\n      // webpackBootstrap\n      /******/\n      \"use strict\";\n\n      /******/\n      var __webpack_modules__ = [\n        /* 0 */\n      , /* 1 */\n      /***/(__unused_webpack_module, exports) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.VerbosityLevel = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.RenderingIntentFlag = exports.PromiseCapability = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.MAX_IMAGE_SIZE_TO_CACHE = exports.LINE_FACTOR = exports.LINE_DESCENT_FACTOR = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FeatureTest = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.BASELINE_FACTOR = exports.AnnotationType = exports.AnnotationReplyType = exports.AnnotationPrefix = exports.AnnotationMode = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationEditorType = exports.AnnotationEditorPrefix = exports.AnnotationEditorParamsType = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0;\n        exports.assert = assert;\n        exports.bytesToString = bytesToString;\n        exports.createValidAbsoluteUrl = createValidAbsoluteUrl;\n        exports.getModificationDate = getModificationDate;\n        exports.getUuid = getUuid;\n        exports.getVerbosityLevel = getVerbosityLevel;\n        exports.info = info;\n        exports.isArrayBuffer = isArrayBuffer;\n        exports.isArrayEqual = isArrayEqual;\n        exports.isNodeJS = void 0;\n        exports.normalizeUnicode = normalizeUnicode;\n        exports.objectFromMap = objectFromMap;\n        exports.objectSize = objectSize;\n        exports.setVerbosityLevel = setVerbosityLevel;\n        exports.shadow = shadow;\n        exports.string32 = string32;\n        exports.stringToBytes = stringToBytes;\n        exports.stringToPDFString = stringToPDFString;\n        exports.stringToUTF8String = stringToUTF8String;\n        exports.unreachable = unreachable;\n        exports.utf8StringToString = utf8StringToString;\n        exports.warn = warn;\n        const isNodeJS = typeof process === \"object\" && process + \"\" === \"[object process]\" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== \"browser\");\n        exports.isNodeJS = isNodeJS;\n        const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\n        exports.IDENTITY_MATRIX = IDENTITY_MATRIX;\n        const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\n        exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX;\n        const MAX_IMAGE_SIZE_TO_CACHE = 10e6;\n        exports.MAX_IMAGE_SIZE_TO_CACHE = MAX_IMAGE_SIZE_TO_CACHE;\n        const LINE_FACTOR = 1.35;\n        exports.LINE_FACTOR = LINE_FACTOR;\n        const LINE_DESCENT_FACTOR = 0.35;\n        exports.LINE_DESCENT_FACTOR = LINE_DESCENT_FACTOR;\n        const BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;\n        exports.BASELINE_FACTOR = BASELINE_FACTOR;\n        const RenderingIntentFlag = {\n          ANY: 0x01,\n          DISPLAY: 0x02,\n          PRINT: 0x04,\n          SAVE: 0x08,\n          ANNOTATIONS_FORMS: 0x10,\n          ANNOTATIONS_STORAGE: 0x20,\n          ANNOTATIONS_DISABLE: 0x40,\n          OPLIST: 0x100\n        };\n        exports.RenderingIntentFlag = RenderingIntentFlag;\n        const AnnotationMode = {\n          DISABLE: 0,\n          ENABLE: 1,\n          ENABLE_FORMS: 2,\n          ENABLE_STORAGE: 3\n        };\n        exports.AnnotationMode = AnnotationMode;\n        const AnnotationEditorPrefix = \"pdfjs_internal_editor_\";\n        exports.AnnotationEditorPrefix = AnnotationEditorPrefix;\n        const AnnotationEditorType = {\n          DISABLE: -1,\n          NONE: 0,\n          FREETEXT: 3,\n          STAMP: 13,\n          INK: 15\n        };\n        exports.AnnotationEditorType = AnnotationEditorType;\n        const AnnotationEditorParamsType = {\n          RESIZE: 1,\n          CREATE: 2,\n          FREETEXT_SIZE: 11,\n          FREETEXT_COLOR: 12,\n          FREETEXT_OPACITY: 13,\n          INK_COLOR: 21,\n          INK_THICKNESS: 22,\n          INK_OPACITY: 23\n        };\n        exports.AnnotationEditorParamsType = AnnotationEditorParamsType;\n        const PermissionFlag = {\n          PRINT: 0x04,\n          MODIFY_CONTENTS: 0x08,\n          COPY: 0x10,\n          MODIFY_ANNOTATIONS: 0x20,\n          FILL_INTERACTIVE_FORMS: 0x100,\n          COPY_FOR_ACCESSIBILITY: 0x200,\n          ASSEMBLE: 0x400,\n          PRINT_HIGH_QUALITY: 0x800\n        };\n        exports.PermissionFlag = PermissionFlag;\n        const TextRenderingMode = {\n          FILL: 0,\n          STROKE: 1,\n          FILL_STROKE: 2,\n          INVISIBLE: 3,\n          FILL_ADD_TO_PATH: 4,\n          STROKE_ADD_TO_PATH: 5,\n          FILL_STROKE_ADD_TO_PATH: 6,\n          ADD_TO_PATH: 7,\n          FILL_STROKE_MASK: 3,\n          ADD_TO_PATH_FLAG: 4\n        };\n        exports.TextRenderingMode = TextRenderingMode;\n        const ImageKind = {\n          GRAYSCALE_1BPP: 1,\n          RGB_24BPP: 2,\n          RGBA_32BPP: 3\n        };\n        exports.ImageKind = ImageKind;\n        const AnnotationType = {\n          TEXT: 1,\n          LINK: 2,\n          FREETEXT: 3,\n          LINE: 4,\n          SQUARE: 5,\n          CIRCLE: 6,\n          POLYGON: 7,\n          POLYLINE: 8,\n          HIGHLIGHT: 9,\n          UNDERLINE: 10,\n          SQUIGGLY: 11,\n          STRIKEOUT: 12,\n          STAMP: 13,\n          CARET: 14,\n          INK: 15,\n          POPUP: 16,\n          FILEATTACHMENT: 17,\n          SOUND: 18,\n          MOVIE: 19,\n          WIDGET: 20,\n          SCREEN: 21,\n          PRINTERMARK: 22,\n          TRAPNET: 23,\n          WATERMARK: 24,\n          THREED: 25,\n          REDACT: 26\n        };\n        exports.AnnotationType = AnnotationType;\n        const AnnotationReplyType = {\n          GROUP: \"Group\",\n          REPLY: \"R\"\n        };\n        exports.AnnotationReplyType = AnnotationReplyType;\n        const AnnotationFlag = {\n          INVISIBLE: 0x01,\n          HIDDEN: 0x02,\n          PRINT: 0x04,\n          NOZOOM: 0x08,\n          NOROTATE: 0x10,\n          NOVIEW: 0x20,\n          READONLY: 0x40,\n          LOCKED: 0x80,\n          TOGGLENOVIEW: 0x100,\n          LOCKEDCONTENTS: 0x200\n        };\n        exports.AnnotationFlag = AnnotationFlag;\n        const AnnotationFieldFlag = {\n          READONLY: 0x0000001,\n          REQUIRED: 0x0000002,\n          NOEXPORT: 0x0000004,\n          MULTILINE: 0x0001000,\n          PASSWORD: 0x0002000,\n          NOTOGGLETOOFF: 0x0004000,\n          RADIO: 0x0008000,\n          PUSHBUTTON: 0x0010000,\n          COMBO: 0x0020000,\n          EDIT: 0x0040000,\n          SORT: 0x0080000,\n          FILESELECT: 0x0100000,\n          MULTISELECT: 0x0200000,\n          DONOTSPELLCHECK: 0x0400000,\n          DONOTSCROLL: 0x0800000,\n          COMB: 0x1000000,\n          RICHTEXT: 0x2000000,\n          RADIOSINUNISON: 0x2000000,\n          COMMITONSELCHANGE: 0x4000000\n        };\n        exports.AnnotationFieldFlag = AnnotationFieldFlag;\n        const AnnotationBorderStyleType = {\n          SOLID: 1,\n          DASHED: 2,\n          BEVELED: 3,\n          INSET: 4,\n          UNDERLINE: 5\n        };\n        exports.AnnotationBorderStyleType = AnnotationBorderStyleType;\n        const AnnotationActionEventType = {\n          E: \"Mouse Enter\",\n          X: \"Mouse Exit\",\n          D: \"Mouse Down\",\n          U: \"Mouse Up\",\n          Fo: \"Focus\",\n          Bl: \"Blur\",\n          PO: \"PageOpen\",\n          PC: \"PageClose\",\n          PV: \"PageVisible\",\n          PI: \"PageInvisible\",\n          K: \"Keystroke\",\n          F: \"Format\",\n          V: \"Validate\",\n          C: \"Calculate\"\n        };\n        exports.AnnotationActionEventType = AnnotationActionEventType;\n        const DocumentActionEventType = {\n          WC: \"WillClose\",\n          WS: \"WillSave\",\n          DS: \"DidSave\",\n          WP: \"WillPrint\",\n          DP: \"DidPrint\"\n        };\n        exports.DocumentActionEventType = DocumentActionEventType;\n        const PageActionEventType = {\n          O: \"PageOpen\",\n          C: \"PageClose\"\n        };\n        exports.PageActionEventType = PageActionEventType;\n        const VerbosityLevel = {\n          ERRORS: 0,\n          WARNINGS: 1,\n          INFOS: 5\n        };\n        exports.VerbosityLevel = VerbosityLevel;\n        const CMapCompressionType = {\n          NONE: 0,\n          BINARY: 1\n        };\n        exports.CMapCompressionType = CMapCompressionType;\n        const OPS = {\n          dependency: 1,\n          setLineWidth: 2,\n          setLineCap: 3,\n          setLineJoin: 4,\n          setMiterLimit: 5,\n          setDash: 6,\n          setRenderingIntent: 7,\n          setFlatness: 8,\n          setGState: 9,\n          save: 10,\n          restore: 11,\n          transform: 12,\n          moveTo: 13,\n          lineTo: 14,\n          curveTo: 15,\n          curveTo2: 16,\n          curveTo3: 17,\n          closePath: 18,\n          rectangle: 19,\n          stroke: 20,\n          closeStroke: 21,\n          fill: 22,\n          eoFill: 23,\n          fillStroke: 24,\n          eoFillStroke: 25,\n          closeFillStroke: 26,\n          closeEOFillStroke: 27,\n          endPath: 28,\n          clip: 29,\n          eoClip: 30,\n          beginText: 31,\n          endText: 32,\n          setCharSpacing: 33,\n          setWordSpacing: 34,\n          setHScale: 35,\n          setLeading: 36,\n          setFont: 37,\n          setTextRenderingMode: 38,\n          setTextRise: 39,\n          moveText: 40,\n          setLeadingMoveText: 41,\n          setTextMatrix: 42,\n          nextLine: 43,\n          showText: 44,\n          showSpacedText: 45,\n          nextLineShowText: 46,\n          nextLineSetSpacingShowText: 47,\n          setCharWidth: 48,\n          setCharWidthAndBounds: 49,\n          setStrokeColorSpace: 50,\n          setFillColorSpace: 51,\n          setStrokeColor: 52,\n          setStrokeColorN: 53,\n          setFillColor: 54,\n          setFillColorN: 55,\n          setStrokeGray: 56,\n          setFillGray: 57,\n          setStrokeRGBColor: 58,\n          setFillRGBColor: 59,\n          setStrokeCMYKColor: 60,\n          setFillCMYKColor: 61,\n          shadingFill: 62,\n          beginInlineImage: 63,\n          beginImageData: 64,\n          endInlineImage: 65,\n          paintXObject: 66,\n          markPoint: 67,\n          markPointProps: 68,\n          beginMarkedContent: 69,\n          beginMarkedContentProps: 70,\n          endMarkedContent: 71,\n          beginCompat: 72,\n          endCompat: 73,\n          paintFormXObjectBegin: 74,\n          paintFormXObjectEnd: 75,\n          beginGroup: 76,\n          endGroup: 77,\n          beginAnnotation: 80,\n          endAnnotation: 81,\n          paintImageMaskXObject: 83,\n          paintImageMaskXObjectGroup: 84,\n          paintImageXObject: 85,\n          paintInlineImageXObject: 86,\n          paintInlineImageXObjectGroup: 87,\n          paintImageXObjectRepeat: 88,\n          paintImageMaskXObjectRepeat: 89,\n          paintSolidColorImageMask: 90,\n          constructPath: 91\n        };\n        exports.OPS = OPS;\n        const PasswordResponses = {\n          NEED_PASSWORD: 1,\n          INCORRECT_PASSWORD: 2\n        };\n        exports.PasswordResponses = PasswordResponses;\n        let verbosity = VerbosityLevel.WARNINGS;\n        function setVerbosityLevel(level) {\n          if (Number.isInteger(level)) {\n            verbosity = level;\n          }\n        }\n        function getVerbosityLevel() {\n          return verbosity;\n        }\n        function info(msg) {\n          if (verbosity >= VerbosityLevel.INFOS) {\n            console.log(`Info: ${msg}`);\n          }\n        }\n        function warn(msg) {\n          if (verbosity >= VerbosityLevel.WARNINGS) {\n            console.log(`Warning: ${msg}`);\n          }\n        }\n        function unreachable(msg) {\n          throw new Error(msg);\n        }\n        function assert(cond, msg) {\n          if (!cond) {\n            unreachable(msg);\n          }\n        }\n        function _isValidProtocol(url) {\n          switch (url?.protocol) {\n            case \"http:\":\n            case \"https:\":\n            case \"ftp:\":\n            case \"mailto:\":\n            case \"tel:\":\n              return true;\n            default:\n              return false;\n          }\n        }\n        function createValidAbsoluteUrl(url, baseUrl = null, options = null) {\n          if (!url) {\n            return null;\n          }\n          try {\n            if (options && typeof url === \"string\") {\n              if (options.addDefaultProtocol && url.startsWith(\"www.\")) {\n                const dots = url.match(/\\./g);\n                if (dots?.length >= 2) {\n                  url = `http://${url}`;\n                }\n              }\n              if (options.tryConvertEncoding) {\n                try {\n                  url = stringToUTF8String(url);\n                } catch {}\n              }\n            }\n            const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n            if (_isValidProtocol(absoluteUrl)) {\n              return absoluteUrl;\n            }\n          } catch {}\n          return null;\n        }\n        function shadow(obj, prop, value, nonSerializable = false) {\n          Object.defineProperty(obj, prop, {\n            value,\n            enumerable: !nonSerializable,\n            configurable: true,\n            writable: false\n          });\n          return value;\n        }\n        const BaseException = function BaseExceptionClosure() {\n          function BaseException(message, name) {\n            if (this.constructor === BaseException) {\n              unreachable(\"Cannot initialize BaseException.\");\n            }\n            this.message = message;\n            this.name = name;\n          }\n          BaseException.prototype = new Error();\n          BaseException.constructor = BaseException;\n          return BaseException;\n        }();\n        exports.BaseException = BaseException;\n        class PasswordException extends BaseException {\n          constructor(msg, code) {\n            super(msg, \"PasswordException\");\n            this.code = code;\n          }\n        }\n        exports.PasswordException = PasswordException;\n        class UnknownErrorException extends BaseException {\n          constructor(msg, details) {\n            super(msg, \"UnknownErrorException\");\n            this.details = details;\n          }\n        }\n        exports.UnknownErrorException = UnknownErrorException;\n        class InvalidPDFException extends BaseException {\n          constructor(msg) {\n            super(msg, \"InvalidPDFException\");\n          }\n        }\n        exports.InvalidPDFException = InvalidPDFException;\n        class MissingPDFException extends BaseException {\n          constructor(msg) {\n            super(msg, \"MissingPDFException\");\n          }\n        }\n        exports.MissingPDFException = MissingPDFException;\n        class UnexpectedResponseException extends BaseException {\n          constructor(msg, status) {\n            super(msg, \"UnexpectedResponseException\");\n            this.status = status;\n          }\n        }\n        exports.UnexpectedResponseException = UnexpectedResponseException;\n        class FormatError extends BaseException {\n          constructor(msg) {\n            super(msg, \"FormatError\");\n          }\n        }\n        exports.FormatError = FormatError;\n        class AbortException extends BaseException {\n          constructor(msg) {\n            super(msg, \"AbortException\");\n          }\n        }\n        exports.AbortException = AbortException;\n        function bytesToString(bytes) {\n          if (typeof bytes !== \"object\" || bytes?.length === undefined) {\n            unreachable(\"Invalid argument for bytesToString\");\n          }\n          const length = bytes.length;\n          const MAX_ARGUMENT_COUNT = 8192;\n          if (length < MAX_ARGUMENT_COUNT) {\n            return String.fromCharCode.apply(null, bytes);\n          }\n          const strBuf = [];\n          for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n            const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n            const chunk = bytes.subarray(i, chunkEnd);\n            strBuf.push(String.fromCharCode.apply(null, chunk));\n          }\n          return strBuf.join(\"\");\n        }\n        function stringToBytes(str) {\n          if (typeof str !== \"string\") {\n            unreachable(\"Invalid argument for stringToBytes\");\n          }\n          const length = str.length;\n          const bytes = new Uint8Array(length);\n          for (let i = 0; i < length; ++i) {\n            bytes[i] = str.charCodeAt(i) & 0xff;\n          }\n          return bytes;\n        }\n        function string32(value) {\n          return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff);\n        }\n        function objectSize(obj) {\n          return Object.keys(obj).length;\n        }\n        function objectFromMap(map) {\n          const obj = Object.create(null);\n          for (const [key, value] of map) {\n            obj[key] = value;\n          }\n          return obj;\n        }\n        function isLittleEndian() {\n          const buffer8 = new Uint8Array(4);\n          buffer8[0] = 1;\n          const view32 = new Uint32Array(buffer8.buffer, 0, 1);\n          return view32[0] === 1;\n        }\n        function isEvalSupported() {\n          try {\n            new Function(\"\");\n            return true;\n          } catch {\n            return false;\n          }\n        }\n        class FeatureTest {\n          static get isLittleEndian() {\n            return shadow(this, \"isLittleEndian\", isLittleEndian());\n          }\n          static get isEvalSupported() {\n            return shadow(this, \"isEvalSupported\", isEvalSupported());\n          }\n          static get isOffscreenCanvasSupported() {\n            return shadow(this, \"isOffscreenCanvasSupported\", typeof OffscreenCanvas !== \"undefined\");\n          }\n          static get platform() {\n            if (typeof navigator === \"undefined\") {\n              return shadow(this, \"platform\", {\n                isWin: false,\n                isMac: false\n              });\n            }\n            return shadow(this, \"platform\", {\n              isWin: navigator.platform.includes(\"Win\"),\n              isMac: navigator.platform.includes(\"Mac\")\n            });\n          }\n          static get isCSSRoundSupported() {\n            return shadow(this, \"isCSSRoundSupported\", globalThis.CSS?.supports?.(\"width: round(1.5px, 1px)\"));\n          }\n        }\n        exports.FeatureTest = FeatureTest;\n        const hexNumbers = [...Array(256).keys()].map(n => n.toString(16).padStart(2, \"0\"));\n        class Util {\n          static makeHexColor(r, g, b) {\n            return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;\n          }\n          static scaleMinMax(transform, minMax) {\n            let temp;\n            if (transform[0]) {\n              if (transform[0] < 0) {\n                temp = minMax[0];\n                minMax[0] = minMax[1];\n                minMax[1] = temp;\n              }\n              minMax[0] *= transform[0];\n              minMax[1] *= transform[0];\n              if (transform[3] < 0) {\n                temp = minMax[2];\n                minMax[2] = minMax[3];\n                minMax[3] = temp;\n              }\n              minMax[2] *= transform[3];\n              minMax[3] *= transform[3];\n            } else {\n              temp = minMax[0];\n              minMax[0] = minMax[2];\n              minMax[2] = temp;\n              temp = minMax[1];\n              minMax[1] = minMax[3];\n              minMax[3] = temp;\n              if (transform[1] < 0) {\n                temp = minMax[2];\n                minMax[2] = minMax[3];\n                minMax[3] = temp;\n              }\n              minMax[2] *= transform[1];\n              minMax[3] *= transform[1];\n              if (transform[2] < 0) {\n                temp = minMax[0];\n                minMax[0] = minMax[1];\n                minMax[1] = temp;\n              }\n              minMax[0] *= transform[2];\n              minMax[1] *= transform[2];\n            }\n            minMax[0] += transform[4];\n            minMax[1] += transform[4];\n            minMax[2] += transform[5];\n            minMax[3] += transform[5];\n          }\n          static transform(m1, m2) {\n            return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];\n          }\n          static applyTransform(p, m) {\n            const xt = p[0] * m[0] + p[1] * m[2] + m[4];\n            const yt = p[0] * m[1] + p[1] * m[3] + m[5];\n            return [xt, yt];\n          }\n          static applyInverseTransform(p, m) {\n            const d = m[0] * m[3] - m[1] * m[2];\n            const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n            const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n            return [xt, yt];\n          }\n          static getAxialAlignedBoundingBox(r, m) {\n            const p1 = this.applyTransform(r, m);\n            const p2 = this.applyTransform(r.slice(2, 4), m);\n            const p3 = this.applyTransform([r[0], r[3]], m);\n            const p4 = this.applyTransform([r[2], r[1]], m);\n            return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])];\n          }\n          static inverseTransform(m) {\n            const d = m[0] * m[3] - m[1] * m[2];\n            return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];\n          }\n          static singularValueDecompose2dScale(m) {\n            const transpose = [m[0], m[2], m[1], m[3]];\n            const a = m[0] * transpose[0] + m[1] * transpose[2];\n            const b = m[0] * transpose[1] + m[1] * transpose[3];\n            const c = m[2] * transpose[0] + m[3] * transpose[2];\n            const d = m[2] * transpose[1] + m[3] * transpose[3];\n            const first = (a + d) / 2;\n            const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2;\n            const sx = first + second || 1;\n            const sy = first - second || 1;\n            return [Math.sqrt(sx), Math.sqrt(sy)];\n          }\n          static normalizeRect(rect) {\n            const r = rect.slice(0);\n            if (rect[0] > rect[2]) {\n              r[0] = rect[2];\n              r[2] = rect[0];\n            }\n            if (rect[1] > rect[3]) {\n              r[1] = rect[3];\n              r[3] = rect[1];\n            }\n            return r;\n          }\n          static intersect(rect1, rect2) {\n            const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2]));\n            const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2]));\n            if (xLow > xHigh) {\n              return null;\n            }\n            const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3]));\n            const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3]));\n            if (yLow > yHigh) {\n              return null;\n            }\n            return [xLow, yLow, xHigh, yHigh];\n          }\n          static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3) {\n            const tvalues = [],\n              bounds = [[], []];\n            let a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n            for (let i = 0; i < 2; ++i) {\n              if (i === 0) {\n                b = 6 * x0 - 12 * x1 + 6 * x2;\n                a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n                c = 3 * x1 - 3 * x0;\n              } else {\n                b = 6 * y0 - 12 * y1 + 6 * y2;\n                a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n                c = 3 * y1 - 3 * y0;\n              }\n              if (Math.abs(a) < 1e-12) {\n                if (Math.abs(b) < 1e-12) {\n                  continue;\n                }\n                t = -c / b;\n                if (0 < t && t < 1) {\n                  tvalues.push(t);\n                }\n                continue;\n              }\n              b2ac = b * b - 4 * c * a;\n              sqrtb2ac = Math.sqrt(b2ac);\n              if (b2ac < 0) {\n                continue;\n              }\n              t1 = (-b + sqrtb2ac) / (2 * a);\n              if (0 < t1 && t1 < 1) {\n                tvalues.push(t1);\n              }\n              t2 = (-b - sqrtb2ac) / (2 * a);\n              if (0 < t2 && t2 < 1) {\n                tvalues.push(t2);\n              }\n            }\n            let j = tvalues.length,\n              mt;\n            const jlen = j;\n            while (j--) {\n              t = tvalues[j];\n              mt = 1 - t;\n              bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n              bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n            }\n            bounds[0][jlen] = x0;\n            bounds[1][jlen] = y0;\n            bounds[0][jlen + 1] = x3;\n            bounds[1][jlen + 1] = y3;\n            bounds[0].length = bounds[1].length = jlen + 2;\n            return [Math.min(...bounds[0]), Math.min(...bounds[1]), Math.max(...bounds[0]), Math.max(...bounds[1])];\n          }\n        }\n        exports.Util = Util;\n        const PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8, 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d, 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac];\n        function stringToPDFString(str) {\n          if (str[0] >= \"\\xEF\") {\n            let encoding;\n            if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n              encoding = \"utf-16be\";\n            } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n              encoding = \"utf-16le\";\n            } else if (str[0] === \"\\xEF\" && str[1] === \"\\xBB\" && str[2] === \"\\xBF\") {\n              encoding = \"utf-8\";\n            }\n            if (encoding) {\n              try {\n                const decoder = new TextDecoder(encoding, {\n                  fatal: true\n                });\n                const buffer = stringToBytes(str);\n                return decoder.decode(buffer);\n              } catch (ex) {\n                warn(`stringToPDFString: \"${ex}\".`);\n              }\n            }\n          }\n          const strBuf = [];\n          for (let i = 0, ii = str.length; i < ii; i++) {\n            const code = PDFStringTranslateTable[str.charCodeAt(i)];\n            strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n          }\n          return strBuf.join(\"\");\n        }\n        function stringToUTF8String(str) {\n          return decodeURIComponent(escape(str));\n        }\n        function utf8StringToString(str) {\n          return unescape(encodeURIComponent(str));\n        }\n        function isArrayBuffer(v) {\n          return typeof v === \"object\" && v?.byteLength !== undefined;\n        }\n        function isArrayEqual(arr1, arr2) {\n          if (arr1.length !== arr2.length) {\n            return false;\n          }\n          for (let i = 0, ii = arr1.length; i < ii; i++) {\n            if (arr1[i] !== arr2[i]) {\n              return false;\n            }\n          }\n          return true;\n        }\n        function getModificationDate(date = new Date()) {\n          const buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, \"0\"), date.getUTCDate().toString().padStart(2, \"0\"), date.getUTCHours().toString().padStart(2, \"0\"), date.getUTCMinutes().toString().padStart(2, \"0\"), date.getUTCSeconds().toString().padStart(2, \"0\")];\n          return buffer.join(\"\");\n        }\n        class PromiseCapability {\n          #settled = false;\n          constructor() {\n            this.promise = new Promise((resolve, reject) => {\n              this.resolve = data => {\n                this.#settled = true;\n                resolve(data);\n              };\n              this.reject = reason => {\n                this.#settled = true;\n                reject(reason);\n              };\n            });\n          }\n          get settled() {\n            return this.#settled;\n          }\n        }\n        exports.PromiseCapability = PromiseCapability;\n        let NormalizeRegex = null;\n        let NormalizationMap = null;\n        function normalizeUnicode(str) {\n          if (!NormalizeRegex) {\n            NormalizeRegex = /([\\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;\n            NormalizationMap = new Map([[\"ﬅ\", \"ſt\"]]);\n          }\n          return str.replaceAll(NormalizeRegex, (_, p1, p2) => {\n            return p1 ? p1.normalize(\"NFKC\") : NormalizationMap.get(p2);\n          });\n        }\n        function getUuid() {\n          if (typeof crypto !== \"undefined\" && typeof crypto?.randomUUID === \"function\") {\n            return crypto.randomUUID();\n          }\n          const buf = new Uint8Array(32);\n          if (typeof crypto !== \"undefined\" && typeof crypto?.getRandomValues === \"function\") {\n            crypto.getRandomValues(buf);\n          } else {\n            for (let i = 0; i < 32; i++) {\n              buf[i] = Math.floor(Math.random() * 255);\n            }\n          }\n          return bytesToString(buf);\n        }\n        const AnnotationPrefix = \"pdfjs_internal_id_\";\n        exports.AnnotationPrefix = AnnotationPrefix;\n\n        /***/\n      }, /* 2 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        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;\n        Object.defineProperty(exports, \"SVGGraphics\", {\n          enumerable: true,\n          get: function () {\n            return _displaySvg.SVGGraphics;\n          }\n        });\n        exports.build = void 0;\n        exports.getDocument = getDocument;\n        exports.version = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _annotation_storage = __w_pdfjs_require__(3);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _font_loader = __w_pdfjs_require__(9);\n        var _displayNode_utils = __w_pdfjs_require__(10);\n        var _canvas = __w_pdfjs_require__(11);\n        var _worker_options = __w_pdfjs_require__(14);\n        var _message_handler = __w_pdfjs_require__(15);\n        var _metadata = __w_pdfjs_require__(16);\n        var _optional_content_config = __w_pdfjs_require__(17);\n        var _transport_stream = __w_pdfjs_require__(18);\n        var _displayFetch_stream = __w_pdfjs_require__(19);\n        var _displayNetwork = __w_pdfjs_require__(22);\n        var _displayNode_stream = __w_pdfjs_require__(23);\n        var _displaySvg = __w_pdfjs_require__(24);\n        var _xfa_text = __w_pdfjs_require__(25);\n        const DEFAULT_RANGE_CHUNK_SIZE = 65536;\n        const RENDERING_CANCELLED_TIMEOUT = 100;\n        const DELAYED_CLEANUP_TIMEOUT = 5000;\n        const DefaultCanvasFactory = _util.isNodeJS ? _displayNode_utils.NodeCanvasFactory : _display_utils.DOMCanvasFactory;\n        exports.DefaultCanvasFactory = DefaultCanvasFactory;\n        const DefaultCMapReaderFactory = _util.isNodeJS ? _displayNode_utils.NodeCMapReaderFactory : _display_utils.DOMCMapReaderFactory;\n        exports.DefaultCMapReaderFactory = DefaultCMapReaderFactory;\n        const DefaultFilterFactory = _util.isNodeJS ? _displayNode_utils.NodeFilterFactory : _display_utils.DOMFilterFactory;\n        exports.DefaultFilterFactory = DefaultFilterFactory;\n        const DefaultStandardFontDataFactory = _util.isNodeJS ? _displayNode_utils.NodeStandardFontDataFactory : _display_utils.DOMStandardFontDataFactory;\n        exports.DefaultStandardFontDataFactory = DefaultStandardFontDataFactory;\n        function getDocument(src) {\n          if (typeof src === \"string\" || src instanceof URL) {\n            src = {\n              url: src\n            };\n          } else if ((0, _util.isArrayBuffer)(src)) {\n            src = {\n              data: src\n            };\n          }\n          if (typeof src !== \"object\") {\n            throw new Error(\"Invalid parameter in getDocument, need parameter object.\");\n          }\n          if (!src.url && !src.data && !src.range) {\n            throw new Error(\"Invalid parameter object: need either .data, .range or .url\");\n          }\n          const task = new PDFDocumentLoadingTask();\n          const {\n            docId\n          } = task;\n          const url = src.url ? getUrlProp(src.url) : null;\n          const data = src.data ? getDataProp(src.data) : null;\n          const httpHeaders = src.httpHeaders || null;\n          const withCredentials = src.withCredentials === true;\n          const password = src.password ?? null;\n          const rangeTransport = src.range instanceof PDFDataRangeTransport ? src.range : null;\n          const rangeChunkSize = Number.isInteger(src.rangeChunkSize) && src.rangeChunkSize > 0 ? src.rangeChunkSize : DEFAULT_RANGE_CHUNK_SIZE;\n          let worker = src.worker instanceof PDFWorker ? src.worker : null;\n          const verbosity = src.verbosity;\n          const docBaseUrl = typeof src.docBaseUrl === \"string\" && !(0, _display_utils.isDataScheme)(src.docBaseUrl) ? src.docBaseUrl : null;\n          const cMapUrl = typeof src.cMapUrl === \"string\" ? src.cMapUrl : null;\n          const cMapPacked = src.cMapPacked !== false;\n          const CMapReaderFactory = src.CMapReaderFactory || DefaultCMapReaderFactory;\n          const standardFontDataUrl = typeof src.standardFontDataUrl === \"string\" ? src.standardFontDataUrl : null;\n          const StandardFontDataFactory = src.StandardFontDataFactory || DefaultStandardFontDataFactory;\n          const ignoreErrors = src.stopAtErrors !== true;\n          const maxImageSize = Number.isInteger(src.maxImageSize) && src.maxImageSize > -1 ? src.maxImageSize : -1;\n          const isEvalSupported = src.isEvalSupported !== false;\n          const isOffscreenCanvasSupported = typeof src.isOffscreenCanvasSupported === \"boolean\" ? src.isOffscreenCanvasSupported : !_util.isNodeJS;\n          const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes) ? src.canvasMaxAreaInBytes : -1;\n          const disableFontFace = typeof src.disableFontFace === \"boolean\" ? src.disableFontFace : _util.isNodeJS;\n          const fontExtraProperties = src.fontExtraProperties === true;\n          const enableXfa = src.enableXfa === true;\n          const ownerDocument = src.ownerDocument || globalThis.document;\n          const disableRange = src.disableRange === true;\n          const disableStream = src.disableStream === true;\n          const disableAutoFetch = src.disableAutoFetch === true;\n          const pdfBug = src.pdfBug === true;\n          const length = rangeTransport ? rangeTransport.length : src.length ?? NaN;\n          const useSystemFonts = typeof src.useSystemFonts === \"boolean\" ? src.useSystemFonts : !_util.isNodeJS && !disableFontFace;\n          const useWorkerFetch = typeof src.useWorkerFetch === \"boolean\" ? src.useWorkerFetch : CMapReaderFactory === _display_utils.DOMCMapReaderFactory && StandardFontDataFactory === _display_utils.DOMStandardFontDataFactory && cMapUrl && standardFontDataUrl && (0, _display_utils.isValidFetchUrl)(cMapUrl, document.baseURI) && (0, _display_utils.isValidFetchUrl)(standardFontDataUrl, document.baseURI);\n          const canvasFactory = src.canvasFactory || new DefaultCanvasFactory({\n            ownerDocument\n          });\n          const filterFactory = src.filterFactory || new DefaultFilterFactory({\n            docId,\n            ownerDocument\n          });\n          const styleElement = null;\n          (0, _util.setVerbosityLevel)(verbosity);\n          const transportFactory = {\n            canvasFactory,\n            filterFactory\n          };\n          if (!useWorkerFetch) {\n            transportFactory.cMapReaderFactory = new CMapReaderFactory({\n              baseUrl: cMapUrl,\n              isCompressed: cMapPacked\n            });\n            transportFactory.standardFontDataFactory = new StandardFontDataFactory({\n              baseUrl: standardFontDataUrl\n            });\n          }\n          if (!worker) {\n            const workerParams = {\n              verbosity,\n              port: _worker_options.GlobalWorkerOptions.workerPort\n            };\n            worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams);\n            task._worker = worker;\n          }\n          const fetchDocParams = {\n            docId,\n            apiVersion: '3.11.174',\n            data,\n            password,\n            disableAutoFetch,\n            rangeChunkSize,\n            length,\n            docBaseUrl,\n            enableXfa,\n            evaluatorOptions: {\n              maxImageSize,\n              disableFontFace,\n              ignoreErrors,\n              isEvalSupported,\n              isOffscreenCanvasSupported,\n              canvasMaxAreaInBytes,\n              fontExtraProperties,\n              useSystemFonts,\n              cMapUrl: useWorkerFetch ? cMapUrl : null,\n              standardFontDataUrl: useWorkerFetch ? standardFontDataUrl : null\n            }\n          };\n          const transportParams = {\n            ignoreErrors,\n            isEvalSupported,\n            disableFontFace,\n            fontExtraProperties,\n            enableXfa,\n            ownerDocument,\n            disableAutoFetch,\n            pdfBug,\n            styleElement\n          };\n          worker.promise.then(function () {\n            if (task.destroyed) {\n              throw new Error(\"Loading aborted\");\n            }\n            const workerIdPromise = _fetchDocument(worker, fetchDocParams);\n            const networkStreamPromise = new Promise(function (resolve) {\n              let networkStream;\n              if (rangeTransport) {\n                networkStream = new _transport_stream.PDFDataTransportStream({\n                  length,\n                  initialData: rangeTransport.initialData,\n                  progressiveDone: rangeTransport.progressiveDone,\n                  contentDispositionFilename: rangeTransport.contentDispositionFilename,\n                  disableRange,\n                  disableStream\n                }, rangeTransport);\n              } else if (!data) {\n                const createPDFNetworkStream = params => {\n                  if (_util.isNodeJS) {\n                    return new _displayNode_stream.PDFNodeStream(params);\n                  }\n                  return (0, _display_utils.isValidFetchUrl)(params.url) ? new _displayFetch_stream.PDFFetchStream(params) : new _displayNetwork.PDFNetworkStream(params);\n                };\n                networkStream = createPDFNetworkStream({\n                  url,\n                  length,\n                  httpHeaders,\n                  withCredentials,\n                  rangeChunkSize,\n                  disableRange,\n                  disableStream\n                });\n              }\n              resolve(networkStream);\n            });\n            return Promise.all([workerIdPromise, networkStreamPromise]).then(function ([workerId, networkStream]) {\n              if (task.destroyed) {\n                throw new Error(\"Loading aborted\");\n              }\n              const messageHandler = new _message_handler.MessageHandler(docId, workerId, worker.port);\n              const transport = new WorkerTransport(messageHandler, task, networkStream, transportParams, transportFactory);\n              task._transport = transport;\n              messageHandler.send(\"Ready\", null);\n            });\n          }).catch(task._capability.reject);\n          return task;\n        }\n        async function _fetchDocument(worker, source) {\n          if (worker.destroyed) {\n            throw new Error(\"Worker was destroyed\");\n          }\n          const workerId = await worker.messageHandler.sendWithPromise(\"GetDocRequest\", source, source.data ? [source.data.buffer] : null);\n          if (worker.destroyed) {\n            throw new Error(\"Worker was destroyed\");\n          }\n          return workerId;\n        }\n        function getUrlProp(val) {\n          if (val instanceof URL) {\n            return val.href;\n          }\n          try {\n            return new URL(val, window.location).href;\n          } catch {\n            if (_util.isNodeJS && typeof val === \"string\") {\n              return val;\n            }\n          }\n          throw new Error(\"Invalid PDF url data: \" + \"either string or URL-object is expected in the url property.\");\n        }\n        function getDataProp(val) {\n          if (_util.isNodeJS && typeof Buffer !== \"undefined\" && val instanceof Buffer) {\n            throw new Error(\"Please provide binary data as `Uint8Array`, rather than `Buffer`.\");\n          }\n          if (val instanceof Uint8Array && val.byteLength === val.buffer.byteLength) {\n            return val;\n          }\n          if (typeof val === \"string\") {\n            return (0, _util.stringToBytes)(val);\n          }\n          if (typeof val === \"object\" && !isNaN(val?.length) || (0, _util.isArrayBuffer)(val)) {\n            return new Uint8Array(val);\n          }\n          throw new Error(\"Invalid PDF binary data: either TypedArray, \" + \"string, or array-like object is expected in the data property.\");\n        }\n        class PDFDocumentLoadingTask {\n          static #docId = 0;\n          constructor() {\n            this._capability = new _util.PromiseCapability();\n            this._transport = null;\n            this._worker = null;\n            this.docId = `d${PDFDocumentLoadingTask.#docId++}`;\n            this.destroyed = false;\n            this.onPassword = null;\n            this.onProgress = null;\n          }\n          get promise() {\n            return this._capability.promise;\n          }\n          async destroy() {\n            this.destroyed = true;\n            try {\n              if (this._worker?.port) {\n                this._worker._pendingDestroy = true;\n              }\n              await this._transport?.destroy();\n            } catch (ex) {\n              if (this._worker?.port) {\n                delete this._worker._pendingDestroy;\n              }\n              throw ex;\n            }\n            this._transport = null;\n            if (this._worker) {\n              this._worker.destroy();\n              this._worker = null;\n            }\n          }\n        }\n        exports.PDFDocumentLoadingTask = PDFDocumentLoadingTask;\n        class PDFDataRangeTransport {\n          constructor(length, initialData, progressiveDone = false, contentDispositionFilename = null) {\n            this.length = length;\n            this.initialData = initialData;\n            this.progressiveDone = progressiveDone;\n            this.contentDispositionFilename = contentDispositionFilename;\n            this._rangeListeners = [];\n            this._progressListeners = [];\n            this._progressiveReadListeners = [];\n            this._progressiveDoneListeners = [];\n            this._readyCapability = new _util.PromiseCapability();\n          }\n          addRangeListener(listener) {\n            this._rangeListeners.push(listener);\n          }\n          addProgressListener(listener) {\n            this._progressListeners.push(listener);\n          }\n          addProgressiveReadListener(listener) {\n            this._progressiveReadListeners.push(listener);\n          }\n          addProgressiveDoneListener(listener) {\n            this._progressiveDoneListeners.push(listener);\n          }\n          onDataRange(begin, chunk) {\n            for (const listener of this._rangeListeners) {\n              listener(begin, chunk);\n            }\n          }\n          onDataProgress(loaded, total) {\n            this._readyCapability.promise.then(() => {\n              for (const listener of this._progressListeners) {\n                listener(loaded, total);\n              }\n            });\n          }\n          onDataProgressiveRead(chunk) {\n            this._readyCapability.promise.then(() => {\n              for (const listener of this._progressiveReadListeners) {\n                listener(chunk);\n              }\n            });\n          }\n          onDataProgressiveDone() {\n            this._readyCapability.promise.then(() => {\n              for (const listener of this._progressiveDoneListeners) {\n                listener();\n              }\n            });\n          }\n          transportReady() {\n            this._readyCapability.resolve();\n          }\n          requestDataRange(begin, end) {\n            (0, _util.unreachable)(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n          }\n          abort() {}\n        }\n        exports.PDFDataRangeTransport = PDFDataRangeTransport;\n        class PDFDocumentProxy {\n          constructor(pdfInfo, transport) {\n            this._pdfInfo = pdfInfo;\n            this._transport = transport;\n            Object.defineProperty(this, \"getJavaScript\", {\n              value: () => {\n                (0, _display_utils.deprecated)(\"`PDFDocumentProxy.getJavaScript`, \" + \"please use `PDFDocumentProxy.getJSActions` instead.\");\n                return this.getJSActions().then(js => {\n                  if (!js) {\n                    return js;\n                  }\n                  const jsArr = [];\n                  for (const name in js) {\n                    jsArr.push(...js[name]);\n                  }\n                  return jsArr;\n                });\n              }\n            });\n          }\n          get annotationStorage() {\n            return this._transport.annotationStorage;\n          }\n          get filterFactory() {\n            return this._transport.filterFactory;\n          }\n          get numPages() {\n            return this._pdfInfo.numPages;\n          }\n          get fingerprints() {\n            return this._pdfInfo.fingerprints;\n          }\n          get isPureXfa() {\n            return (0, _util.shadow)(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n          }\n          get allXfaHtml() {\n            return this._transport._htmlForXfa;\n          }\n          getPage(pageNumber) {\n            return this._transport.getPage(pageNumber);\n          }\n          getPageIndex(ref) {\n            return this._transport.getPageIndex(ref);\n          }\n          getDestinations() {\n            return this._transport.getDestinations();\n          }\n          getDestination(id) {\n            return this._transport.getDestination(id);\n          }\n          getPageLabels() {\n            return this._transport.getPageLabels();\n          }\n          getPageLayout() {\n            return this._transport.getPageLayout();\n          }\n          getPageMode() {\n            return this._transport.getPageMode();\n          }\n          getViewerPreferences() {\n            return this._transport.getViewerPreferences();\n          }\n          getOpenAction() {\n            return this._transport.getOpenAction();\n          }\n          getAttachments() {\n            return this._transport.getAttachments();\n          }\n          getJSActions() {\n            return this._transport.getDocJSActions();\n          }\n          getOutline() {\n            return this._transport.getOutline();\n          }\n          getOptionalContentConfig() {\n            return this._transport.getOptionalContentConfig();\n          }\n          getPermissions() {\n            return this._transport.getPermissions();\n          }\n          getMetadata() {\n            return this._transport.getMetadata();\n          }\n          getMarkInfo() {\n            return this._transport.getMarkInfo();\n          }\n          getData() {\n            return this._transport.getData();\n          }\n          saveDocument() {\n            return this._transport.saveDocument();\n          }\n          getDownloadInfo() {\n            return this._transport.downloadInfoCapability.promise;\n          }\n          cleanup(keepLoadedFonts = false) {\n            return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n          }\n          destroy() {\n            return this.loadingTask.destroy();\n          }\n          get loadingParams() {\n            return this._transport.loadingParams;\n          }\n          get loadingTask() {\n            return this._transport.loadingTask;\n          }\n          getFieldObjects() {\n            return this._transport.getFieldObjects();\n          }\n          hasJSActions() {\n            return this._transport.hasJSActions();\n          }\n          getCalculationOrderIds() {\n            return this._transport.getCalculationOrderIds();\n          }\n        }\n        exports.PDFDocumentProxy = PDFDocumentProxy;\n        class PDFPageProxy {\n          #delayedCleanupTimeout = null;\n          #pendingCleanup = false;\n          constructor(pageIndex, pageInfo, transport, pdfBug = false) {\n            this._pageIndex = pageIndex;\n            this._pageInfo = pageInfo;\n            this._transport = transport;\n            this._stats = pdfBug ? new _display_utils.StatTimer() : null;\n            this._pdfBug = pdfBug;\n            this.commonObjs = transport.commonObjs;\n            this.objs = new PDFObjects();\n            this._maybeCleanupAfterRender = false;\n            this._intentStates = new Map();\n            this.destroyed = false;\n          }\n          get pageNumber() {\n            return this._pageIndex + 1;\n          }\n          get rotate() {\n            return this._pageInfo.rotate;\n          }\n          get ref() {\n            return this._pageInfo.ref;\n          }\n          get userUnit() {\n            return this._pageInfo.userUnit;\n          }\n          get view() {\n            return this._pageInfo.view;\n          }\n          getViewport({\n            scale,\n            rotation = this.rotate,\n            offsetX = 0,\n            offsetY = 0,\n            dontFlip = false\n          } = {}) {\n            return new _display_utils.PageViewport({\n              viewBox: this.view,\n              scale,\n              rotation,\n              offsetX,\n              offsetY,\n              dontFlip\n            });\n          }\n          getAnnotations({\n            intent = \"display\"\n          } = {}) {\n            const intentArgs = this._transport.getRenderingIntent(intent);\n            return this._transport.getAnnotations(this._pageIndex, intentArgs.renderingIntent);\n          }\n          getJSActions() {\n            return this._transport.getPageJSActions(this._pageIndex);\n          }\n          get filterFactory() {\n            return this._transport.filterFactory;\n          }\n          get isPureXfa() {\n            return (0, _util.shadow)(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n          }\n          async getXfa() {\n            return this._transport._htmlForXfa?.children[this._pageIndex] || null;\n          }\n          render({\n            canvasContext,\n            viewport,\n            intent = \"display\",\n            annotationMode = _util.AnnotationMode.ENABLE,\n            transform = null,\n            background = null,\n            optionalContentConfigPromise = null,\n            annotationCanvasMap = null,\n            pageColors = null,\n            printAnnotationStorage = null\n          }) {\n            this._stats?.time(\"Overall\");\n            const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage);\n            this.#pendingCleanup = false;\n            this.#abortDelayedCleanup();\n            if (!optionalContentConfigPromise) {\n              optionalContentConfigPromise = this._transport.getOptionalContentConfig();\n            }\n            let intentState = this._intentStates.get(intentArgs.cacheKey);\n            if (!intentState) {\n              intentState = Object.create(null);\n              this._intentStates.set(intentArgs.cacheKey, intentState);\n            }\n            if (intentState.streamReaderCancelTimeout) {\n              clearTimeout(intentState.streamReaderCancelTimeout);\n              intentState.streamReaderCancelTimeout = null;\n            }\n            const intentPrint = !!(intentArgs.renderingIntent & _util.RenderingIntentFlag.PRINT);\n            if (!intentState.displayReadyCapability) {\n              intentState.displayReadyCapability = new _util.PromiseCapability();\n              intentState.operatorList = {\n                fnArray: [],\n                argsArray: [],\n                lastChunk: false,\n                separateAnnots: null\n              };\n              this._stats?.time(\"Page Request\");\n              this._pumpOperatorList(intentArgs);\n            }\n            const complete = error => {\n              intentState.renderTasks.delete(internalRenderTask);\n              if (this._maybeCleanupAfterRender || intentPrint) {\n                this.#pendingCleanup = true;\n              }\n              this.#tryCleanup(!intentPrint);\n              if (error) {\n                internalRenderTask.capability.reject(error);\n                this._abortOperatorList({\n                  intentState,\n                  reason: error instanceof Error ? error : new Error(error)\n                });\n              } else {\n                internalRenderTask.capability.resolve();\n              }\n              this._stats?.timeEnd(\"Rendering\");\n              this._stats?.timeEnd(\"Overall\");\n            };\n            const internalRenderTask = new InternalRenderTask({\n              callback: complete,\n              params: {\n                canvasContext,\n                viewport,\n                transform,\n                background\n              },\n              objs: this.objs,\n              commonObjs: this.commonObjs,\n              annotationCanvasMap,\n              operatorList: intentState.operatorList,\n              pageIndex: this._pageIndex,\n              canvasFactory: this._transport.canvasFactory,\n              filterFactory: this._transport.filterFactory,\n              useRequestAnimationFrame: !intentPrint,\n              pdfBug: this._pdfBug,\n              pageColors\n            });\n            (intentState.renderTasks ||= new Set()).add(internalRenderTask);\n            const renderTask = internalRenderTask.task;\n            Promise.all([intentState.displayReadyCapability.promise, optionalContentConfigPromise]).then(([transparency, optionalContentConfig]) => {\n              if (this.destroyed) {\n                complete();\n                return;\n              }\n              this._stats?.time(\"Rendering\");\n              internalRenderTask.initializeGraphics({\n                transparency,\n                optionalContentConfig\n              });\n              internalRenderTask.operatorListChanged();\n            }).catch(complete);\n            return renderTask;\n          }\n          getOperatorList({\n            intent = \"display\",\n            annotationMode = _util.AnnotationMode.ENABLE,\n            printAnnotationStorage = null\n          } = {}) {\n            function operatorListChanged() {\n              if (intentState.operatorList.lastChunk) {\n                intentState.opListReadCapability.resolve(intentState.operatorList);\n                intentState.renderTasks.delete(opListTask);\n              }\n            }\n            const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage, true);\n            let intentState = this._intentStates.get(intentArgs.cacheKey);\n            if (!intentState) {\n              intentState = Object.create(null);\n              this._intentStates.set(intentArgs.cacheKey, intentState);\n            }\n            let opListTask;\n            if (!intentState.opListReadCapability) {\n              opListTask = Object.create(null);\n              opListTask.operatorListChanged = operatorListChanged;\n              intentState.opListReadCapability = new _util.PromiseCapability();\n              (intentState.renderTasks ||= new Set()).add(opListTask);\n              intentState.operatorList = {\n                fnArray: [],\n                argsArray: [],\n                lastChunk: false,\n                separateAnnots: null\n              };\n              this._stats?.time(\"Page Request\");\n              this._pumpOperatorList(intentArgs);\n            }\n            return intentState.opListReadCapability.promise;\n          }\n          streamTextContent({\n            includeMarkedContent = false,\n            disableNormalization = false\n          } = {}) {\n            const TEXT_CONTENT_CHUNK_SIZE = 100;\n            return this._transport.messageHandler.sendWithStream(\"GetTextContent\", {\n              pageIndex: this._pageIndex,\n              includeMarkedContent: includeMarkedContent === true,\n              disableNormalization: disableNormalization === true\n            }, {\n              highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n              size(textContent) {\n                return textContent.items.length;\n              }\n            });\n          }\n          getTextContent(params = {}) {\n            if (this._transport._htmlForXfa) {\n              return this.getXfa().then(xfa => {\n                return _xfa_text.XfaText.textContent(xfa);\n              });\n            }\n            const readableStream = this.streamTextContent(params);\n            return new Promise(function (resolve, reject) {\n              function pump() {\n                reader.read().then(function ({\n                  value,\n                  done\n                }) {\n                  if (done) {\n                    resolve(textContent);\n                    return;\n                  }\n                  Object.assign(textContent.styles, value.styles);\n                  textContent.items.push(...value.items);\n                  pump();\n                }, reject);\n              }\n              const reader = readableStream.getReader();\n              const textContent = {\n                items: [],\n                styles: Object.create(null)\n              };\n              pump();\n            });\n          }\n          getStructTree() {\n            return this._transport.getStructTree(this._pageIndex);\n          }\n          _destroy() {\n            this.destroyed = true;\n            const waitOn = [];\n            for (const intentState of this._intentStates.values()) {\n              this._abortOperatorList({\n                intentState,\n                reason: new Error(\"Page was destroyed.\"),\n                force: true\n              });\n              if (intentState.opListReadCapability) {\n                continue;\n              }\n              for (const internalRenderTask of intentState.renderTasks) {\n                waitOn.push(internalRenderTask.completed);\n                internalRenderTask.cancel();\n              }\n            }\n            this.objs.clear();\n            this.#pendingCleanup = false;\n            this.#abortDelayedCleanup();\n            return Promise.all(waitOn);\n          }\n          cleanup(resetStats = false) {\n            this.#pendingCleanup = true;\n            const success = this.#tryCleanup(false);\n            if (resetStats && success) {\n              this._stats &&= new _display_utils.StatTimer();\n            }\n            return success;\n          }\n          #tryCleanup(delayed = false) {\n            this.#abortDelayedCleanup();\n            if (!this.#pendingCleanup || this.destroyed) {\n              return false;\n            }\n            if (delayed) {\n              this.#delayedCleanupTimeout = setTimeout(() => {\n                this.#delayedCleanupTimeout = null;\n                this.#tryCleanup(false);\n              }, DELAYED_CLEANUP_TIMEOUT);\n              return false;\n            }\n            for (const {\n              renderTasks,\n              operatorList\n            } of this._intentStates.values()) {\n              if (renderTasks.size > 0 || !operatorList.lastChunk) {\n                return false;\n              }\n            }\n            this._intentStates.clear();\n            this.objs.clear();\n            this.#pendingCleanup = false;\n            return true;\n          }\n          #abortDelayedCleanup() {\n            if (this.#delayedCleanupTimeout) {\n              clearTimeout(this.#delayedCleanupTimeout);\n              this.#delayedCleanupTimeout = null;\n            }\n          }\n          _startRenderPage(transparency, cacheKey) {\n            const intentState = this._intentStates.get(cacheKey);\n            if (!intentState) {\n              return;\n            }\n            this._stats?.timeEnd(\"Page Request\");\n            intentState.displayReadyCapability?.resolve(transparency);\n          }\n          _renderPageChunk(operatorListChunk, intentState) {\n            for (let i = 0, ii = operatorListChunk.length; i < ii; i++) {\n              intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n              intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);\n            }\n            intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n            intentState.operatorList.separateAnnots = operatorListChunk.separateAnnots;\n            for (const internalRenderTask of intentState.renderTasks) {\n              internalRenderTask.operatorListChanged();\n            }\n            if (operatorListChunk.lastChunk) {\n              this.#tryCleanup(true);\n            }\n          }\n          _pumpOperatorList({\n            renderingIntent,\n            cacheKey,\n            annotationStorageSerializable\n          }) {\n            const {\n              map,\n              transfers\n            } = annotationStorageSerializable;\n            const readableStream = this._transport.messageHandler.sendWithStream(\"GetOperatorList\", {\n              pageIndex: this._pageIndex,\n              intent: renderingIntent,\n              cacheKey,\n              annotationStorage: map\n            }, transfers);\n            const reader = readableStream.getReader();\n            const intentState = this._intentStates.get(cacheKey);\n            intentState.streamReader = reader;\n            const pump = () => {\n              reader.read().then(({\n                value,\n                done\n              }) => {\n                if (done) {\n                  intentState.streamReader = null;\n                  return;\n                }\n                if (this._transport.destroyed) {\n                  return;\n                }\n                this._renderPageChunk(value, intentState);\n                pump();\n              }, reason => {\n                intentState.streamReader = null;\n                if (this._transport.destroyed) {\n                  return;\n                }\n                if (intentState.operatorList) {\n                  intentState.operatorList.lastChunk = true;\n                  for (const internalRenderTask of intentState.renderTasks) {\n                    internalRenderTask.operatorListChanged();\n                  }\n                  this.#tryCleanup(true);\n                }\n                if (intentState.displayReadyCapability) {\n                  intentState.displayReadyCapability.reject(reason);\n                } else if (intentState.opListReadCapability) {\n                  intentState.opListReadCapability.reject(reason);\n                } else {\n                  throw reason;\n                }\n              });\n            };\n            pump();\n          }\n          _abortOperatorList({\n            intentState,\n            reason,\n            force = false\n          }) {\n            if (!intentState.streamReader) {\n              return;\n            }\n            if (intentState.streamReaderCancelTimeout) {\n              clearTimeout(intentState.streamReaderCancelTimeout);\n              intentState.streamReaderCancelTimeout = null;\n            }\n            if (!force) {\n              if (intentState.renderTasks.size > 0) {\n                return;\n              }\n              if (reason instanceof _display_utils.RenderingCancelledException) {\n                let delay = RENDERING_CANCELLED_TIMEOUT;\n                if (reason.extraDelay > 0 && reason.extraDelay < 1000) {\n                  delay += reason.extraDelay;\n                }\n                intentState.streamReaderCancelTimeout = setTimeout(() => {\n                  intentState.streamReaderCancelTimeout = null;\n                  this._abortOperatorList({\n                    intentState,\n                    reason,\n                    force: true\n                  });\n                }, delay);\n                return;\n              }\n            }\n            intentState.streamReader.cancel(new _util.AbortException(reason.message)).catch(() => {});\n            intentState.streamReader = null;\n            if (this._transport.destroyed) {\n              return;\n            }\n            for (const [curCacheKey, curIntentState] of this._intentStates) {\n              if (curIntentState === intentState) {\n                this._intentStates.delete(curCacheKey);\n                break;\n              }\n            }\n            this.cleanup();\n          }\n          get stats() {\n            return this._stats;\n          }\n        }\n        exports.PDFPageProxy = PDFPageProxy;\n        class LoopbackPort {\n          #listeners = new Set();\n          #deferred = Promise.resolve();\n          postMessage(obj, transfer) {\n            const event = {\n              data: structuredClone(obj, transfer ? {\n                transfer\n              } : null)\n            };\n            this.#deferred.then(() => {\n              for (const listener of this.#listeners) {\n                listener.call(this, event);\n              }\n            });\n          }\n          addEventListener(name, listener) {\n            this.#listeners.add(listener);\n          }\n          removeEventListener(name, listener) {\n            this.#listeners.delete(listener);\n          }\n          terminate() {\n            this.#listeners.clear();\n          }\n        }\n        exports.LoopbackPort = LoopbackPort;\n        const PDFWorkerUtil = {\n          isWorkerDisabled: false,\n          fallbackWorkerSrc: null,\n          fakeWorkerId: 0\n        };\n        exports.PDFWorkerUtil = PDFWorkerUtil;\n        {\n          if (_util.isNodeJS && typeof require === \"function\") {\n            PDFWorkerUtil.isWorkerDisabled = true;\n            PDFWorkerUtil.fallbackWorkerSrc = \"./pdf.worker.js\";\n          } else if (typeof document === \"object\") {\n            const pdfjsFilePath = document?.currentScript?.src;\n            if (pdfjsFilePath) {\n              PDFWorkerUtil.fallbackWorkerSrc = pdfjsFilePath.replace(/(\\.(?:min\\.)?js)(\\?.*)?$/i, \".worker$1$2\");\n            }\n          }\n          PDFWorkerUtil.isSameOrigin = function (baseUrl, otherUrl) {\n            let base;\n            try {\n              base = new URL(baseUrl);\n              if (!base.origin || base.origin === \"null\") {\n                return false;\n              }\n            } catch {\n              return false;\n            }\n            const other = new URL(otherUrl, base);\n            return base.origin === other.origin;\n          };\n          PDFWorkerUtil.createCDNWrapper = function (url) {\n            const wrapper = `importScripts(\"${url}\");`;\n            return URL.createObjectURL(new Blob([wrapper]));\n          };\n        }\n        class PDFWorker {\n          static #workerPorts;\n          constructor({\n            name = null,\n            port = null,\n            verbosity = (0, _util.getVerbosityLevel)()\n          } = {}) {\n            this.name = name;\n            this.destroyed = false;\n            this.verbosity = verbosity;\n            this._readyCapability = new _util.PromiseCapability();\n            this._port = null;\n            this._webWorker = null;\n            this._messageHandler = null;\n            if (port) {\n              if (PDFWorker.#workerPorts?.has(port)) {\n                throw new Error(\"Cannot use more than one PDFWorker per port.\");\n              }\n              (PDFWorker.#workerPorts ||= new WeakMap()).set(port, this);\n              this._initializeFromPort(port);\n              return;\n            }\n            this._initialize();\n          }\n          get promise() {\n            return this._readyCapability.promise;\n          }\n          get port() {\n            return this._port;\n          }\n          get messageHandler() {\n            return this._messageHandler;\n          }\n          _initializeFromPort(port) {\n            this._port = port;\n            this._messageHandler = new _message_handler.MessageHandler(\"main\", \"worker\", port);\n            this._messageHandler.on(\"ready\", function () {});\n            this._readyCapability.resolve();\n            this._messageHandler.send(\"configure\", {\n              verbosity: this.verbosity\n            });\n          }\n          _initialize() {\n            if (!PDFWorkerUtil.isWorkerDisabled && !PDFWorker._mainThreadWorkerMessageHandler) {\n              let {\n                workerSrc\n              } = PDFWorker;\n              try {\n                if (!PDFWorkerUtil.isSameOrigin(window.location.href, workerSrc)) {\n                  workerSrc = PDFWorkerUtil.createCDNWrapper(new URL(workerSrc, window.location).href);\n                }\n                const worker = new Worker(workerSrc);\n                const messageHandler = new _message_handler.MessageHandler(\"main\", \"worker\", worker);\n                const terminateEarly = () => {\n                  worker.removeEventListener(\"error\", onWorkerError);\n                  messageHandler.destroy();\n                  worker.terminate();\n                  if (this.destroyed) {\n                    this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n                  } else {\n                    this._setupFakeWorker();\n                  }\n                };\n                const onWorkerError = () => {\n                  if (!this._webWorker) {\n                    terminateEarly();\n                  }\n                };\n                worker.addEventListener(\"error\", onWorkerError);\n                messageHandler.on(\"test\", data => {\n                  worker.removeEventListener(\"error\", onWorkerError);\n                  if (this.destroyed) {\n                    terminateEarly();\n                    return;\n                  }\n                  if (data) {\n                    this._messageHandler = messageHandler;\n                    this._port = worker;\n                    this._webWorker = worker;\n                    this._readyCapability.resolve();\n                    messageHandler.send(\"configure\", {\n                      verbosity: this.verbosity\n                    });\n                  } else {\n                    this._setupFakeWorker();\n                    messageHandler.destroy();\n                    worker.terminate();\n                  }\n                });\n                messageHandler.on(\"ready\", data => {\n                  worker.removeEventListener(\"error\", onWorkerError);\n                  if (this.destroyed) {\n                    terminateEarly();\n                    return;\n                  }\n                  try {\n                    sendTest();\n                  } catch {\n                    this._setupFakeWorker();\n                  }\n                });\n                const sendTest = () => {\n                  const testObj = new Uint8Array();\n                  messageHandler.send(\"test\", testObj, [testObj.buffer]);\n                };\n                sendTest();\n                return;\n              } catch {\n                (0, _util.info)(\"The worker has been disabled.\");\n              }\n            }\n            this._setupFakeWorker();\n          }\n          _setupFakeWorker() {\n            if (!PDFWorkerUtil.isWorkerDisabled) {\n              (0, _util.warn)(\"Setting up fake worker.\");\n              PDFWorkerUtil.isWorkerDisabled = true;\n            }\n            PDFWorker._setupFakeWorkerGlobal.then(WorkerMessageHandler => {\n              if (this.destroyed) {\n                this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n                return;\n              }\n              const port = new LoopbackPort();\n              this._port = port;\n              const id = `fake${PDFWorkerUtil.fakeWorkerId++}`;\n              const workerHandler = new _message_handler.MessageHandler(id + \"_worker\", id, port);\n              WorkerMessageHandler.setup(workerHandler, port);\n              const messageHandler = new _message_handler.MessageHandler(id, id + \"_worker\", port);\n              this._messageHandler = messageHandler;\n              this._readyCapability.resolve();\n              messageHandler.send(\"configure\", {\n                verbosity: this.verbosity\n              });\n            }).catch(reason => {\n              this._readyCapability.reject(new Error(`Setting up fake worker failed: \"${reason.message}\".`));\n            });\n          }\n          destroy() {\n            this.destroyed = true;\n            if (this._webWorker) {\n              this._webWorker.terminate();\n              this._webWorker = null;\n            }\n            PDFWorker.#workerPorts?.delete(this._port);\n            this._port = null;\n            if (this._messageHandler) {\n              this._messageHandler.destroy();\n              this._messageHandler = null;\n            }\n          }\n          static fromPort(params) {\n            if (!params?.port) {\n              throw new Error(\"PDFWorker.fromPort - invalid method signature.\");\n            }\n            const cachedPort = this.#workerPorts?.get(params.port);\n            if (cachedPort) {\n              if (cachedPort._pendingDestroy) {\n                throw new Error(\"PDFWorker.fromPort - the worker is being destroyed.\\n\" + \"Please remember to await `PDFDocumentLoadingTask.destroy()`-calls.\");\n              }\n              return cachedPort;\n            }\n            return new PDFWorker(params);\n          }\n          static get workerSrc() {\n            if (_worker_options.GlobalWorkerOptions.workerSrc) {\n              return _worker_options.GlobalWorkerOptions.workerSrc;\n            }\n            if (PDFWorkerUtil.fallbackWorkerSrc !== null) {\n              if (!_util.isNodeJS) {\n                (0, _display_utils.deprecated)('No \"GlobalWorkerOptions.workerSrc\" specified.');\n              }\n              return PDFWorkerUtil.fallbackWorkerSrc;\n            }\n            throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n          }\n          static get _mainThreadWorkerMessageHandler() {\n            try {\n              return globalThis.pdfjsWorker?.WorkerMessageHandler || null;\n            } catch {\n              return null;\n            }\n          }\n          static get _setupFakeWorkerGlobal() {\n            const loader = async () => {\n              const mainWorkerMessageHandler = this._mainThreadWorkerMessageHandler;\n              if (mainWorkerMessageHandler) {\n                return mainWorkerMessageHandler;\n              }\n              if (_util.isNodeJS && typeof require === \"function\") {\n                const worker = eval(\"require\")(this.workerSrc);\n                return worker.WorkerMessageHandler;\n              }\n              await (0, _display_utils.loadScript)(this.workerSrc);\n              return window.pdfjsWorker.WorkerMessageHandler;\n            };\n            return (0, _util.shadow)(this, \"_setupFakeWorkerGlobal\", loader());\n          }\n        }\n        exports.PDFWorker = PDFWorker;\n        class WorkerTransport {\n          #methodPromises = new Map();\n          #pageCache = new Map();\n          #pagePromises = new Map();\n          #passwordCapability = null;\n          constructor(messageHandler, loadingTask, networkStream, params, factory) {\n            this.messageHandler = messageHandler;\n            this.loadingTask = loadingTask;\n            this.commonObjs = new PDFObjects();\n            this.fontLoader = new _font_loader.FontLoader({\n              ownerDocument: params.ownerDocument,\n              styleElement: params.styleElement\n            });\n            this._params = params;\n            this.canvasFactory = factory.canvasFactory;\n            this.filterFactory = factory.filterFactory;\n            this.cMapReaderFactory = factory.cMapReaderFactory;\n            this.standardFontDataFactory = factory.standardFontDataFactory;\n            this.destroyed = false;\n            this.destroyCapability = null;\n            this._networkStream = networkStream;\n            this._fullReader = null;\n            this._lastProgress = null;\n            this.downloadInfoCapability = new _util.PromiseCapability();\n            this.setupMessageHandler();\n          }\n          #cacheSimpleMethod(name, data = null) {\n            const cachedPromise = this.#methodPromises.get(name);\n            if (cachedPromise) {\n              return cachedPromise;\n            }\n            const promise = this.messageHandler.sendWithPromise(name, data);\n            this.#methodPromises.set(name, promise);\n            return promise;\n          }\n          get annotationStorage() {\n            return (0, _util.shadow)(this, \"annotationStorage\", new _annotation_storage.AnnotationStorage());\n          }\n          getRenderingIntent(intent, annotationMode = _util.AnnotationMode.ENABLE, printAnnotationStorage = null, isOpList = false) {\n            let renderingIntent = _util.RenderingIntentFlag.DISPLAY;\n            let annotationStorageSerializable = _annotation_storage.SerializableEmpty;\n            switch (intent) {\n              case \"any\":\n                renderingIntent = _util.RenderingIntentFlag.ANY;\n                break;\n              case \"display\":\n                break;\n              case \"print\":\n                renderingIntent = _util.RenderingIntentFlag.PRINT;\n                break;\n              default:\n                (0, _util.warn)(`getRenderingIntent - invalid intent: ${intent}`);\n            }\n            switch (annotationMode) {\n              case _util.AnnotationMode.DISABLE:\n                renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_DISABLE;\n                break;\n              case _util.AnnotationMode.ENABLE:\n                break;\n              case _util.AnnotationMode.ENABLE_FORMS:\n                renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_FORMS;\n                break;\n              case _util.AnnotationMode.ENABLE_STORAGE:\n                renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_STORAGE;\n                const annotationStorage = renderingIntent & _util.RenderingIntentFlag.PRINT && printAnnotationStorage instanceof _annotation_storage.PrintAnnotationStorage ? printAnnotationStorage : this.annotationStorage;\n                annotationStorageSerializable = annotationStorage.serializable;\n                break;\n              default:\n                (0, _util.warn)(`getRenderingIntent - invalid annotationMode: ${annotationMode}`);\n            }\n            if (isOpList) {\n              renderingIntent += _util.RenderingIntentFlag.OPLIST;\n            }\n            return {\n              renderingIntent,\n              cacheKey: `${renderingIntent}_${annotationStorageSerializable.hash}`,\n              annotationStorageSerializable\n            };\n          }\n          destroy() {\n            if (this.destroyCapability) {\n              return this.destroyCapability.promise;\n            }\n            this.destroyed = true;\n            this.destroyCapability = new _util.PromiseCapability();\n            this.#passwordCapability?.reject(new Error(\"Worker was destroyed during onPassword callback\"));\n            const waitOn = [];\n            for (const page of this.#pageCache.values()) {\n              waitOn.push(page._destroy());\n            }\n            this.#pageCache.clear();\n            this.#pagePromises.clear();\n            if (this.hasOwnProperty(\"annotationStorage\")) {\n              this.annotationStorage.resetModified();\n            }\n            const terminated = this.messageHandler.sendWithPromise(\"Terminate\", null);\n            waitOn.push(terminated);\n            Promise.all(waitOn).then(() => {\n              this.commonObjs.clear();\n              this.fontLoader.clear();\n              this.#methodPromises.clear();\n              this.filterFactory.destroy();\n              this._networkStream?.cancelAllRequests(new _util.AbortException(\"Worker was terminated.\"));\n              if (this.messageHandler) {\n                this.messageHandler.destroy();\n                this.messageHandler = null;\n              }\n              this.destroyCapability.resolve();\n            }, this.destroyCapability.reject);\n            return this.destroyCapability.promise;\n          }\n          setupMessageHandler() {\n            const {\n              messageHandler,\n              loadingTask\n            } = this;\n            messageHandler.on(\"GetReader\", (data, sink) => {\n              (0, _util.assert)(this._networkStream, \"GetReader - no `IPDFStream` instance available.\");\n              this._fullReader = this._networkStream.getFullReader();\n              this._fullReader.onProgress = evt => {\n                this._lastProgress = {\n                  loaded: evt.loaded,\n                  total: evt.total\n                };\n              };\n              sink.onPull = () => {\n                this._fullReader.read().then(function ({\n                  value,\n                  done\n                }) {\n                  if (done) {\n                    sink.close();\n                    return;\n                  }\n                  (0, _util.assert)(value instanceof ArrayBuffer, \"GetReader - expected an ArrayBuffer.\");\n                  sink.enqueue(new Uint8Array(value), 1, [value]);\n                }).catch(reason => {\n                  sink.error(reason);\n                });\n              };\n              sink.onCancel = reason => {\n                this._fullReader.cancel(reason);\n                sink.ready.catch(readyReason => {\n                  if (this.destroyed) {\n                    return;\n                  }\n                  throw readyReason;\n                });\n              };\n            });\n            messageHandler.on(\"ReaderHeadersReady\", data => {\n              const headersCapability = new _util.PromiseCapability();\n              const fullReader = this._fullReader;\n              fullReader.headersReady.then(() => {\n                if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) {\n                  if (this._lastProgress) {\n                    loadingTask.onProgress?.(this._lastProgress);\n                  }\n                  fullReader.onProgress = evt => {\n                    loadingTask.onProgress?.({\n                      loaded: evt.loaded,\n                      total: evt.total\n                    });\n                  };\n                }\n                headersCapability.resolve({\n                  isStreamingSupported: fullReader.isStreamingSupported,\n                  isRangeSupported: fullReader.isRangeSupported,\n                  contentLength: fullReader.contentLength\n                });\n              }, headersCapability.reject);\n              return headersCapability.promise;\n            });\n            messageHandler.on(\"GetRangeReader\", (data, sink) => {\n              (0, _util.assert)(this._networkStream, \"GetRangeReader - no `IPDFStream` instance available.\");\n              const rangeReader = this._networkStream.getRangeReader(data.begin, data.end);\n              if (!rangeReader) {\n                sink.close();\n                return;\n              }\n              sink.onPull = () => {\n                rangeReader.read().then(function ({\n                  value,\n                  done\n                }) {\n                  if (done) {\n                    sink.close();\n                    return;\n                  }\n                  (0, _util.assert)(value instanceof ArrayBuffer, \"GetRangeReader - expected an ArrayBuffer.\");\n                  sink.enqueue(new Uint8Array(value), 1, [value]);\n                }).catch(reason => {\n                  sink.error(reason);\n                });\n              };\n              sink.onCancel = reason => {\n                rangeReader.cancel(reason);\n                sink.ready.catch(readyReason => {\n                  if (this.destroyed) {\n                    return;\n                  }\n                  throw readyReason;\n                });\n              };\n            });\n            messageHandler.on(\"GetDoc\", ({\n              pdfInfo\n            }) => {\n              this._numPages = pdfInfo.numPages;\n              this._htmlForXfa = pdfInfo.htmlForXfa;\n              delete pdfInfo.htmlForXfa;\n              loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this));\n            });\n            messageHandler.on(\"DocException\", function (ex) {\n              let reason;\n              switch (ex.name) {\n                case \"PasswordException\":\n                  reason = new _util.PasswordException(ex.message, ex.code);\n                  break;\n                case \"InvalidPDFException\":\n                  reason = new _util.InvalidPDFException(ex.message);\n                  break;\n                case \"MissingPDFException\":\n                  reason = new _util.MissingPDFException(ex.message);\n                  break;\n                case \"UnexpectedResponseException\":\n                  reason = new _util.UnexpectedResponseException(ex.message, ex.status);\n                  break;\n                case \"UnknownErrorException\":\n                  reason = new _util.UnknownErrorException(ex.message, ex.details);\n                  break;\n                default:\n                  (0, _util.unreachable)(\"DocException - expected a valid Error.\");\n              }\n              loadingTask._capability.reject(reason);\n            });\n            messageHandler.on(\"PasswordRequest\", exception => {\n              this.#passwordCapability = new _util.PromiseCapability();\n              if (loadingTask.onPassword) {\n                const updatePassword = password => {\n                  if (password instanceof Error) {\n                    this.#passwordCapability.reject(password);\n                  } else {\n                    this.#passwordCapability.resolve({\n                      password\n                    });\n                  }\n                };\n                try {\n                  loadingTask.onPassword(updatePassword, exception.code);\n                } catch (ex) {\n                  this.#passwordCapability.reject(ex);\n                }\n              } else {\n                this.#passwordCapability.reject(new _util.PasswordException(exception.message, exception.code));\n              }\n              return this.#passwordCapability.promise;\n            });\n            messageHandler.on(\"DataLoaded\", data => {\n              loadingTask.onProgress?.({\n                loaded: data.length,\n                total: data.length\n              });\n              this.downloadInfoCapability.resolve(data);\n            });\n            messageHandler.on(\"StartRenderPage\", data => {\n              if (this.destroyed) {\n                return;\n              }\n              const page = this.#pageCache.get(data.pageIndex);\n              page._startRenderPage(data.transparency, data.cacheKey);\n            });\n            messageHandler.on(\"commonobj\", ([id, type, exportedData]) => {\n              if (this.destroyed) {\n                return;\n              }\n              if (this.commonObjs.has(id)) {\n                return;\n              }\n              switch (type) {\n                case \"Font\":\n                  const params = this._params;\n                  if (\"error\" in exportedData) {\n                    const exportedError = exportedData.error;\n                    (0, _util.warn)(`Error during font loading: ${exportedError}`);\n                    this.commonObjs.resolve(id, exportedError);\n                    break;\n                  }\n                  const inspectFont = params.pdfBug && globalThis.FontInspector?.enabled ? (font, url) => globalThis.FontInspector.fontAdded(font, url) : null;\n                  const font = new _font_loader.FontFaceObject(exportedData, {\n                    isEvalSupported: params.isEvalSupported,\n                    disableFontFace: params.disableFontFace,\n                    ignoreErrors: params.ignoreErrors,\n                    inspectFont\n                  });\n                  this.fontLoader.bind(font).catch(reason => {\n                    return messageHandler.sendWithPromise(\"FontFallback\", {\n                      id\n                    });\n                  }).finally(() => {\n                    if (!params.fontExtraProperties && font.data) {\n                      font.data = null;\n                    }\n                    this.commonObjs.resolve(id, font);\n                  });\n                  break;\n                case \"FontPath\":\n                case \"Image\":\n                case \"Pattern\":\n                  this.commonObjs.resolve(id, exportedData);\n                  break;\n                default:\n                  throw new Error(`Got unknown common object type ${type}`);\n              }\n            });\n            messageHandler.on(\"obj\", ([id, pageIndex, type, imageData]) => {\n              if (this.destroyed) {\n                return;\n              }\n              const pageProxy = this.#pageCache.get(pageIndex);\n              if (pageProxy.objs.has(id)) {\n                return;\n              }\n              switch (type) {\n                case \"Image\":\n                  pageProxy.objs.resolve(id, imageData);\n                  if (imageData) {\n                    let length;\n                    if (imageData.bitmap) {\n                      const {\n                        width,\n                        height\n                      } = imageData;\n                      length = width * height * 4;\n                    } else {\n                      length = imageData.data?.length || 0;\n                    }\n                    if (length > _util.MAX_IMAGE_SIZE_TO_CACHE) {\n                      pageProxy._maybeCleanupAfterRender = true;\n                    }\n                  }\n                  break;\n                case \"Pattern\":\n                  pageProxy.objs.resolve(id, imageData);\n                  break;\n                default:\n                  throw new Error(`Got unknown object type ${type}`);\n              }\n            });\n            messageHandler.on(\"DocProgress\", data => {\n              if (this.destroyed) {\n                return;\n              }\n              loadingTask.onProgress?.({\n                loaded: data.loaded,\n                total: data.total\n              });\n            });\n            messageHandler.on(\"FetchBuiltInCMap\", data => {\n              if (this.destroyed) {\n                return Promise.reject(new Error(\"Worker was destroyed.\"));\n              }\n              if (!this.cMapReaderFactory) {\n                return Promise.reject(new Error(\"CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.\"));\n              }\n              return this.cMapReaderFactory.fetch(data);\n            });\n            messageHandler.on(\"FetchStandardFontData\", data => {\n              if (this.destroyed) {\n                return Promise.reject(new Error(\"Worker was destroyed.\"));\n              }\n              if (!this.standardFontDataFactory) {\n                return Promise.reject(new Error(\"StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.\"));\n              }\n              return this.standardFontDataFactory.fetch(data);\n            });\n          }\n          getData() {\n            return this.messageHandler.sendWithPromise(\"GetData\", null);\n          }\n          saveDocument() {\n            if (this.annotationStorage.size <= 0) {\n              (0, _util.warn)(\"saveDocument called while `annotationStorage` is empty, \" + \"please use the getData-method instead.\");\n            }\n            const {\n              map,\n              transfers\n            } = this.annotationStorage.serializable;\n            return this.messageHandler.sendWithPromise(\"SaveDocument\", {\n              isPureXfa: !!this._htmlForXfa,\n              numPages: this._numPages,\n              annotationStorage: map,\n              filename: this._fullReader?.filename ?? null\n            }, transfers).finally(() => {\n              this.annotationStorage.resetModified();\n            });\n          }\n          getPage(pageNumber) {\n            if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) {\n              return Promise.reject(new Error(\"Invalid page request.\"));\n            }\n            const pageIndex = pageNumber - 1,\n              cachedPromise = this.#pagePromises.get(pageIndex);\n            if (cachedPromise) {\n              return cachedPromise;\n            }\n            const promise = this.messageHandler.sendWithPromise(\"GetPage\", {\n              pageIndex\n            }).then(pageInfo => {\n              if (this.destroyed) {\n                throw new Error(\"Transport destroyed\");\n              }\n              const page = new PDFPageProxy(pageIndex, pageInfo, this, this._params.pdfBug);\n              this.#pageCache.set(pageIndex, page);\n              return page;\n            });\n            this.#pagePromises.set(pageIndex, promise);\n            return promise;\n          }\n          getPageIndex(ref) {\n            if (typeof ref !== \"object\" || ref === null || !Number.isInteger(ref.num) || ref.num < 0 || !Number.isInteger(ref.gen) || ref.gen < 0) {\n              return Promise.reject(new Error(\"Invalid pageIndex request.\"));\n            }\n            return this.messageHandler.sendWithPromise(\"GetPageIndex\", {\n              num: ref.num,\n              gen: ref.gen\n            });\n          }\n          getAnnotations(pageIndex, intent) {\n            return this.messageHandler.sendWithPromise(\"GetAnnotations\", {\n              pageIndex,\n              intent\n            });\n          }\n          getFieldObjects() {\n            return this.#cacheSimpleMethod(\"GetFieldObjects\");\n          }\n          hasJSActions() {\n            return this.#cacheSimpleMethod(\"HasJSActions\");\n          }\n          getCalculationOrderIds() {\n            return this.messageHandler.sendWithPromise(\"GetCalculationOrderIds\", null);\n          }\n          getDestinations() {\n            return this.messageHandler.sendWithPromise(\"GetDestinations\", null);\n          }\n          getDestination(id) {\n            if (typeof id !== \"string\") {\n              return Promise.reject(new Error(\"Invalid destination request.\"));\n            }\n            return this.messageHandler.sendWithPromise(\"GetDestination\", {\n              id\n            });\n          }\n          getPageLabels() {\n            return this.messageHandler.sendWithPromise(\"GetPageLabels\", null);\n          }\n          getPageLayout() {\n            return this.messageHandler.sendWithPromise(\"GetPageLayout\", null);\n          }\n          getPageMode() {\n            return this.messageHandler.sendWithPromise(\"GetPageMode\", null);\n          }\n          getViewerPreferences() {\n            return this.messageHandler.sendWithPromise(\"GetViewerPreferences\", null);\n          }\n          getOpenAction() {\n            return this.messageHandler.sendWithPromise(\"GetOpenAction\", null);\n          }\n          getAttachments() {\n            return this.messageHandler.sendWithPromise(\"GetAttachments\", null);\n          }\n          getDocJSActions() {\n            return this.#cacheSimpleMethod(\"GetDocJSActions\");\n          }\n          getPageJSActions(pageIndex) {\n            return this.messageHandler.sendWithPromise(\"GetPageJSActions\", {\n              pageIndex\n            });\n          }\n          getStructTree(pageIndex) {\n            return this.messageHandler.sendWithPromise(\"GetStructTree\", {\n              pageIndex\n            });\n          }\n          getOutline() {\n            return this.messageHandler.sendWithPromise(\"GetOutline\", null);\n          }\n          getOptionalContentConfig() {\n            return this.messageHandler.sendWithPromise(\"GetOptionalContentConfig\", null).then(results => {\n              return new _optional_content_config.OptionalContentConfig(results);\n            });\n          }\n          getPermissions() {\n            return this.messageHandler.sendWithPromise(\"GetPermissions\", null);\n          }\n          getMetadata() {\n            const name = \"GetMetadata\",\n              cachedPromise = this.#methodPromises.get(name);\n            if (cachedPromise) {\n              return cachedPromise;\n            }\n            const promise = this.messageHandler.sendWithPromise(name, null).then(results => {\n              return {\n                info: results[0],\n                metadata: results[1] ? new _metadata.Metadata(results[1]) : null,\n                contentDispositionFilename: this._fullReader?.filename ?? null,\n                contentLength: this._fullReader?.contentLength ?? null\n              };\n            });\n            this.#methodPromises.set(name, promise);\n            return promise;\n          }\n          getMarkInfo() {\n            return this.messageHandler.sendWithPromise(\"GetMarkInfo\", null);\n          }\n          async startCleanup(keepLoadedFonts = false) {\n            if (this.destroyed) {\n              return;\n            }\n            await this.messageHandler.sendWithPromise(\"Cleanup\", null);\n            for (const page of this.#pageCache.values()) {\n              const cleanupSuccessful = page.cleanup();\n              if (!cleanupSuccessful) {\n                throw new Error(`startCleanup: Page ${page.pageNumber} is currently rendering.`);\n              }\n            }\n            this.commonObjs.clear();\n            if (!keepLoadedFonts) {\n              this.fontLoader.clear();\n            }\n            this.#methodPromises.clear();\n            this.filterFactory.destroy(true);\n          }\n          get loadingParams() {\n            const {\n              disableAutoFetch,\n              enableXfa\n            } = this._params;\n            return (0, _util.shadow)(this, \"loadingParams\", {\n              disableAutoFetch,\n              enableXfa\n            });\n          }\n        }\n        class PDFObjects {\n          #objs = Object.create(null);\n          #ensureObj(objId) {\n            return this.#objs[objId] ||= {\n              capability: new _util.PromiseCapability(),\n              data: null\n            };\n          }\n          get(objId, callback = null) {\n            if (callback) {\n              const obj = this.#ensureObj(objId);\n              obj.capability.promise.then(() => callback(obj.data));\n              return null;\n            }\n            const obj = this.#objs[objId];\n            if (!obj?.capability.settled) {\n              throw new Error(`Requesting object that isn't resolved yet ${objId}.`);\n            }\n            return obj.data;\n          }\n          has(objId) {\n            const obj = this.#objs[objId];\n            return obj?.capability.settled || false;\n          }\n          resolve(objId, data = null) {\n            const obj = this.#ensureObj(objId);\n            obj.data = data;\n            obj.capability.resolve();\n          }\n          clear() {\n            for (const objId in this.#objs) {\n              const {\n                data\n              } = this.#objs[objId];\n              data?.bitmap?.close();\n            }\n            this.#objs = Object.create(null);\n          }\n        }\n        class RenderTask {\n          #internalRenderTask = null;\n          constructor(internalRenderTask) {\n            this.#internalRenderTask = internalRenderTask;\n            this.onContinue = null;\n          }\n          get promise() {\n            return this.#internalRenderTask.capability.promise;\n          }\n          cancel(extraDelay = 0) {\n            this.#internalRenderTask.cancel(null, extraDelay);\n          }\n          get separateAnnots() {\n            const {\n              separateAnnots\n            } = this.#internalRenderTask.operatorList;\n            if (!separateAnnots) {\n              return false;\n            }\n            const {\n              annotationCanvasMap\n            } = this.#internalRenderTask;\n            return separateAnnots.form || separateAnnots.canvas && annotationCanvasMap?.size > 0;\n          }\n        }\n        exports.RenderTask = RenderTask;\n        class InternalRenderTask {\n          static #canvasInUse = new WeakSet();\n          constructor({\n            callback,\n            params,\n            objs,\n            commonObjs,\n            annotationCanvasMap,\n            operatorList,\n            pageIndex,\n            canvasFactory,\n            filterFactory,\n            useRequestAnimationFrame = false,\n            pdfBug = false,\n            pageColors = null\n          }) {\n            this.callback = callback;\n            this.params = params;\n            this.objs = objs;\n            this.commonObjs = commonObjs;\n            this.annotationCanvasMap = annotationCanvasMap;\n            this.operatorListIdx = null;\n            this.operatorList = operatorList;\n            this._pageIndex = pageIndex;\n            this.canvasFactory = canvasFactory;\n            this.filterFactory = filterFactory;\n            this._pdfBug = pdfBug;\n            this.pageColors = pageColors;\n            this.running = false;\n            this.graphicsReadyCallback = null;\n            this.graphicsReady = false;\n            this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== \"undefined\";\n            this.cancelled = false;\n            this.capability = new _util.PromiseCapability();\n            this.task = new RenderTask(this);\n            this._cancelBound = this.cancel.bind(this);\n            this._continueBound = this._continue.bind(this);\n            this._scheduleNextBound = this._scheduleNext.bind(this);\n            this._nextBound = this._next.bind(this);\n            this._canvas = params.canvasContext.canvas;\n          }\n          get completed() {\n            return this.capability.promise.catch(function () {});\n          }\n          initializeGraphics({\n            transparency = false,\n            optionalContentConfig\n          }) {\n            if (this.cancelled) {\n              return;\n            }\n            if (this._canvas) {\n              if (InternalRenderTask.#canvasInUse.has(this._canvas)) {\n                throw new Error(\"Cannot use the same canvas during multiple render() operations. \" + \"Use different canvas or ensure previous operations were \" + \"cancelled or completed.\");\n              }\n              InternalRenderTask.#canvasInUse.add(this._canvas);\n            }\n            if (this._pdfBug && globalThis.StepperManager?.enabled) {\n              this.stepper = globalThis.StepperManager.create(this._pageIndex);\n              this.stepper.init(this.operatorList);\n              this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();\n            }\n            const {\n              canvasContext,\n              viewport,\n              transform,\n              background\n            } = this.params;\n            this.gfx = new _canvas.CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {\n              optionalContentConfig\n            }, this.annotationCanvasMap, this.pageColors);\n            this.gfx.beginDrawing({\n              transform,\n              viewport,\n              transparency,\n              background\n            });\n            this.operatorListIdx = 0;\n            this.graphicsReady = true;\n            this.graphicsReadyCallback?.();\n          }\n          cancel(error = null, extraDelay = 0) {\n            this.running = false;\n            this.cancelled = true;\n            this.gfx?.endDrawing();\n            InternalRenderTask.#canvasInUse.delete(this._canvas);\n            this.callback(error || new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, extraDelay));\n          }\n          operatorListChanged() {\n            if (!this.graphicsReady) {\n              this.graphicsReadyCallback ||= this._continueBound;\n              return;\n            }\n            this.stepper?.updateOperatorList(this.operatorList);\n            if (this.running) {\n              return;\n            }\n            this._continue();\n          }\n          _continue() {\n            this.running = true;\n            if (this.cancelled) {\n              return;\n            }\n            if (this.task.onContinue) {\n              this.task.onContinue(this._scheduleNextBound);\n            } else {\n              this._scheduleNext();\n            }\n          }\n          _scheduleNext() {\n            if (this._useRequestAnimationFrame) {\n              window.requestAnimationFrame(() => {\n                this._nextBound().catch(this._cancelBound);\n              });\n            } else {\n              Promise.resolve().then(this._nextBound).catch(this._cancelBound);\n            }\n          }\n          async _next() {\n            if (this.cancelled) {\n              return;\n            }\n            this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper);\n            if (this.operatorListIdx === this.operatorList.argsArray.length) {\n              this.running = false;\n              if (this.operatorList.lastChunk) {\n                this.gfx.endDrawing();\n                InternalRenderTask.#canvasInUse.delete(this._canvas);\n                this.callback();\n              }\n            }\n          }\n        }\n        const version = '3.11.174';\n        exports.version = version;\n        const build = 'ce8716743';\n        exports.build = build;\n\n        /***/\n      }, /* 3 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.SerializableEmpty = exports.PrintAnnotationStorage = exports.AnnotationStorage = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _editor = __w_pdfjs_require__(4);\n        var _murmurhash = __w_pdfjs_require__(8);\n        const SerializableEmpty = Object.freeze({\n          map: null,\n          hash: \"\",\n          transfers: undefined\n        });\n        exports.SerializableEmpty = SerializableEmpty;\n        class AnnotationStorage {\n          #modified = false;\n          #storage = new Map();\n          constructor() {\n            this.onSetModified = null;\n            this.onResetModified = null;\n            this.onAnnotationEditor = null;\n          }\n          getValue(key, defaultValue) {\n            const value = this.#storage.get(key);\n            if (value === undefined) {\n              return defaultValue;\n            }\n            return Object.assign(defaultValue, value);\n          }\n          getRawValue(key) {\n            return this.#storage.get(key);\n          }\n          remove(key) {\n            this.#storage.delete(key);\n            if (this.#storage.size === 0) {\n              this.resetModified();\n            }\n            if (typeof this.onAnnotationEditor === \"function\") {\n              for (const value of this.#storage.values()) {\n                if (value instanceof _editor.AnnotationEditor) {\n                  return;\n                }\n              }\n              this.onAnnotationEditor(null);\n            }\n          }\n          setValue(key, value) {\n            const obj = this.#storage.get(key);\n            let modified = false;\n            if (obj !== undefined) {\n              for (const [entry, val] of Object.entries(value)) {\n                if (obj[entry] !== val) {\n                  modified = true;\n                  obj[entry] = val;\n                }\n              }\n            } else {\n              modified = true;\n              this.#storage.set(key, value);\n            }\n            if (modified) {\n              this.#setModified();\n            }\n            if (value instanceof _editor.AnnotationEditor && typeof this.onAnnotationEditor === \"function\") {\n              this.onAnnotationEditor(value.constructor._type);\n            }\n          }\n          has(key) {\n            return this.#storage.has(key);\n          }\n          getAll() {\n            return this.#storage.size > 0 ? (0, _util.objectFromMap)(this.#storage) : null;\n          }\n          setAll(obj) {\n            for (const [key, val] of Object.entries(obj)) {\n              this.setValue(key, val);\n            }\n          }\n          get size() {\n            return this.#storage.size;\n          }\n          #setModified() {\n            if (!this.#modified) {\n              this.#modified = true;\n              if (typeof this.onSetModified === \"function\") {\n                this.onSetModified();\n              }\n            }\n          }\n          resetModified() {\n            if (this.#modified) {\n              this.#modified = false;\n              if (typeof this.onResetModified === \"function\") {\n                this.onResetModified();\n              }\n            }\n          }\n          get print() {\n            return new PrintAnnotationStorage(this);\n          }\n          get serializable() {\n            if (this.#storage.size === 0) {\n              return SerializableEmpty;\n            }\n            const map = new Map(),\n              hash = new _murmurhash.MurmurHash3_64(),\n              transfers = [];\n            const context = Object.create(null);\n            let hasBitmap = false;\n            for (const [key, val] of this.#storage) {\n              const serialized = val instanceof _editor.AnnotationEditor ? val.serialize(false, context) : val;\n              if (serialized) {\n                map.set(key, serialized);\n                hash.update(`${key}:${JSON.stringify(serialized)}`);\n                hasBitmap ||= !!serialized.bitmap;\n              }\n            }\n            if (hasBitmap) {\n              for (const value of map.values()) {\n                if (value.bitmap) {\n                  transfers.push(value.bitmap);\n                }\n              }\n            }\n            return map.size > 0 ? {\n              map,\n              hash: hash.hexdigest(),\n              transfers\n            } : SerializableEmpty;\n          }\n        }\n        exports.AnnotationStorage = AnnotationStorage;\n        class PrintAnnotationStorage extends AnnotationStorage {\n          #serializable;\n          constructor(parent) {\n            super();\n            const {\n              map,\n              hash,\n              transfers\n            } = parent.serializable;\n            const clone = structuredClone(map, transfers ? {\n              transfer: transfers\n            } : null);\n            this.#serializable = {\n              map: clone,\n              hash,\n              transfers\n            };\n          }\n          get print() {\n            (0, _util.unreachable)(\"Should not call PrintAnnotationStorage.print\");\n          }\n          get serializable() {\n            return this.#serializable;\n          }\n        }\n        exports.PrintAnnotationStorage = PrintAnnotationStorage;\n\n        /***/\n      }, /* 4 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.AnnotationEditor = void 0;\n        var _tools = __w_pdfjs_require__(5);\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        class AnnotationEditor {\n          #altText = \"\";\n          #altTextDecorative = false;\n          #altTextButton = null;\n          #altTextTooltip = null;\n          #altTextTooltipTimeout = null;\n          #keepAspectRatio = false;\n          #resizersDiv = null;\n          #boundFocusin = this.focusin.bind(this);\n          #boundFocusout = this.focusout.bind(this);\n          #hasBeenClicked = false;\n          #isEditing = false;\n          #isInEditMode = false;\n          _initialOptions = Object.create(null);\n          _uiManager = null;\n          _focusEventsAllowed = true;\n          _l10nPromise = null;\n          #isDraggable = false;\n          #zIndex = AnnotationEditor._zIndex++;\n          static _borderLineWidth = -1;\n          static _colorManager = new _tools.ColorManager();\n          static _zIndex = 1;\n          static SMALL_EDITOR_SIZE = 0;\n          constructor(parameters) {\n            if (this.constructor === AnnotationEditor) {\n              (0, _util.unreachable)(\"Cannot initialize AnnotationEditor.\");\n            }\n            this.parent = parameters.parent;\n            this.id = parameters.id;\n            this.width = this.height = null;\n            this.pageIndex = parameters.parent.pageIndex;\n            this.name = parameters.name;\n            this.div = null;\n            this._uiManager = parameters.uiManager;\n            this.annotationElementId = null;\n            this._willKeepAspectRatio = false;\n            this._initialOptions.isCentered = parameters.isCentered;\n            this._structTreeParentId = null;\n            const {\n              rotation,\n              rawDims: {\n                pageWidth,\n                pageHeight,\n                pageX,\n                pageY\n              }\n            } = this.parent.viewport;\n            this.rotation = rotation;\n            this.pageRotation = (360 + rotation - this._uiManager.viewParameters.rotation) % 360;\n            this.pageDimensions = [pageWidth, pageHeight];\n            this.pageTranslation = [pageX, pageY];\n            const [width, height] = this.parentDimensions;\n            this.x = parameters.x / width;\n            this.y = parameters.y / height;\n            this.isAttachedToDOM = false;\n            this.deleted = false;\n          }\n          get editorType() {\n            return Object.getPrototypeOf(this).constructor._type;\n          }\n          static get _defaultLineColor() {\n            return (0, _util.shadow)(this, \"_defaultLineColor\", this._colorManager.getHexCode(\"CanvasText\"));\n          }\n          static deleteAnnotationElement(editor) {\n            const fakeEditor = new FakeEditor({\n              id: editor.parent.getNextId(),\n              parent: editor.parent,\n              uiManager: editor._uiManager\n            });\n            fakeEditor.annotationElementId = editor.annotationElementId;\n            fakeEditor.deleted = true;\n            fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);\n          }\n          static initialize(l10n, options = null) {\n            AnnotationEditor._l10nPromise ||= new Map([\"editor_alt_text_button_label\", \"editor_alt_text_edit_button_label\", \"editor_alt_text_decorative_tooltip\"].map(str => [str, l10n.get(str)]));\n            if (options?.strings) {\n              for (const str of options.strings) {\n                AnnotationEditor._l10nPromise.set(str, l10n.get(str));\n              }\n            }\n            if (AnnotationEditor._borderLineWidth !== -1) {\n              return;\n            }\n            const style = getComputedStyle(document.documentElement);\n            AnnotationEditor._borderLineWidth = parseFloat(style.getPropertyValue(\"--outline-width\")) || 0;\n          }\n          static updateDefaultParams(_type, _value) {}\n          static get defaultPropertiesToUpdate() {\n            return [];\n          }\n          static isHandlingMimeForPasting(mime) {\n            return false;\n          }\n          static paste(item, parent) {\n            (0, _util.unreachable)(\"Not implemented\");\n          }\n          get propertiesToUpdate() {\n            return [];\n          }\n          get _isDraggable() {\n            return this.#isDraggable;\n          }\n          set _isDraggable(value) {\n            this.#isDraggable = value;\n            this.div?.classList.toggle(\"draggable\", value);\n          }\n          center() {\n            const [pageWidth, pageHeight] = this.pageDimensions;\n            switch (this.parentRotation) {\n              case 90:\n                this.x -= this.height * pageHeight / (pageWidth * 2);\n                this.y += this.width * pageWidth / (pageHeight * 2);\n                break;\n              case 180:\n                this.x += this.width / 2;\n                this.y += this.height / 2;\n                break;\n              case 270:\n                this.x += this.height * pageHeight / (pageWidth * 2);\n                this.y -= this.width * pageWidth / (pageHeight * 2);\n                break;\n              default:\n                this.x -= this.width / 2;\n                this.y -= this.height / 2;\n                break;\n            }\n            this.fixAndSetPosition();\n          }\n          addCommands(params) {\n            this._uiManager.addCommands(params);\n          }\n          get currentLayer() {\n            return this._uiManager.currentLayer;\n          }\n          setInBackground() {\n            this.div.style.zIndex = 0;\n          }\n          setInForeground() {\n            this.div.style.zIndex = this.#zIndex;\n          }\n          setParent(parent) {\n            if (parent !== null) {\n              this.pageIndex = parent.pageIndex;\n              this.pageDimensions = parent.pageDimensions;\n            }\n            this.parent = parent;\n          }\n          focusin(event) {\n            if (!this._focusEventsAllowed) {\n              return;\n            }\n            if (!this.#hasBeenClicked) {\n              this.parent.setSelected(this);\n            } else {\n              this.#hasBeenClicked = false;\n            }\n          }\n          focusout(event) {\n            if (!this._focusEventsAllowed) {\n              return;\n            }\n            if (!this.isAttachedToDOM) {\n              return;\n            }\n            const target = event.relatedTarget;\n            if (target?.closest(`#${this.id}`)) {\n              return;\n            }\n            event.preventDefault();\n            if (!this.parent?.isMultipleSelection) {\n              this.commitOrRemove();\n            }\n          }\n          commitOrRemove() {\n            if (this.isEmpty()) {\n              this.remove();\n            } else {\n              this.commit();\n            }\n          }\n          commit() {\n            this.addToAnnotationStorage();\n          }\n          addToAnnotationStorage() {\n            this._uiManager.addToAnnotationStorage(this);\n          }\n          setAt(x, y, tx, ty) {\n            const [width, height] = this.parentDimensions;\n            [tx, ty] = this.screenToPageTranslation(tx, ty);\n            this.x = (x + tx) / width;\n            this.y = (y + ty) / height;\n            this.fixAndSetPosition();\n          }\n          #translate([width, height], x, y) {\n            [x, y] = this.screenToPageTranslation(x, y);\n            this.x += x / width;\n            this.y += y / height;\n            this.fixAndSetPosition();\n          }\n          translate(x, y) {\n            this.#translate(this.parentDimensions, x, y);\n          }\n          translateInPage(x, y) {\n            this.#translate(this.pageDimensions, x, y);\n            this.div.scrollIntoView({\n              block: \"nearest\"\n            });\n          }\n          drag(tx, ty) {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.x += tx / parentWidth;\n            this.y += ty / parentHeight;\n            if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) {\n              const {\n                x,\n                y\n              } = this.div.getBoundingClientRect();\n              if (this.parent.findNewParent(this, x, y)) {\n                this.x -= Math.floor(this.x);\n                this.y -= Math.floor(this.y);\n              }\n            }\n            let {\n              x,\n              y\n            } = this;\n            const [bx, by] = this.#getBaseTranslation();\n            x += bx;\n            y += by;\n            this.div.style.left = `${(100 * x).toFixed(2)}%`;\n            this.div.style.top = `${(100 * y).toFixed(2)}%`;\n            this.div.scrollIntoView({\n              block: \"nearest\"\n            });\n          }\n          #getBaseTranslation() {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            const {\n              _borderLineWidth\n            } = AnnotationEditor;\n            const x = _borderLineWidth / parentWidth;\n            const y = _borderLineWidth / parentHeight;\n            switch (this.rotation) {\n              case 90:\n                return [-x, y];\n              case 180:\n                return [x, y];\n              case 270:\n                return [x, -y];\n              default:\n                return [-x, -y];\n            }\n          }\n          fixAndSetPosition() {\n            const [pageWidth, pageHeight] = this.pageDimensions;\n            let {\n              x,\n              y,\n              width,\n              height\n            } = this;\n            width *= pageWidth;\n            height *= pageHeight;\n            x *= pageWidth;\n            y *= pageHeight;\n            switch (this.rotation) {\n              case 0:\n                x = Math.max(0, Math.min(pageWidth - width, x));\n                y = Math.max(0, Math.min(pageHeight - height, y));\n                break;\n              case 90:\n                x = Math.max(0, Math.min(pageWidth - height, x));\n                y = Math.min(pageHeight, Math.max(width, y));\n                break;\n              case 180:\n                x = Math.min(pageWidth, Math.max(width, x));\n                y = Math.min(pageHeight, Math.max(height, y));\n                break;\n              case 270:\n                x = Math.min(pageWidth, Math.max(height, x));\n                y = Math.max(0, Math.min(pageHeight - width, y));\n                break;\n            }\n            this.x = x /= pageWidth;\n            this.y = y /= pageHeight;\n            const [bx, by] = this.#getBaseTranslation();\n            x += bx;\n            y += by;\n            const {\n              style\n            } = this.div;\n            style.left = `${(100 * x).toFixed(2)}%`;\n            style.top = `${(100 * y).toFixed(2)}%`;\n            this.moveInDOM();\n          }\n          static #rotatePoint(x, y, angle) {\n            switch (angle) {\n              case 90:\n                return [y, -x];\n              case 180:\n                return [-x, -y];\n              case 270:\n                return [-y, x];\n              default:\n                return [x, y];\n            }\n          }\n          screenToPageTranslation(x, y) {\n            return AnnotationEditor.#rotatePoint(x, y, this.parentRotation);\n          }\n          pageTranslationToScreen(x, y) {\n            return AnnotationEditor.#rotatePoint(x, y, 360 - this.parentRotation);\n          }\n          #getRotationMatrix(rotation) {\n            switch (rotation) {\n              case 90:\n                {\n                  const [pageWidth, pageHeight] = this.pageDimensions;\n                  return [0, -pageWidth / pageHeight, pageHeight / pageWidth, 0];\n                }\n              case 180:\n                return [-1, 0, 0, -1];\n              case 270:\n                {\n                  const [pageWidth, pageHeight] = this.pageDimensions;\n                  return [0, pageWidth / pageHeight, -pageHeight / pageWidth, 0];\n                }\n              default:\n                return [1, 0, 0, 1];\n            }\n          }\n          get parentScale() {\n            return this._uiManager.viewParameters.realScale;\n          }\n          get parentRotation() {\n            return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;\n          }\n          get parentDimensions() {\n            const {\n              parentScale,\n              pageDimensions: [pageWidth, pageHeight]\n            } = this;\n            const scaledWidth = pageWidth * parentScale;\n            const scaledHeight = pageHeight * parentScale;\n            return _util.FeatureTest.isCSSRoundSupported ? [Math.round(scaledWidth), Math.round(scaledHeight)] : [scaledWidth, scaledHeight];\n          }\n          setDims(width, height) {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.div.style.width = `${(100 * width / parentWidth).toFixed(2)}%`;\n            if (!this.#keepAspectRatio) {\n              this.div.style.height = `${(100 * height / parentHeight).toFixed(2)}%`;\n            }\n            this.#altTextButton?.classList.toggle(\"small\", width < AnnotationEditor.SMALL_EDITOR_SIZE || height < AnnotationEditor.SMALL_EDITOR_SIZE);\n          }\n          fixDims() {\n            const {\n              style\n            } = this.div;\n            const {\n              height,\n              width\n            } = style;\n            const widthPercent = width.endsWith(\"%\");\n            const heightPercent = !this.#keepAspectRatio && height.endsWith(\"%\");\n            if (widthPercent && heightPercent) {\n              return;\n            }\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            if (!widthPercent) {\n              style.width = `${(100 * parseFloat(width) / parentWidth).toFixed(2)}%`;\n            }\n            if (!this.#keepAspectRatio && !heightPercent) {\n              style.height = `${(100 * parseFloat(height) / parentHeight).toFixed(2)}%`;\n            }\n          }\n          getInitialTranslation() {\n            return [0, 0];\n          }\n          #createResizers() {\n            if (this.#resizersDiv) {\n              return;\n            }\n            this.#resizersDiv = document.createElement(\"div\");\n            this.#resizersDiv.classList.add(\"resizers\");\n            const classes = [\"topLeft\", \"topRight\", \"bottomRight\", \"bottomLeft\"];\n            if (!this._willKeepAspectRatio) {\n              classes.push(\"topMiddle\", \"middleRight\", \"bottomMiddle\", \"middleLeft\");\n            }\n            for (const name of classes) {\n              const div = document.createElement(\"div\");\n              this.#resizersDiv.append(div);\n              div.classList.add(\"resizer\", name);\n              div.addEventListener(\"pointerdown\", this.#resizerPointerdown.bind(this, name));\n              div.addEventListener(\"contextmenu\", _display_utils.noContextMenu);\n            }\n            this.div.prepend(this.#resizersDiv);\n          }\n          #resizerPointerdown(name, event) {\n            event.preventDefault();\n            const {\n              isMac\n            } = _util.FeatureTest.platform;\n            if (event.button !== 0 || event.ctrlKey && isMac) {\n              return;\n            }\n            const boundResizerPointermove = this.#resizerPointermove.bind(this, name);\n            const savedDraggable = this._isDraggable;\n            this._isDraggable = false;\n            const pointerMoveOptions = {\n              passive: true,\n              capture: true\n            };\n            window.addEventListener(\"pointermove\", boundResizerPointermove, pointerMoveOptions);\n            const savedX = this.x;\n            const savedY = this.y;\n            const savedWidth = this.width;\n            const savedHeight = this.height;\n            const savedParentCursor = this.parent.div.style.cursor;\n            const savedCursor = this.div.style.cursor;\n            this.div.style.cursor = this.parent.div.style.cursor = window.getComputedStyle(event.target).cursor;\n            const pointerUpCallback = () => {\n              this._isDraggable = savedDraggable;\n              window.removeEventListener(\"pointerup\", pointerUpCallback);\n              window.removeEventListener(\"blur\", pointerUpCallback);\n              window.removeEventListener(\"pointermove\", boundResizerPointermove, pointerMoveOptions);\n              this.parent.div.style.cursor = savedParentCursor;\n              this.div.style.cursor = savedCursor;\n              const newX = this.x;\n              const newY = this.y;\n              const newWidth = this.width;\n              const newHeight = this.height;\n              if (newX === savedX && newY === savedY && newWidth === savedWidth && newHeight === savedHeight) {\n                return;\n              }\n              this.addCommands({\n                cmd: () => {\n                  this.width = newWidth;\n                  this.height = newHeight;\n                  this.x = newX;\n                  this.y = newY;\n                  const [parentWidth, parentHeight] = this.parentDimensions;\n                  this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n                  this.fixAndSetPosition();\n                },\n                undo: () => {\n                  this.width = savedWidth;\n                  this.height = savedHeight;\n                  this.x = savedX;\n                  this.y = savedY;\n                  const [parentWidth, parentHeight] = this.parentDimensions;\n                  this.setDims(parentWidth * savedWidth, parentHeight * savedHeight);\n                  this.fixAndSetPosition();\n                },\n                mustExec: true\n              });\n            };\n            window.addEventListener(\"pointerup\", pointerUpCallback);\n            window.addEventListener(\"blur\", pointerUpCallback);\n          }\n          #resizerPointermove(name, event) {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            const savedX = this.x;\n            const savedY = this.y;\n            const savedWidth = this.width;\n            const savedHeight = this.height;\n            const minWidth = AnnotationEditor.MIN_SIZE / parentWidth;\n            const minHeight = AnnotationEditor.MIN_SIZE / parentHeight;\n            const round = x => Math.round(x * 10000) / 10000;\n            const rotationMatrix = this.#getRotationMatrix(this.rotation);\n            const transf = (x, y) => [rotationMatrix[0] * x + rotationMatrix[2] * y, rotationMatrix[1] * x + rotationMatrix[3] * y];\n            const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation);\n            const invTransf = (x, y) => [invRotationMatrix[0] * x + invRotationMatrix[2] * y, invRotationMatrix[1] * x + invRotationMatrix[3] * y];\n            let getPoint;\n            let getOpposite;\n            let isDiagonal = false;\n            let isHorizontal = false;\n            switch (name) {\n              case \"topLeft\":\n                isDiagonal = true;\n                getPoint = (w, h) => [0, 0];\n                getOpposite = (w, h) => [w, h];\n                break;\n              case \"topMiddle\":\n                getPoint = (w, h) => [w / 2, 0];\n                getOpposite = (w, h) => [w / 2, h];\n                break;\n              case \"topRight\":\n                isDiagonal = true;\n                getPoint = (w, h) => [w, 0];\n                getOpposite = (w, h) => [0, h];\n                break;\n              case \"middleRight\":\n                isHorizontal = true;\n                getPoint = (w, h) => [w, h / 2];\n                getOpposite = (w, h) => [0, h / 2];\n                break;\n              case \"bottomRight\":\n                isDiagonal = true;\n                getPoint = (w, h) => [w, h];\n                getOpposite = (w, h) => [0, 0];\n                break;\n              case \"bottomMiddle\":\n                getPoint = (w, h) => [w / 2, h];\n                getOpposite = (w, h) => [w / 2, 0];\n                break;\n              case \"bottomLeft\":\n                isDiagonal = true;\n                getPoint = (w, h) => [0, h];\n                getOpposite = (w, h) => [w, 0];\n                break;\n              case \"middleLeft\":\n                isHorizontal = true;\n                getPoint = (w, h) => [0, h / 2];\n                getOpposite = (w, h) => [w, h / 2];\n                break;\n            }\n            const point = getPoint(savedWidth, savedHeight);\n            const oppositePoint = getOpposite(savedWidth, savedHeight);\n            let transfOppositePoint = transf(...oppositePoint);\n            const oppositeX = round(savedX + transfOppositePoint[0]);\n            const oppositeY = round(savedY + transfOppositePoint[1]);\n            let ratioX = 1;\n            let ratioY = 1;\n            let [deltaX, deltaY] = this.screenToPageTranslation(event.movementX, event.movementY);\n            [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight);\n            if (isDiagonal) {\n              const oldDiag = Math.hypot(savedWidth, savedHeight);\n              ratioX = ratioY = Math.max(Math.min(Math.hypot(oppositePoint[0] - point[0] - deltaX, oppositePoint[1] - point[1] - deltaY) / oldDiag, 1 / savedWidth, 1 / savedHeight), minWidth / savedWidth, minHeight / savedHeight);\n            } else if (isHorizontal) {\n              ratioX = Math.max(minWidth, Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))) / savedWidth;\n            } else {\n              ratioY = Math.max(minHeight, Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))) / savedHeight;\n            }\n            const newWidth = round(savedWidth * ratioX);\n            const newHeight = round(savedHeight * ratioY);\n            transfOppositePoint = transf(...getOpposite(newWidth, newHeight));\n            const newX = oppositeX - transfOppositePoint[0];\n            const newY = oppositeY - transfOppositePoint[1];\n            this.width = newWidth;\n            this.height = newHeight;\n            this.x = newX;\n            this.y = newY;\n            this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n            this.fixAndSetPosition();\n          }\n          async addAltTextButton() {\n            if (this.#altTextButton) {\n              return;\n            }\n            const altText = this.#altTextButton = document.createElement(\"button\");\n            altText.className = \"altText\";\n            const msg = await AnnotationEditor._l10nPromise.get(\"editor_alt_text_button_label\");\n            altText.textContent = msg;\n            altText.setAttribute(\"aria-label\", msg);\n            altText.tabIndex = \"0\";\n            altText.addEventListener(\"contextmenu\", _display_utils.noContextMenu);\n            altText.addEventListener(\"pointerdown\", event => event.stopPropagation());\n            altText.addEventListener(\"click\", event => {\n              event.preventDefault();\n              this._uiManager.editAltText(this);\n            }, {\n              capture: true\n            });\n            altText.addEventListener(\"keydown\", event => {\n              if (event.target === altText && event.key === \"Enter\") {\n                event.preventDefault();\n                this._uiManager.editAltText(this);\n              }\n            });\n            this.#setAltTextButtonState();\n            this.div.append(altText);\n            if (!AnnotationEditor.SMALL_EDITOR_SIZE) {\n              const PERCENT = 40;\n              AnnotationEditor.SMALL_EDITOR_SIZE = Math.min(128, Math.round(altText.getBoundingClientRect().width * (1 + PERCENT / 100)));\n            }\n          }\n          async #setAltTextButtonState() {\n            const button = this.#altTextButton;\n            if (!button) {\n              return;\n            }\n            if (!this.#altText && !this.#altTextDecorative) {\n              button.classList.remove(\"done\");\n              this.#altTextTooltip?.remove();\n              return;\n            }\n            AnnotationEditor._l10nPromise.get(\"editor_alt_text_edit_button_label\").then(msg => {\n              button.setAttribute(\"aria-label\", msg);\n            });\n            let tooltip = this.#altTextTooltip;\n            if (!tooltip) {\n              this.#altTextTooltip = tooltip = document.createElement(\"span\");\n              tooltip.className = \"tooltip\";\n              tooltip.setAttribute(\"role\", \"tooltip\");\n              const id = tooltip.id = `alt-text-tooltip-${this.id}`;\n              button.setAttribute(\"aria-describedby\", id);\n              const DELAY_TO_SHOW_TOOLTIP = 100;\n              button.addEventListener(\"mouseenter\", () => {\n                this.#altTextTooltipTimeout = setTimeout(() => {\n                  this.#altTextTooltipTimeout = null;\n                  this.#altTextTooltip.classList.add(\"show\");\n                  this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n                    source: this,\n                    details: {\n                      type: \"editing\",\n                      subtype: this.editorType,\n                      data: {\n                        action: \"alt_text_tooltip\"\n                      }\n                    }\n                  });\n                }, DELAY_TO_SHOW_TOOLTIP);\n              });\n              button.addEventListener(\"mouseleave\", () => {\n                clearTimeout(this.#altTextTooltipTimeout);\n                this.#altTextTooltipTimeout = null;\n                this.#altTextTooltip?.classList.remove(\"show\");\n              });\n            }\n            button.classList.add(\"done\");\n            tooltip.innerText = this.#altTextDecorative ? await AnnotationEditor._l10nPromise.get(\"editor_alt_text_decorative_tooltip\") : this.#altText;\n            if (!tooltip.parentNode) {\n              button.append(tooltip);\n            }\n          }\n          getClientDimensions() {\n            return this.div.getBoundingClientRect();\n          }\n          get altTextData() {\n            return {\n              altText: this.#altText,\n              decorative: this.#altTextDecorative\n            };\n          }\n          set altTextData({\n            altText,\n            decorative\n          }) {\n            if (this.#altText === altText && this.#altTextDecorative === decorative) {\n              return;\n            }\n            this.#altText = altText;\n            this.#altTextDecorative = decorative;\n            this.#setAltTextButtonState();\n          }\n          render() {\n            this.div = document.createElement(\"div\");\n            this.div.setAttribute(\"data-editor-rotation\", (360 - this.rotation) % 360);\n            this.div.className = this.name;\n            this.div.setAttribute(\"id\", this.id);\n            this.div.setAttribute(\"tabIndex\", 0);\n            this.setInForeground();\n            this.div.addEventListener(\"focusin\", this.#boundFocusin);\n            this.div.addEventListener(\"focusout\", this.#boundFocusout);\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            if (this.parentRotation % 180 !== 0) {\n              this.div.style.maxWidth = `${(100 * parentHeight / parentWidth).toFixed(2)}%`;\n              this.div.style.maxHeight = `${(100 * parentWidth / parentHeight).toFixed(2)}%`;\n            }\n            const [tx, ty] = this.getInitialTranslation();\n            this.translate(tx, ty);\n            (0, _tools.bindEvents)(this, this.div, [\"pointerdown\"]);\n            return this.div;\n          }\n          pointerdown(event) {\n            const {\n              isMac\n            } = _util.FeatureTest.platform;\n            if (event.button !== 0 || event.ctrlKey && isMac) {\n              event.preventDefault();\n              return;\n            }\n            this.#hasBeenClicked = true;\n            this.#setUpDragSession(event);\n          }\n          #setUpDragSession(event) {\n            if (!this._isDraggable) {\n              return;\n            }\n            const isSelected = this._uiManager.isSelected(this);\n            this._uiManager.setUpDragSession();\n            let pointerMoveOptions, pointerMoveCallback;\n            if (isSelected) {\n              pointerMoveOptions = {\n                passive: true,\n                capture: true\n              };\n              pointerMoveCallback = e => {\n                const [tx, ty] = this.screenToPageTranslation(e.movementX, e.movementY);\n                this._uiManager.dragSelectedEditors(tx, ty);\n              };\n              window.addEventListener(\"pointermove\", pointerMoveCallback, pointerMoveOptions);\n            }\n            const pointerUpCallback = () => {\n              window.removeEventListener(\"pointerup\", pointerUpCallback);\n              window.removeEventListener(\"blur\", pointerUpCallback);\n              if (isSelected) {\n                window.removeEventListener(\"pointermove\", pointerMoveCallback, pointerMoveOptions);\n              }\n              this.#hasBeenClicked = false;\n              if (!this._uiManager.endDragSession()) {\n                const {\n                  isMac\n                } = _util.FeatureTest.platform;\n                if (event.ctrlKey && !isMac || event.shiftKey || event.metaKey && isMac) {\n                  this.parent.toggleSelected(this);\n                } else {\n                  this.parent.setSelected(this);\n                }\n              }\n            };\n            window.addEventListener(\"pointerup\", pointerUpCallback);\n            window.addEventListener(\"blur\", pointerUpCallback);\n          }\n          moveInDOM() {\n            this.parent?.moveEditorInDOM(this);\n          }\n          _setParentAndPosition(parent, x, y) {\n            parent.changeParent(this);\n            this.x = x;\n            this.y = y;\n            this.fixAndSetPosition();\n          }\n          getRect(tx, ty) {\n            const scale = this.parentScale;\n            const [pageWidth, pageHeight] = this.pageDimensions;\n            const [pageX, pageY] = this.pageTranslation;\n            const shiftX = tx / scale;\n            const shiftY = ty / scale;\n            const x = this.x * pageWidth;\n            const y = this.y * pageHeight;\n            const width = this.width * pageWidth;\n            const height = this.height * pageHeight;\n            switch (this.rotation) {\n              case 0:\n                return [x + shiftX + pageX, pageHeight - y - shiftY - height + pageY, x + shiftX + width + pageX, pageHeight - y - shiftY + pageY];\n              case 90:\n                return [x + shiftY + pageX, pageHeight - y + shiftX + pageY, x + shiftY + height + pageX, pageHeight - y + shiftX + width + pageY];\n              case 180:\n                return [x - shiftX - width + pageX, pageHeight - y + shiftY + pageY, x - shiftX + pageX, pageHeight - y + shiftY + height + pageY];\n              case 270:\n                return [x - shiftY - height + pageX, pageHeight - y - shiftX - width + pageY, x - shiftY + pageX, pageHeight - y - shiftX + pageY];\n              default:\n                throw new Error(\"Invalid rotation\");\n            }\n          }\n          getRectInCurrentCoords(rect, pageHeight) {\n            const [x1, y1, x2, y2] = rect;\n            const width = x2 - x1;\n            const height = y2 - y1;\n            switch (this.rotation) {\n              case 0:\n                return [x1, pageHeight - y2, width, height];\n              case 90:\n                return [x1, pageHeight - y1, height, width];\n              case 180:\n                return [x2, pageHeight - y1, width, height];\n              case 270:\n                return [x2, pageHeight - y2, height, width];\n              default:\n                throw new Error(\"Invalid rotation\");\n            }\n          }\n          onceAdded() {}\n          isEmpty() {\n            return false;\n          }\n          enableEditMode() {\n            this.#isInEditMode = true;\n          }\n          disableEditMode() {\n            this.#isInEditMode = false;\n          }\n          isInEditMode() {\n            return this.#isInEditMode;\n          }\n          shouldGetKeyboardEvents() {\n            return false;\n          }\n          needsToBeRebuilt() {\n            return this.div && !this.isAttachedToDOM;\n          }\n          rebuild() {\n            this.div?.addEventListener(\"focusin\", this.#boundFocusin);\n            this.div?.addEventListener(\"focusout\", this.#boundFocusout);\n          }\n          serialize(isForCopying = false, context = null) {\n            (0, _util.unreachable)(\"An editor must be serializable\");\n          }\n          static deserialize(data, parent, uiManager) {\n            const editor = new this.prototype.constructor({\n              parent,\n              id: parent.getNextId(),\n              uiManager\n            });\n            editor.rotation = data.rotation;\n            const [pageWidth, pageHeight] = editor.pageDimensions;\n            const [x, y, width, height] = editor.getRectInCurrentCoords(data.rect, pageHeight);\n            editor.x = x / pageWidth;\n            editor.y = y / pageHeight;\n            editor.width = width / pageWidth;\n            editor.height = height / pageHeight;\n            return editor;\n          }\n          remove() {\n            this.div.removeEventListener(\"focusin\", this.#boundFocusin);\n            this.div.removeEventListener(\"focusout\", this.#boundFocusout);\n            if (!this.isEmpty()) {\n              this.commit();\n            }\n            if (this.parent) {\n              this.parent.remove(this);\n            } else {\n              this._uiManager.removeEditor(this);\n            }\n            this.#altTextButton?.remove();\n            this.#altTextButton = null;\n            this.#altTextTooltip = null;\n          }\n          get isResizable() {\n            return false;\n          }\n          makeResizable() {\n            if (this.isResizable) {\n              this.#createResizers();\n              this.#resizersDiv.classList.remove(\"hidden\");\n            }\n          }\n          select() {\n            this.makeResizable();\n            this.div?.classList.add(\"selectedEditor\");\n          }\n          unselect() {\n            this.#resizersDiv?.classList.add(\"hidden\");\n            this.div?.classList.remove(\"selectedEditor\");\n            if (this.div?.contains(document.activeElement)) {\n              this._uiManager.currentLayer.div.focus();\n            }\n          }\n          updateParams(type, value) {}\n          disableEditing() {\n            if (this.#altTextButton) {\n              this.#altTextButton.hidden = true;\n            }\n          }\n          enableEditing() {\n            if (this.#altTextButton) {\n              this.#altTextButton.hidden = false;\n            }\n          }\n          enterInEditMode() {}\n          get contentDiv() {\n            return this.div;\n          }\n          get isEditing() {\n            return this.#isEditing;\n          }\n          set isEditing(value) {\n            this.#isEditing = value;\n            if (!this.parent) {\n              return;\n            }\n            if (value) {\n              this.parent.setSelected(this);\n              this.parent.setActiveEditor(this);\n            } else {\n              this.parent.setActiveEditor(null);\n            }\n          }\n          setAspectRatio(width, height) {\n            this.#keepAspectRatio = true;\n            const aspectRatio = width / height;\n            const {\n              style\n            } = this.div;\n            style.aspectRatio = aspectRatio;\n            style.height = \"auto\";\n          }\n          static get MIN_SIZE() {\n            return 16;\n          }\n        }\n        exports.AnnotationEditor = AnnotationEditor;\n        class FakeEditor extends AnnotationEditor {\n          constructor(params) {\n            super(params);\n            this.annotationElementId = params.annotationElementId;\n            this.deleted = true;\n          }\n          serialize() {\n            return {\n              id: this.annotationElementId,\n              deleted: true,\n              pageIndex: this.pageIndex\n            };\n          }\n        }\n\n        /***/\n      }, /* 5 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.KeyboardManager = exports.CommandManager = exports.ColorManager = exports.AnnotationEditorUIManager = void 0;\n        exports.bindEvents = bindEvents;\n        exports.opacityToHex = opacityToHex;\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        function bindEvents(obj, element, names) {\n          for (const name of names) {\n            element.addEventListener(name, obj[name].bind(obj));\n          }\n        }\n        function opacityToHex(opacity) {\n          return Math.round(Math.min(255, Math.max(1, 255 * opacity))).toString(16).padStart(2, \"0\");\n        }\n        class IdManager {\n          #id = 0;\n          getId() {\n            return `${_util.AnnotationEditorPrefix}${this.#id++}`;\n          }\n        }\n        class ImageManager {\n          #baseId = (0, _util.getUuid)();\n          #id = 0;\n          #cache = null;\n          static get _isSVGFittingCanvas() {\n            const svg = `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>`;\n            const canvas = new OffscreenCanvas(1, 3);\n            const ctx = canvas.getContext(\"2d\");\n            const image = new Image();\n            image.src = svg;\n            const promise = image.decode().then(() => {\n              ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3);\n              return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0;\n            });\n            return (0, _util.shadow)(this, \"_isSVGFittingCanvas\", promise);\n          }\n          async #get(key, rawData) {\n            this.#cache ||= new Map();\n            let data = this.#cache.get(key);\n            if (data === null) {\n              return null;\n            }\n            if (data?.bitmap) {\n              data.refCounter += 1;\n              return data;\n            }\n            try {\n              data ||= {\n                bitmap: null,\n                id: `image_${this.#baseId}_${this.#id++}`,\n                refCounter: 0,\n                isSvg: false\n              };\n              let image;\n              if (typeof rawData === \"string\") {\n                data.url = rawData;\n                const response = await fetch(rawData);\n                if (!response.ok) {\n                  throw new Error(response.statusText);\n                }\n                image = await response.blob();\n              } else {\n                image = data.file = rawData;\n              }\n              if (image.type === \"image/svg+xml\") {\n                const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas;\n                const fileReader = new FileReader();\n                const imageElement = new Image();\n                const imagePromise = new Promise((resolve, reject) => {\n                  imageElement.onload = () => {\n                    data.bitmap = imageElement;\n                    data.isSvg = true;\n                    resolve();\n                  };\n                  fileReader.onload = async () => {\n                    const url = data.svgUrl = fileReader.result;\n                    imageElement.src = (await mustRemoveAspectRatioPromise) ? `${url}#svgView(preserveAspectRatio(none))` : url;\n                  };\n                  imageElement.onerror = fileReader.onerror = reject;\n                });\n                fileReader.readAsDataURL(image);\n                await imagePromise;\n              } else {\n                data.bitmap = await createImageBitmap(image);\n              }\n              data.refCounter = 1;\n            } catch (e) {\n              console.error(e);\n              data = null;\n            }\n            this.#cache.set(key, data);\n            if (data) {\n              this.#cache.set(data.id, data);\n            }\n            return data;\n          }\n          async getFromFile(file) {\n            const {\n              lastModified,\n              name,\n              size,\n              type\n            } = file;\n            return this.#get(`${lastModified}_${name}_${size}_${type}`, file);\n          }\n          async getFromUrl(url) {\n            return this.#get(url, url);\n          }\n          async getFromId(id) {\n            this.#cache ||= new Map();\n            const data = this.#cache.get(id);\n            if (!data) {\n              return null;\n            }\n            if (data.bitmap) {\n              data.refCounter += 1;\n              return data;\n            }\n            if (data.file) {\n              return this.getFromFile(data.file);\n            }\n            return this.getFromUrl(data.url);\n          }\n          getSvgUrl(id) {\n            const data = this.#cache.get(id);\n            if (!data?.isSvg) {\n              return null;\n            }\n            return data.svgUrl;\n          }\n          deleteId(id) {\n            this.#cache ||= new Map();\n            const data = this.#cache.get(id);\n            if (!data) {\n              return;\n            }\n            data.refCounter -= 1;\n            if (data.refCounter !== 0) {\n              return;\n            }\n            data.bitmap = null;\n          }\n          isValidId(id) {\n            return id.startsWith(`image_${this.#baseId}_`);\n          }\n        }\n        class CommandManager {\n          #commands = [];\n          #locked = false;\n          #maxSize;\n          #position = -1;\n          constructor(maxSize = 128) {\n            this.#maxSize = maxSize;\n          }\n          add({\n            cmd,\n            undo,\n            mustExec,\n            type = NaN,\n            overwriteIfSameType = false,\n            keepUndo = false\n          }) {\n            if (mustExec) {\n              cmd();\n            }\n            if (this.#locked) {\n              return;\n            }\n            const save = {\n              cmd,\n              undo,\n              type\n            };\n            if (this.#position === -1) {\n              if (this.#commands.length > 0) {\n                this.#commands.length = 0;\n              }\n              this.#position = 0;\n              this.#commands.push(save);\n              return;\n            }\n            if (overwriteIfSameType && this.#commands[this.#position].type === type) {\n              if (keepUndo) {\n                save.undo = this.#commands[this.#position].undo;\n              }\n              this.#commands[this.#position] = save;\n              return;\n            }\n            const next = this.#position + 1;\n            if (next === this.#maxSize) {\n              this.#commands.splice(0, 1);\n            } else {\n              this.#position = next;\n              if (next < this.#commands.length) {\n                this.#commands.splice(next);\n              }\n            }\n            this.#commands.push(save);\n          }\n          undo() {\n            if (this.#position === -1) {\n              return;\n            }\n            this.#locked = true;\n            this.#commands[this.#position].undo();\n            this.#locked = false;\n            this.#position -= 1;\n          }\n          redo() {\n            if (this.#position < this.#commands.length - 1) {\n              this.#position += 1;\n              this.#locked = true;\n              this.#commands[this.#position].cmd();\n              this.#locked = false;\n            }\n          }\n          hasSomethingToUndo() {\n            return this.#position !== -1;\n          }\n          hasSomethingToRedo() {\n            return this.#position < this.#commands.length - 1;\n          }\n          destroy() {\n            this.#commands = null;\n          }\n        }\n        exports.CommandManager = CommandManager;\n        class KeyboardManager {\n          constructor(callbacks) {\n            this.buffer = [];\n            this.callbacks = new Map();\n            this.allKeys = new Set();\n            const {\n              isMac\n            } = _util.FeatureTest.platform;\n            for (const [keys, callback, options = {}] of callbacks) {\n              for (const key of keys) {\n                const isMacKey = key.startsWith(\"mac+\");\n                if (isMac && isMacKey) {\n                  this.callbacks.set(key.slice(4), {\n                    callback,\n                    options\n                  });\n                  this.allKeys.add(key.split(\"+\").at(-1));\n                } else if (!isMac && !isMacKey) {\n                  this.callbacks.set(key, {\n                    callback,\n                    options\n                  });\n                  this.allKeys.add(key.split(\"+\").at(-1));\n                }\n              }\n            }\n          }\n          #serialize(event) {\n            if (event.altKey) {\n              this.buffer.push(\"alt\");\n            }\n            if (event.ctrlKey) {\n              this.buffer.push(\"ctrl\");\n            }\n            if (event.metaKey) {\n              this.buffer.push(\"meta\");\n            }\n            if (event.shiftKey) {\n              this.buffer.push(\"shift\");\n            }\n            this.buffer.push(event.key);\n            const str = this.buffer.join(\"+\");\n            this.buffer.length = 0;\n            return str;\n          }\n          exec(self, event) {\n            if (!this.allKeys.has(event.key)) {\n              return;\n            }\n            const info = this.callbacks.get(this.#serialize(event));\n            if (!info) {\n              return;\n            }\n            const {\n              callback,\n              options: {\n                bubbles = false,\n                args = [],\n                checker = null\n              }\n            } = info;\n            if (checker && !checker(self, event)) {\n              return;\n            }\n            callback.bind(self, ...args)();\n            if (!bubbles) {\n              event.stopPropagation();\n              event.preventDefault();\n            }\n          }\n        }\n        exports.KeyboardManager = KeyboardManager;\n        class ColorManager {\n          static _colorsMapping = new Map([[\"CanvasText\", [0, 0, 0]], [\"Canvas\", [255, 255, 255]]]);\n          get _colors() {\n            const colors = new Map([[\"CanvasText\", null], [\"Canvas\", null]]);\n            (0, _display_utils.getColorValues)(colors);\n            return (0, _util.shadow)(this, \"_colors\", colors);\n          }\n          convert(color) {\n            const rgb = (0, _display_utils.getRGB)(color);\n            if (!window.matchMedia(\"(forced-colors: active)\").matches) {\n              return rgb;\n            }\n            for (const [name, RGB] of this._colors) {\n              if (RGB.every((x, i) => x === rgb[i])) {\n                return ColorManager._colorsMapping.get(name);\n              }\n            }\n            return rgb;\n          }\n          getHexCode(name) {\n            const rgb = this._colors.get(name);\n            if (!rgb) {\n              return name;\n            }\n            return _util.Util.makeHexColor(...rgb);\n          }\n        }\n        exports.ColorManager = ColorManager;\n        class AnnotationEditorUIManager {\n          #activeEditor = null;\n          #allEditors = new Map();\n          #allLayers = new Map();\n          #altTextManager = null;\n          #annotationStorage = null;\n          #commandManager = new CommandManager();\n          #currentPageIndex = 0;\n          #deletedAnnotationsElementIds = new Set();\n          #draggingEditors = null;\n          #editorTypes = null;\n          #editorsToRescale = new Set();\n          #filterFactory = null;\n          #idManager = new IdManager();\n          #isEnabled = false;\n          #isWaiting = false;\n          #lastActiveElement = null;\n          #mode = _util.AnnotationEditorType.NONE;\n          #selectedEditors = new Set();\n          #pageColors = null;\n          #boundBlur = this.blur.bind(this);\n          #boundFocus = this.focus.bind(this);\n          #boundCopy = this.copy.bind(this);\n          #boundCut = this.cut.bind(this);\n          #boundPaste = this.paste.bind(this);\n          #boundKeydown = this.keydown.bind(this);\n          #boundOnEditingAction = this.onEditingAction.bind(this);\n          #boundOnPageChanging = this.onPageChanging.bind(this);\n          #boundOnScaleChanging = this.onScaleChanging.bind(this);\n          #boundOnRotationChanging = this.onRotationChanging.bind(this);\n          #previousStates = {\n            isEditing: false,\n            isEmpty: true,\n            hasSomethingToUndo: false,\n            hasSomethingToRedo: false,\n            hasSelectedEditor: false\n          };\n          #translation = [0, 0];\n          #translationTimeoutId = null;\n          #container = null;\n          #viewer = null;\n          static TRANSLATE_SMALL = 1;\n          static TRANSLATE_BIG = 10;\n          static get _keyboardManager() {\n            const proto = AnnotationEditorUIManager.prototype;\n            const arrowChecker = self => {\n              const {\n                activeElement\n              } = document;\n              return activeElement && self.#container.contains(activeElement) && self.hasSomethingToControl();\n            };\n            const small = this.TRANSLATE_SMALL;\n            const big = this.TRANSLATE_BIG;\n            return (0, _util.shadow)(this, \"_keyboardManager\", new KeyboardManager([[[\"ctrl+a\", \"mac+meta+a\"], proto.selectAll], [[\"ctrl+z\", \"mac+meta+z\"], proto.undo], [[\"ctrl+y\", \"ctrl+shift+z\", \"mac+meta+shift+z\", \"ctrl+shift+Z\", \"mac+meta+shift+Z\"], proto.redo], [[\"Backspace\", \"alt+Backspace\", \"ctrl+Backspace\", \"shift+Backspace\", \"mac+Backspace\", \"mac+alt+Backspace\", \"mac+ctrl+Backspace\", \"Delete\", \"ctrl+Delete\", \"shift+Delete\", \"mac+Delete\"], proto.delete], [[\"Escape\", \"mac+Escape\"], proto.unselectAll], [[\"ArrowLeft\", \"mac+ArrowLeft\"], proto.translateSelectedEditors, {\n              args: [-small, 0],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], proto.translateSelectedEditors, {\n              args: [-big, 0],\n              checker: arrowChecker\n            }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto.translateSelectedEditors, {\n              args: [small, 0],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], proto.translateSelectedEditors, {\n              args: [big, 0],\n              checker: arrowChecker\n            }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto.translateSelectedEditors, {\n              args: [0, -small],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], proto.translateSelectedEditors, {\n              args: [0, -big],\n              checker: arrowChecker\n            }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto.translateSelectedEditors, {\n              args: [0, small],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], proto.translateSelectedEditors, {\n              args: [0, big],\n              checker: arrowChecker\n            }]]));\n          }\n          constructor(container, viewer, altTextManager, eventBus, pdfDocument, pageColors) {\n            this.#container = container;\n            this.#viewer = viewer;\n            this.#altTextManager = altTextManager;\n            this._eventBus = eventBus;\n            this._eventBus._on(\"editingaction\", this.#boundOnEditingAction);\n            this._eventBus._on(\"pagechanging\", this.#boundOnPageChanging);\n            this._eventBus._on(\"scalechanging\", this.#boundOnScaleChanging);\n            this._eventBus._on(\"rotationchanging\", this.#boundOnRotationChanging);\n            this.#annotationStorage = pdfDocument.annotationStorage;\n            this.#filterFactory = pdfDocument.filterFactory;\n            this.#pageColors = pageColors;\n            this.viewParameters = {\n              realScale: _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS,\n              rotation: 0\n            };\n          }\n          destroy() {\n            this.#removeKeyboardManager();\n            this.#removeFocusManager();\n            this._eventBus._off(\"editingaction\", this.#boundOnEditingAction);\n            this._eventBus._off(\"pagechanging\", this.#boundOnPageChanging);\n            this._eventBus._off(\"scalechanging\", this.#boundOnScaleChanging);\n            this._eventBus._off(\"rotationchanging\", this.#boundOnRotationChanging);\n            for (const layer of this.#allLayers.values()) {\n              layer.destroy();\n            }\n            this.#allLayers.clear();\n            this.#allEditors.clear();\n            this.#editorsToRescale.clear();\n            this.#activeEditor = null;\n            this.#selectedEditors.clear();\n            this.#commandManager.destroy();\n            this.#altTextManager.destroy();\n          }\n          get hcmFilter() {\n            return (0, _util.shadow)(this, \"hcmFilter\", this.#pageColors ? this.#filterFactory.addHCMFilter(this.#pageColors.foreground, this.#pageColors.background) : \"none\");\n          }\n          get direction() {\n            return (0, _util.shadow)(this, \"direction\", getComputedStyle(this.#container).direction);\n          }\n          editAltText(editor) {\n            this.#altTextManager?.editAltText(this, editor);\n          }\n          onPageChanging({\n            pageNumber\n          }) {\n            this.#currentPageIndex = pageNumber - 1;\n          }\n          focusMainContainer() {\n            this.#container.focus();\n          }\n          findParent(x, y) {\n            for (const layer of this.#allLayers.values()) {\n              const {\n                x: layerX,\n                y: layerY,\n                width,\n                height\n              } = layer.div.getBoundingClientRect();\n              if (x >= layerX && x <= layerX + width && y >= layerY && y <= layerY + height) {\n                return layer;\n              }\n            }\n            return null;\n          }\n          disableUserSelect(value = false) {\n            this.#viewer.classList.toggle(\"noUserSelect\", value);\n          }\n          addShouldRescale(editor) {\n            this.#editorsToRescale.add(editor);\n          }\n          removeShouldRescale(editor) {\n            this.#editorsToRescale.delete(editor);\n          }\n          onScaleChanging({\n            scale\n          }) {\n            this.commitOrRemove();\n            this.viewParameters.realScale = scale * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS;\n            for (const editor of this.#editorsToRescale) {\n              editor.onScaleChanging();\n            }\n          }\n          onRotationChanging({\n            pagesRotation\n          }) {\n            this.commitOrRemove();\n            this.viewParameters.rotation = pagesRotation;\n          }\n          addToAnnotationStorage(editor) {\n            if (!editor.isEmpty() && this.#annotationStorage && !this.#annotationStorage.has(editor.id)) {\n              this.#annotationStorage.setValue(editor.id, editor);\n            }\n          }\n          #addFocusManager() {\n            window.addEventListener(\"focus\", this.#boundFocus);\n            window.addEventListener(\"blur\", this.#boundBlur);\n          }\n          #removeFocusManager() {\n            window.removeEventListener(\"focus\", this.#boundFocus);\n            window.removeEventListener(\"blur\", this.#boundBlur);\n          }\n          blur() {\n            if (!this.hasSelection) {\n              return;\n            }\n            const {\n              activeElement\n            } = document;\n            for (const editor of this.#selectedEditors) {\n              if (editor.div.contains(activeElement)) {\n                this.#lastActiveElement = [editor, activeElement];\n                editor._focusEventsAllowed = false;\n                break;\n              }\n            }\n          }\n          focus() {\n            if (!this.#lastActiveElement) {\n              return;\n            }\n            const [lastEditor, lastActiveElement] = this.#lastActiveElement;\n            this.#lastActiveElement = null;\n            lastActiveElement.addEventListener(\"focusin\", () => {\n              lastEditor._focusEventsAllowed = true;\n            }, {\n              once: true\n            });\n            lastActiveElement.focus();\n          }\n          #addKeyboardManager() {\n            window.addEventListener(\"keydown\", this.#boundKeydown, {\n              capture: true\n            });\n          }\n          #removeKeyboardManager() {\n            window.removeEventListener(\"keydown\", this.#boundKeydown, {\n              capture: true\n            });\n          }\n          #addCopyPasteListeners() {\n            document.addEventListener(\"copy\", this.#boundCopy);\n            document.addEventListener(\"cut\", this.#boundCut);\n            document.addEventListener(\"paste\", this.#boundPaste);\n          }\n          #removeCopyPasteListeners() {\n            document.removeEventListener(\"copy\", this.#boundCopy);\n            document.removeEventListener(\"cut\", this.#boundCut);\n            document.removeEventListener(\"paste\", this.#boundPaste);\n          }\n          addEditListeners() {\n            this.#addKeyboardManager();\n            this.#addCopyPasteListeners();\n          }\n          removeEditListeners() {\n            this.#removeKeyboardManager();\n            this.#removeCopyPasteListeners();\n          }\n          copy(event) {\n            event.preventDefault();\n            this.#activeEditor?.commitOrRemove();\n            if (!this.hasSelection) {\n              return;\n            }\n            const editors = [];\n            for (const editor of this.#selectedEditors) {\n              const serialized = editor.serialize(true);\n              if (serialized) {\n                editors.push(serialized);\n              }\n            }\n            if (editors.length === 0) {\n              return;\n            }\n            event.clipboardData.setData(\"application/pdfjs\", JSON.stringify(editors));\n          }\n          cut(event) {\n            this.copy(event);\n            this.delete();\n          }\n          paste(event) {\n            event.preventDefault();\n            const {\n              clipboardData\n            } = event;\n            for (const item of clipboardData.items) {\n              for (const editorType of this.#editorTypes) {\n                if (editorType.isHandlingMimeForPasting(item.type)) {\n                  editorType.paste(item, this.currentLayer);\n                  return;\n                }\n              }\n            }\n            let data = clipboardData.getData(\"application/pdfjs\");\n            if (!data) {\n              return;\n            }\n            try {\n              data = JSON.parse(data);\n            } catch (ex) {\n              (0, _util.warn)(`paste: \"${ex.message}\".`);\n              return;\n            }\n            if (!Array.isArray(data)) {\n              return;\n            }\n            this.unselectAll();\n            const layer = this.currentLayer;\n            try {\n              const newEditors = [];\n              for (const editor of data) {\n                const deserializedEditor = layer.deserialize(editor);\n                if (!deserializedEditor) {\n                  return;\n                }\n                newEditors.push(deserializedEditor);\n              }\n              const cmd = () => {\n                for (const editor of newEditors) {\n                  this.#addEditorToLayer(editor);\n                }\n                this.#selectEditors(newEditors);\n              };\n              const undo = () => {\n                for (const editor of newEditors) {\n                  editor.remove();\n                }\n              };\n              this.addCommands({\n                cmd,\n                undo,\n                mustExec: true\n              });\n            } catch (ex) {\n              (0, _util.warn)(`paste: \"${ex.message}\".`);\n            }\n          }\n          keydown(event) {\n            if (!this.getActive()?.shouldGetKeyboardEvents()) {\n              AnnotationEditorUIManager._keyboardManager.exec(this, event);\n            }\n          }\n          onEditingAction(details) {\n            if ([\"undo\", \"redo\", \"delete\", \"selectAll\"].includes(details.name)) {\n              this[details.name]();\n            }\n          }\n          #dispatchUpdateStates(details) {\n            const hasChanged = Object.entries(details).some(([key, value]) => this.#previousStates[key] !== value);\n            if (hasChanged) {\n              this._eventBus.dispatch(\"annotationeditorstateschanged\", {\n                source: this,\n                details: Object.assign(this.#previousStates, details)\n              });\n            }\n          }\n          #dispatchUpdateUI(details) {\n            this._eventBus.dispatch(\"annotationeditorparamschanged\", {\n              source: this,\n              details\n            });\n          }\n          setEditingState(isEditing) {\n            if (isEditing) {\n              this.#addFocusManager();\n              this.#addKeyboardManager();\n              this.#addCopyPasteListeners();\n              this.#dispatchUpdateStates({\n                isEditing: this.#mode !== _util.AnnotationEditorType.NONE,\n                isEmpty: this.#isEmpty(),\n                hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n                hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n                hasSelectedEditor: false\n              });\n            } else {\n              this.#removeFocusManager();\n              this.#removeKeyboardManager();\n              this.#removeCopyPasteListeners();\n              this.#dispatchUpdateStates({\n                isEditing: false\n              });\n              this.disableUserSelect(false);\n            }\n          }\n          registerEditorTypes(types) {\n            if (this.#editorTypes) {\n              return;\n            }\n            this.#editorTypes = types;\n            for (const editorType of this.#editorTypes) {\n              this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);\n            }\n          }\n          getId() {\n            return this.#idManager.getId();\n          }\n          get currentLayer() {\n            return this.#allLayers.get(this.#currentPageIndex);\n          }\n          getLayer(pageIndex) {\n            return this.#allLayers.get(pageIndex);\n          }\n          get currentPageIndex() {\n            return this.#currentPageIndex;\n          }\n          addLayer(layer) {\n            this.#allLayers.set(layer.pageIndex, layer);\n            if (this.#isEnabled) {\n              layer.enable();\n            } else {\n              layer.disable();\n            }\n          }\n          removeLayer(layer) {\n            this.#allLayers.delete(layer.pageIndex);\n          }\n          updateMode(mode, editId = null) {\n            if (this.#mode === mode) {\n              return;\n            }\n            this.#mode = mode;\n            if (mode === _util.AnnotationEditorType.NONE) {\n              this.setEditingState(false);\n              this.#disableAll();\n              return;\n            }\n            this.setEditingState(true);\n            this.#enableAll();\n            this.unselectAll();\n            for (const layer of this.#allLayers.values()) {\n              layer.updateMode(mode);\n            }\n            if (!editId) {\n              return;\n            }\n            for (const editor of this.#allEditors.values()) {\n              if (editor.annotationElementId === editId) {\n                this.setSelected(editor);\n                editor.enterInEditMode();\n                break;\n              }\n            }\n          }\n          updateToolbar(mode) {\n            if (mode === this.#mode) {\n              return;\n            }\n            this._eventBus.dispatch(\"switchannotationeditormode\", {\n              source: this,\n              mode\n            });\n          }\n          updateParams(type, value) {\n            if (!this.#editorTypes) {\n              return;\n            }\n            if (type === _util.AnnotationEditorParamsType.CREATE) {\n              this.currentLayer.addNewEditor(type);\n              return;\n            }\n            for (const editor of this.#selectedEditors) {\n              editor.updateParams(type, value);\n            }\n            for (const editorType of this.#editorTypes) {\n              editorType.updateDefaultParams(type, value);\n            }\n          }\n          enableWaiting(mustWait = false) {\n            if (this.#isWaiting === mustWait) {\n              return;\n            }\n            this.#isWaiting = mustWait;\n            for (const layer of this.#allLayers.values()) {\n              if (mustWait) {\n                layer.disableClick();\n              } else {\n                layer.enableClick();\n              }\n              layer.div.classList.toggle(\"waiting\", mustWait);\n            }\n          }\n          #enableAll() {\n            if (!this.#isEnabled) {\n              this.#isEnabled = true;\n              for (const layer of this.#allLayers.values()) {\n                layer.enable();\n              }\n            }\n          }\n          #disableAll() {\n            this.unselectAll();\n            if (this.#isEnabled) {\n              this.#isEnabled = false;\n              for (const layer of this.#allLayers.values()) {\n                layer.disable();\n              }\n            }\n          }\n          getEditors(pageIndex) {\n            const editors = [];\n            for (const editor of this.#allEditors.values()) {\n              if (editor.pageIndex === pageIndex) {\n                editors.push(editor);\n              }\n            }\n            return editors;\n          }\n          getEditor(id) {\n            return this.#allEditors.get(id);\n          }\n          addEditor(editor) {\n            this.#allEditors.set(editor.id, editor);\n          }\n          removeEditor(editor) {\n            this.#allEditors.delete(editor.id);\n            this.unselect(editor);\n            if (!editor.annotationElementId || !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)) {\n              this.#annotationStorage?.remove(editor.id);\n            }\n          }\n          addDeletedAnnotationElement(editor) {\n            this.#deletedAnnotationsElementIds.add(editor.annotationElementId);\n            editor.deleted = true;\n          }\n          isDeletedAnnotationElement(annotationElementId) {\n            return this.#deletedAnnotationsElementIds.has(annotationElementId);\n          }\n          removeDeletedAnnotationElement(editor) {\n            this.#deletedAnnotationsElementIds.delete(editor.annotationElementId);\n            editor.deleted = false;\n          }\n          #addEditorToLayer(editor) {\n            const layer = this.#allLayers.get(editor.pageIndex);\n            if (layer) {\n              layer.addOrRebuild(editor);\n            } else {\n              this.addEditor(editor);\n            }\n          }\n          setActiveEditor(editor) {\n            if (this.#activeEditor === editor) {\n              return;\n            }\n            this.#activeEditor = editor;\n            if (editor) {\n              this.#dispatchUpdateUI(editor.propertiesToUpdate);\n            }\n          }\n          toggleSelected(editor) {\n            if (this.#selectedEditors.has(editor)) {\n              this.#selectedEditors.delete(editor);\n              editor.unselect();\n              this.#dispatchUpdateStates({\n                hasSelectedEditor: this.hasSelection\n              });\n              return;\n            }\n            this.#selectedEditors.add(editor);\n            editor.select();\n            this.#dispatchUpdateUI(editor.propertiesToUpdate);\n            this.#dispatchUpdateStates({\n              hasSelectedEditor: true\n            });\n          }\n          setSelected(editor) {\n            for (const ed of this.#selectedEditors) {\n              if (ed !== editor) {\n                ed.unselect();\n              }\n            }\n            this.#selectedEditors.clear();\n            this.#selectedEditors.add(editor);\n            editor.select();\n            this.#dispatchUpdateUI(editor.propertiesToUpdate);\n            this.#dispatchUpdateStates({\n              hasSelectedEditor: true\n            });\n          }\n          isSelected(editor) {\n            return this.#selectedEditors.has(editor);\n          }\n          unselect(editor) {\n            editor.unselect();\n            this.#selectedEditors.delete(editor);\n            this.#dispatchUpdateStates({\n              hasSelectedEditor: this.hasSelection\n            });\n          }\n          get hasSelection() {\n            return this.#selectedEditors.size !== 0;\n          }\n          undo() {\n            this.#commandManager.undo();\n            this.#dispatchUpdateStates({\n              hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n              hasSomethingToRedo: true,\n              isEmpty: this.#isEmpty()\n            });\n          }\n          redo() {\n            this.#commandManager.redo();\n            this.#dispatchUpdateStates({\n              hasSomethingToUndo: true,\n              hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n              isEmpty: this.#isEmpty()\n            });\n          }\n          addCommands(params) {\n            this.#commandManager.add(params);\n            this.#dispatchUpdateStates({\n              hasSomethingToUndo: true,\n              hasSomethingToRedo: false,\n              isEmpty: this.#isEmpty()\n            });\n          }\n          #isEmpty() {\n            if (this.#allEditors.size === 0) {\n              return true;\n            }\n            if (this.#allEditors.size === 1) {\n              for (const editor of this.#allEditors.values()) {\n                return editor.isEmpty();\n              }\n            }\n            return false;\n          }\n          delete() {\n            this.commitOrRemove();\n            if (!this.hasSelection) {\n              return;\n            }\n            const editors = [...this.#selectedEditors];\n            const cmd = () => {\n              for (const editor of editors) {\n                editor.remove();\n              }\n            };\n            const undo = () => {\n              for (const editor of editors) {\n                this.#addEditorToLayer(editor);\n              }\n            };\n            this.addCommands({\n              cmd,\n              undo,\n              mustExec: true\n            });\n          }\n          commitOrRemove() {\n            this.#activeEditor?.commitOrRemove();\n          }\n          hasSomethingToControl() {\n            return this.#activeEditor || this.hasSelection;\n          }\n          #selectEditors(editors) {\n            this.#selectedEditors.clear();\n            for (const editor of editors) {\n              if (editor.isEmpty()) {\n                continue;\n              }\n              this.#selectedEditors.add(editor);\n              editor.select();\n            }\n            this.#dispatchUpdateStates({\n              hasSelectedEditor: true\n            });\n          }\n          selectAll() {\n            for (const editor of this.#selectedEditors) {\n              editor.commit();\n            }\n            this.#selectEditors(this.#allEditors.values());\n          }\n          unselectAll() {\n            if (this.#activeEditor) {\n              this.#activeEditor.commitOrRemove();\n              return;\n            }\n            if (!this.hasSelection) {\n              return;\n            }\n            for (const editor of this.#selectedEditors) {\n              editor.unselect();\n            }\n            this.#selectedEditors.clear();\n            this.#dispatchUpdateStates({\n              hasSelectedEditor: false\n            });\n          }\n          translateSelectedEditors(x, y, noCommit = false) {\n            if (!noCommit) {\n              this.commitOrRemove();\n            }\n            if (!this.hasSelection) {\n              return;\n            }\n            this.#translation[0] += x;\n            this.#translation[1] += y;\n            const [totalX, totalY] = this.#translation;\n            const editors = [...this.#selectedEditors];\n            const TIME_TO_WAIT = 1000;\n            if (this.#translationTimeoutId) {\n              clearTimeout(this.#translationTimeoutId);\n            }\n            this.#translationTimeoutId = setTimeout(() => {\n              this.#translationTimeoutId = null;\n              this.#translation[0] = this.#translation[1] = 0;\n              this.addCommands({\n                cmd: () => {\n                  for (const editor of editors) {\n                    if (this.#allEditors.has(editor.id)) {\n                      editor.translateInPage(totalX, totalY);\n                    }\n                  }\n                },\n                undo: () => {\n                  for (const editor of editors) {\n                    if (this.#allEditors.has(editor.id)) {\n                      editor.translateInPage(-totalX, -totalY);\n                    }\n                  }\n                },\n                mustExec: false\n              });\n            }, TIME_TO_WAIT);\n            for (const editor of editors) {\n              editor.translateInPage(x, y);\n            }\n          }\n          setUpDragSession() {\n            if (!this.hasSelection) {\n              return;\n            }\n            this.disableUserSelect(true);\n            this.#draggingEditors = new Map();\n            for (const editor of this.#selectedEditors) {\n              this.#draggingEditors.set(editor, {\n                savedX: editor.x,\n                savedY: editor.y,\n                savedPageIndex: editor.pageIndex,\n                newX: 0,\n                newY: 0,\n                newPageIndex: -1\n              });\n            }\n          }\n          endDragSession() {\n            if (!this.#draggingEditors) {\n              return false;\n            }\n            this.disableUserSelect(false);\n            const map = this.#draggingEditors;\n            this.#draggingEditors = null;\n            let mustBeAddedInUndoStack = false;\n            for (const [{\n              x,\n              y,\n              pageIndex\n            }, value] of map) {\n              value.newX = x;\n              value.newY = y;\n              value.newPageIndex = pageIndex;\n              mustBeAddedInUndoStack ||= x !== value.savedX || y !== value.savedY || pageIndex !== value.savedPageIndex;\n            }\n            if (!mustBeAddedInUndoStack) {\n              return false;\n            }\n            const move = (editor, x, y, pageIndex) => {\n              if (this.#allEditors.has(editor.id)) {\n                const parent = this.#allLayers.get(pageIndex);\n                if (parent) {\n                  editor._setParentAndPosition(parent, x, y);\n                } else {\n                  editor.pageIndex = pageIndex;\n                  editor.x = x;\n                  editor.y = y;\n                }\n              }\n            };\n            this.addCommands({\n              cmd: () => {\n                for (const [editor, {\n                  newX,\n                  newY,\n                  newPageIndex\n                }] of map) {\n                  move(editor, newX, newY, newPageIndex);\n                }\n              },\n              undo: () => {\n                for (const [editor, {\n                  savedX,\n                  savedY,\n                  savedPageIndex\n                }] of map) {\n                  move(editor, savedX, savedY, savedPageIndex);\n                }\n              },\n              mustExec: true\n            });\n            return true;\n          }\n          dragSelectedEditors(tx, ty) {\n            if (!this.#draggingEditors) {\n              return;\n            }\n            for (const editor of this.#draggingEditors.keys()) {\n              editor.drag(tx, ty);\n            }\n          }\n          rebuild(editor) {\n            if (editor.parent === null) {\n              const parent = this.getLayer(editor.pageIndex);\n              if (parent) {\n                parent.changeParent(editor);\n                parent.addOrRebuild(editor);\n              } else {\n                this.addEditor(editor);\n                this.addToAnnotationStorage(editor);\n                editor.rebuild();\n              }\n            } else {\n              editor.parent.addOrRebuild(editor);\n            }\n          }\n          isActive(editor) {\n            return this.#activeEditor === editor;\n          }\n          getActive() {\n            return this.#activeEditor;\n          }\n          getMode() {\n            return this.#mode;\n          }\n          get imageManager() {\n            return (0, _util.shadow)(this, \"imageManager\", new ImageManager());\n          }\n        }\n        exports.AnnotationEditorUIManager = AnnotationEditorUIManager;\n\n        /***/\n      }, /* 6 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.StatTimer = exports.RenderingCancelledException = exports.PixelsPerInch = exports.PageViewport = exports.PDFDateString = exports.DOMStandardFontDataFactory = exports.DOMSVGFactory = exports.DOMFilterFactory = exports.DOMCanvasFactory = exports.DOMCMapReaderFactory = void 0;\n        exports.deprecated = deprecated;\n        exports.getColorValues = getColorValues;\n        exports.getCurrentTransform = getCurrentTransform;\n        exports.getCurrentTransformInverse = getCurrentTransformInverse;\n        exports.getFilenameFromUrl = getFilenameFromUrl;\n        exports.getPdfFilenameFromUrl = getPdfFilenameFromUrl;\n        exports.getRGB = getRGB;\n        exports.getXfaPageViewport = getXfaPageViewport;\n        exports.isDataScheme = isDataScheme;\n        exports.isPdfFile = isPdfFile;\n        exports.isValidFetchUrl = isValidFetchUrl;\n        exports.loadScript = loadScript;\n        exports.noContextMenu = noContextMenu;\n        exports.setLayerDimensions = setLayerDimensions;\n        var _base_factory = __w_pdfjs_require__(7);\n        var _util = __w_pdfjs_require__(1);\n        const SVG_NS = \"http://www.w3.org/2000/svg\";\n        class PixelsPerInch {\n          static CSS = 96.0;\n          static PDF = 72.0;\n          static PDF_TO_CSS_UNITS = this.CSS / this.PDF;\n        }\n        exports.PixelsPerInch = PixelsPerInch;\n        class DOMFilterFactory extends _base_factory.BaseFilterFactory {\n          #_cache;\n          #_defs;\n          #docId;\n          #document;\n          #hcmFilter;\n          #hcmKey;\n          #hcmUrl;\n          #hcmHighlightFilter;\n          #hcmHighlightKey;\n          #hcmHighlightUrl;\n          #id = 0;\n          constructor({\n            docId,\n            ownerDocument = globalThis.document\n          } = {}) {\n            super();\n            this.#docId = docId;\n            this.#document = ownerDocument;\n          }\n          get #cache() {\n            return this.#_cache ||= new Map();\n          }\n          get #defs() {\n            if (!this.#_defs) {\n              const div = this.#document.createElement(\"div\");\n              const {\n                style\n              } = div;\n              style.visibility = \"hidden\";\n              style.contain = \"strict\";\n              style.width = style.height = 0;\n              style.position = \"absolute\";\n              style.top = style.left = 0;\n              style.zIndex = -1;\n              const svg = this.#document.createElementNS(SVG_NS, \"svg\");\n              svg.setAttribute(\"width\", 0);\n              svg.setAttribute(\"height\", 0);\n              this.#_defs = this.#document.createElementNS(SVG_NS, \"defs\");\n              div.append(svg);\n              svg.append(this.#_defs);\n              this.#document.body.append(div);\n            }\n            return this.#_defs;\n          }\n          addFilter(maps) {\n            if (!maps) {\n              return \"none\";\n            }\n            let value = this.#cache.get(maps);\n            if (value) {\n              return value;\n            }\n            let tableR, tableG, tableB, key;\n            if (maps.length === 1) {\n              const mapR = maps[0];\n              const buffer = new Array(256);\n              for (let i = 0; i < 256; i++) {\n                buffer[i] = mapR[i] / 255;\n              }\n              key = tableR = tableG = tableB = buffer.join(\",\");\n            } else {\n              const [mapR, mapG, mapB] = maps;\n              const bufferR = new Array(256);\n              const bufferG = new Array(256);\n              const bufferB = new Array(256);\n              for (let i = 0; i < 256; i++) {\n                bufferR[i] = mapR[i] / 255;\n                bufferG[i] = mapG[i] / 255;\n                bufferB[i] = mapB[i] / 255;\n              }\n              tableR = bufferR.join(\",\");\n              tableG = bufferG.join(\",\");\n              tableB = bufferB.join(\",\");\n              key = `${tableR}${tableG}${tableB}`;\n            }\n            value = this.#cache.get(key);\n            if (value) {\n              this.#cache.set(maps, value);\n              return value;\n            }\n            const id = `g_${this.#docId}_transfer_map_${this.#id++}`;\n            const url = `url(#${id})`;\n            this.#cache.set(maps, url);\n            this.#cache.set(key, url);\n            const filter = this.#createFilter(id);\n            this.#addTransferMapConversion(tableR, tableG, tableB, filter);\n            return url;\n          }\n          addHCMFilter(fgColor, bgColor) {\n            const key = `${fgColor}-${bgColor}`;\n            if (this.#hcmKey === key) {\n              return this.#hcmUrl;\n            }\n            this.#hcmKey = key;\n            this.#hcmUrl = \"none\";\n            this.#hcmFilter?.remove();\n            if (!fgColor || !bgColor) {\n              return this.#hcmUrl;\n            }\n            const fgRGB = this.#getRGB(fgColor);\n            fgColor = _util.Util.makeHexColor(...fgRGB);\n            const bgRGB = this.#getRGB(bgColor);\n            bgColor = _util.Util.makeHexColor(...bgRGB);\n            this.#defs.style.color = \"\";\n            if (fgColor === \"#000000\" && bgColor === \"#ffffff\" || fgColor === bgColor) {\n              return this.#hcmUrl;\n            }\n            const map = new Array(256);\n            for (let i = 0; i <= 255; i++) {\n              const x = i / 255;\n              map[i] = x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;\n            }\n            const table = map.join(\",\");\n            const id = `g_${this.#docId}_hcm_filter`;\n            const filter = this.#hcmHighlightFilter = this.#createFilter(id);\n            this.#addTransferMapConversion(table, table, table, filter);\n            this.#addGrayConversion(filter);\n            const getSteps = (c, n) => {\n              const start = fgRGB[c] / 255;\n              const end = bgRGB[c] / 255;\n              const arr = new Array(n + 1);\n              for (let i = 0; i <= n; i++) {\n                arr[i] = start + i / n * (end - start);\n              }\n              return arr.join(\",\");\n            };\n            this.#addTransferMapConversion(getSteps(0, 5), getSteps(1, 5), getSteps(2, 5), filter);\n            this.#hcmUrl = `url(#${id})`;\n            return this.#hcmUrl;\n          }\n          addHighlightHCMFilter(fgColor, bgColor, newFgColor, newBgColor) {\n            const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;\n            if (this.#hcmHighlightKey === key) {\n              return this.#hcmHighlightUrl;\n            }\n            this.#hcmHighlightKey = key;\n            this.#hcmHighlightUrl = \"none\";\n            this.#hcmHighlightFilter?.remove();\n            if (!fgColor || !bgColor) {\n              return this.#hcmHighlightUrl;\n            }\n            const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this));\n            let fgGray = Math.round(0.2126 * fgRGB[0] + 0.7152 * fgRGB[1] + 0.0722 * fgRGB[2]);\n            let bgGray = Math.round(0.2126 * bgRGB[0] + 0.7152 * bgRGB[1] + 0.0722 * bgRGB[2]);\n            let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(this.#getRGB.bind(this));\n            if (bgGray < fgGray) {\n              [fgGray, bgGray, newFgRGB, newBgRGB] = [bgGray, fgGray, newBgRGB, newFgRGB];\n            }\n            this.#defs.style.color = \"\";\n            const getSteps = (fg, bg, n) => {\n              const arr = new Array(256);\n              const step = (bgGray - fgGray) / n;\n              const newStart = fg / 255;\n              const newStep = (bg - fg) / (255 * n);\n              let prev = 0;\n              for (let i = 0; i <= n; i++) {\n                const k = Math.round(fgGray + i * step);\n                const value = newStart + i * newStep;\n                for (let j = prev; j <= k; j++) {\n                  arr[j] = value;\n                }\n                prev = k + 1;\n              }\n              for (let i = prev; i < 256; i++) {\n                arr[i] = arr[prev - 1];\n              }\n              return arr.join(\",\");\n            };\n            const id = `g_${this.#docId}_hcm_highlight_filter`;\n            const filter = this.#hcmHighlightFilter = this.#createFilter(id);\n            this.#addGrayConversion(filter);\n            this.#addTransferMapConversion(getSteps(newFgRGB[0], newBgRGB[0], 5), getSteps(newFgRGB[1], newBgRGB[1], 5), getSteps(newFgRGB[2], newBgRGB[2], 5), filter);\n            this.#hcmHighlightUrl = `url(#${id})`;\n            return this.#hcmHighlightUrl;\n          }\n          destroy(keepHCM = false) {\n            if (keepHCM && (this.#hcmUrl || this.#hcmHighlightUrl)) {\n              return;\n            }\n            if (this.#_defs) {\n              this.#_defs.parentNode.parentNode.remove();\n              this.#_defs = null;\n            }\n            if (this.#_cache) {\n              this.#_cache.clear();\n              this.#_cache = null;\n            }\n            this.#id = 0;\n          }\n          #addGrayConversion(filter) {\n            const feColorMatrix = this.#document.createElementNS(SVG_NS, \"feColorMatrix\");\n            feColorMatrix.setAttribute(\"type\", \"matrix\");\n            feColorMatrix.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\");\n            filter.append(feColorMatrix);\n          }\n          #createFilter(id) {\n            const filter = this.#document.createElementNS(SVG_NS, \"filter\");\n            filter.setAttribute(\"color-interpolation-filters\", \"sRGB\");\n            filter.setAttribute(\"id\", id);\n            this.#defs.append(filter);\n            return filter;\n          }\n          #appendFeFunc(feComponentTransfer, func, table) {\n            const feFunc = this.#document.createElementNS(SVG_NS, func);\n            feFunc.setAttribute(\"type\", \"discrete\");\n            feFunc.setAttribute(\"tableValues\", table);\n            feComponentTransfer.append(feFunc);\n          }\n          #addTransferMapConversion(rTable, gTable, bTable, filter) {\n            const feComponentTransfer = this.#document.createElementNS(SVG_NS, \"feComponentTransfer\");\n            filter.append(feComponentTransfer);\n            this.#appendFeFunc(feComponentTransfer, \"feFuncR\", rTable);\n            this.#appendFeFunc(feComponentTransfer, \"feFuncG\", gTable);\n            this.#appendFeFunc(feComponentTransfer, \"feFuncB\", bTable);\n          }\n          #getRGB(color) {\n            this.#defs.style.color = color;\n            return getRGB(getComputedStyle(this.#defs).getPropertyValue(\"color\"));\n          }\n        }\n        exports.DOMFilterFactory = DOMFilterFactory;\n        class DOMCanvasFactory extends _base_factory.BaseCanvasFactory {\n          constructor({\n            ownerDocument = globalThis.document\n          } = {}) {\n            super();\n            this._document = ownerDocument;\n          }\n          _createCanvas(width, height) {\n            const canvas = this._document.createElement(\"canvas\");\n            canvas.width = width;\n            canvas.height = height;\n            return canvas;\n          }\n        }\n        exports.DOMCanvasFactory = DOMCanvasFactory;\n        async function fetchData(url, asTypedArray = false) {\n          if (isValidFetchUrl(url, document.baseURI)) {\n            const response = await fetch(url);\n            if (!response.ok) {\n              throw new Error(response.statusText);\n            }\n            return asTypedArray ? new Uint8Array(await response.arrayBuffer()) : (0, _util.stringToBytes)(await response.text());\n          }\n          return new Promise((resolve, reject) => {\n            const request = new XMLHttpRequest();\n            request.open(\"GET\", url, true);\n            if (asTypedArray) {\n              request.responseType = \"arraybuffer\";\n            }\n            request.onreadystatechange = () => {\n              if (request.readyState !== XMLHttpRequest.DONE) {\n                return;\n              }\n              if (request.status === 200 || request.status === 0) {\n                let data;\n                if (asTypedArray && request.response) {\n                  data = new Uint8Array(request.response);\n                } else if (!asTypedArray && request.responseText) {\n                  data = (0, _util.stringToBytes)(request.responseText);\n                }\n                if (data) {\n                  resolve(data);\n                  return;\n                }\n              }\n              reject(new Error(request.statusText));\n            };\n            request.send(null);\n          });\n        }\n        class DOMCMapReaderFactory extends _base_factory.BaseCMapReaderFactory {\n          _fetchData(url, compressionType) {\n            return fetchData(url, this.isCompressed).then(data => {\n              return {\n                cMapData: data,\n                compressionType\n              };\n            });\n          }\n        }\n        exports.DOMCMapReaderFactory = DOMCMapReaderFactory;\n        class DOMStandardFontDataFactory extends _base_factory.BaseStandardFontDataFactory {\n          _fetchData(url) {\n            return fetchData(url, true);\n          }\n        }\n        exports.DOMStandardFontDataFactory = DOMStandardFontDataFactory;\n        class DOMSVGFactory extends _base_factory.BaseSVGFactory {\n          _createSVG(type) {\n            return document.createElementNS(SVG_NS, type);\n          }\n        }\n        exports.DOMSVGFactory = DOMSVGFactory;\n        class PageViewport {\n          constructor({\n            viewBox,\n            scale,\n            rotation,\n            offsetX = 0,\n            offsetY = 0,\n            dontFlip = false\n          }) {\n            this.viewBox = viewBox;\n            this.scale = scale;\n            this.rotation = rotation;\n            this.offsetX = offsetX;\n            this.offsetY = offsetY;\n            const centerX = (viewBox[2] + viewBox[0]) / 2;\n            const centerY = (viewBox[3] + viewBox[1]) / 2;\n            let rotateA, rotateB, rotateC, rotateD;\n            rotation %= 360;\n            if (rotation < 0) {\n              rotation += 360;\n            }\n            switch (rotation) {\n              case 180:\n                rotateA = -1;\n                rotateB = 0;\n                rotateC = 0;\n                rotateD = 1;\n                break;\n              case 90:\n                rotateA = 0;\n                rotateB = 1;\n                rotateC = 1;\n                rotateD = 0;\n                break;\n              case 270:\n                rotateA = 0;\n                rotateB = -1;\n                rotateC = -1;\n                rotateD = 0;\n                break;\n              case 0:\n                rotateA = 1;\n                rotateB = 0;\n                rotateC = 0;\n                rotateD = -1;\n                break;\n              default:\n                throw new Error(\"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\");\n            }\n            if (dontFlip) {\n              rotateC = -rotateC;\n              rotateD = -rotateD;\n            }\n            let offsetCanvasX, offsetCanvasY;\n            let width, height;\n            if (rotateA === 0) {\n              offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n              offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n              width = (viewBox[3] - viewBox[1]) * scale;\n              height = (viewBox[2] - viewBox[0]) * scale;\n            } else {\n              offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n              offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n              width = (viewBox[2] - viewBox[0]) * scale;\n              height = (viewBox[3] - viewBox[1]) * scale;\n            }\n            this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY];\n            this.width = width;\n            this.height = height;\n          }\n          get rawDims() {\n            const {\n              viewBox\n            } = this;\n            return (0, _util.shadow)(this, \"rawDims\", {\n              pageWidth: viewBox[2] - viewBox[0],\n              pageHeight: viewBox[3] - viewBox[1],\n              pageX: viewBox[0],\n              pageY: viewBox[1]\n            });\n          }\n          clone({\n            scale = this.scale,\n            rotation = this.rotation,\n            offsetX = this.offsetX,\n            offsetY = this.offsetY,\n            dontFlip = false\n          } = {}) {\n            return new PageViewport({\n              viewBox: this.viewBox.slice(),\n              scale,\n              rotation,\n              offsetX,\n              offsetY,\n              dontFlip\n            });\n          }\n          convertToViewportPoint(x, y) {\n            return _util.Util.applyTransform([x, y], this.transform);\n          }\n          convertToViewportRectangle(rect) {\n            const topLeft = _util.Util.applyTransform([rect[0], rect[1]], this.transform);\n            const bottomRight = _util.Util.applyTransform([rect[2], rect[3]], this.transform);\n            return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n          }\n          convertToPdfPoint(x, y) {\n            return _util.Util.applyInverseTransform([x, y], this.transform);\n          }\n        }\n        exports.PageViewport = PageViewport;\n        class RenderingCancelledException extends _util.BaseException {\n          constructor(msg, extraDelay = 0) {\n            super(msg, \"RenderingCancelledException\");\n            this.extraDelay = extraDelay;\n          }\n        }\n        exports.RenderingCancelledException = RenderingCancelledException;\n        function isDataScheme(url) {\n          const ii = url.length;\n          let i = 0;\n          while (i < ii && url[i].trim() === \"\") {\n            i++;\n          }\n          return url.substring(i, i + 5).toLowerCase() === \"data:\";\n        }\n        function isPdfFile(filename) {\n          return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n        }\n        function getFilenameFromUrl(url, onlyStripPath = false) {\n          if (!onlyStripPath) {\n            [url] = url.split(/[#?]/, 1);\n          }\n          return url.substring(url.lastIndexOf(\"/\") + 1);\n        }\n        function getPdfFilenameFromUrl(url, defaultFilename = \"document.pdf\") {\n          if (typeof url !== \"string\") {\n            return defaultFilename;\n          }\n          if (isDataScheme(url)) {\n            (0, _util.warn)('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n            return defaultFilename;\n          }\n          const reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n          const reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n          const splitURI = reURI.exec(url);\n          let suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);\n          if (suggestedFilename) {\n            suggestedFilename = suggestedFilename[0];\n            if (suggestedFilename.includes(\"%\")) {\n              try {\n                suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];\n              } catch {}\n            }\n          }\n          return suggestedFilename || defaultFilename;\n        }\n        class StatTimer {\n          started = Object.create(null);\n          times = [];\n          time(name) {\n            if (name in this.started) {\n              (0, _util.warn)(`Timer is already running for ${name}`);\n            }\n            this.started[name] = Date.now();\n          }\n          timeEnd(name) {\n            if (!(name in this.started)) {\n              (0, _util.warn)(`Timer has not been started for ${name}`);\n            }\n            this.times.push({\n              name,\n              start: this.started[name],\n              end: Date.now()\n            });\n            delete this.started[name];\n          }\n          toString() {\n            const outBuf = [];\n            let longest = 0;\n            for (const {\n              name\n            } of this.times) {\n              longest = Math.max(name.length, longest);\n            }\n            for (const {\n              name,\n              start,\n              end\n            } of this.times) {\n              outBuf.push(`${name.padEnd(longest)} ${end - start}ms\\n`);\n            }\n            return outBuf.join(\"\");\n          }\n        }\n        exports.StatTimer = StatTimer;\n        function isValidFetchUrl(url, baseUrl) {\n          try {\n            const {\n              protocol\n            } = baseUrl ? new URL(url, baseUrl) : new URL(url);\n            return protocol === \"http:\" || protocol === \"https:\";\n          } catch {\n            return false;\n          }\n        }\n        function noContextMenu(e) {\n          e.preventDefault();\n        }\n        function loadScript(src, removeScriptElement = false) {\n          return new Promise((resolve, reject) => {\n            const script = document.createElement(\"script\");\n            script.src = src;\n            script.onload = function (evt) {\n              if (removeScriptElement) {\n                script.remove();\n              }\n              resolve(evt);\n            };\n            script.onerror = function () {\n              reject(new Error(`Cannot load script at: ${script.src}`));\n            };\n            (document.head || document.documentElement).append(script);\n          });\n        }\n        function deprecated(details) {\n          console.log(\"Deprecated API usage: \" + details);\n        }\n        let pdfDateStringRegex;\n        class PDFDateString {\n          static toDateObject(input) {\n            if (!input || typeof input !== \"string\") {\n              return null;\n            }\n            pdfDateStringRegex ||= new RegExp(\"^D:\" + \"(\\\\d{4})\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"([Z|+|-])?\" + \"(\\\\d{2})?\" + \"'?\" + \"(\\\\d{2})?\" + \"'?\");\n            const matches = pdfDateStringRegex.exec(input);\n            if (!matches) {\n              return null;\n            }\n            const year = parseInt(matches[1], 10);\n            let month = parseInt(matches[2], 10);\n            month = month >= 1 && month <= 12 ? month - 1 : 0;\n            let day = parseInt(matches[3], 10);\n            day = day >= 1 && day <= 31 ? day : 1;\n            let hour = parseInt(matches[4], 10);\n            hour = hour >= 0 && hour <= 23 ? hour : 0;\n            let minute = parseInt(matches[5], 10);\n            minute = minute >= 0 && minute <= 59 ? minute : 0;\n            let second = parseInt(matches[6], 10);\n            second = second >= 0 && second <= 59 ? second : 0;\n            const universalTimeRelation = matches[7] || \"Z\";\n            let offsetHour = parseInt(matches[8], 10);\n            offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;\n            let offsetMinute = parseInt(matches[9], 10) || 0;\n            offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;\n            if (universalTimeRelation === \"-\") {\n              hour += offsetHour;\n              minute += offsetMinute;\n            } else if (universalTimeRelation === \"+\") {\n              hour -= offsetHour;\n              minute -= offsetMinute;\n            }\n            return new Date(Date.UTC(year, month, day, hour, minute, second));\n          }\n        }\n        exports.PDFDateString = PDFDateString;\n        function getXfaPageViewport(xfaPage, {\n          scale = 1,\n          rotation = 0\n        }) {\n          const {\n            width,\n            height\n          } = xfaPage.attributes.style;\n          const viewBox = [0, 0, parseInt(width), parseInt(height)];\n          return new PageViewport({\n            viewBox,\n            scale,\n            rotation\n          });\n        }\n        function getRGB(color) {\n          if (color.startsWith(\"#\")) {\n            const colorRGB = parseInt(color.slice(1), 16);\n            return [(colorRGB & 0xff0000) >> 16, (colorRGB & 0x00ff00) >> 8, colorRGB & 0x0000ff];\n          }\n          if (color.startsWith(\"rgb(\")) {\n            return color.slice(4, -1).split(\",\").map(x => parseInt(x));\n          }\n          if (color.startsWith(\"rgba(\")) {\n            return color.slice(5, -1).split(\",\").map(x => parseInt(x)).slice(0, 3);\n          }\n          (0, _util.warn)(`Not a valid color format: \"${color}\"`);\n          return [0, 0, 0];\n        }\n        function getColorValues(colors) {\n          const span = document.createElement(\"span\");\n          span.style.visibility = \"hidden\";\n          document.body.append(span);\n          for (const name of colors.keys()) {\n            span.style.color = name;\n            const computedColor = window.getComputedStyle(span).color;\n            colors.set(name, getRGB(computedColor));\n          }\n          span.remove();\n        }\n        function getCurrentTransform(ctx) {\n          const {\n            a,\n            b,\n            c,\n            d,\n            e,\n            f\n          } = ctx.getTransform();\n          return [a, b, c, d, e, f];\n        }\n        function getCurrentTransformInverse(ctx) {\n          const {\n            a,\n            b,\n            c,\n            d,\n            e,\n            f\n          } = ctx.getTransform().invertSelf();\n          return [a, b, c, d, e, f];\n        }\n        function setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true) {\n          if (viewport instanceof PageViewport) {\n            const {\n              pageWidth,\n              pageHeight\n            } = viewport.rawDims;\n            const {\n              style\n            } = div;\n            const useRound = _util.FeatureTest.isCSSRoundSupported;\n            const w = `var(--scale-factor) * ${pageWidth}px`,\n              h = `var(--scale-factor) * ${pageHeight}px`;\n            const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,\n              heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;\n            if (!mustFlip || viewport.rotation % 180 === 0) {\n              style.width = widthStr;\n              style.height = heightStr;\n            } else {\n              style.width = heightStr;\n              style.height = widthStr;\n            }\n          }\n          if (mustRotate) {\n            div.setAttribute(\"data-main-rotation\", viewport.rotation);\n          }\n        }\n\n        /***/\n      }, /* 7 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.BaseStandardFontDataFactory = exports.BaseSVGFactory = exports.BaseFilterFactory = exports.BaseCanvasFactory = exports.BaseCMapReaderFactory = void 0;\n        var _util = __w_pdfjs_require__(1);\n        class BaseFilterFactory {\n          constructor() {\n            if (this.constructor === BaseFilterFactory) {\n              (0, _util.unreachable)(\"Cannot initialize BaseFilterFactory.\");\n            }\n          }\n          addFilter(maps) {\n            return \"none\";\n          }\n          addHCMFilter(fgColor, bgColor) {\n            return \"none\";\n          }\n          addHighlightHCMFilter(fgColor, bgColor, newFgColor, newBgColor) {\n            return \"none\";\n          }\n          destroy(keepHCM = false) {}\n        }\n        exports.BaseFilterFactory = BaseFilterFactory;\n        class BaseCanvasFactory {\n          constructor() {\n            if (this.constructor === BaseCanvasFactory) {\n              (0, _util.unreachable)(\"Cannot initialize BaseCanvasFactory.\");\n            }\n          }\n          create(width, height) {\n            if (width <= 0 || height <= 0) {\n              throw new Error(\"Invalid canvas size\");\n            }\n            const canvas = this._createCanvas(width, height);\n            return {\n              canvas,\n              context: canvas.getContext(\"2d\")\n            };\n          }\n          reset(canvasAndContext, width, height) {\n            if (!canvasAndContext.canvas) {\n              throw new Error(\"Canvas is not specified\");\n            }\n            if (width <= 0 || height <= 0) {\n              throw new Error(\"Invalid canvas size\");\n            }\n            canvasAndContext.canvas.width = width;\n            canvasAndContext.canvas.height = height;\n          }\n          destroy(canvasAndContext) {\n            if (!canvasAndContext.canvas) {\n              throw new Error(\"Canvas is not specified\");\n            }\n            canvasAndContext.canvas.width = 0;\n            canvasAndContext.canvas.height = 0;\n            canvasAndContext.canvas = null;\n            canvasAndContext.context = null;\n          }\n          _createCanvas(width, height) {\n            (0, _util.unreachable)(\"Abstract method `_createCanvas` called.\");\n          }\n        }\n        exports.BaseCanvasFactory = BaseCanvasFactory;\n        class BaseCMapReaderFactory {\n          constructor({\n            baseUrl = null,\n            isCompressed = true\n          }) {\n            if (this.constructor === BaseCMapReaderFactory) {\n              (0, _util.unreachable)(\"Cannot initialize BaseCMapReaderFactory.\");\n            }\n            this.baseUrl = baseUrl;\n            this.isCompressed = isCompressed;\n          }\n          async fetch({\n            name\n          }) {\n            if (!this.baseUrl) {\n              throw new Error('The CMap \"baseUrl\" parameter must be specified, ensure that ' + 'the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.');\n            }\n            if (!name) {\n              throw new Error(\"CMap name must be specified.\");\n            }\n            const url = this.baseUrl + name + (this.isCompressed ? \".bcmap\" : \"\");\n            const compressionType = this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE;\n            return this._fetchData(url, compressionType).catch(reason => {\n              throw new Error(`Unable to load ${this.isCompressed ? \"binary \" : \"\"}CMap at: ${url}`);\n            });\n          }\n          _fetchData(url, compressionType) {\n            (0, _util.unreachable)(\"Abstract method `_fetchData` called.\");\n          }\n        }\n        exports.BaseCMapReaderFactory = BaseCMapReaderFactory;\n        class BaseStandardFontDataFactory {\n          constructor({\n            baseUrl = null\n          }) {\n            if (this.constructor === BaseStandardFontDataFactory) {\n              (0, _util.unreachable)(\"Cannot initialize BaseStandardFontDataFactory.\");\n            }\n            this.baseUrl = baseUrl;\n          }\n          async fetch({\n            filename\n          }) {\n            if (!this.baseUrl) {\n              throw new Error('The standard font \"baseUrl\" parameter must be specified, ensure that ' + 'the \"standardFontDataUrl\" API parameter is provided.');\n            }\n            if (!filename) {\n              throw new Error(\"Font filename must be specified.\");\n            }\n            const url = `${this.baseUrl}${filename}`;\n            return this._fetchData(url).catch(reason => {\n              throw new Error(`Unable to load font data at: ${url}`);\n            });\n          }\n          _fetchData(url) {\n            (0, _util.unreachable)(\"Abstract method `_fetchData` called.\");\n          }\n        }\n        exports.BaseStandardFontDataFactory = BaseStandardFontDataFactory;\n        class BaseSVGFactory {\n          constructor() {\n            if (this.constructor === BaseSVGFactory) {\n              (0, _util.unreachable)(\"Cannot initialize BaseSVGFactory.\");\n            }\n          }\n          create(width, height, skipDimensions = false) {\n            if (width <= 0 || height <= 0) {\n              throw new Error(\"Invalid SVG dimensions\");\n            }\n            const svg = this._createSVG(\"svg:svg\");\n            svg.setAttribute(\"version\", \"1.1\");\n            if (!skipDimensions) {\n              svg.setAttribute(\"width\", `${width}px`);\n              svg.setAttribute(\"height\", `${height}px`);\n            }\n            svg.setAttribute(\"preserveAspectRatio\", \"none\");\n            svg.setAttribute(\"viewBox\", `0 0 ${width} ${height}`);\n            return svg;\n          }\n          createElement(type) {\n            if (typeof type !== \"string\") {\n              throw new Error(\"Invalid SVG element type\");\n            }\n            return this._createSVG(type);\n          }\n          _createSVG(type) {\n            (0, _util.unreachable)(\"Abstract method `_createSVG` called.\");\n          }\n        }\n        exports.BaseSVGFactory = BaseSVGFactory;\n\n        /***/\n      }, /* 8 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.MurmurHash3_64 = void 0;\n        var _util = __w_pdfjs_require__(1);\n        const SEED = 0xc3d2e1f0;\n        const MASK_HIGH = 0xffff0000;\n        const MASK_LOW = 0xffff;\n        class MurmurHash3_64 {\n          constructor(seed) {\n            this.h1 = seed ? seed & 0xffffffff : SEED;\n            this.h2 = seed ? seed & 0xffffffff : SEED;\n          }\n          update(input) {\n            let data, length;\n            if (typeof input === \"string\") {\n              data = new Uint8Array(input.length * 2);\n              length = 0;\n              for (let i = 0, ii = input.length; i < ii; i++) {\n                const code = input.charCodeAt(i);\n                if (code <= 0xff) {\n                  data[length++] = code;\n                } else {\n                  data[length++] = code >>> 8;\n                  data[length++] = code & 0xff;\n                }\n              }\n            } else if ((0, _util.isArrayBuffer)(input)) {\n              data = input.slice();\n              length = data.byteLength;\n            } else {\n              throw new Error(\"Wrong data format in MurmurHash3_64_update. \" + \"Input must be a string or array.\");\n            }\n            const blockCounts = length >> 2;\n            const tailLength = length - blockCounts * 4;\n            const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);\n            let k1 = 0,\n              k2 = 0;\n            let h1 = this.h1,\n              h2 = this.h2;\n            const C1 = 0xcc9e2d51,\n              C2 = 0x1b873593;\n            const C1_LOW = C1 & MASK_LOW,\n              C2_LOW = C2 & MASK_LOW;\n            for (let i = 0; i < blockCounts; i++) {\n              if (i & 1) {\n                k1 = dataUint32[i];\n                k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n                k1 = k1 << 15 | k1 >>> 17;\n                k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n                h1 ^= k1;\n                h1 = h1 << 13 | h1 >>> 19;\n                h1 = h1 * 5 + 0xe6546b64;\n              } else {\n                k2 = dataUint32[i];\n                k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;\n                k2 = k2 << 15 | k2 >>> 17;\n                k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;\n                h2 ^= k2;\n                h2 = h2 << 13 | h2 >>> 19;\n                h2 = h2 * 5 + 0xe6546b64;\n              }\n            }\n            k1 = 0;\n            switch (tailLength) {\n              case 3:\n                k1 ^= data[blockCounts * 4 + 2] << 16;\n              case 2:\n                k1 ^= data[blockCounts * 4 + 1] << 8;\n              case 1:\n                k1 ^= data[blockCounts * 4];\n                k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n                k1 = k1 << 15 | k1 >>> 17;\n                k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n                if (blockCounts & 1) {\n                  h1 ^= k1;\n                } else {\n                  h2 ^= k1;\n                }\n            }\n            this.h1 = h1;\n            this.h2 = h2;\n          }\n          hexdigest() {\n            let h1 = this.h1,\n              h2 = this.h2;\n            h1 ^= h2 >>> 1;\n            h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW;\n            h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16;\n            h1 ^= h2 >>> 1;\n            h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW;\n            h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16;\n            h1 ^= h2 >>> 1;\n            return (h1 >>> 0).toString(16).padStart(8, \"0\") + (h2 >>> 0).toString(16).padStart(8, \"0\");\n          }\n        }\n        exports.MurmurHash3_64 = MurmurHash3_64;\n\n        /***/\n      }, /* 9 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.FontLoader = exports.FontFaceObject = void 0;\n        var _util = __w_pdfjs_require__(1);\n        class FontLoader {\n          #systemFonts = new Set();\n          constructor({\n            ownerDocument = globalThis.document,\n            styleElement = null\n          }) {\n            this._document = ownerDocument;\n            this.nativeFontFaces = new Set();\n            this.styleElement = null;\n            this.loadingRequests = [];\n            this.loadTestFontId = 0;\n          }\n          addNativeFontFace(nativeFontFace) {\n            this.nativeFontFaces.add(nativeFontFace);\n            this._document.fonts.add(nativeFontFace);\n          }\n          removeNativeFontFace(nativeFontFace) {\n            this.nativeFontFaces.delete(nativeFontFace);\n            this._document.fonts.delete(nativeFontFace);\n          }\n          insertRule(rule) {\n            if (!this.styleElement) {\n              this.styleElement = this._document.createElement(\"style\");\n              this._document.documentElement.getElementsByTagName(\"head\")[0].append(this.styleElement);\n            }\n            const styleSheet = this.styleElement.sheet;\n            styleSheet.insertRule(rule, styleSheet.cssRules.length);\n          }\n          clear() {\n            for (const nativeFontFace of this.nativeFontFaces) {\n              this._document.fonts.delete(nativeFontFace);\n            }\n            this.nativeFontFaces.clear();\n            this.#systemFonts.clear();\n            if (this.styleElement) {\n              this.styleElement.remove();\n              this.styleElement = null;\n            }\n          }\n          async loadSystemFont(info) {\n            if (!info || this.#systemFonts.has(info.loadedName)) {\n              return;\n            }\n            (0, _util.assert)(!this.disableFontFace, \"loadSystemFont shouldn't be called when `disableFontFace` is set.\");\n            if (this.isFontLoadingAPISupported) {\n              const {\n                loadedName,\n                src,\n                style\n              } = info;\n              const fontFace = new FontFace(loadedName, src, style);\n              this.addNativeFontFace(fontFace);\n              try {\n                await fontFace.load();\n                this.#systemFonts.add(loadedName);\n              } catch {\n                (0, _util.warn)(`Cannot load system font: ${info.baseFontName}, installing it could help to improve PDF rendering.`);\n                this.removeNativeFontFace(fontFace);\n              }\n              return;\n            }\n            (0, _util.unreachable)(\"Not implemented: loadSystemFont without the Font Loading API.\");\n          }\n          async bind(font) {\n            if (font.attached || font.missingFile && !font.systemFontInfo) {\n              return;\n            }\n            font.attached = true;\n            if (font.systemFontInfo) {\n              await this.loadSystemFont(font.systemFontInfo);\n              return;\n            }\n            if (this.isFontLoadingAPISupported) {\n              const nativeFontFace = font.createNativeFontFace();\n              if (nativeFontFace) {\n                this.addNativeFontFace(nativeFontFace);\n                try {\n                  await nativeFontFace.loaded;\n                } catch (ex) {\n                  (0, _util.warn)(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);\n                  font.disableFontFace = true;\n                  throw ex;\n                }\n              }\n              return;\n            }\n            const rule = font.createFontFaceRule();\n            if (rule) {\n              this.insertRule(rule);\n              if (this.isSyncFontLoadingSupported) {\n                return;\n              }\n              await new Promise(resolve => {\n                const request = this._queueLoadingCallback(resolve);\n                this._prepareFontLoadEvent(font, request);\n              });\n            }\n          }\n          get isFontLoadingAPISupported() {\n            const hasFonts = !!this._document?.fonts;\n            return (0, _util.shadow)(this, \"isFontLoadingAPISupported\", hasFonts);\n          }\n          get isSyncFontLoadingSupported() {\n            let supported = false;\n            if (_util.isNodeJS) {\n              supported = true;\n            } else if (typeof navigator !== \"undefined\" && /Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent)) {\n              supported = true;\n            }\n            return (0, _util.shadow)(this, \"isSyncFontLoadingSupported\", supported);\n          }\n          _queueLoadingCallback(callback) {\n            function completeRequest() {\n              (0, _util.assert)(!request.done, \"completeRequest() cannot be called twice.\");\n              request.done = true;\n              while (loadingRequests.length > 0 && loadingRequests[0].done) {\n                const otherRequest = loadingRequests.shift();\n                setTimeout(otherRequest.callback, 0);\n              }\n            }\n            const {\n              loadingRequests\n            } = this;\n            const request = {\n              done: false,\n              complete: completeRequest,\n              callback\n            };\n            loadingRequests.push(request);\n            return request;\n          }\n          get _loadTestFont() {\n            const testFont = atob(\"T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA\" + \"FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA\" + \"ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA\" + \"AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1\" + \"AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD\" + \"6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM\" + \"AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D\" + \"IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA\" + \"AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA\" + \"AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB\" + \"AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY\" + \"AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA\" + \"AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" + \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA\" + \"AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC\" + \"AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3\" + \"Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj\" + \"FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==\");\n            return (0, _util.shadow)(this, \"_loadTestFont\", testFont);\n          }\n          _prepareFontLoadEvent(font, request) {\n            function int32(data, offset) {\n              return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff;\n            }\n            function spliceString(s, offset, remove, insert) {\n              const chunk1 = s.substring(0, offset);\n              const chunk2 = s.substring(offset + remove);\n              return chunk1 + insert + chunk2;\n            }\n            let i, ii;\n            const canvas = this._document.createElement(\"canvas\");\n            canvas.width = 1;\n            canvas.height = 1;\n            const ctx = canvas.getContext(\"2d\");\n            let called = 0;\n            function isFontReady(name, callback) {\n              if (++called > 30) {\n                (0, _util.warn)(\"Load test font never loaded.\");\n                callback();\n                return;\n              }\n              ctx.font = \"30px \" + name;\n              ctx.fillText(\".\", 0, 20);\n              const imageData = ctx.getImageData(0, 0, 1, 1);\n              if (imageData.data[3] > 0) {\n                callback();\n                return;\n              }\n              setTimeout(isFontReady.bind(null, name, callback));\n            }\n            const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`;\n            let data = this._loadTestFont;\n            const COMMENT_OFFSET = 976;\n            data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId);\n            const CFF_CHECKSUM_OFFSET = 16;\n            const XXXX_VALUE = 0x58585858;\n            let checksum = int32(data, CFF_CHECKSUM_OFFSET);\n            for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n              checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0;\n            }\n            if (i < loadTestFontId.length) {\n              checksum = checksum - XXXX_VALUE + int32(loadTestFontId + \"XXX\", i) | 0;\n            }\n            data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, (0, _util.string32)(checksum));\n            const url = `url(data:font/opentype;base64,${btoa(data)});`;\n            const rule = `@font-face {font-family:\"${loadTestFontId}\";src:${url}}`;\n            this.insertRule(rule);\n            const div = this._document.createElement(\"div\");\n            div.style.visibility = \"hidden\";\n            div.style.width = div.style.height = \"10px\";\n            div.style.position = \"absolute\";\n            div.style.top = div.style.left = \"0px\";\n            for (const name of [font.loadedName, loadTestFontId]) {\n              const span = this._document.createElement(\"span\");\n              span.textContent = \"Hi\";\n              span.style.fontFamily = name;\n              div.append(span);\n            }\n            this._document.body.append(div);\n            isFontReady(loadTestFontId, () => {\n              div.remove();\n              request.complete();\n            });\n          }\n        }\n        exports.FontLoader = FontLoader;\n        class FontFaceObject {\n          constructor(translatedData, {\n            isEvalSupported = true,\n            disableFontFace = false,\n            ignoreErrors = false,\n            inspectFont = null\n          }) {\n            this.compiledGlyphs = Object.create(null);\n            for (const i in translatedData) {\n              this[i] = translatedData[i];\n            }\n            this.isEvalSupported = isEvalSupported !== false;\n            this.disableFontFace = disableFontFace === true;\n            this.ignoreErrors = ignoreErrors === true;\n            this._inspectFont = inspectFont;\n          }\n          createNativeFontFace() {\n            if (!this.data || this.disableFontFace) {\n              return null;\n            }\n            let nativeFontFace;\n            if (!this.cssFontInfo) {\n              nativeFontFace = new FontFace(this.loadedName, this.data, {});\n            } else {\n              const css = {\n                weight: this.cssFontInfo.fontWeight\n              };\n              if (this.cssFontInfo.italicAngle) {\n                css.style = `oblique ${this.cssFontInfo.italicAngle}deg`;\n              }\n              nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css);\n            }\n            this._inspectFont?.(this);\n            return nativeFontFace;\n          }\n          createFontFaceRule() {\n            if (!this.data || this.disableFontFace) {\n              return null;\n            }\n            const data = (0, _util.bytesToString)(this.data);\n            const url = `url(data:${this.mimetype};base64,${btoa(data)});`;\n            let rule;\n            if (!this.cssFontInfo) {\n              rule = `@font-face {font-family:\"${this.loadedName}\";src:${url}}`;\n            } else {\n              let css = `font-weight: ${this.cssFontInfo.fontWeight};`;\n              if (this.cssFontInfo.italicAngle) {\n                css += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`;\n              }\n              rule = `@font-face {font-family:\"${this.cssFontInfo.fontFamily}\";${css}src:${url}}`;\n            }\n            this._inspectFont?.(this, url);\n            return rule;\n          }\n          getPathGenerator(objs, character) {\n            if (this.compiledGlyphs[character] !== undefined) {\n              return this.compiledGlyphs[character];\n            }\n            let cmds;\n            try {\n              cmds = objs.get(this.loadedName + \"_path_\" + character);\n            } catch (ex) {\n              if (!this.ignoreErrors) {\n                throw ex;\n              }\n              (0, _util.warn)(`getPathGenerator - ignoring character: \"${ex}\".`);\n              return this.compiledGlyphs[character] = function (c, size) {};\n            }\n            if (this.isEvalSupported && _util.FeatureTest.isEvalSupported) {\n              const jsBuf = [];\n              for (const current of cmds) {\n                const args = current.args !== undefined ? current.args.join(\",\") : \"\";\n                jsBuf.push(\"c.\", current.cmd, \"(\", args, \");\\n\");\n              }\n              return this.compiledGlyphs[character] = new Function(\"c\", \"size\", jsBuf.join(\"\"));\n            }\n            return this.compiledGlyphs[character] = function (c, size) {\n              for (const current of cmds) {\n                if (current.cmd === \"scale\") {\n                  current.args = [size, -size];\n                }\n                c[current.cmd].apply(c, current.args);\n              }\n            };\n          }\n        }\n        exports.FontFaceObject = FontFaceObject;\n\n        /***/\n      }, /* 10 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.NodeStandardFontDataFactory = exports.NodeFilterFactory = exports.NodeCanvasFactory = exports.NodeCMapReaderFactory = void 0;\n        var _base_factory = __w_pdfjs_require__(7);\n        var _util = __w_pdfjs_require__(1);\n        ;\n        ;\n        const fetchData = function (url) {\n          return new Promise((resolve, reject) => {\n            const fs = require(\"fs\");\n            fs.readFile(url, (error, data) => {\n              if (error || !data) {\n                reject(new Error(error));\n                return;\n              }\n              resolve(new Uint8Array(data));\n            });\n          });\n        };\n        class NodeFilterFactory extends _base_factory.BaseFilterFactory {}\n        exports.NodeFilterFactory = NodeFilterFactory;\n        class NodeCanvasFactory extends _base_factory.BaseCanvasFactory {\n          _createCanvas(width, height) {\n            const Canvas = require(\"canvas\");\n            return Canvas.createCanvas(width, height);\n          }\n        }\n        exports.NodeCanvasFactory = NodeCanvasFactory;\n        class NodeCMapReaderFactory extends _base_factory.BaseCMapReaderFactory {\n          _fetchData(url, compressionType) {\n            return fetchData(url).then(data => {\n              return {\n                cMapData: data,\n                compressionType\n              };\n            });\n          }\n        }\n        exports.NodeCMapReaderFactory = NodeCMapReaderFactory;\n        class NodeStandardFontDataFactory extends _base_factory.BaseStandardFontDataFactory {\n          _fetchData(url) {\n            return fetchData(url);\n          }\n        }\n        exports.NodeStandardFontDataFactory = NodeStandardFontDataFactory;\n\n        /***/\n      }, /* 11 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.CanvasGraphics = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _pattern_helper = __w_pdfjs_require__(12);\n        var _image_utils = __w_pdfjs_require__(13);\n        const MIN_FONT_SIZE = 16;\n        const MAX_FONT_SIZE = 100;\n        const MAX_GROUP_SIZE = 4096;\n        const EXECUTION_TIME = 15;\n        const EXECUTION_STEPS = 10;\n        const MAX_SIZE_TO_COMPILE = 1000;\n        const FULL_CHUNK_HEIGHT = 16;\n        function mirrorContextOperations(ctx, destCtx) {\n          if (ctx._removeMirroring) {\n            throw new Error(\"Context is already forwarding operations.\");\n          }\n          ctx.__originalSave = ctx.save;\n          ctx.__originalRestore = ctx.restore;\n          ctx.__originalRotate = ctx.rotate;\n          ctx.__originalScale = ctx.scale;\n          ctx.__originalTranslate = ctx.translate;\n          ctx.__originalTransform = ctx.transform;\n          ctx.__originalSetTransform = ctx.setTransform;\n          ctx.__originalResetTransform = ctx.resetTransform;\n          ctx.__originalClip = ctx.clip;\n          ctx.__originalMoveTo = ctx.moveTo;\n          ctx.__originalLineTo = ctx.lineTo;\n          ctx.__originalBezierCurveTo = ctx.bezierCurveTo;\n          ctx.__originalRect = ctx.rect;\n          ctx.__originalClosePath = ctx.closePath;\n          ctx.__originalBeginPath = ctx.beginPath;\n          ctx._removeMirroring = () => {\n            ctx.save = ctx.__originalSave;\n            ctx.restore = ctx.__originalRestore;\n            ctx.rotate = ctx.__originalRotate;\n            ctx.scale = ctx.__originalScale;\n            ctx.translate = ctx.__originalTranslate;\n            ctx.transform = ctx.__originalTransform;\n            ctx.setTransform = ctx.__originalSetTransform;\n            ctx.resetTransform = ctx.__originalResetTransform;\n            ctx.clip = ctx.__originalClip;\n            ctx.moveTo = ctx.__originalMoveTo;\n            ctx.lineTo = ctx.__originalLineTo;\n            ctx.bezierCurveTo = ctx.__originalBezierCurveTo;\n            ctx.rect = ctx.__originalRect;\n            ctx.closePath = ctx.__originalClosePath;\n            ctx.beginPath = ctx.__originalBeginPath;\n            delete ctx._removeMirroring;\n          };\n          ctx.save = function ctxSave() {\n            destCtx.save();\n            this.__originalSave();\n          };\n          ctx.restore = function ctxRestore() {\n            destCtx.restore();\n            this.__originalRestore();\n          };\n          ctx.translate = function ctxTranslate(x, y) {\n            destCtx.translate(x, y);\n            this.__originalTranslate(x, y);\n          };\n          ctx.scale = function ctxScale(x, y) {\n            destCtx.scale(x, y);\n            this.__originalScale(x, y);\n          };\n          ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n            destCtx.transform(a, b, c, d, e, f);\n            this.__originalTransform(a, b, c, d, e, f);\n          };\n          ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n            destCtx.setTransform(a, b, c, d, e, f);\n            this.__originalSetTransform(a, b, c, d, e, f);\n          };\n          ctx.resetTransform = function ctxResetTransform() {\n            destCtx.resetTransform();\n            this.__originalResetTransform();\n          };\n          ctx.rotate = function ctxRotate(angle) {\n            destCtx.rotate(angle);\n            this.__originalRotate(angle);\n          };\n          ctx.clip = function ctxRotate(rule) {\n            destCtx.clip(rule);\n            this.__originalClip(rule);\n          };\n          ctx.moveTo = function (x, y) {\n            destCtx.moveTo(x, y);\n            this.__originalMoveTo(x, y);\n          };\n          ctx.lineTo = function (x, y) {\n            destCtx.lineTo(x, y);\n            this.__originalLineTo(x, y);\n          };\n          ctx.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {\n            destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n            this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n          };\n          ctx.rect = function (x, y, width, height) {\n            destCtx.rect(x, y, width, height);\n            this.__originalRect(x, y, width, height);\n          };\n          ctx.closePath = function () {\n            destCtx.closePath();\n            this.__originalClosePath();\n          };\n          ctx.beginPath = function () {\n            destCtx.beginPath();\n            this.__originalBeginPath();\n          };\n        }\n        class CachedCanvases {\n          constructor(canvasFactory) {\n            this.canvasFactory = canvasFactory;\n            this.cache = Object.create(null);\n          }\n          getCanvas(id, width, height) {\n            let canvasEntry;\n            if (this.cache[id] !== undefined) {\n              canvasEntry = this.cache[id];\n              this.canvasFactory.reset(canvasEntry, width, height);\n            } else {\n              canvasEntry = this.canvasFactory.create(width, height);\n              this.cache[id] = canvasEntry;\n            }\n            return canvasEntry;\n          }\n          delete(id) {\n            delete this.cache[id];\n          }\n          clear() {\n            for (const id in this.cache) {\n              const canvasEntry = this.cache[id];\n              this.canvasFactory.destroy(canvasEntry);\n              delete this.cache[id];\n            }\n          }\n        }\n        function drawImageAtIntegerCoords(ctx, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) {\n          const [a, b, c, d, tx, ty] = (0, _display_utils.getCurrentTransform)(ctx);\n          if (b === 0 && c === 0) {\n            const tlX = destX * a + tx;\n            const rTlX = Math.round(tlX);\n            const tlY = destY * d + ty;\n            const rTlY = Math.round(tlY);\n            const brX = (destX + destW) * a + tx;\n            const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n            const brY = (destY + destH) * d + ty;\n            const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n            ctx.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);\n            ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);\n            ctx.setTransform(a, b, c, d, tx, ty);\n            return [rWidth, rHeight];\n          }\n          if (a === 0 && d === 0) {\n            const tlX = destY * c + tx;\n            const rTlX = Math.round(tlX);\n            const tlY = destX * b + ty;\n            const rTlY = Math.round(tlY);\n            const brX = (destY + destH) * c + tx;\n            const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n            const brY = (destX + destW) * b + ty;\n            const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n            ctx.setTransform(0, Math.sign(b), Math.sign(c), 0, rTlX, rTlY);\n            ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);\n            ctx.setTransform(a, b, c, d, tx, ty);\n            return [rHeight, rWidth];\n          }\n          ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);\n          const scaleX = Math.hypot(a, b);\n          const scaleY = Math.hypot(c, d);\n          return [scaleX * destW, scaleY * destH];\n        }\n        function compileType3Glyph(imgData) {\n          const {\n            width,\n            height\n          } = imgData;\n          if (width > MAX_SIZE_TO_COMPILE || height > MAX_SIZE_TO_COMPILE) {\n            return null;\n          }\n          const POINT_TO_PROCESS_LIMIT = 1000;\n          const POINT_TYPES = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);\n          const width1 = width + 1;\n          let points = new Uint8Array(width1 * (height + 1));\n          let i, j, j0;\n          const lineSize = width + 7 & ~7;\n          let data = new Uint8Array(lineSize * height),\n            pos = 0;\n          for (const elem of imgData.data) {\n            let mask = 128;\n            while (mask > 0) {\n              data[pos++] = elem & mask ? 0 : 255;\n              mask >>= 1;\n            }\n          }\n          let count = 0;\n          pos = 0;\n          if (data[pos] !== 0) {\n            points[0] = 1;\n            ++count;\n          }\n          for (j = 1; j < width; j++) {\n            if (data[pos] !== data[pos + 1]) {\n              points[j] = data[pos] ? 2 : 1;\n              ++count;\n            }\n            pos++;\n          }\n          if (data[pos] !== 0) {\n            points[j] = 2;\n            ++count;\n          }\n          for (i = 1; i < height; i++) {\n            pos = i * lineSize;\n            j0 = i * width1;\n            if (data[pos - lineSize] !== data[pos]) {\n              points[j0] = data[pos] ? 1 : 8;\n              ++count;\n            }\n            let sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n            for (j = 1; j < width; j++) {\n              sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0);\n              if (POINT_TYPES[sum]) {\n                points[j0 + j] = POINT_TYPES[sum];\n                ++count;\n              }\n              pos++;\n            }\n            if (data[pos - lineSize] !== data[pos]) {\n              points[j0 + j] = data[pos] ? 2 : 4;\n              ++count;\n            }\n            if (count > POINT_TO_PROCESS_LIMIT) {\n              return null;\n            }\n          }\n          pos = lineSize * (height - 1);\n          j0 = i * width1;\n          if (data[pos] !== 0) {\n            points[j0] = 8;\n            ++count;\n          }\n          for (j = 1; j < width; j++) {\n            if (data[pos] !== data[pos + 1]) {\n              points[j0 + j] = data[pos] ? 4 : 8;\n              ++count;\n            }\n            pos++;\n          }\n          if (data[pos] !== 0) {\n            points[j0 + j] = 4;\n            ++count;\n          }\n          if (count > POINT_TO_PROCESS_LIMIT) {\n            return null;\n          }\n          const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n          const path = new Path2D();\n          for (i = 0; count && i <= height; i++) {\n            let p = i * width1;\n            const end = p + width;\n            while (p < end && !points[p]) {\n              p++;\n            }\n            if (p === end) {\n              continue;\n            }\n            path.moveTo(p % width1, i);\n            const p0 = p;\n            let type = points[p];\n            do {\n              const step = steps[type];\n              do {\n                p += step;\n              } while (!points[p]);\n              const pp = points[p];\n              if (pp !== 5 && pp !== 10) {\n                type = pp;\n                points[p] = 0;\n              } else {\n                type = pp & 0x33 * type >> 4;\n                points[p] &= type >> 2 | type << 2;\n              }\n              path.lineTo(p % width1, p / width1 | 0);\n              if (!points[p]) {\n                --count;\n              }\n            } while (p0 !== p);\n            --i;\n          }\n          data = null;\n          points = null;\n          const drawOutline = function (c) {\n            c.save();\n            c.scale(1 / width, -1 / height);\n            c.translate(0, -height);\n            c.fill(path);\n            c.beginPath();\n            c.restore();\n          };\n          return drawOutline;\n        }\n        class CanvasExtraState {\n          constructor(width, height) {\n            this.alphaIsShape = false;\n            this.fontSize = 0;\n            this.fontSizeScale = 1;\n            this.textMatrix = _util.IDENTITY_MATRIX;\n            this.textMatrixScale = 1;\n            this.fontMatrix = _util.FONT_IDENTITY_MATRIX;\n            this.leading = 0;\n            this.x = 0;\n            this.y = 0;\n            this.lineX = 0;\n            this.lineY = 0;\n            this.charSpacing = 0;\n            this.wordSpacing = 0;\n            this.textHScale = 1;\n            this.textRenderingMode = _util.TextRenderingMode.FILL;\n            this.textRise = 0;\n            this.fillColor = \"#000000\";\n            this.strokeColor = \"#000000\";\n            this.patternFill = false;\n            this.fillAlpha = 1;\n            this.strokeAlpha = 1;\n            this.lineWidth = 1;\n            this.activeSMask = null;\n            this.transferMaps = \"none\";\n            this.startNewPathAndClipBox([0, 0, width, height]);\n          }\n          clone() {\n            const clone = Object.create(this);\n            clone.clipBox = this.clipBox.slice();\n            return clone;\n          }\n          setCurrentPoint(x, y) {\n            this.x = x;\n            this.y = y;\n          }\n          updatePathMinMax(transform, x, y) {\n            [x, y] = _util.Util.applyTransform([x, y], transform);\n            this.minX = Math.min(this.minX, x);\n            this.minY = Math.min(this.minY, y);\n            this.maxX = Math.max(this.maxX, x);\n            this.maxY = Math.max(this.maxY, y);\n          }\n          updateRectMinMax(transform, rect) {\n            const p1 = _util.Util.applyTransform(rect, transform);\n            const p2 = _util.Util.applyTransform(rect.slice(2), transform);\n            this.minX = Math.min(this.minX, p1[0], p2[0]);\n            this.minY = Math.min(this.minY, p1[1], p2[1]);\n            this.maxX = Math.max(this.maxX, p1[0], p2[0]);\n            this.maxY = Math.max(this.maxY, p1[1], p2[1]);\n          }\n          updateScalingPathMinMax(transform, minMax) {\n            _util.Util.scaleMinMax(transform, minMax);\n            this.minX = Math.min(this.minX, minMax[0]);\n            this.maxX = Math.max(this.maxX, minMax[1]);\n            this.minY = Math.min(this.minY, minMax[2]);\n            this.maxY = Math.max(this.maxY, minMax[3]);\n          }\n          updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n            const box = _util.Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3);\n            if (minMax) {\n              minMax[0] = Math.min(minMax[0], box[0], box[2]);\n              minMax[1] = Math.max(minMax[1], box[0], box[2]);\n              minMax[2] = Math.min(minMax[2], box[1], box[3]);\n              minMax[3] = Math.max(minMax[3], box[1], box[3]);\n              return;\n            }\n            this.updateRectMinMax(transform, box);\n          }\n          getPathBoundingBox(pathType = _pattern_helper.PathType.FILL, transform = null) {\n            const box = [this.minX, this.minY, this.maxX, this.maxY];\n            if (pathType === _pattern_helper.PathType.STROKE) {\n              if (!transform) {\n                (0, _util.unreachable)(\"Stroke bounding box must include transform.\");\n              }\n              const scale = _util.Util.singularValueDecompose2dScale(transform);\n              const xStrokePad = scale[0] * this.lineWidth / 2;\n              const yStrokePad = scale[1] * this.lineWidth / 2;\n              box[0] -= xStrokePad;\n              box[1] -= yStrokePad;\n              box[2] += xStrokePad;\n              box[3] += yStrokePad;\n            }\n            return box;\n          }\n          updateClipFromPath() {\n            const intersect = _util.Util.intersect(this.clipBox, this.getPathBoundingBox());\n            this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);\n          }\n          isEmptyClip() {\n            return this.minX === Infinity;\n          }\n          startNewPathAndClipBox(box) {\n            this.clipBox = box;\n            this.minX = Infinity;\n            this.minY = Infinity;\n            this.maxX = 0;\n            this.maxY = 0;\n          }\n          getClippedPathBoundingBox(pathType = _pattern_helper.PathType.FILL, transform = null) {\n            return _util.Util.intersect(this.clipBox, this.getPathBoundingBox(pathType, transform));\n          }\n        }\n        function putBinaryImageData(ctx, imgData) {\n          if (typeof ImageData !== \"undefined\" && imgData instanceof ImageData) {\n            ctx.putImageData(imgData, 0, 0);\n            return;\n          }\n          const height = imgData.height,\n            width = imgData.width;\n          const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n          const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n          const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n          const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n          let srcPos = 0,\n            destPos;\n          const src = imgData.data;\n          const dest = chunkImgData.data;\n          let i, j, thisChunkHeight, elemsInThisChunk;\n          if (imgData.kind === _util.ImageKind.GRAYSCALE_1BPP) {\n            const srcLength = src.byteLength;\n            const dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n            const dest32DataLength = dest32.length;\n            const fullSrcDiff = width + 7 >> 3;\n            const white = 0xffffffff;\n            const black = _util.FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n            for (i = 0; i < totalChunks; i++) {\n              thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n              destPos = 0;\n              for (j = 0; j < thisChunkHeight; j++) {\n                const srcDiff = srcLength - srcPos;\n                let k = 0;\n                const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;\n                const kEndUnrolled = kEnd & ~7;\n                let mask = 0;\n                let srcByte = 0;\n                for (; k < kEndUnrolled; k += 8) {\n                  srcByte = src[srcPos++];\n                  dest32[destPos++] = srcByte & 128 ? white : black;\n                  dest32[destPos++] = srcByte & 64 ? white : black;\n                  dest32[destPos++] = srcByte & 32 ? white : black;\n                  dest32[destPos++] = srcByte & 16 ? white : black;\n                  dest32[destPos++] = srcByte & 8 ? white : black;\n                  dest32[destPos++] = srcByte & 4 ? white : black;\n                  dest32[destPos++] = srcByte & 2 ? white : black;\n                  dest32[destPos++] = srcByte & 1 ? white : black;\n                }\n                for (; k < kEnd; k++) {\n                  if (mask === 0) {\n                    srcByte = src[srcPos++];\n                    mask = 128;\n                  }\n                  dest32[destPos++] = srcByte & mask ? white : black;\n                  mask >>= 1;\n                }\n              }\n              while (destPos < dest32DataLength) {\n                dest32[destPos++] = 0;\n              }\n              ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n            }\n          } else if (imgData.kind === _util.ImageKind.RGBA_32BPP) {\n            j = 0;\n            elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n            for (i = 0; i < fullChunks; i++) {\n              dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n              srcPos += elemsInThisChunk;\n              ctx.putImageData(chunkImgData, 0, j);\n              j += FULL_CHUNK_HEIGHT;\n            }\n            if (i < totalChunks) {\n              elemsInThisChunk = width * partialChunkHeight * 4;\n              dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n              ctx.putImageData(chunkImgData, 0, j);\n            }\n          } else if (imgData.kind === _util.ImageKind.RGB_24BPP) {\n            thisChunkHeight = FULL_CHUNK_HEIGHT;\n            elemsInThisChunk = width * thisChunkHeight;\n            for (i = 0; i < totalChunks; i++) {\n              if (i >= fullChunks) {\n                thisChunkHeight = partialChunkHeight;\n                elemsInThisChunk = width * thisChunkHeight;\n              }\n              destPos = 0;\n              for (j = elemsInThisChunk; j--;) {\n                dest[destPos++] = src[srcPos++];\n                dest[destPos++] = src[srcPos++];\n                dest[destPos++] = src[srcPos++];\n                dest[destPos++] = 255;\n              }\n              ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n            }\n          } else {\n            throw new Error(`bad image kind: ${imgData.kind}`);\n          }\n        }\n        function putBinaryImageMask(ctx, imgData) {\n          if (imgData.bitmap) {\n            ctx.drawImage(imgData.bitmap, 0, 0);\n            return;\n          }\n          const height = imgData.height,\n            width = imgData.width;\n          const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n          const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n          const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n          const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n          let srcPos = 0;\n          const src = imgData.data;\n          const dest = chunkImgData.data;\n          for (let i = 0; i < totalChunks; i++) {\n            const thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n            ({\n              srcPos\n            } = (0, _image_utils.convertBlackAndWhiteToRGBA)({\n              src,\n              srcPos,\n              dest,\n              width,\n              height: thisChunkHeight,\n              nonBlackColor: 0\n            }));\n            ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n          }\n        }\n        function copyCtxState(sourceCtx, destCtx) {\n          const properties = [\"strokeStyle\", \"fillStyle\", \"fillRule\", \"globalAlpha\", \"lineWidth\", \"lineCap\", \"lineJoin\", \"miterLimit\", \"globalCompositeOperation\", \"font\", \"filter\"];\n          for (const property of properties) {\n            if (sourceCtx[property] !== undefined) {\n              destCtx[property] = sourceCtx[property];\n            }\n          }\n          if (sourceCtx.setLineDash !== undefined) {\n            destCtx.setLineDash(sourceCtx.getLineDash());\n            destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n          }\n        }\n        function resetCtxToDefault(ctx) {\n          ctx.strokeStyle = ctx.fillStyle = \"#000000\";\n          ctx.fillRule = \"nonzero\";\n          ctx.globalAlpha = 1;\n          ctx.lineWidth = 1;\n          ctx.lineCap = \"butt\";\n          ctx.lineJoin = \"miter\";\n          ctx.miterLimit = 10;\n          ctx.globalCompositeOperation = \"source-over\";\n          ctx.font = \"10px sans-serif\";\n          if (ctx.setLineDash !== undefined) {\n            ctx.setLineDash([]);\n            ctx.lineDashOffset = 0;\n          }\n          if (!_util.isNodeJS) {\n            const {\n              filter\n            } = ctx;\n            if (filter !== \"none\" && filter !== \"\") {\n              ctx.filter = \"none\";\n            }\n          }\n        }\n        function composeSMaskBackdrop(bytes, r0, g0, b0) {\n          const length = bytes.length;\n          for (let i = 3; i < length; i += 4) {\n            const alpha = bytes[i];\n            if (alpha === 0) {\n              bytes[i - 3] = r0;\n              bytes[i - 2] = g0;\n              bytes[i - 1] = b0;\n            } else if (alpha < 255) {\n              const alpha_ = 255 - alpha;\n              bytes[i - 3] = bytes[i - 3] * alpha + r0 * alpha_ >> 8;\n              bytes[i - 2] = bytes[i - 2] * alpha + g0 * alpha_ >> 8;\n              bytes[i - 1] = bytes[i - 1] * alpha + b0 * alpha_ >> 8;\n            }\n          }\n        }\n        function composeSMaskAlpha(maskData, layerData, transferMap) {\n          const length = maskData.length;\n          const scale = 1 / 255;\n          for (let i = 3; i < length; i += 4) {\n            const alpha = transferMap ? transferMap[maskData[i]] : maskData[i];\n            layerData[i] = layerData[i] * alpha * scale | 0;\n          }\n        }\n        function composeSMaskLuminosity(maskData, layerData, transferMap) {\n          const length = maskData.length;\n          for (let i = 3; i < length; i += 4) {\n            const y = maskData[i - 3] * 77 + maskData[i - 2] * 152 + maskData[i - 1] * 28;\n            layerData[i] = transferMap ? layerData[i] * transferMap[y >> 8] >> 8 : layerData[i] * y >> 16;\n          }\n        }\n        function genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap, layerOffsetX, layerOffsetY, maskOffsetX, maskOffsetY) {\n          const hasBackdrop = !!backdrop;\n          const r0 = hasBackdrop ? backdrop[0] : 0;\n          const g0 = hasBackdrop ? backdrop[1] : 0;\n          const b0 = hasBackdrop ? backdrop[2] : 0;\n          const composeFn = subtype === \"Luminosity\" ? composeSMaskLuminosity : composeSMaskAlpha;\n          const PIXELS_TO_PROCESS = 1048576;\n          const chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));\n          for (let row = 0; row < height; row += chunkSize) {\n            const chunkHeight = Math.min(chunkSize, height - row);\n            const maskData = maskCtx.getImageData(layerOffsetX - maskOffsetX, row + (layerOffsetY - maskOffsetY), width, chunkHeight);\n            const layerData = layerCtx.getImageData(layerOffsetX, row + layerOffsetY, width, chunkHeight);\n            if (hasBackdrop) {\n              composeSMaskBackdrop(maskData.data, r0, g0, b0);\n            }\n            composeFn(maskData.data, layerData.data, transferMap);\n            layerCtx.putImageData(layerData, layerOffsetX, row + layerOffsetY);\n          }\n        }\n        function composeSMask(ctx, smask, layerCtx, layerBox) {\n          const layerOffsetX = layerBox[0];\n          const layerOffsetY = layerBox[1];\n          const layerWidth = layerBox[2] - layerOffsetX;\n          const layerHeight = layerBox[3] - layerOffsetY;\n          if (layerWidth === 0 || layerHeight === 0) {\n            return;\n          }\n          genericComposeSMask(smask.context, layerCtx, layerWidth, layerHeight, smask.subtype, smask.backdrop, smask.transferMap, layerOffsetX, layerOffsetY, smask.offsetX, smask.offsetY);\n          ctx.save();\n          ctx.globalAlpha = 1;\n          ctx.globalCompositeOperation = \"source-over\";\n          ctx.setTransform(1, 0, 0, 1, 0, 0);\n          ctx.drawImage(layerCtx.canvas, 0, 0);\n          ctx.restore();\n        }\n        function getImageSmoothingEnabled(transform, interpolate) {\n          const scale = _util.Util.singularValueDecompose2dScale(transform);\n          scale[0] = Math.fround(scale[0]);\n          scale[1] = Math.fround(scale[1]);\n          const actualScale = Math.fround((globalThis.devicePixelRatio || 1) * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n          if (interpolate !== undefined) {\n            return interpolate;\n          } else if (scale[0] <= actualScale || scale[1] <= actualScale) {\n            return true;\n          }\n          return false;\n        }\n        const LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\n        const LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\n        const NORMAL_CLIP = {};\n        const EO_CLIP = {};\n        class CanvasGraphics {\n          constructor(canvasCtx, commonObjs, objs, canvasFactory, filterFactory, {\n            optionalContentConfig,\n            markedContentStack = null\n          }, annotationCanvasMap, pageColors) {\n            this.ctx = canvasCtx;\n            this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n            this.stateStack = [];\n            this.pendingClip = null;\n            this.pendingEOFill = false;\n            this.res = null;\n            this.xobjs = null;\n            this.commonObjs = commonObjs;\n            this.objs = objs;\n            this.canvasFactory = canvasFactory;\n            this.filterFactory = filterFactory;\n            this.groupStack = [];\n            this.processingType3 = null;\n            this.baseTransform = null;\n            this.baseTransformStack = [];\n            this.groupLevel = 0;\n            this.smaskStack = [];\n            this.smaskCounter = 0;\n            this.tempSMask = null;\n            this.suspendedCtx = null;\n            this.contentVisible = true;\n            this.markedContentStack = markedContentStack || [];\n            this.optionalContentConfig = optionalContentConfig;\n            this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n            this.cachedPatterns = new Map();\n            this.annotationCanvasMap = annotationCanvasMap;\n            this.viewportScale = 1;\n            this.outputScaleX = 1;\n            this.outputScaleY = 1;\n            this.pageColors = pageColors;\n            this._cachedScaleForStroking = [-1, 0];\n            this._cachedGetSinglePixelWidth = null;\n            this._cachedBitmapsMap = new Map();\n          }\n          getObject(data, fallback = null) {\n            if (typeof data === \"string\") {\n              return data.startsWith(\"g_\") ? this.commonObjs.get(data) : this.objs.get(data);\n            }\n            return fallback;\n          }\n          beginDrawing({\n            transform,\n            viewport,\n            transparency = false,\n            background = null\n          }) {\n            const width = this.ctx.canvas.width;\n            const height = this.ctx.canvas.height;\n            const savedFillStyle = this.ctx.fillStyle;\n            this.ctx.fillStyle = background || \"#ffffff\";\n            this.ctx.fillRect(0, 0, width, height);\n            this.ctx.fillStyle = savedFillStyle;\n            if (transparency) {\n              const transparentCanvas = this.cachedCanvases.getCanvas(\"transparent\", width, height);\n              this.compositeCtx = this.ctx;\n              this.transparentCanvas = transparentCanvas.canvas;\n              this.ctx = transparentCanvas.context;\n              this.ctx.save();\n              this.ctx.transform(...(0, _display_utils.getCurrentTransform)(this.compositeCtx));\n            }\n            this.ctx.save();\n            resetCtxToDefault(this.ctx);\n            if (transform) {\n              this.ctx.transform(...transform);\n              this.outputScaleX = transform[0];\n              this.outputScaleY = transform[0];\n            }\n            this.ctx.transform(...viewport.transform);\n            this.viewportScale = viewport.scale;\n            this.baseTransform = (0, _display_utils.getCurrentTransform)(this.ctx);\n          }\n          executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) {\n            const argsArray = operatorList.argsArray;\n            const fnArray = operatorList.fnArray;\n            let i = executionStartIdx || 0;\n            const argsArrayLen = argsArray.length;\n            if (argsArrayLen === i) {\n              return i;\n            }\n            const chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === \"function\";\n            const endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n            let steps = 0;\n            const commonObjs = this.commonObjs;\n            const objs = this.objs;\n            let fnId;\n            while (true) {\n              if (stepper !== undefined && i === stepper.nextBreakPoint) {\n                stepper.breakIt(i, continueCallback);\n                return i;\n              }\n              fnId = fnArray[i];\n              if (fnId !== _util.OPS.dependency) {\n                this[fnId].apply(this, argsArray[i]);\n              } else {\n                for (const depObjId of argsArray[i]) {\n                  const objsPool = depObjId.startsWith(\"g_\") ? commonObjs : objs;\n                  if (!objsPool.has(depObjId)) {\n                    objsPool.get(depObjId, continueCallback);\n                    return i;\n                  }\n                }\n              }\n              i++;\n              if (i === argsArrayLen) {\n                return i;\n              }\n              if (chunkOperations && ++steps > EXECUTION_STEPS) {\n                if (Date.now() > endTime) {\n                  continueCallback();\n                  return i;\n                }\n                steps = 0;\n              }\n            }\n          }\n          #restoreInitialState() {\n            while (this.stateStack.length || this.inSMaskMode) {\n              this.restore();\n            }\n            this.ctx.restore();\n            if (this.transparentCanvas) {\n              this.ctx = this.compositeCtx;\n              this.ctx.save();\n              this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n              this.ctx.drawImage(this.transparentCanvas, 0, 0);\n              this.ctx.restore();\n              this.transparentCanvas = null;\n            }\n          }\n          endDrawing() {\n            this.#restoreInitialState();\n            this.cachedCanvases.clear();\n            this.cachedPatterns.clear();\n            for (const cache of this._cachedBitmapsMap.values()) {\n              for (const canvas of cache.values()) {\n                if (typeof HTMLCanvasElement !== \"undefined\" && canvas instanceof HTMLCanvasElement) {\n                  canvas.width = canvas.height = 0;\n                }\n              }\n              cache.clear();\n            }\n            this._cachedBitmapsMap.clear();\n            this.#drawFilter();\n          }\n          #drawFilter() {\n            if (this.pageColors) {\n              const hcmFilterId = this.filterFactory.addHCMFilter(this.pageColors.foreground, this.pageColors.background);\n              if (hcmFilterId !== \"none\") {\n                const savedFilter = this.ctx.filter;\n                this.ctx.filter = hcmFilterId;\n                this.ctx.drawImage(this.ctx.canvas, 0, 0);\n                this.ctx.filter = savedFilter;\n              }\n            }\n          }\n          _scaleImage(img, inverseTransform) {\n            const width = img.width;\n            const height = img.height;\n            let widthScale = Math.max(Math.hypot(inverseTransform[0], inverseTransform[1]), 1);\n            let heightScale = Math.max(Math.hypot(inverseTransform[2], inverseTransform[3]), 1);\n            let paintWidth = width,\n              paintHeight = height;\n            let tmpCanvasId = \"prescale1\";\n            let tmpCanvas, tmpCtx;\n            while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) {\n              let newWidth = paintWidth,\n                newHeight = paintHeight;\n              if (widthScale > 2 && paintWidth > 1) {\n                newWidth = paintWidth >= 16384 ? Math.floor(paintWidth / 2) - 1 || 1 : Math.ceil(paintWidth / 2);\n                widthScale /= paintWidth / newWidth;\n              }\n              if (heightScale > 2 && paintHeight > 1) {\n                newHeight = paintHeight >= 16384 ? Math.floor(paintHeight / 2) - 1 || 1 : Math.ceil(paintHeight) / 2;\n                heightScale /= paintHeight / newHeight;\n              }\n              tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight);\n              tmpCtx = tmpCanvas.context;\n              tmpCtx.clearRect(0, 0, newWidth, newHeight);\n              tmpCtx.drawImage(img, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight);\n              img = tmpCanvas.canvas;\n              paintWidth = newWidth;\n              paintHeight = newHeight;\n              tmpCanvasId = tmpCanvasId === \"prescale1\" ? \"prescale2\" : \"prescale1\";\n            }\n            return {\n              img,\n              paintWidth,\n              paintHeight\n            };\n          }\n          _createMaskCanvas(img) {\n            const ctx = this.ctx;\n            const {\n              width,\n              height\n            } = img;\n            const fillColor = this.current.fillColor;\n            const isPatternFill = this.current.patternFill;\n            const currentTransform = (0, _display_utils.getCurrentTransform)(ctx);\n            let cache, cacheKey, scaled, maskCanvas;\n            if ((img.bitmap || img.data) && img.count > 1) {\n              const mainKey = img.bitmap || img.data.buffer;\n              cacheKey = JSON.stringify(isPatternFill ? currentTransform : [currentTransform.slice(0, 4), fillColor]);\n              cache = this._cachedBitmapsMap.get(mainKey);\n              if (!cache) {\n                cache = new Map();\n                this._cachedBitmapsMap.set(mainKey, cache);\n              }\n              const cachedImage = cache.get(cacheKey);\n              if (cachedImage && !isPatternFill) {\n                const offsetX = Math.round(Math.min(currentTransform[0], currentTransform[2]) + currentTransform[4]);\n                const offsetY = Math.round(Math.min(currentTransform[1], currentTransform[3]) + currentTransform[5]);\n                return {\n                  canvas: cachedImage,\n                  offsetX,\n                  offsetY\n                };\n              }\n              scaled = cachedImage;\n            }\n            if (!scaled) {\n              maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n              putBinaryImageMask(maskCanvas.context, img);\n            }\n            let maskToCanvas = _util.Util.transform(currentTransform, [1 / width, 0, 0, -1 / height, 0, 0]);\n            maskToCanvas = _util.Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);\n            const cord1 = _util.Util.applyTransform([0, 0], maskToCanvas);\n            const cord2 = _util.Util.applyTransform([width, height], maskToCanvas);\n            const rect = _util.Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]);\n            const drawnWidth = Math.round(rect[2] - rect[0]) || 1;\n            const drawnHeight = Math.round(rect[3] - rect[1]) || 1;\n            const fillCanvas = this.cachedCanvases.getCanvas(\"fillCanvas\", drawnWidth, drawnHeight);\n            const fillCtx = fillCanvas.context;\n            const offsetX = Math.min(cord1[0], cord2[0]);\n            const offsetY = Math.min(cord1[1], cord2[1]);\n            fillCtx.translate(-offsetX, -offsetY);\n            fillCtx.transform(...maskToCanvas);\n            if (!scaled) {\n              scaled = this._scaleImage(maskCanvas.canvas, (0, _display_utils.getCurrentTransformInverse)(fillCtx));\n              scaled = scaled.img;\n              if (cache && isPatternFill) {\n                cache.set(cacheKey, scaled);\n              }\n            }\n            fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled((0, _display_utils.getCurrentTransform)(fillCtx), img.interpolate);\n            drawImageAtIntegerCoords(fillCtx, scaled, 0, 0, scaled.width, scaled.height, 0, 0, width, height);\n            fillCtx.globalCompositeOperation = \"source-in\";\n            const inverse = _util.Util.transform((0, _display_utils.getCurrentTransformInverse)(fillCtx), [1, 0, 0, 1, -offsetX, -offsetY]);\n            fillCtx.fillStyle = isPatternFill ? fillColor.getPattern(ctx, this, inverse, _pattern_helper.PathType.FILL) : fillColor;\n            fillCtx.fillRect(0, 0, width, height);\n            if (cache && !isPatternFill) {\n              this.cachedCanvases.delete(\"fillCanvas\");\n              cache.set(cacheKey, fillCanvas.canvas);\n            }\n            return {\n              canvas: fillCanvas.canvas,\n              offsetX: Math.round(offsetX),\n              offsetY: Math.round(offsetY)\n            };\n          }\n          setLineWidth(width) {\n            if (width !== this.current.lineWidth) {\n              this._cachedScaleForStroking[0] = -1;\n            }\n            this.current.lineWidth = width;\n            this.ctx.lineWidth = width;\n          }\n          setLineCap(style) {\n            this.ctx.lineCap = LINE_CAP_STYLES[style];\n          }\n          setLineJoin(style) {\n            this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n          }\n          setMiterLimit(limit) {\n            this.ctx.miterLimit = limit;\n          }\n          setDash(dashArray, dashPhase) {\n            const ctx = this.ctx;\n            if (ctx.setLineDash !== undefined) {\n              ctx.setLineDash(dashArray);\n              ctx.lineDashOffset = dashPhase;\n            }\n          }\n          setRenderingIntent(intent) {}\n          setFlatness(flatness) {}\n          setGState(states) {\n            for (const [key, value] of states) {\n              switch (key) {\n                case \"LW\":\n                  this.setLineWidth(value);\n                  break;\n                case \"LC\":\n                  this.setLineCap(value);\n                  break;\n                case \"LJ\":\n                  this.setLineJoin(value);\n                  break;\n                case \"ML\":\n                  this.setMiterLimit(value);\n                  break;\n                case \"D\":\n                  this.setDash(value[0], value[1]);\n                  break;\n                case \"RI\":\n                  this.setRenderingIntent(value);\n                  break;\n                case \"FL\":\n                  this.setFlatness(value);\n                  break;\n                case \"Font\":\n                  this.setFont(value[0], value[1]);\n                  break;\n                case \"CA\":\n                  this.current.strokeAlpha = value;\n                  break;\n                case \"ca\":\n                  this.current.fillAlpha = value;\n                  this.ctx.globalAlpha = value;\n                  break;\n                case \"BM\":\n                  this.ctx.globalCompositeOperation = value;\n                  break;\n                case \"SMask\":\n                  this.current.activeSMask = value ? this.tempSMask : null;\n                  this.tempSMask = null;\n                  this.checkSMaskState();\n                  break;\n                case \"TR\":\n                  this.ctx.filter = this.current.transferMaps = this.filterFactory.addFilter(value);\n                  break;\n              }\n            }\n          }\n          get inSMaskMode() {\n            return !!this.suspendedCtx;\n          }\n          checkSMaskState() {\n            const inSMaskMode = this.inSMaskMode;\n            if (this.current.activeSMask && !inSMaskMode) {\n              this.beginSMaskMode();\n            } else if (!this.current.activeSMask && inSMaskMode) {\n              this.endSMaskMode();\n            }\n          }\n          beginSMaskMode() {\n            if (this.inSMaskMode) {\n              throw new Error(\"beginSMaskMode called while already in smask mode\");\n            }\n            const drawnWidth = this.ctx.canvas.width;\n            const drawnHeight = this.ctx.canvas.height;\n            const cacheId = \"smaskGroupAt\" + this.groupLevel;\n            const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight);\n            this.suspendedCtx = this.ctx;\n            this.ctx = scratchCanvas.context;\n            const ctx = this.ctx;\n            ctx.setTransform(...(0, _display_utils.getCurrentTransform)(this.suspendedCtx));\n            copyCtxState(this.suspendedCtx, ctx);\n            mirrorContextOperations(ctx, this.suspendedCtx);\n            this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n          }\n          endSMaskMode() {\n            if (!this.inSMaskMode) {\n              throw new Error(\"endSMaskMode called while not in smask mode\");\n            }\n            this.ctx._removeMirroring();\n            copyCtxState(this.ctx, this.suspendedCtx);\n            this.ctx = this.suspendedCtx;\n            this.suspendedCtx = null;\n          }\n          compose(dirtyBox) {\n            if (!this.current.activeSMask) {\n              return;\n            }\n            if (!dirtyBox) {\n              dirtyBox = [0, 0, this.ctx.canvas.width, this.ctx.canvas.height];\n            } else {\n              dirtyBox[0] = Math.floor(dirtyBox[0]);\n              dirtyBox[1] = Math.floor(dirtyBox[1]);\n              dirtyBox[2] = Math.ceil(dirtyBox[2]);\n              dirtyBox[3] = Math.ceil(dirtyBox[3]);\n            }\n            const smask = this.current.activeSMask;\n            const suspendedCtx = this.suspendedCtx;\n            composeSMask(suspendedCtx, smask, this.ctx, dirtyBox);\n            this.ctx.save();\n            this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n            this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n            this.ctx.restore();\n          }\n          save() {\n            if (this.inSMaskMode) {\n              copyCtxState(this.ctx, this.suspendedCtx);\n              this.suspendedCtx.save();\n            } else {\n              this.ctx.save();\n            }\n            const old = this.current;\n            this.stateStack.push(old);\n            this.current = old.clone();\n          }\n          restore() {\n            if (this.stateStack.length === 0 && this.inSMaskMode) {\n              this.endSMaskMode();\n            }\n            if (this.stateStack.length !== 0) {\n              this.current = this.stateStack.pop();\n              if (this.inSMaskMode) {\n                this.suspendedCtx.restore();\n                copyCtxState(this.suspendedCtx, this.ctx);\n              } else {\n                this.ctx.restore();\n              }\n              this.checkSMaskState();\n              this.pendingClip = null;\n              this._cachedScaleForStroking[0] = -1;\n              this._cachedGetSinglePixelWidth = null;\n            }\n          }\n          transform(a, b, c, d, e, f) {\n            this.ctx.transform(a, b, c, d, e, f);\n            this._cachedScaleForStroking[0] = -1;\n            this._cachedGetSinglePixelWidth = null;\n          }\n          constructPath(ops, args, minMax) {\n            const ctx = this.ctx;\n            const current = this.current;\n            let x = current.x,\n              y = current.y;\n            let startX, startY;\n            const currentTransform = (0, _display_utils.getCurrentTransform)(ctx);\n            const isScalingMatrix = currentTransform[0] === 0 && currentTransform[3] === 0 || currentTransform[1] === 0 && currentTransform[2] === 0;\n            const minMaxForBezier = isScalingMatrix ? minMax.slice(0) : null;\n            for (let i = 0, j = 0, ii = ops.length; i < ii; i++) {\n              switch (ops[i] | 0) {\n                case _util.OPS.rectangle:\n                  x = args[j++];\n                  y = args[j++];\n                  const width = args[j++];\n                  const height = args[j++];\n                  const xw = x + width;\n                  const yh = y + height;\n                  ctx.moveTo(x, y);\n                  if (width === 0 || height === 0) {\n                    ctx.lineTo(xw, yh);\n                  } else {\n                    ctx.lineTo(xw, y);\n                    ctx.lineTo(xw, yh);\n                    ctx.lineTo(x, yh);\n                  }\n                  if (!isScalingMatrix) {\n                    current.updateRectMinMax(currentTransform, [x, y, xw, yh]);\n                  }\n                  ctx.closePath();\n                  break;\n                case _util.OPS.moveTo:\n                  x = args[j++];\n                  y = args[j++];\n                  ctx.moveTo(x, y);\n                  if (!isScalingMatrix) {\n                    current.updatePathMinMax(currentTransform, x, y);\n                  }\n                  break;\n                case _util.OPS.lineTo:\n                  x = args[j++];\n                  y = args[j++];\n                  ctx.lineTo(x, y);\n                  if (!isScalingMatrix) {\n                    current.updatePathMinMax(currentTransform, x, y);\n                  }\n                  break;\n                case _util.OPS.curveTo:\n                  startX = x;\n                  startY = y;\n                  x = args[j + 4];\n                  y = args[j + 5];\n                  ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y);\n                  current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], args[j + 2], args[j + 3], x, y, minMaxForBezier);\n                  j += 6;\n                  break;\n                case _util.OPS.curveTo2:\n                  startX = x;\n                  startY = y;\n                  ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]);\n                  current.updateCurvePathMinMax(currentTransform, startX, startY, x, y, args[j], args[j + 1], args[j + 2], args[j + 3], minMaxForBezier);\n                  x = args[j + 2];\n                  y = args[j + 3];\n                  j += 4;\n                  break;\n                case _util.OPS.curveTo3:\n                  startX = x;\n                  startY = y;\n                  x = args[j + 2];\n                  y = args[j + 3];\n                  ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n                  current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], x, y, x, y, minMaxForBezier);\n                  j += 4;\n                  break;\n                case _util.OPS.closePath:\n                  ctx.closePath();\n                  break;\n              }\n            }\n            if (isScalingMatrix) {\n              current.updateScalingPathMinMax(currentTransform, minMaxForBezier);\n            }\n            current.setCurrentPoint(x, y);\n          }\n          closePath() {\n            this.ctx.closePath();\n          }\n          stroke(consumePath = true) {\n            const ctx = this.ctx;\n            const strokeColor = this.current.strokeColor;\n            ctx.globalAlpha = this.current.strokeAlpha;\n            if (this.contentVisible) {\n              if (typeof strokeColor === \"object\" && strokeColor?.getPattern) {\n                ctx.save();\n                ctx.strokeStyle = strokeColor.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.STROKE);\n                this.rescaleAndStroke(false);\n                ctx.restore();\n              } else {\n                this.rescaleAndStroke(true);\n              }\n            }\n            if (consumePath) {\n              this.consumePath(this.current.getClippedPathBoundingBox());\n            }\n            ctx.globalAlpha = this.current.fillAlpha;\n          }\n          closeStroke() {\n            this.closePath();\n            this.stroke();\n          }\n          fill(consumePath = true) {\n            const ctx = this.ctx;\n            const fillColor = this.current.fillColor;\n            const isPatternFill = this.current.patternFill;\n            let needRestore = false;\n            if (isPatternFill) {\n              ctx.save();\n              ctx.fillStyle = fillColor.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.FILL);\n              needRestore = true;\n            }\n            const intersect = this.current.getClippedPathBoundingBox();\n            if (this.contentVisible && intersect !== null) {\n              if (this.pendingEOFill) {\n                ctx.fill(\"evenodd\");\n                this.pendingEOFill = false;\n              } else {\n                ctx.fill();\n              }\n            }\n            if (needRestore) {\n              ctx.restore();\n            }\n            if (consumePath) {\n              this.consumePath(intersect);\n            }\n          }\n          eoFill() {\n            this.pendingEOFill = true;\n            this.fill();\n          }\n          fillStroke() {\n            this.fill(false);\n            this.stroke(false);\n            this.consumePath();\n          }\n          eoFillStroke() {\n            this.pendingEOFill = true;\n            this.fillStroke();\n          }\n          closeFillStroke() {\n            this.closePath();\n            this.fillStroke();\n          }\n          closeEOFillStroke() {\n            this.pendingEOFill = true;\n            this.closePath();\n            this.fillStroke();\n          }\n          endPath() {\n            this.consumePath();\n          }\n          clip() {\n            this.pendingClip = NORMAL_CLIP;\n          }\n          eoClip() {\n            this.pendingClip = EO_CLIP;\n          }\n          beginText() {\n            this.current.textMatrix = _util.IDENTITY_MATRIX;\n            this.current.textMatrixScale = 1;\n            this.current.x = this.current.lineX = 0;\n            this.current.y = this.current.lineY = 0;\n          }\n          endText() {\n            const paths = this.pendingTextPaths;\n            const ctx = this.ctx;\n            if (paths === undefined) {\n              ctx.beginPath();\n              return;\n            }\n            ctx.save();\n            ctx.beginPath();\n            for (const path of paths) {\n              ctx.setTransform(...path.transform);\n              ctx.translate(path.x, path.y);\n              path.addToPath(ctx, path.fontSize);\n            }\n            ctx.restore();\n            ctx.clip();\n            ctx.beginPath();\n            delete this.pendingTextPaths;\n          }\n          setCharSpacing(spacing) {\n            this.current.charSpacing = spacing;\n          }\n          setWordSpacing(spacing) {\n            this.current.wordSpacing = spacing;\n          }\n          setHScale(scale) {\n            this.current.textHScale = scale / 100;\n          }\n          setLeading(leading) {\n            this.current.leading = -leading;\n          }\n          setFont(fontRefName, size) {\n            const fontObj = this.commonObjs.get(fontRefName);\n            const current = this.current;\n            if (!fontObj) {\n              throw new Error(`Can't find font for ${fontRefName}`);\n            }\n            current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n            if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) {\n              (0, _util.warn)(\"Invalid font matrix for font \" + fontRefName);\n            }\n            if (size < 0) {\n              size = -size;\n              current.fontDirection = -1;\n            } else {\n              current.fontDirection = 1;\n            }\n            this.current.font = fontObj;\n            this.current.fontSize = size;\n            if (fontObj.isType3Font) {\n              return;\n            }\n            const name = fontObj.loadedName || \"sans-serif\";\n            const typeface = fontObj.systemFontInfo?.css || `\"${name}\", ${fontObj.fallbackName}`;\n            let bold = \"normal\";\n            if (fontObj.black) {\n              bold = \"900\";\n            } else if (fontObj.bold) {\n              bold = \"bold\";\n            }\n            const italic = fontObj.italic ? \"italic\" : \"normal\";\n            let browserFontSize = size;\n            if (size < MIN_FONT_SIZE) {\n              browserFontSize = MIN_FONT_SIZE;\n            } else if (size > MAX_FONT_SIZE) {\n              browserFontSize = MAX_FONT_SIZE;\n            }\n            this.current.fontSizeScale = size / browserFontSize;\n            this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`;\n          }\n          setTextRenderingMode(mode) {\n            this.current.textRenderingMode = mode;\n          }\n          setTextRise(rise) {\n            this.current.textRise = rise;\n          }\n          moveText(x, y) {\n            this.current.x = this.current.lineX += x;\n            this.current.y = this.current.lineY += y;\n          }\n          setLeadingMoveText(x, y) {\n            this.setLeading(-y);\n            this.moveText(x, y);\n          }\n          setTextMatrix(a, b, c, d, e, f) {\n            this.current.textMatrix = [a, b, c, d, e, f];\n            this.current.textMatrixScale = Math.hypot(a, b);\n            this.current.x = this.current.lineX = 0;\n            this.current.y = this.current.lineY = 0;\n          }\n          nextLine() {\n            this.moveText(0, this.current.leading);\n          }\n          paintChar(character, x, y, patternTransform) {\n            const ctx = this.ctx;\n            const current = this.current;\n            const font = current.font;\n            const textRenderingMode = current.textRenderingMode;\n            const fontSize = current.fontSize / current.fontSizeScale;\n            const fillStrokeMode = textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n            const isAddToPathSet = !!(textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG);\n            const patternFill = current.patternFill && !font.missingFile;\n            let addToPath;\n            if (font.disableFontFace || isAddToPathSet || patternFill) {\n              addToPath = font.getPathGenerator(this.commonObjs, character);\n            }\n            if (font.disableFontFace || patternFill) {\n              ctx.save();\n              ctx.translate(x, y);\n              ctx.beginPath();\n              addToPath(ctx, fontSize);\n              if (patternTransform) {\n                ctx.setTransform(...patternTransform);\n              }\n              if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n                ctx.fill();\n              }\n              if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n                ctx.stroke();\n              }\n              ctx.restore();\n            } else {\n              if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n                ctx.fillText(character, x, y);\n              }\n              if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n                ctx.strokeText(character, x, y);\n              }\n            }\n            if (isAddToPathSet) {\n              const paths = this.pendingTextPaths ||= [];\n              paths.push({\n                transform: (0, _display_utils.getCurrentTransform)(ctx),\n                x,\n                y,\n                fontSize,\n                addToPath\n              });\n            }\n          }\n          get isFontSubpixelAAEnabled() {\n            const {\n              context: ctx\n            } = this.cachedCanvases.getCanvas(\"isFontSubpixelAAEnabled\", 10, 10);\n            ctx.scale(1.5, 1);\n            ctx.fillText(\"I\", 0, 10);\n            const data = ctx.getImageData(0, 0, 10, 10).data;\n            let enabled = false;\n            for (let i = 3; i < data.length; i += 4) {\n              if (data[i] > 0 && data[i] < 255) {\n                enabled = true;\n                break;\n              }\n            }\n            return (0, _util.shadow)(this, \"isFontSubpixelAAEnabled\", enabled);\n          }\n          showText(glyphs) {\n            const current = this.current;\n            const font = current.font;\n            if (font.isType3Font) {\n              return this.showType3Text(glyphs);\n            }\n            const fontSize = current.fontSize;\n            if (fontSize === 0) {\n              return undefined;\n            }\n            const ctx = this.ctx;\n            const fontSizeScale = current.fontSizeScale;\n            const charSpacing = current.charSpacing;\n            const wordSpacing = current.wordSpacing;\n            const fontDirection = current.fontDirection;\n            const textHScale = current.textHScale * fontDirection;\n            const glyphsLength = glyphs.length;\n            const vertical = font.vertical;\n            const spacingDir = vertical ? 1 : -1;\n            const defaultVMetrics = font.defaultVMetrics;\n            const widthAdvanceScale = fontSize * current.fontMatrix[0];\n            const simpleFillText = current.textRenderingMode === _util.TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill;\n            ctx.save();\n            ctx.transform(...current.textMatrix);\n            ctx.translate(current.x, current.y + current.textRise);\n            if (fontDirection > 0) {\n              ctx.scale(textHScale, -1);\n            } else {\n              ctx.scale(textHScale, 1);\n            }\n            let patternTransform;\n            if (current.patternFill) {\n              ctx.save();\n              const pattern = current.fillColor.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.FILL);\n              patternTransform = (0, _display_utils.getCurrentTransform)(ctx);\n              ctx.restore();\n              ctx.fillStyle = pattern;\n            }\n            let lineWidth = current.lineWidth;\n            const scale = current.textMatrixScale;\n            if (scale === 0 || lineWidth === 0) {\n              const fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n              if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n                lineWidth = this.getSinglePixelWidth();\n              }\n            } else {\n              lineWidth /= scale;\n            }\n            if (fontSizeScale !== 1.0) {\n              ctx.scale(fontSizeScale, fontSizeScale);\n              lineWidth /= fontSizeScale;\n            }\n            ctx.lineWidth = lineWidth;\n            if (font.isInvalidPDFjsFont) {\n              const chars = [];\n              let width = 0;\n              for (const glyph of glyphs) {\n                chars.push(glyph.unicode);\n                width += glyph.width;\n              }\n              ctx.fillText(chars.join(\"\"), 0, 0);\n              current.x += width * widthAdvanceScale * textHScale;\n              ctx.restore();\n              this.compose();\n              return undefined;\n            }\n            let x = 0,\n              i;\n            for (i = 0; i < glyphsLength; ++i) {\n              const glyph = glyphs[i];\n              if (typeof glyph === \"number\") {\n                x += spacingDir * glyph * fontSize / 1000;\n                continue;\n              }\n              let restoreNeeded = false;\n              const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n              const character = glyph.fontChar;\n              const accent = glyph.accent;\n              let scaledX, scaledY;\n              let width = glyph.width;\n              if (vertical) {\n                const vmetric = glyph.vmetric || defaultVMetrics;\n                const vx = -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale;\n                const vy = vmetric[2] * widthAdvanceScale;\n                width = vmetric ? -vmetric[0] : width;\n                scaledX = vx / fontSizeScale;\n                scaledY = (x + vy) / fontSizeScale;\n              } else {\n                scaledX = x / fontSizeScale;\n                scaledY = 0;\n              }\n              if (font.remeasure && width > 0) {\n                const measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale;\n                if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n                  const characterScaleX = width / measuredWidth;\n                  restoreNeeded = true;\n                  ctx.save();\n                  ctx.scale(characterScaleX, 1);\n                  scaledX /= characterScaleX;\n                } else if (width !== measuredWidth) {\n                  scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale;\n                }\n              }\n              if (this.contentVisible && (glyph.isInFont || font.missingFile)) {\n                if (simpleFillText && !accent) {\n                  ctx.fillText(character, scaledX, scaledY);\n                } else {\n                  this.paintChar(character, scaledX, scaledY, patternTransform);\n                  if (accent) {\n                    const scaledAccentX = scaledX + fontSize * accent.offset.x / fontSizeScale;\n                    const scaledAccentY = scaledY - fontSize * accent.offset.y / fontSizeScale;\n                    this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY, patternTransform);\n                  }\n                }\n              }\n              const charWidth = vertical ? width * widthAdvanceScale - spacing * fontDirection : width * widthAdvanceScale + spacing * fontDirection;\n              x += charWidth;\n              if (restoreNeeded) {\n                ctx.restore();\n              }\n            }\n            if (vertical) {\n              current.y -= x;\n            } else {\n              current.x += x * textHScale;\n            }\n            ctx.restore();\n            this.compose();\n            return undefined;\n          }\n          showType3Text(glyphs) {\n            const ctx = this.ctx;\n            const current = this.current;\n            const font = current.font;\n            const fontSize = current.fontSize;\n            const fontDirection = current.fontDirection;\n            const spacingDir = font.vertical ? 1 : -1;\n            const charSpacing = current.charSpacing;\n            const wordSpacing = current.wordSpacing;\n            const textHScale = current.textHScale * fontDirection;\n            const fontMatrix = current.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n            const glyphsLength = glyphs.length;\n            const isTextInvisible = current.textRenderingMode === _util.TextRenderingMode.INVISIBLE;\n            let i, glyph, width, spacingLength;\n            if (isTextInvisible || fontSize === 0) {\n              return;\n            }\n            this._cachedScaleForStroking[0] = -1;\n            this._cachedGetSinglePixelWidth = null;\n            ctx.save();\n            ctx.transform(...current.textMatrix);\n            ctx.translate(current.x, current.y);\n            ctx.scale(textHScale, fontDirection);\n            for (i = 0; i < glyphsLength; ++i) {\n              glyph = glyphs[i];\n              if (typeof glyph === \"number\") {\n                spacingLength = spacingDir * glyph * fontSize / 1000;\n                this.ctx.translate(spacingLength, 0);\n                current.x += spacingLength * textHScale;\n                continue;\n              }\n              const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n              const operatorList = font.charProcOperatorList[glyph.operatorListId];\n              if (!operatorList) {\n                (0, _util.warn)(`Type3 character \"${glyph.operatorListId}\" is not available.`);\n                continue;\n              }\n              if (this.contentVisible) {\n                this.processingType3 = glyph;\n                this.save();\n                ctx.scale(fontSize, fontSize);\n                ctx.transform(...fontMatrix);\n                this.executeOperatorList(operatorList);\n                this.restore();\n              }\n              const transformed = _util.Util.applyTransform([glyph.width, 0], fontMatrix);\n              width = transformed[0] * fontSize + spacing;\n              ctx.translate(width, 0);\n              current.x += width * textHScale;\n            }\n            ctx.restore();\n            this.processingType3 = null;\n          }\n          setCharWidth(xWidth, yWidth) {}\n          setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {\n            this.ctx.rect(llx, lly, urx - llx, ury - lly);\n            this.ctx.clip();\n            this.endPath();\n          }\n          getColorN_Pattern(IR) {\n            let pattern;\n            if (IR[0] === \"TilingPattern\") {\n              const color = IR[1];\n              const baseTransform = this.baseTransform || (0, _display_utils.getCurrentTransform)(this.ctx);\n              const canvasGraphicsFactory = {\n                createCanvasGraphics: ctx => {\n                  return new CanvasGraphics(ctx, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {\n                    optionalContentConfig: this.optionalContentConfig,\n                    markedContentStack: this.markedContentStack\n                  });\n                }\n              };\n              pattern = new _pattern_helper.TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform);\n            } else {\n              pattern = this._getPattern(IR[1], IR[2]);\n            }\n            return pattern;\n          }\n          setStrokeColorN() {\n            this.current.strokeColor = this.getColorN_Pattern(arguments);\n          }\n          setFillColorN() {\n            this.current.fillColor = this.getColorN_Pattern(arguments);\n            this.current.patternFill = true;\n          }\n          setStrokeRGBColor(r, g, b) {\n            const color = _util.Util.makeHexColor(r, g, b);\n            this.ctx.strokeStyle = color;\n            this.current.strokeColor = color;\n          }\n          setFillRGBColor(r, g, b) {\n            const color = _util.Util.makeHexColor(r, g, b);\n            this.ctx.fillStyle = color;\n            this.current.fillColor = color;\n            this.current.patternFill = false;\n          }\n          _getPattern(objId, matrix = null) {\n            let pattern;\n            if (this.cachedPatterns.has(objId)) {\n              pattern = this.cachedPatterns.get(objId);\n            } else {\n              pattern = (0, _pattern_helper.getShadingPattern)(this.getObject(objId));\n              this.cachedPatterns.set(objId, pattern);\n            }\n            if (matrix) {\n              pattern.matrix = matrix;\n            }\n            return pattern;\n          }\n          shadingFill(objId) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const ctx = this.ctx;\n            this.save();\n            const pattern = this._getPattern(objId);\n            ctx.fillStyle = pattern.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.SHADING);\n            const inv = (0, _display_utils.getCurrentTransformInverse)(ctx);\n            if (inv) {\n              const {\n                width,\n                height\n              } = ctx.canvas;\n              const [x0, y0, x1, y1] = _util.Util.getAxialAlignedBoundingBox([0, 0, width, height], inv);\n              this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n            } else {\n              this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n            }\n            this.compose(this.current.getClippedPathBoundingBox());\n            this.restore();\n          }\n          beginInlineImage() {\n            (0, _util.unreachable)(\"Should not call beginInlineImage\");\n          }\n          beginImageData() {\n            (0, _util.unreachable)(\"Should not call beginImageData\");\n          }\n          paintFormXObjectBegin(matrix, bbox) {\n            if (!this.contentVisible) {\n              return;\n            }\n            this.save();\n            this.baseTransformStack.push(this.baseTransform);\n            if (Array.isArray(matrix) && matrix.length === 6) {\n              this.transform(...matrix);\n            }\n            this.baseTransform = (0, _display_utils.getCurrentTransform)(this.ctx);\n            if (bbox) {\n              const width = bbox[2] - bbox[0];\n              const height = bbox[3] - bbox[1];\n              this.ctx.rect(bbox[0], bbox[1], width, height);\n              this.current.updateRectMinMax((0, _display_utils.getCurrentTransform)(this.ctx), bbox);\n              this.clip();\n              this.endPath();\n            }\n          }\n          paintFormXObjectEnd() {\n            if (!this.contentVisible) {\n              return;\n            }\n            this.restore();\n            this.baseTransform = this.baseTransformStack.pop();\n          }\n          beginGroup(group) {\n            if (!this.contentVisible) {\n              return;\n            }\n            this.save();\n            if (this.inSMaskMode) {\n              this.endSMaskMode();\n              this.current.activeSMask = null;\n            }\n            const currentCtx = this.ctx;\n            if (!group.isolated) {\n              (0, _util.info)(\"TODO: Support non-isolated groups.\");\n            }\n            if (group.knockout) {\n              (0, _util.warn)(\"Knockout groups not supported.\");\n            }\n            const currentTransform = (0, _display_utils.getCurrentTransform)(currentCtx);\n            if (group.matrix) {\n              currentCtx.transform(...group.matrix);\n            }\n            if (!group.bbox) {\n              throw new Error(\"Bounding box is required.\");\n            }\n            let bounds = _util.Util.getAxialAlignedBoundingBox(group.bbox, (0, _display_utils.getCurrentTransform)(currentCtx));\n            const canvasBounds = [0, 0, currentCtx.canvas.width, currentCtx.canvas.height];\n            bounds = _util.Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n            const offsetX = Math.floor(bounds[0]);\n            const offsetY = Math.floor(bounds[1]);\n            let drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n            let drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n            let scaleX = 1,\n              scaleY = 1;\n            if (drawnWidth > MAX_GROUP_SIZE) {\n              scaleX = drawnWidth / MAX_GROUP_SIZE;\n              drawnWidth = MAX_GROUP_SIZE;\n            }\n            if (drawnHeight > MAX_GROUP_SIZE) {\n              scaleY = drawnHeight / MAX_GROUP_SIZE;\n              drawnHeight = MAX_GROUP_SIZE;\n            }\n            this.current.startNewPathAndClipBox([0, 0, drawnWidth, drawnHeight]);\n            let cacheId = \"groupAt\" + this.groupLevel;\n            if (group.smask) {\n              cacheId += \"_smask_\" + this.smaskCounter++ % 2;\n            }\n            const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight);\n            const groupCtx = scratchCanvas.context;\n            groupCtx.scale(1 / scaleX, 1 / scaleY);\n            groupCtx.translate(-offsetX, -offsetY);\n            groupCtx.transform(...currentTransform);\n            if (group.smask) {\n              this.smaskStack.push({\n                canvas: scratchCanvas.canvas,\n                context: groupCtx,\n                offsetX,\n                offsetY,\n                scaleX,\n                scaleY,\n                subtype: group.smask.subtype,\n                backdrop: group.smask.backdrop,\n                transferMap: group.smask.transferMap || null,\n                startTransformInverse: null\n              });\n            } else {\n              currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n              currentCtx.translate(offsetX, offsetY);\n              currentCtx.scale(scaleX, scaleY);\n              currentCtx.save();\n            }\n            copyCtxState(currentCtx, groupCtx);\n            this.ctx = groupCtx;\n            this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n            this.groupStack.push(currentCtx);\n            this.groupLevel++;\n          }\n          endGroup(group) {\n            if (!this.contentVisible) {\n              return;\n            }\n            this.groupLevel--;\n            const groupCtx = this.ctx;\n            const ctx = this.groupStack.pop();\n            this.ctx = ctx;\n            this.ctx.imageSmoothingEnabled = false;\n            if (group.smask) {\n              this.tempSMask = this.smaskStack.pop();\n              this.restore();\n            } else {\n              this.ctx.restore();\n              const currentMtx = (0, _display_utils.getCurrentTransform)(this.ctx);\n              this.restore();\n              this.ctx.save();\n              this.ctx.setTransform(...currentMtx);\n              const dirtyBox = _util.Util.getAxialAlignedBoundingBox([0, 0, groupCtx.canvas.width, groupCtx.canvas.height], currentMtx);\n              this.ctx.drawImage(groupCtx.canvas, 0, 0);\n              this.ctx.restore();\n              this.compose(dirtyBox);\n            }\n          }\n          beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {\n            this.#restoreInitialState();\n            resetCtxToDefault(this.ctx);\n            this.ctx.save();\n            this.save();\n            if (this.baseTransform) {\n              this.ctx.setTransform(...this.baseTransform);\n            }\n            if (Array.isArray(rect) && rect.length === 4) {\n              const width = rect[2] - rect[0];\n              const height = rect[3] - rect[1];\n              if (hasOwnCanvas && this.annotationCanvasMap) {\n                transform = transform.slice();\n                transform[4] -= rect[0];\n                transform[5] -= rect[1];\n                rect = rect.slice();\n                rect[0] = rect[1] = 0;\n                rect[2] = width;\n                rect[3] = height;\n                const [scaleX, scaleY] = _util.Util.singularValueDecompose2dScale((0, _display_utils.getCurrentTransform)(this.ctx));\n                const {\n                  viewportScale\n                } = this;\n                const canvasWidth = Math.ceil(width * this.outputScaleX * viewportScale);\n                const canvasHeight = Math.ceil(height * this.outputScaleY * viewportScale);\n                this.annotationCanvas = this.canvasFactory.create(canvasWidth, canvasHeight);\n                const {\n                  canvas,\n                  context\n                } = this.annotationCanvas;\n                this.annotationCanvasMap.set(id, canvas);\n                this.annotationCanvas.savedCtx = this.ctx;\n                this.ctx = context;\n                this.ctx.save();\n                this.ctx.setTransform(scaleX, 0, 0, -scaleY, 0, height * scaleY);\n                resetCtxToDefault(this.ctx);\n              } else {\n                resetCtxToDefault(this.ctx);\n                this.ctx.rect(rect[0], rect[1], width, height);\n                this.ctx.clip();\n                this.endPath();\n              }\n            }\n            this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n            this.transform(...transform);\n            this.transform(...matrix);\n          }\n          endAnnotation() {\n            if (this.annotationCanvas) {\n              this.ctx.restore();\n              this.#drawFilter();\n              this.ctx = this.annotationCanvas.savedCtx;\n              delete this.annotationCanvas.savedCtx;\n              delete this.annotationCanvas;\n            }\n          }\n          paintImageMaskXObject(img) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const count = img.count;\n            img = this.getObject(img.data, img);\n            img.count = count;\n            const ctx = this.ctx;\n            const glyph = this.processingType3;\n            if (glyph) {\n              if (glyph.compiled === undefined) {\n                glyph.compiled = compileType3Glyph(img);\n              }\n              if (glyph.compiled) {\n                glyph.compiled(ctx);\n                return;\n              }\n            }\n            const mask = this._createMaskCanvas(img);\n            const maskCanvas = mask.canvas;\n            ctx.save();\n            ctx.setTransform(1, 0, 0, 1, 0, 0);\n            ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY);\n            ctx.restore();\n            this.compose();\n          }\n          paintImageMaskXObjectRepeat(img, scaleX, skewX = 0, skewY = 0, scaleY, positions) {\n            if (!this.contentVisible) {\n              return;\n            }\n            img = this.getObject(img.data, img);\n            const ctx = this.ctx;\n            ctx.save();\n            const currentTransform = (0, _display_utils.getCurrentTransform)(ctx);\n            ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);\n            const mask = this._createMaskCanvas(img);\n            ctx.setTransform(1, 0, 0, 1, mask.offsetX - currentTransform[4], mask.offsetY - currentTransform[5]);\n            for (let i = 0, ii = positions.length; i < ii; i += 2) {\n              const trans = _util.Util.transform(currentTransform, [scaleX, skewX, skewY, scaleY, positions[i], positions[i + 1]]);\n              const [x, y] = _util.Util.applyTransform([0, 0], trans);\n              ctx.drawImage(mask.canvas, x, y);\n            }\n            ctx.restore();\n            this.compose();\n          }\n          paintImageMaskXObjectGroup(images) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const ctx = this.ctx;\n            const fillColor = this.current.fillColor;\n            const isPatternFill = this.current.patternFill;\n            for (const image of images) {\n              const {\n                data,\n                width,\n                height,\n                transform\n              } = image;\n              const maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n              const maskCtx = maskCanvas.context;\n              maskCtx.save();\n              const img = this.getObject(data, image);\n              putBinaryImageMask(maskCtx, img);\n              maskCtx.globalCompositeOperation = \"source-in\";\n              maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.FILL) : fillColor;\n              maskCtx.fillRect(0, 0, width, height);\n              maskCtx.restore();\n              ctx.save();\n              ctx.transform(...transform);\n              ctx.scale(1, -1);\n              drawImageAtIntegerCoords(ctx, maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);\n              ctx.restore();\n            }\n            this.compose();\n          }\n          paintImageXObject(objId) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const imgData = this.getObject(objId);\n            if (!imgData) {\n              (0, _util.warn)(\"Dependent image isn't ready yet\");\n              return;\n            }\n            this.paintInlineImageXObject(imgData);\n          }\n          paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const imgData = this.getObject(objId);\n            if (!imgData) {\n              (0, _util.warn)(\"Dependent image isn't ready yet\");\n              return;\n            }\n            const width = imgData.width;\n            const height = imgData.height;\n            const map = [];\n            for (let i = 0, ii = positions.length; i < ii; i += 2) {\n              map.push({\n                transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]],\n                x: 0,\n                y: 0,\n                w: width,\n                h: height\n              });\n            }\n            this.paintInlineImageXObjectGroup(imgData, map);\n          }\n          applyTransferMapsToCanvas(ctx) {\n            if (this.current.transferMaps !== \"none\") {\n              ctx.filter = this.current.transferMaps;\n              ctx.drawImage(ctx.canvas, 0, 0);\n              ctx.filter = \"none\";\n            }\n            return ctx.canvas;\n          }\n          applyTransferMapsToBitmap(imgData) {\n            if (this.current.transferMaps === \"none\") {\n              return imgData.bitmap;\n            }\n            const {\n              bitmap,\n              width,\n              height\n            } = imgData;\n            const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height);\n            const tmpCtx = tmpCanvas.context;\n            tmpCtx.filter = this.current.transferMaps;\n            tmpCtx.drawImage(bitmap, 0, 0);\n            tmpCtx.filter = \"none\";\n            return tmpCanvas.canvas;\n          }\n          paintInlineImageXObject(imgData) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const width = imgData.width;\n            const height = imgData.height;\n            const ctx = this.ctx;\n            this.save();\n            if (!_util.isNodeJS) {\n              const {\n                filter\n              } = ctx;\n              if (filter !== \"none\" && filter !== \"\") {\n                ctx.filter = \"none\";\n              }\n            }\n            ctx.scale(1 / width, -1 / height);\n            let imgToPaint;\n            if (imgData.bitmap) {\n              imgToPaint = this.applyTransferMapsToBitmap(imgData);\n            } else if (typeof HTMLElement === \"function\" && imgData instanceof HTMLElement || !imgData.data) {\n              imgToPaint = imgData;\n            } else {\n              const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height);\n              const tmpCtx = tmpCanvas.context;\n              putBinaryImageData(tmpCtx, imgData);\n              imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n            }\n            const scaled = this._scaleImage(imgToPaint, (0, _display_utils.getCurrentTransformInverse)(ctx));\n            ctx.imageSmoothingEnabled = getImageSmoothingEnabled((0, _display_utils.getCurrentTransform)(ctx), imgData.interpolate);\n            drawImageAtIntegerCoords(ctx, scaled.img, 0, 0, scaled.paintWidth, scaled.paintHeight, 0, -height, width, height);\n            this.compose();\n            this.restore();\n          }\n          paintInlineImageXObjectGroup(imgData, map) {\n            if (!this.contentVisible) {\n              return;\n            }\n            const ctx = this.ctx;\n            let imgToPaint;\n            if (imgData.bitmap) {\n              imgToPaint = imgData.bitmap;\n            } else {\n              const w = imgData.width;\n              const h = imgData.height;\n              const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", w, h);\n              const tmpCtx = tmpCanvas.context;\n              putBinaryImageData(tmpCtx, imgData);\n              imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n            }\n            for (const entry of map) {\n              ctx.save();\n              ctx.transform(...entry.transform);\n              ctx.scale(1, -1);\n              drawImageAtIntegerCoords(ctx, imgToPaint, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1);\n              ctx.restore();\n            }\n            this.compose();\n          }\n          paintSolidColorImageMask() {\n            if (!this.contentVisible) {\n              return;\n            }\n            this.ctx.fillRect(0, 0, 1, 1);\n            this.compose();\n          }\n          markPoint(tag) {}\n          markPointProps(tag, properties) {}\n          beginMarkedContent(tag) {\n            this.markedContentStack.push({\n              visible: true\n            });\n          }\n          beginMarkedContentProps(tag, properties) {\n            if (tag === \"OC\") {\n              this.markedContentStack.push({\n                visible: this.optionalContentConfig.isVisible(properties)\n              });\n            } else {\n              this.markedContentStack.push({\n                visible: true\n              });\n            }\n            this.contentVisible = this.isContentVisible();\n          }\n          endMarkedContent() {\n            this.markedContentStack.pop();\n            this.contentVisible = this.isContentVisible();\n          }\n          beginCompat() {}\n          endCompat() {}\n          consumePath(clipBox) {\n            const isEmpty = this.current.isEmptyClip();\n            if (this.pendingClip) {\n              this.current.updateClipFromPath();\n            }\n            if (!this.pendingClip) {\n              this.compose(clipBox);\n            }\n            const ctx = this.ctx;\n            if (this.pendingClip) {\n              if (!isEmpty) {\n                if (this.pendingClip === EO_CLIP) {\n                  ctx.clip(\"evenodd\");\n                } else {\n                  ctx.clip();\n                }\n              }\n              this.pendingClip = null;\n            }\n            this.current.startNewPathAndClipBox(this.current.clipBox);\n            ctx.beginPath();\n          }\n          getSinglePixelWidth() {\n            if (!this._cachedGetSinglePixelWidth) {\n              const m = (0, _display_utils.getCurrentTransform)(this.ctx);\n              if (m[1] === 0 && m[2] === 0) {\n                this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));\n              } else {\n                const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n                const normX = Math.hypot(m[0], m[2]);\n                const normY = Math.hypot(m[1], m[3]);\n                this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;\n              }\n            }\n            return this._cachedGetSinglePixelWidth;\n          }\n          getScaleForStroking() {\n            if (this._cachedScaleForStroking[0] === -1) {\n              const {\n                lineWidth\n              } = this.current;\n              const {\n                a,\n                b,\n                c,\n                d\n              } = this.ctx.getTransform();\n              let scaleX, scaleY;\n              if (b === 0 && c === 0) {\n                const normX = Math.abs(a);\n                const normY = Math.abs(d);\n                if (normX === normY) {\n                  if (lineWidth === 0) {\n                    scaleX = scaleY = 1 / normX;\n                  } else {\n                    const scaledLineWidth = normX * lineWidth;\n                    scaleX = scaleY = scaledLineWidth < 1 ? 1 / scaledLineWidth : 1;\n                  }\n                } else if (lineWidth === 0) {\n                  scaleX = 1 / normX;\n                  scaleY = 1 / normY;\n                } else {\n                  const scaledXLineWidth = normX * lineWidth;\n                  const scaledYLineWidth = normY * lineWidth;\n                  scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1;\n                  scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;\n                }\n              } else {\n                const absDet = Math.abs(a * d - b * c);\n                const normX = Math.hypot(a, b);\n                const normY = Math.hypot(c, d);\n                if (lineWidth === 0) {\n                  scaleX = normY / absDet;\n                  scaleY = normX / absDet;\n                } else {\n                  const baseArea = lineWidth * absDet;\n                  scaleX = normY > baseArea ? normY / baseArea : 1;\n                  scaleY = normX > baseArea ? normX / baseArea : 1;\n                }\n              }\n              this._cachedScaleForStroking[0] = scaleX;\n              this._cachedScaleForStroking[1] = scaleY;\n            }\n            return this._cachedScaleForStroking;\n          }\n          rescaleAndStroke(saveRestore) {\n            const {\n              ctx\n            } = this;\n            const {\n              lineWidth\n            } = this.current;\n            const [scaleX, scaleY] = this.getScaleForStroking();\n            ctx.lineWidth = lineWidth || 1;\n            if (scaleX === 1 && scaleY === 1) {\n              ctx.stroke();\n              return;\n            }\n            const dashes = ctx.getLineDash();\n            if (saveRestore) {\n              ctx.save();\n            }\n            ctx.scale(scaleX, scaleY);\n            if (dashes.length > 0) {\n              const scale = Math.max(scaleX, scaleY);\n              ctx.setLineDash(dashes.map(x => x / scale));\n              ctx.lineDashOffset /= scale;\n            }\n            ctx.stroke();\n            if (saveRestore) {\n              ctx.restore();\n            }\n          }\n          isContentVisible() {\n            for (let i = this.markedContentStack.length - 1; i >= 0; i--) {\n              if (!this.markedContentStack[i].visible) {\n                return false;\n              }\n            }\n            return true;\n          }\n        }\n        exports.CanvasGraphics = CanvasGraphics;\n        for (const op in _util.OPS) {\n          if (CanvasGraphics.prototype[op] !== undefined) {\n            CanvasGraphics.prototype[_util.OPS[op]] = CanvasGraphics.prototype[op];\n          }\n        }\n\n        /***/\n      }, /* 12 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.TilingPattern = exports.PathType = void 0;\n        exports.getShadingPattern = getShadingPattern;\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        const PathType = {\n          FILL: \"Fill\",\n          STROKE: \"Stroke\",\n          SHADING: \"Shading\"\n        };\n        exports.PathType = PathType;\n        function applyBoundingBox(ctx, bbox) {\n          if (!bbox) {\n            return;\n          }\n          const width = bbox[2] - bbox[0];\n          const height = bbox[3] - bbox[1];\n          const region = new Path2D();\n          region.rect(bbox[0], bbox[1], width, height);\n          ctx.clip(region);\n        }\n        class BaseShadingPattern {\n          constructor() {\n            if (this.constructor === BaseShadingPattern) {\n              (0, _util.unreachable)(\"Cannot initialize BaseShadingPattern.\");\n            }\n          }\n          getPattern() {\n            (0, _util.unreachable)(\"Abstract method `getPattern` called.\");\n          }\n        }\n        class RadialAxialShadingPattern extends BaseShadingPattern {\n          constructor(IR) {\n            super();\n            this._type = IR[1];\n            this._bbox = IR[2];\n            this._colorStops = IR[3];\n            this._p0 = IR[4];\n            this._p1 = IR[5];\n            this._r0 = IR[6];\n            this._r1 = IR[7];\n            this.matrix = null;\n          }\n          _createGradient(ctx) {\n            let grad;\n            if (this._type === \"axial\") {\n              grad = ctx.createLinearGradient(this._p0[0], this._p0[1], this._p1[0], this._p1[1]);\n            } else if (this._type === \"radial\") {\n              grad = ctx.createRadialGradient(this._p0[0], this._p0[1], this._r0, this._p1[0], this._p1[1], this._r1);\n            }\n            for (const colorStop of this._colorStops) {\n              grad.addColorStop(colorStop[0], colorStop[1]);\n            }\n            return grad;\n          }\n          getPattern(ctx, owner, inverse, pathType) {\n            let pattern;\n            if (pathType === PathType.STROKE || pathType === PathType.FILL) {\n              const ownerBBox = owner.current.getClippedPathBoundingBox(pathType, (0, _display_utils.getCurrentTransform)(ctx)) || [0, 0, 0, 0];\n              const width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1;\n              const height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1;\n              const tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", width, height, true);\n              const tmpCtx = tmpCanvas.context;\n              tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n              tmpCtx.beginPath();\n              tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n              tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]);\n              inverse = _util.Util.transform(inverse, [1, 0, 0, 1, ownerBBox[0], ownerBBox[1]]);\n              tmpCtx.transform(...owner.baseTransform);\n              if (this.matrix) {\n                tmpCtx.transform(...this.matrix);\n              }\n              applyBoundingBox(tmpCtx, this._bbox);\n              tmpCtx.fillStyle = this._createGradient(tmpCtx);\n              tmpCtx.fill();\n              pattern = ctx.createPattern(tmpCanvas.canvas, \"no-repeat\");\n              const domMatrix = new DOMMatrix(inverse);\n              pattern.setTransform(domMatrix);\n            } else {\n              applyBoundingBox(ctx, this._bbox);\n              pattern = this._createGradient(ctx);\n            }\n            return pattern;\n          }\n        }\n        function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n          const coords = context.coords,\n            colors = context.colors;\n          const bytes = data.data,\n            rowSize = data.width * 4;\n          let tmp;\n          if (coords[p1 + 1] > coords[p2 + 1]) {\n            tmp = p1;\n            p1 = p2;\n            p2 = tmp;\n            tmp = c1;\n            c1 = c2;\n            c2 = tmp;\n          }\n          if (coords[p2 + 1] > coords[p3 + 1]) {\n            tmp = p2;\n            p2 = p3;\n            p3 = tmp;\n            tmp = c2;\n            c2 = c3;\n            c3 = tmp;\n          }\n          if (coords[p1 + 1] > coords[p2 + 1]) {\n            tmp = p1;\n            p1 = p2;\n            p2 = tmp;\n            tmp = c1;\n            c1 = c2;\n            c2 = tmp;\n          }\n          const x1 = (coords[p1] + context.offsetX) * context.scaleX;\n          const y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n          const x2 = (coords[p2] + context.offsetX) * context.scaleX;\n          const y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n          const x3 = (coords[p3] + context.offsetX) * context.scaleX;\n          const y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n          if (y1 >= y3) {\n            return;\n          }\n          const c1r = colors[c1],\n            c1g = colors[c1 + 1],\n            c1b = colors[c1 + 2];\n          const c2r = colors[c2],\n            c2g = colors[c2 + 1],\n            c2b = colors[c2 + 2];\n          const c3r = colors[c3],\n            c3g = colors[c3 + 1],\n            c3b = colors[c3 + 2];\n          const minY = Math.round(y1),\n            maxY = Math.round(y3);\n          let xa, car, cag, cab;\n          let xb, cbr, cbg, cbb;\n          for (let y = minY; y <= maxY; y++) {\n            if (y < y2) {\n              const k = y < y1 ? 0 : (y1 - y) / (y1 - y2);\n              xa = x1 - (x1 - x2) * k;\n              car = c1r - (c1r - c2r) * k;\n              cag = c1g - (c1g - c2g) * k;\n              cab = c1b - (c1b - c2b) * k;\n            } else {\n              let k;\n              if (y > y3) {\n                k = 1;\n              } else if (y2 === y3) {\n                k = 0;\n              } else {\n                k = (y2 - y) / (y2 - y3);\n              }\n              xa = x2 - (x2 - x3) * k;\n              car = c2r - (c2r - c3r) * k;\n              cag = c2g - (c2g - c3g) * k;\n              cab = c2b - (c2b - c3b) * k;\n            }\n            let k;\n            if (y < y1) {\n              k = 0;\n            } else if (y > y3) {\n              k = 1;\n            } else {\n              k = (y1 - y) / (y1 - y3);\n            }\n            xb = x1 - (x1 - x3) * k;\n            cbr = c1r - (c1r - c3r) * k;\n            cbg = c1g - (c1g - c3g) * k;\n            cbb = c1b - (c1b - c3b) * k;\n            const x1_ = Math.round(Math.min(xa, xb));\n            const x2_ = Math.round(Math.max(xa, xb));\n            let j = rowSize * y + x1_ * 4;\n            for (let x = x1_; x <= x2_; x++) {\n              k = (xa - x) / (xa - xb);\n              if (k < 0) {\n                k = 0;\n              } else if (k > 1) {\n                k = 1;\n              }\n              bytes[j++] = car - (car - cbr) * k | 0;\n              bytes[j++] = cag - (cag - cbg) * k | 0;\n              bytes[j++] = cab - (cab - cbb) * k | 0;\n              bytes[j++] = 255;\n            }\n          }\n        }\n        function drawFigure(data, figure, context) {\n          const ps = figure.coords;\n          const cs = figure.colors;\n          let i, ii;\n          switch (figure.type) {\n            case \"lattice\":\n              const verticesPerRow = figure.verticesPerRow;\n              const rows = Math.floor(ps.length / verticesPerRow) - 1;\n              const cols = verticesPerRow - 1;\n              for (i = 0; i < rows; i++) {\n                let q = i * verticesPerRow;\n                for (let j = 0; j < cols; j++, q++) {\n                  drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]);\n                  drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);\n                }\n              }\n              break;\n            case \"triangles\":\n              for (i = 0, ii = ps.length; i < ii; i += 3) {\n                drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]);\n              }\n              break;\n            default:\n              throw new Error(\"illegal figure\");\n          }\n        }\n        class MeshShadingPattern extends BaseShadingPattern {\n          constructor(IR) {\n            super();\n            this._coords = IR[2];\n            this._colors = IR[3];\n            this._figures = IR[4];\n            this._bounds = IR[5];\n            this._bbox = IR[7];\n            this._background = IR[8];\n            this.matrix = null;\n          }\n          _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {\n            const EXPECTED_SCALE = 1.1;\n            const MAX_PATTERN_SIZE = 3000;\n            const BORDER_SIZE = 2;\n            const offsetX = Math.floor(this._bounds[0]);\n            const offsetY = Math.floor(this._bounds[1]);\n            const boundsWidth = Math.ceil(this._bounds[2]) - offsetX;\n            const boundsHeight = Math.ceil(this._bounds[3]) - offsetY;\n            const width = Math.min(Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n            const height = Math.min(Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n            const scaleX = boundsWidth / width;\n            const scaleY = boundsHeight / height;\n            const context = {\n              coords: this._coords,\n              colors: this._colors,\n              offsetX: -offsetX,\n              offsetY: -offsetY,\n              scaleX: 1 / scaleX,\n              scaleY: 1 / scaleY\n            };\n            const paddedWidth = width + BORDER_SIZE * 2;\n            const paddedHeight = height + BORDER_SIZE * 2;\n            const tmpCanvas = cachedCanvases.getCanvas(\"mesh\", paddedWidth, paddedHeight, false);\n            const tmpCtx = tmpCanvas.context;\n            const data = tmpCtx.createImageData(width, height);\n            if (backgroundColor) {\n              const bytes = data.data;\n              for (let i = 0, ii = bytes.length; i < ii; i += 4) {\n                bytes[i] = backgroundColor[0];\n                bytes[i + 1] = backgroundColor[1];\n                bytes[i + 2] = backgroundColor[2];\n                bytes[i + 3] = 255;\n              }\n            }\n            for (const figure of this._figures) {\n              drawFigure(data, figure, context);\n            }\n            tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n            const canvas = tmpCanvas.canvas;\n            return {\n              canvas,\n              offsetX: offsetX - BORDER_SIZE * scaleX,\n              offsetY: offsetY - BORDER_SIZE * scaleY,\n              scaleX,\n              scaleY\n            };\n          }\n          getPattern(ctx, owner, inverse, pathType) {\n            applyBoundingBox(ctx, this._bbox);\n            let scale;\n            if (pathType === PathType.SHADING) {\n              scale = _util.Util.singularValueDecompose2dScale((0, _display_utils.getCurrentTransform)(ctx));\n            } else {\n              scale = _util.Util.singularValueDecompose2dScale(owner.baseTransform);\n              if (this.matrix) {\n                const matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);\n                scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]];\n              }\n            }\n            const temporaryPatternCanvas = this._createMeshCanvas(scale, pathType === PathType.SHADING ? null : this._background, owner.cachedCanvases);\n            if (pathType !== PathType.SHADING) {\n              ctx.setTransform(...owner.baseTransform);\n              if (this.matrix) {\n                ctx.transform(...this.matrix);\n              }\n            }\n            ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n            ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);\n            return ctx.createPattern(temporaryPatternCanvas.canvas, \"no-repeat\");\n          }\n        }\n        class DummyShadingPattern extends BaseShadingPattern {\n          getPattern() {\n            return \"hotpink\";\n          }\n        }\n        function getShadingPattern(IR) {\n          switch (IR[0]) {\n            case \"RadialAxial\":\n              return new RadialAxialShadingPattern(IR);\n            case \"Mesh\":\n              return new MeshShadingPattern(IR);\n            case \"Dummy\":\n              return new DummyShadingPattern();\n          }\n          throw new Error(`Unknown IR type: ${IR[0]}`);\n        }\n        const PaintType = {\n          COLORED: 1,\n          UNCOLORED: 2\n        };\n        class TilingPattern {\n          static MAX_PATTERN_SIZE = 3000;\n          constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n            this.operatorList = IR[2];\n            this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];\n            this.bbox = IR[4];\n            this.xstep = IR[5];\n            this.ystep = IR[6];\n            this.paintType = IR[7];\n            this.tilingType = IR[8];\n            this.color = color;\n            this.ctx = ctx;\n            this.canvasGraphicsFactory = canvasGraphicsFactory;\n            this.baseTransform = baseTransform;\n          }\n          createPatternCanvas(owner) {\n            const operatorList = this.operatorList;\n            const bbox = this.bbox;\n            const xstep = this.xstep;\n            const ystep = this.ystep;\n            const paintType = this.paintType;\n            const tilingType = this.tilingType;\n            const color = this.color;\n            const canvasGraphicsFactory = this.canvasGraphicsFactory;\n            (0, _util.info)(\"TilingType: \" + tilingType);\n            const x0 = bbox[0],\n              y0 = bbox[1],\n              x1 = bbox[2],\n              y1 = bbox[3];\n            const matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);\n            const curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform);\n            const combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]];\n            const dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]);\n            const dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]);\n            const tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", dimx.size, dimy.size, true);\n            const tmpCtx = tmpCanvas.context;\n            const graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n            graphics.groupLevel = owner.groupLevel;\n            this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n            let adjustedX0 = x0;\n            let adjustedY0 = y0;\n            let adjustedX1 = x1;\n            let adjustedY1 = y1;\n            if (x0 < 0) {\n              adjustedX0 = 0;\n              adjustedX1 += Math.abs(x0);\n            }\n            if (y0 < 0) {\n              adjustedY0 = 0;\n              adjustedY1 += Math.abs(y0);\n            }\n            tmpCtx.translate(-(dimx.scale * adjustedX0), -(dimy.scale * adjustedY0));\n            graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);\n            tmpCtx.save();\n            this.clipBbox(graphics, adjustedX0, adjustedY0, adjustedX1, adjustedY1);\n            graphics.baseTransform = (0, _display_utils.getCurrentTransform)(graphics.ctx);\n            graphics.executeOperatorList(operatorList);\n            graphics.endDrawing();\n            return {\n              canvas: tmpCanvas.canvas,\n              scaleX: dimx.scale,\n              scaleY: dimy.scale,\n              offsetX: adjustedX0,\n              offsetY: adjustedY0\n            };\n          }\n          getSizeAndScale(step, realOutputSize, scale) {\n            step = Math.abs(step);\n            const maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize);\n            let size = Math.ceil(step * scale);\n            if (size >= maxSize) {\n              size = maxSize;\n            } else {\n              scale = size / step;\n            }\n            return {\n              scale,\n              size\n            };\n          }\n          clipBbox(graphics, x0, y0, x1, y1) {\n            const bboxWidth = x1 - x0;\n            const bboxHeight = y1 - y0;\n            graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n            graphics.current.updateRectMinMax((0, _display_utils.getCurrentTransform)(graphics.ctx), [x0, y0, x1, y1]);\n            graphics.clip();\n            graphics.endPath();\n          }\n          setFillAndStrokeStyleToContext(graphics, paintType, color) {\n            const context = graphics.ctx,\n              current = graphics.current;\n            switch (paintType) {\n              case PaintType.COLORED:\n                const ctx = this.ctx;\n                context.fillStyle = ctx.fillStyle;\n                context.strokeStyle = ctx.strokeStyle;\n                current.fillColor = ctx.fillStyle;\n                current.strokeColor = ctx.strokeStyle;\n                break;\n              case PaintType.UNCOLORED:\n                const cssColor = _util.Util.makeHexColor(color[0], color[1], color[2]);\n                context.fillStyle = cssColor;\n                context.strokeStyle = cssColor;\n                current.fillColor = cssColor;\n                current.strokeColor = cssColor;\n                break;\n              default:\n                throw new _util.FormatError(`Unsupported paint type: ${paintType}`);\n            }\n          }\n          getPattern(ctx, owner, inverse, pathType) {\n            let matrix = inverse;\n            if (pathType !== PathType.SHADING) {\n              matrix = _util.Util.transform(matrix, owner.baseTransform);\n              if (this.matrix) {\n                matrix = _util.Util.transform(matrix, this.matrix);\n              }\n            }\n            const temporaryPatternCanvas = this.createPatternCanvas(owner);\n            let domMatrix = new DOMMatrix(matrix);\n            domMatrix = domMatrix.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n            domMatrix = domMatrix.scale(1 / temporaryPatternCanvas.scaleX, 1 / temporaryPatternCanvas.scaleY);\n            const pattern = ctx.createPattern(temporaryPatternCanvas.canvas, \"repeat\");\n            pattern.setTransform(domMatrix);\n            return pattern;\n          }\n        }\n        exports.TilingPattern = TilingPattern;\n\n        /***/\n      }, /* 13 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.convertBlackAndWhiteToRGBA = convertBlackAndWhiteToRGBA;\n        exports.convertToRGBA = convertToRGBA;\n        exports.grayToRGBA = grayToRGBA;\n        var _util = __w_pdfjs_require__(1);\n        function convertToRGBA(params) {\n          switch (params.kind) {\n            case _util.ImageKind.GRAYSCALE_1BPP:\n              return convertBlackAndWhiteToRGBA(params);\n            case _util.ImageKind.RGB_24BPP:\n              return convertRGBToRGBA(params);\n          }\n          return null;\n        }\n        function convertBlackAndWhiteToRGBA({\n          src,\n          srcPos = 0,\n          dest,\n          width,\n          height,\n          nonBlackColor = 0xffffffff,\n          inverseDecode = false\n        }) {\n          const black = _util.FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n          const [zeroMapping, oneMapping] = inverseDecode ? [nonBlackColor, black] : [black, nonBlackColor];\n          const widthInSource = width >> 3;\n          const widthRemainder = width & 7;\n          const srcLength = src.length;\n          dest = new Uint32Array(dest.buffer);\n          let destPos = 0;\n          for (let i = 0; i < height; i++) {\n            for (const max = srcPos + widthInSource; srcPos < max; srcPos++) {\n              const elem = srcPos < srcLength ? src[srcPos] : 255;\n              dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping;\n              dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping;\n            }\n            if (widthRemainder === 0) {\n              continue;\n            }\n            const elem = srcPos < srcLength ? src[srcPos++] : 255;\n            for (let j = 0; j < widthRemainder; j++) {\n              dest[destPos++] = elem & 1 << 7 - j ? oneMapping : zeroMapping;\n            }\n          }\n          return {\n            srcPos,\n            destPos\n          };\n        }\n        function convertRGBToRGBA({\n          src,\n          srcPos = 0,\n          dest,\n          destPos = 0,\n          width,\n          height\n        }) {\n          let i = 0;\n          const len32 = src.length >> 2;\n          const src32 = new Uint32Array(src.buffer, srcPos, len32);\n          if (_util.FeatureTest.isLittleEndian) {\n            for (; i < len32 - 2; i += 3, destPos += 4) {\n              const s1 = src32[i];\n              const s2 = src32[i + 1];\n              const s3 = src32[i + 2];\n              dest[destPos] = s1 | 0xff000000;\n              dest[destPos + 1] = s1 >>> 24 | s2 << 8 | 0xff000000;\n              dest[destPos + 2] = s2 >>> 16 | s3 << 16 | 0xff000000;\n              dest[destPos + 3] = s3 >>> 8 | 0xff000000;\n            }\n            for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n              dest[destPos++] = src[j] | src[j + 1] << 8 | src[j + 2] << 16 | 0xff000000;\n            }\n          } else {\n            for (; i < len32 - 2; i += 3, destPos += 4) {\n              const s1 = src32[i];\n              const s2 = src32[i + 1];\n              const s3 = src32[i + 2];\n              dest[destPos] = s1 | 0xff;\n              dest[destPos + 1] = s1 << 24 | s2 >>> 8 | 0xff;\n              dest[destPos + 2] = s2 << 16 | s3 >>> 16 | 0xff;\n              dest[destPos + 3] = s3 << 8 | 0xff;\n            }\n            for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n              dest[destPos++] = src[j] << 24 | src[j + 1] << 16 | src[j + 2] << 8 | 0xff;\n            }\n          }\n          return {\n            srcPos,\n            destPos\n          };\n        }\n        function grayToRGBA(src, dest) {\n          if (_util.FeatureTest.isLittleEndian) {\n            for (let i = 0, ii = src.length; i < ii; i++) {\n              dest[i] = src[i] * 0x10101 | 0xff000000;\n            }\n          } else {\n            for (let i = 0, ii = src.length; i < ii; i++) {\n              dest[i] = src[i] * 0x1010100 | 0x000000ff;\n            }\n          }\n        }\n\n        /***/\n      }, /* 14 */\n      /***/(__unused_webpack_module, exports) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.GlobalWorkerOptions = void 0;\n        const GlobalWorkerOptions = Object.create(null);\n        exports.GlobalWorkerOptions = GlobalWorkerOptions;\n        GlobalWorkerOptions.workerPort = null;\n        GlobalWorkerOptions.workerSrc = \"\";\n\n        /***/\n      }, /* 15 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.MessageHandler = void 0;\n        var _util = __w_pdfjs_require__(1);\n        const CallbackKind = {\n          UNKNOWN: 0,\n          DATA: 1,\n          ERROR: 2\n        };\n        const StreamKind = {\n          UNKNOWN: 0,\n          CANCEL: 1,\n          CANCEL_COMPLETE: 2,\n          CLOSE: 3,\n          ENQUEUE: 4,\n          ERROR: 5,\n          PULL: 6,\n          PULL_COMPLETE: 7,\n          START_COMPLETE: 8\n        };\n        function wrapReason(reason) {\n          if (!(reason instanceof Error || typeof reason === \"object\" && reason !== null)) {\n            (0, _util.unreachable)('wrapReason: Expected \"reason\" to be a (possibly cloned) Error.');\n          }\n          switch (reason.name) {\n            case \"AbortException\":\n              return new _util.AbortException(reason.message);\n            case \"MissingPDFException\":\n              return new _util.MissingPDFException(reason.message);\n            case \"PasswordException\":\n              return new _util.PasswordException(reason.message, reason.code);\n            case \"UnexpectedResponseException\":\n              return new _util.UnexpectedResponseException(reason.message, reason.status);\n            case \"UnknownErrorException\":\n              return new _util.UnknownErrorException(reason.message, reason.details);\n            default:\n              return new _util.UnknownErrorException(reason.message, reason.toString());\n          }\n        }\n        class MessageHandler {\n          constructor(sourceName, targetName, comObj) {\n            this.sourceName = sourceName;\n            this.targetName = targetName;\n            this.comObj = comObj;\n            this.callbackId = 1;\n            this.streamId = 1;\n            this.streamSinks = Object.create(null);\n            this.streamControllers = Object.create(null);\n            this.callbackCapabilities = Object.create(null);\n            this.actionHandler = Object.create(null);\n            this._onComObjOnMessage = event => {\n              const data = event.data;\n              if (data.targetName !== this.sourceName) {\n                return;\n              }\n              if (data.stream) {\n                this.#processStreamMessage(data);\n                return;\n              }\n              if (data.callback) {\n                const callbackId = data.callbackId;\n                const capability = this.callbackCapabilities[callbackId];\n                if (!capability) {\n                  throw new Error(`Cannot resolve callback ${callbackId}`);\n                }\n                delete this.callbackCapabilities[callbackId];\n                if (data.callback === CallbackKind.DATA) {\n                  capability.resolve(data.data);\n                } else if (data.callback === CallbackKind.ERROR) {\n                  capability.reject(wrapReason(data.reason));\n                } else {\n                  throw new Error(\"Unexpected callback case\");\n                }\n                return;\n              }\n              const action = this.actionHandler[data.action];\n              if (!action) {\n                throw new Error(`Unknown action from worker: ${data.action}`);\n              }\n              if (data.callbackId) {\n                const cbSourceName = this.sourceName;\n                const cbTargetName = data.sourceName;\n                new Promise(function (resolve) {\n                  resolve(action(data.data));\n                }).then(function (result) {\n                  comObj.postMessage({\n                    sourceName: cbSourceName,\n                    targetName: cbTargetName,\n                    callback: CallbackKind.DATA,\n                    callbackId: data.callbackId,\n                    data: result\n                  });\n                }, function (reason) {\n                  comObj.postMessage({\n                    sourceName: cbSourceName,\n                    targetName: cbTargetName,\n                    callback: CallbackKind.ERROR,\n                    callbackId: data.callbackId,\n                    reason: wrapReason(reason)\n                  });\n                });\n                return;\n              }\n              if (data.streamId) {\n                this.#createStreamSink(data);\n                return;\n              }\n              action(data.data);\n            };\n            comObj.addEventListener(\"message\", this._onComObjOnMessage);\n          }\n          on(actionName, handler) {\n            const ah = this.actionHandler;\n            if (ah[actionName]) {\n              throw new Error(`There is already an actionName called \"${actionName}\"`);\n            }\n            ah[actionName] = handler;\n          }\n          send(actionName, data, transfers) {\n            this.comObj.postMessage({\n              sourceName: this.sourceName,\n              targetName: this.targetName,\n              action: actionName,\n              data\n            }, transfers);\n          }\n          sendWithPromise(actionName, data, transfers) {\n            const callbackId = this.callbackId++;\n            const capability = new _util.PromiseCapability();\n            this.callbackCapabilities[callbackId] = capability;\n            try {\n              this.comObj.postMessage({\n                sourceName: this.sourceName,\n                targetName: this.targetName,\n                action: actionName,\n                callbackId,\n                data\n              }, transfers);\n            } catch (ex) {\n              capability.reject(ex);\n            }\n            return capability.promise;\n          }\n          sendWithStream(actionName, data, queueingStrategy, transfers) {\n            const streamId = this.streamId++,\n              sourceName = this.sourceName,\n              targetName = this.targetName,\n              comObj = this.comObj;\n            return new ReadableStream({\n              start: controller => {\n                const startCapability = new _util.PromiseCapability();\n                this.streamControllers[streamId] = {\n                  controller,\n                  startCall: startCapability,\n                  pullCall: null,\n                  cancelCall: null,\n                  isClosed: false\n                };\n                comObj.postMessage({\n                  sourceName,\n                  targetName,\n                  action: actionName,\n                  streamId,\n                  data,\n                  desiredSize: controller.desiredSize\n                }, transfers);\n                return startCapability.promise;\n              },\n              pull: controller => {\n                const pullCapability = new _util.PromiseCapability();\n                this.streamControllers[streamId].pullCall = pullCapability;\n                comObj.postMessage({\n                  sourceName,\n                  targetName,\n                  stream: StreamKind.PULL,\n                  streamId,\n                  desiredSize: controller.desiredSize\n                });\n                return pullCapability.promise;\n              },\n              cancel: reason => {\n                (0, _util.assert)(reason instanceof Error, \"cancel must have a valid reason\");\n                const cancelCapability = new _util.PromiseCapability();\n                this.streamControllers[streamId].cancelCall = cancelCapability;\n                this.streamControllers[streamId].isClosed = true;\n                comObj.postMessage({\n                  sourceName,\n                  targetName,\n                  stream: StreamKind.CANCEL,\n                  streamId,\n                  reason: wrapReason(reason)\n                });\n                return cancelCapability.promise;\n              }\n            }, queueingStrategy);\n          }\n          #createStreamSink(data) {\n            const streamId = data.streamId,\n              sourceName = this.sourceName,\n              targetName = data.sourceName,\n              comObj = this.comObj;\n            const self = this,\n              action = this.actionHandler[data.action];\n            const streamSink = {\n              enqueue(chunk, size = 1, transfers) {\n                if (this.isCancelled) {\n                  return;\n                }\n                const lastDesiredSize = this.desiredSize;\n                this.desiredSize -= size;\n                if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n                  this.sinkCapability = new _util.PromiseCapability();\n                  this.ready = this.sinkCapability.promise;\n                }\n                comObj.postMessage({\n                  sourceName,\n                  targetName,\n                  stream: StreamKind.ENQUEUE,\n                  streamId,\n                  chunk\n                }, transfers);\n              },\n              close() {\n                if (this.isCancelled) {\n                  return;\n                }\n                this.isCancelled = true;\n                comObj.postMessage({\n                  sourceName,\n                  targetName,\n                  stream: StreamKind.CLOSE,\n                  streamId\n                });\n                delete self.streamSinks[streamId];\n              },\n              error(reason) {\n                (0, _util.assert)(reason instanceof Error, \"error must have a valid reason\");\n                if (this.isCancelled) {\n                  return;\n                }\n                this.isCancelled = true;\n                comObj.postMessage({\n                  sourceName,\n                  targetName,\n                  stream: StreamKind.ERROR,\n                  streamId,\n                  reason: wrapReason(reason)\n                });\n              },\n              sinkCapability: new _util.PromiseCapability(),\n              onPull: null,\n              onCancel: null,\n              isCancelled: false,\n              desiredSize: data.desiredSize,\n              ready: null\n            };\n            streamSink.sinkCapability.resolve();\n            streamSink.ready = streamSink.sinkCapability.promise;\n            this.streamSinks[streamId] = streamSink;\n            new Promise(function (resolve) {\n              resolve(action(data.data, streamSink));\n            }).then(function () {\n              comObj.postMessage({\n                sourceName,\n                targetName,\n                stream: StreamKind.START_COMPLETE,\n                streamId,\n                success: true\n              });\n            }, function (reason) {\n              comObj.postMessage({\n                sourceName,\n                targetName,\n                stream: StreamKind.START_COMPLETE,\n                streamId,\n                reason: wrapReason(reason)\n              });\n            });\n          }\n          #processStreamMessage(data) {\n            const streamId = data.streamId,\n              sourceName = this.sourceName,\n              targetName = data.sourceName,\n              comObj = this.comObj;\n            const streamController = this.streamControllers[streamId],\n              streamSink = this.streamSinks[streamId];\n            switch (data.stream) {\n              case StreamKind.START_COMPLETE:\n                if (data.success) {\n                  streamController.startCall.resolve();\n                } else {\n                  streamController.startCall.reject(wrapReason(data.reason));\n                }\n                break;\n              case StreamKind.PULL_COMPLETE:\n                if (data.success) {\n                  streamController.pullCall.resolve();\n                } else {\n                  streamController.pullCall.reject(wrapReason(data.reason));\n                }\n                break;\n              case StreamKind.PULL:\n                if (!streamSink) {\n                  comObj.postMessage({\n                    sourceName,\n                    targetName,\n                    stream: StreamKind.PULL_COMPLETE,\n                    streamId,\n                    success: true\n                  });\n                  break;\n                }\n                if (streamSink.desiredSize <= 0 && data.desiredSize > 0) {\n                  streamSink.sinkCapability.resolve();\n                }\n                streamSink.desiredSize = data.desiredSize;\n                new Promise(function (resolve) {\n                  resolve(streamSink.onPull?.());\n                }).then(function () {\n                  comObj.postMessage({\n                    sourceName,\n                    targetName,\n                    stream: StreamKind.PULL_COMPLETE,\n                    streamId,\n                    success: true\n                  });\n                }, function (reason) {\n                  comObj.postMessage({\n                    sourceName,\n                    targetName,\n                    stream: StreamKind.PULL_COMPLETE,\n                    streamId,\n                    reason: wrapReason(reason)\n                  });\n                });\n                break;\n              case StreamKind.ENQUEUE:\n                (0, _util.assert)(streamController, \"enqueue should have stream controller\");\n                if (streamController.isClosed) {\n                  break;\n                }\n                streamController.controller.enqueue(data.chunk);\n                break;\n              case StreamKind.CLOSE:\n                (0, _util.assert)(streamController, \"close should have stream controller\");\n                if (streamController.isClosed) {\n                  break;\n                }\n                streamController.isClosed = true;\n                streamController.controller.close();\n                this.#deleteStreamController(streamController, streamId);\n                break;\n              case StreamKind.ERROR:\n                (0, _util.assert)(streamController, \"error should have stream controller\");\n                streamController.controller.error(wrapReason(data.reason));\n                this.#deleteStreamController(streamController, streamId);\n                break;\n              case StreamKind.CANCEL_COMPLETE:\n                if (data.success) {\n                  streamController.cancelCall.resolve();\n                } else {\n                  streamController.cancelCall.reject(wrapReason(data.reason));\n                }\n                this.#deleteStreamController(streamController, streamId);\n                break;\n              case StreamKind.CANCEL:\n                if (!streamSink) {\n                  break;\n                }\n                new Promise(function (resolve) {\n                  resolve(streamSink.onCancel?.(wrapReason(data.reason)));\n                }).then(function () {\n                  comObj.postMessage({\n                    sourceName,\n                    targetName,\n                    stream: StreamKind.CANCEL_COMPLETE,\n                    streamId,\n                    success: true\n                  });\n                }, function (reason) {\n                  comObj.postMessage({\n                    sourceName,\n                    targetName,\n                    stream: StreamKind.CANCEL_COMPLETE,\n                    streamId,\n                    reason: wrapReason(reason)\n                  });\n                });\n                streamSink.sinkCapability.reject(wrapReason(data.reason));\n                streamSink.isCancelled = true;\n                delete this.streamSinks[streamId];\n                break;\n              default:\n                throw new Error(\"Unexpected stream case\");\n            }\n          }\n          async #deleteStreamController(streamController, streamId) {\n            await Promise.allSettled([streamController.startCall?.promise, streamController.pullCall?.promise, streamController.cancelCall?.promise]);\n            delete this.streamControllers[streamId];\n          }\n          destroy() {\n            this.comObj.removeEventListener(\"message\", this._onComObjOnMessage);\n          }\n        }\n        exports.MessageHandler = MessageHandler;\n\n        /***/\n      }, /* 16 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.Metadata = void 0;\n        var _util = __w_pdfjs_require__(1);\n        class Metadata {\n          #metadataMap;\n          #data;\n          constructor({\n            parsedData,\n            rawData\n          }) {\n            this.#metadataMap = parsedData;\n            this.#data = rawData;\n          }\n          getRaw() {\n            return this.#data;\n          }\n          get(name) {\n            return this.#metadataMap.get(name) ?? null;\n          }\n          getAll() {\n            return (0, _util.objectFromMap)(this.#metadataMap);\n          }\n          has(name) {\n            return this.#metadataMap.has(name);\n          }\n        }\n        exports.Metadata = Metadata;\n\n        /***/\n      }, /* 17 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.OptionalContentConfig = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _murmurhash = __w_pdfjs_require__(8);\n        const INTERNAL = Symbol(\"INTERNAL\");\n        class OptionalContentGroup {\n          #visible = true;\n          constructor(name, intent) {\n            this.name = name;\n            this.intent = intent;\n          }\n          get visible() {\n            return this.#visible;\n          }\n          _setVisible(internal, visible) {\n            if (internal !== INTERNAL) {\n              (0, _util.unreachable)(\"Internal method `_setVisible` called.\");\n            }\n            this.#visible = visible;\n          }\n        }\n        class OptionalContentConfig {\n          #cachedGetHash = null;\n          #groups = new Map();\n          #initialHash = null;\n          #order = null;\n          constructor(data) {\n            this.name = null;\n            this.creator = null;\n            if (data === null) {\n              return;\n            }\n            this.name = data.name;\n            this.creator = data.creator;\n            this.#order = data.order;\n            for (const group of data.groups) {\n              this.#groups.set(group.id, new OptionalContentGroup(group.name, group.intent));\n            }\n            if (data.baseState === \"OFF\") {\n              for (const group of this.#groups.values()) {\n                group._setVisible(INTERNAL, false);\n              }\n            }\n            for (const on of data.on) {\n              this.#groups.get(on)._setVisible(INTERNAL, true);\n            }\n            for (const off of data.off) {\n              this.#groups.get(off)._setVisible(INTERNAL, false);\n            }\n            this.#initialHash = this.getHash();\n          }\n          #evaluateVisibilityExpression(array) {\n            const length = array.length;\n            if (length < 2) {\n              return true;\n            }\n            const operator = array[0];\n            for (let i = 1; i < length; i++) {\n              const element = array[i];\n              let state;\n              if (Array.isArray(element)) {\n                state = this.#evaluateVisibilityExpression(element);\n              } else if (this.#groups.has(element)) {\n                state = this.#groups.get(element).visible;\n              } else {\n                (0, _util.warn)(`Optional content group not found: ${element}`);\n                return true;\n              }\n              switch (operator) {\n                case \"And\":\n                  if (!state) {\n                    return false;\n                  }\n                  break;\n                case \"Or\":\n                  if (state) {\n                    return true;\n                  }\n                  break;\n                case \"Not\":\n                  return !state;\n                default:\n                  return true;\n              }\n            }\n            return operator === \"And\";\n          }\n          isVisible(group) {\n            if (this.#groups.size === 0) {\n              return true;\n            }\n            if (!group) {\n              (0, _util.warn)(\"Optional content group not defined.\");\n              return true;\n            }\n            if (group.type === \"OCG\") {\n              if (!this.#groups.has(group.id)) {\n                (0, _util.warn)(`Optional content group not found: ${group.id}`);\n                return true;\n              }\n              return this.#groups.get(group.id).visible;\n            } else if (group.type === \"OCMD\") {\n              if (group.expression) {\n                return this.#evaluateVisibilityExpression(group.expression);\n              }\n              if (!group.policy || group.policy === \"AnyOn\") {\n                for (const id of group.ids) {\n                  if (!this.#groups.has(id)) {\n                    (0, _util.warn)(`Optional content group not found: ${id}`);\n                    return true;\n                  }\n                  if (this.#groups.get(id).visible) {\n                    return true;\n                  }\n                }\n                return false;\n              } else if (group.policy === \"AllOn\") {\n                for (const id of group.ids) {\n                  if (!this.#groups.has(id)) {\n                    (0, _util.warn)(`Optional content group not found: ${id}`);\n                    return true;\n                  }\n                  if (!this.#groups.get(id).visible) {\n                    return false;\n                  }\n                }\n                return true;\n              } else if (group.policy === \"AnyOff\") {\n                for (const id of group.ids) {\n                  if (!this.#groups.has(id)) {\n                    (0, _util.warn)(`Optional content group not found: ${id}`);\n                    return true;\n                  }\n                  if (!this.#groups.get(id).visible) {\n                    return true;\n                  }\n                }\n                return false;\n              } else if (group.policy === \"AllOff\") {\n                for (const id of group.ids) {\n                  if (!this.#groups.has(id)) {\n                    (0, _util.warn)(`Optional content group not found: ${id}`);\n                    return true;\n                  }\n                  if (this.#groups.get(id).visible) {\n                    return false;\n                  }\n                }\n                return true;\n              }\n              (0, _util.warn)(`Unknown optional content policy ${group.policy}.`);\n              return true;\n            }\n            (0, _util.warn)(`Unknown group type ${group.type}.`);\n            return true;\n          }\n          setVisibility(id, visible = true) {\n            if (!this.#groups.has(id)) {\n              (0, _util.warn)(`Optional content group not found: ${id}`);\n              return;\n            }\n            this.#groups.get(id)._setVisible(INTERNAL, !!visible);\n            this.#cachedGetHash = null;\n          }\n          get hasInitialVisibility() {\n            return this.#initialHash === null || this.getHash() === this.#initialHash;\n          }\n          getOrder() {\n            if (!this.#groups.size) {\n              return null;\n            }\n            if (this.#order) {\n              return this.#order.slice();\n            }\n            return [...this.#groups.keys()];\n          }\n          getGroups() {\n            return this.#groups.size > 0 ? (0, _util.objectFromMap)(this.#groups) : null;\n          }\n          getGroup(id) {\n            return this.#groups.get(id) || null;\n          }\n          getHash() {\n            if (this.#cachedGetHash !== null) {\n              return this.#cachedGetHash;\n            }\n            const hash = new _murmurhash.MurmurHash3_64();\n            for (const [id, group] of this.#groups) {\n              hash.update(`${id}:${group.visible}`);\n            }\n            return this.#cachedGetHash = hash.hexdigest();\n          }\n        }\n        exports.OptionalContentConfig = OptionalContentConfig;\n\n        /***/\n      }, /* 18 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.PDFDataTransportStream = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        class PDFDataTransportStream {\n          constructor({\n            length,\n            initialData,\n            progressiveDone = false,\n            contentDispositionFilename = null,\n            disableRange = false,\n            disableStream = false\n          }, pdfDataRangeTransport) {\n            (0, _util.assert)(pdfDataRangeTransport, 'PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument.');\n            this._queuedChunks = [];\n            this._progressiveDone = progressiveDone;\n            this._contentDispositionFilename = contentDispositionFilename;\n            if (initialData?.length > 0) {\n              const buffer = initialData instanceof Uint8Array && initialData.byteLength === initialData.buffer.byteLength ? initialData.buffer : new Uint8Array(initialData).buffer;\n              this._queuedChunks.push(buffer);\n            }\n            this._pdfDataRangeTransport = pdfDataRangeTransport;\n            this._isStreamingSupported = !disableStream;\n            this._isRangeSupported = !disableRange;\n            this._contentLength = length;\n            this._fullRequestReader = null;\n            this._rangeReaders = [];\n            this._pdfDataRangeTransport.addRangeListener((begin, chunk) => {\n              this._onReceiveData({\n                begin,\n                chunk\n              });\n            });\n            this._pdfDataRangeTransport.addProgressListener((loaded, total) => {\n              this._onProgress({\n                loaded,\n                total\n              });\n            });\n            this._pdfDataRangeTransport.addProgressiveReadListener(chunk => {\n              this._onReceiveData({\n                chunk\n              });\n            });\n            this._pdfDataRangeTransport.addProgressiveDoneListener(() => {\n              this._onProgressiveDone();\n            });\n            this._pdfDataRangeTransport.transportReady();\n          }\n          _onReceiveData({\n            begin,\n            chunk\n          }) {\n            const buffer = chunk instanceof Uint8Array && chunk.byteLength === chunk.buffer.byteLength ? chunk.buffer : new Uint8Array(chunk).buffer;\n            if (begin === undefined) {\n              if (this._fullRequestReader) {\n                this._fullRequestReader._enqueue(buffer);\n              } else {\n                this._queuedChunks.push(buffer);\n              }\n            } else {\n              const found = this._rangeReaders.some(function (rangeReader) {\n                if (rangeReader._begin !== begin) {\n                  return false;\n                }\n                rangeReader._enqueue(buffer);\n                return true;\n              });\n              (0, _util.assert)(found, \"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.\");\n            }\n          }\n          get _progressiveDataLength() {\n            return this._fullRequestReader?._loaded ?? 0;\n          }\n          _onProgress(evt) {\n            if (evt.total === undefined) {\n              this._rangeReaders[0]?.onProgress?.({\n                loaded: evt.loaded\n              });\n            } else {\n              this._fullRequestReader?.onProgress?.({\n                loaded: evt.loaded,\n                total: evt.total\n              });\n            }\n          }\n          _onProgressiveDone() {\n            this._fullRequestReader?.progressiveDone();\n            this._progressiveDone = true;\n          }\n          _removeRangeReader(reader) {\n            const i = this._rangeReaders.indexOf(reader);\n            if (i >= 0) {\n              this._rangeReaders.splice(i, 1);\n            }\n          }\n          getFullReader() {\n            (0, _util.assert)(!this._fullRequestReader, \"PDFDataTransportStream.getFullReader can only be called once.\");\n            const queuedChunks = this._queuedChunks;\n            this._queuedChunks = null;\n            return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone, this._contentDispositionFilename);\n          }\n          getRangeReader(begin, end) {\n            if (end <= this._progressiveDataLength) {\n              return null;\n            }\n            const reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n            this._pdfDataRangeTransport.requestDataRange(begin, end);\n            this._rangeReaders.push(reader);\n            return reader;\n          }\n          cancelAllRequests(reason) {\n            this._fullRequestReader?.cancel(reason);\n            for (const reader of this._rangeReaders.slice(0)) {\n              reader.cancel(reason);\n            }\n            this._pdfDataRangeTransport.abort();\n          }\n        }\n        exports.PDFDataTransportStream = PDFDataTransportStream;\n        class PDFDataTransportStreamReader {\n          constructor(stream, queuedChunks, progressiveDone = false, contentDispositionFilename = null) {\n            this._stream = stream;\n            this._done = progressiveDone || false;\n            this._filename = (0, _display_utils.isPdfFile)(contentDispositionFilename) ? contentDispositionFilename : null;\n            this._queuedChunks = queuedChunks || [];\n            this._loaded = 0;\n            for (const chunk of this._queuedChunks) {\n              this._loaded += chunk.byteLength;\n            }\n            this._requests = [];\n            this._headersReady = Promise.resolve();\n            stream._fullRequestReader = this;\n            this.onProgress = null;\n          }\n          _enqueue(chunk) {\n            if (this._done) {\n              return;\n            }\n            if (this._requests.length > 0) {\n              const requestCapability = this._requests.shift();\n              requestCapability.resolve({\n                value: chunk,\n                done: false\n              });\n            } else {\n              this._queuedChunks.push(chunk);\n            }\n            this._loaded += chunk.byteLength;\n          }\n          get headersReady() {\n            return this._headersReady;\n          }\n          get filename() {\n            return this._filename;\n          }\n          get isRangeSupported() {\n            return this._stream._isRangeSupported;\n          }\n          get isStreamingSupported() {\n            return this._stream._isStreamingSupported;\n          }\n          get contentLength() {\n            return this._stream._contentLength;\n          }\n          async read() {\n            if (this._queuedChunks.length > 0) {\n              const chunk = this._queuedChunks.shift();\n              return {\n                value: chunk,\n                done: false\n              };\n            }\n            if (this._done) {\n              return {\n                value: undefined,\n                done: true\n              };\n            }\n            const requestCapability = new _util.PromiseCapability();\n            this._requests.push(requestCapability);\n            return requestCapability.promise;\n          }\n          cancel(reason) {\n            this._done = true;\n            for (const requestCapability of this._requests) {\n              requestCapability.resolve({\n                value: undefined,\n                done: true\n              });\n            }\n            this._requests.length = 0;\n          }\n          progressiveDone() {\n            if (this._done) {\n              return;\n            }\n            this._done = true;\n          }\n        }\n        class PDFDataTransportStreamRangeReader {\n          constructor(stream, begin, end) {\n            this._stream = stream;\n            this._begin = begin;\n            this._end = end;\n            this._queuedChunk = null;\n            this._requests = [];\n            this._done = false;\n            this.onProgress = null;\n          }\n          _enqueue(chunk) {\n            if (this._done) {\n              return;\n            }\n            if (this._requests.length === 0) {\n              this._queuedChunk = chunk;\n            } else {\n              const requestsCapability = this._requests.shift();\n              requestsCapability.resolve({\n                value: chunk,\n                done: false\n              });\n              for (const requestCapability of this._requests) {\n                requestCapability.resolve({\n                  value: undefined,\n                  done: true\n                });\n              }\n              this._requests.length = 0;\n            }\n            this._done = true;\n            this._stream._removeRangeReader(this);\n          }\n          get isStreamingSupported() {\n            return false;\n          }\n          async read() {\n            if (this._queuedChunk) {\n              const chunk = this._queuedChunk;\n              this._queuedChunk = null;\n              return {\n                value: chunk,\n                done: false\n              };\n            }\n            if (this._done) {\n              return {\n                value: undefined,\n                done: true\n              };\n            }\n            const requestCapability = new _util.PromiseCapability();\n            this._requests.push(requestCapability);\n            return requestCapability.promise;\n          }\n          cancel(reason) {\n            this._done = true;\n            for (const requestCapability of this._requests) {\n              requestCapability.resolve({\n                value: undefined,\n                done: true\n              });\n            }\n            this._requests.length = 0;\n            this._stream._removeRangeReader(this);\n          }\n        }\n\n        /***/\n      }, /* 19 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.PDFFetchStream = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _network_utils = __w_pdfjs_require__(20);\n        ;\n        function createFetchOptions(headers, withCredentials, abortController) {\n          return {\n            method: \"GET\",\n            headers,\n            signal: abortController.signal,\n            mode: \"cors\",\n            credentials: withCredentials ? \"include\" : \"same-origin\",\n            redirect: \"follow\"\n          };\n        }\n        function createHeaders(httpHeaders) {\n          const headers = new Headers();\n          for (const property in httpHeaders) {\n            const value = httpHeaders[property];\n            if (value === undefined) {\n              continue;\n            }\n            headers.append(property, value);\n          }\n          return headers;\n        }\n        function getArrayBuffer(val) {\n          if (val instanceof Uint8Array) {\n            return val.buffer;\n          }\n          if (val instanceof ArrayBuffer) {\n            return val;\n          }\n          (0, _util.warn)(`getArrayBuffer - unexpected data format: ${val}`);\n          return new Uint8Array(val).buffer;\n        }\n        class PDFFetchStream {\n          constructor(source) {\n            this.source = source;\n            this.isHttp = /^https?:/i.test(source.url);\n            this.httpHeaders = this.isHttp && source.httpHeaders || {};\n            this._fullRequestReader = null;\n            this._rangeRequestReaders = [];\n          }\n          get _progressiveDataLength() {\n            return this._fullRequestReader?._loaded ?? 0;\n          }\n          getFullReader() {\n            (0, _util.assert)(!this._fullRequestReader, \"PDFFetchStream.getFullReader can only be called once.\");\n            this._fullRequestReader = new PDFFetchStreamReader(this);\n            return this._fullRequestReader;\n          }\n          getRangeReader(begin, end) {\n            if (end <= this._progressiveDataLength) {\n              return null;\n            }\n            const reader = new PDFFetchStreamRangeReader(this, begin, end);\n            this._rangeRequestReaders.push(reader);\n            return reader;\n          }\n          cancelAllRequests(reason) {\n            this._fullRequestReader?.cancel(reason);\n            for (const reader of this._rangeRequestReaders.slice(0)) {\n              reader.cancel(reason);\n            }\n          }\n        }\n        exports.PDFFetchStream = PDFFetchStream;\n        class PDFFetchStreamReader {\n          constructor(stream) {\n            this._stream = stream;\n            this._reader = null;\n            this._loaded = 0;\n            this._filename = null;\n            const source = stream.source;\n            this._withCredentials = source.withCredentials || false;\n            this._contentLength = source.length;\n            this._headersCapability = new _util.PromiseCapability();\n            this._disableRange = source.disableRange || false;\n            this._rangeChunkSize = source.rangeChunkSize;\n            if (!this._rangeChunkSize && !this._disableRange) {\n              this._disableRange = true;\n            }\n            this._abortController = new AbortController();\n            this._isStreamingSupported = !source.disableStream;\n            this._isRangeSupported = !source.disableRange;\n            this._headers = createHeaders(this._stream.httpHeaders);\n            const url = source.url;\n            fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(response => {\n              if (!(0, _network_utils.validateResponseStatus)(response.status)) {\n                throw (0, _network_utils.createResponseStatusError)(response.status, url);\n              }\n              this._reader = response.body.getReader();\n              this._headersCapability.resolve();\n              const getResponseHeader = name => {\n                return response.headers.get(name);\n              };\n              const {\n                allowRangeRequests,\n                suggestedLength\n              } = (0, _network_utils.validateRangeRequestCapabilities)({\n                getResponseHeader,\n                isHttp: this._stream.isHttp,\n                rangeChunkSize: this._rangeChunkSize,\n                disableRange: this._disableRange\n              });\n              this._isRangeSupported = allowRangeRequests;\n              this._contentLength = suggestedLength || this._contentLength;\n              this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n              if (!this._isStreamingSupported && this._isRangeSupported) {\n                this.cancel(new _util.AbortException(\"Streaming is disabled.\"));\n              }\n            }).catch(this._headersCapability.reject);\n            this.onProgress = null;\n          }\n          get headersReady() {\n            return this._headersCapability.promise;\n          }\n          get filename() {\n            return this._filename;\n          }\n          get contentLength() {\n            return this._contentLength;\n          }\n          get isRangeSupported() {\n            return this._isRangeSupported;\n          }\n          get isStreamingSupported() {\n            return this._isStreamingSupported;\n          }\n          async read() {\n            await this._headersCapability.promise;\n            const {\n              value,\n              done\n            } = await this._reader.read();\n            if (done) {\n              return {\n                value,\n                done\n              };\n            }\n            this._loaded += value.byteLength;\n            this.onProgress?.({\n              loaded: this._loaded,\n              total: this._contentLength\n            });\n            return {\n              value: getArrayBuffer(value),\n              done: false\n            };\n          }\n          cancel(reason) {\n            this._reader?.cancel(reason);\n            this._abortController.abort();\n          }\n        }\n        class PDFFetchStreamRangeReader {\n          constructor(stream, begin, end) {\n            this._stream = stream;\n            this._reader = null;\n            this._loaded = 0;\n            const source = stream.source;\n            this._withCredentials = source.withCredentials || false;\n            this._readCapability = new _util.PromiseCapability();\n            this._isStreamingSupported = !source.disableStream;\n            this._abortController = new AbortController();\n            this._headers = createHeaders(this._stream.httpHeaders);\n            this._headers.append(\"Range\", `bytes=${begin}-${end - 1}`);\n            const url = source.url;\n            fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(response => {\n              if (!(0, _network_utils.validateResponseStatus)(response.status)) {\n                throw (0, _network_utils.createResponseStatusError)(response.status, url);\n              }\n              this._readCapability.resolve();\n              this._reader = response.body.getReader();\n            }).catch(this._readCapability.reject);\n            this.onProgress = null;\n          }\n          get isStreamingSupported() {\n            return this._isStreamingSupported;\n          }\n          async read() {\n            await this._readCapability.promise;\n            const {\n              value,\n              done\n            } = await this._reader.read();\n            if (done) {\n              return {\n                value,\n                done\n              };\n            }\n            this._loaded += value.byteLength;\n            this.onProgress?.({\n              loaded: this._loaded\n            });\n            return {\n              value: getArrayBuffer(value),\n              done: false\n            };\n          }\n          cancel(reason) {\n            this._reader?.cancel(reason);\n            this._abortController.abort();\n          }\n        }\n\n        /***/\n      }, /* 20 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.createResponseStatusError = createResponseStatusError;\n        exports.extractFilenameFromHeader = extractFilenameFromHeader;\n        exports.validateRangeRequestCapabilities = validateRangeRequestCapabilities;\n        exports.validateResponseStatus = validateResponseStatus;\n        var _util = __w_pdfjs_require__(1);\n        var _content_disposition = __w_pdfjs_require__(21);\n        var _display_utils = __w_pdfjs_require__(6);\n        function validateRangeRequestCapabilities({\n          getResponseHeader,\n          isHttp,\n          rangeChunkSize,\n          disableRange\n        }) {\n          const returnValues = {\n            allowRangeRequests: false,\n            suggestedLength: undefined\n          };\n          const length = parseInt(getResponseHeader(\"Content-Length\"), 10);\n          if (!Number.isInteger(length)) {\n            return returnValues;\n          }\n          returnValues.suggestedLength = length;\n          if (length <= 2 * rangeChunkSize) {\n            return returnValues;\n          }\n          if (disableRange || !isHttp) {\n            return returnValues;\n          }\n          if (getResponseHeader(\"Accept-Ranges\") !== \"bytes\") {\n            return returnValues;\n          }\n          const contentEncoding = getResponseHeader(\"Content-Encoding\") || \"identity\";\n          if (contentEncoding !== \"identity\") {\n            return returnValues;\n          }\n          returnValues.allowRangeRequests = true;\n          return returnValues;\n        }\n        function extractFilenameFromHeader(getResponseHeader) {\n          const contentDisposition = getResponseHeader(\"Content-Disposition\");\n          if (contentDisposition) {\n            let filename = (0, _content_disposition.getFilenameFromContentDispositionHeader)(contentDisposition);\n            if (filename.includes(\"%\")) {\n              try {\n                filename = decodeURIComponent(filename);\n              } catch {}\n            }\n            if ((0, _display_utils.isPdfFile)(filename)) {\n              return filename;\n            }\n          }\n          return null;\n        }\n        function createResponseStatusError(status, url) {\n          if (status === 404 || status === 0 && url.startsWith(\"file:\")) {\n            return new _util.MissingPDFException('Missing PDF \"' + url + '\".');\n          }\n          return new _util.UnexpectedResponseException(`Unexpected server response (${status}) while retrieving PDF \"${url}\".`, status);\n        }\n        function validateResponseStatus(status) {\n          return status === 200 || status === 206;\n        }\n\n        /***/\n      }, /* 21 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.getFilenameFromContentDispositionHeader = getFilenameFromContentDispositionHeader;\n        var _util = __w_pdfjs_require__(1);\n        function getFilenameFromContentDispositionHeader(contentDisposition) {\n          let needsEncodingFixup = true;\n          let tmp = toParamRegExp(\"filename\\\\*\", \"i\").exec(contentDisposition);\n          if (tmp) {\n            tmp = tmp[1];\n            let filename = rfc2616unquote(tmp);\n            filename = unescape(filename);\n            filename = rfc5987decode(filename);\n            filename = rfc2047decode(filename);\n            return fixupEncoding(filename);\n          }\n          tmp = rfc2231getparam(contentDisposition);\n          if (tmp) {\n            const filename = rfc2047decode(tmp);\n            return fixupEncoding(filename);\n          }\n          tmp = toParamRegExp(\"filename\", \"i\").exec(contentDisposition);\n          if (tmp) {\n            tmp = tmp[1];\n            let filename = rfc2616unquote(tmp);\n            filename = rfc2047decode(filename);\n            return fixupEncoding(filename);\n          }\n          function toParamRegExp(attributePattern, flags) {\n            return new RegExp(\"(?:^|;)\\\\s*\" + attributePattern + \"\\\\s*=\\\\s*\" + \"(\" + '[^\";\\\\s][^;\\\\s]*' + \"|\" + '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' + \")\", flags);\n          }\n          function textdecode(encoding, value) {\n            if (encoding) {\n              if (!/^[\\x00-\\xFF]+$/.test(value)) {\n                return value;\n              }\n              try {\n                const decoder = new TextDecoder(encoding, {\n                  fatal: true\n                });\n                const buffer = (0, _util.stringToBytes)(value);\n                value = decoder.decode(buffer);\n                needsEncodingFixup = false;\n              } catch {}\n            }\n            return value;\n          }\n          function fixupEncoding(value) {\n            if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n              value = textdecode(\"utf-8\", value);\n              if (needsEncodingFixup) {\n                value = textdecode(\"iso-8859-1\", value);\n              }\n            }\n            return value;\n          }\n          function rfc2231getparam(contentDispositionStr) {\n            const matches = [];\n            let match;\n            const iter = toParamRegExp(\"filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)\", \"ig\");\n            while ((match = iter.exec(contentDispositionStr)) !== null) {\n              let [, n, quot, part] = match;\n              n = parseInt(n, 10);\n              if (n in matches) {\n                if (n === 0) {\n                  break;\n                }\n                continue;\n              }\n              matches[n] = [quot, part];\n            }\n            const parts = [];\n            for (let n = 0; n < matches.length; ++n) {\n              if (!(n in matches)) {\n                break;\n              }\n              let [quot, part] = matches[n];\n              part = rfc2616unquote(part);\n              if (quot) {\n                part = unescape(part);\n                if (n === 0) {\n                  part = rfc5987decode(part);\n                }\n              }\n              parts.push(part);\n            }\n            return parts.join(\"\");\n          }\n          function rfc2616unquote(value) {\n            if (value.startsWith('\"')) {\n              const parts = value.slice(1).split('\\\\\"');\n              for (let i = 0; i < parts.length; ++i) {\n                const quotindex = parts[i].indexOf('\"');\n                if (quotindex !== -1) {\n                  parts[i] = parts[i].slice(0, quotindex);\n                  parts.length = i + 1;\n                }\n                parts[i] = parts[i].replaceAll(/\\\\(.)/g, \"$1\");\n              }\n              value = parts.join('\"');\n            }\n            return value;\n          }\n          function rfc5987decode(extvalue) {\n            const encodingend = extvalue.indexOf(\"'\");\n            if (encodingend === -1) {\n              return extvalue;\n            }\n            const encoding = extvalue.slice(0, encodingend);\n            const langvalue = extvalue.slice(encodingend + 1);\n            const value = langvalue.replace(/^[^']*'/, \"\");\n            return textdecode(encoding, value);\n          }\n          function rfc2047decode(value) {\n            if (!value.startsWith(\"=?\") || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n              return value;\n            }\n            return value.replaceAll(/=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g, function (matches, charset, encoding, text) {\n              if (encoding === \"q\" || encoding === \"Q\") {\n                text = text.replaceAll(\"_\", \" \");\n                text = text.replaceAll(/=([0-9a-fA-F]{2})/g, function (match, hex) {\n                  return String.fromCharCode(parseInt(hex, 16));\n                });\n                return textdecode(charset, text);\n              }\n              try {\n                text = atob(text);\n              } catch {}\n              return textdecode(charset, text);\n            });\n          }\n          return \"\";\n        }\n\n        /***/\n      }, /* 22 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.PDFNetworkStream = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _network_utils = __w_pdfjs_require__(20);\n        ;\n        const OK_RESPONSE = 200;\n        const PARTIAL_CONTENT_RESPONSE = 206;\n        function getArrayBuffer(xhr) {\n          const data = xhr.response;\n          if (typeof data !== \"string\") {\n            return data;\n          }\n          return (0, _util.stringToBytes)(data).buffer;\n        }\n        class NetworkManager {\n          constructor(url, args = {}) {\n            this.url = url;\n            this.isHttp = /^https?:/i.test(url);\n            this.httpHeaders = this.isHttp && args.httpHeaders || Object.create(null);\n            this.withCredentials = args.withCredentials || false;\n            this.currXhrId = 0;\n            this.pendingRequests = Object.create(null);\n          }\n          requestRange(begin, end, listeners) {\n            const args = {\n              begin,\n              end\n            };\n            for (const prop in listeners) {\n              args[prop] = listeners[prop];\n            }\n            return this.request(args);\n          }\n          requestFull(listeners) {\n            return this.request(listeners);\n          }\n          request(args) {\n            const xhr = new XMLHttpRequest();\n            const xhrId = this.currXhrId++;\n            const pendingRequest = this.pendingRequests[xhrId] = {\n              xhr\n            };\n            xhr.open(\"GET\", this.url);\n            xhr.withCredentials = this.withCredentials;\n            for (const property in this.httpHeaders) {\n              const value = this.httpHeaders[property];\n              if (value === undefined) {\n                continue;\n              }\n              xhr.setRequestHeader(property, value);\n            }\n            if (this.isHttp && \"begin\" in args && \"end\" in args) {\n              xhr.setRequestHeader(\"Range\", `bytes=${args.begin}-${args.end - 1}`);\n              pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE;\n            } else {\n              pendingRequest.expectedStatus = OK_RESPONSE;\n            }\n            xhr.responseType = \"arraybuffer\";\n            if (args.onError) {\n              xhr.onerror = function (evt) {\n                args.onError(xhr.status);\n              };\n            }\n            xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n            xhr.onprogress = this.onProgress.bind(this, xhrId);\n            pendingRequest.onHeadersReceived = args.onHeadersReceived;\n            pendingRequest.onDone = args.onDone;\n            pendingRequest.onError = args.onError;\n            pendingRequest.onProgress = args.onProgress;\n            xhr.send(null);\n            return xhrId;\n          }\n          onProgress(xhrId, evt) {\n            const pendingRequest = this.pendingRequests[xhrId];\n            if (!pendingRequest) {\n              return;\n            }\n            pendingRequest.onProgress?.(evt);\n          }\n          onStateChange(xhrId, evt) {\n            const pendingRequest = this.pendingRequests[xhrId];\n            if (!pendingRequest) {\n              return;\n            }\n            const xhr = pendingRequest.xhr;\n            if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n              pendingRequest.onHeadersReceived();\n              delete pendingRequest.onHeadersReceived;\n            }\n            if (xhr.readyState !== 4) {\n              return;\n            }\n            if (!(xhrId in this.pendingRequests)) {\n              return;\n            }\n            delete this.pendingRequests[xhrId];\n            if (xhr.status === 0 && this.isHttp) {\n              pendingRequest.onError?.(xhr.status);\n              return;\n            }\n            const xhrStatus = xhr.status || OK_RESPONSE;\n            const ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n            if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) {\n              pendingRequest.onError?.(xhr.status);\n              return;\n            }\n            const chunk = getArrayBuffer(xhr);\n            if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n              const rangeHeader = xhr.getResponseHeader(\"Content-Range\");\n              const matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n              pendingRequest.onDone({\n                begin: parseInt(matches[1], 10),\n                chunk\n              });\n            } else if (chunk) {\n              pendingRequest.onDone({\n                begin: 0,\n                chunk\n              });\n            } else {\n              pendingRequest.onError?.(xhr.status);\n            }\n          }\n          getRequestXhr(xhrId) {\n            return this.pendingRequests[xhrId].xhr;\n          }\n          isPendingRequest(xhrId) {\n            return xhrId in this.pendingRequests;\n          }\n          abortRequest(xhrId) {\n            const xhr = this.pendingRequests[xhrId].xhr;\n            delete this.pendingRequests[xhrId];\n            xhr.abort();\n          }\n        }\n        class PDFNetworkStream {\n          constructor(source) {\n            this._source = source;\n            this._manager = new NetworkManager(source.url, {\n              httpHeaders: source.httpHeaders,\n              withCredentials: source.withCredentials\n            });\n            this._rangeChunkSize = source.rangeChunkSize;\n            this._fullRequestReader = null;\n            this._rangeRequestReaders = [];\n          }\n          _onRangeRequestReaderClosed(reader) {\n            const i = this._rangeRequestReaders.indexOf(reader);\n            if (i >= 0) {\n              this._rangeRequestReaders.splice(i, 1);\n            }\n          }\n          getFullReader() {\n            (0, _util.assert)(!this._fullRequestReader, \"PDFNetworkStream.getFullReader can only be called once.\");\n            this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source);\n            return this._fullRequestReader;\n          }\n          getRangeReader(begin, end) {\n            const reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end);\n            reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n            this._rangeRequestReaders.push(reader);\n            return reader;\n          }\n          cancelAllRequests(reason) {\n            this._fullRequestReader?.cancel(reason);\n            for (const reader of this._rangeRequestReaders.slice(0)) {\n              reader.cancel(reason);\n            }\n          }\n        }\n        exports.PDFNetworkStream = PDFNetworkStream;\n        class PDFNetworkStreamFullRequestReader {\n          constructor(manager, source) {\n            this._manager = manager;\n            const args = {\n              onHeadersReceived: this._onHeadersReceived.bind(this),\n              onDone: this._onDone.bind(this),\n              onError: this._onError.bind(this),\n              onProgress: this._onProgress.bind(this)\n            };\n            this._url = source.url;\n            this._fullRequestId = manager.requestFull(args);\n            this._headersReceivedCapability = new _util.PromiseCapability();\n            this._disableRange = source.disableRange || false;\n            this._contentLength = source.length;\n            this._rangeChunkSize = source.rangeChunkSize;\n            if (!this._rangeChunkSize && !this._disableRange) {\n              this._disableRange = true;\n            }\n            this._isStreamingSupported = false;\n            this._isRangeSupported = false;\n            this._cachedChunks = [];\n            this._requests = [];\n            this._done = false;\n            this._storedError = undefined;\n            this._filename = null;\n            this.onProgress = null;\n          }\n          _onHeadersReceived() {\n            const fullRequestXhrId = this._fullRequestId;\n            const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n            const getResponseHeader = name => {\n              return fullRequestXhr.getResponseHeader(name);\n            };\n            const {\n              allowRangeRequests,\n              suggestedLength\n            } = (0, _network_utils.validateRangeRequestCapabilities)({\n              getResponseHeader,\n              isHttp: this._manager.isHttp,\n              rangeChunkSize: this._rangeChunkSize,\n              disableRange: this._disableRange\n            });\n            if (allowRangeRequests) {\n              this._isRangeSupported = true;\n            }\n            this._contentLength = suggestedLength || this._contentLength;\n            this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n            if (this._isRangeSupported) {\n              this._manager.abortRequest(fullRequestXhrId);\n            }\n            this._headersReceivedCapability.resolve();\n          }\n          _onDone(data) {\n            if (data) {\n              if (this._requests.length > 0) {\n                const requestCapability = this._requests.shift();\n                requestCapability.resolve({\n                  value: data.chunk,\n                  done: false\n                });\n              } else {\n                this._cachedChunks.push(data.chunk);\n              }\n            }\n            this._done = true;\n            if (this._cachedChunks.length > 0) {\n              return;\n            }\n            for (const requestCapability of this._requests) {\n              requestCapability.resolve({\n                value: undefined,\n                done: true\n              });\n            }\n            this._requests.length = 0;\n          }\n          _onError(status) {\n            this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url);\n            this._headersReceivedCapability.reject(this._storedError);\n            for (const requestCapability of this._requests) {\n              requestCapability.reject(this._storedError);\n            }\n            this._requests.length = 0;\n            this._cachedChunks.length = 0;\n          }\n          _onProgress(evt) {\n            this.onProgress?.({\n              loaded: evt.loaded,\n              total: evt.lengthComputable ? evt.total : this._contentLength\n            });\n          }\n          get filename() {\n            return this._filename;\n          }\n          get isRangeSupported() {\n            return this._isRangeSupported;\n          }\n          get isStreamingSupported() {\n            return this._isStreamingSupported;\n          }\n          get contentLength() {\n            return this._contentLength;\n          }\n          get headersReady() {\n            return this._headersReceivedCapability.promise;\n          }\n          async read() {\n            if (this._storedError) {\n              throw this._storedError;\n            }\n            if (this._cachedChunks.length > 0) {\n              const chunk = this._cachedChunks.shift();\n              return {\n                value: chunk,\n                done: false\n              };\n            }\n            if (this._done) {\n              return {\n                value: undefined,\n                done: true\n              };\n            }\n            const requestCapability = new _util.PromiseCapability();\n            this._requests.push(requestCapability);\n            return requestCapability.promise;\n          }\n          cancel(reason) {\n            this._done = true;\n            this._headersReceivedCapability.reject(reason);\n            for (const requestCapability of this._requests) {\n              requestCapability.resolve({\n                value: undefined,\n                done: true\n              });\n            }\n            this._requests.length = 0;\n            if (this._manager.isPendingRequest(this._fullRequestId)) {\n              this._manager.abortRequest(this._fullRequestId);\n            }\n            this._fullRequestReader = null;\n          }\n        }\n        class PDFNetworkStreamRangeRequestReader {\n          constructor(manager, begin, end) {\n            this._manager = manager;\n            const args = {\n              onDone: this._onDone.bind(this),\n              onError: this._onError.bind(this),\n              onProgress: this._onProgress.bind(this)\n            };\n            this._url = manager.url;\n            this._requestId = manager.requestRange(begin, end, args);\n            this._requests = [];\n            this._queuedChunk = null;\n            this._done = false;\n            this._storedError = undefined;\n            this.onProgress = null;\n            this.onClosed = null;\n          }\n          _close() {\n            this.onClosed?.(this);\n          }\n          _onDone(data) {\n            const chunk = data.chunk;\n            if (this._requests.length > 0) {\n              const requestCapability = this._requests.shift();\n              requestCapability.resolve({\n                value: chunk,\n                done: false\n              });\n            } else {\n              this._queuedChunk = chunk;\n            }\n            this._done = true;\n            for (const requestCapability of this._requests) {\n              requestCapability.resolve({\n                value: undefined,\n                done: true\n              });\n            }\n            this._requests.length = 0;\n            this._close();\n          }\n          _onError(status) {\n            this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url);\n            for (const requestCapability of this._requests) {\n              requestCapability.reject(this._storedError);\n            }\n            this._requests.length = 0;\n            this._queuedChunk = null;\n          }\n          _onProgress(evt) {\n            if (!this.isStreamingSupported) {\n              this.onProgress?.({\n                loaded: evt.loaded\n              });\n            }\n          }\n          get isStreamingSupported() {\n            return false;\n          }\n          async read() {\n            if (this._storedError) {\n              throw this._storedError;\n            }\n            if (this._queuedChunk !== null) {\n              const chunk = this._queuedChunk;\n              this._queuedChunk = null;\n              return {\n                value: chunk,\n                done: false\n              };\n            }\n            if (this._done) {\n              return {\n                value: undefined,\n                done: true\n              };\n            }\n            const requestCapability = new _util.PromiseCapability();\n            this._requests.push(requestCapability);\n            return requestCapability.promise;\n          }\n          cancel(reason) {\n            this._done = true;\n            for (const requestCapability of this._requests) {\n              requestCapability.resolve({\n                value: undefined,\n                done: true\n              });\n            }\n            this._requests.length = 0;\n            if (this._manager.isPendingRequest(this._requestId)) {\n              this._manager.abortRequest(this._requestId);\n            }\n            this._close();\n          }\n        }\n\n        /***/\n      }, /* 23 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.PDFNodeStream = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _network_utils = __w_pdfjs_require__(20);\n        ;\n        const fileUriRegex = /^file:\\/\\/\\/[a-zA-Z]:\\//;\n        function parseUrl(sourceUrl) {\n          const url = require(\"url\");\n          const parsedUrl = url.parse(sourceUrl);\n          if (parsedUrl.protocol === \"file:\" || parsedUrl.host) {\n            return parsedUrl;\n          }\n          if (/^[a-z]:[/\\\\]/i.test(sourceUrl)) {\n            return url.parse(`file:///${sourceUrl}`);\n          }\n          if (!parsedUrl.host) {\n            parsedUrl.protocol = \"file:\";\n          }\n          return parsedUrl;\n        }\n        class PDFNodeStream {\n          constructor(source) {\n            this.source = source;\n            this.url = parseUrl(source.url);\n            this.isHttp = this.url.protocol === \"http:\" || this.url.protocol === \"https:\";\n            this.isFsUrl = this.url.protocol === \"file:\";\n            this.httpHeaders = this.isHttp && source.httpHeaders || {};\n            this._fullRequestReader = null;\n            this._rangeRequestReaders = [];\n          }\n          get _progressiveDataLength() {\n            return this._fullRequestReader?._loaded ?? 0;\n          }\n          getFullReader() {\n            (0, _util.assert)(!this._fullRequestReader, \"PDFNodeStream.getFullReader can only be called once.\");\n            this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this);\n            return this._fullRequestReader;\n          }\n          getRangeReader(start, end) {\n            if (end <= this._progressiveDataLength) {\n              return null;\n            }\n            const rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end);\n            this._rangeRequestReaders.push(rangeReader);\n            return rangeReader;\n          }\n          cancelAllRequests(reason) {\n            this._fullRequestReader?.cancel(reason);\n            for (const reader of this._rangeRequestReaders.slice(0)) {\n              reader.cancel(reason);\n            }\n          }\n        }\n        exports.PDFNodeStream = PDFNodeStream;\n        class BaseFullReader {\n          constructor(stream) {\n            this._url = stream.url;\n            this._done = false;\n            this._storedError = null;\n            this.onProgress = null;\n            const source = stream.source;\n            this._contentLength = source.length;\n            this._loaded = 0;\n            this._filename = null;\n            this._disableRange = source.disableRange || false;\n            this._rangeChunkSize = source.rangeChunkSize;\n            if (!this._rangeChunkSize && !this._disableRange) {\n              this._disableRange = true;\n            }\n            this._isStreamingSupported = !source.disableStream;\n            this._isRangeSupported = !source.disableRange;\n            this._readableStream = null;\n            this._readCapability = new _util.PromiseCapability();\n            this._headersCapability = new _util.PromiseCapability();\n          }\n          get headersReady() {\n            return this._headersCapability.promise;\n          }\n          get filename() {\n            return this._filename;\n          }\n          get contentLength() {\n            return this._contentLength;\n          }\n          get isRangeSupported() {\n            return this._isRangeSupported;\n          }\n          get isStreamingSupported() {\n            return this._isStreamingSupported;\n          }\n          async read() {\n            await this._readCapability.promise;\n            if (this._done) {\n              return {\n                value: undefined,\n                done: true\n              };\n            }\n            if (this._storedError) {\n              throw this._storedError;\n            }\n            const chunk = this._readableStream.read();\n            if (chunk === null) {\n              this._readCapability = new _util.PromiseCapability();\n              return this.read();\n            }\n            this._loaded += chunk.length;\n            this.onProgress?.({\n              loaded: this._loaded,\n              total: this._contentLength\n            });\n            const buffer = new Uint8Array(chunk).buffer;\n            return {\n              value: buffer,\n              done: false\n            };\n          }\n          cancel(reason) {\n            if (!this._readableStream) {\n              this._error(reason);\n              return;\n            }\n            this._readableStream.destroy(reason);\n          }\n          _error(reason) {\n            this._storedError = reason;\n            this._readCapability.resolve();\n          }\n          _setReadableStream(readableStream) {\n            this._readableStream = readableStream;\n            readableStream.on(\"readable\", () => {\n              this._readCapability.resolve();\n            });\n            readableStream.on(\"end\", () => {\n              readableStream.destroy();\n              this._done = true;\n              this._readCapability.resolve();\n            });\n            readableStream.on(\"error\", reason => {\n              this._error(reason);\n            });\n            if (!this._isStreamingSupported && this._isRangeSupported) {\n              this._error(new _util.AbortException(\"streaming is disabled\"));\n            }\n            if (this._storedError) {\n              this._readableStream.destroy(this._storedError);\n            }\n          }\n        }\n        class BaseRangeReader {\n          constructor(stream) {\n            this._url = stream.url;\n            this._done = false;\n            this._storedError = null;\n            this.onProgress = null;\n            this._loaded = 0;\n            this._readableStream = null;\n            this._readCapability = new _util.PromiseCapability();\n            const source = stream.source;\n            this._isStreamingSupported = !source.disableStream;\n          }\n          get isStreamingSupported() {\n            return this._isStreamingSupported;\n          }\n          async read() {\n            await this._readCapability.promise;\n            if (this._done) {\n              return {\n                value: undefined,\n                done: true\n              };\n            }\n            if (this._storedError) {\n              throw this._storedError;\n            }\n            const chunk = this._readableStream.read();\n            if (chunk === null) {\n              this._readCapability = new _util.PromiseCapability();\n              return this.read();\n            }\n            this._loaded += chunk.length;\n            this.onProgress?.({\n              loaded: this._loaded\n            });\n            const buffer = new Uint8Array(chunk).buffer;\n            return {\n              value: buffer,\n              done: false\n            };\n          }\n          cancel(reason) {\n            if (!this._readableStream) {\n              this._error(reason);\n              return;\n            }\n            this._readableStream.destroy(reason);\n          }\n          _error(reason) {\n            this._storedError = reason;\n            this._readCapability.resolve();\n          }\n          _setReadableStream(readableStream) {\n            this._readableStream = readableStream;\n            readableStream.on(\"readable\", () => {\n              this._readCapability.resolve();\n            });\n            readableStream.on(\"end\", () => {\n              readableStream.destroy();\n              this._done = true;\n              this._readCapability.resolve();\n            });\n            readableStream.on(\"error\", reason => {\n              this._error(reason);\n            });\n            if (this._storedError) {\n              this._readableStream.destroy(this._storedError);\n            }\n          }\n        }\n        function createRequestOptions(parsedUrl, headers) {\n          return {\n            protocol: parsedUrl.protocol,\n            auth: parsedUrl.auth,\n            host: parsedUrl.hostname,\n            port: parsedUrl.port,\n            path: parsedUrl.path,\n            method: \"GET\",\n            headers\n          };\n        }\n        class PDFNodeStreamFullReader extends BaseFullReader {\n          constructor(stream) {\n            super(stream);\n            const handleResponse = response => {\n              if (response.statusCode === 404) {\n                const error = new _util.MissingPDFException(`Missing PDF \"${this._url}\".`);\n                this._storedError = error;\n                this._headersCapability.reject(error);\n                return;\n              }\n              this._headersCapability.resolve();\n              this._setReadableStream(response);\n              const getResponseHeader = name => {\n                return this._readableStream.headers[name.toLowerCase()];\n              };\n              const {\n                allowRangeRequests,\n                suggestedLength\n              } = (0, _network_utils.validateRangeRequestCapabilities)({\n                getResponseHeader,\n                isHttp: stream.isHttp,\n                rangeChunkSize: this._rangeChunkSize,\n                disableRange: this._disableRange\n              });\n              this._isRangeSupported = allowRangeRequests;\n              this._contentLength = suggestedLength || this._contentLength;\n              this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n            };\n            this._request = null;\n            if (this._url.protocol === \"http:\") {\n              const http = require(\"http\");\n              this._request = http.request(createRequestOptions(this._url, stream.httpHeaders), handleResponse);\n            } else {\n              const https = require(\"https\");\n              this._request = https.request(createRequestOptions(this._url, stream.httpHeaders), handleResponse);\n            }\n            this._request.on(\"error\", reason => {\n              this._storedError = reason;\n              this._headersCapability.reject(reason);\n            });\n            this._request.end();\n          }\n        }\n        class PDFNodeStreamRangeReader extends BaseRangeReader {\n          constructor(stream, start, end) {\n            super(stream);\n            this._httpHeaders = {};\n            for (const property in stream.httpHeaders) {\n              const value = stream.httpHeaders[property];\n              if (value === undefined) {\n                continue;\n              }\n              this._httpHeaders[property] = value;\n            }\n            this._httpHeaders.Range = `bytes=${start}-${end - 1}`;\n            const handleResponse = response => {\n              if (response.statusCode === 404) {\n                const error = new _util.MissingPDFException(`Missing PDF \"${this._url}\".`);\n                this._storedError = error;\n                return;\n              }\n              this._setReadableStream(response);\n            };\n            this._request = null;\n            if (this._url.protocol === \"http:\") {\n              const http = require(\"http\");\n              this._request = http.request(createRequestOptions(this._url, this._httpHeaders), handleResponse);\n            } else {\n              const https = require(\"https\");\n              this._request = https.request(createRequestOptions(this._url, this._httpHeaders), handleResponse);\n            }\n            this._request.on(\"error\", reason => {\n              this._storedError = reason;\n            });\n            this._request.end();\n          }\n        }\n        class PDFNodeStreamFsFullReader extends BaseFullReader {\n          constructor(stream) {\n            super(stream);\n            let path = decodeURIComponent(this._url.path);\n            if (fileUriRegex.test(this._url.href)) {\n              path = path.replace(/^\\//, \"\");\n            }\n            const fs = require(\"fs\");\n            fs.lstat(path, (error, stat) => {\n              if (error) {\n                if (error.code === \"ENOENT\") {\n                  error = new _util.MissingPDFException(`Missing PDF \"${path}\".`);\n                }\n                this._storedError = error;\n                this._headersCapability.reject(error);\n                return;\n              }\n              this._contentLength = stat.size;\n              this._setReadableStream(fs.createReadStream(path));\n              this._headersCapability.resolve();\n            });\n          }\n        }\n        class PDFNodeStreamFsRangeReader extends BaseRangeReader {\n          constructor(stream, start, end) {\n            super(stream);\n            let path = decodeURIComponent(this._url.path);\n            if (fileUriRegex.test(this._url.href)) {\n              path = path.replace(/^\\//, \"\");\n            }\n            const fs = require(\"fs\");\n            this._setReadableStream(fs.createReadStream(path, {\n              start,\n              end: end - 1\n            }));\n          }\n        }\n\n        /***/\n      }, /* 24 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.SVGGraphics = void 0;\n        var _display_utils = __w_pdfjs_require__(6);\n        var _util = __w_pdfjs_require__(1);\n        ;\n        const SVG_DEFAULTS = {\n          fontStyle: \"normal\",\n          fontWeight: \"normal\",\n          fillColor: \"#000000\"\n        };\n        const XML_NS = \"http://www.w3.org/XML/1998/namespace\";\n        const XLINK_NS = \"http://www.w3.org/1999/xlink\";\n        const LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\n        const LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\n        const createObjectURL = function (data, contentType = \"\", forceDataSchema = false) {\n          if (URL.createObjectURL && typeof Blob !== \"undefined\" && !forceDataSchema) {\n            return URL.createObjectURL(new Blob([data], {\n              type: contentType\n            }));\n          }\n          const digits = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n          let buffer = `data:${contentType};base64,`;\n          for (let i = 0, ii = data.length; i < ii; i += 3) {\n            const b1 = data[i] & 0xff;\n            const b2 = data[i + 1] & 0xff;\n            const b3 = data[i + 2] & 0xff;\n            const d1 = b1 >> 2,\n              d2 = (b1 & 3) << 4 | b2 >> 4;\n            const d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64;\n            const d4 = i + 2 < ii ? b3 & 0x3f : 64;\n            buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];\n          }\n          return buffer;\n        };\n        const convertImgDataToPng = function () {\n          const PNG_HEADER = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);\n          const CHUNK_WRAPPER_SIZE = 12;\n          const crcTable = new Int32Array(256);\n          for (let i = 0; i < 256; i++) {\n            let c = i;\n            for (let h = 0; h < 8; h++) {\n              c = c & 1 ? 0xedb88320 ^ c >> 1 & 0x7fffffff : c >> 1 & 0x7fffffff;\n            }\n            crcTable[i] = c;\n          }\n          function crc32(data, start, end) {\n            let crc = -1;\n            for (let i = start; i < end; i++) {\n              const a = (crc ^ data[i]) & 0xff;\n              const b = crcTable[a];\n              crc = crc >>> 8 ^ b;\n            }\n            return crc ^ -1;\n          }\n          function writePngChunk(type, body, data, offset) {\n            let p = offset;\n            const len = body.length;\n            data[p] = len >> 24 & 0xff;\n            data[p + 1] = len >> 16 & 0xff;\n            data[p + 2] = len >> 8 & 0xff;\n            data[p + 3] = len & 0xff;\n            p += 4;\n            data[p] = type.charCodeAt(0) & 0xff;\n            data[p + 1] = type.charCodeAt(1) & 0xff;\n            data[p + 2] = type.charCodeAt(2) & 0xff;\n            data[p + 3] = type.charCodeAt(3) & 0xff;\n            p += 4;\n            data.set(body, p);\n            p += body.length;\n            const crc = crc32(data, offset + 4, p);\n            data[p] = crc >> 24 & 0xff;\n            data[p + 1] = crc >> 16 & 0xff;\n            data[p + 2] = crc >> 8 & 0xff;\n            data[p + 3] = crc & 0xff;\n          }\n          function adler32(data, start, end) {\n            let a = 1;\n            let b = 0;\n            for (let i = start; i < end; ++i) {\n              a = (a + (data[i] & 0xff)) % 65521;\n              b = (b + a) % 65521;\n            }\n            return b << 16 | a;\n          }\n          function deflateSync(literals) {\n            if (!_util.isNodeJS) {\n              return deflateSyncUncompressed(literals);\n            }\n            try {\n              const input = parseInt(process.versions.node) >= 8 ? literals : Buffer.from(literals);\n              const output = require(\"zlib\").deflateSync(input, {\n                level: 9\n              });\n              return output instanceof Uint8Array ? output : new Uint8Array(output);\n            } catch (e) {\n              (0, _util.warn)(\"Not compressing PNG because zlib.deflateSync is unavailable: \" + e);\n            }\n            return deflateSyncUncompressed(literals);\n          }\n          function deflateSyncUncompressed(literals) {\n            let len = literals.length;\n            const maxBlockLength = 0xffff;\n            const deflateBlocks = Math.ceil(len / maxBlockLength);\n            const idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);\n            let pi = 0;\n            idat[pi++] = 0x78;\n            idat[pi++] = 0x9c;\n            let pos = 0;\n            while (len > maxBlockLength) {\n              idat[pi++] = 0x00;\n              idat[pi++] = 0xff;\n              idat[pi++] = 0xff;\n              idat[pi++] = 0x00;\n              idat[pi++] = 0x00;\n              idat.set(literals.subarray(pos, pos + maxBlockLength), pi);\n              pi += maxBlockLength;\n              pos += maxBlockLength;\n              len -= maxBlockLength;\n            }\n            idat[pi++] = 0x01;\n            idat[pi++] = len & 0xff;\n            idat[pi++] = len >> 8 & 0xff;\n            idat[pi++] = ~len & 0xffff & 0xff;\n            idat[pi++] = (~len & 0xffff) >> 8 & 0xff;\n            idat.set(literals.subarray(pos), pi);\n            pi += literals.length - pos;\n            const adler = adler32(literals, 0, literals.length);\n            idat[pi++] = adler >> 24 & 0xff;\n            idat[pi++] = adler >> 16 & 0xff;\n            idat[pi++] = adler >> 8 & 0xff;\n            idat[pi++] = adler & 0xff;\n            return idat;\n          }\n          function encode(imgData, kind, forceDataSchema, isMask) {\n            const width = imgData.width;\n            const height = imgData.height;\n            let bitDepth, colorType, lineSize;\n            const bytes = imgData.data;\n            switch (kind) {\n              case _util.ImageKind.GRAYSCALE_1BPP:\n                colorType = 0;\n                bitDepth = 1;\n                lineSize = width + 7 >> 3;\n                break;\n              case _util.ImageKind.RGB_24BPP:\n                colorType = 2;\n                bitDepth = 8;\n                lineSize = width * 3;\n                break;\n              case _util.ImageKind.RGBA_32BPP:\n                colorType = 6;\n                bitDepth = 8;\n                lineSize = width * 4;\n                break;\n              default:\n                throw new Error(\"invalid format\");\n            }\n            const literals = new Uint8Array((1 + lineSize) * height);\n            let offsetLiterals = 0,\n              offsetBytes = 0;\n            for (let y = 0; y < height; ++y) {\n              literals[offsetLiterals++] = 0;\n              literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals);\n              offsetBytes += lineSize;\n              offsetLiterals += lineSize;\n            }\n            if (kind === _util.ImageKind.GRAYSCALE_1BPP && isMask) {\n              offsetLiterals = 0;\n              for (let y = 0; y < height; y++) {\n                offsetLiterals++;\n                for (let i = 0; i < lineSize; i++) {\n                  literals[offsetLiterals++] ^= 0xff;\n                }\n              }\n            }\n            const ihdr = new Uint8Array([width >> 24 & 0xff, width >> 16 & 0xff, width >> 8 & 0xff, width & 0xff, height >> 24 & 0xff, height >> 16 & 0xff, height >> 8 & 0xff, height & 0xff, bitDepth, colorType, 0x00, 0x00, 0x00]);\n            const idat = deflateSync(literals);\n            const pngLength = PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length;\n            const data = new Uint8Array(pngLength);\n            let offset = 0;\n            data.set(PNG_HEADER, offset);\n            offset += PNG_HEADER.length;\n            writePngChunk(\"IHDR\", ihdr, data, offset);\n            offset += CHUNK_WRAPPER_SIZE + ihdr.length;\n            writePngChunk(\"IDATA\", idat, data, offset);\n            offset += CHUNK_WRAPPER_SIZE + idat.length;\n            writePngChunk(\"IEND\", new Uint8Array(0), data, offset);\n            return createObjectURL(data, \"image/png\", forceDataSchema);\n          }\n          return function convertImgDataToPng(imgData, forceDataSchema, isMask) {\n            const kind = imgData.kind === undefined ? _util.ImageKind.GRAYSCALE_1BPP : imgData.kind;\n            return encode(imgData, kind, forceDataSchema, isMask);\n          };\n        }();\n        class SVGExtraState {\n          constructor() {\n            this.fontSizeScale = 1;\n            this.fontWeight = SVG_DEFAULTS.fontWeight;\n            this.fontSize = 0;\n            this.textMatrix = _util.IDENTITY_MATRIX;\n            this.fontMatrix = _util.FONT_IDENTITY_MATRIX;\n            this.leading = 0;\n            this.textRenderingMode = _util.TextRenderingMode.FILL;\n            this.textMatrixScale = 1;\n            this.x = 0;\n            this.y = 0;\n            this.lineX = 0;\n            this.lineY = 0;\n            this.charSpacing = 0;\n            this.wordSpacing = 0;\n            this.textHScale = 1;\n            this.textRise = 0;\n            this.fillColor = SVG_DEFAULTS.fillColor;\n            this.strokeColor = \"#000000\";\n            this.fillAlpha = 1;\n            this.strokeAlpha = 1;\n            this.lineWidth = 1;\n            this.lineJoin = \"\";\n            this.lineCap = \"\";\n            this.miterLimit = 0;\n            this.dashArray = [];\n            this.dashPhase = 0;\n            this.dependencies = [];\n            this.activeClipUrl = null;\n            this.clipGroup = null;\n            this.maskId = \"\";\n          }\n          clone() {\n            return Object.create(this);\n          }\n          setCurrentPoint(x, y) {\n            this.x = x;\n            this.y = y;\n          }\n        }\n        function opListToTree(opList) {\n          let opTree = [];\n          const tmp = [];\n          for (const opListElement of opList) {\n            if (opListElement.fn === \"save\") {\n              opTree.push({\n                fnId: 92,\n                fn: \"group\",\n                items: []\n              });\n              tmp.push(opTree);\n              opTree = opTree.at(-1).items;\n              continue;\n            }\n            if (opListElement.fn === \"restore\") {\n              opTree = tmp.pop();\n            } else {\n              opTree.push(opListElement);\n            }\n          }\n          return opTree;\n        }\n        function pf(value) {\n          if (Number.isInteger(value)) {\n            return value.toString();\n          }\n          const s = value.toFixed(10);\n          let i = s.length - 1;\n          if (s[i] !== \"0\") {\n            return s;\n          }\n          do {\n            i--;\n          } while (s[i] === \"0\");\n          return s.substring(0, s[i] === \".\" ? i : i + 1);\n        }\n        function pm(m) {\n          if (m[4] === 0 && m[5] === 0) {\n            if (m[1] === 0 && m[2] === 0) {\n              if (m[0] === 1 && m[3] === 1) {\n                return \"\";\n              }\n              return `scale(${pf(m[0])} ${pf(m[3])})`;\n            }\n            if (m[0] === m[3] && m[1] === -m[2]) {\n              const a = Math.acos(m[0]) * 180 / Math.PI;\n              return `rotate(${pf(a)})`;\n            }\n          } else if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {\n            return `translate(${pf(m[4])} ${pf(m[5])})`;\n          }\n          return `matrix(${pf(m[0])} ${pf(m[1])} ${pf(m[2])} ${pf(m[3])} ${pf(m[4])} ` + `${pf(m[5])})`;\n        }\n        let clipCount = 0;\n        let maskCount = 0;\n        let shadingCount = 0;\n        class SVGGraphics {\n          constructor(commonObjs, objs, forceDataSchema = false) {\n            (0, _display_utils.deprecated)(\"The SVG back-end is no longer maintained and *may* be removed in the future.\");\n            this.svgFactory = new _display_utils.DOMSVGFactory();\n            this.current = new SVGExtraState();\n            this.transformMatrix = _util.IDENTITY_MATRIX;\n            this.transformStack = [];\n            this.extraStack = [];\n            this.commonObjs = commonObjs;\n            this.objs = objs;\n            this.pendingClip = null;\n            this.pendingEOFill = false;\n            this.embedFonts = false;\n            this.embeddedFonts = Object.create(null);\n            this.cssStyle = null;\n            this.forceDataSchema = !!forceDataSchema;\n            this._operatorIdMapping = [];\n            for (const op in _util.OPS) {\n              this._operatorIdMapping[_util.OPS[op]] = op;\n            }\n          }\n          getObject(data, fallback = null) {\n            if (typeof data === \"string\") {\n              return data.startsWith(\"g_\") ? this.commonObjs.get(data) : this.objs.get(data);\n            }\n            return fallback;\n          }\n          save() {\n            this.transformStack.push(this.transformMatrix);\n            const old = this.current;\n            this.extraStack.push(old);\n            this.current = old.clone();\n          }\n          restore() {\n            this.transformMatrix = this.transformStack.pop();\n            this.current = this.extraStack.pop();\n            this.pendingClip = null;\n            this.tgrp = null;\n          }\n          group(items) {\n            this.save();\n            this.executeOpTree(items);\n            this.restore();\n          }\n          loadDependencies(operatorList) {\n            const fnArray = operatorList.fnArray;\n            const argsArray = operatorList.argsArray;\n            for (let i = 0, ii = fnArray.length; i < ii; i++) {\n              if (fnArray[i] !== _util.OPS.dependency) {\n                continue;\n              }\n              for (const obj of argsArray[i]) {\n                const objsPool = obj.startsWith(\"g_\") ? this.commonObjs : this.objs;\n                const promise = new Promise(resolve => {\n                  objsPool.get(obj, resolve);\n                });\n                this.current.dependencies.push(promise);\n              }\n            }\n            return Promise.all(this.current.dependencies);\n          }\n          transform(a, b, c, d, e, f) {\n            const transformMatrix = [a, b, c, d, e, f];\n            this.transformMatrix = _util.Util.transform(this.transformMatrix, transformMatrix);\n            this.tgrp = null;\n          }\n          getSVG(operatorList, viewport) {\n            this.viewport = viewport;\n            const svgElement = this._initialize(viewport);\n            return this.loadDependencies(operatorList).then(() => {\n              this.transformMatrix = _util.IDENTITY_MATRIX;\n              this.executeOpTree(this.convertOpList(operatorList));\n              return svgElement;\n            });\n          }\n          convertOpList(operatorList) {\n            const operatorIdMapping = this._operatorIdMapping;\n            const argsArray = operatorList.argsArray;\n            const fnArray = operatorList.fnArray;\n            const opList = [];\n            for (let i = 0, ii = fnArray.length; i < ii; i++) {\n              const fnId = fnArray[i];\n              opList.push({\n                fnId,\n                fn: operatorIdMapping[fnId],\n                args: argsArray[i]\n              });\n            }\n            return opListToTree(opList);\n          }\n          executeOpTree(opTree) {\n            for (const opTreeElement of opTree) {\n              const fn = opTreeElement.fn;\n              const fnId = opTreeElement.fnId;\n              const args = opTreeElement.args;\n              switch (fnId | 0) {\n                case _util.OPS.beginText:\n                  this.beginText();\n                  break;\n                case _util.OPS.dependency:\n                  break;\n                case _util.OPS.setLeading:\n                  this.setLeading(args);\n                  break;\n                case _util.OPS.setLeadingMoveText:\n                  this.setLeadingMoveText(args[0], args[1]);\n                  break;\n                case _util.OPS.setFont:\n                  this.setFont(args);\n                  break;\n                case _util.OPS.showText:\n                  this.showText(args[0]);\n                  break;\n                case _util.OPS.showSpacedText:\n                  this.showText(args[0]);\n                  break;\n                case _util.OPS.endText:\n                  this.endText();\n                  break;\n                case _util.OPS.moveText:\n                  this.moveText(args[0], args[1]);\n                  break;\n                case _util.OPS.setCharSpacing:\n                  this.setCharSpacing(args[0]);\n                  break;\n                case _util.OPS.setWordSpacing:\n                  this.setWordSpacing(args[0]);\n                  break;\n                case _util.OPS.setHScale:\n                  this.setHScale(args[0]);\n                  break;\n                case _util.OPS.setTextMatrix:\n                  this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]);\n                  break;\n                case _util.OPS.setTextRise:\n                  this.setTextRise(args[0]);\n                  break;\n                case _util.OPS.setTextRenderingMode:\n                  this.setTextRenderingMode(args[0]);\n                  break;\n                case _util.OPS.setLineWidth:\n                  this.setLineWidth(args[0]);\n                  break;\n                case _util.OPS.setLineJoin:\n                  this.setLineJoin(args[0]);\n                  break;\n                case _util.OPS.setLineCap:\n                  this.setLineCap(args[0]);\n                  break;\n                case _util.OPS.setMiterLimit:\n                  this.setMiterLimit(args[0]);\n                  break;\n                case _util.OPS.setFillRGBColor:\n                  this.setFillRGBColor(args[0], args[1], args[2]);\n                  break;\n                case _util.OPS.setStrokeRGBColor:\n                  this.setStrokeRGBColor(args[0], args[1], args[2]);\n                  break;\n                case _util.OPS.setStrokeColorN:\n                  this.setStrokeColorN(args);\n                  break;\n                case _util.OPS.setFillColorN:\n                  this.setFillColorN(args);\n                  break;\n                case _util.OPS.shadingFill:\n                  this.shadingFill(args[0]);\n                  break;\n                case _util.OPS.setDash:\n                  this.setDash(args[0], args[1]);\n                  break;\n                case _util.OPS.setRenderingIntent:\n                  this.setRenderingIntent(args[0]);\n                  break;\n                case _util.OPS.setFlatness:\n                  this.setFlatness(args[0]);\n                  break;\n                case _util.OPS.setGState:\n                  this.setGState(args[0]);\n                  break;\n                case _util.OPS.fill:\n                  this.fill();\n                  break;\n                case _util.OPS.eoFill:\n                  this.eoFill();\n                  break;\n                case _util.OPS.stroke:\n                  this.stroke();\n                  break;\n                case _util.OPS.fillStroke:\n                  this.fillStroke();\n                  break;\n                case _util.OPS.eoFillStroke:\n                  this.eoFillStroke();\n                  break;\n                case _util.OPS.clip:\n                  this.clip(\"nonzero\");\n                  break;\n                case _util.OPS.eoClip:\n                  this.clip(\"evenodd\");\n                  break;\n                case _util.OPS.paintSolidColorImageMask:\n                  this.paintSolidColorImageMask();\n                  break;\n                case _util.OPS.paintImageXObject:\n                  this.paintImageXObject(args[0]);\n                  break;\n                case _util.OPS.paintInlineImageXObject:\n                  this.paintInlineImageXObject(args[0]);\n                  break;\n                case _util.OPS.paintImageMaskXObject:\n                  this.paintImageMaskXObject(args[0]);\n                  break;\n                case _util.OPS.paintFormXObjectBegin:\n                  this.paintFormXObjectBegin(args[0], args[1]);\n                  break;\n                case _util.OPS.paintFormXObjectEnd:\n                  this.paintFormXObjectEnd();\n                  break;\n                case _util.OPS.closePath:\n                  this.closePath();\n                  break;\n                case _util.OPS.closeStroke:\n                  this.closeStroke();\n                  break;\n                case _util.OPS.closeFillStroke:\n                  this.closeFillStroke();\n                  break;\n                case _util.OPS.closeEOFillStroke:\n                  this.closeEOFillStroke();\n                  break;\n                case _util.OPS.nextLine:\n                  this.nextLine();\n                  break;\n                case _util.OPS.transform:\n                  this.transform(args[0], args[1], args[2], args[3], args[4], args[5]);\n                  break;\n                case _util.OPS.constructPath:\n                  this.constructPath(args[0], args[1]);\n                  break;\n                case _util.OPS.endPath:\n                  this.endPath();\n                  break;\n                case 92:\n                  this.group(opTreeElement.items);\n                  break;\n                default:\n                  (0, _util.warn)(`Unimplemented operator ${fn}`);\n                  break;\n              }\n            }\n          }\n          setWordSpacing(wordSpacing) {\n            this.current.wordSpacing = wordSpacing;\n          }\n          setCharSpacing(charSpacing) {\n            this.current.charSpacing = charSpacing;\n          }\n          nextLine() {\n            this.moveText(0, this.current.leading);\n          }\n          setTextMatrix(a, b, c, d, e, f) {\n            const current = this.current;\n            current.textMatrix = current.lineMatrix = [a, b, c, d, e, f];\n            current.textMatrixScale = Math.hypot(a, b);\n            current.x = current.lineX = 0;\n            current.y = current.lineY = 0;\n            current.xcoords = [];\n            current.ycoords = [];\n            current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n            current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n            current.tspan.setAttributeNS(null, \"font-size\", `${pf(current.fontSize)}px`);\n            current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n            current.txtElement = this.svgFactory.createElement(\"svg:text\");\n            current.txtElement.append(current.tspan);\n          }\n          beginText() {\n            const current = this.current;\n            current.x = current.lineX = 0;\n            current.y = current.lineY = 0;\n            current.textMatrix = _util.IDENTITY_MATRIX;\n            current.lineMatrix = _util.IDENTITY_MATRIX;\n            current.textMatrixScale = 1;\n            current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n            current.txtElement = this.svgFactory.createElement(\"svg:text\");\n            current.txtgrp = this.svgFactory.createElement(\"svg:g\");\n            current.xcoords = [];\n            current.ycoords = [];\n          }\n          moveText(x, y) {\n            const current = this.current;\n            current.x = current.lineX += x;\n            current.y = current.lineY += y;\n            current.xcoords = [];\n            current.ycoords = [];\n            current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n            current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n            current.tspan.setAttributeNS(null, \"font-size\", `${pf(current.fontSize)}px`);\n            current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n          }\n          showText(glyphs) {\n            const current = this.current;\n            const font = current.font;\n            const fontSize = current.fontSize;\n            if (fontSize === 0) {\n              return;\n            }\n            const fontSizeScale = current.fontSizeScale;\n            const charSpacing = current.charSpacing;\n            const wordSpacing = current.wordSpacing;\n            const fontDirection = current.fontDirection;\n            const textHScale = current.textHScale * fontDirection;\n            const vertical = font.vertical;\n            const spacingDir = vertical ? 1 : -1;\n            const defaultVMetrics = font.defaultVMetrics;\n            const widthAdvanceScale = fontSize * current.fontMatrix[0];\n            let x = 0;\n            for (const glyph of glyphs) {\n              if (glyph === null) {\n                x += fontDirection * wordSpacing;\n                continue;\n              } else if (typeof glyph === \"number\") {\n                x += spacingDir * glyph * fontSize / 1000;\n                continue;\n              }\n              const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n              const character = glyph.fontChar;\n              let scaledX, scaledY;\n              let width = glyph.width;\n              if (vertical) {\n                let vx;\n                const vmetric = glyph.vmetric || defaultVMetrics;\n                vx = glyph.vmetric ? vmetric[1] : width * 0.5;\n                vx = -vx * widthAdvanceScale;\n                const vy = vmetric[2] * widthAdvanceScale;\n                width = vmetric ? -vmetric[0] : width;\n                scaledX = vx / fontSizeScale;\n                scaledY = (x + vy) / fontSizeScale;\n              } else {\n                scaledX = x / fontSizeScale;\n                scaledY = 0;\n              }\n              if (glyph.isInFont || font.missingFile) {\n                current.xcoords.push(current.x + scaledX);\n                if (vertical) {\n                  current.ycoords.push(-current.y + scaledY);\n                }\n                current.tspan.textContent += character;\n              } else {}\n              const charWidth = vertical ? width * widthAdvanceScale - spacing * fontDirection : width * widthAdvanceScale + spacing * fontDirection;\n              x += charWidth;\n            }\n            current.tspan.setAttributeNS(null, \"x\", current.xcoords.map(pf).join(\" \"));\n            if (vertical) {\n              current.tspan.setAttributeNS(null, \"y\", current.ycoords.map(pf).join(\" \"));\n            } else {\n              current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n            }\n            if (vertical) {\n              current.y -= x;\n            } else {\n              current.x += x * textHScale;\n            }\n            current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n            current.tspan.setAttributeNS(null, \"font-size\", `${pf(current.fontSize)}px`);\n            if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {\n              current.tspan.setAttributeNS(null, \"font-style\", current.fontStyle);\n            }\n            if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {\n              current.tspan.setAttributeNS(null, \"font-weight\", current.fontWeight);\n            }\n            const fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n            if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n              if (current.fillColor !== SVG_DEFAULTS.fillColor) {\n                current.tspan.setAttributeNS(null, \"fill\", current.fillColor);\n              }\n              if (current.fillAlpha < 1) {\n                current.tspan.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n              }\n            } else if (current.textRenderingMode === _util.TextRenderingMode.ADD_TO_PATH) {\n              current.tspan.setAttributeNS(null, \"fill\", \"transparent\");\n            } else {\n              current.tspan.setAttributeNS(null, \"fill\", \"none\");\n            }\n            if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n              const lineWidthScale = 1 / (current.textMatrixScale || 1);\n              this._setStrokeAttributes(current.tspan, lineWidthScale);\n            }\n            let textMatrix = current.textMatrix;\n            if (current.textRise !== 0) {\n              textMatrix = textMatrix.slice();\n              textMatrix[5] += current.textRise;\n            }\n            current.txtElement.setAttributeNS(null, \"transform\", `${pm(textMatrix)} scale(${pf(textHScale)}, -1)`);\n            current.txtElement.setAttributeNS(XML_NS, \"xml:space\", \"preserve\");\n            current.txtElement.append(current.tspan);\n            current.txtgrp.append(current.txtElement);\n            this._ensureTransformGroup().append(current.txtElement);\n          }\n          setLeadingMoveText(x, y) {\n            this.setLeading(-y);\n            this.moveText(x, y);\n          }\n          addFontStyle(fontObj) {\n            if (!fontObj.data) {\n              throw new Error(\"addFontStyle: No font data available, \" + 'ensure that the \"fontExtraProperties\" API parameter is set.');\n            }\n            if (!this.cssStyle) {\n              this.cssStyle = this.svgFactory.createElement(\"svg:style\");\n              this.cssStyle.setAttributeNS(null, \"type\", \"text/css\");\n              this.defs.append(this.cssStyle);\n            }\n            const url = createObjectURL(fontObj.data, fontObj.mimetype, this.forceDataSchema);\n            this.cssStyle.textContent += `@font-face { font-family: \"${fontObj.loadedName}\";` + ` src: url(${url}); }\\n`;\n          }\n          setFont(details) {\n            const current = this.current;\n            const fontObj = this.commonObjs.get(details[0]);\n            let size = details[1];\n            current.font = fontObj;\n            if (this.embedFonts && !fontObj.missingFile && !this.embeddedFonts[fontObj.loadedName]) {\n              this.addFontStyle(fontObj);\n              this.embeddedFonts[fontObj.loadedName] = fontObj;\n            }\n            current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n            let bold = \"normal\";\n            if (fontObj.black) {\n              bold = \"900\";\n            } else if (fontObj.bold) {\n              bold = \"bold\";\n            }\n            const italic = fontObj.italic ? \"italic\" : \"normal\";\n            if (size < 0) {\n              size = -size;\n              current.fontDirection = -1;\n            } else {\n              current.fontDirection = 1;\n            }\n            current.fontSize = size;\n            current.fontFamily = fontObj.loadedName;\n            current.fontWeight = bold;\n            current.fontStyle = italic;\n            current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n            current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n            current.xcoords = [];\n            current.ycoords = [];\n          }\n          endText() {\n            const current = this.current;\n            if (current.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG && current.txtElement?.hasChildNodes()) {\n              current.element = current.txtElement;\n              this.clip(\"nonzero\");\n              this.endPath();\n            }\n          }\n          setLineWidth(width) {\n            if (width > 0) {\n              this.current.lineWidth = width;\n            }\n          }\n          setLineCap(style) {\n            this.current.lineCap = LINE_CAP_STYLES[style];\n          }\n          setLineJoin(style) {\n            this.current.lineJoin = LINE_JOIN_STYLES[style];\n          }\n          setMiterLimit(limit) {\n            this.current.miterLimit = limit;\n          }\n          setStrokeAlpha(strokeAlpha) {\n            this.current.strokeAlpha = strokeAlpha;\n          }\n          setStrokeRGBColor(r, g, b) {\n            this.current.strokeColor = _util.Util.makeHexColor(r, g, b);\n          }\n          setFillAlpha(fillAlpha) {\n            this.current.fillAlpha = fillAlpha;\n          }\n          setFillRGBColor(r, g, b) {\n            this.current.fillColor = _util.Util.makeHexColor(r, g, b);\n            this.current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n            this.current.xcoords = [];\n            this.current.ycoords = [];\n          }\n          setStrokeColorN(args) {\n            this.current.strokeColor = this._makeColorN_Pattern(args);\n          }\n          setFillColorN(args) {\n            this.current.fillColor = this._makeColorN_Pattern(args);\n          }\n          shadingFill(args) {\n            const {\n              width,\n              height\n            } = this.viewport;\n            const inv = _util.Util.inverseTransform(this.transformMatrix);\n            const [x0, y0, x1, y1] = _util.Util.getAxialAlignedBoundingBox([0, 0, width, height], inv);\n            const rect = this.svgFactory.createElement(\"svg:rect\");\n            rect.setAttributeNS(null, \"x\", x0);\n            rect.setAttributeNS(null, \"y\", y0);\n            rect.setAttributeNS(null, \"width\", x1 - x0);\n            rect.setAttributeNS(null, \"height\", y1 - y0);\n            rect.setAttributeNS(null, \"fill\", this._makeShadingPattern(args));\n            if (this.current.fillAlpha < 1) {\n              rect.setAttributeNS(null, \"fill-opacity\", this.current.fillAlpha);\n            }\n            this._ensureTransformGroup().append(rect);\n          }\n          _makeColorN_Pattern(args) {\n            if (args[0] === \"TilingPattern\") {\n              return this._makeTilingPattern(args);\n            }\n            return this._makeShadingPattern(args);\n          }\n          _makeTilingPattern(args) {\n            const color = args[1];\n            const operatorList = args[2];\n            const matrix = args[3] || _util.IDENTITY_MATRIX;\n            const [x0, y0, x1, y1] = args[4];\n            const xstep = args[5];\n            const ystep = args[6];\n            const paintType = args[7];\n            const tilingId = `shading${shadingCount++}`;\n            const [tx0, ty0, tx1, ty1] = _util.Util.normalizeRect([..._util.Util.applyTransform([x0, y0], matrix), ..._util.Util.applyTransform([x1, y1], matrix)]);\n            const [xscale, yscale] = _util.Util.singularValueDecompose2dScale(matrix);\n            const txstep = xstep * xscale;\n            const tystep = ystep * yscale;\n            const tiling = this.svgFactory.createElement(\"svg:pattern\");\n            tiling.setAttributeNS(null, \"id\", tilingId);\n            tiling.setAttributeNS(null, \"patternUnits\", \"userSpaceOnUse\");\n            tiling.setAttributeNS(null, \"width\", txstep);\n            tiling.setAttributeNS(null, \"height\", tystep);\n            tiling.setAttributeNS(null, \"x\", `${tx0}`);\n            tiling.setAttributeNS(null, \"y\", `${ty0}`);\n            const svg = this.svg;\n            const transformMatrix = this.transformMatrix;\n            const fillColor = this.current.fillColor;\n            const strokeColor = this.current.strokeColor;\n            const bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0);\n            this.svg = bbox;\n            this.transformMatrix = matrix;\n            if (paintType === 2) {\n              const cssColor = _util.Util.makeHexColor(...color);\n              this.current.fillColor = cssColor;\n              this.current.strokeColor = cssColor;\n            }\n            this.executeOpTree(this.convertOpList(operatorList));\n            this.svg = svg;\n            this.transformMatrix = transformMatrix;\n            this.current.fillColor = fillColor;\n            this.current.strokeColor = strokeColor;\n            tiling.append(bbox.childNodes[0]);\n            this.defs.append(tiling);\n            return `url(#${tilingId})`;\n          }\n          _makeShadingPattern(args) {\n            if (typeof args === \"string\") {\n              args = this.objs.get(args);\n            }\n            switch (args[0]) {\n              case \"RadialAxial\":\n                const shadingId = `shading${shadingCount++}`;\n                const colorStops = args[3];\n                let gradient;\n                switch (args[1]) {\n                  case \"axial\":\n                    const point0 = args[4];\n                    const point1 = args[5];\n                    gradient = this.svgFactory.createElement(\"svg:linearGradient\");\n                    gradient.setAttributeNS(null, \"id\", shadingId);\n                    gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n                    gradient.setAttributeNS(null, \"x1\", point0[0]);\n                    gradient.setAttributeNS(null, \"y1\", point0[1]);\n                    gradient.setAttributeNS(null, \"x2\", point1[0]);\n                    gradient.setAttributeNS(null, \"y2\", point1[1]);\n                    break;\n                  case \"radial\":\n                    const focalPoint = args[4];\n                    const circlePoint = args[5];\n                    const focalRadius = args[6];\n                    const circleRadius = args[7];\n                    gradient = this.svgFactory.createElement(\"svg:radialGradient\");\n                    gradient.setAttributeNS(null, \"id\", shadingId);\n                    gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n                    gradient.setAttributeNS(null, \"cx\", circlePoint[0]);\n                    gradient.setAttributeNS(null, \"cy\", circlePoint[1]);\n                    gradient.setAttributeNS(null, \"r\", circleRadius);\n                    gradient.setAttributeNS(null, \"fx\", focalPoint[0]);\n                    gradient.setAttributeNS(null, \"fy\", focalPoint[1]);\n                    gradient.setAttributeNS(null, \"fr\", focalRadius);\n                    break;\n                  default:\n                    throw new Error(`Unknown RadialAxial type: ${args[1]}`);\n                }\n                for (const colorStop of colorStops) {\n                  const stop = this.svgFactory.createElement(\"svg:stop\");\n                  stop.setAttributeNS(null, \"offset\", colorStop[0]);\n                  stop.setAttributeNS(null, \"stop-color\", colorStop[1]);\n                  gradient.append(stop);\n                }\n                this.defs.append(gradient);\n                return `url(#${shadingId})`;\n              case \"Mesh\":\n                (0, _util.warn)(\"Unimplemented pattern Mesh\");\n                return null;\n              case \"Dummy\":\n                return \"hotpink\";\n              default:\n                throw new Error(`Unknown IR type: ${args[0]}`);\n            }\n          }\n          setDash(dashArray, dashPhase) {\n            this.current.dashArray = dashArray;\n            this.current.dashPhase = dashPhase;\n          }\n          constructPath(ops, args) {\n            const current = this.current;\n            let x = current.x,\n              y = current.y;\n            let d = [];\n            let j = 0;\n            for (const op of ops) {\n              switch (op | 0) {\n                case _util.OPS.rectangle:\n                  x = args[j++];\n                  y = args[j++];\n                  const width = args[j++];\n                  const height = args[j++];\n                  const xw = x + width;\n                  const yh = y + height;\n                  d.push(\"M\", pf(x), pf(y), \"L\", pf(xw), pf(y), \"L\", pf(xw), pf(yh), \"L\", pf(x), pf(yh), \"Z\");\n                  break;\n                case _util.OPS.moveTo:\n                  x = args[j++];\n                  y = args[j++];\n                  d.push(\"M\", pf(x), pf(y));\n                  break;\n                case _util.OPS.lineTo:\n                  x = args[j++];\n                  y = args[j++];\n                  d.push(\"L\", pf(x), pf(y));\n                  break;\n                case _util.OPS.curveTo:\n                  x = args[j + 4];\n                  y = args[j + 5];\n                  d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y));\n                  j += 6;\n                  break;\n                case _util.OPS.curveTo2:\n                  d.push(\"C\", pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]));\n                  x = args[j + 2];\n                  y = args[j + 3];\n                  j += 4;\n                  break;\n                case _util.OPS.curveTo3:\n                  x = args[j + 2];\n                  y = args[j + 3];\n                  d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y));\n                  j += 4;\n                  break;\n                case _util.OPS.closePath:\n                  d.push(\"Z\");\n                  break;\n              }\n            }\n            d = d.join(\" \");\n            if (current.path && ops.length > 0 && ops[0] !== _util.OPS.rectangle && ops[0] !== _util.OPS.moveTo) {\n              d = current.path.getAttributeNS(null, \"d\") + d;\n            } else {\n              current.path = this.svgFactory.createElement(\"svg:path\");\n              this._ensureTransformGroup().append(current.path);\n            }\n            current.path.setAttributeNS(null, \"d\", d);\n            current.path.setAttributeNS(null, \"fill\", \"none\");\n            current.element = current.path;\n            current.setCurrentPoint(x, y);\n          }\n          endPath() {\n            const current = this.current;\n            current.path = null;\n            if (!this.pendingClip) {\n              return;\n            }\n            if (!current.element) {\n              this.pendingClip = null;\n              return;\n            }\n            const clipId = `clippath${clipCount++}`;\n            const clipPath = this.svgFactory.createElement(\"svg:clipPath\");\n            clipPath.setAttributeNS(null, \"id\", clipId);\n            clipPath.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n            const clipElement = current.element.cloneNode(true);\n            if (this.pendingClip === \"evenodd\") {\n              clipElement.setAttributeNS(null, \"clip-rule\", \"evenodd\");\n            } else {\n              clipElement.setAttributeNS(null, \"clip-rule\", \"nonzero\");\n            }\n            this.pendingClip = null;\n            clipPath.append(clipElement);\n            this.defs.append(clipPath);\n            if (current.activeClipUrl) {\n              current.clipGroup = null;\n              for (const prev of this.extraStack) {\n                prev.clipGroup = null;\n              }\n              clipPath.setAttributeNS(null, \"clip-path\", current.activeClipUrl);\n            }\n            current.activeClipUrl = `url(#${clipId})`;\n            this.tgrp = null;\n          }\n          clip(type) {\n            this.pendingClip = type;\n          }\n          closePath() {\n            const current = this.current;\n            if (current.path) {\n              const d = `${current.path.getAttributeNS(null, \"d\")}Z`;\n              current.path.setAttributeNS(null, \"d\", d);\n            }\n          }\n          setLeading(leading) {\n            this.current.leading = -leading;\n          }\n          setTextRise(textRise) {\n            this.current.textRise = textRise;\n          }\n          setTextRenderingMode(textRenderingMode) {\n            this.current.textRenderingMode = textRenderingMode;\n          }\n          setHScale(scale) {\n            this.current.textHScale = scale / 100;\n          }\n          setRenderingIntent(intent) {}\n          setFlatness(flatness) {}\n          setGState(states) {\n            for (const [key, value] of states) {\n              switch (key) {\n                case \"LW\":\n                  this.setLineWidth(value);\n                  break;\n                case \"LC\":\n                  this.setLineCap(value);\n                  break;\n                case \"LJ\":\n                  this.setLineJoin(value);\n                  break;\n                case \"ML\":\n                  this.setMiterLimit(value);\n                  break;\n                case \"D\":\n                  this.setDash(value[0], value[1]);\n                  break;\n                case \"RI\":\n                  this.setRenderingIntent(value);\n                  break;\n                case \"FL\":\n                  this.setFlatness(value);\n                  break;\n                case \"Font\":\n                  this.setFont(value);\n                  break;\n                case \"CA\":\n                  this.setStrokeAlpha(value);\n                  break;\n                case \"ca\":\n                  this.setFillAlpha(value);\n                  break;\n                default:\n                  (0, _util.warn)(`Unimplemented graphic state operator ${key}`);\n                  break;\n              }\n            }\n          }\n          fill() {\n            const current = this.current;\n            if (current.element) {\n              current.element.setAttributeNS(null, \"fill\", current.fillColor);\n              current.element.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n              this.endPath();\n            }\n          }\n          stroke() {\n            const current = this.current;\n            if (current.element) {\n              this._setStrokeAttributes(current.element);\n              current.element.setAttributeNS(null, \"fill\", \"none\");\n              this.endPath();\n            }\n          }\n          _setStrokeAttributes(element, lineWidthScale = 1) {\n            const current = this.current;\n            let dashArray = current.dashArray;\n            if (lineWidthScale !== 1 && dashArray.length > 0) {\n              dashArray = dashArray.map(function (value) {\n                return lineWidthScale * value;\n              });\n            }\n            element.setAttributeNS(null, \"stroke\", current.strokeColor);\n            element.setAttributeNS(null, \"stroke-opacity\", current.strokeAlpha);\n            element.setAttributeNS(null, \"stroke-miterlimit\", pf(current.miterLimit));\n            element.setAttributeNS(null, \"stroke-linecap\", current.lineCap);\n            element.setAttributeNS(null, \"stroke-linejoin\", current.lineJoin);\n            element.setAttributeNS(null, \"stroke-width\", pf(lineWidthScale * current.lineWidth) + \"px\");\n            element.setAttributeNS(null, \"stroke-dasharray\", dashArray.map(pf).join(\" \"));\n            element.setAttributeNS(null, \"stroke-dashoffset\", pf(lineWidthScale * current.dashPhase) + \"px\");\n          }\n          eoFill() {\n            this.current.element?.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n            this.fill();\n          }\n          fillStroke() {\n            this.stroke();\n            this.fill();\n          }\n          eoFillStroke() {\n            this.current.element?.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n            this.fillStroke();\n          }\n          closeStroke() {\n            this.closePath();\n            this.stroke();\n          }\n          closeFillStroke() {\n            this.closePath();\n            this.fillStroke();\n          }\n          closeEOFillStroke() {\n            this.closePath();\n            this.eoFillStroke();\n          }\n          paintSolidColorImageMask() {\n            const rect = this.svgFactory.createElement(\"svg:rect\");\n            rect.setAttributeNS(null, \"x\", \"0\");\n            rect.setAttributeNS(null, \"y\", \"0\");\n            rect.setAttributeNS(null, \"width\", \"1px\");\n            rect.setAttributeNS(null, \"height\", \"1px\");\n            rect.setAttributeNS(null, \"fill\", this.current.fillColor);\n            this._ensureTransformGroup().append(rect);\n          }\n          paintImageXObject(objId) {\n            const imgData = this.getObject(objId);\n            if (!imgData) {\n              (0, _util.warn)(`Dependent image with object ID ${objId} is not ready yet`);\n              return;\n            }\n            this.paintInlineImageXObject(imgData);\n          }\n          paintInlineImageXObject(imgData, mask) {\n            const width = imgData.width;\n            const height = imgData.height;\n            const imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask);\n            const cliprect = this.svgFactory.createElement(\"svg:rect\");\n            cliprect.setAttributeNS(null, \"x\", \"0\");\n            cliprect.setAttributeNS(null, \"y\", \"0\");\n            cliprect.setAttributeNS(null, \"width\", pf(width));\n            cliprect.setAttributeNS(null, \"height\", pf(height));\n            this.current.element = cliprect;\n            this.clip(\"nonzero\");\n            const imgEl = this.svgFactory.createElement(\"svg:image\");\n            imgEl.setAttributeNS(XLINK_NS, \"xlink:href\", imgSrc);\n            imgEl.setAttributeNS(null, \"x\", \"0\");\n            imgEl.setAttributeNS(null, \"y\", pf(-height));\n            imgEl.setAttributeNS(null, \"width\", pf(width) + \"px\");\n            imgEl.setAttributeNS(null, \"height\", pf(height) + \"px\");\n            imgEl.setAttributeNS(null, \"transform\", `scale(${pf(1 / width)} ${pf(-1 / height)})`);\n            if (mask) {\n              mask.append(imgEl);\n            } else {\n              this._ensureTransformGroup().append(imgEl);\n            }\n          }\n          paintImageMaskXObject(img) {\n            const imgData = this.getObject(img.data, img);\n            if (imgData.bitmap) {\n              (0, _util.warn)(\"paintImageMaskXObject: ImageBitmap support is not implemented, \" + \"ensure that the `isOffscreenCanvasSupported` API parameter is disabled.\");\n              return;\n            }\n            const current = this.current;\n            const width = imgData.width;\n            const height = imgData.height;\n            const fillColor = current.fillColor;\n            current.maskId = `mask${maskCount++}`;\n            const mask = this.svgFactory.createElement(\"svg:mask\");\n            mask.setAttributeNS(null, \"id\", current.maskId);\n            const rect = this.svgFactory.createElement(\"svg:rect\");\n            rect.setAttributeNS(null, \"x\", \"0\");\n            rect.setAttributeNS(null, \"y\", \"0\");\n            rect.setAttributeNS(null, \"width\", pf(width));\n            rect.setAttributeNS(null, \"height\", pf(height));\n            rect.setAttributeNS(null, \"fill\", fillColor);\n            rect.setAttributeNS(null, \"mask\", `url(#${current.maskId})`);\n            this.defs.append(mask);\n            this._ensureTransformGroup().append(rect);\n            this.paintInlineImageXObject(imgData, mask);\n          }\n          paintFormXObjectBegin(matrix, bbox) {\n            if (Array.isArray(matrix) && matrix.length === 6) {\n              this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n            }\n            if (bbox) {\n              const width = bbox[2] - bbox[0];\n              const height = bbox[3] - bbox[1];\n              const cliprect = this.svgFactory.createElement(\"svg:rect\");\n              cliprect.setAttributeNS(null, \"x\", bbox[0]);\n              cliprect.setAttributeNS(null, \"y\", bbox[1]);\n              cliprect.setAttributeNS(null, \"width\", pf(width));\n              cliprect.setAttributeNS(null, \"height\", pf(height));\n              this.current.element = cliprect;\n              this.clip(\"nonzero\");\n              this.endPath();\n            }\n          }\n          paintFormXObjectEnd() {}\n          _initialize(viewport) {\n            const svg = this.svgFactory.create(viewport.width, viewport.height);\n            const definitions = this.svgFactory.createElement(\"svg:defs\");\n            svg.append(definitions);\n            this.defs = definitions;\n            const rootGroup = this.svgFactory.createElement(\"svg:g\");\n            rootGroup.setAttributeNS(null, \"transform\", pm(viewport.transform));\n            svg.append(rootGroup);\n            this.svg = rootGroup;\n            return svg;\n          }\n          _ensureClipGroup() {\n            if (!this.current.clipGroup) {\n              const clipGroup = this.svgFactory.createElement(\"svg:g\");\n              clipGroup.setAttributeNS(null, \"clip-path\", this.current.activeClipUrl);\n              this.svg.append(clipGroup);\n              this.current.clipGroup = clipGroup;\n            }\n            return this.current.clipGroup;\n          }\n          _ensureTransformGroup() {\n            if (!this.tgrp) {\n              this.tgrp = this.svgFactory.createElement(\"svg:g\");\n              this.tgrp.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n              if (this.current.activeClipUrl) {\n                this._ensureClipGroup().append(this.tgrp);\n              } else {\n                this.svg.append(this.tgrp);\n              }\n            }\n            return this.tgrp;\n          }\n        }\n        exports.SVGGraphics = SVGGraphics;\n\n        /***/\n      }, /* 25 */\n      /***/(__unused_webpack_module, exports) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.XfaText = void 0;\n        class XfaText {\n          static textContent(xfa) {\n            const items = [];\n            const output = {\n              items,\n              styles: Object.create(null)\n            };\n            function walk(node) {\n              if (!node) {\n                return;\n              }\n              let str = null;\n              const name = node.name;\n              if (name === \"#text\") {\n                str = node.value;\n              } else if (!XfaText.shouldBuildText(name)) {\n                return;\n              } else if (node?.attributes?.textContent) {\n                str = node.attributes.textContent;\n              } else if (node.value) {\n                str = node.value;\n              }\n              if (str !== null) {\n                items.push({\n                  str\n                });\n              }\n              if (!node.children) {\n                return;\n              }\n              for (const child of node.children) {\n                walk(child);\n              }\n            }\n            walk(xfa);\n            return output;\n          }\n          static shouldBuildText(name) {\n            return !(name === \"textarea\" || name === \"input\" || name === \"option\" || name === \"select\");\n          }\n        }\n        exports.XfaText = XfaText;\n\n        /***/\n      }, /* 26 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.TextLayerRenderTask = void 0;\n        exports.renderTextLayer = renderTextLayer;\n        exports.updateTextLayer = updateTextLayer;\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        const MAX_TEXT_DIVS_TO_RENDER = 100000;\n        const DEFAULT_FONT_SIZE = 30;\n        const DEFAULT_FONT_ASCENT = 0.8;\n        const ascentCache = new Map();\n        function getCtx(size, isOffscreenCanvasSupported) {\n          let ctx;\n          if (isOffscreenCanvasSupported && _util.FeatureTest.isOffscreenCanvasSupported) {\n            ctx = new OffscreenCanvas(size, size).getContext(\"2d\", {\n              alpha: false\n            });\n          } else {\n            const canvas = document.createElement(\"canvas\");\n            canvas.width = canvas.height = size;\n            ctx = canvas.getContext(\"2d\", {\n              alpha: false\n            });\n          }\n          return ctx;\n        }\n        function getAscent(fontFamily, isOffscreenCanvasSupported) {\n          const cachedAscent = ascentCache.get(fontFamily);\n          if (cachedAscent) {\n            return cachedAscent;\n          }\n          const ctx = getCtx(DEFAULT_FONT_SIZE, isOffscreenCanvasSupported);\n          ctx.font = `${DEFAULT_FONT_SIZE}px ${fontFamily}`;\n          const metrics = ctx.measureText(\"\");\n          let ascent = metrics.fontBoundingBoxAscent;\n          let descent = Math.abs(metrics.fontBoundingBoxDescent);\n          if (ascent) {\n            const ratio = ascent / (ascent + descent);\n            ascentCache.set(fontFamily, ratio);\n            ctx.canvas.width = ctx.canvas.height = 0;\n            return ratio;\n          }\n          ctx.strokeStyle = \"red\";\n          ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n          ctx.strokeText(\"g\", 0, 0);\n          let pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n          descent = 0;\n          for (let i = pixels.length - 1 - 3; i >= 0; i -= 4) {\n            if (pixels[i] > 0) {\n              descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE);\n              break;\n            }\n          }\n          ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n          ctx.strokeText(\"A\", 0, DEFAULT_FONT_SIZE);\n          pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n          ascent = 0;\n          for (let i = 0, ii = pixels.length; i < ii; i += 4) {\n            if (pixels[i] > 0) {\n              ascent = DEFAULT_FONT_SIZE - Math.floor(i / 4 / DEFAULT_FONT_SIZE);\n              break;\n            }\n          }\n          ctx.canvas.width = ctx.canvas.height = 0;\n          if (ascent) {\n            const ratio = ascent / (ascent + descent);\n            ascentCache.set(fontFamily, ratio);\n            return ratio;\n          }\n          ascentCache.set(fontFamily, DEFAULT_FONT_ASCENT);\n          return DEFAULT_FONT_ASCENT;\n        }\n        function appendText(task, geom, styles) {\n          const textDiv = document.createElement(\"span\");\n          const textDivProperties = {\n            angle: 0,\n            canvasWidth: 0,\n            hasText: geom.str !== \"\",\n            hasEOL: geom.hasEOL,\n            fontSize: 0\n          };\n          task._textDivs.push(textDiv);\n          const tx = _util.Util.transform(task._transform, geom.transform);\n          let angle = Math.atan2(tx[1], tx[0]);\n          const style = styles[geom.fontName];\n          if (style.vertical) {\n            angle += Math.PI / 2;\n          }\n          const fontHeight = Math.hypot(tx[2], tx[3]);\n          const fontAscent = fontHeight * getAscent(style.fontFamily, task._isOffscreenCanvasSupported);\n          let left, top;\n          if (angle === 0) {\n            left = tx[4];\n            top = tx[5] - fontAscent;\n          } else {\n            left = tx[4] + fontAscent * Math.sin(angle);\n            top = tx[5] - fontAscent * Math.cos(angle);\n          }\n          const scaleFactorStr = \"calc(var(--scale-factor)*\";\n          const divStyle = textDiv.style;\n          if (task._container === task._rootContainer) {\n            divStyle.left = `${(100 * left / task._pageWidth).toFixed(2)}%`;\n            divStyle.top = `${(100 * top / task._pageHeight).toFixed(2)}%`;\n          } else {\n            divStyle.left = `${scaleFactorStr}${left.toFixed(2)}px)`;\n            divStyle.top = `${scaleFactorStr}${top.toFixed(2)}px)`;\n          }\n          divStyle.fontSize = `${scaleFactorStr}${fontHeight.toFixed(2)}px)`;\n          divStyle.fontFamily = style.fontFamily;\n          textDivProperties.fontSize = fontHeight;\n          textDiv.setAttribute(\"role\", \"presentation\");\n          textDiv.textContent = geom.str;\n          textDiv.dir = geom.dir;\n          if (task._fontInspectorEnabled) {\n            textDiv.dataset.fontName = geom.fontName;\n          }\n          if (angle !== 0) {\n            textDivProperties.angle = angle * (180 / Math.PI);\n          }\n          let shouldScaleText = false;\n          if (geom.str.length > 1) {\n            shouldScaleText = true;\n          } else if (geom.str !== \" \" && geom.transform[0] !== geom.transform[3]) {\n            const absScaleX = Math.abs(geom.transform[0]),\n              absScaleY = Math.abs(geom.transform[3]);\n            if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) {\n              shouldScaleText = true;\n            }\n          }\n          if (shouldScaleText) {\n            textDivProperties.canvasWidth = style.vertical ? geom.height : geom.width;\n          }\n          task._textDivProperties.set(textDiv, textDivProperties);\n          if (task._isReadableStream) {\n            task._layoutText(textDiv);\n          }\n        }\n        function layout(params) {\n          const {\n            div,\n            scale,\n            properties,\n            ctx,\n            prevFontSize,\n            prevFontFamily\n          } = params;\n          const {\n            style\n          } = div;\n          let transform = \"\";\n          if (properties.canvasWidth !== 0 && properties.hasText) {\n            const {\n              fontFamily\n            } = style;\n            const {\n              canvasWidth,\n              fontSize\n            } = properties;\n            if (prevFontSize !== fontSize || prevFontFamily !== fontFamily) {\n              ctx.font = `${fontSize * scale}px ${fontFamily}`;\n              params.prevFontSize = fontSize;\n              params.prevFontFamily = fontFamily;\n            }\n            const {\n              width\n            } = ctx.measureText(div.textContent);\n            if (width > 0) {\n              transform = `scaleX(${canvasWidth * scale / width})`;\n            }\n          }\n          if (properties.angle !== 0) {\n            transform = `rotate(${properties.angle}deg) ${transform}`;\n          }\n          if (transform.length > 0) {\n            style.transform = transform;\n          }\n        }\n        function render(task) {\n          if (task._canceled) {\n            return;\n          }\n          const textDivs = task._textDivs;\n          const capability = task._capability;\n          const textDivsLength = textDivs.length;\n          if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) {\n            capability.resolve();\n            return;\n          }\n          if (!task._isReadableStream) {\n            for (const textDiv of textDivs) {\n              task._layoutText(textDiv);\n            }\n          }\n          capability.resolve();\n        }\n        class TextLayerRenderTask {\n          constructor({\n            textContentSource,\n            container,\n            viewport,\n            textDivs,\n            textDivProperties,\n            textContentItemsStr,\n            isOffscreenCanvasSupported\n          }) {\n            this._textContentSource = textContentSource;\n            this._isReadableStream = textContentSource instanceof ReadableStream;\n            this._container = this._rootContainer = container;\n            this._textDivs = textDivs || [];\n            this._textContentItemsStr = textContentItemsStr || [];\n            this._isOffscreenCanvasSupported = isOffscreenCanvasSupported;\n            this._fontInspectorEnabled = !!globalThis.FontInspector?.enabled;\n            this._reader = null;\n            this._textDivProperties = textDivProperties || new WeakMap();\n            this._canceled = false;\n            this._capability = new _util.PromiseCapability();\n            this._layoutTextParams = {\n              prevFontSize: null,\n              prevFontFamily: null,\n              div: null,\n              scale: viewport.scale * (globalThis.devicePixelRatio || 1),\n              properties: null,\n              ctx: getCtx(0, isOffscreenCanvasSupported)\n            };\n            const {\n              pageWidth,\n              pageHeight,\n              pageX,\n              pageY\n            } = viewport.rawDims;\n            this._transform = [1, 0, 0, -1, -pageX, pageY + pageHeight];\n            this._pageWidth = pageWidth;\n            this._pageHeight = pageHeight;\n            (0, _display_utils.setLayerDimensions)(container, viewport);\n            this._capability.promise.finally(() => {\n              this._layoutTextParams = null;\n            }).catch(() => {});\n          }\n          get promise() {\n            return this._capability.promise;\n          }\n          cancel() {\n            this._canceled = true;\n            if (this._reader) {\n              this._reader.cancel(new _util.AbortException(\"TextLayer task cancelled.\")).catch(() => {});\n              this._reader = null;\n            }\n            this._capability.reject(new _util.AbortException(\"TextLayer task cancelled.\"));\n          }\n          _processItems(items, styleCache) {\n            for (const item of items) {\n              if (item.str === undefined) {\n                if (item.type === \"beginMarkedContentProps\" || item.type === \"beginMarkedContent\") {\n                  const parent = this._container;\n                  this._container = document.createElement(\"span\");\n                  this._container.classList.add(\"markedContent\");\n                  if (item.id !== null) {\n                    this._container.setAttribute(\"id\", `${item.id}`);\n                  }\n                  parent.append(this._container);\n                } else if (item.type === \"endMarkedContent\") {\n                  this._container = this._container.parentNode;\n                }\n                continue;\n              }\n              this._textContentItemsStr.push(item.str);\n              appendText(this, item, styleCache);\n            }\n          }\n          _layoutText(textDiv) {\n            const textDivProperties = this._layoutTextParams.properties = this._textDivProperties.get(textDiv);\n            this._layoutTextParams.div = textDiv;\n            layout(this._layoutTextParams);\n            if (textDivProperties.hasText) {\n              this._container.append(textDiv);\n            }\n            if (textDivProperties.hasEOL) {\n              const br = document.createElement(\"br\");\n              br.setAttribute(\"role\", \"presentation\");\n              this._container.append(br);\n            }\n          }\n          _render() {\n            const capability = new _util.PromiseCapability();\n            let styleCache = Object.create(null);\n            if (this._isReadableStream) {\n              const pump = () => {\n                this._reader.read().then(({\n                  value,\n                  done\n                }) => {\n                  if (done) {\n                    capability.resolve();\n                    return;\n                  }\n                  Object.assign(styleCache, value.styles);\n                  this._processItems(value.items, styleCache);\n                  pump();\n                }, capability.reject);\n              };\n              this._reader = this._textContentSource.getReader();\n              pump();\n            } else if (this._textContentSource) {\n              const {\n                items,\n                styles\n              } = this._textContentSource;\n              this._processItems(items, styles);\n              capability.resolve();\n            } else {\n              throw new Error('No \"textContentSource\" parameter specified.');\n            }\n            capability.promise.then(() => {\n              styleCache = null;\n              render(this);\n            }, this._capability.reject);\n          }\n        }\n        exports.TextLayerRenderTask = TextLayerRenderTask;\n        function renderTextLayer(params) {\n          if (!params.textContentSource && (params.textContent || params.textContentStream)) {\n            (0, _display_utils.deprecated)(\"The TextLayerRender `textContent`/`textContentStream` parameters \" + \"will be removed in the future, please use `textContentSource` instead.\");\n            params.textContentSource = params.textContent || params.textContentStream;\n          }\n          const {\n            container,\n            viewport\n          } = params;\n          const style = getComputedStyle(container);\n          const visibility = style.getPropertyValue(\"visibility\");\n          const scaleFactor = parseFloat(style.getPropertyValue(\"--scale-factor\"));\n          if (visibility === \"visible\" && (!scaleFactor || Math.abs(scaleFactor - viewport.scale) > 1e-5)) {\n            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.\");\n          }\n          const task = new TextLayerRenderTask(params);\n          task._render();\n          return task;\n        }\n        function updateTextLayer({\n          container,\n          viewport,\n          textDivs,\n          textDivProperties,\n          isOffscreenCanvasSupported,\n          mustRotate = true,\n          mustRescale = true\n        }) {\n          if (mustRotate) {\n            (0, _display_utils.setLayerDimensions)(container, {\n              rotation: viewport.rotation\n            });\n          }\n          if (mustRescale) {\n            const ctx = getCtx(0, isOffscreenCanvasSupported);\n            const scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n            const params = {\n              prevFontSize: null,\n              prevFontFamily: null,\n              div: null,\n              scale,\n              properties: null,\n              ctx\n            };\n            for (const div of textDivs) {\n              params.properties = textDivProperties.get(div);\n              params.div = div;\n              layout(params);\n            }\n          }\n        }\n\n        /***/\n      }, /* 27 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.AnnotationEditorLayer = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _editor = __w_pdfjs_require__(4);\n        var _freetext = __w_pdfjs_require__(28);\n        var _ink = __w_pdfjs_require__(33);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _stamp = __w_pdfjs_require__(34);\n        class AnnotationEditorLayer {\n          #accessibilityManager;\n          #allowClick = false;\n          #annotationLayer = null;\n          #boundPointerup = this.pointerup.bind(this);\n          #boundPointerdown = this.pointerdown.bind(this);\n          #editors = new Map();\n          #hadPointerDown = false;\n          #isCleaningUp = false;\n          #isDisabling = false;\n          #uiManager;\n          static _initialized = false;\n          constructor({\n            uiManager,\n            pageIndex,\n            div,\n            accessibilityManager,\n            annotationLayer,\n            viewport,\n            l10n\n          }) {\n            const editorTypes = [_freetext.FreeTextEditor, _ink.InkEditor, _stamp.StampEditor];\n            if (!AnnotationEditorLayer._initialized) {\n              AnnotationEditorLayer._initialized = true;\n              for (const editorType of editorTypes) {\n                editorType.initialize(l10n);\n              }\n            }\n            uiManager.registerEditorTypes(editorTypes);\n            this.#uiManager = uiManager;\n            this.pageIndex = pageIndex;\n            this.div = div;\n            this.#accessibilityManager = accessibilityManager;\n            this.#annotationLayer = annotationLayer;\n            this.viewport = viewport;\n            this.#uiManager.addLayer(this);\n          }\n          get isEmpty() {\n            return this.#editors.size === 0;\n          }\n          updateToolbar(mode) {\n            this.#uiManager.updateToolbar(mode);\n          }\n          updateMode(mode = this.#uiManager.getMode()) {\n            this.#cleanup();\n            if (mode === _util.AnnotationEditorType.INK) {\n              this.addInkEditorIfNeeded(false);\n              this.disableClick();\n            } else {\n              this.enableClick();\n            }\n            if (mode !== _util.AnnotationEditorType.NONE) {\n              this.div.classList.toggle(\"freeTextEditing\", mode === _util.AnnotationEditorType.FREETEXT);\n              this.div.classList.toggle(\"inkEditing\", mode === _util.AnnotationEditorType.INK);\n              this.div.classList.toggle(\"stampEditing\", mode === _util.AnnotationEditorType.STAMP);\n              this.div.hidden = false;\n            }\n          }\n          addInkEditorIfNeeded(isCommitting) {\n            if (!isCommitting && this.#uiManager.getMode() !== _util.AnnotationEditorType.INK) {\n              return;\n            }\n            if (!isCommitting) {\n              for (const editor of this.#editors.values()) {\n                if (editor.isEmpty()) {\n                  editor.setInBackground();\n                  return;\n                }\n              }\n            }\n            const editor = this.#createAndAddNewEditor({\n              offsetX: 0,\n              offsetY: 0\n            }, false);\n            editor.setInBackground();\n          }\n          setEditingState(isEditing) {\n            this.#uiManager.setEditingState(isEditing);\n          }\n          addCommands(params) {\n            this.#uiManager.addCommands(params);\n          }\n          enable() {\n            this.div.style.pointerEvents = \"auto\";\n            const annotationElementIds = new Set();\n            for (const editor of this.#editors.values()) {\n              editor.enableEditing();\n              if (editor.annotationElementId) {\n                annotationElementIds.add(editor.annotationElementId);\n              }\n            }\n            if (!this.#annotationLayer) {\n              return;\n            }\n            const editables = this.#annotationLayer.getEditableAnnotations();\n            for (const editable of editables) {\n              editable.hide();\n              if (this.#uiManager.isDeletedAnnotationElement(editable.data.id)) {\n                continue;\n              }\n              if (annotationElementIds.has(editable.data.id)) {\n                continue;\n              }\n              const editor = this.deserialize(editable);\n              if (!editor) {\n                continue;\n              }\n              this.addOrRebuild(editor);\n              editor.enableEditing();\n            }\n          }\n          disable() {\n            this.#isDisabling = true;\n            this.div.style.pointerEvents = \"none\";\n            const hiddenAnnotationIds = new Set();\n            for (const editor of this.#editors.values()) {\n              editor.disableEditing();\n              if (!editor.annotationElementId || editor.serialize() !== null) {\n                hiddenAnnotationIds.add(editor.annotationElementId);\n                continue;\n              }\n              this.getEditableAnnotation(editor.annotationElementId)?.show();\n              editor.remove();\n            }\n            if (this.#annotationLayer) {\n              const editables = this.#annotationLayer.getEditableAnnotations();\n              for (const editable of editables) {\n                const {\n                  id\n                } = editable.data;\n                if (hiddenAnnotationIds.has(id) || this.#uiManager.isDeletedAnnotationElement(id)) {\n                  continue;\n                }\n                editable.show();\n              }\n            }\n            this.#cleanup();\n            if (this.isEmpty) {\n              this.div.hidden = true;\n            }\n            this.#isDisabling = false;\n          }\n          getEditableAnnotation(id) {\n            return this.#annotationLayer?.getEditableAnnotation(id) || null;\n          }\n          setActiveEditor(editor) {\n            const currentActive = this.#uiManager.getActive();\n            if (currentActive === editor) {\n              return;\n            }\n            this.#uiManager.setActiveEditor(editor);\n          }\n          enableClick() {\n            this.div.addEventListener(\"pointerdown\", this.#boundPointerdown);\n            this.div.addEventListener(\"pointerup\", this.#boundPointerup);\n          }\n          disableClick() {\n            this.div.removeEventListener(\"pointerdown\", this.#boundPointerdown);\n            this.div.removeEventListener(\"pointerup\", this.#boundPointerup);\n          }\n          attach(editor) {\n            this.#editors.set(editor.id, editor);\n            const {\n              annotationElementId\n            } = editor;\n            if (annotationElementId && this.#uiManager.isDeletedAnnotationElement(annotationElementId)) {\n              this.#uiManager.removeDeletedAnnotationElement(editor);\n            }\n          }\n          detach(editor) {\n            this.#editors.delete(editor.id);\n            this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n            if (!this.#isDisabling && editor.annotationElementId) {\n              this.#uiManager.addDeletedAnnotationElement(editor);\n            }\n          }\n          remove(editor) {\n            this.detach(editor);\n            this.#uiManager.removeEditor(editor);\n            if (editor.div.contains(document.activeElement)) {\n              setTimeout(() => {\n                this.#uiManager.focusMainContainer();\n              }, 0);\n            }\n            editor.div.remove();\n            editor.isAttachedToDOM = false;\n            if (!this.#isCleaningUp) {\n              this.addInkEditorIfNeeded(false);\n            }\n          }\n          changeParent(editor) {\n            if (editor.parent === this) {\n              return;\n            }\n            if (editor.annotationElementId) {\n              this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId);\n              _editor.AnnotationEditor.deleteAnnotationElement(editor);\n              editor.annotationElementId = null;\n            }\n            this.attach(editor);\n            editor.parent?.detach(editor);\n            editor.setParent(this);\n            if (editor.div && editor.isAttachedToDOM) {\n              editor.div.remove();\n              this.div.append(editor.div);\n            }\n          }\n          add(editor) {\n            this.changeParent(editor);\n            this.#uiManager.addEditor(editor);\n            this.attach(editor);\n            if (!editor.isAttachedToDOM) {\n              const div = editor.render();\n              this.div.append(div);\n              editor.isAttachedToDOM = true;\n            }\n            editor.fixAndSetPosition();\n            editor.onceAdded();\n            this.#uiManager.addToAnnotationStorage(editor);\n          }\n          moveEditorInDOM(editor) {\n            if (!editor.isAttachedToDOM) {\n              return;\n            }\n            const {\n              activeElement\n            } = document;\n            if (editor.div.contains(activeElement)) {\n              editor._focusEventsAllowed = false;\n              setTimeout(() => {\n                if (!editor.div.contains(document.activeElement)) {\n                  editor.div.addEventListener(\"focusin\", () => {\n                    editor._focusEventsAllowed = true;\n                  }, {\n                    once: true\n                  });\n                  activeElement.focus();\n                } else {\n                  editor._focusEventsAllowed = true;\n                }\n              }, 0);\n            }\n            editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(this.div, editor.div, editor.contentDiv, true);\n          }\n          addOrRebuild(editor) {\n            if (editor.needsToBeRebuilt()) {\n              editor.rebuild();\n            } else {\n              this.add(editor);\n            }\n          }\n          addUndoableEditor(editor) {\n            const cmd = () => editor._uiManager.rebuild(editor);\n            const undo = () => {\n              editor.remove();\n            };\n            this.addCommands({\n              cmd,\n              undo,\n              mustExec: false\n            });\n          }\n          getNextId() {\n            return this.#uiManager.getId();\n          }\n          #createNewEditor(params) {\n            switch (this.#uiManager.getMode()) {\n              case _util.AnnotationEditorType.FREETEXT:\n                return new _freetext.FreeTextEditor(params);\n              case _util.AnnotationEditorType.INK:\n                return new _ink.InkEditor(params);\n              case _util.AnnotationEditorType.STAMP:\n                return new _stamp.StampEditor(params);\n            }\n            return null;\n          }\n          pasteEditor(mode, params) {\n            this.#uiManager.updateToolbar(mode);\n            this.#uiManager.updateMode(mode);\n            const {\n              offsetX,\n              offsetY\n            } = this.#getCenterPoint();\n            const id = this.getNextId();\n            const editor = this.#createNewEditor({\n              parent: this,\n              id,\n              x: offsetX,\n              y: offsetY,\n              uiManager: this.#uiManager,\n              isCentered: true,\n              ...params\n            });\n            if (editor) {\n              this.add(editor);\n            }\n          }\n          deserialize(data) {\n            switch (data.annotationType ?? data.annotationEditorType) {\n              case _util.AnnotationEditorType.FREETEXT:\n                return _freetext.FreeTextEditor.deserialize(data, this, this.#uiManager);\n              case _util.AnnotationEditorType.INK:\n                return _ink.InkEditor.deserialize(data, this, this.#uiManager);\n              case _util.AnnotationEditorType.STAMP:\n                return _stamp.StampEditor.deserialize(data, this, this.#uiManager);\n            }\n            return null;\n          }\n          #createAndAddNewEditor(event, isCentered) {\n            const id = this.getNextId();\n            const editor = this.#createNewEditor({\n              parent: this,\n              id,\n              x: event.offsetX,\n              y: event.offsetY,\n              uiManager: this.#uiManager,\n              isCentered\n            });\n            if (editor) {\n              this.add(editor);\n            }\n            return editor;\n          }\n          #getCenterPoint() {\n            const {\n              x,\n              y,\n              width,\n              height\n            } = this.div.getBoundingClientRect();\n            const tlX = Math.max(0, x);\n            const tlY = Math.max(0, y);\n            const brX = Math.min(window.innerWidth, x + width);\n            const brY = Math.min(window.innerHeight, y + height);\n            const centerX = (tlX + brX) / 2 - x;\n            const centerY = (tlY + brY) / 2 - y;\n            const [offsetX, offsetY] = this.viewport.rotation % 180 === 0 ? [centerX, centerY] : [centerY, centerX];\n            return {\n              offsetX,\n              offsetY\n            };\n          }\n          addNewEditor() {\n            this.#createAndAddNewEditor(this.#getCenterPoint(), true);\n          }\n          setSelected(editor) {\n            this.#uiManager.setSelected(editor);\n          }\n          toggleSelected(editor) {\n            this.#uiManager.toggleSelected(editor);\n          }\n          isSelected(editor) {\n            return this.#uiManager.isSelected(editor);\n          }\n          unselect(editor) {\n            this.#uiManager.unselect(editor);\n          }\n          pointerup(event) {\n            const {\n              isMac\n            } = _util.FeatureTest.platform;\n            if (event.button !== 0 || event.ctrlKey && isMac) {\n              return;\n            }\n            if (event.target !== this.div) {\n              return;\n            }\n            if (!this.#hadPointerDown) {\n              return;\n            }\n            this.#hadPointerDown = false;\n            if (!this.#allowClick) {\n              this.#allowClick = true;\n              return;\n            }\n            if (this.#uiManager.getMode() === _util.AnnotationEditorType.STAMP) {\n              this.#uiManager.unselectAll();\n              return;\n            }\n            this.#createAndAddNewEditor(event, false);\n          }\n          pointerdown(event) {\n            if (this.#hadPointerDown) {\n              this.#hadPointerDown = false;\n              return;\n            }\n            const {\n              isMac\n            } = _util.FeatureTest.platform;\n            if (event.button !== 0 || event.ctrlKey && isMac) {\n              return;\n            }\n            if (event.target !== this.div) {\n              return;\n            }\n            this.#hadPointerDown = true;\n            const editor = this.#uiManager.getActive();\n            this.#allowClick = !editor || editor.isEmpty();\n          }\n          findNewParent(editor, x, y) {\n            const layer = this.#uiManager.findParent(x, y);\n            if (layer === null || layer === this) {\n              return false;\n            }\n            layer.changeParent(editor);\n            return true;\n          }\n          destroy() {\n            if (this.#uiManager.getActive()?.parent === this) {\n              this.#uiManager.commitOrRemove();\n              this.#uiManager.setActiveEditor(null);\n            }\n            for (const editor of this.#editors.values()) {\n              this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n              editor.setParent(null);\n              editor.isAttachedToDOM = false;\n              editor.div.remove();\n            }\n            this.div = null;\n            this.#editors.clear();\n            this.#uiManager.removeLayer(this);\n          }\n          #cleanup() {\n            this.#isCleaningUp = true;\n            for (const editor of this.#editors.values()) {\n              if (editor.isEmpty()) {\n                editor.remove();\n              }\n            }\n            this.#isCleaningUp = false;\n          }\n          render({\n            viewport\n          }) {\n            this.viewport = viewport;\n            (0, _display_utils.setLayerDimensions)(this.div, viewport);\n            for (const editor of this.#uiManager.getEditors(this.pageIndex)) {\n              this.add(editor);\n            }\n            this.updateMode();\n          }\n          update({\n            viewport\n          }) {\n            this.#uiManager.commitOrRemove();\n            this.viewport = viewport;\n            (0, _display_utils.setLayerDimensions)(this.div, {\n              rotation: viewport.rotation\n            });\n            this.updateMode();\n          }\n          get pageDimensions() {\n            const {\n              pageWidth,\n              pageHeight\n            } = this.viewport.rawDims;\n            return [pageWidth, pageHeight];\n          }\n        }\n        exports.AnnotationEditorLayer = AnnotationEditorLayer;\n\n        /***/\n      }, /* 28 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.FreeTextEditor = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _tools = __w_pdfjs_require__(5);\n        var _editor = __w_pdfjs_require__(4);\n        var _annotation_layer = __w_pdfjs_require__(29);\n        class FreeTextEditor extends _editor.AnnotationEditor {\n          #boundEditorDivBlur = this.editorDivBlur.bind(this);\n          #boundEditorDivFocus = this.editorDivFocus.bind(this);\n          #boundEditorDivInput = this.editorDivInput.bind(this);\n          #boundEditorDivKeydown = this.editorDivKeydown.bind(this);\n          #color;\n          #content = \"\";\n          #editorDivId = `${this.id}-editor`;\n          #fontSize;\n          #initialData = null;\n          static _freeTextDefaultContent = \"\";\n          static _internalPadding = 0;\n          static _defaultColor = null;\n          static _defaultFontSize = 10;\n          static get _keyboardManager() {\n            const proto = FreeTextEditor.prototype;\n            const arrowChecker = self => self.isEmpty();\n            const small = _tools.AnnotationEditorUIManager.TRANSLATE_SMALL;\n            const big = _tools.AnnotationEditorUIManager.TRANSLATE_BIG;\n            return (0, _util.shadow)(this, \"_keyboardManager\", new _tools.KeyboardManager([[[\"ctrl+s\", \"mac+meta+s\", \"ctrl+p\", \"mac+meta+p\"], proto.commitOrRemove, {\n              bubbles: true\n            }], [[\"ctrl+Enter\", \"mac+meta+Enter\", \"Escape\", \"mac+Escape\"], proto.commitOrRemove], [[\"ArrowLeft\", \"mac+ArrowLeft\"], proto._translateEmpty, {\n              args: [-small, 0],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], proto._translateEmpty, {\n              args: [-big, 0],\n              checker: arrowChecker\n            }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto._translateEmpty, {\n              args: [small, 0],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], proto._translateEmpty, {\n              args: [big, 0],\n              checker: arrowChecker\n            }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto._translateEmpty, {\n              args: [0, -small],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], proto._translateEmpty, {\n              args: [0, -big],\n              checker: arrowChecker\n            }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto._translateEmpty, {\n              args: [0, small],\n              checker: arrowChecker\n            }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], proto._translateEmpty, {\n              args: [0, big],\n              checker: arrowChecker\n            }]]));\n          }\n          static _type = \"freetext\";\n          constructor(params) {\n            super({\n              ...params,\n              name: \"freeTextEditor\"\n            });\n            this.#color = params.color || FreeTextEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor;\n            this.#fontSize = params.fontSize || FreeTextEditor._defaultFontSize;\n          }\n          static initialize(l10n) {\n            _editor.AnnotationEditor.initialize(l10n, {\n              strings: [\"free_text2_default_content\", \"editor_free_text2_aria_label\"]\n            });\n            const style = getComputedStyle(document.documentElement);\n            this._internalPadding = parseFloat(style.getPropertyValue(\"--freetext-padding\"));\n          }\n          static updateDefaultParams(type, value) {\n            switch (type) {\n              case _util.AnnotationEditorParamsType.FREETEXT_SIZE:\n                FreeTextEditor._defaultFontSize = value;\n                break;\n              case _util.AnnotationEditorParamsType.FREETEXT_COLOR:\n                FreeTextEditor._defaultColor = value;\n                break;\n            }\n          }\n          updateParams(type, value) {\n            switch (type) {\n              case _util.AnnotationEditorParamsType.FREETEXT_SIZE:\n                this.#updateFontSize(value);\n                break;\n              case _util.AnnotationEditorParamsType.FREETEXT_COLOR:\n                this.#updateColor(value);\n                break;\n            }\n          }\n          static get defaultPropertiesToUpdate() {\n            return [[_util.AnnotationEditorParamsType.FREETEXT_SIZE, FreeTextEditor._defaultFontSize], [_util.AnnotationEditorParamsType.FREETEXT_COLOR, FreeTextEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor]];\n          }\n          get propertiesToUpdate() {\n            return [[_util.AnnotationEditorParamsType.FREETEXT_SIZE, this.#fontSize], [_util.AnnotationEditorParamsType.FREETEXT_COLOR, this.#color]];\n          }\n          #updateFontSize(fontSize) {\n            const setFontsize = size => {\n              this.editorDiv.style.fontSize = `calc(${size}px * var(--scale-factor))`;\n              this.translate(0, -(size - this.#fontSize) * this.parentScale);\n              this.#fontSize = size;\n              this.#setEditorDimensions();\n            };\n            const savedFontsize = this.#fontSize;\n            this.addCommands({\n              cmd: () => {\n                setFontsize(fontSize);\n              },\n              undo: () => {\n                setFontsize(savedFontsize);\n              },\n              mustExec: true,\n              type: _util.AnnotationEditorParamsType.FREETEXT_SIZE,\n              overwriteIfSameType: true,\n              keepUndo: true\n            });\n          }\n          #updateColor(color) {\n            const savedColor = this.#color;\n            this.addCommands({\n              cmd: () => {\n                this.#color = this.editorDiv.style.color = color;\n              },\n              undo: () => {\n                this.#color = this.editorDiv.style.color = savedColor;\n              },\n              mustExec: true,\n              type: _util.AnnotationEditorParamsType.FREETEXT_COLOR,\n              overwriteIfSameType: true,\n              keepUndo: true\n            });\n          }\n          _translateEmpty(x, y) {\n            this._uiManager.translateSelectedEditors(x, y, true);\n          }\n          getInitialTranslation() {\n            const scale = this.parentScale;\n            return [-FreeTextEditor._internalPadding * scale, -(FreeTextEditor._internalPadding + this.#fontSize) * scale];\n          }\n          rebuild() {\n            if (!this.parent) {\n              return;\n            }\n            super.rebuild();\n            if (this.div === null) {\n              return;\n            }\n            if (!this.isAttachedToDOM) {\n              this.parent.add(this);\n            }\n          }\n          enableEditMode() {\n            if (this.isInEditMode()) {\n              return;\n            }\n            this.parent.setEditingState(false);\n            this.parent.updateToolbar(_util.AnnotationEditorType.FREETEXT);\n            super.enableEditMode();\n            this.overlayDiv.classList.remove(\"enabled\");\n            this.editorDiv.contentEditable = true;\n            this._isDraggable = false;\n            this.div.removeAttribute(\"aria-activedescendant\");\n            this.editorDiv.addEventListener(\"keydown\", this.#boundEditorDivKeydown);\n            this.editorDiv.addEventListener(\"focus\", this.#boundEditorDivFocus);\n            this.editorDiv.addEventListener(\"blur\", this.#boundEditorDivBlur);\n            this.editorDiv.addEventListener(\"input\", this.#boundEditorDivInput);\n          }\n          disableEditMode() {\n            if (!this.isInEditMode()) {\n              return;\n            }\n            this.parent.setEditingState(true);\n            super.disableEditMode();\n            this.overlayDiv.classList.add(\"enabled\");\n            this.editorDiv.contentEditable = false;\n            this.div.setAttribute(\"aria-activedescendant\", this.#editorDivId);\n            this._isDraggable = true;\n            this.editorDiv.removeEventListener(\"keydown\", this.#boundEditorDivKeydown);\n            this.editorDiv.removeEventListener(\"focus\", this.#boundEditorDivFocus);\n            this.editorDiv.removeEventListener(\"blur\", this.#boundEditorDivBlur);\n            this.editorDiv.removeEventListener(\"input\", this.#boundEditorDivInput);\n            this.div.focus({\n              preventScroll: true\n            });\n            this.isEditing = false;\n            this.parent.div.classList.add(\"freeTextEditing\");\n          }\n          focusin(event) {\n            if (!this._focusEventsAllowed) {\n              return;\n            }\n            super.focusin(event);\n            if (event.target !== this.editorDiv) {\n              this.editorDiv.focus();\n            }\n          }\n          onceAdded() {\n            if (this.width) {\n              this.#cheatInitialRect();\n              return;\n            }\n            this.enableEditMode();\n            this.editorDiv.focus();\n            if (this._initialOptions?.isCentered) {\n              this.center();\n            }\n            this._initialOptions = null;\n          }\n          isEmpty() {\n            return !this.editorDiv || this.editorDiv.innerText.trim() === \"\";\n          }\n          remove() {\n            this.isEditing = false;\n            if (this.parent) {\n              this.parent.setEditingState(true);\n              this.parent.div.classList.add(\"freeTextEditing\");\n            }\n            super.remove();\n          }\n          #extractText() {\n            const divs = this.editorDiv.getElementsByTagName(\"div\");\n            if (divs.length === 0) {\n              return this.editorDiv.innerText;\n            }\n            const buffer = [];\n            for (const div of divs) {\n              buffer.push(div.innerText.replace(/\\r\\n?|\\n/, \"\"));\n            }\n            return buffer.join(\"\\n\");\n          }\n          #setEditorDimensions() {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            let rect;\n            if (this.isAttachedToDOM) {\n              rect = this.div.getBoundingClientRect();\n            } else {\n              const {\n                currentLayer,\n                div\n              } = this;\n              const savedDisplay = div.style.display;\n              div.style.display = \"hidden\";\n              currentLayer.div.append(this.div);\n              rect = div.getBoundingClientRect();\n              div.remove();\n              div.style.display = savedDisplay;\n            }\n            if (this.rotation % 180 === this.parentRotation % 180) {\n              this.width = rect.width / parentWidth;\n              this.height = rect.height / parentHeight;\n            } else {\n              this.width = rect.height / parentWidth;\n              this.height = rect.width / parentHeight;\n            }\n            this.fixAndSetPosition();\n          }\n          commit() {\n            if (!this.isInEditMode()) {\n              return;\n            }\n            super.commit();\n            this.disableEditMode();\n            const savedText = this.#content;\n            const newText = this.#content = this.#extractText().trimEnd();\n            if (savedText === newText) {\n              return;\n            }\n            const setText = text => {\n              this.#content = text;\n              if (!text) {\n                this.remove();\n                return;\n              }\n              this.#setContent();\n              this._uiManager.rebuild(this);\n              this.#setEditorDimensions();\n            };\n            this.addCommands({\n              cmd: () => {\n                setText(newText);\n              },\n              undo: () => {\n                setText(savedText);\n              },\n              mustExec: false\n            });\n            this.#setEditorDimensions();\n          }\n          shouldGetKeyboardEvents() {\n            return this.isInEditMode();\n          }\n          enterInEditMode() {\n            this.enableEditMode();\n            this.editorDiv.focus();\n          }\n          dblclick(event) {\n            this.enterInEditMode();\n          }\n          keydown(event) {\n            if (event.target === this.div && event.key === \"Enter\") {\n              this.enterInEditMode();\n              event.preventDefault();\n            }\n          }\n          editorDivKeydown(event) {\n            FreeTextEditor._keyboardManager.exec(this, event);\n          }\n          editorDivFocus(event) {\n            this.isEditing = true;\n          }\n          editorDivBlur(event) {\n            this.isEditing = false;\n          }\n          editorDivInput(event) {\n            this.parent.div.classList.toggle(\"freeTextEditing\", this.isEmpty());\n          }\n          disableEditing() {\n            this.editorDiv.setAttribute(\"role\", \"comment\");\n            this.editorDiv.removeAttribute(\"aria-multiline\");\n          }\n          enableEditing() {\n            this.editorDiv.setAttribute(\"role\", \"textbox\");\n            this.editorDiv.setAttribute(\"aria-multiline\", true);\n          }\n          render() {\n            if (this.div) {\n              return this.div;\n            }\n            let baseX, baseY;\n            if (this.width) {\n              baseX = this.x;\n              baseY = this.y;\n            }\n            super.render();\n            this.editorDiv = document.createElement(\"div\");\n            this.editorDiv.className = \"internal\";\n            this.editorDiv.setAttribute(\"id\", this.#editorDivId);\n            this.enableEditing();\n            _editor.AnnotationEditor._l10nPromise.get(\"editor_free_text2_aria_label\").then(msg => this.editorDiv?.setAttribute(\"aria-label\", msg));\n            _editor.AnnotationEditor._l10nPromise.get(\"free_text2_default_content\").then(msg => this.editorDiv?.setAttribute(\"default-content\", msg));\n            this.editorDiv.contentEditable = true;\n            const {\n              style\n            } = this.editorDiv;\n            style.fontSize = `calc(${this.#fontSize}px * var(--scale-factor))`;\n            style.color = this.#color;\n            this.div.append(this.editorDiv);\n            this.overlayDiv = document.createElement(\"div\");\n            this.overlayDiv.classList.add(\"overlay\", \"enabled\");\n            this.div.append(this.overlayDiv);\n            (0, _tools.bindEvents)(this, this.div, [\"dblclick\", \"keydown\"]);\n            if (this.width) {\n              const [parentWidth, parentHeight] = this.parentDimensions;\n              if (this.annotationElementId) {\n                const {\n                  position\n                } = this.#initialData;\n                let [tx, ty] = this.getInitialTranslation();\n                [tx, ty] = this.pageTranslationToScreen(tx, ty);\n                const [pageWidth, pageHeight] = this.pageDimensions;\n                const [pageX, pageY] = this.pageTranslation;\n                let posX, posY;\n                switch (this.rotation) {\n                  case 0:\n                    posX = baseX + (position[0] - pageX) / pageWidth;\n                    posY = baseY + this.height - (position[1] - pageY) / pageHeight;\n                    break;\n                  case 90:\n                    posX = baseX + (position[0] - pageX) / pageWidth;\n                    posY = baseY - (position[1] - pageY) / pageHeight;\n                    [tx, ty] = [ty, -tx];\n                    break;\n                  case 180:\n                    posX = baseX - this.width + (position[0] - pageX) / pageWidth;\n                    posY = baseY - (position[1] - pageY) / pageHeight;\n                    [tx, ty] = [-tx, -ty];\n                    break;\n                  case 270:\n                    posX = baseX + (position[0] - pageX - this.height * pageHeight) / pageWidth;\n                    posY = baseY + (position[1] - pageY - this.width * pageWidth) / pageHeight;\n                    [tx, ty] = [-ty, tx];\n                    break;\n                }\n                this.setAt(posX * parentWidth, posY * parentHeight, tx, ty);\n              } else {\n                this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n              }\n              this.#setContent();\n              this._isDraggable = true;\n              this.editorDiv.contentEditable = false;\n            } else {\n              this._isDraggable = false;\n              this.editorDiv.contentEditable = true;\n            }\n            return this.div;\n          }\n          #setContent() {\n            this.editorDiv.replaceChildren();\n            if (!this.#content) {\n              return;\n            }\n            for (const line of this.#content.split(\"\\n\")) {\n              const div = document.createElement(\"div\");\n              div.append(line ? document.createTextNode(line) : document.createElement(\"br\"));\n              this.editorDiv.append(div);\n            }\n          }\n          get contentDiv() {\n            return this.editorDiv;\n          }\n          static deserialize(data, parent, uiManager) {\n            let initialData = null;\n            if (data instanceof _annotation_layer.FreeTextAnnotationElement) {\n              const {\n                data: {\n                  defaultAppearanceData: {\n                    fontSize,\n                    fontColor\n                  },\n                  rect,\n                  rotation,\n                  id\n                },\n                textContent,\n                textPosition,\n                parent: {\n                  page: {\n                    pageNumber\n                  }\n                }\n              } = data;\n              if (!textContent || textContent.length === 0) {\n                return null;\n              }\n              initialData = data = {\n                annotationType: _util.AnnotationEditorType.FREETEXT,\n                color: Array.from(fontColor),\n                fontSize,\n                value: textContent.join(\"\\n\"),\n                position: textPosition,\n                pageIndex: pageNumber - 1,\n                rect,\n                rotation,\n                id,\n                deleted: false\n              };\n            }\n            const editor = super.deserialize(data, parent, uiManager);\n            editor.#fontSize = data.fontSize;\n            editor.#color = _util.Util.makeHexColor(...data.color);\n            editor.#content = data.value;\n            editor.annotationElementId = data.id || null;\n            editor.#initialData = initialData;\n            return editor;\n          }\n          serialize(isForCopying = false) {\n            if (this.isEmpty()) {\n              return null;\n            }\n            if (this.deleted) {\n              return {\n                pageIndex: this.pageIndex,\n                id: this.annotationElementId,\n                deleted: true\n              };\n            }\n            const padding = FreeTextEditor._internalPadding * this.parentScale;\n            const rect = this.getRect(padding, padding);\n            const color = _editor.AnnotationEditor._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.#color);\n            const serialized = {\n              annotationType: _util.AnnotationEditorType.FREETEXT,\n              color,\n              fontSize: this.#fontSize,\n              value: this.#content,\n              pageIndex: this.pageIndex,\n              rect,\n              rotation: this.rotation,\n              structTreeParentId: this._structTreeParentId\n            };\n            if (isForCopying) {\n              return serialized;\n            }\n            if (this.annotationElementId && !this.#hasElementChanged(serialized)) {\n              return null;\n            }\n            serialized.id = this.annotationElementId;\n            return serialized;\n          }\n          #hasElementChanged(serialized) {\n            const {\n              value,\n              fontSize,\n              color,\n              rect,\n              pageIndex\n            } = this.#initialData;\n            return serialized.value !== value || serialized.fontSize !== fontSize || serialized.rect.some((x, i) => Math.abs(x - rect[i]) >= 1) || serialized.color.some((c, i) => c !== color[i]) || serialized.pageIndex !== pageIndex;\n          }\n          #cheatInitialRect(delayed = false) {\n            if (!this.annotationElementId) {\n              return;\n            }\n            this.#setEditorDimensions();\n            if (!delayed && (this.width === 0 || this.height === 0)) {\n              setTimeout(() => this.#cheatInitialRect(true), 0);\n              return;\n            }\n            const padding = FreeTextEditor._internalPadding * this.parentScale;\n            this.#initialData.rect = this.getRect(padding, padding);\n          }\n        }\n        exports.FreeTextEditor = FreeTextEditor;\n\n        /***/\n      }, /* 29 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.StampAnnotationElement = exports.InkAnnotationElement = exports.FreeTextAnnotationElement = exports.AnnotationLayer = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _annotation_storage = __w_pdfjs_require__(3);\n        var _scripting_utils = __w_pdfjs_require__(30);\n        var _displayL10n_utils = __w_pdfjs_require__(31);\n        var _xfa_layer = __w_pdfjs_require__(32);\n        const DEFAULT_TAB_INDEX = 1000;\n        const DEFAULT_FONT_SIZE = 9;\n        const GetElementsByNameSet = new WeakSet();\n        function getRectDims(rect) {\n          return {\n            width: rect[2] - rect[0],\n            height: rect[3] - rect[1]\n          };\n        }\n        class AnnotationElementFactory {\n          static create(parameters) {\n            const subtype = parameters.data.annotationType;\n            switch (subtype) {\n              case _util.AnnotationType.LINK:\n                return new LinkAnnotationElement(parameters);\n              case _util.AnnotationType.TEXT:\n                return new TextAnnotationElement(parameters);\n              case _util.AnnotationType.WIDGET:\n                const fieldType = parameters.data.fieldType;\n                switch (fieldType) {\n                  case \"Tx\":\n                    return new TextWidgetAnnotationElement(parameters);\n                  case \"Btn\":\n                    if (parameters.data.radioButton) {\n                      return new RadioButtonWidgetAnnotationElement(parameters);\n                    } else if (parameters.data.checkBox) {\n                      return new CheckboxWidgetAnnotationElement(parameters);\n                    }\n                    return new PushButtonWidgetAnnotationElement(parameters);\n                  case \"Ch\":\n                    return new ChoiceWidgetAnnotationElement(parameters);\n                  case \"Sig\":\n                    return new SignatureWidgetAnnotationElement(parameters);\n                }\n                return new WidgetAnnotationElement(parameters);\n              case _util.AnnotationType.POPUP:\n                return new PopupAnnotationElement(parameters);\n              case _util.AnnotationType.FREETEXT:\n                return new FreeTextAnnotationElement(parameters);\n              case _util.AnnotationType.LINE:\n                return new LineAnnotationElement(parameters);\n              case _util.AnnotationType.SQUARE:\n                return new SquareAnnotationElement(parameters);\n              case _util.AnnotationType.CIRCLE:\n                return new CircleAnnotationElement(parameters);\n              case _util.AnnotationType.POLYLINE:\n                return new PolylineAnnotationElement(parameters);\n              case _util.AnnotationType.CARET:\n                return new CaretAnnotationElement(parameters);\n              case _util.AnnotationType.INK:\n                return new InkAnnotationElement(parameters);\n              case _util.AnnotationType.POLYGON:\n                return new PolygonAnnotationElement(parameters);\n              case _util.AnnotationType.HIGHLIGHT:\n                return new HighlightAnnotationElement(parameters);\n              case _util.AnnotationType.UNDERLINE:\n                return new UnderlineAnnotationElement(parameters);\n              case _util.AnnotationType.SQUIGGLY:\n                return new SquigglyAnnotationElement(parameters);\n              case _util.AnnotationType.STRIKEOUT:\n                return new StrikeOutAnnotationElement(parameters);\n              case _util.AnnotationType.STAMP:\n                return new StampAnnotationElement(parameters);\n              case _util.AnnotationType.FILEATTACHMENT:\n                return new FileAttachmentAnnotationElement(parameters);\n              default:\n                return new AnnotationElement(parameters);\n            }\n          }\n        }\n        class AnnotationElement {\n          #hasBorder = false;\n          constructor(parameters, {\n            isRenderable = false,\n            ignoreBorder = false,\n            createQuadrilaterals = false\n          } = {}) {\n            this.isRenderable = isRenderable;\n            this.data = parameters.data;\n            this.layer = parameters.layer;\n            this.linkService = parameters.linkService;\n            this.downloadManager = parameters.downloadManager;\n            this.imageResourcesPath = parameters.imageResourcesPath;\n            this.renderForms = parameters.renderForms;\n            this.svgFactory = parameters.svgFactory;\n            this.annotationStorage = parameters.annotationStorage;\n            this.enableScripting = parameters.enableScripting;\n            this.hasJSActions = parameters.hasJSActions;\n            this._fieldObjects = parameters.fieldObjects;\n            this.parent = parameters.parent;\n            if (isRenderable) {\n              this.container = this._createContainer(ignoreBorder);\n            }\n            if (createQuadrilaterals) {\n              this._createQuadrilaterals();\n            }\n          }\n          static _hasPopupData({\n            titleObj,\n            contentsObj,\n            richText\n          }) {\n            return !!(titleObj?.str || contentsObj?.str || richText?.str);\n          }\n          get hasPopupData() {\n            return AnnotationElement._hasPopupData(this.data);\n          }\n          _createContainer(ignoreBorder) {\n            const {\n              data,\n              parent: {\n                page,\n                viewport\n              }\n            } = this;\n            const container = document.createElement(\"section\");\n            container.setAttribute(\"data-annotation-id\", data.id);\n            if (!(this instanceof WidgetAnnotationElement)) {\n              container.tabIndex = DEFAULT_TAB_INDEX;\n            }\n            container.style.zIndex = this.parent.zIndex++;\n            if (this.data.popupRef) {\n              container.setAttribute(\"aria-haspopup\", \"dialog\");\n            }\n            if (data.noRotate) {\n              container.classList.add(\"norotate\");\n            }\n            const {\n              pageWidth,\n              pageHeight,\n              pageX,\n              pageY\n            } = viewport.rawDims;\n            if (!data.rect || this instanceof PopupAnnotationElement) {\n              const {\n                rotation\n              } = data;\n              if (!data.hasOwnCanvas && rotation !== 0) {\n                this.setRotation(rotation, container);\n              }\n              return container;\n            }\n            const {\n              width,\n              height\n            } = getRectDims(data.rect);\n            const rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);\n            if (!ignoreBorder && data.borderStyle.width > 0) {\n              container.style.borderWidth = `${data.borderStyle.width}px`;\n              const horizontalRadius = data.borderStyle.horizontalCornerRadius;\n              const verticalRadius = data.borderStyle.verticalCornerRadius;\n              if (horizontalRadius > 0 || verticalRadius > 0) {\n                const radius = `calc(${horizontalRadius}px * var(--scale-factor)) / calc(${verticalRadius}px * var(--scale-factor))`;\n                container.style.borderRadius = radius;\n              } else if (this instanceof RadioButtonWidgetAnnotationElement) {\n                const radius = `calc(${width}px * var(--scale-factor)) / calc(${height}px * var(--scale-factor))`;\n                container.style.borderRadius = radius;\n              }\n              switch (data.borderStyle.style) {\n                case _util.AnnotationBorderStyleType.SOLID:\n                  container.style.borderStyle = \"solid\";\n                  break;\n                case _util.AnnotationBorderStyleType.DASHED:\n                  container.style.borderStyle = \"dashed\";\n                  break;\n                case _util.AnnotationBorderStyleType.BEVELED:\n                  (0, _util.warn)(\"Unimplemented border style: beveled\");\n                  break;\n                case _util.AnnotationBorderStyleType.INSET:\n                  (0, _util.warn)(\"Unimplemented border style: inset\");\n                  break;\n                case _util.AnnotationBorderStyleType.UNDERLINE:\n                  container.style.borderBottomStyle = \"solid\";\n                  break;\n                default:\n                  break;\n              }\n              const borderColor = data.borderColor || null;\n              if (borderColor) {\n                this.#hasBorder = true;\n                container.style.borderColor = _util.Util.makeHexColor(borderColor[0] | 0, borderColor[1] | 0, borderColor[2] | 0);\n              } else {\n                container.style.borderWidth = 0;\n              }\n            }\n            container.style.left = `${100 * (rect[0] - pageX) / pageWidth}%`;\n            container.style.top = `${100 * (rect[1] - pageY) / pageHeight}%`;\n            const {\n              rotation\n            } = data;\n            if (data.hasOwnCanvas || rotation === 0) {\n              container.style.width = `${100 * width / pageWidth}%`;\n              container.style.height = `${100 * height / pageHeight}%`;\n            } else {\n              this.setRotation(rotation, container);\n            }\n            return container;\n          }\n          setRotation(angle, container = this.container) {\n            if (!this.data.rect) {\n              return;\n            }\n            const {\n              pageWidth,\n              pageHeight\n            } = this.parent.viewport.rawDims;\n            const {\n              width,\n              height\n            } = getRectDims(this.data.rect);\n            let elementWidth, elementHeight;\n            if (angle % 180 === 0) {\n              elementWidth = 100 * width / pageWidth;\n              elementHeight = 100 * height / pageHeight;\n            } else {\n              elementWidth = 100 * height / pageWidth;\n              elementHeight = 100 * width / pageHeight;\n            }\n            container.style.width = `${elementWidth}%`;\n            container.style.height = `${elementHeight}%`;\n            container.setAttribute(\"data-main-rotation\", (360 - angle) % 360);\n          }\n          get _commonActions() {\n            const setColor = (jsName, styleName, event) => {\n              const color = event.detail[jsName];\n              const colorType = color[0];\n              const colorArray = color.slice(1);\n              event.target.style[styleName] = _scripting_utils.ColorConverters[`${colorType}_HTML`](colorArray);\n              this.annotationStorage.setValue(this.data.id, {\n                [styleName]: _scripting_utils.ColorConverters[`${colorType}_rgb`](colorArray)\n              });\n            };\n            return (0, _util.shadow)(this, \"_commonActions\", {\n              display: event => {\n                const {\n                  display\n                } = event.detail;\n                const hidden = display % 2 === 1;\n                this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n                this.annotationStorage.setValue(this.data.id, {\n                  noView: hidden,\n                  noPrint: display === 1 || display === 2\n                });\n              },\n              print: event => {\n                this.annotationStorage.setValue(this.data.id, {\n                  noPrint: !event.detail.print\n                });\n              },\n              hidden: event => {\n                const {\n                  hidden\n                } = event.detail;\n                this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n                this.annotationStorage.setValue(this.data.id, {\n                  noPrint: hidden,\n                  noView: hidden\n                });\n              },\n              focus: event => {\n                setTimeout(() => event.target.focus({\n                  preventScroll: false\n                }), 0);\n              },\n              userName: event => {\n                event.target.title = event.detail.userName;\n              },\n              readonly: event => {\n                event.target.disabled = event.detail.readonly;\n              },\n              required: event => {\n                this._setRequired(event.target, event.detail.required);\n              },\n              bgColor: event => {\n                setColor(\"bgColor\", \"backgroundColor\", event);\n              },\n              fillColor: event => {\n                setColor(\"fillColor\", \"backgroundColor\", event);\n              },\n              fgColor: event => {\n                setColor(\"fgColor\", \"color\", event);\n              },\n              textColor: event => {\n                setColor(\"textColor\", \"color\", event);\n              },\n              borderColor: event => {\n                setColor(\"borderColor\", \"borderColor\", event);\n              },\n              strokeColor: event => {\n                setColor(\"strokeColor\", \"borderColor\", event);\n              },\n              rotation: event => {\n                const angle = event.detail.rotation;\n                this.setRotation(angle);\n                this.annotationStorage.setValue(this.data.id, {\n                  rotation: angle\n                });\n              }\n            });\n          }\n          _dispatchEventFromSandbox(actions, jsEvent) {\n            const commonActions = this._commonActions;\n            for (const name of Object.keys(jsEvent.detail)) {\n              const action = actions[name] || commonActions[name];\n              action?.(jsEvent);\n            }\n          }\n          _setDefaultPropertiesFromJS(element) {\n            if (!this.enableScripting) {\n              return;\n            }\n            const storedData = this.annotationStorage.getRawValue(this.data.id);\n            if (!storedData) {\n              return;\n            }\n            const commonActions = this._commonActions;\n            for (const [actionName, detail] of Object.entries(storedData)) {\n              const action = commonActions[actionName];\n              if (action) {\n                const eventProxy = {\n                  detail: {\n                    [actionName]: detail\n                  },\n                  target: element\n                };\n                action(eventProxy);\n                delete storedData[actionName];\n              }\n            }\n          }\n          _createQuadrilaterals() {\n            if (!this.container) {\n              return;\n            }\n            const {\n              quadPoints\n            } = this.data;\n            if (!quadPoints) {\n              return;\n            }\n            const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect;\n            if (quadPoints.length === 1) {\n              const [, {\n                x: trX,\n                y: trY\n              }, {\n                x: blX,\n                y: blY\n              }] = quadPoints[0];\n              if (rectTrX === trX && rectTrY === trY && rectBlX === blX && rectBlY === blY) {\n                return;\n              }\n            }\n            const {\n              style\n            } = this.container;\n            let svgBuffer;\n            if (this.#hasBorder) {\n              const {\n                borderColor,\n                borderWidth\n              } = style;\n              style.borderWidth = 0;\n              svgBuffer = [\"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=\"${borderColor}\" stroke-width=\"${borderWidth}\">`];\n              this.container.classList.add(\"hasBorder\");\n            }\n            const width = rectTrX - rectBlX;\n            const height = rectTrY - rectBlY;\n            const {\n              svgFactory\n            } = this;\n            const svg = svgFactory.createElement(\"svg\");\n            svg.classList.add(\"quadrilateralsContainer\");\n            svg.setAttribute(\"width\", 0);\n            svg.setAttribute(\"height\", 0);\n            const defs = svgFactory.createElement(\"defs\");\n            svg.append(defs);\n            const clipPath = svgFactory.createElement(\"clipPath\");\n            const id = `clippath_${this.data.id}`;\n            clipPath.setAttribute(\"id\", id);\n            clipPath.setAttribute(\"clipPathUnits\", \"objectBoundingBox\");\n            defs.append(clipPath);\n            for (const [, {\n              x: trX,\n              y: trY\n            }, {\n              x: blX,\n              y: blY\n            }] of quadPoints) {\n              const rect = svgFactory.createElement(\"rect\");\n              const x = (blX - rectBlX) / width;\n              const y = (rectTrY - trY) / height;\n              const rectWidth = (trX - blX) / width;\n              const rectHeight = (trY - blY) / height;\n              rect.setAttribute(\"x\", x);\n              rect.setAttribute(\"y\", y);\n              rect.setAttribute(\"width\", rectWidth);\n              rect.setAttribute(\"height\", rectHeight);\n              clipPath.append(rect);\n              svgBuffer?.push(`<rect vector-effect=\"non-scaling-stroke\" x=\"${x}\" y=\"${y}\" width=\"${rectWidth}\" height=\"${rectHeight}\"/>`);\n            }\n            if (this.#hasBorder) {\n              svgBuffer.push(`</g></svg>')`);\n              style.backgroundImage = svgBuffer.join(\"\");\n            }\n            this.container.append(svg);\n            this.container.style.clipPath = `url(#${id})`;\n          }\n          _createPopup() {\n            const {\n              container,\n              data\n            } = this;\n            container.setAttribute(\"aria-haspopup\", \"dialog\");\n            const popup = new PopupAnnotationElement({\n              data: {\n                color: data.color,\n                titleObj: data.titleObj,\n                modificationDate: data.modificationDate,\n                contentsObj: data.contentsObj,\n                richText: data.richText,\n                parentRect: data.rect,\n                borderStyle: 0,\n                id: `popup_${data.id}`,\n                rotation: data.rotation\n              },\n              parent: this.parent,\n              elements: [this]\n            });\n            this.parent.div.append(popup.render());\n          }\n          render() {\n            (0, _util.unreachable)(\"Abstract method `AnnotationElement.render` called\");\n          }\n          _getElementsByName(name, skipId = null) {\n            const fields = [];\n            if (this._fieldObjects) {\n              const fieldObj = this._fieldObjects[name];\n              if (fieldObj) {\n                for (const {\n                  page,\n                  id,\n                  exportValues\n                } of fieldObj) {\n                  if (page === -1) {\n                    continue;\n                  }\n                  if (id === skipId) {\n                    continue;\n                  }\n                  const exportValue = typeof exportValues === \"string\" ? exportValues : null;\n                  const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n                  if (domElement && !GetElementsByNameSet.has(domElement)) {\n                    (0, _util.warn)(`_getElementsByName - element not allowed: ${id}`);\n                    continue;\n                  }\n                  fields.push({\n                    id,\n                    exportValue,\n                    domElement\n                  });\n                }\n              }\n              return fields;\n            }\n            for (const domElement of document.getElementsByName(name)) {\n              const {\n                exportValue\n              } = domElement;\n              const id = domElement.getAttribute(\"data-element-id\");\n              if (id === skipId) {\n                continue;\n              }\n              if (!GetElementsByNameSet.has(domElement)) {\n                continue;\n              }\n              fields.push({\n                id,\n                exportValue,\n                domElement\n              });\n            }\n            return fields;\n          }\n          show() {\n            if (this.container) {\n              this.container.hidden = false;\n            }\n            this.popup?.maybeShow();\n          }\n          hide() {\n            if (this.container) {\n              this.container.hidden = true;\n            }\n            this.popup?.forceHide();\n          }\n          getElementsToTriggerPopup() {\n            return this.container;\n          }\n          addHighlightArea() {\n            const triggers = this.getElementsToTriggerPopup();\n            if (Array.isArray(triggers)) {\n              for (const element of triggers) {\n                element.classList.add(\"highlightArea\");\n              }\n            } else {\n              triggers.classList.add(\"highlightArea\");\n            }\n          }\n          _editOnDoubleClick() {\n            const {\n              annotationEditorType: mode,\n              data: {\n                id: editId\n              }\n            } = this;\n            this.container.addEventListener(\"dblclick\", () => {\n              this.linkService.eventBus?.dispatch(\"switchannotationeditormode\", {\n                source: this,\n                mode,\n                editId\n              });\n            });\n          }\n        }\n        class LinkAnnotationElement extends AnnotationElement {\n          constructor(parameters, options = null) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: !!options?.ignoreBorder,\n              createQuadrilaterals: true\n            });\n            this.isTooltipOnly = parameters.data.isTooltipOnly;\n          }\n          render() {\n            const {\n              data,\n              linkService\n            } = this;\n            const link = document.createElement(\"a\");\n            link.setAttribute(\"data-element-id\", data.id);\n            let isBound = false;\n            if (data.url) {\n              linkService.addLinkAttributes(link, data.url, data.newWindow);\n              isBound = true;\n            } else if (data.action) {\n              this._bindNamedAction(link, data.action);\n              isBound = true;\n            } else if (data.attachment) {\n              this._bindAttachment(link, data.attachment);\n              isBound = true;\n            } else if (data.setOCGState) {\n              this.#bindSetOCGState(link, data.setOCGState);\n              isBound = true;\n            } else if (data.dest) {\n              this._bindLink(link, data.dest);\n              isBound = true;\n            } else {\n              if (data.actions && (data.actions.Action || data.actions[\"Mouse Up\"] || data.actions[\"Mouse Down\"]) && this.enableScripting && this.hasJSActions) {\n                this._bindJSAction(link, data);\n                isBound = true;\n              }\n              if (data.resetForm) {\n                this._bindResetFormAction(link, data.resetForm);\n                isBound = true;\n              } else if (this.isTooltipOnly && !isBound) {\n                this._bindLink(link, \"\");\n                isBound = true;\n              }\n            }\n            this.container.classList.add(\"linkAnnotation\");\n            if (isBound) {\n              this.container.append(link);\n            }\n            return this.container;\n          }\n          #setInternalLink() {\n            this.container.setAttribute(\"data-internal-link\", \"\");\n          }\n          _bindLink(link, destination) {\n            link.href = this.linkService.getDestinationHash(destination);\n            link.onclick = () => {\n              if (destination) {\n                this.linkService.goToDestination(destination);\n              }\n              return false;\n            };\n            if (destination || destination === \"\") {\n              this.#setInternalLink();\n            }\n          }\n          _bindNamedAction(link, action) {\n            link.href = this.linkService.getAnchorUrl(\"\");\n            link.onclick = () => {\n              this.linkService.executeNamedAction(action);\n              return false;\n            };\n            this.#setInternalLink();\n          }\n          _bindAttachment(link, attachment) {\n            link.href = this.linkService.getAnchorUrl(\"\");\n            link.onclick = () => {\n              this.downloadManager?.openOrDownloadData(this.container, attachment.content, attachment.filename);\n              return false;\n            };\n            this.#setInternalLink();\n          }\n          #bindSetOCGState(link, action) {\n            link.href = this.linkService.getAnchorUrl(\"\");\n            link.onclick = () => {\n              this.linkService.executeSetOCGState(action);\n              return false;\n            };\n            this.#setInternalLink();\n          }\n          _bindJSAction(link, data) {\n            link.href = this.linkService.getAnchorUrl(\"\");\n            const map = new Map([[\"Action\", \"onclick\"], [\"Mouse Up\", \"onmouseup\"], [\"Mouse Down\", \"onmousedown\"]]);\n            for (const name of Object.keys(data.actions)) {\n              const jsName = map.get(name);\n              if (!jsName) {\n                continue;\n              }\n              link[jsName] = () => {\n                this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                  source: this,\n                  detail: {\n                    id: data.id,\n                    name\n                  }\n                });\n                return false;\n              };\n            }\n            if (!link.onclick) {\n              link.onclick = () => false;\n            }\n            this.#setInternalLink();\n          }\n          _bindResetFormAction(link, resetForm) {\n            const otherClickAction = link.onclick;\n            if (!otherClickAction) {\n              link.href = this.linkService.getAnchorUrl(\"\");\n            }\n            this.#setInternalLink();\n            if (!this._fieldObjects) {\n              (0, _util.warn)(`_bindResetFormAction - \"resetForm\" action not supported, ` + \"ensure that the `fieldObjects` parameter is provided.\");\n              if (!otherClickAction) {\n                link.onclick = () => false;\n              }\n              return;\n            }\n            link.onclick = () => {\n              otherClickAction?.();\n              const {\n                fields: resetFormFields,\n                refs: resetFormRefs,\n                include\n              } = resetForm;\n              const allFields = [];\n              if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) {\n                const fieldIds = new Set(resetFormRefs);\n                for (const fieldName of resetFormFields) {\n                  const fields = this._fieldObjects[fieldName] || [];\n                  for (const {\n                    id\n                  } of fields) {\n                    fieldIds.add(id);\n                  }\n                }\n                for (const fields of Object.values(this._fieldObjects)) {\n                  for (const field of fields) {\n                    if (fieldIds.has(field.id) === include) {\n                      allFields.push(field);\n                    }\n                  }\n                }\n              } else {\n                for (const fields of Object.values(this._fieldObjects)) {\n                  allFields.push(...fields);\n                }\n              }\n              const storage = this.annotationStorage;\n              const allIds = [];\n              for (const field of allFields) {\n                const {\n                  id\n                } = field;\n                allIds.push(id);\n                switch (field.type) {\n                  case \"text\":\n                    {\n                      const value = field.defaultValue || \"\";\n                      storage.setValue(id, {\n                        value\n                      });\n                      break;\n                    }\n                  case \"checkbox\":\n                  case \"radiobutton\":\n                    {\n                      const value = field.defaultValue === field.exportValues;\n                      storage.setValue(id, {\n                        value\n                      });\n                      break;\n                    }\n                  case \"combobox\":\n                  case \"listbox\":\n                    {\n                      const value = field.defaultValue || \"\";\n                      storage.setValue(id, {\n                        value\n                      });\n                      break;\n                    }\n                  default:\n                    continue;\n                }\n                const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n                if (!domElement) {\n                  continue;\n                } else if (!GetElementsByNameSet.has(domElement)) {\n                  (0, _util.warn)(`_bindResetFormAction - element not allowed: ${id}`);\n                  continue;\n                }\n                domElement.dispatchEvent(new Event(\"resetform\"));\n              }\n              if (this.enableScripting) {\n                this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                  source: this,\n                  detail: {\n                    id: \"app\",\n                    ids: allIds,\n                    name: \"ResetForm\"\n                  }\n                });\n              }\n              return false;\n            };\n          }\n        }\n        class TextAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true\n            });\n          }\n          render() {\n            this.container.classList.add(\"textAnnotation\");\n            const image = document.createElement(\"img\");\n            image.src = this.imageResourcesPath + \"annotation-\" + this.data.name.toLowerCase() + \".svg\";\n            image.alt = \"[{{type}} Annotation]\";\n            image.dataset.l10nId = \"text_annotation_type\";\n            image.dataset.l10nArgs = JSON.stringify({\n              type: this.data.name\n            });\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            this.container.append(image);\n            return this.container;\n          }\n        }\n        class WidgetAnnotationElement extends AnnotationElement {\n          render() {\n            if (this.data.alternativeText) {\n              this.container.title = this.data.alternativeText;\n            }\n            return this.container;\n          }\n          showElementAndHideCanvas(element) {\n            if (this.data.hasOwnCanvas) {\n              if (element.previousSibling?.nodeName === \"CANVAS\") {\n                element.previousSibling.hidden = true;\n              }\n              element.hidden = false;\n            }\n          }\n          _getKeyModifier(event) {\n            const {\n              isWin,\n              isMac\n            } = _util.FeatureTest.platform;\n            return isWin && event.ctrlKey || isMac && event.metaKey;\n          }\n          _setEventListener(element, elementData, baseName, eventName, valueGetter) {\n            if (baseName.includes(\"mouse\")) {\n              element.addEventListener(baseName, event => {\n                this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                  source: this,\n                  detail: {\n                    id: this.data.id,\n                    name: eventName,\n                    value: valueGetter(event),\n                    shift: event.shiftKey,\n                    modifier: this._getKeyModifier(event)\n                  }\n                });\n              });\n            } else {\n              element.addEventListener(baseName, event => {\n                if (baseName === \"blur\") {\n                  if (!elementData.focused || !event.relatedTarget) {\n                    return;\n                  }\n                  elementData.focused = false;\n                } else if (baseName === \"focus\") {\n                  if (elementData.focused) {\n                    return;\n                  }\n                  elementData.focused = true;\n                }\n                if (!valueGetter) {\n                  return;\n                }\n                this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                  source: this,\n                  detail: {\n                    id: this.data.id,\n                    name: eventName,\n                    value: valueGetter(event)\n                  }\n                });\n              });\n            }\n          }\n          _setEventListeners(element, elementData, names, getter) {\n            for (const [baseName, eventName] of names) {\n              if (eventName === \"Action\" || this.data.actions?.[eventName]) {\n                if (eventName === \"Focus\" || eventName === \"Blur\") {\n                  elementData ||= {\n                    focused: false\n                  };\n                }\n                this._setEventListener(element, elementData, baseName, eventName, getter);\n                if (eventName === \"Focus\" && !this.data.actions?.Blur) {\n                  this._setEventListener(element, elementData, \"blur\", \"Blur\", null);\n                } else if (eventName === \"Blur\" && !this.data.actions?.Focus) {\n                  this._setEventListener(element, elementData, \"focus\", \"Focus\", null);\n                }\n              }\n            }\n          }\n          _setBackgroundColor(element) {\n            const color = this.data.backgroundColor || null;\n            element.style.backgroundColor = color === null ? \"transparent\" : _util.Util.makeHexColor(color[0], color[1], color[2]);\n          }\n          _setTextStyle(element) {\n            const TEXT_ALIGNMENT = [\"left\", \"center\", \"right\"];\n            const {\n              fontColor\n            } = this.data.defaultAppearanceData;\n            const fontSize = this.data.defaultAppearanceData.fontSize || DEFAULT_FONT_SIZE;\n            const style = element.style;\n            let computedFontSize;\n            const BORDER_SIZE = 2;\n            const roundToOneDecimal = x => Math.round(10 * x) / 10;\n            if (this.data.multiLine) {\n              const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE);\n              const numberOfLines = Math.round(height / (_util.LINE_FACTOR * fontSize)) || 1;\n              const lineHeight = height / numberOfLines;\n              computedFontSize = Math.min(fontSize, roundToOneDecimal(lineHeight / _util.LINE_FACTOR));\n            } else {\n              const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE);\n              computedFontSize = Math.min(fontSize, roundToOneDecimal(height / _util.LINE_FACTOR));\n            }\n            style.fontSize = `calc(${computedFontSize}px * var(--scale-factor))`;\n            style.color = _util.Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);\n            if (this.data.textAlignment !== null) {\n              style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];\n            }\n          }\n          _setRequired(element, isRequired) {\n            if (isRequired) {\n              element.setAttribute(\"required\", true);\n            } else {\n              element.removeAttribute(\"required\");\n            }\n            element.setAttribute(\"aria-required\", isRequired);\n          }\n        }\n        class TextWidgetAnnotationElement extends WidgetAnnotationElement {\n          constructor(parameters) {\n            const isRenderable = parameters.renderForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue;\n            super(parameters, {\n              isRenderable\n            });\n          }\n          setPropertyOnSiblings(base, key, value, keyInStorage) {\n            const storage = this.annotationStorage;\n            for (const element of this._getElementsByName(base.name, base.id)) {\n              if (element.domElement) {\n                element.domElement[key] = value;\n              }\n              storage.setValue(element.id, {\n                [keyInStorage]: value\n              });\n            }\n          }\n          render() {\n            const storage = this.annotationStorage;\n            const id = this.data.id;\n            this.container.classList.add(\"textWidgetAnnotation\");\n            let element = null;\n            if (this.renderForms) {\n              const storedData = storage.getValue(id, {\n                value: this.data.fieldValue\n              });\n              let textContent = storedData.value || \"\";\n              const maxLen = storage.getValue(id, {\n                charLimit: this.data.maxLen\n              }).charLimit;\n              if (maxLen && textContent.length > maxLen) {\n                textContent = textContent.slice(0, maxLen);\n              }\n              let fieldFormattedValues = storedData.formattedValue || this.data.textContent?.join(\"\\n\") || null;\n              if (fieldFormattedValues && this.data.comb) {\n                fieldFormattedValues = fieldFormattedValues.replaceAll(/\\s+/g, \"\");\n              }\n              const elementData = {\n                userValue: textContent,\n                formattedValue: fieldFormattedValues,\n                lastCommittedValue: null,\n                commitKey: 1,\n                focused: false\n              };\n              if (this.data.multiLine) {\n                element = document.createElement(\"textarea\");\n                element.textContent = fieldFormattedValues ?? textContent;\n                if (this.data.doNotScroll) {\n                  element.style.overflowY = \"hidden\";\n                }\n              } else {\n                element = document.createElement(\"input\");\n                element.type = \"text\";\n                element.setAttribute(\"value\", fieldFormattedValues ?? textContent);\n                if (this.data.doNotScroll) {\n                  element.style.overflowX = \"hidden\";\n                }\n              }\n              if (this.data.hasOwnCanvas) {\n                element.hidden = true;\n              }\n              GetElementsByNameSet.add(element);\n              element.setAttribute(\"data-element-id\", id);\n              element.disabled = this.data.readOnly;\n              element.name = this.data.fieldName;\n              element.tabIndex = DEFAULT_TAB_INDEX;\n              this._setRequired(element, this.data.required);\n              if (maxLen) {\n                element.maxLength = maxLen;\n              }\n              element.addEventListener(\"input\", event => {\n                storage.setValue(id, {\n                  value: event.target.value\n                });\n                this.setPropertyOnSiblings(element, \"value\", event.target.value, \"value\");\n                elementData.formattedValue = null;\n              });\n              element.addEventListener(\"resetform\", event => {\n                const defaultValue = this.data.defaultFieldValue ?? \"\";\n                element.value = elementData.userValue = defaultValue;\n                elementData.formattedValue = null;\n              });\n              let blurListener = event => {\n                const {\n                  formattedValue\n                } = elementData;\n                if (formattedValue !== null && formattedValue !== undefined) {\n                  event.target.value = formattedValue;\n                }\n                event.target.scrollLeft = 0;\n              };\n              if (this.enableScripting && this.hasJSActions) {\n                element.addEventListener(\"focus\", event => {\n                  if (elementData.focused) {\n                    return;\n                  }\n                  const {\n                    target\n                  } = event;\n                  if (elementData.userValue) {\n                    target.value = elementData.userValue;\n                  }\n                  elementData.lastCommittedValue = target.value;\n                  elementData.commitKey = 1;\n                  elementData.focused = true;\n                });\n                element.addEventListener(\"updatefromsandbox\", jsEvent => {\n                  this.showElementAndHideCanvas(jsEvent.target);\n                  const actions = {\n                    value(event) {\n                      elementData.userValue = event.detail.value ?? \"\";\n                      storage.setValue(id, {\n                        value: elementData.userValue.toString()\n                      });\n                      event.target.value = elementData.userValue;\n                    },\n                    formattedValue(event) {\n                      const {\n                        formattedValue\n                      } = event.detail;\n                      elementData.formattedValue = formattedValue;\n                      if (formattedValue !== null && formattedValue !== undefined && event.target !== document.activeElement) {\n                        event.target.value = formattedValue;\n                      }\n                      storage.setValue(id, {\n                        formattedValue\n                      });\n                    },\n                    selRange(event) {\n                      event.target.setSelectionRange(...event.detail.selRange);\n                    },\n                    charLimit: event => {\n                      const {\n                        charLimit\n                      } = event.detail;\n                      const {\n                        target\n                      } = event;\n                      if (charLimit === 0) {\n                        target.removeAttribute(\"maxLength\");\n                        return;\n                      }\n                      target.setAttribute(\"maxLength\", charLimit);\n                      let value = elementData.userValue;\n                      if (!value || value.length <= charLimit) {\n                        return;\n                      }\n                      value = value.slice(0, charLimit);\n                      target.value = elementData.userValue = value;\n                      storage.setValue(id, {\n                        value\n                      });\n                      this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                        source: this,\n                        detail: {\n                          id,\n                          name: \"Keystroke\",\n                          value,\n                          willCommit: true,\n                          commitKey: 1,\n                          selStart: target.selectionStart,\n                          selEnd: target.selectionEnd\n                        }\n                      });\n                    }\n                  };\n                  this._dispatchEventFromSandbox(actions, jsEvent);\n                });\n                element.addEventListener(\"keydown\", event => {\n                  elementData.commitKey = 1;\n                  let commitKey = -1;\n                  if (event.key === \"Escape\") {\n                    commitKey = 0;\n                  } else if (event.key === \"Enter\" && !this.data.multiLine) {\n                    commitKey = 2;\n                  } else if (event.key === \"Tab\") {\n                    elementData.commitKey = 3;\n                  }\n                  if (commitKey === -1) {\n                    return;\n                  }\n                  const {\n                    value\n                  } = event.target;\n                  if (elementData.lastCommittedValue === value) {\n                    return;\n                  }\n                  elementData.lastCommittedValue = value;\n                  elementData.userValue = value;\n                  this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                    source: this,\n                    detail: {\n                      id,\n                      name: \"Keystroke\",\n                      value,\n                      willCommit: true,\n                      commitKey,\n                      selStart: event.target.selectionStart,\n                      selEnd: event.target.selectionEnd\n                    }\n                  });\n                });\n                const _blurListener = blurListener;\n                blurListener = null;\n                element.addEventListener(\"blur\", event => {\n                  if (!elementData.focused || !event.relatedTarget) {\n                    return;\n                  }\n                  elementData.focused = false;\n                  const {\n                    value\n                  } = event.target;\n                  elementData.userValue = value;\n                  if (elementData.lastCommittedValue !== value) {\n                    this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                      source: this,\n                      detail: {\n                        id,\n                        name: \"Keystroke\",\n                        value,\n                        willCommit: true,\n                        commitKey: elementData.commitKey,\n                        selStart: event.target.selectionStart,\n                        selEnd: event.target.selectionEnd\n                      }\n                    });\n                  }\n                  _blurListener(event);\n                });\n                if (this.data.actions?.Keystroke) {\n                  element.addEventListener(\"beforeinput\", event => {\n                    elementData.lastCommittedValue = null;\n                    const {\n                      data,\n                      target\n                    } = event;\n                    const {\n                      value,\n                      selectionStart,\n                      selectionEnd\n                    } = target;\n                    let selStart = selectionStart,\n                      selEnd = selectionEnd;\n                    switch (event.inputType) {\n                      case \"deleteWordBackward\":\n                        {\n                          const match = value.substring(0, selectionStart).match(/\\w*[^\\w]*$/);\n                          if (match) {\n                            selStart -= match[0].length;\n                          }\n                          break;\n                        }\n                      case \"deleteWordForward\":\n                        {\n                          const match = value.substring(selectionStart).match(/^[^\\w]*\\w*/);\n                          if (match) {\n                            selEnd += match[0].length;\n                          }\n                          break;\n                        }\n                      case \"deleteContentBackward\":\n                        if (selectionStart === selectionEnd) {\n                          selStart -= 1;\n                        }\n                        break;\n                      case \"deleteContentForward\":\n                        if (selectionStart === selectionEnd) {\n                          selEnd += 1;\n                        }\n                        break;\n                    }\n                    event.preventDefault();\n                    this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                      source: this,\n                      detail: {\n                        id,\n                        name: \"Keystroke\",\n                        value,\n                        change: data || \"\",\n                        willCommit: false,\n                        selStart,\n                        selEnd\n                      }\n                    });\n                  });\n                }\n                this._setEventListeners(element, elementData, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.value);\n              }\n              if (blurListener) {\n                element.addEventListener(\"blur\", blurListener);\n              }\n              if (this.data.comb) {\n                const fieldWidth = this.data.rect[2] - this.data.rect[0];\n                const combWidth = fieldWidth / maxLen;\n                element.classList.add(\"comb\");\n                element.style.letterSpacing = `calc(${combWidth}px * var(--scale-factor) - 1ch)`;\n              }\n            } else {\n              element = document.createElement(\"div\");\n              element.textContent = this.data.fieldValue;\n              element.style.verticalAlign = \"middle\";\n              element.style.display = \"table-cell\";\n            }\n            this._setTextStyle(element);\n            this._setBackgroundColor(element);\n            this._setDefaultPropertiesFromJS(element);\n            this.container.append(element);\n            return this.container;\n          }\n        }\n        class SignatureWidgetAnnotationElement extends WidgetAnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: !!parameters.data.hasOwnCanvas\n            });\n          }\n        }\n        class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: parameters.renderForms\n            });\n          }\n          render() {\n            const storage = this.annotationStorage;\n            const data = this.data;\n            const id = data.id;\n            let value = storage.getValue(id, {\n              value: data.exportValue === data.fieldValue\n            }).value;\n            if (typeof value === \"string\") {\n              value = value !== \"Off\";\n              storage.setValue(id, {\n                value\n              });\n            }\n            this.container.classList.add(\"buttonWidgetAnnotation\", \"checkBox\");\n            const element = document.createElement(\"input\");\n            GetElementsByNameSet.add(element);\n            element.setAttribute(\"data-element-id\", id);\n            element.disabled = data.readOnly;\n            this._setRequired(element, this.data.required);\n            element.type = \"checkbox\";\n            element.name = data.fieldName;\n            if (value) {\n              element.setAttribute(\"checked\", true);\n            }\n            element.setAttribute(\"exportValue\", data.exportValue);\n            element.tabIndex = DEFAULT_TAB_INDEX;\n            element.addEventListener(\"change\", event => {\n              const {\n                name,\n                checked\n              } = event.target;\n              for (const checkbox of this._getElementsByName(name, id)) {\n                const curChecked = checked && checkbox.exportValue === data.exportValue;\n                if (checkbox.domElement) {\n                  checkbox.domElement.checked = curChecked;\n                }\n                storage.setValue(checkbox.id, {\n                  value: curChecked\n                });\n              }\n              storage.setValue(id, {\n                value: checked\n              });\n            });\n            element.addEventListener(\"resetform\", event => {\n              const defaultValue = data.defaultFieldValue || \"Off\";\n              event.target.checked = defaultValue === data.exportValue;\n            });\n            if (this.enableScripting && this.hasJSActions) {\n              element.addEventListener(\"updatefromsandbox\", jsEvent => {\n                const actions = {\n                  value(event) {\n                    event.target.checked = event.detail.value !== \"Off\";\n                    storage.setValue(id, {\n                      value: event.target.checked\n                    });\n                  }\n                };\n                this._dispatchEventFromSandbox(actions, jsEvent);\n              });\n              this._setEventListeners(element, null, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.checked);\n            }\n            this._setBackgroundColor(element);\n            this._setDefaultPropertiesFromJS(element);\n            this.container.append(element);\n            return this.container;\n          }\n        }\n        class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: parameters.renderForms\n            });\n          }\n          render() {\n            this.container.classList.add(\"buttonWidgetAnnotation\", \"radioButton\");\n            const storage = this.annotationStorage;\n            const data = this.data;\n            const id = data.id;\n            let value = storage.getValue(id, {\n              value: data.fieldValue === data.buttonValue\n            }).value;\n            if (typeof value === \"string\") {\n              value = value !== data.buttonValue;\n              storage.setValue(id, {\n                value\n              });\n            }\n            const element = document.createElement(\"input\");\n            GetElementsByNameSet.add(element);\n            element.setAttribute(\"data-element-id\", id);\n            element.disabled = data.readOnly;\n            this._setRequired(element, this.data.required);\n            element.type = \"radio\";\n            element.name = data.fieldName;\n            if (value) {\n              element.setAttribute(\"checked\", true);\n            }\n            element.tabIndex = DEFAULT_TAB_INDEX;\n            element.addEventListener(\"change\", event => {\n              const {\n                name,\n                checked\n              } = event.target;\n              for (const radio of this._getElementsByName(name, id)) {\n                storage.setValue(radio.id, {\n                  value: false\n                });\n              }\n              storage.setValue(id, {\n                value: checked\n              });\n            });\n            element.addEventListener(\"resetform\", event => {\n              const defaultValue = data.defaultFieldValue;\n              event.target.checked = defaultValue !== null && defaultValue !== undefined && defaultValue === data.buttonValue;\n            });\n            if (this.enableScripting && this.hasJSActions) {\n              const pdfButtonValue = data.buttonValue;\n              element.addEventListener(\"updatefromsandbox\", jsEvent => {\n                const actions = {\n                  value: event => {\n                    const checked = pdfButtonValue === event.detail.value;\n                    for (const radio of this._getElementsByName(event.target.name)) {\n                      const curChecked = checked && radio.id === id;\n                      if (radio.domElement) {\n                        radio.domElement.checked = curChecked;\n                      }\n                      storage.setValue(radio.id, {\n                        value: curChecked\n                      });\n                    }\n                  }\n                };\n                this._dispatchEventFromSandbox(actions, jsEvent);\n              });\n              this._setEventListeners(element, null, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.checked);\n            }\n            this._setBackgroundColor(element);\n            this._setDefaultPropertiesFromJS(element);\n            this.container.append(element);\n            return this.container;\n          }\n        }\n        class PushButtonWidgetAnnotationElement extends LinkAnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              ignoreBorder: parameters.data.hasAppearance\n            });\n          }\n          render() {\n            const container = super.render();\n            container.classList.add(\"buttonWidgetAnnotation\", \"pushButton\");\n            if (this.data.alternativeText) {\n              container.title = this.data.alternativeText;\n            }\n            const linkElement = container.lastChild;\n            if (this.enableScripting && this.hasJSActions && linkElement) {\n              this._setDefaultPropertiesFromJS(linkElement);\n              linkElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n                this._dispatchEventFromSandbox({}, jsEvent);\n              });\n            }\n            return container;\n          }\n        }\n        class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: parameters.renderForms\n            });\n          }\n          render() {\n            this.container.classList.add(\"choiceWidgetAnnotation\");\n            const storage = this.annotationStorage;\n            const id = this.data.id;\n            const storedData = storage.getValue(id, {\n              value: this.data.fieldValue\n            });\n            const selectElement = document.createElement(\"select\");\n            GetElementsByNameSet.add(selectElement);\n            selectElement.setAttribute(\"data-element-id\", id);\n            selectElement.disabled = this.data.readOnly;\n            this._setRequired(selectElement, this.data.required);\n            selectElement.name = this.data.fieldName;\n            selectElement.tabIndex = DEFAULT_TAB_INDEX;\n            let addAnEmptyEntry = this.data.combo && this.data.options.length > 0;\n            if (!this.data.combo) {\n              selectElement.size = this.data.options.length;\n              if (this.data.multiSelect) {\n                selectElement.multiple = true;\n              }\n            }\n            selectElement.addEventListener(\"resetform\", event => {\n              const defaultValue = this.data.defaultFieldValue;\n              for (const option of selectElement.options) {\n                option.selected = option.value === defaultValue;\n              }\n            });\n            for (const option of this.data.options) {\n              const optionElement = document.createElement(\"option\");\n              optionElement.textContent = option.displayValue;\n              optionElement.value = option.exportValue;\n              if (storedData.value.includes(option.exportValue)) {\n                optionElement.setAttribute(\"selected\", true);\n                addAnEmptyEntry = false;\n              }\n              selectElement.append(optionElement);\n            }\n            let removeEmptyEntry = null;\n            if (addAnEmptyEntry) {\n              const noneOptionElement = document.createElement(\"option\");\n              noneOptionElement.value = \" \";\n              noneOptionElement.setAttribute(\"hidden\", true);\n              noneOptionElement.setAttribute(\"selected\", true);\n              selectElement.prepend(noneOptionElement);\n              removeEmptyEntry = () => {\n                noneOptionElement.remove();\n                selectElement.removeEventListener(\"input\", removeEmptyEntry);\n                removeEmptyEntry = null;\n              };\n              selectElement.addEventListener(\"input\", removeEmptyEntry);\n            }\n            const getValue = isExport => {\n              const name = isExport ? \"value\" : \"textContent\";\n              const {\n                options,\n                multiple\n              } = selectElement;\n              if (!multiple) {\n                return options.selectedIndex === -1 ? null : options[options.selectedIndex][name];\n              }\n              return Array.prototype.filter.call(options, option => option.selected).map(option => option[name]);\n            };\n            let selectedValues = getValue(false);\n            const getItems = event => {\n              const options = event.target.options;\n              return Array.prototype.map.call(options, option => {\n                return {\n                  displayValue: option.textContent,\n                  exportValue: option.value\n                };\n              });\n            };\n            if (this.enableScripting && this.hasJSActions) {\n              selectElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n                const actions = {\n                  value(event) {\n                    removeEmptyEntry?.();\n                    const value = event.detail.value;\n                    const values = new Set(Array.isArray(value) ? value : [value]);\n                    for (const option of selectElement.options) {\n                      option.selected = values.has(option.value);\n                    }\n                    storage.setValue(id, {\n                      value: getValue(true)\n                    });\n                    selectedValues = getValue(false);\n                  },\n                  multipleSelection(event) {\n                    selectElement.multiple = true;\n                  },\n                  remove(event) {\n                    const options = selectElement.options;\n                    const index = event.detail.remove;\n                    options[index].selected = false;\n                    selectElement.remove(index);\n                    if (options.length > 0) {\n                      const i = Array.prototype.findIndex.call(options, option => option.selected);\n                      if (i === -1) {\n                        options[0].selected = true;\n                      }\n                    }\n                    storage.setValue(id, {\n                      value: getValue(true),\n                      items: getItems(event)\n                    });\n                    selectedValues = getValue(false);\n                  },\n                  clear(event) {\n                    while (selectElement.length !== 0) {\n                      selectElement.remove(0);\n                    }\n                    storage.setValue(id, {\n                      value: null,\n                      items: []\n                    });\n                    selectedValues = getValue(false);\n                  },\n                  insert(event) {\n                    const {\n                      index,\n                      displayValue,\n                      exportValue\n                    } = event.detail.insert;\n                    const selectChild = selectElement.children[index];\n                    const optionElement = document.createElement(\"option\");\n                    optionElement.textContent = displayValue;\n                    optionElement.value = exportValue;\n                    if (selectChild) {\n                      selectChild.before(optionElement);\n                    } else {\n                      selectElement.append(optionElement);\n                    }\n                    storage.setValue(id, {\n                      value: getValue(true),\n                      items: getItems(event)\n                    });\n                    selectedValues = getValue(false);\n                  },\n                  items(event) {\n                    const {\n                      items\n                    } = event.detail;\n                    while (selectElement.length !== 0) {\n                      selectElement.remove(0);\n                    }\n                    for (const item of items) {\n                      const {\n                        displayValue,\n                        exportValue\n                      } = item;\n                      const optionElement = document.createElement(\"option\");\n                      optionElement.textContent = displayValue;\n                      optionElement.value = exportValue;\n                      selectElement.append(optionElement);\n                    }\n                    if (selectElement.options.length > 0) {\n                      selectElement.options[0].selected = true;\n                    }\n                    storage.setValue(id, {\n                      value: getValue(true),\n                      items: getItems(event)\n                    });\n                    selectedValues = getValue(false);\n                  },\n                  indices(event) {\n                    const indices = new Set(event.detail.indices);\n                    for (const option of event.target.options) {\n                      option.selected = indices.has(option.index);\n                    }\n                    storage.setValue(id, {\n                      value: getValue(true)\n                    });\n                    selectedValues = getValue(false);\n                  },\n                  editable(event) {\n                    event.target.disabled = !event.detail.editable;\n                  }\n                };\n                this._dispatchEventFromSandbox(actions, jsEvent);\n              });\n              selectElement.addEventListener(\"input\", event => {\n                const exportValue = getValue(true);\n                storage.setValue(id, {\n                  value: exportValue\n                });\n                event.preventDefault();\n                this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                  source: this,\n                  detail: {\n                    id,\n                    name: \"Keystroke\",\n                    value: selectedValues,\n                    changeEx: exportValue,\n                    willCommit: false,\n                    commitKey: 1,\n                    keyDown: false\n                  }\n                });\n              });\n              this._setEventListeners(selectElement, null, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"], [\"input\", \"Action\"], [\"input\", \"Validate\"]], event => event.target.value);\n            } else {\n              selectElement.addEventListener(\"input\", function (event) {\n                storage.setValue(id, {\n                  value: getValue(true)\n                });\n              });\n            }\n            if (this.data.combo) {\n              this._setTextStyle(selectElement);\n            } else {}\n            this._setBackgroundColor(selectElement);\n            this._setDefaultPropertiesFromJS(selectElement);\n            this.container.append(selectElement);\n            return this.container;\n          }\n        }\n        class PopupAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            const {\n              data,\n              elements\n            } = parameters;\n            super(parameters, {\n              isRenderable: AnnotationElement._hasPopupData(data)\n            });\n            this.elements = elements;\n          }\n          render() {\n            this.container.classList.add(\"popupAnnotation\");\n            const popup = new PopupElement({\n              container: this.container,\n              color: this.data.color,\n              titleObj: this.data.titleObj,\n              modificationDate: this.data.modificationDate,\n              contentsObj: this.data.contentsObj,\n              richText: this.data.richText,\n              rect: this.data.rect,\n              parentRect: this.data.parentRect || null,\n              parent: this.parent,\n              elements: this.elements,\n              open: this.data.open\n            });\n            const elementIds = [];\n            for (const element of this.elements) {\n              element.popup = popup;\n              elementIds.push(element.data.id);\n              element.addHighlightArea();\n            }\n            this.container.setAttribute(\"aria-controls\", elementIds.map(id => `${_util.AnnotationPrefix}${id}`).join(\",\"));\n            return this.container;\n          }\n        }\n        class PopupElement {\n          #dateTimePromise = null;\n          #boundKeyDown = this.#keyDown.bind(this);\n          #boundHide = this.#hide.bind(this);\n          #boundShow = this.#show.bind(this);\n          #boundToggle = this.#toggle.bind(this);\n          #color = null;\n          #container = null;\n          #contentsObj = null;\n          #elements = null;\n          #parent = null;\n          #parentRect = null;\n          #pinned = false;\n          #popup = null;\n          #rect = null;\n          #richText = null;\n          #titleObj = null;\n          #wasVisible = false;\n          constructor({\n            container,\n            color,\n            elements,\n            titleObj,\n            modificationDate,\n            contentsObj,\n            richText,\n            parent,\n            rect,\n            parentRect,\n            open\n          }) {\n            this.#container = container;\n            this.#titleObj = titleObj;\n            this.#contentsObj = contentsObj;\n            this.#richText = richText;\n            this.#parent = parent;\n            this.#color = color;\n            this.#rect = rect;\n            this.#parentRect = parentRect;\n            this.#elements = elements;\n            const dateObject = _display_utils.PDFDateString.toDateObject(modificationDate);\n            if (dateObject) {\n              this.#dateTimePromise = parent.l10n.get(\"annotation_date_string\", {\n                date: dateObject.toLocaleDateString(),\n                time: dateObject.toLocaleTimeString()\n              });\n            }\n            this.trigger = elements.flatMap(e => e.getElementsToTriggerPopup());\n            for (const element of this.trigger) {\n              element.addEventListener(\"click\", this.#boundToggle);\n              element.addEventListener(\"mouseenter\", this.#boundShow);\n              element.addEventListener(\"mouseleave\", this.#boundHide);\n              element.classList.add(\"popupTriggerArea\");\n            }\n            for (const element of elements) {\n              element.container?.addEventListener(\"keydown\", this.#boundKeyDown);\n            }\n            this.#container.hidden = true;\n            if (open) {\n              this.#toggle();\n            }\n          }\n          render() {\n            if (this.#popup) {\n              return;\n            }\n            const {\n              page: {\n                view\n              },\n              viewport: {\n                rawDims: {\n                  pageWidth,\n                  pageHeight,\n                  pageX,\n                  pageY\n                }\n              }\n            } = this.#parent;\n            const popup = this.#popup = document.createElement(\"div\");\n            popup.className = \"popup\";\n            if (this.#color) {\n              const baseColor = popup.style.outlineColor = _util.Util.makeHexColor(...this.#color);\n              if (CSS.supports(\"background-color\", \"color-mix(in srgb, red 30%, white)\")) {\n                popup.style.backgroundColor = `color-mix(in srgb, ${baseColor} 30%, white)`;\n              } else {\n                const BACKGROUND_ENLIGHT = 0.7;\n                popup.style.backgroundColor = _util.Util.makeHexColor(...this.#color.map(c => Math.floor(BACKGROUND_ENLIGHT * (255 - c) + c)));\n              }\n            }\n            const header = document.createElement(\"span\");\n            header.className = \"header\";\n            const title = document.createElement(\"h1\");\n            header.append(title);\n            ({\n              dir: title.dir,\n              str: title.textContent\n            } = this.#titleObj);\n            popup.append(header);\n            if (this.#dateTimePromise) {\n              const modificationDate = document.createElement(\"span\");\n              modificationDate.classList.add(\"popupDate\");\n              this.#dateTimePromise.then(localized => {\n                modificationDate.textContent = localized;\n              });\n              header.append(modificationDate);\n            }\n            const contentsObj = this.#contentsObj;\n            const richText = this.#richText;\n            if (richText?.str && (!contentsObj?.str || contentsObj.str === richText.str)) {\n              _xfa_layer.XfaLayer.render({\n                xfaHtml: richText.html,\n                intent: \"richText\",\n                div: popup\n              });\n              popup.lastChild.classList.add(\"richText\", \"popupContent\");\n            } else {\n              const contents = this._formatContents(contentsObj);\n              popup.append(contents);\n            }\n            let useParentRect = !!this.#parentRect;\n            let rect = useParentRect ? this.#parentRect : this.#rect;\n            for (const element of this.#elements) {\n              if (!rect || _util.Util.intersect(element.data.rect, rect) !== null) {\n                rect = element.data.rect;\n                useParentRect = true;\n                break;\n              }\n            }\n            const normalizedRect = _util.Util.normalizeRect([rect[0], view[3] - rect[1] + view[1], rect[2], view[3] - rect[3] + view[1]]);\n            const HORIZONTAL_SPACE_AFTER_ANNOTATION = 5;\n            const parentWidth = useParentRect ? rect[2] - rect[0] + HORIZONTAL_SPACE_AFTER_ANNOTATION : 0;\n            const popupLeft = normalizedRect[0] + parentWidth;\n            const popupTop = normalizedRect[1];\n            const {\n              style\n            } = this.#container;\n            style.left = `${100 * (popupLeft - pageX) / pageWidth}%`;\n            style.top = `${100 * (popupTop - pageY) / pageHeight}%`;\n            this.#container.append(popup);\n          }\n          _formatContents({\n            str,\n            dir\n          }) {\n            const p = document.createElement(\"p\");\n            p.classList.add(\"popupContent\");\n            p.dir = dir;\n            const lines = str.split(/(?:\\r\\n?|\\n)/);\n            for (let i = 0, ii = lines.length; i < ii; ++i) {\n              const line = lines[i];\n              p.append(document.createTextNode(line));\n              if (i < ii - 1) {\n                p.append(document.createElement(\"br\"));\n              }\n            }\n            return p;\n          }\n          #keyDown(event) {\n            if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n              return;\n            }\n            if (event.key === \"Enter\" || event.key === \"Escape\" && this.#pinned) {\n              this.#toggle();\n            }\n          }\n          #toggle() {\n            this.#pinned = !this.#pinned;\n            if (this.#pinned) {\n              this.#show();\n              this.#container.addEventListener(\"click\", this.#boundToggle);\n              this.#container.addEventListener(\"keydown\", this.#boundKeyDown);\n            } else {\n              this.#hide();\n              this.#container.removeEventListener(\"click\", this.#boundToggle);\n              this.#container.removeEventListener(\"keydown\", this.#boundKeyDown);\n            }\n          }\n          #show() {\n            if (!this.#popup) {\n              this.render();\n            }\n            if (!this.isVisible) {\n              this.#container.hidden = false;\n              this.#container.style.zIndex = parseInt(this.#container.style.zIndex) + 1000;\n            } else if (this.#pinned) {\n              this.#container.classList.add(\"focused\");\n            }\n          }\n          #hide() {\n            this.#container.classList.remove(\"focused\");\n            if (this.#pinned || !this.isVisible) {\n              return;\n            }\n            this.#container.hidden = true;\n            this.#container.style.zIndex = parseInt(this.#container.style.zIndex) - 1000;\n          }\n          forceHide() {\n            this.#wasVisible = this.isVisible;\n            if (!this.#wasVisible) {\n              return;\n            }\n            this.#container.hidden = true;\n          }\n          maybeShow() {\n            if (!this.#wasVisible) {\n              return;\n            }\n            this.#wasVisible = false;\n            this.#container.hidden = false;\n          }\n          get isVisible() {\n            return this.#container.hidden === false;\n          }\n        }\n        class FreeTextAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n            this.textContent = parameters.data.textContent;\n            this.textPosition = parameters.data.textPosition;\n            this.annotationEditorType = _util.AnnotationEditorType.FREETEXT;\n          }\n          render() {\n            this.container.classList.add(\"freeTextAnnotation\");\n            if (this.textContent) {\n              const content = document.createElement(\"div\");\n              content.classList.add(\"annotationTextContent\");\n              content.setAttribute(\"role\", \"comment\");\n              for (const line of this.textContent) {\n                const lineSpan = document.createElement(\"span\");\n                lineSpan.textContent = line;\n                content.append(lineSpan);\n              }\n              this.container.append(content);\n            }\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            this._editOnDoubleClick();\n            return this.container;\n          }\n        }\n        exports.FreeTextAnnotationElement = FreeTextAnnotationElement;\n        class LineAnnotationElement extends AnnotationElement {\n          #line = null;\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n          }\n          render() {\n            this.container.classList.add(\"lineAnnotation\");\n            const data = this.data;\n            const {\n              width,\n              height\n            } = getRectDims(data.rect);\n            const svg = this.svgFactory.create(width, height, true);\n            const line = this.#line = this.svgFactory.createElement(\"svg:line\");\n            line.setAttribute(\"x1\", data.rect[2] - data.lineCoordinates[0]);\n            line.setAttribute(\"y1\", data.rect[3] - data.lineCoordinates[1]);\n            line.setAttribute(\"x2\", data.rect[2] - data.lineCoordinates[2]);\n            line.setAttribute(\"y2\", data.rect[3] - data.lineCoordinates[3]);\n            line.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n            line.setAttribute(\"stroke\", \"transparent\");\n            line.setAttribute(\"fill\", \"transparent\");\n            svg.append(line);\n            this.container.append(svg);\n            if (!data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            return this.container;\n          }\n          getElementsToTriggerPopup() {\n            return this.#line;\n          }\n          addHighlightArea() {\n            this.container.classList.add(\"highlightArea\");\n          }\n        }\n        class SquareAnnotationElement extends AnnotationElement {\n          #square = null;\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n          }\n          render() {\n            this.container.classList.add(\"squareAnnotation\");\n            const data = this.data;\n            const {\n              width,\n              height\n            } = getRectDims(data.rect);\n            const svg = this.svgFactory.create(width, height, true);\n            const borderWidth = data.borderStyle.width;\n            const square = this.#square = this.svgFactory.createElement(\"svg:rect\");\n            square.setAttribute(\"x\", borderWidth / 2);\n            square.setAttribute(\"y\", borderWidth / 2);\n            square.setAttribute(\"width\", width - borderWidth);\n            square.setAttribute(\"height\", height - borderWidth);\n            square.setAttribute(\"stroke-width\", borderWidth || 1);\n            square.setAttribute(\"stroke\", \"transparent\");\n            square.setAttribute(\"fill\", \"transparent\");\n            svg.append(square);\n            this.container.append(svg);\n            if (!data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            return this.container;\n          }\n          getElementsToTriggerPopup() {\n            return this.#square;\n          }\n          addHighlightArea() {\n            this.container.classList.add(\"highlightArea\");\n          }\n        }\n        class CircleAnnotationElement extends AnnotationElement {\n          #circle = null;\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n          }\n          render() {\n            this.container.classList.add(\"circleAnnotation\");\n            const data = this.data;\n            const {\n              width,\n              height\n            } = getRectDims(data.rect);\n            const svg = this.svgFactory.create(width, height, true);\n            const borderWidth = data.borderStyle.width;\n            const circle = this.#circle = this.svgFactory.createElement(\"svg:ellipse\");\n            circle.setAttribute(\"cx\", width / 2);\n            circle.setAttribute(\"cy\", height / 2);\n            circle.setAttribute(\"rx\", width / 2 - borderWidth / 2);\n            circle.setAttribute(\"ry\", height / 2 - borderWidth / 2);\n            circle.setAttribute(\"stroke-width\", borderWidth || 1);\n            circle.setAttribute(\"stroke\", \"transparent\");\n            circle.setAttribute(\"fill\", \"transparent\");\n            svg.append(circle);\n            this.container.append(svg);\n            if (!data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            return this.container;\n          }\n          getElementsToTriggerPopup() {\n            return this.#circle;\n          }\n          addHighlightArea() {\n            this.container.classList.add(\"highlightArea\");\n          }\n        }\n        class PolylineAnnotationElement extends AnnotationElement {\n          #polyline = null;\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n            this.containerClassName = \"polylineAnnotation\";\n            this.svgElementName = \"svg:polyline\";\n          }\n          render() {\n            this.container.classList.add(this.containerClassName);\n            const data = this.data;\n            const {\n              width,\n              height\n            } = getRectDims(data.rect);\n            const svg = this.svgFactory.create(width, height, true);\n            let points = [];\n            for (const coordinate of data.vertices) {\n              const x = coordinate.x - data.rect[0];\n              const y = data.rect[3] - coordinate.y;\n              points.push(x + \",\" + y);\n            }\n            points = points.join(\" \");\n            const polyline = this.#polyline = this.svgFactory.createElement(this.svgElementName);\n            polyline.setAttribute(\"points\", points);\n            polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n            polyline.setAttribute(\"stroke\", \"transparent\");\n            polyline.setAttribute(\"fill\", \"transparent\");\n            svg.append(polyline);\n            this.container.append(svg);\n            if (!data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            return this.container;\n          }\n          getElementsToTriggerPopup() {\n            return this.#polyline;\n          }\n          addHighlightArea() {\n            this.container.classList.add(\"highlightArea\");\n          }\n        }\n        class PolygonAnnotationElement extends PolylineAnnotationElement {\n          constructor(parameters) {\n            super(parameters);\n            this.containerClassName = \"polygonAnnotation\";\n            this.svgElementName = \"svg:polygon\";\n          }\n        }\n        class CaretAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n          }\n          render() {\n            this.container.classList.add(\"caretAnnotation\");\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            return this.container;\n          }\n        }\n        class InkAnnotationElement extends AnnotationElement {\n          #polylines = [];\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n            this.containerClassName = \"inkAnnotation\";\n            this.svgElementName = \"svg:polyline\";\n            this.annotationEditorType = _util.AnnotationEditorType.INK;\n          }\n          render() {\n            this.container.classList.add(this.containerClassName);\n            const data = this.data;\n            const {\n              width,\n              height\n            } = getRectDims(data.rect);\n            const svg = this.svgFactory.create(width, height, true);\n            for (const inkList of data.inkLists) {\n              let points = [];\n              for (const coordinate of inkList) {\n                const x = coordinate.x - data.rect[0];\n                const y = data.rect[3] - coordinate.y;\n                points.push(`${x},${y}`);\n              }\n              points = points.join(\" \");\n              const polyline = this.svgFactory.createElement(this.svgElementName);\n              this.#polylines.push(polyline);\n              polyline.setAttribute(\"points\", points);\n              polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n              polyline.setAttribute(\"stroke\", \"transparent\");\n              polyline.setAttribute(\"fill\", \"transparent\");\n              if (!data.popupRef && this.hasPopupData) {\n                this._createPopup();\n              }\n              svg.append(polyline);\n            }\n            this.container.append(svg);\n            return this.container;\n          }\n          getElementsToTriggerPopup() {\n            return this.#polylines;\n          }\n          addHighlightArea() {\n            this.container.classList.add(\"highlightArea\");\n          }\n        }\n        exports.InkAnnotationElement = InkAnnotationElement;\n        class HighlightAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true,\n              createQuadrilaterals: true\n            });\n          }\n          render() {\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            this.container.classList.add(\"highlightAnnotation\");\n            return this.container;\n          }\n        }\n        class UnderlineAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true,\n              createQuadrilaterals: true\n            });\n          }\n          render() {\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            this.container.classList.add(\"underlineAnnotation\");\n            return this.container;\n          }\n        }\n        class SquigglyAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true,\n              createQuadrilaterals: true\n            });\n          }\n          render() {\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            this.container.classList.add(\"squigglyAnnotation\");\n            return this.container;\n          }\n        }\n        class StrikeOutAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true,\n              createQuadrilaterals: true\n            });\n          }\n          render() {\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            this.container.classList.add(\"strikeoutAnnotation\");\n            return this.container;\n          }\n        }\n        class StampAnnotationElement extends AnnotationElement {\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true,\n              ignoreBorder: true\n            });\n          }\n          render() {\n            this.container.classList.add(\"stampAnnotation\");\n            if (!this.data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            }\n            return this.container;\n          }\n        }\n        exports.StampAnnotationElement = StampAnnotationElement;\n        class FileAttachmentAnnotationElement extends AnnotationElement {\n          #trigger = null;\n          constructor(parameters) {\n            super(parameters, {\n              isRenderable: true\n            });\n            const {\n              filename,\n              content\n            } = this.data.file;\n            this.filename = (0, _display_utils.getFilenameFromUrl)(filename, true);\n            this.content = content;\n            this.linkService.eventBus?.dispatch(\"fileattachmentannotation\", {\n              source: this,\n              filename,\n              content\n            });\n          }\n          render() {\n            this.container.classList.add(\"fileAttachmentAnnotation\");\n            const {\n              container,\n              data\n            } = this;\n            let trigger;\n            if (data.hasAppearance || data.fillAlpha === 0) {\n              trigger = document.createElement(\"div\");\n            } else {\n              trigger = document.createElement(\"img\");\n              trigger.src = `${this.imageResourcesPath}annotation-${/paperclip/i.test(data.name) ? \"paperclip\" : \"pushpin\"}.svg`;\n              if (data.fillAlpha && data.fillAlpha < 1) {\n                trigger.style = `filter: opacity(${Math.round(data.fillAlpha * 100)}%);`;\n              }\n            }\n            trigger.addEventListener(\"dblclick\", this.#download.bind(this));\n            this.#trigger = trigger;\n            const {\n              isMac\n            } = _util.FeatureTest.platform;\n            container.addEventListener(\"keydown\", evt => {\n              if (evt.key === \"Enter\" && (isMac ? evt.metaKey : evt.ctrlKey)) {\n                this.#download();\n              }\n            });\n            if (!data.popupRef && this.hasPopupData) {\n              this._createPopup();\n            } else {\n              trigger.classList.add(\"popupTriggerArea\");\n            }\n            container.append(trigger);\n            return container;\n          }\n          getElementsToTriggerPopup() {\n            return this.#trigger;\n          }\n          addHighlightArea() {\n            this.container.classList.add(\"highlightArea\");\n          }\n          #download() {\n            this.downloadManager?.openOrDownloadData(this.container, this.content, this.filename);\n          }\n        }\n        class AnnotationLayer {\n          #accessibilityManager = null;\n          #annotationCanvasMap = null;\n          #editableAnnotations = new Map();\n          constructor({\n            div,\n            accessibilityManager,\n            annotationCanvasMap,\n            l10n,\n            page,\n            viewport\n          }) {\n            this.div = div;\n            this.#accessibilityManager = accessibilityManager;\n            this.#annotationCanvasMap = annotationCanvasMap;\n            this.l10n = l10n;\n            this.page = page;\n            this.viewport = viewport;\n            this.zIndex = 0;\n            this.l10n ||= _displayL10n_utils.NullL10n;\n          }\n          #appendElement(element, id) {\n            const contentElement = element.firstChild || element;\n            contentElement.id = `${_util.AnnotationPrefix}${id}`;\n            this.div.append(element);\n            this.#accessibilityManager?.moveElementInDOM(this.div, element, contentElement, false);\n          }\n          async render(params) {\n            const {\n              annotations\n            } = params;\n            const layer = this.div;\n            (0, _display_utils.setLayerDimensions)(layer, this.viewport);\n            const popupToElements = new Map();\n            const elementParams = {\n              data: null,\n              layer,\n              linkService: params.linkService,\n              downloadManager: params.downloadManager,\n              imageResourcesPath: params.imageResourcesPath || \"\",\n              renderForms: params.renderForms !== false,\n              svgFactory: new _display_utils.DOMSVGFactory(),\n              annotationStorage: params.annotationStorage || new _annotation_storage.AnnotationStorage(),\n              enableScripting: params.enableScripting === true,\n              hasJSActions: params.hasJSActions,\n              fieldObjects: params.fieldObjects,\n              parent: this,\n              elements: null\n            };\n            for (const data of annotations) {\n              if (data.noHTML) {\n                continue;\n              }\n              const isPopupAnnotation = data.annotationType === _util.AnnotationType.POPUP;\n              if (!isPopupAnnotation) {\n                const {\n                  width,\n                  height\n                } = getRectDims(data.rect);\n                if (width <= 0 || height <= 0) {\n                  continue;\n                }\n              } else {\n                const elements = popupToElements.get(data.id);\n                if (!elements) {\n                  continue;\n                }\n                elementParams.elements = elements;\n              }\n              elementParams.data = data;\n              const element = AnnotationElementFactory.create(elementParams);\n              if (!element.isRenderable) {\n                continue;\n              }\n              if (!isPopupAnnotation && data.popupRef) {\n                const elements = popupToElements.get(data.popupRef);\n                if (!elements) {\n                  popupToElements.set(data.popupRef, [element]);\n                } else {\n                  elements.push(element);\n                }\n              }\n              if (element.annotationEditorType > 0) {\n                this.#editableAnnotations.set(element.data.id, element);\n              }\n              const rendered = element.render();\n              if (data.hidden) {\n                rendered.style.visibility = \"hidden\";\n              }\n              this.#appendElement(rendered, data.id);\n            }\n            this.#setAnnotationCanvasMap();\n            await this.l10n.translate(layer);\n          }\n          update({\n            viewport\n          }) {\n            const layer = this.div;\n            this.viewport = viewport;\n            (0, _display_utils.setLayerDimensions)(layer, {\n              rotation: viewport.rotation\n            });\n            this.#setAnnotationCanvasMap();\n            layer.hidden = false;\n          }\n          #setAnnotationCanvasMap() {\n            if (!this.#annotationCanvasMap) {\n              return;\n            }\n            const layer = this.div;\n            for (const [id, canvas] of this.#annotationCanvasMap) {\n              const element = layer.querySelector(`[data-annotation-id=\"${id}\"]`);\n              if (!element) {\n                continue;\n              }\n              const {\n                firstChild\n              } = element;\n              if (!firstChild) {\n                element.append(canvas);\n              } else if (firstChild.nodeName === \"CANVAS\") {\n                firstChild.replaceWith(canvas);\n              } else {\n                firstChild.before(canvas);\n              }\n            }\n            this.#annotationCanvasMap.clear();\n          }\n          getEditableAnnotations() {\n            return Array.from(this.#editableAnnotations.values());\n          }\n          getEditableAnnotation(id) {\n            return this.#editableAnnotations.get(id);\n          }\n        }\n        exports.AnnotationLayer = AnnotationLayer;\n\n        /***/\n      }, /* 30 */\n      /***/(__unused_webpack_module, exports) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.ColorConverters = void 0;\n        function makeColorComp(n) {\n          return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, \"0\");\n        }\n        function scaleAndClamp(x) {\n          return Math.max(0, Math.min(255, 255 * x));\n        }\n        class ColorConverters {\n          static CMYK_G([c, y, m, k]) {\n            return [\"G\", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)];\n          }\n          static G_CMYK([g]) {\n            return [\"CMYK\", 0, 0, 0, 1 - g];\n          }\n          static G_RGB([g]) {\n            return [\"RGB\", g, g, g];\n          }\n          static G_rgb([g]) {\n            g = scaleAndClamp(g);\n            return [g, g, g];\n          }\n          static G_HTML([g]) {\n            const G = makeColorComp(g);\n            return `#${G}${G}${G}`;\n          }\n          static RGB_G([r, g, b]) {\n            return [\"G\", 0.3 * r + 0.59 * g + 0.11 * b];\n          }\n          static RGB_rgb(color) {\n            return color.map(scaleAndClamp);\n          }\n          static RGB_HTML(color) {\n            return `#${color.map(makeColorComp).join(\"\")}`;\n          }\n          static T_HTML() {\n            return \"#00000000\";\n          }\n          static T_rgb() {\n            return [null];\n          }\n          static CMYK_RGB([c, y, m, k]) {\n            return [\"RGB\", 1 - Math.min(1, c + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];\n          }\n          static CMYK_rgb([c, y, m, k]) {\n            return [scaleAndClamp(1 - Math.min(1, c + k)), scaleAndClamp(1 - Math.min(1, m + k)), scaleAndClamp(1 - Math.min(1, y + k))];\n          }\n          static CMYK_HTML(components) {\n            const rgb = this.CMYK_RGB(components).slice(1);\n            return this.RGB_HTML(rgb);\n          }\n          static RGB_CMYK([r, g, b]) {\n            const c = 1 - r;\n            const m = 1 - g;\n            const y = 1 - b;\n            const k = Math.min(c, m, y);\n            return [\"CMYK\", c, m, y, k];\n          }\n        }\n        exports.ColorConverters = ColorConverters;\n\n        /***/\n      }, /* 31 */\n      /***/(__unused_webpack_module, exports) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.NullL10n = void 0;\n        exports.getL10nFallback = getL10nFallback;\n        const DEFAULT_L10N_STRINGS = {\n          of_pages: \"of {{pagesCount}}\",\n          page_of_pages: \"({{pageNumber}} of {{pagesCount}})\",\n          document_properties_kb: \"{{size_kb}} KB ({{size_b}} bytes)\",\n          document_properties_mb: \"{{size_mb}} MB ({{size_b}} bytes)\",\n          document_properties_date_string: \"{{date}}, {{time}}\",\n          document_properties_page_size_unit_inches: \"in\",\n          document_properties_page_size_unit_millimeters: \"mm\",\n          document_properties_page_size_orientation_portrait: \"portrait\",\n          document_properties_page_size_orientation_landscape: \"landscape\",\n          document_properties_page_size_name_a3: \"A3\",\n          document_properties_page_size_name_a4: \"A4\",\n          document_properties_page_size_name_letter: \"Letter\",\n          document_properties_page_size_name_legal: \"Legal\",\n          document_properties_page_size_dimension_string: \"{{width}} × {{height}} {{unit}} ({{orientation}})\",\n          document_properties_page_size_dimension_name_string: \"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})\",\n          document_properties_linearized_yes: \"Yes\",\n          document_properties_linearized_no: \"No\",\n          additional_layers: \"Additional Layers\",\n          page_landmark: \"Page {{page}}\",\n          thumb_page_title: \"Page {{page}}\",\n          thumb_page_canvas: \"Thumbnail of Page {{page}}\",\n          find_reached_top: \"Reached top of document, continued from bottom\",\n          find_reached_bottom: \"Reached end of document, continued from top\",\n          \"find_match_count[one]\": \"{{current}} of {{total}} match\",\n          \"find_match_count[other]\": \"{{current}} of {{total}} matches\",\n          \"find_match_count_limit[one]\": \"More than {{limit}} match\",\n          \"find_match_count_limit[other]\": \"More than {{limit}} matches\",\n          find_not_found: \"Phrase not found\",\n          page_scale_width: \"Page Width\",\n          page_scale_fit: \"Page Fit\",\n          page_scale_auto: \"Automatic Zoom\",\n          page_scale_actual: \"Actual Size\",\n          page_scale_percent: \"{{scale}}%\",\n          loading_error: \"An error occurred while loading the PDF.\",\n          invalid_file_error: \"Invalid or corrupted PDF file.\",\n          missing_file_error: \"Missing PDF file.\",\n          unexpected_response_error: \"Unexpected server response.\",\n          rendering_error: \"An error occurred while rendering the page.\",\n          annotation_date_string: \"{{date}}, {{time}}\",\n          printing_not_supported: \"Warning: Printing is not fully supported by this browser.\",\n          printing_not_ready: \"Warning: The PDF is not fully loaded for printing.\",\n          web_fonts_disabled: \"Web fonts are disabled: unable to use embedded PDF fonts.\",\n          free_text2_default_content: \"Start typing…\",\n          editor_free_text2_aria_label: \"Text Editor\",\n          editor_ink2_aria_label: \"Draw Editor\",\n          editor_ink_canvas_aria_label: \"User-created image\",\n          editor_alt_text_button_label: \"Alt text\",\n          editor_alt_text_edit_button_label: \"Edit alt text\",\n          editor_alt_text_decorative_tooltip: \"Marked as decorative\"\n        };\n        {\n          DEFAULT_L10N_STRINGS.print_progress_percent = \"{{progress}}%\";\n        }\n        function getL10nFallback(key, args) {\n          switch (key) {\n            case \"find_match_count\":\n              key = `find_match_count[${args.total === 1 ? \"one\" : \"other\"}]`;\n              break;\n            case \"find_match_count_limit\":\n              key = `find_match_count_limit[${args.limit === 1 ? \"one\" : \"other\"}]`;\n              break;\n          }\n          return DEFAULT_L10N_STRINGS[key] || \"\";\n        }\n        function formatL10nValue(text, args) {\n          if (!args) {\n            return text;\n          }\n          return text.replaceAll(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (all, name) => {\n            return name in args ? args[name] : \"{{\" + name + \"}}\";\n          });\n        }\n        const NullL10n = {\n          async getLanguage() {\n            return \"en-us\";\n          },\n          async getDirection() {\n            return \"ltr\";\n          },\n          async get(key, args = null, fallback = getL10nFallback(key, args)) {\n            return formatL10nValue(fallback, args);\n          },\n          async translate(element) {}\n        };\n        exports.NullL10n = NullL10n;\n\n        /***/\n      }, /* 32 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.XfaLayer = void 0;\n        var _xfa_text = __w_pdfjs_require__(25);\n        class XfaLayer {\n          static setupStorage(html, id, element, storage, intent) {\n            const storedData = storage.getValue(id, {\n              value: null\n            });\n            switch (element.name) {\n              case \"textarea\":\n                if (storedData.value !== null) {\n                  html.textContent = storedData.value;\n                }\n                if (intent === \"print\") {\n                  break;\n                }\n                html.addEventListener(\"input\", event => {\n                  storage.setValue(id, {\n                    value: event.target.value\n                  });\n                });\n                break;\n              case \"input\":\n                if (element.attributes.type === \"radio\" || element.attributes.type === \"checkbox\") {\n                  if (storedData.value === element.attributes.xfaOn) {\n                    html.setAttribute(\"checked\", true);\n                  } else if (storedData.value === element.attributes.xfaOff) {\n                    html.removeAttribute(\"checked\");\n                  }\n                  if (intent === \"print\") {\n                    break;\n                  }\n                  html.addEventListener(\"change\", event => {\n                    storage.setValue(id, {\n                      value: event.target.checked ? event.target.getAttribute(\"xfaOn\") : event.target.getAttribute(\"xfaOff\")\n                    });\n                  });\n                } else {\n                  if (storedData.value !== null) {\n                    html.setAttribute(\"value\", storedData.value);\n                  }\n                  if (intent === \"print\") {\n                    break;\n                  }\n                  html.addEventListener(\"input\", event => {\n                    storage.setValue(id, {\n                      value: event.target.value\n                    });\n                  });\n                }\n                break;\n              case \"select\":\n                if (storedData.value !== null) {\n                  html.setAttribute(\"value\", storedData.value);\n                  for (const option of element.children) {\n                    if (option.attributes.value === storedData.value) {\n                      option.attributes.selected = true;\n                    } else if (option.attributes.hasOwnProperty(\"selected\")) {\n                      delete option.attributes.selected;\n                    }\n                  }\n                }\n                html.addEventListener(\"input\", event => {\n                  const options = event.target.options;\n                  const value = options.selectedIndex === -1 ? \"\" : options[options.selectedIndex].value;\n                  storage.setValue(id, {\n                    value\n                  });\n                });\n                break;\n            }\n          }\n          static setAttributes({\n            html,\n            element,\n            storage = null,\n            intent,\n            linkService\n          }) {\n            const {\n              attributes\n            } = element;\n            const isHTMLAnchorElement = html instanceof HTMLAnchorElement;\n            if (attributes.type === \"radio\") {\n              attributes.name = `${attributes.name}-${intent}`;\n            }\n            for (const [key, value] of Object.entries(attributes)) {\n              if (value === null || value === undefined) {\n                continue;\n              }\n              switch (key) {\n                case \"class\":\n                  if (value.length) {\n                    html.setAttribute(key, value.join(\" \"));\n                  }\n                  break;\n                case \"dataId\":\n                  break;\n                case \"id\":\n                  html.setAttribute(\"data-element-id\", value);\n                  break;\n                case \"style\":\n                  Object.assign(html.style, value);\n                  break;\n                case \"textContent\":\n                  html.textContent = value;\n                  break;\n                default:\n                  if (!isHTMLAnchorElement || key !== \"href\" && key !== \"newWindow\") {\n                    html.setAttribute(key, value);\n                  }\n              }\n            }\n            if (isHTMLAnchorElement) {\n              linkService.addLinkAttributes(html, attributes.href, attributes.newWindow);\n            }\n            if (storage && attributes.dataId) {\n              this.setupStorage(html, attributes.dataId, element, storage);\n            }\n          }\n          static render(parameters) {\n            const storage = parameters.annotationStorage;\n            const linkService = parameters.linkService;\n            const root = parameters.xfaHtml;\n            const intent = parameters.intent || \"display\";\n            const rootHtml = document.createElement(root.name);\n            if (root.attributes) {\n              this.setAttributes({\n                html: rootHtml,\n                element: root,\n                intent,\n                linkService\n              });\n            }\n            const stack = [[root, -1, rootHtml]];\n            const rootDiv = parameters.div;\n            rootDiv.append(rootHtml);\n            if (parameters.viewport) {\n              const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n              rootDiv.style.transform = transform;\n            }\n            if (intent !== \"richText\") {\n              rootDiv.setAttribute(\"class\", \"xfaLayer xfaFont\");\n            }\n            const textDivs = [];\n            while (stack.length > 0) {\n              const [parent, i, html] = stack.at(-1);\n              if (i + 1 === parent.children.length) {\n                stack.pop();\n                continue;\n              }\n              const child = parent.children[++stack.at(-1)[1]];\n              if (child === null) {\n                continue;\n              }\n              const {\n                name\n              } = child;\n              if (name === \"#text\") {\n                const node = document.createTextNode(child.value);\n                textDivs.push(node);\n                html.append(node);\n                continue;\n              }\n              const childHtml = child?.attributes?.xmlns ? document.createElementNS(child.attributes.xmlns, name) : document.createElement(name);\n              html.append(childHtml);\n              if (child.attributes) {\n                this.setAttributes({\n                  html: childHtml,\n                  element: child,\n                  storage,\n                  intent,\n                  linkService\n                });\n              }\n              if (child.children && child.children.length > 0) {\n                stack.push([child, -1, childHtml]);\n              } else if (child.value) {\n                const node = document.createTextNode(child.value);\n                if (_xfa_text.XfaText.shouldBuildText(name)) {\n                  textDivs.push(node);\n                }\n                childHtml.append(node);\n              }\n            }\n            for (const el of rootDiv.querySelectorAll(\".xfaNonInteractive input, .xfaNonInteractive textarea\")) {\n              el.setAttribute(\"readOnly\", true);\n            }\n            return {\n              textDivs\n            };\n          }\n          static update(parameters) {\n            const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n            parameters.div.style.transform = transform;\n            parameters.div.hidden = false;\n          }\n        }\n        exports.XfaLayer = XfaLayer;\n\n        /***/\n      }, /* 33 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.InkEditor = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _editor = __w_pdfjs_require__(4);\n        var _annotation_layer = __w_pdfjs_require__(29);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _tools = __w_pdfjs_require__(5);\n        class InkEditor extends _editor.AnnotationEditor {\n          #baseHeight = 0;\n          #baseWidth = 0;\n          #boundCanvasPointermove = this.canvasPointermove.bind(this);\n          #boundCanvasPointerleave = this.canvasPointerleave.bind(this);\n          #boundCanvasPointerup = this.canvasPointerup.bind(this);\n          #boundCanvasPointerdown = this.canvasPointerdown.bind(this);\n          #currentPath2D = new Path2D();\n          #disableEditing = false;\n          #hasSomethingToDraw = false;\n          #isCanvasInitialized = false;\n          #observer = null;\n          #realWidth = 0;\n          #realHeight = 0;\n          #requestFrameCallback = null;\n          static _defaultColor = null;\n          static _defaultOpacity = 1;\n          static _defaultThickness = 1;\n          static _type = \"ink\";\n          constructor(params) {\n            super({\n              ...params,\n              name: \"inkEditor\"\n            });\n            this.color = params.color || null;\n            this.thickness = params.thickness || null;\n            this.opacity = params.opacity || null;\n            this.paths = [];\n            this.bezierPath2D = [];\n            this.allRawPaths = [];\n            this.currentPath = [];\n            this.scaleFactor = 1;\n            this.translationX = this.translationY = 0;\n            this.x = 0;\n            this.y = 0;\n            this._willKeepAspectRatio = true;\n          }\n          static initialize(l10n) {\n            _editor.AnnotationEditor.initialize(l10n, {\n              strings: [\"editor_ink_canvas_aria_label\", \"editor_ink2_aria_label\"]\n            });\n          }\n          static updateDefaultParams(type, value) {\n            switch (type) {\n              case _util.AnnotationEditorParamsType.INK_THICKNESS:\n                InkEditor._defaultThickness = value;\n                break;\n              case _util.AnnotationEditorParamsType.INK_COLOR:\n                InkEditor._defaultColor = value;\n                break;\n              case _util.AnnotationEditorParamsType.INK_OPACITY:\n                InkEditor._defaultOpacity = value / 100;\n                break;\n            }\n          }\n          updateParams(type, value) {\n            switch (type) {\n              case _util.AnnotationEditorParamsType.INK_THICKNESS:\n                this.#updateThickness(value);\n                break;\n              case _util.AnnotationEditorParamsType.INK_COLOR:\n                this.#updateColor(value);\n                break;\n              case _util.AnnotationEditorParamsType.INK_OPACITY:\n                this.#updateOpacity(value);\n                break;\n            }\n          }\n          static get defaultPropertiesToUpdate() {\n            return [[_util.AnnotationEditorParamsType.INK_THICKNESS, InkEditor._defaultThickness], [_util.AnnotationEditorParamsType.INK_COLOR, InkEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor], [_util.AnnotationEditorParamsType.INK_OPACITY, Math.round(InkEditor._defaultOpacity * 100)]];\n          }\n          get propertiesToUpdate() {\n            return [[_util.AnnotationEditorParamsType.INK_THICKNESS, this.thickness || InkEditor._defaultThickness], [_util.AnnotationEditorParamsType.INK_COLOR, this.color || InkEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor], [_util.AnnotationEditorParamsType.INK_OPACITY, Math.round(100 * (this.opacity ?? InkEditor._defaultOpacity))]];\n          }\n          #updateThickness(thickness) {\n            const savedThickness = this.thickness;\n            this.addCommands({\n              cmd: () => {\n                this.thickness = thickness;\n                this.#fitToContent();\n              },\n              undo: () => {\n                this.thickness = savedThickness;\n                this.#fitToContent();\n              },\n              mustExec: true,\n              type: _util.AnnotationEditorParamsType.INK_THICKNESS,\n              overwriteIfSameType: true,\n              keepUndo: true\n            });\n          }\n          #updateColor(color) {\n            const savedColor = this.color;\n            this.addCommands({\n              cmd: () => {\n                this.color = color;\n                this.#redraw();\n              },\n              undo: () => {\n                this.color = savedColor;\n                this.#redraw();\n              },\n              mustExec: true,\n              type: _util.AnnotationEditorParamsType.INK_COLOR,\n              overwriteIfSameType: true,\n              keepUndo: true\n            });\n          }\n          #updateOpacity(opacity) {\n            opacity /= 100;\n            const savedOpacity = this.opacity;\n            this.addCommands({\n              cmd: () => {\n                this.opacity = opacity;\n                this.#redraw();\n              },\n              undo: () => {\n                this.opacity = savedOpacity;\n                this.#redraw();\n              },\n              mustExec: true,\n              type: _util.AnnotationEditorParamsType.INK_OPACITY,\n              overwriteIfSameType: true,\n              keepUndo: true\n            });\n          }\n          rebuild() {\n            if (!this.parent) {\n              return;\n            }\n            super.rebuild();\n            if (this.div === null) {\n              return;\n            }\n            if (!this.canvas) {\n              this.#createCanvas();\n              this.#createObserver();\n            }\n            if (!this.isAttachedToDOM) {\n              this.parent.add(this);\n              this.#setCanvasDims();\n            }\n            this.#fitToContent();\n          }\n          remove() {\n            if (this.canvas === null) {\n              return;\n            }\n            if (!this.isEmpty()) {\n              this.commit();\n            }\n            this.canvas.width = this.canvas.height = 0;\n            this.canvas.remove();\n            this.canvas = null;\n            this.#observer.disconnect();\n            this.#observer = null;\n            super.remove();\n          }\n          setParent(parent) {\n            if (!this.parent && parent) {\n              this._uiManager.removeShouldRescale(this);\n            } else if (this.parent && parent === null) {\n              this._uiManager.addShouldRescale(this);\n            }\n            super.setParent(parent);\n          }\n          onScaleChanging() {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            const width = this.width * parentWidth;\n            const height = this.height * parentHeight;\n            this.setDimensions(width, height);\n          }\n          enableEditMode() {\n            if (this.#disableEditing || this.canvas === null) {\n              return;\n            }\n            super.enableEditMode();\n            this._isDraggable = false;\n            this.canvas.addEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n          }\n          disableEditMode() {\n            if (!this.isInEditMode() || this.canvas === null) {\n              return;\n            }\n            super.disableEditMode();\n            this._isDraggable = !this.isEmpty();\n            this.div.classList.remove(\"editing\");\n            this.canvas.removeEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n          }\n          onceAdded() {\n            this._isDraggable = !this.isEmpty();\n          }\n          isEmpty() {\n            return this.paths.length === 0 || this.paths.length === 1 && this.paths[0].length === 0;\n          }\n          #getInitialBBox() {\n            const {\n              parentRotation,\n              parentDimensions: [width, height]\n            } = this;\n            switch (parentRotation) {\n              case 90:\n                return [0, height, height, width];\n              case 180:\n                return [width, height, width, height];\n              case 270:\n                return [width, 0, height, width];\n              default:\n                return [0, 0, width, height];\n            }\n          }\n          #setStroke() {\n            const {\n              ctx,\n              color,\n              opacity,\n              thickness,\n              parentScale,\n              scaleFactor\n            } = this;\n            ctx.lineWidth = thickness * parentScale / scaleFactor;\n            ctx.lineCap = \"round\";\n            ctx.lineJoin = \"round\";\n            ctx.miterLimit = 10;\n            ctx.strokeStyle = `${color}${(0, _tools.opacityToHex)(opacity)}`;\n          }\n          #startDrawing(x, y) {\n            this.canvas.addEventListener(\"contextmenu\", _display_utils.noContextMenu);\n            this.canvas.addEventListener(\"pointerleave\", this.#boundCanvasPointerleave);\n            this.canvas.addEventListener(\"pointermove\", this.#boundCanvasPointermove);\n            this.canvas.addEventListener(\"pointerup\", this.#boundCanvasPointerup);\n            this.canvas.removeEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n            this.isEditing = true;\n            if (!this.#isCanvasInitialized) {\n              this.#isCanvasInitialized = true;\n              this.#setCanvasDims();\n              this.thickness ||= InkEditor._defaultThickness;\n              this.color ||= InkEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor;\n              this.opacity ??= InkEditor._defaultOpacity;\n            }\n            this.currentPath.push([x, y]);\n            this.#hasSomethingToDraw = false;\n            this.#setStroke();\n            this.#requestFrameCallback = () => {\n              this.#drawPoints();\n              if (this.#requestFrameCallback) {\n                window.requestAnimationFrame(this.#requestFrameCallback);\n              }\n            };\n            window.requestAnimationFrame(this.#requestFrameCallback);\n          }\n          #draw(x, y) {\n            const [lastX, lastY] = this.currentPath.at(-1);\n            if (this.currentPath.length > 1 && x === lastX && y === lastY) {\n              return;\n            }\n            const currentPath = this.currentPath;\n            let path2D = this.#currentPath2D;\n            currentPath.push([x, y]);\n            this.#hasSomethingToDraw = true;\n            if (currentPath.length <= 2) {\n              path2D.moveTo(...currentPath[0]);\n              path2D.lineTo(x, y);\n              return;\n            }\n            if (currentPath.length === 3) {\n              this.#currentPath2D = path2D = new Path2D();\n              path2D.moveTo(...currentPath[0]);\n            }\n            this.#makeBezierCurve(path2D, ...currentPath.at(-3), ...currentPath.at(-2), x, y);\n          }\n          #endPath() {\n            if (this.currentPath.length === 0) {\n              return;\n            }\n            const lastPoint = this.currentPath.at(-1);\n            this.#currentPath2D.lineTo(...lastPoint);\n          }\n          #stopDrawing(x, y) {\n            this.#requestFrameCallback = null;\n            x = Math.min(Math.max(x, 0), this.canvas.width);\n            y = Math.min(Math.max(y, 0), this.canvas.height);\n            this.#draw(x, y);\n            this.#endPath();\n            let bezier;\n            if (this.currentPath.length !== 1) {\n              bezier = this.#generateBezierPoints();\n            } else {\n              const xy = [x, y];\n              bezier = [[xy, xy.slice(), xy.slice(), xy]];\n            }\n            const path2D = this.#currentPath2D;\n            const currentPath = this.currentPath;\n            this.currentPath = [];\n            this.#currentPath2D = new Path2D();\n            const cmd = () => {\n              this.allRawPaths.push(currentPath);\n              this.paths.push(bezier);\n              this.bezierPath2D.push(path2D);\n              this.rebuild();\n            };\n            const undo = () => {\n              this.allRawPaths.pop();\n              this.paths.pop();\n              this.bezierPath2D.pop();\n              if (this.paths.length === 0) {\n                this.remove();\n              } else {\n                if (!this.canvas) {\n                  this.#createCanvas();\n                  this.#createObserver();\n                }\n                this.#fitToContent();\n              }\n            };\n            this.addCommands({\n              cmd,\n              undo,\n              mustExec: true\n            });\n          }\n          #drawPoints() {\n            if (!this.#hasSomethingToDraw) {\n              return;\n            }\n            this.#hasSomethingToDraw = false;\n            const thickness = Math.ceil(this.thickness * this.parentScale);\n            const lastPoints = this.currentPath.slice(-3);\n            const x = lastPoints.map(xy => xy[0]);\n            const y = lastPoints.map(xy => xy[1]);\n            const xMin = Math.min(...x) - thickness;\n            const xMax = Math.max(...x) + thickness;\n            const yMin = Math.min(...y) - thickness;\n            const yMax = Math.max(...y) + thickness;\n            const {\n              ctx\n            } = this;\n            ctx.save();\n            ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n            for (const path of this.bezierPath2D) {\n              ctx.stroke(path);\n            }\n            ctx.stroke(this.#currentPath2D);\n            ctx.restore();\n          }\n          #makeBezierCurve(path2D, x0, y0, x1, y1, x2, y2) {\n            const prevX = (x0 + x1) / 2;\n            const prevY = (y0 + y1) / 2;\n            const x3 = (x1 + x2) / 2;\n            const y3 = (y1 + y2) / 2;\n            path2D.bezierCurveTo(prevX + 2 * (x1 - prevX) / 3, prevY + 2 * (y1 - prevY) / 3, x3 + 2 * (x1 - x3) / 3, y3 + 2 * (y1 - y3) / 3, x3, y3);\n          }\n          #generateBezierPoints() {\n            const path = this.currentPath;\n            if (path.length <= 2) {\n              return [[path[0], path[0], path.at(-1), path.at(-1)]];\n            }\n            const bezierPoints = [];\n            let i;\n            let [x0, y0] = path[0];\n            for (i = 1; i < path.length - 2; i++) {\n              const [x1, y1] = path[i];\n              const [x2, y2] = path[i + 1];\n              const x3 = (x1 + x2) / 2;\n              const y3 = (y1 + y2) / 2;\n              const control1 = [x0 + 2 * (x1 - x0) / 3, y0 + 2 * (y1 - y0) / 3];\n              const control2 = [x3 + 2 * (x1 - x3) / 3, y3 + 2 * (y1 - y3) / 3];\n              bezierPoints.push([[x0, y0], control1, control2, [x3, y3]]);\n              [x0, y0] = [x3, y3];\n            }\n            const [x1, y1] = path[i];\n            const [x2, y2] = path[i + 1];\n            const control1 = [x0 + 2 * (x1 - x0) / 3, y0 + 2 * (y1 - y0) / 3];\n            const control2 = [x2 + 2 * (x1 - x2) / 3, y2 + 2 * (y1 - y2) / 3];\n            bezierPoints.push([[x0, y0], control1, control2, [x2, y2]]);\n            return bezierPoints;\n          }\n          #redraw() {\n            if (this.isEmpty()) {\n              this.#updateTransform();\n              return;\n            }\n            this.#setStroke();\n            const {\n              canvas,\n              ctx\n            } = this;\n            ctx.setTransform(1, 0, 0, 1, 0, 0);\n            ctx.clearRect(0, 0, canvas.width, canvas.height);\n            this.#updateTransform();\n            for (const path of this.bezierPath2D) {\n              ctx.stroke(path);\n            }\n          }\n          commit() {\n            if (this.#disableEditing) {\n              return;\n            }\n            super.commit();\n            this.isEditing = false;\n            this.disableEditMode();\n            this.setInForeground();\n            this.#disableEditing = true;\n            this.div.classList.add(\"disabled\");\n            this.#fitToContent(true);\n            this.makeResizable();\n            this.parent.addInkEditorIfNeeded(true);\n            this.moveInDOM();\n            this.div.focus({\n              preventScroll: true\n            });\n          }\n          focusin(event) {\n            if (!this._focusEventsAllowed) {\n              return;\n            }\n            super.focusin(event);\n            this.enableEditMode();\n          }\n          canvasPointerdown(event) {\n            if (event.button !== 0 || !this.isInEditMode() || this.#disableEditing) {\n              return;\n            }\n            this.setInForeground();\n            event.preventDefault();\n            if (event.type !== \"mouse\") {\n              this.div.focus();\n            }\n            this.#startDrawing(event.offsetX, event.offsetY);\n          }\n          canvasPointermove(event) {\n            event.preventDefault();\n            this.#draw(event.offsetX, event.offsetY);\n          }\n          canvasPointerup(event) {\n            event.preventDefault();\n            this.#endDrawing(event);\n          }\n          canvasPointerleave(event) {\n            this.#endDrawing(event);\n          }\n          #endDrawing(event) {\n            this.canvas.removeEventListener(\"pointerleave\", this.#boundCanvasPointerleave);\n            this.canvas.removeEventListener(\"pointermove\", this.#boundCanvasPointermove);\n            this.canvas.removeEventListener(\"pointerup\", this.#boundCanvasPointerup);\n            this.canvas.addEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n            setTimeout(() => {\n              this.canvas.removeEventListener(\"contextmenu\", _display_utils.noContextMenu);\n            }, 10);\n            this.#stopDrawing(event.offsetX, event.offsetY);\n            this.addToAnnotationStorage();\n            this.setInBackground();\n          }\n          #createCanvas() {\n            this.canvas = document.createElement(\"canvas\");\n            this.canvas.width = this.canvas.height = 0;\n            this.canvas.className = \"inkEditorCanvas\";\n            _editor.AnnotationEditor._l10nPromise.get(\"editor_ink_canvas_aria_label\").then(msg => this.canvas?.setAttribute(\"aria-label\", msg));\n            this.div.append(this.canvas);\n            this.ctx = this.canvas.getContext(\"2d\");\n          }\n          #createObserver() {\n            this.#observer = new ResizeObserver(entries => {\n              const rect = entries[0].contentRect;\n              if (rect.width && rect.height) {\n                this.setDimensions(rect.width, rect.height);\n              }\n            });\n            this.#observer.observe(this.div);\n          }\n          get isResizable() {\n            return !this.isEmpty() && this.#disableEditing;\n          }\n          render() {\n            if (this.div) {\n              return this.div;\n            }\n            let baseX, baseY;\n            if (this.width) {\n              baseX = this.x;\n              baseY = this.y;\n            }\n            super.render();\n            _editor.AnnotationEditor._l10nPromise.get(\"editor_ink2_aria_label\").then(msg => this.div?.setAttribute(\"aria-label\", msg));\n            const [x, y, w, h] = this.#getInitialBBox();\n            this.setAt(x, y, 0, 0);\n            this.setDims(w, h);\n            this.#createCanvas();\n            if (this.width) {\n              const [parentWidth, parentHeight] = this.parentDimensions;\n              this.setAspectRatio(this.width * parentWidth, this.height * parentHeight);\n              this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n              this.#isCanvasInitialized = true;\n              this.#setCanvasDims();\n              this.setDims(this.width * parentWidth, this.height * parentHeight);\n              this.#redraw();\n              this.div.classList.add(\"disabled\");\n            } else {\n              this.div.classList.add(\"editing\");\n              this.enableEditMode();\n            }\n            this.#createObserver();\n            return this.div;\n          }\n          #setCanvasDims() {\n            if (!this.#isCanvasInitialized) {\n              return;\n            }\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.canvas.width = Math.ceil(this.width * parentWidth);\n            this.canvas.height = Math.ceil(this.height * parentHeight);\n            this.#updateTransform();\n          }\n          setDimensions(width, height) {\n            const roundedWidth = Math.round(width);\n            const roundedHeight = Math.round(height);\n            if (this.#realWidth === roundedWidth && this.#realHeight === roundedHeight) {\n              return;\n            }\n            this.#realWidth = roundedWidth;\n            this.#realHeight = roundedHeight;\n            this.canvas.style.visibility = \"hidden\";\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.width = width / parentWidth;\n            this.height = height / parentHeight;\n            this.fixAndSetPosition();\n            if (this.#disableEditing) {\n              this.#setScaleFactor(width, height);\n            }\n            this.#setCanvasDims();\n            this.#redraw();\n            this.canvas.style.visibility = \"visible\";\n            this.fixDims();\n          }\n          #setScaleFactor(width, height) {\n            const padding = this.#getPadding();\n            const scaleFactorW = (width - padding) / this.#baseWidth;\n            const scaleFactorH = (height - padding) / this.#baseHeight;\n            this.scaleFactor = Math.min(scaleFactorW, scaleFactorH);\n          }\n          #updateTransform() {\n            const padding = this.#getPadding() / 2;\n            this.ctx.setTransform(this.scaleFactor, 0, 0, this.scaleFactor, this.translationX * this.scaleFactor + padding, this.translationY * this.scaleFactor + padding);\n          }\n          static #buildPath2D(bezier) {\n            const path2D = new Path2D();\n            for (let i = 0, ii = bezier.length; i < ii; i++) {\n              const [first, control1, control2, second] = bezier[i];\n              if (i === 0) {\n                path2D.moveTo(...first);\n              }\n              path2D.bezierCurveTo(control1[0], control1[1], control2[0], control2[1], second[0], second[1]);\n            }\n            return path2D;\n          }\n          static #toPDFCoordinates(points, rect, rotation) {\n            const [blX, blY, trX, trY] = rect;\n            switch (rotation) {\n              case 0:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  points[i] += blX;\n                  points[i + 1] = trY - points[i + 1];\n                }\n                break;\n              case 90:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  const x = points[i];\n                  points[i] = points[i + 1] + blX;\n                  points[i + 1] = x + blY;\n                }\n                break;\n              case 180:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  points[i] = trX - points[i];\n                  points[i + 1] += blY;\n                }\n                break;\n              case 270:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  const x = points[i];\n                  points[i] = trX - points[i + 1];\n                  points[i + 1] = trY - x;\n                }\n                break;\n              default:\n                throw new Error(\"Invalid rotation\");\n            }\n            return points;\n          }\n          static #fromPDFCoordinates(points, rect, rotation) {\n            const [blX, blY, trX, trY] = rect;\n            switch (rotation) {\n              case 0:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  points[i] -= blX;\n                  points[i + 1] = trY - points[i + 1];\n                }\n                break;\n              case 90:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  const x = points[i];\n                  points[i] = points[i + 1] - blY;\n                  points[i + 1] = x - blX;\n                }\n                break;\n              case 180:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  points[i] = trX - points[i];\n                  points[i + 1] -= blY;\n                }\n                break;\n              case 270:\n                for (let i = 0, ii = points.length; i < ii; i += 2) {\n                  const x = points[i];\n                  points[i] = trY - points[i + 1];\n                  points[i + 1] = trX - x;\n                }\n                break;\n              default:\n                throw new Error(\"Invalid rotation\");\n            }\n            return points;\n          }\n          #serializePaths(s, tx, ty, rect) {\n            const paths = [];\n            const padding = this.thickness / 2;\n            const shiftX = s * tx + padding;\n            const shiftY = s * ty + padding;\n            for (const bezier of this.paths) {\n              const buffer = [];\n              const points = [];\n              for (let j = 0, jj = bezier.length; j < jj; j++) {\n                const [first, control1, control2, second] = bezier[j];\n                const p10 = s * first[0] + shiftX;\n                const p11 = s * first[1] + shiftY;\n                const p20 = s * control1[0] + shiftX;\n                const p21 = s * control1[1] + shiftY;\n                const p30 = s * control2[0] + shiftX;\n                const p31 = s * control2[1] + shiftY;\n                const p40 = s * second[0] + shiftX;\n                const p41 = s * second[1] + shiftY;\n                if (j === 0) {\n                  buffer.push(p10, p11);\n                  points.push(p10, p11);\n                }\n                buffer.push(p20, p21, p30, p31, p40, p41);\n                points.push(p20, p21);\n                if (j === jj - 1) {\n                  points.push(p40, p41);\n                }\n              }\n              paths.push({\n                bezier: InkEditor.#toPDFCoordinates(buffer, rect, this.rotation),\n                points: InkEditor.#toPDFCoordinates(points, rect, this.rotation)\n              });\n            }\n            return paths;\n          }\n          #getBbox() {\n            let xMin = Infinity;\n            let xMax = -Infinity;\n            let yMin = Infinity;\n            let yMax = -Infinity;\n            for (const path of this.paths) {\n              for (const [first, control1, control2, second] of path) {\n                const bbox = _util.Util.bezierBoundingBox(...first, ...control1, ...control2, ...second);\n                xMin = Math.min(xMin, bbox[0]);\n                yMin = Math.min(yMin, bbox[1]);\n                xMax = Math.max(xMax, bbox[2]);\n                yMax = Math.max(yMax, bbox[3]);\n              }\n            }\n            return [xMin, yMin, xMax, yMax];\n          }\n          #getPadding() {\n            return this.#disableEditing ? Math.ceil(this.thickness * this.parentScale) : 0;\n          }\n          #fitToContent(firstTime = false) {\n            if (this.isEmpty()) {\n              return;\n            }\n            if (!this.#disableEditing) {\n              this.#redraw();\n              return;\n            }\n            const bbox = this.#getBbox();\n            const padding = this.#getPadding();\n            this.#baseWidth = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n            this.#baseHeight = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n            const width = Math.ceil(padding + this.#baseWidth * this.scaleFactor);\n            const height = Math.ceil(padding + this.#baseHeight * this.scaleFactor);\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.width = width / parentWidth;\n            this.height = height / parentHeight;\n            this.setAspectRatio(width, height);\n            const prevTranslationX = this.translationX;\n            const prevTranslationY = this.translationY;\n            this.translationX = -bbox[0];\n            this.translationY = -bbox[1];\n            this.#setCanvasDims();\n            this.#redraw();\n            this.#realWidth = width;\n            this.#realHeight = height;\n            this.setDims(width, height);\n            const unscaledPadding = firstTime ? padding / this.scaleFactor / 2 : 0;\n            this.translate(prevTranslationX - this.translationX - unscaledPadding, prevTranslationY - this.translationY - unscaledPadding);\n          }\n          static deserialize(data, parent, uiManager) {\n            if (data instanceof _annotation_layer.InkAnnotationElement) {\n              return null;\n            }\n            const editor = super.deserialize(data, parent, uiManager);\n            editor.thickness = data.thickness;\n            editor.color = _util.Util.makeHexColor(...data.color);\n            editor.opacity = data.opacity;\n            const [pageWidth, pageHeight] = editor.pageDimensions;\n            const width = editor.width * pageWidth;\n            const height = editor.height * pageHeight;\n            const scaleFactor = editor.parentScale;\n            const padding = data.thickness / 2;\n            editor.#disableEditing = true;\n            editor.#realWidth = Math.round(width);\n            editor.#realHeight = Math.round(height);\n            const {\n              paths,\n              rect,\n              rotation\n            } = data;\n            for (let {\n              bezier\n            } of paths) {\n              bezier = InkEditor.#fromPDFCoordinates(bezier, rect, rotation);\n              const path = [];\n              editor.paths.push(path);\n              let p0 = scaleFactor * (bezier[0] - padding);\n              let p1 = scaleFactor * (bezier[1] - padding);\n              for (let i = 2, ii = bezier.length; i < ii; i += 6) {\n                const p10 = scaleFactor * (bezier[i] - padding);\n                const p11 = scaleFactor * (bezier[i + 1] - padding);\n                const p20 = scaleFactor * (bezier[i + 2] - padding);\n                const p21 = scaleFactor * (bezier[i + 3] - padding);\n                const p30 = scaleFactor * (bezier[i + 4] - padding);\n                const p31 = scaleFactor * (bezier[i + 5] - padding);\n                path.push([[p0, p1], [p10, p11], [p20, p21], [p30, p31]]);\n                p0 = p30;\n                p1 = p31;\n              }\n              const path2D = this.#buildPath2D(path);\n              editor.bezierPath2D.push(path2D);\n            }\n            const bbox = editor.#getBbox();\n            editor.#baseWidth = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n            editor.#baseHeight = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n            editor.#setScaleFactor(width, height);\n            return editor;\n          }\n          serialize() {\n            if (this.isEmpty()) {\n              return null;\n            }\n            const rect = this.getRect(0, 0);\n            const color = _editor.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);\n            return {\n              annotationType: _util.AnnotationEditorType.INK,\n              color,\n              thickness: this.thickness,\n              opacity: this.opacity,\n              paths: this.#serializePaths(this.scaleFactor / this.parentScale, this.translationX, this.translationY, rect),\n              pageIndex: this.pageIndex,\n              rect,\n              rotation: this.rotation,\n              structTreeParentId: this._structTreeParentId\n            };\n          }\n        }\n        exports.InkEditor = InkEditor;\n\n        /***/\n      }, /* 34 */\n      /***/(__unused_webpack_module, exports, __w_pdfjs_require__) => {\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        exports.StampEditor = void 0;\n        var _util = __w_pdfjs_require__(1);\n        var _editor = __w_pdfjs_require__(4);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _annotation_layer = __w_pdfjs_require__(29);\n        class StampEditor extends _editor.AnnotationEditor {\n          #bitmap = null;\n          #bitmapId = null;\n          #bitmapPromise = null;\n          #bitmapUrl = null;\n          #bitmapFile = null;\n          #canvas = null;\n          #observer = null;\n          #resizeTimeoutId = null;\n          #isSvg = false;\n          #hasBeenAddedInUndoStack = false;\n          static _type = \"stamp\";\n          constructor(params) {\n            super({\n              ...params,\n              name: \"stampEditor\"\n            });\n            this.#bitmapUrl = params.bitmapUrl;\n            this.#bitmapFile = params.bitmapFile;\n          }\n          static initialize(l10n) {\n            _editor.AnnotationEditor.initialize(l10n);\n          }\n          static get supportedTypes() {\n            const types = [\"apng\", \"avif\", \"bmp\", \"gif\", \"jpeg\", \"png\", \"svg+xml\", \"webp\", \"x-icon\"];\n            return (0, _util.shadow)(this, \"supportedTypes\", types.map(type => `image/${type}`));\n          }\n          static get supportedTypesStr() {\n            return (0, _util.shadow)(this, \"supportedTypesStr\", this.supportedTypes.join(\",\"));\n          }\n          static isHandlingMimeForPasting(mime) {\n            return this.supportedTypes.includes(mime);\n          }\n          static paste(item, parent) {\n            parent.pasteEditor(_util.AnnotationEditorType.STAMP, {\n              bitmapFile: item.getAsFile()\n            });\n          }\n          #getBitmapFetched(data, fromId = false) {\n            if (!data) {\n              this.remove();\n              return;\n            }\n            this.#bitmap = data.bitmap;\n            if (!fromId) {\n              this.#bitmapId = data.id;\n              this.#isSvg = data.isSvg;\n            }\n            this.#createCanvas();\n          }\n          #getBitmapDone() {\n            this.#bitmapPromise = null;\n            this._uiManager.enableWaiting(false);\n            if (this.#canvas) {\n              this.div.focus();\n            }\n          }\n          #getBitmap() {\n            if (this.#bitmapId) {\n              this._uiManager.enableWaiting(true);\n              this._uiManager.imageManager.getFromId(this.#bitmapId).then(data => this.#getBitmapFetched(data, true)).finally(() => this.#getBitmapDone());\n              return;\n            }\n            if (this.#bitmapUrl) {\n              const url = this.#bitmapUrl;\n              this.#bitmapUrl = null;\n              this._uiManager.enableWaiting(true);\n              this.#bitmapPromise = this._uiManager.imageManager.getFromUrl(url).then(data => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone());\n              return;\n            }\n            if (this.#bitmapFile) {\n              const file = this.#bitmapFile;\n              this.#bitmapFile = null;\n              this._uiManager.enableWaiting(true);\n              this.#bitmapPromise = this._uiManager.imageManager.getFromFile(file).then(data => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone());\n              return;\n            }\n            const input = document.createElement(\"input\");\n            input.type = \"file\";\n            input.accept = StampEditor.supportedTypesStr;\n            this.#bitmapPromise = new Promise(resolve => {\n              input.addEventListener(\"change\", async () => {\n                if (!input.files || input.files.length === 0) {\n                  this.remove();\n                } else {\n                  this._uiManager.enableWaiting(true);\n                  const data = await this._uiManager.imageManager.getFromFile(input.files[0]);\n                  this.#getBitmapFetched(data);\n                }\n                resolve();\n              });\n              input.addEventListener(\"cancel\", () => {\n                this.remove();\n                resolve();\n              });\n            }).finally(() => this.#getBitmapDone());\n            input.click();\n          }\n          remove() {\n            if (this.#bitmapId) {\n              this.#bitmap = null;\n              this._uiManager.imageManager.deleteId(this.#bitmapId);\n              this.#canvas?.remove();\n              this.#canvas = null;\n              this.#observer?.disconnect();\n              this.#observer = null;\n            }\n            super.remove();\n          }\n          rebuild() {\n            if (!this.parent) {\n              if (this.#bitmapId) {\n                this.#getBitmap();\n              }\n              return;\n            }\n            super.rebuild();\n            if (this.div === null) {\n              return;\n            }\n            if (this.#bitmapId) {\n              this.#getBitmap();\n            }\n            if (!this.isAttachedToDOM) {\n              this.parent.add(this);\n            }\n          }\n          onceAdded() {\n            this._isDraggable = true;\n            this.div.focus();\n          }\n          isEmpty() {\n            return !(this.#bitmapPromise || this.#bitmap || this.#bitmapUrl || this.#bitmapFile);\n          }\n          get isResizable() {\n            return true;\n          }\n          render() {\n            if (this.div) {\n              return this.div;\n            }\n            let baseX, baseY;\n            if (this.width) {\n              baseX = this.x;\n              baseY = this.y;\n            }\n            super.render();\n            this.div.hidden = true;\n            if (this.#bitmap) {\n              this.#createCanvas();\n            } else {\n              this.#getBitmap();\n            }\n            if (this.width) {\n              const [parentWidth, parentHeight] = this.parentDimensions;\n              this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n            }\n            return this.div;\n          }\n          #createCanvas() {\n            const {\n              div\n            } = this;\n            let {\n              width,\n              height\n            } = this.#bitmap;\n            const [pageWidth, pageHeight] = this.pageDimensions;\n            const MAX_RATIO = 0.75;\n            if (this.width) {\n              width = this.width * pageWidth;\n              height = this.height * pageHeight;\n            } else if (width > MAX_RATIO * pageWidth || height > MAX_RATIO * pageHeight) {\n              const factor = Math.min(MAX_RATIO * pageWidth / width, MAX_RATIO * pageHeight / height);\n              width *= factor;\n              height *= factor;\n            }\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.setDims(width * parentWidth / pageWidth, height * parentHeight / pageHeight);\n            this._uiManager.enableWaiting(false);\n            const canvas = this.#canvas = document.createElement(\"canvas\");\n            div.append(canvas);\n            div.hidden = false;\n            this.#drawBitmap(width, height);\n            this.#createObserver();\n            if (!this.#hasBeenAddedInUndoStack) {\n              this.parent.addUndoableEditor(this);\n              this.#hasBeenAddedInUndoStack = true;\n            }\n            this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n              source: this,\n              details: {\n                type: \"editing\",\n                subtype: this.editorType,\n                data: {\n                  action: \"inserted_image\"\n                }\n              }\n            });\n            this.addAltTextButton();\n          }\n          #setDimensions(width, height) {\n            const [parentWidth, parentHeight] = this.parentDimensions;\n            this.width = width / parentWidth;\n            this.height = height / parentHeight;\n            this.setDims(width, height);\n            if (this._initialOptions?.isCentered) {\n              this.center();\n            } else {\n              this.fixAndSetPosition();\n            }\n            this._initialOptions = null;\n            if (this.#resizeTimeoutId !== null) {\n              clearTimeout(this.#resizeTimeoutId);\n            }\n            const TIME_TO_WAIT = 200;\n            this.#resizeTimeoutId = setTimeout(() => {\n              this.#resizeTimeoutId = null;\n              this.#drawBitmap(width, height);\n            }, TIME_TO_WAIT);\n          }\n          #scaleBitmap(width, height) {\n            const {\n              width: bitmapWidth,\n              height: bitmapHeight\n            } = this.#bitmap;\n            let newWidth = bitmapWidth;\n            let newHeight = bitmapHeight;\n            let bitmap = this.#bitmap;\n            while (newWidth > 2 * width || newHeight > 2 * height) {\n              const prevWidth = newWidth;\n              const prevHeight = newHeight;\n              if (newWidth > 2 * width) {\n                newWidth = newWidth >= 16384 ? Math.floor(newWidth / 2) - 1 : Math.ceil(newWidth / 2);\n              }\n              if (newHeight > 2 * height) {\n                newHeight = newHeight >= 16384 ? Math.floor(newHeight / 2) - 1 : Math.ceil(newHeight / 2);\n              }\n              const offscreen = new OffscreenCanvas(newWidth, newHeight);\n              const ctx = offscreen.getContext(\"2d\");\n              ctx.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight);\n              bitmap = offscreen.transferToImageBitmap();\n            }\n            return bitmap;\n          }\n          #drawBitmap(width, height) {\n            width = Math.ceil(width);\n            height = Math.ceil(height);\n            const canvas = this.#canvas;\n            if (!canvas || canvas.width === width && canvas.height === height) {\n              return;\n            }\n            canvas.width = width;\n            canvas.height = height;\n            const bitmap = this.#isSvg ? this.#bitmap : this.#scaleBitmap(width, height);\n            const ctx = canvas.getContext(\"2d\");\n            ctx.filter = this._uiManager.hcmFilter;\n            ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, width, height);\n          }\n          #serializeBitmap(toUrl) {\n            if (toUrl) {\n              if (this.#isSvg) {\n                const url = this._uiManager.imageManager.getSvgUrl(this.#bitmapId);\n                if (url) {\n                  return url;\n                }\n              }\n              const canvas = document.createElement(\"canvas\");\n              ({\n                width: canvas.width,\n                height: canvas.height\n              } = this.#bitmap);\n              const ctx = canvas.getContext(\"2d\");\n              ctx.drawImage(this.#bitmap, 0, 0);\n              return canvas.toDataURL();\n            }\n            if (this.#isSvg) {\n              const [pageWidth, pageHeight] = this.pageDimensions;\n              const width = Math.round(this.width * pageWidth * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n              const height = Math.round(this.height * pageHeight * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n              const offscreen = new OffscreenCanvas(width, height);\n              const ctx = offscreen.getContext(\"2d\");\n              ctx.drawImage(this.#bitmap, 0, 0, this.#bitmap.width, this.#bitmap.height, 0, 0, width, height);\n              return offscreen.transferToImageBitmap();\n            }\n            return structuredClone(this.#bitmap);\n          }\n          #createObserver() {\n            this.#observer = new ResizeObserver(entries => {\n              const rect = entries[0].contentRect;\n              if (rect.width && rect.height) {\n                this.#setDimensions(rect.width, rect.height);\n              }\n            });\n            this.#observer.observe(this.div);\n          }\n          static deserialize(data, parent, uiManager) {\n            if (data instanceof _annotation_layer.StampAnnotationElement) {\n              return null;\n            }\n            const editor = super.deserialize(data, parent, uiManager);\n            const {\n              rect,\n              bitmapUrl,\n              bitmapId,\n              isSvg,\n              accessibilityData\n            } = data;\n            if (bitmapId && uiManager.imageManager.isValidId(bitmapId)) {\n              editor.#bitmapId = bitmapId;\n            } else {\n              editor.#bitmapUrl = bitmapUrl;\n            }\n            editor.#isSvg = isSvg;\n            const [parentWidth, parentHeight] = editor.pageDimensions;\n            editor.width = (rect[2] - rect[0]) / parentWidth;\n            editor.height = (rect[3] - rect[1]) / parentHeight;\n            if (accessibilityData) {\n              editor.altTextData = accessibilityData;\n            }\n            return editor;\n          }\n          serialize(isForCopying = false, context = null) {\n            if (this.isEmpty()) {\n              return null;\n            }\n            const serialized = {\n              annotationType: _util.AnnotationEditorType.STAMP,\n              bitmapId: this.#bitmapId,\n              pageIndex: this.pageIndex,\n              rect: this.getRect(0, 0),\n              rotation: this.rotation,\n              isSvg: this.#isSvg,\n              structTreeParentId: this._structTreeParentId\n            };\n            if (isForCopying) {\n              serialized.bitmapUrl = this.#serializeBitmap(true);\n              serialized.accessibilityData = this.altTextData;\n              return serialized;\n            }\n            const {\n              decorative,\n              altText\n            } = this.altTextData;\n            if (!decorative && altText) {\n              serialized.accessibilityData = {\n                type: \"Figure\",\n                alt: altText\n              };\n            }\n            if (context === null) {\n              return serialized;\n            }\n            context.stamps ||= new Map();\n            const area = this.#isSvg ? (serialized.rect[2] - serialized.rect[0]) * (serialized.rect[3] - serialized.rect[1]) : null;\n            if (!context.stamps.has(this.#bitmapId)) {\n              context.stamps.set(this.#bitmapId, {\n                area,\n                serialized\n              });\n              serialized.bitmap = this.#serializeBitmap(false);\n            } else if (this.#isSvg) {\n              const prevData = context.stamps.get(this.#bitmapId);\n              if (area > prevData.area) {\n                prevData.area = area;\n                prevData.serialized.bitmap.close();\n                prevData.serialized.bitmap = this.#serializeBitmap(false);\n              }\n            }\n            return serialized;\n          }\n        }\n        exports.StampEditor = StampEditor;\n\n        /***/\n      }\n      /******/];\n      /************************************************************************/\n      /******/ // The module cache\n      /******/\n      var __webpack_module_cache__ = {};\n      /******/\n      /******/ // The require function\n      /******/\n      function __w_pdfjs_require__(moduleId) {\n        /******/ // Check if module is in cache\n        /******/var cachedModule = __webpack_module_cache__[moduleId];\n        /******/\n        if (cachedModule !== undefined) {\n          /******/return cachedModule.exports;\n          /******/\n        }\n        /******/ // Create a new module (and put it into the cache)\n        /******/\n        var module = __webpack_module_cache__[moduleId] = {\n          /******/ // no module.id needed\n          /******/ // no module.loaded needed\n          /******/exports: {}\n          /******/\n        };\n        /******/\n        /******/ // Execute the module function\n        /******/\n        __webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);\n        /******/\n        /******/ // Return the exports of the module\n        /******/\n        return module.exports;\n        /******/\n      }\n      /******/\n      /************************************************************************/\n      var __webpack_exports__ = {};\n      // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.\n      (() => {\n        var exports = __webpack_exports__;\n        Object.defineProperty(exports, \"__esModule\", {\n          value: true\n        });\n        Object.defineProperty(exports, \"AbortException\", {\n          enumerable: true,\n          get: function () {\n            return _util.AbortException;\n          }\n        });\n        Object.defineProperty(exports, \"AnnotationEditorLayer\", {\n          enumerable: true,\n          get: function () {\n            return _annotation_editor_layer.AnnotationEditorLayer;\n          }\n        });\n        Object.defineProperty(exports, \"AnnotationEditorParamsType\", {\n          enumerable: true,\n          get: function () {\n            return _util.AnnotationEditorParamsType;\n          }\n        });\n        Object.defineProperty(exports, \"AnnotationEditorType\", {\n          enumerable: true,\n          get: function () {\n            return _util.AnnotationEditorType;\n          }\n        });\n        Object.defineProperty(exports, \"AnnotationEditorUIManager\", {\n          enumerable: true,\n          get: function () {\n            return _tools.AnnotationEditorUIManager;\n          }\n        });\n        Object.defineProperty(exports, \"AnnotationLayer\", {\n          enumerable: true,\n          get: function () {\n            return _annotation_layer.AnnotationLayer;\n          }\n        });\n        Object.defineProperty(exports, \"AnnotationMode\", {\n          enumerable: true,\n          get: function () {\n            return _util.AnnotationMode;\n          }\n        });\n        Object.defineProperty(exports, \"CMapCompressionType\", {\n          enumerable: true,\n          get: function () {\n            return _util.CMapCompressionType;\n          }\n        });\n        Object.defineProperty(exports, \"DOMSVGFactory\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.DOMSVGFactory;\n          }\n        });\n        Object.defineProperty(exports, \"FeatureTest\", {\n          enumerable: true,\n          get: function () {\n            return _util.FeatureTest;\n          }\n        });\n        Object.defineProperty(exports, \"GlobalWorkerOptions\", {\n          enumerable: true,\n          get: function () {\n            return _worker_options.GlobalWorkerOptions;\n          }\n        });\n        Object.defineProperty(exports, \"ImageKind\", {\n          enumerable: true,\n          get: function () {\n            return _util.ImageKind;\n          }\n        });\n        Object.defineProperty(exports, \"InvalidPDFException\", {\n          enumerable: true,\n          get: function () {\n            return _util.InvalidPDFException;\n          }\n        });\n        Object.defineProperty(exports, \"MissingPDFException\", {\n          enumerable: true,\n          get: function () {\n            return _util.MissingPDFException;\n          }\n        });\n        Object.defineProperty(exports, \"OPS\", {\n          enumerable: true,\n          get: function () {\n            return _util.OPS;\n          }\n        });\n        Object.defineProperty(exports, \"PDFDataRangeTransport\", {\n          enumerable: true,\n          get: function () {\n            return _api.PDFDataRangeTransport;\n          }\n        });\n        Object.defineProperty(exports, \"PDFDateString\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.PDFDateString;\n          }\n        });\n        Object.defineProperty(exports, \"PDFWorker\", {\n          enumerable: true,\n          get: function () {\n            return _api.PDFWorker;\n          }\n        });\n        Object.defineProperty(exports, \"PasswordResponses\", {\n          enumerable: true,\n          get: function () {\n            return _util.PasswordResponses;\n          }\n        });\n        Object.defineProperty(exports, \"PermissionFlag\", {\n          enumerable: true,\n          get: function () {\n            return _util.PermissionFlag;\n          }\n        });\n        Object.defineProperty(exports, \"PixelsPerInch\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.PixelsPerInch;\n          }\n        });\n        Object.defineProperty(exports, \"PromiseCapability\", {\n          enumerable: true,\n          get: function () {\n            return _util.PromiseCapability;\n          }\n        });\n        Object.defineProperty(exports, \"RenderingCancelledException\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.RenderingCancelledException;\n          }\n        });\n        Object.defineProperty(exports, \"SVGGraphics\", {\n          enumerable: true,\n          get: function () {\n            return _api.SVGGraphics;\n          }\n        });\n        Object.defineProperty(exports, \"UnexpectedResponseException\", {\n          enumerable: true,\n          get: function () {\n            return _util.UnexpectedResponseException;\n          }\n        });\n        Object.defineProperty(exports, \"Util\", {\n          enumerable: true,\n          get: function () {\n            return _util.Util;\n          }\n        });\n        Object.defineProperty(exports, \"VerbosityLevel\", {\n          enumerable: true,\n          get: function () {\n            return _util.VerbosityLevel;\n          }\n        });\n        Object.defineProperty(exports, \"XfaLayer\", {\n          enumerable: true,\n          get: function () {\n            return _xfa_layer.XfaLayer;\n          }\n        });\n        Object.defineProperty(exports, \"build\", {\n          enumerable: true,\n          get: function () {\n            return _api.build;\n          }\n        });\n        Object.defineProperty(exports, \"createValidAbsoluteUrl\", {\n          enumerable: true,\n          get: function () {\n            return _util.createValidAbsoluteUrl;\n          }\n        });\n        Object.defineProperty(exports, \"getDocument\", {\n          enumerable: true,\n          get: function () {\n            return _api.getDocument;\n          }\n        });\n        Object.defineProperty(exports, \"getFilenameFromUrl\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.getFilenameFromUrl;\n          }\n        });\n        Object.defineProperty(exports, \"getPdfFilenameFromUrl\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.getPdfFilenameFromUrl;\n          }\n        });\n        Object.defineProperty(exports, \"getXfaPageViewport\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.getXfaPageViewport;\n          }\n        });\n        Object.defineProperty(exports, \"isDataScheme\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.isDataScheme;\n          }\n        });\n        Object.defineProperty(exports, \"isPdfFile\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.isPdfFile;\n          }\n        });\n        Object.defineProperty(exports, \"loadScript\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.loadScript;\n          }\n        });\n        Object.defineProperty(exports, \"noContextMenu\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.noContextMenu;\n          }\n        });\n        Object.defineProperty(exports, \"normalizeUnicode\", {\n          enumerable: true,\n          get: function () {\n            return _util.normalizeUnicode;\n          }\n        });\n        Object.defineProperty(exports, \"renderTextLayer\", {\n          enumerable: true,\n          get: function () {\n            return _text_layer.renderTextLayer;\n          }\n        });\n        Object.defineProperty(exports, \"setLayerDimensions\", {\n          enumerable: true,\n          get: function () {\n            return _display_utils.setLayerDimensions;\n          }\n        });\n        Object.defineProperty(exports, \"shadow\", {\n          enumerable: true,\n          get: function () {\n            return _util.shadow;\n          }\n        });\n        Object.defineProperty(exports, \"updateTextLayer\", {\n          enumerable: true,\n          get: function () {\n            return _text_layer.updateTextLayer;\n          }\n        });\n        Object.defineProperty(exports, \"version\", {\n          enumerable: true,\n          get: function () {\n            return _api.version;\n          }\n        });\n        var _util = __w_pdfjs_require__(1);\n        var _api = __w_pdfjs_require__(2);\n        var _display_utils = __w_pdfjs_require__(6);\n        var _text_layer = __w_pdfjs_require__(26);\n        var _annotation_editor_layer = __w_pdfjs_require__(27);\n        var _tools = __w_pdfjs_require__(5);\n        var _annotation_layer = __w_pdfjs_require__(29);\n        var _worker_options = __w_pdfjs_require__(14);\n        var _xfa_layer = __w_pdfjs_require__(32);\n        const pdfjsVersion = '3.11.174';\n        const pdfjsBuild = 'ce8716743';\n      })();\n\n      /******/\n      return __webpack_exports__;\n      /******/\n    })()\n  );\n});","map":{"version":3,"names":["webpackUniversalModuleDefinition","root","factory","exports","module","pdfjsLib","define","amd","globalThis","isNodeJS","process","versions","nw","electron","type","IDENTITY_MATRIX","FONT_IDENTITY_MATRIX","MAX_IMAGE_SIZE_TO_CACHE","LINE_FACTOR","LINE_DESCENT_FACTOR","BASELINE_FACTOR","RenderingIntentFlag","ANY","DISPLAY","PRINT","SAVE","ANNOTATIONS_FORMS","ANNOTATIONS_STORAGE","ANNOTATIONS_DISABLE","OPLIST","AnnotationMode","DISABLE","ENABLE","ENABLE_FORMS","ENABLE_STORAGE","AnnotationEditorPrefix","AnnotationEditorType","NONE","FREETEXT","STAMP","INK","AnnotationEditorParamsType","RESIZE","CREATE","FREETEXT_SIZE","FREETEXT_COLOR","FREETEXT_OPACITY","INK_COLOR","INK_THICKNESS","INK_OPACITY","PermissionFlag","MODIFY_CONTENTS","COPY","MODIFY_ANNOTATIONS","FILL_INTERACTIVE_FORMS","COPY_FOR_ACCESSIBILITY","ASSEMBLE","PRINT_HIGH_QUALITY","TextRenderingMode","FILL","STROKE","FILL_STROKE","INVISIBLE","FILL_ADD_TO_PATH","STROKE_ADD_TO_PATH","FILL_STROKE_ADD_TO_PATH","ADD_TO_PATH","FILL_STROKE_MASK","ADD_TO_PATH_FLAG","ImageKind","GRAYSCALE_1BPP","RGB_24BPP","RGBA_32BPP","AnnotationType","TEXT","LINK","LINE","SQUARE","CIRCLE","POLYGON","POLYLINE","HIGHLIGHT","UNDERLINE","SQUIGGLY","STRIKEOUT","CARET","POPUP","FILEATTACHMENT","SOUND","MOVIE","WIDGET","SCREEN","PRINTERMARK","TRAPNET","WATERMARK","THREED","REDACT","AnnotationReplyType","GROUP","REPLY","AnnotationFlag","HIDDEN","NOZOOM","NOROTATE","NOVIEW","READONLY","LOCKED","TOGGLENOVIEW","LOCKEDCONTENTS","AnnotationFieldFlag","REQUIRED","NOEXPORT","MULTILINE","PASSWORD","NOTOGGLETOOFF","RADIO","PUSHBUTTON","COMBO","EDIT","SORT","FILESELECT","MULTISELECT","DONOTSPELLCHECK","DONOTSCROLL","COMB","RICHTEXT","RADIOSINUNISON","COMMITONSELCHANGE","AnnotationBorderStyleType","SOLID","DASHED","BEVELED","INSET","AnnotationActionEventType","E","X","D","U","Fo","Bl","PO","PC","PV","PI","K","F","V","C","DocumentActionEventType","WC","WS","DS","WP","DP","PageActionEventType","O","VerbosityLevel","ERRORS","WARNINGS","INFOS","CMapCompressionType","BINARY","OPS","dependency","setLineWidth","setLineCap","setLineJoin","setMiterLimit","setDash","setRenderingIntent","setFlatness","setGState","save","restore","transform","moveTo","lineTo","curveTo","curveTo2","curveTo3","closePath","rectangle","stroke","closeStroke","fill","eoFill","fillStroke","eoFillStroke","closeFillStroke","closeEOFillStroke","endPath","clip","eoClip","beginText","endText","setCharSpacing","setWordSpacing","setHScale","setLeading","setFont","setTextRenderingMode","setTextRise","moveText","setLeadingMoveText","setTextMatrix","nextLine","showText","showSpacedText","nextLineShowText","nextLineSetSpacingShowText","setCharWidth","setCharWidthAndBounds","setStrokeColorSpace","setFillColorSpace","setStrokeColor","setStrokeColorN","setFillColor","setFillColorN","setStrokeGray","setFillGray","setStrokeRGBColor","setFillRGBColor","setStrokeCMYKColor","setFillCMYKColor","shadingFill","beginInlineImage","beginImageData","endInlineImage","paintXObject","markPoint","markPointProps","beginMarkedContent","beginMarkedContentProps","endMarkedContent","beginCompat","endCompat","paintFormXObjectBegin","paintFormXObjectEnd","beginGroup","endGroup","beginAnnotation","endAnnotation","paintImageMaskXObject","paintImageMaskXObjectGroup","paintImageXObject","paintInlineImageXObject","paintInlineImageXObjectGroup","paintImageXObjectRepeat","paintImageMaskXObjectRepeat","paintSolidColorImageMask","constructPath","PasswordResponses","NEED_PASSWORD","INCORRECT_PASSWORD","verbosity","setVerbosityLevel","level","Number","isInteger","getVerbosityLevel","info","msg","console","log","warn","unreachable","Error","assert","cond","_isValidProtocol","url","protocol","createValidAbsoluteUrl","baseUrl","options","addDefaultProtocol","startsWith","dots","match","length","tryConvertEncoding","stringToUTF8String","absoluteUrl","URL","shadow","obj","prop","value","nonSerializable","Object","defineProperty","enumerable","configurable","writable","BaseException","BaseExceptionClosure","message","name","constructor","prototype","PasswordException","code","UnknownErrorException","details","InvalidPDFException","MissingPDFException","UnexpectedResponseException","status","FormatError","AbortException","bytesToString","bytes","undefined","MAX_ARGUMENT_COUNT","String","fromCharCode","apply","strBuf","i","chunkEnd","Math","min","chunk","subarray","push","join","stringToBytes","str","Uint8Array","charCodeAt","string32","objectSize","keys","objectFromMap","map","create","key","isLittleEndian","buffer8","view32","Uint32Array","buffer","isEvalSupported","Function","FeatureTest","isOffscreenCanvasSupported","OffscreenCanvas","platform","navigator","isWin","isMac","includes","isCSSRoundSupported","CSS","supports","hexNumbers","Array","n","toString","padStart","Util","makeHexColor","r","g","b","scaleMinMax","minMax","temp","m1","m2","applyTransform","p","m","xt","yt","applyInverseTransform","d","getAxialAlignedBoundingBox","p1","p2","slice","p3","p4","max","inverseTransform","singularValueDecompose2dScale","transpose","a","c","first","second","sqrt","sx","sy","normalizeRect","rect","intersect","rect1","rect2","xLow","xHigh","yLow","yHigh","bezierBoundingBox","x0","y0","x1","y1","x2","y2","x3","y3","tvalues","bounds","t","t1","t2","b2ac","sqrtb2ac","abs","j","mt","jlen","PDFStringTranslateTable","stringToPDFString","encoding","decoder","TextDecoder","fatal","decode","ex","ii","charAt","decodeURIComponent","escape","utf8StringToString","unescape","encodeURIComponent","isArrayBuffer","v","byteLength","isArrayEqual","arr1","arr2","getModificationDate","date","Date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","PromiseCapability","settled","promise","Promise","resolve","reject","data","reason","NormalizeRegex","NormalizationMap","normalizeUnicode","Map","replaceAll","_","normalize","get","getUuid","crypto","randomUUID","buf","getRandomValues","floor","random","AnnotationPrefix","_util","__w_pdfjs_require__","_annotation_storage","_display_utils","_font_loader","_displayNode_utils","_canvas","_worker_options","_message_handler","_metadata","_optional_content_config","_transport_stream","_displayFetch_stream","_displayNetwork","_displayNode_stream","_displaySvg","_xfa_text","DEFAULT_RANGE_CHUNK_SIZE","RENDERING_CANCELLED_TIMEOUT","DELAYED_CLEANUP_TIMEOUT","DefaultCanvasFactory","NodeCanvasFactory","DOMCanvasFactory","DefaultCMapReaderFactory","NodeCMapReaderFactory","DOMCMapReaderFactory","DefaultFilterFactory","NodeFilterFactory","DOMFilterFactory","DefaultStandardFontDataFactory","NodeStandardFontDataFactory","DOMStandardFontDataFactory","getDocument","src","range","task","PDFDocumentLoadingTask","docId","getUrlProp","getDataProp","httpHeaders","withCredentials","password","rangeTransport","PDFDataRangeTransport","rangeChunkSize","worker","PDFWorker","docBaseUrl","isDataScheme","cMapUrl","cMapPacked","CMapReaderFactory","standardFontDataUrl","StandardFontDataFactory","ignoreErrors","stopAtErrors","maxImageSize","canvasMaxAreaInBytes","disableFontFace","fontExtraProperties","enableXfa","ownerDocument","document","disableRange","disableStream","disableAutoFetch","pdfBug","NaN","useSystemFonts","useWorkerFetch","isValidFetchUrl","baseURI","canvasFactory","filterFactory","styleElement","transportFactory","cMapReaderFactory","isCompressed","standardFontDataFactory","workerParams","port","GlobalWorkerOptions","workerPort","fromPort","_worker","fetchDocParams","apiVersion","evaluatorOptions","transportParams","then","destroyed","workerIdPromise","_fetchDocument","networkStreamPromise","networkStream","PDFDataTransportStream","initialData","progressiveDone","contentDispositionFilename","createPDFNetworkStream","params","PDFNodeStream","PDFFetchStream","PDFNetworkStream","all","workerId","messageHandler","MessageHandler","transport","WorkerTransport","_transport","send","catch","_capability","source","sendWithPromise","val","href","window","location","Buffer","isNaN","onPassword","onProgress","destroy","_pendingDestroy","_rangeListeners","_progressListeners","_progressiveReadListeners","_progressiveDoneListeners","_readyCapability","addRangeListener","listener","addProgressListener","addProgressiveReadListener","addProgressiveDoneListener","onDataRange","begin","onDataProgress","loaded","total","onDataProgressiveRead","onDataProgressiveDone","transportReady","requestDataRange","end","abort","PDFDocumentProxy","pdfInfo","_pdfInfo","deprecated","getJSActions","js","jsArr","annotationStorage","numPages","fingerprints","isPureXfa","_htmlForXfa","allXfaHtml","getPage","pageNumber","getPageIndex","ref","getDestinations","getDestination","id","getPageLabels","getPageLayout","getPageMode","getViewerPreferences","getOpenAction","getAttachments","getDocJSActions","getOutline","getOptionalContentConfig","getPermissions","getMetadata","getMarkInfo","getData","saveDocument","getDownloadInfo","downloadInfoCapability","cleanup","keepLoadedFonts","startCleanup","loadingTask","loadingParams","getFieldObjects","hasJSActions","getCalculationOrderIds","PDFPageProxy","delayedCleanupTimeout","pendingCleanup","pageIndex","pageInfo","_pageIndex","_pageInfo","_stats","StatTimer","_pdfBug","commonObjs","objs","PDFObjects","_maybeCleanupAfterRender","_intentStates","rotate","userUnit","view","getViewport","scale","rotation","offsetX","offsetY","dontFlip","PageViewport","viewBox","getAnnotations","intent","intentArgs","getRenderingIntent","renderingIntent","getPageJSActions","getXfa","children","render","canvasContext","viewport","annotationMode","background","optionalContentConfigPromise","annotationCanvasMap","pageColors","printAnnotationStorage","time","abortDelayedCleanup","intentState","cacheKey","set","streamReaderCancelTimeout","clearTimeout","intentPrint","displayReadyCapability","operatorList","fnArray","argsArray","lastChunk","separateAnnots","_pumpOperatorList","complete","error","renderTasks","delete","internalRenderTask","tryCleanup","capability","_abortOperatorList","timeEnd","InternalRenderTask","callback","useRequestAnimationFrame","Set","add","renderTask","transparency","optionalContentConfig","initializeGraphics","operatorListChanged","getOperatorList","opListReadCapability","opListTask","streamTextContent","includeMarkedContent","disableNormalization","TEXT_CONTENT_CHUNK_SIZE","sendWithStream","highWaterMark","size","textContent","items","getTextContent","xfa","XfaText","readableStream","pump","reader","read","done","assign","styles","getReader","getStructTree","_destroy","waitOn","values","force","completed","cancel","clear","resetStats","success","#tryCleanup","delayed","setTimeout","#abortDelayedCleanup","_startRenderPage","_renderPageChunk","operatorListChunk","annotationStorageSerializable","transfers","streamReader","RenderingCancelledException","delay","extraDelay","curCacheKey","curIntentState","stats","LoopbackPort","listeners","deferred","postMessage","transfer","event","structuredClone","call","addEventListener","removeEventListener","terminate","PDFWorkerUtil","isWorkerDisabled","fallbackWorkerSrc","fakeWorkerId","require","pdfjsFilePath","currentScript","replace","isSameOrigin","otherUrl","base","origin","other","createCDNWrapper","wrapper","createObjectURL","Blob","workerPorts","_port","_webWorker","_messageHandler","has","WeakMap","_initializeFromPort","_initialize","on","_mainThreadWorkerMessageHandler","workerSrc","Worker","terminateEarly","onWorkerError","_setupFakeWorker","sendTest","testObj","_setupFakeWorkerGlobal","WorkerMessageHandler","workerHandler","setup","cachedPort","pdfjsWorker","loader","mainWorkerMessageHandler","eval","loadScript","methodPromises","pageCache","pagePromises","passwordCapability","fontLoader","FontLoader","_params","destroyCapability","_networkStream","_fullReader","_lastProgress","setupMessageHandler","cacheSimpleMethod","#cacheSimpleMethod","cachedPromise","AnnotationStorage","isOpList","SerializableEmpty","PrintAnnotationStorage","serializable","hash","page","hasOwnProperty","resetModified","terminated","cancelAllRequests","sink","getFullReader","evt","onPull","close","ArrayBuffer","enqueue","onCancel","ready","readyReason","headersCapability","fullReader","headersReady","isStreamingSupported","isRangeSupported","contentLength","rangeReader","getRangeReader","_numPages","htmlForXfa","exception","updatePassword","exportedData","exportedError","inspectFont","FontInspector","enabled","font","fontAdded","FontFaceObject","bind","finally","imageData","pageProxy","bitmap","width","height","fetch","filename","num","gen","results","OptionalContentConfig","metadata","Metadata","cleanupSuccessful","ensureObj","#ensureObj","objId","RenderTask","onContinue","form","canvas","canvasInUse","WeakSet","operatorListIdx","running","graphicsReadyCallback","graphicsReady","_useRequestAnimationFrame","cancelled","_cancelBound","_continueBound","_continue","_scheduleNextBound","_scheduleNext","_nextBound","_next","StepperManager","stepper","init","nextBreakPoint","getNextBreakPoint","gfx","CanvasGraphics","beginDrawing","endDrawing","updateOperatorList","requestAnimationFrame","executeOperatorList","version","build","_editor","_murmurhash","freeze","modified","storage","onSetModified","onResetModified","onAnnotationEditor","getValue","defaultValue","getRawValue","remove","AnnotationEditor","setValue","entry","entries","setModified","_type","getAll","setAll","#setModified","print","MurmurHash3_64","context","hasBitmap","serialized","serialize","update","JSON","stringify","hexdigest","parent","clone","_tools","altText","altTextDecorative","altTextButton","altTextTooltip","altTextTooltipTimeout","keepAspectRatio","resizersDiv","boundFocusin","focusin","boundFocusout","focusout","hasBeenClicked","isEditing","isInEditMode","_initialOptions","_uiManager","_focusEventsAllowed","_l10nPromise","isDraggable","zIndex","_zIndex","_borderLineWidth","_colorManager","ColorManager","SMALL_EDITOR_SIZE","parameters","div","uiManager","annotationElementId","_willKeepAspectRatio","isCentered","_structTreeParentId","rawDims","pageWidth","pageHeight","pageX","pageY","pageRotation","viewParameters","pageDimensions","pageTranslation","parentDimensions","x","y","isAttachedToDOM","deleted","editorType","getPrototypeOf","_defaultLineColor","getHexCode","deleteAnnotationElement","editor","fakeEditor","FakeEditor","getNextId","addToAnnotationStorage","initialize","l10n","strings","style","getComputedStyle","documentElement","parseFloat","getPropertyValue","updateDefaultParams","_value","defaultPropertiesToUpdate","isHandlingMimeForPasting","mime","paste","item","propertiesToUpdate","_isDraggable","classList","toggle","center","parentRotation","fixAndSetPosition","addCommands","currentLayer","setInBackground","setInForeground","setParent","setSelected","target","relatedTarget","closest","preventDefault","isMultipleSelection","commitOrRemove","isEmpty","commit","setAt","tx","ty","screenToPageTranslation","translate","#translate","translateInPage","scrollIntoView","block","drag","parentWidth","parentHeight","getBoundingClientRect","findNewParent","bx","by","getBaseTranslation","left","toFixed","top","#getBaseTranslation","moveInDOM","rotatePoint","#rotatePoint","angle","pageTranslationToScreen","getRotationMatrix","#getRotationMatrix","parentScale","realScale","scaledWidth","scaledHeight","round","setDims","fixDims","widthPercent","endsWith","heightPercent","getInitialTranslation","createResizers","#createResizers","createElement","classes","append","resizerPointerdown","noContextMenu","prepend","#resizerPointerdown","button","ctrlKey","boundResizerPointermove","resizerPointermove","savedDraggable","pointerMoveOptions","passive","capture","savedX","savedY","savedWidth","savedHeight","savedParentCursor","cursor","savedCursor","pointerUpCallback","newX","newY","newWidth","newHeight","cmd","undo","mustExec","#resizerPointermove","minWidth","MIN_SIZE","minHeight","rotationMatrix","transf","invRotationMatrix","invTransf","getPoint","getOpposite","isDiagonal","isHorizontal","w","h","point","oppositePoint","transfOppositePoint","oppositeX","oppositeY","ratioX","ratioY","deltaX","deltaY","movementX","movementY","oldDiag","hypot","addAltTextButton","className","setAttribute","tabIndex","stopPropagation","editAltText","setAltTextButtonState","PERCENT","#setAltTextButtonState","tooltip","DELAY_TO_SHOW_TOOLTIP","_eventBus","dispatch","subtype","action","innerText","parentNode","getClientDimensions","altTextData","decorative","maxWidth","maxHeight","bindEvents","pointerdown","setUpDragSession","#setUpDragSession","isSelected","pointerMoveCallback","e","dragSelectedEditors","endDragSession","shiftKey","metaKey","toggleSelected","moveEditorInDOM","_setParentAndPosition","changeParent","getRect","shiftX","shiftY","getRectInCurrentCoords","onceAdded","enableEditMode","disableEditMode","shouldGetKeyboardEvents","needsToBeRebuilt","rebuild","isForCopying","deserialize","removeEditor","isResizable","makeResizable","select","unselect","contains","activeElement","focus","updateParams","disableEditing","hidden","enableEditing","enterInEditMode","contentDiv","setActiveEditor","setAspectRatio","aspectRatio","element","names","opacityToHex","opacity","IdManager","getId","ImageManager","baseId","cache","_isSVGFittingCanvas","svg","ctx","getContext","image","Image","drawImage","getImageData","#get","rawData","refCounter","isSvg","response","ok","statusText","blob","file","mustRemoveAspectRatioPromise","fileReader","FileReader","imageElement","imagePromise","onload","svgUrl","result","onerror","readAsDataURL","createImageBitmap","getFromFile","lastModified","getFromUrl","getFromId","getSvgUrl","deleteId","isValidId","CommandManager","commands","locked","maxSize","position","overwriteIfSameType","keepUndo","next","splice","redo","hasSomethingToUndo","hasSomethingToRedo","KeyboardManager","callbacks","allKeys","isMacKey","split","at","#serialize","altKey","exec","self","bubbles","args","checker","_colorsMapping","_colors","colors","getColorValues","convert","color","rgb","getRGB","matchMedia","matches","RGB","every","AnnotationEditorUIManager","activeEditor","allEditors","allLayers","altTextManager","commandManager","currentPageIndex","deletedAnnotationsElementIds","draggingEditors","editorTypes","editorsToRescale","idManager","isEnabled","isWaiting","lastActiveElement","mode","selectedEditors","boundBlur","blur","boundFocus","boundCopy","copy","boundCut","cut","boundPaste","boundKeydown","keydown","boundOnEditingAction","onEditingAction","boundOnPageChanging","onPageChanging","boundOnScaleChanging","onScaleChanging","boundOnRotationChanging","onRotationChanging","previousStates","hasSelectedEditor","translation","translationTimeoutId","container","viewer","TRANSLATE_SMALL","TRANSLATE_BIG","_keyboardManager","proto","arrowChecker","hasSomethingToControl","small","big","selectAll","unselectAll","translateSelectedEditors","eventBus","pdfDocument","_on","PixelsPerInch","PDF_TO_CSS_UNITS","removeKeyboardManager","removeFocusManager","_off","layer","hcmFilter","addHCMFilter","foreground","direction","focusMainContainer","findParent","layerX","layerY","disableUserSelect","addShouldRescale","removeShouldRescale","pagesRotation","addFocusManager","#addFocusManager","#removeFocusManager","hasSelection","lastEditor","once","addKeyboardManager","#addKeyboardManager","#removeKeyboardManager","addCopyPasteListeners","#addCopyPasteListeners","removeCopyPasteListeners","#removeCopyPasteListeners","addEditListeners","removeEditListeners","editors","clipboardData","setData","parse","isArray","newEditors","deserializedEditor","addEditorToLayer","selectEditors","getActive","dispatchUpdateStates","#dispatchUpdateStates","hasChanged","some","dispatchUpdateUI","#dispatchUpdateUI","setEditingState","registerEditorTypes","types","getLayer","addLayer","enable","disable","removeLayer","updateMode","editId","disableAll","enableAll","updateToolbar","addNewEditor","enableWaiting","mustWait","disableClick","enableClick","#enableAll","#disableAll","getEditors","getEditor","addEditor","addDeletedAnnotationElement","isDeletedAnnotationElement","removeDeletedAnnotationElement","#addEditorToLayer","addOrRebuild","ed","#isEmpty","#selectEditors","noCommit","totalX","totalY","TIME_TO_WAIT","savedPageIndex","newPageIndex","mustBeAddedInUndoStack","move","isActive","getMode","imageManager","_base_factory","SVG_NS","PDF","BaseFilterFactory","_cache","_defs","hcmKey","hcmUrl","hcmHighlightFilter","hcmHighlightKey","hcmHighlightUrl","#cache","defs","#defs","visibility","contain","createElementNS","body","addFilter","maps","tableR","tableG","tableB","mapR","mapG","mapB","bufferR","bufferG","bufferB","filter","createFilter","addTransferMapConversion","fgColor","bgColor","fgRGB","bgRGB","table","addGrayConversion","getSteps","start","arr","addHighlightHCMFilter","newFgColor","newBgColor","fgGray","bgGray","newFgRGB","newBgRGB","fg","bg","step","newStart","newStep","prev","k","keepHCM","#addGrayConversion","feColorMatrix","#createFilter","appendFeFunc","#appendFeFunc","feComponentTransfer","func","feFunc","#addTransferMapConversion","rTable","gTable","bTable","#getRGB","BaseCanvasFactory","_document","_createCanvas","fetchData","asTypedArray","arrayBuffer","text","request","XMLHttpRequest","open","responseType","onreadystatechange","readyState","DONE","responseText","BaseCMapReaderFactory","_fetchData","compressionType","cMapData","BaseStandardFontDataFactory","DOMSVGFactory","BaseSVGFactory","_createSVG","centerX","centerY","rotateA","rotateB","rotateC","rotateD","offsetCanvasX","offsetCanvasY","convertToViewportPoint","convertToViewportRectangle","topLeft","bottomRight","convertToPdfPoint","trim","substring","toLowerCase","isPdfFile","test","getFilenameFromUrl","onlyStripPath","lastIndexOf","getPdfFilenameFromUrl","defaultFilename","reURI","reFilename","splitURI","suggestedFilename","started","times","now","outBuf","longest","padEnd","removeScriptElement","script","head","pdfDateStringRegex","PDFDateString","toDateObject","input","RegExp","year","parseInt","month","day","hour","minute","universalTimeRelation","offsetHour","offsetMinute","UTC","getXfaPageViewport","xfaPage","attributes","colorRGB","span","computedColor","getCurrentTransform","f","getTransform","getCurrentTransformInverse","invertSelf","setLayerDimensions","mustFlip","mustRotate","useRound","widthStr","heightStr","reset","canvasAndContext","skipDimensions","SEED","MASK_HIGH","MASK_LOW","seed","h1","h2","blockCounts","tailLength","dataUint32","k1","k2","C1","C2","C1_LOW","C2_LOW","systemFonts","nativeFontFaces","loadingRequests","loadTestFontId","addNativeFontFace","nativeFontFace","fonts","removeNativeFontFace","insertRule","rule","getElementsByTagName","styleSheet","sheet","cssRules","loadSystemFont","loadedName","isFontLoadingAPISupported","fontFace","FontFace","load","baseFontName","attached","missingFile","systemFontInfo","createNativeFontFace","family","createFontFaceRule","isSyncFontLoadingSupported","_queueLoadingCallback","_prepareFontLoadEvent","hasFonts","supported","userAgent","completeRequest","otherRequest","shift","_loadTestFont","testFont","atob","int32","offset","spliceString","s","insert","chunk1","chunk2","called","isFontReady","fillText","COMMENT_OFFSET","CFF_CHECKSUM_OFFSET","XXXX_VALUE","checksum","btoa","fontFamily","translatedData","compiledGlyphs","_inspectFont","cssFontInfo","css","weight","fontWeight","italicAngle","mimetype","getPathGenerator","character","cmds","jsBuf","current","fs","readFile","Canvas","createCanvas","_pattern_helper","_image_utils","MIN_FONT_SIZE","MAX_FONT_SIZE","MAX_GROUP_SIZE","EXECUTION_TIME","EXECUTION_STEPS","MAX_SIZE_TO_COMPILE","FULL_CHUNK_HEIGHT","mirrorContextOperations","destCtx","_removeMirroring","__originalSave","__originalRestore","__originalRotate","__originalScale","__originalTranslate","__originalTransform","__originalSetTransform","setTransform","__originalResetTransform","resetTransform","__originalClip","__originalMoveTo","__originalLineTo","__originalBezierCurveTo","bezierCurveTo","__originalRect","__originalClosePath","__originalBeginPath","beginPath","ctxSave","ctxRestore","ctxTranslate","ctxScale","ctxTransform","ctxSetTransform","ctxResetTransform","ctxRotate","cp1x","cp1y","cp2x","cp2y","CachedCanvases","getCanvas","canvasEntry","drawImageAtIntegerCoords","srcImg","srcX","srcY","srcW","srcH","destX","destY","destW","destH","tlX","rTlX","tlY","rTlY","brX","rWidth","brY","rHeight","sign","scaleX","scaleY","compileType3Glyph","imgData","POINT_TO_PROCESS_LIMIT","POINT_TYPES","width1","points","j0","lineSize","pos","elem","mask","count","sum","steps","Int32Array","path","Path2D","p0","pp","drawOutline","CanvasExtraState","alphaIsShape","fontSize","fontSizeScale","textMatrix","textMatrixScale","fontMatrix","leading","lineX","lineY","charSpacing","wordSpacing","textHScale","textRenderingMode","textRise","fillColor","strokeColor","patternFill","fillAlpha","strokeAlpha","lineWidth","activeSMask","transferMaps","startNewPathAndClipBox","clipBox","setCurrentPoint","updatePathMinMax","minX","minY","maxX","maxY","updateRectMinMax","updateScalingPathMinMax","updateCurvePathMinMax","box","getPathBoundingBox","pathType","PathType","xStrokePad","yStrokePad","updateClipFromPath","isEmptyClip","Infinity","getClippedPathBoundingBox","putBinaryImageData","ImageData","putImageData","partialChunkHeight","fullChunks","totalChunks","chunkImgData","createImageData","srcPos","destPos","dest","thisChunkHeight","elemsInThisChunk","kind","srcLength","dest32","dest32DataLength","fullSrcDiff","white","black","srcDiff","kEnd","kEndUnrolled","srcByte","putBinaryImageMask","convertBlackAndWhiteToRGBA","nonBlackColor","copyCtxState","sourceCtx","properties","property","setLineDash","getLineDash","lineDashOffset","resetCtxToDefault","strokeStyle","fillStyle","fillRule","globalAlpha","lineCap","lineJoin","miterLimit","globalCompositeOperation","composeSMaskBackdrop","r0","g0","b0","alpha","alpha_","composeSMaskAlpha","maskData","layerData","transferMap","composeSMaskLuminosity","genericComposeSMask","maskCtx","layerCtx","backdrop","layerOffsetX","layerOffsetY","maskOffsetX","maskOffsetY","hasBackdrop","composeFn","PIXELS_TO_PROCESS","chunkSize","ceil","row","chunkHeight","composeSMask","smask","layerBox","layerWidth","layerHeight","getImageSmoothingEnabled","interpolate","fround","actualScale","devicePixelRatio","LINE_CAP_STYLES","LINE_JOIN_STYLES","NORMAL_CLIP","EO_CLIP","canvasCtx","markedContentStack","stateStack","pendingClip","pendingEOFill","res","xobjs","groupStack","processingType3","baseTransform","baseTransformStack","groupLevel","smaskStack","smaskCounter","tempSMask","suspendedCtx","contentVisible","cachedCanvases","cachedPatterns","viewportScale","outputScaleX","outputScaleY","_cachedScaleForStroking","_cachedGetSinglePixelWidth","_cachedBitmapsMap","getObject","fallback","savedFillStyle","fillRect","transparentCanvas","compositeCtx","executionStartIdx","continueCallback","argsArrayLen","chunkOperations","endTime","fnId","breakIt","depObjId","objsPool","restoreInitialState","#restoreInitialState","inSMaskMode","HTMLCanvasElement","drawFilter","#drawFilter","hcmFilterId","savedFilter","_scaleImage","img","widthScale","heightScale","paintWidth","paintHeight","tmpCanvasId","tmpCanvas","tmpCtx","clearRect","_createMaskCanvas","isPatternFill","currentTransform","scaled","maskCanvas","mainKey","cachedImage","maskToCanvas","cord1","cord2","drawnWidth","drawnHeight","fillCanvas","fillCtx","imageSmoothingEnabled","inverse","getPattern","limit","dashArray","dashPhase","flatness","states","checkSMaskState","beginSMaskMode","endSMaskMode","cacheId","scratchCanvas","compose","dirtyBox","old","pop","ops","startX","startY","isScalingMatrix","minMaxForBezier","xw","yh","consumePath","rescaleAndStroke","needRestore","paths","pendingTextPaths","addToPath","spacing","fontRefName","fontObj","fontDirection","isType3Font","typeface","fallbackName","bold","italic","browserFontSize","rise","paintChar","patternTransform","fillStrokeMode","isAddToPathSet","strokeText","isFontSubpixelAAEnabled","glyphs","showType3Text","glyphsLength","vertical","spacingDir","defaultVMetrics","widthAdvanceScale","simpleFillText","pattern","getSinglePixelWidth","isInvalidPDFjsFont","chars","glyph","unicode","restoreNeeded","isSpace","fontChar","accent","scaledX","scaledY","vmetric","vx","vy","remeasure","measuredWidth","measureText","characterScaleX","isInFont","scaledAccentX","scaledAccentY","charWidth","isTextInvisible","spacingLength","charProcOperatorList","operatorListId","transformed","xWidth","yWidth","llx","lly","urx","ury","getColorN_Pattern","IR","canvasGraphicsFactory","createCanvasGraphics","TilingPattern","_getPattern","arguments","matrix","getShadingPattern","SHADING","inv","bbox","group","currentCtx","isolated","knockout","canvasBounds","groupCtx","startTransformInverse","currentMtx","hasOwnCanvas","canvasWidth","canvasHeight","annotationCanvas","savedCtx","compiled","skewX","skewY","positions","trans","images","applyTransferMapsToCanvas","applyTransferMapsToBitmap","imgToPaint","HTMLElement","tag","visible","isVisible","isContentVisible","absDet","normX","normY","getScaleForStroking","scaledLineWidth","scaledXLineWidth","scaledYLineWidth","baseArea","saveRestore","dashes","op","applyBoundingBox","region","BaseShadingPattern","RadialAxialShadingPattern","_bbox","_colorStops","_p0","_p1","_r0","_r1","_createGradient","grad","createLinearGradient","createRadialGradient","colorStop","addColorStop","owner","ownerBBox","createPattern","domMatrix","DOMMatrix","drawTriangle","c1","c2","c3","coords","rowSize","tmp","c1r","c1g","c1b","c2r","c2g","c2b","c3r","c3g","c3b","xa","car","cag","cab","xb","cbr","cbg","cbb","x1_","x2_","drawFigure","figure","ps","cs","verticesPerRow","rows","cols","q","MeshShadingPattern","_coords","_figures","_bounds","_background","_createMeshCanvas","combinedScale","backgroundColor","EXPECTED_SCALE","MAX_PATTERN_SIZE","BORDER_SIZE","boundsWidth","boundsHeight","paddedWidth","paddedHeight","matrixScale","temporaryPatternCanvas","DummyShadingPattern","PaintType","COLORED","UNCOLORED","xstep","ystep","paintType","tilingType","createPatternCanvas","curMatrixScale","dimx","getSizeAndScale","dimy","graphics","setFillAndStrokeStyleToContext","adjustedX0","adjustedY0","adjustedX1","adjustedY1","clipBbox","realOutputSize","bboxWidth","bboxHeight","cssColor","convertToRGBA","convertRGBToRGBA","inverseDecode","zeroMapping","oneMapping","widthInSource","widthRemainder","len32","src32","s1","s2","s3","jj","grayToRGBA","CallbackKind","UNKNOWN","DATA","ERROR","StreamKind","CANCEL","CANCEL_COMPLETE","CLOSE","ENQUEUE","PULL","PULL_COMPLETE","START_COMPLETE","wrapReason","sourceName","targetName","comObj","callbackId","streamId","streamSinks","streamControllers","callbackCapabilities","actionHandler","_onComObjOnMessage","stream","processStreamMessage","cbSourceName","cbTargetName","createStreamSink","actionName","handler","ah","queueingStrategy","ReadableStream","controller","startCapability","startCall","pullCall","cancelCall","isClosed","desiredSize","pull","pullCapability","cancelCapability","#createStreamSink","streamSink","isCancelled","lastDesiredSize","sinkCapability","#processStreamMessage","streamController","deleteStreamController","#deleteStreamController","allSettled","metadataMap","parsedData","getRaw","INTERNAL","Symbol","OptionalContentGroup","_setVisible","internal","cachedGetHash","groups","initialHash","order","creator","baseState","off","getHash","evaluateVisibilityExpression","#evaluateVisibilityExpression","array","operator","state","expression","policy","ids","setVisibility","hasInitialVisibility","getOrder","getGroups","getGroup","pdfDataRangeTransport","_queuedChunks","_progressiveDone","_contentDispositionFilename","_pdfDataRangeTransport","_isStreamingSupported","_isRangeSupported","_contentLength","_fullRequestReader","_rangeReaders","_onReceiveData","_onProgress","_onProgressiveDone","_enqueue","found","_begin","_progressiveDataLength","_loaded","_removeRangeReader","indexOf","queuedChunks","PDFDataTransportStreamReader","PDFDataTransportStreamRangeReader","_stream","_done","_filename","_requests","_headersReady","requestCapability","_end","_queuedChunk","requestsCapability","_network_utils","createFetchOptions","headers","abortController","method","signal","credentials","redirect","createHeaders","Headers","getArrayBuffer","isHttp","_rangeRequestReaders","PDFFetchStreamReader","PDFFetchStreamRangeReader","_reader","_withCredentials","_headersCapability","_disableRange","_rangeChunkSize","_abortController","AbortController","_headers","validateResponseStatus","createResponseStatusError","getResponseHeader","allowRangeRequests","suggestedLength","validateRangeRequestCapabilities","extractFilenameFromHeader","_readCapability","_content_disposition","returnValues","contentEncoding","contentDisposition","getFilenameFromContentDispositionHeader","needsEncodingFixup","toParamRegExp","rfc2616unquote","rfc5987decode","rfc2047decode","fixupEncoding","rfc2231getparam","attributePattern","flags","textdecode","contentDispositionStr","iter","quot","part","parts","quotindex","extvalue","encodingend","langvalue","charset","hex","OK_RESPONSE","PARTIAL_CONTENT_RESPONSE","xhr","NetworkManager","currXhrId","pendingRequests","requestRange","requestFull","xhrId","pendingRequest","setRequestHeader","expectedStatus","onError","onStateChange","onprogress","onHeadersReceived","onDone","xhrStatus","ok_response_on_range_request","rangeHeader","getRequestXhr","isPendingRequest","abortRequest","_source","_manager","_onRangeRequestReaderClosed","PDFNetworkStreamFullRequestReader","PDFNetworkStreamRangeRequestReader","onClosed","manager","_onHeadersReceived","_onDone","_onError","_url","_fullRequestId","_headersReceivedCapability","_cachedChunks","_storedError","fullRequestXhrId","fullRequestXhr","lengthComputable","_requestId","_close","fileUriRegex","parseUrl","sourceUrl","parsedUrl","host","isFsUrl","PDFNodeStreamFsFullReader","PDFNodeStreamFullReader","PDFNodeStreamFsRangeReader","PDFNodeStreamRangeReader","BaseFullReader","_readableStream","_error","_setReadableStream","BaseRangeReader","createRequestOptions","auth","hostname","handleResponse","statusCode","_request","http","https","_httpHeaders","Range","lstat","stat","createReadStream","SVG_DEFAULTS","fontStyle","XML_NS","XLINK_NS","contentType","forceDataSchema","digits","b1","b2","b3","d1","d2","d3","d4","convertImgDataToPng","PNG_HEADER","CHUNK_WRAPPER_SIZE","crcTable","crc32","crc","writePngChunk","len","adler32","deflateSync","literals","deflateSyncUncompressed","node","from","output","maxBlockLength","deflateBlocks","idat","pi","adler","encode","isMask","bitDepth","colorType","offsetLiterals","offsetBytes","ihdr","pngLength","SVGExtraState","dependencies","activeClipUrl","clipGroup","maskId","opListToTree","opList","opTree","opListElement","fn","pf","pm","acos","clipCount","maskCount","shadingCount","SVGGraphics","svgFactory","transformMatrix","transformStack","extraStack","embedFonts","embeddedFonts","cssStyle","_operatorIdMapping","tgrp","executeOpTree","loadDependencies","getSVG","svgElement","convertOpList","operatorIdMapping","opTreeElement","lineMatrix","xcoords","ycoords","tspan","setAttributeNS","txtElement","txtgrp","lineWidthScale","_setStrokeAttributes","_ensureTransformGroup","addFontStyle","hasChildNodes","setStrokeAlpha","setFillAlpha","_makeColorN_Pattern","_makeShadingPattern","_makeTilingPattern","tilingId","tx0","ty0","tx1","ty1","xscale","yscale","txstep","tystep","tiling","childNodes","shadingId","colorStops","gradient","point0","point1","focalPoint","circlePoint","focalRadius","circleRadius","stop","getAttributeNS","clipId","clipPath","clipElement","cloneNode","imgSrc","cliprect","imgEl","definitions","rootGroup","_ensureClipGroup","walk","shouldBuildText","child","MAX_TEXT_DIVS_TO_RENDER","DEFAULT_FONT_SIZE","DEFAULT_FONT_ASCENT","ascentCache","getCtx","getAscent","cachedAscent","metrics","ascent","fontBoundingBoxAscent","descent","fontBoundingBoxDescent","ratio","pixels","appendText","geom","textDiv","textDivProperties","hasText","hasEOL","_textDivs","_transform","atan2","fontName","fontHeight","fontAscent","_isOffscreenCanvasSupported","sin","cos","scaleFactorStr","divStyle","_container","_rootContainer","_pageWidth","_pageHeight","dir","_fontInspectorEnabled","dataset","shouldScaleText","absScaleX","absScaleY","_textDivProperties","_isReadableStream","_layoutText","layout","prevFontSize","prevFontFamily","_canceled","textDivs","textDivsLength","TextLayerRenderTask","textContentSource","textContentItemsStr","_textContentSource","_textContentItemsStr","_layoutTextParams","_processItems","styleCache","br","_render","renderTextLayer","textContentStream","scaleFactor","updateTextLayer","mustRescale","_freetext","_ink","_stamp","AnnotationEditorLayer","accessibilityManager","allowClick","annotationLayer","boundPointerup","pointerup","boundPointerdown","hadPointerDown","isCleaningUp","isDisabling","_initialized","FreeTextEditor","InkEditor","StampEditor","addInkEditorIfNeeded","isCommitting","createAndAddNewEditor","pointerEvents","annotationElementIds","editables","getEditableAnnotations","editable","hide","hiddenAnnotationIds","getEditableAnnotation","show","currentActive","attach","detach","removePointerInTextLayer","moveElementInDOM","addUndoableEditor","createNewEditor","#createNewEditor","pasteEditor","getCenterPoint","annotationType","annotationEditorType","#createAndAddNewEditor","#getCenterPoint","innerWidth","innerHeight","#cleanup","_annotation_layer","boundEditorDivBlur","editorDivBlur","boundEditorDivFocus","editorDivFocus","boundEditorDivInput","editorDivInput","boundEditorDivKeydown","editorDivKeydown","content","editorDivId","_freeTextDefaultContent","_internalPadding","_defaultColor","_defaultFontSize","_translateEmpty","updateFontSize","updateColor","#updateFontSize","setFontsize","editorDiv","setEditorDimensions","savedFontsize","#updateColor","savedColor","overlayDiv","contentEditable","removeAttribute","preventScroll","cheatInitialRect","extractText","#extractText","divs","#setEditorDimensions","savedDisplay","display","savedText","newText","trimEnd","setText","setContent","dblclick","baseX","baseY","posX","posY","#setContent","replaceChildren","line","createTextNode","FreeTextAnnotationElement","defaultAppearanceData","fontColor","textPosition","padding","structTreeParentId","hasElementChanged","#hasElementChanged","#cheatInitialRect","_scripting_utils","_displayL10n_utils","_xfa_layer","DEFAULT_TAB_INDEX","GetElementsByNameSet","getRectDims","AnnotationElementFactory","LinkAnnotationElement","TextAnnotationElement","fieldType","TextWidgetAnnotationElement","radioButton","RadioButtonWidgetAnnotationElement","checkBox","CheckboxWidgetAnnotationElement","PushButtonWidgetAnnotationElement","ChoiceWidgetAnnotationElement","SignatureWidgetAnnotationElement","WidgetAnnotationElement","PopupAnnotationElement","LineAnnotationElement","SquareAnnotationElement","CircleAnnotationElement","PolylineAnnotationElement","CaretAnnotationElement","InkAnnotationElement","PolygonAnnotationElement","HighlightAnnotationElement","UnderlineAnnotationElement","SquigglyAnnotationElement","StrikeOutAnnotationElement","StampAnnotationElement","FileAttachmentAnnotationElement","AnnotationElement","hasBorder","isRenderable","ignoreBorder","createQuadrilaterals","linkService","downloadManager","imageResourcesPath","renderForms","enableScripting","_fieldObjects","fieldObjects","_createContainer","_createQuadrilaterals","_hasPopupData","titleObj","contentsObj","richText","hasPopupData","popupRef","noRotate","setRotation","borderStyle","borderWidth","horizontalRadius","horizontalCornerRadius","verticalRadius","verticalCornerRadius","radius","borderRadius","borderBottomStyle","borderColor","elementWidth","elementHeight","_commonActions","setColor","jsName","styleName","detail","colorArray","ColorConverters","noView","noPrint","userName","title","readonly","disabled","required","_setRequired","textColor","_dispatchEventFromSandbox","actions","jsEvent","commonActions","_setDefaultPropertiesFromJS","storedData","eventProxy","quadPoints","rectBlX","rectBlY","rectTrX","rectTrY","trX","trY","blX","blY","svgBuffer","rectWidth","rectHeight","backgroundImage","_createPopup","popup","modificationDate","parentRect","elements","_getElementsByName","skipId","fields","fieldObj","exportValues","exportValue","domElement","querySelector","getElementsByName","getAttribute","maybeShow","forceHide","getElementsToTriggerPopup","addHighlightArea","triggers","_editOnDoubleClick","isTooltipOnly","link","isBound","addLinkAttributes","newWindow","_bindNamedAction","attachment","_bindAttachment","setOCGState","bindSetOCGState","_bindLink","Action","_bindJSAction","resetForm","_bindResetFormAction","setInternalLink","#setInternalLink","destination","getDestinationHash","onclick","goToDestination","getAnchorUrl","executeNamedAction","openOrDownloadData","#bindSetOCGState","executeSetOCGState","otherClickAction","resetFormFields","refs","resetFormRefs","include","allFields","fieldIds","fieldName","field","allIds","dispatchEvent","Event","alt","l10nId","l10nArgs","alternativeText","showElementAndHideCanvas","previousSibling","nodeName","_getKeyModifier","_setEventListener","elementData","baseName","eventName","valueGetter","modifier","focused","_setEventListeners","getter","Blur","Focus","_setBackgroundColor","_setTextStyle","TEXT_ALIGNMENT","computedFontSize","roundToOneDecimal","multiLine","numberOfLines","lineHeight","textAlignment","textAlign","isRequired","hasAppearance","fieldValue","setPropertyOnSiblings","keyInStorage","maxLen","charLimit","fieldFormattedValues","formattedValue","comb","userValue","lastCommittedValue","commitKey","doNotScroll","overflowY","overflowX","readOnly","maxLength","defaultFieldValue","blurListener","scrollLeft","selRange","setSelectionRange","willCommit","selStart","selectionStart","selEnd","selectionEnd","_blurListener","Keystroke","inputType","change","fieldWidth","combWidth","letterSpacing","verticalAlign","checked","checkbox","curChecked","buttonValue","radio","pdfButtonValue","linkElement","lastChild","selectElement","addAnEmptyEntry","combo","multiSelect","multiple","option","selected","optionElement","displayValue","removeEmptyEntry","noneOptionElement","isExport","selectedIndex","selectedValues","getItems","multipleSelection","index","findIndex","selectChild","before","indices","changeEx","keyDown","PopupElement","elementIds","dateTimePromise","boundKeyDown","boundHide","boundShow","boundToggle","pinned","wasVisible","dateObject","toLocaleDateString","toLocaleTimeString","trigger","flatMap","baseColor","outlineColor","BACKGROUND_ENLIGHT","header","localized","XfaLayer","xfaHtml","html","contents","_formatContents","useParentRect","normalizedRect","HORIZONTAL_SPACE_AFTER_ANNOTATION","popupLeft","popupTop","lines","#keyDown","#toggle","#show","#hide","lineSpan","lineCoordinates","square","circle","polyline","containerClassName","svgElementName","coordinate","vertices","polylines","inkList","inkLists","download","#download","AnnotationLayer","editableAnnotations","NullL10n","appendElement","#appendElement","contentElement","firstChild","annotations","popupToElements","elementParams","noHTML","isPopupAnnotation","rendered","setAnnotationCanvasMap","#setAnnotationCanvasMap","replaceWith","makeColorComp","scaleAndClamp","CMYK_G","G_CMYK","G_RGB","G_rgb","G_HTML","G","RGB_G","RGB_rgb","RGB_HTML","T_HTML","T_rgb","CMYK_RGB","CMYK_rgb","CMYK_HTML","components","RGB_CMYK","DEFAULT_L10N_STRINGS","of_pages","page_of_pages","document_properties_kb","document_properties_mb","document_properties_date_string","document_properties_page_size_unit_inches","document_properties_page_size_unit_millimeters","document_properties_page_size_orientation_portrait","document_properties_page_size_orientation_landscape","document_properties_page_size_name_a3","document_properties_page_size_name_a4","document_properties_page_size_name_letter","document_properties_page_size_name_legal","document_properties_page_size_dimension_string","document_properties_page_size_dimension_name_string","document_properties_linearized_yes","document_properties_linearized_no","additional_layers","page_landmark","thumb_page_title","thumb_page_canvas","find_reached_top","find_reached_bottom","find_not_found","page_scale_width","page_scale_fit","page_scale_auto","page_scale_actual","page_scale_percent","loading_error","invalid_file_error","missing_file_error","unexpected_response_error","rendering_error","annotation_date_string","printing_not_supported","printing_not_ready","web_fonts_disabled","free_text2_default_content","editor_free_text2_aria_label","editor_ink2_aria_label","editor_ink_canvas_aria_label","editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip","print_progress_percent","getL10nFallback","formatL10nValue","getLanguage","getDirection","setupStorage","xfaOn","xfaOff","setAttributes","isHTMLAnchorElement","HTMLAnchorElement","dataId","rootHtml","stack","rootDiv","childHtml","xmlns","el","querySelectorAll","baseHeight","baseWidth","boundCanvasPointermove","canvasPointermove","boundCanvasPointerleave","canvasPointerleave","boundCanvasPointerup","canvasPointerup","boundCanvasPointerdown","canvasPointerdown","currentPath2D","hasSomethingToDraw","isCanvasInitialized","observer","realWidth","realHeight","requestFrameCallback","_defaultOpacity","_defaultThickness","thickness","bezierPath2D","allRawPaths","currentPath","translationX","translationY","updateThickness","updateOpacity","#updateThickness","savedThickness","fitToContent","redraw","#updateOpacity","savedOpacity","createObserver","setCanvasDims","disconnect","setDimensions","getInitialBBox","#getInitialBBox","setStroke","#setStroke","startDrawing","#startDrawing","drawPoints","draw","#draw","lastX","lastY","path2D","makeBezierCurve","#endPath","lastPoint","stopDrawing","#stopDrawing","bezier","generateBezierPoints","xy","#drawPoints","lastPoints","xMin","xMax","yMin","yMax","#makeBezierCurve","prevX","prevY","#generateBezierPoints","bezierPoints","control1","control2","#redraw","updateTransform","#endDrawing","#createCanvas","#createObserver","ResizeObserver","contentRect","observe","#setCanvasDims","roundedWidth","roundedHeight","setScaleFactor","#setScaleFactor","getPadding","scaleFactorW","scaleFactorH","#updateTransform","buildPath2D","#buildPath2D","toPDFCoordinates","#toPDFCoordinates","fromPDFCoordinates","#fromPDFCoordinates","serializePaths","#serializePaths","p10","p11","p20","p21","p30","p31","p40","p41","getBbox","#getBbox","#getPadding","#fitToContent","firstTime","prevTranslationX","prevTranslationY","unscaledPadding","bitmapId","bitmapPromise","bitmapUrl","bitmapFile","resizeTimeoutId","hasBeenAddedInUndoStack","supportedTypes","supportedTypesStr","getAsFile","getBitmapFetched","#getBitmapFetched","fromId","getBitmapDone","#getBitmapDone","getBitmap","#getBitmap","accept","files","click","MAX_RATIO","factor","drawBitmap","#setDimensions","scaleBitmap","#scaleBitmap","bitmapWidth","bitmapHeight","prevWidth","prevHeight","offscreen","transferToImageBitmap","#drawBitmap","serializeBitmap","#serializeBitmap","toUrl","toDataURL","accessibilityData","stamps","area","prevData","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","_api","_text_layer","_annotation_editor_layer","pdfjsVersion","pdfjsBuild"],"sources":["webpack://pdfjs-dist/build/pdf/webpack/universalModuleDefinition","webpack://pdfjs-dist/build/pdf/src/shared/util.js","webpack://pdfjs-dist/build/pdf/src/display/api.js","webpack://pdfjs-dist/build/pdf/src/display/annotation_storage.js","webpack://pdfjs-dist/build/pdf/src/display/editor/editor.js","webpack://pdfjs-dist/build/pdf/src/display/editor/tools.js","webpack://pdfjs-dist/build/pdf/src/display/display_utils.js","webpack://pdfjs-dist/build/pdf/src/display/base_factory.js","webpack://pdfjs-dist/build/pdf/src/shared/murmurhash3.js","webpack://pdfjs-dist/build/pdf/src/display/font_loader.js","webpack://pdfjs-dist/build/pdf/src/display/node_utils.js","webpack://pdfjs-dist/build/pdf/src/display/canvas.js","webpack://pdfjs-dist/build/pdf/src/display/pattern_helper.js","webpack://pdfjs-dist/build/pdf/src/shared/image_utils.js","webpack://pdfjs-dist/build/pdf/src/display/worker_options.js","webpack://pdfjs-dist/build/pdf/src/shared/message_handler.js","webpack://pdfjs-dist/build/pdf/src/display/metadata.js","webpack://pdfjs-dist/build/pdf/src/display/optional_content_config.js","webpack://pdfjs-dist/build/pdf/src/display/transport_stream.js","webpack://pdfjs-dist/build/pdf/src/display/fetch_stream.js","webpack://pdfjs-dist/build/pdf/src/display/network_utils.js","webpack://pdfjs-dist/build/pdf/src/display/content_disposition.js","webpack://pdfjs-dist/build/pdf/src/display/network.js","webpack://pdfjs-dist/build/pdf/src/display/node_stream.js","webpack://pdfjs-dist/build/pdf/src/display/svg.js","webpack://pdfjs-dist/build/pdf/src/display/xfa_text.js","webpack://pdfjs-dist/build/pdf/src/display/text_layer.js","webpack://pdfjs-dist/build/pdf/src/display/editor/annotation_editor_layer.js","webpack://pdfjs-dist/build/pdf/src/display/editor/freetext.js","webpack://pdfjs-dist/build/pdf/src/display/annotation_layer.js","webpack://pdfjs-dist/build/pdf/src/shared/scripting_utils.js","webpack://pdfjs-dist/build/pdf/web/l10n_utils.js","webpack://pdfjs-dist/build/pdf/src/display/xfa_layer.js","webpack://pdfjs-dist/build/pdf/src/display/editor/ink.js","webpack://pdfjs-dist/build/pdf/src/display/editor/stamp.js","webpack://pdfjs-dist/build/pdf/webpack/bootstrap","webpack://pdfjs-dist/build/pdf/src/pdf.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = root.pdfjsLib = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"pdfjs-dist/build/pdf\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"pdfjs-dist/build/pdf\"] = factory();\n\telse\n\t\troot[\"pdfjs-dist/build/pdf\"] = factory();\n})(globalThis, () => {\nreturn ","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals process */\n\n// NW.js / Electron is a browser context, but copies some Node.js objects; see\n// http://docs.nwjs.io/en/latest/For%20Users/Advanced/JavaScript%20Contexts%20in%20NW.js/#access-nodejs-and-nwjs-api-in-browser-context\n// https://www.electronjs.org/docs/api/process#processversionselectron-readonly\n// https://www.electronjs.org/docs/api/process#processtype-readonly\nconst isNodeJS =\n  (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n  typeof process === \"object\" &&\n  process + \"\" === \"[object process]\" &&\n  !process.versions.nw &&\n  !(process.versions.electron && process.type && process.type !== \"browser\");\n\nconst IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\nconst FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\n\nconst MAX_IMAGE_SIZE_TO_CACHE = 10e6; // Ten megabytes.\n\n// Represent the percentage of the height of a single-line field over\n// the font size. Acrobat seems to use this value.\nconst LINE_FACTOR = 1.35;\nconst LINE_DESCENT_FACTOR = 0.35;\nconst BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;\n\n/**\n * Refer to the `WorkerTransport.getRenderingIntent`-method in the API, to see\n * how these flags are being used:\n *  - ANY, DISPLAY, and PRINT are the normal rendering intents, note the\n *    `PDFPageProxy.{render, getOperatorList, getAnnotations}`-methods.\n *  - ANNOTATIONS_FORMS, ANNOTATIONS_STORAGE, ANNOTATIONS_DISABLE control which\n *    annotations are rendered onto the canvas (i.e. by being included in the\n *    operatorList), note the `PDFPageProxy.{render, getOperatorList}`-methods\n *    and their `annotationMode`-option.\n *  - OPLIST is used with the `PDFPageProxy.getOperatorList`-method, note the\n *    `OperatorList`-constructor (on the worker-thread).\n */\nconst RenderingIntentFlag = {\n  ANY: 0x01,\n  DISPLAY: 0x02,\n  PRINT: 0x04,\n  SAVE: 0x08,\n  ANNOTATIONS_FORMS: 0x10,\n  ANNOTATIONS_STORAGE: 0x20,\n  ANNOTATIONS_DISABLE: 0x40,\n  OPLIST: 0x100,\n};\n\nconst AnnotationMode = {\n  DISABLE: 0,\n  ENABLE: 1,\n  ENABLE_FORMS: 2,\n  ENABLE_STORAGE: 3,\n};\n\nconst AnnotationEditorPrefix = \"pdfjs_internal_editor_\";\n\nconst AnnotationEditorType = {\n  DISABLE: -1,\n  NONE: 0,\n  FREETEXT: 3,\n  STAMP: 13,\n  INK: 15,\n};\n\nconst AnnotationEditorParamsType = {\n  RESIZE: 1,\n  CREATE: 2,\n  FREETEXT_SIZE: 11,\n  FREETEXT_COLOR: 12,\n  FREETEXT_OPACITY: 13,\n  INK_COLOR: 21,\n  INK_THICKNESS: 22,\n  INK_OPACITY: 23,\n};\n\n// Permission flags from Table 22, Section 7.6.3.2 of the PDF specification.\nconst PermissionFlag = {\n  PRINT: 0x04,\n  MODIFY_CONTENTS: 0x08,\n  COPY: 0x10,\n  MODIFY_ANNOTATIONS: 0x20,\n  FILL_INTERACTIVE_FORMS: 0x100,\n  COPY_FOR_ACCESSIBILITY: 0x200,\n  ASSEMBLE: 0x400,\n  PRINT_HIGH_QUALITY: 0x800,\n};\n\nconst TextRenderingMode = {\n  FILL: 0,\n  STROKE: 1,\n  FILL_STROKE: 2,\n  INVISIBLE: 3,\n  FILL_ADD_TO_PATH: 4,\n  STROKE_ADD_TO_PATH: 5,\n  FILL_STROKE_ADD_TO_PATH: 6,\n  ADD_TO_PATH: 7,\n  FILL_STROKE_MASK: 3,\n  ADD_TO_PATH_FLAG: 4,\n};\n\nconst ImageKind = {\n  GRAYSCALE_1BPP: 1,\n  RGB_24BPP: 2,\n  RGBA_32BPP: 3,\n};\n\nconst AnnotationType = {\n  TEXT: 1,\n  LINK: 2,\n  FREETEXT: 3,\n  LINE: 4,\n  SQUARE: 5,\n  CIRCLE: 6,\n  POLYGON: 7,\n  POLYLINE: 8,\n  HIGHLIGHT: 9,\n  UNDERLINE: 10,\n  SQUIGGLY: 11,\n  STRIKEOUT: 12,\n  STAMP: 13,\n  CARET: 14,\n  INK: 15,\n  POPUP: 16,\n  FILEATTACHMENT: 17,\n  SOUND: 18,\n  MOVIE: 19,\n  WIDGET: 20,\n  SCREEN: 21,\n  PRINTERMARK: 22,\n  TRAPNET: 23,\n  WATERMARK: 24,\n  THREED: 25,\n  REDACT: 26,\n};\n\nconst AnnotationReplyType = {\n  GROUP: \"Group\",\n  REPLY: \"R\",\n};\n\nconst AnnotationFlag = {\n  INVISIBLE: 0x01,\n  HIDDEN: 0x02,\n  PRINT: 0x04,\n  NOZOOM: 0x08,\n  NOROTATE: 0x10,\n  NOVIEW: 0x20,\n  READONLY: 0x40,\n  LOCKED: 0x80,\n  TOGGLENOVIEW: 0x100,\n  LOCKEDCONTENTS: 0x200,\n};\n\nconst AnnotationFieldFlag = {\n  READONLY: 0x0000001,\n  REQUIRED: 0x0000002,\n  NOEXPORT: 0x0000004,\n  MULTILINE: 0x0001000,\n  PASSWORD: 0x0002000,\n  NOTOGGLETOOFF: 0x0004000,\n  RADIO: 0x0008000,\n  PUSHBUTTON: 0x0010000,\n  COMBO: 0x0020000,\n  EDIT: 0x0040000,\n  SORT: 0x0080000,\n  FILESELECT: 0x0100000,\n  MULTISELECT: 0x0200000,\n  DONOTSPELLCHECK: 0x0400000,\n  DONOTSCROLL: 0x0800000,\n  COMB: 0x1000000,\n  RICHTEXT: 0x2000000,\n  RADIOSINUNISON: 0x2000000,\n  COMMITONSELCHANGE: 0x4000000,\n};\n\nconst AnnotationBorderStyleType = {\n  SOLID: 1,\n  DASHED: 2,\n  BEVELED: 3,\n  INSET: 4,\n  UNDERLINE: 5,\n};\n\nconst AnnotationActionEventType = {\n  E: \"Mouse Enter\",\n  X: \"Mouse Exit\",\n  D: \"Mouse Down\",\n  U: \"Mouse Up\",\n  Fo: \"Focus\",\n  Bl: \"Blur\",\n  PO: \"PageOpen\",\n  PC: \"PageClose\",\n  PV: \"PageVisible\",\n  PI: \"PageInvisible\",\n  K: \"Keystroke\",\n  F: \"Format\",\n  V: \"Validate\",\n  C: \"Calculate\",\n};\n\nconst DocumentActionEventType = {\n  WC: \"WillClose\",\n  WS: \"WillSave\",\n  DS: \"DidSave\",\n  WP: \"WillPrint\",\n  DP: \"DidPrint\",\n};\n\nconst PageActionEventType = {\n  O: \"PageOpen\",\n  C: \"PageClose\",\n};\n\nconst VerbosityLevel = {\n  ERRORS: 0,\n  WARNINGS: 1,\n  INFOS: 5,\n};\n\nconst CMapCompressionType = {\n  NONE: 0,\n  BINARY: 1,\n};\n\n// All the possible operations for an operator list.\nconst OPS = {\n  // Intentionally start from 1 so it is easy to spot bad operators that will be\n  // 0's.\n  // PLEASE NOTE: We purposely keep any removed operators commented out, since\n  //              re-numbering the list would risk breaking third-party users.\n  dependency: 1,\n  setLineWidth: 2,\n  setLineCap: 3,\n  setLineJoin: 4,\n  setMiterLimit: 5,\n  setDash: 6,\n  setRenderingIntent: 7,\n  setFlatness: 8,\n  setGState: 9,\n  save: 10,\n  restore: 11,\n  transform: 12,\n  moveTo: 13,\n  lineTo: 14,\n  curveTo: 15,\n  curveTo2: 16,\n  curveTo3: 17,\n  closePath: 18,\n  rectangle: 19,\n  stroke: 20,\n  closeStroke: 21,\n  fill: 22,\n  eoFill: 23,\n  fillStroke: 24,\n  eoFillStroke: 25,\n  closeFillStroke: 26,\n  closeEOFillStroke: 27,\n  endPath: 28,\n  clip: 29,\n  eoClip: 30,\n  beginText: 31,\n  endText: 32,\n  setCharSpacing: 33,\n  setWordSpacing: 34,\n  setHScale: 35,\n  setLeading: 36,\n  setFont: 37,\n  setTextRenderingMode: 38,\n  setTextRise: 39,\n  moveText: 40,\n  setLeadingMoveText: 41,\n  setTextMatrix: 42,\n  nextLine: 43,\n  showText: 44,\n  showSpacedText: 45,\n  nextLineShowText: 46,\n  nextLineSetSpacingShowText: 47,\n  setCharWidth: 48,\n  setCharWidthAndBounds: 49,\n  setStrokeColorSpace: 50,\n  setFillColorSpace: 51,\n  setStrokeColor: 52,\n  setStrokeColorN: 53,\n  setFillColor: 54,\n  setFillColorN: 55,\n  setStrokeGray: 56,\n  setFillGray: 57,\n  setStrokeRGBColor: 58,\n  setFillRGBColor: 59,\n  setStrokeCMYKColor: 60,\n  setFillCMYKColor: 61,\n  shadingFill: 62,\n  beginInlineImage: 63,\n  beginImageData: 64,\n  endInlineImage: 65,\n  paintXObject: 66,\n  markPoint: 67,\n  markPointProps: 68,\n  beginMarkedContent: 69,\n  beginMarkedContentProps: 70,\n  endMarkedContent: 71,\n  beginCompat: 72,\n  endCompat: 73,\n  paintFormXObjectBegin: 74,\n  paintFormXObjectEnd: 75,\n  beginGroup: 76,\n  endGroup: 77,\n  // beginAnnotations: 78,\n  // endAnnotations: 79,\n  beginAnnotation: 80,\n  endAnnotation: 81,\n  // paintJpegXObject: 82,\n  paintImageMaskXObject: 83,\n  paintImageMaskXObjectGroup: 84,\n  paintImageXObject: 85,\n  paintInlineImageXObject: 86,\n  paintInlineImageXObjectGroup: 87,\n  paintImageXObjectRepeat: 88,\n  paintImageMaskXObjectRepeat: 89,\n  paintSolidColorImageMask: 90,\n  constructPath: 91,\n};\n\nconst PasswordResponses = {\n  NEED_PASSWORD: 1,\n  INCORRECT_PASSWORD: 2,\n};\n\nlet verbosity = VerbosityLevel.WARNINGS;\n\nfunction setVerbosityLevel(level) {\n  if (Number.isInteger(level)) {\n    verbosity = level;\n  }\n}\n\nfunction getVerbosityLevel() {\n  return verbosity;\n}\n\n// A notice for devs. These are good for things that are helpful to devs, such\n// as warning that Workers were disabled, which is important to devs but not\n// end users.\nfunction info(msg) {\n  if (verbosity >= VerbosityLevel.INFOS) {\n    console.log(`Info: ${msg}`);\n  }\n}\n\n// Non-fatal warnings.\nfunction warn(msg) {\n  if (verbosity >= VerbosityLevel.WARNINGS) {\n    console.log(`Warning: ${msg}`);\n  }\n}\n\nfunction unreachable(msg) {\n  throw new Error(msg);\n}\n\nfunction assert(cond, msg) {\n  if (!cond) {\n    unreachable(msg);\n  }\n}\n\n// Checks if URLs use one of the allowed protocols, e.g. to avoid XSS.\nfunction _isValidProtocol(url) {\n  switch (url?.protocol) {\n    case \"http:\":\n    case \"https:\":\n    case \"ftp:\":\n    case \"mailto:\":\n    case \"tel:\":\n      return true;\n    default:\n      return false;\n  }\n}\n\n/**\n * Attempts to create a valid absolute URL.\n *\n * @param {URL|string} url - An absolute, or relative, URL.\n * @param {URL|string} [baseUrl] - An absolute URL.\n * @param {Object} [options]\n * @returns Either a valid {URL}, or `null` otherwise.\n */\nfunction createValidAbsoluteUrl(url, baseUrl = null, options = null) {\n  if (!url) {\n    return null;\n  }\n  try {\n    if (options && typeof url === \"string\") {\n      // Let URLs beginning with \"www.\" default to using the \"http://\" protocol.\n      if (options.addDefaultProtocol && url.startsWith(\"www.\")) {\n        const dots = url.match(/\\./g);\n        // Avoid accidentally matching a *relative* URL pointing to a file named\n        // e.g. \"www.pdf\" or similar.\n        if (dots?.length >= 2) {\n          url = `http://${url}`;\n        }\n      }\n\n      // According to ISO 32000-1:2008, section 12.6.4.7, URIs should be encoded\n      // in 7-bit ASCII. Some bad PDFs use UTF-8 encoding; see bug 1122280.\n      if (options.tryConvertEncoding) {\n        try {\n          url = stringToUTF8String(url);\n        } catch {}\n      }\n    }\n\n    const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n    if (_isValidProtocol(absoluteUrl)) {\n      return absoluteUrl;\n    }\n  } catch {\n    /* `new URL()` will throw on incorrect data. */\n  }\n  return null;\n}\n\nfunction shadow(obj, prop, value, nonSerializable = false) {\n  if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n    assert(\n      prop in obj,\n      `shadow: Property \"${prop && prop.toString()}\" not found in object.`\n    );\n  }\n  Object.defineProperty(obj, prop, {\n    value,\n    enumerable: !nonSerializable,\n    configurable: true,\n    writable: false,\n  });\n  return value;\n}\n\n/**\n * @type {any}\n */\nconst BaseException = (function BaseExceptionClosure() {\n  // eslint-disable-next-line no-shadow\n  function BaseException(message, name) {\n    if (this.constructor === BaseException) {\n      unreachable(\"Cannot initialize BaseException.\");\n    }\n    this.message = message;\n    this.name = name;\n  }\n  BaseException.prototype = new Error();\n  BaseException.constructor = BaseException;\n\n  return BaseException;\n})();\n\nclass PasswordException extends BaseException {\n  constructor(msg, code) {\n    super(msg, \"PasswordException\");\n    this.code = code;\n  }\n}\n\nclass UnknownErrorException extends BaseException {\n  constructor(msg, details) {\n    super(msg, \"UnknownErrorException\");\n    this.details = details;\n  }\n}\n\nclass InvalidPDFException extends BaseException {\n  constructor(msg) {\n    super(msg, \"InvalidPDFException\");\n  }\n}\n\nclass MissingPDFException extends BaseException {\n  constructor(msg) {\n    super(msg, \"MissingPDFException\");\n  }\n}\n\nclass UnexpectedResponseException extends BaseException {\n  constructor(msg, status) {\n    super(msg, \"UnexpectedResponseException\");\n    this.status = status;\n  }\n}\n\n/**\n * Error caused during parsing PDF data.\n */\nclass FormatError extends BaseException {\n  constructor(msg) {\n    super(msg, \"FormatError\");\n  }\n}\n\n/**\n * Error used to indicate task cancellation.\n */\nclass AbortException extends BaseException {\n  constructor(msg) {\n    super(msg, \"AbortException\");\n  }\n}\n\nfunction bytesToString(bytes) {\n  if (typeof bytes !== \"object\" || bytes?.length === undefined) {\n    unreachable(\"Invalid argument for bytesToString\");\n  }\n  const length = bytes.length;\n  const MAX_ARGUMENT_COUNT = 8192;\n  if (length < MAX_ARGUMENT_COUNT) {\n    return String.fromCharCode.apply(null, bytes);\n  }\n  const strBuf = [];\n  for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n    const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n    const chunk = bytes.subarray(i, chunkEnd);\n    strBuf.push(String.fromCharCode.apply(null, chunk));\n  }\n  return strBuf.join(\"\");\n}\n\nfunction stringToBytes(str) {\n  if (typeof str !== \"string\") {\n    unreachable(\"Invalid argument for stringToBytes\");\n  }\n  const length = str.length;\n  const bytes = new Uint8Array(length);\n  for (let i = 0; i < length; ++i) {\n    bytes[i] = str.charCodeAt(i) & 0xff;\n  }\n  return bytes;\n}\n\nfunction string32(value) {\n  if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n    assert(\n      typeof value === \"number\" && Math.abs(value) < 2 ** 32,\n      `string32: Unexpected input \"${value}\".`\n    );\n  }\n  return String.fromCharCode(\n    (value >> 24) & 0xff,\n    (value >> 16) & 0xff,\n    (value >> 8) & 0xff,\n    value & 0xff\n  );\n}\n\nfunction objectSize(obj) {\n  return Object.keys(obj).length;\n}\n\n// Ensure that the returned Object has a `null` prototype; hence why\n// `Object.fromEntries(...)` is not used.\nfunction objectFromMap(map) {\n  const obj = Object.create(null);\n  for (const [key, value] of map) {\n    obj[key] = value;\n  }\n  return obj;\n}\n\n// Checks the endianness of the platform.\nfunction isLittleEndian() {\n  const buffer8 = new Uint8Array(4);\n  buffer8[0] = 1;\n  const view32 = new Uint32Array(buffer8.buffer, 0, 1);\n  return view32[0] === 1;\n}\n\n// Checks if it's possible to eval JS expressions.\nfunction isEvalSupported() {\n  try {\n    new Function(\"\"); // eslint-disable-line no-new, no-new-func\n    return true;\n  } catch {\n    return false;\n  }\n}\n\nclass FeatureTest {\n  static get isLittleEndian() {\n    return shadow(this, \"isLittleEndian\", isLittleEndian());\n  }\n\n  static get isEvalSupported() {\n    return shadow(this, \"isEvalSupported\", isEvalSupported());\n  }\n\n  static get isOffscreenCanvasSupported() {\n    return shadow(\n      this,\n      \"isOffscreenCanvasSupported\",\n      typeof OffscreenCanvas !== \"undefined\"\n    );\n  }\n\n  static get platform() {\n    if (\n      (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n      typeof navigator === \"undefined\"\n    ) {\n      return shadow(this, \"platform\", { isWin: false, isMac: false });\n    }\n    return shadow(this, \"platform\", {\n      isWin: navigator.platform.includes(\"Win\"),\n      isMac: navigator.platform.includes(\"Mac\"),\n    });\n  }\n\n  static get isCSSRoundSupported() {\n    return shadow(\n      this,\n      \"isCSSRoundSupported\",\n      globalThis.CSS?.supports?.(\"width: round(1.5px, 1px)\")\n    );\n  }\n}\n\nconst hexNumbers = [...Array(256).keys()].map(n =>\n  n.toString(16).padStart(2, \"0\")\n);\n\nclass Util {\n  static makeHexColor(r, g, b) {\n    return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;\n  }\n\n  // Apply a scaling matrix to some min/max values.\n  // If a scaling factor is negative then min and max must be\n  // swaped.\n  static scaleMinMax(transform, minMax) {\n    let temp;\n    if (transform[0]) {\n      if (transform[0] < 0) {\n        temp = minMax[0];\n        minMax[0] = minMax[1];\n        minMax[1] = temp;\n      }\n      minMax[0] *= transform[0];\n      minMax[1] *= transform[0];\n\n      if (transform[3] < 0) {\n        temp = minMax[2];\n        minMax[2] = minMax[3];\n        minMax[3] = temp;\n      }\n      minMax[2] *= transform[3];\n      minMax[3] *= transform[3];\n    } else {\n      temp = minMax[0];\n      minMax[0] = minMax[2];\n      minMax[2] = temp;\n      temp = minMax[1];\n      minMax[1] = minMax[3];\n      minMax[3] = temp;\n\n      if (transform[1] < 0) {\n        temp = minMax[2];\n        minMax[2] = minMax[3];\n        minMax[3] = temp;\n      }\n      minMax[2] *= transform[1];\n      minMax[3] *= transform[1];\n\n      if (transform[2] < 0) {\n        temp = minMax[0];\n        minMax[0] = minMax[1];\n        minMax[1] = temp;\n      }\n      minMax[0] *= transform[2];\n      minMax[1] *= transform[2];\n    }\n    minMax[0] += transform[4];\n    minMax[1] += transform[4];\n    minMax[2] += transform[5];\n    minMax[3] += transform[5];\n  }\n\n  // Concatenates two transformation matrices together and returns the result.\n  static transform(m1, m2) {\n    return [\n      m1[0] * m2[0] + m1[2] * m2[1],\n      m1[1] * m2[0] + m1[3] * m2[1],\n      m1[0] * m2[2] + m1[2] * m2[3],\n      m1[1] * m2[2] + m1[3] * m2[3],\n      m1[0] * m2[4] + m1[2] * m2[5] + m1[4],\n      m1[1] * m2[4] + m1[3] * m2[5] + m1[5],\n    ];\n  }\n\n  // For 2d affine transforms\n  static applyTransform(p, m) {\n    const xt = p[0] * m[0] + p[1] * m[2] + m[4];\n    const yt = p[0] * m[1] + p[1] * m[3] + m[5];\n    return [xt, yt];\n  }\n\n  static applyInverseTransform(p, m) {\n    const d = m[0] * m[3] - m[1] * m[2];\n    const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n    const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n    return [xt, yt];\n  }\n\n  // Applies the transform to the rectangle and finds the minimum axially\n  // aligned bounding box.\n  static getAxialAlignedBoundingBox(r, m) {\n    const p1 = this.applyTransform(r, m);\n    const p2 = this.applyTransform(r.slice(2, 4), m);\n    const p3 = this.applyTransform([r[0], r[3]], m);\n    const p4 = this.applyTransform([r[2], r[1]], m);\n    return [\n      Math.min(p1[0], p2[0], p3[0], p4[0]),\n      Math.min(p1[1], p2[1], p3[1], p4[1]),\n      Math.max(p1[0], p2[0], p3[0], p4[0]),\n      Math.max(p1[1], p2[1], p3[1], p4[1]),\n    ];\n  }\n\n  static inverseTransform(m) {\n    const d = m[0] * m[3] - m[1] * m[2];\n    return [\n      m[3] / d,\n      -m[1] / d,\n      -m[2] / d,\n      m[0] / d,\n      (m[2] * m[5] - m[4] * m[3]) / d,\n      (m[4] * m[1] - m[5] * m[0]) / d,\n    ];\n  }\n\n  // This calculation uses Singular Value Decomposition.\n  // The SVD can be represented with formula A = USV. We are interested in the\n  // matrix S here because it represents the scale values.\n  static singularValueDecompose2dScale(m) {\n    const transpose = [m[0], m[2], m[1], m[3]];\n\n    // Multiply matrix m with its transpose.\n    const a = m[0] * transpose[0] + m[1] * transpose[2];\n    const b = m[0] * transpose[1] + m[1] * transpose[3];\n    const c = m[2] * transpose[0] + m[3] * transpose[2];\n    const d = m[2] * transpose[1] + m[3] * transpose[3];\n\n    // Solve the second degree polynomial to get roots.\n    const first = (a + d) / 2;\n    const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2;\n    const sx = first + second || 1;\n    const sy = first - second || 1;\n\n    // Scale values are the square roots of the eigenvalues.\n    return [Math.sqrt(sx), Math.sqrt(sy)];\n  }\n\n  // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)\n  // For coordinate systems whose origin lies in the bottom-left, this\n  // means normalization to (BL,TR) ordering. For systems with origin in the\n  // top-left, this means (TL,BR) ordering.\n  static normalizeRect(rect) {\n    const r = rect.slice(0); // clone rect\n    if (rect[0] > rect[2]) {\n      r[0] = rect[2];\n      r[2] = rect[0];\n    }\n    if (rect[1] > rect[3]) {\n      r[1] = rect[3];\n      r[3] = rect[1];\n    }\n    return r;\n  }\n\n  // Returns a rectangle [x1, y1, x2, y2] corresponding to the\n  // intersection of rect1 and rect2. If no intersection, returns 'null'\n  // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]\n  static intersect(rect1, rect2) {\n    const xLow = Math.max(\n      Math.min(rect1[0], rect1[2]),\n      Math.min(rect2[0], rect2[2])\n    );\n    const xHigh = Math.min(\n      Math.max(rect1[0], rect1[2]),\n      Math.max(rect2[0], rect2[2])\n    );\n    if (xLow > xHigh) {\n      return null;\n    }\n    const yLow = Math.max(\n      Math.min(rect1[1], rect1[3]),\n      Math.min(rect2[1], rect2[3])\n    );\n    const yHigh = Math.min(\n      Math.max(rect1[1], rect1[3]),\n      Math.max(rect2[1], rect2[3])\n    );\n    if (yLow > yHigh) {\n      return null;\n    }\n\n    return [xLow, yLow, xHigh, yHigh];\n  }\n\n  // From https://github.com/adobe-webplatform/Snap.svg/blob/b365287722a72526000ac4bfcf0ce4cac2faa015/src/path.js#L852\n  static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3) {\n    const tvalues = [],\n      bounds = [[], []];\n    let a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n    for (let i = 0; i < 2; ++i) {\n      if (i === 0) {\n        b = 6 * x0 - 12 * x1 + 6 * x2;\n        a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n        c = 3 * x1 - 3 * x0;\n      } else {\n        b = 6 * y0 - 12 * y1 + 6 * y2;\n        a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n        c = 3 * y1 - 3 * y0;\n      }\n      if (Math.abs(a) < 1e-12) {\n        if (Math.abs(b) < 1e-12) {\n          continue;\n        }\n        t = -c / b;\n        if (0 < t && t < 1) {\n          tvalues.push(t);\n        }\n        continue;\n      }\n      b2ac = b * b - 4 * c * a;\n      sqrtb2ac = Math.sqrt(b2ac);\n      if (b2ac < 0) {\n        continue;\n      }\n      t1 = (-b + sqrtb2ac) / (2 * a);\n      if (0 < t1 && t1 < 1) {\n        tvalues.push(t1);\n      }\n      t2 = (-b - sqrtb2ac) / (2 * a);\n      if (0 < t2 && t2 < 1) {\n        tvalues.push(t2);\n      }\n    }\n\n    let j = tvalues.length,\n      mt;\n    const jlen = j;\n    while (j--) {\n      t = tvalues[j];\n      mt = 1 - t;\n      bounds[0][j] =\n        mt * mt * mt * x0 +\n        3 * mt * mt * t * x1 +\n        3 * mt * t * t * x2 +\n        t * t * t * x3;\n      bounds[1][j] =\n        mt * mt * mt * y0 +\n        3 * mt * mt * t * y1 +\n        3 * mt * t * t * y2 +\n        t * t * t * y3;\n    }\n\n    bounds[0][jlen] = x0;\n    bounds[1][jlen] = y0;\n    bounds[0][jlen + 1] = x3;\n    bounds[1][jlen + 1] = y3;\n    bounds[0].length = bounds[1].length = jlen + 2;\n\n    return [\n      Math.min(...bounds[0]),\n      Math.min(...bounds[1]),\n      Math.max(...bounds[0]),\n      Math.max(...bounds[1]),\n    ];\n  }\n}\n\nconst PDFStringTranslateTable = [\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8,\n  0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n  0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192,\n  0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018,\n  0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d,\n  0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac,\n];\n\nfunction stringToPDFString(str) {\n  if (str[0] >= \"\\xEF\") {\n    let encoding;\n    if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n      encoding = \"utf-16be\";\n    } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n      encoding = \"utf-16le\";\n    } else if (str[0] === \"\\xEF\" && str[1] === \"\\xBB\" && str[2] === \"\\xBF\") {\n      encoding = \"utf-8\";\n    }\n\n    if (encoding) {\n      try {\n        const decoder = new TextDecoder(encoding, { fatal: true });\n        const buffer = stringToBytes(str);\n        return decoder.decode(buffer);\n      } catch (ex) {\n        warn(`stringToPDFString: \"${ex}\".`);\n      }\n    }\n  }\n  // ISO Latin 1\n  const strBuf = [];\n  for (let i = 0, ii = str.length; i < ii; i++) {\n    const code = PDFStringTranslateTable[str.charCodeAt(i)];\n    strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n  }\n  return strBuf.join(\"\");\n}\n\nfunction stringToUTF8String(str) {\n  return decodeURIComponent(escape(str));\n}\n\nfunction utf8StringToString(str) {\n  return unescape(encodeURIComponent(str));\n}\n\nfunction isArrayBuffer(v) {\n  return typeof v === \"object\" && v?.byteLength !== undefined;\n}\n\nfunction isArrayEqual(arr1, arr2) {\n  if (arr1.length !== arr2.length) {\n    return false;\n  }\n  for (let i = 0, ii = arr1.length; i < ii; i++) {\n    if (arr1[i] !== arr2[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\nfunction getModificationDate(date = new Date()) {\n  const buffer = [\n    date.getUTCFullYear().toString(),\n    (date.getUTCMonth() + 1).toString().padStart(2, \"0\"),\n    date.getUTCDate().toString().padStart(2, \"0\"),\n    date.getUTCHours().toString().padStart(2, \"0\"),\n    date.getUTCMinutes().toString().padStart(2, \"0\"),\n    date.getUTCSeconds().toString().padStart(2, \"0\"),\n  ];\n\n  return buffer.join(\"\");\n}\n\nclass PromiseCapability {\n  #settled = false;\n\n  constructor() {\n    /**\n     * @type {Promise<any>} The Promise object.\n     */\n    this.promise = new Promise((resolve, reject) => {\n      /**\n       * @type {function} Fulfills the Promise.\n       */\n      this.resolve = data => {\n        this.#settled = true;\n        resolve(data);\n      };\n\n      /**\n       * @type {function} Rejects the Promise.\n       */\n      this.reject = reason => {\n        if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n          assert(reason instanceof Error, 'Expected valid \"reason\" argument.');\n        }\n        this.#settled = true;\n        reject(reason);\n      };\n    });\n  }\n\n  /**\n   * @type {boolean} If the Promise has been fulfilled/rejected.\n   */\n  get settled() {\n    return this.#settled;\n  }\n}\n\nlet NormalizeRegex = null;\nlet NormalizationMap = null;\nfunction normalizeUnicode(str) {\n  if (!NormalizeRegex) {\n    // In order to generate the following regex:\n    //  - create a PDF containing all the chars in the range 0000-FFFF with\n    //    a NFKC which is different of the char.\n    //  - copy and paste all those chars and get the ones where NFKC is\n    //    required.\n    // It appears that most the chars here contain some ligatures.\n    NormalizeRegex =\n      /([\\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;\n    NormalizationMap = new Map([[\"ﬅ\", \"ſt\"]]);\n  }\n  return str.replaceAll(NormalizeRegex, (_, p1, p2) => {\n    return p1 ? p1.normalize(\"NFKC\") : NormalizationMap.get(p2);\n  });\n}\n\nfunction getUuid() {\n  if (\n    (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n    (typeof crypto !== \"undefined\" && typeof crypto?.randomUUID === \"function\")\n  ) {\n    return crypto.randomUUID();\n  }\n  const buf = new Uint8Array(32);\n  if (\n    typeof crypto !== \"undefined\" &&\n    typeof crypto?.getRandomValues === \"function\"\n  ) {\n    crypto.getRandomValues(buf);\n  } else {\n    for (let i = 0; i < 32; i++) {\n      buf[i] = Math.floor(Math.random() * 255);\n    }\n  }\n  return bytesToString(buf);\n}\n\nconst AnnotationPrefix = \"pdfjs_internal_id_\";\n\nexport {\n  AbortException,\n  AnnotationActionEventType,\n  AnnotationBorderStyleType,\n  AnnotationEditorParamsType,\n  AnnotationEditorPrefix,\n  AnnotationEditorType,\n  AnnotationFieldFlag,\n  AnnotationFlag,\n  AnnotationMode,\n  AnnotationPrefix,\n  AnnotationReplyType,\n  AnnotationType,\n  assert,\n  BaseException,\n  BASELINE_FACTOR,\n  bytesToString,\n  CMapCompressionType,\n  createValidAbsoluteUrl,\n  DocumentActionEventType,\n  FeatureTest,\n  FONT_IDENTITY_MATRIX,\n  FormatError,\n  getModificationDate,\n  getUuid,\n  getVerbosityLevel,\n  IDENTITY_MATRIX,\n  ImageKind,\n  info,\n  InvalidPDFException,\n  isArrayBuffer,\n  isArrayEqual,\n  isNodeJS,\n  LINE_DESCENT_FACTOR,\n  LINE_FACTOR,\n  MAX_IMAGE_SIZE_TO_CACHE,\n  MissingPDFException,\n  normalizeUnicode,\n  objectFromMap,\n  objectSize,\n  OPS,\n  PageActionEventType,\n  PasswordException,\n  PasswordResponses,\n  PermissionFlag,\n  PromiseCapability,\n  RenderingIntentFlag,\n  setVerbosityLevel,\n  shadow,\n  string32,\n  stringToBytes,\n  stringToPDFString,\n  stringToUTF8String,\n  TextRenderingMode,\n  UnexpectedResponseException,\n  UnknownErrorException,\n  unreachable,\n  utf8StringToString,\n  Util,\n  VerbosityLevel,\n  warn,\n};\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module pdfjsLib\n */\n\nimport {\n  AbortException,\n  AnnotationMode,\n  assert,\n  getVerbosityLevel,\n  info,\n  InvalidPDFException,\n  isArrayBuffer,\n  isNodeJS,\n  MAX_IMAGE_SIZE_TO_CACHE,\n  MissingPDFException,\n  PasswordException,\n  PromiseCapability,\n  RenderingIntentFlag,\n  setVerbosityLevel,\n  shadow,\n  stringToBytes,\n  UnexpectedResponseException,\n  UnknownErrorException,\n  unreachable,\n  warn,\n} from \"../shared/util.js\";\nimport {\n  AnnotationStorage,\n  PrintAnnotationStorage,\n  SerializableEmpty,\n} from \"./annotation_storage.js\";\nimport {\n  deprecated,\n  DOMCanvasFactory,\n  DOMCMapReaderFactory,\n  DOMFilterFactory,\n  DOMStandardFontDataFactory,\n  isDataScheme,\n  isValidFetchUrl,\n  loadScript,\n  PageViewport,\n  RenderingCancelledException,\n  StatTimer,\n} from \"./display_utils.js\";\nimport { FontFaceObject, FontLoader } from \"./font_loader.js\";\nimport {\n  NodeCanvasFactory,\n  NodeCMapReaderFactory,\n  NodeFilterFactory,\n  NodeStandardFontDataFactory,\n} from \"display-node_utils\";\nimport { CanvasGraphics } from \"./canvas.js\";\nimport { GlobalWorkerOptions } from \"./worker_options.js\";\nimport { MessageHandler } from \"../shared/message_handler.js\";\nimport { Metadata } from \"./metadata.js\";\nimport { OptionalContentConfig } from \"./optional_content_config.js\";\nimport { PDFDataTransportStream } from \"./transport_stream.js\";\nimport { PDFFetchStream } from \"display-fetch_stream\";\nimport { PDFNetworkStream } from \"display-network\";\nimport { PDFNodeStream } from \"display-node_stream\";\nimport { SVGGraphics } from \"display-svg\";\nimport { XfaText } from \"./xfa_text.js\";\n\nconst DEFAULT_RANGE_CHUNK_SIZE = 65536; // 2^16 = 65536\nconst RENDERING_CANCELLED_TIMEOUT = 100; // ms\nconst DELAYED_CLEANUP_TIMEOUT = 5000; // ms\n\nconst DefaultCanvasFactory =\n  typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n    ? NodeCanvasFactory\n    : DOMCanvasFactory;\nconst DefaultCMapReaderFactory =\n  typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n    ? NodeCMapReaderFactory\n    : DOMCMapReaderFactory;\nconst DefaultFilterFactory =\n  typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n    ? NodeFilterFactory\n    : DOMFilterFactory;\nconst DefaultStandardFontDataFactory =\n  typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\") && isNodeJS\n    ? NodeStandardFontDataFactory\n    : DOMStandardFontDataFactory;\n\n/**\n * @typedef { Int8Array | Uint8Array | Uint8ClampedArray |\n *            Int16Array | Uint16Array |\n *            Int32Array | Uint32Array | Float32Array |\n *            Float64Array\n * } TypedArray\n */\n\n/**\n * @typedef { TypedArray | ArrayBuffer | Array<number> | string } BinaryData\n */\n\n/**\n * @typedef {Object} RefProxy\n * @property {number} num\n * @property {number} gen\n */\n\n/**\n * Document initialization / loading parameters object.\n *\n * @typedef {Object} DocumentInitParameters\n * @property {string | URL} [url] - The URL of the PDF.\n * @property {BinaryData} [data] - Binary PDF data.\n *   Use TypedArrays (Uint8Array) to improve the memory usage. If PDF data is\n *   BASE64-encoded, use `atob()` to convert it to a binary string first.\n *\n *   NOTE: If TypedArrays are used they will generally be transferred to the\n *   worker-thread. This will help reduce main-thread memory usage, however\n *   it will take ownership of the TypedArrays.\n * @property {Object} [httpHeaders] - Basic authentication headers.\n * @property {boolean} [withCredentials] - Indicates whether or not\n *   cross-site Access-Control requests should be made using credentials such\n *   as cookies or authorization headers. The default is `false`.\n * @property {string} [password] - For decrypting password-protected PDFs.\n * @property {number} [length] - The PDF file length. It's used for progress\n *   reports and range requests operations.\n * @property {PDFDataRangeTransport} [range] - Allows for using a custom range\n *   transport implementation.\n * @property {number} [rangeChunkSize] - Specify maximum number of bytes fetched\n *   per range request. The default value is {@link DEFAULT_RANGE_CHUNK_SIZE}.\n * @property {PDFWorker} [worker] - The worker that will be used for loading and\n *   parsing the PDF data.\n * @property {number} [verbosity] - Controls the logging level; the constants\n *   from {@link VerbosityLevel} should be used.\n * @property {string} [docBaseUrl] - The base URL of the document, used when\n *   attempting to recover valid absolute URLs for annotations, and outline\n *   items, that (incorrectly) only specify relative URLs.\n * @property {string} [cMapUrl] - The URL where the predefined Adobe CMaps are\n *   located. Include the trailing slash.\n * @property {boolean} [cMapPacked] - Specifies if the Adobe CMaps are binary\n *   packed or not. The default value is `true`.\n * @property {Object} [CMapReaderFactory] - The factory that will be used when\n *   reading built-in CMap files. Providing a custom factory is useful for\n *   environments without Fetch API or `XMLHttpRequest` support, such as\n *   Node.js. The default value is {DOMCMapReaderFactory}.\n * @property {boolean} [useSystemFonts] - When `true`, fonts that aren't\n *   embedded in the PDF document will fallback to a system font.\n *   The default value is `true` in web environments and `false` in Node.js;\n *   unless `disableFontFace === true` in which case this defaults to `false`\n *   regardless of the environment (to prevent completely broken fonts).\n * @property {string} [standardFontDataUrl] - The URL where the standard font\n *   files are located. Include the trailing slash.\n * @property {Object} [StandardFontDataFactory] - The factory that will be used\n *   when reading the standard font files. Providing a custom factory is useful\n *   for environments without Fetch API or `XMLHttpRequest` support, such as\n *   Node.js. The default value is {DOMStandardFontDataFactory}.\n * @property {boolean} [useWorkerFetch] - Enable using the Fetch API in the\n *   worker-thread when reading CMap and standard font files. When `true`,\n *   the `CMapReaderFactory` and `StandardFontDataFactory` options are ignored.\n *   The default value is `true` in web environments and `false` in Node.js.\n * @property {boolean} [stopAtErrors] - Reject certain promises, e.g.\n *   `getOperatorList`, `getTextContent`, and `RenderTask`, when the associated\n *   PDF data cannot be successfully parsed, instead of attempting to recover\n *   whatever possible of the data. The default value is `false`.\n * @property {number} [maxImageSize] - The maximum allowed image size in total\n *   pixels, i.e. width * height. Images above this value will not be rendered.\n *   Use -1 for no limit, which is also the default value.\n * @property {boolean} [isEvalSupported] - Determines if we can evaluate strings\n *   as JavaScript. Primarily used to improve performance of font rendering, and\n *   when parsing PDF functions. The default value is `true`.\n * @property {boolean} [isOffscreenCanvasSupported] - Determines if we can use\n *   `OffscreenCanvas` in the worker. Primarily used to improve performance of\n *   image conversion/rendering.\n *   The default value is `true` in web environments and `false` in Node.js.\n * @property {number} [canvasMaxAreaInBytes] - The integer value is used to\n *   know when an image must be resized (uses `OffscreenCanvas` in the worker).\n *   If it's -1 then a possibly slow algorithm is used to guess the max value.\n * @property {boolean} [disableFontFace] - By default fonts are converted to\n *   OpenType fonts and loaded via the Font Loading API or `@font-face` rules.\n *   If disabled, fonts will be rendered using a built-in font renderer that\n *   constructs the glyphs with primitive path commands.\n *   The default value is `false` in web environments and `true` in Node.js.\n * @property {boolean} [fontExtraProperties] - Include additional properties,\n *   which are unused during rendering of PDF documents, when exporting the\n *   parsed font data from the worker-thread. This may be useful for debugging\n *   purposes (and backwards compatibility), but note that it will lead to\n *   increased memory usage. The default value is `false`.\n * @property {boolean} [enableXfa] - Render Xfa forms if any.\n *   The default value is `false`.\n * @property {HTMLDocument} [ownerDocument] - Specify an explicit document\n *   context to create elements with and to load resources, such as fonts,\n *   into. Defaults to the current document.\n * @property {boolean} [disableRange] - Disable range request loading of PDF\n *   files. When enabled, and if the server supports partial content requests,\n *   then the PDF will be fetched in chunks. The default value is `false`.\n * @property {boolean} [disableStream] - Disable streaming of PDF file data.\n *   By default PDF.js attempts to load PDF files in chunks. The default value\n *   is `false`.\n * @property {boolean} [disableAutoFetch] - Disable pre-fetching of PDF file\n *   data. When range requests are enabled PDF.js will automatically keep\n *   fetching more data even if it isn't needed to display the current page.\n *   The default value is `false`.\n *\n *   NOTE: It is also necessary to disable streaming, see above, in order for\n *   disabling of pre-fetching to work correctly.\n * @property {boolean} [pdfBug] - Enables special hooks for debugging PDF.js\n *   (see `web/debugger.js`). The default value is `false`.\n * @property {Object} [canvasFactory] - The factory instance that will be used\n *   when creating canvases. The default value is {new DOMCanvasFactory()}.\n * @property {Object} [filterFactory] - A factory instance that will be used\n *   to create SVG filters when rendering some images on the main canvas.\n */\n\n/**\n * This is the main entry point for loading a PDF and interacting with it.\n *\n * NOTE: If a URL is used to fetch the PDF data a standard Fetch API call (or\n * XHR as fallback) is used, which means it must follow same origin rules,\n * e.g. no cross-domain requests without CORS.\n *\n * @param {string | URL | TypedArray | ArrayBuffer | DocumentInitParameters}\n *   src - Can be a URL where a PDF file is located, a typed array (Uint8Array)\n *         already populated with data, or a parameter object.\n * @returns {PDFDocumentLoadingTask}\n */\nfunction getDocument(src) {\n  if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n    if (typeof src === \"string\" || src instanceof URL) {\n      src = { url: src };\n    } else if (isArrayBuffer(src)) {\n      src = { data: src };\n    }\n  }\n  if (typeof src !== \"object\") {\n    throw new Error(\"Invalid parameter in getDocument, need parameter object.\");\n  }\n  if (!src.url && !src.data && !src.range) {\n    throw new Error(\n      \"Invalid parameter object: need either .data, .range or .url\"\n    );\n  }\n  const task = new PDFDocumentLoadingTask();\n  const { docId } = task;\n\n  const url = src.url ? getUrlProp(src.url) : null;\n  const data = src.data ? getDataProp(src.data) : null;\n  const httpHeaders = src.httpHeaders || null;\n  const withCredentials = src.withCredentials === true;\n  const password = src.password ?? null;\n  const rangeTransport =\n    src.range instanceof PDFDataRangeTransport ? src.range : null;\n  const rangeChunkSize =\n    Number.isInteger(src.rangeChunkSize) && src.rangeChunkSize > 0\n      ? src.rangeChunkSize\n      : DEFAULT_RANGE_CHUNK_SIZE;\n  let worker = src.worker instanceof PDFWorker ? src.worker : null;\n  const verbosity = src.verbosity;\n  // Ignore \"data:\"-URLs, since they can't be used to recover valid absolute\n  // URLs anyway. We want to avoid sending them to the worker-thread, since\n  // they contain the *entire* PDF document and can thus be arbitrarily long.\n  const docBaseUrl =\n    typeof src.docBaseUrl === \"string\" && !isDataScheme(src.docBaseUrl)\n      ? src.docBaseUrl\n      : null;\n  const cMapUrl = typeof src.cMapUrl === \"string\" ? src.cMapUrl : null;\n  const cMapPacked = src.cMapPacked !== false;\n  const CMapReaderFactory = src.CMapReaderFactory || DefaultCMapReaderFactory;\n  const standardFontDataUrl =\n    typeof src.standardFontDataUrl === \"string\"\n      ? src.standardFontDataUrl\n      : null;\n  const StandardFontDataFactory =\n    src.StandardFontDataFactory || DefaultStandardFontDataFactory;\n  const ignoreErrors = src.stopAtErrors !== true;\n  const maxImageSize =\n    Number.isInteger(src.maxImageSize) && src.maxImageSize > -1\n      ? src.maxImageSize\n      : -1;\n  const isEvalSupported = src.isEvalSupported !== false;\n  const isOffscreenCanvasSupported =\n    typeof src.isOffscreenCanvasSupported === \"boolean\"\n      ? src.isOffscreenCanvasSupported\n      : !isNodeJS;\n  const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes)\n    ? src.canvasMaxAreaInBytes\n    : -1;\n  const disableFontFace =\n    typeof src.disableFontFace === \"boolean\" ? src.disableFontFace : isNodeJS;\n  const fontExtraProperties = src.fontExtraProperties === true;\n  const enableXfa = src.enableXfa === true;\n  const ownerDocument = src.ownerDocument || globalThis.document;\n  const disableRange = src.disableRange === true;\n  const disableStream = src.disableStream === true;\n  const disableAutoFetch = src.disableAutoFetch === true;\n  const pdfBug = src.pdfBug === true;\n\n  // Parameters whose default values depend on other parameters.\n  const length = rangeTransport ? rangeTransport.length : src.length ?? NaN;\n  const useSystemFonts =\n    typeof src.useSystemFonts === \"boolean\"\n      ? src.useSystemFonts\n      : !isNodeJS && !disableFontFace;\n  const useWorkerFetch =\n    typeof src.useWorkerFetch === \"boolean\"\n      ? src.useWorkerFetch\n      : (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n        (CMapReaderFactory === DOMCMapReaderFactory &&\n          StandardFontDataFactory === DOMStandardFontDataFactory &&\n          cMapUrl &&\n          standardFontDataUrl &&\n          isValidFetchUrl(cMapUrl, document.baseURI) &&\n          isValidFetchUrl(standardFontDataUrl, document.baseURI));\n  const canvasFactory =\n    src.canvasFactory || new DefaultCanvasFactory({ ownerDocument });\n  const filterFactory =\n    src.filterFactory || new DefaultFilterFactory({ docId, ownerDocument });\n\n  // Parameters only intended for development/testing purposes.\n  const styleElement =\n    typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")\n      ? src.styleElement\n      : null;\n\n  // Set the main-thread verbosity level.\n  setVerbosityLevel(verbosity);\n\n  // Ensure that the various factories can be initialized, when necessary,\n  // since the user may provide *custom* ones.\n  const transportFactory = {\n    canvasFactory,\n    filterFactory,\n  };\n  if (!useWorkerFetch) {\n    transportFactory.cMapReaderFactory = new CMapReaderFactory({\n      baseUrl: cMapUrl,\n      isCompressed: cMapPacked,\n    });\n    transportFactory.standardFontDataFactory = new StandardFontDataFactory({\n      baseUrl: standardFontDataUrl,\n    });\n  }\n\n  if (!worker) {\n    const workerParams = {\n      verbosity,\n      port: GlobalWorkerOptions.workerPort,\n    };\n    // Worker was not provided -- creating and owning our own. If message port\n    // is specified in global worker options, using it.\n    worker = workerParams.port\n      ? PDFWorker.fromPort(workerParams)\n      : new PDFWorker(workerParams);\n    task._worker = worker;\n  }\n\n  const fetchDocParams = {\n    docId,\n    apiVersion:\n      typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"TESTING\")\n        ? PDFJSDev.eval(\"BUNDLE_VERSION\")\n        : null,\n    data,\n    password,\n    disableAutoFetch,\n    rangeChunkSize,\n    length,\n    docBaseUrl,\n    enableXfa,\n    evaluatorOptions: {\n      maxImageSize,\n      disableFontFace,\n      ignoreErrors,\n      isEvalSupported,\n      isOffscreenCanvasSupported,\n      canvasMaxAreaInBytes,\n      fontExtraProperties,\n      useSystemFonts,\n      cMapUrl: useWorkerFetch ? cMapUrl : null,\n      standardFontDataUrl: useWorkerFetch ? standardFontDataUrl : null,\n    },\n  };\n  const transportParams = {\n    ignoreErrors,\n    isEvalSupported,\n    disableFontFace,\n    fontExtraProperties,\n    enableXfa,\n    ownerDocument,\n    disableAutoFetch,\n    pdfBug,\n    styleElement,\n  };\n\n  worker.promise\n    .then(function () {\n      if (task.destroyed) {\n        throw new Error(\"Loading aborted\");\n      }\n\n      const workerIdPromise = _fetchDocument(worker, fetchDocParams);\n      const networkStreamPromise = new Promise(function (resolve) {\n        let networkStream;\n        if (rangeTransport) {\n          networkStream = new PDFDataTransportStream(\n            {\n              length,\n              initialData: rangeTransport.initialData,\n              progressiveDone: rangeTransport.progressiveDone,\n              contentDispositionFilename:\n                rangeTransport.contentDispositionFilename,\n              disableRange,\n              disableStream,\n            },\n            rangeTransport\n          );\n        } else if (!data) {\n          if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n            throw new Error(\"Not implemented: createPDFNetworkStream\");\n          }\n          const createPDFNetworkStream = params => {\n            if (\n              typeof PDFJSDev !== \"undefined\" &&\n              PDFJSDev.test(\"GENERIC\") &&\n              isNodeJS\n            ) {\n              return new PDFNodeStream(params);\n            }\n            return isValidFetchUrl(params.url)\n              ? new PDFFetchStream(params)\n              : new PDFNetworkStream(params);\n          };\n\n          networkStream = createPDFNetworkStream({\n            url,\n            length,\n            httpHeaders,\n            withCredentials,\n            rangeChunkSize,\n            disableRange,\n            disableStream,\n          });\n        }\n        resolve(networkStream);\n      });\n\n      return Promise.all([workerIdPromise, networkStreamPromise]).then(\n        function ([workerId, networkStream]) {\n          if (task.destroyed) {\n            throw new Error(\"Loading aborted\");\n          }\n\n          const messageHandler = new MessageHandler(\n            docId,\n            workerId,\n            worker.port\n          );\n          const transport = new WorkerTransport(\n            messageHandler,\n            task,\n            networkStream,\n            transportParams,\n            transportFactory\n          );\n          task._transport = transport;\n          messageHandler.send(\"Ready\", null);\n        }\n      );\n    })\n    .catch(task._capability.reject);\n\n  return task;\n}\n\n/**\n * Starts fetching of specified PDF document/data.\n *\n * @param {PDFWorker} worker\n * @param {Object} source\n * @returns {Promise<string>} A promise that is resolved when the worker ID of\n *   the `MessageHandler` is known.\n * @private\n */\nasync function _fetchDocument(worker, source) {\n  if (worker.destroyed) {\n    throw new Error(\"Worker was destroyed\");\n  }\n  const workerId = await worker.messageHandler.sendWithPromise(\n    \"GetDocRequest\",\n    source,\n    source.data ? [source.data.buffer] : null\n  );\n\n  if (worker.destroyed) {\n    throw new Error(\"Worker was destroyed\");\n  }\n  return workerId;\n}\n\nfunction getUrlProp(val) {\n  if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n    return null; // The 'url' is unused with `PDFDataRangeTransport`.\n  }\n  if (val instanceof URL) {\n    return val.href;\n  }\n  try {\n    // The full path is required in the 'url' field.\n    return new URL(val, window.location).href;\n  } catch {\n    if (\n      typeof PDFJSDev !== \"undefined\" &&\n      PDFJSDev.test(\"GENERIC\") &&\n      isNodeJS &&\n      typeof val === \"string\"\n    ) {\n      return val; // Use the url as-is in Node.js environments.\n    }\n  }\n  throw new Error(\n    \"Invalid PDF url data: \" +\n      \"either string or URL-object is expected in the url property.\"\n  );\n}\n\nfunction getDataProp(val) {\n  // Converting string or array-like data to Uint8Array.\n  if (\n    typeof PDFJSDev !== \"undefined\" &&\n    PDFJSDev.test(\"GENERIC\") &&\n    isNodeJS &&\n    typeof Buffer !== \"undefined\" && // eslint-disable-line no-undef\n    val instanceof Buffer // eslint-disable-line no-undef\n  ) {\n    throw new Error(\n      \"Please provide binary data as `Uint8Array`, rather than `Buffer`.\"\n    );\n  }\n  if (val instanceof Uint8Array && val.byteLength === val.buffer.byteLength) {\n    // Use the data as-is when it's already a Uint8Array that completely\n    // \"utilizes\" its underlying ArrayBuffer, to prevent any possible\n    // issues when transferring it to the worker-thread.\n    return val;\n  }\n  if (typeof val === \"string\") {\n    return stringToBytes(val);\n  }\n  if ((typeof val === \"object\" && !isNaN(val?.length)) || isArrayBuffer(val)) {\n    return new Uint8Array(val);\n  }\n  throw new Error(\n    \"Invalid PDF binary data: either TypedArray, \" +\n      \"string, or array-like object is expected in the data property.\"\n  );\n}\n\n/**\n * @typedef {Object} OnProgressParameters\n * @property {number} loaded - Currently loaded number of bytes.\n * @property {number} total - Total number of bytes in the PDF file.\n */\n\n/**\n * The loading task controls the operations required to load a PDF document\n * (such as network requests) and provides a way to listen for completion,\n * after which individual pages can be rendered.\n */\nclass PDFDocumentLoadingTask {\n  static #docId = 0;\n\n  constructor() {\n    this._capability = new PromiseCapability();\n    this._transport = null;\n    this._worker = null;\n\n    /**\n     * Unique identifier for the document loading task.\n     * @type {string}\n     */\n    this.docId = `d${PDFDocumentLoadingTask.#docId++}`;\n\n    /**\n     * Whether the loading task is destroyed or not.\n     * @type {boolean}\n     */\n    this.destroyed = false;\n\n    /**\n     * Callback to request a password if a wrong or no password was provided.\n     * The callback receives two parameters: a function that should be called\n     * with the new password, and a reason (see {@link PasswordResponses}).\n     * @type {function}\n     */\n    this.onPassword = null;\n\n    /**\n     * Callback to be able to monitor the loading progress of the PDF file\n     * (necessary to implement e.g. a loading bar).\n     * The callback receives an {@link OnProgressParameters} argument.\n     * @type {function}\n     */\n    this.onProgress = null;\n  }\n\n  /**\n   * Promise for document loading task completion.\n   * @type {Promise<PDFDocumentProxy>}\n   */\n  get promise() {\n    return this._capability.promise;\n  }\n\n  /**\n   * Abort all network requests and destroy the worker.\n   * @returns {Promise<void>} A promise that is resolved when destruction is\n   *   completed.\n   */\n  async destroy() {\n    this.destroyed = true;\n    try {\n      if (this._worker?.port) {\n        this._worker._pendingDestroy = true;\n      }\n      await this._transport?.destroy();\n    } catch (ex) {\n      if (this._worker?.port) {\n        delete this._worker._pendingDestroy;\n      }\n      throw ex;\n    }\n\n    this._transport = null;\n    if (this._worker) {\n      this._worker.destroy();\n      this._worker = null;\n    }\n  }\n}\n\n/**\n * Abstract class to support range requests file loading.\n *\n * NOTE: The TypedArrays passed to the constructor and relevant methods below\n * will generally be transferred to the worker-thread. This will help reduce\n * main-thread memory usage, however it will take ownership of the TypedArrays.\n */\nclass PDFDataRangeTransport {\n  /**\n   * @param {number} length\n   * @param {Uint8Array|null} initialData\n   * @param {boolean} [progressiveDone]\n   * @param {string} [contentDispositionFilename]\n   */\n  constructor(\n    length,\n    initialData,\n    progressiveDone = false,\n    contentDispositionFilename = null\n  ) {\n    this.length = length;\n    this.initialData = initialData;\n    this.progressiveDone = progressiveDone;\n    this.contentDispositionFilename = contentDispositionFilename;\n\n    this._rangeListeners = [];\n    this._progressListeners = [];\n    this._progressiveReadListeners = [];\n    this._progressiveDoneListeners = [];\n    this._readyCapability = new PromiseCapability();\n  }\n\n  /**\n   * @param {function} listener\n   */\n  addRangeListener(listener) {\n    this._rangeListeners.push(listener);\n  }\n\n  /**\n   * @param {function} listener\n   */\n  addProgressListener(listener) {\n    this._progressListeners.push(listener);\n  }\n\n  /**\n   * @param {function} listener\n   */\n  addProgressiveReadListener(listener) {\n    this._progressiveReadListeners.push(listener);\n  }\n\n  /**\n   * @param {function} listener\n   */\n  addProgressiveDoneListener(listener) {\n    this._progressiveDoneListeners.push(listener);\n  }\n\n  /**\n   * @param {number} begin\n   * @param {Uint8Array|null} chunk\n   */\n  onDataRange(begin, chunk) {\n    for (const listener of this._rangeListeners) {\n      listener(begin, chunk);\n    }\n  }\n\n  /**\n   * @param {number} loaded\n   * @param {number|undefined} total\n   */\n  onDataProgress(loaded, total) {\n    this._readyCapability.promise.then(() => {\n      for (const listener of this._progressListeners) {\n        listener(loaded, total);\n      }\n    });\n  }\n\n  /**\n   * @param {Uint8Array|null} chunk\n   */\n  onDataProgressiveRead(chunk) {\n    this._readyCapability.promise.then(() => {\n      for (const listener of this._progressiveReadListeners) {\n        listener(chunk);\n      }\n    });\n  }\n\n  onDataProgressiveDone() {\n    this._readyCapability.promise.then(() => {\n      for (const listener of this._progressiveDoneListeners) {\n        listener();\n      }\n    });\n  }\n\n  transportReady() {\n    this._readyCapability.resolve();\n  }\n\n  /**\n   * @param {number} begin\n   * @param {number} end\n   */\n  requestDataRange(begin, end) {\n    unreachable(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n  }\n\n  abort() {}\n}\n\n/**\n * Proxy to a `PDFDocument` in the worker thread.\n */\nclass PDFDocumentProxy {\n  constructor(pdfInfo, transport) {\n    this._pdfInfo = pdfInfo;\n    this._transport = transport;\n\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n      Object.defineProperty(this, \"getJavaScript\", {\n        value: () => {\n          deprecated(\n            \"`PDFDocumentProxy.getJavaScript`, \" +\n              \"please use `PDFDocumentProxy.getJSActions` instead.\"\n          );\n          return this.getJSActions().then(js => {\n            if (!js) {\n              return js;\n            }\n            const jsArr = [];\n            for (const name in js) {\n              jsArr.push(...js[name]);\n            }\n            return jsArr;\n          });\n        },\n      });\n    }\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      // For testing purposes.\n      Object.defineProperty(this, \"getXFADatasets\", {\n        value: () => {\n          return this._transport.getXFADatasets();\n        },\n      });\n      Object.defineProperty(this, \"getXRefPrevValue\", {\n        value: () => {\n          return this._transport.getXRefPrevValue();\n        },\n      });\n      Object.defineProperty(this, \"getAnnotArray\", {\n        value: pageIndex => {\n          return this._transport.getAnnotArray(pageIndex);\n        },\n      });\n    }\n  }\n\n  /**\n   * @type {AnnotationStorage} Storage for annotation data in forms.\n   */\n  get annotationStorage() {\n    return this._transport.annotationStorage;\n  }\n\n  /**\n   * @type {Object} The filter factory instance.\n   */\n  get filterFactory() {\n    return this._transport.filterFactory;\n  }\n\n  /**\n   * @type {number} Total number of pages in the PDF file.\n   */\n  get numPages() {\n    return this._pdfInfo.numPages;\n  }\n\n  /**\n   * @type {Array<string, string|null>} A (not guaranteed to be) unique ID to\n   *   identify the PDF document.\n   *   NOTE: The first element will always be defined for all PDF documents,\n   *   whereas the second element is only defined for *modified* PDF documents.\n   */\n  get fingerprints() {\n    return this._pdfInfo.fingerprints;\n  }\n\n  /**\n   * @type {boolean} True if only XFA form.\n   */\n  get isPureXfa() {\n    return shadow(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n  }\n\n  /**\n   * NOTE: This is (mostly) intended to support printing of XFA forms.\n   *\n   * @type {Object | null} An object representing a HTML tree structure\n   *   to render the XFA, or `null` when no XFA form exists.\n   */\n  get allXfaHtml() {\n    return this._transport._htmlForXfa;\n  }\n\n  /**\n   * @param {number} pageNumber - The page number to get. The first page is 1.\n   * @returns {Promise<PDFPageProxy>} A promise that is resolved with\n   *   a {@link PDFPageProxy} object.\n   */\n  getPage(pageNumber) {\n    return this._transport.getPage(pageNumber);\n  }\n\n  /**\n   * @param {RefProxy} ref - The page reference.\n   * @returns {Promise<number>} A promise that is resolved with the page index,\n   *   starting from zero, that is associated with the reference.\n   */\n  getPageIndex(ref) {\n    return this._transport.getPageIndex(ref);\n  }\n\n  /**\n   * @returns {Promise<Object<string, Array<any>>>} A promise that is resolved\n   *   with a mapping from named destinations to references.\n   *\n   * This can be slow for large documents. Use `getDestination` instead.\n   */\n  getDestinations() {\n    return this._transport.getDestinations();\n  }\n\n  /**\n   * @param {string} id - The named destination to get.\n   * @returns {Promise<Array<any> | null>} A promise that is resolved with all\n   *   information of the given named destination, or `null` when the named\n   *   destination is not present in the PDF file.\n   */\n  getDestination(id) {\n    return this._transport.getDestination(id);\n  }\n\n  /**\n   * @returns {Promise<Array<string> | null>} A promise that is resolved with\n   *   an {Array} containing the page labels that correspond to the page\n   *   indexes, or `null` when no page labels are present in the PDF file.\n   */\n  getPageLabels() {\n    return this._transport.getPageLabels();\n  }\n\n  /**\n   * @returns {Promise<string>} A promise that is resolved with a {string}\n   *   containing the page layout name.\n   */\n  getPageLayout() {\n    return this._transport.getPageLayout();\n  }\n\n  /**\n   * @returns {Promise<string>} A promise that is resolved with a {string}\n   *   containing the page mode name.\n   */\n  getPageMode() {\n    return this._transport.getPageMode();\n  }\n\n  /**\n   * @returns {Promise<Object | null>} A promise that is resolved with an\n   *   {Object} containing the viewer preferences, or `null` when no viewer\n   *   preferences are present in the PDF file.\n   */\n  getViewerPreferences() {\n    return this._transport.getViewerPreferences();\n  }\n\n  /**\n   * @returns {Promise<any | null>} A promise that is resolved with an {Array}\n   *   containing the destination, or `null` when no open action is present\n   *   in the PDF.\n   */\n  getOpenAction() {\n    return this._transport.getOpenAction();\n  }\n\n  /**\n   * @returns {Promise<any>} A promise that is resolved with a lookup table\n   *   for mapping named attachments to their content.\n   */\n  getAttachments() {\n    return this._transport.getAttachments();\n  }\n\n  /**\n   * @returns {Promise<Object | null>} A promise that is resolved with\n   *   an {Object} with the JavaScript actions:\n   *     - from the name tree.\n   *     - from A or AA entries in the catalog dictionary.\n   *   , or `null` if no JavaScript exists.\n   */\n  getJSActions() {\n    return this._transport.getDocJSActions();\n  }\n\n  /**\n   * @typedef {Object} OutlineNode\n   * @property {string} title\n   * @property {boolean} bold\n   * @property {boolean} italic\n   * @property {Uint8ClampedArray} color - The color in RGB format to use for\n   *   display purposes.\n   * @property {string | Array<any> | null} dest\n   * @property {string | null} url\n   * @property {string | undefined} unsafeUrl\n   * @property {boolean | undefined} newWindow\n   * @property {number | undefined} count\n   * @property {Array<OutlineNode>} items\n   */\n\n  /**\n   * @returns {Promise<Array<OutlineNode>>} A promise that is resolved with an\n   *   {Array} that is a tree outline (if it has one) of the PDF file.\n   */\n  getOutline() {\n    return this._transport.getOutline();\n  }\n\n  /**\n   * @returns {Promise<OptionalContentConfig>} A promise that is resolved with\n   *   an {@link OptionalContentConfig} that contains all the optional content\n   *   groups (assuming that the document has any).\n   */\n  getOptionalContentConfig() {\n    return this._transport.getOptionalContentConfig();\n  }\n\n  /**\n   * @returns {Promise<Array<number> | null>} A promise that is resolved with\n   *   an {Array} that contains the permission flags for the PDF document, or\n   *   `null` when no permissions are present in the PDF file.\n   */\n  getPermissions() {\n    return this._transport.getPermissions();\n  }\n\n  /**\n   * @returns {Promise<{ info: Object, metadata: Metadata }>} A promise that is\n   *   resolved with an {Object} that has `info` and `metadata` properties.\n   *   `info` is an {Object} filled with anything available in the information\n   *   dictionary and similarly `metadata` is a {Metadata} object with\n   *   information from the metadata section of the PDF.\n   */\n  getMetadata() {\n    return this._transport.getMetadata();\n  }\n\n  /**\n   * @typedef {Object} MarkInfo\n   * Properties correspond to Table 321 of the PDF 32000-1:2008 spec.\n   * @property {boolean} Marked\n   * @property {boolean} UserProperties\n   * @property {boolean} Suspects\n   */\n\n  /**\n   * @returns {Promise<MarkInfo | null>} A promise that is resolved with\n   *   a {MarkInfo} object that contains the MarkInfo flags for the PDF\n   *   document, or `null` when no MarkInfo values are present in the PDF file.\n   */\n  getMarkInfo() {\n    return this._transport.getMarkInfo();\n  }\n\n  /**\n   * @returns {Promise<Uint8Array>} A promise that is resolved with a\n   *   {Uint8Array} containing the raw data of the PDF document.\n   */\n  getData() {\n    return this._transport.getData();\n  }\n\n  /**\n   * @returns {Promise<Uint8Array>} A promise that is resolved with a\n   *   {Uint8Array} containing the full data of the saved document.\n   */\n  saveDocument() {\n    return this._transport.saveDocument();\n  }\n\n  /**\n   * @returns {Promise<{ length: number }>} A promise that is resolved when the\n   *   document's data is loaded. It is resolved with an {Object} that contains\n   *   the `length` property that indicates size of the PDF data in bytes.\n   */\n  getDownloadInfo() {\n    return this._transport.downloadInfoCapability.promise;\n  }\n\n  /**\n   * Cleans up resources allocated by the document on both the main and worker\n   * threads.\n   *\n   * NOTE: Do not, under any circumstances, call this method when rendering is\n   * currently ongoing since that may lead to rendering errors.\n   *\n   * @param {boolean} [keepLoadedFonts] - Let fonts remain attached to the DOM.\n   *   NOTE: This will increase persistent memory usage, hence don't use this\n   *   option unless absolutely necessary. The default value is `false`.\n   * @returns {Promise} A promise that is resolved when clean-up has finished.\n   */\n  cleanup(keepLoadedFonts = false) {\n    return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n  }\n\n  /**\n   * Destroys the current document instance and terminates the worker.\n   */\n  destroy() {\n    return this.loadingTask.destroy();\n  }\n\n  /**\n   * @type {DocumentInitParameters} A subset of the current\n   *   {DocumentInitParameters}, which are needed in the viewer.\n   */\n  get loadingParams() {\n    return this._transport.loadingParams;\n  }\n\n  /**\n   * @type {PDFDocumentLoadingTask} The loadingTask for the current document.\n   */\n  get loadingTask() {\n    return this._transport.loadingTask;\n  }\n\n  /**\n   * @returns {Promise<Object<string, Array<Object>> | null>} A promise that is\n   *   resolved with an {Object} containing /AcroForm field data for the JS\n   *   sandbox, or `null` when no field data is present in the PDF file.\n   */\n  getFieldObjects() {\n    return this._transport.getFieldObjects();\n  }\n\n  /**\n   * @returns {Promise<boolean>} A promise that is resolved with `true`\n   *   if some /AcroForm fields have JavaScript actions.\n   */\n  hasJSActions() {\n    return this._transport.hasJSActions();\n  }\n\n  /**\n   * @returns {Promise<Array<string> | null>} A promise that is resolved with an\n   *   {Array<string>} containing IDs of annotations that have a calculation\n   *   action, or `null` when no such annotations are present in the PDF file.\n   */\n  getCalculationOrderIds() {\n    return this._transport.getCalculationOrderIds();\n  }\n}\n\n/**\n * Page getViewport parameters.\n *\n * @typedef {Object} GetViewportParameters\n * @property {number} scale - The desired scale of the viewport.\n * @property {number} [rotation] - The desired rotation, in degrees, of\n *   the viewport. If omitted it defaults to the page rotation.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.\n *   The default value is `0`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset.\n *   The default value is `0`.\n * @property {boolean} [dontFlip] - If true, the y-axis will not be\n *   flipped. The default value is `false`.\n */\n\n/**\n * Page getTextContent parameters.\n *\n * @typedef {Object} getTextContentParameters\n * @property {boolean} [includeMarkedContent] - When true include marked\n *   content items in the items array of TextContent. The default is `false`.\n * @property {boolean} [disableNormalization] - When true the text is *not*\n *   normalized in the worker-thread. The default is `false`.\n */\n\n/**\n * Page text content.\n *\n * @typedef {Object} TextContent\n * @property {Array<TextItem | TextMarkedContent>} items - Array of\n *   {@link TextItem} and {@link TextMarkedContent} objects. TextMarkedContent\n *   items are included when includeMarkedContent is true.\n * @property {Object<string, TextStyle>} styles - {@link TextStyle} objects,\n *   indexed by font name.\n */\n\n/**\n * Page text content part.\n *\n * @typedef {Object} TextItem\n * @property {string} str - Text content.\n * @property {string} dir - Text direction: 'ttb', 'ltr' or 'rtl'.\n * @property {Array<any>} transform - Transformation matrix.\n * @property {number} width - Width in device space.\n * @property {number} height - Height in device space.\n * @property {string} fontName - Font name used by PDF.js for converted font.\n * @property {boolean} hasEOL - Indicating if the text content is followed by a\n *   line-break.\n */\n\n/**\n * Page text marked content part.\n *\n * @typedef {Object} TextMarkedContent\n * @property {string} type - Either 'beginMarkedContent',\n *   'beginMarkedContentProps', or 'endMarkedContent'.\n * @property {string} id - The marked content identifier. Only used for type\n *   'beginMarkedContentProps'.\n */\n\n/**\n * Text style.\n *\n * @typedef {Object} TextStyle\n * @property {number} ascent - Font ascent.\n * @property {number} descent - Font descent.\n * @property {boolean} vertical - Whether or not the text is in vertical mode.\n * @property {string} fontFamily - The possible font family.\n */\n\n/**\n * Page annotation parameters.\n *\n * @typedef {Object} GetAnnotationsParameters\n * @property {string} [intent] - Determines the annotations that are fetched,\n *   can be 'display' (viewable annotations), 'print' (printable annotations),\n *   or 'any' (all annotations). The default value is 'display'.\n */\n\n/**\n * Page render parameters.\n *\n * @typedef {Object} RenderParameters\n * @property {CanvasRenderingContext2D} canvasContext - A 2D context of a DOM\n *   Canvas object.\n * @property {PageViewport} viewport - Rendering viewport obtained by calling\n *   the `PDFPageProxy.getViewport` method.\n * @property {string} [intent] - Rendering intent, can be 'display', 'print',\n *   or 'any'. The default value is 'display'.\n * @property {number} [annotationMode] Controls which annotations are rendered\n *   onto the canvas, for annotations with appearance-data; the values from\n *   {@link AnnotationMode} should be used. The following values are supported:\n *    - `AnnotationMode.DISABLE`, which disables all annotations.\n *    - `AnnotationMode.ENABLE`, which includes all possible annotations (thus\n *      it also depends on the `intent`-option, see above).\n *    - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain\n *      interactive form elements (those will be rendered in the display layer).\n *    - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations\n *      (as above) but where interactive form elements are updated with data\n *      from the {@link AnnotationStorage}-instance; useful e.g. for printing.\n *   The default value is `AnnotationMode.ENABLE`.\n * @property {Array<any>} [transform] - Additional transform, applied just\n *   before viewport transform.\n * @property {CanvasGradient | CanvasPattern | string} [background] - Background\n *   to use for the canvas.\n *   Any valid `canvas.fillStyle` can be used: a `DOMString` parsed as CSS\n *   <color> value, a `CanvasGradient` object (a linear or radial gradient) or\n *   a `CanvasPattern` object (a repetitive image). The default value is\n *   'rgb(255,255,255)'.\n *\n *   NOTE: This option may be partially, or completely, ignored when the\n *   `pageColors`-option is used.\n * @property {Object} [pageColors] - Overwrites background and foreground colors\n *   with user defined ones in order to improve readability in high contrast\n *   mode.\n * @property {Promise<OptionalContentConfig>} [optionalContentConfigPromise] -\n *   A promise that should resolve with an {@link OptionalContentConfig}\n *   created from `PDFDocumentProxy.getOptionalContentConfig`. If `null`,\n *   the configuration will be fetched automatically with the default visibility\n *   states set.\n * @property {Map<string, HTMLCanvasElement>} [annotationCanvasMap] - Map some\n *   annotation ids with canvases used to render them.\n * @property {PrintAnnotationStorage} [printAnnotationStorage]\n */\n\n/**\n * Page getOperatorList parameters.\n *\n * @typedef {Object} GetOperatorListParameters\n * @property {string} [intent] - Rendering intent, can be 'display', 'print',\n *   or 'any'. The default value is 'display'.\n * @property {number} [annotationMode] Controls which annotations are included\n *   in the operatorList, for annotations with appearance-data; the values from\n *   {@link AnnotationMode} should be used. The following values are supported:\n *    - `AnnotationMode.DISABLE`, which disables all annotations.\n *    - `AnnotationMode.ENABLE`, which includes all possible annotations (thus\n *      it also depends on the `intent`-option, see above).\n *    - `AnnotationMode.ENABLE_FORMS`, which excludes annotations that contain\n *      interactive form elements (those will be rendered in the display layer).\n *    - `AnnotationMode.ENABLE_STORAGE`, which includes all possible annotations\n *      (as above) but where interactive form elements are updated with data\n *      from the {@link AnnotationStorage}-instance; useful e.g. for printing.\n *   The default value is `AnnotationMode.ENABLE`.\n * @property {PrintAnnotationStorage} [printAnnotationStorage]\n */\n\n/**\n * Structure tree node. The root node will have a role \"Root\".\n *\n * @typedef {Object} StructTreeNode\n * @property {Array<StructTreeNode | StructTreeContent>} children - Array of\n *   {@link StructTreeNode} and {@link StructTreeContent} objects.\n * @property {string} role - element's role, already mapped if a role map exists\n * in the PDF.\n */\n\n/**\n * Structure tree content.\n *\n * @typedef {Object} StructTreeContent\n * @property {string} type - either \"content\" for page and stream structure\n *   elements or \"object\" for object references.\n * @property {string} id - unique id that will map to the text layer.\n */\n\n/**\n * PDF page operator list.\n *\n * @typedef {Object} PDFOperatorList\n * @property {Array<number>} fnArray - Array containing the operator functions.\n * @property {Array<any>} argsArray - Array containing the arguments of the\n *   functions.\n */\n\n/**\n * Proxy to a `PDFPage` in the worker thread.\n */\nclass PDFPageProxy {\n  #delayedCleanupTimeout = null;\n\n  #pendingCleanup = false;\n\n  constructor(pageIndex, pageInfo, transport, pdfBug = false) {\n    this._pageIndex = pageIndex;\n    this._pageInfo = pageInfo;\n    this._transport = transport;\n    this._stats = pdfBug ? new StatTimer() : null;\n    this._pdfBug = pdfBug;\n    /** @type {PDFObjects} */\n    this.commonObjs = transport.commonObjs;\n    this.objs = new PDFObjects();\n\n    this._maybeCleanupAfterRender = false;\n    this._intentStates = new Map();\n    this.destroyed = false;\n  }\n\n  /**\n   * @type {number} Page number of the page. First page is 1.\n   */\n  get pageNumber() {\n    return this._pageIndex + 1;\n  }\n\n  /**\n   * @type {number} The number of degrees the page is rotated clockwise.\n   */\n  get rotate() {\n    return this._pageInfo.rotate;\n  }\n\n  /**\n   * @type {RefProxy | null} The reference that points to this page.\n   */\n  get ref() {\n    return this._pageInfo.ref;\n  }\n\n  /**\n   * @type {number} The default size of units in 1/72nds of an inch.\n   */\n  get userUnit() {\n    return this._pageInfo.userUnit;\n  }\n\n  /**\n   * @type {Array<number>} An array of the visible portion of the PDF page in\n   *   user space units [x1, y1, x2, y2].\n   */\n  get view() {\n    return this._pageInfo.view;\n  }\n\n  /**\n   * @param {GetViewportParameters} params - Viewport parameters.\n   * @returns {PageViewport} Contains 'width' and 'height' properties\n   *   along with transforms required for rendering.\n   */\n  getViewport({\n    scale,\n    rotation = this.rotate,\n    offsetX = 0,\n    offsetY = 0,\n    dontFlip = false,\n  } = {}) {\n    return new PageViewport({\n      viewBox: this.view,\n      scale,\n      rotation,\n      offsetX,\n      offsetY,\n      dontFlip,\n    });\n  }\n\n  /**\n   * @param {GetAnnotationsParameters} params - Annotation parameters.\n   * @returns {Promise<Array<any>>} A promise that is resolved with an\n   *   {Array} of the annotation objects.\n   */\n  getAnnotations({ intent = \"display\" } = {}) {\n    const intentArgs = this._transport.getRenderingIntent(intent);\n\n    return this._transport.getAnnotations(\n      this._pageIndex,\n      intentArgs.renderingIntent\n    );\n  }\n\n  /**\n   * @returns {Promise<Object>} A promise that is resolved with an\n   *   {Object} with JS actions.\n   */\n  getJSActions() {\n    return this._transport.getPageJSActions(this._pageIndex);\n  }\n\n  /**\n   * @type {Object} The filter factory instance.\n   */\n  get filterFactory() {\n    return this._transport.filterFactory;\n  }\n\n  /**\n   * @type {boolean} True if only XFA form.\n   */\n  get isPureXfa() {\n    return shadow(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n  }\n\n  /**\n   * @returns {Promise<Object | null>} A promise that is resolved with\n   *   an {Object} with a fake DOM object (a tree structure where elements\n   *   are {Object} with a name, attributes (class, style, ...), value and\n   *   children, very similar to a HTML DOM tree), or `null` if no XFA exists.\n   */\n  async getXfa() {\n    return this._transport._htmlForXfa?.children[this._pageIndex] || null;\n  }\n\n  /**\n   * Begins the process of rendering a page to the desired context.\n   *\n   * @param {RenderParameters} params - Page render parameters.\n   * @returns {RenderTask} An object that contains a promise that is\n   *   resolved when the page finishes rendering.\n   */\n  render({\n    canvasContext,\n    viewport,\n    intent = \"display\",\n    annotationMode = AnnotationMode.ENABLE,\n    transform = null,\n    background = null,\n    optionalContentConfigPromise = null,\n    annotationCanvasMap = null,\n    pageColors = null,\n    printAnnotationStorage = null,\n  }) {\n    this._stats?.time(\"Overall\");\n\n    const intentArgs = this._transport.getRenderingIntent(\n      intent,\n      annotationMode,\n      printAnnotationStorage\n    );\n    // If there was a pending destroy, cancel it so no cleanup happens during\n    // this call to render...\n    this.#pendingCleanup = false;\n    // ... and ensure that a delayed cleanup is always aborted.\n    this.#abortDelayedCleanup();\n\n    if (!optionalContentConfigPromise) {\n      optionalContentConfigPromise = this._transport.getOptionalContentConfig();\n    }\n\n    let intentState = this._intentStates.get(intentArgs.cacheKey);\n    if (!intentState) {\n      intentState = Object.create(null);\n      this._intentStates.set(intentArgs.cacheKey, intentState);\n    }\n\n    // Ensure that a pending `streamReader` cancel timeout is always aborted.\n    if (intentState.streamReaderCancelTimeout) {\n      clearTimeout(intentState.streamReaderCancelTimeout);\n      intentState.streamReaderCancelTimeout = null;\n    }\n\n    const intentPrint = !!(\n      intentArgs.renderingIntent & RenderingIntentFlag.PRINT\n    );\n\n    // If there's no displayReadyCapability yet, then the operatorList\n    // was never requested before. Make the request and create the promise.\n    if (!intentState.displayReadyCapability) {\n      intentState.displayReadyCapability = new PromiseCapability();\n      intentState.operatorList = {\n        fnArray: [],\n        argsArray: [],\n        lastChunk: false,\n        separateAnnots: null,\n      };\n\n      this._stats?.time(\"Page Request\");\n      this._pumpOperatorList(intentArgs);\n    }\n\n    const complete = error => {\n      intentState.renderTasks.delete(internalRenderTask);\n\n      // Attempt to reduce memory usage during *printing*, by always running\n      // cleanup immediately once rendering has finished.\n      if (this._maybeCleanupAfterRender || intentPrint) {\n        this.#pendingCleanup = true;\n      }\n      this.#tryCleanup(/* delayed = */ !intentPrint);\n\n      if (error) {\n        internalRenderTask.capability.reject(error);\n\n        this._abortOperatorList({\n          intentState,\n          reason: error instanceof Error ? error : new Error(error),\n        });\n      } else {\n        internalRenderTask.capability.resolve();\n      }\n\n      this._stats?.timeEnd(\"Rendering\");\n      this._stats?.timeEnd(\"Overall\");\n    };\n\n    const internalRenderTask = new InternalRenderTask({\n      callback: complete,\n      // Only include the required properties, and *not* the entire object.\n      params: {\n        canvasContext,\n        viewport,\n        transform,\n        background,\n      },\n      objs: this.objs,\n      commonObjs: this.commonObjs,\n      annotationCanvasMap,\n      operatorList: intentState.operatorList,\n      pageIndex: this._pageIndex,\n      canvasFactory: this._transport.canvasFactory,\n      filterFactory: this._transport.filterFactory,\n      useRequestAnimationFrame: !intentPrint,\n      pdfBug: this._pdfBug,\n      pageColors,\n    });\n\n    (intentState.renderTasks ||= new Set()).add(internalRenderTask);\n    const renderTask = internalRenderTask.task;\n\n    Promise.all([\n      intentState.displayReadyCapability.promise,\n      optionalContentConfigPromise,\n    ])\n      .then(([transparency, optionalContentConfig]) => {\n        if (this.destroyed) {\n          complete();\n          return;\n        }\n        this._stats?.time(\"Rendering\");\n\n        internalRenderTask.initializeGraphics({\n          transparency,\n          optionalContentConfig,\n        });\n        internalRenderTask.operatorListChanged();\n      })\n      .catch(complete);\n\n    return renderTask;\n  }\n\n  /**\n   * @param {GetOperatorListParameters} params - Page getOperatorList\n   *   parameters.\n   * @returns {Promise<PDFOperatorList>} A promise resolved with an\n   *   {@link PDFOperatorList} object that represents the page's operator list.\n   */\n  getOperatorList({\n    intent = \"display\",\n    annotationMode = AnnotationMode.ENABLE,\n    printAnnotationStorage = null,\n  } = {}) {\n    if (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"GENERIC\")) {\n      throw new Error(\"Not implemented: getOperatorList\");\n    }\n    function operatorListChanged() {\n      if (intentState.operatorList.lastChunk) {\n        intentState.opListReadCapability.resolve(intentState.operatorList);\n\n        intentState.renderTasks.delete(opListTask);\n      }\n    }\n\n    const intentArgs = this._transport.getRenderingIntent(\n      intent,\n      annotationMode,\n      printAnnotationStorage,\n      /* isOpList = */ true\n    );\n    let intentState = this._intentStates.get(intentArgs.cacheKey);\n    if (!intentState) {\n      intentState = Object.create(null);\n      this._intentStates.set(intentArgs.cacheKey, intentState);\n    }\n    let opListTask;\n\n    if (!intentState.opListReadCapability) {\n      opListTask = Object.create(null);\n      opListTask.operatorListChanged = operatorListChanged;\n      intentState.opListReadCapability = new PromiseCapability();\n      (intentState.renderTasks ||= new Set()).add(opListTask);\n      intentState.operatorList = {\n        fnArray: [],\n        argsArray: [],\n        lastChunk: false,\n        separateAnnots: null,\n      };\n\n      this._stats?.time(\"Page Request\");\n      this._pumpOperatorList(intentArgs);\n    }\n    return intentState.opListReadCapability.promise;\n  }\n\n  /**\n   * NOTE: All occurrences of whitespace will be replaced by\n   * standard spaces (0x20).\n   *\n   * @param {getTextContentParameters} params - getTextContent parameters.\n   * @returns {ReadableStream} Stream for reading text content chunks.\n   */\n  streamTextContent({\n    includeMarkedContent = false,\n    disableNormalization = false,\n  } = {}) {\n    const TEXT_CONTENT_CHUNK_SIZE = 100;\n\n    return this._transport.messageHandler.sendWithStream(\n      \"GetTextContent\",\n      {\n        pageIndex: this._pageIndex,\n        includeMarkedContent: includeMarkedContent === true,\n        disableNormalization: disableNormalization === true,\n      },\n      {\n        highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n        size(textContent) {\n          return textContent.items.length;\n        },\n      }\n    );\n  }\n\n  /**\n   * NOTE: All occurrences of whitespace will be replaced by\n   * standard spaces (0x20).\n   *\n   * @param {getTextContentParameters} params - getTextContent parameters.\n   * @returns {Promise<TextContent>} A promise that is resolved with a\n   *   {@link TextContent} object that represents the page's text content.\n   */\n  getTextContent(params = {}) {\n    if (this._transport._htmlForXfa) {\n      // TODO: We need to revisit this once the XFA foreground patch lands and\n      // only do this for non-foreground XFA.\n      return this.getXfa().then(xfa => {\n        return XfaText.textContent(xfa);\n      });\n    }\n    const readableStream = this.streamTextContent(params);\n\n    return new Promise(function (resolve, reject) {\n      function pump() {\n        reader.read().then(function ({ value, done }) {\n          if (done) {\n            resolve(textContent);\n            return;\n          }\n          Object.assign(textContent.styles, value.styles);\n          textContent.items.push(...value.items);\n          pump();\n        }, reject);\n      }\n\n      const reader = readableStream.getReader();\n      const textContent = {\n        items: [],\n        styles: Object.create(null),\n      };\n      pump();\n    });\n  }\n\n  /**\n   * @returns {Promise<StructTreeNode>} A promise that is resolved with a\n   *   {@link StructTreeNode} object that represents the page's structure tree,\n   *   or `null` when no structure tree is present for the current page.\n   */\n  getStructTree() {\n    return this._transport.getStructTree(this._pageIndex);\n  }\n\n  /**\n   * Destroys the page object.\n   * @private\n   */\n  _destroy() {\n    this.destroyed = true;\n\n    const waitOn = [];\n    for (const intentState of this._intentStates.values()) {\n      this._abortOperatorList({\n        intentState,\n        reason: new Error(\"Page was destroyed.\"),\n        force: true,\n      });\n\n      if (intentState.opListReadCapability) {\n        // Avoid errors below, since the renderTasks are just stubs.\n        continue;\n      }\n      for (const internalRenderTask of intentState.renderTasks) {\n        waitOn.push(internalRenderTask.completed);\n        internalRenderTask.cancel();\n      }\n    }\n    this.objs.clear();\n    this.#pendingCleanup = false;\n    this.#abortDelayedCleanup();\n\n    return Promise.all(waitOn);\n  }\n\n  /**\n   * Cleans up resources allocated by the page.\n   *\n   * @param {boolean} [resetStats] - Reset page stats, if enabled.\n   *   The default value is `false`.\n   * @returns {boolean} Indicates if clean-up was successfully run.\n   */\n  cleanup(resetStats = false) {\n    this.#pendingCleanup = true;\n    const success = this.#tryCleanup(/* delayed = */ false);\n\n    if (resetStats && success) {\n      this._stats &&= new StatTimer();\n    }\n    return success;\n  }\n\n  /**\n   * Attempts to clean up if rendering is in a state where that's possible.\n   * @param {boolean} [delayed] - Delay the cleanup, to e.g. improve zooming\n   *   performance in documents with large images.\n   *   The default value is `false`.\n   * @returns {boolean} Indicates if clean-up was successfully run.\n   */\n  #tryCleanup(delayed = false) {\n    this.#abortDelayedCleanup();\n\n    if (!this.#pendingCleanup || this.destroyed) {\n      return false;\n    }\n    if (delayed) {\n      this.#delayedCleanupTimeout = setTimeout(() => {\n        this.#delayedCleanupTimeout = null;\n        this.#tryCleanup(/* delayed = */ false);\n      }, DELAYED_CLEANUP_TIMEOUT);\n\n      return false;\n    }\n    for (const { renderTasks, operatorList } of this._intentStates.values()) {\n      if (renderTasks.size > 0 || !operatorList.lastChunk) {\n        return false;\n      }\n    }\n    this._intentStates.clear();\n    this.objs.clear();\n    this.#pendingCleanup = false;\n    return true;\n  }\n\n  #abortDelayedCleanup() {\n    if (this.#delayedCleanupTimeout) {\n      clearTimeout(this.#delayedCleanupTimeout);\n      this.#delayedCleanupTimeout = null;\n    }\n  }\n\n  /**\n   * @private\n   */\n  _startRenderPage(transparency, cacheKey) {\n    const intentState = this._intentStates.get(cacheKey);\n    if (!intentState) {\n      return; // Rendering was cancelled.\n    }\n    this._stats?.timeEnd(\"Page Request\");\n\n    // TODO Refactor RenderPageRequest to separate rendering\n    // and operator list logic\n    intentState.displayReadyCapability?.resolve(transparency);\n  }\n\n  /**\n   * @private\n   */\n  _renderPageChunk(operatorListChunk, intentState) {\n    // Add the new chunk to the current operator list.\n    for (let i = 0, ii = operatorListChunk.length; i < ii; i++) {\n      intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n      intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);\n    }\n    intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n    intentState.operatorList.separateAnnots = operatorListChunk.separateAnnots;\n\n    // Notify all the rendering tasks there are more operators to be consumed.\n    for (const internalRenderTask of intentState.renderTasks) {\n      internalRenderTask.operatorListChanged();\n    }\n\n    if (operatorListChunk.lastChunk) {\n      this.#tryCleanup(/* delayed = */ true);\n    }\n  }\n\n  /**\n   * @private\n   */\n  _pumpOperatorList({\n    renderingIntent,\n    cacheKey,\n    annotationStorageSerializable,\n  }) {\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      assert(\n        Number.isInteger(renderingIntent) && renderingIntent > 0,\n        '_pumpOperatorList: Expected valid \"renderingIntent\" argument.'\n      );\n    }\n    const { map, transfers } = annotationStorageSerializable;\n\n    const readableStream = this._transport.messageHandler.sendWithStream(\n      \"GetOperatorList\",\n      {\n        pageIndex: this._pageIndex,\n        intent: renderingIntent,\n        cacheKey,\n        annotationStorage: map,\n      },\n      transfers\n    );\n    const reader = readableStream.getReader();\n\n    const intentState = this._intentStates.get(cacheKey);\n    intentState.streamReader = reader;\n\n    const pump = () => {\n      reader.read().then(\n        ({ value, done }) => {\n          if (done) {\n            intentState.streamReader = null;\n            return;\n          }\n          if (this._transport.destroyed) {\n            return; // Ignore any pending requests if the worker was terminated.\n          }\n          this._renderPageChunk(value, intentState);\n          pump();\n        },\n        reason => {\n          intentState.streamReader = null;\n\n          if (this._transport.destroyed) {\n            return; // Ignore any pending requests if the worker was terminated.\n          }\n          if (intentState.operatorList) {\n            // Mark operator list as complete.\n            intentState.operatorList.lastChunk = true;\n\n            for (const internalRenderTask of intentState.renderTasks) {\n              internalRenderTask.operatorListChanged();\n            }\n            this.#tryCleanup(/* delayed = */ true);\n          }\n\n          if (intentState.displayReadyCapability) {\n            intentState.displayReadyCapability.reject(reason);\n          } else if (intentState.opListReadCapability) {\n            intentState.opListReadCapability.reject(reason);\n          } else {\n            throw reason;\n          }\n        }\n      );\n    };\n    pump();\n  }\n\n  /**\n   * @private\n   */\n  _abortOperatorList({ intentState, reason, force = false }) {\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      assert(\n        reason instanceof Error,\n        '_abortOperatorList: Expected valid \"reason\" argument.'\n      );\n    }\n\n    if (!intentState.streamReader) {\n      return;\n    }\n    // Ensure that a pending `streamReader` cancel timeout is always aborted.\n    if (intentState.streamReaderCancelTimeout) {\n      clearTimeout(intentState.streamReaderCancelTimeout);\n      intentState.streamReaderCancelTimeout = null;\n    }\n\n    if (!force) {\n      // Ensure that an Error occurring in *only* one `InternalRenderTask`, e.g.\n      // multiple render() calls on the same canvas, won't break all rendering.\n      if (intentState.renderTasks.size > 0) {\n        return;\n      }\n      // Don't immediately abort parsing on the worker-thread when rendering is\n      // cancelled, since that will unnecessarily delay re-rendering when (for\n      // partially parsed pages) e.g. zooming/rotation occurs in the viewer.\n      if (reason instanceof RenderingCancelledException) {\n        let delay = RENDERING_CANCELLED_TIMEOUT;\n        if (reason.extraDelay > 0 && reason.extraDelay < /* ms = */ 1000) {\n          // Above, we prevent the total delay from becoming arbitrarily large.\n          delay += reason.extraDelay;\n        }\n\n        intentState.streamReaderCancelTimeout = setTimeout(() => {\n          intentState.streamReaderCancelTimeout = null;\n          this._abortOperatorList({ intentState, reason, force: true });\n        }, delay);\n        return;\n      }\n    }\n    intentState.streamReader\n      .cancel(new AbortException(reason.message))\n      .catch(() => {\n        // Avoid \"Uncaught promise\" messages in the console.\n      });\n    intentState.streamReader = null;\n\n    if (this._transport.destroyed) {\n      return; // Ignore any pending requests if the worker was terminated.\n    }\n    // Remove the current `intentState`, since a cancelled `getOperatorList`\n    // call on the worker-thread cannot be re-started...\n    for (const [curCacheKey, curIntentState] of this._intentStates) {\n      if (curIntentState === intentState) {\n        this._intentStates.delete(curCacheKey);\n        break;\n      }\n    }\n    // ... and force clean-up to ensure that any old state is always removed.\n    this.cleanup();\n  }\n\n  /**\n   * @type {StatTimer | null} Returns page stats, if enabled; returns `null`\n   *   otherwise.\n   */\n  get stats() {\n    return this._stats;\n  }\n}\n\nclass LoopbackPort {\n  #listeners = new Set();\n\n  #deferred = Promise.resolve();\n\n  postMessage(obj, transfer) {\n    const event = {\n      data: structuredClone(\n        obj,\n        (typeof PDFJSDev === \"undefined\" ||\n          PDFJSDev.test(\"SKIP_BABEL || TESTING\")) &&\n          transfer\n          ? { transfer }\n          : null\n      ),\n    };\n\n    this.#deferred.then(() => {\n      for (const listener of this.#listeners) {\n        listener.call(this, event);\n      }\n    });\n  }\n\n  addEventListener(name, listener) {\n    this.#listeners.add(listener);\n  }\n\n  removeEventListener(name, listener) {\n    this.#listeners.delete(listener);\n  }\n\n  terminate() {\n    this.#listeners.clear();\n  }\n}\n\n/**\n * @typedef {Object} PDFWorkerParameters\n * @property {string} [name] - The name of the worker.\n * @property {Worker} [port] - The `workerPort` object.\n * @property {number} [verbosity] - Controls the logging level;\n *   the constants from {@link VerbosityLevel} should be used.\n */\n\nconst PDFWorkerUtil = {\n  isWorkerDisabled: false,\n  fallbackWorkerSrc: null,\n  fakeWorkerId: 0,\n};\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n  // eslint-disable-next-line no-undef\n  if (isNodeJS && typeof __non_webpack_require__ === \"function\") {\n    // Workers aren't supported in Node.js, force-disabling them there.\n    PDFWorkerUtil.isWorkerDisabled = true;\n\n    PDFWorkerUtil.fallbackWorkerSrc = PDFJSDev.test(\"LIB\")\n      ? \"../pdf.worker.js\"\n      : \"./pdf.worker.js\";\n  } else if (typeof document === \"object\") {\n    const pdfjsFilePath = document?.currentScript?.src;\n    if (pdfjsFilePath) {\n      PDFWorkerUtil.fallbackWorkerSrc = pdfjsFilePath.replace(\n        /(\\.(?:min\\.)?js)(\\?.*)?$/i,\n        \".worker$1$2\"\n      );\n    }\n  }\n\n  // Check if URLs have the same origin. For non-HTTP based URLs, returns false.\n  PDFWorkerUtil.isSameOrigin = function (baseUrl, otherUrl) {\n    let base;\n    try {\n      base = new URL(baseUrl);\n      if (!base.origin || base.origin === \"null\") {\n        return false; // non-HTTP url\n      }\n    } catch {\n      return false;\n    }\n\n    const other = new URL(otherUrl, base);\n    return base.origin === other.origin;\n  };\n\n  PDFWorkerUtil.createCDNWrapper = function (url) {\n    // We will rely on blob URL's property to specify origin.\n    // We want this function to fail in case if createObjectURL or Blob do not\n    // exist or fail for some reason -- our Worker creation will fail anyway.\n    const wrapper = `importScripts(\"${url}\");`;\n    return URL.createObjectURL(new Blob([wrapper]));\n  };\n}\n\n/**\n * PDF.js web worker abstraction that controls the instantiation of PDF\n * documents. Message handlers are used to pass information from the main\n * thread to the worker thread and vice versa. If the creation of a web\n * worker is not possible, a \"fake\" worker will be used instead.\n *\n * @param {PDFWorkerParameters} params - The worker initialization parameters.\n */\nclass PDFWorker {\n  static #workerPorts;\n\n  constructor({\n    name = null,\n    port = null,\n    verbosity = getVerbosityLevel(),\n  } = {}) {\n    this.name = name;\n    this.destroyed = false;\n    this.verbosity = verbosity;\n\n    this._readyCapability = new PromiseCapability();\n    this._port = null;\n    this._webWorker = null;\n    this._messageHandler = null;\n\n    if (\n      (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) &&\n      port\n    ) {\n      if (PDFWorker.#workerPorts?.has(port)) {\n        throw new Error(\"Cannot use more than one PDFWorker per port.\");\n      }\n      (PDFWorker.#workerPorts ||= new WeakMap()).set(port, this);\n      this._initializeFromPort(port);\n      return;\n    }\n    this._initialize();\n  }\n\n  /**\n   * Promise for worker initialization completion.\n   * @type {Promise<void>}\n   */\n  get promise() {\n    return this._readyCapability.promise;\n  }\n\n  /**\n   * The current `workerPort`, when it exists.\n   * @type {Worker}\n   */\n  get port() {\n    return this._port;\n  }\n\n  /**\n   * The current MessageHandler-instance.\n   * @type {MessageHandler}\n   */\n  get messageHandler() {\n    return this._messageHandler;\n  }\n\n  _initializeFromPort(port) {\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      throw new Error(\"Not implemented: _initializeFromPort\");\n    }\n    this._port = port;\n    this._messageHandler = new MessageHandler(\"main\", \"worker\", port);\n    this._messageHandler.on(\"ready\", function () {\n      // Ignoring \"ready\" event -- MessageHandler should already be initialized\n      // and ready to accept messages.\n    });\n    this._readyCapability.resolve();\n    // Send global setting, e.g. verbosity level.\n    this._messageHandler.send(\"configure\", {\n      verbosity: this.verbosity,\n    });\n  }\n\n  _initialize() {\n    // If worker support isn't disabled explicit and the browser has worker\n    // support, create a new web worker and test if it/the browser fulfills\n    // all requirements to run parts of pdf.js in a web worker.\n    // Right now, the requirement is, that an Uint8Array is still an\n    // Uint8Array as it arrives on the worker. (Chrome added this with v.15.)\n    if (\n      !PDFWorkerUtil.isWorkerDisabled &&\n      !PDFWorker._mainThreadWorkerMessageHandler\n    ) {\n      let { workerSrc } = PDFWorker;\n\n      try {\n        // Wraps workerSrc path into blob URL, if the former does not belong\n        // to the same origin.\n        if (\n          typeof PDFJSDev !== \"undefined\" &&\n          PDFJSDev.test(\"GENERIC\") &&\n          !PDFWorkerUtil.isSameOrigin(window.location.href, workerSrc)\n        ) {\n          workerSrc = PDFWorkerUtil.createCDNWrapper(\n            new URL(workerSrc, window.location).href\n          );\n        }\n\n        const worker =\n          typeof PDFJSDev === \"undefined\" &&\n          !workerSrc.endsWith(\"/build/pdf.worker.js\")\n            ? new Worker(workerSrc, { type: \"module\" })\n            : new Worker(workerSrc);\n        const messageHandler = new MessageHandler(\"main\", \"worker\", worker);\n        const terminateEarly = () => {\n          worker.removeEventListener(\"error\", onWorkerError);\n          messageHandler.destroy();\n          worker.terminate();\n          if (this.destroyed) {\n            this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n          } else {\n            // Fall back to fake worker if the termination is caused by an\n            // error (e.g. NetworkError / SecurityError).\n            this._setupFakeWorker();\n          }\n        };\n\n        const onWorkerError = () => {\n          if (!this._webWorker) {\n            // Worker failed to initialize due to an error. Clean up and fall\n            // back to the fake worker.\n            terminateEarly();\n          }\n        };\n        worker.addEventListener(\"error\", onWorkerError);\n\n        messageHandler.on(\"test\", data => {\n          worker.removeEventListener(\"error\", onWorkerError);\n          if (this.destroyed) {\n            terminateEarly();\n            return; // worker was destroyed\n          }\n          if (data) {\n            this._messageHandler = messageHandler;\n            this._port = worker;\n            this._webWorker = worker;\n\n            this._readyCapability.resolve();\n            // Send global setting, e.g. verbosity level.\n            messageHandler.send(\"configure\", {\n              verbosity: this.verbosity,\n            });\n          } else {\n            this._setupFakeWorker();\n            messageHandler.destroy();\n            worker.terminate();\n          }\n        });\n\n        messageHandler.on(\"ready\", data => {\n          worker.removeEventListener(\"error\", onWorkerError);\n          if (this.destroyed) {\n            terminateEarly();\n            return; // worker was destroyed\n          }\n          try {\n            sendTest();\n          } catch {\n            // We need fallback to a faked worker.\n            this._setupFakeWorker();\n          }\n        });\n\n        const sendTest = () => {\n          const testObj = new Uint8Array();\n          // Ensure that we can use `postMessage` transfers.\n          messageHandler.send(\"test\", testObj, [testObj.buffer]);\n        };\n\n        // It might take time for the worker to initialize. We will try to send\n        // the \"test\" message immediately, and once the \"ready\" message arrives.\n        // The worker shall process only the first received \"test\" message.\n        sendTest();\n        return;\n      } catch {\n        info(\"The worker has been disabled.\");\n      }\n    }\n    // Either workers are disabled, not supported or have thrown an exception.\n    // Thus, we fallback to a faked worker.\n    this._setupFakeWorker();\n  }\n\n  _setupFakeWorker() {\n    if (!PDFWorkerUtil.isWorkerDisabled) {\n      warn(\"Setting up fake worker.\");\n      PDFWorkerUtil.isWorkerDisabled = true;\n    }\n\n    PDFWorker._setupFakeWorkerGlobal\n      .then(WorkerMessageHandler => {\n        if (this.destroyed) {\n          this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n          return;\n        }\n        const port = new LoopbackPort();\n        this._port = port;\n\n        // All fake workers use the same port, making id unique.\n        const id = `fake${PDFWorkerUtil.fakeWorkerId++}`;\n\n        // If the main thread is our worker, setup the handling for the\n        // messages -- the main thread sends to it self.\n        const workerHandler = new MessageHandler(id + \"_worker\", id, port);\n        WorkerMessageHandler.setup(workerHandler, port);\n\n        const messageHandler = new MessageHandler(id, id + \"_worker\", port);\n        this._messageHandler = messageHandler;\n        this._readyCapability.resolve();\n        // Send global setting, e.g. verbosity level.\n        messageHandler.send(\"configure\", {\n          verbosity: this.verbosity,\n        });\n      })\n      .catch(reason => {\n        this._readyCapability.reject(\n          new Error(`Setting up fake worker failed: \"${reason.message}\".`)\n        );\n      });\n  }\n\n  /**\n   * Destroys the worker instance.\n   */\n  destroy() {\n    this.destroyed = true;\n    if (this._webWorker) {\n      // We need to terminate only web worker created resource.\n      this._webWorker.terminate();\n      this._webWorker = null;\n    }\n    PDFWorker.#workerPorts?.delete(this._port);\n    this._port = null;\n    if (this._messageHandler) {\n      this._messageHandler.destroy();\n      this._messageHandler = null;\n    }\n  }\n\n  /**\n   * @param {PDFWorkerParameters} params - The worker initialization parameters.\n   */\n  static fromPort(params) {\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      throw new Error(\"Not implemented: fromPort\");\n    }\n    if (!params?.port) {\n      throw new Error(\"PDFWorker.fromPort - invalid method signature.\");\n    }\n    const cachedPort = this.#workerPorts?.get(params.port);\n    if (cachedPort) {\n      if (cachedPort._pendingDestroy) {\n        throw new Error(\n          \"PDFWorker.fromPort - the worker is being destroyed.\\n\" +\n            \"Please remember to await `PDFDocumentLoadingTask.destroy()`-calls.\"\n        );\n      }\n      return cachedPort;\n    }\n    return new PDFWorker(params);\n  }\n\n  /**\n   * The current `workerSrc`, when it exists.\n   * @type {string}\n   */\n  static get workerSrc() {\n    if (GlobalWorkerOptions.workerSrc) {\n      return GlobalWorkerOptions.workerSrc;\n    }\n    if (\n      (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n      PDFWorkerUtil.fallbackWorkerSrc !== null\n    ) {\n      if (!isNodeJS) {\n        deprecated('No \"GlobalWorkerOptions.workerSrc\" specified.');\n      }\n      return PDFWorkerUtil.fallbackWorkerSrc;\n    }\n    throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n  }\n\n  static get _mainThreadWorkerMessageHandler() {\n    try {\n      return globalThis.pdfjsWorker?.WorkerMessageHandler || null;\n    } catch {\n      return null;\n    }\n  }\n\n  // Loads worker code into the main-thread.\n  static get _setupFakeWorkerGlobal() {\n    const loader = async () => {\n      const mainWorkerMessageHandler = this._mainThreadWorkerMessageHandler;\n\n      if (mainWorkerMessageHandler) {\n        // The worker was already loaded using e.g. a `<script>` tag.\n        return mainWorkerMessageHandler;\n      }\n      if (typeof PDFJSDev === \"undefined\") {\n        const worker = await import(\"pdfjs/pdf.worker.js\");\n        return worker.WorkerMessageHandler;\n      }\n      if (\n        PDFJSDev.test(\"GENERIC\") &&\n        isNodeJS &&\n        // eslint-disable-next-line no-undef\n        typeof __non_webpack_require__ === \"function\"\n      ) {\n        // Since bundlers, such as Webpack, cannot be told to leave `require`\n        // statements alone we are thus forced to jump through hoops in order\n        // to prevent `Critical dependency: ...` warnings in third-party\n        // deployments of the built `pdf.js`/`pdf.worker.js` files; see\n        // https://github.com/webpack/webpack/issues/8826\n        //\n        // The following hack is based on the assumption that code running in\n        // Node.js won't ever be affected by e.g. Content Security Policies that\n        // prevent the use of `eval`. If that ever occurs, we should revert this\n        // to a normal `__non_webpack_require__` statement and simply document\n        // the Webpack warnings instead (telling users to ignore them).\n        //\n        // eslint-disable-next-line no-eval\n        const worker = eval(\"require\")(this.workerSrc);\n        return worker.WorkerMessageHandler;\n      }\n      await loadScript(this.workerSrc);\n      return window.pdfjsWorker.WorkerMessageHandler;\n    };\n\n    return shadow(this, \"_setupFakeWorkerGlobal\", loader());\n  }\n}\n\n/**\n * For internal use only.\n * @ignore\n */\nclass WorkerTransport {\n  #methodPromises = new Map();\n\n  #pageCache = new Map();\n\n  #pagePromises = new Map();\n\n  #passwordCapability = null;\n\n  constructor(messageHandler, loadingTask, networkStream, params, factory) {\n    this.messageHandler = messageHandler;\n    this.loadingTask = loadingTask;\n    this.commonObjs = new PDFObjects();\n    this.fontLoader = new FontLoader({\n      ownerDocument: params.ownerDocument,\n      styleElement: params.styleElement,\n    });\n    this._params = params;\n\n    this.canvasFactory = factory.canvasFactory;\n    this.filterFactory = factory.filterFactory;\n    this.cMapReaderFactory = factory.cMapReaderFactory;\n    this.standardFontDataFactory = factory.standardFontDataFactory;\n\n    this.destroyed = false;\n    this.destroyCapability = null;\n\n    this._networkStream = networkStream;\n    this._fullReader = null;\n    this._lastProgress = null;\n    this.downloadInfoCapability = new PromiseCapability();\n\n    this.setupMessageHandler();\n\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      // For testing purposes.\n      Object.defineProperty(this, \"getXFADatasets\", {\n        value: () => {\n          return this.messageHandler.sendWithPromise(\"GetXFADatasets\", null);\n        },\n      });\n      Object.defineProperty(this, \"getXRefPrevValue\", {\n        value: () => {\n          return this.messageHandler.sendWithPromise(\"GetXRefPrevValue\", null);\n        },\n      });\n      Object.defineProperty(this, \"getAnnotArray\", {\n        value: pageIndex => {\n          return this.messageHandler.sendWithPromise(\"GetAnnotArray\", {\n            pageIndex,\n          });\n        },\n      });\n    }\n  }\n\n  #cacheSimpleMethod(name, data = null) {\n    const cachedPromise = this.#methodPromises.get(name);\n    if (cachedPromise) {\n      return cachedPromise;\n    }\n    const promise = this.messageHandler.sendWithPromise(name, data);\n\n    this.#methodPromises.set(name, promise);\n    return promise;\n  }\n\n  get annotationStorage() {\n    return shadow(this, \"annotationStorage\", new AnnotationStorage());\n  }\n\n  getRenderingIntent(\n    intent,\n    annotationMode = AnnotationMode.ENABLE,\n    printAnnotationStorage = null,\n    isOpList = false\n  ) {\n    let renderingIntent = RenderingIntentFlag.DISPLAY; // Default value.\n    let annotationStorageSerializable = SerializableEmpty;\n\n    switch (intent) {\n      case \"any\":\n        renderingIntent = RenderingIntentFlag.ANY;\n        break;\n      case \"display\":\n        break;\n      case \"print\":\n        renderingIntent = RenderingIntentFlag.PRINT;\n        break;\n      default:\n        warn(`getRenderingIntent - invalid intent: ${intent}`);\n    }\n\n    switch (annotationMode) {\n      case AnnotationMode.DISABLE:\n        renderingIntent += RenderingIntentFlag.ANNOTATIONS_DISABLE;\n        break;\n      case AnnotationMode.ENABLE:\n        break;\n      case AnnotationMode.ENABLE_FORMS:\n        renderingIntent += RenderingIntentFlag.ANNOTATIONS_FORMS;\n        break;\n      case AnnotationMode.ENABLE_STORAGE:\n        renderingIntent += RenderingIntentFlag.ANNOTATIONS_STORAGE;\n\n        const annotationStorage =\n          renderingIntent & RenderingIntentFlag.PRINT &&\n          printAnnotationStorage instanceof PrintAnnotationStorage\n            ? printAnnotationStorage\n            : this.annotationStorage;\n\n        annotationStorageSerializable = annotationStorage.serializable;\n        break;\n      default:\n        warn(`getRenderingIntent - invalid annotationMode: ${annotationMode}`);\n    }\n\n    if (isOpList) {\n      renderingIntent += RenderingIntentFlag.OPLIST;\n    }\n\n    return {\n      renderingIntent,\n      cacheKey: `${renderingIntent}_${annotationStorageSerializable.hash}`,\n      annotationStorageSerializable,\n    };\n  }\n\n  destroy() {\n    if (this.destroyCapability) {\n      return this.destroyCapability.promise;\n    }\n\n    this.destroyed = true;\n    this.destroyCapability = new PromiseCapability();\n\n    this.#passwordCapability?.reject(\n      new Error(\"Worker was destroyed during onPassword callback\")\n    );\n\n    const waitOn = [];\n    // We need to wait for all renderings to be completed, e.g.\n    // timeout/rAF can take a long time.\n    for (const page of this.#pageCache.values()) {\n      waitOn.push(page._destroy());\n    }\n    this.#pageCache.clear();\n    this.#pagePromises.clear();\n    // Allow `AnnotationStorage`-related clean-up when destroying the document.\n    if (this.hasOwnProperty(\"annotationStorage\")) {\n      this.annotationStorage.resetModified();\n    }\n    // We also need to wait for the worker to finish its long running tasks.\n    const terminated = this.messageHandler.sendWithPromise(\"Terminate\", null);\n    waitOn.push(terminated);\n\n    Promise.all(waitOn).then(() => {\n      this.commonObjs.clear();\n      this.fontLoader.clear();\n      this.#methodPromises.clear();\n      this.filterFactory.destroy();\n\n      this._networkStream?.cancelAllRequests(\n        new AbortException(\"Worker was terminated.\")\n      );\n\n      if (this.messageHandler) {\n        this.messageHandler.destroy();\n        this.messageHandler = null;\n      }\n      this.destroyCapability.resolve();\n    }, this.destroyCapability.reject);\n    return this.destroyCapability.promise;\n  }\n\n  setupMessageHandler() {\n    const { messageHandler, loadingTask } = this;\n\n    messageHandler.on(\"GetReader\", (data, sink) => {\n      assert(\n        this._networkStream,\n        \"GetReader - no `IPDFStream` instance available.\"\n      );\n      this._fullReader = this._networkStream.getFullReader();\n      this._fullReader.onProgress = evt => {\n        this._lastProgress = {\n          loaded: evt.loaded,\n          total: evt.total,\n        };\n      };\n      sink.onPull = () => {\n        this._fullReader\n          .read()\n          .then(function ({ value, done }) {\n            if (done) {\n              sink.close();\n              return;\n            }\n            assert(\n              value instanceof ArrayBuffer,\n              \"GetReader - expected an ArrayBuffer.\"\n            );\n            // Enqueue data chunk into sink, and transfer it\n            // to other side as `Transferable` object.\n            sink.enqueue(new Uint8Array(value), 1, [value]);\n          })\n          .catch(reason => {\n            sink.error(reason);\n          });\n      };\n\n      sink.onCancel = reason => {\n        this._fullReader.cancel(reason);\n\n        sink.ready.catch(readyReason => {\n          if (this.destroyed) {\n            return; // Ignore any pending requests if the worker was terminated.\n          }\n          throw readyReason;\n        });\n      };\n    });\n\n    messageHandler.on(\"ReaderHeadersReady\", data => {\n      const headersCapability = new PromiseCapability();\n      const fullReader = this._fullReader;\n      fullReader.headersReady.then(() => {\n        // If stream or range are disabled, it's our only way to report\n        // loading progress.\n        if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) {\n          if (this._lastProgress) {\n            loadingTask.onProgress?.(this._lastProgress);\n          }\n          fullReader.onProgress = evt => {\n            loadingTask.onProgress?.({\n              loaded: evt.loaded,\n              total: evt.total,\n            });\n          };\n        }\n\n        headersCapability.resolve({\n          isStreamingSupported: fullReader.isStreamingSupported,\n          isRangeSupported: fullReader.isRangeSupported,\n          contentLength: fullReader.contentLength,\n        });\n      }, headersCapability.reject);\n\n      return headersCapability.promise;\n    });\n\n    messageHandler.on(\"GetRangeReader\", (data, sink) => {\n      assert(\n        this._networkStream,\n        \"GetRangeReader - no `IPDFStream` instance available.\"\n      );\n      const rangeReader = this._networkStream.getRangeReader(\n        data.begin,\n        data.end\n      );\n\n      // When streaming is enabled, it's possible that the data requested here\n      // has already been fetched via the `_fullRequestReader` implementation.\n      // However, given that the PDF data is loaded asynchronously on the\n      // main-thread and then sent via `postMessage` to the worker-thread,\n      // it may not have been available during parsing (hence the attempt to\n      // use range requests here).\n      //\n      // To avoid wasting time and resources here, we'll thus *not* dispatch\n      // range requests if the data was already loaded but has not been sent to\n      // the worker-thread yet (which will happen via the `_fullRequestReader`).\n      if (!rangeReader) {\n        sink.close();\n        return;\n      }\n\n      sink.onPull = () => {\n        rangeReader\n          .read()\n          .then(function ({ value, done }) {\n            if (done) {\n              sink.close();\n              return;\n            }\n            assert(\n              value instanceof ArrayBuffer,\n              \"GetRangeReader - expected an ArrayBuffer.\"\n            );\n            sink.enqueue(new Uint8Array(value), 1, [value]);\n          })\n          .catch(reason => {\n            sink.error(reason);\n          });\n      };\n\n      sink.onCancel = reason => {\n        rangeReader.cancel(reason);\n\n        sink.ready.catch(readyReason => {\n          if (this.destroyed) {\n            return; // Ignore any pending requests if the worker was terminated.\n          }\n          throw readyReason;\n        });\n      };\n    });\n\n    messageHandler.on(\"GetDoc\", ({ pdfInfo }) => {\n      this._numPages = pdfInfo.numPages;\n      this._htmlForXfa = pdfInfo.htmlForXfa;\n      delete pdfInfo.htmlForXfa;\n      loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this));\n    });\n\n    messageHandler.on(\"DocException\", function (ex) {\n      let reason;\n      switch (ex.name) {\n        case \"PasswordException\":\n          reason = new PasswordException(ex.message, ex.code);\n          break;\n        case \"InvalidPDFException\":\n          reason = new InvalidPDFException(ex.message);\n          break;\n        case \"MissingPDFException\":\n          reason = new MissingPDFException(ex.message);\n          break;\n        case \"UnexpectedResponseException\":\n          reason = new UnexpectedResponseException(ex.message, ex.status);\n          break;\n        case \"UnknownErrorException\":\n          reason = new UnknownErrorException(ex.message, ex.details);\n          break;\n        default:\n          unreachable(\"DocException - expected a valid Error.\");\n      }\n      loadingTask._capability.reject(reason);\n    });\n\n    messageHandler.on(\"PasswordRequest\", exception => {\n      this.#passwordCapability = new PromiseCapability();\n\n      if (loadingTask.onPassword) {\n        const updatePassword = password => {\n          if (password instanceof Error) {\n            this.#passwordCapability.reject(password);\n          } else {\n            this.#passwordCapability.resolve({ password });\n          }\n        };\n        try {\n          loadingTask.onPassword(updatePassword, exception.code);\n        } catch (ex) {\n          this.#passwordCapability.reject(ex);\n        }\n      } else {\n        this.#passwordCapability.reject(\n          new PasswordException(exception.message, exception.code)\n        );\n      }\n      return this.#passwordCapability.promise;\n    });\n\n    messageHandler.on(\"DataLoaded\", data => {\n      // For consistency: Ensure that progress is always reported when the\n      // entire PDF file has been loaded, regardless of how it was fetched.\n      loadingTask.onProgress?.({\n        loaded: data.length,\n        total: data.length,\n      });\n\n      this.downloadInfoCapability.resolve(data);\n    });\n\n    messageHandler.on(\"StartRenderPage\", data => {\n      if (this.destroyed) {\n        return; // Ignore any pending requests if the worker was terminated.\n      }\n\n      const page = this.#pageCache.get(data.pageIndex);\n      page._startRenderPage(data.transparency, data.cacheKey);\n    });\n\n    messageHandler.on(\"commonobj\", ([id, type, exportedData]) => {\n      if (this.destroyed) {\n        return; // Ignore any pending requests if the worker was terminated.\n      }\n\n      if (this.commonObjs.has(id)) {\n        return;\n      }\n\n      switch (type) {\n        case \"Font\":\n          const params = this._params;\n\n          if (\"error\" in exportedData) {\n            const exportedError = exportedData.error;\n            warn(`Error during font loading: ${exportedError}`);\n            this.commonObjs.resolve(id, exportedError);\n            break;\n          }\n\n          const inspectFont =\n            params.pdfBug && globalThis.FontInspector?.enabled\n              ? (font, url) => globalThis.FontInspector.fontAdded(font, url)\n              : null;\n          const font = new FontFaceObject(exportedData, {\n            isEvalSupported: params.isEvalSupported,\n            disableFontFace: params.disableFontFace,\n            ignoreErrors: params.ignoreErrors,\n            inspectFont,\n          });\n\n          this.fontLoader\n            .bind(font)\n            .catch(reason => {\n              return messageHandler.sendWithPromise(\"FontFallback\", { id });\n            })\n            .finally(() => {\n              if (!params.fontExtraProperties && font.data) {\n                // Immediately release the `font.data` property once the font\n                // has been attached to the DOM, since it's no longer needed,\n                // rather than waiting for a `PDFDocumentProxy.cleanup` call.\n                // Since `font.data` could be very large, e.g. in some cases\n                // multiple megabytes, this will help reduce memory usage.\n                font.data = null;\n              }\n              this.commonObjs.resolve(id, font);\n            });\n          break;\n        case \"FontPath\":\n        case \"Image\":\n        case \"Pattern\":\n          this.commonObjs.resolve(id, exportedData);\n          break;\n        default:\n          throw new Error(`Got unknown common object type ${type}`);\n      }\n    });\n\n    messageHandler.on(\"obj\", ([id, pageIndex, type, imageData]) => {\n      if (this.destroyed) {\n        // Ignore any pending requests if the worker was terminated.\n        return;\n      }\n\n      const pageProxy = this.#pageCache.get(pageIndex);\n      if (pageProxy.objs.has(id)) {\n        return;\n      }\n\n      switch (type) {\n        case \"Image\":\n          pageProxy.objs.resolve(id, imageData);\n\n          // Heuristic that will allow us not to store large data.\n          if (imageData) {\n            let length;\n            if (imageData.bitmap) {\n              const { width, height } = imageData;\n              length = width * height * 4;\n            } else {\n              length = imageData.data?.length || 0;\n            }\n\n            if (length > MAX_IMAGE_SIZE_TO_CACHE) {\n              pageProxy._maybeCleanupAfterRender = true;\n            }\n          }\n          break;\n        case \"Pattern\":\n          pageProxy.objs.resolve(id, imageData);\n          break;\n        default:\n          throw new Error(`Got unknown object type ${type}`);\n      }\n    });\n\n    messageHandler.on(\"DocProgress\", data => {\n      if (this.destroyed) {\n        return; // Ignore any pending requests if the worker was terminated.\n      }\n      loadingTask.onProgress?.({\n        loaded: data.loaded,\n        total: data.total,\n      });\n    });\n\n    messageHandler.on(\"FetchBuiltInCMap\", data => {\n      if (this.destroyed) {\n        return Promise.reject(new Error(\"Worker was destroyed.\"));\n      }\n      if (!this.cMapReaderFactory) {\n        return Promise.reject(\n          new Error(\n            \"CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.\"\n          )\n        );\n      }\n      return this.cMapReaderFactory.fetch(data);\n    });\n\n    messageHandler.on(\"FetchStandardFontData\", data => {\n      if (this.destroyed) {\n        return Promise.reject(new Error(\"Worker was destroyed.\"));\n      }\n      if (!this.standardFontDataFactory) {\n        return Promise.reject(\n          new Error(\n            \"StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.\"\n          )\n        );\n      }\n      return this.standardFontDataFactory.fetch(data);\n    });\n  }\n\n  getData() {\n    return this.messageHandler.sendWithPromise(\"GetData\", null);\n  }\n\n  saveDocument() {\n    if (this.annotationStorage.size <= 0) {\n      warn(\n        \"saveDocument called while `annotationStorage` is empty, \" +\n          \"please use the getData-method instead.\"\n      );\n    }\n    const { map, transfers } = this.annotationStorage.serializable;\n\n    return this.messageHandler\n      .sendWithPromise(\n        \"SaveDocument\",\n        {\n          isPureXfa: !!this._htmlForXfa,\n          numPages: this._numPages,\n          annotationStorage: map,\n          filename: this._fullReader?.filename ?? null,\n        },\n        transfers\n      )\n      .finally(() => {\n        this.annotationStorage.resetModified();\n      });\n  }\n\n  getPage(pageNumber) {\n    if (\n      !Number.isInteger(pageNumber) ||\n      pageNumber <= 0 ||\n      pageNumber > this._numPages\n    ) {\n      return Promise.reject(new Error(\"Invalid page request.\"));\n    }\n\n    const pageIndex = pageNumber - 1,\n      cachedPromise = this.#pagePromises.get(pageIndex);\n    if (cachedPromise) {\n      return cachedPromise;\n    }\n    const promise = this.messageHandler\n      .sendWithPromise(\"GetPage\", {\n        pageIndex,\n      })\n      .then(pageInfo => {\n        if (this.destroyed) {\n          throw new Error(\"Transport destroyed\");\n        }\n        const page = new PDFPageProxy(\n          pageIndex,\n          pageInfo,\n          this,\n          this._params.pdfBug\n        );\n        this.#pageCache.set(pageIndex, page);\n        return page;\n      });\n    this.#pagePromises.set(pageIndex, promise);\n    return promise;\n  }\n\n  getPageIndex(ref) {\n    if (\n      typeof ref !== \"object\" ||\n      ref === null ||\n      !Number.isInteger(ref.num) ||\n      ref.num < 0 ||\n      !Number.isInteger(ref.gen) ||\n      ref.gen < 0\n    ) {\n      return Promise.reject(new Error(\"Invalid pageIndex request.\"));\n    }\n    return this.messageHandler.sendWithPromise(\"GetPageIndex\", {\n      num: ref.num,\n      gen: ref.gen,\n    });\n  }\n\n  getAnnotations(pageIndex, intent) {\n    return this.messageHandler.sendWithPromise(\"GetAnnotations\", {\n      pageIndex,\n      intent,\n    });\n  }\n\n  getFieldObjects() {\n    return this.#cacheSimpleMethod(\"GetFieldObjects\");\n  }\n\n  hasJSActions() {\n    return this.#cacheSimpleMethod(\"HasJSActions\");\n  }\n\n  getCalculationOrderIds() {\n    return this.messageHandler.sendWithPromise(\"GetCalculationOrderIds\", null);\n  }\n\n  getDestinations() {\n    return this.messageHandler.sendWithPromise(\"GetDestinations\", null);\n  }\n\n  getDestination(id) {\n    if (typeof id !== \"string\") {\n      return Promise.reject(new Error(\"Invalid destination request.\"));\n    }\n    return this.messageHandler.sendWithPromise(\"GetDestination\", {\n      id,\n    });\n  }\n\n  getPageLabels() {\n    return this.messageHandler.sendWithPromise(\"GetPageLabels\", null);\n  }\n\n  getPageLayout() {\n    return this.messageHandler.sendWithPromise(\"GetPageLayout\", null);\n  }\n\n  getPageMode() {\n    return this.messageHandler.sendWithPromise(\"GetPageMode\", null);\n  }\n\n  getViewerPreferences() {\n    return this.messageHandler.sendWithPromise(\"GetViewerPreferences\", null);\n  }\n\n  getOpenAction() {\n    return this.messageHandler.sendWithPromise(\"GetOpenAction\", null);\n  }\n\n  getAttachments() {\n    return this.messageHandler.sendWithPromise(\"GetAttachments\", null);\n  }\n\n  getDocJSActions() {\n    return this.#cacheSimpleMethod(\"GetDocJSActions\");\n  }\n\n  getPageJSActions(pageIndex) {\n    return this.messageHandler.sendWithPromise(\"GetPageJSActions\", {\n      pageIndex,\n    });\n  }\n\n  getStructTree(pageIndex) {\n    return this.messageHandler.sendWithPromise(\"GetStructTree\", {\n      pageIndex,\n    });\n  }\n\n  getOutline() {\n    return this.messageHandler.sendWithPromise(\"GetOutline\", null);\n  }\n\n  getOptionalContentConfig() {\n    return this.messageHandler\n      .sendWithPromise(\"GetOptionalContentConfig\", null)\n      .then(results => {\n        return new OptionalContentConfig(results);\n      });\n  }\n\n  getPermissions() {\n    return this.messageHandler.sendWithPromise(\"GetPermissions\", null);\n  }\n\n  getMetadata() {\n    const name = \"GetMetadata\",\n      cachedPromise = this.#methodPromises.get(name);\n    if (cachedPromise) {\n      return cachedPromise;\n    }\n    const promise = this.messageHandler\n      .sendWithPromise(name, null)\n      .then(results => {\n        return {\n          info: results[0],\n          metadata: results[1] ? new Metadata(results[1]) : null,\n          contentDispositionFilename: this._fullReader?.filename ?? null,\n          contentLength: this._fullReader?.contentLength ?? null,\n        };\n      });\n    this.#methodPromises.set(name, promise);\n    return promise;\n  }\n\n  getMarkInfo() {\n    return this.messageHandler.sendWithPromise(\"GetMarkInfo\", null);\n  }\n\n  async startCleanup(keepLoadedFonts = false) {\n    if (this.destroyed) {\n      return; // No need to manually clean-up when destruction has started.\n    }\n    await this.messageHandler.sendWithPromise(\"Cleanup\", null);\n\n    for (const page of this.#pageCache.values()) {\n      const cleanupSuccessful = page.cleanup();\n\n      if (!cleanupSuccessful) {\n        throw new Error(\n          `startCleanup: Page ${page.pageNumber} is currently rendering.`\n        );\n      }\n    }\n    this.commonObjs.clear();\n    if (!keepLoadedFonts) {\n      this.fontLoader.clear();\n    }\n    this.#methodPromises.clear();\n    this.filterFactory.destroy(/* keepHCM = */ true);\n  }\n\n  get loadingParams() {\n    const { disableAutoFetch, enableXfa } = this._params;\n    return shadow(this, \"loadingParams\", {\n      disableAutoFetch,\n      enableXfa,\n    });\n  }\n}\n\n/**\n * A PDF document and page is built of many objects. E.g. there are objects for\n * fonts, images, rendering code, etc. These objects may get processed inside of\n * a worker. This class implements some basic methods to manage these objects.\n */\nclass PDFObjects {\n  #objs = Object.create(null);\n\n  /**\n   * Ensures there is an object defined for `objId`.\n   *\n   * @param {string} objId\n   * @returns {Object}\n   */\n  #ensureObj(objId) {\n    return (this.#objs[objId] ||= {\n      capability: new PromiseCapability(),\n      data: null,\n    });\n  }\n\n  /**\n   * If called *without* callback, this returns the data of `objId` but the\n   * object needs to be resolved. If it isn't, this method throws.\n   *\n   * If called *with* a callback, the callback is called with the data of the\n   * object once the object is resolved. That means, if you call this method\n   * and the object is already resolved, the callback gets called right away.\n   *\n   * @param {string} objId\n   * @param {function} [callback]\n   * @returns {any}\n   */\n  get(objId, callback = null) {\n    // If there is a callback, then the get can be async and the object is\n    // not required to be resolved right now.\n    if (callback) {\n      const obj = this.#ensureObj(objId);\n      obj.capability.promise.then(() => callback(obj.data));\n      return null;\n    }\n    // If there isn't a callback, the user expects to get the resolved data\n    // directly.\n    const obj = this.#objs[objId];\n    // If there isn't an object yet or the object isn't resolved, then the\n    // data isn't ready yet!\n    if (!obj?.capability.settled) {\n      throw new Error(`Requesting object that isn't resolved yet ${objId}.`);\n    }\n    return obj.data;\n  }\n\n  /**\n   * @param {string} objId\n   * @returns {boolean}\n   */\n  has(objId) {\n    const obj = this.#objs[objId];\n    return obj?.capability.settled || false;\n  }\n\n  /**\n   * Resolves the object `objId` with optional `data`.\n   *\n   * @param {string} objId\n   * @param {any} [data]\n   */\n  resolve(objId, data = null) {\n    const obj = this.#ensureObj(objId);\n    obj.data = data;\n    obj.capability.resolve();\n  }\n\n  clear() {\n    for (const objId in this.#objs) {\n      const { data } = this.#objs[objId];\n      data?.bitmap?.close(); // Release any `ImageBitmap` data.\n    }\n    this.#objs = Object.create(null);\n  }\n}\n\n/**\n * Allows controlling of the rendering tasks.\n */\nclass RenderTask {\n  #internalRenderTask = null;\n\n  constructor(internalRenderTask) {\n    this.#internalRenderTask = internalRenderTask;\n\n    /**\n     * Callback for incremental rendering -- a function that will be called\n     * each time the rendering is paused.  To continue rendering call the\n     * function that is the first argument to the callback.\n     * @type {function}\n     */\n    this.onContinue = null;\n  }\n\n  /**\n   * Promise for rendering task completion.\n   * @type {Promise<void>}\n   */\n  get promise() {\n    return this.#internalRenderTask.capability.promise;\n  }\n\n  /**\n   * Cancels the rendering task. If the task is currently rendering it will\n   * not be cancelled until graphics pauses with a timeout. The promise that\n   * this object extends will be rejected when cancelled.\n   *\n   * @param {number} [extraDelay]\n   */\n  cancel(extraDelay = 0) {\n    this.#internalRenderTask.cancel(/* error = */ null, extraDelay);\n  }\n\n  /**\n   * Whether form fields are rendered separately from the main operatorList.\n   * @type {boolean}\n   */\n  get separateAnnots() {\n    const { separateAnnots } = this.#internalRenderTask.operatorList;\n    if (!separateAnnots) {\n      return false;\n    }\n    const { annotationCanvasMap } = this.#internalRenderTask;\n    return (\n      separateAnnots.form ||\n      (separateAnnots.canvas && annotationCanvasMap?.size > 0)\n    );\n  }\n}\n\n/**\n * For internal use only.\n * @ignore\n */\nclass InternalRenderTask {\n  static #canvasInUse = new WeakSet();\n\n  constructor({\n    callback,\n    params,\n    objs,\n    commonObjs,\n    annotationCanvasMap,\n    operatorList,\n    pageIndex,\n    canvasFactory,\n    filterFactory,\n    useRequestAnimationFrame = false,\n    pdfBug = false,\n    pageColors = null,\n  }) {\n    this.callback = callback;\n    this.params = params;\n    this.objs = objs;\n    this.commonObjs = commonObjs;\n    this.annotationCanvasMap = annotationCanvasMap;\n    this.operatorListIdx = null;\n    this.operatorList = operatorList;\n    this._pageIndex = pageIndex;\n    this.canvasFactory = canvasFactory;\n    this.filterFactory = filterFactory;\n    this._pdfBug = pdfBug;\n    this.pageColors = pageColors;\n\n    this.running = false;\n    this.graphicsReadyCallback = null;\n    this.graphicsReady = false;\n    this._useRequestAnimationFrame =\n      useRequestAnimationFrame === true && typeof window !== \"undefined\";\n    this.cancelled = false;\n    this.capability = new PromiseCapability();\n    this.task = new RenderTask(this);\n    // caching this-bound methods\n    this._cancelBound = this.cancel.bind(this);\n    this._continueBound = this._continue.bind(this);\n    this._scheduleNextBound = this._scheduleNext.bind(this);\n    this._nextBound = this._next.bind(this);\n    this._canvas = params.canvasContext.canvas;\n  }\n\n  get completed() {\n    return this.capability.promise.catch(function () {\n      // Ignoring errors, since we only want to know when rendering is\n      // no longer pending.\n    });\n  }\n\n  initializeGraphics({ transparency = false, optionalContentConfig }) {\n    if (this.cancelled) {\n      return;\n    }\n    if (this._canvas) {\n      if (InternalRenderTask.#canvasInUse.has(this._canvas)) {\n        throw new Error(\n          \"Cannot use the same canvas during multiple render() operations. \" +\n            \"Use different canvas or ensure previous operations were \" +\n            \"cancelled or completed.\"\n        );\n      }\n      InternalRenderTask.#canvasInUse.add(this._canvas);\n    }\n\n    if (this._pdfBug && globalThis.StepperManager?.enabled) {\n      this.stepper = globalThis.StepperManager.create(this._pageIndex);\n      this.stepper.init(this.operatorList);\n      this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();\n    }\n    const { canvasContext, viewport, transform, background } = this.params;\n\n    this.gfx = new CanvasGraphics(\n      canvasContext,\n      this.commonObjs,\n      this.objs,\n      this.canvasFactory,\n      this.filterFactory,\n      { optionalContentConfig },\n      this.annotationCanvasMap,\n      this.pageColors\n    );\n    this.gfx.beginDrawing({\n      transform,\n      viewport,\n      transparency,\n      background,\n    });\n    this.operatorListIdx = 0;\n    this.graphicsReady = true;\n    this.graphicsReadyCallback?.();\n  }\n\n  cancel(error = null, extraDelay = 0) {\n    this.running = false;\n    this.cancelled = true;\n    this.gfx?.endDrawing();\n    InternalRenderTask.#canvasInUse.delete(this._canvas);\n\n    this.callback(\n      error ||\n        new RenderingCancelledException(\n          `Rendering cancelled, page ${this._pageIndex + 1}`,\n          extraDelay\n        )\n    );\n  }\n\n  operatorListChanged() {\n    if (!this.graphicsReady) {\n      this.graphicsReadyCallback ||= this._continueBound;\n      return;\n    }\n    this.stepper?.updateOperatorList(this.operatorList);\n\n    if (this.running) {\n      return;\n    }\n    this._continue();\n  }\n\n  _continue() {\n    this.running = true;\n    if (this.cancelled) {\n      return;\n    }\n    if (this.task.onContinue) {\n      this.task.onContinue(this._scheduleNextBound);\n    } else {\n      this._scheduleNext();\n    }\n  }\n\n  _scheduleNext() {\n    if (this._useRequestAnimationFrame) {\n      window.requestAnimationFrame(() => {\n        this._nextBound().catch(this._cancelBound);\n      });\n    } else {\n      Promise.resolve().then(this._nextBound).catch(this._cancelBound);\n    }\n  }\n\n  async _next() {\n    if (this.cancelled) {\n      return;\n    }\n    this.operatorListIdx = this.gfx.executeOperatorList(\n      this.operatorList,\n      this.operatorListIdx,\n      this._continueBound,\n      this.stepper\n    );\n    if (this.operatorListIdx === this.operatorList.argsArray.length) {\n      this.running = false;\n      if (this.operatorList.lastChunk) {\n        this.gfx.endDrawing();\n        InternalRenderTask.#canvasInUse.delete(this._canvas);\n\n        this.callback();\n      }\n    }\n  }\n}\n\n/** @type {string} */\nconst version =\n  typeof PDFJSDev !== \"undefined\" ? PDFJSDev.eval(\"BUNDLE_VERSION\") : null;\n/** @type {string} */\nconst build =\n  typeof PDFJSDev !== \"undefined\" ? PDFJSDev.eval(\"BUNDLE_BUILD\") : null;\n\nexport {\n  build,\n  DefaultCanvasFactory,\n  DefaultCMapReaderFactory,\n  DefaultFilterFactory,\n  DefaultStandardFontDataFactory,\n  getDocument,\n  LoopbackPort,\n  PDFDataRangeTransport,\n  PDFDocumentLoadingTask,\n  PDFDocumentProxy,\n  PDFPageProxy,\n  PDFWorker,\n  PDFWorkerUtil,\n  RenderTask,\n  SVGGraphics,\n  version,\n};\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { objectFromMap, unreachable } from \"../shared/util.js\";\nimport { AnnotationEditor } from \"./editor/editor.js\";\nimport { MurmurHash3_64 } from \"../shared/murmurhash3.js\";\n\nconst SerializableEmpty = Object.freeze({\n  map: null,\n  hash: \"\",\n  transfers: undefined,\n});\n\n/**\n * Key/value storage for annotation data in forms.\n */\nclass AnnotationStorage {\n  #modified = false;\n\n  #storage = new Map();\n\n  constructor() {\n    // Callbacks to signal when the modification state is set or reset.\n    // This is used by the viewer to only bind on `beforeunload` if forms\n    // are actually edited to prevent doing so unconditionally since that\n    // can have undesirable effects.\n    this.onSetModified = null;\n    this.onResetModified = null;\n    this.onAnnotationEditor = null;\n  }\n\n  /**\n   * Get the value for a given key if it exists, or return the default value.\n   * @param {string} key\n   * @param {Object} defaultValue\n   * @returns {Object}\n   */\n  getValue(key, defaultValue) {\n    const value = this.#storage.get(key);\n    if (value === undefined) {\n      return defaultValue;\n    }\n\n    return Object.assign(defaultValue, value);\n  }\n\n  /**\n   * Get the value for a given key.\n   * @param {string} key\n   * @returns {Object}\n   */\n  getRawValue(key) {\n    return this.#storage.get(key);\n  }\n\n  /**\n   * Remove a value from the storage.\n   * @param {string} key\n   */\n  remove(key) {\n    this.#storage.delete(key);\n\n    if (this.#storage.size === 0) {\n      this.resetModified();\n    }\n\n    if (typeof this.onAnnotationEditor === \"function\") {\n      for (const value of this.#storage.values()) {\n        if (value instanceof AnnotationEditor) {\n          return;\n        }\n      }\n      this.onAnnotationEditor(null);\n    }\n  }\n\n  /**\n   * Set the value for a given key\n   * @param {string} key\n   * @param {Object} value\n   */\n  setValue(key, value) {\n    const obj = this.#storage.get(key);\n    let modified = false;\n    if (obj !== undefined) {\n      for (const [entry, val] of Object.entries(value)) {\n        if (obj[entry] !== val) {\n          modified = true;\n          obj[entry] = val;\n        }\n      }\n    } else {\n      modified = true;\n      this.#storage.set(key, value);\n    }\n    if (modified) {\n      this.#setModified();\n    }\n\n    if (\n      value instanceof AnnotationEditor &&\n      typeof this.onAnnotationEditor === \"function\"\n    ) {\n      this.onAnnotationEditor(value.constructor._type);\n    }\n  }\n\n  /**\n   * Check if the storage contains the given key.\n   * @param {string} key\n   * @returns {boolean}\n   */\n  has(key) {\n    return this.#storage.has(key);\n  }\n\n  /**\n   * @returns {Object | null}\n   */\n  getAll() {\n    return this.#storage.size > 0 ? objectFromMap(this.#storage) : null;\n  }\n\n  /**\n   * @param {Object} obj\n   */\n  setAll(obj) {\n    for (const [key, val] of Object.entries(obj)) {\n      this.setValue(key, val);\n    }\n  }\n\n  get size() {\n    return this.#storage.size;\n  }\n\n  #setModified() {\n    if (!this.#modified) {\n      this.#modified = true;\n      if (typeof this.onSetModified === \"function\") {\n        this.onSetModified();\n      }\n    }\n  }\n\n  resetModified() {\n    if (this.#modified) {\n      this.#modified = false;\n      if (typeof this.onResetModified === \"function\") {\n        this.onResetModified();\n      }\n    }\n  }\n\n  /**\n   * @returns {PrintAnnotationStorage}\n   */\n  get print() {\n    return new PrintAnnotationStorage(this);\n  }\n\n  /**\n   * PLEASE NOTE: Only intended for usage within the API itself.\n   * @ignore\n   */\n  get serializable() {\n    if (this.#storage.size === 0) {\n      return SerializableEmpty;\n    }\n    const map = new Map(),\n      hash = new MurmurHash3_64(),\n      transfers = [];\n    const context = Object.create(null);\n    let hasBitmap = false;\n\n    for (const [key, val] of this.#storage) {\n      const serialized =\n        val instanceof AnnotationEditor\n          ? val.serialize(/* isForCopying = */ false, context)\n          : val;\n      if (serialized) {\n        map.set(key, serialized);\n\n        hash.update(`${key}:${JSON.stringify(serialized)}`);\n        hasBitmap ||= !!serialized.bitmap;\n      }\n    }\n\n    if (hasBitmap) {\n      // We must transfer the bitmap data separately, since it can be changed\n      // during serialization with SVG images.\n      for (const value of map.values()) {\n        if (value.bitmap) {\n          transfers.push(value.bitmap);\n        }\n      }\n    }\n\n    return map.size > 0\n      ? { map, hash: hash.hexdigest(), transfers }\n      : SerializableEmpty;\n  }\n}\n\n/**\n * A special `AnnotationStorage` for use during printing, where the serializable\n * data is *frozen* upon initialization, to prevent scripting from modifying its\n * contents. (Necessary since printing is triggered synchronously in browsers.)\n */\nclass PrintAnnotationStorage extends AnnotationStorage {\n  #serializable;\n\n  constructor(parent) {\n    super();\n    const { map, hash, transfers } = parent.serializable;\n    // Create a *copy* of the data, since Objects are passed by reference in JS.\n    const clone = structuredClone(\n      map,\n      (typeof PDFJSDev === \"undefined\" ||\n        PDFJSDev.test(\"SKIP_BABEL || TESTING\")) &&\n        transfers\n        ? { transfer: transfers }\n        : null\n    );\n    this.#serializable = { map: clone, hash, transfers };\n  }\n\n  /**\n   * @returns {PrintAnnotationStorage}\n   */\n  // eslint-disable-next-line getter-return\n  get print() {\n    unreachable(\"Should not call PrintAnnotationStorage.print\");\n  }\n\n  /**\n   * PLEASE NOTE: Only intended for usage within the API itself.\n   * @ignore\n   */\n  get serializable() {\n    return this.#serializable;\n  }\n}\n\nexport { AnnotationStorage, PrintAnnotationStorage, SerializableEmpty };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./annotation_editor_layer.js\").AnnotationEditorLayer} AnnotationEditorLayer */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./tools.js\").AnnotationEditorUIManager} AnnotationEditorUIManager */\n\nimport { bindEvents, ColorManager } from \"./tools.js\";\nimport { FeatureTest, shadow, unreachable } from \"../../shared/util.js\";\nimport { noContextMenu } from \"../display_utils.js\";\n\n/**\n * @typedef {Object} AnnotationEditorParameters\n * @property {AnnotationEditorUIManager} uiManager - the global manager\n * @property {AnnotationEditorLayer} parent - the layer containing this editor\n * @property {string} id - editor id\n * @property {number} x - x-coordinate\n * @property {number} y - y-coordinate\n */\n\n/**\n * Base class for editors.\n */\nclass AnnotationEditor {\n  #altText = \"\";\n\n  #altTextDecorative = false;\n\n  #altTextButton = null;\n\n  #altTextTooltip = null;\n\n  #altTextTooltipTimeout = null;\n\n  #keepAspectRatio = false;\n\n  #resizersDiv = null;\n\n  #boundFocusin = this.focusin.bind(this);\n\n  #boundFocusout = this.focusout.bind(this);\n\n  #hasBeenClicked = false;\n\n  #isEditing = false;\n\n  #isInEditMode = false;\n\n  _initialOptions = Object.create(null);\n\n  _uiManager = null;\n\n  _focusEventsAllowed = true;\n\n  _l10nPromise = null;\n\n  #isDraggable = false;\n\n  #zIndex = AnnotationEditor._zIndex++;\n\n  static _borderLineWidth = -1;\n\n  static _colorManager = new ColorManager();\n\n  static _zIndex = 1;\n\n  // When one of the dimensions of an editor is smaller than this value, the\n  // button to edit the alt text is visually moved outside of the editor.\n  static SMALL_EDITOR_SIZE = 0;\n\n  /**\n   * @param {AnnotationEditorParameters} parameters\n   */\n  constructor(parameters) {\n    if (this.constructor === AnnotationEditor) {\n      unreachable(\"Cannot initialize AnnotationEditor.\");\n    }\n\n    this.parent = parameters.parent;\n    this.id = parameters.id;\n    this.width = this.height = null;\n    this.pageIndex = parameters.parent.pageIndex;\n    this.name = parameters.name;\n    this.div = null;\n    this._uiManager = parameters.uiManager;\n    this.annotationElementId = null;\n    this._willKeepAspectRatio = false;\n    this._initialOptions.isCentered = parameters.isCentered;\n    this._structTreeParentId = null;\n\n    const {\n      rotation,\n      rawDims: { pageWidth, pageHeight, pageX, pageY },\n    } = this.parent.viewport;\n\n    this.rotation = rotation;\n    this.pageRotation =\n      (360 + rotation - this._uiManager.viewParameters.rotation) % 360;\n    this.pageDimensions = [pageWidth, pageHeight];\n    this.pageTranslation = [pageX, pageY];\n\n    const [width, height] = this.parentDimensions;\n    this.x = parameters.x / width;\n    this.y = parameters.y / height;\n\n    this.isAttachedToDOM = false;\n    this.deleted = false;\n  }\n\n  get editorType() {\n    return Object.getPrototypeOf(this).constructor._type;\n  }\n\n  static get _defaultLineColor() {\n    return shadow(\n      this,\n      \"_defaultLineColor\",\n      this._colorManager.getHexCode(\"CanvasText\")\n    );\n  }\n\n  static deleteAnnotationElement(editor) {\n    const fakeEditor = new FakeEditor({\n      id: editor.parent.getNextId(),\n      parent: editor.parent,\n      uiManager: editor._uiManager,\n    });\n    fakeEditor.annotationElementId = editor.annotationElementId;\n    fakeEditor.deleted = true;\n    fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);\n  }\n\n  /**\n   * Initialize the l10n stuff for this type of editor.\n   * @param {Object} l10n\n   */\n  static initialize(l10n, options = null) {\n    AnnotationEditor._l10nPromise ||= new Map(\n      [\n        \"editor_alt_text_button_label\",\n        \"editor_alt_text_edit_button_label\",\n        \"editor_alt_text_decorative_tooltip\",\n      ].map(str => [str, l10n.get(str)])\n    );\n    if (options?.strings) {\n      for (const str of options.strings) {\n        AnnotationEditor._l10nPromise.set(str, l10n.get(str));\n      }\n    }\n    if (AnnotationEditor._borderLineWidth !== -1) {\n      return;\n    }\n    const style = getComputedStyle(document.documentElement);\n    AnnotationEditor._borderLineWidth =\n      parseFloat(style.getPropertyValue(\"--outline-width\")) || 0;\n  }\n\n  /**\n   * Update the default parameters for this type of editor.\n   * @param {number} _type\n   * @param {*} _value\n   */\n  static updateDefaultParams(_type, _value) {}\n\n  /**\n   * Get the default properties to set in the UI for this type of editor.\n   * @returns {Array}\n   */\n  static get defaultPropertiesToUpdate() {\n    return [];\n  }\n\n  /**\n   * Check if this kind of editor is able to handle the given mime type for\n   * pasting.\n   * @param {string} mime\n   * @returns {boolean}\n   */\n  static isHandlingMimeForPasting(mime) {\n    return false;\n  }\n\n  /**\n   * Extract the data from the clipboard item and delegate the creation of the\n   * editor to the parent.\n   * @param {DataTransferItem} item\n   * @param {AnnotationEditorLayer} parent\n   */\n  static paste(item, parent) {\n    unreachable(\"Not implemented\");\n  }\n\n  /**\n   * Get the properties to update in the UI for this editor.\n   * @returns {Array}\n   */\n  get propertiesToUpdate() {\n    return [];\n  }\n\n  get _isDraggable() {\n    return this.#isDraggable;\n  }\n\n  set _isDraggable(value) {\n    this.#isDraggable = value;\n    this.div?.classList.toggle(\"draggable\", value);\n  }\n\n  center() {\n    const [pageWidth, pageHeight] = this.pageDimensions;\n    switch (this.parentRotation) {\n      case 90:\n        this.x -= (this.height * pageHeight) / (pageWidth * 2);\n        this.y += (this.width * pageWidth) / (pageHeight * 2);\n        break;\n      case 180:\n        this.x += this.width / 2;\n        this.y += this.height / 2;\n        break;\n      case 270:\n        this.x += (this.height * pageHeight) / (pageWidth * 2);\n        this.y -= (this.width * pageWidth) / (pageHeight * 2);\n        break;\n      default:\n        this.x -= this.width / 2;\n        this.y -= this.height / 2;\n        break;\n    }\n    this.fixAndSetPosition();\n  }\n\n  /**\n   * Add some commands into the CommandManager (undo/redo stuff).\n   * @param {Object} params\n   */\n  addCommands(params) {\n    this._uiManager.addCommands(params);\n  }\n\n  get currentLayer() {\n    return this._uiManager.currentLayer;\n  }\n\n  /**\n   * This editor will be behind the others.\n   */\n  setInBackground() {\n    this.div.style.zIndex = 0;\n  }\n\n  /**\n   * This editor will be in the foreground.\n   */\n  setInForeground() {\n    this.div.style.zIndex = this.#zIndex;\n  }\n\n  setParent(parent) {\n    if (parent !== null) {\n      this.pageIndex = parent.pageIndex;\n      this.pageDimensions = parent.pageDimensions;\n    }\n    this.parent = parent;\n  }\n\n  /**\n   * onfocus callback.\n   */\n  focusin(event) {\n    if (!this._focusEventsAllowed) {\n      return;\n    }\n    if (!this.#hasBeenClicked) {\n      this.parent.setSelected(this);\n    } else {\n      this.#hasBeenClicked = false;\n    }\n  }\n\n  /**\n   * onblur callback.\n   * @param {FocusEvent} event\n   */\n  focusout(event) {\n    if (!this._focusEventsAllowed) {\n      return;\n    }\n\n    if (!this.isAttachedToDOM) {\n      return;\n    }\n\n    // In case of focusout, the relatedTarget is the element which\n    // is grabbing the focus.\n    // So if the related target is an element under the div for this\n    // editor, then the editor isn't unactive.\n    const target = event.relatedTarget;\n    if (target?.closest(`#${this.id}`)) {\n      return;\n    }\n\n    event.preventDefault();\n\n    if (!this.parent?.isMultipleSelection) {\n      this.commitOrRemove();\n    }\n  }\n\n  commitOrRemove() {\n    if (this.isEmpty()) {\n      this.remove();\n    } else {\n      this.commit();\n    }\n  }\n\n  /**\n   * Commit the data contained in this editor.\n   */\n  commit() {\n    this.addToAnnotationStorage();\n  }\n\n  addToAnnotationStorage() {\n    this._uiManager.addToAnnotationStorage(this);\n  }\n\n  /**\n   * Set the editor position within its parent.\n   * @param {number} x\n   * @param {number} y\n   * @param {number} tx - x-translation in screen coordinates.\n   * @param {number} ty - y-translation in screen coordinates.\n   */\n  setAt(x, y, tx, ty) {\n    const [width, height] = this.parentDimensions;\n    [tx, ty] = this.screenToPageTranslation(tx, ty);\n\n    this.x = (x + tx) / width;\n    this.y = (y + ty) / height;\n\n    this.fixAndSetPosition();\n  }\n\n  #translate([width, height], x, y) {\n    [x, y] = this.screenToPageTranslation(x, y);\n\n    this.x += x / width;\n    this.y += y / height;\n\n    this.fixAndSetPosition();\n  }\n\n  /**\n   * Translate the editor position within its parent.\n   * @param {number} x - x-translation in screen coordinates.\n   * @param {number} y - y-translation in screen coordinates.\n   */\n  translate(x, y) {\n    this.#translate(this.parentDimensions, x, y);\n  }\n\n  /**\n   * Translate the editor position within its page and adjust the scroll\n   * in order to have the editor in the view.\n   * @param {number} x - x-translation in page coordinates.\n   * @param {number} y - y-translation in page coordinates.\n   */\n  translateInPage(x, y) {\n    this.#translate(this.pageDimensions, x, y);\n    this.div.scrollIntoView({ block: \"nearest\" });\n  }\n\n  drag(tx, ty) {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.x += tx / parentWidth;\n    this.y += ty / parentHeight;\n    if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) {\n      // It's possible to not have a parent: for example, when the user is\n      // dragging all the selected editors but this one on a page which has been\n      // destroyed.\n      // It's why we need to check for it. In such a situation, it isn't really\n      // a problem to not find a new parent: it's something which is related to\n      // what the user is seeing, hence it depends on how pages are layed out.\n\n      // The element will be outside of its parent so change the parent.\n      const { x, y } = this.div.getBoundingClientRect();\n      if (this.parent.findNewParent(this, x, y)) {\n        this.x -= Math.floor(this.x);\n        this.y -= Math.floor(this.y);\n      }\n    }\n\n    // The editor can be moved wherever the user wants, so we don't need to fix\n    // the position: it'll be done when the user will release the mouse button.\n\n    let { x, y } = this;\n    const [bx, by] = this.#getBaseTranslation();\n    x += bx;\n    y += by;\n\n    this.div.style.left = `${(100 * x).toFixed(2)}%`;\n    this.div.style.top = `${(100 * y).toFixed(2)}%`;\n    this.div.scrollIntoView({ block: \"nearest\" });\n  }\n\n  #getBaseTranslation() {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    const { _borderLineWidth } = AnnotationEditor;\n    const x = _borderLineWidth / parentWidth;\n    const y = _borderLineWidth / parentHeight;\n    switch (this.rotation) {\n      case 90:\n        return [-x, y];\n      case 180:\n        return [x, y];\n      case 270:\n        return [x, -y];\n      default:\n        return [-x, -y];\n    }\n  }\n\n  fixAndSetPosition() {\n    const [pageWidth, pageHeight] = this.pageDimensions;\n    let { x, y, width, height } = this;\n    width *= pageWidth;\n    height *= pageHeight;\n    x *= pageWidth;\n    y *= pageHeight;\n\n    switch (this.rotation) {\n      case 0:\n        x = Math.max(0, Math.min(pageWidth - width, x));\n        y = Math.max(0, Math.min(pageHeight - height, y));\n        break;\n      case 90:\n        x = Math.max(0, Math.min(pageWidth - height, x));\n        y = Math.min(pageHeight, Math.max(width, y));\n        break;\n      case 180:\n        x = Math.min(pageWidth, Math.max(width, x));\n        y = Math.min(pageHeight, Math.max(height, y));\n        break;\n      case 270:\n        x = Math.min(pageWidth, Math.max(height, x));\n        y = Math.max(0, Math.min(pageHeight - width, y));\n        break;\n    }\n\n    this.x = x /= pageWidth;\n    this.y = y /= pageHeight;\n\n    const [bx, by] = this.#getBaseTranslation();\n    x += bx;\n    y += by;\n\n    const { style } = this.div;\n    style.left = `${(100 * x).toFixed(2)}%`;\n    style.top = `${(100 * y).toFixed(2)}%`;\n\n    this.moveInDOM();\n  }\n\n  static #rotatePoint(x, y, angle) {\n    switch (angle) {\n      case 90:\n        return [y, -x];\n      case 180:\n        return [-x, -y];\n      case 270:\n        return [-y, x];\n      default:\n        return [x, y];\n    }\n  }\n\n  /**\n   * Convert a screen translation into a page one.\n   * @param {number} x\n   * @param {number} y\n   */\n  screenToPageTranslation(x, y) {\n    return AnnotationEditor.#rotatePoint(x, y, this.parentRotation);\n  }\n\n  /**\n   * Convert a page translation into a screen one.\n   * @param {number} x\n   * @param {number} y\n   */\n  pageTranslationToScreen(x, y) {\n    return AnnotationEditor.#rotatePoint(x, y, 360 - this.parentRotation);\n  }\n\n  #getRotationMatrix(rotation) {\n    switch (rotation) {\n      case 90: {\n        const [pageWidth, pageHeight] = this.pageDimensions;\n        return [0, -pageWidth / pageHeight, pageHeight / pageWidth, 0];\n      }\n      case 180:\n        return [-1, 0, 0, -1];\n      case 270: {\n        const [pageWidth, pageHeight] = this.pageDimensions;\n        return [0, pageWidth / pageHeight, -pageHeight / pageWidth, 0];\n      }\n      default:\n        return [1, 0, 0, 1];\n    }\n  }\n\n  get parentScale() {\n    return this._uiManager.viewParameters.realScale;\n  }\n\n  get parentRotation() {\n    return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;\n  }\n\n  get parentDimensions() {\n    const {\n      parentScale,\n      pageDimensions: [pageWidth, pageHeight],\n    } = this;\n    const scaledWidth = pageWidth * parentScale;\n    const scaledHeight = pageHeight * parentScale;\n    return FeatureTest.isCSSRoundSupported\n      ? [Math.round(scaledWidth), Math.round(scaledHeight)]\n      : [scaledWidth, scaledHeight];\n  }\n\n  /**\n   * Set the dimensions of this editor.\n   * @param {number} width\n   * @param {number} height\n   */\n  setDims(width, height) {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.div.style.width = `${((100 * width) / parentWidth).toFixed(2)}%`;\n    if (!this.#keepAspectRatio) {\n      this.div.style.height = `${((100 * height) / parentHeight).toFixed(2)}%`;\n    }\n    this.#altTextButton?.classList.toggle(\n      \"small\",\n      width < AnnotationEditor.SMALL_EDITOR_SIZE ||\n        height < AnnotationEditor.SMALL_EDITOR_SIZE\n    );\n  }\n\n  fixDims() {\n    const { style } = this.div;\n    const { height, width } = style;\n    const widthPercent = width.endsWith(\"%\");\n    const heightPercent = !this.#keepAspectRatio && height.endsWith(\"%\");\n    if (widthPercent && heightPercent) {\n      return;\n    }\n\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    if (!widthPercent) {\n      style.width = `${((100 * parseFloat(width)) / parentWidth).toFixed(2)}%`;\n    }\n    if (!this.#keepAspectRatio && !heightPercent) {\n      style.height = `${((100 * parseFloat(height)) / parentHeight).toFixed(\n        2\n      )}%`;\n    }\n  }\n\n  /**\n   * Get the translation used to position this editor when it's created.\n   * @returns {Array<number>}\n   */\n  getInitialTranslation() {\n    return [0, 0];\n  }\n\n  #createResizers() {\n    if (this.#resizersDiv) {\n      return;\n    }\n    this.#resizersDiv = document.createElement(\"div\");\n    this.#resizersDiv.classList.add(\"resizers\");\n    const classes = [\"topLeft\", \"topRight\", \"bottomRight\", \"bottomLeft\"];\n    if (!this._willKeepAspectRatio) {\n      classes.push(\"topMiddle\", \"middleRight\", \"bottomMiddle\", \"middleLeft\");\n    }\n    for (const name of classes) {\n      const div = document.createElement(\"div\");\n      this.#resizersDiv.append(div);\n      div.classList.add(\"resizer\", name);\n      div.addEventListener(\n        \"pointerdown\",\n        this.#resizerPointerdown.bind(this, name)\n      );\n      div.addEventListener(\"contextmenu\", noContextMenu);\n    }\n    this.div.prepend(this.#resizersDiv);\n  }\n\n  #resizerPointerdown(name, event) {\n    event.preventDefault();\n    const { isMac } = FeatureTest.platform;\n    if (event.button !== 0 || (event.ctrlKey && isMac)) {\n      return;\n    }\n\n    const boundResizerPointermove = this.#resizerPointermove.bind(this, name);\n    const savedDraggable = this._isDraggable;\n    this._isDraggable = false;\n    const pointerMoveOptions = { passive: true, capture: true };\n    window.addEventListener(\n      \"pointermove\",\n      boundResizerPointermove,\n      pointerMoveOptions\n    );\n    const savedX = this.x;\n    const savedY = this.y;\n    const savedWidth = this.width;\n    const savedHeight = this.height;\n    const savedParentCursor = this.parent.div.style.cursor;\n    const savedCursor = this.div.style.cursor;\n    this.div.style.cursor = this.parent.div.style.cursor =\n      window.getComputedStyle(event.target).cursor;\n\n    const pointerUpCallback = () => {\n      this._isDraggable = savedDraggable;\n      window.removeEventListener(\"pointerup\", pointerUpCallback);\n      window.removeEventListener(\"blur\", pointerUpCallback);\n      window.removeEventListener(\n        \"pointermove\",\n        boundResizerPointermove,\n        pointerMoveOptions\n      );\n      this.parent.div.style.cursor = savedParentCursor;\n      this.div.style.cursor = savedCursor;\n\n      const newX = this.x;\n      const newY = this.y;\n      const newWidth = this.width;\n      const newHeight = this.height;\n      if (\n        newX === savedX &&\n        newY === savedY &&\n        newWidth === savedWidth &&\n        newHeight === savedHeight\n      ) {\n        return;\n      }\n\n      this.addCommands({\n        cmd: () => {\n          this.width = newWidth;\n          this.height = newHeight;\n          this.x = newX;\n          this.y = newY;\n          const [parentWidth, parentHeight] = this.parentDimensions;\n          this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n          this.fixAndSetPosition();\n        },\n        undo: () => {\n          this.width = savedWidth;\n          this.height = savedHeight;\n          this.x = savedX;\n          this.y = savedY;\n          const [parentWidth, parentHeight] = this.parentDimensions;\n          this.setDims(parentWidth * savedWidth, parentHeight * savedHeight);\n          this.fixAndSetPosition();\n        },\n        mustExec: true,\n      });\n    };\n    window.addEventListener(\"pointerup\", pointerUpCallback);\n    // If the user switches to another window (with alt+tab), then we end the\n    // resize session.\n    window.addEventListener(\"blur\", pointerUpCallback);\n  }\n\n  #resizerPointermove(name, event) {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    const savedX = this.x;\n    const savedY = this.y;\n    const savedWidth = this.width;\n    const savedHeight = this.height;\n    const minWidth = AnnotationEditor.MIN_SIZE / parentWidth;\n    const minHeight = AnnotationEditor.MIN_SIZE / parentHeight;\n\n    // 10000 because we multiply by 100 and use toFixed(2) in fixAndSetPosition.\n    // Without rounding, the positions of the corners other than the top left\n    // one can be slightly wrong.\n    const round = x => Math.round(x * 10000) / 10000;\n    const rotationMatrix = this.#getRotationMatrix(this.rotation);\n    const transf = (x, y) => [\n      rotationMatrix[0] * x + rotationMatrix[2] * y,\n      rotationMatrix[1] * x + rotationMatrix[3] * y,\n    ];\n    const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation);\n    const invTransf = (x, y) => [\n      invRotationMatrix[0] * x + invRotationMatrix[2] * y,\n      invRotationMatrix[1] * x + invRotationMatrix[3] * y,\n    ];\n    let getPoint;\n    let getOpposite;\n    let isDiagonal = false;\n    let isHorizontal = false;\n\n    switch (name) {\n      case \"topLeft\":\n        isDiagonal = true;\n        getPoint = (w, h) => [0, 0];\n        getOpposite = (w, h) => [w, h];\n        break;\n      case \"topMiddle\":\n        getPoint = (w, h) => [w / 2, 0];\n        getOpposite = (w, h) => [w / 2, h];\n        break;\n      case \"topRight\":\n        isDiagonal = true;\n        getPoint = (w, h) => [w, 0];\n        getOpposite = (w, h) => [0, h];\n        break;\n      case \"middleRight\":\n        isHorizontal = true;\n        getPoint = (w, h) => [w, h / 2];\n        getOpposite = (w, h) => [0, h / 2];\n        break;\n      case \"bottomRight\":\n        isDiagonal = true;\n        getPoint = (w, h) => [w, h];\n        getOpposite = (w, h) => [0, 0];\n        break;\n      case \"bottomMiddle\":\n        getPoint = (w, h) => [w / 2, h];\n        getOpposite = (w, h) => [w / 2, 0];\n        break;\n      case \"bottomLeft\":\n        isDiagonal = true;\n        getPoint = (w, h) => [0, h];\n        getOpposite = (w, h) => [w, 0];\n        break;\n      case \"middleLeft\":\n        isHorizontal = true;\n        getPoint = (w, h) => [0, h / 2];\n        getOpposite = (w, h) => [w, h / 2];\n        break;\n    }\n\n    const point = getPoint(savedWidth, savedHeight);\n    const oppositePoint = getOpposite(savedWidth, savedHeight);\n    let transfOppositePoint = transf(...oppositePoint);\n    const oppositeX = round(savedX + transfOppositePoint[0]);\n    const oppositeY = round(savedY + transfOppositePoint[1]);\n    let ratioX = 1;\n    let ratioY = 1;\n\n    let [deltaX, deltaY] = this.screenToPageTranslation(\n      event.movementX,\n      event.movementY\n    );\n    [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight);\n\n    if (isDiagonal) {\n      const oldDiag = Math.hypot(savedWidth, savedHeight);\n      ratioX = ratioY = Math.max(\n        Math.min(\n          Math.hypot(\n            oppositePoint[0] - point[0] - deltaX,\n            oppositePoint[1] - point[1] - deltaY\n          ) / oldDiag,\n          // Avoid the editor to be larger than the page.\n          1 / savedWidth,\n          1 / savedHeight\n        ),\n        // Avoid the editor to be smaller than the minimum size.\n        minWidth / savedWidth,\n        minHeight / savedHeight\n      );\n    } else if (isHorizontal) {\n      ratioX =\n        Math.max(\n          minWidth,\n          Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))\n        ) / savedWidth;\n    } else {\n      ratioY =\n        Math.max(\n          minHeight,\n          Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))\n        ) / savedHeight;\n    }\n\n    const newWidth = round(savedWidth * ratioX);\n    const newHeight = round(savedHeight * ratioY);\n    transfOppositePoint = transf(...getOpposite(newWidth, newHeight));\n    const newX = oppositeX - transfOppositePoint[0];\n    const newY = oppositeY - transfOppositePoint[1];\n\n    this.width = newWidth;\n    this.height = newHeight;\n    this.x = newX;\n    this.y = newY;\n\n    this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n    this.fixAndSetPosition();\n  }\n\n  async addAltTextButton() {\n    if (this.#altTextButton) {\n      return;\n    }\n    const altText = (this.#altTextButton = document.createElement(\"button\"));\n    altText.className = \"altText\";\n    const msg = await AnnotationEditor._l10nPromise.get(\n      \"editor_alt_text_button_label\"\n    );\n    altText.textContent = msg;\n    altText.setAttribute(\"aria-label\", msg);\n    altText.tabIndex = \"0\";\n    altText.addEventListener(\"contextmenu\", noContextMenu);\n    altText.addEventListener(\"pointerdown\", event => event.stopPropagation());\n    altText.addEventListener(\n      \"click\",\n      event => {\n        event.preventDefault();\n        this._uiManager.editAltText(this);\n      },\n      { capture: true }\n    );\n    altText.addEventListener(\"keydown\", event => {\n      if (event.target === altText && event.key === \"Enter\") {\n        event.preventDefault();\n        this._uiManager.editAltText(this);\n      }\n    });\n    this.#setAltTextButtonState();\n    this.div.append(altText);\n    if (!AnnotationEditor.SMALL_EDITOR_SIZE) {\n      // We take the width of the alt text button and we add 40% to it to be\n      // sure to have enough space for it.\n      const PERCENT = 40;\n      AnnotationEditor.SMALL_EDITOR_SIZE = Math.min(\n        128,\n        Math.round(altText.getBoundingClientRect().width * (1 + PERCENT / 100))\n      );\n    }\n  }\n\n  async #setAltTextButtonState() {\n    const button = this.#altTextButton;\n    if (!button) {\n      return;\n    }\n    if (!this.#altText && !this.#altTextDecorative) {\n      button.classList.remove(\"done\");\n      this.#altTextTooltip?.remove();\n      return;\n    }\n    AnnotationEditor._l10nPromise\n      .get(\"editor_alt_text_edit_button_label\")\n      .then(msg => {\n        button.setAttribute(\"aria-label\", msg);\n      });\n\n    let tooltip = this.#altTextTooltip;\n    if (!tooltip) {\n      this.#altTextTooltip = tooltip = document.createElement(\"span\");\n      tooltip.className = \"tooltip\";\n      tooltip.setAttribute(\"role\", \"tooltip\");\n      const id = (tooltip.id = `alt-text-tooltip-${this.id}`);\n      button.setAttribute(\"aria-describedby\", id);\n\n      const DELAY_TO_SHOW_TOOLTIP = 100;\n      button.addEventListener(\"mouseenter\", () => {\n        this.#altTextTooltipTimeout = setTimeout(() => {\n          this.#altTextTooltipTimeout = null;\n          this.#altTextTooltip.classList.add(\"show\");\n          this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n            source: this,\n            details: {\n              type: \"editing\",\n              subtype: this.editorType,\n              data: {\n                action: \"alt_text_tooltip\",\n              },\n            },\n          });\n        }, DELAY_TO_SHOW_TOOLTIP);\n      });\n      button.addEventListener(\"mouseleave\", () => {\n        clearTimeout(this.#altTextTooltipTimeout);\n        this.#altTextTooltipTimeout = null;\n        this.#altTextTooltip?.classList.remove(\"show\");\n      });\n    }\n    button.classList.add(\"done\");\n    tooltip.innerText = this.#altTextDecorative\n      ? await AnnotationEditor._l10nPromise.get(\n          \"editor_alt_text_decorative_tooltip\"\n        )\n      : this.#altText;\n\n    if (!tooltip.parentNode) {\n      button.append(tooltip);\n    }\n  }\n\n  getClientDimensions() {\n    return this.div.getBoundingClientRect();\n  }\n\n  get altTextData() {\n    return {\n      altText: this.#altText,\n      decorative: this.#altTextDecorative,\n    };\n  }\n\n  set altTextData({ altText, decorative }) {\n    if (this.#altText === altText && this.#altTextDecorative === decorative) {\n      return;\n    }\n    this.#altText = altText;\n    this.#altTextDecorative = decorative;\n    this.#setAltTextButtonState();\n  }\n\n  /**\n   * Render this editor in a div.\n   * @returns {HTMLDivElement}\n   */\n  render() {\n    this.div = document.createElement(\"div\");\n    this.div.setAttribute(\"data-editor-rotation\", (360 - this.rotation) % 360);\n    this.div.className = this.name;\n    this.div.setAttribute(\"id\", this.id);\n    this.div.setAttribute(\"tabIndex\", 0);\n\n    this.setInForeground();\n\n    this.div.addEventListener(\"focusin\", this.#boundFocusin);\n    this.div.addEventListener(\"focusout\", this.#boundFocusout);\n\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    if (this.parentRotation % 180 !== 0) {\n      this.div.style.maxWidth = `${((100 * parentHeight) / parentWidth).toFixed(\n        2\n      )}%`;\n      this.div.style.maxHeight = `${(\n        (100 * parentWidth) /\n        parentHeight\n      ).toFixed(2)}%`;\n    }\n\n    const [tx, ty] = this.getInitialTranslation();\n    this.translate(tx, ty);\n\n    bindEvents(this, this.div, [\"pointerdown\"]);\n\n    return this.div;\n  }\n\n  /**\n   * Onpointerdown callback.\n   * @param {PointerEvent} event\n   */\n  pointerdown(event) {\n    const { isMac } = FeatureTest.platform;\n    if (event.button !== 0 || (event.ctrlKey && isMac)) {\n      // Avoid to focus this editor because of a non-left click.\n      event.preventDefault();\n      return;\n    }\n\n    this.#hasBeenClicked = true;\n\n    this.#setUpDragSession(event);\n  }\n\n  #setUpDragSession(event) {\n    if (!this._isDraggable) {\n      return;\n    }\n\n    const isSelected = this._uiManager.isSelected(this);\n    this._uiManager.setUpDragSession();\n\n    let pointerMoveOptions, pointerMoveCallback;\n    if (isSelected) {\n      pointerMoveOptions = { passive: true, capture: true };\n      pointerMoveCallback = e => {\n        const [tx, ty] = this.screenToPageTranslation(e.movementX, e.movementY);\n        this._uiManager.dragSelectedEditors(tx, ty);\n      };\n      window.addEventListener(\n        \"pointermove\",\n        pointerMoveCallback,\n        pointerMoveOptions\n      );\n    }\n\n    const pointerUpCallback = () => {\n      window.removeEventListener(\"pointerup\", pointerUpCallback);\n      window.removeEventListener(\"blur\", pointerUpCallback);\n      if (isSelected) {\n        window.removeEventListener(\n          \"pointermove\",\n          pointerMoveCallback,\n          pointerMoveOptions\n        );\n      }\n\n      this.#hasBeenClicked = false;\n      if (!this._uiManager.endDragSession()) {\n        const { isMac } = FeatureTest.platform;\n        if (\n          (event.ctrlKey && !isMac) ||\n          event.shiftKey ||\n          (event.metaKey && isMac)\n        ) {\n          this.parent.toggleSelected(this);\n        } else {\n          this.parent.setSelected(this);\n        }\n      }\n    };\n    window.addEventListener(\"pointerup\", pointerUpCallback);\n    // If the user is using alt+tab during the dragging session, the pointerup\n    // event could be not fired, but a blur event is fired so we can use it in\n    // order to interrupt the dragging session.\n    window.addEventListener(\"blur\", pointerUpCallback);\n  }\n\n  moveInDOM() {\n    this.parent?.moveEditorInDOM(this);\n  }\n\n  _setParentAndPosition(parent, x, y) {\n    parent.changeParent(this);\n    this.x = x;\n    this.y = y;\n    this.fixAndSetPosition();\n  }\n\n  /**\n   * Convert the current rect into a page one.\n   */\n  getRect(tx, ty) {\n    const scale = this.parentScale;\n    const [pageWidth, pageHeight] = this.pageDimensions;\n    const [pageX, pageY] = this.pageTranslation;\n    const shiftX = tx / scale;\n    const shiftY = ty / scale;\n    const x = this.x * pageWidth;\n    const y = this.y * pageHeight;\n    const width = this.width * pageWidth;\n    const height = this.height * pageHeight;\n\n    switch (this.rotation) {\n      case 0:\n        return [\n          x + shiftX + pageX,\n          pageHeight - y - shiftY - height + pageY,\n          x + shiftX + width + pageX,\n          pageHeight - y - shiftY + pageY,\n        ];\n      case 90:\n        return [\n          x + shiftY + pageX,\n          pageHeight - y + shiftX + pageY,\n          x + shiftY + height + pageX,\n          pageHeight - y + shiftX + width + pageY,\n        ];\n      case 180:\n        return [\n          x - shiftX - width + pageX,\n          pageHeight - y + shiftY + pageY,\n          x - shiftX + pageX,\n          pageHeight - y + shiftY + height + pageY,\n        ];\n      case 270:\n        return [\n          x - shiftY - height + pageX,\n          pageHeight - y - shiftX - width + pageY,\n          x - shiftY + pageX,\n          pageHeight - y - shiftX + pageY,\n        ];\n      default:\n        throw new Error(\"Invalid rotation\");\n    }\n  }\n\n  getRectInCurrentCoords(rect, pageHeight) {\n    const [x1, y1, x2, y2] = rect;\n\n    const width = x2 - x1;\n    const height = y2 - y1;\n\n    switch (this.rotation) {\n      case 0:\n        return [x1, pageHeight - y2, width, height];\n      case 90:\n        return [x1, pageHeight - y1, height, width];\n      case 180:\n        return [x2, pageHeight - y1, width, height];\n      case 270:\n        return [x2, pageHeight - y2, height, width];\n      default:\n        throw new Error(\"Invalid rotation\");\n    }\n  }\n\n  /**\n   * Executed once this editor has been rendered.\n   */\n  onceAdded() {}\n\n  /**\n   * Check if the editor contains something.\n   * @returns {boolean}\n   */\n  isEmpty() {\n    return false;\n  }\n\n  /**\n   * Enable edit mode.\n   */\n  enableEditMode() {\n    this.#isInEditMode = true;\n  }\n\n  /**\n   * Disable edit mode.\n   */\n  disableEditMode() {\n    this.#isInEditMode = false;\n  }\n\n  /**\n   * Check if the editor is edited.\n   * @returns {boolean}\n   */\n  isInEditMode() {\n    return this.#isInEditMode;\n  }\n\n  /**\n   * If it returns true, then this editor handle the keyboard\n   * events itself.\n   * @returns {boolean}\n   */\n  shouldGetKeyboardEvents() {\n    return false;\n  }\n\n  /**\n   * Check if this editor needs to be rebuilt or not.\n   * @returns {boolean}\n   */\n  needsToBeRebuilt() {\n    return this.div && !this.isAttachedToDOM;\n  }\n\n  /**\n   * Rebuild the editor in case it has been removed on undo.\n   *\n   * To implement in subclasses.\n   */\n  rebuild() {\n    this.div?.addEventListener(\"focusin\", this.#boundFocusin);\n    this.div?.addEventListener(\"focusout\", this.#boundFocusout);\n  }\n\n  /**\n   * Serialize the editor.\n   * The result of the serialization will be used to construct a\n   * new annotation to add to the pdf document.\n   *\n   * To implement in subclasses.\n   * @param {boolean} isForCopying\n   * @param {Object} [context]\n   */\n  serialize(isForCopying = false, context = null) {\n    unreachable(\"An editor must be serializable\");\n  }\n\n  /**\n   * Deserialize the editor.\n   * The result of the deserialization is a new editor.\n   *\n   * @param {Object} data\n   * @param {AnnotationEditorLayer} parent\n   * @param {AnnotationEditorUIManager} uiManager\n   * @returns {AnnotationEditor}\n   */\n  static deserialize(data, parent, uiManager) {\n    const editor = new this.prototype.constructor({\n      parent,\n      id: parent.getNextId(),\n      uiManager,\n    });\n    editor.rotation = data.rotation;\n\n    const [pageWidth, pageHeight] = editor.pageDimensions;\n    const [x, y, width, height] = editor.getRectInCurrentCoords(\n      data.rect,\n      pageHeight\n    );\n    editor.x = x / pageWidth;\n    editor.y = y / pageHeight;\n    editor.width = width / pageWidth;\n    editor.height = height / pageHeight;\n\n    return editor;\n  }\n\n  /**\n   * Remove this editor.\n   * It's used on ctrl+backspace action.\n   */\n  remove() {\n    this.div.removeEventListener(\"focusin\", this.#boundFocusin);\n    this.div.removeEventListener(\"focusout\", this.#boundFocusout);\n\n    if (!this.isEmpty()) {\n      // The editor is removed but it can be back at some point thanks to\n      // undo/redo so we must commit it before.\n      this.commit();\n    }\n    if (this.parent) {\n      this.parent.remove(this);\n    } else {\n      this._uiManager.removeEditor(this);\n    }\n\n    // The editor is removed so we can remove the alt text button and if it's\n    // restored then it's up to the subclass to add it back.\n    this.#altTextButton?.remove();\n    this.#altTextButton = null;\n    this.#altTextTooltip = null;\n  }\n\n  /**\n   * @returns {boolean} true if this editor can be resized.\n   */\n  get isResizable() {\n    return false;\n  }\n\n  /**\n   * Add the resizers to this editor.\n   */\n  makeResizable() {\n    if (this.isResizable) {\n      this.#createResizers();\n      this.#resizersDiv.classList.remove(\"hidden\");\n    }\n  }\n\n  /**\n   * Select this editor.\n   */\n  select() {\n    this.makeResizable();\n    this.div?.classList.add(\"selectedEditor\");\n  }\n\n  /**\n   * Unselect this editor.\n   */\n  unselect() {\n    this.#resizersDiv?.classList.add(\"hidden\");\n    this.div?.classList.remove(\"selectedEditor\");\n    if (this.div?.contains(document.activeElement)) {\n      // Don't use this.div.blur() because we don't know where the focus will\n      // go.\n      this._uiManager.currentLayer.div.focus();\n    }\n  }\n\n  /**\n   * Update some parameters which have been changed through the UI.\n   * @param {number} type\n   * @param {*} value\n   */\n  updateParams(type, value) {}\n\n  /**\n   * When the user disables the editing mode some editors can change some of\n   * their properties.\n   */\n  disableEditing() {\n    if (this.#altTextButton) {\n      this.#altTextButton.hidden = true;\n    }\n  }\n\n  /**\n   * When the user enables the editing mode some editors can change some of\n   * their properties.\n   */\n  enableEditing() {\n    if (this.#altTextButton) {\n      this.#altTextButton.hidden = false;\n    }\n  }\n\n  /**\n   * The editor is about to be edited.\n   */\n  enterInEditMode() {}\n\n  /**\n   * Get the div which really contains the displayed content.\n   */\n  get contentDiv() {\n    return this.div;\n  }\n\n  /**\n   * If true then the editor is currently edited.\n   * @type {boolean}\n   */\n  get isEditing() {\n    return this.#isEditing;\n  }\n\n  /**\n   * When set to true, it means that this editor is currently edited.\n   * @param {boolean} value\n   */\n  set isEditing(value) {\n    this.#isEditing = value;\n    if (!this.parent) {\n      return;\n    }\n    if (value) {\n      this.parent.setSelected(this);\n      this.parent.setActiveEditor(this);\n    } else {\n      this.parent.setActiveEditor(null);\n    }\n  }\n\n  /**\n   * Set the aspect ratio to use when resizing.\n   * @param {number} width\n   * @param {number} height\n   */\n  setAspectRatio(width, height) {\n    this.#keepAspectRatio = true;\n    const aspectRatio = width / height;\n    const { style } = this.div;\n    style.aspectRatio = aspectRatio;\n    style.height = \"auto\";\n  }\n\n  static get MIN_SIZE() {\n    return 16;\n  }\n}\n\n// This class is used to fake an editor which has been deleted.\nclass FakeEditor extends AnnotationEditor {\n  constructor(params) {\n    super(params);\n    this.annotationElementId = params.annotationElementId;\n    this.deleted = true;\n  }\n\n  serialize() {\n    return {\n      id: this.annotationElementId,\n      deleted: true,\n      pageIndex: this.pageIndex,\n    };\n  }\n}\n\nexport { AnnotationEditor };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./editor.js\").AnnotationEditor} AnnotationEditor */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./annotation_editor_layer.js\").AnnotationEditorLayer} AnnotationEditorLayer */\n\nimport {\n  AnnotationEditorParamsType,\n  AnnotationEditorPrefix,\n  AnnotationEditorType,\n  FeatureTest,\n  getUuid,\n  shadow,\n  Util,\n  warn,\n} from \"../../shared/util.js\";\nimport { getColorValues, getRGB, PixelsPerInch } from \"../display_utils.js\";\n\nfunction bindEvents(obj, element, names) {\n  for (const name of names) {\n    element.addEventListener(name, obj[name].bind(obj));\n  }\n}\n\n/**\n * Convert a number between 0 and 100 into an hex number between 0 and 255.\n * @param {number} opacity\n * @return {string}\n */\nfunction opacityToHex(opacity) {\n  return Math.round(Math.min(255, Math.max(1, 255 * opacity)))\n    .toString(16)\n    .padStart(2, \"0\");\n}\n\n/**\n * Class to create some unique ids for the different editors.\n */\nclass IdManager {\n  #id = 0;\n\n  /**\n   * Get a unique id.\n   * @returns {string}\n   */\n  getId() {\n    return `${AnnotationEditorPrefix}${this.#id++}`;\n  }\n}\n\n/**\n * Class to manage the images used by the editors.\n * The main idea is to try to minimize the memory used by the images.\n * The images are cached and reused when possible\n * We use a refCounter to know when an image is not used anymore but we need to\n * be able to restore an image after a remove+undo, so we keep a file reference\n * or an url one.\n */\nclass ImageManager {\n  #baseId = getUuid();\n\n  #id = 0;\n\n  #cache = null;\n\n  static get _isSVGFittingCanvas() {\n    // By default, Firefox doesn't rescale without preserving the aspect ratio\n    // when drawing an SVG image on a canvas, see https://bugzilla.mozilla.org/1547776.\n    // The \"workaround\" is to append \"svgView(preserveAspectRatio(none))\" to the\n    // url, but according to comment #15, it seems that it leads to unexpected\n    // behavior in Safari.\n    const svg = `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>`;\n    const canvas = new OffscreenCanvas(1, 3);\n    const ctx = canvas.getContext(\"2d\");\n    const image = new Image();\n    image.src = svg;\n    const promise = image.decode().then(() => {\n      ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3);\n      return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0;\n    });\n\n    return shadow(this, \"_isSVGFittingCanvas\", promise);\n  }\n\n  async #get(key, rawData) {\n    this.#cache ||= new Map();\n    let data = this.#cache.get(key);\n    if (data === null) {\n      // We already tried to load the image but it failed.\n      return null;\n    }\n    if (data?.bitmap) {\n      data.refCounter += 1;\n      return data;\n    }\n    try {\n      data ||= {\n        bitmap: null,\n        id: `image_${this.#baseId}_${this.#id++}`,\n        refCounter: 0,\n        isSvg: false,\n      };\n      let image;\n      if (typeof rawData === \"string\") {\n        data.url = rawData;\n\n        const response = await fetch(rawData);\n        if (!response.ok) {\n          throw new Error(response.statusText);\n        }\n        image = await response.blob();\n      } else {\n        image = data.file = rawData;\n      }\n\n      if (image.type === \"image/svg+xml\") {\n        // Unfortunately, createImageBitmap doesn't work with SVG images.\n        // (see https://bugzilla.mozilla.org/1841972).\n        const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas;\n        const fileReader = new FileReader();\n        const imageElement = new Image();\n        const imagePromise = new Promise((resolve, reject) => {\n          imageElement.onload = () => {\n            data.bitmap = imageElement;\n            data.isSvg = true;\n            resolve();\n          };\n          fileReader.onload = async () => {\n            const url = (data.svgUrl = fileReader.result);\n            // We need to set the preserveAspectRatio to none in order to let\n            // the image fits the canvas when resizing.\n            imageElement.src = (await mustRemoveAspectRatioPromise)\n              ? `${url}#svgView(preserveAspectRatio(none))`\n              : url;\n          };\n          imageElement.onerror = fileReader.onerror = reject;\n        });\n        fileReader.readAsDataURL(image);\n        await imagePromise;\n      } else {\n        data.bitmap = await createImageBitmap(image);\n      }\n      data.refCounter = 1;\n    } catch (e) {\n      console.error(e);\n      data = null;\n    }\n    this.#cache.set(key, data);\n    if (data) {\n      this.#cache.set(data.id, data);\n    }\n    return data;\n  }\n\n  async getFromFile(file) {\n    const { lastModified, name, size, type } = file;\n    return this.#get(`${lastModified}_${name}_${size}_${type}`, file);\n  }\n\n  async getFromUrl(url) {\n    return this.#get(url, url);\n  }\n\n  async getFromId(id) {\n    this.#cache ||= new Map();\n    const data = this.#cache.get(id);\n    if (!data) {\n      return null;\n    }\n    if (data.bitmap) {\n      data.refCounter += 1;\n      return data;\n    }\n\n    if (data.file) {\n      return this.getFromFile(data.file);\n    }\n    return this.getFromUrl(data.url);\n  }\n\n  getSvgUrl(id) {\n    const data = this.#cache.get(id);\n    if (!data?.isSvg) {\n      return null;\n    }\n    return data.svgUrl;\n  }\n\n  deleteId(id) {\n    this.#cache ||= new Map();\n    const data = this.#cache.get(id);\n    if (!data) {\n      return;\n    }\n    data.refCounter -= 1;\n    if (data.refCounter !== 0) {\n      return;\n    }\n    data.bitmap = null;\n  }\n\n  // We can use the id only if it belongs this manager.\n  // We must take care of having the right manager because we can copy/paste\n  // some images from other documents, hence it'd be a pity to use an id from an\n  // other manager.\n  isValidId(id) {\n    return id.startsWith(`image_${this.#baseId}_`);\n  }\n}\n\n/**\n * Class to handle undo/redo.\n * Commands are just saved in a buffer.\n * If we hit some memory issues we could likely use a circular buffer.\n * It has to be used as a singleton.\n */\nclass CommandManager {\n  #commands = [];\n\n  #locked = false;\n\n  #maxSize;\n\n  #position = -1;\n\n  constructor(maxSize = 128) {\n    this.#maxSize = maxSize;\n  }\n\n  /**\n   * @typedef {Object} addOptions\n   * @property {function} cmd\n   * @property {function} undo\n   * @property {boolean} mustExec\n   * @property {number} type\n   * @property {boolean} overwriteIfSameType\n   * @property {boolean} keepUndo\n   */\n\n  /**\n   * Add a new couple of commands to be used in case of redo/undo.\n   * @param {addOptions} options\n   */\n  add({\n    cmd,\n    undo,\n    mustExec,\n    type = NaN,\n    overwriteIfSameType = false,\n    keepUndo = false,\n  }) {\n    if (mustExec) {\n      cmd();\n    }\n\n    if (this.#locked) {\n      return;\n    }\n\n    const save = { cmd, undo, type };\n    if (this.#position === -1) {\n      if (this.#commands.length > 0) {\n        // All the commands have been undone and then a new one is added\n        // hence we clear the queue.\n        this.#commands.length = 0;\n      }\n      this.#position = 0;\n      this.#commands.push(save);\n      return;\n    }\n\n    if (overwriteIfSameType && this.#commands[this.#position].type === type) {\n      // For example when we change a color we don't want to\n      // be able to undo all the steps, hence we only want to\n      // keep the last undoable action in this sequence of actions.\n      if (keepUndo) {\n        save.undo = this.#commands[this.#position].undo;\n      }\n      this.#commands[this.#position] = save;\n      return;\n    }\n\n    const next = this.#position + 1;\n    if (next === this.#maxSize) {\n      this.#commands.splice(0, 1);\n    } else {\n      this.#position = next;\n      if (next < this.#commands.length) {\n        this.#commands.splice(next);\n      }\n    }\n\n    this.#commands.push(save);\n  }\n\n  /**\n   * Undo the last command.\n   */\n  undo() {\n    if (this.#position === -1) {\n      // Nothing to undo.\n      return;\n    }\n\n    // Avoid to insert something during the undo execution.\n    this.#locked = true;\n    this.#commands[this.#position].undo();\n    this.#locked = false;\n\n    this.#position -= 1;\n  }\n\n  /**\n   * Redo the last command.\n   */\n  redo() {\n    if (this.#position < this.#commands.length - 1) {\n      this.#position += 1;\n\n      // Avoid to insert something during the redo execution.\n      this.#locked = true;\n      this.#commands[this.#position].cmd();\n      this.#locked = false;\n    }\n  }\n\n  /**\n   * Check if there is something to undo.\n   * @returns {boolean}\n   */\n  hasSomethingToUndo() {\n    return this.#position !== -1;\n  }\n\n  /**\n   * Check if there is something to redo.\n   * @returns {boolean}\n   */\n  hasSomethingToRedo() {\n    return this.#position < this.#commands.length - 1;\n  }\n\n  destroy() {\n    this.#commands = null;\n  }\n}\n\n/**\n * Class to handle the different keyboards shortcuts we can have on mac or\n * non-mac OSes.\n */\nclass KeyboardManager {\n  /**\n   * Create a new keyboard manager class.\n   * @param {Array<Array>} callbacks - an array containing an array of shortcuts\n   * and a callback to call.\n   * A shortcut is a string like `ctrl+c` or `mac+ctrl+c` for mac OS.\n   */\n  constructor(callbacks) {\n    this.buffer = [];\n    this.callbacks = new Map();\n    this.allKeys = new Set();\n\n    const { isMac } = FeatureTest.platform;\n    for (const [keys, callback, options = {}] of callbacks) {\n      for (const key of keys) {\n        const isMacKey = key.startsWith(\"mac+\");\n        if (isMac && isMacKey) {\n          this.callbacks.set(key.slice(4), { callback, options });\n          this.allKeys.add(key.split(\"+\").at(-1));\n        } else if (!isMac && !isMacKey) {\n          this.callbacks.set(key, { callback, options });\n          this.allKeys.add(key.split(\"+\").at(-1));\n        }\n      }\n    }\n  }\n\n  /**\n   * Serialize an event into a string in order to match a\n   * potential key for a callback.\n   * @param {KeyboardEvent} event\n   * @returns {string}\n   */\n  #serialize(event) {\n    if (event.altKey) {\n      this.buffer.push(\"alt\");\n    }\n    if (event.ctrlKey) {\n      this.buffer.push(\"ctrl\");\n    }\n    if (event.metaKey) {\n      this.buffer.push(\"meta\");\n    }\n    if (event.shiftKey) {\n      this.buffer.push(\"shift\");\n    }\n    this.buffer.push(event.key);\n    const str = this.buffer.join(\"+\");\n    this.buffer.length = 0;\n\n    return str;\n  }\n\n  /**\n   * Execute a callback, if any, for a given keyboard event.\n   * The self is used as `this` in the callback.\n   * @param {Object} self\n   * @param {KeyboardEvent} event\n   * @returns\n   */\n  exec(self, event) {\n    if (!this.allKeys.has(event.key)) {\n      return;\n    }\n    const info = this.callbacks.get(this.#serialize(event));\n    if (!info) {\n      return;\n    }\n    const {\n      callback,\n      options: { bubbles = false, args = [], checker = null },\n    } = info;\n\n    if (checker && !checker(self, event)) {\n      return;\n    }\n    callback.bind(self, ...args)();\n\n    // For example, ctrl+s in a FreeText must be handled by the viewer, hence\n    // the event must bubble.\n    if (!bubbles) {\n      event.stopPropagation();\n      event.preventDefault();\n    }\n  }\n}\n\nclass ColorManager {\n  static _colorsMapping = new Map([\n    [\"CanvasText\", [0, 0, 0]],\n    [\"Canvas\", [255, 255, 255]],\n  ]);\n\n  get _colors() {\n    if (\n      typeof PDFJSDev !== \"undefined\" &&\n      PDFJSDev.test(\"LIB\") &&\n      typeof document === \"undefined\"\n    ) {\n      return shadow(this, \"_colors\", ColorManager._colorsMapping);\n    }\n\n    const colors = new Map([\n      [\"CanvasText\", null],\n      [\"Canvas\", null],\n    ]);\n    getColorValues(colors);\n    return shadow(this, \"_colors\", colors);\n  }\n\n  /**\n   * In High Contrast Mode, the color on the screen is not always the\n   * real color used in the pdf.\n   * For example in some cases white can appear to be black but when saving\n   * we want to have white.\n   * @param {string} color\n   * @returns {Array<number>}\n   */\n  convert(color) {\n    const rgb = getRGB(color);\n    if (!window.matchMedia(\"(forced-colors: active)\").matches) {\n      return rgb;\n    }\n\n    for (const [name, RGB] of this._colors) {\n      if (RGB.every((x, i) => x === rgb[i])) {\n        return ColorManager._colorsMapping.get(name);\n      }\n    }\n    return rgb;\n  }\n\n  /**\n   * An input element must have its color value as a hex string\n   * and not as color name.\n   * So this function converts a name into an hex string.\n   * @param {string} name\n   * @returns {string}\n   */\n  getHexCode(name) {\n    const rgb = this._colors.get(name);\n    if (!rgb) {\n      return name;\n    }\n    return Util.makeHexColor(...rgb);\n  }\n}\n\n/**\n * A pdf has several pages and each of them when it will rendered\n * will have an AnnotationEditorLayer which will contain the some\n * new Annotations associated to an editor in order to modify them.\n *\n * This class is used to manage all the different layers, editors and\n * some action like copy/paste, undo/redo, ...\n */\nclass AnnotationEditorUIManager {\n  #activeEditor = null;\n\n  #allEditors = new Map();\n\n  #allLayers = new Map();\n\n  #altTextManager = null;\n\n  #annotationStorage = null;\n\n  #commandManager = new CommandManager();\n\n  #currentPageIndex = 0;\n\n  #deletedAnnotationsElementIds = new Set();\n\n  #draggingEditors = null;\n\n  #editorTypes = null;\n\n  #editorsToRescale = new Set();\n\n  #filterFactory = null;\n\n  #idManager = new IdManager();\n\n  #isEnabled = false;\n\n  #isWaiting = false;\n\n  #lastActiveElement = null;\n\n  #mode = AnnotationEditorType.NONE;\n\n  #selectedEditors = new Set();\n\n  #pageColors = null;\n\n  #boundBlur = this.blur.bind(this);\n\n  #boundFocus = this.focus.bind(this);\n\n  #boundCopy = this.copy.bind(this);\n\n  #boundCut = this.cut.bind(this);\n\n  #boundPaste = this.paste.bind(this);\n\n  #boundKeydown = this.keydown.bind(this);\n\n  #boundOnEditingAction = this.onEditingAction.bind(this);\n\n  #boundOnPageChanging = this.onPageChanging.bind(this);\n\n  #boundOnScaleChanging = this.onScaleChanging.bind(this);\n\n  #boundOnRotationChanging = this.onRotationChanging.bind(this);\n\n  #previousStates = {\n    isEditing: false,\n    isEmpty: true,\n    hasSomethingToUndo: false,\n    hasSomethingToRedo: false,\n    hasSelectedEditor: false,\n  };\n\n  #translation = [0, 0];\n\n  #translationTimeoutId = null;\n\n  #container = null;\n\n  #viewer = null;\n\n  static TRANSLATE_SMALL = 1; // page units.\n\n  static TRANSLATE_BIG = 10; // page units.\n\n  static get _keyboardManager() {\n    const proto = AnnotationEditorUIManager.prototype;\n\n    const arrowChecker = self => {\n      // If the focused element is an input, we don't want to handle the arrow.\n      // For example, sliders can be controlled with the arrow keys.\n      const { activeElement } = document;\n      return (\n        activeElement &&\n        self.#container.contains(activeElement) &&\n        self.hasSomethingToControl()\n      );\n    };\n\n    const small = this.TRANSLATE_SMALL;\n    const big = this.TRANSLATE_BIG;\n\n    return shadow(\n      this,\n      \"_keyboardManager\",\n      new KeyboardManager([\n        [[\"ctrl+a\", \"mac+meta+a\"], proto.selectAll],\n        [[\"ctrl+z\", \"mac+meta+z\"], proto.undo],\n        [\n          // On mac, depending of the OS version, the event.key is either \"z\" or\n          // \"Z\" when the user presses \"meta+shift+z\".\n          [\n            \"ctrl+y\",\n            \"ctrl+shift+z\",\n            \"mac+meta+shift+z\",\n            \"ctrl+shift+Z\",\n            \"mac+meta+shift+Z\",\n          ],\n          proto.redo,\n        ],\n        [\n          [\n            \"Backspace\",\n            \"alt+Backspace\",\n            \"ctrl+Backspace\",\n            \"shift+Backspace\",\n            \"mac+Backspace\",\n            \"mac+alt+Backspace\",\n            \"mac+ctrl+Backspace\",\n            \"Delete\",\n            \"ctrl+Delete\",\n            \"shift+Delete\",\n            \"mac+Delete\",\n          ],\n          proto.delete,\n        ],\n        [[\"Escape\", \"mac+Escape\"], proto.unselectAll],\n        [\n          [\"ArrowLeft\", \"mac+ArrowLeft\"],\n          proto.translateSelectedEditors,\n          { args: [-small, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"],\n          proto.translateSelectedEditors,\n          { args: [-big, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ArrowRight\", \"mac+ArrowRight\"],\n          proto.translateSelectedEditors,\n          { args: [small, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"],\n          proto.translateSelectedEditors,\n          { args: [big, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ArrowUp\", \"mac+ArrowUp\"],\n          proto.translateSelectedEditors,\n          { args: [0, -small], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"],\n          proto.translateSelectedEditors,\n          { args: [0, -big], checker: arrowChecker },\n        ],\n        [\n          [\"ArrowDown\", \"mac+ArrowDown\"],\n          proto.translateSelectedEditors,\n          { args: [0, small], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"],\n          proto.translateSelectedEditors,\n          { args: [0, big], checker: arrowChecker },\n        ],\n      ])\n    );\n  }\n\n  constructor(\n    container,\n    viewer,\n    altTextManager,\n    eventBus,\n    pdfDocument,\n    pageColors\n  ) {\n    this.#container = container;\n    this.#viewer = viewer;\n    this.#altTextManager = altTextManager;\n    this._eventBus = eventBus;\n    this._eventBus._on(\"editingaction\", this.#boundOnEditingAction);\n    this._eventBus._on(\"pagechanging\", this.#boundOnPageChanging);\n    this._eventBus._on(\"scalechanging\", this.#boundOnScaleChanging);\n    this._eventBus._on(\"rotationchanging\", this.#boundOnRotationChanging);\n    this.#annotationStorage = pdfDocument.annotationStorage;\n    this.#filterFactory = pdfDocument.filterFactory;\n    this.#pageColors = pageColors;\n    this.viewParameters = {\n      realScale: PixelsPerInch.PDF_TO_CSS_UNITS,\n      rotation: 0,\n    };\n  }\n\n  destroy() {\n    this.#removeKeyboardManager();\n    this.#removeFocusManager();\n    this._eventBus._off(\"editingaction\", this.#boundOnEditingAction);\n    this._eventBus._off(\"pagechanging\", this.#boundOnPageChanging);\n    this._eventBus._off(\"scalechanging\", this.#boundOnScaleChanging);\n    this._eventBus._off(\"rotationchanging\", this.#boundOnRotationChanging);\n    for (const layer of this.#allLayers.values()) {\n      layer.destroy();\n    }\n    this.#allLayers.clear();\n    this.#allEditors.clear();\n    this.#editorsToRescale.clear();\n    this.#activeEditor = null;\n    this.#selectedEditors.clear();\n    this.#commandManager.destroy();\n    this.#altTextManager.destroy();\n  }\n\n  get hcmFilter() {\n    return shadow(\n      this,\n      \"hcmFilter\",\n      this.#pageColors\n        ? this.#filterFactory.addHCMFilter(\n            this.#pageColors.foreground,\n            this.#pageColors.background\n          )\n        : \"none\"\n    );\n  }\n\n  get direction() {\n    return shadow(\n      this,\n      \"direction\",\n      getComputedStyle(this.#container).direction\n    );\n  }\n\n  editAltText(editor) {\n    this.#altTextManager?.editAltText(this, editor);\n  }\n\n  onPageChanging({ pageNumber }) {\n    this.#currentPageIndex = pageNumber - 1;\n  }\n\n  focusMainContainer() {\n    this.#container.focus();\n  }\n\n  findParent(x, y) {\n    for (const layer of this.#allLayers.values()) {\n      const {\n        x: layerX,\n        y: layerY,\n        width,\n        height,\n      } = layer.div.getBoundingClientRect();\n      if (\n        x >= layerX &&\n        x <= layerX + width &&\n        y >= layerY &&\n        y <= layerY + height\n      ) {\n        return layer;\n      }\n    }\n    return null;\n  }\n\n  disableUserSelect(value = false) {\n    this.#viewer.classList.toggle(\"noUserSelect\", value);\n  }\n\n  addShouldRescale(editor) {\n    this.#editorsToRescale.add(editor);\n  }\n\n  removeShouldRescale(editor) {\n    this.#editorsToRescale.delete(editor);\n  }\n\n  onScaleChanging({ scale }) {\n    this.commitOrRemove();\n    this.viewParameters.realScale = scale * PixelsPerInch.PDF_TO_CSS_UNITS;\n    for (const editor of this.#editorsToRescale) {\n      editor.onScaleChanging();\n    }\n  }\n\n  onRotationChanging({ pagesRotation }) {\n    this.commitOrRemove();\n    this.viewParameters.rotation = pagesRotation;\n  }\n\n  /**\n   * Add an editor in the annotation storage.\n   * @param {AnnotationEditor} editor\n   */\n  addToAnnotationStorage(editor) {\n    if (\n      !editor.isEmpty() &&\n      this.#annotationStorage &&\n      !this.#annotationStorage.has(editor.id)\n    ) {\n      this.#annotationStorage.setValue(editor.id, editor);\n    }\n  }\n\n  #addFocusManager() {\n    window.addEventListener(\"focus\", this.#boundFocus);\n    window.addEventListener(\"blur\", this.#boundBlur);\n  }\n\n  #removeFocusManager() {\n    window.removeEventListener(\"focus\", this.#boundFocus);\n    window.removeEventListener(\"blur\", this.#boundBlur);\n  }\n\n  blur() {\n    if (!this.hasSelection) {\n      return;\n    }\n    // When several editors are selected and the window loses focus, we want to\n    // keep the last active element in order to be able to focus it again when\n    // the window gets the focus back but we don't want to trigger any focus\n    // callbacks else only one editor will be selected.\n    const { activeElement } = document;\n    for (const editor of this.#selectedEditors) {\n      if (editor.div.contains(activeElement)) {\n        this.#lastActiveElement = [editor, activeElement];\n        editor._focusEventsAllowed = false;\n        break;\n      }\n    }\n  }\n\n  focus() {\n    if (!this.#lastActiveElement) {\n      return;\n    }\n    const [lastEditor, lastActiveElement] = this.#lastActiveElement;\n    this.#lastActiveElement = null;\n    lastActiveElement.addEventListener(\n      \"focusin\",\n      () => {\n        lastEditor._focusEventsAllowed = true;\n      },\n      { once: true }\n    );\n    lastActiveElement.focus();\n  }\n\n  #addKeyboardManager() {\n    // The keyboard events are caught at the container level in order to be able\n    // to execute some callbacks even if the current page doesn't have focus.\n    window.addEventListener(\"keydown\", this.#boundKeydown, { capture: true });\n  }\n\n  #removeKeyboardManager() {\n    window.removeEventListener(\"keydown\", this.#boundKeydown, {\n      capture: true,\n    });\n  }\n\n  #addCopyPasteListeners() {\n    document.addEventListener(\"copy\", this.#boundCopy);\n    document.addEventListener(\"cut\", this.#boundCut);\n    document.addEventListener(\"paste\", this.#boundPaste);\n  }\n\n  #removeCopyPasteListeners() {\n    document.removeEventListener(\"copy\", this.#boundCopy);\n    document.removeEventListener(\"cut\", this.#boundCut);\n    document.removeEventListener(\"paste\", this.#boundPaste);\n  }\n\n  addEditListeners() {\n    this.#addKeyboardManager();\n    this.#addCopyPasteListeners();\n  }\n\n  removeEditListeners() {\n    this.#removeKeyboardManager();\n    this.#removeCopyPasteListeners();\n  }\n\n  /**\n   * Copy callback.\n   * @param {ClipboardEvent} event\n   */\n  copy(event) {\n    event.preventDefault();\n\n    // An editor is being edited so just commit it.\n    this.#activeEditor?.commitOrRemove();\n\n    if (!this.hasSelection) {\n      return;\n    }\n\n    const editors = [];\n    for (const editor of this.#selectedEditors) {\n      const serialized = editor.serialize(/* isForCopying = */ true);\n      if (serialized) {\n        editors.push(serialized);\n      }\n    }\n    if (editors.length === 0) {\n      return;\n    }\n\n    event.clipboardData.setData(\"application/pdfjs\", JSON.stringify(editors));\n  }\n\n  /**\n   * Cut callback.\n   * @param {ClipboardEvent} event\n   */\n  cut(event) {\n    this.copy(event);\n    this.delete();\n  }\n\n  /**\n   * Paste callback.\n   * @param {ClipboardEvent} event\n   */\n  paste(event) {\n    event.preventDefault();\n    const { clipboardData } = event;\n    for (const item of clipboardData.items) {\n      for (const editorType of this.#editorTypes) {\n        if (editorType.isHandlingMimeForPasting(item.type)) {\n          editorType.paste(item, this.currentLayer);\n          return;\n        }\n      }\n    }\n\n    let data = clipboardData.getData(\"application/pdfjs\");\n    if (!data) {\n      return;\n    }\n\n    try {\n      data = JSON.parse(data);\n    } catch (ex) {\n      warn(`paste: \"${ex.message}\".`);\n      return;\n    }\n\n    if (!Array.isArray(data)) {\n      return;\n    }\n\n    this.unselectAll();\n    const layer = this.currentLayer;\n\n    try {\n      const newEditors = [];\n      for (const editor of data) {\n        const deserializedEditor = layer.deserialize(editor);\n        if (!deserializedEditor) {\n          return;\n        }\n        newEditors.push(deserializedEditor);\n      }\n\n      const cmd = () => {\n        for (const editor of newEditors) {\n          this.#addEditorToLayer(editor);\n        }\n        this.#selectEditors(newEditors);\n      };\n      const undo = () => {\n        for (const editor of newEditors) {\n          editor.remove();\n        }\n      };\n      this.addCommands({ cmd, undo, mustExec: true });\n    } catch (ex) {\n      warn(`paste: \"${ex.message}\".`);\n    }\n  }\n\n  /**\n   * Keydown callback.\n   * @param {KeyboardEvent} event\n   */\n  keydown(event) {\n    if (!this.getActive()?.shouldGetKeyboardEvents()) {\n      AnnotationEditorUIManager._keyboardManager.exec(this, event);\n    }\n  }\n\n  /**\n   * Execute an action for a given name.\n   * For example, the user can click on the \"Undo\" entry in the context menu\n   * and it'll trigger the undo action.\n   * @param {Object} details\n   */\n  onEditingAction(details) {\n    if ([\"undo\", \"redo\", \"delete\", \"selectAll\"].includes(details.name)) {\n      this[details.name]();\n    }\n  }\n\n  /**\n   * Update the different possible states of this manager, e.g. is there\n   * something to undo, redo, ...\n   * @param {Object} details\n   */\n  #dispatchUpdateStates(details) {\n    const hasChanged = Object.entries(details).some(\n      ([key, value]) => this.#previousStates[key] !== value\n    );\n\n    if (hasChanged) {\n      this._eventBus.dispatch(\"annotationeditorstateschanged\", {\n        source: this,\n        details: Object.assign(this.#previousStates, details),\n      });\n    }\n  }\n\n  #dispatchUpdateUI(details) {\n    this._eventBus.dispatch(\"annotationeditorparamschanged\", {\n      source: this,\n      details,\n    });\n  }\n\n  /**\n   * Set the editing state.\n   * It can be useful to temporarily disable it when the user is editing a\n   * FreeText annotation.\n   * @param {boolean} isEditing\n   */\n  setEditingState(isEditing) {\n    if (isEditing) {\n      this.#addFocusManager();\n      this.#addKeyboardManager();\n      this.#addCopyPasteListeners();\n      this.#dispatchUpdateStates({\n        isEditing: this.#mode !== AnnotationEditorType.NONE,\n        isEmpty: this.#isEmpty(),\n        hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n        hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n        hasSelectedEditor: false,\n      });\n    } else {\n      this.#removeFocusManager();\n      this.#removeKeyboardManager();\n      this.#removeCopyPasteListeners();\n      this.#dispatchUpdateStates({\n        isEditing: false,\n      });\n      this.disableUserSelect(false);\n    }\n  }\n\n  registerEditorTypes(types) {\n    if (this.#editorTypes) {\n      return;\n    }\n    this.#editorTypes = types;\n    for (const editorType of this.#editorTypes) {\n      this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);\n    }\n  }\n\n  /**\n   * Get an id.\n   * @returns {string}\n   */\n  getId() {\n    return this.#idManager.getId();\n  }\n\n  get currentLayer() {\n    return this.#allLayers.get(this.#currentPageIndex);\n  }\n\n  getLayer(pageIndex) {\n    return this.#allLayers.get(pageIndex);\n  }\n\n  get currentPageIndex() {\n    return this.#currentPageIndex;\n  }\n\n  /**\n   * Add a new layer for a page which will contains the editors.\n   * @param {AnnotationEditorLayer} layer\n   */\n  addLayer(layer) {\n    this.#allLayers.set(layer.pageIndex, layer);\n    if (this.#isEnabled) {\n      layer.enable();\n    } else {\n      layer.disable();\n    }\n  }\n\n  /**\n   * Remove a layer.\n   * @param {AnnotationEditorLayer} layer\n   */\n  removeLayer(layer) {\n    this.#allLayers.delete(layer.pageIndex);\n  }\n\n  /**\n   * Change the editor mode (None, FreeText, Ink, ...)\n   * @param {number} mode\n   * @param {string|null} editId\n   */\n  updateMode(mode, editId = null) {\n    if (this.#mode === mode) {\n      return;\n    }\n    this.#mode = mode;\n    if (mode === AnnotationEditorType.NONE) {\n      this.setEditingState(false);\n      this.#disableAll();\n      return;\n    }\n    this.setEditingState(true);\n    this.#enableAll();\n    this.unselectAll();\n    for (const layer of this.#allLayers.values()) {\n      layer.updateMode(mode);\n    }\n    if (!editId) {\n      return;\n    }\n    for (const editor of this.#allEditors.values()) {\n      if (editor.annotationElementId === editId) {\n        this.setSelected(editor);\n        editor.enterInEditMode();\n        break;\n      }\n    }\n  }\n\n  /**\n   * Update the toolbar if it's required to reflect the tool currently used.\n   * @param {number} mode\n   * @returns {undefined}\n   */\n  updateToolbar(mode) {\n    if (mode === this.#mode) {\n      return;\n    }\n    this._eventBus.dispatch(\"switchannotationeditormode\", {\n      source: this,\n      mode,\n    });\n  }\n\n  /**\n   * Update a parameter in the current editor or globally.\n   * @param {number} type\n   * @param {*} value\n   */\n  updateParams(type, value) {\n    if (!this.#editorTypes) {\n      return;\n    }\n    if (type === AnnotationEditorParamsType.CREATE) {\n      this.currentLayer.addNewEditor(type);\n      return;\n    }\n\n    for (const editor of this.#selectedEditors) {\n      editor.updateParams(type, value);\n    }\n\n    for (const editorType of this.#editorTypes) {\n      editorType.updateDefaultParams(type, value);\n    }\n  }\n\n  enableWaiting(mustWait = false) {\n    if (this.#isWaiting === mustWait) {\n      return;\n    }\n    this.#isWaiting = mustWait;\n    for (const layer of this.#allLayers.values()) {\n      if (mustWait) {\n        layer.disableClick();\n      } else {\n        layer.enableClick();\n      }\n      layer.div.classList.toggle(\"waiting\", mustWait);\n    }\n  }\n\n  /**\n   * Enable all the layers.\n   */\n  #enableAll() {\n    if (!this.#isEnabled) {\n      this.#isEnabled = true;\n      for (const layer of this.#allLayers.values()) {\n        layer.enable();\n      }\n    }\n  }\n\n  /**\n   * Disable all the layers.\n   */\n  #disableAll() {\n    this.unselectAll();\n    if (this.#isEnabled) {\n      this.#isEnabled = false;\n      for (const layer of this.#allLayers.values()) {\n        layer.disable();\n      }\n    }\n  }\n\n  /**\n   * Get all the editors belonging to a given page.\n   * @param {number} pageIndex\n   * @returns {Array<AnnotationEditor>}\n   */\n  getEditors(pageIndex) {\n    const editors = [];\n    for (const editor of this.#allEditors.values()) {\n      if (editor.pageIndex === pageIndex) {\n        editors.push(editor);\n      }\n    }\n    return editors;\n  }\n\n  /**\n   * Get an editor with the given id.\n   * @param {string} id\n   * @returns {AnnotationEditor}\n   */\n  getEditor(id) {\n    return this.#allEditors.get(id);\n  }\n\n  /**\n   * Add a new editor.\n   * @param {AnnotationEditor} editor\n   */\n  addEditor(editor) {\n    this.#allEditors.set(editor.id, editor);\n  }\n\n  /**\n   * Remove an editor.\n   * @param {AnnotationEditor} editor\n   */\n  removeEditor(editor) {\n    this.#allEditors.delete(editor.id);\n    this.unselect(editor);\n    if (\n      !editor.annotationElementId ||\n      !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)\n    ) {\n      this.#annotationStorage?.remove(editor.id);\n    }\n  }\n\n  /**\n   * The annotation element with the given id has been deleted.\n   * @param {AnnotationEditor} editor\n   */\n  addDeletedAnnotationElement(editor) {\n    this.#deletedAnnotationsElementIds.add(editor.annotationElementId);\n    editor.deleted = true;\n  }\n\n  /**\n   * Check if the annotation element with the given id has been deleted.\n   * @param {string} annotationElementId\n   * @returns {boolean}\n   */\n  isDeletedAnnotationElement(annotationElementId) {\n    return this.#deletedAnnotationsElementIds.has(annotationElementId);\n  }\n\n  /**\n   * The annotation element with the given id have been restored.\n   * @param {AnnotationEditor} editor\n   */\n  removeDeletedAnnotationElement(editor) {\n    this.#deletedAnnotationsElementIds.delete(editor.annotationElementId);\n    editor.deleted = false;\n  }\n\n  /**\n   * Add an editor to the layer it belongs to or add it to the global map.\n   * @param {AnnotationEditor} editor\n   */\n  #addEditorToLayer(editor) {\n    const layer = this.#allLayers.get(editor.pageIndex);\n    if (layer) {\n      layer.addOrRebuild(editor);\n    } else {\n      this.addEditor(editor);\n    }\n  }\n\n  /**\n   * Set the given editor as the active one.\n   * @param {AnnotationEditor} editor\n   */\n  setActiveEditor(editor) {\n    if (this.#activeEditor === editor) {\n      return;\n    }\n\n    this.#activeEditor = editor;\n    if (editor) {\n      this.#dispatchUpdateUI(editor.propertiesToUpdate);\n    }\n  }\n\n  /**\n   * Add or remove an editor the current selection.\n   * @param {AnnotationEditor} editor\n   */\n  toggleSelected(editor) {\n    if (this.#selectedEditors.has(editor)) {\n      this.#selectedEditors.delete(editor);\n      editor.unselect();\n      this.#dispatchUpdateStates({\n        hasSelectedEditor: this.hasSelection,\n      });\n      return;\n    }\n    this.#selectedEditors.add(editor);\n    editor.select();\n    this.#dispatchUpdateUI(editor.propertiesToUpdate);\n    this.#dispatchUpdateStates({\n      hasSelectedEditor: true,\n    });\n  }\n\n  /**\n   * Set the last selected editor.\n   * @param {AnnotationEditor} editor\n   */\n  setSelected(editor) {\n    for (const ed of this.#selectedEditors) {\n      if (ed !== editor) {\n        ed.unselect();\n      }\n    }\n    this.#selectedEditors.clear();\n\n    this.#selectedEditors.add(editor);\n    editor.select();\n    this.#dispatchUpdateUI(editor.propertiesToUpdate);\n    this.#dispatchUpdateStates({\n      hasSelectedEditor: true,\n    });\n  }\n\n  /**\n   * Check if the editor is selected.\n   * @param {AnnotationEditor} editor\n   */\n  isSelected(editor) {\n    return this.#selectedEditors.has(editor);\n  }\n\n  /**\n   * Unselect an editor.\n   * @param {AnnotationEditor} editor\n   */\n  unselect(editor) {\n    editor.unselect();\n    this.#selectedEditors.delete(editor);\n    this.#dispatchUpdateStates({\n      hasSelectedEditor: this.hasSelection,\n    });\n  }\n\n  get hasSelection() {\n    return this.#selectedEditors.size !== 0;\n  }\n\n  /**\n   * Undo the last command.\n   */\n  undo() {\n    this.#commandManager.undo();\n    this.#dispatchUpdateStates({\n      hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n      hasSomethingToRedo: true,\n      isEmpty: this.#isEmpty(),\n    });\n  }\n\n  /**\n   * Redo the last undoed command.\n   */\n  redo() {\n    this.#commandManager.redo();\n    this.#dispatchUpdateStates({\n      hasSomethingToUndo: true,\n      hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n      isEmpty: this.#isEmpty(),\n    });\n  }\n\n  /**\n   * Add a command to execute (cmd) and another one to undo it.\n   * @param {Object} params\n   */\n  addCommands(params) {\n    this.#commandManager.add(params);\n    this.#dispatchUpdateStates({\n      hasSomethingToUndo: true,\n      hasSomethingToRedo: false,\n      isEmpty: this.#isEmpty(),\n    });\n  }\n\n  #isEmpty() {\n    if (this.#allEditors.size === 0) {\n      return true;\n    }\n\n    if (this.#allEditors.size === 1) {\n      for (const editor of this.#allEditors.values()) {\n        return editor.isEmpty();\n      }\n    }\n\n    return false;\n  }\n\n  /**\n   * Delete the current editor or all.\n   */\n  delete() {\n    this.commitOrRemove();\n    if (!this.hasSelection) {\n      return;\n    }\n\n    const editors = [...this.#selectedEditors];\n    const cmd = () => {\n      for (const editor of editors) {\n        editor.remove();\n      }\n    };\n    const undo = () => {\n      for (const editor of editors) {\n        this.#addEditorToLayer(editor);\n      }\n    };\n\n    this.addCommands({ cmd, undo, mustExec: true });\n  }\n\n  commitOrRemove() {\n    // An editor is being edited so just commit it.\n    this.#activeEditor?.commitOrRemove();\n  }\n\n  hasSomethingToControl() {\n    return this.#activeEditor || this.hasSelection;\n  }\n\n  /**\n   * Select the editors.\n   * @param {Array<AnnotationEditor>} editors\n   */\n  #selectEditors(editors) {\n    this.#selectedEditors.clear();\n    for (const editor of editors) {\n      if (editor.isEmpty()) {\n        continue;\n      }\n      this.#selectedEditors.add(editor);\n      editor.select();\n    }\n    this.#dispatchUpdateStates({ hasSelectedEditor: true });\n  }\n\n  /**\n   * Select all the editors.\n   */\n  selectAll() {\n    for (const editor of this.#selectedEditors) {\n      editor.commit();\n    }\n    this.#selectEditors(this.#allEditors.values());\n  }\n\n  /**\n   * Unselect all the selected editors.\n   */\n  unselectAll() {\n    if (this.#activeEditor) {\n      // An editor is being edited so just commit it.\n      this.#activeEditor.commitOrRemove();\n      return;\n    }\n\n    if (!this.hasSelection) {\n      return;\n    }\n    for (const editor of this.#selectedEditors) {\n      editor.unselect();\n    }\n    this.#selectedEditors.clear();\n    this.#dispatchUpdateStates({\n      hasSelectedEditor: false,\n    });\n  }\n\n  translateSelectedEditors(x, y, noCommit = false) {\n    if (!noCommit) {\n      this.commitOrRemove();\n    }\n    if (!this.hasSelection) {\n      return;\n    }\n\n    this.#translation[0] += x;\n    this.#translation[1] += y;\n    const [totalX, totalY] = this.#translation;\n    const editors = [...this.#selectedEditors];\n\n    // We don't want to have an undo/redo for each translation so we wait a bit\n    // before adding the command to the command manager.\n    const TIME_TO_WAIT = 1000;\n\n    if (this.#translationTimeoutId) {\n      clearTimeout(this.#translationTimeoutId);\n    }\n\n    this.#translationTimeoutId = setTimeout(() => {\n      this.#translationTimeoutId = null;\n      this.#translation[0] = this.#translation[1] = 0;\n\n      this.addCommands({\n        cmd: () => {\n          for (const editor of editors) {\n            if (this.#allEditors.has(editor.id)) {\n              editor.translateInPage(totalX, totalY);\n            }\n          }\n        },\n        undo: () => {\n          for (const editor of editors) {\n            if (this.#allEditors.has(editor.id)) {\n              editor.translateInPage(-totalX, -totalY);\n            }\n          }\n        },\n        mustExec: false,\n      });\n    }, TIME_TO_WAIT);\n\n    for (const editor of editors) {\n      editor.translateInPage(x, y);\n    }\n  }\n\n  /**\n   * Set up the drag session for moving the selected editors.\n   */\n  setUpDragSession() {\n    // Note: don't use any references to the editor's parent which can be null\n    // if the editor belongs to a destroyed page.\n    if (!this.hasSelection) {\n      return;\n    }\n    // Avoid to have spurious text selection in the text layer when dragging.\n    this.disableUserSelect(true);\n    this.#draggingEditors = new Map();\n    for (const editor of this.#selectedEditors) {\n      this.#draggingEditors.set(editor, {\n        savedX: editor.x,\n        savedY: editor.y,\n        savedPageIndex: editor.pageIndex,\n        newX: 0,\n        newY: 0,\n        newPageIndex: -1,\n      });\n    }\n  }\n\n  /**\n   * Ends the drag session.\n   * @returns {boolean} true if at least one editor has been moved.\n   */\n  endDragSession() {\n    if (!this.#draggingEditors) {\n      return false;\n    }\n    this.disableUserSelect(false);\n    const map = this.#draggingEditors;\n    this.#draggingEditors = null;\n    let mustBeAddedInUndoStack = false;\n\n    for (const [{ x, y, pageIndex }, value] of map) {\n      value.newX = x;\n      value.newY = y;\n      value.newPageIndex = pageIndex;\n      mustBeAddedInUndoStack ||=\n        x !== value.savedX ||\n        y !== value.savedY ||\n        pageIndex !== value.savedPageIndex;\n    }\n\n    if (!mustBeAddedInUndoStack) {\n      return false;\n    }\n\n    const move = (editor, x, y, pageIndex) => {\n      if (this.#allEditors.has(editor.id)) {\n        // The editor can be undone/redone on a page which is not visible (and\n        // which potentially has no annotation editor layer), hence we need to\n        // use the pageIndex instead of the parent.\n        const parent = this.#allLayers.get(pageIndex);\n        if (parent) {\n          editor._setParentAndPosition(parent, x, y);\n        } else {\n          editor.pageIndex = pageIndex;\n          editor.x = x;\n          editor.y = y;\n        }\n      }\n    };\n\n    this.addCommands({\n      cmd: () => {\n        for (const [editor, { newX, newY, newPageIndex }] of map) {\n          move(editor, newX, newY, newPageIndex);\n        }\n      },\n      undo: () => {\n        for (const [editor, { savedX, savedY, savedPageIndex }] of map) {\n          move(editor, savedX, savedY, savedPageIndex);\n        }\n      },\n      mustExec: true,\n    });\n\n    return true;\n  }\n\n  /**\n   * Drag the set of selected editors.\n   * @param {number} tx\n   * @param {number} ty\n   */\n  dragSelectedEditors(tx, ty) {\n    if (!this.#draggingEditors) {\n      return;\n    }\n    for (const editor of this.#draggingEditors.keys()) {\n      editor.drag(tx, ty);\n    }\n  }\n\n  /**\n   * Rebuild the editor (usually on undo/redo actions) on a potentially\n   * non-rendered page.\n   * @param {AnnotationEditor} editor\n   */\n  rebuild(editor) {\n    if (editor.parent === null) {\n      const parent = this.getLayer(editor.pageIndex);\n      if (parent) {\n        parent.changeParent(editor);\n        parent.addOrRebuild(editor);\n      } else {\n        this.addEditor(editor);\n        this.addToAnnotationStorage(editor);\n        editor.rebuild();\n      }\n    } else {\n      editor.parent.addOrRebuild(editor);\n    }\n  }\n\n  /**\n   * Is the current editor the one passed as argument?\n   * @param {AnnotationEditor} editor\n   * @returns\n   */\n  isActive(editor) {\n    return this.#activeEditor === editor;\n  }\n\n  /**\n   * Get the current active editor.\n   * @returns {AnnotationEditor|null}\n   */\n  getActive() {\n    return this.#activeEditor;\n  }\n\n  /**\n   * Get the current editor mode.\n   * @returns {number}\n   */\n  getMode() {\n    return this.#mode;\n  }\n\n  get imageManager() {\n    return shadow(this, \"imageManager\", new ImageManager());\n  }\n}\n\nexport {\n  AnnotationEditorUIManager,\n  bindEvents,\n  ColorManager,\n  CommandManager,\n  KeyboardManager,\n  opacityToHex,\n};\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  BaseCanvasFactory,\n  BaseCMapReaderFactory,\n  BaseFilterFactory,\n  BaseStandardFontDataFactory,\n  BaseSVGFactory,\n} from \"./base_factory.js\";\nimport {\n  BaseException,\n  FeatureTest,\n  shadow,\n  stringToBytes,\n  Util,\n  warn,\n} from \"../shared/util.js\";\n\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nclass PixelsPerInch {\n  static CSS = 96.0;\n\n  static PDF = 72.0;\n\n  static PDF_TO_CSS_UNITS = this.CSS / this.PDF;\n}\n\n/**\n * FilterFactory aims to create some SVG filters we can use when drawing an\n * image (or whatever) on a canvas.\n * Filters aren't applied with ctx.putImageData because it just overwrites the\n * underlying pixels.\n * With these filters, it's possible for example to apply some transfer maps on\n * an image without the need to apply them on the pixel arrays: the renderer\n * does the magic for us.\n */\nclass DOMFilterFactory extends BaseFilterFactory {\n  #_cache;\n\n  #_defs;\n\n  #docId;\n\n  #document;\n\n  #hcmFilter;\n\n  #hcmKey;\n\n  #hcmUrl;\n\n  #hcmHighlightFilter;\n\n  #hcmHighlightKey;\n\n  #hcmHighlightUrl;\n\n  #id = 0;\n\n  constructor({ docId, ownerDocument = globalThis.document } = {}) {\n    super();\n    this.#docId = docId;\n    this.#document = ownerDocument;\n  }\n\n  get #cache() {\n    return (this.#_cache ||= new Map());\n  }\n\n  get #defs() {\n    if (!this.#_defs) {\n      const div = this.#document.createElement(\"div\");\n      const { style } = div;\n      style.visibility = \"hidden\";\n      style.contain = \"strict\";\n      style.width = style.height = 0;\n      style.position = \"absolute\";\n      style.top = style.left = 0;\n      style.zIndex = -1;\n\n      const svg = this.#document.createElementNS(SVG_NS, \"svg\");\n      svg.setAttribute(\"width\", 0);\n      svg.setAttribute(\"height\", 0);\n      this.#_defs = this.#document.createElementNS(SVG_NS, \"defs\");\n      div.append(svg);\n      svg.append(this.#_defs);\n      this.#document.body.append(div);\n    }\n    return this.#_defs;\n  }\n\n  addFilter(maps) {\n    if (!maps) {\n      return \"none\";\n    }\n\n    // When a page is zoomed the page is re-drawn but the maps are likely\n    // the same.\n    let value = this.#cache.get(maps);\n    if (value) {\n      return value;\n    }\n\n    let tableR, tableG, tableB, key;\n    if (maps.length === 1) {\n      const mapR = maps[0];\n      const buffer = new Array(256);\n      for (let i = 0; i < 256; i++) {\n        buffer[i] = mapR[i] / 255;\n      }\n      key = tableR = tableG = tableB = buffer.join(\",\");\n    } else {\n      const [mapR, mapG, mapB] = maps;\n      const bufferR = new Array(256);\n      const bufferG = new Array(256);\n      const bufferB = new Array(256);\n      for (let i = 0; i < 256; i++) {\n        bufferR[i] = mapR[i] / 255;\n        bufferG[i] = mapG[i] / 255;\n        bufferB[i] = mapB[i] / 255;\n      }\n      tableR = bufferR.join(\",\");\n      tableG = bufferG.join(\",\");\n      tableB = bufferB.join(\",\");\n      key = `${tableR}${tableG}${tableB}`;\n    }\n\n    value = this.#cache.get(key);\n    if (value) {\n      this.#cache.set(maps, value);\n      return value;\n    }\n\n    // We create a SVG filter: feComponentTransferElement\n    //  https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement\n\n    const id = `g_${this.#docId}_transfer_map_${this.#id++}`;\n    const url = `url(#${id})`;\n    this.#cache.set(maps, url);\n    this.#cache.set(key, url);\n\n    const filter = this.#createFilter(id);\n    this.#addTransferMapConversion(tableR, tableG, tableB, filter);\n\n    return url;\n  }\n\n  addHCMFilter(fgColor, bgColor) {\n    const key = `${fgColor}-${bgColor}`;\n    if (this.#hcmKey === key) {\n      return this.#hcmUrl;\n    }\n\n    this.#hcmKey = key;\n    this.#hcmUrl = \"none\";\n    this.#hcmFilter?.remove();\n\n    if (!fgColor || !bgColor) {\n      return this.#hcmUrl;\n    }\n\n    const fgRGB = this.#getRGB(fgColor);\n    fgColor = Util.makeHexColor(...fgRGB);\n    const bgRGB = this.#getRGB(bgColor);\n    bgColor = Util.makeHexColor(...bgRGB);\n    this.#defs.style.color = \"\";\n\n    if (\n      (fgColor === \"#000000\" && bgColor === \"#ffffff\") ||\n      fgColor === bgColor\n    ) {\n      return this.#hcmUrl;\n    }\n\n    // https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_Colors_and_Luminance\n    //\n    // Relative luminance:\n    // https://www.w3.org/TR/WCAG20/#relativeluminancedef\n    //\n    // We compute the rounded luminance of the default background color.\n    // Then for every color in the pdf, if its rounded luminance is the\n    // same as the background one then it's replaced by the new\n    // background color else by the foreground one.\n    const map = new Array(256);\n    for (let i = 0; i <= 255; i++) {\n      const x = i / 255;\n      map[i] = x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;\n    }\n    const table = map.join(\",\");\n\n    const id = `g_${this.#docId}_hcm_filter`;\n    const filter = (this.#hcmHighlightFilter = this.#createFilter(id));\n    this.#addTransferMapConversion(table, table, table, filter);\n    this.#addGrayConversion(filter);\n\n    const getSteps = (c, n) => {\n      const start = fgRGB[c] / 255;\n      const end = bgRGB[c] / 255;\n      const arr = new Array(n + 1);\n      for (let i = 0; i <= n; i++) {\n        arr[i] = start + (i / n) * (end - start);\n      }\n      return arr.join(\",\");\n    };\n    this.#addTransferMapConversion(\n      getSteps(0, 5),\n      getSteps(1, 5),\n      getSteps(2, 5),\n      filter\n    );\n\n    this.#hcmUrl = `url(#${id})`;\n    return this.#hcmUrl;\n  }\n\n  addHighlightHCMFilter(fgColor, bgColor, newFgColor, newBgColor) {\n    const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;\n    if (this.#hcmHighlightKey === key) {\n      return this.#hcmHighlightUrl;\n    }\n\n    this.#hcmHighlightKey = key;\n    this.#hcmHighlightUrl = \"none\";\n    this.#hcmHighlightFilter?.remove();\n\n    if (!fgColor || !bgColor) {\n      return this.#hcmHighlightUrl;\n    }\n\n    const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this));\n    let fgGray = Math.round(\n      0.2126 * fgRGB[0] + 0.7152 * fgRGB[1] + 0.0722 * fgRGB[2]\n    );\n    let bgGray = Math.round(\n      0.2126 * bgRGB[0] + 0.7152 * bgRGB[1] + 0.0722 * bgRGB[2]\n    );\n    let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(\n      this.#getRGB.bind(this)\n    );\n    if (bgGray < fgGray) {\n      [fgGray, bgGray, newFgRGB, newBgRGB] = [\n        bgGray,\n        fgGray,\n        newBgRGB,\n        newFgRGB,\n      ];\n    }\n    this.#defs.style.color = \"\";\n\n    // Now we can create the filters to highlight some canvas parts.\n    // The colors in the pdf will almost be Canvas and CanvasText, hence we\n    // want to filter them to finally get Highlight and HighlightText.\n    // Since we're in HCM the background color and the foreground color should\n    // be really different when converted to grayscale (if they're not then it\n    // means that we've a poor contrast). Once the canvas colors are converted\n    // to grayscale we can easily map them on their new colors.\n    // The grayscale step is important because if we've something like:\n    //   fgColor = #FF....\n    //   bgColor = #FF....\n    //   then we are enable to map the red component on the new red components\n    //   which can be different.\n\n    const getSteps = (fg, bg, n) => {\n      const arr = new Array(256);\n      const step = (bgGray - fgGray) / n;\n      const newStart = fg / 255;\n      const newStep = (bg - fg) / (255 * n);\n      let prev = 0;\n      for (let i = 0; i <= n; i++) {\n        const k = Math.round(fgGray + i * step);\n        const value = newStart + i * newStep;\n        for (let j = prev; j <= k; j++) {\n          arr[j] = value;\n        }\n        prev = k + 1;\n      }\n      for (let i = prev; i < 256; i++) {\n        arr[i] = arr[prev - 1];\n      }\n      return arr.join(\",\");\n    };\n\n    const id = `g_${this.#docId}_hcm_highlight_filter`;\n    const filter = (this.#hcmHighlightFilter = this.#createFilter(id));\n\n    this.#addGrayConversion(filter);\n    this.#addTransferMapConversion(\n      getSteps(newFgRGB[0], newBgRGB[0], 5),\n      getSteps(newFgRGB[1], newBgRGB[1], 5),\n      getSteps(newFgRGB[2], newBgRGB[2], 5),\n      filter\n    );\n\n    this.#hcmHighlightUrl = `url(#${id})`;\n    return this.#hcmHighlightUrl;\n  }\n\n  destroy(keepHCM = false) {\n    if (keepHCM && (this.#hcmUrl || this.#hcmHighlightUrl)) {\n      return;\n    }\n    if (this.#_defs) {\n      this.#_defs.parentNode.parentNode.remove();\n      this.#_defs = null;\n    }\n    if (this.#_cache) {\n      this.#_cache.clear();\n      this.#_cache = null;\n    }\n    this.#id = 0;\n  }\n\n  #addGrayConversion(filter) {\n    const feColorMatrix = this.#document.createElementNS(\n      SVG_NS,\n      \"feColorMatrix\"\n    );\n    feColorMatrix.setAttribute(\"type\", \"matrix\");\n    feColorMatrix.setAttribute(\n      \"values\",\n      \"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\"\n    );\n    filter.append(feColorMatrix);\n  }\n\n  #createFilter(id) {\n    const filter = this.#document.createElementNS(SVG_NS, \"filter\");\n    filter.setAttribute(\"color-interpolation-filters\", \"sRGB\");\n    filter.setAttribute(\"id\", id);\n    this.#defs.append(filter);\n\n    return filter;\n  }\n\n  #appendFeFunc(feComponentTransfer, func, table) {\n    const feFunc = this.#document.createElementNS(SVG_NS, func);\n    feFunc.setAttribute(\"type\", \"discrete\");\n    feFunc.setAttribute(\"tableValues\", table);\n    feComponentTransfer.append(feFunc);\n  }\n\n  #addTransferMapConversion(rTable, gTable, bTable, filter) {\n    const feComponentTransfer = this.#document.createElementNS(\n      SVG_NS,\n      \"feComponentTransfer\"\n    );\n    filter.append(feComponentTransfer);\n    this.#appendFeFunc(feComponentTransfer, \"feFuncR\", rTable);\n    this.#appendFeFunc(feComponentTransfer, \"feFuncG\", gTable);\n    this.#appendFeFunc(feComponentTransfer, \"feFuncB\", bTable);\n  }\n\n  #getRGB(color) {\n    this.#defs.style.color = color;\n    return getRGB(getComputedStyle(this.#defs).getPropertyValue(\"color\"));\n  }\n}\n\nclass DOMCanvasFactory extends BaseCanvasFactory {\n  constructor({ ownerDocument = globalThis.document } = {}) {\n    super();\n    this._document = ownerDocument;\n  }\n\n  /**\n   * @ignore\n   */\n  _createCanvas(width, height) {\n    const canvas = this._document.createElement(\"canvas\");\n    canvas.width = width;\n    canvas.height = height;\n    return canvas;\n  }\n}\n\nasync function fetchData(url, asTypedArray = false) {\n  if (\n    (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n    isValidFetchUrl(url, document.baseURI)\n  ) {\n    const response = await fetch(url);\n    if (!response.ok) {\n      throw new Error(response.statusText);\n    }\n    return asTypedArray\n      ? new Uint8Array(await response.arrayBuffer())\n      : stringToBytes(await response.text());\n  }\n\n  // The Fetch API is not supported.\n  return new Promise((resolve, reject) => {\n    const request = new XMLHttpRequest();\n    request.open(\"GET\", url, /* asTypedArray = */ true);\n\n    if (asTypedArray) {\n      request.responseType = \"arraybuffer\";\n    }\n    request.onreadystatechange = () => {\n      if (request.readyState !== XMLHttpRequest.DONE) {\n        return;\n      }\n      if (request.status === 200 || request.status === 0) {\n        let data;\n        if (asTypedArray && request.response) {\n          data = new Uint8Array(request.response);\n        } else if (!asTypedArray && request.responseText) {\n          data = stringToBytes(request.responseText);\n        }\n        if (data) {\n          resolve(data);\n          return;\n        }\n      }\n      reject(new Error(request.statusText));\n    };\n\n    request.send(null);\n  });\n}\n\nclass DOMCMapReaderFactory extends BaseCMapReaderFactory {\n  /**\n   * @ignore\n   */\n  _fetchData(url, compressionType) {\n    return fetchData(url, /* asTypedArray = */ this.isCompressed).then(data => {\n      return { cMapData: data, compressionType };\n    });\n  }\n}\n\nclass DOMStandardFontDataFactory extends BaseStandardFontDataFactory {\n  /**\n   * @ignore\n   */\n  _fetchData(url) {\n    return fetchData(url, /* asTypedArray = */ true);\n  }\n}\n\nclass DOMSVGFactory extends BaseSVGFactory {\n  /**\n   * @ignore\n   */\n  _createSVG(type) {\n    return document.createElementNS(SVG_NS, type);\n  }\n}\n\n/**\n * @typedef {Object} PageViewportParameters\n * @property {Array<number>} viewBox - The xMin, yMin, xMax and\n *   yMax coordinates.\n * @property {number} scale - The scale of the viewport.\n * @property {number} rotation - The rotation, in degrees, of the viewport.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset. The\n *   default value is `0`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset. The\n *   default value is `0`.\n * @property {boolean} [dontFlip] - If true, the y-axis will not be flipped.\n *   The default value is `false`.\n */\n\n/**\n * @typedef {Object} PageViewportCloneParameters\n * @property {number} [scale] - The scale, overriding the one in the cloned\n *   viewport. The default value is `this.scale`.\n * @property {number} [rotation] - The rotation, in degrees, overriding the one\n *   in the cloned viewport. The default value is `this.rotation`.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.\n *   The default value is `this.offsetX`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset.\n *   The default value is `this.offsetY`.\n * @property {boolean} [dontFlip] - If true, the x-axis will not be flipped.\n *   The default value is `false`.\n */\n\n/**\n * PDF page viewport created based on scale, rotation and offset.\n */\nclass PageViewport {\n  /**\n   * @param {PageViewportParameters}\n   */\n  constructor({\n    viewBox,\n    scale,\n    rotation,\n    offsetX = 0,\n    offsetY = 0,\n    dontFlip = false,\n  }) {\n    this.viewBox = viewBox;\n    this.scale = scale;\n    this.rotation = rotation;\n    this.offsetX = offsetX;\n    this.offsetY = offsetY;\n\n    // creating transform to convert pdf coordinate system to the normal\n    // canvas like coordinates taking in account scale and rotation\n    const centerX = (viewBox[2] + viewBox[0]) / 2;\n    const centerY = (viewBox[3] + viewBox[1]) / 2;\n    let rotateA, rotateB, rotateC, rotateD;\n    // Normalize the rotation, by clamping it to the [0, 360) range.\n    rotation %= 360;\n    if (rotation < 0) {\n      rotation += 360;\n    }\n    switch (rotation) {\n      case 180:\n        rotateA = -1;\n        rotateB = 0;\n        rotateC = 0;\n        rotateD = 1;\n        break;\n      case 90:\n        rotateA = 0;\n        rotateB = 1;\n        rotateC = 1;\n        rotateD = 0;\n        break;\n      case 270:\n        rotateA = 0;\n        rotateB = -1;\n        rotateC = -1;\n        rotateD = 0;\n        break;\n      case 0:\n        rotateA = 1;\n        rotateB = 0;\n        rotateC = 0;\n        rotateD = -1;\n        break;\n      default:\n        throw new Error(\n          \"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\"\n        );\n    }\n\n    if (dontFlip) {\n      rotateC = -rotateC;\n      rotateD = -rotateD;\n    }\n\n    let offsetCanvasX, offsetCanvasY;\n    let width, height;\n    if (rotateA === 0) {\n      offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n      offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n      width = (viewBox[3] - viewBox[1]) * scale;\n      height = (viewBox[2] - viewBox[0]) * scale;\n    } else {\n      offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n      offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n      width = (viewBox[2] - viewBox[0]) * scale;\n      height = (viewBox[3] - viewBox[1]) * scale;\n    }\n    // creating transform for the following operations:\n    // translate(-centerX, -centerY), rotate and flip vertically,\n    // scale, and translate(offsetCanvasX, offsetCanvasY)\n    this.transform = [\n      rotateA * scale,\n      rotateB * scale,\n      rotateC * scale,\n      rotateD * scale,\n      offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,\n      offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY,\n    ];\n\n    this.width = width;\n    this.height = height;\n  }\n\n  /**\n   * The original, un-scaled, viewport dimensions.\n   * @type {Object}\n   */\n  get rawDims() {\n    const { viewBox } = this;\n    return shadow(this, \"rawDims\", {\n      pageWidth: viewBox[2] - viewBox[0],\n      pageHeight: viewBox[3] - viewBox[1],\n      pageX: viewBox[0],\n      pageY: viewBox[1],\n    });\n  }\n\n  /**\n   * Clones viewport, with optional additional properties.\n   * @param {PageViewportCloneParameters} [params]\n   * @returns {PageViewport} Cloned viewport.\n   */\n  clone({\n    scale = this.scale,\n    rotation = this.rotation,\n    offsetX = this.offsetX,\n    offsetY = this.offsetY,\n    dontFlip = false,\n  } = {}) {\n    return new PageViewport({\n      viewBox: this.viewBox.slice(),\n      scale,\n      rotation,\n      offsetX,\n      offsetY,\n      dontFlip,\n    });\n  }\n\n  /**\n   * Converts PDF point to the viewport coordinates. For examples, useful for\n   * converting PDF location into canvas pixel coordinates.\n   * @param {number} x - The x-coordinate.\n   * @param {number} y - The y-coordinate.\n   * @returns {Array} Array containing `x`- and `y`-coordinates of the\n   *   point in the viewport coordinate space.\n   * @see {@link convertToPdfPoint}\n   * @see {@link convertToViewportRectangle}\n   */\n  convertToViewportPoint(x, y) {\n    return Util.applyTransform([x, y], this.transform);\n  }\n\n  /**\n   * Converts PDF rectangle to the viewport coordinates.\n   * @param {Array} rect - The xMin, yMin, xMax and yMax coordinates.\n   * @returns {Array} Array containing corresponding coordinates of the\n   *   rectangle in the viewport coordinate space.\n   * @see {@link convertToViewportPoint}\n   */\n  convertToViewportRectangle(rect) {\n    const topLeft = Util.applyTransform([rect[0], rect[1]], this.transform);\n    const bottomRight = Util.applyTransform([rect[2], rect[3]], this.transform);\n    return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n  }\n\n  /**\n   * Converts viewport coordinates to the PDF location. For examples, useful\n   * for converting canvas pixel location into PDF one.\n   * @param {number} x - The x-coordinate.\n   * @param {number} y - The y-coordinate.\n   * @returns {Array} Array containing `x`- and `y`-coordinates of the\n   *   point in the PDF coordinate space.\n   * @see {@link convertToViewportPoint}\n   */\n  convertToPdfPoint(x, y) {\n    return Util.applyInverseTransform([x, y], this.transform);\n  }\n}\n\nclass RenderingCancelledException extends BaseException {\n  constructor(msg, extraDelay = 0) {\n    super(msg, \"RenderingCancelledException\");\n    this.extraDelay = extraDelay;\n  }\n}\n\nfunction isDataScheme(url) {\n  const ii = url.length;\n  let i = 0;\n  while (i < ii && url[i].trim() === \"\") {\n    i++;\n  }\n  return url.substring(i, i + 5).toLowerCase() === \"data:\";\n}\n\nfunction isPdfFile(filename) {\n  return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n}\n\n/**\n * Gets the filename from a given URL.\n * @param {string} url\n * @param {boolean} [onlyStripPath]\n * @returns {string}\n */\nfunction getFilenameFromUrl(url, onlyStripPath = false) {\n  if (!onlyStripPath) {\n    [url] = url.split(/[#?]/, 1);\n  }\n  return url.substring(url.lastIndexOf(\"/\") + 1);\n}\n\n/**\n * Returns the filename or guessed filename from the url (see issue 3455).\n * @param {string} url - The original PDF location.\n * @param {string} defaultFilename - The value returned if the filename is\n *   unknown, or the protocol is unsupported.\n * @returns {string} Guessed PDF filename.\n */\nfunction getPdfFilenameFromUrl(url, defaultFilename = \"document.pdf\") {\n  if (typeof url !== \"string\") {\n    return defaultFilename;\n  }\n  if (isDataScheme(url)) {\n    warn('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n    return defaultFilename;\n  }\n  const reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n  //              SCHEME        HOST        1.PATH  2.QUERY   3.REF\n  // Pattern to get last matching NAME.pdf\n  const reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n  const splitURI = reURI.exec(url);\n  let suggestedFilename =\n    reFilename.exec(splitURI[1]) ||\n    reFilename.exec(splitURI[2]) ||\n    reFilename.exec(splitURI[3]);\n  if (suggestedFilename) {\n    suggestedFilename = suggestedFilename[0];\n    if (suggestedFilename.includes(\"%\")) {\n      // URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf\n      try {\n        suggestedFilename = reFilename.exec(\n          decodeURIComponent(suggestedFilename)\n        )[0];\n      } catch {\n        // Possible (extremely rare) errors:\n        // URIError \"Malformed URI\", e.g. for \"%AA.pdf\"\n        // TypeError \"null has no properties\", e.g. for \"%2F.pdf\"\n      }\n    }\n  }\n  return suggestedFilename || defaultFilename;\n}\n\nclass StatTimer {\n  started = Object.create(null);\n\n  times = [];\n\n  time(name) {\n    if (name in this.started) {\n      warn(`Timer is already running for ${name}`);\n    }\n    this.started[name] = Date.now();\n  }\n\n  timeEnd(name) {\n    if (!(name in this.started)) {\n      warn(`Timer has not been started for ${name}`);\n    }\n    this.times.push({\n      name,\n      start: this.started[name],\n      end: Date.now(),\n    });\n    // Remove timer from started so it can be called again.\n    delete this.started[name];\n  }\n\n  toString() {\n    // Find the longest name for padding purposes.\n    const outBuf = [];\n    let longest = 0;\n    for (const { name } of this.times) {\n      longest = Math.max(name.length, longest);\n    }\n    for (const { name, start, end } of this.times) {\n      outBuf.push(`${name.padEnd(longest)} ${end - start}ms\\n`);\n    }\n    return outBuf.join(\"\");\n  }\n}\n\nfunction isValidFetchUrl(url, baseUrl) {\n  if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n    throw new Error(\"Not implemented: isValidFetchUrl\");\n  }\n  try {\n    const { protocol } = baseUrl ? new URL(url, baseUrl) : new URL(url);\n    // The Fetch API only supports the http/https protocols, and not file/ftp.\n    return protocol === \"http:\" || protocol === \"https:\";\n  } catch {\n    return false; // `new URL()` will throw on incorrect data.\n  }\n}\n\n/**\n * Event handler to suppress context menu.\n */\nfunction noContextMenu(e) {\n  e.preventDefault();\n}\n\n/**\n * @param {string} src\n * @param {boolean} [removeScriptElement]\n * @returns {Promise<void>}\n */\nfunction loadScript(src, removeScriptElement = false) {\n  return new Promise((resolve, reject) => {\n    const script = document.createElement(\"script\");\n    script.src = src;\n\n    script.onload = function (evt) {\n      if (removeScriptElement) {\n        script.remove();\n      }\n      resolve(evt);\n    };\n    script.onerror = function () {\n      reject(new Error(`Cannot load script at: ${script.src}`));\n    };\n    (document.head || document.documentElement).append(script);\n  });\n}\n\n// Deprecated API function -- display regardless of the `verbosity` setting.\nfunction deprecated(details) {\n  console.log(\"Deprecated API usage: \" + details);\n}\n\nlet pdfDateStringRegex;\n\nclass PDFDateString {\n  /**\n   * Convert a PDF date string to a JavaScript `Date` object.\n   *\n   * The PDF date string format is described in section 7.9.4 of the official\n   * PDF 32000-1:2008 specification. However, in the PDF 1.7 reference (sixth\n   * edition) Adobe describes the same format including a trailing apostrophe.\n   * This syntax in incorrect, but Adobe Acrobat creates PDF files that contain\n   * them. We ignore all apostrophes as they are not necessary for date parsing.\n   *\n   * Moreover, Adobe Acrobat doesn't handle changing the date to universal time\n   * and doesn't use the user's time zone (effectively ignoring the HH' and mm'\n   * parts of the date string).\n   *\n   * @param {string} input\n   * @returns {Date|null}\n   */\n  static toDateObject(input) {\n    if (!input || typeof input !== \"string\") {\n      return null;\n    }\n\n    // Lazily initialize the regular expression.\n    pdfDateStringRegex ||= new RegExp(\n      \"^D:\" + // Prefix (required)\n        \"(\\\\d{4})\" + // Year (required)\n        \"(\\\\d{2})?\" + // Month (optional)\n        \"(\\\\d{2})?\" + // Day (optional)\n        \"(\\\\d{2})?\" + // Hour (optional)\n        \"(\\\\d{2})?\" + // Minute (optional)\n        \"(\\\\d{2})?\" + // Second (optional)\n        \"([Z|+|-])?\" + // Universal time relation (optional)\n        \"(\\\\d{2})?\" + // Offset hour (optional)\n        \"'?\" + // Splitting apostrophe (optional)\n        \"(\\\\d{2})?\" + // Offset minute (optional)\n        \"'?\" // Trailing apostrophe (optional)\n    );\n\n    // Optional fields that don't satisfy the requirements from the regular\n    // expression (such as incorrect digit counts or numbers that are out of\n    // range) will fall back the defaults from the specification.\n    const matches = pdfDateStringRegex.exec(input);\n    if (!matches) {\n      return null;\n    }\n\n    // JavaScript's `Date` object expects the month to be between 0 and 11\n    // instead of 1 and 12, so we have to correct for that.\n    const year = parseInt(matches[1], 10);\n    let month = parseInt(matches[2], 10);\n    month = month >= 1 && month <= 12 ? month - 1 : 0;\n    let day = parseInt(matches[3], 10);\n    day = day >= 1 && day <= 31 ? day : 1;\n    let hour = parseInt(matches[4], 10);\n    hour = hour >= 0 && hour <= 23 ? hour : 0;\n    let minute = parseInt(matches[5], 10);\n    minute = minute >= 0 && minute <= 59 ? minute : 0;\n    let second = parseInt(matches[6], 10);\n    second = second >= 0 && second <= 59 ? second : 0;\n    const universalTimeRelation = matches[7] || \"Z\";\n    let offsetHour = parseInt(matches[8], 10);\n    offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;\n    let offsetMinute = parseInt(matches[9], 10) || 0;\n    offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;\n\n    // Universal time relation 'Z' means that the local time is equal to the\n    // universal time, whereas the relations '+'/'-' indicate that the local\n    // time is later respectively earlier than the universal time. Every date\n    // is normalized to universal time.\n    if (universalTimeRelation === \"-\") {\n      hour += offsetHour;\n      minute += offsetMinute;\n    } else if (universalTimeRelation === \"+\") {\n      hour -= offsetHour;\n      minute -= offsetMinute;\n    }\n\n    return new Date(Date.UTC(year, month, day, hour, minute, second));\n  }\n}\n\n/**\n * NOTE: This is (mostly) intended to support printing of XFA forms.\n */\nfunction getXfaPageViewport(xfaPage, { scale = 1, rotation = 0 }) {\n  const { width, height } = xfaPage.attributes.style;\n  const viewBox = [0, 0, parseInt(width), parseInt(height)];\n\n  return new PageViewport({\n    viewBox,\n    scale,\n    rotation,\n  });\n}\n\nfunction getRGB(color) {\n  if (color.startsWith(\"#\")) {\n    const colorRGB = parseInt(color.slice(1), 16);\n    return [\n      (colorRGB & 0xff0000) >> 16,\n      (colorRGB & 0x00ff00) >> 8,\n      colorRGB & 0x0000ff,\n    ];\n  }\n\n  if (color.startsWith(\"rgb(\")) {\n    // getComputedStyle(...).color returns a `rgb(R, G, B)` color.\n    return color\n      .slice(/* \"rgb(\".length */ 4, -1) // Strip out \"rgb(\" and \")\".\n      .split(\",\")\n      .map(x => parseInt(x));\n  }\n\n  if (color.startsWith(\"rgba(\")) {\n    return color\n      .slice(/* \"rgba(\".length */ 5, -1) // Strip out \"rgba(\" and \")\".\n      .split(\",\")\n      .map(x => parseInt(x))\n      .slice(0, 3);\n  }\n\n  warn(`Not a valid color format: \"${color}\"`);\n  return [0, 0, 0];\n}\n\nfunction getColorValues(colors) {\n  const span = document.createElement(\"span\");\n  span.style.visibility = \"hidden\";\n  document.body.append(span);\n  for (const name of colors.keys()) {\n    span.style.color = name;\n    const computedColor = window.getComputedStyle(span).color;\n    colors.set(name, getRGB(computedColor));\n  }\n  span.remove();\n}\n\nfunction getCurrentTransform(ctx) {\n  const { a, b, c, d, e, f } = ctx.getTransform();\n  return [a, b, c, d, e, f];\n}\n\nfunction getCurrentTransformInverse(ctx) {\n  const { a, b, c, d, e, f } = ctx.getTransform().invertSelf();\n  return [a, b, c, d, e, f];\n}\n\n/**\n * @param {HTMLDivElement} div\n * @param {PageViewport} viewport\n * @param {boolean} mustFlip\n * @param {boolean} mustRotate\n */\nfunction setLayerDimensions(\n  div,\n  viewport,\n  mustFlip = false,\n  mustRotate = true\n) {\n  if (viewport instanceof PageViewport) {\n    const { pageWidth, pageHeight } = viewport.rawDims;\n    const { style } = div;\n    const useRound = FeatureTest.isCSSRoundSupported;\n\n    const w = `var(--scale-factor) * ${pageWidth}px`,\n      h = `var(--scale-factor) * ${pageHeight}px`;\n    const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,\n      heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;\n\n    if (!mustFlip || viewport.rotation % 180 === 0) {\n      style.width = widthStr;\n      style.height = heightStr;\n    } else {\n      style.width = heightStr;\n      style.height = widthStr;\n    }\n  }\n\n  if (mustRotate) {\n    div.setAttribute(\"data-main-rotation\", viewport.rotation);\n  }\n}\n\nexport {\n  deprecated,\n  DOMCanvasFactory,\n  DOMCMapReaderFactory,\n  DOMFilterFactory,\n  DOMStandardFontDataFactory,\n  DOMSVGFactory,\n  getColorValues,\n  getCurrentTransform,\n  getCurrentTransformInverse,\n  getFilenameFromUrl,\n  getPdfFilenameFromUrl,\n  getRGB,\n  getXfaPageViewport,\n  isDataScheme,\n  isPdfFile,\n  isValidFetchUrl,\n  loadScript,\n  noContextMenu,\n  PageViewport,\n  PDFDateString,\n  PixelsPerInch,\n  RenderingCancelledException,\n  setLayerDimensions,\n  StatTimer,\n};\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CMapCompressionType, unreachable } from \"../shared/util.js\";\n\nclass BaseFilterFactory {\n  constructor() {\n    if (this.constructor === BaseFilterFactory) {\n      unreachable(\"Cannot initialize BaseFilterFactory.\");\n    }\n  }\n\n  addFilter(maps) {\n    return \"none\";\n  }\n\n  addHCMFilter(fgColor, bgColor) {\n    return \"none\";\n  }\n\n  addHighlightHCMFilter(fgColor, bgColor, newFgColor, newBgColor) {\n    return \"none\";\n  }\n\n  destroy(keepHCM = false) {}\n}\n\nclass BaseCanvasFactory {\n  constructor() {\n    if (this.constructor === BaseCanvasFactory) {\n      unreachable(\"Cannot initialize BaseCanvasFactory.\");\n    }\n  }\n\n  create(width, height) {\n    if (width <= 0 || height <= 0) {\n      throw new Error(\"Invalid canvas size\");\n    }\n    const canvas = this._createCanvas(width, height);\n    return {\n      canvas,\n      context: canvas.getContext(\"2d\"),\n    };\n  }\n\n  reset(canvasAndContext, width, height) {\n    if (!canvasAndContext.canvas) {\n      throw new Error(\"Canvas is not specified\");\n    }\n    if (width <= 0 || height <= 0) {\n      throw new Error(\"Invalid canvas size\");\n    }\n    canvasAndContext.canvas.width = width;\n    canvasAndContext.canvas.height = height;\n  }\n\n  destroy(canvasAndContext) {\n    if (!canvasAndContext.canvas) {\n      throw new Error(\"Canvas is not specified\");\n    }\n    // Zeroing the width and height cause Firefox to release graphics\n    // resources immediately, which can greatly reduce memory consumption.\n    canvasAndContext.canvas.width = 0;\n    canvasAndContext.canvas.height = 0;\n    canvasAndContext.canvas = null;\n    canvasAndContext.context = null;\n  }\n\n  /**\n   * @ignore\n   */\n  _createCanvas(width, height) {\n    unreachable(\"Abstract method `_createCanvas` called.\");\n  }\n}\n\nclass BaseCMapReaderFactory {\n  constructor({ baseUrl = null, isCompressed = true }) {\n    if (this.constructor === BaseCMapReaderFactory) {\n      unreachable(\"Cannot initialize BaseCMapReaderFactory.\");\n    }\n    this.baseUrl = baseUrl;\n    this.isCompressed = isCompressed;\n  }\n\n  async fetch({ name }) {\n    if (!this.baseUrl) {\n      throw new Error(\n        'The CMap \"baseUrl\" parameter must be specified, ensure that ' +\n          'the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.'\n      );\n    }\n    if (!name) {\n      throw new Error(\"CMap name must be specified.\");\n    }\n    const url = this.baseUrl + name + (this.isCompressed ? \".bcmap\" : \"\");\n    const compressionType = this.isCompressed\n      ? CMapCompressionType.BINARY\n      : CMapCompressionType.NONE;\n\n    return this._fetchData(url, compressionType).catch(reason => {\n      throw new Error(\n        `Unable to load ${this.isCompressed ? \"binary \" : \"\"}CMap at: ${url}`\n      );\n    });\n  }\n\n  /**\n   * @ignore\n   */\n  _fetchData(url, compressionType) {\n    unreachable(\"Abstract method `_fetchData` called.\");\n  }\n}\n\nclass BaseStandardFontDataFactory {\n  constructor({ baseUrl = null }) {\n    if (this.constructor === BaseStandardFontDataFactory) {\n      unreachable(\"Cannot initialize BaseStandardFontDataFactory.\");\n    }\n    this.baseUrl = baseUrl;\n  }\n\n  async fetch({ filename }) {\n    if (!this.baseUrl) {\n      throw new Error(\n        'The standard font \"baseUrl\" parameter must be specified, ensure that ' +\n          'the \"standardFontDataUrl\" API parameter is provided.'\n      );\n    }\n    if (!filename) {\n      throw new Error(\"Font filename must be specified.\");\n    }\n    const url = `${this.baseUrl}${filename}`;\n\n    return this._fetchData(url).catch(reason => {\n      throw new Error(`Unable to load font data at: ${url}`);\n    });\n  }\n\n  /**\n   * @ignore\n   */\n  _fetchData(url) {\n    unreachable(\"Abstract method `_fetchData` called.\");\n  }\n}\n\nclass BaseSVGFactory {\n  constructor() {\n    if (this.constructor === BaseSVGFactory) {\n      unreachable(\"Cannot initialize BaseSVGFactory.\");\n    }\n  }\n\n  create(width, height, skipDimensions = false) {\n    if (width <= 0 || height <= 0) {\n      throw new Error(\"Invalid SVG dimensions\");\n    }\n    const svg = this._createSVG(\"svg:svg\");\n    svg.setAttribute(\"version\", \"1.1\");\n\n    if (!skipDimensions) {\n      svg.setAttribute(\"width\", `${width}px`);\n      svg.setAttribute(\"height\", `${height}px`);\n    }\n\n    svg.setAttribute(\"preserveAspectRatio\", \"none\");\n    svg.setAttribute(\"viewBox\", `0 0 ${width} ${height}`);\n\n    return svg;\n  }\n\n  createElement(type) {\n    if (typeof type !== \"string\") {\n      throw new Error(\"Invalid SVG element type\");\n    }\n    return this._createSVG(type);\n  }\n\n  /**\n   * @ignore\n   */\n  _createSVG(type) {\n    unreachable(\"Abstract method `_createSVG` called.\");\n  }\n}\n\nexport {\n  BaseCanvasFactory,\n  BaseCMapReaderFactory,\n  BaseFilterFactory,\n  BaseStandardFontDataFactory,\n  BaseSVGFactory,\n};\n","/* Copyright 2014 Opera Software ASA\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n *\n * Based on https://code.google.com/p/smhasher/wiki/MurmurHash3.\n * Hashes roughly 100 KB per millisecond on i7 3.4 GHz.\n */\n\nimport { isArrayBuffer } from \"./util.js\";\n\nconst SEED = 0xc3d2e1f0;\n// Workaround for missing math precision in JS.\nconst MASK_HIGH = 0xffff0000;\nconst MASK_LOW = 0xffff;\n\nclass MurmurHash3_64 {\n  constructor(seed) {\n    this.h1 = seed ? seed & 0xffffffff : SEED;\n    this.h2 = seed ? seed & 0xffffffff : SEED;\n  }\n\n  update(input) {\n    let data, length;\n    if (typeof input === \"string\") {\n      data = new Uint8Array(input.length * 2);\n      length = 0;\n      for (let i = 0, ii = input.length; i < ii; i++) {\n        const code = input.charCodeAt(i);\n        if (code <= 0xff) {\n          data[length++] = code;\n        } else {\n          data[length++] = code >>> 8;\n          data[length++] = code & 0xff;\n        }\n      }\n    } else if (isArrayBuffer(input)) {\n      data = input.slice();\n      length = data.byteLength;\n    } else {\n      throw new Error(\n        \"Wrong data format in MurmurHash3_64_update. \" +\n          \"Input must be a string or array.\"\n      );\n    }\n\n    const blockCounts = length >> 2;\n    const tailLength = length - blockCounts * 4;\n    // We don't care about endianness here.\n    const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);\n    let k1 = 0,\n      k2 = 0;\n    let h1 = this.h1,\n      h2 = this.h2;\n    const C1 = 0xcc9e2d51,\n      C2 = 0x1b873593;\n    const C1_LOW = C1 & MASK_LOW,\n      C2_LOW = C2 & MASK_LOW;\n\n    for (let i = 0; i < blockCounts; i++) {\n      if (i & 1) {\n        k1 = dataUint32[i];\n        k1 = ((k1 * C1) & MASK_HIGH) | ((k1 * C1_LOW) & MASK_LOW);\n        k1 = (k1 << 15) | (k1 >>> 17);\n        k1 = ((k1 * C2) & MASK_HIGH) | ((k1 * C2_LOW) & MASK_LOW);\n        h1 ^= k1;\n        h1 = (h1 << 13) | (h1 >>> 19);\n        h1 = h1 * 5 + 0xe6546b64;\n      } else {\n        k2 = dataUint32[i];\n        k2 = ((k2 * C1) & MASK_HIGH) | ((k2 * C1_LOW) & MASK_LOW);\n        k2 = (k2 << 15) | (k2 >>> 17);\n        k2 = ((k2 * C2) & MASK_HIGH) | ((k2 * C2_LOW) & MASK_LOW);\n        h2 ^= k2;\n        h2 = (h2 << 13) | (h2 >>> 19);\n        h2 = h2 * 5 + 0xe6546b64;\n      }\n    }\n\n    k1 = 0;\n\n    switch (tailLength) {\n      case 3:\n        k1 ^= data[blockCounts * 4 + 2] << 16;\n      /* falls through */\n      case 2:\n        k1 ^= data[blockCounts * 4 + 1] << 8;\n      /* falls through */\n      case 1:\n        k1 ^= data[blockCounts * 4];\n        /* falls through */\n\n        k1 = ((k1 * C1) & MASK_HIGH) | ((k1 * C1_LOW) & MASK_LOW);\n        k1 = (k1 << 15) | (k1 >>> 17);\n        k1 = ((k1 * C2) & MASK_HIGH) | ((k1 * C2_LOW) & MASK_LOW);\n        if (blockCounts & 1) {\n          h1 ^= k1;\n        } else {\n          h2 ^= k1;\n        }\n    }\n\n    this.h1 = h1;\n    this.h2 = h2;\n  }\n\n  hexdigest() {\n    let h1 = this.h1,\n      h2 = this.h2;\n\n    h1 ^= h2 >>> 1;\n    h1 = ((h1 * 0xed558ccd) & MASK_HIGH) | ((h1 * 0x8ccd) & MASK_LOW);\n    h2 =\n      ((h2 * 0xff51afd7) & MASK_HIGH) |\n      (((((h2 << 16) | (h1 >>> 16)) * 0xafd7ed55) & MASK_HIGH) >>> 16);\n    h1 ^= h2 >>> 1;\n    h1 = ((h1 * 0x1a85ec53) & MASK_HIGH) | ((h1 * 0xec53) & MASK_LOW);\n    h2 =\n      ((h2 * 0xc4ceb9fe) & MASK_HIGH) |\n      (((((h2 << 16) | (h1 >>> 16)) * 0xb9fe1a85) & MASK_HIGH) >>> 16);\n    h1 ^= h2 >>> 1;\n\n    return (\n      (h1 >>> 0).toString(16).padStart(8, \"0\") +\n      (h2 >>> 0).toString(16).padStart(8, \"0\")\n    );\n  }\n}\n\nexport { MurmurHash3_64 };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  assert,\n  bytesToString,\n  FeatureTest,\n  isNodeJS,\n  shadow,\n  string32,\n  unreachable,\n  warn,\n} from \"../shared/util.js\";\n\nclass FontLoader {\n  #systemFonts = new Set();\n\n  constructor({\n    ownerDocument = globalThis.document,\n    styleElement = null, // For testing only.\n  }) {\n    this._document = ownerDocument;\n\n    this.nativeFontFaces = new Set();\n    this.styleElement =\n      typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")\n        ? styleElement\n        : null;\n\n    if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n      this.loadingRequests = [];\n      this.loadTestFontId = 0;\n    }\n  }\n\n  addNativeFontFace(nativeFontFace) {\n    this.nativeFontFaces.add(nativeFontFace);\n    this._document.fonts.add(nativeFontFace);\n  }\n\n  removeNativeFontFace(nativeFontFace) {\n    this.nativeFontFaces.delete(nativeFontFace);\n    this._document.fonts.delete(nativeFontFace);\n  }\n\n  insertRule(rule) {\n    if (!this.styleElement) {\n      this.styleElement = this._document.createElement(\"style\");\n      this._document.documentElement\n        .getElementsByTagName(\"head\")[0]\n        .append(this.styleElement);\n    }\n    const styleSheet = this.styleElement.sheet;\n    styleSheet.insertRule(rule, styleSheet.cssRules.length);\n  }\n\n  clear() {\n    for (const nativeFontFace of this.nativeFontFaces) {\n      this._document.fonts.delete(nativeFontFace);\n    }\n    this.nativeFontFaces.clear();\n    this.#systemFonts.clear();\n\n    if (this.styleElement) {\n      // Note: ChildNode.remove doesn't throw if the parentNode is undefined.\n      this.styleElement.remove();\n      this.styleElement = null;\n    }\n  }\n\n  async loadSystemFont(info) {\n    if (!info || this.#systemFonts.has(info.loadedName)) {\n      return;\n    }\n    assert(\n      !this.disableFontFace,\n      \"loadSystemFont shouldn't be called when `disableFontFace` is set.\"\n    );\n\n    if (this.isFontLoadingAPISupported) {\n      const { loadedName, src, style } = info;\n      const fontFace = new FontFace(loadedName, src, style);\n      this.addNativeFontFace(fontFace);\n      try {\n        await fontFace.load();\n        this.#systemFonts.add(loadedName);\n      } catch {\n        warn(\n          `Cannot load system font: ${info.baseFontName}, installing it could help to improve PDF rendering.`\n        );\n\n        this.removeNativeFontFace(fontFace);\n      }\n      return;\n    }\n\n    unreachable(\n      \"Not implemented: loadSystemFont without the Font Loading API.\"\n    );\n  }\n\n  async bind(font) {\n    // Add the font to the DOM only once; skip if the font is already loaded.\n    if (font.attached || (font.missingFile && !font.systemFontInfo)) {\n      return;\n    }\n    font.attached = true;\n\n    if (font.systemFontInfo) {\n      await this.loadSystemFont(font.systemFontInfo);\n      return;\n    }\n\n    if (this.isFontLoadingAPISupported) {\n      const nativeFontFace = font.createNativeFontFace();\n      if (nativeFontFace) {\n        this.addNativeFontFace(nativeFontFace);\n        try {\n          await nativeFontFace.loaded;\n        } catch (ex) {\n          warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);\n\n          // When font loading failed, fall back to the built-in font renderer.\n          font.disableFontFace = true;\n          throw ex;\n        }\n      }\n      return; // The font was, asynchronously, loaded.\n    }\n\n    // !this.isFontLoadingAPISupported\n    const rule = font.createFontFaceRule();\n    if (rule) {\n      this.insertRule(rule);\n\n      if (this.isSyncFontLoadingSupported) {\n        return; // The font was, synchronously, loaded.\n      }\n      if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n        throw new Error(\"Not implemented: async font loading\");\n      }\n      await new Promise(resolve => {\n        const request = this._queueLoadingCallback(resolve);\n        this._prepareFontLoadEvent(font, request);\n      });\n      // The font was, asynchronously, loaded.\n    }\n  }\n\n  get isFontLoadingAPISupported() {\n    const hasFonts = !!this._document?.fonts;\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      return shadow(\n        this,\n        \"isFontLoadingAPISupported\",\n        hasFonts && !this.styleElement\n      );\n    }\n    return shadow(this, \"isFontLoadingAPISupported\", hasFonts);\n  }\n\n  get isSyncFontLoadingSupported() {\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      return shadow(this, \"isSyncFontLoadingSupported\", true);\n    }\n\n    let supported = false;\n    if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"CHROME\")) {\n      if (isNodeJS) {\n        // Node.js - we can pretend that sync font loading is supported.\n        supported = true;\n      } else if (\n        typeof navigator !== \"undefined\" &&\n        // User agent string sniffing is bad, but there is no reliable way to\n        // tell if the font is fully loaded and ready to be used with canvas.\n        /Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent)\n      ) {\n        // Firefox, from version 14, supports synchronous font loading.\n        supported = true;\n      }\n    }\n    return shadow(this, \"isSyncFontLoadingSupported\", supported);\n  }\n\n  _queueLoadingCallback(callback) {\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      throw new Error(\"Not implemented: _queueLoadingCallback\");\n    }\n\n    function completeRequest() {\n      assert(!request.done, \"completeRequest() cannot be called twice.\");\n      request.done = true;\n\n      // Sending all completed requests in order of how they were queued.\n      while (loadingRequests.length > 0 && loadingRequests[0].done) {\n        const otherRequest = loadingRequests.shift();\n        setTimeout(otherRequest.callback, 0);\n      }\n    }\n\n    const { loadingRequests } = this;\n    const request = {\n      done: false,\n      complete: completeRequest,\n      callback,\n    };\n    loadingRequests.push(request);\n    return request;\n  }\n\n  get _loadTestFont() {\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      throw new Error(\"Not implemented: _loadTestFont\");\n    }\n\n    // This is a CFF font with 1 glyph for '.' that fills its entire width\n    // and height.\n    const testFont = atob(\n      \"T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA\" +\n        \"FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA\" +\n        \"ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA\" +\n        \"AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1\" +\n        \"AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD\" +\n        \"6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACM\" +\n        \"AooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4D\" +\n        \"IP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAA\" +\n        \"AAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUA\" +\n        \"AQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgAB\" +\n        \"AAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABY\" +\n        \"AAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAA\" +\n        \"AC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n        \"AAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\" +\n        \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAA\" +\n        \"AAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQAC\" +\n        \"AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3\" +\n        \"Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj\" +\n        \"FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==\"\n    );\n    return shadow(this, \"_loadTestFont\", testFont);\n  }\n\n  _prepareFontLoadEvent(font, request) {\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      throw new Error(\"Not implemented: _prepareFontLoadEvent\");\n    }\n\n    /** Hack begin */\n    // There's currently no event when a font has finished downloading so the\n    // following code is a dirty hack to 'guess' when a font is ready.\n    // It's assumed fonts are loaded in order, so add a known test font after\n    // the desired fonts and then test for the loading of that test font.\n\n    function int32(data, offset) {\n      return (\n        (data.charCodeAt(offset) << 24) |\n        (data.charCodeAt(offset + 1) << 16) |\n        (data.charCodeAt(offset + 2) << 8) |\n        (data.charCodeAt(offset + 3) & 0xff)\n      );\n    }\n    function spliceString(s, offset, remove, insert) {\n      const chunk1 = s.substring(0, offset);\n      const chunk2 = s.substring(offset + remove);\n      return chunk1 + insert + chunk2;\n    }\n    let i, ii;\n\n    // The temporary canvas is used to determine if fonts are loaded.\n    const canvas = this._document.createElement(\"canvas\");\n    canvas.width = 1;\n    canvas.height = 1;\n    const ctx = canvas.getContext(\"2d\");\n\n    let called = 0;\n    function isFontReady(name, callback) {\n      // With setTimeout clamping this gives the font ~100ms to load.\n      if (++called > 30) {\n        warn(\"Load test font never loaded.\");\n        callback();\n        return;\n      }\n      ctx.font = \"30px \" + name;\n      ctx.fillText(\".\", 0, 20);\n      const imageData = ctx.getImageData(0, 0, 1, 1);\n      if (imageData.data[3] > 0) {\n        callback();\n        return;\n      }\n      setTimeout(isFontReady.bind(null, name, callback));\n    }\n\n    const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`;\n    // Chromium seems to cache fonts based on a hash of the actual font data,\n    // so the font must be modified for each load test else it will appear to\n    // be loaded already.\n    // TODO: This could maybe be made faster by avoiding the btoa of the full\n    // font by splitting it in chunks before hand and padding the font id.\n    let data = this._loadTestFont;\n    const COMMENT_OFFSET = 976; // has to be on 4 byte boundary (for checksum)\n    data = spliceString(\n      data,\n      COMMENT_OFFSET,\n      loadTestFontId.length,\n      loadTestFontId\n    );\n    // CFF checksum is important for IE, adjusting it\n    const CFF_CHECKSUM_OFFSET = 16;\n    const XXXX_VALUE = 0x58585858; // the \"comment\" filled with 'X'\n    let checksum = int32(data, CFF_CHECKSUM_OFFSET);\n    for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n      checksum = (checksum - XXXX_VALUE + int32(loadTestFontId, i)) | 0;\n    }\n    if (i < loadTestFontId.length) {\n      // align to 4 bytes boundary\n      checksum = (checksum - XXXX_VALUE + int32(loadTestFontId + \"XXX\", i)) | 0;\n    }\n    data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, string32(checksum));\n\n    const url = `url(data:font/opentype;base64,${btoa(data)});`;\n    const rule = `@font-face {font-family:\"${loadTestFontId}\";src:${url}}`;\n    this.insertRule(rule);\n\n    const div = this._document.createElement(\"div\");\n    div.style.visibility = \"hidden\";\n    div.style.width = div.style.height = \"10px\";\n    div.style.position = \"absolute\";\n    div.style.top = div.style.left = \"0px\";\n\n    for (const name of [font.loadedName, loadTestFontId]) {\n      const span = this._document.createElement(\"span\");\n      span.textContent = \"Hi\";\n      span.style.fontFamily = name;\n      div.append(span);\n    }\n    this._document.body.append(div);\n\n    isFontReady(loadTestFontId, () => {\n      div.remove();\n      request.complete();\n    });\n    /** Hack end */\n  }\n}\n\nclass FontFaceObject {\n  constructor(\n    translatedData,\n    {\n      isEvalSupported = true,\n      disableFontFace = false,\n      ignoreErrors = false,\n      inspectFont = null,\n    }\n  ) {\n    this.compiledGlyphs = Object.create(null);\n    // importing translated data\n    for (const i in translatedData) {\n      this[i] = translatedData[i];\n    }\n    this.isEvalSupported = isEvalSupported !== false;\n    this.disableFontFace = disableFontFace === true;\n    this.ignoreErrors = ignoreErrors === true;\n    this._inspectFont = inspectFont;\n  }\n\n  createNativeFontFace() {\n    if (!this.data || this.disableFontFace) {\n      return null;\n    }\n    let nativeFontFace;\n    if (!this.cssFontInfo) {\n      nativeFontFace = new FontFace(this.loadedName, this.data, {});\n    } else {\n      const css = {\n        weight: this.cssFontInfo.fontWeight,\n      };\n      if (this.cssFontInfo.italicAngle) {\n        css.style = `oblique ${this.cssFontInfo.italicAngle}deg`;\n      }\n      nativeFontFace = new FontFace(\n        this.cssFontInfo.fontFamily,\n        this.data,\n        css\n      );\n    }\n\n    this._inspectFont?.(this);\n    return nativeFontFace;\n  }\n\n  createFontFaceRule() {\n    if (!this.data || this.disableFontFace) {\n      return null;\n    }\n    const data = bytesToString(this.data);\n    // Add the @font-face rule to the document.\n    const url = `url(data:${this.mimetype};base64,${btoa(data)});`;\n    let rule;\n    if (!this.cssFontInfo) {\n      rule = `@font-face {font-family:\"${this.loadedName}\";src:${url}}`;\n    } else {\n      let css = `font-weight: ${this.cssFontInfo.fontWeight};`;\n      if (this.cssFontInfo.italicAngle) {\n        css += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`;\n      }\n      rule = `@font-face {font-family:\"${this.cssFontInfo.fontFamily}\";${css}src:${url}}`;\n    }\n\n    this._inspectFont?.(this, url);\n    return rule;\n  }\n\n  getPathGenerator(objs, character) {\n    if (this.compiledGlyphs[character] !== undefined) {\n      return this.compiledGlyphs[character];\n    }\n\n    let cmds;\n    try {\n      cmds = objs.get(this.loadedName + \"_path_\" + character);\n    } catch (ex) {\n      if (!this.ignoreErrors) {\n        throw ex;\n      }\n      warn(`getPathGenerator - ignoring character: \"${ex}\".`);\n\n      return (this.compiledGlyphs[character] = function (c, size) {\n        // No-op function, to allow rendering to continue.\n      });\n    }\n\n    // If we can, compile cmds into JS for MAXIMUM SPEED...\n    if (this.isEvalSupported && FeatureTest.isEvalSupported) {\n      const jsBuf = [];\n      for (const current of cmds) {\n        const args = current.args !== undefined ? current.args.join(\",\") : \"\";\n        jsBuf.push(\"c.\", current.cmd, \"(\", args, \");\\n\");\n      }\n      // eslint-disable-next-line no-new-func\n      return (this.compiledGlyphs[character] = new Function(\n        \"c\",\n        \"size\",\n        jsBuf.join(\"\")\n      ));\n    }\n    // ... but fall back on using Function.prototype.apply() if we're\n    // blocked from using eval() for whatever reason (like CSP policies).\n    return (this.compiledGlyphs[character] = function (c, size) {\n      for (const current of cmds) {\n        if (current.cmd === \"scale\") {\n          current.args = [size, -size];\n        }\n        // eslint-disable-next-line prefer-spread\n        c[current.cmd].apply(c, current.args);\n      }\n    });\n  }\n}\n\nexport { FontFaceObject, FontLoader };\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals __non_webpack_require__ */\n\nimport {\n  BaseCanvasFactory,\n  BaseCMapReaderFactory,\n  BaseFilterFactory,\n  BaseStandardFontDataFactory,\n} from \"./base_factory.js\";\nimport { isNodeJS, warn } from \"../shared/util.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n  throw new Error(\n    'Module \"./node_utils.js\" shall not be used with MOZCENTRAL builds.'\n  );\n}\n\nif (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"SKIP_BABEL\")) {\n  (function checkDOMMatrix() {\n    if (globalThis.DOMMatrix || !isNodeJS) {\n      return;\n    }\n    try {\n      globalThis.DOMMatrix = __non_webpack_require__(\"canvas\").DOMMatrix;\n    } catch (ex) {\n      warn(`Cannot polyfill \\`DOMMatrix\\`, rendering may be broken: \"${ex}\".`);\n    }\n  })();\n\n  (function checkPath2D() {\n    if (globalThis.Path2D || !isNodeJS) {\n      return;\n    }\n    try {\n      const { CanvasRenderingContext2D } = __non_webpack_require__(\"canvas\");\n      const { polyfillPath2D } = __non_webpack_require__(\"path2d-polyfill\");\n\n      globalThis.CanvasRenderingContext2D = CanvasRenderingContext2D;\n      polyfillPath2D(globalThis);\n    } catch (ex) {\n      warn(`Cannot polyfill \\`Path2D\\`, rendering may be broken: \"${ex}\".`);\n    }\n  })();\n}\n\nconst fetchData = function (url) {\n  return new Promise((resolve, reject) => {\n    const fs = __non_webpack_require__(\"fs\");\n    fs.readFile(url, (error, data) => {\n      if (error || !data) {\n        reject(new Error(error));\n        return;\n      }\n      resolve(new Uint8Array(data));\n    });\n  });\n};\n\nclass NodeFilterFactory extends BaseFilterFactory {}\n\nclass NodeCanvasFactory extends BaseCanvasFactory {\n  /**\n   * @ignore\n   */\n  _createCanvas(width, height) {\n    const Canvas = __non_webpack_require__(\"canvas\");\n    return Canvas.createCanvas(width, height);\n  }\n}\n\nclass NodeCMapReaderFactory extends BaseCMapReaderFactory {\n  /**\n   * @ignore\n   */\n  _fetchData(url, compressionType) {\n    return fetchData(url).then(data => {\n      return { cMapData: data, compressionType };\n    });\n  }\n}\n\nclass NodeStandardFontDataFactory extends BaseStandardFontDataFactory {\n  /**\n   * @ignore\n   */\n  _fetchData(url) {\n    return fetchData(url);\n  }\n}\n\nexport {\n  NodeCanvasFactory,\n  NodeCMapReaderFactory,\n  NodeFilterFactory,\n  NodeStandardFontDataFactory,\n};\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  FeatureTest,\n  FONT_IDENTITY_MATRIX,\n  IDENTITY_MATRIX,\n  ImageKind,\n  info,\n  isNodeJS,\n  OPS,\n  shadow,\n  TextRenderingMode,\n  unreachable,\n  Util,\n  warn,\n} from \"../shared/util.js\";\nimport {\n  getCurrentTransform,\n  getCurrentTransformInverse,\n  PixelsPerInch,\n} from \"./display_utils.js\";\nimport {\n  getShadingPattern,\n  PathType,\n  TilingPattern,\n} from \"./pattern_helper.js\";\nimport { convertBlackAndWhiteToRGBA } from \"../shared/image_utils.js\";\n\n// <canvas> contexts store most of the state we need natively.\n// However, PDF needs a bit more state, which we store here.\n// Minimal font size that would be used during canvas fillText operations.\nconst MIN_FONT_SIZE = 16;\n// Maximum font size that would be used during canvas fillText operations.\nconst MAX_FONT_SIZE = 100;\nconst MAX_GROUP_SIZE = 4096;\n\n// Defines the time the `executeOperatorList`-method is going to be executing\n// before it stops and schedules a continue of execution.\nconst EXECUTION_TIME = 15; // ms\n// Defines the number of steps before checking the execution time.\nconst EXECUTION_STEPS = 10;\n\n// To disable Type3 compilation, set the value to `-1`.\nconst MAX_SIZE_TO_COMPILE = 1000;\n\nconst FULL_CHUNK_HEIGHT = 16;\n\n/**\n * Overrides certain methods on a 2d ctx so that when they are called they\n * will also call the same method on the destCtx. The methods that are\n * overridden are all the transformation state modifiers, path creation, and\n * save/restore. We only forward these specific methods because they are the\n * only state modifiers that we cannot copy over when we switch contexts.\n *\n * To remove mirroring call `ctx._removeMirroring()`.\n *\n * @param {Object} ctx - The 2d canvas context that will duplicate its calls on\n *   the destCtx.\n * @param {Object} destCtx - The 2d canvas context that will receive the\n *   forwarded calls.\n */\nfunction mirrorContextOperations(ctx, destCtx) {\n  if (ctx._removeMirroring) {\n    throw new Error(\"Context is already forwarding operations.\");\n  }\n  ctx.__originalSave = ctx.save;\n  ctx.__originalRestore = ctx.restore;\n  ctx.__originalRotate = ctx.rotate;\n  ctx.__originalScale = ctx.scale;\n  ctx.__originalTranslate = ctx.translate;\n  ctx.__originalTransform = ctx.transform;\n  ctx.__originalSetTransform = ctx.setTransform;\n  ctx.__originalResetTransform = ctx.resetTransform;\n  ctx.__originalClip = ctx.clip;\n  ctx.__originalMoveTo = ctx.moveTo;\n  ctx.__originalLineTo = ctx.lineTo;\n  ctx.__originalBezierCurveTo = ctx.bezierCurveTo;\n  ctx.__originalRect = ctx.rect;\n  ctx.__originalClosePath = ctx.closePath;\n  ctx.__originalBeginPath = ctx.beginPath;\n\n  ctx._removeMirroring = () => {\n    ctx.save = ctx.__originalSave;\n    ctx.restore = ctx.__originalRestore;\n    ctx.rotate = ctx.__originalRotate;\n    ctx.scale = ctx.__originalScale;\n    ctx.translate = ctx.__originalTranslate;\n    ctx.transform = ctx.__originalTransform;\n    ctx.setTransform = ctx.__originalSetTransform;\n    ctx.resetTransform = ctx.__originalResetTransform;\n\n    ctx.clip = ctx.__originalClip;\n    ctx.moveTo = ctx.__originalMoveTo;\n    ctx.lineTo = ctx.__originalLineTo;\n    ctx.bezierCurveTo = ctx.__originalBezierCurveTo;\n    ctx.rect = ctx.__originalRect;\n    ctx.closePath = ctx.__originalClosePath;\n    ctx.beginPath = ctx.__originalBeginPath;\n    delete ctx._removeMirroring;\n  };\n\n  ctx.save = function ctxSave() {\n    destCtx.save();\n    this.__originalSave();\n  };\n\n  ctx.restore = function ctxRestore() {\n    destCtx.restore();\n    this.__originalRestore();\n  };\n\n  ctx.translate = function ctxTranslate(x, y) {\n    destCtx.translate(x, y);\n    this.__originalTranslate(x, y);\n  };\n\n  ctx.scale = function ctxScale(x, y) {\n    destCtx.scale(x, y);\n    this.__originalScale(x, y);\n  };\n\n  ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n    destCtx.transform(a, b, c, d, e, f);\n    this.__originalTransform(a, b, c, d, e, f);\n  };\n\n  ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n    destCtx.setTransform(a, b, c, d, e, f);\n    this.__originalSetTransform(a, b, c, d, e, f);\n  };\n\n  ctx.resetTransform = function ctxResetTransform() {\n    destCtx.resetTransform();\n    this.__originalResetTransform();\n  };\n\n  ctx.rotate = function ctxRotate(angle) {\n    destCtx.rotate(angle);\n    this.__originalRotate(angle);\n  };\n\n  ctx.clip = function ctxRotate(rule) {\n    destCtx.clip(rule);\n    this.__originalClip(rule);\n  };\n\n  ctx.moveTo = function (x, y) {\n    destCtx.moveTo(x, y);\n    this.__originalMoveTo(x, y);\n  };\n\n  ctx.lineTo = function (x, y) {\n    destCtx.lineTo(x, y);\n    this.__originalLineTo(x, y);\n  };\n\n  ctx.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {\n    destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n    this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n  };\n\n  ctx.rect = function (x, y, width, height) {\n    destCtx.rect(x, y, width, height);\n    this.__originalRect(x, y, width, height);\n  };\n\n  ctx.closePath = function () {\n    destCtx.closePath();\n    this.__originalClosePath();\n  };\n\n  ctx.beginPath = function () {\n    destCtx.beginPath();\n    this.__originalBeginPath();\n  };\n}\n\nclass CachedCanvases {\n  constructor(canvasFactory) {\n    this.canvasFactory = canvasFactory;\n    this.cache = Object.create(null);\n  }\n\n  getCanvas(id, width, height) {\n    let canvasEntry;\n    if (this.cache[id] !== undefined) {\n      canvasEntry = this.cache[id];\n      this.canvasFactory.reset(canvasEntry, width, height);\n    } else {\n      canvasEntry = this.canvasFactory.create(width, height);\n      this.cache[id] = canvasEntry;\n    }\n    return canvasEntry;\n  }\n\n  delete(id) {\n    delete this.cache[id];\n  }\n\n  clear() {\n    for (const id in this.cache) {\n      const canvasEntry = this.cache[id];\n      this.canvasFactory.destroy(canvasEntry);\n      delete this.cache[id];\n    }\n  }\n}\n\nfunction drawImageAtIntegerCoords(\n  ctx,\n  srcImg,\n  srcX,\n  srcY,\n  srcW,\n  srcH,\n  destX,\n  destY,\n  destW,\n  destH\n) {\n  const [a, b, c, d, tx, ty] = getCurrentTransform(ctx);\n  if (b === 0 && c === 0) {\n    // top-left corner is at (X, Y) and\n    // bottom-right one is at (X + width, Y + height).\n\n    // If leftX is 4.321 then it's rounded to 4.\n    // If width is 10.432 then it's rounded to 11 because\n    // rightX = leftX + width = 14.753 which is rounded to 15\n    // so after rounding the total width is 11 (15 - 4).\n    // It's why we can't just floor/ceil uniformly, it just depends\n    // on the values we've.\n\n    const tlX = destX * a + tx;\n    const rTlX = Math.round(tlX);\n    const tlY = destY * d + ty;\n    const rTlY = Math.round(tlY);\n    const brX = (destX + destW) * a + tx;\n\n    // Some pdf contains images with 1x1 images so in case of 0-width after\n    // scaling we must fallback on 1 to be sure there is something.\n    const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n    const brY = (destY + destH) * d + ty;\n    const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n\n    // We must apply a transformation in order to apply it on the image itself.\n    // For example if a == 1 && d == -1, it means that the image itself is\n    // mirrored w.r.t. the x-axis.\n    ctx.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);\n    ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);\n    ctx.setTransform(a, b, c, d, tx, ty);\n\n    return [rWidth, rHeight];\n  }\n\n  if (a === 0 && d === 0) {\n    // This path is taken in issue9462.pdf (page 3).\n    const tlX = destY * c + tx;\n    const rTlX = Math.round(tlX);\n    const tlY = destX * b + ty;\n    const rTlY = Math.round(tlY);\n    const brX = (destY + destH) * c + tx;\n    const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n    const brY = (destX + destW) * b + ty;\n    const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n\n    ctx.setTransform(0, Math.sign(b), Math.sign(c), 0, rTlX, rTlY);\n    ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);\n    ctx.setTransform(a, b, c, d, tx, ty);\n\n    return [rHeight, rWidth];\n  }\n\n  // Not a scale matrix so let the render handle the case without rounding.\n  ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);\n\n  const scaleX = Math.hypot(a, b);\n  const scaleY = Math.hypot(c, d);\n  return [scaleX * destW, scaleY * destH];\n}\n\nfunction compileType3Glyph(imgData) {\n  const { width, height } = imgData;\n  if (width > MAX_SIZE_TO_COMPILE || height > MAX_SIZE_TO_COMPILE) {\n    return null;\n  }\n\n  const POINT_TO_PROCESS_LIMIT = 1000;\n  const POINT_TYPES = new Uint8Array([\n    0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0,\n  ]);\n\n  const width1 = width + 1;\n  let points = new Uint8Array(width1 * (height + 1));\n  let i, j, j0;\n\n  // decodes bit-packed mask data\n  const lineSize = (width + 7) & ~7;\n  let data = new Uint8Array(lineSize * height),\n    pos = 0;\n  for (const elem of imgData.data) {\n    let mask = 128;\n    while (mask > 0) {\n      data[pos++] = elem & mask ? 0 : 255;\n      mask >>= 1;\n    }\n  }\n\n  // finding interesting points: every point is located between mask pixels,\n  // so there will be points of the (width + 1)x(height + 1) grid. Every point\n  // will have flags assigned based on neighboring mask pixels:\n  //   4 | 8\n  //   --P--\n  //   2 | 1\n  // We are interested only in points with the flags:\n  //   - outside corners: 1, 2, 4, 8;\n  //   - inside corners: 7, 11, 13, 14;\n  //   - and, intersections: 5, 10.\n  let count = 0;\n  pos = 0;\n  if (data[pos] !== 0) {\n    points[0] = 1;\n    ++count;\n  }\n  for (j = 1; j < width; j++) {\n    if (data[pos] !== data[pos + 1]) {\n      points[j] = data[pos] ? 2 : 1;\n      ++count;\n    }\n    pos++;\n  }\n  if (data[pos] !== 0) {\n    points[j] = 2;\n    ++count;\n  }\n  for (i = 1; i < height; i++) {\n    pos = i * lineSize;\n    j0 = i * width1;\n    if (data[pos - lineSize] !== data[pos]) {\n      points[j0] = data[pos] ? 1 : 8;\n      ++count;\n    }\n    // 'sum' is the position of the current pixel configuration in the 'TYPES'\n    // array (in order 8-1-2-4, so we can use '>>2' to shift the column).\n    let sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n    for (j = 1; j < width; j++) {\n      sum =\n        (sum >> 2) +\n        (data[pos + 1] ? 4 : 0) +\n        (data[pos - lineSize + 1] ? 8 : 0);\n      if (POINT_TYPES[sum]) {\n        points[j0 + j] = POINT_TYPES[sum];\n        ++count;\n      }\n      pos++;\n    }\n    if (data[pos - lineSize] !== data[pos]) {\n      points[j0 + j] = data[pos] ? 2 : 4;\n      ++count;\n    }\n\n    if (count > POINT_TO_PROCESS_LIMIT) {\n      return null;\n    }\n  }\n\n  pos = lineSize * (height - 1);\n  j0 = i * width1;\n  if (data[pos] !== 0) {\n    points[j0] = 8;\n    ++count;\n  }\n  for (j = 1; j < width; j++) {\n    if (data[pos] !== data[pos + 1]) {\n      points[j0 + j] = data[pos] ? 4 : 8;\n      ++count;\n    }\n    pos++;\n  }\n  if (data[pos] !== 0) {\n    points[j0 + j] = 4;\n    ++count;\n  }\n  if (count > POINT_TO_PROCESS_LIMIT) {\n    return null;\n  }\n\n  // building outlines\n  const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n  const path = new Path2D();\n\n  for (i = 0; count && i <= height; i++) {\n    let p = i * width1;\n    const end = p + width;\n    while (p < end && !points[p]) {\n      p++;\n    }\n    if (p === end) {\n      continue;\n    }\n    path.moveTo(p % width1, i);\n\n    const p0 = p;\n    let type = points[p];\n    do {\n      const step = steps[type];\n      do {\n        p += step;\n      } while (!points[p]);\n\n      const pp = points[p];\n      if (pp !== 5 && pp !== 10) {\n        // set new direction\n        type = pp;\n        // delete mark\n        points[p] = 0;\n      } else {\n        // type is 5 or 10, ie, a crossing\n        // set new direction\n        type = pp & ((0x33 * type) >> 4);\n        // set new type for \"future hit\"\n        points[p] &= (type >> 2) | (type << 2);\n      }\n      path.lineTo(p % width1, (p / width1) | 0);\n\n      if (!points[p]) {\n        --count;\n      }\n    } while (p0 !== p);\n    --i;\n  }\n\n  // Immediately release the, potentially large, `Uint8Array`s after parsing.\n  data = null;\n  points = null;\n\n  const drawOutline = function (c) {\n    c.save();\n    // the path shall be painted in [0..1]x[0..1] space\n    c.scale(1 / width, -1 / height);\n    c.translate(0, -height);\n    c.fill(path);\n    c.beginPath();\n    c.restore();\n  };\n\n  return drawOutline;\n}\n\nclass CanvasExtraState {\n  constructor(width, height) {\n    // Are soft masks and alpha values shapes or opacities?\n    this.alphaIsShape = false;\n    this.fontSize = 0;\n    this.fontSizeScale = 1;\n    this.textMatrix = IDENTITY_MATRIX;\n    this.textMatrixScale = 1;\n    this.fontMatrix = FONT_IDENTITY_MATRIX;\n    this.leading = 0;\n    // Current point (in user coordinates)\n    this.x = 0;\n    this.y = 0;\n    // Start of text line (in text coordinates)\n    this.lineX = 0;\n    this.lineY = 0;\n    // Character and word spacing\n    this.charSpacing = 0;\n    this.wordSpacing = 0;\n    this.textHScale = 1;\n    this.textRenderingMode = TextRenderingMode.FILL;\n    this.textRise = 0;\n    // Default fore and background colors\n    this.fillColor = \"#000000\";\n    this.strokeColor = \"#000000\";\n    this.patternFill = false;\n    // Note: fill alpha applies to all non-stroking operations\n    this.fillAlpha = 1;\n    this.strokeAlpha = 1;\n    this.lineWidth = 1;\n    this.activeSMask = null;\n    this.transferMaps = \"none\";\n\n    this.startNewPathAndClipBox([0, 0, width, height]);\n  }\n\n  clone() {\n    const clone = Object.create(this);\n    clone.clipBox = this.clipBox.slice();\n    return clone;\n  }\n\n  setCurrentPoint(x, y) {\n    this.x = x;\n    this.y = y;\n  }\n\n  updatePathMinMax(transform, x, y) {\n    [x, y] = Util.applyTransform([x, y], transform);\n    this.minX = Math.min(this.minX, x);\n    this.minY = Math.min(this.minY, y);\n    this.maxX = Math.max(this.maxX, x);\n    this.maxY = Math.max(this.maxY, y);\n  }\n\n  updateRectMinMax(transform, rect) {\n    const p1 = Util.applyTransform(rect, transform);\n    const p2 = Util.applyTransform(rect.slice(2), transform);\n    this.minX = Math.min(this.minX, p1[0], p2[0]);\n    this.minY = Math.min(this.minY, p1[1], p2[1]);\n    this.maxX = Math.max(this.maxX, p1[0], p2[0]);\n    this.maxY = Math.max(this.maxY, p1[1], p2[1]);\n  }\n\n  updateScalingPathMinMax(transform, minMax) {\n    Util.scaleMinMax(transform, minMax);\n    this.minX = Math.min(this.minX, minMax[0]);\n    this.maxX = Math.max(this.maxX, minMax[1]);\n    this.minY = Math.min(this.minY, minMax[2]);\n    this.maxY = Math.max(this.maxY, minMax[3]);\n  }\n\n  updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n    const box = Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3);\n    if (minMax) {\n      minMax[0] = Math.min(minMax[0], box[0], box[2]);\n      minMax[1] = Math.max(minMax[1], box[0], box[2]);\n      minMax[2] = Math.min(minMax[2], box[1], box[3]);\n      minMax[3] = Math.max(minMax[3], box[1], box[3]);\n      return;\n    }\n    this.updateRectMinMax(transform, box);\n  }\n\n  getPathBoundingBox(pathType = PathType.FILL, transform = null) {\n    const box = [this.minX, this.minY, this.maxX, this.maxY];\n    if (pathType === PathType.STROKE) {\n      if (!transform) {\n        unreachable(\"Stroke bounding box must include transform.\");\n      }\n      // Stroked paths can be outside of the path bounding box by 1/2 the line\n      // width.\n      const scale = Util.singularValueDecompose2dScale(transform);\n      const xStrokePad = (scale[0] * this.lineWidth) / 2;\n      const yStrokePad = (scale[1] * this.lineWidth) / 2;\n      box[0] -= xStrokePad;\n      box[1] -= yStrokePad;\n      box[2] += xStrokePad;\n      box[3] += yStrokePad;\n    }\n    return box;\n  }\n\n  updateClipFromPath() {\n    const intersect = Util.intersect(this.clipBox, this.getPathBoundingBox());\n    this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);\n  }\n\n  isEmptyClip() {\n    return this.minX === Infinity;\n  }\n\n  startNewPathAndClipBox(box) {\n    this.clipBox = box;\n    this.minX = Infinity;\n    this.minY = Infinity;\n    this.maxX = 0;\n    this.maxY = 0;\n  }\n\n  getClippedPathBoundingBox(pathType = PathType.FILL, transform = null) {\n    return Util.intersect(\n      this.clipBox,\n      this.getPathBoundingBox(pathType, transform)\n    );\n  }\n}\n\nfunction putBinaryImageData(ctx, imgData) {\n  if (typeof ImageData !== \"undefined\" && imgData instanceof ImageData) {\n    ctx.putImageData(imgData, 0, 0);\n    return;\n  }\n\n  // Put the image data to the canvas in chunks, rather than putting the\n  // whole image at once.  This saves JS memory, because the ImageData object\n  // is smaller. It also possibly saves C++ memory within the implementation\n  // of putImageData(). (E.g. in Firefox we make two short-lived copies of\n  // the data passed to putImageData()). |n| shouldn't be too small, however,\n  // because too many putImageData() calls will slow things down.\n  //\n  // Note: as written, if the last chunk is partial, the putImageData() call\n  // will (conceptually) put pixels past the bounds of the canvas.  But\n  // that's ok; any such pixels are ignored.\n\n  const height = imgData.height,\n    width = imgData.width;\n  const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n  const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n  const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n\n  const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n  let srcPos = 0,\n    destPos;\n  const src = imgData.data;\n  const dest = chunkImgData.data;\n  let i, j, thisChunkHeight, elemsInThisChunk;\n\n  // There are multiple forms in which the pixel data can be passed, and\n  // imgData.kind tells us which one this is.\n  if (imgData.kind === ImageKind.GRAYSCALE_1BPP) {\n    // Grayscale, 1 bit per pixel (i.e. black-and-white).\n    const srcLength = src.byteLength;\n    const dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n    const dest32DataLength = dest32.length;\n    const fullSrcDiff = (width + 7) >> 3;\n    const white = 0xffffffff;\n    const black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n\n    for (i = 0; i < totalChunks; i++) {\n      thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n      destPos = 0;\n      for (j = 0; j < thisChunkHeight; j++) {\n        const srcDiff = srcLength - srcPos;\n        let k = 0;\n        const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;\n        const kEndUnrolled = kEnd & ~7;\n        let mask = 0;\n        let srcByte = 0;\n        for (; k < kEndUnrolled; k += 8) {\n          srcByte = src[srcPos++];\n          dest32[destPos++] = srcByte & 128 ? white : black;\n          dest32[destPos++] = srcByte & 64 ? white : black;\n          dest32[destPos++] = srcByte & 32 ? white : black;\n          dest32[destPos++] = srcByte & 16 ? white : black;\n          dest32[destPos++] = srcByte & 8 ? white : black;\n          dest32[destPos++] = srcByte & 4 ? white : black;\n          dest32[destPos++] = srcByte & 2 ? white : black;\n          dest32[destPos++] = srcByte & 1 ? white : black;\n        }\n        for (; k < kEnd; k++) {\n          if (mask === 0) {\n            srcByte = src[srcPos++];\n            mask = 128;\n          }\n\n          dest32[destPos++] = srcByte & mask ? white : black;\n          mask >>= 1;\n        }\n      }\n      // We ran out of input. Make all remaining pixels transparent.\n      while (destPos < dest32DataLength) {\n        dest32[destPos++] = 0;\n      }\n\n      ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n    }\n  } else if (imgData.kind === ImageKind.RGBA_32BPP) {\n    // RGBA, 32-bits per pixel.\n    j = 0;\n    elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n    for (i = 0; i < fullChunks; i++) {\n      dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n      srcPos += elemsInThisChunk;\n\n      ctx.putImageData(chunkImgData, 0, j);\n      j += FULL_CHUNK_HEIGHT;\n    }\n    if (i < totalChunks) {\n      elemsInThisChunk = width * partialChunkHeight * 4;\n      dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n\n      ctx.putImageData(chunkImgData, 0, j);\n    }\n  } else if (imgData.kind === ImageKind.RGB_24BPP) {\n    // RGB, 24-bits per pixel.\n    thisChunkHeight = FULL_CHUNK_HEIGHT;\n    elemsInThisChunk = width * thisChunkHeight;\n    for (i = 0; i < totalChunks; i++) {\n      if (i >= fullChunks) {\n        thisChunkHeight = partialChunkHeight;\n        elemsInThisChunk = width * thisChunkHeight;\n      }\n\n      destPos = 0;\n      for (j = elemsInThisChunk; j--; ) {\n        dest[destPos++] = src[srcPos++];\n        dest[destPos++] = src[srcPos++];\n        dest[destPos++] = src[srcPos++];\n        dest[destPos++] = 255;\n      }\n\n      ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n    }\n  } else {\n    throw new Error(`bad image kind: ${imgData.kind}`);\n  }\n}\n\nfunction putBinaryImageMask(ctx, imgData) {\n  if (imgData.bitmap) {\n    // The bitmap has been created in the worker.\n    ctx.drawImage(imgData.bitmap, 0, 0);\n    return;\n  }\n\n  // Slow path: OffscreenCanvas isn't available in the worker.\n  const height = imgData.height,\n    width = imgData.width;\n  const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n  const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n  const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n\n  const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n  let srcPos = 0;\n  const src = imgData.data;\n  const dest = chunkImgData.data;\n\n  for (let i = 0; i < totalChunks; i++) {\n    const thisChunkHeight =\n      i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n\n    // Expand the mask so it can be used by the canvas.  Any required\n    // inversion has already been handled.\n\n    ({ srcPos } = convertBlackAndWhiteToRGBA({\n      src,\n      srcPos,\n      dest,\n      width,\n      height: thisChunkHeight,\n      nonBlackColor: 0,\n    }));\n\n    ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n  }\n}\n\nfunction copyCtxState(sourceCtx, destCtx) {\n  const properties = [\n    \"strokeStyle\",\n    \"fillStyle\",\n    \"fillRule\",\n    \"globalAlpha\",\n    \"lineWidth\",\n    \"lineCap\",\n    \"lineJoin\",\n    \"miterLimit\",\n    \"globalCompositeOperation\",\n    \"font\",\n    \"filter\",\n  ];\n  for (const property of properties) {\n    if (sourceCtx[property] !== undefined) {\n      destCtx[property] = sourceCtx[property];\n    }\n  }\n  if (sourceCtx.setLineDash !== undefined) {\n    destCtx.setLineDash(sourceCtx.getLineDash());\n    destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n  }\n}\n\nfunction resetCtxToDefault(ctx) {\n  ctx.strokeStyle = ctx.fillStyle = \"#000000\";\n  ctx.fillRule = \"nonzero\";\n  ctx.globalAlpha = 1;\n  ctx.lineWidth = 1;\n  ctx.lineCap = \"butt\";\n  ctx.lineJoin = \"miter\";\n  ctx.miterLimit = 10;\n  ctx.globalCompositeOperation = \"source-over\";\n  ctx.font = \"10px sans-serif\";\n  if (ctx.setLineDash !== undefined) {\n    ctx.setLineDash([]);\n    ctx.lineDashOffset = 0;\n  }\n  if (\n    (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n    !isNodeJS\n  ) {\n    const { filter } = ctx;\n    if (filter !== \"none\" && filter !== \"\") {\n      ctx.filter = \"none\";\n    }\n  }\n}\n\nfunction composeSMaskBackdrop(bytes, r0, g0, b0) {\n  const length = bytes.length;\n  for (let i = 3; i < length; i += 4) {\n    const alpha = bytes[i];\n    if (alpha === 0) {\n      bytes[i - 3] = r0;\n      bytes[i - 2] = g0;\n      bytes[i - 1] = b0;\n    } else if (alpha < 255) {\n      const alpha_ = 255 - alpha;\n      bytes[i - 3] = (bytes[i - 3] * alpha + r0 * alpha_) >> 8;\n      bytes[i - 2] = (bytes[i - 2] * alpha + g0 * alpha_) >> 8;\n      bytes[i - 1] = (bytes[i - 1] * alpha + b0 * alpha_) >> 8;\n    }\n  }\n}\n\nfunction composeSMaskAlpha(maskData, layerData, transferMap) {\n  const length = maskData.length;\n  const scale = 1 / 255;\n  for (let i = 3; i < length; i += 4) {\n    const alpha = transferMap ? transferMap[maskData[i]] : maskData[i];\n    layerData[i] = (layerData[i] * alpha * scale) | 0;\n  }\n}\n\nfunction composeSMaskLuminosity(maskData, layerData, transferMap) {\n  const length = maskData.length;\n  for (let i = 3; i < length; i += 4) {\n    const y =\n      maskData[i - 3] * 77 + // * 0.3 / 255 * 0x10000\n      maskData[i - 2] * 152 + // * 0.59 ....\n      maskData[i - 1] * 28; // * 0.11 ....\n    layerData[i] = transferMap\n      ? (layerData[i] * transferMap[y >> 8]) >> 8\n      : (layerData[i] * y) >> 16;\n  }\n}\n\nfunction genericComposeSMask(\n  maskCtx,\n  layerCtx,\n  width,\n  height,\n  subtype,\n  backdrop,\n  transferMap,\n  layerOffsetX,\n  layerOffsetY,\n  maskOffsetX,\n  maskOffsetY\n) {\n  const hasBackdrop = !!backdrop;\n  const r0 = hasBackdrop ? backdrop[0] : 0;\n  const g0 = hasBackdrop ? backdrop[1] : 0;\n  const b0 = hasBackdrop ? backdrop[2] : 0;\n\n  const composeFn =\n    subtype === \"Luminosity\" ? composeSMaskLuminosity : composeSMaskAlpha;\n\n  // processing image in chunks to save memory\n  const PIXELS_TO_PROCESS = 1048576;\n  const chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));\n  for (let row = 0; row < height; row += chunkSize) {\n    const chunkHeight = Math.min(chunkSize, height - row);\n    const maskData = maskCtx.getImageData(\n      layerOffsetX - maskOffsetX,\n      row + (layerOffsetY - maskOffsetY),\n      width,\n      chunkHeight\n    );\n    const layerData = layerCtx.getImageData(\n      layerOffsetX,\n      row + layerOffsetY,\n      width,\n      chunkHeight\n    );\n\n    if (hasBackdrop) {\n      composeSMaskBackdrop(maskData.data, r0, g0, b0);\n    }\n    composeFn(maskData.data, layerData.data, transferMap);\n\n    layerCtx.putImageData(layerData, layerOffsetX, row + layerOffsetY);\n  }\n}\n\nfunction composeSMask(ctx, smask, layerCtx, layerBox) {\n  const layerOffsetX = layerBox[0];\n  const layerOffsetY = layerBox[1];\n  const layerWidth = layerBox[2] - layerOffsetX;\n  const layerHeight = layerBox[3] - layerOffsetY;\n  if (layerWidth === 0 || layerHeight === 0) {\n    return;\n  }\n  genericComposeSMask(\n    smask.context,\n    layerCtx,\n    layerWidth,\n    layerHeight,\n    smask.subtype,\n    smask.backdrop,\n    smask.transferMap,\n    layerOffsetX,\n    layerOffsetY,\n    smask.offsetX,\n    smask.offsetY\n  );\n  ctx.save();\n  ctx.globalAlpha = 1;\n  ctx.globalCompositeOperation = \"source-over\";\n  ctx.setTransform(1, 0, 0, 1, 0, 0);\n  ctx.drawImage(layerCtx.canvas, 0, 0);\n  ctx.restore();\n}\n\nfunction getImageSmoothingEnabled(transform, interpolate) {\n  const scale = Util.singularValueDecompose2dScale(transform);\n  // Round to a 32bit float so that `<=` check below will pass for numbers that\n  // are very close, but not exactly the same 64bit floats.\n  scale[0] = Math.fround(scale[0]);\n  scale[1] = Math.fround(scale[1]);\n  const actualScale = Math.fround(\n    (globalThis.devicePixelRatio || 1) * PixelsPerInch.PDF_TO_CSS_UNITS\n  );\n  if (interpolate !== undefined) {\n    // If the value is explicitly set use it.\n    return interpolate;\n  } else if (scale[0] <= actualScale || scale[1] <= actualScale) {\n    // Smooth when downscaling.\n    return true;\n  }\n  // Don't smooth when upscaling.\n  return false;\n}\n\nconst LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nconst LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\nconst NORMAL_CLIP = {};\nconst EO_CLIP = {};\n\nclass CanvasGraphics {\n  constructor(\n    canvasCtx,\n    commonObjs,\n    objs,\n    canvasFactory,\n    filterFactory,\n    { optionalContentConfig, markedContentStack = null },\n    annotationCanvasMap,\n    pageColors\n  ) {\n    this.ctx = canvasCtx;\n    this.current = new CanvasExtraState(\n      this.ctx.canvas.width,\n      this.ctx.canvas.height\n    );\n    this.stateStack = [];\n    this.pendingClip = null;\n    this.pendingEOFill = false;\n    this.res = null;\n    this.xobjs = null;\n    this.commonObjs = commonObjs;\n    this.objs = objs;\n    this.canvasFactory = canvasFactory;\n    this.filterFactory = filterFactory;\n    this.groupStack = [];\n    this.processingType3 = null;\n    // Patterns are painted relative to the initial page/form transform, see\n    // PDF spec 8.7.2 NOTE 1.\n    this.baseTransform = null;\n    this.baseTransformStack = [];\n    this.groupLevel = 0;\n    this.smaskStack = [];\n    this.smaskCounter = 0;\n    this.tempSMask = null;\n    this.suspendedCtx = null;\n    this.contentVisible = true;\n    this.markedContentStack = markedContentStack || [];\n    this.optionalContentConfig = optionalContentConfig;\n    this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n    this.cachedPatterns = new Map();\n    this.annotationCanvasMap = annotationCanvasMap;\n    this.viewportScale = 1;\n    this.outputScaleX = 1;\n    this.outputScaleY = 1;\n    this.pageColors = pageColors;\n\n    this._cachedScaleForStroking = [-1, 0];\n    this._cachedGetSinglePixelWidth = null;\n    this._cachedBitmapsMap = new Map();\n  }\n\n  getObject(data, fallback = null) {\n    if (typeof data === \"string\") {\n      return data.startsWith(\"g_\")\n        ? this.commonObjs.get(data)\n        : this.objs.get(data);\n    }\n    return fallback;\n  }\n\n  beginDrawing({\n    transform,\n    viewport,\n    transparency = false,\n    background = null,\n  }) {\n    // For pdfs that use blend modes we have to clear the canvas else certain\n    // blend modes can look wrong since we'd be blending with a white\n    // backdrop. The problem with a transparent backdrop though is we then\n    // don't get sub pixel anti aliasing on text, creating temporary\n    // transparent canvas when we have blend modes.\n    const width = this.ctx.canvas.width;\n    const height = this.ctx.canvas.height;\n\n    const savedFillStyle = this.ctx.fillStyle;\n    this.ctx.fillStyle = background || \"#ffffff\";\n    this.ctx.fillRect(0, 0, width, height);\n    this.ctx.fillStyle = savedFillStyle;\n\n    if (transparency) {\n      const transparentCanvas = this.cachedCanvases.getCanvas(\n        \"transparent\",\n        width,\n        height\n      );\n      this.compositeCtx = this.ctx;\n      this.transparentCanvas = transparentCanvas.canvas;\n      this.ctx = transparentCanvas.context;\n      this.ctx.save();\n      // The transform can be applied before rendering, transferring it to\n      // the new canvas.\n      this.ctx.transform(...getCurrentTransform(this.compositeCtx));\n    }\n\n    this.ctx.save();\n    resetCtxToDefault(this.ctx);\n    if (transform) {\n      this.ctx.transform(...transform);\n      this.outputScaleX = transform[0];\n      this.outputScaleY = transform[0];\n    }\n    this.ctx.transform(...viewport.transform);\n    this.viewportScale = viewport.scale;\n\n    this.baseTransform = getCurrentTransform(this.ctx);\n  }\n\n  executeOperatorList(\n    operatorList,\n    executionStartIdx,\n    continueCallback,\n    stepper\n  ) {\n    const argsArray = operatorList.argsArray;\n    const fnArray = operatorList.fnArray;\n    let i = executionStartIdx || 0;\n    const argsArrayLen = argsArray.length;\n\n    // Sometimes the OperatorList to execute is empty.\n    if (argsArrayLen === i) {\n      return i;\n    }\n\n    const chunkOperations =\n      argsArrayLen - i > EXECUTION_STEPS &&\n      typeof continueCallback === \"function\";\n    const endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n    let steps = 0;\n\n    const commonObjs = this.commonObjs;\n    const objs = this.objs;\n    let fnId;\n\n    while (true) {\n      if (stepper !== undefined && i === stepper.nextBreakPoint) {\n        stepper.breakIt(i, continueCallback);\n        return i;\n      }\n\n      fnId = fnArray[i];\n\n      if (fnId !== OPS.dependency) {\n        // eslint-disable-next-line prefer-spread\n        this[fnId].apply(this, argsArray[i]);\n      } else {\n        for (const depObjId of argsArray[i]) {\n          const objsPool = depObjId.startsWith(\"g_\") ? commonObjs : objs;\n\n          // If the promise isn't resolved yet, add the continueCallback\n          // to the promise and bail out.\n          if (!objsPool.has(depObjId)) {\n            objsPool.get(depObjId, continueCallback);\n            return i;\n          }\n        }\n      }\n\n      i++;\n\n      // If the entire operatorList was executed, stop as were done.\n      if (i === argsArrayLen) {\n        return i;\n      }\n\n      // If the execution took longer then a certain amount of time and\n      // `continueCallback` is specified, interrupt the execution.\n      if (chunkOperations && ++steps > EXECUTION_STEPS) {\n        if (Date.now() > endTime) {\n          continueCallback();\n          return i;\n        }\n        steps = 0;\n      }\n\n      // If the operatorList isn't executed completely yet OR the execution\n      // time was short enough, do another execution round.\n    }\n  }\n\n  #restoreInitialState() {\n    // Finishing all opened operations such as SMask group painting.\n    while (this.stateStack.length || this.inSMaskMode) {\n      this.restore();\n    }\n\n    this.ctx.restore();\n\n    if (this.transparentCanvas) {\n      this.ctx = this.compositeCtx;\n      this.ctx.save();\n      this.ctx.setTransform(1, 0, 0, 1, 0, 0); // Avoid apply transform twice\n      this.ctx.drawImage(this.transparentCanvas, 0, 0);\n      this.ctx.restore();\n      this.transparentCanvas = null;\n    }\n  }\n\n  endDrawing() {\n    this.#restoreInitialState();\n\n    this.cachedCanvases.clear();\n    this.cachedPatterns.clear();\n\n    for (const cache of this._cachedBitmapsMap.values()) {\n      for (const canvas of cache.values()) {\n        if (\n          typeof HTMLCanvasElement !== \"undefined\" &&\n          canvas instanceof HTMLCanvasElement\n        ) {\n          canvas.width = canvas.height = 0;\n        }\n      }\n      cache.clear();\n    }\n    this._cachedBitmapsMap.clear();\n    this.#drawFilter();\n  }\n\n  #drawFilter() {\n    if (this.pageColors) {\n      const hcmFilterId = this.filterFactory.addHCMFilter(\n        this.pageColors.foreground,\n        this.pageColors.background\n      );\n      if (hcmFilterId !== \"none\") {\n        const savedFilter = this.ctx.filter;\n        this.ctx.filter = hcmFilterId;\n        this.ctx.drawImage(this.ctx.canvas, 0, 0);\n        this.ctx.filter = savedFilter;\n      }\n    }\n  }\n\n  _scaleImage(img, inverseTransform) {\n    // Vertical or horizontal scaling shall not be more than 2 to not lose the\n    // pixels during drawImage operation, painting on the temporary canvas(es)\n    // that are twice smaller in size.\n    const width = img.width;\n    const height = img.height;\n    let widthScale = Math.max(\n      Math.hypot(inverseTransform[0], inverseTransform[1]),\n      1\n    );\n    let heightScale = Math.max(\n      Math.hypot(inverseTransform[2], inverseTransform[3]),\n      1\n    );\n\n    let paintWidth = width,\n      paintHeight = height;\n    let tmpCanvasId = \"prescale1\";\n    let tmpCanvas, tmpCtx;\n    while (\n      (widthScale > 2 && paintWidth > 1) ||\n      (heightScale > 2 && paintHeight > 1)\n    ) {\n      let newWidth = paintWidth,\n        newHeight = paintHeight;\n      if (widthScale > 2 && paintWidth > 1) {\n        // See bug 1820511 (Windows specific bug).\n        // TODO: once the above bug is fixed we could revert to:\n        // newWidth = Math.ceil(paintWidth / 2);\n        newWidth =\n          paintWidth >= 16384\n            ? Math.floor(paintWidth / 2) - 1 || 1\n            : Math.ceil(paintWidth / 2);\n        widthScale /= paintWidth / newWidth;\n      }\n      if (heightScale > 2 && paintHeight > 1) {\n        // TODO: see the comment above.\n        newHeight =\n          paintHeight >= 16384\n            ? Math.floor(paintHeight / 2) - 1 || 1\n            : Math.ceil(paintHeight) / 2;\n        heightScale /= paintHeight / newHeight;\n      }\n      tmpCanvas = this.cachedCanvases.getCanvas(\n        tmpCanvasId,\n        newWidth,\n        newHeight\n      );\n      tmpCtx = tmpCanvas.context;\n      tmpCtx.clearRect(0, 0, newWidth, newHeight);\n      tmpCtx.drawImage(\n        img,\n        0,\n        0,\n        paintWidth,\n        paintHeight,\n        0,\n        0,\n        newWidth,\n        newHeight\n      );\n      img = tmpCanvas.canvas;\n      paintWidth = newWidth;\n      paintHeight = newHeight;\n      tmpCanvasId = tmpCanvasId === \"prescale1\" ? \"prescale2\" : \"prescale1\";\n    }\n    return {\n      img,\n      paintWidth,\n      paintHeight,\n    };\n  }\n\n  _createMaskCanvas(img) {\n    const ctx = this.ctx;\n    const { width, height } = img;\n    const fillColor = this.current.fillColor;\n    const isPatternFill = this.current.patternFill;\n    const currentTransform = getCurrentTransform(ctx);\n\n    let cache, cacheKey, scaled, maskCanvas;\n    if ((img.bitmap || img.data) && img.count > 1) {\n      const mainKey = img.bitmap || img.data.buffer;\n      // We're reusing the same image several times, so we can cache it.\n      // In case we've a pattern fill we just keep the scaled version of\n      // the image.\n      // Only the scaling part matters, the translation part is just used\n      // to compute offsets (but not when filling patterns see #15573).\n      // TODO: handle the case of a pattern fill if it's possible.\n      cacheKey = JSON.stringify(\n        isPatternFill\n          ? currentTransform\n          : [currentTransform.slice(0, 4), fillColor]\n      );\n\n      cache = this._cachedBitmapsMap.get(mainKey);\n      if (!cache) {\n        cache = new Map();\n        this._cachedBitmapsMap.set(mainKey, cache);\n      }\n      const cachedImage = cache.get(cacheKey);\n      if (cachedImage && !isPatternFill) {\n        const offsetX = Math.round(\n          Math.min(currentTransform[0], currentTransform[2]) +\n            currentTransform[4]\n        );\n        const offsetY = Math.round(\n          Math.min(currentTransform[1], currentTransform[3]) +\n            currentTransform[5]\n        );\n        return {\n          canvas: cachedImage,\n          offsetX,\n          offsetY,\n        };\n      }\n      scaled = cachedImage;\n    }\n\n    if (!scaled) {\n      maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n      putBinaryImageMask(maskCanvas.context, img);\n    }\n\n    // Create the mask canvas at the size it will be drawn at and also set\n    // its transform to match the current transform so if there are any\n    // patterns applied they will be applied relative to the correct\n    // transform.\n\n    let maskToCanvas = Util.transform(currentTransform, [\n      1 / width,\n      0,\n      0,\n      -1 / height,\n      0,\n      0,\n    ]);\n    maskToCanvas = Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);\n    const cord1 = Util.applyTransform([0, 0], maskToCanvas);\n    const cord2 = Util.applyTransform([width, height], maskToCanvas);\n    const rect = Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]);\n    const drawnWidth = Math.round(rect[2] - rect[0]) || 1;\n    const drawnHeight = Math.round(rect[3] - rect[1]) || 1;\n    const fillCanvas = this.cachedCanvases.getCanvas(\n      \"fillCanvas\",\n      drawnWidth,\n      drawnHeight\n    );\n    const fillCtx = fillCanvas.context;\n\n    // The offset will be the top-left cordinate mask.\n    // If objToCanvas is [a,b,c,d,e,f] then:\n    //   - offsetX = min(a, c) + e\n    //   - offsetY = min(b, d) + f\n    const offsetX = Math.min(cord1[0], cord2[0]);\n    const offsetY = Math.min(cord1[1], cord2[1]);\n    fillCtx.translate(-offsetX, -offsetY);\n    fillCtx.transform(...maskToCanvas);\n\n    if (!scaled) {\n      // Pre-scale if needed to improve image smoothing.\n      scaled = this._scaleImage(\n        maskCanvas.canvas,\n        getCurrentTransformInverse(fillCtx)\n      );\n      scaled = scaled.img;\n      if (cache && isPatternFill) {\n        cache.set(cacheKey, scaled);\n      }\n    }\n\n    fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled(\n      getCurrentTransform(fillCtx),\n      img.interpolate\n    );\n\n    drawImageAtIntegerCoords(\n      fillCtx,\n      scaled,\n      0,\n      0,\n      scaled.width,\n      scaled.height,\n      0,\n      0,\n      width,\n      height\n    );\n    fillCtx.globalCompositeOperation = \"source-in\";\n\n    const inverse = Util.transform(getCurrentTransformInverse(fillCtx), [\n      1,\n      0,\n      0,\n      1,\n      -offsetX,\n      -offsetY,\n    ]);\n    fillCtx.fillStyle = isPatternFill\n      ? fillColor.getPattern(ctx, this, inverse, PathType.FILL)\n      : fillColor;\n\n    fillCtx.fillRect(0, 0, width, height);\n\n    if (cache && !isPatternFill) {\n      // The fill canvas is put in the cache associated to the mask image\n      // so we must remove from the cached canvas: it mustn't be used again.\n      this.cachedCanvases.delete(\"fillCanvas\");\n      cache.set(cacheKey, fillCanvas.canvas);\n    }\n\n    // Round the offsets to avoid drawing fractional pixels.\n    return {\n      canvas: fillCanvas.canvas,\n      offsetX: Math.round(offsetX),\n      offsetY: Math.round(offsetY),\n    };\n  }\n\n  // Graphics state\n  setLineWidth(width) {\n    if (width !== this.current.lineWidth) {\n      this._cachedScaleForStroking[0] = -1;\n    }\n    this.current.lineWidth = width;\n    this.ctx.lineWidth = width;\n  }\n\n  setLineCap(style) {\n    this.ctx.lineCap = LINE_CAP_STYLES[style];\n  }\n\n  setLineJoin(style) {\n    this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n  }\n\n  setMiterLimit(limit) {\n    this.ctx.miterLimit = limit;\n  }\n\n  setDash(dashArray, dashPhase) {\n    const ctx = this.ctx;\n    if (ctx.setLineDash !== undefined) {\n      ctx.setLineDash(dashArray);\n      ctx.lineDashOffset = dashPhase;\n    }\n  }\n\n  setRenderingIntent(intent) {\n    // This operation is ignored since we haven't found a use case for it yet.\n  }\n\n  setFlatness(flatness) {\n    // This operation is ignored since we haven't found a use case for it yet.\n  }\n\n  setGState(states) {\n    for (const [key, value] of states) {\n      switch (key) {\n        case \"LW\":\n          this.setLineWidth(value);\n          break;\n        case \"LC\":\n          this.setLineCap(value);\n          break;\n        case \"LJ\":\n          this.setLineJoin(value);\n          break;\n        case \"ML\":\n          this.setMiterLimit(value);\n          break;\n        case \"D\":\n          this.setDash(value[0], value[1]);\n          break;\n        case \"RI\":\n          this.setRenderingIntent(value);\n          break;\n        case \"FL\":\n          this.setFlatness(value);\n          break;\n        case \"Font\":\n          this.setFont(value[0], value[1]);\n          break;\n        case \"CA\":\n          this.current.strokeAlpha = value;\n          break;\n        case \"ca\":\n          this.current.fillAlpha = value;\n          this.ctx.globalAlpha = value;\n          break;\n        case \"BM\":\n          this.ctx.globalCompositeOperation = value;\n          break;\n        case \"SMask\":\n          this.current.activeSMask = value ? this.tempSMask : null;\n          this.tempSMask = null;\n          this.checkSMaskState();\n          break;\n        case \"TR\":\n          this.ctx.filter = this.current.transferMaps =\n            this.filterFactory.addFilter(value);\n          break;\n      }\n    }\n  }\n\n  get inSMaskMode() {\n    return !!this.suspendedCtx;\n  }\n\n  checkSMaskState() {\n    const inSMaskMode = this.inSMaskMode;\n    if (this.current.activeSMask && !inSMaskMode) {\n      this.beginSMaskMode();\n    } else if (!this.current.activeSMask && inSMaskMode) {\n      this.endSMaskMode();\n    }\n    // Else, the state is okay and nothing needs to be done.\n  }\n\n  /**\n   * Soft mask mode takes the current main drawing canvas and replaces it with\n   * a temporary canvas. Any drawing operations that happen on the temporary\n   * canvas need to be composed with the main canvas that was suspended (see\n   * `compose()`). The temporary canvas also duplicates many of its operations\n   * on the suspended canvas to keep them in sync, so that when the soft mask\n   * mode ends any clipping paths or transformations will still be active and in\n   * the right order on the canvas' graphics state stack.\n   */\n  beginSMaskMode() {\n    if (this.inSMaskMode) {\n      throw new Error(\"beginSMaskMode called while already in smask mode\");\n    }\n    const drawnWidth = this.ctx.canvas.width;\n    const drawnHeight = this.ctx.canvas.height;\n    const cacheId = \"smaskGroupAt\" + this.groupLevel;\n    const scratchCanvas = this.cachedCanvases.getCanvas(\n      cacheId,\n      drawnWidth,\n      drawnHeight\n    );\n    this.suspendedCtx = this.ctx;\n    this.ctx = scratchCanvas.context;\n    const ctx = this.ctx;\n    ctx.setTransform(...getCurrentTransform(this.suspendedCtx));\n    copyCtxState(this.suspendedCtx, ctx);\n    mirrorContextOperations(ctx, this.suspendedCtx);\n\n    this.setGState([\n      [\"BM\", \"source-over\"],\n      [\"ca\", 1],\n      [\"CA\", 1],\n    ]);\n  }\n\n  endSMaskMode() {\n    if (!this.inSMaskMode) {\n      throw new Error(\"endSMaskMode called while not in smask mode\");\n    }\n    // The soft mask is done, now restore the suspended canvas as the main\n    // drawing canvas.\n    this.ctx._removeMirroring();\n    copyCtxState(this.ctx, this.suspendedCtx);\n    this.ctx = this.suspendedCtx;\n\n    this.suspendedCtx = null;\n  }\n\n  compose(dirtyBox) {\n    if (!this.current.activeSMask) {\n      return;\n    }\n\n    if (!dirtyBox) {\n      dirtyBox = [0, 0, this.ctx.canvas.width, this.ctx.canvas.height];\n    } else {\n      dirtyBox[0] = Math.floor(dirtyBox[0]);\n      dirtyBox[1] = Math.floor(dirtyBox[1]);\n      dirtyBox[2] = Math.ceil(dirtyBox[2]);\n      dirtyBox[3] = Math.ceil(dirtyBox[3]);\n    }\n    const smask = this.current.activeSMask;\n    const suspendedCtx = this.suspendedCtx;\n\n    composeSMask(suspendedCtx, smask, this.ctx, dirtyBox);\n    // Whatever was drawn has been moved to the suspended canvas, now clear it\n    // out of the current canvas.\n    this.ctx.save();\n    this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n    this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n    this.ctx.restore();\n  }\n\n  save() {\n    if (this.inSMaskMode) {\n      // SMask mode may be turned on/off causing us to lose graphics state.\n      // Copy the temporary canvas state to the main(suspended) canvas to keep\n      // it in sync.\n      copyCtxState(this.ctx, this.suspendedCtx);\n      // Don't bother calling save on the temporary canvas since state is not\n      // saved there.\n      this.suspendedCtx.save();\n    } else {\n      this.ctx.save();\n    }\n    const old = this.current;\n    this.stateStack.push(old);\n    this.current = old.clone();\n  }\n\n  restore() {\n    if (this.stateStack.length === 0 && this.inSMaskMode) {\n      this.endSMaskMode();\n    }\n    if (this.stateStack.length !== 0) {\n      this.current = this.stateStack.pop();\n      if (this.inSMaskMode) {\n        // Graphics state is stored on the main(suspended) canvas. Restore its\n        // state then copy it over to the temporary canvas.\n        this.suspendedCtx.restore();\n        copyCtxState(this.suspendedCtx, this.ctx);\n      } else {\n        this.ctx.restore();\n      }\n      this.checkSMaskState();\n\n      // Ensure that the clipping path is reset (fixes issue6413.pdf).\n      this.pendingClip = null;\n\n      this._cachedScaleForStroking[0] = -1;\n      this._cachedGetSinglePixelWidth = null;\n    }\n  }\n\n  transform(a, b, c, d, e, f) {\n    this.ctx.transform(a, b, c, d, e, f);\n\n    this._cachedScaleForStroking[0] = -1;\n    this._cachedGetSinglePixelWidth = null;\n  }\n\n  // Path\n  constructPath(ops, args, minMax) {\n    const ctx = this.ctx;\n    const current = this.current;\n    let x = current.x,\n      y = current.y;\n    let startX, startY;\n    const currentTransform = getCurrentTransform(ctx);\n\n    // Most of the time the current transform is a scaling matrix\n    // so we don't need to transform points before computing min/max:\n    // we can compute min/max first and then smartly \"apply\" the\n    // transform (see Util.scaleMinMax).\n    // For rectangle, moveTo and lineTo, min/max are computed in the\n    // worker (see evaluator.js).\n    const isScalingMatrix =\n      (currentTransform[0] === 0 && currentTransform[3] === 0) ||\n      (currentTransform[1] === 0 && currentTransform[2] === 0);\n    const minMaxForBezier = isScalingMatrix ? minMax.slice(0) : null;\n\n    for (let i = 0, j = 0, ii = ops.length; i < ii; i++) {\n      switch (ops[i] | 0) {\n        case OPS.rectangle:\n          x = args[j++];\n          y = args[j++];\n          const width = args[j++];\n          const height = args[j++];\n\n          const xw = x + width;\n          const yh = y + height;\n          ctx.moveTo(x, y);\n          if (width === 0 || height === 0) {\n            ctx.lineTo(xw, yh);\n          } else {\n            ctx.lineTo(xw, y);\n            ctx.lineTo(xw, yh);\n            ctx.lineTo(x, yh);\n          }\n          if (!isScalingMatrix) {\n            current.updateRectMinMax(currentTransform, [x, y, xw, yh]);\n          }\n          ctx.closePath();\n          break;\n        case OPS.moveTo:\n          x = args[j++];\n          y = args[j++];\n          ctx.moveTo(x, y);\n          if (!isScalingMatrix) {\n            current.updatePathMinMax(currentTransform, x, y);\n          }\n          break;\n        case OPS.lineTo:\n          x = args[j++];\n          y = args[j++];\n          ctx.lineTo(x, y);\n          if (!isScalingMatrix) {\n            current.updatePathMinMax(currentTransform, x, y);\n          }\n          break;\n        case OPS.curveTo:\n          startX = x;\n          startY = y;\n          x = args[j + 4];\n          y = args[j + 5];\n          ctx.bezierCurveTo(\n            args[j],\n            args[j + 1],\n            args[j + 2],\n            args[j + 3],\n            x,\n            y\n          );\n          current.updateCurvePathMinMax(\n            currentTransform,\n            startX,\n            startY,\n            args[j],\n            args[j + 1],\n            args[j + 2],\n            args[j + 3],\n            x,\n            y,\n            minMaxForBezier\n          );\n          j += 6;\n          break;\n        case OPS.curveTo2:\n          startX = x;\n          startY = y;\n          ctx.bezierCurveTo(\n            x,\n            y,\n            args[j],\n            args[j + 1],\n            args[j + 2],\n            args[j + 3]\n          );\n          current.updateCurvePathMinMax(\n            currentTransform,\n            startX,\n            startY,\n            x,\n            y,\n            args[j],\n            args[j + 1],\n            args[j + 2],\n            args[j + 3],\n            minMaxForBezier\n          );\n          x = args[j + 2];\n          y = args[j + 3];\n          j += 4;\n          break;\n        case OPS.curveTo3:\n          startX = x;\n          startY = y;\n          x = args[j + 2];\n          y = args[j + 3];\n          ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n          current.updateCurvePathMinMax(\n            currentTransform,\n            startX,\n            startY,\n            args[j],\n            args[j + 1],\n            x,\n            y,\n            x,\n            y,\n            minMaxForBezier\n          );\n          j += 4;\n          break;\n        case OPS.closePath:\n          ctx.closePath();\n          break;\n      }\n    }\n\n    if (isScalingMatrix) {\n      current.updateScalingPathMinMax(currentTransform, minMaxForBezier);\n    }\n\n    current.setCurrentPoint(x, y);\n  }\n\n  closePath() {\n    this.ctx.closePath();\n  }\n\n  stroke(consumePath = true) {\n    const ctx = this.ctx;\n    const strokeColor = this.current.strokeColor;\n    // For stroke we want to temporarily change the global alpha to the\n    // stroking alpha.\n    ctx.globalAlpha = this.current.strokeAlpha;\n    if (this.contentVisible) {\n      if (typeof strokeColor === \"object\" && strokeColor?.getPattern) {\n        ctx.save();\n        ctx.strokeStyle = strokeColor.getPattern(\n          ctx,\n          this,\n          getCurrentTransformInverse(ctx),\n          PathType.STROKE\n        );\n        this.rescaleAndStroke(/* saveRestore */ false);\n        ctx.restore();\n      } else {\n        this.rescaleAndStroke(/* saveRestore */ true);\n      }\n    }\n    if (consumePath) {\n      this.consumePath(this.current.getClippedPathBoundingBox());\n    }\n    // Restore the global alpha to the fill alpha\n    ctx.globalAlpha = this.current.fillAlpha;\n  }\n\n  closeStroke() {\n    this.closePath();\n    this.stroke();\n  }\n\n  fill(consumePath = true) {\n    const ctx = this.ctx;\n    const fillColor = this.current.fillColor;\n    const isPatternFill = this.current.patternFill;\n    let needRestore = false;\n\n    if (isPatternFill) {\n      ctx.save();\n      ctx.fillStyle = fillColor.getPattern(\n        ctx,\n        this,\n        getCurrentTransformInverse(ctx),\n        PathType.FILL\n      );\n      needRestore = true;\n    }\n\n    const intersect = this.current.getClippedPathBoundingBox();\n    if (this.contentVisible && intersect !== null) {\n      if (this.pendingEOFill) {\n        ctx.fill(\"evenodd\");\n        this.pendingEOFill = false;\n      } else {\n        ctx.fill();\n      }\n    }\n\n    if (needRestore) {\n      ctx.restore();\n    }\n    if (consumePath) {\n      this.consumePath(intersect);\n    }\n  }\n\n  eoFill() {\n    this.pendingEOFill = true;\n    this.fill();\n  }\n\n  fillStroke() {\n    this.fill(false);\n    this.stroke(false);\n\n    this.consumePath();\n  }\n\n  eoFillStroke() {\n    this.pendingEOFill = true;\n    this.fillStroke();\n  }\n\n  closeFillStroke() {\n    this.closePath();\n    this.fillStroke();\n  }\n\n  closeEOFillStroke() {\n    this.pendingEOFill = true;\n    this.closePath();\n    this.fillStroke();\n  }\n\n  endPath() {\n    this.consumePath();\n  }\n\n  // Clipping\n  clip() {\n    this.pendingClip = NORMAL_CLIP;\n  }\n\n  eoClip() {\n    this.pendingClip = EO_CLIP;\n  }\n\n  // Text\n  beginText() {\n    this.current.textMatrix = IDENTITY_MATRIX;\n    this.current.textMatrixScale = 1;\n    this.current.x = this.current.lineX = 0;\n    this.current.y = this.current.lineY = 0;\n  }\n\n  endText() {\n    const paths = this.pendingTextPaths;\n    const ctx = this.ctx;\n    if (paths === undefined) {\n      ctx.beginPath();\n      return;\n    }\n\n    ctx.save();\n    ctx.beginPath();\n    for (const path of paths) {\n      ctx.setTransform(...path.transform);\n      ctx.translate(path.x, path.y);\n      path.addToPath(ctx, path.fontSize);\n    }\n    ctx.restore();\n    ctx.clip();\n    ctx.beginPath();\n    delete this.pendingTextPaths;\n  }\n\n  setCharSpacing(spacing) {\n    this.current.charSpacing = spacing;\n  }\n\n  setWordSpacing(spacing) {\n    this.current.wordSpacing = spacing;\n  }\n\n  setHScale(scale) {\n    this.current.textHScale = scale / 100;\n  }\n\n  setLeading(leading) {\n    this.current.leading = -leading;\n  }\n\n  setFont(fontRefName, size) {\n    const fontObj = this.commonObjs.get(fontRefName);\n    const current = this.current;\n\n    if (!fontObj) {\n      throw new Error(`Can't find font for ${fontRefName}`);\n    }\n    current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX;\n\n    // A valid matrix needs all main diagonal elements to be non-zero\n    // This also ensures we bypass FF bugzilla bug #719844.\n    if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) {\n      warn(\"Invalid font matrix for font \" + fontRefName);\n    }\n\n    // The spec for Tf (setFont) says that 'size' specifies the font 'scale',\n    // and in some docs this can be negative (inverted x-y axes).\n    if (size < 0) {\n      size = -size;\n      current.fontDirection = -1;\n    } else {\n      current.fontDirection = 1;\n    }\n\n    this.current.font = fontObj;\n    this.current.fontSize = size;\n\n    if (fontObj.isType3Font) {\n      return; // we don't need ctx.font for Type3 fonts\n    }\n\n    const name = fontObj.loadedName || \"sans-serif\";\n    const typeface =\n      fontObj.systemFontInfo?.css || `\"${name}\", ${fontObj.fallbackName}`;\n\n    let bold = \"normal\";\n    if (fontObj.black) {\n      bold = \"900\";\n    } else if (fontObj.bold) {\n      bold = \"bold\";\n    }\n    const italic = fontObj.italic ? \"italic\" : \"normal\";\n\n    // Some font backends cannot handle fonts below certain size.\n    // Keeping the font at minimal size and using the fontSizeScale to change\n    // the current transformation matrix before the fillText/strokeText.\n    // See https://bugzilla.mozilla.org/show_bug.cgi?id=726227\n    let browserFontSize = size;\n    if (size < MIN_FONT_SIZE) {\n      browserFontSize = MIN_FONT_SIZE;\n    } else if (size > MAX_FONT_SIZE) {\n      browserFontSize = MAX_FONT_SIZE;\n    }\n    this.current.fontSizeScale = size / browserFontSize;\n\n    this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`;\n  }\n\n  setTextRenderingMode(mode) {\n    this.current.textRenderingMode = mode;\n  }\n\n  setTextRise(rise) {\n    this.current.textRise = rise;\n  }\n\n  moveText(x, y) {\n    this.current.x = this.current.lineX += x;\n    this.current.y = this.current.lineY += y;\n  }\n\n  setLeadingMoveText(x, y) {\n    this.setLeading(-y);\n    this.moveText(x, y);\n  }\n\n  setTextMatrix(a, b, c, d, e, f) {\n    this.current.textMatrix = [a, b, c, d, e, f];\n    this.current.textMatrixScale = Math.hypot(a, b);\n\n    this.current.x = this.current.lineX = 0;\n    this.current.y = this.current.lineY = 0;\n  }\n\n  nextLine() {\n    this.moveText(0, this.current.leading);\n  }\n\n  paintChar(character, x, y, patternTransform) {\n    const ctx = this.ctx;\n    const current = this.current;\n    const font = current.font;\n    const textRenderingMode = current.textRenderingMode;\n    const fontSize = current.fontSize / current.fontSizeScale;\n    const fillStrokeMode =\n      textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n    const isAddToPathSet = !!(\n      textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG\n    );\n    const patternFill = current.patternFill && !font.missingFile;\n\n    let addToPath;\n    if (font.disableFontFace || isAddToPathSet || patternFill) {\n      addToPath = font.getPathGenerator(this.commonObjs, character);\n    }\n\n    if (font.disableFontFace || patternFill) {\n      ctx.save();\n      ctx.translate(x, y);\n      ctx.beginPath();\n      addToPath(ctx, fontSize);\n      if (patternTransform) {\n        ctx.setTransform(...patternTransform);\n      }\n      if (\n        fillStrokeMode === TextRenderingMode.FILL ||\n        fillStrokeMode === TextRenderingMode.FILL_STROKE\n      ) {\n        ctx.fill();\n      }\n      if (\n        fillStrokeMode === TextRenderingMode.STROKE ||\n        fillStrokeMode === TextRenderingMode.FILL_STROKE\n      ) {\n        ctx.stroke();\n      }\n      ctx.restore();\n    } else {\n      if (\n        fillStrokeMode === TextRenderingMode.FILL ||\n        fillStrokeMode === TextRenderingMode.FILL_STROKE\n      ) {\n        ctx.fillText(character, x, y);\n      }\n      if (\n        fillStrokeMode === TextRenderingMode.STROKE ||\n        fillStrokeMode === TextRenderingMode.FILL_STROKE\n      ) {\n        ctx.strokeText(character, x, y);\n      }\n    }\n\n    if (isAddToPathSet) {\n      const paths = (this.pendingTextPaths ||= []);\n      paths.push({\n        transform: getCurrentTransform(ctx),\n        x,\n        y,\n        fontSize,\n        addToPath,\n      });\n    }\n  }\n\n  get isFontSubpixelAAEnabled() {\n    // Checks if anti-aliasing is enabled when scaled text is painted.\n    // On Windows GDI scaled fonts looks bad.\n    const { context: ctx } = this.cachedCanvases.getCanvas(\n      \"isFontSubpixelAAEnabled\",\n      10,\n      10\n    );\n    ctx.scale(1.5, 1);\n    ctx.fillText(\"I\", 0, 10);\n    const data = ctx.getImageData(0, 0, 10, 10).data;\n    let enabled = false;\n    for (let i = 3; i < data.length; i += 4) {\n      if (data[i] > 0 && data[i] < 255) {\n        enabled = true;\n        break;\n      }\n    }\n    return shadow(this, \"isFontSubpixelAAEnabled\", enabled);\n  }\n\n  showText(glyphs) {\n    const current = this.current;\n    const font = current.font;\n    if (font.isType3Font) {\n      return this.showType3Text(glyphs);\n    }\n\n    const fontSize = current.fontSize;\n    if (fontSize === 0) {\n      return undefined;\n    }\n\n    const ctx = this.ctx;\n    const fontSizeScale = current.fontSizeScale;\n    const charSpacing = current.charSpacing;\n    const wordSpacing = current.wordSpacing;\n    const fontDirection = current.fontDirection;\n    const textHScale = current.textHScale * fontDirection;\n    const glyphsLength = glyphs.length;\n    const vertical = font.vertical;\n    const spacingDir = vertical ? 1 : -1;\n    const defaultVMetrics = font.defaultVMetrics;\n    const widthAdvanceScale = fontSize * current.fontMatrix[0];\n\n    const simpleFillText =\n      current.textRenderingMode === TextRenderingMode.FILL &&\n      !font.disableFontFace &&\n      !current.patternFill;\n\n    ctx.save();\n    ctx.transform(...current.textMatrix);\n    ctx.translate(current.x, current.y + current.textRise);\n\n    if (fontDirection > 0) {\n      ctx.scale(textHScale, -1);\n    } else {\n      ctx.scale(textHScale, 1);\n    }\n\n    let patternTransform;\n    if (current.patternFill) {\n      ctx.save();\n      const pattern = current.fillColor.getPattern(\n        ctx,\n        this,\n        getCurrentTransformInverse(ctx),\n        PathType.FILL\n      );\n      patternTransform = getCurrentTransform(ctx);\n      ctx.restore();\n      ctx.fillStyle = pattern;\n    }\n\n    let lineWidth = current.lineWidth;\n    const scale = current.textMatrixScale;\n    if (scale === 0 || lineWidth === 0) {\n      const fillStrokeMode =\n        current.textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n      if (\n        fillStrokeMode === TextRenderingMode.STROKE ||\n        fillStrokeMode === TextRenderingMode.FILL_STROKE\n      ) {\n        lineWidth = this.getSinglePixelWidth();\n      }\n    } else {\n      lineWidth /= scale;\n    }\n\n    if (fontSizeScale !== 1.0) {\n      ctx.scale(fontSizeScale, fontSizeScale);\n      lineWidth /= fontSizeScale;\n    }\n\n    ctx.lineWidth = lineWidth;\n\n    if (font.isInvalidPDFjsFont) {\n      const chars = [];\n      let width = 0;\n      for (const glyph of glyphs) {\n        chars.push(glyph.unicode);\n        width += glyph.width;\n      }\n      ctx.fillText(chars.join(\"\"), 0, 0);\n      current.x += width * widthAdvanceScale * textHScale;\n      ctx.restore();\n      this.compose();\n\n      return undefined;\n    }\n\n    let x = 0,\n      i;\n    for (i = 0; i < glyphsLength; ++i) {\n      const glyph = glyphs[i];\n      if (typeof glyph === \"number\") {\n        x += (spacingDir * glyph * fontSize) / 1000;\n        continue;\n      }\n\n      let restoreNeeded = false;\n      const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n      const character = glyph.fontChar;\n      const accent = glyph.accent;\n      let scaledX, scaledY;\n      let width = glyph.width;\n      if (vertical) {\n        const vmetric = glyph.vmetric || defaultVMetrics;\n        const vx =\n          -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale;\n        const vy = vmetric[2] * widthAdvanceScale;\n\n        width = vmetric ? -vmetric[0] : width;\n        scaledX = vx / fontSizeScale;\n        scaledY = (x + vy) / fontSizeScale;\n      } else {\n        scaledX = x / fontSizeScale;\n        scaledY = 0;\n      }\n\n      if (font.remeasure && width > 0) {\n        // Some standard fonts may not have the exact width: rescale per\n        // character if measured width is greater than expected glyph width\n        // and subpixel-aa is enabled, otherwise just center the glyph.\n        const measuredWidth =\n          ((ctx.measureText(character).width * 1000) / fontSize) *\n          fontSizeScale;\n        if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n          const characterScaleX = width / measuredWidth;\n          restoreNeeded = true;\n          ctx.save();\n          ctx.scale(characterScaleX, 1);\n          scaledX /= characterScaleX;\n        } else if (width !== measuredWidth) {\n          scaledX +=\n            (((width - measuredWidth) / 2000) * fontSize) / fontSizeScale;\n        }\n      }\n\n      // Only attempt to draw the glyph if it is actually in the embedded font\n      // file or if there isn't a font file so the fallback font is shown.\n      if (this.contentVisible && (glyph.isInFont || font.missingFile)) {\n        if (simpleFillText && !accent) {\n          // common case\n          ctx.fillText(character, scaledX, scaledY);\n        } else {\n          this.paintChar(character, scaledX, scaledY, patternTransform);\n          if (accent) {\n            const scaledAccentX =\n              scaledX + (fontSize * accent.offset.x) / fontSizeScale;\n            const scaledAccentY =\n              scaledY - (fontSize * accent.offset.y) / fontSizeScale;\n            this.paintChar(\n              accent.fontChar,\n              scaledAccentX,\n              scaledAccentY,\n              patternTransform\n            );\n          }\n        }\n      }\n\n      const charWidth = vertical\n        ? width * widthAdvanceScale - spacing * fontDirection\n        : width * widthAdvanceScale + spacing * fontDirection;\n      x += charWidth;\n\n      if (restoreNeeded) {\n        ctx.restore();\n      }\n    }\n    if (vertical) {\n      current.y -= x;\n    } else {\n      current.x += x * textHScale;\n    }\n    ctx.restore();\n    this.compose();\n\n    return undefined;\n  }\n\n  showType3Text(glyphs) {\n    // Type3 fonts - each glyph is a \"mini-PDF\"\n    const ctx = this.ctx;\n    const current = this.current;\n    const font = current.font;\n    const fontSize = current.fontSize;\n    const fontDirection = current.fontDirection;\n    const spacingDir = font.vertical ? 1 : -1;\n    const charSpacing = current.charSpacing;\n    const wordSpacing = current.wordSpacing;\n    const textHScale = current.textHScale * fontDirection;\n    const fontMatrix = current.fontMatrix || FONT_IDENTITY_MATRIX;\n    const glyphsLength = glyphs.length;\n    const isTextInvisible =\n      current.textRenderingMode === TextRenderingMode.INVISIBLE;\n    let i, glyph, width, spacingLength;\n\n    if (isTextInvisible || fontSize === 0) {\n      return;\n    }\n    this._cachedScaleForStroking[0] = -1;\n    this._cachedGetSinglePixelWidth = null;\n\n    ctx.save();\n    ctx.transform(...current.textMatrix);\n    ctx.translate(current.x, current.y);\n\n    ctx.scale(textHScale, fontDirection);\n\n    for (i = 0; i < glyphsLength; ++i) {\n      glyph = glyphs[i];\n      if (typeof glyph === \"number\") {\n        spacingLength = (spacingDir * glyph * fontSize) / 1000;\n        this.ctx.translate(spacingLength, 0);\n        current.x += spacingLength * textHScale;\n        continue;\n      }\n\n      const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n      const operatorList = font.charProcOperatorList[glyph.operatorListId];\n      if (!operatorList) {\n        warn(`Type3 character \"${glyph.operatorListId}\" is not available.`);\n        continue;\n      }\n      if (this.contentVisible) {\n        this.processingType3 = glyph;\n        this.save();\n        ctx.scale(fontSize, fontSize);\n        ctx.transform(...fontMatrix);\n        this.executeOperatorList(operatorList);\n        this.restore();\n      }\n\n      const transformed = Util.applyTransform([glyph.width, 0], fontMatrix);\n      width = transformed[0] * fontSize + spacing;\n\n      ctx.translate(width, 0);\n      current.x += width * textHScale;\n    }\n    ctx.restore();\n    this.processingType3 = null;\n  }\n\n  // Type3 fonts\n  setCharWidth(xWidth, yWidth) {\n    // We can safely ignore this since the width should be the same\n    // as the width in the Widths array.\n  }\n\n  setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {\n    this.ctx.rect(llx, lly, urx - llx, ury - lly);\n    this.ctx.clip();\n    this.endPath();\n  }\n\n  // Color\n  getColorN_Pattern(IR) {\n    let pattern;\n    if (IR[0] === \"TilingPattern\") {\n      const color = IR[1];\n      const baseTransform = this.baseTransform || getCurrentTransform(this.ctx);\n      const canvasGraphicsFactory = {\n        createCanvasGraphics: ctx => {\n          return new CanvasGraphics(\n            ctx,\n            this.commonObjs,\n            this.objs,\n            this.canvasFactory,\n            this.filterFactory,\n            {\n              optionalContentConfig: this.optionalContentConfig,\n              markedContentStack: this.markedContentStack,\n            }\n          );\n        },\n      };\n      pattern = new TilingPattern(\n        IR,\n        color,\n        this.ctx,\n        canvasGraphicsFactory,\n        baseTransform\n      );\n    } else {\n      pattern = this._getPattern(IR[1], IR[2]);\n    }\n    return pattern;\n  }\n\n  setStrokeColorN() {\n    this.current.strokeColor = this.getColorN_Pattern(arguments);\n  }\n\n  setFillColorN() {\n    this.current.fillColor = this.getColorN_Pattern(arguments);\n    this.current.patternFill = true;\n  }\n\n  setStrokeRGBColor(r, g, b) {\n    const color = Util.makeHexColor(r, g, b);\n    this.ctx.strokeStyle = color;\n    this.current.strokeColor = color;\n  }\n\n  setFillRGBColor(r, g, b) {\n    const color = Util.makeHexColor(r, g, b);\n    this.ctx.fillStyle = color;\n    this.current.fillColor = color;\n    this.current.patternFill = false;\n  }\n\n  _getPattern(objId, matrix = null) {\n    let pattern;\n    if (this.cachedPatterns.has(objId)) {\n      pattern = this.cachedPatterns.get(objId);\n    } else {\n      pattern = getShadingPattern(this.getObject(objId));\n      this.cachedPatterns.set(objId, pattern);\n    }\n    if (matrix) {\n      pattern.matrix = matrix;\n    }\n    return pattern;\n  }\n\n  shadingFill(objId) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const ctx = this.ctx;\n\n    this.save();\n    const pattern = this._getPattern(objId);\n    ctx.fillStyle = pattern.getPattern(\n      ctx,\n      this,\n      getCurrentTransformInverse(ctx),\n      PathType.SHADING\n    );\n\n    const inv = getCurrentTransformInverse(ctx);\n    if (inv) {\n      const { width, height } = ctx.canvas;\n      const [x0, y0, x1, y1] = Util.getAxialAlignedBoundingBox(\n        [0, 0, width, height],\n        inv\n      );\n\n      this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n    } else {\n      // HACK to draw the gradient onto an infinite rectangle.\n      // PDF gradients are drawn across the entire image while\n      // Canvas only allows gradients to be drawn in a rectangle\n      // The following bug should allow us to remove this.\n      // https://bugzilla.mozilla.org/show_bug.cgi?id=664884\n\n      this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n    }\n\n    this.compose(this.current.getClippedPathBoundingBox());\n    this.restore();\n  }\n\n  // Images\n  beginInlineImage() {\n    unreachable(\"Should not call beginInlineImage\");\n  }\n\n  beginImageData() {\n    unreachable(\"Should not call beginImageData\");\n  }\n\n  paintFormXObjectBegin(matrix, bbox) {\n    if (!this.contentVisible) {\n      return;\n    }\n    this.save();\n    this.baseTransformStack.push(this.baseTransform);\n\n    if (Array.isArray(matrix) && matrix.length === 6) {\n      this.transform(...matrix);\n    }\n\n    this.baseTransform = getCurrentTransform(this.ctx);\n\n    if (bbox) {\n      const width = bbox[2] - bbox[0];\n      const height = bbox[3] - bbox[1];\n      this.ctx.rect(bbox[0], bbox[1], width, height);\n      this.current.updateRectMinMax(getCurrentTransform(this.ctx), bbox);\n      this.clip();\n      this.endPath();\n    }\n  }\n\n  paintFormXObjectEnd() {\n    if (!this.contentVisible) {\n      return;\n    }\n    this.restore();\n    this.baseTransform = this.baseTransformStack.pop();\n  }\n\n  beginGroup(group) {\n    if (!this.contentVisible) {\n      return;\n    }\n\n    this.save();\n    // If there's an active soft mask we don't want it enabled for the group, so\n    // clear it out. The mask and suspended canvas will be restored in endGroup.\n    if (this.inSMaskMode) {\n      this.endSMaskMode();\n      this.current.activeSMask = null;\n    }\n\n    const currentCtx = this.ctx;\n    // TODO non-isolated groups - according to Rik at adobe non-isolated\n    // group results aren't usually that different and they even have tools\n    // that ignore this setting. Notes from Rik on implementing:\n    // - When you encounter an transparency group, create a new canvas with\n    // the dimensions of the bbox\n    // - copy the content from the previous canvas to the new canvas\n    // - draw as usual\n    // - remove the backdrop alpha:\n    // alphaNew = 1 - (1 - alpha)/(1 - alphaBackdrop) with 'alpha' the alpha\n    // value of your transparency group and 'alphaBackdrop' the alpha of the\n    // backdrop\n    // - remove background color:\n    // colorNew = color - alphaNew *colorBackdrop /(1 - alphaNew)\n    if (!group.isolated) {\n      info(\"TODO: Support non-isolated groups.\");\n    }\n\n    // TODO knockout - supposedly possible with the clever use of compositing\n    // modes.\n    if (group.knockout) {\n      warn(\"Knockout groups not supported.\");\n    }\n\n    const currentTransform = getCurrentTransform(currentCtx);\n    if (group.matrix) {\n      currentCtx.transform(...group.matrix);\n    }\n    if (!group.bbox) {\n      throw new Error(\"Bounding box is required.\");\n    }\n\n    // Based on the current transform figure out how big the bounding box\n    // will actually be.\n    let bounds = Util.getAxialAlignedBoundingBox(\n      group.bbox,\n      getCurrentTransform(currentCtx)\n    );\n    // Clip the bounding box to the current canvas.\n    const canvasBounds = [\n      0,\n      0,\n      currentCtx.canvas.width,\n      currentCtx.canvas.height,\n    ];\n    bounds = Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n    // Use ceil in case we're between sizes so we don't create canvas that is\n    // too small and make the canvas at least 1x1 pixels.\n    const offsetX = Math.floor(bounds[0]);\n    const offsetY = Math.floor(bounds[1]);\n    let drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n    let drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n    let scaleX = 1,\n      scaleY = 1;\n    if (drawnWidth > MAX_GROUP_SIZE) {\n      scaleX = drawnWidth / MAX_GROUP_SIZE;\n      drawnWidth = MAX_GROUP_SIZE;\n    }\n    if (drawnHeight > MAX_GROUP_SIZE) {\n      scaleY = drawnHeight / MAX_GROUP_SIZE;\n      drawnHeight = MAX_GROUP_SIZE;\n    }\n\n    this.current.startNewPathAndClipBox([0, 0, drawnWidth, drawnHeight]);\n\n    let cacheId = \"groupAt\" + this.groupLevel;\n    if (group.smask) {\n      // Using two cache entries is case if masks are used one after another.\n      cacheId += \"_smask_\" + (this.smaskCounter++ % 2);\n    }\n    const scratchCanvas = this.cachedCanvases.getCanvas(\n      cacheId,\n      drawnWidth,\n      drawnHeight\n    );\n    const groupCtx = scratchCanvas.context;\n\n    // Since we created a new canvas that is just the size of the bounding box\n    // we have to translate the group ctx.\n    groupCtx.scale(1 / scaleX, 1 / scaleY);\n    groupCtx.translate(-offsetX, -offsetY);\n    groupCtx.transform(...currentTransform);\n\n    if (group.smask) {\n      // Saving state and cached mask to be used in setGState.\n      this.smaskStack.push({\n        canvas: scratchCanvas.canvas,\n        context: groupCtx,\n        offsetX,\n        offsetY,\n        scaleX,\n        scaleY,\n        subtype: group.smask.subtype,\n        backdrop: group.smask.backdrop,\n        transferMap: group.smask.transferMap || null,\n        startTransformInverse: null, // used during suspend operation\n      });\n    } else {\n      // Setup the current ctx so when the group is popped we draw it at the\n      // right location.\n      currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n      currentCtx.translate(offsetX, offsetY);\n      currentCtx.scale(scaleX, scaleY);\n      currentCtx.save();\n    }\n    // The transparency group inherits all off the current graphics state\n    // except the blend mode, soft mask, and alpha constants.\n    copyCtxState(currentCtx, groupCtx);\n    this.ctx = groupCtx;\n    this.setGState([\n      [\"BM\", \"source-over\"],\n      [\"ca\", 1],\n      [\"CA\", 1],\n    ]);\n    this.groupStack.push(currentCtx);\n    this.groupLevel++;\n  }\n\n  endGroup(group) {\n    if (!this.contentVisible) {\n      return;\n    }\n    this.groupLevel--;\n    const groupCtx = this.ctx;\n    const ctx = this.groupStack.pop();\n    this.ctx = ctx;\n    // Turn off image smoothing to avoid sub pixel interpolation which can\n    // look kind of blurry for some pdfs.\n    this.ctx.imageSmoothingEnabled = false;\n\n    if (group.smask) {\n      this.tempSMask = this.smaskStack.pop();\n      this.restore();\n    } else {\n      this.ctx.restore();\n      const currentMtx = getCurrentTransform(this.ctx);\n      this.restore();\n      this.ctx.save();\n      this.ctx.setTransform(...currentMtx);\n      const dirtyBox = Util.getAxialAlignedBoundingBox(\n        [0, 0, groupCtx.canvas.width, groupCtx.canvas.height],\n        currentMtx\n      );\n      this.ctx.drawImage(groupCtx.canvas, 0, 0);\n      this.ctx.restore();\n      this.compose(dirtyBox);\n    }\n  }\n\n  beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {\n    // The annotations are drawn just after the page content.\n    // The page content drawing can potentially have set a transform,\n    // a clipping path, whatever...\n    // So in order to have something clean, we restore the initial state.\n    this.#restoreInitialState();\n    resetCtxToDefault(this.ctx);\n\n    this.ctx.save();\n    this.save();\n\n    if (this.baseTransform) {\n      this.ctx.setTransform(...this.baseTransform);\n    }\n\n    if (Array.isArray(rect) && rect.length === 4) {\n      const width = rect[2] - rect[0];\n      const height = rect[3] - rect[1];\n\n      if (hasOwnCanvas && this.annotationCanvasMap) {\n        transform = transform.slice();\n        transform[4] -= rect[0];\n        transform[5] -= rect[1];\n\n        rect = rect.slice();\n        rect[0] = rect[1] = 0;\n        rect[2] = width;\n        rect[3] = height;\n\n        const [scaleX, scaleY] = Util.singularValueDecompose2dScale(\n          getCurrentTransform(this.ctx)\n        );\n        const { viewportScale } = this;\n        const canvasWidth = Math.ceil(\n          width * this.outputScaleX * viewportScale\n        );\n        const canvasHeight = Math.ceil(\n          height * this.outputScaleY * viewportScale\n        );\n\n        this.annotationCanvas = this.canvasFactory.create(\n          canvasWidth,\n          canvasHeight\n        );\n        const { canvas, context } = this.annotationCanvas;\n        this.annotationCanvasMap.set(id, canvas);\n        this.annotationCanvas.savedCtx = this.ctx;\n        this.ctx = context;\n        this.ctx.save();\n        this.ctx.setTransform(scaleX, 0, 0, -scaleY, 0, height * scaleY);\n\n        resetCtxToDefault(this.ctx);\n      } else {\n        resetCtxToDefault(this.ctx);\n\n        this.ctx.rect(rect[0], rect[1], width, height);\n        this.ctx.clip();\n        this.endPath();\n      }\n    }\n\n    this.current = new CanvasExtraState(\n      this.ctx.canvas.width,\n      this.ctx.canvas.height\n    );\n\n    this.transform(...transform);\n    this.transform(...matrix);\n  }\n\n  endAnnotation() {\n    if (this.annotationCanvas) {\n      this.ctx.restore();\n      this.#drawFilter();\n\n      this.ctx = this.annotationCanvas.savedCtx;\n      delete this.annotationCanvas.savedCtx;\n      delete this.annotationCanvas;\n    }\n  }\n\n  paintImageMaskXObject(img) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const count = img.count;\n    img = this.getObject(img.data, img);\n    img.count = count;\n\n    const ctx = this.ctx;\n    const glyph = this.processingType3;\n\n    if (glyph) {\n      if (glyph.compiled === undefined) {\n        glyph.compiled = compileType3Glyph(img);\n      }\n\n      if (glyph.compiled) {\n        glyph.compiled(ctx);\n        return;\n      }\n    }\n    const mask = this._createMaskCanvas(img);\n    const maskCanvas = mask.canvas;\n\n    ctx.save();\n    // The mask is drawn with the transform applied. Reset the current\n    // transform to draw to the identity.\n    ctx.setTransform(1, 0, 0, 1, 0, 0);\n    ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY);\n    ctx.restore();\n    this.compose();\n  }\n\n  paintImageMaskXObjectRepeat(\n    img,\n    scaleX,\n    skewX = 0,\n    skewY = 0,\n    scaleY,\n    positions\n  ) {\n    if (!this.contentVisible) {\n      return;\n    }\n\n    img = this.getObject(img.data, img);\n\n    const ctx = this.ctx;\n    ctx.save();\n    const currentTransform = getCurrentTransform(ctx);\n    ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);\n    const mask = this._createMaskCanvas(img);\n\n    ctx.setTransform(\n      1,\n      0,\n      0,\n      1,\n      mask.offsetX - currentTransform[4],\n      mask.offsetY - currentTransform[5]\n    );\n    for (let i = 0, ii = positions.length; i < ii; i += 2) {\n      const trans = Util.transform(currentTransform, [\n        scaleX,\n        skewX,\n        skewY,\n        scaleY,\n        positions[i],\n        positions[i + 1],\n      ]);\n\n      const [x, y] = Util.applyTransform([0, 0], trans);\n      ctx.drawImage(mask.canvas, x, y);\n    }\n    ctx.restore();\n    this.compose();\n  }\n\n  paintImageMaskXObjectGroup(images) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const ctx = this.ctx;\n\n    const fillColor = this.current.fillColor;\n    const isPatternFill = this.current.patternFill;\n\n    for (const image of images) {\n      const { data, width, height, transform } = image;\n\n      const maskCanvas = this.cachedCanvases.getCanvas(\n        \"maskCanvas\",\n        width,\n        height\n      );\n      const maskCtx = maskCanvas.context;\n      maskCtx.save();\n\n      const img = this.getObject(data, image);\n      putBinaryImageMask(maskCtx, img);\n\n      maskCtx.globalCompositeOperation = \"source-in\";\n\n      maskCtx.fillStyle = isPatternFill\n        ? fillColor.getPattern(\n            maskCtx,\n            this,\n            getCurrentTransformInverse(ctx),\n            PathType.FILL\n          )\n        : fillColor;\n      maskCtx.fillRect(0, 0, width, height);\n\n      maskCtx.restore();\n\n      ctx.save();\n      ctx.transform(...transform);\n      ctx.scale(1, -1);\n      drawImageAtIntegerCoords(\n        ctx,\n        maskCanvas.canvas,\n        0,\n        0,\n        width,\n        height,\n        0,\n        -1,\n        1,\n        1\n      );\n      ctx.restore();\n    }\n    this.compose();\n  }\n\n  paintImageXObject(objId) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const imgData = this.getObject(objId);\n    if (!imgData) {\n      warn(\"Dependent image isn't ready yet\");\n      return;\n    }\n\n    this.paintInlineImageXObject(imgData);\n  }\n\n  paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const imgData = this.getObject(objId);\n    if (!imgData) {\n      warn(\"Dependent image isn't ready yet\");\n      return;\n    }\n\n    const width = imgData.width;\n    const height = imgData.height;\n    const map = [];\n    for (let i = 0, ii = positions.length; i < ii; i += 2) {\n      map.push({\n        transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]],\n        x: 0,\n        y: 0,\n        w: width,\n        h: height,\n      });\n    }\n    this.paintInlineImageXObjectGroup(imgData, map);\n  }\n\n  applyTransferMapsToCanvas(ctx) {\n    if (this.current.transferMaps !== \"none\") {\n      ctx.filter = this.current.transferMaps;\n      ctx.drawImage(ctx.canvas, 0, 0);\n      ctx.filter = \"none\";\n    }\n    return ctx.canvas;\n  }\n\n  applyTransferMapsToBitmap(imgData) {\n    if (this.current.transferMaps === \"none\") {\n      return imgData.bitmap;\n    }\n    const { bitmap, width, height } = imgData;\n    const tmpCanvas = this.cachedCanvases.getCanvas(\n      \"inlineImage\",\n      width,\n      height\n    );\n    const tmpCtx = tmpCanvas.context;\n    tmpCtx.filter = this.current.transferMaps;\n    tmpCtx.drawImage(bitmap, 0, 0);\n    tmpCtx.filter = \"none\";\n\n    return tmpCanvas.canvas;\n  }\n\n  paintInlineImageXObject(imgData) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const width = imgData.width;\n    const height = imgData.height;\n    const ctx = this.ctx;\n\n    this.save();\n\n    if (\n      (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n      !isNodeJS\n    ) {\n      // The filter, if any, will be applied in applyTransferMapsToBitmap.\n      // It must be applied to the image before rescaling else some artifacts\n      // could appear.\n      // The final restore will reset it to its value.\n      const { filter } = ctx;\n      if (filter !== \"none\" && filter !== \"\") {\n        ctx.filter = \"none\";\n      }\n    }\n\n    // scale the image to the unit square\n    ctx.scale(1 / width, -1 / height);\n\n    let imgToPaint;\n    if (imgData.bitmap) {\n      imgToPaint = this.applyTransferMapsToBitmap(imgData);\n    } else if (\n      (typeof HTMLElement === \"function\" && imgData instanceof HTMLElement) ||\n      !imgData.data\n    ) {\n      // typeof check is needed due to node.js support, see issue #8489\n      imgToPaint = imgData;\n    } else {\n      const tmpCanvas = this.cachedCanvases.getCanvas(\n        \"inlineImage\",\n        width,\n        height\n      );\n      const tmpCtx = tmpCanvas.context;\n      putBinaryImageData(tmpCtx, imgData);\n      imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n    }\n\n    const scaled = this._scaleImage(\n      imgToPaint,\n      getCurrentTransformInverse(ctx)\n    );\n    ctx.imageSmoothingEnabled = getImageSmoothingEnabled(\n      getCurrentTransform(ctx),\n      imgData.interpolate\n    );\n\n    drawImageAtIntegerCoords(\n      ctx,\n      scaled.img,\n      0,\n      0,\n      scaled.paintWidth,\n      scaled.paintHeight,\n      0,\n      -height,\n      width,\n      height\n    );\n    this.compose();\n    this.restore();\n  }\n\n  paintInlineImageXObjectGroup(imgData, map) {\n    if (!this.contentVisible) {\n      return;\n    }\n    const ctx = this.ctx;\n    let imgToPaint;\n    if (imgData.bitmap) {\n      imgToPaint = imgData.bitmap;\n    } else {\n      const w = imgData.width;\n      const h = imgData.height;\n\n      const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", w, h);\n      const tmpCtx = tmpCanvas.context;\n      putBinaryImageData(tmpCtx, imgData);\n      imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n    }\n\n    for (const entry of map) {\n      ctx.save();\n      ctx.transform(...entry.transform);\n      ctx.scale(1, -1);\n      drawImageAtIntegerCoords(\n        ctx,\n        imgToPaint,\n        entry.x,\n        entry.y,\n        entry.w,\n        entry.h,\n        0,\n        -1,\n        1,\n        1\n      );\n      ctx.restore();\n    }\n    this.compose();\n  }\n\n  paintSolidColorImageMask() {\n    if (!this.contentVisible) {\n      return;\n    }\n    this.ctx.fillRect(0, 0, 1, 1);\n    this.compose();\n  }\n\n  // Marked content\n\n  markPoint(tag) {\n    // TODO Marked content.\n  }\n\n  markPointProps(tag, properties) {\n    // TODO Marked content.\n  }\n\n  beginMarkedContent(tag) {\n    this.markedContentStack.push({\n      visible: true,\n    });\n  }\n\n  beginMarkedContentProps(tag, properties) {\n    if (tag === \"OC\") {\n      this.markedContentStack.push({\n        visible: this.optionalContentConfig.isVisible(properties),\n      });\n    } else {\n      this.markedContentStack.push({\n        visible: true,\n      });\n    }\n    this.contentVisible = this.isContentVisible();\n  }\n\n  endMarkedContent() {\n    this.markedContentStack.pop();\n    this.contentVisible = this.isContentVisible();\n  }\n\n  // Compatibility\n\n  beginCompat() {\n    // TODO ignore undefined operators (should we do that anyway?)\n  }\n\n  endCompat() {\n    // TODO stop ignoring undefined operators\n  }\n\n  // Helper functions\n\n  consumePath(clipBox) {\n    const isEmpty = this.current.isEmptyClip();\n    if (this.pendingClip) {\n      this.current.updateClipFromPath();\n    }\n    if (!this.pendingClip) {\n      this.compose(clipBox);\n    }\n    const ctx = this.ctx;\n    if (this.pendingClip) {\n      if (!isEmpty) {\n        if (this.pendingClip === EO_CLIP) {\n          ctx.clip(\"evenodd\");\n        } else {\n          ctx.clip();\n        }\n      }\n      this.pendingClip = null;\n    }\n    this.current.startNewPathAndClipBox(this.current.clipBox);\n    ctx.beginPath();\n  }\n\n  getSinglePixelWidth() {\n    if (!this._cachedGetSinglePixelWidth) {\n      const m = getCurrentTransform(this.ctx);\n      if (m[1] === 0 && m[2] === 0) {\n        // Fast path\n        this._cachedGetSinglePixelWidth =\n          1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));\n      } else {\n        const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n        const normX = Math.hypot(m[0], m[2]);\n        const normY = Math.hypot(m[1], m[3]);\n        this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;\n      }\n    }\n    return this._cachedGetSinglePixelWidth;\n  }\n\n  getScaleForStroking() {\n    // A pixel has thicknessX = thicknessY = 1;\n    // A transformed pixel is a parallelogram and the thicknesses\n    // corresponds to the heights.\n    // The goal of this function is to rescale before setting the\n    // lineWidth in order to have both thicknesses greater or equal\n    // to 1 after transform.\n    if (this._cachedScaleForStroking[0] === -1) {\n      const { lineWidth } = this.current;\n      const { a, b, c, d } = this.ctx.getTransform();\n      let scaleX, scaleY;\n\n      if (b === 0 && c === 0) {\n        // Fast path\n        const normX = Math.abs(a);\n        const normY = Math.abs(d);\n        if (normX === normY) {\n          if (lineWidth === 0) {\n            scaleX = scaleY = 1 / normX;\n          } else {\n            const scaledLineWidth = normX * lineWidth;\n            scaleX = scaleY = scaledLineWidth < 1 ? 1 / scaledLineWidth : 1;\n          }\n        } else if (lineWidth === 0) {\n          scaleX = 1 / normX;\n          scaleY = 1 / normY;\n        } else {\n          const scaledXLineWidth = normX * lineWidth;\n          const scaledYLineWidth = normY * lineWidth;\n          scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1;\n          scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;\n        }\n      } else {\n        // A pixel (base (x, y)) is transformed by M into a parallelogram:\n        //  - its area is |det(M)|;\n        //  - heightY (orthogonal to Mx) has a length: |det(M)| / norm(Mx);\n        //  - heightX (orthogonal to My) has a length: |det(M)| / norm(My).\n        // heightX and heightY are the thicknesses of the transformed pixel\n        // and they must be both greater or equal to 1.\n        const absDet = Math.abs(a * d - b * c);\n        const normX = Math.hypot(a, b);\n        const normY = Math.hypot(c, d);\n        if (lineWidth === 0) {\n          scaleX = normY / absDet;\n          scaleY = normX / absDet;\n        } else {\n          const baseArea = lineWidth * absDet;\n          scaleX = normY > baseArea ? normY / baseArea : 1;\n          scaleY = normX > baseArea ? normX / baseArea : 1;\n        }\n      }\n      this._cachedScaleForStroking[0] = scaleX;\n      this._cachedScaleForStroking[1] = scaleY;\n    }\n    return this._cachedScaleForStroking;\n  }\n\n  // Rescale before stroking in order to have a final lineWidth\n  // with both thicknesses greater or equal to 1.\n  rescaleAndStroke(saveRestore) {\n    const { ctx } = this;\n    const { lineWidth } = this.current;\n    const [scaleX, scaleY] = this.getScaleForStroking();\n\n    ctx.lineWidth = lineWidth || 1;\n\n    if (scaleX === 1 && scaleY === 1) {\n      ctx.stroke();\n      return;\n    }\n\n    const dashes = ctx.getLineDash();\n    if (saveRestore) {\n      ctx.save();\n    }\n\n    ctx.scale(scaleX, scaleY);\n\n    // How the dashed line is rendered depends on the current transform...\n    // so we added a rescale to handle too thin lines and consequently\n    // the way the line is dashed will be modified.\n    // If scaleX === scaleY, the dashed lines will be rendered correctly\n    // else we'll have some bugs (but only with too thin lines).\n    // Here we take the max... why not taking the min... or something else.\n    // Anyway, as said it's buggy when scaleX !== scaleY.\n    if (dashes.length > 0) {\n      const scale = Math.max(scaleX, scaleY);\n      ctx.setLineDash(dashes.map(x => x / scale));\n      ctx.lineDashOffset /= scale;\n    }\n\n    ctx.stroke();\n\n    if (saveRestore) {\n      ctx.restore();\n    }\n  }\n\n  isContentVisible() {\n    for (let i = this.markedContentStack.length - 1; i >= 0; i--) {\n      if (!this.markedContentStack[i].visible) {\n        return false;\n      }\n    }\n    return true;\n  }\n}\n\nfor (const op in OPS) {\n  if (CanvasGraphics.prototype[op] !== undefined) {\n    CanvasGraphics.prototype[OPS[op]] = CanvasGraphics.prototype[op];\n  }\n}\n\nexport { CanvasGraphics };\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FormatError, info, unreachable, Util } from \"../shared/util.js\";\nimport { getCurrentTransform } from \"./display_utils.js\";\n\nconst PathType = {\n  FILL: \"Fill\",\n  STROKE: \"Stroke\",\n  SHADING: \"Shading\",\n};\n\nfunction applyBoundingBox(ctx, bbox) {\n  if (!bbox) {\n    return;\n  }\n  const width = bbox[2] - bbox[0];\n  const height = bbox[3] - bbox[1];\n  const region = new Path2D();\n  region.rect(bbox[0], bbox[1], width, height);\n  ctx.clip(region);\n}\n\nclass BaseShadingPattern {\n  constructor() {\n    if (this.constructor === BaseShadingPattern) {\n      unreachable(\"Cannot initialize BaseShadingPattern.\");\n    }\n  }\n\n  getPattern() {\n    unreachable(\"Abstract method `getPattern` called.\");\n  }\n}\n\nclass RadialAxialShadingPattern extends BaseShadingPattern {\n  constructor(IR) {\n    super();\n    this._type = IR[1];\n    this._bbox = IR[2];\n    this._colorStops = IR[3];\n    this._p0 = IR[4];\n    this._p1 = IR[5];\n    this._r0 = IR[6];\n    this._r1 = IR[7];\n    this.matrix = null;\n  }\n\n  _createGradient(ctx) {\n    let grad;\n    if (this._type === \"axial\") {\n      grad = ctx.createLinearGradient(\n        this._p0[0],\n        this._p0[1],\n        this._p1[0],\n        this._p1[1]\n      );\n    } else if (this._type === \"radial\") {\n      grad = ctx.createRadialGradient(\n        this._p0[0],\n        this._p0[1],\n        this._r0,\n        this._p1[0],\n        this._p1[1],\n        this._r1\n      );\n    }\n\n    for (const colorStop of this._colorStops) {\n      grad.addColorStop(colorStop[0], colorStop[1]);\n    }\n    return grad;\n  }\n\n  getPattern(ctx, owner, inverse, pathType) {\n    let pattern;\n    if (pathType === PathType.STROKE || pathType === PathType.FILL) {\n      const ownerBBox = owner.current.getClippedPathBoundingBox(\n        pathType,\n        getCurrentTransform(ctx)\n      ) || [0, 0, 0, 0];\n      // Create a canvas that is only as big as the current path. This doesn't\n      // allow us to cache the pattern, but it generally creates much smaller\n      // canvases and saves memory use. See bug 1722807 for an example.\n      const width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1;\n      const height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1;\n\n      const tmpCanvas = owner.cachedCanvases.getCanvas(\n        \"pattern\",\n        width,\n        height,\n        true\n      );\n\n      const tmpCtx = tmpCanvas.context;\n      tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n      tmpCtx.beginPath();\n      tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n      // Non shading fill patterns are positioned relative to the base transform\n      // (usually the page's initial transform), but we may have created a\n      // smaller canvas based on the path, so we must account for the shift.\n      tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]);\n      inverse = Util.transform(inverse, [\n        1,\n        0,\n        0,\n        1,\n        ownerBBox[0],\n        ownerBBox[1],\n      ]);\n\n      tmpCtx.transform(...owner.baseTransform);\n      if (this.matrix) {\n        tmpCtx.transform(...this.matrix);\n      }\n      applyBoundingBox(tmpCtx, this._bbox);\n\n      tmpCtx.fillStyle = this._createGradient(tmpCtx);\n      tmpCtx.fill();\n\n      pattern = ctx.createPattern(tmpCanvas.canvas, \"no-repeat\");\n      const domMatrix = new DOMMatrix(inverse);\n      pattern.setTransform(domMatrix);\n    } else {\n      // Shading fills are applied relative to the current matrix which is also\n      // how canvas gradients work, so there's no need to do anything special\n      // here.\n      applyBoundingBox(ctx, this._bbox);\n      pattern = this._createGradient(ctx);\n    }\n    return pattern;\n  }\n}\n\nfunction drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n  // Very basic Gouraud-shaded triangle rasterization algorithm.\n  const coords = context.coords,\n    colors = context.colors;\n  const bytes = data.data,\n    rowSize = data.width * 4;\n  let tmp;\n  if (coords[p1 + 1] > coords[p2 + 1]) {\n    tmp = p1;\n    p1 = p2;\n    p2 = tmp;\n    tmp = c1;\n    c1 = c2;\n    c2 = tmp;\n  }\n  if (coords[p2 + 1] > coords[p3 + 1]) {\n    tmp = p2;\n    p2 = p3;\n    p3 = tmp;\n    tmp = c2;\n    c2 = c3;\n    c3 = tmp;\n  }\n  if (coords[p1 + 1] > coords[p2 + 1]) {\n    tmp = p1;\n    p1 = p2;\n    p2 = tmp;\n    tmp = c1;\n    c1 = c2;\n    c2 = tmp;\n  }\n  const x1 = (coords[p1] + context.offsetX) * context.scaleX;\n  const y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n  const x2 = (coords[p2] + context.offsetX) * context.scaleX;\n  const y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n  const x3 = (coords[p3] + context.offsetX) * context.scaleX;\n  const y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n  if (y1 >= y3) {\n    return;\n  }\n  const c1r = colors[c1],\n    c1g = colors[c1 + 1],\n    c1b = colors[c1 + 2];\n  const c2r = colors[c2],\n    c2g = colors[c2 + 1],\n    c2b = colors[c2 + 2];\n  const c3r = colors[c3],\n    c3g = colors[c3 + 1],\n    c3b = colors[c3 + 2];\n\n  const minY = Math.round(y1),\n    maxY = Math.round(y3);\n  let xa, car, cag, cab;\n  let xb, cbr, cbg, cbb;\n  for (let y = minY; y <= maxY; y++) {\n    if (y < y2) {\n      const k = y < y1 ? 0 : (y1 - y) / (y1 - y2);\n      xa = x1 - (x1 - x2) * k;\n      car = c1r - (c1r - c2r) * k;\n      cag = c1g - (c1g - c2g) * k;\n      cab = c1b - (c1b - c2b) * k;\n    } else {\n      let k;\n      if (y > y3) {\n        k = 1;\n      } else if (y2 === y3) {\n        k = 0;\n      } else {\n        k = (y2 - y) / (y2 - y3);\n      }\n      xa = x2 - (x2 - x3) * k;\n      car = c2r - (c2r - c3r) * k;\n      cag = c2g - (c2g - c3g) * k;\n      cab = c2b - (c2b - c3b) * k;\n    }\n\n    let k;\n    if (y < y1) {\n      k = 0;\n    } else if (y > y3) {\n      k = 1;\n    } else {\n      k = (y1 - y) / (y1 - y3);\n    }\n    xb = x1 - (x1 - x3) * k;\n    cbr = c1r - (c1r - c3r) * k;\n    cbg = c1g - (c1g - c3g) * k;\n    cbb = c1b - (c1b - c3b) * k;\n    const x1_ = Math.round(Math.min(xa, xb));\n    const x2_ = Math.round(Math.max(xa, xb));\n    let j = rowSize * y + x1_ * 4;\n    for (let x = x1_; x <= x2_; x++) {\n      k = (xa - x) / (xa - xb);\n      if (k < 0) {\n        k = 0;\n      } else if (k > 1) {\n        k = 1;\n      }\n      bytes[j++] = (car - (car - cbr) * k) | 0;\n      bytes[j++] = (cag - (cag - cbg) * k) | 0;\n      bytes[j++] = (cab - (cab - cbb) * k) | 0;\n      bytes[j++] = 255;\n    }\n  }\n}\n\nfunction drawFigure(data, figure, context) {\n  const ps = figure.coords;\n  const cs = figure.colors;\n  let i, ii;\n  switch (figure.type) {\n    case \"lattice\":\n      const verticesPerRow = figure.verticesPerRow;\n      const rows = Math.floor(ps.length / verticesPerRow) - 1;\n      const cols = verticesPerRow - 1;\n      for (i = 0; i < rows; i++) {\n        let q = i * verticesPerRow;\n        for (let j = 0; j < cols; j++, q++) {\n          drawTriangle(\n            data,\n            context,\n            ps[q],\n            ps[q + 1],\n            ps[q + verticesPerRow],\n            cs[q],\n            cs[q + 1],\n            cs[q + verticesPerRow]\n          );\n          drawTriangle(\n            data,\n            context,\n            ps[q + verticesPerRow + 1],\n            ps[q + 1],\n            ps[q + verticesPerRow],\n            cs[q + verticesPerRow + 1],\n            cs[q + 1],\n            cs[q + verticesPerRow]\n          );\n        }\n      }\n      break;\n    case \"triangles\":\n      for (i = 0, ii = ps.length; i < ii; i += 3) {\n        drawTriangle(\n          data,\n          context,\n          ps[i],\n          ps[i + 1],\n          ps[i + 2],\n          cs[i],\n          cs[i + 1],\n          cs[i + 2]\n        );\n      }\n      break;\n    default:\n      throw new Error(\"illegal figure\");\n  }\n}\n\nclass MeshShadingPattern extends BaseShadingPattern {\n  constructor(IR) {\n    super();\n    this._coords = IR[2];\n    this._colors = IR[3];\n    this._figures = IR[4];\n    this._bounds = IR[5];\n    this._bbox = IR[7];\n    this._background = IR[8];\n    this.matrix = null;\n  }\n\n  _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {\n    // we will increase scale on some weird factor to let antialiasing take\n    // care of \"rough\" edges\n    const EXPECTED_SCALE = 1.1;\n    // MAX_PATTERN_SIZE is used to avoid OOM situation.\n    const MAX_PATTERN_SIZE = 3000; // 10in @ 300dpi shall be enough\n    // We need to keep transparent border around our pattern for fill():\n    // createPattern with 'no-repeat' will bleed edges across entire area.\n    const BORDER_SIZE = 2;\n\n    const offsetX = Math.floor(this._bounds[0]);\n    const offsetY = Math.floor(this._bounds[1]);\n    const boundsWidth = Math.ceil(this._bounds[2]) - offsetX;\n    const boundsHeight = Math.ceil(this._bounds[3]) - offsetY;\n\n    const width = Math.min(\n      Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)),\n      MAX_PATTERN_SIZE\n    );\n    const height = Math.min(\n      Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)),\n      MAX_PATTERN_SIZE\n    );\n    const scaleX = boundsWidth / width;\n    const scaleY = boundsHeight / height;\n\n    const context = {\n      coords: this._coords,\n      colors: this._colors,\n      offsetX: -offsetX,\n      offsetY: -offsetY,\n      scaleX: 1 / scaleX,\n      scaleY: 1 / scaleY,\n    };\n\n    const paddedWidth = width + BORDER_SIZE * 2;\n    const paddedHeight = height + BORDER_SIZE * 2;\n\n    const tmpCanvas = cachedCanvases.getCanvas(\n      \"mesh\",\n      paddedWidth,\n      paddedHeight,\n      false\n    );\n    const tmpCtx = tmpCanvas.context;\n\n    const data = tmpCtx.createImageData(width, height);\n    if (backgroundColor) {\n      const bytes = data.data;\n      for (let i = 0, ii = bytes.length; i < ii; i += 4) {\n        bytes[i] = backgroundColor[0];\n        bytes[i + 1] = backgroundColor[1];\n        bytes[i + 2] = backgroundColor[2];\n        bytes[i + 3] = 255;\n      }\n    }\n    for (const figure of this._figures) {\n      drawFigure(data, figure, context);\n    }\n    tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n    const canvas = tmpCanvas.canvas;\n\n    return {\n      canvas,\n      offsetX: offsetX - BORDER_SIZE * scaleX,\n      offsetY: offsetY - BORDER_SIZE * scaleY,\n      scaleX,\n      scaleY,\n    };\n  }\n\n  getPattern(ctx, owner, inverse, pathType) {\n    applyBoundingBox(ctx, this._bbox);\n    let scale;\n    if (pathType === PathType.SHADING) {\n      scale = Util.singularValueDecompose2dScale(getCurrentTransform(ctx));\n    } else {\n      // Obtain scale from matrix and current transformation matrix.\n      scale = Util.singularValueDecompose2dScale(owner.baseTransform);\n      if (this.matrix) {\n        const matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n        scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]];\n      }\n    }\n\n    // Rasterizing on the main thread since sending/queue large canvases\n    // might cause OOM.\n    const temporaryPatternCanvas = this._createMeshCanvas(\n      scale,\n      pathType === PathType.SHADING ? null : this._background,\n      owner.cachedCanvases\n    );\n\n    if (pathType !== PathType.SHADING) {\n      ctx.setTransform(...owner.baseTransform);\n      if (this.matrix) {\n        ctx.transform(...this.matrix);\n      }\n    }\n\n    ctx.translate(\n      temporaryPatternCanvas.offsetX,\n      temporaryPatternCanvas.offsetY\n    );\n    ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);\n\n    return ctx.createPattern(temporaryPatternCanvas.canvas, \"no-repeat\");\n  }\n}\n\nclass DummyShadingPattern extends BaseShadingPattern {\n  getPattern() {\n    return \"hotpink\";\n  }\n}\n\nfunction getShadingPattern(IR) {\n  switch (IR[0]) {\n    case \"RadialAxial\":\n      return new RadialAxialShadingPattern(IR);\n    case \"Mesh\":\n      return new MeshShadingPattern(IR);\n    case \"Dummy\":\n      return new DummyShadingPattern();\n  }\n  throw new Error(`Unknown IR type: ${IR[0]}`);\n}\n\nconst PaintType = {\n  COLORED: 1,\n  UNCOLORED: 2,\n};\n\nclass TilingPattern {\n  // 10in @ 300dpi shall be enough.\n  static MAX_PATTERN_SIZE = 3000;\n\n  constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n    this.operatorList = IR[2];\n    this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];\n    this.bbox = IR[4];\n    this.xstep = IR[5];\n    this.ystep = IR[6];\n    this.paintType = IR[7];\n    this.tilingType = IR[8];\n    this.color = color;\n    this.ctx = ctx;\n    this.canvasGraphicsFactory = canvasGraphicsFactory;\n    this.baseTransform = baseTransform;\n  }\n\n  createPatternCanvas(owner) {\n    const operatorList = this.operatorList;\n    const bbox = this.bbox;\n    const xstep = this.xstep;\n    const ystep = this.ystep;\n    const paintType = this.paintType;\n    const tilingType = this.tilingType;\n    const color = this.color;\n    const canvasGraphicsFactory = this.canvasGraphicsFactory;\n\n    info(\"TilingType: \" + tilingType);\n\n    // A tiling pattern as defined by PDF spec 8.7.2 is a cell whose size is\n    // described by bbox, and may repeat regularly by shifting the cell by\n    // xstep and ystep.\n    // Because the HTML5 canvas API does not support pattern repetition with\n    // gaps in between, we use the xstep/ystep instead of the bbox's size.\n    //\n    // This has the following consequences (similarly for ystep):\n    //\n    // - If xstep is the same as bbox, then there is no observable difference.\n    //\n    // - If xstep is larger than bbox, then the pattern canvas is partially\n    //   empty: the area bounded by bbox is painted, the outside area is void.\n    //\n    // - If xstep is smaller than bbox, then the pixels between xstep and the\n    //   bbox boundary will be missing. This is INCORRECT behavior.\n    //   \"Figures on adjacent tiles should not overlap\" (PDF spec 8.7.3.1),\n    //   but overlapping cells without common pixels are still valid.\n    //   TODO: Fix the implementation, to allow this scenario to be painted\n    //   correctly.\n\n    const x0 = bbox[0],\n      y0 = bbox[1],\n      x1 = bbox[2],\n      y1 = bbox[3];\n\n    // Obtain scale from matrix and current transformation matrix.\n    const matrixScale = Util.singularValueDecompose2dScale(this.matrix);\n    const curMatrixScale = Util.singularValueDecompose2dScale(\n      this.baseTransform\n    );\n    const combinedScale = [\n      matrixScale[0] * curMatrixScale[0],\n      matrixScale[1] * curMatrixScale[1],\n    ];\n\n    // Use width and height values that are as close as possible to the end\n    // result when the pattern is used. Too low value makes the pattern look\n    // blurry. Too large value makes it look too crispy.\n    const dimx = this.getSizeAndScale(\n      xstep,\n      this.ctx.canvas.width,\n      combinedScale[0]\n    );\n    const dimy = this.getSizeAndScale(\n      ystep,\n      this.ctx.canvas.height,\n      combinedScale[1]\n    );\n\n    const tmpCanvas = owner.cachedCanvases.getCanvas(\n      \"pattern\",\n      dimx.size,\n      dimy.size,\n      true\n    );\n    const tmpCtx = tmpCanvas.context;\n    const graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n    graphics.groupLevel = owner.groupLevel;\n\n    this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n\n    let adjustedX0 = x0;\n    let adjustedY0 = y0;\n    let adjustedX1 = x1;\n    let adjustedY1 = y1;\n    // Some bounding boxes have negative x0/y0 coordinates which will cause the\n    // some of the drawing to be off of the canvas. To avoid this shift the\n    // bounding box over.\n    if (x0 < 0) {\n      adjustedX0 = 0;\n      adjustedX1 += Math.abs(x0);\n    }\n    if (y0 < 0) {\n      adjustedY0 = 0;\n      adjustedY1 += Math.abs(y0);\n    }\n    tmpCtx.translate(-(dimx.scale * adjustedX0), -(dimy.scale * adjustedY0));\n    graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);\n\n    // To match CanvasGraphics beginDrawing we must save the context here or\n    // else we end up with unbalanced save/restores.\n    tmpCtx.save();\n\n    this.clipBbox(graphics, adjustedX0, adjustedY0, adjustedX1, adjustedY1);\n\n    graphics.baseTransform = getCurrentTransform(graphics.ctx);\n\n    graphics.executeOperatorList(operatorList);\n\n    graphics.endDrawing();\n\n    return {\n      canvas: tmpCanvas.canvas,\n      scaleX: dimx.scale,\n      scaleY: dimy.scale,\n      offsetX: adjustedX0,\n      offsetY: adjustedY0,\n    };\n  }\n\n  getSizeAndScale(step, realOutputSize, scale) {\n    // xstep / ystep may be negative -- normalize.\n    step = Math.abs(step);\n    // MAX_PATTERN_SIZE is used to avoid OOM situation.\n    // Use the destination canvas's size if it is bigger than the hard-coded\n    // limit of MAX_PATTERN_SIZE to avoid clipping patterns that cover the\n    // whole canvas.\n    const maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize);\n    let size = Math.ceil(step * scale);\n    if (size >= maxSize) {\n      size = maxSize;\n    } else {\n      scale = size / step;\n    }\n    return { scale, size };\n  }\n\n  clipBbox(graphics, x0, y0, x1, y1) {\n    const bboxWidth = x1 - x0;\n    const bboxHeight = y1 - y0;\n    graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n    graphics.current.updateRectMinMax(getCurrentTransform(graphics.ctx), [\n      x0,\n      y0,\n      x1,\n      y1,\n    ]);\n    graphics.clip();\n    graphics.endPath();\n  }\n\n  setFillAndStrokeStyleToContext(graphics, paintType, color) {\n    const context = graphics.ctx,\n      current = graphics.current;\n    switch (paintType) {\n      case PaintType.COLORED:\n        const ctx = this.ctx;\n        context.fillStyle = ctx.fillStyle;\n        context.strokeStyle = ctx.strokeStyle;\n        current.fillColor = ctx.fillStyle;\n        current.strokeColor = ctx.strokeStyle;\n        break;\n      case PaintType.UNCOLORED:\n        const cssColor = Util.makeHexColor(color[0], color[1], color[2]);\n        context.fillStyle = cssColor;\n        context.strokeStyle = cssColor;\n        // Set color needed by image masks (fixes issues 3226 and 8741).\n        current.fillColor = cssColor;\n        current.strokeColor = cssColor;\n        break;\n      default:\n        throw new FormatError(`Unsupported paint type: ${paintType}`);\n    }\n  }\n\n  getPattern(ctx, owner, inverse, pathType) {\n    // PDF spec 8.7.2 NOTE 1: pattern's matrix is relative to initial matrix.\n    let matrix = inverse;\n    if (pathType !== PathType.SHADING) {\n      matrix = Util.transform(matrix, owner.baseTransform);\n      if (this.matrix) {\n        matrix = Util.transform(matrix, this.matrix);\n      }\n    }\n\n    const temporaryPatternCanvas = this.createPatternCanvas(owner);\n\n    let domMatrix = new DOMMatrix(matrix);\n    // Rescale and so that the ctx.createPattern call generates a pattern with\n    // the desired size.\n    domMatrix = domMatrix.translate(\n      temporaryPatternCanvas.offsetX,\n      temporaryPatternCanvas.offsetY\n    );\n    domMatrix = domMatrix.scale(\n      1 / temporaryPatternCanvas.scaleX,\n      1 / temporaryPatternCanvas.scaleY\n    );\n\n    const pattern = ctx.createPattern(temporaryPatternCanvas.canvas, \"repeat\");\n    pattern.setTransform(domMatrix);\n\n    return pattern;\n  }\n}\n\nexport { getShadingPattern, PathType, TilingPattern };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { FeatureTest, ImageKind } from \"./util.js\";\n\nfunction convertToRGBA(params) {\n  switch (params.kind) {\n    case ImageKind.GRAYSCALE_1BPP:\n      return convertBlackAndWhiteToRGBA(params);\n    case ImageKind.RGB_24BPP:\n      return convertRGBToRGBA(params);\n  }\n\n  return null;\n}\n\nfunction convertBlackAndWhiteToRGBA({\n  src,\n  srcPos = 0,\n  dest,\n  width,\n  height,\n  nonBlackColor = 0xffffffff,\n  inverseDecode = false,\n}) {\n  const black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n  const [zeroMapping, oneMapping] = inverseDecode\n    ? [nonBlackColor, black]\n    : [black, nonBlackColor];\n  const widthInSource = width >> 3;\n  const widthRemainder = width & 7;\n  const srcLength = src.length;\n  dest = new Uint32Array(dest.buffer);\n  let destPos = 0;\n\n  for (let i = 0; i < height; i++) {\n    for (const max = srcPos + widthInSource; srcPos < max; srcPos++) {\n      const elem = srcPos < srcLength ? src[srcPos] : 255;\n      dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping;\n      dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping;\n    }\n    if (widthRemainder === 0) {\n      continue;\n    }\n    const elem = srcPos < srcLength ? src[srcPos++] : 255;\n    for (let j = 0; j < widthRemainder; j++) {\n      dest[destPos++] = elem & (1 << (7 - j)) ? oneMapping : zeroMapping;\n    }\n  }\n  return { srcPos, destPos };\n}\n\nfunction convertRGBToRGBA({\n  src,\n  srcPos = 0,\n  dest,\n  destPos = 0,\n  width,\n  height,\n}) {\n  let i = 0;\n  const len32 = src.length >> 2;\n  const src32 = new Uint32Array(src.buffer, srcPos, len32);\n\n  if (FeatureTest.isLittleEndian) {\n    // It's a way faster to do the shuffle manually instead of working\n    // component by component with some Uint8 arrays.\n    for (; i < len32 - 2; i += 3, destPos += 4) {\n      const s1 = src32[i]; // R2B1G1R1\n      const s2 = src32[i + 1]; // G3R3B2G2\n      const s3 = src32[i + 2]; // B4G4R4B3\n\n      dest[destPos] = s1 | 0xff000000;\n      dest[destPos + 1] = (s1 >>> 24) | (s2 << 8) | 0xff000000;\n      dest[destPos + 2] = (s2 >>> 16) | (s3 << 16) | 0xff000000;\n      dest[destPos + 3] = (s3 >>> 8) | 0xff000000;\n    }\n\n    for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n      dest[destPos++] =\n        src[j] | (src[j + 1] << 8) | (src[j + 2] << 16) | 0xff000000;\n    }\n  } else {\n    for (; i < len32 - 2; i += 3, destPos += 4) {\n      const s1 = src32[i]; // R1G1B1R2\n      const s2 = src32[i + 1]; // G2B2R3G3\n      const s3 = src32[i + 2]; // B3R4G4B4\n\n      dest[destPos] = s1 | 0xff;\n      dest[destPos + 1] = (s1 << 24) | (s2 >>> 8) | 0xff;\n      dest[destPos + 2] = (s2 << 16) | (s3 >>> 16) | 0xff;\n      dest[destPos + 3] = (s3 << 8) | 0xff;\n    }\n\n    for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n      dest[destPos++] =\n        (src[j] << 24) | (src[j + 1] << 16) | (src[j + 2] << 8) | 0xff;\n    }\n  }\n\n  return { srcPos, destPos };\n}\n\nfunction grayToRGBA(src, dest) {\n  if (FeatureTest.isLittleEndian) {\n    for (let i = 0, ii = src.length; i < ii; i++) {\n      dest[i] = (src[i] * 0x10101) | 0xff000000;\n    }\n  } else {\n    for (let i = 0, ii = src.length; i < ii; i++) {\n      dest[i] = (src[i] * 0x1010100) | 0x000000ff;\n    }\n  }\n}\n\nexport { convertBlackAndWhiteToRGBA, convertToRGBA, grayToRGBA };\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @typedef {Object} GlobalWorkerOptionsType\n * @property {Worker | null} workerPort - Defines global port for worker\n *   process. Overrides the `workerSrc` option.\n * @property {string} workerSrc - A string containing the path and filename\n *   of the worker file.\n *\n *   NOTE: The `workerSrc` option should always be set, in order to prevent any\n *         issues when using the PDF.js library.\n */\n\n/** @type {GlobalWorkerOptionsType} */\nconst GlobalWorkerOptions = Object.create(null);\n\nGlobalWorkerOptions.workerPort = null;\nGlobalWorkerOptions.workerSrc = \"\";\n\nexport { GlobalWorkerOptions };\n","/* Copyright 2018 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  AbortException,\n  assert,\n  MissingPDFException,\n  PasswordException,\n  PromiseCapability,\n  UnexpectedResponseException,\n  UnknownErrorException,\n  unreachable,\n} from \"./util.js\";\n\nconst CallbackKind = {\n  UNKNOWN: 0,\n  DATA: 1,\n  ERROR: 2,\n};\n\nconst StreamKind = {\n  UNKNOWN: 0,\n  CANCEL: 1,\n  CANCEL_COMPLETE: 2,\n  CLOSE: 3,\n  ENQUEUE: 4,\n  ERROR: 5,\n  PULL: 6,\n  PULL_COMPLETE: 7,\n  START_COMPLETE: 8,\n};\n\nfunction wrapReason(reason) {\n  if (\n    !(\n      reason instanceof Error ||\n      (typeof reason === \"object\" && reason !== null)\n    )\n  ) {\n    unreachable(\n      'wrapReason: Expected \"reason\" to be a (possibly cloned) Error.'\n    );\n  }\n  switch (reason.name) {\n    case \"AbortException\":\n      return new AbortException(reason.message);\n    case \"MissingPDFException\":\n      return new MissingPDFException(reason.message);\n    case \"PasswordException\":\n      return new PasswordException(reason.message, reason.code);\n    case \"UnexpectedResponseException\":\n      return new UnexpectedResponseException(reason.message, reason.status);\n    case \"UnknownErrorException\":\n      return new UnknownErrorException(reason.message, reason.details);\n    default:\n      return new UnknownErrorException(reason.message, reason.toString());\n  }\n}\n\nclass MessageHandler {\n  constructor(sourceName, targetName, comObj) {\n    this.sourceName = sourceName;\n    this.targetName = targetName;\n    this.comObj = comObj;\n    this.callbackId = 1;\n    this.streamId = 1;\n    this.streamSinks = Object.create(null);\n    this.streamControllers = Object.create(null);\n    this.callbackCapabilities = Object.create(null);\n    this.actionHandler = Object.create(null);\n\n    this._onComObjOnMessage = event => {\n      const data = event.data;\n      if (data.targetName !== this.sourceName) {\n        return;\n      }\n      if (data.stream) {\n        this.#processStreamMessage(data);\n        return;\n      }\n      if (data.callback) {\n        const callbackId = data.callbackId;\n        const capability = this.callbackCapabilities[callbackId];\n        if (!capability) {\n          throw new Error(`Cannot resolve callback ${callbackId}`);\n        }\n        delete this.callbackCapabilities[callbackId];\n\n        if (data.callback === CallbackKind.DATA) {\n          capability.resolve(data.data);\n        } else if (data.callback === CallbackKind.ERROR) {\n          capability.reject(wrapReason(data.reason));\n        } else {\n          throw new Error(\"Unexpected callback case\");\n        }\n        return;\n      }\n      const action = this.actionHandler[data.action];\n      if (!action) {\n        throw new Error(`Unknown action from worker: ${data.action}`);\n      }\n      if (data.callbackId) {\n        const cbSourceName = this.sourceName;\n        const cbTargetName = data.sourceName;\n\n        new Promise(function (resolve) {\n          resolve(action(data.data));\n        }).then(\n          function (result) {\n            comObj.postMessage({\n              sourceName: cbSourceName,\n              targetName: cbTargetName,\n              callback: CallbackKind.DATA,\n              callbackId: data.callbackId,\n              data: result,\n            });\n          },\n          function (reason) {\n            comObj.postMessage({\n              sourceName: cbSourceName,\n              targetName: cbTargetName,\n              callback: CallbackKind.ERROR,\n              callbackId: data.callbackId,\n              reason: wrapReason(reason),\n            });\n          }\n        );\n        return;\n      }\n      if (data.streamId) {\n        this.#createStreamSink(data);\n        return;\n      }\n      action(data.data);\n    };\n    comObj.addEventListener(\"message\", this._onComObjOnMessage);\n  }\n\n  on(actionName, handler) {\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      assert(\n        typeof handler === \"function\",\n        'MessageHandler.on: Expected \"handler\" to be a function.'\n      );\n    }\n    const ah = this.actionHandler;\n    if (ah[actionName]) {\n      throw new Error(`There is already an actionName called \"${actionName}\"`);\n    }\n    ah[actionName] = handler;\n  }\n\n  /**\n   * Sends a message to the comObj to invoke the action with the supplied data.\n   * @param {string} actionName - Action to call.\n   * @param {JSON} data - JSON data to send.\n   * @param {Array} [transfers] - List of transfers/ArrayBuffers.\n   */\n  send(actionName, data, transfers) {\n    this.comObj.postMessage(\n      {\n        sourceName: this.sourceName,\n        targetName: this.targetName,\n        action: actionName,\n        data,\n      },\n      transfers\n    );\n  }\n\n  /**\n   * Sends a message to the comObj to invoke the action with the supplied data.\n   * Expects that the other side will callback with the response.\n   * @param {string} actionName - Action to call.\n   * @param {JSON} data - JSON data to send.\n   * @param {Array} [transfers] - List of transfers/ArrayBuffers.\n   * @returns {Promise} Promise to be resolved with response data.\n   */\n  sendWithPromise(actionName, data, transfers) {\n    const callbackId = this.callbackId++;\n    const capability = new PromiseCapability();\n    this.callbackCapabilities[callbackId] = capability;\n    try {\n      this.comObj.postMessage(\n        {\n          sourceName: this.sourceName,\n          targetName: this.targetName,\n          action: actionName,\n          callbackId,\n          data,\n        },\n        transfers\n      );\n    } catch (ex) {\n      capability.reject(ex);\n    }\n    return capability.promise;\n  }\n\n  /**\n   * Sends a message to the comObj to invoke the action with the supplied data.\n   * Expect that the other side will callback to signal 'start_complete'.\n   * @param {string} actionName - Action to call.\n   * @param {JSON} data - JSON data to send.\n   * @param {Object} queueingStrategy - Strategy to signal backpressure based on\n   *                 internal queue.\n   * @param {Array} [transfers] - List of transfers/ArrayBuffers.\n   * @returns {ReadableStream} ReadableStream to read data in chunks.\n   */\n  sendWithStream(actionName, data, queueingStrategy, transfers) {\n    const streamId = this.streamId++,\n      sourceName = this.sourceName,\n      targetName = this.targetName,\n      comObj = this.comObj;\n\n    return new ReadableStream(\n      {\n        start: controller => {\n          const startCapability = new PromiseCapability();\n          this.streamControllers[streamId] = {\n            controller,\n            startCall: startCapability,\n            pullCall: null,\n            cancelCall: null,\n            isClosed: false,\n          };\n          comObj.postMessage(\n            {\n              sourceName,\n              targetName,\n              action: actionName,\n              streamId,\n              data,\n              desiredSize: controller.desiredSize,\n            },\n            transfers\n          );\n          // Return Promise for Async process, to signal success/failure.\n          return startCapability.promise;\n        },\n\n        pull: controller => {\n          const pullCapability = new PromiseCapability();\n          this.streamControllers[streamId].pullCall = pullCapability;\n          comObj.postMessage({\n            sourceName,\n            targetName,\n            stream: StreamKind.PULL,\n            streamId,\n            desiredSize: controller.desiredSize,\n          });\n          // Returning Promise will not call \"pull\"\n          // again until current pull is resolved.\n          return pullCapability.promise;\n        },\n\n        cancel: reason => {\n          assert(reason instanceof Error, \"cancel must have a valid reason\");\n          const cancelCapability = new PromiseCapability();\n          this.streamControllers[streamId].cancelCall = cancelCapability;\n          this.streamControllers[streamId].isClosed = true;\n          comObj.postMessage({\n            sourceName,\n            targetName,\n            stream: StreamKind.CANCEL,\n            streamId,\n            reason: wrapReason(reason),\n          });\n          // Return Promise to signal success or failure.\n          return cancelCapability.promise;\n        },\n      },\n      queueingStrategy\n    );\n  }\n\n  #createStreamSink(data) {\n    const streamId = data.streamId,\n      sourceName = this.sourceName,\n      targetName = data.sourceName,\n      comObj = this.comObj;\n    const self = this,\n      action = this.actionHandler[data.action];\n\n    const streamSink = {\n      enqueue(chunk, size = 1, transfers) {\n        if (this.isCancelled) {\n          return;\n        }\n        const lastDesiredSize = this.desiredSize;\n        this.desiredSize -= size;\n        // Enqueue decreases the desiredSize property of sink,\n        // so when it changes from positive to negative,\n        // set ready as unresolved promise.\n        if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n          this.sinkCapability = new PromiseCapability();\n          this.ready = this.sinkCapability.promise;\n        }\n        comObj.postMessage(\n          {\n            sourceName,\n            targetName,\n            stream: StreamKind.ENQUEUE,\n            streamId,\n            chunk,\n          },\n          transfers\n        );\n      },\n\n      close() {\n        if (this.isCancelled) {\n          return;\n        }\n        this.isCancelled = true;\n        comObj.postMessage({\n          sourceName,\n          targetName,\n          stream: StreamKind.CLOSE,\n          streamId,\n        });\n        delete self.streamSinks[streamId];\n      },\n\n      error(reason) {\n        assert(reason instanceof Error, \"error must have a valid reason\");\n        if (this.isCancelled) {\n          return;\n        }\n        this.isCancelled = true;\n        comObj.postMessage({\n          sourceName,\n          targetName,\n          stream: StreamKind.ERROR,\n          streamId,\n          reason: wrapReason(reason),\n        });\n      },\n\n      sinkCapability: new PromiseCapability(),\n      onPull: null,\n      onCancel: null,\n      isCancelled: false,\n      desiredSize: data.desiredSize,\n      ready: null,\n    };\n\n    streamSink.sinkCapability.resolve();\n    streamSink.ready = streamSink.sinkCapability.promise;\n    this.streamSinks[streamId] = streamSink;\n\n    new Promise(function (resolve) {\n      resolve(action(data.data, streamSink));\n    }).then(\n      function () {\n        comObj.postMessage({\n          sourceName,\n          targetName,\n          stream: StreamKind.START_COMPLETE,\n          streamId,\n          success: true,\n        });\n      },\n      function (reason) {\n        comObj.postMessage({\n          sourceName,\n          targetName,\n          stream: StreamKind.START_COMPLETE,\n          streamId,\n          reason: wrapReason(reason),\n        });\n      }\n    );\n  }\n\n  #processStreamMessage(data) {\n    const streamId = data.streamId,\n      sourceName = this.sourceName,\n      targetName = data.sourceName,\n      comObj = this.comObj;\n    const streamController = this.streamControllers[streamId],\n      streamSink = this.streamSinks[streamId];\n\n    switch (data.stream) {\n      case StreamKind.START_COMPLETE:\n        if (data.success) {\n          streamController.startCall.resolve();\n        } else {\n          streamController.startCall.reject(wrapReason(data.reason));\n        }\n        break;\n      case StreamKind.PULL_COMPLETE:\n        if (data.success) {\n          streamController.pullCall.resolve();\n        } else {\n          streamController.pullCall.reject(wrapReason(data.reason));\n        }\n        break;\n      case StreamKind.PULL:\n        // Ignore any pull after close is called.\n        if (!streamSink) {\n          comObj.postMessage({\n            sourceName,\n            targetName,\n            stream: StreamKind.PULL_COMPLETE,\n            streamId,\n            success: true,\n          });\n          break;\n        }\n        // Pull increases the desiredSize property of sink, so when it changes\n        // from negative to positive, set ready property as resolved promise.\n        if (streamSink.desiredSize <= 0 && data.desiredSize > 0) {\n          streamSink.sinkCapability.resolve();\n        }\n        // Reset desiredSize property of sink on every pull.\n        streamSink.desiredSize = data.desiredSize;\n\n        new Promise(function (resolve) {\n          resolve(streamSink.onPull?.());\n        }).then(\n          function () {\n            comObj.postMessage({\n              sourceName,\n              targetName,\n              stream: StreamKind.PULL_COMPLETE,\n              streamId,\n              success: true,\n            });\n          },\n          function (reason) {\n            comObj.postMessage({\n              sourceName,\n              targetName,\n              stream: StreamKind.PULL_COMPLETE,\n              streamId,\n              reason: wrapReason(reason),\n            });\n          }\n        );\n        break;\n      case StreamKind.ENQUEUE:\n        assert(streamController, \"enqueue should have stream controller\");\n        if (streamController.isClosed) {\n          break;\n        }\n        streamController.controller.enqueue(data.chunk);\n        break;\n      case StreamKind.CLOSE:\n        assert(streamController, \"close should have stream controller\");\n        if (streamController.isClosed) {\n          break;\n        }\n        streamController.isClosed = true;\n        streamController.controller.close();\n        this.#deleteStreamController(streamController, streamId);\n        break;\n      case StreamKind.ERROR:\n        assert(streamController, \"error should have stream controller\");\n        streamController.controller.error(wrapReason(data.reason));\n        this.#deleteStreamController(streamController, streamId);\n        break;\n      case StreamKind.CANCEL_COMPLETE:\n        if (data.success) {\n          streamController.cancelCall.resolve();\n        } else {\n          streamController.cancelCall.reject(wrapReason(data.reason));\n        }\n        this.#deleteStreamController(streamController, streamId);\n        break;\n      case StreamKind.CANCEL:\n        if (!streamSink) {\n          break;\n        }\n\n        new Promise(function (resolve) {\n          resolve(streamSink.onCancel?.(wrapReason(data.reason)));\n        }).then(\n          function () {\n            comObj.postMessage({\n              sourceName,\n              targetName,\n              stream: StreamKind.CANCEL_COMPLETE,\n              streamId,\n              success: true,\n            });\n          },\n          function (reason) {\n            comObj.postMessage({\n              sourceName,\n              targetName,\n              stream: StreamKind.CANCEL_COMPLETE,\n              streamId,\n              reason: wrapReason(reason),\n            });\n          }\n        );\n        streamSink.sinkCapability.reject(wrapReason(data.reason));\n        streamSink.isCancelled = true;\n        delete this.streamSinks[streamId];\n        break;\n      default:\n        throw new Error(\"Unexpected stream case\");\n    }\n  }\n\n  async #deleteStreamController(streamController, streamId) {\n    // Delete the `streamController` only when the start, pull, and cancel\n    // capabilities have settled, to prevent `TypeError`s.\n    await Promise.allSettled([\n      streamController.startCall?.promise,\n      streamController.pullCall?.promise,\n      streamController.cancelCall?.promise,\n    ]);\n    delete this.streamControllers[streamId];\n  }\n\n  destroy() {\n    this.comObj.removeEventListener(\"message\", this._onComObjOnMessage);\n  }\n}\n\nexport { MessageHandler };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { objectFromMap } from \"../shared/util.js\";\n\nclass Metadata {\n  #metadataMap;\n\n  #data;\n\n  constructor({ parsedData, rawData }) {\n    this.#metadataMap = parsedData;\n    this.#data = rawData;\n  }\n\n  getRaw() {\n    return this.#data;\n  }\n\n  get(name) {\n    return this.#metadataMap.get(name) ?? null;\n  }\n\n  getAll() {\n    return objectFromMap(this.#metadataMap);\n  }\n\n  has(name) {\n    return this.#metadataMap.has(name);\n  }\n}\n\nexport { Metadata };\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { objectFromMap, unreachable, warn } from \"../shared/util.js\";\nimport { MurmurHash3_64 } from \"../shared/murmurhash3.js\";\n\nconst INTERNAL = Symbol(\"INTERNAL\");\n\nclass OptionalContentGroup {\n  #visible = true;\n\n  constructor(name, intent) {\n    this.name = name;\n    this.intent = intent;\n  }\n\n  /**\n   * @type {boolean}\n   */\n  get visible() {\n    return this.#visible;\n  }\n\n  /**\n   * @ignore\n   */\n  _setVisible(internal, visible) {\n    if (internal !== INTERNAL) {\n      unreachable(\"Internal method `_setVisible` called.\");\n    }\n    this.#visible = visible;\n  }\n}\n\nclass OptionalContentConfig {\n  #cachedGetHash = null;\n\n  #groups = new Map();\n\n  #initialHash = null;\n\n  #order = null;\n\n  constructor(data) {\n    this.name = null;\n    this.creator = null;\n\n    if (data === null) {\n      return;\n    }\n    this.name = data.name;\n    this.creator = data.creator;\n    this.#order = data.order;\n    for (const group of data.groups) {\n      this.#groups.set(\n        group.id,\n        new OptionalContentGroup(group.name, group.intent)\n      );\n    }\n\n    if (data.baseState === \"OFF\") {\n      for (const group of this.#groups.values()) {\n        group._setVisible(INTERNAL, false);\n      }\n    }\n\n    for (const on of data.on) {\n      this.#groups.get(on)._setVisible(INTERNAL, true);\n    }\n\n    for (const off of data.off) {\n      this.#groups.get(off)._setVisible(INTERNAL, false);\n    }\n\n    // The following code must always run *last* in the constructor.\n    this.#initialHash = this.getHash();\n  }\n\n  #evaluateVisibilityExpression(array) {\n    const length = array.length;\n    if (length < 2) {\n      return true;\n    }\n    const operator = array[0];\n    for (let i = 1; i < length; i++) {\n      const element = array[i];\n      let state;\n      if (Array.isArray(element)) {\n        state = this.#evaluateVisibilityExpression(element);\n      } else if (this.#groups.has(element)) {\n        state = this.#groups.get(element).visible;\n      } else {\n        warn(`Optional content group not found: ${element}`);\n        return true;\n      }\n      switch (operator) {\n        case \"And\":\n          if (!state) {\n            return false;\n          }\n          break;\n        case \"Or\":\n          if (state) {\n            return true;\n          }\n          break;\n        case \"Not\":\n          return !state;\n        default:\n          return true;\n      }\n    }\n    return operator === \"And\";\n  }\n\n  isVisible(group) {\n    if (this.#groups.size === 0) {\n      return true;\n    }\n    if (!group) {\n      warn(\"Optional content group not defined.\");\n      return true;\n    }\n    if (group.type === \"OCG\") {\n      if (!this.#groups.has(group.id)) {\n        warn(`Optional content group not found: ${group.id}`);\n        return true;\n      }\n      return this.#groups.get(group.id).visible;\n    } else if (group.type === \"OCMD\") {\n      // Per the spec, the expression should be preferred if available.\n      if (group.expression) {\n        return this.#evaluateVisibilityExpression(group.expression);\n      }\n      if (!group.policy || group.policy === \"AnyOn\") {\n        // Default\n        for (const id of group.ids) {\n          if (!this.#groups.has(id)) {\n            warn(`Optional content group not found: ${id}`);\n            return true;\n          }\n          if (this.#groups.get(id).visible) {\n            return true;\n          }\n        }\n        return false;\n      } else if (group.policy === \"AllOn\") {\n        for (const id of group.ids) {\n          if (!this.#groups.has(id)) {\n            warn(`Optional content group not found: ${id}`);\n            return true;\n          }\n          if (!this.#groups.get(id).visible) {\n            return false;\n          }\n        }\n        return true;\n      } else if (group.policy === \"AnyOff\") {\n        for (const id of group.ids) {\n          if (!this.#groups.has(id)) {\n            warn(`Optional content group not found: ${id}`);\n            return true;\n          }\n          if (!this.#groups.get(id).visible) {\n            return true;\n          }\n        }\n        return false;\n      } else if (group.policy === \"AllOff\") {\n        for (const id of group.ids) {\n          if (!this.#groups.has(id)) {\n            warn(`Optional content group not found: ${id}`);\n            return true;\n          }\n          if (this.#groups.get(id).visible) {\n            return false;\n          }\n        }\n        return true;\n      }\n      warn(`Unknown optional content policy ${group.policy}.`);\n      return true;\n    }\n    warn(`Unknown group type ${group.type}.`);\n    return true;\n  }\n\n  setVisibility(id, visible = true) {\n    if (!this.#groups.has(id)) {\n      warn(`Optional content group not found: ${id}`);\n      return;\n    }\n    this.#groups.get(id)._setVisible(INTERNAL, !!visible);\n\n    this.#cachedGetHash = null;\n  }\n\n  get hasInitialVisibility() {\n    return this.#initialHash === null || this.getHash() === this.#initialHash;\n  }\n\n  getOrder() {\n    if (!this.#groups.size) {\n      return null;\n    }\n    if (this.#order) {\n      return this.#order.slice();\n    }\n    return [...this.#groups.keys()];\n  }\n\n  getGroups() {\n    return this.#groups.size > 0 ? objectFromMap(this.#groups) : null;\n  }\n\n  getGroup(id) {\n    return this.#groups.get(id) || null;\n  }\n\n  getHash() {\n    if (this.#cachedGetHash !== null) {\n      return this.#cachedGetHash;\n    }\n    const hash = new MurmurHash3_64();\n\n    for (const [id, group] of this.#groups) {\n      hash.update(`${id}:${group.visible}`);\n    }\n    return (this.#cachedGetHash = hash.hexdigest());\n  }\n}\n\nexport { OptionalContentConfig };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"../interfaces\").IPDFStream} IPDFStream */\n/** @typedef {import(\"../interfaces\").IPDFStreamReader} IPDFStreamReader */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"../interfaces\").IPDFStreamRangeReader} IPDFStreamRangeReader */\n\nimport { assert, PromiseCapability } from \"../shared/util.js\";\nimport { isPdfFile } from \"./display_utils.js\";\n\n/** @implements {IPDFStream} */\nclass PDFDataTransportStream {\n  constructor(\n    {\n      length,\n      initialData,\n      progressiveDone = false,\n      contentDispositionFilename = null,\n      disableRange = false,\n      disableStream = false,\n    },\n    pdfDataRangeTransport\n  ) {\n    assert(\n      pdfDataRangeTransport,\n      'PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument.'\n    );\n\n    this._queuedChunks = [];\n    this._progressiveDone = progressiveDone;\n    this._contentDispositionFilename = contentDispositionFilename;\n\n    if (initialData?.length > 0) {\n      // Prevent any possible issues by only transferring a Uint8Array that\n      // completely \"utilizes\" its underlying ArrayBuffer.\n      const buffer =\n        initialData instanceof Uint8Array &&\n        initialData.byteLength === initialData.buffer.byteLength\n          ? initialData.buffer\n          : new Uint8Array(initialData).buffer;\n      this._queuedChunks.push(buffer);\n    }\n\n    this._pdfDataRangeTransport = pdfDataRangeTransport;\n    this._isStreamingSupported = !disableStream;\n    this._isRangeSupported = !disableRange;\n    this._contentLength = length;\n\n    this._fullRequestReader = null;\n    this._rangeReaders = [];\n\n    this._pdfDataRangeTransport.addRangeListener((begin, chunk) => {\n      this._onReceiveData({ begin, chunk });\n    });\n\n    this._pdfDataRangeTransport.addProgressListener((loaded, total) => {\n      this._onProgress({ loaded, total });\n    });\n\n    this._pdfDataRangeTransport.addProgressiveReadListener(chunk => {\n      this._onReceiveData({ chunk });\n    });\n\n    this._pdfDataRangeTransport.addProgressiveDoneListener(() => {\n      this._onProgressiveDone();\n    });\n\n    this._pdfDataRangeTransport.transportReady();\n  }\n\n  _onReceiveData({ begin, chunk }) {\n    // Prevent any possible issues by only transferring a Uint8Array that\n    // completely \"utilizes\" its underlying ArrayBuffer.\n    const buffer =\n      chunk instanceof Uint8Array &&\n      chunk.byteLength === chunk.buffer.byteLength\n        ? chunk.buffer\n        : new Uint8Array(chunk).buffer;\n\n    if (begin === undefined) {\n      if (this._fullRequestReader) {\n        this._fullRequestReader._enqueue(buffer);\n      } else {\n        this._queuedChunks.push(buffer);\n      }\n    } else {\n      const found = this._rangeReaders.some(function (rangeReader) {\n        if (rangeReader._begin !== begin) {\n          return false;\n        }\n        rangeReader._enqueue(buffer);\n        return true;\n      });\n      assert(\n        found,\n        \"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.\"\n      );\n    }\n  }\n\n  get _progressiveDataLength() {\n    return this._fullRequestReader?._loaded ?? 0;\n  }\n\n  _onProgress(evt) {\n    if (evt.total === undefined) {\n      // Reporting to first range reader, if it exists.\n      this._rangeReaders[0]?.onProgress?.({ loaded: evt.loaded });\n    } else {\n      this._fullRequestReader?.onProgress?.({\n        loaded: evt.loaded,\n        total: evt.total,\n      });\n    }\n  }\n\n  _onProgressiveDone() {\n    this._fullRequestReader?.progressiveDone();\n    this._progressiveDone = true;\n  }\n\n  _removeRangeReader(reader) {\n    const i = this._rangeReaders.indexOf(reader);\n    if (i >= 0) {\n      this._rangeReaders.splice(i, 1);\n    }\n  }\n\n  getFullReader() {\n    assert(\n      !this._fullRequestReader,\n      \"PDFDataTransportStream.getFullReader can only be called once.\"\n    );\n    const queuedChunks = this._queuedChunks;\n    this._queuedChunks = null;\n    return new PDFDataTransportStreamReader(\n      this,\n      queuedChunks,\n      this._progressiveDone,\n      this._contentDispositionFilename\n    );\n  }\n\n  getRangeReader(begin, end) {\n    if (end <= this._progressiveDataLength) {\n      return null;\n    }\n    const reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n    this._pdfDataRangeTransport.requestDataRange(begin, end);\n    this._rangeReaders.push(reader);\n    return reader;\n  }\n\n  cancelAllRequests(reason) {\n    this._fullRequestReader?.cancel(reason);\n\n    for (const reader of this._rangeReaders.slice(0)) {\n      reader.cancel(reason);\n    }\n    this._pdfDataRangeTransport.abort();\n  }\n}\n\n/** @implements {IPDFStreamReader} */\nclass PDFDataTransportStreamReader {\n  constructor(\n    stream,\n    queuedChunks,\n    progressiveDone = false,\n    contentDispositionFilename = null\n  ) {\n    this._stream = stream;\n    this._done = progressiveDone || false;\n    this._filename = isPdfFile(contentDispositionFilename)\n      ? contentDispositionFilename\n      : null;\n    this._queuedChunks = queuedChunks || [];\n    this._loaded = 0;\n    for (const chunk of this._queuedChunks) {\n      this._loaded += chunk.byteLength;\n    }\n    this._requests = [];\n    this._headersReady = Promise.resolve();\n    stream._fullRequestReader = this;\n\n    this.onProgress = null;\n  }\n\n  _enqueue(chunk) {\n    if (this._done) {\n      return; // Ignore new data.\n    }\n    if (this._requests.length > 0) {\n      const requestCapability = this._requests.shift();\n      requestCapability.resolve({ value: chunk, done: false });\n    } else {\n      this._queuedChunks.push(chunk);\n    }\n    this._loaded += chunk.byteLength;\n  }\n\n  get headersReady() {\n    return this._headersReady;\n  }\n\n  get filename() {\n    return this._filename;\n  }\n\n  get isRangeSupported() {\n    return this._stream._isRangeSupported;\n  }\n\n  get isStreamingSupported() {\n    return this._stream._isStreamingSupported;\n  }\n\n  get contentLength() {\n    return this._stream._contentLength;\n  }\n\n  async read() {\n    if (this._queuedChunks.length > 0) {\n      const chunk = this._queuedChunks.shift();\n      return { value: chunk, done: false };\n    }\n    if (this._done) {\n      return { value: undefined, done: true };\n    }\n    const requestCapability = new PromiseCapability();\n    this._requests.push(requestCapability);\n    return requestCapability.promise;\n  }\n\n  cancel(reason) {\n    this._done = true;\n    for (const requestCapability of this._requests) {\n      requestCapability.resolve({ value: undefined, done: true });\n    }\n    this._requests.length = 0;\n  }\n\n  progressiveDone() {\n    if (this._done) {\n      return;\n    }\n    this._done = true;\n  }\n}\n\n/** @implements {IPDFStreamRangeReader} */\nclass PDFDataTransportStreamRangeReader {\n  constructor(stream, begin, end) {\n    this._stream = stream;\n    this._begin = begin;\n    this._end = end;\n    this._queuedChunk = null;\n    this._requests = [];\n    this._done = false;\n\n    this.onProgress = null;\n  }\n\n  _enqueue(chunk) {\n    if (this._done) {\n      return; // ignore new data\n    }\n    if (this._requests.length === 0) {\n      this._queuedChunk = chunk;\n    } else {\n      const requestsCapability = this._requests.shift();\n      requestsCapability.resolve({ value: chunk, done: false });\n      for (const requestCapability of this._requests) {\n        requestCapability.resolve({ value: undefined, done: true });\n      }\n      this._requests.length = 0;\n    }\n    this._done = true;\n    this._stream._removeRangeReader(this);\n  }\n\n  get isStreamingSupported() {\n    return false;\n  }\n\n  async read() {\n    if (this._queuedChunk) {\n      const chunk = this._queuedChunk;\n      this._queuedChunk = null;\n      return { value: chunk, done: false };\n    }\n    if (this._done) {\n      return { value: undefined, done: true };\n    }\n    const requestCapability = new PromiseCapability();\n    this._requests.push(requestCapability);\n    return requestCapability.promise;\n  }\n\n  cancel(reason) {\n    this._done = true;\n    for (const requestCapability of this._requests) {\n      requestCapability.resolve({ value: undefined, done: true });\n    }\n    this._requests.length = 0;\n    this._stream._removeRangeReader(this);\n  }\n}\n\nexport { PDFDataTransportStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  AbortException,\n  assert,\n  PromiseCapability,\n  warn,\n} from \"../shared/util.js\";\nimport {\n  createResponseStatusError,\n  extractFilenameFromHeader,\n  validateRangeRequestCapabilities,\n  validateResponseStatus,\n} from \"./network_utils.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n  throw new Error(\n    'Module \"./fetch_stream.js\" shall not be used with MOZCENTRAL builds.'\n  );\n}\n\nfunction createFetchOptions(headers, withCredentials, abortController) {\n  return {\n    method: \"GET\",\n    headers,\n    signal: abortController.signal,\n    mode: \"cors\",\n    credentials: withCredentials ? \"include\" : \"same-origin\",\n    redirect: \"follow\",\n  };\n}\n\nfunction createHeaders(httpHeaders) {\n  const headers = new Headers();\n  for (const property in httpHeaders) {\n    const value = httpHeaders[property];\n    if (value === undefined) {\n      continue;\n    }\n    headers.append(property, value);\n  }\n  return headers;\n}\n\nfunction getArrayBuffer(val) {\n  if (val instanceof Uint8Array) {\n    return val.buffer;\n  }\n  if (val instanceof ArrayBuffer) {\n    return val;\n  }\n  warn(`getArrayBuffer - unexpected data format: ${val}`);\n  return new Uint8Array(val).buffer;\n}\n\n/** @implements {IPDFStream} */\nclass PDFFetchStream {\n  constructor(source) {\n    this.source = source;\n    this.isHttp = /^https?:/i.test(source.url);\n    this.httpHeaders = (this.isHttp && source.httpHeaders) || {};\n\n    this._fullRequestReader = null;\n    this._rangeRequestReaders = [];\n  }\n\n  get _progressiveDataLength() {\n    return this._fullRequestReader?._loaded ?? 0;\n  }\n\n  getFullReader() {\n    assert(\n      !this._fullRequestReader,\n      \"PDFFetchStream.getFullReader can only be called once.\"\n    );\n    this._fullRequestReader = new PDFFetchStreamReader(this);\n    return this._fullRequestReader;\n  }\n\n  getRangeReader(begin, end) {\n    if (end <= this._progressiveDataLength) {\n      return null;\n    }\n    const reader = new PDFFetchStreamRangeReader(this, begin, end);\n    this._rangeRequestReaders.push(reader);\n    return reader;\n  }\n\n  cancelAllRequests(reason) {\n    this._fullRequestReader?.cancel(reason);\n\n    for (const reader of this._rangeRequestReaders.slice(0)) {\n      reader.cancel(reason);\n    }\n  }\n}\n\n/** @implements {IPDFStreamReader} */\nclass PDFFetchStreamReader {\n  constructor(stream) {\n    this._stream = stream;\n    this._reader = null;\n    this._loaded = 0;\n    this._filename = null;\n    const source = stream.source;\n    this._withCredentials = source.withCredentials || false;\n    this._contentLength = source.length;\n    this._headersCapability = new PromiseCapability();\n    this._disableRange = source.disableRange || false;\n    this._rangeChunkSize = source.rangeChunkSize;\n    if (!this._rangeChunkSize && !this._disableRange) {\n      this._disableRange = true;\n    }\n\n    this._abortController = new AbortController();\n    this._isStreamingSupported = !source.disableStream;\n    this._isRangeSupported = !source.disableRange;\n\n    this._headers = createHeaders(this._stream.httpHeaders);\n\n    const url = source.url;\n    fetch(\n      url,\n      createFetchOptions(\n        this._headers,\n        this._withCredentials,\n        this._abortController\n      )\n    )\n      .then(response => {\n        if (!validateResponseStatus(response.status)) {\n          throw createResponseStatusError(response.status, url);\n        }\n        this._reader = response.body.getReader();\n        this._headersCapability.resolve();\n\n        const getResponseHeader = name => {\n          return response.headers.get(name);\n        };\n        const { allowRangeRequests, suggestedLength } =\n          validateRangeRequestCapabilities({\n            getResponseHeader,\n            isHttp: this._stream.isHttp,\n            rangeChunkSize: this._rangeChunkSize,\n            disableRange: this._disableRange,\n          });\n\n        this._isRangeSupported = allowRangeRequests;\n        // Setting right content length.\n        this._contentLength = suggestedLength || this._contentLength;\n\n        this._filename = extractFilenameFromHeader(getResponseHeader);\n\n        // We need to stop reading when range is supported and streaming is\n        // disabled.\n        if (!this._isStreamingSupported && this._isRangeSupported) {\n          this.cancel(new AbortException(\"Streaming is disabled.\"));\n        }\n      })\n      .catch(this._headersCapability.reject);\n\n    this.onProgress = null;\n  }\n\n  get headersReady() {\n    return this._headersCapability.promise;\n  }\n\n  get filename() {\n    return this._filename;\n  }\n\n  get contentLength() {\n    return this._contentLength;\n  }\n\n  get isRangeSupported() {\n    return this._isRangeSupported;\n  }\n\n  get isStreamingSupported() {\n    return this._isStreamingSupported;\n  }\n\n  async read() {\n    await this._headersCapability.promise;\n    const { value, done } = await this._reader.read();\n    if (done) {\n      return { value, done };\n    }\n    this._loaded += value.byteLength;\n    this.onProgress?.({\n      loaded: this._loaded,\n      total: this._contentLength,\n    });\n\n    return { value: getArrayBuffer(value), done: false };\n  }\n\n  cancel(reason) {\n    this._reader?.cancel(reason);\n    this._abortController.abort();\n  }\n}\n\n/** @implements {IPDFStreamRangeReader} */\nclass PDFFetchStreamRangeReader {\n  constructor(stream, begin, end) {\n    this._stream = stream;\n    this._reader = null;\n    this._loaded = 0;\n    const source = stream.source;\n    this._withCredentials = source.withCredentials || false;\n    this._readCapability = new PromiseCapability();\n    this._isStreamingSupported = !source.disableStream;\n\n    this._abortController = new AbortController();\n    this._headers = createHeaders(this._stream.httpHeaders);\n    this._headers.append(\"Range\", `bytes=${begin}-${end - 1}`);\n\n    const url = source.url;\n    fetch(\n      url,\n      createFetchOptions(\n        this._headers,\n        this._withCredentials,\n        this._abortController\n      )\n    )\n      .then(response => {\n        if (!validateResponseStatus(response.status)) {\n          throw createResponseStatusError(response.status, url);\n        }\n        this._readCapability.resolve();\n        this._reader = response.body.getReader();\n      })\n      .catch(this._readCapability.reject);\n\n    this.onProgress = null;\n  }\n\n  get isStreamingSupported() {\n    return this._isStreamingSupported;\n  }\n\n  async read() {\n    await this._readCapability.promise;\n    const { value, done } = await this._reader.read();\n    if (done) {\n      return { value, done };\n    }\n    this._loaded += value.byteLength;\n    this.onProgress?.({ loaded: this._loaded });\n\n    return { value: getArrayBuffer(value), done: false };\n  }\n\n  cancel(reason) {\n    this._reader?.cancel(reason);\n    this._abortController.abort();\n  }\n}\n\nexport { PDFFetchStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  assert,\n  MissingPDFException,\n  UnexpectedResponseException,\n} from \"../shared/util.js\";\nimport { getFilenameFromContentDispositionHeader } from \"./content_disposition.js\";\nimport { isPdfFile } from \"./display_utils.js\";\n\nfunction validateRangeRequestCapabilities({\n  getResponseHeader,\n  isHttp,\n  rangeChunkSize,\n  disableRange,\n}) {\n  if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n    assert(\n      Number.isInteger(rangeChunkSize) && rangeChunkSize > 0,\n      \"rangeChunkSize must be an integer larger than zero.\"\n    );\n  }\n  const returnValues = {\n    allowRangeRequests: false,\n    suggestedLength: undefined,\n  };\n\n  const length = parseInt(getResponseHeader(\"Content-Length\"), 10);\n  if (!Number.isInteger(length)) {\n    return returnValues;\n  }\n\n  returnValues.suggestedLength = length;\n\n  if (length <= 2 * rangeChunkSize) {\n    // The file size is smaller than the size of two chunks, so it does not\n    // make any sense to abort the request and retry with a range request.\n    return returnValues;\n  }\n\n  if (disableRange || !isHttp) {\n    return returnValues;\n  }\n  if (getResponseHeader(\"Accept-Ranges\") !== \"bytes\") {\n    return returnValues;\n  }\n\n  const contentEncoding = getResponseHeader(\"Content-Encoding\") || \"identity\";\n  if (contentEncoding !== \"identity\") {\n    return returnValues;\n  }\n\n  returnValues.allowRangeRequests = true;\n  return returnValues;\n}\n\nfunction extractFilenameFromHeader(getResponseHeader) {\n  const contentDisposition = getResponseHeader(\"Content-Disposition\");\n  if (contentDisposition) {\n    let filename = getFilenameFromContentDispositionHeader(contentDisposition);\n    if (filename.includes(\"%\")) {\n      try {\n        filename = decodeURIComponent(filename);\n      } catch {}\n    }\n    if (isPdfFile(filename)) {\n      return filename;\n    }\n  }\n  return null;\n}\n\nfunction createResponseStatusError(status, url) {\n  if (status === 404 || (status === 0 && url.startsWith(\"file:\"))) {\n    return new MissingPDFException('Missing PDF \"' + url + '\".');\n  }\n  return new UnexpectedResponseException(\n    `Unexpected server response (${status}) while retrieving PDF \"${url}\".`,\n    status\n  );\n}\n\nfunction validateResponseStatus(status) {\n  return status === 200 || status === 206;\n}\n\nexport {\n  createResponseStatusError,\n  extractFilenameFromHeader,\n  validateRangeRequestCapabilities,\n  validateResponseStatus,\n};\n","/* Copyright 2017 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { stringToBytes } from \"../shared/util.js\";\n\n// This getFilenameFromContentDispositionHeader function is adapted from\n// https://github.com/Rob--W/open-in-browser/blob/7e2e35a38b8b4e981b11da7b2f01df0149049e92/extension/content-disposition.js\n// with the following changes:\n// - Modified to conform to PDF.js's coding style.\n// - Move return to the end of the function to prevent Babel from dropping the\n//   function declarations.\n\n/**\n * Extract file name from the Content-Disposition HTTP response header.\n *\n * @param {string} contentDisposition\n * @returns {string} Filename, if found in the Content-Disposition header.\n */\nfunction getFilenameFromContentDispositionHeader(contentDisposition) {\n  let needsEncodingFixup = true;\n\n  // filename*=ext-value (\"ext-value\" from RFC 5987, referenced by RFC 6266).\n  let tmp = toParamRegExp(\"filename\\\\*\", \"i\").exec(contentDisposition);\n  if (tmp) {\n    tmp = tmp[1];\n    let filename = rfc2616unquote(tmp);\n    filename = unescape(filename);\n    filename = rfc5987decode(filename);\n    filename = rfc2047decode(filename);\n    return fixupEncoding(filename);\n  }\n\n  // Continuations (RFC 2231 section 3, referenced by RFC 5987 section 3.1).\n  // filename*n*=part\n  // filename*n=part\n  tmp = rfc2231getparam(contentDisposition);\n  if (tmp) {\n    // RFC 2047, section\n    const filename = rfc2047decode(tmp);\n    return fixupEncoding(filename);\n  }\n\n  // filename=value (RFC 5987, section 4.1).\n  tmp = toParamRegExp(\"filename\", \"i\").exec(contentDisposition);\n  if (tmp) {\n    tmp = tmp[1];\n    let filename = rfc2616unquote(tmp);\n    filename = rfc2047decode(filename);\n    return fixupEncoding(filename);\n  }\n\n  // After this line there are only function declarations. We cannot put\n  // \"return\" here for readability because babel would then drop the function\n  // declarations...\n  function toParamRegExp(attributePattern, flags) {\n    return new RegExp(\n      \"(?:^|;)\\\\s*\" +\n        attributePattern +\n        \"\\\\s*=\\\\s*\" +\n        // Captures: value = token | quoted-string\n        // (RFC 2616, section 3.6 and referenced by RFC 6266 4.1)\n        \"(\" +\n        '[^\";\\\\s][^;\\\\s]*' +\n        \"|\" +\n        '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' +\n        \")\",\n      flags\n    );\n  }\n  function textdecode(encoding, value) {\n    if (encoding) {\n      if (!/^[\\x00-\\xFF]+$/.test(value)) {\n        return value;\n      }\n      try {\n        const decoder = new TextDecoder(encoding, { fatal: true });\n        const buffer = stringToBytes(value);\n        value = decoder.decode(buffer);\n        needsEncodingFixup = false;\n      } catch {\n        // TextDecoder constructor threw - unrecognized encoding.\n      }\n    }\n    return value;\n  }\n  function fixupEncoding(value) {\n    if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n      // Maybe multi-byte UTF-8.\n      value = textdecode(\"utf-8\", value);\n      if (needsEncodingFixup) {\n        // Try iso-8859-1 encoding.\n        value = textdecode(\"iso-8859-1\", value);\n      }\n    }\n    return value;\n  }\n  function rfc2231getparam(contentDispositionStr) {\n    const matches = [];\n    let match;\n    // Iterate over all filename*n= and filename*n*= with n being an integer\n    // of at least zero. Any non-zero number must not start with '0'.\n    const iter = toParamRegExp(\"filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)\", \"ig\");\n    while ((match = iter.exec(contentDispositionStr)) !== null) {\n      let [, n, quot, part] = match; // eslint-disable-line prefer-const\n      n = parseInt(n, 10);\n      if (n in matches) {\n        // Ignore anything after the invalid second filename*0.\n        if (n === 0) {\n          break;\n        }\n        continue;\n      }\n      matches[n] = [quot, part];\n    }\n    const parts = [];\n    for (let n = 0; n < matches.length; ++n) {\n      if (!(n in matches)) {\n        // Numbers must be consecutive. Truncate when there is a hole.\n        break;\n      }\n      let [quot, part] = matches[n]; // eslint-disable-line prefer-const\n      part = rfc2616unquote(part);\n      if (quot) {\n        part = unescape(part);\n        if (n === 0) {\n          part = rfc5987decode(part);\n        }\n      }\n      parts.push(part);\n    }\n    return parts.join(\"\");\n  }\n  function rfc2616unquote(value) {\n    if (value.startsWith('\"')) {\n      const parts = value.slice(1).split('\\\\\"');\n      // Find the first unescaped \" and terminate there.\n      for (let i = 0; i < parts.length; ++i) {\n        const quotindex = parts[i].indexOf('\"');\n        if (quotindex !== -1) {\n          parts[i] = parts[i].slice(0, quotindex);\n          parts.length = i + 1; // Truncates and stop the iteration.\n        }\n        parts[i] = parts[i].replaceAll(/\\\\(.)/g, \"$1\");\n      }\n      value = parts.join('\"');\n    }\n    return value;\n  }\n  function rfc5987decode(extvalue) {\n    // Decodes \"ext-value\" from RFC 5987.\n    const encodingend = extvalue.indexOf(\"'\");\n    if (encodingend === -1) {\n      // Some servers send \"filename*=\" without encoding 'language' prefix,\n      // e.g. in https://github.com/Rob--W/open-in-browser/issues/26\n      // Let's accept the value like Firefox (57) (Chrome 62 rejects it).\n      return extvalue;\n    }\n    const encoding = extvalue.slice(0, encodingend);\n    const langvalue = extvalue.slice(encodingend + 1);\n    // Ignore language (RFC 5987 section 3.2.1, and RFC 6266 section 4.1 ).\n    const value = langvalue.replace(/^[^']*'/, \"\");\n    return textdecode(encoding, value);\n  }\n  function rfc2047decode(value) {\n    // RFC 2047-decode the result. Firefox tried to drop support for it, but\n    // backed out because some servers use it - https://bugzil.la/875615\n    // Firefox's condition for decoding is here: https://searchfox.org/mozilla-central/rev/4a590a5a15e35d88a3b23dd6ac3c471cf85b04a8/netwerk/mime/nsMIMEHeaderParamImpl.cpp#742-748\n\n    // We are more strict and only recognize RFC 2047-encoding if the value\n    // starts with \"=?\", since then it is likely that the full value is\n    // RFC 2047-encoded.\n\n    // Firefox also decodes words even where RFC 2047 section 5 states:\n    // \"An 'encoded-word' MUST NOT appear within a 'quoted-string'.\"\n    if (!value.startsWith(\"=?\") || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n      return value;\n    }\n    // RFC 2047, section 2.4\n    // encoded-word = \"=?\" charset \"?\" encoding \"?\" encoded-text \"?=\"\n    // charset = token (but let's restrict to characters that denote a\n    //       possibly valid encoding).\n    // encoding = q or b\n    // encoded-text = any printable ASCII character other than ? or space.\n    //        ... but Firefox permits ? and space.\n    return value.replaceAll(\n      /=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g,\n      function (matches, charset, encoding, text) {\n        if (encoding === \"q\" || encoding === \"Q\") {\n          // RFC 2047 section 4.2.\n          text = text.replaceAll(\"_\", \" \");\n          text = text.replaceAll(/=([0-9a-fA-F]{2})/g, function (match, hex) {\n            return String.fromCharCode(parseInt(hex, 16));\n          });\n          return textdecode(charset, text);\n        } // else encoding is b or B - base64 (RFC 2047 section 4.1)\n        try {\n          text = atob(text);\n        } catch {}\n        return textdecode(charset, text);\n      }\n    );\n  }\n\n  return \"\";\n}\n\nexport { getFilenameFromContentDispositionHeader };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { assert, PromiseCapability, stringToBytes } from \"../shared/util.js\";\nimport {\n  createResponseStatusError,\n  extractFilenameFromHeader,\n  validateRangeRequestCapabilities,\n} from \"./network_utils.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n  throw new Error(\n    'Module \"./network.js\" shall not be used with MOZCENTRAL builds.'\n  );\n}\n\nconst OK_RESPONSE = 200;\nconst PARTIAL_CONTENT_RESPONSE = 206;\n\nfunction getArrayBuffer(xhr) {\n  const data = xhr.response;\n  if (typeof data !== \"string\") {\n    return data;\n  }\n  return stringToBytes(data).buffer;\n}\n\nclass NetworkManager {\n  constructor(url, args = {}) {\n    this.url = url;\n    this.isHttp = /^https?:/i.test(url);\n    this.httpHeaders = (this.isHttp && args.httpHeaders) || Object.create(null);\n    this.withCredentials = args.withCredentials || false;\n\n    this.currXhrId = 0;\n    this.pendingRequests = Object.create(null);\n  }\n\n  requestRange(begin, end, listeners) {\n    const args = {\n      begin,\n      end,\n    };\n    for (const prop in listeners) {\n      args[prop] = listeners[prop];\n    }\n    return this.request(args);\n  }\n\n  requestFull(listeners) {\n    return this.request(listeners);\n  }\n\n  request(args) {\n    const xhr = new XMLHttpRequest();\n    const xhrId = this.currXhrId++;\n    const pendingRequest = (this.pendingRequests[xhrId] = { xhr });\n\n    xhr.open(\"GET\", this.url);\n    xhr.withCredentials = this.withCredentials;\n    for (const property in this.httpHeaders) {\n      const value = this.httpHeaders[property];\n      if (value === undefined) {\n        continue;\n      }\n      xhr.setRequestHeader(property, value);\n    }\n    if (this.isHttp && \"begin\" in args && \"end\" in args) {\n      xhr.setRequestHeader(\"Range\", `bytes=${args.begin}-${args.end - 1}`);\n      pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE;\n    } else {\n      pendingRequest.expectedStatus = OK_RESPONSE;\n    }\n    xhr.responseType = \"arraybuffer\";\n\n    if (args.onError) {\n      xhr.onerror = function (evt) {\n        args.onError(xhr.status);\n      };\n    }\n    xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n    xhr.onprogress = this.onProgress.bind(this, xhrId);\n\n    pendingRequest.onHeadersReceived = args.onHeadersReceived;\n    pendingRequest.onDone = args.onDone;\n    pendingRequest.onError = args.onError;\n    pendingRequest.onProgress = args.onProgress;\n\n    xhr.send(null);\n\n    return xhrId;\n  }\n\n  onProgress(xhrId, evt) {\n    const pendingRequest = this.pendingRequests[xhrId];\n    if (!pendingRequest) {\n      return; // Maybe abortRequest was called...\n    }\n    pendingRequest.onProgress?.(evt);\n  }\n\n  onStateChange(xhrId, evt) {\n    const pendingRequest = this.pendingRequests[xhrId];\n    if (!pendingRequest) {\n      return; // Maybe abortRequest was called...\n    }\n\n    const xhr = pendingRequest.xhr;\n    if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n      pendingRequest.onHeadersReceived();\n      delete pendingRequest.onHeadersReceived;\n    }\n\n    if (xhr.readyState !== 4) {\n      return;\n    }\n\n    if (!(xhrId in this.pendingRequests)) {\n      // The XHR request might have been aborted in onHeadersReceived()\n      // callback, in which case we should abort request.\n      return;\n    }\n\n    delete this.pendingRequests[xhrId];\n\n    // Success status == 0 can be on ftp, file and other protocols.\n    if (xhr.status === 0 && this.isHttp) {\n      pendingRequest.onError?.(xhr.status);\n      return;\n    }\n    const xhrStatus = xhr.status || OK_RESPONSE;\n\n    // From http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.2:\n    // \"A server MAY ignore the Range header\". This means it's possible to\n    // get a 200 rather than a 206 response from a range request.\n    const ok_response_on_range_request =\n      xhrStatus === OK_RESPONSE &&\n      pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n\n    if (\n      !ok_response_on_range_request &&\n      xhrStatus !== pendingRequest.expectedStatus\n    ) {\n      pendingRequest.onError?.(xhr.status);\n      return;\n    }\n\n    const chunk = getArrayBuffer(xhr);\n    if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n      const rangeHeader = xhr.getResponseHeader(\"Content-Range\");\n      const matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n      pendingRequest.onDone({\n        begin: parseInt(matches[1], 10),\n        chunk,\n      });\n    } else if (chunk) {\n      pendingRequest.onDone({\n        begin: 0,\n        chunk,\n      });\n    } else {\n      pendingRequest.onError?.(xhr.status);\n    }\n  }\n\n  getRequestXhr(xhrId) {\n    return this.pendingRequests[xhrId].xhr;\n  }\n\n  isPendingRequest(xhrId) {\n    return xhrId in this.pendingRequests;\n  }\n\n  abortRequest(xhrId) {\n    const xhr = this.pendingRequests[xhrId].xhr;\n    delete this.pendingRequests[xhrId];\n    xhr.abort();\n  }\n}\n\n/** @implements {IPDFStream} */\nclass PDFNetworkStream {\n  constructor(source) {\n    this._source = source;\n    this._manager = new NetworkManager(source.url, {\n      httpHeaders: source.httpHeaders,\n      withCredentials: source.withCredentials,\n    });\n    this._rangeChunkSize = source.rangeChunkSize;\n    this._fullRequestReader = null;\n    this._rangeRequestReaders = [];\n  }\n\n  _onRangeRequestReaderClosed(reader) {\n    const i = this._rangeRequestReaders.indexOf(reader);\n    if (i >= 0) {\n      this._rangeRequestReaders.splice(i, 1);\n    }\n  }\n\n  getFullReader() {\n    assert(\n      !this._fullRequestReader,\n      \"PDFNetworkStream.getFullReader can only be called once.\"\n    );\n    this._fullRequestReader = new PDFNetworkStreamFullRequestReader(\n      this._manager,\n      this._source\n    );\n    return this._fullRequestReader;\n  }\n\n  getRangeReader(begin, end) {\n    const reader = new PDFNetworkStreamRangeRequestReader(\n      this._manager,\n      begin,\n      end\n    );\n    reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n    this._rangeRequestReaders.push(reader);\n    return reader;\n  }\n\n  cancelAllRequests(reason) {\n    this._fullRequestReader?.cancel(reason);\n\n    for (const reader of this._rangeRequestReaders.slice(0)) {\n      reader.cancel(reason);\n    }\n  }\n}\n\n/** @implements {IPDFStreamReader} */\nclass PDFNetworkStreamFullRequestReader {\n  constructor(manager, source) {\n    this._manager = manager;\n\n    const args = {\n      onHeadersReceived: this._onHeadersReceived.bind(this),\n      onDone: this._onDone.bind(this),\n      onError: this._onError.bind(this),\n      onProgress: this._onProgress.bind(this),\n    };\n    this._url = source.url;\n    this._fullRequestId = manager.requestFull(args);\n    this._headersReceivedCapability = new PromiseCapability();\n    this._disableRange = source.disableRange || false;\n    this._contentLength = source.length; // Optional\n    this._rangeChunkSize = source.rangeChunkSize;\n    if (!this._rangeChunkSize && !this._disableRange) {\n      this._disableRange = true;\n    }\n\n    this._isStreamingSupported = false;\n    this._isRangeSupported = false;\n\n    this._cachedChunks = [];\n    this._requests = [];\n    this._done = false;\n    this._storedError = undefined;\n    this._filename = null;\n\n    this.onProgress = null;\n  }\n\n  _onHeadersReceived() {\n    const fullRequestXhrId = this._fullRequestId;\n    const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n\n    const getResponseHeader = name => {\n      return fullRequestXhr.getResponseHeader(name);\n    };\n    const { allowRangeRequests, suggestedLength } =\n      validateRangeRequestCapabilities({\n        getResponseHeader,\n        isHttp: this._manager.isHttp,\n        rangeChunkSize: this._rangeChunkSize,\n        disableRange: this._disableRange,\n      });\n\n    if (allowRangeRequests) {\n      this._isRangeSupported = true;\n    }\n    // Setting right content length.\n    this._contentLength = suggestedLength || this._contentLength;\n\n    this._filename = extractFilenameFromHeader(getResponseHeader);\n\n    if (this._isRangeSupported) {\n      // NOTE: by cancelling the full request, and then issuing range\n      // requests, there will be an issue for sites where you can only\n      // request the pdf once. However, if this is the case, then the\n      // server should not be returning that it can support range requests.\n      this._manager.abortRequest(fullRequestXhrId);\n    }\n\n    this._headersReceivedCapability.resolve();\n  }\n\n  _onDone(data) {\n    if (data) {\n      if (this._requests.length > 0) {\n        const requestCapability = this._requests.shift();\n        requestCapability.resolve({ value: data.chunk, done: false });\n      } else {\n        this._cachedChunks.push(data.chunk);\n      }\n    }\n    this._done = true;\n    if (this._cachedChunks.length > 0) {\n      return;\n    }\n    for (const requestCapability of this._requests) {\n      requestCapability.resolve({ value: undefined, done: true });\n    }\n    this._requests.length = 0;\n  }\n\n  _onError(status) {\n    this._storedError = createResponseStatusError(status, this._url);\n    this._headersReceivedCapability.reject(this._storedError);\n    for (const requestCapability of this._requests) {\n      requestCapability.reject(this._storedError);\n    }\n    this._requests.length = 0;\n    this._cachedChunks.length = 0;\n  }\n\n  _onProgress(evt) {\n    this.onProgress?.({\n      loaded: evt.loaded,\n      total: evt.lengthComputable ? evt.total : this._contentLength,\n    });\n  }\n\n  get filename() {\n    return this._filename;\n  }\n\n  get isRangeSupported() {\n    return this._isRangeSupported;\n  }\n\n  get isStreamingSupported() {\n    return this._isStreamingSupported;\n  }\n\n  get contentLength() {\n    return this._contentLength;\n  }\n\n  get headersReady() {\n    return this._headersReceivedCapability.promise;\n  }\n\n  async read() {\n    if (this._storedError) {\n      throw this._storedError;\n    }\n    if (this._cachedChunks.length > 0) {\n      const chunk = this._cachedChunks.shift();\n      return { value: chunk, done: false };\n    }\n    if (this._done) {\n      return { value: undefined, done: true };\n    }\n    const requestCapability = new PromiseCapability();\n    this._requests.push(requestCapability);\n    return requestCapability.promise;\n  }\n\n  cancel(reason) {\n    this._done = true;\n    this._headersReceivedCapability.reject(reason);\n    for (const requestCapability of this._requests) {\n      requestCapability.resolve({ value: undefined, done: true });\n    }\n    this._requests.length = 0;\n    if (this._manager.isPendingRequest(this._fullRequestId)) {\n      this._manager.abortRequest(this._fullRequestId);\n    }\n    this._fullRequestReader = null;\n  }\n}\n\n/** @implements {IPDFStreamRangeReader} */\nclass PDFNetworkStreamRangeRequestReader {\n  constructor(manager, begin, end) {\n    this._manager = manager;\n\n    const args = {\n      onDone: this._onDone.bind(this),\n      onError: this._onError.bind(this),\n      onProgress: this._onProgress.bind(this),\n    };\n    this._url = manager.url;\n    this._requestId = manager.requestRange(begin, end, args);\n    this._requests = [];\n    this._queuedChunk = null;\n    this._done = false;\n    this._storedError = undefined;\n\n    this.onProgress = null;\n    this.onClosed = null;\n  }\n\n  _close() {\n    this.onClosed?.(this);\n  }\n\n  _onDone(data) {\n    const chunk = data.chunk;\n    if (this._requests.length > 0) {\n      const requestCapability = this._requests.shift();\n      requestCapability.resolve({ value: chunk, done: false });\n    } else {\n      this._queuedChunk = chunk;\n    }\n    this._done = true;\n    for (const requestCapability of this._requests) {\n      requestCapability.resolve({ value: undefined, done: true });\n    }\n    this._requests.length = 0;\n    this._close();\n  }\n\n  _onError(status) {\n    this._storedError = createResponseStatusError(status, this._url);\n    for (const requestCapability of this._requests) {\n      requestCapability.reject(this._storedError);\n    }\n    this._requests.length = 0;\n    this._queuedChunk = null;\n  }\n\n  _onProgress(evt) {\n    if (!this.isStreamingSupported) {\n      this.onProgress?.({ loaded: evt.loaded });\n    }\n  }\n\n  get isStreamingSupported() {\n    return false;\n  }\n\n  async read() {\n    if (this._storedError) {\n      throw this._storedError;\n    }\n    if (this._queuedChunk !== null) {\n      const chunk = this._queuedChunk;\n      this._queuedChunk = null;\n      return { value: chunk, done: false };\n    }\n    if (this._done) {\n      return { value: undefined, done: true };\n    }\n    const requestCapability = new PromiseCapability();\n    this._requests.push(requestCapability);\n    return requestCapability.promise;\n  }\n\n  cancel(reason) {\n    this._done = true;\n    for (const requestCapability of this._requests) {\n      requestCapability.resolve({ value: undefined, done: true });\n    }\n    this._requests.length = 0;\n    if (this._manager.isPendingRequest(this._requestId)) {\n      this._manager.abortRequest(this._requestId);\n    }\n    this._close();\n  }\n}\n\nexport { PDFNetworkStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals __non_webpack_require__ */\n\nimport {\n  AbortException,\n  assert,\n  MissingPDFException,\n  PromiseCapability,\n} from \"../shared/util.js\";\nimport {\n  extractFilenameFromHeader,\n  validateRangeRequestCapabilities,\n} from \"./network_utils.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n  throw new Error(\n    'Module \"./node_stream.js\" shall not be used with MOZCENTRAL builds.'\n  );\n}\n\nconst fileUriRegex = /^file:\\/\\/\\/[a-zA-Z]:\\//;\n\nfunction parseUrl(sourceUrl) {\n  const url = __non_webpack_require__(\"url\");\n  const parsedUrl = url.parse(sourceUrl);\n  if (parsedUrl.protocol === \"file:\" || parsedUrl.host) {\n    return parsedUrl;\n  }\n  // Prepending 'file:///' to Windows absolute path.\n  if (/^[a-z]:[/\\\\]/i.test(sourceUrl)) {\n    return url.parse(`file:///${sourceUrl}`);\n  }\n  // Changes protocol to 'file:' if url refers to filesystem.\n  if (!parsedUrl.host) {\n    parsedUrl.protocol = \"file:\";\n  }\n  return parsedUrl;\n}\n\nclass PDFNodeStream {\n  constructor(source) {\n    this.source = source;\n    this.url = parseUrl(source.url);\n    this.isHttp =\n      this.url.protocol === \"http:\" || this.url.protocol === \"https:\";\n    // Check if url refers to filesystem.\n    this.isFsUrl = this.url.protocol === \"file:\";\n    this.httpHeaders = (this.isHttp && source.httpHeaders) || {};\n\n    this._fullRequestReader = null;\n    this._rangeRequestReaders = [];\n  }\n\n  get _progressiveDataLength() {\n    return this._fullRequestReader?._loaded ?? 0;\n  }\n\n  getFullReader() {\n    assert(\n      !this._fullRequestReader,\n      \"PDFNodeStream.getFullReader can only be called once.\"\n    );\n    this._fullRequestReader = this.isFsUrl\n      ? new PDFNodeStreamFsFullReader(this)\n      : new PDFNodeStreamFullReader(this);\n    return this._fullRequestReader;\n  }\n\n  getRangeReader(start, end) {\n    if (end <= this._progressiveDataLength) {\n      return null;\n    }\n    const rangeReader = this.isFsUrl\n      ? new PDFNodeStreamFsRangeReader(this, start, end)\n      : new PDFNodeStreamRangeReader(this, start, end);\n    this._rangeRequestReaders.push(rangeReader);\n    return rangeReader;\n  }\n\n  cancelAllRequests(reason) {\n    this._fullRequestReader?.cancel(reason);\n\n    for (const reader of this._rangeRequestReaders.slice(0)) {\n      reader.cancel(reason);\n    }\n  }\n}\n\nclass BaseFullReader {\n  constructor(stream) {\n    this._url = stream.url;\n    this._done = false;\n    this._storedError = null;\n    this.onProgress = null;\n    const source = stream.source;\n    this._contentLength = source.length; // optional\n    this._loaded = 0;\n    this._filename = null;\n\n    this._disableRange = source.disableRange || false;\n    this._rangeChunkSize = source.rangeChunkSize;\n    if (!this._rangeChunkSize && !this._disableRange) {\n      this._disableRange = true;\n    }\n\n    this._isStreamingSupported = !source.disableStream;\n    this._isRangeSupported = !source.disableRange;\n\n    this._readableStream = null;\n    this._readCapability = new PromiseCapability();\n    this._headersCapability = new PromiseCapability();\n  }\n\n  get headersReady() {\n    return this._headersCapability.promise;\n  }\n\n  get filename() {\n    return this._filename;\n  }\n\n  get contentLength() {\n    return this._contentLength;\n  }\n\n  get isRangeSupported() {\n    return this._isRangeSupported;\n  }\n\n  get isStreamingSupported() {\n    return this._isStreamingSupported;\n  }\n\n  async read() {\n    await this._readCapability.promise;\n    if (this._done) {\n      return { value: undefined, done: true };\n    }\n    if (this._storedError) {\n      throw this._storedError;\n    }\n\n    const chunk = this._readableStream.read();\n    if (chunk === null) {\n      this._readCapability = new PromiseCapability();\n      return this.read();\n    }\n    this._loaded += chunk.length;\n    this.onProgress?.({\n      loaded: this._loaded,\n      total: this._contentLength,\n    });\n\n    // Ensure that `read()` method returns ArrayBuffer.\n    const buffer = new Uint8Array(chunk).buffer;\n    return { value: buffer, done: false };\n  }\n\n  cancel(reason) {\n    // Call `this._error()` method when cancel is called\n    // before _readableStream is set.\n    if (!this._readableStream) {\n      this._error(reason);\n      return;\n    }\n    this._readableStream.destroy(reason);\n  }\n\n  _error(reason) {\n    this._storedError = reason;\n    this._readCapability.resolve();\n  }\n\n  _setReadableStream(readableStream) {\n    this._readableStream = readableStream;\n    readableStream.on(\"readable\", () => {\n      this._readCapability.resolve();\n    });\n\n    readableStream.on(\"end\", () => {\n      // Destroy readable to minimize resource usage.\n      readableStream.destroy();\n      this._done = true;\n      this._readCapability.resolve();\n    });\n\n    readableStream.on(\"error\", reason => {\n      this._error(reason);\n    });\n\n    // We need to stop reading when range is supported and streaming is\n    // disabled.\n    if (!this._isStreamingSupported && this._isRangeSupported) {\n      this._error(new AbortException(\"streaming is disabled\"));\n    }\n\n    // Destroy ReadableStream if already in errored state.\n    if (this._storedError) {\n      this._readableStream.destroy(this._storedError);\n    }\n  }\n}\n\nclass BaseRangeReader {\n  constructor(stream) {\n    this._url = stream.url;\n    this._done = false;\n    this._storedError = null;\n    this.onProgress = null;\n    this._loaded = 0;\n    this._readableStream = null;\n    this._readCapability = new PromiseCapability();\n    const source = stream.source;\n    this._isStreamingSupported = !source.disableStream;\n  }\n\n  get isStreamingSupported() {\n    return this._isStreamingSupported;\n  }\n\n  async read() {\n    await this._readCapability.promise;\n    if (this._done) {\n      return { value: undefined, done: true };\n    }\n    if (this._storedError) {\n      throw this._storedError;\n    }\n\n    const chunk = this._readableStream.read();\n    if (chunk === null) {\n      this._readCapability = new PromiseCapability();\n      return this.read();\n    }\n    this._loaded += chunk.length;\n    this.onProgress?.({ loaded: this._loaded });\n\n    // Ensure that `read()` method returns ArrayBuffer.\n    const buffer = new Uint8Array(chunk).buffer;\n    return { value: buffer, done: false };\n  }\n\n  cancel(reason) {\n    // Call `this._error()` method when cancel is called\n    // before _readableStream is set.\n    if (!this._readableStream) {\n      this._error(reason);\n      return;\n    }\n    this._readableStream.destroy(reason);\n  }\n\n  _error(reason) {\n    this._storedError = reason;\n    this._readCapability.resolve();\n  }\n\n  _setReadableStream(readableStream) {\n    this._readableStream = readableStream;\n    readableStream.on(\"readable\", () => {\n      this._readCapability.resolve();\n    });\n\n    readableStream.on(\"end\", () => {\n      // Destroy readableStream to minimize resource usage.\n      readableStream.destroy();\n      this._done = true;\n      this._readCapability.resolve();\n    });\n\n    readableStream.on(\"error\", reason => {\n      this._error(reason);\n    });\n\n    // Destroy readableStream if already in errored state.\n    if (this._storedError) {\n      this._readableStream.destroy(this._storedError);\n    }\n  }\n}\n\nfunction createRequestOptions(parsedUrl, headers) {\n  return {\n    protocol: parsedUrl.protocol,\n    auth: parsedUrl.auth,\n    host: parsedUrl.hostname,\n    port: parsedUrl.port,\n    path: parsedUrl.path,\n    method: \"GET\",\n    headers,\n  };\n}\n\nclass PDFNodeStreamFullReader extends BaseFullReader {\n  constructor(stream) {\n    super(stream);\n\n    const handleResponse = response => {\n      if (response.statusCode === 404) {\n        const error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n        this._storedError = error;\n        this._headersCapability.reject(error);\n        return;\n      }\n      this._headersCapability.resolve();\n      this._setReadableStream(response);\n\n      const getResponseHeader = name => {\n        // Make sure that headers name are in lower case, as mentioned\n        // here: https://nodejs.org/api/http.html#http_message_headers.\n        return this._readableStream.headers[name.toLowerCase()];\n      };\n      const { allowRangeRequests, suggestedLength } =\n        validateRangeRequestCapabilities({\n          getResponseHeader,\n          isHttp: stream.isHttp,\n          rangeChunkSize: this._rangeChunkSize,\n          disableRange: this._disableRange,\n        });\n\n      this._isRangeSupported = allowRangeRequests;\n      // Setting right content length.\n      this._contentLength = suggestedLength || this._contentLength;\n\n      this._filename = extractFilenameFromHeader(getResponseHeader);\n    };\n\n    this._request = null;\n    if (this._url.protocol === \"http:\") {\n      const http = __non_webpack_require__(\"http\");\n      this._request = http.request(\n        createRequestOptions(this._url, stream.httpHeaders),\n        handleResponse\n      );\n    } else {\n      const https = __non_webpack_require__(\"https\");\n      this._request = https.request(\n        createRequestOptions(this._url, stream.httpHeaders),\n        handleResponse\n      );\n    }\n\n    this._request.on(\"error\", reason => {\n      this._storedError = reason;\n      this._headersCapability.reject(reason);\n    });\n    // Note: `request.end(data)` is used to write `data` to request body\n    // and notify end of request. But one should always call `request.end()`\n    // even if there is no data to write -- (to notify the end of request).\n    this._request.end();\n  }\n}\n\nclass PDFNodeStreamRangeReader extends BaseRangeReader {\n  constructor(stream, start, end) {\n    super(stream);\n\n    this._httpHeaders = {};\n    for (const property in stream.httpHeaders) {\n      const value = stream.httpHeaders[property];\n      if (value === undefined) {\n        continue;\n      }\n      this._httpHeaders[property] = value;\n    }\n    this._httpHeaders.Range = `bytes=${start}-${end - 1}`;\n\n    const handleResponse = response => {\n      if (response.statusCode === 404) {\n        const error = new MissingPDFException(`Missing PDF \"${this._url}\".`);\n        this._storedError = error;\n        return;\n      }\n      this._setReadableStream(response);\n    };\n\n    this._request = null;\n    if (this._url.protocol === \"http:\") {\n      const http = __non_webpack_require__(\"http\");\n      this._request = http.request(\n        createRequestOptions(this._url, this._httpHeaders),\n        handleResponse\n      );\n    } else {\n      const https = __non_webpack_require__(\"https\");\n      this._request = https.request(\n        createRequestOptions(this._url, this._httpHeaders),\n        handleResponse\n      );\n    }\n\n    this._request.on(\"error\", reason => {\n      this._storedError = reason;\n    });\n    this._request.end();\n  }\n}\n\nclass PDFNodeStreamFsFullReader extends BaseFullReader {\n  constructor(stream) {\n    super(stream);\n\n    let path = decodeURIComponent(this._url.path);\n\n    // Remove the extra slash to get right path from url like `file:///C:/`\n    if (fileUriRegex.test(this._url.href)) {\n      path = path.replace(/^\\//, \"\");\n    }\n\n    const fs = __non_webpack_require__(\"fs\");\n    fs.lstat(path, (error, stat) => {\n      if (error) {\n        if (error.code === \"ENOENT\") {\n          error = new MissingPDFException(`Missing PDF \"${path}\".`);\n        }\n        this._storedError = error;\n        this._headersCapability.reject(error);\n        return;\n      }\n      // Setting right content length.\n      this._contentLength = stat.size;\n\n      this._setReadableStream(fs.createReadStream(path));\n      this._headersCapability.resolve();\n    });\n  }\n}\n\nclass PDFNodeStreamFsRangeReader extends BaseRangeReader {\n  constructor(stream, start, end) {\n    super(stream);\n\n    let path = decodeURIComponent(this._url.path);\n\n    // Remove the extra slash to get right path from url like `file:///C:/`\n    if (fileUriRegex.test(this._url.href)) {\n      path = path.replace(/^\\//, \"\");\n    }\n\n    const fs = __non_webpack_require__(\"fs\");\n    this._setReadableStream(fs.createReadStream(path, { start, end: end - 1 }));\n  }\n}\n\nexport { PDFNodeStream };\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* globals __non_webpack_require__ */\n\nimport { deprecated, DOMSVGFactory } from \"./display_utils.js\";\nimport {\n  FONT_IDENTITY_MATRIX,\n  IDENTITY_MATRIX,\n  ImageKind,\n  isNodeJS,\n  OPS,\n  TextRenderingMode,\n  Util,\n  warn,\n} from \"../shared/util.js\";\n\nif (typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"GENERIC\")) {\n  throw new Error(\n    'Module \"SVGGraphics\" shall not be used outside GENERIC builds.'\n  );\n}\n\nconst SVG_DEFAULTS = {\n  fontStyle: \"normal\",\n  fontWeight: \"normal\",\n  fillColor: \"#000000\",\n};\nconst XML_NS = \"http://www.w3.org/XML/1998/namespace\";\nconst XLINK_NS = \"http://www.w3.org/1999/xlink\";\nconst LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nconst LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\n\nconst createObjectURL = function (\n  data,\n  contentType = \"\",\n  forceDataSchema = false\n) {\n  if (URL.createObjectURL && typeof Blob !== \"undefined\" && !forceDataSchema) {\n    return URL.createObjectURL(new Blob([data], { type: contentType }));\n  }\n  // Blob/createObjectURL is not available, falling back to data schema.\n  const digits =\n    \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n  let buffer = `data:${contentType};base64,`;\n  for (let i = 0, ii = data.length; i < ii; i += 3) {\n    const b1 = data[i] & 0xff;\n    const b2 = data[i + 1] & 0xff;\n    const b3 = data[i + 2] & 0xff;\n    const d1 = b1 >> 2,\n      d2 = ((b1 & 3) << 4) | (b2 >> 4);\n    const d3 = i + 1 < ii ? ((b2 & 0xf) << 2) | (b3 >> 6) : 64;\n    const d4 = i + 2 < ii ? b3 & 0x3f : 64;\n    buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];\n  }\n  return buffer;\n};\n\nconst convertImgDataToPng = (function () {\n  const PNG_HEADER = new Uint8Array([\n    0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a,\n  ]);\n  const CHUNK_WRAPPER_SIZE = 12;\n\n  const crcTable = new Int32Array(256);\n  for (let i = 0; i < 256; i++) {\n    let c = i;\n    for (let h = 0; h < 8; h++) {\n      c = c & 1 ? 0xedb88320 ^ ((c >> 1) & 0x7fffffff) : (c >> 1) & 0x7fffffff;\n    }\n    crcTable[i] = c;\n  }\n\n  function crc32(data, start, end) {\n    let crc = -1;\n    for (let i = start; i < end; i++) {\n      const a = (crc ^ data[i]) & 0xff;\n      const b = crcTable[a];\n      crc = (crc >>> 8) ^ b;\n    }\n    return crc ^ -1;\n  }\n\n  function writePngChunk(type, body, data, offset) {\n    let p = offset;\n    const len = body.length;\n\n    data[p] = (len >> 24) & 0xff;\n    data[p + 1] = (len >> 16) & 0xff;\n    data[p + 2] = (len >> 8) & 0xff;\n    data[p + 3] = len & 0xff;\n    p += 4;\n\n    data[p] = type.charCodeAt(0) & 0xff;\n    data[p + 1] = type.charCodeAt(1) & 0xff;\n    data[p + 2] = type.charCodeAt(2) & 0xff;\n    data[p + 3] = type.charCodeAt(3) & 0xff;\n    p += 4;\n\n    data.set(body, p);\n    p += body.length;\n\n    const crc = crc32(data, offset + 4, p);\n    data[p] = (crc >> 24) & 0xff;\n    data[p + 1] = (crc >> 16) & 0xff;\n    data[p + 2] = (crc >> 8) & 0xff;\n    data[p + 3] = crc & 0xff;\n  }\n\n  function adler32(data, start, end) {\n    let a = 1;\n    let b = 0;\n    for (let i = start; i < end; ++i) {\n      a = (a + (data[i] & 0xff)) % 65521;\n      b = (b + a) % 65521;\n    }\n    return (b << 16) | a;\n  }\n\n  /**\n   * @param {Uint8Array} literals The input data.\n   * @returns {Uint8Array} The DEFLATE-compressed data stream in zlib format.\n   *   This is the required format for compressed streams in the PNG format:\n   *   http://www.libpng.org/pub/png/spec/1.2/PNG-Compression.html\n   */\n  function deflateSync(literals) {\n    if (!isNodeJS) {\n      // zlib is certainly not available outside of Node.js. We can either use\n      // the pako library for client-side DEFLATE compression, or use the\n      // canvas API of the browser to obtain a more optimal PNG file.\n      return deflateSyncUncompressed(literals);\n    }\n    try {\n      // NOTE: This implementation is far from perfect, but already way better\n      // than not applying any compression.\n      //\n      // A better algorithm will try to choose a good predictor/filter and\n      // then choose a suitable zlib compression strategy (e.g. 3,Z_RLE).\n      //\n      // Node v0.11.12 zlib.deflateSync is introduced (and returns a Buffer).\n      // Node v3.0.0   Buffer inherits from Uint8Array.\n      // Node v8.0.0   zlib.deflateSync accepts Uint8Array as input.\n      const input =\n        // eslint-disable-next-line no-undef\n        parseInt(process.versions.node) >= 8 ? literals : Buffer.from(literals);\n      const output = __non_webpack_require__(\"zlib\").deflateSync(input, {\n        level: 9,\n      });\n      return output instanceof Uint8Array ? output : new Uint8Array(output);\n    } catch (e) {\n      warn(\"Not compressing PNG because zlib.deflateSync is unavailable: \" + e);\n    }\n\n    return deflateSyncUncompressed(literals);\n  }\n\n  // An implementation of DEFLATE with compression level 0 (Z_NO_COMPRESSION).\n  function deflateSyncUncompressed(literals) {\n    let len = literals.length;\n    const maxBlockLength = 0xffff;\n\n    const deflateBlocks = Math.ceil(len / maxBlockLength);\n    const idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);\n    let pi = 0;\n    idat[pi++] = 0x78; // compression method and flags\n    idat[pi++] = 0x9c; // flags\n\n    let pos = 0;\n    while (len > maxBlockLength) {\n      // writing non-final DEFLATE blocks type 0 and length of 65535\n      idat[pi++] = 0x00;\n      idat[pi++] = 0xff;\n      idat[pi++] = 0xff;\n      idat[pi++] = 0x00;\n      idat[pi++] = 0x00;\n      idat.set(literals.subarray(pos, pos + maxBlockLength), pi);\n      pi += maxBlockLength;\n      pos += maxBlockLength;\n      len -= maxBlockLength;\n    }\n\n    // writing non-final DEFLATE blocks type 0\n    idat[pi++] = 0x01;\n    idat[pi++] = len & 0xff;\n    idat[pi++] = (len >> 8) & 0xff;\n    idat[pi++] = ~len & 0xffff & 0xff;\n    idat[pi++] = ((~len & 0xffff) >> 8) & 0xff;\n    idat.set(literals.subarray(pos), pi);\n    pi += literals.length - pos;\n\n    const adler = adler32(literals, 0, literals.length); // checksum\n    idat[pi++] = (adler >> 24) & 0xff;\n    idat[pi++] = (adler >> 16) & 0xff;\n    idat[pi++] = (adler >> 8) & 0xff;\n    idat[pi++] = adler & 0xff;\n    return idat;\n  }\n\n  function encode(imgData, kind, forceDataSchema, isMask) {\n    const width = imgData.width;\n    const height = imgData.height;\n    let bitDepth, colorType, lineSize;\n    const bytes = imgData.data;\n\n    switch (kind) {\n      case ImageKind.GRAYSCALE_1BPP:\n        colorType = 0;\n        bitDepth = 1;\n        lineSize = (width + 7) >> 3;\n        break;\n      case ImageKind.RGB_24BPP:\n        colorType = 2;\n        bitDepth = 8;\n        lineSize = width * 3;\n        break;\n      case ImageKind.RGBA_32BPP:\n        colorType = 6;\n        bitDepth = 8;\n        lineSize = width * 4;\n        break;\n      default:\n        throw new Error(\"invalid format\");\n    }\n\n    // prefix every row with predictor 0\n    const literals = new Uint8Array((1 + lineSize) * height);\n    let offsetLiterals = 0,\n      offsetBytes = 0;\n    for (let y = 0; y < height; ++y) {\n      literals[offsetLiterals++] = 0; // no prediction\n      literals.set(\n        bytes.subarray(offsetBytes, offsetBytes + lineSize),\n        offsetLiterals\n      );\n      offsetBytes += lineSize;\n      offsetLiterals += lineSize;\n    }\n\n    if (kind === ImageKind.GRAYSCALE_1BPP && isMask) {\n      // inverting for image masks\n      offsetLiterals = 0;\n      for (let y = 0; y < height; y++) {\n        offsetLiterals++; // skipping predictor\n        for (let i = 0; i < lineSize; i++) {\n          literals[offsetLiterals++] ^= 0xff;\n        }\n      }\n    }\n\n    const ihdr = new Uint8Array([\n      (width >> 24) & 0xff,\n      (width >> 16) & 0xff,\n      (width >> 8) & 0xff,\n      width & 0xff,\n      (height >> 24) & 0xff,\n      (height >> 16) & 0xff,\n      (height >> 8) & 0xff,\n      height & 0xff,\n      bitDepth, // bit depth\n      colorType, // color type\n      0x00, // compression method\n      0x00, // filter method\n      0x00, // interlace method\n    ]);\n    const idat = deflateSync(literals);\n\n    // PNG consists of: header, IHDR+data, IDAT+data, and IEND.\n    const pngLength =\n      PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length;\n    const data = new Uint8Array(pngLength);\n    let offset = 0;\n    data.set(PNG_HEADER, offset);\n    offset += PNG_HEADER.length;\n    writePngChunk(\"IHDR\", ihdr, data, offset);\n    offset += CHUNK_WRAPPER_SIZE + ihdr.length;\n    writePngChunk(\"IDATA\", idat, data, offset);\n    offset += CHUNK_WRAPPER_SIZE + idat.length;\n    writePngChunk(\"IEND\", new Uint8Array(0), data, offset);\n\n    return createObjectURL(data, \"image/png\", forceDataSchema);\n  }\n\n  // eslint-disable-next-line no-shadow\n  return function convertImgDataToPng(imgData, forceDataSchema, isMask) {\n    const kind =\n      imgData.kind === undefined ? ImageKind.GRAYSCALE_1BPP : imgData.kind;\n    return encode(imgData, kind, forceDataSchema, isMask);\n  };\n})();\n\nclass SVGExtraState {\n  constructor() {\n    this.fontSizeScale = 1;\n    this.fontWeight = SVG_DEFAULTS.fontWeight;\n    this.fontSize = 0;\n\n    this.textMatrix = IDENTITY_MATRIX;\n    this.fontMatrix = FONT_IDENTITY_MATRIX;\n    this.leading = 0;\n    this.textRenderingMode = TextRenderingMode.FILL;\n    this.textMatrixScale = 1;\n\n    // Current point (in user coordinates)\n    this.x = 0;\n    this.y = 0;\n\n    // Start of text line (in text coordinates)\n    this.lineX = 0;\n    this.lineY = 0;\n\n    // Character and word spacing\n    this.charSpacing = 0;\n    this.wordSpacing = 0;\n    this.textHScale = 1;\n    this.textRise = 0;\n\n    // Default foreground and background colors\n    this.fillColor = SVG_DEFAULTS.fillColor;\n    this.strokeColor = \"#000000\";\n\n    this.fillAlpha = 1;\n    this.strokeAlpha = 1;\n    this.lineWidth = 1;\n    this.lineJoin = \"\";\n    this.lineCap = \"\";\n    this.miterLimit = 0;\n\n    this.dashArray = [];\n    this.dashPhase = 0;\n\n    this.dependencies = [];\n\n    // Clipping\n    this.activeClipUrl = null;\n    this.clipGroup = null;\n\n    this.maskId = \"\";\n  }\n\n  clone() {\n    return Object.create(this);\n  }\n\n  setCurrentPoint(x, y) {\n    this.x = x;\n    this.y = y;\n  }\n}\n\nfunction opListToTree(opList) {\n  let opTree = [];\n  const tmp = [];\n\n  for (const opListElement of opList) {\n    if (opListElement.fn === \"save\") {\n      opTree.push({ fnId: 92, fn: \"group\", items: [] });\n      tmp.push(opTree);\n      opTree = opTree.at(-1).items;\n      continue;\n    }\n\n    if (opListElement.fn === \"restore\") {\n      opTree = tmp.pop();\n    } else {\n      opTree.push(opListElement);\n    }\n  }\n  return opTree;\n}\n\n/**\n * Format a float number as a string.\n *\n * @param value {number} - The float number to format.\n * @returns {string}\n */\nfunction pf(value) {\n  if (Number.isInteger(value)) {\n    return value.toString();\n  }\n  const s = value.toFixed(10);\n  let i = s.length - 1;\n  if (s[i] !== \"0\") {\n    return s;\n  }\n\n  // Remove trailing zeros.\n  do {\n    i--;\n  } while (s[i] === \"0\");\n  return s.substring(0, s[i] === \".\" ? i : i + 1);\n}\n\n/**\n * Format a transform matrix as a string. The standard rotation, scale and\n * translation matrices are replaced by their shorter forms, and for\n * identity matrices an empty string is returned to save memory.\n *\n * @param m {Array} - The transform matrix to format.\n * @returns {string}\n */\nfunction pm(m) {\n  if (m[4] === 0 && m[5] === 0) {\n    if (m[1] === 0 && m[2] === 0) {\n      if (m[0] === 1 && m[3] === 1) {\n        return \"\";\n      }\n      return `scale(${pf(m[0])} ${pf(m[3])})`;\n    }\n    if (m[0] === m[3] && m[1] === -m[2]) {\n      const a = (Math.acos(m[0]) * 180) / Math.PI;\n      return `rotate(${pf(a)})`;\n    }\n  } else if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {\n    return `translate(${pf(m[4])} ${pf(m[5])})`;\n  }\n  return (\n    `matrix(${pf(m[0])} ${pf(m[1])} ${pf(m[2])} ${pf(m[3])} ${pf(m[4])} ` +\n    `${pf(m[5])})`\n  );\n}\n\n// The counts below are relevant for all pages, so they have to be global\n// instead of being members of `SVGGraphics` (which is recreated for\n// each page).\nlet clipCount = 0;\nlet maskCount = 0;\nlet shadingCount = 0;\n\nclass SVGGraphics {\n  constructor(commonObjs, objs, forceDataSchema = false) {\n    deprecated(\n      \"The SVG back-end is no longer maintained and *may* be removed in the future.\"\n    );\n    this.svgFactory = new DOMSVGFactory();\n\n    this.current = new SVGExtraState();\n    this.transformMatrix = IDENTITY_MATRIX; // Graphics state matrix\n    this.transformStack = [];\n    this.extraStack = [];\n    this.commonObjs = commonObjs;\n    this.objs = objs;\n    this.pendingClip = null;\n    this.pendingEOFill = false;\n\n    this.embedFonts = false;\n    this.embeddedFonts = Object.create(null);\n    this.cssStyle = null;\n    this.forceDataSchema = !!forceDataSchema;\n\n    // In `src/shared/util.js` the operator names are mapped to IDs.\n    // The list below represents the reverse of that, i.e., it maps IDs\n    // to operator names.\n    this._operatorIdMapping = [];\n    for (const op in OPS) {\n      this._operatorIdMapping[OPS[op]] = op;\n    }\n  }\n\n  getObject(data, fallback = null) {\n    if (typeof data === \"string\") {\n      return data.startsWith(\"g_\")\n        ? this.commonObjs.get(data)\n        : this.objs.get(data);\n    }\n    return fallback;\n  }\n\n  save() {\n    this.transformStack.push(this.transformMatrix);\n    const old = this.current;\n    this.extraStack.push(old);\n    this.current = old.clone();\n  }\n\n  restore() {\n    this.transformMatrix = this.transformStack.pop();\n    this.current = this.extraStack.pop();\n    this.pendingClip = null;\n    this.tgrp = null;\n  }\n\n  group(items) {\n    this.save();\n    this.executeOpTree(items);\n    this.restore();\n  }\n\n  loadDependencies(operatorList) {\n    const fnArray = operatorList.fnArray;\n    const argsArray = operatorList.argsArray;\n\n    for (let i = 0, ii = fnArray.length; i < ii; i++) {\n      if (fnArray[i] !== OPS.dependency) {\n        continue;\n      }\n\n      for (const obj of argsArray[i]) {\n        const objsPool = obj.startsWith(\"g_\") ? this.commonObjs : this.objs;\n        const promise = new Promise(resolve => {\n          objsPool.get(obj, resolve);\n        });\n        this.current.dependencies.push(promise);\n      }\n    }\n    return Promise.all(this.current.dependencies);\n  }\n\n  transform(a, b, c, d, e, f) {\n    const transformMatrix = [a, b, c, d, e, f];\n    this.transformMatrix = Util.transform(\n      this.transformMatrix,\n      transformMatrix\n    );\n    this.tgrp = null;\n  }\n\n  getSVG(operatorList, viewport) {\n    this.viewport = viewport;\n\n    const svgElement = this._initialize(viewport);\n    return this.loadDependencies(operatorList).then(() => {\n      this.transformMatrix = IDENTITY_MATRIX;\n      this.executeOpTree(this.convertOpList(operatorList));\n      return svgElement;\n    });\n  }\n\n  convertOpList(operatorList) {\n    const operatorIdMapping = this._operatorIdMapping;\n    const argsArray = operatorList.argsArray;\n    const fnArray = operatorList.fnArray;\n    const opList = [];\n    for (let i = 0, ii = fnArray.length; i < ii; i++) {\n      const fnId = fnArray[i];\n      opList.push({\n        fnId,\n        fn: operatorIdMapping[fnId],\n        args: argsArray[i],\n      });\n    }\n    return opListToTree(opList);\n  }\n\n  executeOpTree(opTree) {\n    for (const opTreeElement of opTree) {\n      const fn = opTreeElement.fn;\n      const fnId = opTreeElement.fnId;\n      const args = opTreeElement.args;\n\n      switch (fnId | 0) {\n        case OPS.beginText:\n          this.beginText();\n          break;\n        case OPS.dependency:\n          // Handled in `loadDependencies`, so no warning should be shown.\n          break;\n        case OPS.setLeading:\n          this.setLeading(args);\n          break;\n        case OPS.setLeadingMoveText:\n          this.setLeadingMoveText(args[0], args[1]);\n          break;\n        case OPS.setFont:\n          this.setFont(args);\n          break;\n        case OPS.showText:\n          this.showText(args[0]);\n          break;\n        case OPS.showSpacedText:\n          this.showText(args[0]);\n          break;\n        case OPS.endText:\n          this.endText();\n          break;\n        case OPS.moveText:\n          this.moveText(args[0], args[1]);\n          break;\n        case OPS.setCharSpacing:\n          this.setCharSpacing(args[0]);\n          break;\n        case OPS.setWordSpacing:\n          this.setWordSpacing(args[0]);\n          break;\n        case OPS.setHScale:\n          this.setHScale(args[0]);\n          break;\n        case OPS.setTextMatrix:\n          this.setTextMatrix(\n            args[0],\n            args[1],\n            args[2],\n            args[3],\n            args[4],\n            args[5]\n          );\n          break;\n        case OPS.setTextRise:\n          this.setTextRise(args[0]);\n          break;\n        case OPS.setTextRenderingMode:\n          this.setTextRenderingMode(args[0]);\n          break;\n        case OPS.setLineWidth:\n          this.setLineWidth(args[0]);\n          break;\n        case OPS.setLineJoin:\n          this.setLineJoin(args[0]);\n          break;\n        case OPS.setLineCap:\n          this.setLineCap(args[0]);\n          break;\n        case OPS.setMiterLimit:\n          this.setMiterLimit(args[0]);\n          break;\n        case OPS.setFillRGBColor:\n          this.setFillRGBColor(args[0], args[1], args[2]);\n          break;\n        case OPS.setStrokeRGBColor:\n          this.setStrokeRGBColor(args[0], args[1], args[2]);\n          break;\n        case OPS.setStrokeColorN:\n          this.setStrokeColorN(args);\n          break;\n        case OPS.setFillColorN:\n          this.setFillColorN(args);\n          break;\n        case OPS.shadingFill:\n          this.shadingFill(args[0]);\n          break;\n        case OPS.setDash:\n          this.setDash(args[0], args[1]);\n          break;\n        case OPS.setRenderingIntent:\n          this.setRenderingIntent(args[0]);\n          break;\n        case OPS.setFlatness:\n          this.setFlatness(args[0]);\n          break;\n        case OPS.setGState:\n          this.setGState(args[0]);\n          break;\n        case OPS.fill:\n          this.fill();\n          break;\n        case OPS.eoFill:\n          this.eoFill();\n          break;\n        case OPS.stroke:\n          this.stroke();\n          break;\n        case OPS.fillStroke:\n          this.fillStroke();\n          break;\n        case OPS.eoFillStroke:\n          this.eoFillStroke();\n          break;\n        case OPS.clip:\n          this.clip(\"nonzero\");\n          break;\n        case OPS.eoClip:\n          this.clip(\"evenodd\");\n          break;\n        case OPS.paintSolidColorImageMask:\n          this.paintSolidColorImageMask();\n          break;\n        case OPS.paintImageXObject:\n          this.paintImageXObject(args[0]);\n          break;\n        case OPS.paintInlineImageXObject:\n          this.paintInlineImageXObject(args[0]);\n          break;\n        case OPS.paintImageMaskXObject:\n          this.paintImageMaskXObject(args[0]);\n          break;\n        case OPS.paintFormXObjectBegin:\n          this.paintFormXObjectBegin(args[0], args[1]);\n          break;\n        case OPS.paintFormXObjectEnd:\n          this.paintFormXObjectEnd();\n          break;\n        case OPS.closePath:\n          this.closePath();\n          break;\n        case OPS.closeStroke:\n          this.closeStroke();\n          break;\n        case OPS.closeFillStroke:\n          this.closeFillStroke();\n          break;\n        case OPS.closeEOFillStroke:\n          this.closeEOFillStroke();\n          break;\n        case OPS.nextLine:\n          this.nextLine();\n          break;\n        case OPS.transform:\n          this.transform(args[0], args[1], args[2], args[3], args[4], args[5]);\n          break;\n        case OPS.constructPath:\n          this.constructPath(args[0], args[1]);\n          break;\n        case OPS.endPath:\n          this.endPath();\n          break;\n        case 92:\n          this.group(opTreeElement.items);\n          break;\n        default:\n          warn(`Unimplemented operator ${fn}`);\n          break;\n      }\n    }\n  }\n\n  setWordSpacing(wordSpacing) {\n    this.current.wordSpacing = wordSpacing;\n  }\n\n  setCharSpacing(charSpacing) {\n    this.current.charSpacing = charSpacing;\n  }\n\n  nextLine() {\n    this.moveText(0, this.current.leading);\n  }\n\n  setTextMatrix(a, b, c, d, e, f) {\n    const current = this.current;\n    current.textMatrix = current.lineMatrix = [a, b, c, d, e, f];\n    current.textMatrixScale = Math.hypot(a, b);\n\n    current.x = current.lineX = 0;\n    current.y = current.lineY = 0;\n\n    current.xcoords = [];\n    current.ycoords = [];\n    current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n    current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n    current.tspan.setAttributeNS(\n      null,\n      \"font-size\",\n      `${pf(current.fontSize)}px`\n    );\n    current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n\n    current.txtElement = this.svgFactory.createElement(\"svg:text\");\n    current.txtElement.append(current.tspan);\n  }\n\n  beginText() {\n    const current = this.current;\n    current.x = current.lineX = 0;\n    current.y = current.lineY = 0;\n    current.textMatrix = IDENTITY_MATRIX;\n    current.lineMatrix = IDENTITY_MATRIX;\n    current.textMatrixScale = 1;\n    current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n    current.txtElement = this.svgFactory.createElement(\"svg:text\");\n    current.txtgrp = this.svgFactory.createElement(\"svg:g\");\n    current.xcoords = [];\n    current.ycoords = [];\n  }\n\n  moveText(x, y) {\n    const current = this.current;\n    current.x = current.lineX += x;\n    current.y = current.lineY += y;\n\n    current.xcoords = [];\n    current.ycoords = [];\n    current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n    current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n    current.tspan.setAttributeNS(\n      null,\n      \"font-size\",\n      `${pf(current.fontSize)}px`\n    );\n    current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n  }\n\n  showText(glyphs) {\n    const current = this.current;\n    const font = current.font;\n    const fontSize = current.fontSize;\n    if (fontSize === 0) {\n      return;\n    }\n\n    const fontSizeScale = current.fontSizeScale;\n    const charSpacing = current.charSpacing;\n    const wordSpacing = current.wordSpacing;\n    const fontDirection = current.fontDirection;\n    const textHScale = current.textHScale * fontDirection;\n    const vertical = font.vertical;\n    const spacingDir = vertical ? 1 : -1;\n    const defaultVMetrics = font.defaultVMetrics;\n    const widthAdvanceScale = fontSize * current.fontMatrix[0];\n\n    let x = 0;\n    for (const glyph of glyphs) {\n      if (glyph === null) {\n        // Word break\n        x += fontDirection * wordSpacing;\n        continue;\n      } else if (typeof glyph === \"number\") {\n        x += (spacingDir * glyph * fontSize) / 1000;\n        continue;\n      }\n\n      const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n      const character = glyph.fontChar;\n      let scaledX, scaledY;\n      let width = glyph.width;\n      if (vertical) {\n        let vx;\n        const vmetric = glyph.vmetric || defaultVMetrics;\n        vx = glyph.vmetric ? vmetric[1] : width * 0.5;\n        vx = -vx * widthAdvanceScale;\n        const vy = vmetric[2] * widthAdvanceScale;\n\n        width = vmetric ? -vmetric[0] : width;\n        scaledX = vx / fontSizeScale;\n        scaledY = (x + vy) / fontSizeScale;\n      } else {\n        scaledX = x / fontSizeScale;\n        scaledY = 0;\n      }\n\n      if (glyph.isInFont || font.missingFile) {\n        current.xcoords.push(current.x + scaledX);\n        if (vertical) {\n          current.ycoords.push(-current.y + scaledY);\n        }\n        current.tspan.textContent += character;\n      } else {\n        // TODO: To assist with text selection, we should replace the missing\n        // character with a space character if charWidth is not zero.\n        // But we cannot just do \"character = ' '\", because the ' ' character\n        // might actually map to a different glyph.\n      }\n\n      const charWidth = vertical\n        ? width * widthAdvanceScale - spacing * fontDirection\n        : width * widthAdvanceScale + spacing * fontDirection;\n\n      x += charWidth;\n    }\n    current.tspan.setAttributeNS(null, \"x\", current.xcoords.map(pf).join(\" \"));\n    if (vertical) {\n      current.tspan.setAttributeNS(\n        null,\n        \"y\",\n        current.ycoords.map(pf).join(\" \")\n      );\n    } else {\n      current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n    }\n\n    if (vertical) {\n      current.y -= x;\n    } else {\n      current.x += x * textHScale;\n    }\n\n    current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n    current.tspan.setAttributeNS(\n      null,\n      \"font-size\",\n      `${pf(current.fontSize)}px`\n    );\n    if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {\n      current.tspan.setAttributeNS(null, \"font-style\", current.fontStyle);\n    }\n    if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {\n      current.tspan.setAttributeNS(null, \"font-weight\", current.fontWeight);\n    }\n\n    const fillStrokeMode =\n      current.textRenderingMode & TextRenderingMode.FILL_STROKE_MASK;\n    if (\n      fillStrokeMode === TextRenderingMode.FILL ||\n      fillStrokeMode === TextRenderingMode.FILL_STROKE\n    ) {\n      if (current.fillColor !== SVG_DEFAULTS.fillColor) {\n        current.tspan.setAttributeNS(null, \"fill\", current.fillColor);\n      }\n      if (current.fillAlpha < 1) {\n        current.tspan.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n      }\n    } else if (current.textRenderingMode === TextRenderingMode.ADD_TO_PATH) {\n      // Workaround for Firefox: We must set fill=\"transparent\" because\n      // fill=\"none\" would generate an empty clipping path.\n      current.tspan.setAttributeNS(null, \"fill\", \"transparent\");\n    } else {\n      current.tspan.setAttributeNS(null, \"fill\", \"none\");\n    }\n\n    if (\n      fillStrokeMode === TextRenderingMode.STROKE ||\n      fillStrokeMode === TextRenderingMode.FILL_STROKE\n    ) {\n      const lineWidthScale = 1 / (current.textMatrixScale || 1);\n      this._setStrokeAttributes(current.tspan, lineWidthScale);\n    }\n\n    // Include the text rise in the text matrix since the `pm` function\n    // creates the SVG element's `translate` entry (work on a copy to avoid\n    // altering the original text matrix).\n    let textMatrix = current.textMatrix;\n    if (current.textRise !== 0) {\n      textMatrix = textMatrix.slice();\n      textMatrix[5] += current.textRise;\n    }\n\n    current.txtElement.setAttributeNS(\n      null,\n      \"transform\",\n      `${pm(textMatrix)} scale(${pf(textHScale)}, -1)`\n    );\n    current.txtElement.setAttributeNS(XML_NS, \"xml:space\", \"preserve\");\n    current.txtElement.append(current.tspan);\n    current.txtgrp.append(current.txtElement);\n\n    this._ensureTransformGroup().append(current.txtElement);\n  }\n\n  setLeadingMoveText(x, y) {\n    this.setLeading(-y);\n    this.moveText(x, y);\n  }\n\n  addFontStyle(fontObj) {\n    if (!fontObj.data) {\n      throw new Error(\n        \"addFontStyle: No font data available, \" +\n          'ensure that the \"fontExtraProperties\" API parameter is set.'\n      );\n    }\n    if (!this.cssStyle) {\n      this.cssStyle = this.svgFactory.createElement(\"svg:style\");\n      this.cssStyle.setAttributeNS(null, \"type\", \"text/css\");\n      this.defs.append(this.cssStyle);\n    }\n\n    const url = createObjectURL(\n      fontObj.data,\n      fontObj.mimetype,\n      this.forceDataSchema\n    );\n    this.cssStyle.textContent +=\n      `@font-face { font-family: \"${fontObj.loadedName}\";` +\n      ` src: url(${url}); }\\n`;\n  }\n\n  setFont(details) {\n    const current = this.current;\n    const fontObj = this.commonObjs.get(details[0]);\n    let size = details[1];\n    current.font = fontObj;\n\n    if (\n      this.embedFonts &&\n      !fontObj.missingFile &&\n      !this.embeddedFonts[fontObj.loadedName]\n    ) {\n      this.addFontStyle(fontObj);\n      this.embeddedFonts[fontObj.loadedName] = fontObj;\n    }\n    current.fontMatrix = fontObj.fontMatrix || FONT_IDENTITY_MATRIX;\n\n    let bold = \"normal\";\n    if (fontObj.black) {\n      bold = \"900\";\n    } else if (fontObj.bold) {\n      bold = \"bold\";\n    }\n    const italic = fontObj.italic ? \"italic\" : \"normal\";\n\n    if (size < 0) {\n      size = -size;\n      current.fontDirection = -1;\n    } else {\n      current.fontDirection = 1;\n    }\n    current.fontSize = size;\n    current.fontFamily = fontObj.loadedName;\n    current.fontWeight = bold;\n    current.fontStyle = italic;\n\n    current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n    current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n    current.xcoords = [];\n    current.ycoords = [];\n  }\n\n  endText() {\n    const current = this.current;\n    if (\n      current.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG &&\n      current.txtElement?.hasChildNodes()\n    ) {\n      // If no glyphs are shown (i.e. no child nodes), no clipping occurs.\n      current.element = current.txtElement;\n      this.clip(\"nonzero\");\n      this.endPath();\n    }\n  }\n\n  // Path properties\n  setLineWidth(width) {\n    if (width > 0) {\n      this.current.lineWidth = width;\n    }\n  }\n\n  setLineCap(style) {\n    this.current.lineCap = LINE_CAP_STYLES[style];\n  }\n\n  setLineJoin(style) {\n    this.current.lineJoin = LINE_JOIN_STYLES[style];\n  }\n\n  setMiterLimit(limit) {\n    this.current.miterLimit = limit;\n  }\n\n  setStrokeAlpha(strokeAlpha) {\n    this.current.strokeAlpha = strokeAlpha;\n  }\n\n  setStrokeRGBColor(r, g, b) {\n    this.current.strokeColor = Util.makeHexColor(r, g, b);\n  }\n\n  setFillAlpha(fillAlpha) {\n    this.current.fillAlpha = fillAlpha;\n  }\n\n  setFillRGBColor(r, g, b) {\n    this.current.fillColor = Util.makeHexColor(r, g, b);\n    this.current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n    this.current.xcoords = [];\n    this.current.ycoords = [];\n  }\n\n  setStrokeColorN(args) {\n    this.current.strokeColor = this._makeColorN_Pattern(args);\n  }\n\n  setFillColorN(args) {\n    this.current.fillColor = this._makeColorN_Pattern(args);\n  }\n\n  shadingFill(args) {\n    const { width, height } = this.viewport;\n    const inv = Util.inverseTransform(this.transformMatrix);\n    const [x0, y0, x1, y1] = Util.getAxialAlignedBoundingBox(\n      [0, 0, width, height],\n      inv\n    );\n\n    const rect = this.svgFactory.createElement(\"svg:rect\");\n    rect.setAttributeNS(null, \"x\", x0);\n    rect.setAttributeNS(null, \"y\", y0);\n    rect.setAttributeNS(null, \"width\", x1 - x0);\n    rect.setAttributeNS(null, \"height\", y1 - y0);\n    rect.setAttributeNS(null, \"fill\", this._makeShadingPattern(args));\n    if (this.current.fillAlpha < 1) {\n      rect.setAttributeNS(null, \"fill-opacity\", this.current.fillAlpha);\n    }\n    this._ensureTransformGroup().append(rect);\n  }\n\n  /**\n   * @private\n   */\n  _makeColorN_Pattern(args) {\n    if (args[0] === \"TilingPattern\") {\n      return this._makeTilingPattern(args);\n    }\n    return this._makeShadingPattern(args);\n  }\n\n  /**\n   * @private\n   */\n  _makeTilingPattern(args) {\n    const color = args[1];\n    const operatorList = args[2];\n    const matrix = args[3] || IDENTITY_MATRIX;\n    const [x0, y0, x1, y1] = args[4];\n    const xstep = args[5];\n    const ystep = args[6];\n    const paintType = args[7];\n\n    const tilingId = `shading${shadingCount++}`;\n    const [tx0, ty0, tx1, ty1] = Util.normalizeRect([\n      ...Util.applyTransform([x0, y0], matrix),\n      ...Util.applyTransform([x1, y1], matrix),\n    ]);\n    const [xscale, yscale] = Util.singularValueDecompose2dScale(matrix);\n    const txstep = xstep * xscale;\n    const tystep = ystep * yscale;\n\n    const tiling = this.svgFactory.createElement(\"svg:pattern\");\n    tiling.setAttributeNS(null, \"id\", tilingId);\n    tiling.setAttributeNS(null, \"patternUnits\", \"userSpaceOnUse\");\n    tiling.setAttributeNS(null, \"width\", txstep);\n    tiling.setAttributeNS(null, \"height\", tystep);\n    tiling.setAttributeNS(null, \"x\", `${tx0}`);\n    tiling.setAttributeNS(null, \"y\", `${ty0}`);\n\n    // Save current state.\n    const svg = this.svg;\n    const transformMatrix = this.transformMatrix;\n    const fillColor = this.current.fillColor;\n    const strokeColor = this.current.strokeColor;\n\n    const bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0);\n    this.svg = bbox;\n    this.transformMatrix = matrix;\n    if (paintType === 2) {\n      const cssColor = Util.makeHexColor(...color);\n      this.current.fillColor = cssColor;\n      this.current.strokeColor = cssColor;\n    }\n    this.executeOpTree(this.convertOpList(operatorList));\n\n    // Restore saved state.\n    this.svg = svg;\n    this.transformMatrix = transformMatrix;\n    this.current.fillColor = fillColor;\n    this.current.strokeColor = strokeColor;\n\n    tiling.append(bbox.childNodes[0]);\n    this.defs.append(tiling);\n    return `url(#${tilingId})`;\n  }\n\n  /**\n   * @private\n   */\n  _makeShadingPattern(args) {\n    if (typeof args === \"string\") {\n      args = this.objs.get(args);\n    }\n    switch (args[0]) {\n      case \"RadialAxial\":\n        const shadingId = `shading${shadingCount++}`;\n        const colorStops = args[3];\n        let gradient;\n\n        switch (args[1]) {\n          case \"axial\":\n            const point0 = args[4];\n            const point1 = args[5];\n            gradient = this.svgFactory.createElement(\"svg:linearGradient\");\n            gradient.setAttributeNS(null, \"id\", shadingId);\n            gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n            gradient.setAttributeNS(null, \"x1\", point0[0]);\n            gradient.setAttributeNS(null, \"y1\", point0[1]);\n            gradient.setAttributeNS(null, \"x2\", point1[0]);\n            gradient.setAttributeNS(null, \"y2\", point1[1]);\n            break;\n          case \"radial\":\n            const focalPoint = args[4];\n            const circlePoint = args[5];\n            const focalRadius = args[6];\n            const circleRadius = args[7];\n            gradient = this.svgFactory.createElement(\"svg:radialGradient\");\n            gradient.setAttributeNS(null, \"id\", shadingId);\n            gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n            gradient.setAttributeNS(null, \"cx\", circlePoint[0]);\n            gradient.setAttributeNS(null, \"cy\", circlePoint[1]);\n            gradient.setAttributeNS(null, \"r\", circleRadius);\n            gradient.setAttributeNS(null, \"fx\", focalPoint[0]);\n            gradient.setAttributeNS(null, \"fy\", focalPoint[1]);\n            gradient.setAttributeNS(null, \"fr\", focalRadius);\n            break;\n          default:\n            throw new Error(`Unknown RadialAxial type: ${args[1]}`);\n        }\n        for (const colorStop of colorStops) {\n          const stop = this.svgFactory.createElement(\"svg:stop\");\n          stop.setAttributeNS(null, \"offset\", colorStop[0]);\n          stop.setAttributeNS(null, \"stop-color\", colorStop[1]);\n          gradient.append(stop);\n        }\n        this.defs.append(gradient);\n        return `url(#${shadingId})`;\n      case \"Mesh\":\n        warn(\"Unimplemented pattern Mesh\");\n        return null;\n      case \"Dummy\":\n        return \"hotpink\";\n      default:\n        throw new Error(`Unknown IR type: ${args[0]}`);\n    }\n  }\n\n  setDash(dashArray, dashPhase) {\n    this.current.dashArray = dashArray;\n    this.current.dashPhase = dashPhase;\n  }\n\n  constructPath(ops, args) {\n    const current = this.current;\n    let x = current.x,\n      y = current.y;\n    let d = [];\n    let j = 0;\n\n    for (const op of ops) {\n      switch (op | 0) {\n        case OPS.rectangle:\n          x = args[j++];\n          y = args[j++];\n          const width = args[j++];\n          const height = args[j++];\n          const xw = x + width;\n          const yh = y + height;\n          d.push(\n            \"M\",\n            pf(x),\n            pf(y),\n            \"L\",\n            pf(xw),\n            pf(y),\n            \"L\",\n            pf(xw),\n            pf(yh),\n            \"L\",\n            pf(x),\n            pf(yh),\n            \"Z\"\n          );\n          break;\n        case OPS.moveTo:\n          x = args[j++];\n          y = args[j++];\n          d.push(\"M\", pf(x), pf(y));\n          break;\n        case OPS.lineTo:\n          x = args[j++];\n          y = args[j++];\n          d.push(\"L\", pf(x), pf(y));\n          break;\n        case OPS.curveTo:\n          x = args[j + 4];\n          y = args[j + 5];\n          d.push(\n            \"C\",\n            pf(args[j]),\n            pf(args[j + 1]),\n            pf(args[j + 2]),\n            pf(args[j + 3]),\n            pf(x),\n            pf(y)\n          );\n          j += 6;\n          break;\n        case OPS.curveTo2:\n          d.push(\n            \"C\",\n            pf(x),\n            pf(y),\n            pf(args[j]),\n            pf(args[j + 1]),\n            pf(args[j + 2]),\n            pf(args[j + 3])\n          );\n          x = args[j + 2];\n          y = args[j + 3];\n          j += 4;\n          break;\n        case OPS.curveTo3:\n          x = args[j + 2];\n          y = args[j + 3];\n          d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y));\n          j += 4;\n          break;\n        case OPS.closePath:\n          d.push(\"Z\");\n          break;\n      }\n    }\n\n    d = d.join(\" \");\n\n    if (\n      current.path &&\n      ops.length > 0 &&\n      ops[0] !== OPS.rectangle &&\n      ops[0] !== OPS.moveTo\n    ) {\n      // If a path does not start with an OPS.rectangle or OPS.moveTo, it has\n      // probably been divided into two OPS.constructPath operators by\n      // OperatorList. Append the commands to the previous path element.\n      d = current.path.getAttributeNS(null, \"d\") + d;\n    } else {\n      current.path = this.svgFactory.createElement(\"svg:path\");\n      this._ensureTransformGroup().append(current.path);\n    }\n\n    current.path.setAttributeNS(null, \"d\", d);\n    current.path.setAttributeNS(null, \"fill\", \"none\");\n\n    // Saving a reference in current.element so that it can be addressed\n    // in 'fill' and 'stroke'\n    current.element = current.path;\n    current.setCurrentPoint(x, y);\n  }\n\n  endPath() {\n    const current = this.current;\n\n    // Painting operators end a path.\n    current.path = null;\n\n    if (!this.pendingClip) {\n      return;\n    }\n    if (!current.element) {\n      this.pendingClip = null;\n      return;\n    }\n\n    // Add the current path to a clipping path.\n    const clipId = `clippath${clipCount++}`;\n    const clipPath = this.svgFactory.createElement(\"svg:clipPath\");\n    clipPath.setAttributeNS(null, \"id\", clipId);\n    clipPath.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n\n    // A deep clone is needed when text is used as a clipping path.\n    const clipElement = current.element.cloneNode(true);\n    if (this.pendingClip === \"evenodd\") {\n      clipElement.setAttributeNS(null, \"clip-rule\", \"evenodd\");\n    } else {\n      clipElement.setAttributeNS(null, \"clip-rule\", \"nonzero\");\n    }\n    this.pendingClip = null;\n    clipPath.append(clipElement);\n    this.defs.append(clipPath);\n\n    if (current.activeClipUrl) {\n      // The previous clipping group content can go out of order -- resetting\n      // cached clipGroups.\n      current.clipGroup = null;\n      for (const prev of this.extraStack) {\n        prev.clipGroup = null;\n      }\n      // Intersect with the previous clipping path.\n      clipPath.setAttributeNS(null, \"clip-path\", current.activeClipUrl);\n    }\n    current.activeClipUrl = `url(#${clipId})`;\n\n    this.tgrp = null;\n  }\n\n  clip(type) {\n    this.pendingClip = type;\n  }\n\n  closePath() {\n    const current = this.current;\n    if (current.path) {\n      const d = `${current.path.getAttributeNS(null, \"d\")}Z`;\n      current.path.setAttributeNS(null, \"d\", d);\n    }\n  }\n\n  setLeading(leading) {\n    this.current.leading = -leading;\n  }\n\n  setTextRise(textRise) {\n    this.current.textRise = textRise;\n  }\n\n  setTextRenderingMode(textRenderingMode) {\n    this.current.textRenderingMode = textRenderingMode;\n  }\n\n  setHScale(scale) {\n    this.current.textHScale = scale / 100;\n  }\n\n  setRenderingIntent(intent) {\n    // This operation is ignored since we haven't found a use case for it yet.\n  }\n\n  setFlatness(flatness) {\n    // This operation is ignored since we haven't found a use case for it yet.\n  }\n\n  setGState(states) {\n    for (const [key, value] of states) {\n      switch (key) {\n        case \"LW\":\n          this.setLineWidth(value);\n          break;\n        case \"LC\":\n          this.setLineCap(value);\n          break;\n        case \"LJ\":\n          this.setLineJoin(value);\n          break;\n        case \"ML\":\n          this.setMiterLimit(value);\n          break;\n        case \"D\":\n          this.setDash(value[0], value[1]);\n          break;\n        case \"RI\":\n          this.setRenderingIntent(value);\n          break;\n        case \"FL\":\n          this.setFlatness(value);\n          break;\n        case \"Font\":\n          this.setFont(value);\n          break;\n        case \"CA\":\n          this.setStrokeAlpha(value);\n          break;\n        case \"ca\":\n          this.setFillAlpha(value);\n          break;\n        default:\n          warn(`Unimplemented graphic state operator ${key}`);\n          break;\n      }\n    }\n  }\n\n  fill() {\n    const current = this.current;\n    if (current.element) {\n      current.element.setAttributeNS(null, \"fill\", current.fillColor);\n      current.element.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n      this.endPath();\n    }\n  }\n\n  stroke() {\n    const current = this.current;\n    if (current.element) {\n      this._setStrokeAttributes(current.element);\n      current.element.setAttributeNS(null, \"fill\", \"none\");\n      this.endPath();\n    }\n  }\n\n  /**\n   * @private\n   */\n  _setStrokeAttributes(element, lineWidthScale = 1) {\n    const current = this.current;\n    let dashArray = current.dashArray;\n    if (lineWidthScale !== 1 && dashArray.length > 0) {\n      dashArray = dashArray.map(function (value) {\n        return lineWidthScale * value;\n      });\n    }\n    element.setAttributeNS(null, \"stroke\", current.strokeColor);\n    element.setAttributeNS(null, \"stroke-opacity\", current.strokeAlpha);\n    element.setAttributeNS(null, \"stroke-miterlimit\", pf(current.miterLimit));\n    element.setAttributeNS(null, \"stroke-linecap\", current.lineCap);\n    element.setAttributeNS(null, \"stroke-linejoin\", current.lineJoin);\n    element.setAttributeNS(\n      null,\n      \"stroke-width\",\n      pf(lineWidthScale * current.lineWidth) + \"px\"\n    );\n    element.setAttributeNS(\n      null,\n      \"stroke-dasharray\",\n      dashArray.map(pf).join(\" \")\n    );\n    element.setAttributeNS(\n      null,\n      \"stroke-dashoffset\",\n      pf(lineWidthScale * current.dashPhase) + \"px\"\n    );\n  }\n\n  eoFill() {\n    this.current.element?.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n    this.fill();\n  }\n\n  fillStroke() {\n    // Order is important since stroke wants fill to be none.\n    // First stroke, then if fill needed, it will be overwritten.\n    this.stroke();\n    this.fill();\n  }\n\n  eoFillStroke() {\n    this.current.element?.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n    this.fillStroke();\n  }\n\n  closeStroke() {\n    this.closePath();\n    this.stroke();\n  }\n\n  closeFillStroke() {\n    this.closePath();\n    this.fillStroke();\n  }\n\n  closeEOFillStroke() {\n    this.closePath();\n    this.eoFillStroke();\n  }\n\n  paintSolidColorImageMask() {\n    const rect = this.svgFactory.createElement(\"svg:rect\");\n    rect.setAttributeNS(null, \"x\", \"0\");\n    rect.setAttributeNS(null, \"y\", \"0\");\n    rect.setAttributeNS(null, \"width\", \"1px\");\n    rect.setAttributeNS(null, \"height\", \"1px\");\n    rect.setAttributeNS(null, \"fill\", this.current.fillColor);\n\n    this._ensureTransformGroup().append(rect);\n  }\n\n  paintImageXObject(objId) {\n    const imgData = this.getObject(objId);\n    if (!imgData) {\n      warn(`Dependent image with object ID ${objId} is not ready yet`);\n      return;\n    }\n    this.paintInlineImageXObject(imgData);\n  }\n\n  paintInlineImageXObject(imgData, mask) {\n    const width = imgData.width;\n    const height = imgData.height;\n\n    const imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask);\n    const cliprect = this.svgFactory.createElement(\"svg:rect\");\n    cliprect.setAttributeNS(null, \"x\", \"0\");\n    cliprect.setAttributeNS(null, \"y\", \"0\");\n    cliprect.setAttributeNS(null, \"width\", pf(width));\n    cliprect.setAttributeNS(null, \"height\", pf(height));\n    this.current.element = cliprect;\n    this.clip(\"nonzero\");\n\n    const imgEl = this.svgFactory.createElement(\"svg:image\");\n    imgEl.setAttributeNS(XLINK_NS, \"xlink:href\", imgSrc);\n    imgEl.setAttributeNS(null, \"x\", \"0\");\n    imgEl.setAttributeNS(null, \"y\", pf(-height));\n    imgEl.setAttributeNS(null, \"width\", pf(width) + \"px\");\n    imgEl.setAttributeNS(null, \"height\", pf(height) + \"px\");\n    imgEl.setAttributeNS(\n      null,\n      \"transform\",\n      `scale(${pf(1 / width)} ${pf(-1 / height)})`\n    );\n    if (mask) {\n      mask.append(imgEl);\n    } else {\n      this._ensureTransformGroup().append(imgEl);\n    }\n  }\n\n  paintImageMaskXObject(img) {\n    const imgData = this.getObject(img.data, img);\n    if (imgData.bitmap) {\n      warn(\n        \"paintImageMaskXObject: ImageBitmap support is not implemented, \" +\n          \"ensure that the `isOffscreenCanvasSupported` API parameter is disabled.\"\n      );\n      return;\n    }\n    const current = this.current;\n    const width = imgData.width;\n    const height = imgData.height;\n    const fillColor = current.fillColor;\n\n    current.maskId = `mask${maskCount++}`;\n    const mask = this.svgFactory.createElement(\"svg:mask\");\n    mask.setAttributeNS(null, \"id\", current.maskId);\n\n    const rect = this.svgFactory.createElement(\"svg:rect\");\n    rect.setAttributeNS(null, \"x\", \"0\");\n    rect.setAttributeNS(null, \"y\", \"0\");\n    rect.setAttributeNS(null, \"width\", pf(width));\n    rect.setAttributeNS(null, \"height\", pf(height));\n    rect.setAttributeNS(null, \"fill\", fillColor);\n    rect.setAttributeNS(null, \"mask\", `url(#${current.maskId})`);\n\n    this.defs.append(mask);\n    this._ensureTransformGroup().append(rect);\n\n    this.paintInlineImageXObject(imgData, mask);\n  }\n\n  paintFormXObjectBegin(matrix, bbox) {\n    if (Array.isArray(matrix) && matrix.length === 6) {\n      this.transform(\n        matrix[0],\n        matrix[1],\n        matrix[2],\n        matrix[3],\n        matrix[4],\n        matrix[5]\n      );\n    }\n\n    if (bbox) {\n      const width = bbox[2] - bbox[0];\n      const height = bbox[3] - bbox[1];\n\n      const cliprect = this.svgFactory.createElement(\"svg:rect\");\n      cliprect.setAttributeNS(null, \"x\", bbox[0]);\n      cliprect.setAttributeNS(null, \"y\", bbox[1]);\n      cliprect.setAttributeNS(null, \"width\", pf(width));\n      cliprect.setAttributeNS(null, \"height\", pf(height));\n      this.current.element = cliprect;\n      this.clip(\"nonzero\");\n      this.endPath();\n    }\n  }\n\n  paintFormXObjectEnd() {}\n\n  /**\n   * @private\n   */\n  _initialize(viewport) {\n    const svg = this.svgFactory.create(viewport.width, viewport.height);\n\n    // Create the definitions element.\n    const definitions = this.svgFactory.createElement(\"svg:defs\");\n    svg.append(definitions);\n    this.defs = definitions;\n\n    // Create the root group element, which acts a container for all other\n    // groups and applies the viewport transform.\n    const rootGroup = this.svgFactory.createElement(\"svg:g\");\n    rootGroup.setAttributeNS(null, \"transform\", pm(viewport.transform));\n    svg.append(rootGroup);\n\n    // For the construction of the SVG image we are only interested in the\n    // root group, so we expose it as the entry point of the SVG image for\n    // the other code in this class.\n    this.svg = rootGroup;\n\n    return svg;\n  }\n\n  /**\n   * @private\n   */\n  _ensureClipGroup() {\n    if (!this.current.clipGroup) {\n      const clipGroup = this.svgFactory.createElement(\"svg:g\");\n      clipGroup.setAttributeNS(null, \"clip-path\", this.current.activeClipUrl);\n      this.svg.append(clipGroup);\n      this.current.clipGroup = clipGroup;\n    }\n    return this.current.clipGroup;\n  }\n\n  /**\n   * @private\n   */\n  _ensureTransformGroup() {\n    if (!this.tgrp) {\n      this.tgrp = this.svgFactory.createElement(\"svg:g\");\n      this.tgrp.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n      if (this.current.activeClipUrl) {\n        this._ensureClipGroup().append(this.tgrp);\n      } else {\n        this.svg.append(this.tgrp);\n      }\n    }\n    return this.tgrp;\n  }\n}\n\nexport { SVGGraphics };\n","/* Copyright 2021 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./api\").TextContent} TextContent */\n\nclass XfaText {\n  /**\n   * Walk an XFA tree and create an array of text nodes that is compatible\n   * with a regular PDFs TextContent. Currently, only TextItem.str is supported,\n   * all other fields and styles haven't been implemented.\n   *\n   * @param {Object} xfa - An XFA fake DOM object.\n   *\n   * @returns {TextContent}\n   */\n  static textContent(xfa) {\n    const items = [];\n    const output = {\n      items,\n      styles: Object.create(null),\n    };\n    function walk(node) {\n      if (!node) {\n        return;\n      }\n      let str = null;\n      const name = node.name;\n      if (name === \"#text\") {\n        str = node.value;\n      } else if (!XfaText.shouldBuildText(name)) {\n        return;\n      } else if (node?.attributes?.textContent) {\n        str = node.attributes.textContent;\n      } else if (node.value) {\n        str = node.value;\n      }\n      if (str !== null) {\n        items.push({\n          str,\n        });\n      }\n      if (!node.children) {\n        return;\n      }\n      for (const child of node.children) {\n        walk(child);\n      }\n    }\n    walk(xfa);\n    return output;\n  }\n\n  /**\n   * @param {string} name - DOM node name. (lower case)\n   *\n   * @returns {boolean} true if the DOM node should have a corresponding text\n   * node.\n   */\n  static shouldBuildText(name) {\n    return !(\n      name === \"textarea\" ||\n      name === \"input\" ||\n      name === \"option\" ||\n      name === \"select\"\n    );\n  }\n}\n\nexport { XfaText };\n","/* Copyright 2015 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./display_utils\").PageViewport} PageViewport */\n/** @typedef {import(\"./api\").TextContent} TextContent */\n\nimport {\n  AbortException,\n  FeatureTest,\n  PromiseCapability,\n  Util,\n} from \"../shared/util.js\";\nimport { deprecated, setLayerDimensions } from \"./display_utils.js\";\n\n/**\n * Text layer render parameters.\n *\n * @typedef {Object} TextLayerRenderParameters\n * @property {ReadableStream | TextContent} textContentSource - Text content to\n *   render, i.e. the value returned by the page's `streamTextContent` or\n *   `getTextContent` method.\n * @property {HTMLElement} container - The DOM node that will contain the text\n *   runs.\n * @property {PageViewport} viewport - The target viewport to properly layout\n *   the text runs.\n * @property {Array<HTMLElement>} [textDivs] - HTML elements that correspond to\n *   the text items of the textContent input.\n *   This is output and shall initially be set to an empty array.\n * @property {WeakMap<HTMLElement,Object>} [textDivProperties] - Some properties\n *   weakly mapped to the HTML elements used to render the text.\n * @property {Array<string>} [textContentItemsStr] - Strings that correspond to\n *   the `str` property of the text items of the textContent input.\n *   This is output and shall initially be set to an empty array.\n * @property {boolean} [isOffscreenCanvasSupported] true if we can use\n *   OffscreenCanvas to measure string widths.\n */\n\n/**\n * Text layer update parameters.\n *\n * @typedef {Object} TextLayerUpdateParameters\n * @property {HTMLElement} container - The DOM node that will contain the text\n *   runs.\n * @property {PageViewport} viewport - The target viewport to properly layout\n *   the text runs.\n * @property {Array<HTMLElement>} [textDivs] - HTML elements that correspond to\n *   the text items of the textContent input.\n *   This is output and shall initially be set to an empty array.\n * @property {WeakMap<HTMLElement,Object>} [textDivProperties] - Some properties\n *   weakly mapped to the HTML elements used to render the text.\n * @property {boolean} [isOffscreenCanvasSupported] true if we can use\n *   OffscreenCanvas to measure string widths.\n * @property {boolean} [mustRotate] true if the text layer must be rotated.\n * @property {boolean} [mustRescale] true if the text layer contents must be\n *   rescaled.\n */\n\nconst MAX_TEXT_DIVS_TO_RENDER = 100000;\nconst DEFAULT_FONT_SIZE = 30;\nconst DEFAULT_FONT_ASCENT = 0.8;\nconst ascentCache = new Map();\n\nfunction getCtx(size, isOffscreenCanvasSupported) {\n  let ctx;\n  if (isOffscreenCanvasSupported && FeatureTest.isOffscreenCanvasSupported) {\n    ctx = new OffscreenCanvas(size, size).getContext(\"2d\", { alpha: false });\n  } else {\n    const canvas = document.createElement(\"canvas\");\n    canvas.width = canvas.height = size;\n    ctx = canvas.getContext(\"2d\", { alpha: false });\n  }\n\n  return ctx;\n}\n\nfunction getAscent(fontFamily, isOffscreenCanvasSupported) {\n  const cachedAscent = ascentCache.get(fontFamily);\n  if (cachedAscent) {\n    return cachedAscent;\n  }\n\n  const ctx = getCtx(DEFAULT_FONT_SIZE, isOffscreenCanvasSupported);\n\n  ctx.font = `${DEFAULT_FONT_SIZE}px ${fontFamily}`;\n  const metrics = ctx.measureText(\"\");\n\n  // Both properties aren't available by default in Firefox.\n  let ascent = metrics.fontBoundingBoxAscent;\n  let descent = Math.abs(metrics.fontBoundingBoxDescent);\n  if (ascent) {\n    const ratio = ascent / (ascent + descent);\n    ascentCache.set(fontFamily, ratio);\n\n    ctx.canvas.width = ctx.canvas.height = 0;\n    return ratio;\n  }\n\n  // Try basic heuristic to guess ascent/descent.\n  // Draw a g with baseline at 0,0 and then get the line\n  // number where a pixel has non-null red component (starting\n  // from bottom).\n  ctx.strokeStyle = \"red\";\n  ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n  ctx.strokeText(\"g\", 0, 0);\n  let pixels = ctx.getImageData(\n    0,\n    0,\n    DEFAULT_FONT_SIZE,\n    DEFAULT_FONT_SIZE\n  ).data;\n  descent = 0;\n  for (let i = pixels.length - 1 - 3; i >= 0; i -= 4) {\n    if (pixels[i] > 0) {\n      descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE);\n      break;\n    }\n  }\n\n  // Draw an A with baseline at 0,DEFAULT_FONT_SIZE and then get the line\n  // number where a pixel has non-null red component (starting\n  // from top).\n  ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n  ctx.strokeText(\"A\", 0, DEFAULT_FONT_SIZE);\n  pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n  ascent = 0;\n  for (let i = 0, ii = pixels.length; i < ii; i += 4) {\n    if (pixels[i] > 0) {\n      ascent = DEFAULT_FONT_SIZE - Math.floor(i / 4 / DEFAULT_FONT_SIZE);\n      break;\n    }\n  }\n\n  ctx.canvas.width = ctx.canvas.height = 0;\n\n  if (ascent) {\n    const ratio = ascent / (ascent + descent);\n    ascentCache.set(fontFamily, ratio);\n    return ratio;\n  }\n\n  ascentCache.set(fontFamily, DEFAULT_FONT_ASCENT);\n  return DEFAULT_FONT_ASCENT;\n}\n\nfunction appendText(task, geom, styles) {\n  // Initialize all used properties to keep the caches monomorphic.\n  const textDiv = document.createElement(\"span\");\n  const textDivProperties = {\n    angle: 0,\n    canvasWidth: 0,\n    hasText: geom.str !== \"\",\n    hasEOL: geom.hasEOL,\n    fontSize: 0,\n  };\n  task._textDivs.push(textDiv);\n\n  const tx = Util.transform(task._transform, geom.transform);\n  let angle = Math.atan2(tx[1], tx[0]);\n  const style = styles[geom.fontName];\n  if (style.vertical) {\n    angle += Math.PI / 2;\n  }\n  const fontHeight = Math.hypot(tx[2], tx[3]);\n  const fontAscent =\n    fontHeight * getAscent(style.fontFamily, task._isOffscreenCanvasSupported);\n\n  let left, top;\n  if (angle === 0) {\n    left = tx[4];\n    top = tx[5] - fontAscent;\n  } else {\n    left = tx[4] + fontAscent * Math.sin(angle);\n    top = tx[5] - fontAscent * Math.cos(angle);\n  }\n\n  const scaleFactorStr = \"calc(var(--scale-factor)*\";\n  const divStyle = textDiv.style;\n  // Setting the style properties individually, rather than all at once,\n  // should be OK since the `textDiv` isn't appended to the document yet.\n  if (task._container === task._rootContainer) {\n    divStyle.left = `${((100 * left) / task._pageWidth).toFixed(2)}%`;\n    divStyle.top = `${((100 * top) / task._pageHeight).toFixed(2)}%`;\n  } else {\n    // We're in a marked content span, hence we can't use percents.\n    divStyle.left = `${scaleFactorStr}${left.toFixed(2)}px)`;\n    divStyle.top = `${scaleFactorStr}${top.toFixed(2)}px)`;\n  }\n  divStyle.fontSize = `${scaleFactorStr}${fontHeight.toFixed(2)}px)`;\n  divStyle.fontFamily = style.fontFamily;\n\n  textDivProperties.fontSize = fontHeight;\n\n  // Keeps screen readers from pausing on every new text span.\n  textDiv.setAttribute(\"role\", \"presentation\");\n\n  textDiv.textContent = geom.str;\n  // geom.dir may be 'ttb' for vertical texts.\n  textDiv.dir = geom.dir;\n\n  // `fontName` is only used by the FontInspector, and we only use `dataset`\n  // here to make the font name available in the debugger.\n  if (task._fontInspectorEnabled) {\n    textDiv.dataset.fontName = geom.fontName;\n  }\n  if (angle !== 0) {\n    textDivProperties.angle = angle * (180 / Math.PI);\n  }\n  // We don't bother scaling single-char text divs, because it has very\n  // little effect on text highlighting. This makes scrolling on docs with\n  // lots of such divs a lot faster.\n  let shouldScaleText = false;\n  if (geom.str.length > 1) {\n    shouldScaleText = true;\n  } else if (geom.str !== \" \" && geom.transform[0] !== geom.transform[3]) {\n    const absScaleX = Math.abs(geom.transform[0]),\n      absScaleY = Math.abs(geom.transform[3]);\n    // When the horizontal/vertical scaling differs significantly, also scale\n    // even single-char text to improve highlighting (fixes issue11713.pdf).\n    if (\n      absScaleX !== absScaleY &&\n      Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5\n    ) {\n      shouldScaleText = true;\n    }\n  }\n  if (shouldScaleText) {\n    textDivProperties.canvasWidth = style.vertical ? geom.height : geom.width;\n  }\n  task._textDivProperties.set(textDiv, textDivProperties);\n  if (task._isReadableStream) {\n    task._layoutText(textDiv);\n  }\n}\n\nfunction layout(params) {\n  const { div, scale, properties, ctx, prevFontSize, prevFontFamily } = params;\n  const { style } = div;\n  let transform = \"\";\n  if (properties.canvasWidth !== 0 && properties.hasText) {\n    const { fontFamily } = style;\n    const { canvasWidth, fontSize } = properties;\n\n    if (prevFontSize !== fontSize || prevFontFamily !== fontFamily) {\n      ctx.font = `${fontSize * scale}px ${fontFamily}`;\n      params.prevFontSize = fontSize;\n      params.prevFontFamily = fontFamily;\n    }\n\n    // Only measure the width for multi-char text divs, see `appendText`.\n    const { width } = ctx.measureText(div.textContent);\n\n    if (width > 0) {\n      transform = `scaleX(${(canvasWidth * scale) / width})`;\n    }\n  }\n  if (properties.angle !== 0) {\n    transform = `rotate(${properties.angle}deg) ${transform}`;\n  }\n  if (transform.length > 0) {\n    style.transform = transform;\n  }\n}\n\nfunction render(task) {\n  if (task._canceled) {\n    return;\n  }\n  const textDivs = task._textDivs;\n  const capability = task._capability;\n  const textDivsLength = textDivs.length;\n\n  // No point in rendering many divs as it would make the browser\n  // unusable even after the divs are rendered.\n  if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) {\n    capability.resolve();\n    return;\n  }\n\n  if (!task._isReadableStream) {\n    for (const textDiv of textDivs) {\n      task._layoutText(textDiv);\n    }\n  }\n  capability.resolve();\n}\n\nclass TextLayerRenderTask {\n  constructor({\n    textContentSource,\n    container,\n    viewport,\n    textDivs,\n    textDivProperties,\n    textContentItemsStr,\n    isOffscreenCanvasSupported,\n  }) {\n    this._textContentSource = textContentSource;\n    this._isReadableStream = textContentSource instanceof ReadableStream;\n    this._container = this._rootContainer = container;\n    this._textDivs = textDivs || [];\n    this._textContentItemsStr = textContentItemsStr || [];\n    this._isOffscreenCanvasSupported = isOffscreenCanvasSupported;\n    this._fontInspectorEnabled = !!globalThis.FontInspector?.enabled;\n\n    this._reader = null;\n    this._textDivProperties = textDivProperties || new WeakMap();\n    this._canceled = false;\n    this._capability = new PromiseCapability();\n    this._layoutTextParams = {\n      prevFontSize: null,\n      prevFontFamily: null,\n      div: null,\n      scale: viewport.scale * (globalThis.devicePixelRatio || 1),\n      properties: null,\n      ctx: getCtx(0, isOffscreenCanvasSupported),\n    };\n    const { pageWidth, pageHeight, pageX, pageY } = viewport.rawDims;\n    this._transform = [1, 0, 0, -1, -pageX, pageY + pageHeight];\n    this._pageWidth = pageWidth;\n    this._pageHeight = pageHeight;\n\n    setLayerDimensions(container, viewport);\n\n    // Always clean-up the temporary canvas once rendering is no longer pending.\n    this._capability.promise\n      .finally(() => {\n        this._layoutTextParams = null;\n      })\n      .catch(() => {\n        // Avoid \"Uncaught promise\" messages in the console.\n      });\n  }\n\n  /**\n   * Promise for textLayer rendering task completion.\n   * @type {Promise<void>}\n   */\n  get promise() {\n    return this._capability.promise;\n  }\n\n  /**\n   * Cancel rendering of the textLayer.\n   */\n  cancel() {\n    this._canceled = true;\n    if (this._reader) {\n      this._reader\n        .cancel(new AbortException(\"TextLayer task cancelled.\"))\n        .catch(() => {\n          // Avoid \"Uncaught promise\" messages in the console.\n        });\n      this._reader = null;\n    }\n    this._capability.reject(new AbortException(\"TextLayer task cancelled.\"));\n  }\n\n  /**\n   * @private\n   */\n  _processItems(items, styleCache) {\n    for (const item of items) {\n      if (item.str === undefined) {\n        if (\n          item.type === \"beginMarkedContentProps\" ||\n          item.type === \"beginMarkedContent\"\n        ) {\n          const parent = this._container;\n          this._container = document.createElement(\"span\");\n          this._container.classList.add(\"markedContent\");\n          if (item.id !== null) {\n            this._container.setAttribute(\"id\", `${item.id}`);\n          }\n          parent.append(this._container);\n        } else if (item.type === \"endMarkedContent\") {\n          this._container = this._container.parentNode;\n        }\n        continue;\n      }\n      this._textContentItemsStr.push(item.str);\n      appendText(this, item, styleCache);\n    }\n  }\n\n  /**\n   * @private\n   */\n  _layoutText(textDiv) {\n    const textDivProperties = (this._layoutTextParams.properties =\n      this._textDivProperties.get(textDiv));\n    this._layoutTextParams.div = textDiv;\n    layout(this._layoutTextParams);\n\n    if (textDivProperties.hasText) {\n      this._container.append(textDiv);\n    }\n    if (textDivProperties.hasEOL) {\n      const br = document.createElement(\"br\");\n      br.setAttribute(\"role\", \"presentation\");\n      this._container.append(br);\n    }\n  }\n\n  /**\n   * @private\n   */\n  _render() {\n    const capability = new PromiseCapability();\n    let styleCache = Object.create(null);\n\n    if (this._isReadableStream) {\n      const pump = () => {\n        this._reader.read().then(({ value, done }) => {\n          if (done) {\n            capability.resolve();\n            return;\n          }\n\n          Object.assign(styleCache, value.styles);\n          this._processItems(value.items, styleCache);\n          pump();\n        }, capability.reject);\n      };\n\n      this._reader = this._textContentSource.getReader();\n      pump();\n    } else if (this._textContentSource) {\n      const { items, styles } = this._textContentSource;\n      this._processItems(items, styles);\n      capability.resolve();\n    } else {\n      throw new Error('No \"textContentSource\" parameter specified.');\n    }\n\n    capability.promise.then(() => {\n      styleCache = null;\n      render(this);\n    }, this._capability.reject);\n  }\n}\n\n/**\n * @param {TextLayerRenderParameters} params\n * @returns {TextLayerRenderTask}\n */\nfunction renderTextLayer(params) {\n  if (\n    (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n    !params.textContentSource &&\n    (params.textContent || params.textContentStream)\n  ) {\n    deprecated(\n      \"The TextLayerRender `textContent`/`textContentStream` parameters \" +\n        \"will be removed in the future, please use `textContentSource` instead.\"\n    );\n    params.textContentSource = params.textContent || params.textContentStream;\n  }\n  if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC && !TESTING\")) {\n    const { container, viewport } = params;\n    const style = getComputedStyle(container);\n    const visibility = style.getPropertyValue(\"visibility\");\n    const scaleFactor = parseFloat(style.getPropertyValue(\"--scale-factor\"));\n\n    if (\n      visibility === \"visible\" &&\n      (!scaleFactor || Math.abs(scaleFactor - viewport.scale) > 1e-5)\n    ) {\n      console.error(\n        \"The `--scale-factor` CSS-variable must be set, \" +\n          \"to the same value as `viewport.scale`, \" +\n          \"either on the `container`-element itself or higher up in the DOM.\"\n      );\n    }\n  }\n  const task = new TextLayerRenderTask(params);\n  task._render();\n  return task;\n}\n\n/**\n * @param {TextLayerUpdateParameters} params\n * @returns {undefined}\n */\nfunction updateTextLayer({\n  container,\n  viewport,\n  textDivs,\n  textDivProperties,\n  isOffscreenCanvasSupported,\n  mustRotate = true,\n  mustRescale = true,\n}) {\n  if (mustRotate) {\n    setLayerDimensions(container, { rotation: viewport.rotation });\n  }\n\n  if (mustRescale) {\n    const ctx = getCtx(0, isOffscreenCanvasSupported);\n    const scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n    const params = {\n      prevFontSize: null,\n      prevFontFamily: null,\n      div: null,\n      scale,\n      properties: null,\n      ctx,\n    };\n    for (const div of textDivs) {\n      params.properties = textDivProperties.get(div);\n      params.div = div;\n      layout(params);\n    }\n  }\n}\n\nexport { renderTextLayer, TextLayerRenderTask, updateTextLayer };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./tools.js\").AnnotationEditorUIManager} AnnotationEditorUIManager */\n/** @typedef {import(\"../display_utils.js\").PageViewport} PageViewport */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"../../../web/text_accessibility.js\").TextAccessibilityManager} TextAccessibilityManager */\n/** @typedef {import(\"../../../web/interfaces\").IL10n} IL10n */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"../annotation_layer.js\").AnnotationLayer} AnnotationLayer */\n\nimport { AnnotationEditorType, FeatureTest } from \"../../shared/util.js\";\nimport { AnnotationEditor } from \"./editor.js\";\nimport { FreeTextEditor } from \"./freetext.js\";\nimport { InkEditor } from \"./ink.js\";\nimport { setLayerDimensions } from \"../display_utils.js\";\nimport { StampEditor } from \"./stamp.js\";\n\n/**\n * @typedef {Object} AnnotationEditorLayerOptions\n * @property {Object} mode\n * @property {HTMLDivElement} div\n * @property {AnnotationEditorUIManager} uiManager\n * @property {boolean} enabled\n * @property {TextAccessibilityManager} [accessibilityManager]\n * @property {number} pageIndex\n * @property {IL10n} l10n\n * @property {AnnotationLayer} [annotationLayer]\n * @property {PageViewport} viewport\n */\n\n/**\n * @typedef {Object} RenderEditorLayerOptions\n * @property {PageViewport} viewport\n */\n\n/**\n * Manage all the different editors on a page.\n */\nclass AnnotationEditorLayer {\n  #accessibilityManager;\n\n  #allowClick = false;\n\n  #annotationLayer = null;\n\n  #boundPointerup = this.pointerup.bind(this);\n\n  #boundPointerdown = this.pointerdown.bind(this);\n\n  #editors = new Map();\n\n  #hadPointerDown = false;\n\n  #isCleaningUp = false;\n\n  #isDisabling = false;\n\n  #uiManager;\n\n  static _initialized = false;\n\n  /**\n   * @param {AnnotationEditorLayerOptions} options\n   */\n  constructor({\n    uiManager,\n    pageIndex,\n    div,\n    accessibilityManager,\n    annotationLayer,\n    viewport,\n    l10n,\n  }) {\n    const editorTypes = [FreeTextEditor, InkEditor, StampEditor];\n    if (!AnnotationEditorLayer._initialized) {\n      AnnotationEditorLayer._initialized = true;\n      for (const editorType of editorTypes) {\n        editorType.initialize(l10n);\n      }\n    }\n    uiManager.registerEditorTypes(editorTypes);\n\n    this.#uiManager = uiManager;\n    this.pageIndex = pageIndex;\n    this.div = div;\n    this.#accessibilityManager = accessibilityManager;\n    this.#annotationLayer = annotationLayer;\n    this.viewport = viewport;\n\n    this.#uiManager.addLayer(this);\n  }\n\n  get isEmpty() {\n    return this.#editors.size === 0;\n  }\n\n  /**\n   * Update the toolbar if it's required to reflect the tool currently used.\n   * @param {number} mode\n   */\n  updateToolbar(mode) {\n    this.#uiManager.updateToolbar(mode);\n  }\n\n  /**\n   * The mode has changed: it must be updated.\n   * @param {number} mode\n   */\n  updateMode(mode = this.#uiManager.getMode()) {\n    this.#cleanup();\n    if (mode === AnnotationEditorType.INK) {\n      // We always want to an ink editor ready to draw in.\n      this.addInkEditorIfNeeded(false);\n      this.disableClick();\n    } else {\n      this.enableClick();\n    }\n\n    if (mode !== AnnotationEditorType.NONE) {\n      this.div.classList.toggle(\n        \"freeTextEditing\",\n        mode === AnnotationEditorType.FREETEXT\n      );\n      this.div.classList.toggle(\n        \"inkEditing\",\n        mode === AnnotationEditorType.INK\n      );\n      this.div.classList.toggle(\n        \"stampEditing\",\n        mode === AnnotationEditorType.STAMP\n      );\n      this.div.hidden = false;\n    }\n  }\n\n  addInkEditorIfNeeded(isCommitting) {\n    if (\n      !isCommitting &&\n      this.#uiManager.getMode() !== AnnotationEditorType.INK\n    ) {\n      return;\n    }\n\n    if (!isCommitting) {\n      // We're removing an editor but an empty one can already exist so in this\n      // case we don't need to create a new one.\n      for (const editor of this.#editors.values()) {\n        if (editor.isEmpty()) {\n          editor.setInBackground();\n          return;\n        }\n      }\n    }\n\n    const editor = this.#createAndAddNewEditor(\n      { offsetX: 0, offsetY: 0 },\n      /* isCentered = */ false\n    );\n    editor.setInBackground();\n  }\n\n  /**\n   * Set the editing state.\n   * @param {boolean} isEditing\n   */\n  setEditingState(isEditing) {\n    this.#uiManager.setEditingState(isEditing);\n  }\n\n  /**\n   * Add some commands into the CommandManager (undo/redo stuff).\n   * @param {Object} params\n   */\n  addCommands(params) {\n    this.#uiManager.addCommands(params);\n  }\n\n  /**\n   * Enable pointer events on the main div in order to enable\n   * editor creation.\n   */\n  enable() {\n    this.div.style.pointerEvents = \"auto\";\n    const annotationElementIds = new Set();\n    for (const editor of this.#editors.values()) {\n      editor.enableEditing();\n      if (editor.annotationElementId) {\n        annotationElementIds.add(editor.annotationElementId);\n      }\n    }\n\n    if (!this.#annotationLayer) {\n      return;\n    }\n\n    const editables = this.#annotationLayer.getEditableAnnotations();\n    for (const editable of editables) {\n      // The element must be hidden whatever its state is.\n      editable.hide();\n      if (this.#uiManager.isDeletedAnnotationElement(editable.data.id)) {\n        continue;\n      }\n      if (annotationElementIds.has(editable.data.id)) {\n        continue;\n      }\n      const editor = this.deserialize(editable);\n      if (!editor) {\n        continue;\n      }\n      this.addOrRebuild(editor);\n      editor.enableEditing();\n    }\n  }\n\n  /**\n   * Disable editor creation.\n   */\n  disable() {\n    this.#isDisabling = true;\n    this.div.style.pointerEvents = \"none\";\n    const hiddenAnnotationIds = new Set();\n    for (const editor of this.#editors.values()) {\n      editor.disableEditing();\n      if (!editor.annotationElementId || editor.serialize() !== null) {\n        hiddenAnnotationIds.add(editor.annotationElementId);\n        continue;\n      }\n      this.getEditableAnnotation(editor.annotationElementId)?.show();\n      editor.remove();\n    }\n\n    if (this.#annotationLayer) {\n      // Show the annotations that were hidden in enable().\n      const editables = this.#annotationLayer.getEditableAnnotations();\n      for (const editable of editables) {\n        const { id } = editable.data;\n        if (\n          hiddenAnnotationIds.has(id) ||\n          this.#uiManager.isDeletedAnnotationElement(id)\n        ) {\n          continue;\n        }\n        editable.show();\n      }\n    }\n\n    this.#cleanup();\n    if (this.isEmpty) {\n      this.div.hidden = true;\n    }\n    this.#isDisabling = false;\n  }\n\n  getEditableAnnotation(id) {\n    return this.#annotationLayer?.getEditableAnnotation(id) || null;\n  }\n\n  /**\n   * Set the current editor.\n   * @param {AnnotationEditor} editor\n   */\n  setActiveEditor(editor) {\n    const currentActive = this.#uiManager.getActive();\n    if (currentActive === editor) {\n      return;\n    }\n\n    this.#uiManager.setActiveEditor(editor);\n  }\n\n  enableClick() {\n    this.div.addEventListener(\"pointerdown\", this.#boundPointerdown);\n    this.div.addEventListener(\"pointerup\", this.#boundPointerup);\n  }\n\n  disableClick() {\n    this.div.removeEventListener(\"pointerdown\", this.#boundPointerdown);\n    this.div.removeEventListener(\"pointerup\", this.#boundPointerup);\n  }\n\n  attach(editor) {\n    this.#editors.set(editor.id, editor);\n    const { annotationElementId } = editor;\n    if (\n      annotationElementId &&\n      this.#uiManager.isDeletedAnnotationElement(annotationElementId)\n    ) {\n      this.#uiManager.removeDeletedAnnotationElement(editor);\n    }\n  }\n\n  detach(editor) {\n    this.#editors.delete(editor.id);\n    this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n\n    if (!this.#isDisabling && editor.annotationElementId) {\n      this.#uiManager.addDeletedAnnotationElement(editor);\n    }\n  }\n\n  /**\n   * Remove an editor.\n   * @param {AnnotationEditor} editor\n   */\n  remove(editor) {\n    // Since we can undo a removal we need to keep the\n    // parent property as it is, so don't null it!\n\n    this.detach(editor);\n    this.#uiManager.removeEditor(editor);\n    if (editor.div.contains(document.activeElement)) {\n      setTimeout(() => {\n        // When the div is removed from DOM the focus can move on the\n        // document.body, so we need to move it back to the main container.\n        this.#uiManager.focusMainContainer();\n      }, 0);\n    }\n    editor.div.remove();\n    editor.isAttachedToDOM = false;\n\n    if (!this.#isCleaningUp) {\n      this.addInkEditorIfNeeded(/* isCommitting = */ false);\n    }\n  }\n\n  /**\n   * An editor can have a different parent, for example after having\n   * being dragged and droped from a page to another.\n   * @param {AnnotationEditor} editor\n   */\n  changeParent(editor) {\n    if (editor.parent === this) {\n      return;\n    }\n\n    if (editor.annotationElementId) {\n      this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId);\n      AnnotationEditor.deleteAnnotationElement(editor);\n      editor.annotationElementId = null;\n    }\n\n    this.attach(editor);\n    editor.parent?.detach(editor);\n    editor.setParent(this);\n    if (editor.div && editor.isAttachedToDOM) {\n      editor.div.remove();\n      this.div.append(editor.div);\n    }\n  }\n\n  /**\n   * Add a new editor in the current view.\n   * @param {AnnotationEditor} editor\n   */\n  add(editor) {\n    this.changeParent(editor);\n    this.#uiManager.addEditor(editor);\n    this.attach(editor);\n\n    if (!editor.isAttachedToDOM) {\n      const div = editor.render();\n      this.div.append(div);\n      editor.isAttachedToDOM = true;\n    }\n\n    // The editor will be correctly moved into the DOM (see fixAndSetPosition).\n    editor.fixAndSetPosition();\n    editor.onceAdded();\n    this.#uiManager.addToAnnotationStorage(editor);\n  }\n\n  moveEditorInDOM(editor) {\n    if (!editor.isAttachedToDOM) {\n      return;\n    }\n\n    const { activeElement } = document;\n    if (editor.div.contains(activeElement)) {\n      // When the div is moved in the DOM the focus can move somewhere else,\n      // so we want to be sure that the focus will stay on the editor but we\n      // don't want to call any focus callbacks, hence we disable them and only\n      // re-enable them when the editor has the focus.\n      editor._focusEventsAllowed = false;\n      setTimeout(() => {\n        if (!editor.div.contains(document.activeElement)) {\n          editor.div.addEventListener(\n            \"focusin\",\n            () => {\n              editor._focusEventsAllowed = true;\n            },\n            { once: true }\n          );\n          activeElement.focus();\n        } else {\n          editor._focusEventsAllowed = true;\n        }\n      }, 0);\n    }\n\n    editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(\n      this.div,\n      editor.div,\n      editor.contentDiv,\n      /* isRemovable = */ true\n    );\n  }\n\n  /**\n   * Add or rebuild depending if it has been removed or not.\n   * @param {AnnotationEditor} editor\n   */\n  addOrRebuild(editor) {\n    if (editor.needsToBeRebuilt()) {\n      editor.rebuild();\n    } else {\n      this.add(editor);\n    }\n  }\n\n  /**\n   * Add a new editor and make this addition undoable.\n   * @param {AnnotationEditor} editor\n   */\n  addUndoableEditor(editor) {\n    const cmd = () => editor._uiManager.rebuild(editor);\n    const undo = () => {\n      editor.remove();\n    };\n\n    this.addCommands({ cmd, undo, mustExec: false });\n  }\n\n  /**\n   * Get an id for an editor.\n   * @returns {string}\n   */\n  getNextId() {\n    return this.#uiManager.getId();\n  }\n\n  /**\n   * Create a new editor\n   * @param {Object} params\n   * @returns {AnnotationEditor}\n   */\n  #createNewEditor(params) {\n    switch (this.#uiManager.getMode()) {\n      case AnnotationEditorType.FREETEXT:\n        return new FreeTextEditor(params);\n      case AnnotationEditorType.INK:\n        return new InkEditor(params);\n      case AnnotationEditorType.STAMP:\n        return new StampEditor(params);\n    }\n    return null;\n  }\n\n  /**\n   * Paste some content into a new editor.\n   * @param {number} mode\n   * @param {Object} params\n   */\n  pasteEditor(mode, params) {\n    this.#uiManager.updateToolbar(mode);\n    this.#uiManager.updateMode(mode);\n\n    const { offsetX, offsetY } = this.#getCenterPoint();\n    const id = this.getNextId();\n    const editor = this.#createNewEditor({\n      parent: this,\n      id,\n      x: offsetX,\n      y: offsetY,\n      uiManager: this.#uiManager,\n      isCentered: true,\n      ...params,\n    });\n    if (editor) {\n      this.add(editor);\n    }\n  }\n\n  /**\n   * Create a new editor\n   * @param {Object} data\n   * @returns {AnnotationEditor}\n   */\n  deserialize(data) {\n    switch (data.annotationType ?? data.annotationEditorType) {\n      case AnnotationEditorType.FREETEXT:\n        return FreeTextEditor.deserialize(data, this, this.#uiManager);\n      case AnnotationEditorType.INK:\n        return InkEditor.deserialize(data, this, this.#uiManager);\n      case AnnotationEditorType.STAMP:\n        return StampEditor.deserialize(data, this, this.#uiManager);\n    }\n    return null;\n  }\n\n  /**\n   * Create and add a new editor.\n   * @param {PointerEvent} event\n   * @param {boolean} isCentered\n   * @returns {AnnotationEditor}\n   */\n  #createAndAddNewEditor(event, isCentered) {\n    const id = this.getNextId();\n    const editor = this.#createNewEditor({\n      parent: this,\n      id,\n      x: event.offsetX,\n      y: event.offsetY,\n      uiManager: this.#uiManager,\n      isCentered,\n    });\n    if (editor) {\n      this.add(editor);\n    }\n\n    return editor;\n  }\n\n  #getCenterPoint() {\n    const { x, y, width, height } = this.div.getBoundingClientRect();\n    const tlX = Math.max(0, x);\n    const tlY = Math.max(0, y);\n    const brX = Math.min(window.innerWidth, x + width);\n    const brY = Math.min(window.innerHeight, y + height);\n    const centerX = (tlX + brX) / 2 - x;\n    const centerY = (tlY + brY) / 2 - y;\n    const [offsetX, offsetY] =\n      this.viewport.rotation % 180 === 0\n        ? [centerX, centerY]\n        : [centerY, centerX];\n\n    return { offsetX, offsetY };\n  }\n\n  /**\n   * Create and add a new editor.\n   */\n  addNewEditor() {\n    this.#createAndAddNewEditor(\n      this.#getCenterPoint(),\n      /* isCentered = */ true\n    );\n  }\n\n  /**\n   * Set the last selected editor.\n   * @param {AnnotationEditor} editor\n   */\n  setSelected(editor) {\n    this.#uiManager.setSelected(editor);\n  }\n\n  /**\n   * Add or remove an editor the current selection.\n   * @param {AnnotationEditor} editor\n   */\n  toggleSelected(editor) {\n    this.#uiManager.toggleSelected(editor);\n  }\n\n  /**\n   * Check if the editor is selected.\n   * @param {AnnotationEditor} editor\n   */\n  isSelected(editor) {\n    return this.#uiManager.isSelected(editor);\n  }\n\n  /**\n   * Unselect an editor.\n   * @param {AnnotationEditor} editor\n   */\n  unselect(editor) {\n    this.#uiManager.unselect(editor);\n  }\n\n  /**\n   * Pointerup callback.\n   * @param {PointerEvent} event\n   */\n  pointerup(event) {\n    const { isMac } = FeatureTest.platform;\n    if (event.button !== 0 || (event.ctrlKey && isMac)) {\n      // Don't create an editor on right click.\n      return;\n    }\n\n    if (event.target !== this.div) {\n      return;\n    }\n\n    if (!this.#hadPointerDown) {\n      // It can happen when the user starts a drag inside a text editor\n      // and then releases the mouse button outside of it. In such a case\n      // we don't want to create a new editor, hence we check that a pointerdown\n      // occurred on this div previously.\n      return;\n    }\n    this.#hadPointerDown = false;\n\n    if (!this.#allowClick) {\n      this.#allowClick = true;\n      return;\n    }\n\n    if (this.#uiManager.getMode() === AnnotationEditorType.STAMP) {\n      this.#uiManager.unselectAll();\n      return;\n    }\n\n    this.#createAndAddNewEditor(event, /* isCentered = */ false);\n  }\n\n  /**\n   * Pointerdown callback.\n   * @param {PointerEvent} event\n   */\n  pointerdown(event) {\n    if (this.#hadPointerDown) {\n      // It's possible to have a second pointerdown event before a pointerup one\n      // when the user puts a finger on a touchscreen and then add a second one\n      // to start a pinch-to-zoom gesture.\n      // That said, in case it's possible to have two pointerdown events with\n      // a mouse, we don't want to create a new editor in such a case either.\n      this.#hadPointerDown = false;\n      return;\n    }\n    const { isMac } = FeatureTest.platform;\n    if (event.button !== 0 || (event.ctrlKey && isMac)) {\n      // Do nothing on right click.\n      return;\n    }\n\n    if (event.target !== this.div) {\n      return;\n    }\n\n    this.#hadPointerDown = true;\n\n    const editor = this.#uiManager.getActive();\n    this.#allowClick = !editor || editor.isEmpty();\n  }\n\n  /**\n   *\n   * @param {AnnotationEditor} editor\n   * @param {number} x\n   * @param {number} y\n   * @returns\n   */\n  findNewParent(editor, x, y) {\n    const layer = this.#uiManager.findParent(x, y);\n    if (layer === null || layer === this) {\n      return false;\n    }\n    layer.changeParent(editor);\n    return true;\n  }\n\n  /**\n   * Destroy the main editor.\n   */\n  destroy() {\n    if (this.#uiManager.getActive()?.parent === this) {\n      // We need to commit the current editor before destroying the layer.\n      this.#uiManager.commitOrRemove();\n      this.#uiManager.setActiveEditor(null);\n    }\n\n    for (const editor of this.#editors.values()) {\n      this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n      editor.setParent(null);\n      editor.isAttachedToDOM = false;\n      editor.div.remove();\n    }\n    this.div = null;\n    this.#editors.clear();\n    this.#uiManager.removeLayer(this);\n  }\n\n  #cleanup() {\n    // When we're cleaning up, some editors are removed but we don't want\n    // to add a new one which will induce an addition in this.#editors, hence\n    // an infinite loop.\n    this.#isCleaningUp = true;\n    for (const editor of this.#editors.values()) {\n      if (editor.isEmpty()) {\n        editor.remove();\n      }\n    }\n    this.#isCleaningUp = false;\n  }\n\n  /**\n   * Render the main editor.\n   * @param {RenderEditorLayerOptions} parameters\n   */\n  render({ viewport }) {\n    this.viewport = viewport;\n    setLayerDimensions(this.div, viewport);\n    for (const editor of this.#uiManager.getEditors(this.pageIndex)) {\n      this.add(editor);\n    }\n    this.updateMode();\n  }\n\n  /**\n   * Update the main editor.\n   * @param {RenderEditorLayerOptions} parameters\n   */\n  update({ viewport }) {\n    // Editors have their dimensions/positions in percent so to avoid any\n    // issues (see #15582), we must commit the current one before changing\n    // the viewport.\n    this.#uiManager.commitOrRemove();\n\n    this.viewport = viewport;\n    setLayerDimensions(this.div, { rotation: viewport.rotation });\n    this.updateMode();\n  }\n\n  /**\n   * Get page dimensions.\n   * @returns {Object} dimensions.\n   */\n  get pageDimensions() {\n    const { pageWidth, pageHeight } = this.viewport.rawDims;\n    return [pageWidth, pageHeight];\n  }\n}\n\nexport { AnnotationEditorLayer };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./annotation_editor_layer.js\").AnnotationEditorLayer} AnnotationEditorLayer */\n\nimport {\n  AnnotationEditorParamsType,\n  AnnotationEditorType,\n  assert,\n  LINE_FACTOR,\n  shadow,\n  Util,\n} from \"../../shared/util.js\";\nimport {\n  AnnotationEditorUIManager,\n  bindEvents,\n  KeyboardManager,\n} from \"./tools.js\";\nimport { AnnotationEditor } from \"./editor.js\";\nimport { FreeTextAnnotationElement } from \"../annotation_layer.js\";\n\n/**\n * Basic text editor in order to create a FreeTex annotation.\n */\nclass FreeTextEditor extends AnnotationEditor {\n  #boundEditorDivBlur = this.editorDivBlur.bind(this);\n\n  #boundEditorDivFocus = this.editorDivFocus.bind(this);\n\n  #boundEditorDivInput = this.editorDivInput.bind(this);\n\n  #boundEditorDivKeydown = this.editorDivKeydown.bind(this);\n\n  #color;\n\n  #content = \"\";\n\n  #editorDivId = `${this.id}-editor`;\n\n  #fontSize;\n\n  #initialData = null;\n\n  static _freeTextDefaultContent = \"\";\n\n  static _internalPadding = 0;\n\n  static _defaultColor = null;\n\n  static _defaultFontSize = 10;\n\n  static get _keyboardManager() {\n    const proto = FreeTextEditor.prototype;\n\n    const arrowChecker = self => self.isEmpty();\n\n    const small = AnnotationEditorUIManager.TRANSLATE_SMALL;\n    const big = AnnotationEditorUIManager.TRANSLATE_BIG;\n\n    return shadow(\n      this,\n      \"_keyboardManager\",\n      new KeyboardManager([\n        [\n          // Commit the text in case the user use ctrl+s to save the document.\n          // The event must bubble in order to be caught by the viewer.\n          // See bug 1831574.\n          [\"ctrl+s\", \"mac+meta+s\", \"ctrl+p\", \"mac+meta+p\"],\n          proto.commitOrRemove,\n          { bubbles: true },\n        ],\n        [\n          [\"ctrl+Enter\", \"mac+meta+Enter\", \"Escape\", \"mac+Escape\"],\n          proto.commitOrRemove,\n        ],\n        [\n          [\"ArrowLeft\", \"mac+ArrowLeft\"],\n          proto._translateEmpty,\n          { args: [-small, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"],\n          proto._translateEmpty,\n          { args: [-big, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ArrowRight\", \"mac+ArrowRight\"],\n          proto._translateEmpty,\n          { args: [small, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"],\n          proto._translateEmpty,\n          { args: [big, 0], checker: arrowChecker },\n        ],\n        [\n          [\"ArrowUp\", \"mac+ArrowUp\"],\n          proto._translateEmpty,\n          { args: [0, -small], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"],\n          proto._translateEmpty,\n          { args: [0, -big], checker: arrowChecker },\n        ],\n        [\n          [\"ArrowDown\", \"mac+ArrowDown\"],\n          proto._translateEmpty,\n          { args: [0, small], checker: arrowChecker },\n        ],\n        [\n          [\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"],\n          proto._translateEmpty,\n          { args: [0, big], checker: arrowChecker },\n        ],\n      ])\n    );\n  }\n\n  static _type = \"freetext\";\n\n  constructor(params) {\n    super({ ...params, name: \"freeTextEditor\" });\n    this.#color =\n      params.color ||\n      FreeTextEditor._defaultColor ||\n      AnnotationEditor._defaultLineColor;\n    this.#fontSize = params.fontSize || FreeTextEditor._defaultFontSize;\n  }\n\n  /** @inheritdoc */\n  static initialize(l10n) {\n    AnnotationEditor.initialize(l10n, {\n      strings: [\"free_text2_default_content\", \"editor_free_text2_aria_label\"],\n    });\n    const style = getComputedStyle(document.documentElement);\n\n    if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"TESTING\")) {\n      const lineHeight = parseFloat(\n        style.getPropertyValue(\"--freetext-line-height\")\n      );\n      assert(\n        lineHeight === LINE_FACTOR,\n        \"Update the CSS variable to agree with the constant.\"\n      );\n    }\n\n    this._internalPadding = parseFloat(\n      style.getPropertyValue(\"--freetext-padding\")\n    );\n  }\n\n  /** @inheritdoc */\n  static updateDefaultParams(type, value) {\n    switch (type) {\n      case AnnotationEditorParamsType.FREETEXT_SIZE:\n        FreeTextEditor._defaultFontSize = value;\n        break;\n      case AnnotationEditorParamsType.FREETEXT_COLOR:\n        FreeTextEditor._defaultColor = value;\n        break;\n    }\n  }\n\n  /** @inheritdoc */\n  updateParams(type, value) {\n    switch (type) {\n      case AnnotationEditorParamsType.FREETEXT_SIZE:\n        this.#updateFontSize(value);\n        break;\n      case AnnotationEditorParamsType.FREETEXT_COLOR:\n        this.#updateColor(value);\n        break;\n    }\n  }\n\n  /** @inheritdoc */\n  static get defaultPropertiesToUpdate() {\n    return [\n      [\n        AnnotationEditorParamsType.FREETEXT_SIZE,\n        FreeTextEditor._defaultFontSize,\n      ],\n      [\n        AnnotationEditorParamsType.FREETEXT_COLOR,\n        FreeTextEditor._defaultColor || AnnotationEditor._defaultLineColor,\n      ],\n    ];\n  }\n\n  /** @inheritdoc */\n  get propertiesToUpdate() {\n    return [\n      [AnnotationEditorParamsType.FREETEXT_SIZE, this.#fontSize],\n      [AnnotationEditorParamsType.FREETEXT_COLOR, this.#color],\n    ];\n  }\n\n  /**\n   * Update the font size and make this action as undoable.\n   * @param {number} fontSize\n   */\n  #updateFontSize(fontSize) {\n    const setFontsize = size => {\n      this.editorDiv.style.fontSize = `calc(${size}px * var(--scale-factor))`;\n      this.translate(0, -(size - this.#fontSize) * this.parentScale);\n      this.#fontSize = size;\n      this.#setEditorDimensions();\n    };\n    const savedFontsize = this.#fontSize;\n    this.addCommands({\n      cmd: () => {\n        setFontsize(fontSize);\n      },\n      undo: () => {\n        setFontsize(savedFontsize);\n      },\n      mustExec: true,\n      type: AnnotationEditorParamsType.FREETEXT_SIZE,\n      overwriteIfSameType: true,\n      keepUndo: true,\n    });\n  }\n\n  /**\n   * Update the color and make this action undoable.\n   * @param {string} color\n   */\n  #updateColor(color) {\n    const savedColor = this.#color;\n    this.addCommands({\n      cmd: () => {\n        this.#color = this.editorDiv.style.color = color;\n      },\n      undo: () => {\n        this.#color = this.editorDiv.style.color = savedColor;\n      },\n      mustExec: true,\n      type: AnnotationEditorParamsType.FREETEXT_COLOR,\n      overwriteIfSameType: true,\n      keepUndo: true,\n    });\n  }\n\n  /**\n   * Helper to translate the editor with the keyboard when it's empty.\n   * @param {number} x in page units.\n   * @param {number} y in page units.\n   */\n  _translateEmpty(x, y) {\n    this._uiManager.translateSelectedEditors(x, y, /* noCommit = */ true);\n  }\n\n  /** @inheritdoc */\n  getInitialTranslation() {\n    // The start of the base line is where the user clicked.\n    const scale = this.parentScale;\n    return [\n      -FreeTextEditor._internalPadding * scale,\n      -(FreeTextEditor._internalPadding + this.#fontSize) * scale,\n    ];\n  }\n\n  /** @inheritdoc */\n  rebuild() {\n    if (!this.parent) {\n      return;\n    }\n    super.rebuild();\n    if (this.div === null) {\n      return;\n    }\n\n    if (!this.isAttachedToDOM) {\n      // At some point this editor was removed and we're rebuilting it,\n      // hence we must add it to its parent.\n      this.parent.add(this);\n    }\n  }\n\n  /** @inheritdoc */\n  enableEditMode() {\n    if (this.isInEditMode()) {\n      return;\n    }\n\n    this.parent.setEditingState(false);\n    this.parent.updateToolbar(AnnotationEditorType.FREETEXT);\n    super.enableEditMode();\n    this.overlayDiv.classList.remove(\"enabled\");\n    this.editorDiv.contentEditable = true;\n    this._isDraggable = false;\n    this.div.removeAttribute(\"aria-activedescendant\");\n    this.editorDiv.addEventListener(\"keydown\", this.#boundEditorDivKeydown);\n    this.editorDiv.addEventListener(\"focus\", this.#boundEditorDivFocus);\n    this.editorDiv.addEventListener(\"blur\", this.#boundEditorDivBlur);\n    this.editorDiv.addEventListener(\"input\", this.#boundEditorDivInput);\n  }\n\n  /** @inheritdoc */\n  disableEditMode() {\n    if (!this.isInEditMode()) {\n      return;\n    }\n\n    this.parent.setEditingState(true);\n    super.disableEditMode();\n    this.overlayDiv.classList.add(\"enabled\");\n    this.editorDiv.contentEditable = false;\n    this.div.setAttribute(\"aria-activedescendant\", this.#editorDivId);\n    this._isDraggable = true;\n    this.editorDiv.removeEventListener(\"keydown\", this.#boundEditorDivKeydown);\n    this.editorDiv.removeEventListener(\"focus\", this.#boundEditorDivFocus);\n    this.editorDiv.removeEventListener(\"blur\", this.#boundEditorDivBlur);\n    this.editorDiv.removeEventListener(\"input\", this.#boundEditorDivInput);\n\n    // On Chrome, the focus is given to <body> when contentEditable is set to\n    // false, hence we focus the div.\n    this.div.focus({\n      preventScroll: true /* See issue #15744 */,\n    });\n\n    // In case the blur callback hasn't been called.\n    this.isEditing = false;\n    this.parent.div.classList.add(\"freeTextEditing\");\n  }\n\n  /** @inheritdoc */\n  focusin(event) {\n    if (!this._focusEventsAllowed) {\n      return;\n    }\n    super.focusin(event);\n    if (event.target !== this.editorDiv) {\n      this.editorDiv.focus();\n    }\n  }\n\n  /** @inheritdoc */\n  onceAdded() {\n    if (this.width) {\n      this.#cheatInitialRect();\n      // The editor was created in using ctrl+c.\n      return;\n    }\n    this.enableEditMode();\n    this.editorDiv.focus();\n    if (this._initialOptions?.isCentered) {\n      this.center();\n    }\n    this._initialOptions = null;\n  }\n\n  /** @inheritdoc */\n  isEmpty() {\n    return !this.editorDiv || this.editorDiv.innerText.trim() === \"\";\n  }\n\n  /** @inheritdoc */\n  remove() {\n    this.isEditing = false;\n    if (this.parent) {\n      this.parent.setEditingState(true);\n      this.parent.div.classList.add(\"freeTextEditing\");\n    }\n    super.remove();\n  }\n\n  /**\n   * Extract the text from this editor.\n   * @returns {string}\n   */\n  #extractText() {\n    const divs = this.editorDiv.getElementsByTagName(\"div\");\n    if (divs.length === 0) {\n      return this.editorDiv.innerText;\n    }\n    const buffer = [];\n    for (const div of divs) {\n      buffer.push(div.innerText.replace(/\\r\\n?|\\n/, \"\"));\n    }\n    return buffer.join(\"\\n\");\n  }\n\n  #setEditorDimensions() {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n\n    let rect;\n    if (this.isAttachedToDOM) {\n      rect = this.div.getBoundingClientRect();\n    } else {\n      // This editor isn't on screen but we need to get its dimensions, so\n      // we just insert it in the DOM, get its bounding box and then remove it.\n      const { currentLayer, div } = this;\n      const savedDisplay = div.style.display;\n      div.style.display = \"hidden\";\n      currentLayer.div.append(this.div);\n      rect = div.getBoundingClientRect();\n      div.remove();\n      div.style.display = savedDisplay;\n    }\n\n    // The dimensions are relative to the rotation of the page, hence we need to\n    // take that into account (see issue #16636).\n    if (this.rotation % 180 === this.parentRotation % 180) {\n      this.width = rect.width / parentWidth;\n      this.height = rect.height / parentHeight;\n    } else {\n      this.width = rect.height / parentWidth;\n      this.height = rect.width / parentHeight;\n    }\n    this.fixAndSetPosition();\n  }\n\n  /**\n   * Commit the content we have in this editor.\n   * @returns {undefined}\n   */\n  commit() {\n    if (!this.isInEditMode()) {\n      return;\n    }\n\n    super.commit();\n    this.disableEditMode();\n    const savedText = this.#content;\n    const newText = (this.#content = this.#extractText().trimEnd());\n    if (savedText === newText) {\n      return;\n    }\n\n    const setText = text => {\n      this.#content = text;\n      if (!text) {\n        this.remove();\n        return;\n      }\n      this.#setContent();\n      this._uiManager.rebuild(this);\n      this.#setEditorDimensions();\n    };\n    this.addCommands({\n      cmd: () => {\n        setText(newText);\n      },\n      undo: () => {\n        setText(savedText);\n      },\n      mustExec: false,\n    });\n    this.#setEditorDimensions();\n  }\n\n  /** @inheritdoc */\n  shouldGetKeyboardEvents() {\n    return this.isInEditMode();\n  }\n\n  /** @inheritdoc */\n  enterInEditMode() {\n    this.enableEditMode();\n    this.editorDiv.focus();\n  }\n\n  /**\n   * ondblclick callback.\n   * @param {MouseEvent} event\n   */\n  dblclick(event) {\n    this.enterInEditMode();\n  }\n\n  /**\n   * onkeydown callback.\n   * @param {KeyboardEvent} event\n   */\n  keydown(event) {\n    if (event.target === this.div && event.key === \"Enter\") {\n      this.enterInEditMode();\n      // Avoid to add an unwanted new line.\n      event.preventDefault();\n    }\n  }\n\n  editorDivKeydown(event) {\n    FreeTextEditor._keyboardManager.exec(this, event);\n  }\n\n  editorDivFocus(event) {\n    this.isEditing = true;\n  }\n\n  editorDivBlur(event) {\n    this.isEditing = false;\n  }\n\n  editorDivInput(event) {\n    this.parent.div.classList.toggle(\"freeTextEditing\", this.isEmpty());\n  }\n\n  /** @inheritdoc */\n  disableEditing() {\n    this.editorDiv.setAttribute(\"role\", \"comment\");\n    this.editorDiv.removeAttribute(\"aria-multiline\");\n  }\n\n  /** @inheritdoc */\n  enableEditing() {\n    this.editorDiv.setAttribute(\"role\", \"textbox\");\n    this.editorDiv.setAttribute(\"aria-multiline\", true);\n  }\n\n  /** @inheritdoc */\n  render() {\n    if (this.div) {\n      return this.div;\n    }\n\n    let baseX, baseY;\n    if (this.width) {\n      baseX = this.x;\n      baseY = this.y;\n    }\n\n    super.render();\n    this.editorDiv = document.createElement(\"div\");\n    this.editorDiv.className = \"internal\";\n\n    this.editorDiv.setAttribute(\"id\", this.#editorDivId);\n    this.enableEditing();\n\n    AnnotationEditor._l10nPromise\n      .get(\"editor_free_text2_aria_label\")\n      .then(msg => this.editorDiv?.setAttribute(\"aria-label\", msg));\n\n    AnnotationEditor._l10nPromise\n      .get(\"free_text2_default_content\")\n      .then(msg => this.editorDiv?.setAttribute(\"default-content\", msg));\n    this.editorDiv.contentEditable = true;\n\n    const { style } = this.editorDiv;\n    style.fontSize = `calc(${this.#fontSize}px * var(--scale-factor))`;\n    style.color = this.#color;\n\n    this.div.append(this.editorDiv);\n\n    this.overlayDiv = document.createElement(\"div\");\n    this.overlayDiv.classList.add(\"overlay\", \"enabled\");\n    this.div.append(this.overlayDiv);\n\n    // TODO: implement paste callback.\n    // The goal is to sanitize and have something suitable for this\n    // editor.\n    bindEvents(this, this.div, [\"dblclick\", \"keydown\"]);\n\n    if (this.width) {\n      // This editor was created in using copy (ctrl+c).\n      const [parentWidth, parentHeight] = this.parentDimensions;\n      if (this.annotationElementId) {\n        // This stuff is hard to test: if something is changed here, please\n        // test with the following PDF file:\n        //  - freetexts.pdf\n        //  - rotated_freetexts.pdf\n        // Only small variations between the original annotation and its editor\n        // are allowed.\n\n        // position is the position of the first glyph in the annotation\n        // and it's relative to its container.\n        const { position } = this.#initialData;\n        let [tx, ty] = this.getInitialTranslation();\n        [tx, ty] = this.pageTranslationToScreen(tx, ty);\n        const [pageWidth, pageHeight] = this.pageDimensions;\n        const [pageX, pageY] = this.pageTranslation;\n        let posX, posY;\n        switch (this.rotation) {\n          case 0:\n            posX = baseX + (position[0] - pageX) / pageWidth;\n            posY = baseY + this.height - (position[1] - pageY) / pageHeight;\n            break;\n          case 90:\n            posX = baseX + (position[0] - pageX) / pageWidth;\n            posY = baseY - (position[1] - pageY) / pageHeight;\n            [tx, ty] = [ty, -tx];\n            break;\n          case 180:\n            posX = baseX - this.width + (position[0] - pageX) / pageWidth;\n            posY = baseY - (position[1] - pageY) / pageHeight;\n            [tx, ty] = [-tx, -ty];\n            break;\n          case 270:\n            posX =\n              baseX +\n              (position[0] - pageX - this.height * pageHeight) / pageWidth;\n            posY =\n              baseY +\n              (position[1] - pageY - this.width * pageWidth) / pageHeight;\n            [tx, ty] = [-ty, tx];\n            break;\n        }\n        this.setAt(posX * parentWidth, posY * parentHeight, tx, ty);\n      } else {\n        this.setAt(\n          baseX * parentWidth,\n          baseY * parentHeight,\n          this.width * parentWidth,\n          this.height * parentHeight\n        );\n      }\n\n      this.#setContent();\n      this._isDraggable = true;\n      this.editorDiv.contentEditable = false;\n    } else {\n      this._isDraggable = false;\n      this.editorDiv.contentEditable = true;\n    }\n\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n      this.div.setAttribute(\"annotation-id\", this.annotationElementId);\n    }\n\n    return this.div;\n  }\n\n  #setContent() {\n    this.editorDiv.replaceChildren();\n    if (!this.#content) {\n      return;\n    }\n    for (const line of this.#content.split(\"\\n\")) {\n      const div = document.createElement(\"div\");\n      div.append(\n        line ? document.createTextNode(line) : document.createElement(\"br\")\n      );\n      this.editorDiv.append(div);\n    }\n  }\n\n  get contentDiv() {\n    return this.editorDiv;\n  }\n\n  /** @inheritdoc */\n  static deserialize(data, parent, uiManager) {\n    let initialData = null;\n    if (data instanceof FreeTextAnnotationElement) {\n      const {\n        data: {\n          defaultAppearanceData: { fontSize, fontColor },\n          rect,\n          rotation,\n          id,\n        },\n        textContent,\n        textPosition,\n        parent: {\n          page: { pageNumber },\n        },\n      } = data;\n      // textContent is supposed to be an array of strings containing each line\n      // of text. However, it can be null or empty.\n      if (!textContent || textContent.length === 0) {\n        // Empty annotation.\n        return null;\n      }\n      initialData = data = {\n        annotationType: AnnotationEditorType.FREETEXT,\n        color: Array.from(fontColor),\n        fontSize,\n        value: textContent.join(\"\\n\"),\n        position: textPosition,\n        pageIndex: pageNumber - 1,\n        rect,\n        rotation,\n        id,\n        deleted: false,\n      };\n    }\n    const editor = super.deserialize(data, parent, uiManager);\n\n    editor.#fontSize = data.fontSize;\n    editor.#color = Util.makeHexColor(...data.color);\n    editor.#content = data.value;\n    editor.annotationElementId = data.id || null;\n    editor.#initialData = initialData;\n\n    return editor;\n  }\n\n  /** @inheritdoc */\n  serialize(isForCopying = false) {\n    if (this.isEmpty()) {\n      return null;\n    }\n\n    if (this.deleted) {\n      return {\n        pageIndex: this.pageIndex,\n        id: this.annotationElementId,\n        deleted: true,\n      };\n    }\n\n    const padding = FreeTextEditor._internalPadding * this.parentScale;\n    const rect = this.getRect(padding, padding);\n    const color = AnnotationEditor._colorManager.convert(\n      this.isAttachedToDOM\n        ? getComputedStyle(this.editorDiv).color\n        : this.#color\n    );\n\n    const serialized = {\n      annotationType: AnnotationEditorType.FREETEXT,\n      color,\n      fontSize: this.#fontSize,\n      value: this.#content,\n      pageIndex: this.pageIndex,\n      rect,\n      rotation: this.rotation,\n      structTreeParentId: this._structTreeParentId,\n    };\n\n    if (isForCopying) {\n      // Don't add the id when copying because the pasted editor mustn't be\n      // linked to an existing annotation.\n      return serialized;\n    }\n\n    if (this.annotationElementId && !this.#hasElementChanged(serialized)) {\n      return null;\n    }\n\n    serialized.id = this.annotationElementId;\n\n    return serialized;\n  }\n\n  #hasElementChanged(serialized) {\n    const { value, fontSize, color, rect, pageIndex } = this.#initialData;\n\n    return (\n      serialized.value !== value ||\n      serialized.fontSize !== fontSize ||\n      serialized.rect.some((x, i) => Math.abs(x - rect[i]) >= 1) ||\n      serialized.color.some((c, i) => c !== color[i]) ||\n      serialized.pageIndex !== pageIndex\n    );\n  }\n\n  #cheatInitialRect(delayed = false) {\n    // The annotation has a rect but the editor has an other one.\n    // When we want to know if the annotation has changed (e.g. has been moved)\n    // we must compare the editor initial rect with the current one.\n    // So this method is a hack to have a way to compare the real rects.\n    if (!this.annotationElementId) {\n      return;\n    }\n\n    this.#setEditorDimensions();\n    if (!delayed && (this.width === 0 || this.height === 0)) {\n      setTimeout(() => this.#cheatInitialRect(/* delayed = */ true), 0);\n      return;\n    }\n\n    const padding = FreeTextEditor._internalPadding * this.parentScale;\n    this.#initialData.rect = this.getRect(padding, padding);\n  }\n}\n\nexport { FreeTextEditor };\n","/* Copyright 2014 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @typedef {import(\"./api\").PDFPageProxy} PDFPageProxy */\n/** @typedef {import(\"./display_utils\").PageViewport} PageViewport */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"../../web/text_accessibility.js\").TextAccessibilityManager} TextAccessibilityManager */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"../../web/interfaces\").IDownloadManager} IDownloadManager */\n/** @typedef {import(\"../../web/interfaces\").IPDFLinkService} IPDFLinkService */\n\nimport {\n  AnnotationBorderStyleType,\n  AnnotationEditorType,\n  AnnotationPrefix,\n  AnnotationType,\n  FeatureTest,\n  LINE_FACTOR,\n  shadow,\n  unreachable,\n  Util,\n  warn,\n} from \"../shared/util.js\";\nimport {\n  DOMSVGFactory,\n  getFilenameFromUrl,\n  PDFDateString,\n  setLayerDimensions,\n} from \"./display_utils.js\";\nimport { AnnotationStorage } from \"./annotation_storage.js\";\nimport { ColorConverters } from \"../shared/scripting_utils.js\";\nimport { NullL10n } from \"display-l10n_utils\";\nimport { XfaLayer } from \"./xfa_layer.js\";\n\nconst DEFAULT_TAB_INDEX = 1000;\nconst DEFAULT_FONT_SIZE = 9;\nconst GetElementsByNameSet = new WeakSet();\n\nfunction getRectDims(rect) {\n  return {\n    width: rect[2] - rect[0],\n    height: rect[3] - rect[1],\n  };\n}\n\n/**\n * @typedef {Object} AnnotationElementParameters\n * @property {Object} data\n * @property {HTMLDivElement} layer\n * @property {IPDFLinkService} linkService\n * @property {IDownloadManager} downloadManager\n * @property {AnnotationStorage} [annotationStorage]\n * @property {string} [imageResourcesPath] - Path for image resources, mainly\n *   for annotation icons. Include trailing slash.\n * @property {boolean} renderForms\n * @property {Object} svgFactory\n * @property {boolean} [enableScripting]\n * @property {boolean} [hasJSActions]\n * @property {Object} [fieldObjects]\n */\n\nclass AnnotationElementFactory {\n  /**\n   * @param {AnnotationElementParameters} parameters\n   * @returns {AnnotationElement}\n   */\n  static create(parameters) {\n    const subtype = parameters.data.annotationType;\n\n    switch (subtype) {\n      case AnnotationType.LINK:\n        return new LinkAnnotationElement(parameters);\n\n      case AnnotationType.TEXT:\n        return new TextAnnotationElement(parameters);\n\n      case AnnotationType.WIDGET:\n        const fieldType = parameters.data.fieldType;\n\n        switch (fieldType) {\n          case \"Tx\":\n            return new TextWidgetAnnotationElement(parameters);\n          case \"Btn\":\n            if (parameters.data.radioButton) {\n              return new RadioButtonWidgetAnnotationElement(parameters);\n            } else if (parameters.data.checkBox) {\n              return new CheckboxWidgetAnnotationElement(parameters);\n            }\n            return new PushButtonWidgetAnnotationElement(parameters);\n          case \"Ch\":\n            return new ChoiceWidgetAnnotationElement(parameters);\n          case \"Sig\":\n            return new SignatureWidgetAnnotationElement(parameters);\n        }\n        return new WidgetAnnotationElement(parameters);\n\n      case AnnotationType.POPUP:\n        return new PopupAnnotationElement(parameters);\n\n      case AnnotationType.FREETEXT:\n        return new FreeTextAnnotationElement(parameters);\n\n      case AnnotationType.LINE:\n        return new LineAnnotationElement(parameters);\n\n      case AnnotationType.SQUARE:\n        return new SquareAnnotationElement(parameters);\n\n      case AnnotationType.CIRCLE:\n        return new CircleAnnotationElement(parameters);\n\n      case AnnotationType.POLYLINE:\n        return new PolylineAnnotationElement(parameters);\n\n      case AnnotationType.CARET:\n        return new CaretAnnotationElement(parameters);\n\n      case AnnotationType.INK:\n        return new InkAnnotationElement(parameters);\n\n      case AnnotationType.POLYGON:\n        return new PolygonAnnotationElement(parameters);\n\n      case AnnotationType.HIGHLIGHT:\n        return new HighlightAnnotationElement(parameters);\n\n      case AnnotationType.UNDERLINE:\n        return new UnderlineAnnotationElement(parameters);\n\n      case AnnotationType.SQUIGGLY:\n        return new SquigglyAnnotationElement(parameters);\n\n      case AnnotationType.STRIKEOUT:\n        return new StrikeOutAnnotationElement(parameters);\n\n      case AnnotationType.STAMP:\n        return new StampAnnotationElement(parameters);\n\n      case AnnotationType.FILEATTACHMENT:\n        return new FileAttachmentAnnotationElement(parameters);\n\n      default:\n        return new AnnotationElement(parameters);\n    }\n  }\n}\n\nclass AnnotationElement {\n  #hasBorder = false;\n\n  constructor(\n    parameters,\n    {\n      isRenderable = false,\n      ignoreBorder = false,\n      createQuadrilaterals = false,\n    } = {}\n  ) {\n    this.isRenderable = isRenderable;\n    this.data = parameters.data;\n    this.layer = parameters.layer;\n    this.linkService = parameters.linkService;\n    this.downloadManager = parameters.downloadManager;\n    this.imageResourcesPath = parameters.imageResourcesPath;\n    this.renderForms = parameters.renderForms;\n    this.svgFactory = parameters.svgFactory;\n    this.annotationStorage = parameters.annotationStorage;\n    this.enableScripting = parameters.enableScripting;\n    this.hasJSActions = parameters.hasJSActions;\n    this._fieldObjects = parameters.fieldObjects;\n    this.parent = parameters.parent;\n\n    if (isRenderable) {\n      this.container = this._createContainer(ignoreBorder);\n    }\n    if (createQuadrilaterals) {\n      this._createQuadrilaterals();\n    }\n  }\n\n  static _hasPopupData({ titleObj, contentsObj, richText }) {\n    return !!(titleObj?.str || contentsObj?.str || richText?.str);\n  }\n\n  get hasPopupData() {\n    return AnnotationElement._hasPopupData(this.data);\n  }\n\n  /**\n   * Create an empty container for the annotation's HTML element.\n   *\n   * @private\n   * @param {boolean} ignoreBorder\n   * @memberof AnnotationElement\n   * @returns {HTMLElement} A section element.\n   */\n  _createContainer(ignoreBorder) {\n    const {\n      data,\n      parent: { page, viewport },\n    } = this;\n\n    const container = document.createElement(\"section\");\n    container.setAttribute(\"data-annotation-id\", data.id);\n    if (!(this instanceof WidgetAnnotationElement)) {\n      container.tabIndex = DEFAULT_TAB_INDEX;\n    }\n\n    // The accessibility manager will move the annotation in the DOM in\n    // order to match the visual ordering.\n    // But if an annotation is above an other one, then we must draw it\n    // after the other one whatever the order is in the DOM, hence the\n    // use of the z-index.\n    container.style.zIndex = this.parent.zIndex++;\n\n    if (this.data.popupRef) {\n      container.setAttribute(\"aria-haspopup\", \"dialog\");\n    }\n\n    if (data.noRotate) {\n      container.classList.add(\"norotate\");\n    }\n\n    const { pageWidth, pageHeight, pageX, pageY } = viewport.rawDims;\n\n    if (!data.rect || this instanceof PopupAnnotationElement) {\n      const { rotation } = data;\n      if (!data.hasOwnCanvas && rotation !== 0) {\n        this.setRotation(rotation, container);\n      }\n      return container;\n    }\n\n    const { width, height } = getRectDims(data.rect);\n\n    // Do *not* modify `data.rect`, since that will corrupt the annotation\n    // position on subsequent calls to `_createContainer` (see issue 6804).\n    const rect = Util.normalizeRect([\n      data.rect[0],\n      page.view[3] - data.rect[1] + page.view[1],\n      data.rect[2],\n      page.view[3] - data.rect[3] + page.view[1],\n    ]);\n\n    if (!ignoreBorder && data.borderStyle.width > 0) {\n      container.style.borderWidth = `${data.borderStyle.width}px`;\n\n      const horizontalRadius = data.borderStyle.horizontalCornerRadius;\n      const verticalRadius = data.borderStyle.verticalCornerRadius;\n      if (horizontalRadius > 0 || verticalRadius > 0) {\n        const radius = `calc(${horizontalRadius}px * var(--scale-factor)) / calc(${verticalRadius}px * var(--scale-factor))`;\n        container.style.borderRadius = radius;\n      } else if (this instanceof RadioButtonWidgetAnnotationElement) {\n        const radius = `calc(${width}px * var(--scale-factor)) / calc(${height}px * var(--scale-factor))`;\n        container.style.borderRadius = radius;\n      }\n\n      switch (data.borderStyle.style) {\n        case AnnotationBorderStyleType.SOLID:\n          container.style.borderStyle = \"solid\";\n          break;\n\n        case AnnotationBorderStyleType.DASHED:\n          container.style.borderStyle = \"dashed\";\n          break;\n\n        case AnnotationBorderStyleType.BEVELED:\n          warn(\"Unimplemented border style: beveled\");\n          break;\n\n        case AnnotationBorderStyleType.INSET:\n          warn(\"Unimplemented border style: inset\");\n          break;\n\n        case AnnotationBorderStyleType.UNDERLINE:\n          container.style.borderBottomStyle = \"solid\";\n          break;\n\n        default:\n          break;\n      }\n\n      const borderColor = data.borderColor || null;\n      if (borderColor) {\n        this.#hasBorder = true;\n        container.style.borderColor = Util.makeHexColor(\n          borderColor[0] | 0,\n          borderColor[1] | 0,\n          borderColor[2] | 0\n        );\n      } else {\n        // Transparent (invisible) border, so do not draw it at all.\n        container.style.borderWidth = 0;\n      }\n    }\n\n    container.style.left = `${(100 * (rect[0] - pageX)) / pageWidth}%`;\n    container.style.top = `${(100 * (rect[1] - pageY)) / pageHeight}%`;\n\n    const { rotation } = data;\n    if (data.hasOwnCanvas || rotation === 0) {\n      container.style.width = `${(100 * width) / pageWidth}%`;\n      container.style.height = `${(100 * height) / pageHeight}%`;\n    } else {\n      this.setRotation(rotation, container);\n    }\n\n    return container;\n  }\n\n  setRotation(angle, container = this.container) {\n    if (!this.data.rect) {\n      return;\n    }\n    const { pageWidth, pageHeight } = this.parent.viewport.rawDims;\n    const { width, height } = getRectDims(this.data.rect);\n\n    let elementWidth, elementHeight;\n    if (angle % 180 === 0) {\n      elementWidth = (100 * width) / pageWidth;\n      elementHeight = (100 * height) / pageHeight;\n    } else {\n      elementWidth = (100 * height) / pageWidth;\n      elementHeight = (100 * width) / pageHeight;\n    }\n\n    container.style.width = `${elementWidth}%`;\n    container.style.height = `${elementHeight}%`;\n\n    container.setAttribute(\"data-main-rotation\", (360 - angle) % 360);\n  }\n\n  get _commonActions() {\n    const setColor = (jsName, styleName, event) => {\n      const color = event.detail[jsName];\n      const colorType = color[0];\n      const colorArray = color.slice(1);\n      event.target.style[styleName] =\n        ColorConverters[`${colorType}_HTML`](colorArray);\n      this.annotationStorage.setValue(this.data.id, {\n        [styleName]: ColorConverters[`${colorType}_rgb`](colorArray),\n      });\n    };\n\n    return shadow(this, \"_commonActions\", {\n      display: event => {\n        const { display } = event.detail;\n        // See scripting/constants.js for the values of `Display`.\n        // 0 = visible, 1 = hidden, 2 = noPrint and 3 = noView.\n        const hidden = display % 2 === 1;\n        this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n        this.annotationStorage.setValue(this.data.id, {\n          noView: hidden,\n          noPrint: display === 1 || display === 2,\n        });\n      },\n      print: event => {\n        this.annotationStorage.setValue(this.data.id, {\n          noPrint: !event.detail.print,\n        });\n      },\n      hidden: event => {\n        const { hidden } = event.detail;\n        this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n        this.annotationStorage.setValue(this.data.id, {\n          noPrint: hidden,\n          noView: hidden,\n        });\n      },\n      focus: event => {\n        setTimeout(() => event.target.focus({ preventScroll: false }), 0);\n      },\n      userName: event => {\n        // tooltip\n        event.target.title = event.detail.userName;\n      },\n      readonly: event => {\n        event.target.disabled = event.detail.readonly;\n      },\n      required: event => {\n        this._setRequired(event.target, event.detail.required);\n      },\n      bgColor: event => {\n        setColor(\"bgColor\", \"backgroundColor\", event);\n      },\n      fillColor: event => {\n        setColor(\"fillColor\", \"backgroundColor\", event);\n      },\n      fgColor: event => {\n        setColor(\"fgColor\", \"color\", event);\n      },\n      textColor: event => {\n        setColor(\"textColor\", \"color\", event);\n      },\n      borderColor: event => {\n        setColor(\"borderColor\", \"borderColor\", event);\n      },\n      strokeColor: event => {\n        setColor(\"strokeColor\", \"borderColor\", event);\n      },\n      rotation: event => {\n        const angle = event.detail.rotation;\n        this.setRotation(angle);\n        this.annotationStorage.setValue(this.data.id, {\n          rotation: angle,\n        });\n      },\n    });\n  }\n\n  _dispatchEventFromSandbox(actions, jsEvent) {\n    const commonActions = this._commonActions;\n    for (const name of Object.keys(jsEvent.detail)) {\n      const action = actions[name] || commonActions[name];\n      action?.(jsEvent);\n    }\n  }\n\n  _setDefaultPropertiesFromJS(element) {\n    if (!this.enableScripting) {\n      return;\n    }\n\n    // Some properties may have been updated thanks to JS.\n    const storedData = this.annotationStorage.getRawValue(this.data.id);\n    if (!storedData) {\n      return;\n    }\n\n    const commonActions = this._commonActions;\n    for (const [actionName, detail] of Object.entries(storedData)) {\n      const action = commonActions[actionName];\n      if (action) {\n        const eventProxy = {\n          detail: {\n            [actionName]: detail,\n          },\n          target: element,\n        };\n        action(eventProxy);\n        // The action has been consumed: no need to keep it.\n        delete storedData[actionName];\n      }\n    }\n  }\n\n  /**\n   * Create quadrilaterals from the annotation's quadpoints.\n   *\n   * @private\n   * @memberof AnnotationElement\n   */\n  _createQuadrilaterals() {\n    if (!this.container) {\n      return;\n    }\n    const { quadPoints } = this.data;\n    if (!quadPoints) {\n      return;\n    }\n\n    const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect;\n\n    if (quadPoints.length === 1) {\n      const [, { x: trX, y: trY }, { x: blX, y: blY }] = quadPoints[0];\n      if (\n        rectTrX === trX &&\n        rectTrY === trY &&\n        rectBlX === blX &&\n        rectBlY === blY\n      ) {\n        // The quadpoints cover the whole annotation rectangle, so no need to\n        // create a quadrilateral.\n        return;\n      }\n    }\n\n    const { style } = this.container;\n    let svgBuffer;\n    if (this.#hasBorder) {\n      const { borderColor, borderWidth } = style;\n      style.borderWidth = 0;\n      svgBuffer = [\n        \"url('data:image/svg+xml;utf8,\",\n        `<svg xmlns=\"http://www.w3.org/2000/svg\"`,\n        ` preserveAspectRatio=\"none\" viewBox=\"0 0 1 1\">`,\n        `<g fill=\"transparent\" stroke=\"${borderColor}\" stroke-width=\"${borderWidth}\">`,\n      ];\n      this.container.classList.add(\"hasBorder\");\n    }\n\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n      this.container.classList.add(\"hasClipPath\");\n    }\n\n    const width = rectTrX - rectBlX;\n    const height = rectTrY - rectBlY;\n\n    const { svgFactory } = this;\n    const svg = svgFactory.createElement(\"svg\");\n    svg.classList.add(\"quadrilateralsContainer\");\n    svg.setAttribute(\"width\", 0);\n    svg.setAttribute(\"height\", 0);\n    const defs = svgFactory.createElement(\"defs\");\n    svg.append(defs);\n    const clipPath = svgFactory.createElement(\"clipPath\");\n    const id = `clippath_${this.data.id}`;\n    clipPath.setAttribute(\"id\", id);\n    clipPath.setAttribute(\"clipPathUnits\", \"objectBoundingBox\");\n    defs.append(clipPath);\n\n    for (const [, { x: trX, y: trY }, { x: blX, y: blY }] of quadPoints) {\n      const rect = svgFactory.createElement(\"rect\");\n      const x = (blX - rectBlX) / width;\n      const y = (rectTrY - trY) / height;\n      const rectWidth = (trX - blX) / width;\n      const rectHeight = (trY - blY) / height;\n      rect.setAttribute(\"x\", x);\n      rect.setAttribute(\"y\", y);\n      rect.setAttribute(\"width\", rectWidth);\n      rect.setAttribute(\"height\", rectHeight);\n      clipPath.append(rect);\n      svgBuffer?.push(\n        `<rect vector-effect=\"non-scaling-stroke\" x=\"${x}\" y=\"${y}\" width=\"${rectWidth}\" height=\"${rectHeight}\"/>`\n      );\n    }\n\n    if (this.#hasBorder) {\n      svgBuffer.push(`</g></svg>')`);\n      style.backgroundImage = svgBuffer.join(\"\");\n    }\n\n    this.container.append(svg);\n    this.container.style.clipPath = `url(#${id})`;\n  }\n\n  /**\n   * Create a popup for the annotation's HTML element. This is used for\n   * annotations that do not have a Popup entry in the dictionary, but\n   * are of a type that works with popups (such as Highlight annotations).\n   *\n   * @private\n   * @memberof AnnotationElement\n   */\n  _createPopup() {\n    const { container, data } = this;\n    container.setAttribute(\"aria-haspopup\", \"dialog\");\n\n    const popup = new PopupAnnotationElement({\n      data: {\n        color: data.color,\n        titleObj: data.titleObj,\n        modificationDate: data.modificationDate,\n        contentsObj: data.contentsObj,\n        richText: data.richText,\n        parentRect: data.rect,\n        borderStyle: 0,\n        id: `popup_${data.id}`,\n        rotation: data.rotation,\n      },\n      parent: this.parent,\n      elements: [this],\n    });\n    this.parent.div.append(popup.render());\n  }\n\n  /**\n   * Render the annotation's HTML element(s).\n   *\n   * @public\n   * @memberof AnnotationElement\n   */\n  render() {\n    unreachable(\"Abstract method `AnnotationElement.render` called\");\n  }\n\n  /**\n   * @private\n   * @returns {Array}\n   */\n  _getElementsByName(name, skipId = null) {\n    const fields = [];\n\n    if (this._fieldObjects) {\n      const fieldObj = this._fieldObjects[name];\n      if (fieldObj) {\n        for (const { page, id, exportValues } of fieldObj) {\n          if (page === -1) {\n            continue;\n          }\n          if (id === skipId) {\n            continue;\n          }\n          const exportValue =\n            typeof exportValues === \"string\" ? exportValues : null;\n\n          const domElement = document.querySelector(\n            `[data-element-id=\"${id}\"]`\n          );\n          if (domElement && !GetElementsByNameSet.has(domElement)) {\n            warn(`_getElementsByName - element not allowed: ${id}`);\n            continue;\n          }\n          fields.push({ id, exportValue, domElement });\n        }\n      }\n      return fields;\n    }\n    // Fallback to a regular DOM lookup, to ensure that the standalone\n    // viewer components won't break.\n    for (const domElement of document.getElementsByName(name)) {\n      const { exportValue } = domElement;\n      const id = domElement.getAttribute(\"data-element-id\");\n      if (id === skipId) {\n        continue;\n      }\n      if (!GetElementsByNameSet.has(domElement)) {\n        continue;\n      }\n      fields.push({ id, exportValue, domElement });\n    }\n    return fields;\n  }\n\n  show() {\n    if (this.container) {\n      this.container.hidden = false;\n    }\n    this.popup?.maybeShow();\n  }\n\n  hide() {\n    if (this.container) {\n      this.container.hidden = true;\n    }\n    this.popup?.forceHide();\n  }\n\n  /**\n   * Get the HTML element(s) which can trigger a popup when clicked or hovered.\n   *\n   * @public\n   * @memberof AnnotationElement\n   * @returns {Array<HTMLElement>|HTMLElement} An array of elements or an\n   *          element.\n   */\n  getElementsToTriggerPopup() {\n    return this.container;\n  }\n\n  addHighlightArea() {\n    const triggers = this.getElementsToTriggerPopup();\n    if (Array.isArray(triggers)) {\n      for (const element of triggers) {\n        element.classList.add(\"highlightArea\");\n      }\n    } else {\n      triggers.classList.add(\"highlightArea\");\n    }\n  }\n\n  _editOnDoubleClick() {\n    const {\n      annotationEditorType: mode,\n      data: { id: editId },\n    } = this;\n    this.container.addEventListener(\"dblclick\", () => {\n      this.linkService.eventBus?.dispatch(\"switchannotationeditormode\", {\n        source: this,\n        mode,\n        editId,\n      });\n    });\n  }\n}\n\nclass LinkAnnotationElement extends AnnotationElement {\n  constructor(parameters, options = null) {\n    super(parameters, {\n      isRenderable: true,\n      ignoreBorder: !!options?.ignoreBorder,\n      createQuadrilaterals: true,\n    });\n    this.isTooltipOnly = parameters.data.isTooltipOnly;\n  }\n\n  render() {\n    const { data, linkService } = this;\n    const link = document.createElement(\"a\");\n    link.setAttribute(\"data-element-id\", data.id);\n    let isBound = false;\n\n    if (data.url) {\n      linkService.addLinkAttributes(link, data.url, data.newWindow);\n      isBound = true;\n    } else if (data.action) {\n      this._bindNamedAction(link, data.action);\n      isBound = true;\n    } else if (data.attachment) {\n      this._bindAttachment(link, data.attachment);\n      isBound = true;\n    } else if (data.setOCGState) {\n      this.#bindSetOCGState(link, data.setOCGState);\n      isBound = true;\n    } else if (data.dest) {\n      this._bindLink(link, data.dest);\n      isBound = true;\n    } else {\n      if (\n        data.actions &&\n        (data.actions.Action ||\n          data.actions[\"Mouse Up\"] ||\n          data.actions[\"Mouse Down\"]) &&\n        this.enableScripting &&\n        this.hasJSActions\n      ) {\n        this._bindJSAction(link, data);\n        isBound = true;\n      }\n\n      if (data.resetForm) {\n        this._bindResetFormAction(link, data.resetForm);\n        isBound = true;\n      } else if (this.isTooltipOnly && !isBound) {\n        this._bindLink(link, \"\");\n        isBound = true;\n      }\n    }\n\n    this.container.classList.add(\"linkAnnotation\");\n    if (isBound) {\n      this.container.append(link);\n    }\n\n    return this.container;\n  }\n\n  #setInternalLink() {\n    this.container.setAttribute(\"data-internal-link\", \"\");\n  }\n\n  /**\n   * Bind internal links to the link element.\n   *\n   * @private\n   * @param {Object} link\n   * @param {Object} destination\n   * @memberof LinkAnnotationElement\n   */\n  _bindLink(link, destination) {\n    link.href = this.linkService.getDestinationHash(destination);\n    link.onclick = () => {\n      if (destination) {\n        this.linkService.goToDestination(destination);\n      }\n      return false;\n    };\n    if (destination || destination === /* isTooltipOnly = */ \"\") {\n      this.#setInternalLink();\n    }\n  }\n\n  /**\n   * Bind named actions to the link element.\n   *\n   * @private\n   * @param {Object} link\n   * @param {Object} action\n   * @memberof LinkAnnotationElement\n   */\n  _bindNamedAction(link, action) {\n    link.href = this.linkService.getAnchorUrl(\"\");\n    link.onclick = () => {\n      this.linkService.executeNamedAction(action);\n      return false;\n    };\n    this.#setInternalLink();\n  }\n\n  /**\n   * Bind attachments to the link element.\n   * @param {Object} link\n   * @param {Object} attachment\n   */\n  _bindAttachment(link, attachment) {\n    link.href = this.linkService.getAnchorUrl(\"\");\n    link.onclick = () => {\n      this.downloadManager?.openOrDownloadData(\n        this.container,\n        attachment.content,\n        attachment.filename\n      );\n      return false;\n    };\n    this.#setInternalLink();\n  }\n\n  /**\n   * Bind SetOCGState actions to the link element.\n   * @param {Object} link\n   * @param {Object} action\n   */\n  #bindSetOCGState(link, action) {\n    link.href = this.linkService.getAnchorUrl(\"\");\n    link.onclick = () => {\n      this.linkService.executeSetOCGState(action);\n      return false;\n    };\n    this.#setInternalLink();\n  }\n\n  /**\n   * Bind JS actions to the link element.\n   *\n   * @private\n   * @param {Object} link\n   * @param {Object} data\n   * @memberof LinkAnnotationElement\n   */\n  _bindJSAction(link, data) {\n    link.href = this.linkService.getAnchorUrl(\"\");\n    const map = new Map([\n      [\"Action\", \"onclick\"],\n      [\"Mouse Up\", \"onmouseup\"],\n      [\"Mouse Down\", \"onmousedown\"],\n    ]);\n    for (const name of Object.keys(data.actions)) {\n      const jsName = map.get(name);\n      if (!jsName) {\n        continue;\n      }\n      link[jsName] = () => {\n        this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n          source: this,\n          detail: {\n            id: data.id,\n            name,\n          },\n        });\n        return false;\n      };\n    }\n\n    if (!link.onclick) {\n      link.onclick = () => false;\n    }\n    this.#setInternalLink();\n  }\n\n  _bindResetFormAction(link, resetForm) {\n    const otherClickAction = link.onclick;\n    if (!otherClickAction) {\n      link.href = this.linkService.getAnchorUrl(\"\");\n    }\n    this.#setInternalLink();\n\n    if (!this._fieldObjects) {\n      warn(\n        `_bindResetFormAction - \"resetForm\" action not supported, ` +\n          \"ensure that the `fieldObjects` parameter is provided.\"\n      );\n      if (!otherClickAction) {\n        link.onclick = () => false;\n      }\n      return;\n    }\n\n    link.onclick = () => {\n      otherClickAction?.();\n\n      const {\n        fields: resetFormFields,\n        refs: resetFormRefs,\n        include,\n      } = resetForm;\n\n      const allFields = [];\n      if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) {\n        const fieldIds = new Set(resetFormRefs);\n        for (const fieldName of resetFormFields) {\n          const fields = this._fieldObjects[fieldName] || [];\n          for (const { id } of fields) {\n            fieldIds.add(id);\n          }\n        }\n        for (const fields of Object.values(this._fieldObjects)) {\n          for (const field of fields) {\n            if (fieldIds.has(field.id) === include) {\n              allFields.push(field);\n            }\n          }\n        }\n      } else {\n        for (const fields of Object.values(this._fieldObjects)) {\n          allFields.push(...fields);\n        }\n      }\n\n      const storage = this.annotationStorage;\n      const allIds = [];\n      for (const field of allFields) {\n        const { id } = field;\n        allIds.push(id);\n        switch (field.type) {\n          case \"text\": {\n            const value = field.defaultValue || \"\";\n            storage.setValue(id, { value });\n            break;\n          }\n          case \"checkbox\":\n          case \"radiobutton\": {\n            const value = field.defaultValue === field.exportValues;\n            storage.setValue(id, { value });\n            break;\n          }\n          case \"combobox\":\n          case \"listbox\": {\n            const value = field.defaultValue || \"\";\n            storage.setValue(id, { value });\n            break;\n          }\n          default:\n            continue;\n        }\n\n        const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n        if (!domElement) {\n          continue;\n        } else if (!GetElementsByNameSet.has(domElement)) {\n          warn(`_bindResetFormAction - element not allowed: ${id}`);\n          continue;\n        }\n        domElement.dispatchEvent(new Event(\"resetform\"));\n      }\n\n      if (this.enableScripting) {\n        // Update the values in the sandbox.\n        this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n          source: this,\n          detail: {\n            id: \"app\",\n            ids: allIds,\n            name: \"ResetForm\",\n          },\n        });\n      }\n\n      return false;\n    };\n  }\n}\n\nclass TextAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: true });\n  }\n\n  render() {\n    this.container.classList.add(\"textAnnotation\");\n\n    const image = document.createElement(\"img\");\n    image.src =\n      this.imageResourcesPath +\n      \"annotation-\" +\n      this.data.name.toLowerCase() +\n      \".svg\";\n    image.alt = \"[{{type}} Annotation]\";\n    image.dataset.l10nId = \"text_annotation_type\";\n    image.dataset.l10nArgs = JSON.stringify({ type: this.data.name });\n\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    this.container.append(image);\n    return this.container;\n  }\n}\n\nclass WidgetAnnotationElement extends AnnotationElement {\n  render() {\n    // Show only the container for unsupported field types.\n    if (this.data.alternativeText) {\n      this.container.title = this.data.alternativeText;\n    }\n\n    return this.container;\n  }\n\n  showElementAndHideCanvas(element) {\n    if (this.data.hasOwnCanvas) {\n      if (element.previousSibling?.nodeName === \"CANVAS\") {\n        element.previousSibling.hidden = true;\n      }\n      element.hidden = false;\n    }\n  }\n\n  _getKeyModifier(event) {\n    const { isWin, isMac } = FeatureTest.platform;\n    return (isWin && event.ctrlKey) || (isMac && event.metaKey);\n  }\n\n  _setEventListener(element, elementData, baseName, eventName, valueGetter) {\n    if (baseName.includes(\"mouse\")) {\n      // Mouse events\n      element.addEventListener(baseName, event => {\n        this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n          source: this,\n          detail: {\n            id: this.data.id,\n            name: eventName,\n            value: valueGetter(event),\n            shift: event.shiftKey,\n            modifier: this._getKeyModifier(event),\n          },\n        });\n      });\n    } else {\n      // Non-mouse events\n      element.addEventListener(baseName, event => {\n        if (baseName === \"blur\") {\n          if (!elementData.focused || !event.relatedTarget) {\n            return;\n          }\n          elementData.focused = false;\n        } else if (baseName === \"focus\") {\n          if (elementData.focused) {\n            return;\n          }\n          elementData.focused = true;\n        }\n\n        if (!valueGetter) {\n          return;\n        }\n\n        this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n          source: this,\n          detail: {\n            id: this.data.id,\n            name: eventName,\n            value: valueGetter(event),\n          },\n        });\n      });\n    }\n  }\n\n  _setEventListeners(element, elementData, names, getter) {\n    for (const [baseName, eventName] of names) {\n      if (eventName === \"Action\" || this.data.actions?.[eventName]) {\n        if (eventName === \"Focus\" || eventName === \"Blur\") {\n          elementData ||= { focused: false };\n        }\n        this._setEventListener(\n          element,\n          elementData,\n          baseName,\n          eventName,\n          getter\n        );\n        if (eventName === \"Focus\" && !this.data.actions?.Blur) {\n          // Ensure that elementData will have the correct value.\n          this._setEventListener(element, elementData, \"blur\", \"Blur\", null);\n        } else if (eventName === \"Blur\" && !this.data.actions?.Focus) {\n          this._setEventListener(element, elementData, \"focus\", \"Focus\", null);\n        }\n      }\n    }\n  }\n\n  _setBackgroundColor(element) {\n    const color = this.data.backgroundColor || null;\n    element.style.backgroundColor =\n      color === null\n        ? \"transparent\"\n        : Util.makeHexColor(color[0], color[1], color[2]);\n  }\n\n  /**\n   * Apply text styles to the text in the element.\n   *\n   * @private\n   * @param {HTMLDivElement} element\n   * @memberof TextWidgetAnnotationElement\n   */\n  _setTextStyle(element) {\n    const TEXT_ALIGNMENT = [\"left\", \"center\", \"right\"];\n    const { fontColor } = this.data.defaultAppearanceData;\n    const fontSize =\n      this.data.defaultAppearanceData.fontSize || DEFAULT_FONT_SIZE;\n\n    const style = element.style;\n\n    // TODO: If the font-size is zero, calculate it based on the height and\n    //       width of the element.\n    // Not setting `style.fontSize` will use the default font-size for now.\n\n    // We don't use the font, as specified in the PDF document, for the <input>\n    // element. Hence using the original `fontSize` could look bad, which is why\n    // it's instead based on the field height.\n    // If the height is \"big\" then it could lead to a too big font size\n    // so in this case use the one we've in the pdf (hence the min).\n    let computedFontSize;\n    const BORDER_SIZE = 2;\n    const roundToOneDecimal = x => Math.round(10 * x) / 10;\n    if (this.data.multiLine) {\n      const height = Math.abs(\n        this.data.rect[3] - this.data.rect[1] - BORDER_SIZE\n      );\n      const numberOfLines = Math.round(height / (LINE_FACTOR * fontSize)) || 1;\n      const lineHeight = height / numberOfLines;\n      computedFontSize = Math.min(\n        fontSize,\n        roundToOneDecimal(lineHeight / LINE_FACTOR)\n      );\n    } else {\n      const height = Math.abs(\n        this.data.rect[3] - this.data.rect[1] - BORDER_SIZE\n      );\n      computedFontSize = Math.min(\n        fontSize,\n        roundToOneDecimal(height / LINE_FACTOR)\n      );\n    }\n    style.fontSize = `calc(${computedFontSize}px * var(--scale-factor))`;\n\n    style.color = Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);\n\n    if (this.data.textAlignment !== null) {\n      style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];\n    }\n  }\n\n  _setRequired(element, isRequired) {\n    if (isRequired) {\n      element.setAttribute(\"required\", true);\n    } else {\n      element.removeAttribute(\"required\");\n    }\n    element.setAttribute(\"aria-required\", isRequired);\n  }\n}\n\nclass TextWidgetAnnotationElement extends WidgetAnnotationElement {\n  constructor(parameters) {\n    const isRenderable =\n      parameters.renderForms ||\n      (!parameters.data.hasAppearance && !!parameters.data.fieldValue);\n    super(parameters, { isRenderable });\n  }\n\n  setPropertyOnSiblings(base, key, value, keyInStorage) {\n    const storage = this.annotationStorage;\n    for (const element of this._getElementsByName(\n      base.name,\n      /* skipId = */ base.id\n    )) {\n      if (element.domElement) {\n        element.domElement[key] = value;\n      }\n      storage.setValue(element.id, { [keyInStorage]: value });\n    }\n  }\n\n  render() {\n    const storage = this.annotationStorage;\n    const id = this.data.id;\n\n    this.container.classList.add(\"textWidgetAnnotation\");\n\n    let element = null;\n    if (this.renderForms) {\n      // NOTE: We cannot set the values using `element.value` below, since it\n      //       prevents the AnnotationLayer rasterizer in `test/driver.js`\n      //       from parsing the elements correctly for the reference tests.\n      const storedData = storage.getValue(id, {\n        value: this.data.fieldValue,\n      });\n      let textContent = storedData.value || \"\";\n      const maxLen = storage.getValue(id, {\n        charLimit: this.data.maxLen,\n      }).charLimit;\n      if (maxLen && textContent.length > maxLen) {\n        textContent = textContent.slice(0, maxLen);\n      }\n\n      let fieldFormattedValues =\n        storedData.formattedValue || this.data.textContent?.join(\"\\n\") || null;\n      if (fieldFormattedValues && this.data.comb) {\n        fieldFormattedValues = fieldFormattedValues.replaceAll(/\\s+/g, \"\");\n      }\n\n      const elementData = {\n        userValue: textContent,\n        formattedValue: fieldFormattedValues,\n        lastCommittedValue: null,\n        commitKey: 1,\n        focused: false,\n      };\n\n      if (this.data.multiLine) {\n        element = document.createElement(\"textarea\");\n        element.textContent = fieldFormattedValues ?? textContent;\n        if (this.data.doNotScroll) {\n          element.style.overflowY = \"hidden\";\n        }\n      } else {\n        element = document.createElement(\"input\");\n        element.type = \"text\";\n        element.setAttribute(\"value\", fieldFormattedValues ?? textContent);\n        if (this.data.doNotScroll) {\n          element.style.overflowX = \"hidden\";\n        }\n      }\n      if (this.data.hasOwnCanvas) {\n        element.hidden = true;\n      }\n      GetElementsByNameSet.add(element);\n      element.setAttribute(\"data-element-id\", id);\n\n      element.disabled = this.data.readOnly;\n      element.name = this.data.fieldName;\n      element.tabIndex = DEFAULT_TAB_INDEX;\n\n      this._setRequired(element, this.data.required);\n\n      if (maxLen) {\n        element.maxLength = maxLen;\n      }\n\n      element.addEventListener(\"input\", event => {\n        storage.setValue(id, { value: event.target.value });\n        this.setPropertyOnSiblings(\n          element,\n          \"value\",\n          event.target.value,\n          \"value\"\n        );\n        elementData.formattedValue = null;\n      });\n\n      element.addEventListener(\"resetform\", event => {\n        const defaultValue = this.data.defaultFieldValue ?? \"\";\n        element.value = elementData.userValue = defaultValue;\n        elementData.formattedValue = null;\n      });\n\n      let blurListener = event => {\n        const { formattedValue } = elementData;\n        if (formattedValue !== null && formattedValue !== undefined) {\n          event.target.value = formattedValue;\n        }\n        // Reset the cursor position to the start of the field (issue 12359).\n        event.target.scrollLeft = 0;\n      };\n\n      if (this.enableScripting && this.hasJSActions) {\n        element.addEventListener(\"focus\", event => {\n          if (elementData.focused) {\n            return;\n          }\n          const { target } = event;\n          if (elementData.userValue) {\n            target.value = elementData.userValue;\n          }\n          elementData.lastCommittedValue = target.value;\n          elementData.commitKey = 1;\n          elementData.focused = true;\n        });\n\n        element.addEventListener(\"updatefromsandbox\", jsEvent => {\n          this.showElementAndHideCanvas(jsEvent.target);\n          const actions = {\n            value(event) {\n              elementData.userValue = event.detail.value ?? \"\";\n              storage.setValue(id, { value: elementData.userValue.toString() });\n              event.target.value = elementData.userValue;\n            },\n            formattedValue(event) {\n              const { formattedValue } = event.detail;\n              elementData.formattedValue = formattedValue;\n              if (\n                formattedValue !== null &&\n                formattedValue !== undefined &&\n                event.target !== document.activeElement\n              ) {\n                // Input hasn't the focus so display formatted string\n                event.target.value = formattedValue;\n              }\n              storage.setValue(id, {\n                formattedValue,\n              });\n            },\n            selRange(event) {\n              event.target.setSelectionRange(...event.detail.selRange);\n            },\n            charLimit: event => {\n              const { charLimit } = event.detail;\n              const { target } = event;\n              if (charLimit === 0) {\n                target.removeAttribute(\"maxLength\");\n                return;\n              }\n\n              target.setAttribute(\"maxLength\", charLimit);\n              let value = elementData.userValue;\n              if (!value || value.length <= charLimit) {\n                return;\n              }\n              value = value.slice(0, charLimit);\n              target.value = elementData.userValue = value;\n              storage.setValue(id, { value });\n\n              this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n                source: this,\n                detail: {\n                  id,\n                  name: \"Keystroke\",\n                  value,\n                  willCommit: true,\n                  commitKey: 1,\n                  selStart: target.selectionStart,\n                  selEnd: target.selectionEnd,\n                },\n              });\n            },\n          };\n          this._dispatchEventFromSandbox(actions, jsEvent);\n        });\n\n        // Even if the field hasn't any actions\n        // leaving it can still trigger some actions with Calculate\n        element.addEventListener(\"keydown\", event => {\n          elementData.commitKey = 1;\n          // If the key is one of Escape, Enter then the data are committed.\n          // If we've a Tab then data will be committed on blur.\n          let commitKey = -1;\n          if (event.key === \"Escape\") {\n            commitKey = 0;\n          } else if (event.key === \"Enter\" && !this.data.multiLine) {\n            // When we've a multiline field, \"Enter\" key is a key as the other\n            // hence we don't commit the data (Acrobat behaves the same way)\n            // (see issue #15627).\n            commitKey = 2;\n          } else if (event.key === \"Tab\") {\n            elementData.commitKey = 3;\n          }\n          if (commitKey === -1) {\n            return;\n          }\n          const { value } = event.target;\n          if (elementData.lastCommittedValue === value) {\n            return;\n          }\n          elementData.lastCommittedValue = value;\n          // Save the entered value\n          elementData.userValue = value;\n          this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n            source: this,\n            detail: {\n              id,\n              name: \"Keystroke\",\n              value,\n              willCommit: true,\n              commitKey,\n              selStart: event.target.selectionStart,\n              selEnd: event.target.selectionEnd,\n            },\n          });\n        });\n        const _blurListener = blurListener;\n        blurListener = null;\n        element.addEventListener(\"blur\", event => {\n          if (!elementData.focused || !event.relatedTarget) {\n            return;\n          }\n          elementData.focused = false;\n          const { value } = event.target;\n          elementData.userValue = value;\n          if (elementData.lastCommittedValue !== value) {\n            this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n              source: this,\n              detail: {\n                id,\n                name: \"Keystroke\",\n                value,\n                willCommit: true,\n                commitKey: elementData.commitKey,\n                selStart: event.target.selectionStart,\n                selEnd: event.target.selectionEnd,\n              },\n            });\n          }\n          _blurListener(event);\n        });\n\n        if (this.data.actions?.Keystroke) {\n          element.addEventListener(\"beforeinput\", event => {\n            elementData.lastCommittedValue = null;\n            const { data, target } = event;\n            const { value, selectionStart, selectionEnd } = target;\n\n            let selStart = selectionStart,\n              selEnd = selectionEnd;\n\n            switch (event.inputType) {\n              // https://rawgit.com/w3c/input-events/v1/index.html#interface-InputEvent-Attributes\n              case \"deleteWordBackward\": {\n                const match = value\n                  .substring(0, selectionStart)\n                  .match(/\\w*[^\\w]*$/);\n                if (match) {\n                  selStart -= match[0].length;\n                }\n                break;\n              }\n              case \"deleteWordForward\": {\n                const match = value\n                  .substring(selectionStart)\n                  .match(/^[^\\w]*\\w*/);\n                if (match) {\n                  selEnd += match[0].length;\n                }\n                break;\n              }\n              case \"deleteContentBackward\":\n                if (selectionStart === selectionEnd) {\n                  selStart -= 1;\n                }\n                break;\n              case \"deleteContentForward\":\n                if (selectionStart === selectionEnd) {\n                  selEnd += 1;\n                }\n                break;\n            }\n\n            // We handle the event ourselves.\n            event.preventDefault();\n            this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n              source: this,\n              detail: {\n                id,\n                name: \"Keystroke\",\n                value,\n                change: data || \"\",\n                willCommit: false,\n                selStart,\n                selEnd,\n              },\n            });\n          });\n        }\n\n        this._setEventListeners(\n          element,\n          elementData,\n          [\n            [\"focus\", \"Focus\"],\n            [\"blur\", \"Blur\"],\n            [\"mousedown\", \"Mouse Down\"],\n            [\"mouseenter\", \"Mouse Enter\"],\n            [\"mouseleave\", \"Mouse Exit\"],\n            [\"mouseup\", \"Mouse Up\"],\n          ],\n          event => event.target.value\n        );\n      }\n\n      if (blurListener) {\n        element.addEventListener(\"blur\", blurListener);\n      }\n\n      if (this.data.comb) {\n        const fieldWidth = this.data.rect[2] - this.data.rect[0];\n        const combWidth = fieldWidth / maxLen;\n\n        element.classList.add(\"comb\");\n        element.style.letterSpacing = `calc(${combWidth}px * var(--scale-factor) - 1ch)`;\n      }\n    } else {\n      element = document.createElement(\"div\");\n      element.textContent = this.data.fieldValue;\n      element.style.verticalAlign = \"middle\";\n      element.style.display = \"table-cell\";\n    }\n\n    this._setTextStyle(element);\n    this._setBackgroundColor(element);\n    this._setDefaultPropertiesFromJS(element);\n\n    this.container.append(element);\n    return this.container;\n  }\n}\n\nclass SignatureWidgetAnnotationElement extends WidgetAnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: !!parameters.data.hasOwnCanvas });\n  }\n}\n\nclass CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: parameters.renderForms });\n  }\n\n  render() {\n    const storage = this.annotationStorage;\n    const data = this.data;\n    const id = data.id;\n    let value = storage.getValue(id, {\n      value: data.exportValue === data.fieldValue,\n    }).value;\n    if (typeof value === \"string\") {\n      // The value has been changed through js and set in annotationStorage.\n      value = value !== \"Off\";\n      storage.setValue(id, { value });\n    }\n\n    this.container.classList.add(\"buttonWidgetAnnotation\", \"checkBox\");\n\n    const element = document.createElement(\"input\");\n    GetElementsByNameSet.add(element);\n    element.setAttribute(\"data-element-id\", id);\n\n    element.disabled = data.readOnly;\n    this._setRequired(element, this.data.required);\n    element.type = \"checkbox\";\n    element.name = data.fieldName;\n    if (value) {\n      element.setAttribute(\"checked\", true);\n    }\n    element.setAttribute(\"exportValue\", data.exportValue);\n    element.tabIndex = DEFAULT_TAB_INDEX;\n\n    element.addEventListener(\"change\", event => {\n      const { name, checked } = event.target;\n      for (const checkbox of this._getElementsByName(name, /* skipId = */ id)) {\n        const curChecked = checked && checkbox.exportValue === data.exportValue;\n        if (checkbox.domElement) {\n          checkbox.domElement.checked = curChecked;\n        }\n        storage.setValue(checkbox.id, { value: curChecked });\n      }\n      storage.setValue(id, { value: checked });\n    });\n\n    element.addEventListener(\"resetform\", event => {\n      const defaultValue = data.defaultFieldValue || \"Off\";\n      event.target.checked = defaultValue === data.exportValue;\n    });\n\n    if (this.enableScripting && this.hasJSActions) {\n      element.addEventListener(\"updatefromsandbox\", jsEvent => {\n        const actions = {\n          value(event) {\n            event.target.checked = event.detail.value !== \"Off\";\n            storage.setValue(id, { value: event.target.checked });\n          },\n        };\n        this._dispatchEventFromSandbox(actions, jsEvent);\n      });\n\n      this._setEventListeners(\n        element,\n        null,\n        [\n          [\"change\", \"Validate\"],\n          [\"change\", \"Action\"],\n          [\"focus\", \"Focus\"],\n          [\"blur\", \"Blur\"],\n          [\"mousedown\", \"Mouse Down\"],\n          [\"mouseenter\", \"Mouse Enter\"],\n          [\"mouseleave\", \"Mouse Exit\"],\n          [\"mouseup\", \"Mouse Up\"],\n        ],\n        event => event.target.checked\n      );\n    }\n\n    this._setBackgroundColor(element);\n    this._setDefaultPropertiesFromJS(element);\n\n    this.container.append(element);\n    return this.container;\n  }\n}\n\nclass RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: parameters.renderForms });\n  }\n\n  render() {\n    this.container.classList.add(\"buttonWidgetAnnotation\", \"radioButton\");\n    const storage = this.annotationStorage;\n    const data = this.data;\n    const id = data.id;\n    let value = storage.getValue(id, {\n      value: data.fieldValue === data.buttonValue,\n    }).value;\n    if (typeof value === \"string\") {\n      // The value has been changed through js and set in annotationStorage.\n      value = value !== data.buttonValue;\n      storage.setValue(id, { value });\n    }\n\n    const element = document.createElement(\"input\");\n    GetElementsByNameSet.add(element);\n    element.setAttribute(\"data-element-id\", id);\n\n    element.disabled = data.readOnly;\n    this._setRequired(element, this.data.required);\n    element.type = \"radio\";\n    element.name = data.fieldName;\n    if (value) {\n      element.setAttribute(\"checked\", true);\n    }\n    element.tabIndex = DEFAULT_TAB_INDEX;\n\n    element.addEventListener(\"change\", event => {\n      const { name, checked } = event.target;\n      for (const radio of this._getElementsByName(name, /* skipId = */ id)) {\n        storage.setValue(radio.id, { value: false });\n      }\n      storage.setValue(id, { value: checked });\n    });\n\n    element.addEventListener(\"resetform\", event => {\n      const defaultValue = data.defaultFieldValue;\n      event.target.checked =\n        defaultValue !== null &&\n        defaultValue !== undefined &&\n        defaultValue === data.buttonValue;\n    });\n\n    if (this.enableScripting && this.hasJSActions) {\n      const pdfButtonValue = data.buttonValue;\n      element.addEventListener(\"updatefromsandbox\", jsEvent => {\n        const actions = {\n          value: event => {\n            const checked = pdfButtonValue === event.detail.value;\n            for (const radio of this._getElementsByName(event.target.name)) {\n              const curChecked = checked && radio.id === id;\n              if (radio.domElement) {\n                radio.domElement.checked = curChecked;\n              }\n              storage.setValue(radio.id, { value: curChecked });\n            }\n          },\n        };\n        this._dispatchEventFromSandbox(actions, jsEvent);\n      });\n\n      this._setEventListeners(\n        element,\n        null,\n        [\n          [\"change\", \"Validate\"],\n          [\"change\", \"Action\"],\n          [\"focus\", \"Focus\"],\n          [\"blur\", \"Blur\"],\n          [\"mousedown\", \"Mouse Down\"],\n          [\"mouseenter\", \"Mouse Enter\"],\n          [\"mouseleave\", \"Mouse Exit\"],\n          [\"mouseup\", \"Mouse Up\"],\n        ],\n        event => event.target.checked\n      );\n    }\n\n    this._setBackgroundColor(element);\n    this._setDefaultPropertiesFromJS(element);\n\n    this.container.append(element);\n    return this.container;\n  }\n}\n\nclass PushButtonWidgetAnnotationElement extends LinkAnnotationElement {\n  constructor(parameters) {\n    super(parameters, { ignoreBorder: parameters.data.hasAppearance });\n  }\n\n  render() {\n    // The rendering and functionality of a push button widget annotation is\n    // equal to that of a link annotation, but may have more functionality, such\n    // as performing actions on form fields (resetting, submitting, et cetera).\n    const container = super.render();\n    container.classList.add(\"buttonWidgetAnnotation\", \"pushButton\");\n\n    if (this.data.alternativeText) {\n      container.title = this.data.alternativeText;\n    }\n\n    const linkElement = container.lastChild;\n    if (this.enableScripting && this.hasJSActions && linkElement) {\n      this._setDefaultPropertiesFromJS(linkElement);\n\n      linkElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n        this._dispatchEventFromSandbox({}, jsEvent);\n      });\n    }\n\n    return container;\n  }\n}\n\nclass ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: parameters.renderForms });\n  }\n\n  render() {\n    this.container.classList.add(\"choiceWidgetAnnotation\");\n    const storage = this.annotationStorage;\n    const id = this.data.id;\n\n    const storedData = storage.getValue(id, {\n      value: this.data.fieldValue,\n    });\n\n    const selectElement = document.createElement(\"select\");\n    GetElementsByNameSet.add(selectElement);\n    selectElement.setAttribute(\"data-element-id\", id);\n\n    selectElement.disabled = this.data.readOnly;\n    this._setRequired(selectElement, this.data.required);\n    selectElement.name = this.data.fieldName;\n    selectElement.tabIndex = DEFAULT_TAB_INDEX;\n\n    let addAnEmptyEntry = this.data.combo && this.data.options.length > 0;\n\n    if (!this.data.combo) {\n      // List boxes have a size and (optionally) multiple selection.\n      selectElement.size = this.data.options.length;\n      if (this.data.multiSelect) {\n        selectElement.multiple = true;\n      }\n    }\n\n    selectElement.addEventListener(\"resetform\", event => {\n      const defaultValue = this.data.defaultFieldValue;\n      for (const option of selectElement.options) {\n        option.selected = option.value === defaultValue;\n      }\n    });\n\n    // Insert the options into the choice field.\n    for (const option of this.data.options) {\n      const optionElement = document.createElement(\"option\");\n      optionElement.textContent = option.displayValue;\n      optionElement.value = option.exportValue;\n      if (storedData.value.includes(option.exportValue)) {\n        optionElement.setAttribute(\"selected\", true);\n        addAnEmptyEntry = false;\n      }\n      selectElement.append(optionElement);\n    }\n\n    let removeEmptyEntry = null;\n    if (addAnEmptyEntry) {\n      const noneOptionElement = document.createElement(\"option\");\n      noneOptionElement.value = \" \";\n      noneOptionElement.setAttribute(\"hidden\", true);\n      noneOptionElement.setAttribute(\"selected\", true);\n      selectElement.prepend(noneOptionElement);\n\n      removeEmptyEntry = () => {\n        noneOptionElement.remove();\n        selectElement.removeEventListener(\"input\", removeEmptyEntry);\n        removeEmptyEntry = null;\n      };\n      selectElement.addEventListener(\"input\", removeEmptyEntry);\n    }\n\n    const getValue = isExport => {\n      const name = isExport ? \"value\" : \"textContent\";\n      const { options, multiple } = selectElement;\n      if (!multiple) {\n        return options.selectedIndex === -1\n          ? null\n          : options[options.selectedIndex][name];\n      }\n      return Array.prototype.filter\n        .call(options, option => option.selected)\n        .map(option => option[name]);\n    };\n\n    let selectedValues = getValue(/* isExport */ false);\n\n    const getItems = event => {\n      const options = event.target.options;\n      return Array.prototype.map.call(options, option => {\n        return { displayValue: option.textContent, exportValue: option.value };\n      });\n    };\n\n    if (this.enableScripting && this.hasJSActions) {\n      selectElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n        const actions = {\n          value(event) {\n            removeEmptyEntry?.();\n            const value = event.detail.value;\n            const values = new Set(Array.isArray(value) ? value : [value]);\n            for (const option of selectElement.options) {\n              option.selected = values.has(option.value);\n            }\n            storage.setValue(id, {\n              value: getValue(/* isExport */ true),\n            });\n            selectedValues = getValue(/* isExport */ false);\n          },\n          multipleSelection(event) {\n            selectElement.multiple = true;\n          },\n          remove(event) {\n            const options = selectElement.options;\n            const index = event.detail.remove;\n            options[index].selected = false;\n            selectElement.remove(index);\n            if (options.length > 0) {\n              const i = Array.prototype.findIndex.call(\n                options,\n                option => option.selected\n              );\n              if (i === -1) {\n                options[0].selected = true;\n              }\n            }\n            storage.setValue(id, {\n              value: getValue(/* isExport */ true),\n              items: getItems(event),\n            });\n            selectedValues = getValue(/* isExport */ false);\n          },\n          clear(event) {\n            while (selectElement.length !== 0) {\n              selectElement.remove(0);\n            }\n            storage.setValue(id, { value: null, items: [] });\n            selectedValues = getValue(/* isExport */ false);\n          },\n          insert(event) {\n            const { index, displayValue, exportValue } = event.detail.insert;\n            const selectChild = selectElement.children[index];\n            const optionElement = document.createElement(\"option\");\n            optionElement.textContent = displayValue;\n            optionElement.value = exportValue;\n\n            if (selectChild) {\n              selectChild.before(optionElement);\n            } else {\n              selectElement.append(optionElement);\n            }\n            storage.setValue(id, {\n              value: getValue(/* isExport */ true),\n              items: getItems(event),\n            });\n            selectedValues = getValue(/* isExport */ false);\n          },\n          items(event) {\n            const { items } = event.detail;\n            while (selectElement.length !== 0) {\n              selectElement.remove(0);\n            }\n            for (const item of items) {\n              const { displayValue, exportValue } = item;\n              const optionElement = document.createElement(\"option\");\n              optionElement.textContent = displayValue;\n              optionElement.value = exportValue;\n              selectElement.append(optionElement);\n            }\n            if (selectElement.options.length > 0) {\n              selectElement.options[0].selected = true;\n            }\n            storage.setValue(id, {\n              value: getValue(/* isExport */ true),\n              items: getItems(event),\n            });\n            selectedValues = getValue(/* isExport */ false);\n          },\n          indices(event) {\n            const indices = new Set(event.detail.indices);\n            for (const option of event.target.options) {\n              option.selected = indices.has(option.index);\n            }\n            storage.setValue(id, {\n              value: getValue(/* isExport */ true),\n            });\n            selectedValues = getValue(/* isExport */ false);\n          },\n          editable(event) {\n            event.target.disabled = !event.detail.editable;\n          },\n        };\n        this._dispatchEventFromSandbox(actions, jsEvent);\n      });\n\n      selectElement.addEventListener(\"input\", event => {\n        const exportValue = getValue(/* isExport */ true);\n        storage.setValue(id, { value: exportValue });\n\n        event.preventDefault();\n\n        this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n          source: this,\n          detail: {\n            id,\n            name: \"Keystroke\",\n            value: selectedValues,\n            changeEx: exportValue,\n            willCommit: false,\n            commitKey: 1,\n            keyDown: false,\n          },\n        });\n      });\n\n      this._setEventListeners(\n        selectElement,\n        null,\n        [\n          [\"focus\", \"Focus\"],\n          [\"blur\", \"Blur\"],\n          [\"mousedown\", \"Mouse Down\"],\n          [\"mouseenter\", \"Mouse Enter\"],\n          [\"mouseleave\", \"Mouse Exit\"],\n          [\"mouseup\", \"Mouse Up\"],\n          [\"input\", \"Action\"],\n          [\"input\", \"Validate\"],\n        ],\n        event => event.target.value\n      );\n    } else {\n      selectElement.addEventListener(\"input\", function (event) {\n        storage.setValue(id, { value: getValue(/* isExport */ true) });\n      });\n    }\n\n    if (this.data.combo) {\n      this._setTextStyle(selectElement);\n    } else {\n      // Just use the default font size...\n      // it's a bit hard to guess what is a good size.\n    }\n    this._setBackgroundColor(selectElement);\n    this._setDefaultPropertiesFromJS(selectElement);\n\n    this.container.append(selectElement);\n    return this.container;\n  }\n}\n\nclass PopupAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    const { data, elements } = parameters;\n    super(parameters, { isRenderable: AnnotationElement._hasPopupData(data) });\n    this.elements = elements;\n  }\n\n  render() {\n    this.container.classList.add(\"popupAnnotation\");\n\n    const popup = new PopupElement({\n      container: this.container,\n      color: this.data.color,\n      titleObj: this.data.titleObj,\n      modificationDate: this.data.modificationDate,\n      contentsObj: this.data.contentsObj,\n      richText: this.data.richText,\n      rect: this.data.rect,\n      parentRect: this.data.parentRect || null,\n      parent: this.parent,\n      elements: this.elements,\n      open: this.data.open,\n    });\n\n    const elementIds = [];\n    for (const element of this.elements) {\n      element.popup = popup;\n      elementIds.push(element.data.id);\n      element.addHighlightArea();\n    }\n\n    this.container.setAttribute(\n      \"aria-controls\",\n      elementIds.map(id => `${AnnotationPrefix}${id}`).join(\",\")\n    );\n\n    return this.container;\n  }\n}\n\nclass PopupElement {\n  #dateTimePromise = null;\n\n  #boundKeyDown = this.#keyDown.bind(this);\n\n  #boundHide = this.#hide.bind(this);\n\n  #boundShow = this.#show.bind(this);\n\n  #boundToggle = this.#toggle.bind(this);\n\n  #color = null;\n\n  #container = null;\n\n  #contentsObj = null;\n\n  #elements = null;\n\n  #parent = null;\n\n  #parentRect = null;\n\n  #pinned = false;\n\n  #popup = null;\n\n  #rect = null;\n\n  #richText = null;\n\n  #titleObj = null;\n\n  #wasVisible = false;\n\n  constructor({\n    container,\n    color,\n    elements,\n    titleObj,\n    modificationDate,\n    contentsObj,\n    richText,\n    parent,\n    rect,\n    parentRect,\n    open,\n  }) {\n    this.#container = container;\n    this.#titleObj = titleObj;\n    this.#contentsObj = contentsObj;\n    this.#richText = richText;\n    this.#parent = parent;\n    this.#color = color;\n    this.#rect = rect;\n    this.#parentRect = parentRect;\n    this.#elements = elements;\n\n    const dateObject = PDFDateString.toDateObject(modificationDate);\n    if (dateObject) {\n      // The modification date is shown in the popup instead of the creation\n      // date if it is available and can be parsed correctly, which is\n      // consistent with other viewers such as Adobe Acrobat.\n      this.#dateTimePromise = parent.l10n.get(\"annotation_date_string\", {\n        date: dateObject.toLocaleDateString(),\n        time: dateObject.toLocaleTimeString(),\n      });\n    }\n\n    this.trigger = elements.flatMap(e => e.getElementsToTriggerPopup());\n    // Attach the event listeners to the trigger element.\n    for (const element of this.trigger) {\n      element.addEventListener(\"click\", this.#boundToggle);\n      element.addEventListener(\"mouseenter\", this.#boundShow);\n      element.addEventListener(\"mouseleave\", this.#boundHide);\n      element.classList.add(\"popupTriggerArea\");\n    }\n\n    // Attach the event listener to toggle the popup with the keyboard.\n    for (const element of elements) {\n      element.container?.addEventListener(\"keydown\", this.#boundKeyDown);\n    }\n\n    this.#container.hidden = true;\n    if (open) {\n      this.#toggle();\n    }\n\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n      // Since the popup is lazily created, we need to ensure that it'll be\n      // created and displayed during reference tests.\n      this.#parent.popupShow.push(async () => {\n        if (this.#container.hidden) {\n          this.#show();\n        }\n        if (this.#dateTimePromise) {\n          await this.#dateTimePromise;\n        }\n      });\n    }\n  }\n\n  render() {\n    if (this.#popup) {\n      return;\n    }\n\n    const {\n      page: { view },\n      viewport: {\n        rawDims: { pageWidth, pageHeight, pageX, pageY },\n      },\n    } = this.#parent;\n    const popup = (this.#popup = document.createElement(\"div\"));\n    popup.className = \"popup\";\n\n    if (this.#color) {\n      const baseColor = (popup.style.outlineColor = Util.makeHexColor(\n        ...this.#color\n      ));\n      if (\n        (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n        CSS.supports(\"background-color\", \"color-mix(in srgb, red 30%, white)\")\n      ) {\n        popup.style.backgroundColor = `color-mix(in srgb, ${baseColor} 30%, white)`;\n      } else {\n        // color-mix isn't supported in some browsers hence this version.\n        // See https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix#browser_compatibility\n        // TODO: Use color-mix when it's supported everywhere.\n        // Enlighten the color.\n        const BACKGROUND_ENLIGHT = 0.7;\n        popup.style.backgroundColor = Util.makeHexColor(\n          ...this.#color.map(c =>\n            Math.floor(BACKGROUND_ENLIGHT * (255 - c) + c)\n          )\n        );\n      }\n    }\n\n    const header = document.createElement(\"span\");\n    header.className = \"header\";\n    const title = document.createElement(\"h1\");\n    header.append(title);\n    ({ dir: title.dir, str: title.textContent } = this.#titleObj);\n    popup.append(header);\n\n    if (this.#dateTimePromise) {\n      const modificationDate = document.createElement(\"span\");\n      modificationDate.classList.add(\"popupDate\");\n      this.#dateTimePromise.then(localized => {\n        modificationDate.textContent = localized;\n      });\n      header.append(modificationDate);\n    }\n\n    const contentsObj = this.#contentsObj;\n    const richText = this.#richText;\n    if (\n      richText?.str &&\n      (!contentsObj?.str || contentsObj.str === richText.str)\n    ) {\n      XfaLayer.render({\n        xfaHtml: richText.html,\n        intent: \"richText\",\n        div: popup,\n      });\n      popup.lastChild.classList.add(\"richText\", \"popupContent\");\n    } else {\n      const contents = this._formatContents(contentsObj);\n      popup.append(contents);\n    }\n\n    let useParentRect = !!this.#parentRect;\n    let rect = useParentRect ? this.#parentRect : this.#rect;\n    for (const element of this.#elements) {\n      if (!rect || Util.intersect(element.data.rect, rect) !== null) {\n        rect = element.data.rect;\n        useParentRect = true;\n        break;\n      }\n    }\n\n    const normalizedRect = Util.normalizeRect([\n      rect[0],\n      view[3] - rect[1] + view[1],\n      rect[2],\n      view[3] - rect[3] + view[1],\n    ]);\n\n    const HORIZONTAL_SPACE_AFTER_ANNOTATION = 5;\n    const parentWidth = useParentRect\n      ? rect[2] - rect[0] + HORIZONTAL_SPACE_AFTER_ANNOTATION\n      : 0;\n    const popupLeft = normalizedRect[0] + parentWidth;\n    const popupTop = normalizedRect[1];\n\n    const { style } = this.#container;\n    style.left = `${(100 * (popupLeft - pageX)) / pageWidth}%`;\n    style.top = `${(100 * (popupTop - pageY)) / pageHeight}%`;\n\n    this.#container.append(popup);\n  }\n\n  /**\n   * Format the contents of the popup by adding newlines where necessary.\n   *\n   * @private\n   * @param {Object<string, string>} contentsObj\n   * @memberof PopupElement\n   * @returns {HTMLParagraphElement}\n   */\n  _formatContents({ str, dir }) {\n    const p = document.createElement(\"p\");\n    p.classList.add(\"popupContent\");\n    p.dir = dir;\n    const lines = str.split(/(?:\\r\\n?|\\n)/);\n    for (let i = 0, ii = lines.length; i < ii; ++i) {\n      const line = lines[i];\n      p.append(document.createTextNode(line));\n      if (i < ii - 1) {\n        p.append(document.createElement(\"br\"));\n      }\n    }\n    return p;\n  }\n\n  #keyDown(event) {\n    if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n      return;\n    }\n\n    if (event.key === \"Enter\" || (event.key === \"Escape\" && this.#pinned)) {\n      this.#toggle();\n    }\n  }\n\n  /**\n   * Toggle the visibility of the popup.\n   */\n  #toggle() {\n    this.#pinned = !this.#pinned;\n    if (this.#pinned) {\n      this.#show();\n      this.#container.addEventListener(\"click\", this.#boundToggle);\n      this.#container.addEventListener(\"keydown\", this.#boundKeyDown);\n    } else {\n      this.#hide();\n      this.#container.removeEventListener(\"click\", this.#boundToggle);\n      this.#container.removeEventListener(\"keydown\", this.#boundKeyDown);\n    }\n  }\n\n  /**\n   * Show the popup.\n   */\n  #show() {\n    if (!this.#popup) {\n      this.render();\n    }\n    if (!this.isVisible) {\n      this.#container.hidden = false;\n      this.#container.style.zIndex =\n        parseInt(this.#container.style.zIndex) + 1000;\n    } else if (this.#pinned) {\n      this.#container.classList.add(\"focused\");\n    }\n  }\n\n  /**\n   * Hide the popup.\n   */\n  #hide() {\n    this.#container.classList.remove(\"focused\");\n    if (this.#pinned || !this.isVisible) {\n      return;\n    }\n    this.#container.hidden = true;\n    this.#container.style.zIndex =\n      parseInt(this.#container.style.zIndex) - 1000;\n  }\n\n  forceHide() {\n    this.#wasVisible = this.isVisible;\n    if (!this.#wasVisible) {\n      return;\n    }\n    this.#container.hidden = true;\n  }\n\n  maybeShow() {\n    if (!this.#wasVisible) {\n      return;\n    }\n    this.#wasVisible = false;\n    this.#container.hidden = false;\n  }\n\n  get isVisible() {\n    return this.#container.hidden === false;\n  }\n}\n\nclass FreeTextAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n    this.textContent = parameters.data.textContent;\n    this.textPosition = parameters.data.textPosition;\n    this.annotationEditorType = AnnotationEditorType.FREETEXT;\n  }\n\n  render() {\n    this.container.classList.add(\"freeTextAnnotation\");\n\n    if (this.textContent) {\n      const content = document.createElement(\"div\");\n      content.classList.add(\"annotationTextContent\");\n      content.setAttribute(\"role\", \"comment\");\n      for (const line of this.textContent) {\n        const lineSpan = document.createElement(\"span\");\n        lineSpan.textContent = line;\n        content.append(lineSpan);\n      }\n      this.container.append(content);\n    }\n\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    this._editOnDoubleClick();\n\n    return this.container;\n  }\n}\n\nclass LineAnnotationElement extends AnnotationElement {\n  #line = null;\n\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n  }\n\n  render() {\n    this.container.classList.add(\"lineAnnotation\");\n\n    // Create an invisible line with the same starting and ending coordinates\n    // that acts as the trigger for the popup. Only the line itself should\n    // trigger the popup, not the entire container.\n    const data = this.data;\n    const { width, height } = getRectDims(data.rect);\n    const svg = this.svgFactory.create(\n      width,\n      height,\n      /* skipDimensions = */ true\n    );\n\n    // PDF coordinates are calculated from a bottom left origin, so transform\n    // the line coordinates to a top left origin for the SVG element.\n    const line = (this.#line = this.svgFactory.createElement(\"svg:line\"));\n    line.setAttribute(\"x1\", data.rect[2] - data.lineCoordinates[0]);\n    line.setAttribute(\"y1\", data.rect[3] - data.lineCoordinates[1]);\n    line.setAttribute(\"x2\", data.rect[2] - data.lineCoordinates[2]);\n    line.setAttribute(\"y2\", data.rect[3] - data.lineCoordinates[3]);\n    // Ensure that the 'stroke-width' is always non-zero, since otherwise it\n    // won't be possible to open/close the popup (note e.g. issue 11122).\n    line.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n    line.setAttribute(\"stroke\", \"transparent\");\n    line.setAttribute(\"fill\", \"transparent\");\n\n    svg.append(line);\n    this.container.append(svg);\n\n    // Create the popup ourselves so that we can bind it to the line instead\n    // of to the entire container (which is the default).\n    if (!data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    return this.container;\n  }\n\n  getElementsToTriggerPopup() {\n    return this.#line;\n  }\n\n  addHighlightArea() {\n    this.container.classList.add(\"highlightArea\");\n  }\n}\n\nclass SquareAnnotationElement extends AnnotationElement {\n  #square = null;\n\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n  }\n\n  render() {\n    this.container.classList.add(\"squareAnnotation\");\n\n    // Create an invisible square with the same rectangle that acts as the\n    // trigger for the popup. Only the square itself should trigger the\n    // popup, not the entire container.\n    const data = this.data;\n    const { width, height } = getRectDims(data.rect);\n    const svg = this.svgFactory.create(\n      width,\n      height,\n      /* skipDimensions = */ true\n    );\n\n    // The browser draws half of the borders inside the square and half of\n    // the borders outside the square by default. This behavior cannot be\n    // changed programmatically, so correct for that here.\n    const borderWidth = data.borderStyle.width;\n    const square = (this.#square = this.svgFactory.createElement(\"svg:rect\"));\n    square.setAttribute(\"x\", borderWidth / 2);\n    square.setAttribute(\"y\", borderWidth / 2);\n    square.setAttribute(\"width\", width - borderWidth);\n    square.setAttribute(\"height\", height - borderWidth);\n    // Ensure that the 'stroke-width' is always non-zero, since otherwise it\n    // won't be possible to open/close the popup (note e.g. issue 11122).\n    square.setAttribute(\"stroke-width\", borderWidth || 1);\n    square.setAttribute(\"stroke\", \"transparent\");\n    square.setAttribute(\"fill\", \"transparent\");\n\n    svg.append(square);\n    this.container.append(svg);\n\n    // Create the popup ourselves so that we can bind it to the square instead\n    // of to the entire container (which is the default).\n    if (!data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    return this.container;\n  }\n\n  getElementsToTriggerPopup() {\n    return this.#square;\n  }\n\n  addHighlightArea() {\n    this.container.classList.add(\"highlightArea\");\n  }\n}\n\nclass CircleAnnotationElement extends AnnotationElement {\n  #circle = null;\n\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n  }\n\n  render() {\n    this.container.classList.add(\"circleAnnotation\");\n\n    // Create an invisible circle with the same ellipse that acts as the\n    // trigger for the popup. Only the circle itself should trigger the\n    // popup, not the entire container.\n    const data = this.data;\n    const { width, height } = getRectDims(data.rect);\n    const svg = this.svgFactory.create(\n      width,\n      height,\n      /* skipDimensions = */ true\n    );\n\n    // The browser draws half of the borders inside the circle and half of\n    // the borders outside the circle by default. This behavior cannot be\n    // changed programmatically, so correct for that here.\n    const borderWidth = data.borderStyle.width;\n    const circle = (this.#circle =\n      this.svgFactory.createElement(\"svg:ellipse\"));\n    circle.setAttribute(\"cx\", width / 2);\n    circle.setAttribute(\"cy\", height / 2);\n    circle.setAttribute(\"rx\", width / 2 - borderWidth / 2);\n    circle.setAttribute(\"ry\", height / 2 - borderWidth / 2);\n    // Ensure that the 'stroke-width' is always non-zero, since otherwise it\n    // won't be possible to open/close the popup (note e.g. issue 11122).\n    circle.setAttribute(\"stroke-width\", borderWidth || 1);\n    circle.setAttribute(\"stroke\", \"transparent\");\n    circle.setAttribute(\"fill\", \"transparent\");\n\n    svg.append(circle);\n    this.container.append(svg);\n\n    // Create the popup ourselves so that we can bind it to the circle instead\n    // of to the entire container (which is the default).\n    if (!data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    return this.container;\n  }\n\n  getElementsToTriggerPopup() {\n    return this.#circle;\n  }\n\n  addHighlightArea() {\n    this.container.classList.add(\"highlightArea\");\n  }\n}\n\nclass PolylineAnnotationElement extends AnnotationElement {\n  #polyline = null;\n\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n\n    this.containerClassName = \"polylineAnnotation\";\n    this.svgElementName = \"svg:polyline\";\n  }\n\n  render() {\n    this.container.classList.add(this.containerClassName);\n\n    // Create an invisible polyline with the same points that acts as the\n    // trigger for the popup. Only the polyline itself should trigger the\n    // popup, not the entire container.\n    const data = this.data;\n    const { width, height } = getRectDims(data.rect);\n    const svg = this.svgFactory.create(\n      width,\n      height,\n      /* skipDimensions = */ true\n    );\n\n    // Convert the vertices array to a single points string that the SVG\n    // polyline element expects (\"x1,y1 x2,y2 ...\"). PDF coordinates are\n    // calculated from a bottom left origin, so transform the polyline\n    // coordinates to a top left origin for the SVG element.\n    let points = [];\n    for (const coordinate of data.vertices) {\n      const x = coordinate.x - data.rect[0];\n      const y = data.rect[3] - coordinate.y;\n      points.push(x + \",\" + y);\n    }\n    points = points.join(\" \");\n\n    const polyline = (this.#polyline = this.svgFactory.createElement(\n      this.svgElementName\n    ));\n    polyline.setAttribute(\"points\", points);\n    // Ensure that the 'stroke-width' is always non-zero, since otherwise it\n    // won't be possible to open/close the popup (note e.g. issue 11122).\n    polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n    polyline.setAttribute(\"stroke\", \"transparent\");\n    polyline.setAttribute(\"fill\", \"transparent\");\n\n    svg.append(polyline);\n    this.container.append(svg);\n\n    // Create the popup ourselves so that we can bind it to the polyline\n    // instead of to the entire container (which is the default).\n    if (!data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    return this.container;\n  }\n\n  getElementsToTriggerPopup() {\n    return this.#polyline;\n  }\n\n  addHighlightArea() {\n    this.container.classList.add(\"highlightArea\");\n  }\n}\n\nclass PolygonAnnotationElement extends PolylineAnnotationElement {\n  constructor(parameters) {\n    // Polygons are specific forms of polylines, so reuse their logic.\n    super(parameters);\n\n    this.containerClassName = \"polygonAnnotation\";\n    this.svgElementName = \"svg:polygon\";\n  }\n}\n\nclass CaretAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n  }\n\n  render() {\n    this.container.classList.add(\"caretAnnotation\");\n\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n    return this.container;\n  }\n}\n\nclass InkAnnotationElement extends AnnotationElement {\n  #polylines = [];\n\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n\n    this.containerClassName = \"inkAnnotation\";\n\n    // Use the polyline SVG element since it allows us to use coordinates\n    // directly and to draw both straight lines and curves.\n    this.svgElementName = \"svg:polyline\";\n    this.annotationEditorType = AnnotationEditorType.INK;\n  }\n\n  render() {\n    this.container.classList.add(this.containerClassName);\n\n    // Create an invisible polyline with the same points that acts as the\n    // trigger for the popup.\n    const data = this.data;\n    const { width, height } = getRectDims(data.rect);\n    const svg = this.svgFactory.create(\n      width,\n      height,\n      /* skipDimensions = */ true\n    );\n\n    for (const inkList of data.inkLists) {\n      // Convert the ink list to a single points string that the SVG\n      // polyline element expects (\"x1,y1 x2,y2 ...\"). PDF coordinates are\n      // calculated from a bottom left origin, so transform the polyline\n      // coordinates to a top left origin for the SVG element.\n      let points = [];\n      for (const coordinate of inkList) {\n        const x = coordinate.x - data.rect[0];\n        const y = data.rect[3] - coordinate.y;\n        points.push(`${x},${y}`);\n      }\n      points = points.join(\" \");\n\n      const polyline = this.svgFactory.createElement(this.svgElementName);\n      this.#polylines.push(polyline);\n      polyline.setAttribute(\"points\", points);\n      // Ensure that the 'stroke-width' is always non-zero, since otherwise it\n      // won't be possible to open/close the popup (note e.g. issue 11122).\n      polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n      polyline.setAttribute(\"stroke\", \"transparent\");\n      polyline.setAttribute(\"fill\", \"transparent\");\n\n      // Create the popup ourselves so that we can bind it to the polyline\n      // instead of to the entire container (which is the default).\n      if (!data.popupRef && this.hasPopupData) {\n        this._createPopup();\n      }\n\n      svg.append(polyline);\n    }\n\n    this.container.append(svg);\n    return this.container;\n  }\n\n  getElementsToTriggerPopup() {\n    return this.#polylines;\n  }\n\n  addHighlightArea() {\n    this.container.classList.add(\"highlightArea\");\n  }\n}\n\nclass HighlightAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, {\n      isRenderable: true,\n      ignoreBorder: true,\n      createQuadrilaterals: true,\n    });\n  }\n\n  render() {\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    this.container.classList.add(\"highlightAnnotation\");\n    return this.container;\n  }\n}\n\nclass UnderlineAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, {\n      isRenderable: true,\n      ignoreBorder: true,\n      createQuadrilaterals: true,\n    });\n  }\n\n  render() {\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    this.container.classList.add(\"underlineAnnotation\");\n    return this.container;\n  }\n}\n\nclass SquigglyAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, {\n      isRenderable: true,\n      ignoreBorder: true,\n      createQuadrilaterals: true,\n    });\n  }\n\n  render() {\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    this.container.classList.add(\"squigglyAnnotation\");\n    return this.container;\n  }\n}\n\nclass StrikeOutAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, {\n      isRenderable: true,\n      ignoreBorder: true,\n      createQuadrilaterals: true,\n    });\n  }\n\n  render() {\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n\n    this.container.classList.add(\"strikeoutAnnotation\");\n    return this.container;\n  }\n}\n\nclass StampAnnotationElement extends AnnotationElement {\n  constructor(parameters) {\n    super(parameters, { isRenderable: true, ignoreBorder: true });\n  }\n\n  render() {\n    this.container.classList.add(\"stampAnnotation\");\n\n    if (!this.data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    }\n    return this.container;\n  }\n}\n\nclass FileAttachmentAnnotationElement extends AnnotationElement {\n  #trigger = null;\n\n  constructor(parameters) {\n    super(parameters, { isRenderable: true });\n\n    const { filename, content } = this.data.file;\n    this.filename = getFilenameFromUrl(filename, /* onlyStripPath = */ true);\n    this.content = content;\n\n    this.linkService.eventBus?.dispatch(\"fileattachmentannotation\", {\n      source: this,\n      filename,\n      content,\n    });\n  }\n\n  render() {\n    this.container.classList.add(\"fileAttachmentAnnotation\");\n\n    const { container, data } = this;\n    let trigger;\n    if (data.hasAppearance || data.fillAlpha === 0) {\n      trigger = document.createElement(\"div\");\n    } else {\n      // Unfortunately it seems that it's not clearly specified exactly what\n      // names are actually valid, since Table 184 contains:\n      //   Conforming readers shall provide predefined icon appearances for at\n      //   least the following standard names: GraphPushPin, PaperclipTag.\n      //   Additional names may be supported as well. Default value: PushPin.\n      trigger = document.createElement(\"img\");\n      trigger.src = `${this.imageResourcesPath}annotation-${\n        /paperclip/i.test(data.name) ? \"paperclip\" : \"pushpin\"\n      }.svg`;\n\n      if (data.fillAlpha && data.fillAlpha < 1) {\n        trigger.style = `filter: opacity(${Math.round(\n          data.fillAlpha * 100\n        )}%);`;\n\n        if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n          this.container.classList.add(\"hasFillAlpha\");\n        }\n      }\n    }\n    trigger.addEventListener(\"dblclick\", this.#download.bind(this));\n    this.#trigger = trigger;\n\n    const { isMac } = FeatureTest.platform;\n    container.addEventListener(\"keydown\", evt => {\n      if (evt.key === \"Enter\" && (isMac ? evt.metaKey : evt.ctrlKey)) {\n        this.#download();\n      }\n    });\n\n    if (!data.popupRef && this.hasPopupData) {\n      this._createPopup();\n    } else {\n      trigger.classList.add(\"popupTriggerArea\");\n    }\n\n    container.append(trigger);\n    return container;\n  }\n\n  getElementsToTriggerPopup() {\n    return this.#trigger;\n  }\n\n  addHighlightArea() {\n    this.container.classList.add(\"highlightArea\");\n  }\n\n  /**\n   * Download the file attachment associated with this annotation.\n   */\n  #download() {\n    this.downloadManager?.openOrDownloadData(\n      this.container,\n      this.content,\n      this.filename\n    );\n  }\n}\n\n/**\n * @typedef {Object} AnnotationLayerParameters\n * @property {PageViewport} viewport\n * @property {HTMLDivElement} div\n * @property {Array} annotations\n * @property {PDFPageProxy} page\n * @property {IPDFLinkService} linkService\n * @property {IDownloadManager} downloadManager\n * @property {AnnotationStorage} [annotationStorage]\n * @property {string} [imageResourcesPath] - Path for image resources, mainly\n *   for annotation icons. Include trailing slash.\n * @property {boolean} renderForms\n * @property {boolean} [enableScripting] - Enable embedded script execution.\n * @property {boolean} [hasJSActions] - Some fields have JS actions.\n *   The default value is `false`.\n * @property {Object<string, Array<Object>> | null} [fieldObjects]\n * @property {Map<string, HTMLCanvasElement>} [annotationCanvasMap]\n * @property {TextAccessibilityManager} [accessibilityManager]\n */\n\n/**\n * Manage the layer containing all the annotations.\n */\nclass AnnotationLayer {\n  #accessibilityManager = null;\n\n  #annotationCanvasMap = null;\n\n  #editableAnnotations = new Map();\n\n  constructor({\n    div,\n    accessibilityManager,\n    annotationCanvasMap,\n    l10n,\n    page,\n    viewport,\n  }) {\n    this.div = div;\n    this.#accessibilityManager = accessibilityManager;\n    this.#annotationCanvasMap = annotationCanvasMap;\n    this.l10n = l10n;\n    this.page = page;\n    this.viewport = viewport;\n    this.zIndex = 0;\n\n    if (\n      typeof PDFJSDev !== \"undefined\" &&\n      PDFJSDev.test(\"GENERIC && !TESTING\")\n    ) {\n      this.l10n ||= NullL10n;\n    }\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n      // For testing purposes.\n      Object.defineProperty(this, \"showPopups\", {\n        value: async () => {\n          for (const show of this.popupShow) {\n            await show();\n          }\n        },\n      });\n      this.popupShow = [];\n    }\n  }\n\n  #appendElement(element, id) {\n    const contentElement = element.firstChild || element;\n    contentElement.id = `${AnnotationPrefix}${id}`;\n\n    this.div.append(element);\n    this.#accessibilityManager?.moveElementInDOM(\n      this.div,\n      element,\n      contentElement,\n      /* isRemovable = */ false\n    );\n  }\n\n  /**\n   * Render a new annotation layer with all annotation elements.\n   *\n   * @param {AnnotationLayerParameters} params\n   * @memberof AnnotationLayer\n   */\n  async render(params) {\n    const { annotations } = params;\n    const layer = this.div;\n    setLayerDimensions(layer, this.viewport);\n\n    const popupToElements = new Map();\n    const elementParams = {\n      data: null,\n      layer,\n      linkService: params.linkService,\n      downloadManager: params.downloadManager,\n      imageResourcesPath: params.imageResourcesPath || \"\",\n      renderForms: params.renderForms !== false,\n      svgFactory: new DOMSVGFactory(),\n      annotationStorage: params.annotationStorage || new AnnotationStorage(),\n      enableScripting: params.enableScripting === true,\n      hasJSActions: params.hasJSActions,\n      fieldObjects: params.fieldObjects,\n      parent: this,\n      elements: null,\n    };\n\n    for (const data of annotations) {\n      if (data.noHTML) {\n        continue;\n      }\n      const isPopupAnnotation = data.annotationType === AnnotationType.POPUP;\n      if (!isPopupAnnotation) {\n        const { width, height } = getRectDims(data.rect);\n        if (width <= 0 || height <= 0) {\n          continue; // Ignore empty annotations.\n        }\n      } else {\n        const elements = popupToElements.get(data.id);\n        if (!elements) {\n          // Ignore popup annotations without a corresponding annotation.\n          continue;\n        }\n        elementParams.elements = elements;\n      }\n      elementParams.data = data;\n      const element = AnnotationElementFactory.create(elementParams);\n\n      if (!element.isRenderable) {\n        continue;\n      }\n\n      if (!isPopupAnnotation && data.popupRef) {\n        const elements = popupToElements.get(data.popupRef);\n        if (!elements) {\n          popupToElements.set(data.popupRef, [element]);\n        } else {\n          elements.push(element);\n        }\n      }\n\n      if (element.annotationEditorType > 0) {\n        this.#editableAnnotations.set(element.data.id, element);\n      }\n\n      const rendered = element.render();\n      if (data.hidden) {\n        rendered.style.visibility = \"hidden\";\n      }\n      this.#appendElement(rendered, data.id);\n    }\n\n    this.#setAnnotationCanvasMap();\n\n    await this.l10n.translate(layer);\n  }\n\n  /**\n   * Update the annotation elements on existing annotation layer.\n   *\n   * @param {AnnotationLayerParameters} viewport\n   * @memberof AnnotationLayer\n   */\n  update({ viewport }) {\n    const layer = this.div;\n    this.viewport = viewport;\n    setLayerDimensions(layer, { rotation: viewport.rotation });\n\n    this.#setAnnotationCanvasMap();\n    layer.hidden = false;\n  }\n\n  #setAnnotationCanvasMap() {\n    if (!this.#annotationCanvasMap) {\n      return;\n    }\n    const layer = this.div;\n    for (const [id, canvas] of this.#annotationCanvasMap) {\n      const element = layer.querySelector(`[data-annotation-id=\"${id}\"]`);\n      if (!element) {\n        continue;\n      }\n\n      const { firstChild } = element;\n      if (!firstChild) {\n        element.append(canvas);\n      } else if (firstChild.nodeName === \"CANVAS\") {\n        firstChild.replaceWith(canvas);\n      } else {\n        firstChild.before(canvas);\n      }\n    }\n    this.#annotationCanvasMap.clear();\n  }\n\n  getEditableAnnotations() {\n    return Array.from(this.#editableAnnotations.values());\n  }\n\n  getEditableAnnotation(id) {\n    return this.#editableAnnotations.get(id);\n  }\n}\n\nexport {\n  AnnotationLayer,\n  FreeTextAnnotationElement,\n  InkAnnotationElement,\n  StampAnnotationElement,\n};\n","/* Copyright 2020 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * PLEASE NOTE: This file is currently imported in both the `../display/` and\n *              `../scripting_api/` folders, hence be EXTREMELY careful about\n *              introducing any dependencies here since that can lead to an\n *              unexpected/unnecessary size increase of the *built* files.\n */\n\nfunction makeColorComp(n) {\n  return Math.floor(Math.max(0, Math.min(1, n)) * 255)\n    .toString(16)\n    .padStart(2, \"0\");\n}\n\nfunction scaleAndClamp(x) {\n  return Math.max(0, Math.min(255, 255 * x));\n}\n\n// PDF specifications section 10.3\nclass ColorConverters {\n  static CMYK_G([c, y, m, k]) {\n    return [\"G\", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)];\n  }\n\n  static G_CMYK([g]) {\n    return [\"CMYK\", 0, 0, 0, 1 - g];\n  }\n\n  static G_RGB([g]) {\n    return [\"RGB\", g, g, g];\n  }\n\n  static G_rgb([g]) {\n    g = scaleAndClamp(g);\n    return [g, g, g];\n  }\n\n  static G_HTML([g]) {\n    const G = makeColorComp(g);\n    return `#${G}${G}${G}`;\n  }\n\n  static RGB_G([r, g, b]) {\n    return [\"G\", 0.3 * r + 0.59 * g + 0.11 * b];\n  }\n\n  static RGB_rgb(color) {\n    return color.map(scaleAndClamp);\n  }\n\n  static RGB_HTML(color) {\n    return `#${color.map(makeColorComp).join(\"\")}`;\n  }\n\n  static T_HTML() {\n    return \"#00000000\";\n  }\n\n  static T_rgb() {\n    return [null];\n  }\n\n  static CMYK_RGB([c, y, m, k]) {\n    return [\n      \"RGB\",\n      1 - Math.min(1, c + k),\n      1 - Math.min(1, m + k),\n      1 - Math.min(1, y + k),\n    ];\n  }\n\n  static CMYK_rgb([c, y, m, k]) {\n    return [\n      scaleAndClamp(1 - Math.min(1, c + k)),\n      scaleAndClamp(1 - Math.min(1, m + k)),\n      scaleAndClamp(1 - Math.min(1, y + k)),\n    ];\n  }\n\n  static CMYK_HTML(components) {\n    const rgb = this.CMYK_RGB(components).slice(1);\n    return this.RGB_HTML(rgb);\n  }\n\n  static RGB_CMYK([r, g, b]) {\n    const c = 1 - r;\n    const m = 1 - g;\n    const y = 1 - b;\n    const k = Math.min(c, m, y);\n    return [\"CMYK\", c, m, y, k];\n  }\n}\n\nexport { ColorConverters };\n","/* Copyright 2021 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * PLEASE NOTE: This file is currently imported in both the `web/` and\n *              `src/display/` folders, hence be EXTREMELY careful about\n *              introducing any dependencies here since that can lead to an\n *              unexpected/unnecessary size increase of the *built* files.\n */\n\n/**\n * A subset of the l10n strings in the `l10n/en-US/viewer.properties` file.\n */\nconst DEFAULT_L10N_STRINGS = {\n  of_pages: \"of {{pagesCount}}\",\n  page_of_pages: \"({{pageNumber}} of {{pagesCount}})\",\n\n  document_properties_kb: \"{{size_kb}} KB ({{size_b}} bytes)\",\n  document_properties_mb: \"{{size_mb}} MB ({{size_b}} bytes)\",\n  document_properties_date_string: \"{{date}}, {{time}}\",\n  document_properties_page_size_unit_inches: \"in\",\n  document_properties_page_size_unit_millimeters: \"mm\",\n  document_properties_page_size_orientation_portrait: \"portrait\",\n  document_properties_page_size_orientation_landscape: \"landscape\",\n  document_properties_page_size_name_a3: \"A3\",\n  document_properties_page_size_name_a4: \"A4\",\n  document_properties_page_size_name_letter: \"Letter\",\n  document_properties_page_size_name_legal: \"Legal\",\n  document_properties_page_size_dimension_string:\n    \"{{width}} × {{height}} {{unit}} ({{orientation}})\",\n  document_properties_page_size_dimension_name_string:\n    \"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})\",\n  document_properties_linearized_yes: \"Yes\",\n  document_properties_linearized_no: \"No\",\n\n  additional_layers: \"Additional Layers\",\n  page_landmark: \"Page {{page}}\",\n  thumb_page_title: \"Page {{page}}\",\n  thumb_page_canvas: \"Thumbnail of Page {{page}}\",\n\n  find_reached_top: \"Reached top of document, continued from bottom\",\n  find_reached_bottom: \"Reached end of document, continued from top\",\n  \"find_match_count[one]\": \"{{current}} of {{total}} match\",\n  \"find_match_count[other]\": \"{{current}} of {{total}} matches\",\n  \"find_match_count_limit[one]\": \"More than {{limit}} match\",\n  \"find_match_count_limit[other]\": \"More than {{limit}} matches\",\n  find_not_found: \"Phrase not found\",\n\n  page_scale_width: \"Page Width\",\n  page_scale_fit: \"Page Fit\",\n  page_scale_auto: \"Automatic Zoom\",\n  page_scale_actual: \"Actual Size\",\n  page_scale_percent: \"{{scale}}%\",\n\n  loading_error: \"An error occurred while loading the PDF.\",\n  invalid_file_error: \"Invalid or corrupted PDF file.\",\n  missing_file_error: \"Missing PDF file.\",\n  unexpected_response_error: \"Unexpected server response.\",\n  rendering_error: \"An error occurred while rendering the page.\",\n\n  annotation_date_string: \"{{date}}, {{time}}\",\n\n  printing_not_supported:\n    \"Warning: Printing is not fully supported by this browser.\",\n  printing_not_ready: \"Warning: The PDF is not fully loaded for printing.\",\n  web_fonts_disabled:\n    \"Web fonts are disabled: unable to use embedded PDF fonts.\",\n\n  free_text2_default_content: \"Start typing…\",\n  editor_free_text2_aria_label: \"Text Editor\",\n  editor_ink2_aria_label: \"Draw Editor\",\n  editor_ink_canvas_aria_label: \"User-created image\",\n  editor_alt_text_button_label: \"Alt text\",\n  editor_alt_text_edit_button_label: \"Edit alt text\",\n  editor_alt_text_decorative_tooltip: \"Marked as decorative\",\n};\nif (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"MOZCENTRAL\")) {\n  DEFAULT_L10N_STRINGS.print_progress_percent = \"{{progress}}%\";\n}\n\nfunction getL10nFallback(key, args) {\n  switch (key) {\n    case \"find_match_count\":\n      key = `find_match_count[${args.total === 1 ? \"one\" : \"other\"}]`;\n      break;\n    case \"find_match_count_limit\":\n      key = `find_match_count_limit[${args.limit === 1 ? \"one\" : \"other\"}]`;\n      break;\n  }\n  return DEFAULT_L10N_STRINGS[key] || \"\";\n}\n\n// Replaces {{arguments}} with their values.\nfunction formatL10nValue(text, args) {\n  if (!args) {\n    return text;\n  }\n  return text.replaceAll(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (all, name) => {\n    return name in args ? args[name] : \"{{\" + name + \"}}\";\n  });\n}\n\n/**\n * No-op implementation of the localization service.\n * @implements {IL10n}\n */\nconst NullL10n = {\n  async getLanguage() {\n    return \"en-us\";\n  },\n\n  async getDirection() {\n    return \"ltr\";\n  },\n\n  async get(key, args = null, fallback = getL10nFallback(key, args)) {\n    return formatL10nValue(fallback, args);\n  },\n\n  async translate(element) {},\n};\n\nexport { getL10nFallback, NullL10n };\n","/* Copyright 2021 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./annotation_storage\").AnnotationStorage} AnnotationStorage */\n/** @typedef {import(\"./display_utils\").PageViewport} PageViewport */\n/** @typedef {import(\"../../web/interfaces\").IPDFLinkService} IPDFLinkService */\n\nimport { XfaText } from \"./xfa_text.js\";\n\n/**\n * @typedef {Object} XfaLayerParameters\n * @property {PageViewport} viewport\n * @property {HTMLDivElement} div\n * @property {Object} xfaHtml\n * @property {AnnotationStorage} [annotationStorage]\n * @property {IPDFLinkService} linkService\n * @property {string} [intent] - (default value is 'display').\n */\n\nclass XfaLayer {\n  static setupStorage(html, id, element, storage, intent) {\n    const storedData = storage.getValue(id, { value: null });\n    switch (element.name) {\n      case \"textarea\":\n        if (storedData.value !== null) {\n          html.textContent = storedData.value;\n        }\n        if (intent === \"print\") {\n          break;\n        }\n        html.addEventListener(\"input\", event => {\n          storage.setValue(id, { value: event.target.value });\n        });\n        break;\n      case \"input\":\n        if (\n          element.attributes.type === \"radio\" ||\n          element.attributes.type === \"checkbox\"\n        ) {\n          if (storedData.value === element.attributes.xfaOn) {\n            html.setAttribute(\"checked\", true);\n          } else if (storedData.value === element.attributes.xfaOff) {\n            // The checked attribute may have been set when opening the file,\n            // unset through the UI and we're here because of printing.\n            html.removeAttribute(\"checked\");\n          }\n          if (intent === \"print\") {\n            break;\n          }\n          html.addEventListener(\"change\", event => {\n            storage.setValue(id, {\n              value: event.target.checked\n                ? event.target.getAttribute(\"xfaOn\")\n                : event.target.getAttribute(\"xfaOff\"),\n            });\n          });\n        } else {\n          if (storedData.value !== null) {\n            html.setAttribute(\"value\", storedData.value);\n          }\n          if (intent === \"print\") {\n            break;\n          }\n          html.addEventListener(\"input\", event => {\n            storage.setValue(id, { value: event.target.value });\n          });\n        }\n        break;\n      case \"select\":\n        if (storedData.value !== null) {\n          html.setAttribute(\"value\", storedData.value);\n          for (const option of element.children) {\n            if (option.attributes.value === storedData.value) {\n              option.attributes.selected = true;\n            } else if (option.attributes.hasOwnProperty(\"selected\")) {\n              delete option.attributes.selected;\n            }\n          }\n        }\n        html.addEventListener(\"input\", event => {\n          const options = event.target.options;\n          const value =\n            options.selectedIndex === -1\n              ? \"\"\n              : options[options.selectedIndex].value;\n          storage.setValue(id, { value });\n        });\n        break;\n    }\n  }\n\n  static setAttributes({ html, element, storage = null, intent, linkService }) {\n    const { attributes } = element;\n    const isHTMLAnchorElement = html instanceof HTMLAnchorElement;\n\n    if (attributes.type === \"radio\") {\n      // Avoid to have a radio group when printing with the same as one\n      // already displayed.\n      attributes.name = `${attributes.name}-${intent}`;\n    }\n    for (const [key, value] of Object.entries(attributes)) {\n      if (value === null || value === undefined) {\n        continue;\n      }\n\n      switch (key) {\n        case \"class\":\n          if (value.length) {\n            html.setAttribute(key, value.join(\" \"));\n          }\n          break;\n        case \"dataId\":\n          // We don't need to add dataId in the html object but it can\n          // be useful to know its value when writing printing tests:\n          // in this case, don't skip dataId to have its value.\n          break;\n        case \"id\":\n          html.setAttribute(\"data-element-id\", value);\n          break;\n        case \"style\":\n          Object.assign(html.style, value);\n          break;\n        case \"textContent\":\n          html.textContent = value;\n          break;\n        default:\n          if (!isHTMLAnchorElement || (key !== \"href\" && key !== \"newWindow\")) {\n            html.setAttribute(key, value);\n          }\n      }\n    }\n\n    if (isHTMLAnchorElement) {\n      linkService.addLinkAttributes(\n        html,\n        attributes.href,\n        attributes.newWindow\n      );\n    }\n\n    // Set the value after the others to be sure to overwrite any other values.\n    if (storage && attributes.dataId) {\n      this.setupStorage(html, attributes.dataId, element, storage);\n    }\n  }\n\n  /**\n   * Render the XFA layer.\n   *\n   * @param {XfaLayerParameters} parameters\n   */\n  static render(parameters) {\n    const storage = parameters.annotationStorage;\n    const linkService = parameters.linkService;\n    const root = parameters.xfaHtml;\n    const intent = parameters.intent || \"display\";\n    const rootHtml = document.createElement(root.name);\n    if (root.attributes) {\n      this.setAttributes({\n        html: rootHtml,\n        element: root,\n        intent,\n        linkService,\n      });\n    }\n    const stack = [[root, -1, rootHtml]];\n\n    const rootDiv = parameters.div;\n    rootDiv.append(rootHtml);\n\n    if (parameters.viewport) {\n      const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n      rootDiv.style.transform = transform;\n    }\n\n    // Set defaults.\n    if (intent !== \"richText\") {\n      rootDiv.setAttribute(\"class\", \"xfaLayer xfaFont\");\n    }\n\n    // Text nodes used for the text highlighter.\n    const textDivs = [];\n\n    while (stack.length > 0) {\n      const [parent, i, html] = stack.at(-1);\n      if (i + 1 === parent.children.length) {\n        stack.pop();\n        continue;\n      }\n\n      const child = parent.children[++stack.at(-1)[1]];\n      if (child === null) {\n        continue;\n      }\n\n      const { name } = child;\n      if (name === \"#text\") {\n        const node = document.createTextNode(child.value);\n        textDivs.push(node);\n        html.append(node);\n        continue;\n      }\n\n      const childHtml = child?.attributes?.xmlns\n        ? document.createElementNS(child.attributes.xmlns, name)\n        : document.createElement(name);\n\n      html.append(childHtml);\n      if (child.attributes) {\n        this.setAttributes({\n          html: childHtml,\n          element: child,\n          storage,\n          intent,\n          linkService,\n        });\n      }\n\n      if (child.children && child.children.length > 0) {\n        stack.push([child, -1, childHtml]);\n      } else if (child.value) {\n        const node = document.createTextNode(child.value);\n        if (XfaText.shouldBuildText(name)) {\n          textDivs.push(node);\n        }\n        childHtml.append(node);\n      }\n    }\n\n    /**\n     * TODO: re-enable that stuff once we've JS implementation.\n     * See https://bugzilla.mozilla.org/show_bug.cgi?id=1719465.\n     *\n     * for (const el of rootDiv.querySelectorAll(\n     * \".xfaDisabled input, .xfaDisabled textarea\"\n     * )) {\n     * el.setAttribute(\"disabled\", true);\n     * }\n     * for (const el of rootDiv.querySelectorAll(\n     * \".xfaReadOnly input, .xfaReadOnly textarea\"\n     * )) {\n     * el.setAttribute(\"readOnly\", true);\n     * }\n     */\n\n    for (const el of rootDiv.querySelectorAll(\n      \".xfaNonInteractive input, .xfaNonInteractive textarea\"\n    )) {\n      el.setAttribute(\"readOnly\", true);\n    }\n\n    return {\n      textDivs,\n    };\n  }\n\n  /**\n   * Update the XFA layer.\n   *\n   * @param {XfaLayerParameters} parameters\n   */\n  static update(parameters) {\n    const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n    parameters.div.style.transform = transform;\n    parameters.div.hidden = false;\n  }\n}\n\nexport { XfaLayer };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  AnnotationEditorParamsType,\n  AnnotationEditorType,\n  Util,\n} from \"../../shared/util.js\";\nimport { AnnotationEditor } from \"./editor.js\";\nimport { InkAnnotationElement } from \"../annotation_layer.js\";\nimport { noContextMenu } from \"../display_utils.js\";\nimport { opacityToHex } from \"./tools.js\";\n\n/**\n * Basic draw editor in order to generate an Ink annotation.\n */\nclass InkEditor extends AnnotationEditor {\n  #baseHeight = 0;\n\n  #baseWidth = 0;\n\n  #boundCanvasPointermove = this.canvasPointermove.bind(this);\n\n  #boundCanvasPointerleave = this.canvasPointerleave.bind(this);\n\n  #boundCanvasPointerup = this.canvasPointerup.bind(this);\n\n  #boundCanvasPointerdown = this.canvasPointerdown.bind(this);\n\n  #currentPath2D = new Path2D();\n\n  #disableEditing = false;\n\n  #hasSomethingToDraw = false;\n\n  #isCanvasInitialized = false;\n\n  #observer = null;\n\n  #realWidth = 0;\n\n  #realHeight = 0;\n\n  #requestFrameCallback = null;\n\n  static _defaultColor = null;\n\n  static _defaultOpacity = 1;\n\n  static _defaultThickness = 1;\n\n  static _type = \"ink\";\n\n  constructor(params) {\n    super({ ...params, name: \"inkEditor\" });\n    this.color = params.color || null;\n    this.thickness = params.thickness || null;\n    this.opacity = params.opacity || null;\n    this.paths = [];\n    this.bezierPath2D = [];\n    this.allRawPaths = [];\n    this.currentPath = [];\n    this.scaleFactor = 1;\n    this.translationX = this.translationY = 0;\n    this.x = 0;\n    this.y = 0;\n    this._willKeepAspectRatio = true;\n  }\n\n  /** @inheritdoc */\n  static initialize(l10n) {\n    AnnotationEditor.initialize(l10n, {\n      strings: [\"editor_ink_canvas_aria_label\", \"editor_ink2_aria_label\"],\n    });\n  }\n\n  /** @inheritdoc */\n  static updateDefaultParams(type, value) {\n    switch (type) {\n      case AnnotationEditorParamsType.INK_THICKNESS:\n        InkEditor._defaultThickness = value;\n        break;\n      case AnnotationEditorParamsType.INK_COLOR:\n        InkEditor._defaultColor = value;\n        break;\n      case AnnotationEditorParamsType.INK_OPACITY:\n        InkEditor._defaultOpacity = value / 100;\n        break;\n    }\n  }\n\n  /** @inheritdoc */\n  updateParams(type, value) {\n    switch (type) {\n      case AnnotationEditorParamsType.INK_THICKNESS:\n        this.#updateThickness(value);\n        break;\n      case AnnotationEditorParamsType.INK_COLOR:\n        this.#updateColor(value);\n        break;\n      case AnnotationEditorParamsType.INK_OPACITY:\n        this.#updateOpacity(value);\n        break;\n    }\n  }\n\n  /** @inheritdoc */\n  static get defaultPropertiesToUpdate() {\n    return [\n      [AnnotationEditorParamsType.INK_THICKNESS, InkEditor._defaultThickness],\n      [\n        AnnotationEditorParamsType.INK_COLOR,\n        InkEditor._defaultColor || AnnotationEditor._defaultLineColor,\n      ],\n      [\n        AnnotationEditorParamsType.INK_OPACITY,\n        Math.round(InkEditor._defaultOpacity * 100),\n      ],\n    ];\n  }\n\n  /** @inheritdoc */\n  get propertiesToUpdate() {\n    return [\n      [\n        AnnotationEditorParamsType.INK_THICKNESS,\n        this.thickness || InkEditor._defaultThickness,\n      ],\n      [\n        AnnotationEditorParamsType.INK_COLOR,\n        this.color ||\n          InkEditor._defaultColor ||\n          AnnotationEditor._defaultLineColor,\n      ],\n      [\n        AnnotationEditorParamsType.INK_OPACITY,\n        Math.round(100 * (this.opacity ?? InkEditor._defaultOpacity)),\n      ],\n    ];\n  }\n\n  /**\n   * Update the thickness and make this action undoable.\n   * @param {number} thickness\n   */\n  #updateThickness(thickness) {\n    const savedThickness = this.thickness;\n    this.addCommands({\n      cmd: () => {\n        this.thickness = thickness;\n        this.#fitToContent();\n      },\n      undo: () => {\n        this.thickness = savedThickness;\n        this.#fitToContent();\n      },\n      mustExec: true,\n      type: AnnotationEditorParamsType.INK_THICKNESS,\n      overwriteIfSameType: true,\n      keepUndo: true,\n    });\n  }\n\n  /**\n   * Update the color and make this action undoable.\n   * @param {string} color\n   */\n  #updateColor(color) {\n    const savedColor = this.color;\n    this.addCommands({\n      cmd: () => {\n        this.color = color;\n        this.#redraw();\n      },\n      undo: () => {\n        this.color = savedColor;\n        this.#redraw();\n      },\n      mustExec: true,\n      type: AnnotationEditorParamsType.INK_COLOR,\n      overwriteIfSameType: true,\n      keepUndo: true,\n    });\n  }\n\n  /**\n   * Update the opacity and make this action undoable.\n   * @param {number} opacity\n   */\n  #updateOpacity(opacity) {\n    opacity /= 100;\n    const savedOpacity = this.opacity;\n    this.addCommands({\n      cmd: () => {\n        this.opacity = opacity;\n        this.#redraw();\n      },\n      undo: () => {\n        this.opacity = savedOpacity;\n        this.#redraw();\n      },\n      mustExec: true,\n      type: AnnotationEditorParamsType.INK_OPACITY,\n      overwriteIfSameType: true,\n      keepUndo: true,\n    });\n  }\n\n  /** @inheritdoc */\n  rebuild() {\n    if (!this.parent) {\n      return;\n    }\n    super.rebuild();\n    if (this.div === null) {\n      return;\n    }\n\n    if (!this.canvas) {\n      this.#createCanvas();\n      this.#createObserver();\n    }\n\n    if (!this.isAttachedToDOM) {\n      // At some point this editor was removed and we're rebuilding it,\n      // hence we must add it to its parent.\n      this.parent.add(this);\n      this.#setCanvasDims();\n    }\n    this.#fitToContent();\n  }\n\n  /** @inheritdoc */\n  remove() {\n    if (this.canvas === null) {\n      return;\n    }\n\n    if (!this.isEmpty()) {\n      this.commit();\n    }\n\n    // Destroy the canvas.\n    this.canvas.width = this.canvas.height = 0;\n    this.canvas.remove();\n    this.canvas = null;\n\n    this.#observer.disconnect();\n    this.#observer = null;\n\n    super.remove();\n  }\n\n  setParent(parent) {\n    if (!this.parent && parent) {\n      // We've a parent hence the rescale will be handled thanks to the\n      // ResizeObserver.\n      this._uiManager.removeShouldRescale(this);\n    } else if (this.parent && parent === null) {\n      // The editor is removed from the DOM, hence we handle the rescale thanks\n      // to the onScaleChanging callback.\n      // This way, it'll be saved/printed correctly.\n      this._uiManager.addShouldRescale(this);\n    }\n    super.setParent(parent);\n  }\n\n  onScaleChanging() {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    const width = this.width * parentWidth;\n    const height = this.height * parentHeight;\n    this.setDimensions(width, height);\n  }\n\n  /** @inheritdoc */\n  enableEditMode() {\n    if (this.#disableEditing || this.canvas === null) {\n      return;\n    }\n\n    super.enableEditMode();\n    this._isDraggable = false;\n    this.canvas.addEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n  }\n\n  /** @inheritdoc */\n  disableEditMode() {\n    if (!this.isInEditMode() || this.canvas === null) {\n      return;\n    }\n\n    super.disableEditMode();\n    this._isDraggable = !this.isEmpty();\n    this.div.classList.remove(\"editing\");\n\n    this.canvas.removeEventListener(\n      \"pointerdown\",\n      this.#boundCanvasPointerdown\n    );\n  }\n\n  /** @inheritdoc */\n  onceAdded() {\n    this._isDraggable = !this.isEmpty();\n  }\n\n  /** @inheritdoc */\n  isEmpty() {\n    return (\n      this.paths.length === 0 ||\n      (this.paths.length === 1 && this.paths[0].length === 0)\n    );\n  }\n\n  #getInitialBBox() {\n    const {\n      parentRotation,\n      parentDimensions: [width, height],\n    } = this;\n    switch (parentRotation) {\n      case 90:\n        return [0, height, height, width];\n      case 180:\n        return [width, height, width, height];\n      case 270:\n        return [width, 0, height, width];\n      default:\n        return [0, 0, width, height];\n    }\n  }\n\n  /**\n   * Set line styles.\n   */\n  #setStroke() {\n    const { ctx, color, opacity, thickness, parentScale, scaleFactor } = this;\n    ctx.lineWidth = (thickness * parentScale) / scaleFactor;\n    ctx.lineCap = \"round\";\n    ctx.lineJoin = \"round\";\n    ctx.miterLimit = 10;\n    ctx.strokeStyle = `${color}${opacityToHex(opacity)}`;\n  }\n\n  /**\n   * Start to draw on the canvas.\n   * @param {number} x\n   * @param {number} y\n   */\n  #startDrawing(x, y) {\n    this.canvas.addEventListener(\"contextmenu\", noContextMenu);\n    this.canvas.addEventListener(\"pointerleave\", this.#boundCanvasPointerleave);\n    this.canvas.addEventListener(\"pointermove\", this.#boundCanvasPointermove);\n    this.canvas.addEventListener(\"pointerup\", this.#boundCanvasPointerup);\n    this.canvas.removeEventListener(\n      \"pointerdown\",\n      this.#boundCanvasPointerdown\n    );\n\n    this.isEditing = true;\n    if (!this.#isCanvasInitialized) {\n      this.#isCanvasInitialized = true;\n      this.#setCanvasDims();\n      this.thickness ||= InkEditor._defaultThickness;\n      this.color ||=\n        InkEditor._defaultColor || AnnotationEditor._defaultLineColor;\n      this.opacity ??= InkEditor._defaultOpacity;\n    }\n    this.currentPath.push([x, y]);\n    this.#hasSomethingToDraw = false;\n    this.#setStroke();\n\n    this.#requestFrameCallback = () => {\n      this.#drawPoints();\n      if (this.#requestFrameCallback) {\n        window.requestAnimationFrame(this.#requestFrameCallback);\n      }\n    };\n    window.requestAnimationFrame(this.#requestFrameCallback);\n  }\n\n  /**\n   * Draw on the canvas.\n   * @param {number} x\n   * @param {number} y\n   */\n  #draw(x, y) {\n    const [lastX, lastY] = this.currentPath.at(-1);\n    if (this.currentPath.length > 1 && x === lastX && y === lastY) {\n      return;\n    }\n    const currentPath = this.currentPath;\n    let path2D = this.#currentPath2D;\n    currentPath.push([x, y]);\n    this.#hasSomethingToDraw = true;\n\n    if (currentPath.length <= 2) {\n      path2D.moveTo(...currentPath[0]);\n      path2D.lineTo(x, y);\n      return;\n    }\n\n    if (currentPath.length === 3) {\n      this.#currentPath2D = path2D = new Path2D();\n      path2D.moveTo(...currentPath[0]);\n    }\n\n    this.#makeBezierCurve(\n      path2D,\n      ...currentPath.at(-3),\n      ...currentPath.at(-2),\n      x,\n      y\n    );\n  }\n\n  #endPath() {\n    if (this.currentPath.length === 0) {\n      return;\n    }\n    const lastPoint = this.currentPath.at(-1);\n    this.#currentPath2D.lineTo(...lastPoint);\n  }\n\n  /**\n   * Stop to draw on the canvas.\n   * @param {number} x\n   * @param {number} y\n   */\n  #stopDrawing(x, y) {\n    this.#requestFrameCallback = null;\n\n    x = Math.min(Math.max(x, 0), this.canvas.width);\n    y = Math.min(Math.max(y, 0), this.canvas.height);\n\n    this.#draw(x, y);\n    this.#endPath();\n\n    // Interpolate the path entered by the user with some\n    // Bezier's curves in order to have a smoother path and\n    // to reduce the data size used to draw it in the PDF.\n    let bezier;\n    if (this.currentPath.length !== 1) {\n      bezier = this.#generateBezierPoints();\n    } else {\n      // We have only one point finally.\n      const xy = [x, y];\n      bezier = [[xy, xy.slice(), xy.slice(), xy]];\n    }\n    const path2D = this.#currentPath2D;\n    const currentPath = this.currentPath;\n    this.currentPath = [];\n    this.#currentPath2D = new Path2D();\n\n    const cmd = () => {\n      this.allRawPaths.push(currentPath);\n      this.paths.push(bezier);\n      this.bezierPath2D.push(path2D);\n      this.rebuild();\n    };\n\n    const undo = () => {\n      this.allRawPaths.pop();\n      this.paths.pop();\n      this.bezierPath2D.pop();\n      if (this.paths.length === 0) {\n        this.remove();\n      } else {\n        if (!this.canvas) {\n          this.#createCanvas();\n          this.#createObserver();\n        }\n        this.#fitToContent();\n      }\n    };\n\n    this.addCommands({ cmd, undo, mustExec: true });\n  }\n\n  #drawPoints() {\n    if (!this.#hasSomethingToDraw) {\n      return;\n    }\n    this.#hasSomethingToDraw = false;\n\n    const thickness = Math.ceil(this.thickness * this.parentScale);\n    const lastPoints = this.currentPath.slice(-3);\n    const x = lastPoints.map(xy => xy[0]);\n    const y = lastPoints.map(xy => xy[1]);\n    const xMin = Math.min(...x) - thickness;\n    const xMax = Math.max(...x) + thickness;\n    const yMin = Math.min(...y) - thickness;\n    const yMax = Math.max(...y) + thickness;\n\n    const { ctx } = this;\n    ctx.save();\n\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) {\n      // In Chrome, the clip() method doesn't work as expected.\n      ctx.clearRect(xMin, yMin, xMax - xMin, yMax - yMin);\n      ctx.beginPath();\n      ctx.rect(xMin, yMin, xMax - xMin, yMax - yMin);\n      ctx.clip();\n    } else {\n      ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n    }\n\n    for (const path of this.bezierPath2D) {\n      ctx.stroke(path);\n    }\n    ctx.stroke(this.#currentPath2D);\n\n    ctx.restore();\n  }\n\n  #makeBezierCurve(path2D, x0, y0, x1, y1, x2, y2) {\n    const prevX = (x0 + x1) / 2;\n    const prevY = (y0 + y1) / 2;\n    const x3 = (x1 + x2) / 2;\n    const y3 = (y1 + y2) / 2;\n\n    path2D.bezierCurveTo(\n      prevX + (2 * (x1 - prevX)) / 3,\n      prevY + (2 * (y1 - prevY)) / 3,\n      x3 + (2 * (x1 - x3)) / 3,\n      y3 + (2 * (y1 - y3)) / 3,\n      x3,\n      y3\n    );\n  }\n\n  #generateBezierPoints() {\n    const path = this.currentPath;\n    if (path.length <= 2) {\n      return [[path[0], path[0], path.at(-1), path.at(-1)]];\n    }\n\n    const bezierPoints = [];\n    let i;\n    let [x0, y0] = path[0];\n    for (i = 1; i < path.length - 2; i++) {\n      const [x1, y1] = path[i];\n      const [x2, y2] = path[i + 1];\n      const x3 = (x1 + x2) / 2;\n      const y3 = (y1 + y2) / 2;\n\n      // The quadratic is: [[x0, y0], [x1, y1], [x3, y3]].\n      // Convert the quadratic to a cubic\n      // (see https://fontforge.org/docs/techref/bezier.html#converting-truetype-to-postscript)\n      const control1 = [x0 + (2 * (x1 - x0)) / 3, y0 + (2 * (y1 - y0)) / 3];\n      const control2 = [x3 + (2 * (x1 - x3)) / 3, y3 + (2 * (y1 - y3)) / 3];\n\n      bezierPoints.push([[x0, y0], control1, control2, [x3, y3]]);\n\n      [x0, y0] = [x3, y3];\n    }\n\n    const [x1, y1] = path[i];\n    const [x2, y2] = path[i + 1];\n\n    // The quadratic is: [[x0, y0], [x1, y1], [x2, y2]].\n    const control1 = [x0 + (2 * (x1 - x0)) / 3, y0 + (2 * (y1 - y0)) / 3];\n    const control2 = [x2 + (2 * (x1 - x2)) / 3, y2 + (2 * (y1 - y2)) / 3];\n\n    bezierPoints.push([[x0, y0], control1, control2, [x2, y2]]);\n    return bezierPoints;\n  }\n\n  /**\n   * Redraw all the paths.\n   */\n  #redraw() {\n    if (this.isEmpty()) {\n      this.#updateTransform();\n      return;\n    }\n    this.#setStroke();\n\n    const { canvas, ctx } = this;\n    ctx.setTransform(1, 0, 0, 1, 0, 0);\n    ctx.clearRect(0, 0, canvas.width, canvas.height);\n    this.#updateTransform();\n\n    for (const path of this.bezierPath2D) {\n      ctx.stroke(path);\n    }\n  }\n\n  /**\n   * Commit the curves we have in this editor.\n   */\n  commit() {\n    if (this.#disableEditing) {\n      return;\n    }\n\n    super.commit();\n\n    this.isEditing = false;\n    this.disableEditMode();\n\n    // This editor must be on top of the main ink editor.\n    this.setInForeground();\n\n    this.#disableEditing = true;\n    this.div.classList.add(\"disabled\");\n\n    this.#fitToContent(/* firstTime = */ true);\n    this.makeResizable();\n\n    this.parent.addInkEditorIfNeeded(/* isCommitting = */ true);\n\n    // When commiting, the position of this editor is changed, hence we must\n    // move it to the right position in the DOM.\n    this.moveInDOM();\n    this.div.focus({\n      preventScroll: true /* See issue #15744 */,\n    });\n  }\n\n  /** @inheritdoc */\n  focusin(event) {\n    if (!this._focusEventsAllowed) {\n      return;\n    }\n    super.focusin(event);\n    this.enableEditMode();\n  }\n\n  /**\n   * onpointerdown callback for the canvas we're drawing on.\n   * @param {PointerEvent} event\n   */\n  canvasPointerdown(event) {\n    if (event.button !== 0 || !this.isInEditMode() || this.#disableEditing) {\n      return;\n    }\n\n    // We want to draw on top of any other editors.\n    // Since it's the last child, there's no need to give it a higher z-index.\n    this.setInForeground();\n\n    event.preventDefault();\n\n    if (event.type !== \"mouse\") {\n      this.div.focus();\n    }\n\n    this.#startDrawing(event.offsetX, event.offsetY);\n  }\n\n  /**\n   * onpointermove callback for the canvas we're drawing on.\n   * @param {PointerEvent} event\n   */\n  canvasPointermove(event) {\n    event.preventDefault();\n    this.#draw(event.offsetX, event.offsetY);\n  }\n\n  /**\n   * onpointerup callback for the canvas we're drawing on.\n   * @param {PointerEvent} event\n   */\n  canvasPointerup(event) {\n    event.preventDefault();\n    this.#endDrawing(event);\n  }\n\n  /**\n   * onpointerleave callback for the canvas we're drawing on.\n   * @param {PointerEvent} event\n   */\n  canvasPointerleave(event) {\n    this.#endDrawing(event);\n  }\n\n  /**\n   * End the drawing.\n   * @param {PointerEvent} event\n   */\n  #endDrawing(event) {\n    this.canvas.removeEventListener(\n      \"pointerleave\",\n      this.#boundCanvasPointerleave\n    );\n    this.canvas.removeEventListener(\n      \"pointermove\",\n      this.#boundCanvasPointermove\n    );\n    this.canvas.removeEventListener(\"pointerup\", this.#boundCanvasPointerup);\n    this.canvas.addEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n\n    // Slight delay to avoid the context menu to appear (it can happen on a long\n    // tap with a pen).\n    setTimeout(() => {\n      this.canvas.removeEventListener(\"contextmenu\", noContextMenu);\n    }, 10);\n\n    this.#stopDrawing(event.offsetX, event.offsetY);\n\n    this.addToAnnotationStorage();\n\n    // Since the ink editor covers all of the page and we want to be able\n    // to select another editor, we just put this one in the background.\n    this.setInBackground();\n  }\n\n  /**\n   * Create the canvas element.\n   */\n  #createCanvas() {\n    this.canvas = document.createElement(\"canvas\");\n    this.canvas.width = this.canvas.height = 0;\n    this.canvas.className = \"inkEditorCanvas\";\n\n    AnnotationEditor._l10nPromise\n      .get(\"editor_ink_canvas_aria_label\")\n      .then(msg => this.canvas?.setAttribute(\"aria-label\", msg));\n    this.div.append(this.canvas);\n    this.ctx = this.canvas.getContext(\"2d\");\n  }\n\n  /**\n   * Create the resize observer.\n   */\n  #createObserver() {\n    this.#observer = new ResizeObserver(entries => {\n      const rect = entries[0].contentRect;\n      if (rect.width && rect.height) {\n        this.setDimensions(rect.width, rect.height);\n      }\n    });\n    this.#observer.observe(this.div);\n  }\n\n  /** @inheritdoc */\n  get isResizable() {\n    return !this.isEmpty() && this.#disableEditing;\n  }\n\n  /** @inheritdoc */\n  render() {\n    if (this.div) {\n      return this.div;\n    }\n\n    let baseX, baseY;\n    if (this.width) {\n      baseX = this.x;\n      baseY = this.y;\n    }\n\n    super.render();\n\n    AnnotationEditor._l10nPromise\n      .get(\"editor_ink2_aria_label\")\n      .then(msg => this.div?.setAttribute(\"aria-label\", msg));\n\n    const [x, y, w, h] = this.#getInitialBBox();\n    this.setAt(x, y, 0, 0);\n    this.setDims(w, h);\n\n    this.#createCanvas();\n\n    if (this.width) {\n      // This editor was created in using copy (ctrl+c).\n      const [parentWidth, parentHeight] = this.parentDimensions;\n      this.setAspectRatio(this.width * parentWidth, this.height * parentHeight);\n      this.setAt(\n        baseX * parentWidth,\n        baseY * parentHeight,\n        this.width * parentWidth,\n        this.height * parentHeight\n      );\n      this.#isCanvasInitialized = true;\n      this.#setCanvasDims();\n      this.setDims(this.width * parentWidth, this.height * parentHeight);\n      this.#redraw();\n      this.div.classList.add(\"disabled\");\n    } else {\n      this.div.classList.add(\"editing\");\n      this.enableEditMode();\n    }\n\n    this.#createObserver();\n\n    return this.div;\n  }\n\n  #setCanvasDims() {\n    if (!this.#isCanvasInitialized) {\n      return;\n    }\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.canvas.width = Math.ceil(this.width * parentWidth);\n    this.canvas.height = Math.ceil(this.height * parentHeight);\n    this.#updateTransform();\n  }\n\n  /**\n   * When the dimensions of the div change the inner canvas must\n   * renew its dimensions, hence it must redraw its own contents.\n   * @param {number} width - the new width of the div\n   * @param {number} height - the new height of the div\n   * @returns\n   */\n  setDimensions(width, height) {\n    const roundedWidth = Math.round(width);\n    const roundedHeight = Math.round(height);\n    if (\n      this.#realWidth === roundedWidth &&\n      this.#realHeight === roundedHeight\n    ) {\n      return;\n    }\n\n    this.#realWidth = roundedWidth;\n    this.#realHeight = roundedHeight;\n\n    this.canvas.style.visibility = \"hidden\";\n\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.width = width / parentWidth;\n    this.height = height / parentHeight;\n    this.fixAndSetPosition();\n\n    if (this.#disableEditing) {\n      this.#setScaleFactor(width, height);\n    }\n\n    this.#setCanvasDims();\n    this.#redraw();\n\n    this.canvas.style.visibility = \"visible\";\n\n    // For any reason the dimensions couldn't be in percent but in pixels, hence\n    // we must fix them.\n    this.fixDims();\n  }\n\n  #setScaleFactor(width, height) {\n    const padding = this.#getPadding();\n    const scaleFactorW = (width - padding) / this.#baseWidth;\n    const scaleFactorH = (height - padding) / this.#baseHeight;\n    this.scaleFactor = Math.min(scaleFactorW, scaleFactorH);\n  }\n\n  /**\n   * Update the canvas transform.\n   */\n  #updateTransform() {\n    const padding = this.#getPadding() / 2;\n    this.ctx.setTransform(\n      this.scaleFactor,\n      0,\n      0,\n      this.scaleFactor,\n      this.translationX * this.scaleFactor + padding,\n      this.translationY * this.scaleFactor + padding\n    );\n  }\n\n  /**\n   * Convert into a Path2D.\n   * @param {Array<Array<number>>} bezier\n   * @returns {Path2D}\n   */\n  static #buildPath2D(bezier) {\n    const path2D = new Path2D();\n    for (let i = 0, ii = bezier.length; i < ii; i++) {\n      const [first, control1, control2, second] = bezier[i];\n      if (i === 0) {\n        path2D.moveTo(...first);\n      }\n      path2D.bezierCurveTo(\n        control1[0],\n        control1[1],\n        control2[0],\n        control2[1],\n        second[0],\n        second[1]\n      );\n    }\n    return path2D;\n  }\n\n  static #toPDFCoordinates(points, rect, rotation) {\n    const [blX, blY, trX, trY] = rect;\n\n    switch (rotation) {\n      case 0:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          points[i] += blX;\n          points[i + 1] = trY - points[i + 1];\n        }\n        break;\n      case 90:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          const x = points[i];\n          points[i] = points[i + 1] + blX;\n          points[i + 1] = x + blY;\n        }\n        break;\n      case 180:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          points[i] = trX - points[i];\n          points[i + 1] += blY;\n        }\n        break;\n      case 270:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          const x = points[i];\n          points[i] = trX - points[i + 1];\n          points[i + 1] = trY - x;\n        }\n        break;\n      default:\n        throw new Error(\"Invalid rotation\");\n    }\n    return points;\n  }\n\n  static #fromPDFCoordinates(points, rect, rotation) {\n    const [blX, blY, trX, trY] = rect;\n\n    switch (rotation) {\n      case 0:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          points[i] -= blX;\n          points[i + 1] = trY - points[i + 1];\n        }\n        break;\n      case 90:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          const x = points[i];\n          points[i] = points[i + 1] - blY;\n          points[i + 1] = x - blX;\n        }\n        break;\n      case 180:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          points[i] = trX - points[i];\n          points[i + 1] -= blY;\n        }\n        break;\n      case 270:\n        for (let i = 0, ii = points.length; i < ii; i += 2) {\n          const x = points[i];\n          points[i] = trY - points[i + 1];\n          points[i + 1] = trX - x;\n        }\n        break;\n      default:\n        throw new Error(\"Invalid rotation\");\n    }\n    return points;\n  }\n\n  /**\n   * Transform and serialize the paths.\n   * @param {number} s - scale factor\n   * @param {number} tx - abscissa of the translation\n   * @param {number} ty - ordinate of the translation\n   * @param {Array<number>} rect - the bounding box of the annotation\n   */\n  #serializePaths(s, tx, ty, rect) {\n    const paths = [];\n    const padding = this.thickness / 2;\n    const shiftX = s * tx + padding;\n    const shiftY = s * ty + padding;\n    for (const bezier of this.paths) {\n      const buffer = [];\n      const points = [];\n      for (let j = 0, jj = bezier.length; j < jj; j++) {\n        const [first, control1, control2, second] = bezier[j];\n        const p10 = s * first[0] + shiftX;\n        const p11 = s * first[1] + shiftY;\n        const p20 = s * control1[0] + shiftX;\n        const p21 = s * control1[1] + shiftY;\n        const p30 = s * control2[0] + shiftX;\n        const p31 = s * control2[1] + shiftY;\n        const p40 = s * second[0] + shiftX;\n        const p41 = s * second[1] + shiftY;\n\n        if (j === 0) {\n          buffer.push(p10, p11);\n          points.push(p10, p11);\n        }\n        buffer.push(p20, p21, p30, p31, p40, p41);\n        points.push(p20, p21);\n        if (j === jj - 1) {\n          points.push(p40, p41);\n        }\n      }\n      paths.push({\n        bezier: InkEditor.#toPDFCoordinates(buffer, rect, this.rotation),\n        points: InkEditor.#toPDFCoordinates(points, rect, this.rotation),\n      });\n    }\n\n    return paths;\n  }\n\n  /**\n   * Get the bounding box containing all the paths.\n   * @returns {Array<number>}\n   */\n  #getBbox() {\n    let xMin = Infinity;\n    let xMax = -Infinity;\n    let yMin = Infinity;\n    let yMax = -Infinity;\n\n    for (const path of this.paths) {\n      for (const [first, control1, control2, second] of path) {\n        const bbox = Util.bezierBoundingBox(\n          ...first,\n          ...control1,\n          ...control2,\n          ...second\n        );\n        xMin = Math.min(xMin, bbox[0]);\n        yMin = Math.min(yMin, bbox[1]);\n        xMax = Math.max(xMax, bbox[2]);\n        yMax = Math.max(yMax, bbox[3]);\n      }\n    }\n\n    return [xMin, yMin, xMax, yMax];\n  }\n\n  /**\n   * The bounding box is computed with null thickness, so we must take\n   * it into account for the display.\n   * It corresponds to the total padding, hence it should be divided by 2\n   * in order to have left/right paddings.\n   * @returns {number}\n   */\n  #getPadding() {\n    return this.#disableEditing\n      ? Math.ceil(this.thickness * this.parentScale)\n      : 0;\n  }\n\n  /**\n   * Set the div position and dimensions in order to fit to\n   * the bounding box of the contents.\n   * @returns {undefined}\n   */\n  #fitToContent(firstTime = false) {\n    if (this.isEmpty()) {\n      return;\n    }\n\n    if (!this.#disableEditing) {\n      this.#redraw();\n      return;\n    }\n\n    const bbox = this.#getBbox();\n    const padding = this.#getPadding();\n    this.#baseWidth = Math.max(AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n    this.#baseHeight = Math.max(AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n\n    const width = Math.ceil(padding + this.#baseWidth * this.scaleFactor);\n    const height = Math.ceil(padding + this.#baseHeight * this.scaleFactor);\n\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.width = width / parentWidth;\n    this.height = height / parentHeight;\n\n    this.setAspectRatio(width, height);\n\n    const prevTranslationX = this.translationX;\n    const prevTranslationY = this.translationY;\n\n    this.translationX = -bbox[0];\n    this.translationY = -bbox[1];\n    this.#setCanvasDims();\n    this.#redraw();\n\n    this.#realWidth = width;\n    this.#realHeight = height;\n\n    this.setDims(width, height);\n    const unscaledPadding = firstTime ? padding / this.scaleFactor / 2 : 0;\n    this.translate(\n      prevTranslationX - this.translationX - unscaledPadding,\n      prevTranslationY - this.translationY - unscaledPadding\n    );\n  }\n\n  /** @inheritdoc */\n  static deserialize(data, parent, uiManager) {\n    if (data instanceof InkAnnotationElement) {\n      return null;\n    }\n    const editor = super.deserialize(data, parent, uiManager);\n\n    editor.thickness = data.thickness;\n    editor.color = Util.makeHexColor(...data.color);\n    editor.opacity = data.opacity;\n\n    const [pageWidth, pageHeight] = editor.pageDimensions;\n    const width = editor.width * pageWidth;\n    const height = editor.height * pageHeight;\n    const scaleFactor = editor.parentScale;\n    const padding = data.thickness / 2;\n\n    editor.#disableEditing = true;\n    editor.#realWidth = Math.round(width);\n    editor.#realHeight = Math.round(height);\n\n    const { paths, rect, rotation } = data;\n\n    for (let { bezier } of paths) {\n      bezier = InkEditor.#fromPDFCoordinates(bezier, rect, rotation);\n      const path = [];\n      editor.paths.push(path);\n      let p0 = scaleFactor * (bezier[0] - padding);\n      let p1 = scaleFactor * (bezier[1] - padding);\n      for (let i = 2, ii = bezier.length; i < ii; i += 6) {\n        const p10 = scaleFactor * (bezier[i] - padding);\n        const p11 = scaleFactor * (bezier[i + 1] - padding);\n        const p20 = scaleFactor * (bezier[i + 2] - padding);\n        const p21 = scaleFactor * (bezier[i + 3] - padding);\n        const p30 = scaleFactor * (bezier[i + 4] - padding);\n        const p31 = scaleFactor * (bezier[i + 5] - padding);\n        path.push([\n          [p0, p1],\n          [p10, p11],\n          [p20, p21],\n          [p30, p31],\n        ]);\n        p0 = p30;\n        p1 = p31;\n      }\n      const path2D = this.#buildPath2D(path);\n      editor.bezierPath2D.push(path2D);\n    }\n\n    const bbox = editor.#getBbox();\n    editor.#baseWidth = Math.max(AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n    editor.#baseHeight = Math.max(AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n    editor.#setScaleFactor(width, height);\n\n    return editor;\n  }\n\n  /** @inheritdoc */\n  serialize() {\n    if (this.isEmpty()) {\n      return null;\n    }\n\n    const rect = this.getRect(0, 0);\n    const color = AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);\n\n    return {\n      annotationType: AnnotationEditorType.INK,\n      color,\n      thickness: this.thickness,\n      opacity: this.opacity,\n      paths: this.#serializePaths(\n        this.scaleFactor / this.parentScale,\n        this.translationX,\n        this.translationY,\n        rect\n      ),\n      pageIndex: this.pageIndex,\n      rect,\n      rotation: this.rotation,\n      structTreeParentId: this._structTreeParentId,\n    };\n  }\n}\n\nexport { InkEditor };\n","/* Copyright 2022 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AnnotationEditorType, shadow } from \"../../shared/util.js\";\nimport { AnnotationEditor } from \"./editor.js\";\nimport { PixelsPerInch } from \"../display_utils.js\";\nimport { StampAnnotationElement } from \"../annotation_layer.js\";\n\n/**\n * Basic text editor in order to create a FreeTex annotation.\n */\nclass StampEditor extends AnnotationEditor {\n  #bitmap = null;\n\n  #bitmapId = null;\n\n  #bitmapPromise = null;\n\n  #bitmapUrl = null;\n\n  #bitmapFile = null;\n\n  #canvas = null;\n\n  #observer = null;\n\n  #resizeTimeoutId = null;\n\n  #isSvg = false;\n\n  #hasBeenAddedInUndoStack = false;\n\n  static _type = \"stamp\";\n\n  constructor(params) {\n    super({ ...params, name: \"stampEditor\" });\n    this.#bitmapUrl = params.bitmapUrl;\n    this.#bitmapFile = params.bitmapFile;\n  }\n\n  /** @inheritdoc */\n  static initialize(l10n) {\n    AnnotationEditor.initialize(l10n);\n  }\n\n  static get supportedTypes() {\n    // See https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types\n    // to know which types are supported by the browser.\n    const types = [\n      \"apng\",\n      \"avif\",\n      \"bmp\",\n      \"gif\",\n      \"jpeg\",\n      \"png\",\n      \"svg+xml\",\n      \"webp\",\n      \"x-icon\",\n    ];\n    return shadow(\n      this,\n      \"supportedTypes\",\n      types.map(type => `image/${type}`)\n    );\n  }\n\n  static get supportedTypesStr() {\n    return shadow(this, \"supportedTypesStr\", this.supportedTypes.join(\",\"));\n  }\n\n  /** @inheritdoc */\n  static isHandlingMimeForPasting(mime) {\n    return this.supportedTypes.includes(mime);\n  }\n\n  /** @inheritdoc */\n  static paste(item, parent) {\n    parent.pasteEditor(AnnotationEditorType.STAMP, {\n      bitmapFile: item.getAsFile(),\n    });\n  }\n\n  #getBitmapFetched(data, fromId = false) {\n    if (!data) {\n      this.remove();\n      return;\n    }\n    this.#bitmap = data.bitmap;\n    if (!fromId) {\n      this.#bitmapId = data.id;\n      this.#isSvg = data.isSvg;\n    }\n    this.#createCanvas();\n  }\n\n  #getBitmapDone() {\n    this.#bitmapPromise = null;\n    this._uiManager.enableWaiting(false);\n    if (this.#canvas) {\n      this.div.focus();\n    }\n  }\n\n  #getBitmap() {\n    if (this.#bitmapId) {\n      this._uiManager.enableWaiting(true);\n      this._uiManager.imageManager\n        .getFromId(this.#bitmapId)\n        .then(data => this.#getBitmapFetched(data, /* fromId = */ true))\n        .finally(() => this.#getBitmapDone());\n      return;\n    }\n\n    if (this.#bitmapUrl) {\n      const url = this.#bitmapUrl;\n      this.#bitmapUrl = null;\n      this._uiManager.enableWaiting(true);\n      this.#bitmapPromise = this._uiManager.imageManager\n        .getFromUrl(url)\n        .then(data => this.#getBitmapFetched(data))\n        .finally(() => this.#getBitmapDone());\n      return;\n    }\n\n    if (this.#bitmapFile) {\n      const file = this.#bitmapFile;\n      this.#bitmapFile = null;\n      this._uiManager.enableWaiting(true);\n      this.#bitmapPromise = this._uiManager.imageManager\n        .getFromFile(file)\n        .then(data => this.#getBitmapFetched(data))\n        .finally(() => this.#getBitmapDone());\n      return;\n    }\n\n    const input = document.createElement(\"input\");\n    if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n      input.hidden = true;\n      input.id = \"stampEditorFileInput\";\n      document.body.append(input);\n    }\n    input.type = \"file\";\n    input.accept = StampEditor.supportedTypesStr;\n    this.#bitmapPromise = new Promise(resolve => {\n      input.addEventListener(\"change\", async () => {\n        if (!input.files || input.files.length === 0) {\n          this.remove();\n        } else {\n          this._uiManager.enableWaiting(true);\n          const data = await this._uiManager.imageManager.getFromFile(\n            input.files[0]\n          );\n          this.#getBitmapFetched(data);\n        }\n        if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\")) {\n          input.remove();\n        }\n        resolve();\n      });\n      input.addEventListener(\"cancel\", () => {\n        this.remove();\n        resolve();\n      });\n    }).finally(() => this.#getBitmapDone());\n    if (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"TESTING\")) {\n      input.click();\n    }\n  }\n\n  /** @inheritdoc */\n  remove() {\n    if (this.#bitmapId) {\n      this.#bitmap = null;\n      this._uiManager.imageManager.deleteId(this.#bitmapId);\n      this.#canvas?.remove();\n      this.#canvas = null;\n      this.#observer?.disconnect();\n      this.#observer = null;\n    }\n    super.remove();\n  }\n\n  /** @inheritdoc */\n  rebuild() {\n    if (!this.parent) {\n      // It's possible to have to rebuild an editor which is not on a visible\n      // page.\n      if (this.#bitmapId) {\n        this.#getBitmap();\n      }\n      return;\n    }\n    super.rebuild();\n    if (this.div === null) {\n      return;\n    }\n\n    if (this.#bitmapId) {\n      this.#getBitmap();\n    }\n\n    if (!this.isAttachedToDOM) {\n      // At some point this editor was removed and we're rebuilting it,\n      // hence we must add it to its parent.\n      this.parent.add(this);\n    }\n  }\n\n  /** @inheritdoc */\n  onceAdded() {\n    this._isDraggable = true;\n    this.div.focus();\n  }\n\n  /** @inheritdoc */\n  isEmpty() {\n    return !(\n      this.#bitmapPromise ||\n      this.#bitmap ||\n      this.#bitmapUrl ||\n      this.#bitmapFile\n    );\n  }\n\n  /** @inheritdoc */\n  get isResizable() {\n    return true;\n  }\n\n  /** @inheritdoc */\n  render() {\n    if (this.div) {\n      return this.div;\n    }\n\n    let baseX, baseY;\n    if (this.width) {\n      baseX = this.x;\n      baseY = this.y;\n    }\n\n    super.render();\n    this.div.hidden = true;\n\n    if (this.#bitmap) {\n      this.#createCanvas();\n    } else {\n      this.#getBitmap();\n    }\n\n    if (this.width) {\n      // This editor was created in using copy (ctrl+c).\n      const [parentWidth, parentHeight] = this.parentDimensions;\n      this.setAt(\n        baseX * parentWidth,\n        baseY * parentHeight,\n        this.width * parentWidth,\n        this.height * parentHeight\n      );\n    }\n\n    return this.div;\n  }\n\n  #createCanvas() {\n    const { div } = this;\n    let { width, height } = this.#bitmap;\n    const [pageWidth, pageHeight] = this.pageDimensions;\n    const MAX_RATIO = 0.75;\n    if (this.width) {\n      width = this.width * pageWidth;\n      height = this.height * pageHeight;\n    } else if (\n      width > MAX_RATIO * pageWidth ||\n      height > MAX_RATIO * pageHeight\n    ) {\n      // If the the image is too big compared to the page dimensions\n      // (more than MAX_RATIO) then we scale it down.\n      const factor = Math.min(\n        (MAX_RATIO * pageWidth) / width,\n        (MAX_RATIO * pageHeight) / height\n      );\n      width *= factor;\n      height *= factor;\n    }\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.setDims(\n      (width * parentWidth) / pageWidth,\n      (height * parentHeight) / pageHeight\n    );\n\n    this._uiManager.enableWaiting(false);\n    const canvas = (this.#canvas = document.createElement(\"canvas\"));\n    div.append(canvas);\n    div.hidden = false;\n    this.#drawBitmap(width, height);\n    this.#createObserver();\n    if (!this.#hasBeenAddedInUndoStack) {\n      this.parent.addUndoableEditor(this);\n      this.#hasBeenAddedInUndoStack = true;\n    }\n\n    // There are multiple ways to add an image to the page, so here we just\n    // count the number of times an image is added to the page whatever the way\n    // is.\n    this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n      source: this,\n      details: {\n        type: \"editing\",\n        subtype: this.editorType,\n        data: {\n          action: \"inserted_image\",\n        },\n      },\n    });\n    this.addAltTextButton();\n  }\n\n  /**\n   * When the dimensions of the div change the inner canvas must\n   * renew its dimensions, hence it must redraw its own contents.\n   * @param {number} width - the new width of the div\n   * @param {number} height - the new height of the div\n   * @returns\n   */\n  #setDimensions(width, height) {\n    const [parentWidth, parentHeight] = this.parentDimensions;\n    this.width = width / parentWidth;\n    this.height = height / parentHeight;\n    this.setDims(width, height);\n    if (this._initialOptions?.isCentered) {\n      this.center();\n    } else {\n      this.fixAndSetPosition();\n    }\n    this._initialOptions = null;\n    if (this.#resizeTimeoutId !== null) {\n      clearTimeout(this.#resizeTimeoutId);\n    }\n    // When the user is resizing the editor we just use CSS to scale the image\n    // to avoid redrawing it too often.\n    // And once the user stops resizing the editor we redraw the image in\n    // rescaling it correctly (see this.#scaleBitmap).\n    const TIME_TO_WAIT = 200;\n    this.#resizeTimeoutId = setTimeout(() => {\n      this.#resizeTimeoutId = null;\n      this.#drawBitmap(width, height);\n    }, TIME_TO_WAIT);\n  }\n\n  #scaleBitmap(width, height) {\n    const { width: bitmapWidth, height: bitmapHeight } = this.#bitmap;\n\n    let newWidth = bitmapWidth;\n    let newHeight = bitmapHeight;\n    let bitmap = this.#bitmap;\n    while (newWidth > 2 * width || newHeight > 2 * height) {\n      const prevWidth = newWidth;\n      const prevHeight = newHeight;\n\n      if (newWidth > 2 * width) {\n        // See bug 1820511 (Windows specific bug).\n        // TODO: once the above bug is fixed we could revert to:\n        // newWidth = Math.ceil(newWidth / 2);\n        newWidth =\n          newWidth >= 16384\n            ? Math.floor(newWidth / 2) - 1\n            : Math.ceil(newWidth / 2);\n      }\n      if (newHeight > 2 * height) {\n        newHeight =\n          newHeight >= 16384\n            ? Math.floor(newHeight / 2) - 1\n            : Math.ceil(newHeight / 2);\n      }\n\n      const offscreen = new OffscreenCanvas(newWidth, newHeight);\n      const ctx = offscreen.getContext(\"2d\");\n      ctx.drawImage(\n        bitmap,\n        0,\n        0,\n        prevWidth,\n        prevHeight,\n        0,\n        0,\n        newWidth,\n        newHeight\n      );\n      bitmap = offscreen.transferToImageBitmap();\n    }\n\n    return bitmap;\n  }\n\n  #drawBitmap(width, height) {\n    width = Math.ceil(width);\n    height = Math.ceil(height);\n    const canvas = this.#canvas;\n    if (!canvas || (canvas.width === width && canvas.height === height)) {\n      return;\n    }\n    canvas.width = width;\n    canvas.height = height;\n    const bitmap = this.#isSvg\n      ? this.#bitmap\n      : this.#scaleBitmap(width, height);\n    const ctx = canvas.getContext(\"2d\");\n    ctx.filter = this._uiManager.hcmFilter;\n    ctx.drawImage(\n      bitmap,\n      0,\n      0,\n      bitmap.width,\n      bitmap.height,\n      0,\n      0,\n      width,\n      height\n    );\n  }\n\n  #serializeBitmap(toUrl) {\n    if (toUrl) {\n      if (this.#isSvg) {\n        const url = this._uiManager.imageManager.getSvgUrl(this.#bitmapId);\n        if (url) {\n          return url;\n        }\n      }\n      // We convert to a data url because it's sync and the url can live in the\n      // clipboard.\n      const canvas = document.createElement(\"canvas\");\n      ({ width: canvas.width, height: canvas.height } = this.#bitmap);\n      const ctx = canvas.getContext(\"2d\");\n      ctx.drawImage(this.#bitmap, 0, 0);\n\n      return canvas.toDataURL();\n    }\n\n    if (this.#isSvg) {\n      const [pageWidth, pageHeight] = this.pageDimensions;\n      // Multiply by PixelsPerInch.PDF_TO_CSS_UNITS in order to increase the\n      // image resolution when rasterizing it.\n      const width = Math.round(\n        this.width * pageWidth * PixelsPerInch.PDF_TO_CSS_UNITS\n      );\n      const height = Math.round(\n        this.height * pageHeight * PixelsPerInch.PDF_TO_CSS_UNITS\n      );\n      const offscreen = new OffscreenCanvas(width, height);\n      const ctx = offscreen.getContext(\"2d\");\n      ctx.drawImage(\n        this.#bitmap,\n        0,\n        0,\n        this.#bitmap.width,\n        this.#bitmap.height,\n        0,\n        0,\n        width,\n        height\n      );\n      return offscreen.transferToImageBitmap();\n    }\n\n    return structuredClone(this.#bitmap);\n  }\n\n  /**\n   * Create the resize observer.\n   */\n  #createObserver() {\n    this.#observer = new ResizeObserver(entries => {\n      const rect = entries[0].contentRect;\n      if (rect.width && rect.height) {\n        this.#setDimensions(rect.width, rect.height);\n      }\n    });\n    this.#observer.observe(this.div);\n  }\n\n  /** @inheritdoc */\n  static deserialize(data, parent, uiManager) {\n    if (data instanceof StampAnnotationElement) {\n      return null;\n    }\n    const editor = super.deserialize(data, parent, uiManager);\n    const { rect, bitmapUrl, bitmapId, isSvg, accessibilityData } = data;\n    if (bitmapId && uiManager.imageManager.isValidId(bitmapId)) {\n      editor.#bitmapId = bitmapId;\n    } else {\n      editor.#bitmapUrl = bitmapUrl;\n    }\n    editor.#isSvg = isSvg;\n\n    const [parentWidth, parentHeight] = editor.pageDimensions;\n    editor.width = (rect[2] - rect[0]) / parentWidth;\n    editor.height = (rect[3] - rect[1]) / parentHeight;\n\n    if (accessibilityData) {\n      editor.altTextData = accessibilityData;\n    }\n\n    return editor;\n  }\n\n  /** @inheritdoc */\n  serialize(isForCopying = false, context = null) {\n    if (this.isEmpty()) {\n      return null;\n    }\n\n    const serialized = {\n      annotationType: AnnotationEditorType.STAMP,\n      bitmapId: this.#bitmapId,\n      pageIndex: this.pageIndex,\n      rect: this.getRect(0, 0),\n      rotation: this.rotation,\n      isSvg: this.#isSvg,\n      structTreeParentId: this._structTreeParentId,\n    };\n\n    if (isForCopying) {\n      // We don't know what's the final destination (this pdf or another one)\n      // of this annotation and the clipboard doesn't support ImageBitmaps,\n      // hence we serialize the bitmap to a data url.\n      serialized.bitmapUrl = this.#serializeBitmap(/* toUrl = */ true);\n      serialized.accessibilityData = this.altTextData;\n      return serialized;\n    }\n\n    const { decorative, altText } = this.altTextData;\n    if (!decorative && altText) {\n      serialized.accessibilityData = { type: \"Figure\", alt: altText };\n    }\n\n    if (context === null) {\n      return serialized;\n    }\n\n    context.stamps ||= new Map();\n    const area = this.#isSvg\n      ? (serialized.rect[2] - serialized.rect[0]) *\n        (serialized.rect[3] - serialized.rect[1])\n      : null;\n    if (!context.stamps.has(this.#bitmapId)) {\n      // We don't want to have multiple copies of the same bitmap in the\n      // annotationMap, hence we only add the bitmap the first time we meet it.\n      context.stamps.set(this.#bitmapId, { area, serialized });\n      serialized.bitmap = this.#serializeBitmap(/* toUrl = */ false);\n    } else if (this.#isSvg) {\n      // If we have multiple copies of the same svg but with different sizes,\n      // then we want to keep the biggest one.\n      const prevData = context.stamps.get(this.#bitmapId);\n      if (area > prevData.area) {\n        prevData.area = area;\n        prevData.serialized.bitmap.close();\n        prevData.serialized.bitmap = this.#serializeBitmap(/* toUrl = */ false);\n      }\n    }\n    return serialized;\n  }\n}\n\nexport { StampEditor };\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __w_pdfjs_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/* Copyright 2012 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./display/api\").OnProgressParameters} OnProgressParameters */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./display/api\").PDFDocumentLoadingTask} PDFDocumentLoadingTask */\n/** @typedef {import(\"./display/api\").PDFDocumentProxy} PDFDocumentProxy */\n/** @typedef {import(\"./display/api\").PDFPageProxy} PDFPageProxy */\n/** @typedef {import(\"./display/api\").RenderTask} RenderTask */\n/** @typedef {import(\"./display/display_utils\").PageViewport} PageViewport */\n// eslint-disable-next-line max-len\n/** @typedef {import(\"./display/text_layer\").TextLayerRenderTask} TextLayerRenderTask */\n\nimport {\n  AbortException,\n  AnnotationEditorParamsType,\n  AnnotationEditorType,\n  AnnotationMode,\n  CMapCompressionType,\n  createValidAbsoluteUrl,\n  FeatureTest,\n  ImageKind,\n  InvalidPDFException,\n  MissingPDFException,\n  normalizeUnicode,\n  OPS,\n  PasswordResponses,\n  PermissionFlag,\n  PromiseCapability,\n  shadow,\n  UnexpectedResponseException,\n  Util,\n  VerbosityLevel,\n} from \"./shared/util.js\";\nimport {\n  build,\n  getDocument,\n  PDFDataRangeTransport,\n  PDFWorker,\n  SVGGraphics,\n  version,\n} from \"./display/api.js\";\nimport {\n  DOMSVGFactory,\n  getFilenameFromUrl,\n  getPdfFilenameFromUrl,\n  getXfaPageViewport,\n  isDataScheme,\n  isPdfFile,\n  loadScript,\n  noContextMenu,\n  PDFDateString,\n  PixelsPerInch,\n  RenderingCancelledException,\n  setLayerDimensions,\n} from \"./display/display_utils.js\";\nimport { renderTextLayer, updateTextLayer } from \"./display/text_layer.js\";\nimport { AnnotationEditorLayer } from \"./display/editor/annotation_editor_layer.js\";\nimport { AnnotationEditorUIManager } from \"./display/editor/tools.js\";\nimport { AnnotationLayer } from \"./display/annotation_layer.js\";\nimport { GlobalWorkerOptions } from \"./display/worker_options.js\";\nimport { XfaLayer } from \"./display/xfa_layer.js\";\n\n/* eslint-disable-next-line no-unused-vars */\nconst pdfjsVersion =\n  typeof PDFJSDev !== \"undefined\" ? PDFJSDev.eval(\"BUNDLE_VERSION\") : void 0;\n/* eslint-disable-next-line no-unused-vars */\nconst pdfjsBuild =\n  typeof PDFJSDev !== \"undefined\" ? PDFJSDev.eval(\"BUNDLE_BUILD\") : void 0;\n\nexport {\n  AbortException,\n  AnnotationEditorLayer,\n  AnnotationEditorParamsType,\n  AnnotationEditorType,\n  AnnotationEditorUIManager,\n  AnnotationLayer,\n  AnnotationMode,\n  build,\n  CMapCompressionType,\n  createValidAbsoluteUrl,\n  DOMSVGFactory,\n  FeatureTest,\n  getDocument,\n  getFilenameFromUrl,\n  getPdfFilenameFromUrl,\n  getXfaPageViewport,\n  GlobalWorkerOptions,\n  ImageKind,\n  InvalidPDFException,\n  isDataScheme,\n  isPdfFile,\n  loadScript,\n  MissingPDFException,\n  noContextMenu,\n  normalizeUnicode,\n  OPS,\n  PasswordResponses,\n  PDFDataRangeTransport,\n  PDFDateString,\n  PDFWorker,\n  PermissionFlag,\n  PixelsPerInch,\n  PromiseCapability,\n  RenderingCancelledException,\n  renderTextLayer,\n  setLayerDimensions,\n  shadow,\n  SVGGraphics,\n  UnexpectedResponseException,\n  updateTextLayer,\n  Util,\n  VerbosityLevel,\n  version,\n  XfaLayer,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,UAAAA,iCAAAC,IAAA,EAAAC,OAAA;EACA,WAAAC,OAAA,wBAAAC,MAAA,eACAA,MAAA,CAAAD,OAAA,GAAAF,IAAA,CAAAI,QAAA,GAAAH,OAAA,QACA,WAAAI,MAAA,mBAAAA,MAAA,CAAAC,GAAA,EACAD,MAAA;IAAA,OAAAL,IAAA,CAAAI,QAAA,GAAAH,OAAA;EAAA,QACA,WAAAC,OAAA,eACAA,OAAA,2BAAAF,IAAA,CAAAI,QAAA,GAAAH,OAAA,QAEAD,IAAA,2BAAAA,IAAA,CAAAI,QAAA,GAAAH,OAAA;AACA,CAAC,EAAAM,UAAA;EACD;MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QCUA,MAAMC,QAAA,GAEJ,OAAOC,OAAP,KAAmB,QADnB,IAEAA,OAAA,GAAU,EAAV,KAAiB,kBAFjB,IAGA,CAACA,OAAA,CAAQC,QAAR,CAAiBC,EAHlB,IAIA,EAAEF,OAAA,CAAQC,QAAR,CAAiBE,QAAjB,IAA6BH,OAAA,CAAQI,IAArC,IAA6CJ,OAAA,CAAQI,IAAR,KAAiB,SAA9D,CALJ;QApBAX,OAAA,CAAAM,QAAA,GAAAA,QAAA;QA2BA,MAAMM,eAAA,GAAkB,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,EAAgB,CAAhB,CAAxB;QA3BAZ,OAAA,CAAAY,eAAA,GAAAA,eAAA;QA4BA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