{"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});","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;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MCUA,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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