pdfjs-dist 2.6.347 → 2.7.570
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pdfjs-dist might be problematic. Click here for more details.
- package/README.md +3 -3
- package/bower.json +1 -1
- package/build/pdf.js +2050 -1087
- package/build/pdf.js.map +1 -1
- package/build/pdf.min.js +1 -1
- package/build/pdf.worker.js +18219 -10436
- package/build/pdf.worker.js.map +1 -1
- package/build/pdf.worker.min.js +1 -1
- package/es5/build/pdf.d.ts +1 -0
- package/es5/build/pdf.js +6623 -6654
- package/es5/build/pdf.js.map +1 -1
- package/es5/build/pdf.min.js +1 -1
- package/es5/build/pdf.worker.js +20815 -13888
- package/es5/build/pdf.worker.js.map +1 -1
- package/es5/build/pdf.worker.min.js +1 -1
- package/es5/image_decoders/pdf.image_decoders.js +3817 -4946
- package/es5/image_decoders/pdf.image_decoders.js.map +1 -1
- package/es5/image_decoders/pdf.image_decoders.min.js +1 -1
- package/es5/web/pdf_viewer.css +18 -15
- package/es5/web/pdf_viewer.js +1094 -514
- package/es5/web/pdf_viewer.js.map +1 -1
- package/image_decoders/pdf.image_decoders.js +774 -168
- package/image_decoders/pdf.image_decoders.js.map +1 -1
- package/image_decoders/pdf.image_decoders.min.js +1 -1
- package/lib/core/annotation.js +556 -108
- package/lib/core/cff_parser.js +7 -1
- package/lib/core/charsets.js +1 -1
- package/lib/core/cmap.js +20 -1
- package/lib/core/core_utils.js +162 -3
- package/lib/core/crypto.js +1 -1
- package/lib/core/default_appearance.js +132 -0
- package/lib/core/document.js +115 -9
- package/lib/core/encodings.js +1 -1
- package/lib/core/evaluator.js +168 -74
- package/lib/core/fonts.js +97 -11
- package/lib/core/function.js +5 -10
- package/lib/core/glyphlist.js +11 -4529
- package/lib/core/image_utils.js +30 -1
- package/lib/core/jpg.js +1 -1
- package/lib/core/jpx.js +5 -5
- package/lib/core/murmurhash3.js +1 -1
- package/lib/core/obj.js +123 -39
- package/lib/core/pattern.js +4 -4
- package/lib/core/primitives.js +24 -5
- package/lib/core/standard_fonts.js +1 -1
- package/lib/core/stream.js +5 -1
- package/lib/core/unicode.js +15 -1387
- package/lib/core/worker.js +58 -17
- package/lib/core/writer.js +68 -4
- package/lib/display/annotation_layer.js +712 -119
- package/lib/display/annotation_storage.js +21 -4
- package/lib/display/api.js +88 -18
- package/lib/display/canvas.js +414 -375
- package/lib/display/display_utils.js +11 -4
- package/lib/display/fetch_stream.js +3 -3
- package/lib/display/font_loader.js +2 -3
- package/lib/display/metadata.js +54 -20
- package/lib/display/node_stream.js +1 -1
- package/lib/display/optional_content_config.js +1 -1
- package/lib/display/pattern_helper.js +109 -113
- package/lib/display/svg.js +5 -5
- package/lib/display/text_layer.js +54 -54
- package/lib/display/transport_stream.js +4 -4
- package/lib/display/webgl.js +65 -68
- package/lib/examples/node/domstubs.js +9 -4
- package/lib/pdf.js +2 -2
- package/lib/pdf.sandbox.js +311 -0
- package/lib/pdf.worker.js +2 -2
- package/lib/shared/scripting_utils.js +84 -0
- package/lib/shared/util.js +129 -14
- package/lib/{display → shared}/xml_parser.js +112 -4
- package/lib/test/unit/annotation_spec.js +831 -109
- package/lib/test/unit/annotation_storage_spec.js +28 -10
- package/lib/test/unit/api_spec.js +190 -160
- package/lib/test/unit/bidi_spec.js +6 -6
- package/lib/test/unit/cff_parser_spec.js +73 -73
- package/lib/test/unit/clitests_helper.js +2 -0
- package/lib/test/unit/cmap_spec.js +48 -74
- package/lib/test/unit/core_utils_spec.js +34 -0
- package/lib/test/unit/crypto_spec.js +162 -199
- package/lib/test/unit/custom_spec.js +7 -18
- package/lib/test/unit/default_appearance_spec.js +54 -0
- package/lib/test/unit/display_svg_spec.js +24 -19
- package/lib/test/unit/display_utils_spec.js +1 -1
- package/lib/test/unit/document_spec.js +187 -20
- package/lib/test/unit/evaluator_spec.js +30 -30
- package/lib/test/unit/function_spec.js +165 -165
- package/lib/test/unit/jasmine-boot.js +52 -53
- package/lib/test/unit/metadata_spec.js +2 -2
- package/lib/test/unit/murmurhash3_spec.js +29 -16
- package/lib/test/unit/network_spec.js +21 -21
- package/lib/test/unit/pdf_find_controller_spec.js +131 -69
- package/lib/test/unit/pdf_find_utils_spec.js +10 -10
- package/lib/test/unit/scripting_spec.js +1104 -0
- package/lib/test/unit/stream_spec.js +8 -8
- package/lib/test/unit/test_utils.js +16 -19
- package/lib/test/unit/testreporter.js +11 -4
- package/lib/test/unit/type1_parser_spec.js +23 -23
- package/lib/test/unit/ui_utils_spec.js +78 -35
- package/lib/test/unit/unicode_spec.js +7 -7
- package/lib/test/unit/util_spec.js +26 -3
- package/lib/test/unit/writer_spec.js +16 -1
- package/lib/test/unit/xml_spec.js +117 -0
- package/lib/web/annotation_layer_builder.js +18 -6
- package/lib/web/app.js +579 -161
- package/lib/web/app_options.js +14 -0
- package/lib/web/base_tree_viewer.js +50 -0
- package/lib/web/base_viewer.js +350 -14
- package/lib/web/chromecom.js +9 -1
- package/lib/web/debugger.js +1 -2
- package/lib/web/download_manager.js +0 -15
- package/lib/web/firefox_print_service.js +6 -4
- package/lib/web/firefoxcom.js +84 -69
- package/lib/web/generic_scripting.js +55 -0
- package/lib/web/genericcom.js +9 -1
- package/lib/web/grab_to_pan.js +1 -1
- package/lib/web/interfaces.js +9 -3
- package/lib/web/pdf_attachment_viewer.js +1 -3
- package/lib/web/pdf_cursor_tools.js +20 -13
- package/lib/web/pdf_document_properties.js +48 -61
- package/lib/web/pdf_find_bar.js +1 -3
- package/lib/web/pdf_find_controller.js +58 -12
- package/lib/web/pdf_history.js +43 -21
- package/lib/web/pdf_layer_viewer.js +1 -9
- package/lib/web/pdf_link_service.js +108 -78
- package/lib/web/pdf_outline_viewer.js +166 -10
- package/lib/web/pdf_page_view.js +14 -14
- package/lib/web/pdf_presentation_mode.js +21 -31
- package/lib/web/pdf_rendering_queue.js +8 -1
- package/lib/web/pdf_sidebar.js +62 -107
- package/lib/web/pdf_sidebar_resizer.js +11 -21
- package/lib/web/pdf_single_page_viewer.js +8 -0
- package/lib/web/pdf_thumbnail_view.js +26 -26
- package/lib/web/pdf_thumbnail_viewer.js +13 -2
- package/lib/web/pdf_viewer.component.js +2 -2
- package/lib/web/pdf_viewer.js +3 -1
- package/lib/web/preferences.js +33 -44
- package/lib/web/text_layer_builder.js +2 -9
- package/lib/web/ui_utils.js +78 -46
- package/lib/web/viewer_compatibility.js +1 -2
- package/package.json +4 -1
- package/types/display/annotation_layer.d.ts +18 -3
- package/types/display/api.d.ts +110 -54
- package/types/display/canvas.d.ts +1 -1
- package/types/display/display_utils.d.ts +96 -95
- package/types/display/fetch_stream.d.ts +2 -2
- package/types/display/metadata.d.ts +4 -0
- package/types/display/pattern_helper.d.ts +1 -1
- package/types/display/text_layer.d.ts +7 -7
- package/types/display/transport_stream.d.ts +1 -1
- package/types/shared/scripting_utils.d.ts +12 -0
- package/types/shared/util.d.ts +281 -250
- package/types/shared/xml_parser.d.ts +64 -0
- package/web/pdf_viewer.css +18 -15
- package/web/pdf_viewer.js +809 -408
- package/web/pdf_viewer.js.map +1 -1
- package/webpack.js +1 -1
- package/types/display/xml_parser.d.ts +0 -35
@@ -19,4 +19,4 @@
|
|
19
19
|
* @licend The above is the entire license notice for the
|
20
20
|
* Javascript code in this page
|
21
21
|
*/
|
22
|
-
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/image_decoders/pdf.image_decoders",[],t):"object"==typeof exports?exports["pdfjs-dist/image_decoders/pdf.image_decoders"]=t():e["pdfjs-dist/image_decoders/pdf.image_decoders"]=e.pdfjsImageDecoders=t()}(this,(function(){return function(e){var t={};function __w_pdfjs_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};e[r].call(n.exports,n,n.exports,__w_pdfjs_require__);n.l=!0;return n.exports}__w_pdfjs_require__.m=e;__w_pdfjs_require__.c=t;__w_pdfjs_require__.d=function(e,t,r){__w_pdfjs_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})};__w_pdfjs_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};__w_pdfjs_require__.t=function(e,t){1&t&&(e=__w_pdfjs_require__(e));if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);__w_pdfjs_require__.r(r);Object.defineProperty(r,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var n in e)__w_pdfjs_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r};__w_pdfjs_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};__w_pdfjs_require__.d(t,"a",t);return t};__w_pdfjs_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};__w_pdfjs_require__.p="";return __w_pdfjs_require__(__w_pdfjs_require__.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"getVerbosityLevel",{enumerable:!0,get:function get(){return n.getVerbosityLevel}});Object.defineProperty(t,"setVerbosityLevel",{enumerable:!0,get:function get(){return n.setVerbosityLevel}});Object.defineProperty(t,"Jbig2mage",{enumerable:!0,get:function get(){return i.Jbig2mage}});Object.defineProperty(t,"JpegImage",{enumerable:!0,get:function get(){return o.JpegImage}});Object.defineProperty(t,"JpxImage",{enumerable:!0,get:function get(){return a.JpxImage}});var n=r(1),i=r(178),o=r(182),a=r(183)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.arrayByteLength=arrayByteLength;t.arraysToBytes=function arraysToBytes(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=arrayByteLength(e[n]);for(var i=0,o=new Uint8Array(r),a=0;a<t;a++){var s=e[a];s instanceof Uint8Array||(s="string"==typeof s?stringToBytes(s):new Uint8Array(s));var c=s.byteLength;o.set(s,i);i+=c}return o};t.assert=assert;t.bytesToString=function bytesToString(e){assert(null!==e&&"object"===_typeof(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),o=e.subarray(n,i);r.push(String.fromCharCode.apply(null,o))}return r.join("")};t.createPromiseCapability=function createPromiseCapability(){var e=Object.create(null),t=!1;Object.defineProperty(e,"settled",{get:function get(){return t}});e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0;r(e)};e.reject=function(e){t=!0;n(e)}}));return e};t.escapeString=function escapeString(e){return e.replace(/([\(\)\\])/g,"\\$1")};t.getModificationDate=function getModificationDate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date(Date.now()),t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),(e.getUTCDate()+1).toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")};t.getVerbosityLevel=function getVerbosityLevel(){return i};t.info=function info(e){i>=n.INFOS&&console.log("Info: ".concat(e))};t.isArrayBuffer=function isArrayBuffer(e){return"object"===_typeof(e)&&null!==e&&void 0!==e.byteLength};t.isArrayEqual=function isArrayEqual(e,t){if(e.length!==t.length)return!1;return e.every((function(e,r){return e===t[r]}))};t.isBool=function isBool(e){return"boolean"==typeof e};t.isNum=function isNum(e){return"number"==typeof e};t.isString=function isString(e){return"string"==typeof e};t.isSameOrigin=function isSameOrigin(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin};t.createValidAbsoluteUrl=function createValidAbsoluteUrl(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function _isValidProtocol(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null};t.removeNullCharacters=function removeNullCharacters(e){if("string"!=typeof e){warn("The argument for removeNullCharacters must be a string.");return e}return e.replace(d,"")};t.setVerbosityLevel=function setVerbosityLevel(e){Number.isInteger(e)&&(i=e)};t.shadow=shadow;t.string32=function string32(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)};t.stringToBytes=stringToBytes;t.stringToPDFString=function stringToPDFString(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(var i=2;i<t;i+=2)r.push(String.fromCharCode(e.charCodeAt(i+1)<<8|e.charCodeAt(i)));else for(var o=0;o<t;++o){var a=y[e.charCodeAt(o)];r.push(a?String.fromCharCode(a):e.charAt(o))}return r.join("")};t.stringToUTF8String=function stringToUTF8String(e){return decodeURIComponent(escape(e))};t.utf8StringToString=function utf8StringToString(e){return unescape(encodeURIComponent(e))};t.warn=warn;t.unreachable=unreachable;t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0;r(2);function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReplyType={GROUP:"Group",REPLY:"R"};t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n;t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};t.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var i=n.WARNINGS;function warn(e){i>=n.WARNINGS&&console.log("Warning: ".concat(e))}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function shadow(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1});return r}var o=function BaseExceptionClosure(){function BaseException(e){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=e;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();t.BaseException=o;var a=function(e){_inherits(PasswordException,e);var t=_createSuper(PasswordException);function PasswordException(e,r){var n;_classCallCheck(this,PasswordException);(n=t.call(this,e)).code=r;return n}return PasswordException}(o);t.PasswordException=a;var s=function(e){_inherits(UnknownErrorException,e);var t=_createSuper(UnknownErrorException);function UnknownErrorException(e,r){var n;_classCallCheck(this,UnknownErrorException);(n=t.call(this,e)).details=r;return n}return UnknownErrorException}(o);t.UnknownErrorException=s;var c=function(e){_inherits(InvalidPDFException,e);var t=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return t.apply(this,arguments)}return InvalidPDFException}(o);t.InvalidPDFException=c;var u=function(e){_inherits(MissingPDFException,e);var t=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return t.apply(this,arguments)}return MissingPDFException}(o);t.MissingPDFException=u;var f=function(e){_inherits(UnexpectedResponseException,e);var t=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(e,r){var n;_classCallCheck(this,UnexpectedResponseException);(n=t.call(this,e)).status=r;return n}return UnexpectedResponseException}(o);t.UnexpectedResponseException=f;var l=function(e){_inherits(FormatError,e);var t=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return t.apply(this,arguments)}return FormatError}(o);t.FormatError=l;var p=function(e){_inherits(AbortException,e);var t=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return t.apply(this,arguments)}return AbortException}(o);t.AbortException=p;var d=/\x00/g;function stringToBytes(e){assert("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function arrayByteLength(e){if(void 0!==e.length)return e.length;assert(void 0!==e.byteLength,"arrayByteLength - invalid argument.");return e.byteLength}var h={get value(){return shadow(this,"value",function isLittleEndian(){var e=new Uint8Array(4);e[0]=1;return 1===new Uint32Array(e.buffer,0,1)[0]}())}};t.IsLittleEndianCached=h;var g={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=g;var v=["rgb(",0,",",0,",",0,")"],m=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(e,t,r){t&&_defineProperties(e.prototype,t);r&&_defineProperties(e,r);return e}(Util,null,[{key:"makeCssRgb",value:function makeCssRgb(e,t,r){v[1]=e;v[3]=t;v[5]=r;return v.join("")}},{key:"transform",value:function transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(e,t){var r=Util.applyTransform(e,t),n=Util.applyTransform(e.slice(2,4),t),i=Util.applyTransform([e[0],e[3]],t),o=Util.applyTransform([e[2],e[1]],t);return[Math.min(r[0],n[0],i[0],o[0]),Math.min(r[1],n[1],i[1],o[1]),Math.max(r[0],n[0],i[0],o[0]),Math.max(r[1],n[1],i[1],o[1])]}},{key:"inverseTransform",value:function inverseTransform(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],a=(r+o)/2,s=Math.sqrt((r+o)*(r+o)-4*(r*o-i*n))/2,c=a+s||1,u=a-s||1;return[Math.sqrt(c),Math.sqrt(u)]}},{key:"normalizeRect",value:function normalizeRect(e){var t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}},{key:"intersect",value:function intersect(e,t){function compare(e,t){return e-t}var r=[e[0],e[2],t[0],t[2]].sort(compare),n=[e[1],e[3],t[1],t[3]].sort(compare),i=[];e=Util.normalizeRect(e);t=Util.normalizeRect(t);if(!(r[0]===e[0]&&r[1]===t[0]||r[0]===t[0]&&r[1]===e[0]))return null;i[0]=r[1];i[2]=r[2];if(!(n[0]===e[1]&&n[1]===t[1]||n[0]===t[1]&&n[1]===e[1]))return null;i[1]=n[1];i[3]=n[2];return i}}]);return Util}();t.Util=m;var y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];var b=function createObjectURLClosure(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function createObjectURL(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n&&URL.createObjectURL){var i=new Blob([t],{type:r});return URL.createObjectURL(i)}for(var o="data:".concat(r,";base64,"),a=0,s=t.length;a<s;a+=3){var c=255&t[a],u=255&t[a+1],f=255&t[a+2],l=c>>2,p=(3&c)<<4|u>>4,d=a+1<s?(15&u)<<2|f>>6:64,h=a+2<s?63&f:64;o+=e[l]+e[p]+e[d]+e[h]}return o}}();t.createObjectURL=b},function(e,t,r){"use strict";var n=r(3);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=r(4));globalThis._pdfjsCompatibilityChecked=!0;var i="object"===("undefined"==typeof window?"undefined":_typeof(window))&&"object"===("undefined"==typeof document?"undefined":_typeof(document)),o="undefined"!=typeof navigator&&navigator.userAgent||"",a=/Trident/.test(o);!function checkNodeBtoa(){!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")})}();!function checkChildNodeRemove(){i&&void 0===Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)})}();!function checkDOMTokenListAddRemove(){if(i&&!n.isNodeJS){var e=document.createElement("div");e.classList.add("testOne","testTwo");if(!0!==e.classList.contains("testOne")||!0!==e.classList.contains("testTwo")){var t=DOMTokenList.prototype.add,r=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var i=0,o=r;i<o.length;i++){var a=o[i];t.call(this,a)}};DOMTokenList.prototype.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i];r.call(this,a)}}}}}();!function checkDOMTokenListToggle(){if(i&&!n.isNodeJS){!1!==document.createElement("div").classList.toggle("test",0)&&(DOMTokenList.prototype.toggle=function(e){var t=arguments.length>1?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t})}}();!function checkWindowHistoryPushStateReplaceState(){if(i&&a){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var i=void 0===n?[t,r]:[t,r,n];e.apply(this,i)};window.history.replaceState=function(e,r,n){var i=void 0===n?[e,r]:[e,r,n];t.apply(this,i)}}}();!function checkStringStartsWith(){String.prototype.startsWith||r(49)}();!function checkStringEndsWith(){String.prototype.endsWith||r(60)}();!function checkStringIncludes(){String.prototype.includes||r(62)}();!function checkArrayIncludes(){Array.prototype.includes||r(64)}();!function checkArrayFrom(){Array.from||r(72)}();!function checkObjectAssign(){Object.assign||r(94)}();!function checkObjectFromEntries(){Object.fromEntries||r(97)}();!function checkMathLog2(){Math.log2||(Math.log2=r(101))}();!function checkNumberIsNaN(){Number.isNaN||(Number.isNaN=r(103))}();!function checkNumberIsInteger(){Number.isInteger||(Number.isInteger=r(105))}();!function checkTypedArraySlice(){Uint8Array.prototype.slice||r(108)}();!function checkMapEntries(){globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(113))}();!function checkSetEntries(){globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(127))}();!function checkWeakMap(){globalThis.WeakMap||(globalThis.WeakMap=r(129))}();!function checkWeakSet(){globalThis.WeakSet||(globalThis.WeakSet=r(135))}();!function checkStringCodePointAt(){String.prototype.codePointAt||r(137)}();!function checkStringFromCodePoint(){String.fromCodePoint||(String.fromCodePoint=r(139))}();!function checkSymbol(){globalThis.Symbol||r(141)}();!function checkStringPadStart(){String.prototype.padStart||r(166)}();!function checkStringPadEnd(){String.prototype.padEnd||r(171)}();!function checkObjectValues(){Object.values||(Object.values=r(173))}();!function checkObjectEntries(){Object.entries||(Object.entries=r(176))}()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isNodeJS=void 0;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},function(e,t,r){r(5);e.exports=r(7)},function(e,t,r){r(6)({global:!0},{globalThis:r(7)})},function(e,t,r){var n=r(7),i=r(8).f,o=r(22),a=r(25),s=r(26),c=r(36),u=r(48);e.exports=function(e,t){var r,f,l,p,d,h=e.target,g=e.global,v=e.stat;if(r=g?n:v?n[h]||s(h,{}):(n[h]||{}).prototype)for(f in t){p=t[f];l=e.noTargetGet?(d=i(r,f))&&d.value:r[f];if(!u(g?f:h+(v?".":"#")+f,e.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(e.sham||l&&l.sham)&&o(p,"sham",!0);a(r,f,p,e)}}},function(e,t){var check=function(e){return e&&e.Math==Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||Function("return this")()},function(e,t,r){var n=r(9),i=r(11),o=r(12),a=r(13),s=r(17),c=r(19),u=r(20),f=Object.getOwnPropertyDescriptor;t.f=n?f:function getOwnPropertyDescriptor(e,t){e=a(e);t=s(t,!0);if(u)try{return f(e,t)}catch(e){}if(c(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,r){var n=r(10);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);t.f=o?function propertyIsEnumerable(e){var t=i(this,e);return!!t&&t.enumerable}:n},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(14),i=r(16);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(10),i=r(15),o="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(18);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(9),i=r(10),o=r(21);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(7),i=r(18),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,r){var n=r(9),i=r(23),o=r(12);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){e[t]=r;return e}},function(e,t,r){var n=r(9),i=r(20),o=r(24),a=r(17),s=Object.defineProperty;t.f=n?s:function defineProperty(e,t,r){o(e);t=a(t,!0);o(r);if(i)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");"value"in r&&(e[t]=r.value);return e}},function(e,t,r){var n=r(18);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,r){var n=r(7),i=r(22),o=r(19),a=r(26),s=r(27),c=r(29),u=c.get,f=c.enforce,l=String(String).split("String");(e.exports=function(e,t,r,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;if("function"==typeof r){"string"!=typeof t||o(r,"name")||i(r,"name",t);f(r).source=l.join("string"==typeof t?t:"")}if(e!==n){c?!p&&e[t]&&(u=!0):delete e[t];u?e[t]=r:i(e,t,r)}else u?e[t]=r:a(t,r)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&u(this).source||s(this)}))},function(e,t,r){var n=r(7),i=r(22);e.exports=function(e,t){try{i(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(28),i=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return i.call(e)});e.exports=n.inspectSource},function(e,t,r){var n=r(7),i=r(26),o=n["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,r){var n,i,o,a=r(30),s=r(7),c=r(18),u=r(22),f=r(19),l=r(31),p=r(35),d=s.WeakMap;if(a){var h=new d,g=h.get,v=h.has,m=h.set;n=function(e,t){m.call(h,e,t);return t};i=function(e){return g.call(h,e)||{}};o=function(e){return v.call(h,e)}}else{var y=l("state");p[y]=!0;n=function(e,t){u(e,y,t);return t};i=function(e){return f(e,y)?e[y]:{}};o=function(e){return f(e,y)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(7),i=r(27),o=n.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,r){var n=r(32),i=r(34),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,r){var n=r(33),i=r(28);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},function(e,t){e.exports={}},function(e,t,r){var n=r(19),i=r(37),o=r(8),a=r(23);e.exports=function(e,t){for(var r=i(t),s=a.f,c=o.f,u=0;u<r.length;u++){var f=r[u];n(e,f)||s(e,f,c(t,f))}}},function(e,t,r){var n=r(38),i=r(40),o=r(47),a=r(24);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=i.f(a(e)),r=o.f;return r?t.concat(r(e)):t}},function(e,t,r){var n=r(39),i=r(7),aFunction=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?aFunction(n[e])||aFunction(i[e]):n[e]&&n[e][t]||i[e]&&i[e][t]}},function(e,t,r){var n=r(7);e.exports=n},function(e,t,r){var n=r(41),i=r(46).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,i)}},function(e,t,r){var n=r(19),i=r(13),o=r(42).indexOf,a=r(35);e.exports=function(e,t){var r,s=i(e),c=0,u=[];for(r in s)!n(a,r)&&n(s,r)&&u.push(r);for(;t.length>c;)n(s,r=t[c++])&&(~o(u,r)||u.push(r));return u}},function(e,t,r){var n=r(13),i=r(43),o=r(45),createMethod=function(e){return function(t,r,a){var s,c=n(t),u=i(c.length),f=o(a,u);if(e&&r!=r){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},function(e,t,r){var n=r(44),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(44),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(10),i=/#|\.prototype\./,isForced=function(e,t){var r=a[o(e)];return r==c||r!=s&&("function"==typeof t?n(t):!!t)},o=isForced.normalize=function(e){return String(e).replace(i,".").toLowerCase()},a=isForced.data={},s=isForced.NATIVE="N",c=isForced.POLYFILL="P";e.exports=isForced},function(e,t,r){r(50);var n=r(57);e.exports=n("String","startsWith")},function(e,t,r){"use strict";var n,i=r(6),o=r(8).f,a=r(43),s=r(51),c=r(16),u=r(56),f=r(33),l="".startsWith,p=Math.min,d=u("startsWith");i({target:"String",proto:!0,forced:!(!f&&!d&&!!(n=o(String.prototype,"startsWith"),n&&!n.writable))&&!d},{startsWith:function startsWith(e){var t=String(c(this));s(e);var r=a(p(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return l?l.call(t,n,r):t.slice(r,r+n.length)===n}})},function(e,t,r){var n=r(52);e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,r){var n=r(18),i=r(15),o=r(53)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,r){var n=r(7),i=r(32),o=r(19),a=r(34),s=r(54),c=r(55),u=i("wks"),f=n.Symbol,l=c?f:f&&f.withoutSetter||a;e.exports=function(e){o(u,e)||(s&&o(f,e)?u[e]=f[e]:u[e]=l("Symbol."+e));return u[e]}},function(e,t,r){var n=r(10);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(e,t,r){var n=r(54);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,r){var n=r(53)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{t[n]=!1;return"/./"[e](t)}catch(e){}}return!1}},function(e,t,r){var n=r(7),i=r(58),o=Function.call;e.exports=function(e,t,r){return i(o,n[e].prototype[t],r)}},function(e,t,r){var n=r(59);e.exports=function(e,t,r){n(e);if(void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,r){r(61);var n=r(57);e.exports=n("String","endsWith")},function(e,t,r){"use strict";var n,i=r(6),o=r(8).f,a=r(43),s=r(51),c=r(16),u=r(56),f=r(33),l="".endsWith,p=Math.min,d=u("endsWith");i({target:"String",proto:!0,forced:!(!f&&!d&&!!(n=o(String.prototype,"endsWith"),n&&!n.writable))&&!d},{endsWith:function endsWith(e){var t=String(c(this));s(e);var r=arguments.length>1?arguments[1]:void 0,n=a(t.length),i=void 0===r?n:p(a(r),n),o=String(e);return l?l.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,r){r(63);var n=r(57);e.exports=n("String","includes")},function(e,t,r){"use strict";var n=r(6),i=r(51),o=r(16);n({target:"String",proto:!0,forced:!r(56)("includes")},{includes:function includes(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(65);var n=r(57);e.exports=n("Array","includes")},function(e,t,r){"use strict";var n=r(6),i=r(42).includes,o=r(66);n({target:"Array",proto:!0,forced:!r(71)("indexOf",{ACCESSORS:!0,1:0})},{includes:function includes(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}});o("includes")},function(e,t,r){var n=r(53),i=r(67),o=r(23),a=n("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)});e.exports=function(e){s[a][e]=!0}},function(e,t,r){var n,i=r(24),o=r(68),a=r(46),s=r(35),c=r(70),u=r(21),f=r(31),l=f("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<script>"+e+"<\/script>"},NullProtoObject=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}NullProtoObject=n?function(e){e.write(scriptTag(""));e.close();var t=e.parentWindow.Object;e=null;return t}(n):function(){var e,t=u("iframe");t.style.display="none";c.appendChild(t);t.src=String("javascript:");(e=t.contentWindow.document).open();e.write(scriptTag("document.F=Object"));e.close();return e.F}();for(var e=a.length;e--;)delete NullProtoObject.prototype[a[e]];return NullProtoObject()};s[l]=!0;e.exports=Object.create||function create(e,t){var r;if(null!==e){EmptyConstructor.prototype=i(e);r=new EmptyConstructor;EmptyConstructor.prototype=null;r[l]=e}else r=NullProtoObject();return void 0===t?r:o(r,t)}},function(e,t,r){var n=r(9),i=r(23),o=r(24),a=r(69);e.exports=n?Object.defineProperties:function defineProperties(e,t){o(e);for(var r,n=a(t),s=n.length,c=0;s>c;)i.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(41),i=r(46);e.exports=Object.keys||function keys(e){return n(e,i)}},function(e,t,r){var n=r(38);e.exports=n("document","documentElement")},function(e,t,r){var n=r(9),i=r(10),o=r(19),a=Object.defineProperty,s={},thrower=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var r=[][e],c=!!o(t,"ACCESSORS")&&t.ACCESSORS,u=o(t,0)?t[0]:thrower,f=o(t,1)?t[1]:void 0;return s[e]=!!r&&!i((function(){if(c&&!n)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:thrower}):e[1]=1;r.call(e,u,f)}))}},function(e,t,r){r(73);r(85);var n=r(39);e.exports=n.Array.from},function(e,t,r){"use strict";var n=r(74).charAt,i=r(29),o=r(75),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function next(){var e,t=s(this),r=t.string,i=t.index;if(i>=r.length)return{value:void 0,done:!0};e=n(r,i);t.index+=e.length;return{value:e,done:!1}}))},function(e,t,r){var n=r(44),i=r(16),createMethod=function(e){return function(t,r){var o,a,s=String(i(t)),c=n(r),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},function(e,t,r){"use strict";var n=r(6),i=r(76),o=r(78),a=r(83),s=r(81),c=r(22),u=r(25),f=r(53),l=r(33),p=r(82),d=r(77),h=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,v=f("iterator"),returnThis=function(){return this};e.exports=function(e,t,r,f,d,m,y){i(r,t,f);var b,x,w,getIterationMethod=function(e){if(e===d&&C)return C;if(!g&&e in T)return T[e];switch(e){case"keys":return function keys(){return new r(this,e)};case"values":return function values(){return new r(this,e)};case"entries":return function entries(){return new r(this,e)}}return function(){return new r(this)}},S=t+" Iterator",_=!1,T=e.prototype,P=T[v]||T["@@iterator"]||d&&T[d],C=!g&&P||getIterationMethod(d),k="Array"==t&&T.entries||P;if(k){b=o(k.call(new e));if(h!==Object.prototype&&b.next){l||o(b)===h||(a?a(b,h):"function"!=typeof b[v]&&c(b,v,returnThis));s(b,S,!0,!0);l&&(p[S]=returnThis)}}if("values"==d&&P&&"values"!==P.name){_=!0;C=function values(){return P.call(this)}}l&&!y||T[v]===C||c(T,v,C);p[t]=C;if(d){x={values:getIterationMethod("values"),keys:m?C:getIterationMethod("keys"),entries:getIterationMethod("entries")};if(y)for(w in x)(g||_||!(w in T))&&u(T,w,x[w]);else n({target:t,proto:!0,forced:g||_},x)}return x}},function(e,t,r){"use strict";var n=r(77).IteratorPrototype,i=r(67),o=r(12),a=r(81),s=r(82),returnThis=function(){return this};e.exports=function(e,t,r){var c=t+" Iterator";e.prototype=i(n,{next:o(1,r)});a(e,c,!1,!0);s[c]=returnThis;return e}},function(e,t,r){"use strict";var n,i,o,a=r(78),s=r(22),c=r(19),u=r(53),f=r(33),l=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(n=i):p=!0);null==n&&(n={});f||c(n,l)||s(n,l,(function(){return this}));e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},function(e,t,r){var n=r(19),i=r(79),o=r(31),a=r(80),s=o("IE_PROTO"),c=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){e=i(e);return n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},function(e,t,r){var n=r(16);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(10);e.exports=!n((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},function(e,t,r){var n=r(23).f,i=r(19),o=r(53)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(24),i=r(84);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]);t=r instanceof Array}catch(e){}return function setPrototypeOf(r,o){n(r);i(o);t?e.call(r,o):r.__proto__=o;return r}}():void 0)},function(e,t,r){var n=r(18);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,r){var n=r(6),i=r(86);n({target:"Array",stat:!0,forced:!r(93)((function(e){Array.from(e)}))},{from:i})},function(e,t,r){"use strict";var n=r(58),i=r(79),o=r(87),a=r(88),s=r(43),c=r(89),u=r(90);e.exports=function from(e){var t,r,f,l,p,d,h=i(e),g="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,y=void 0!==m,b=u(h),x=0;y&&(m=n(m,v>2?arguments[2]:void 0,2));if(null==b||g==Array&&a(b)){r=new g(t=s(h.length));for(;t>x;x++){d=y?m(h[x],x):h[x];c(r,x,d)}}else{p=(l=b.call(h)).next;r=new g;for(;!(f=p.call(l)).done;x++){d=y?o(l,m,[f.value,x],!0):f.value;c(r,x,d)}}r.length=x;return r}},function(e,t,r){var n=r(24);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var o=e.return;void 0!==o&&n(o.call(e));throw t}}},function(e,t,r){var n=r(53),i=r(82),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,r){"use strict";var n=r(17),i=r(23),o=r(12);e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},function(e,t,r){var n=r(91),i=r(82),o=r(53)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){var n=r(92),i=r(15),o=r(53)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:a?i(t):"Object"==(n=i(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(53)("toStringTag")]="z";e.exports="[object z]"===String(n)},function(e,t,r){var n=r(53)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this};Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}};e(o)}catch(e){}return r}},function(e,t,r){r(95);var n=r(39);e.exports=n.Object.assign},function(e,t,r){var n=r(6),i=r(96);n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,r){"use strict";var n=r(9),i=r(10),o=r(69),a=r(47),s=r(11),c=r(79),u=r(14),f=Object.assign,l=Object.defineProperty;e.exports=!f||i((function(){if(n&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();e[r]=7;"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e}));return 7!=f({},e)[r]||"abcdefghijklmnopqrst"!=o(f({},t)).join("")}))?function assign(e,t){for(var r=c(e),i=arguments.length,f=1,l=a.f,p=s.f;i>f;)for(var d,h=u(arguments[f++]),g=l?o(h).concat(l(h)):o(h),v=g.length,m=0;v>m;){d=g[m++];n&&!p.call(h,d)||(r[d]=h[d])}return r}:f},function(e,t,r){r(98);r(99);var n=r(39);e.exports=n.Object.fromEntries},function(e,t,r){"use strict";var n=r(13),i=r(66),o=r(82),a=r(29),s=r(75),c=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){c(this,{type:"Array Iterator",target:n(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,r=e.kind,n=e.index++;if(!t||n>=t.length){e.target=void 0;return{value:void 0,done:!0}}return"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");o.Arguments=o.Array;i("keys");i("values");i("entries")},function(e,t,r){var n=r(6),i=r(100),o=r(89);n({target:"Object",stat:!0},{fromEntries:function fromEntries(e){var t={};i(e,(function(e,r){o(t,e,r)}),void 0,!0);return t}})},function(e,t,r){var n=r(24),i=r(88),o=r(43),a=r(58),s=r(90),c=r(87),Result=function(e,t){this.stopped=e;this.result=t};(e.exports=function(e,t,r,u,f){var l,p,d,h,g,v,m,y=a(t,r,u?2:1);if(f)l=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(i(p)){for(d=0,h=o(e.length);h>d;d++)if((g=u?y(n(m=e[d])[0],m[1]):y(e[d]))&&g instanceof Result)return g;return new Result(!1)}l=p.call(e)}v=l.next;for(;!(m=v.call(l)).done;)if("object"==typeof(g=c(l,y,m.value,u))&&g&&g instanceof Result)return g;return new Result(!1)}).stop=function(e){return new Result(!0,e)}},function(e,t,r){r(102);var n=r(39);e.exports=n.Math.log2},function(e,t,r){var n=r(6),i=Math.log,o=Math.LN2;n({target:"Math",stat:!0},{log2:function log2(e){return i(e)/o}})},function(e,t,r){r(104);var n=r(39);e.exports=n.Number.isNaN},function(e,t,r){r(6)({target:"Number",stat:!0},{isNaN:function isNaN(e){return e!=e}})},function(e,t,r){r(106);var n=r(39);e.exports=n.Number.isInteger},function(e,t,r){r(6)({target:"Number",stat:!0},{isInteger:r(107)})},function(e,t,r){var n=r(18),i=Math.floor;e.exports=function isInteger(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){r(109)},function(e,t,r){"use strict";var n=r(110),i=r(112),o=r(10),a=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,u=[].slice;c("slice",(function slice(e,t){for(var r=u.call(a(this),e,t),n=i(this,this.constructor),o=0,c=r.length,f=new(s(n))(c);c>o;)f[o]=r[o++];return f}),o((function(){new Int8Array(1).slice()})))},function(e,t,r){"use strict";var n,i=r(111),o=r(9),a=r(7),s=r(18),c=r(19),u=r(91),f=r(22),l=r(25),p=r(23).f,d=r(78),h=r(83),g=r(53),v=r(34),m=a.Int8Array,y=m&&m.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,w=m&&d(m),S=y&&d(y),_=Object.prototype,T=_.isPrototypeOf,P=g("toStringTag"),C=v("TYPED_ARRAY_TAG"),k=i&&!!h&&"Opera"!==u(a.opera),I=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},isTypedArray=function(e){return s(e)&&c(O,u(e))};for(n in O)a[n]||(k=!1);if(!k||"function"!=typeof w||w===Function.prototype){w=function TypedArray(){throw TypeError("Incorrect invocation")};if(k)for(n in O)a[n]&&h(a[n],w)}if(!k||!S||S===_){S=w.prototype;if(k)for(n in O)a[n]&&h(a[n].prototype,S)}k&&d(x)!==S&&h(x,S);if(o&&!c(S,P)){I=!0;p(S,P,{get:function(){return s(this)?this[C]:void 0}});for(n in O)a[n]&&f(a[n],C,n)}e.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:I&&C,aTypedArray:function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(h){if(T.call(w,e))return e}else for(var t in O)if(c(O,n)){var r=a[t];if(r&&(e===r||T.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(o){if(r)for(var n in O){var i=a[n];i&&c(i.prototype,e)&&delete i.prototype[e]}S[e]&&!r||l(S,e,r?t:k&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(o){if(h){if(r)for(n in O)(i=a[n])&&c(i,e)&&delete i[e];if(w[e]&&!r)return;try{return l(w,e,r?t:k&&m[e]||t)}catch(e){}}for(n in O)!(i=a[n])||i[e]&&!r||l(i,e,t)}},isView:function isView(e){var t=u(e);return"DataView"===t||c(O,t)},isTypedArray:isTypedArray,TypedArray:w,TypedArrayPrototype:S}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,r){var n=r(24),i=r(59),o=r(53)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[o])?t:i(r)}},function(e,t,r){r(114);r(123);r(73);r(125);var n=r(39);e.exports=n.Map},function(e,t,r){"use strict";var n=r(115),i=r(120);e.exports=n("Map",(function(e){return function Map(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){"use strict";var n=r(6),i=r(7),o=r(48),a=r(25),s=r(116),c=r(100),u=r(118),f=r(18),l=r(10),p=r(93),d=r(81),h=r(119);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),v=-1!==e.indexOf("Weak"),m=g?"set":"add",y=i[e],b=y&&y.prototype,x=y,w={},fixMethod=function(e){var t=b[e];a(b,e,"add"==e?function add(e){t.call(this,0===e?0:e);return this}:"delete"==e?function(e){return!(v&&!f(e))&&t.call(this,0===e?0:e)}:"get"==e?function get(e){return v&&!f(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function has(e){return!(v&&!f(e))&&t.call(this,0===e?0:e)}:function set(e,r){t.call(this,0===e?0:e,r);return this})};if(o(e,"function"!=typeof y||!(v||b.forEach&&!l((function(){(new y).entries().next()}))))){x=r.getConstructor(t,e,g,m);s.REQUIRED=!0}else if(o(e,!0)){var S=new x,_=S[m](v?{}:-0,1)!=S,T=l((function(){S.has(1)})),P=p((function(e){new y(e)})),C=!v&&l((function(){for(var e=new y,t=5;t--;)e[m](t,t);return!e.has(-0)}));if(!P){(x=t((function(t,r){u(t,x,e);var n=h(new y,t,x);null!=r&&c(r,n[m],n,g);return n}))).prototype=b;b.constructor=x}if(T||C){fixMethod("delete");fixMethod("has");g&&fixMethod("get")}(C||_)&&fixMethod(m);v&&b.clear&&delete b.clear}w[e]=x;n({global:!0,forced:x!=y},w);d(x,e);v||r.setStrong(x,e,g);return x}},function(e,t,r){var n=r(35),i=r(18),o=r(19),a=r(23).f,s=r(34),c=r(117),u=s("meta"),f=0,l=Object.isExtensible||function(){return!0},setMetadata=function(e){a(e,u,{value:{objectID:"O"+ ++f,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!l(e))return"F";if(!t)return"E";setMetadata(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!l(e))return!0;if(!t)return!1;setMetadata(e)}return e[u].weakData},onFreeze:function(e){c&&p.REQUIRED&&l(e)&&!o(e,u)&&setMetadata(e);return e}};n[u]=!0},function(e,t,r){var n=r(10);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},function(e,t,r){var n=r(18),i=r(83);e.exports=function(e,t,r){var o,a;i&&"function"==typeof(o=t.constructor)&&o!==r&&n(a=o.prototype)&&a!==r.prototype&&i(e,a);return e}},function(e,t,r){"use strict";var n=r(23).f,i=r(67),o=r(121),a=r(58),s=r(118),c=r(100),u=r(75),f=r(122),l=r(9),p=r(116).fastKey,d=r(29),h=d.set,g=d.getterFor;e.exports={getConstructor:function(e,t,r,u){var f=e((function(e,n){s(e,f,t);h(e,{type:t,index:i(null),first:void 0,last:void 0,size:0});l||(e.size=0);null!=n&&c(n,e[u],e,r)})),d=g(t),define=function(e,t,r){var n,i,o=d(e),a=getEntry(e,t);if(a)a.value=r;else{o.last=a={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1};o.first||(o.first=a);n&&(n.next=a);l?o.size++:e.size++;"F"!==i&&(o.index[i]=a)}return e},getEntry=function(e,t){var r,n=d(e),i=p(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};o(f.prototype,{clear:function clear(){for(var e=d(this),t=e.index,r=e.first;r;){r.removed=!0;r.previous&&(r.previous=r.previous.next=void 0);delete t[r.index];r=r.next}e.first=e.last=void 0;l?e.size=0:this.size=0},delete:function(e){var t=d(this),r=getEntry(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index];r.removed=!0;i&&(i.next=n);n&&(n.previous=i);t.first==r&&(t.first=n);t.last==r&&(t.last=i);l?t.size--:this.size--}return!!r},forEach:function forEach(e){for(var t,r=d(this),n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;){n(t.value,t.key,this);for(;t&&t.removed;)t=t.previous}},has:function has(e){return!!getEntry(this,e)}});o(f.prototype,r?{get:function get(e){var t=getEntry(this,e);return t&&t.value},set:function set(e,t){return define(this,0===e?0:e,t)}}:{add:function add(e){return define(this,e=0===e?0:e,e)}});l&&n(f.prototype,"size",{get:function(){return d(this).size}});return f},setStrong:function(e,t,r){var n=t+" Iterator",i=g(t),o=g(n);u(e,t,(function(e,t){h(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;if(!e.target||!(e.last=r=r?r.next:e.state.first)){e.target=void 0;return{value:void 0,done:!0}}return"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}}),r?"entries":"values",!r,!0);f(t)}}},function(e,t,r){var n=r(25);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";var n=r(38),i=r(23),o=r(53),a=r(9),s=o("species");e.exports=function(e){var t=n(e),r=i.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(92),i=r(25),o=r(124);n||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,r){"use strict";var n=r(92),i=r(91);e.exports=n?{}.toString:function toString(){return"[object "+i(this)+"]"}},function(e,t,r){var n=r(7),i=r(126),o=r(98),a=r(22),s=r(53),c=s("iterator"),u=s("toStringTag"),f=o.values;for(var l in i){var p=n[l],d=p&&p.prototype;if(d){if(d[c]!==f)try{a(d,c,f)}catch(e){d[c]=f}d[u]||a(d,u,l);if(i[l])for(var h in o)if(d[h]!==o[h])try{a(d,h,o[h])}catch(e){d[h]=o[h]}}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,r){r(128);r(123);r(73);r(125);var n=r(39);e.exports=n.Set},function(e,t,r){"use strict";var n=r(115),i=r(120);e.exports=n("Set",(function(e){return function Set(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){r(123);r(130);r(125);var n=r(39);e.exports=n.WeakMap},function(e,t,r){"use strict";var n,i=r(7),o=r(121),a=r(116),s=r(115),c=r(131),u=r(18),f=r(29).enforce,l=r(30),p=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,wrapper=function(e){return function WeakMap(){return e(this,arguments.length?arguments[0]:void 0)}},h=e.exports=s("WeakMap",wrapper,c);if(l&&p){n=c.getConstructor(wrapper,"WeakMap",!0);a.REQUIRED=!0;var g=h.prototype,v=g.delete,m=g.has,y=g.get,b=g.set;o(g,{delete:function(e){if(u(e)&&!d(e)){var t=f(this);t.frozen||(t.frozen=new n);return v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function has(e){if(u(e)&&!d(e)){var t=f(this);t.frozen||(t.frozen=new n);return m.call(this,e)||t.frozen.has(e)}return m.call(this,e)},get:function get(e){if(u(e)&&!d(e)){var t=f(this);t.frozen||(t.frozen=new n);return m.call(this,e)?y.call(this,e):t.frozen.get(e)}return y.call(this,e)},set:function set(e,t){if(u(e)&&!d(e)){var r=f(this);r.frozen||(r.frozen=new n);m.call(this,e)?b.call(this,e,t):r.frozen.set(e,t)}else b.call(this,e,t);return this}})}},function(e,t,r){"use strict";var n=r(121),i=r(116).getWeakData,o=r(24),a=r(18),s=r(118),c=r(100),u=r(132),f=r(19),l=r(29),p=l.set,d=l.getterFor,h=u.find,g=u.findIndex,v=0,uncaughtFrozenStore=function(e){return e.frozen||(e.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};UncaughtFrozenStore.prototype={get:function(e){var t=findUncaughtFrozen(this,e);if(t)return t[1]},has:function(e){return!!findUncaughtFrozen(this,e)},set:function(e,t){var r=findUncaughtFrozen(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));~t&&this.entries.splice(t,1);return!!~t}};e.exports={getConstructor:function(e,t,r,u){var l=e((function(e,n){s(e,l,t);p(e,{type:t,id:v++,frozen:void 0});null!=n&&c(n,e[u],e,r)})),h=d(t),define=function(e,t,r){var n=h(e),a=i(o(t),!0);!0===a?uncaughtFrozenStore(n).set(t,r):a[n.id]=r;return e};n(l.prototype,{delete:function(e){var t=h(this);if(!a(e))return!1;var r=i(e);return!0===r?uncaughtFrozenStore(t).delete(e):r&&f(r,t.id)&&delete r[t.id]},has:function has(e){var t=h(this);if(!a(e))return!1;var r=i(e);return!0===r?uncaughtFrozenStore(t).has(e):r&&f(r,t.id)}});n(l.prototype,r?{get:function get(e){var t=h(this);if(a(e)){var r=i(e);return!0===r?uncaughtFrozenStore(t).get(e):r?r[t.id]:void 0}},set:function set(e,t){return define(this,e,t)}}:{add:function add(e){return define(this,e,!0)}});return l}}},function(e,t,r){var n=r(58),i=r(14),o=r(79),a=r(43),s=r(133),c=[].push,createMethod=function(e){var t=1==e,r=2==e,u=3==e,f=4==e,l=6==e,p=5==e||l;return function(d,h,g,v){for(var m,y,b=o(d),x=i(b),w=n(h,g,3),S=a(x.length),_=0,T=v||s,P=t?T(d,S):r?T(d,0):void 0;S>_;_++)if(p||_ in x){y=w(m=x[_],_,b);if(e)if(t)P[_]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:c.call(P,m)}else if(f)return!1}return l?-1:u||f?f:P}};e.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)}},function(e,t,r){var n=r(18),i=r(134),o=r(53)("species");e.exports=function(e,t){var r;i(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!i(r.prototype)?n(r)&&null===(r=r[o])&&(r=void 0):r=void 0);return new(void 0===r?Array:r)(0===t?0:t)}},function(e,t,r){var n=r(15);e.exports=Array.isArray||function isArray(e){return"Array"==n(e)}},function(e,t,r){r(123);r(136);r(125);var n=r(39);e.exports=n.WeakSet},function(e,t,r){"use strict";r(115)("WeakSet",(function(e){return function WeakSet(){return e(this,arguments.length?arguments[0]:void 0)}}),r(131))},function(e,t,r){r(138);var n=r(57);e.exports=n("String","codePointAt")},function(e,t,r){"use strict";var n=r(6),i=r(74).codeAt;n({target:"String",proto:!0},{codePointAt:function codePointAt(e){return i(this,e)}})},function(e,t,r){r(140);var n=r(39);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(6),i=r(45),o=String.fromCharCode,a=String.fromCodePoint;n({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function fromCodePoint(e){for(var t,r=[],n=arguments.length,a=0;n>a;){t=+arguments[a++];if(i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(142);r(123);r(146);r(150);r(151);r(152);r(153);r(154);r(155);r(156);r(157);r(158);r(159);r(160);r(161);r(162);r(163);r(164);r(165);var n=r(39);e.exports=n.Symbol},function(e,t,r){"use strict";var n=r(6),i=r(10),o=r(134),a=r(18),s=r(79),c=r(43),u=r(89),f=r(133),l=r(143),p=r(53),d=r(144),h=p("isConcatSpreadable"),g=d>=51||!i((function(){var e=[];e[h]=!1;return e.concat()[0]!==e})),v=l("concat"),isConcatSpreadable=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,forced:!g||!v},{concat:function concat(e){var t,r,n,i,o,a=s(this),l=f(a,0),p=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(o=-1===t?a:arguments[t])){if(p+(i=c(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,p++)r in o&&u(l,p,o[r])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(l,p++,o)}l.length=p;return l}})},function(e,t,r){var n=r(10),i=r(53),o=r(144),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];(t.constructor={})[a]=function(){return{foo:1}};return 1!==t[e](Boolean).foo}))}},function(e,t,r){var n,i,o=r(7),a=r(145),s=o.process,c=s&&s.versions,u=c&&c.v8;u?i=(n=u.split("."))[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=n[1]);e.exports=i&&+i},function(e,t,r){var n=r(38);e.exports=n("navigator","userAgent")||""},function(e,t,r){"use strict";var n=r(6),i=r(7),o=r(38),a=r(33),s=r(9),c=r(54),u=r(55),f=r(10),l=r(19),p=r(134),d=r(18),h=r(24),g=r(79),v=r(13),m=r(17),y=r(12),b=r(67),x=r(69),w=r(40),S=r(147),_=r(47),T=r(8),P=r(23),C=r(11),k=r(22),I=r(25),O=r(32),E=r(31),A=r(35),R=r(34),M=r(53),D=r(148),L=r(149),B=r(81),U=r(29),N=r(132).forEach,j=E("hidden"),z=M("toPrimitive"),H=U.set,W=U.getterFor("Symbol"),X=Object.prototype,q=i.Symbol,Y=o("JSON","stringify"),V=T.f,J=P.f,G=S.f,K=C.f,Q=O("symbols"),Z=O("op-symbols"),$=O("string-to-symbol-registry"),ee=O("symbol-to-string-registry"),te=O("wks"),re=i.QObject,ne=!re||!re.prototype||!re.prototype.findChild,ie=s&&f((function(){return 7!=b(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=V(X,t);n&&delete X[t];J(e,t,r);n&&e!==X&&J(X,t,n)}:J,wrap=function(e,t){var r=Q[e]=b(q.prototype);H(r,{type:"Symbol",tag:e,description:t});s||(r.description=t);return r},oe=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof q},ae=function defineProperty(e,t,r){e===X&&ae(Z,t,r);h(e);var n=m(t,!0);h(r);if(l(Q,n)){if(r.enumerable){l(e,j)&&e[j][n]&&(e[j][n]=!1);r=b(r,{enumerable:y(0,!1)})}else{l(e,j)||J(e,j,y(1,{}));e[j][n]=!0}return ie(e,n,r)}return J(e,n,r)},se=function defineProperties(e,t){h(e);var r=v(t),n=x(r).concat(le(r));N(n,(function(t){s&&!ce.call(r,t)||ae(e,t,r[t])}));return e},ce=function propertyIsEnumerable(e){var t=m(e,!0),r=K.call(this,t);return!(this===X&&l(Q,t)&&!l(Z,t))&&(!(r||!l(this,t)||!l(Q,t)||l(this,j)&&this[j][t])||r)},ue=function getOwnPropertyDescriptor(e,t){var r=v(e),n=m(t,!0);if(r!==X||!l(Q,n)||l(Z,n)){var i=V(r,n);!i||!l(Q,n)||l(r,j)&&r[j][n]||(i.enumerable=!0);return i}},fe=function getOwnPropertyNames(e){var t=G(v(e)),r=[];N(t,(function(e){l(Q,e)||l(A,e)||r.push(e)}));return r},le=function getOwnPropertySymbols(e){var t=e===X,r=G(t?Z:v(e)),n=[];N(r,(function(e){!l(Q,e)||t&&!l(X,e)||n.push(Q[e])}));return n};if(!c){I((q=function Symbol(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=R(e),setter=function(e){this===X&&setter.call(Z,e);l(this,j)&&l(this[j],t)&&(this[j][t]=!1);ie(this,t,y(1,e))};s&&ne&&ie(X,t,{configurable:!0,set:setter});return wrap(t,e)}).prototype,"toString",(function toString(){return W(this).tag}));I(q,"withoutSetter",(function(e){return wrap(R(e),e)}));C.f=ce;P.f=ae;T.f=ue;w.f=S.f=fe;_.f=le;D.f=function(e){return wrap(M(e),e)};if(s){J(q.prototype,"description",{configurable:!0,get:function description(){return W(this).description}});a||I(X,"propertyIsEnumerable",ce,{unsafe:!0})}}n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:q});N(x(te),(function(e){L(e)}));n({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=String(e);if(l($,t))return $[t];var r=q(t);$[t]=r;ee[r]=t;return r},keyFor:function keyFor(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(l(ee,e))return ee[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}});n({target:"Object",stat:!0,forced:!c,sham:!s},{create:function create(e,t){return void 0===t?b(e):se(b(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:ue});n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe,getOwnPropertySymbols:le});n({target:"Object",stat:!0,forced:f((function(){_.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(e){return _.f(g(e))}});if(Y){n({target:"JSON",stat:!0,forced:!c||f((function(){var e=q();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))}))},{stringify:function stringify(e,t,r){for(var n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);n=t;if((d(t)||void 0!==e)&&!oe(e)){p(t)||(t=function(e,t){"function"==typeof n&&(t=n.call(this,e,t));if(!oe(t))return t});i[1]=t;return Y.apply(null,i)}}})}q.prototype[z]||k(q.prototype,z,q.prototype.valueOf);B(q,"Symbol");A[j]=!0},function(e,t,r){var n=r(13),i=r(40).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function getOwnPropertyNames(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(n(e))}},function(e,t,r){var n=r(53);t.f=n},function(e,t,r){var n=r(39),i=r(19),o=r(148),a=r(23).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,r){r(149)("asyncIterator")},function(e,t,r){"use strict";var n=r(6),i=r(9),o=r(7),a=r(19),s=r(18),c=r(23).f,u=r(36),f=o.Symbol;if(i&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},p=function Symbol(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new f(e):void 0===e?f():f(e);""===e&&(l[t]=!0);return t};u(p,f);var d=p.prototype=f.prototype;d.constructor=p;var h=d.toString,g="Symbol(test)"==String(f("test")),v=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function description(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(l,e))return"";var r=g?t.slice(7,-1):t.replace(v,"$1");return""===r?void 0:r}});n({global:!0,forced:!0},{Symbol:p})}},function(e,t,r){r(149)("hasInstance")},function(e,t,r){r(149)("isConcatSpreadable")},function(e,t,r){r(149)("iterator")},function(e,t,r){r(149)("match")},function(e,t,r){r(149)("matchAll")},function(e,t,r){r(149)("replace")},function(e,t,r){r(149)("search")},function(e,t,r){r(149)("species")},function(e,t,r){r(149)("split")},function(e,t,r){r(149)("toPrimitive")},function(e,t,r){r(149)("toStringTag")},function(e,t,r){r(149)("unscopables")},function(e,t,r){r(81)(Math,"Math",!0)},function(e,t,r){var n=r(7);r(81)(n.JSON,"JSON",!0)},function(e,t,r){r(167);var n=r(57);e.exports=n("String","padStart")},function(e,t,r){"use strict";var n=r(6),i=r(168).start;n({target:"String",proto:!0,forced:r(170)},{padStart:function padStart(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(43),i=r(169),o=r(16),a=Math.ceil,createMethod=function(e){return function(t,r,s){var c,u,f=String(o(t)),l=f.length,p=void 0===s?" ":String(s),d=n(r);if(d<=l||""==p)return f;c=d-l;(u=i.call(p,a(c/p.length))).length>c&&(u=u.slice(0,c));return e?f+u:u+f}};e.exports={start:createMethod(!1),end:createMethod(!0)}},function(e,t,r){"use strict";var n=r(44),i=r(16);e.exports="".repeat||function repeat(e){var t=String(i(this)),r="",o=n(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},function(e,t,r){var n=r(145);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(172);var n=r(57);e.exports=n("String","padEnd")},function(e,t,r){"use strict";var n=r(6),i=r(168).end;n({target:"String",proto:!0,forced:r(170)},{padEnd:function padEnd(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(174);var n=r(39);e.exports=n.Object.values},function(e,t,r){var n=r(6),i=r(175).values;n({target:"Object",stat:!0},{values:function values(e){return i(e)}})},function(e,t,r){var n=r(9),i=r(69),o=r(13),a=r(11).f,createMethod=function(e){return function(t){for(var r,s=o(t),c=i(s),u=c.length,f=0,l=[];u>f;){r=c[f++];n&&!a.call(s,r)||l.push(e?[r,s[r]]:s[r])}return l}};e.exports={entries:createMethod(!0),values:createMethod(!1)}},function(e,t,r){r(177);var n=r(39);e.exports=n.Object.entries},function(e,t,r){var n=r(6),i=r(175).entries;n({target:"Object",stat:!0},{entries:function entries(e){return i(e)}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Jbig2Image=void 0;var n=r(1),i=r(179),o=r(180),a=r(181);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=function(e){!function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}(Jbig2Error,e);var t=_createSuper(Jbig2Error);function Jbig2Error(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Jbig2Error);return t.call(this,"JBIG2 error: ".concat(e))}return Jbig2Error}(n.BaseException),c=function Jbig2ImageClosure(){function ContextCache(){}ContextCache.prototype={getContexts:function getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}};function DecodingContext(e,t,r){this.data=e;this.start=t;this.end=r}DecodingContext.prototype={get decoder(){var e=new o.ArithmeticDecoder(this.data,this.start,this.end);return(0,n.shadow)(this,"decoder",e)},get contextCache(){var e=new ContextCache;return(0,n.shadow)(this,"contextCache",e)}};function decodeInteger(e,t,r){var n=e.getContexts(t),i=1;function readBits(e){for(var t=0,o=0;o<e;o++){var a=r.readBit(n,i);i=i<256?i<<1|a:511&(i<<1|a)|256;t=t<<1|a}return t>>>0}var o=readBits(1),a=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);return 0===o?a:a>0?-a:null}function decodeIAID(e,t,r){for(var n=e.getContexts("IAID"),i=1,o=0;o<r;o++){i=i<<1|t.readBit(n,i)}return r<31?i&(1<<r)-1:2147483647&i}var e=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],t=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],r=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],c=[39717,1941,229,405],u=[32,8];function decodeBitmap(e,r,n,i,o,a,s,u){if(e){return decodeMMRBitmap(new Reader(u.data,u.start,u.end),r,n,!1)}if(0===i&&!a&&!o&&4===s.length&&3===s[0].x&&-1===s[0].y&&-3===s[1].x&&-1===s[1].y&&2===s[2].x&&-2===s[2].y&&-2===s[3].x&&-2===s[3].y)return function decodeBitmapTemplate0(e,t,r){var n,i,o,a,s,c,u,f=r.decoder,l=r.contextCache.getContexts("GB"),p=[];for(i=0;i<t;i++){s=p[i]=new Uint8Array(e);c=i<1?s:p[i-1];n=(u=i<2?s:p[i-2])[0]<<13|u[1]<<12|u[2]<<11|c[0]<<7|c[1]<<6|c[2]<<5|c[3]<<4;for(o=0;o<e;o++){s[o]=a=f.readBit(l,n);n=(31735&n)<<1|(o+3<e?u[o+3]<<11:0)|(o+4<e?c[o+4]<<4:0)|a}}return p}(r,n,u);var f=!!a,l=t[i].concat(s);l.sort((function(e,t){return e.y-t.y||e.x-t.x}));var p,d,h=l.length,g=new Int8Array(h),v=new Int8Array(h),m=[],y=0,b=0,x=0,w=0;for(d=0;d<h;d++){g[d]=l[d].x;v[d]=l[d].y;b=Math.min(b,l[d].x);x=Math.max(x,l[d].x);w=Math.min(w,l[d].y);d<h-1&&l[d].y===l[d+1].y&&l[d].x===l[d+1].x-1?y|=1<<h-1-d:m.push(d)}var S=m.length,_=new Int8Array(S),T=new Int8Array(S),P=new Uint16Array(S);for(p=0;p<S;p++){d=m[p];_[p]=l[d].x;T[p]=l[d].y;P[p]=1<<h-1-d}for(var C,k,I,O,E,A=-b,R=-w,M=r-x,D=c[i],L=new Uint8Array(r),B=[],U=u.decoder,N=u.contextCache.getContexts("GB"),j=0,z=0,H=0;H<n;H++){if(o){if(j^=U.readBit(N,D)){B.push(L);continue}}L=new Uint8Array(L);B.push(L);for(C=0;C<r;C++)if(f&&a[H][C])L[C]=0;else{if(C>=A&&C<M&&H>=R){z=z<<1&y;for(d=0;d<S;d++){k=H+T[d];I=C+_[d];(O=B[k][I])&&(z|=O=P[d])}}else{z=0;E=h-1;for(d=0;d<h;d++,E--)(I=C+g[d])>=0&&I<r&&(k=H+v[d])>=0&&(O=B[k][I])&&(z|=O<<E)}var W=U.readBit(N,z);L[C]=W}}return B}function decodeRefinement(e,t,n,i,o,a,c,f,l){var p=r[n].coding;0===n&&(p=p.concat([f[0]]));var d,h=p.length,g=new Int32Array(h),v=new Int32Array(h);for(d=0;d<h;d++){g[d]=p[d].x;v[d]=p[d].y}var m=r[n].reference;0===n&&(m=m.concat([f[1]]));var y=m.length,b=new Int32Array(y),x=new Int32Array(y);for(d=0;d<y;d++){b[d]=m[d].x;x[d]=m[d].y}for(var w=i[0].length,S=i.length,_=u[n],T=[],P=l.decoder,C=l.contextCache.getContexts("GR"),k=0,I=0;I<t;I++){if(c){if(k^=P.readBit(C,_))throw new s("prediction is not supported")}var O=new Uint8Array(e);T.push(O);for(var E=0;E<e;E++){var A,R,M=0;for(d=0;d<h;d++){A=I+v[d];R=E+g[d];A<0||R<0||R>=e?M<<=1:M=M<<1|T[A][R]}for(d=0;d<y;d++){A=I+x[d]-a;R=E+b[d]-o;A<0||A>=S||R<0||R>=w?M<<=1:M=M<<1|i[A][R]}var D=P.readBit(C,M);O[E]=D}}return T}function decodeTextRegion(e,t,r,n,i,o,a,c,u,f,l,p,d,h,g,v,m,y,b){if(e&&t)throw new s("refinement with Huffman is not supported");var x,w,S=[];for(x=0;x<n;x++){w=new Uint8Array(r);if(i)for(var _=0;_<r;_++)w[_]=i;S.push(w)}var T=m.decoder,P=m.contextCache,C=e?-h.tableDeltaT.decode(b):-decodeInteger(P,"IADT",T),k=0;x=0;for(;x<o;){C+=e?h.tableDeltaT.decode(b):decodeInteger(P,"IADT",T);for(var I=k+=e?h.tableFirstS.decode(b):decodeInteger(P,"IAFS",T);;){var O=0;a>1&&(O=e?b.readBits(y):decodeInteger(P,"IAIT",T));var E=a*C+O,A=e?h.symbolIDTable.decode(b):decodeIAID(P,T,u),R=t&&(e?b.readBit():decodeInteger(P,"IARI",T)),M=c[A],D=M[0].length,L=M.length;if(R){var B=decodeInteger(P,"IARDW",T),U=decodeInteger(P,"IARDH",T);M=decodeRefinement(D+=B,L+=U,g,M,(B>>1)+decodeInteger(P,"IARDX",T),(U>>1)+decodeInteger(P,"IARDY",T),!1,v,m)}var N,j,z,H=E-(1&p?0:L-1),W=I-(2&p?D-1:0);if(f){for(N=0;N<L;N++)if(w=S[W+N]){z=M[N];var X=Math.min(r-H,D);switch(d){case 0:for(j=0;j<X;j++)w[H+j]|=z[j];break;case 2:for(j=0;j<X;j++)w[H+j]^=z[j];break;default:throw new s("operator ".concat(d," is not supported"))}}I+=L-1}else{for(j=0;j<L;j++)if(w=S[H+j]){z=M[j];switch(d){case 0:for(N=0;N<D;N++)w[W+N]|=z[N];break;case 2:for(N=0;N<D;N++)w[W+N]^=z[N];break;default:throw new s("operator ".concat(d," is not supported"))}}I+=D-1}x++;var q=e?h.tableDeltaS.decode(b):decodeInteger(P,"IADS",T);if(null===q)break;I+=q+l}}return S}function readSegmentHeader(t,r){var n={};n.number=(0,i.readUint32)(t,r);var o=t[r+4],a=63&o;if(!e[a])throw new s("invalid segment type: "+a);n.type=a;n.typeName=e[a];n.deferredNonRetain=!!(128&o);var c=!!(64&o),u=t[r+5],l=u>>5&7,p=[31&u],d=r+6;if(7===u){l=536870911&(0,i.readUint32)(t,d-1);d+=3;var h=l+7>>3;p[0]=t[d++];for(;--h>0;)p.push(t[d++])}else if(5===u||6===u)throw new s("invalid referred-to flags");n.retainBits=p;var g=4;n.number<=256?g=1:n.number<=65536&&(g=2);var v,m,y=[];for(v=0;v<l;v++){var b=void 0;b=1===g?t[d]:2===g?(0,i.readUint16)(t,d):(0,i.readUint32)(t,d);y.push(b);d+=g}n.referredTo=y;if(c){n.pageAssociation=(0,i.readUint32)(t,d);d+=4}else n.pageAssociation=t[d++];n.length=(0,i.readUint32)(t,d);d+=4;if(4294967295===n.length){if(38!==a)throw new s("invalid unknown segment length");var x=readRegionSegmentInformation(t,d),w=!!(1&t[d+f]),S=new Uint8Array(6);if(!w){S[0]=255;S[1]=172}S[2]=x.height>>>24&255;S[3]=x.height>>16&255;S[4]=x.height>>8&255;S[5]=255&x.height;for(v=d,m=t.length;v<m;v++){for(var _=0;_<6&&S[_]===t[v+_];)_++;if(6===_){n.length=v+6;break}}if(4294967295===n.length)throw new s("segment end was not found")}n.headerEnd=d;return n}function readSegments(e,t,r,n){for(var i=[],o=r;o<n;){var a=readSegmentHeader(t,o);o=a.headerEnd;var s={header:a,data:t};if(!e.randomAccess){s.start=o;o+=a.length;s.end=o}i.push(s);if(51===a.type)break}if(e.randomAccess)for(var c=0,u=i.length;c<u;c++){i[c].start=o;o+=i[c].header.length;i[c].end=o}return i}function readRegionSegmentInformation(e,t){return{width:(0,i.readUint32)(e,t),height:(0,i.readUint32)(e,t+4),x:(0,i.readUint32)(e,t+8),y:(0,i.readUint32)(e,t+12),combinationOperator:7&e[t+16]}}var f=17;function processSegment(e,t){var r,n,o,a,c=e.header,u=e.data,l=e.start,p=e.end;switch(c.type){case 0:var d={},h=(0,i.readUint16)(u,l);d.huffman=!!(1&h);d.refinement=!!(2&h);d.huffmanDHSelector=h>>2&3;d.huffmanDWSelector=h>>4&3;d.bitmapSizeSelector=h>>6&1;d.aggregationInstancesSelector=h>>7&1;d.bitmapCodingContextUsed=!!(256&h);d.bitmapCodingContextRetained=!!(512&h);d.template=h>>10&3;d.refinementTemplate=h>>12&1;l+=2;if(!d.huffman){a=0===d.template?4:1;n=[];for(o=0;o<a;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}d.at=n}if(d.refinement&&!d.refinementTemplate){n=[];for(o=0;o<2;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}d.refinementAt=n}d.numberOfExportedSymbols=(0,i.readUint32)(u,l);l+=4;d.numberOfNewSymbols=(0,i.readUint32)(u,l);l+=4;r=[d,c.number,c.referredTo,u,l,p];break;case 6:case 7:var g={};g.info=readRegionSegmentInformation(u,l);l+=f;var v=(0,i.readUint16)(u,l);l+=2;g.huffman=!!(1&v);g.refinement=!!(2&v);g.logStripSize=v>>2&3;g.stripSize=1<<g.logStripSize;g.referenceCorner=v>>4&3;g.transposed=!!(64&v);g.combinationOperator=v>>7&3;g.defaultPixelValue=v>>9&1;g.dsOffset=v<<17>>27;g.refinementTemplate=v>>15&1;if(g.huffman){var m=(0,i.readUint16)(u,l);l+=2;g.huffmanFS=3&m;g.huffmanDS=m>>2&3;g.huffmanDT=m>>4&3;g.huffmanRefinementDW=m>>6&3;g.huffmanRefinementDH=m>>8&3;g.huffmanRefinementDX=m>>10&3;g.huffmanRefinementDY=m>>12&3;g.huffmanRefinementSizeSelector=!!(16384&m)}if(g.refinement&&!g.refinementTemplate){n=[];for(o=0;o<2;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}g.refinementAt=n}g.numberOfSymbolInstances=(0,i.readUint32)(u,l);l+=4;r=[g,c.referredTo,u,l,p];break;case 16:var y={},b=u[l++];y.mmr=!!(1&b);y.template=b>>1&3;y.patternWidth=u[l++];y.patternHeight=u[l++];y.maxPatternIndex=(0,i.readUint32)(u,l);l+=4;r=[y,c.number,u,l,p];break;case 22:case 23:var x={};x.info=readRegionSegmentInformation(u,l);l+=f;var w=u[l++];x.mmr=!!(1&w);x.template=w>>1&3;x.enableSkip=!!(8&w);x.combinationOperator=w>>4&7;x.defaultPixelValue=w>>7&1;x.gridWidth=(0,i.readUint32)(u,l);l+=4;x.gridHeight=(0,i.readUint32)(u,l);l+=4;x.gridOffsetX=4294967295&(0,i.readUint32)(u,l);l+=4;x.gridOffsetY=4294967295&(0,i.readUint32)(u,l);l+=4;x.gridVectorX=(0,i.readUint16)(u,l);l+=2;x.gridVectorY=(0,i.readUint16)(u,l);l+=2;r=[x,c.referredTo,u,l,p];break;case 38:case 39:var S={};S.info=readRegionSegmentInformation(u,l);l+=f;var _=u[l++];S.mmr=!!(1&_);S.template=_>>1&3;S.prediction=!!(8&_);if(!S.mmr){a=0===S.template?4:1;n=[];for(o=0;o<a;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}S.at=n}r=[S,u,l,p];break;case 48:var T={width:(0,i.readUint32)(u,l),height:(0,i.readUint32)(u,l+4),resolutionX:(0,i.readUint32)(u,l+8),resolutionY:(0,i.readUint32)(u,l+12)};4294967295===T.height&&delete T.height;var P=u[l+16];(0,i.readUint16)(u,l+17);T.lossless=!!(1&P);T.refinement=!!(2&P);T.defaultPixelValue=P>>2&1;T.combinationOperator=P>>3&3;T.requiresBuffer=!!(32&P);T.combinationOperatorOverride=!!(64&P);r=[T];break;case 49:case 50:case 51:break;case 53:r=[c.number,u,l,p];break;case 62:break;default:throw new s("segment type ".concat(c.typeName,"(").concat(c.type,")")+" is not implemented")}var C="on"+c.typeName;C in t&&t[C].apply(t,r)}function processSegments(e,t){for(var r=0,n=e.length;r<n;r++)processSegment(e[r],t)}function SimpleSegmentVisitor(){}SimpleSegmentVisitor.prototype={onPageInformation:function SimpleSegmentVisitor_onPageInformation(e){this.currentPageInfo=e;var t=e.width+7>>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var n=0,i=r.length;n<i;n++)r[n]=255;this.buffer=r},drawBitmap:function SimpleSegmentVisitor_drawBitmap(e,t){var r,n,i,o,a=this.currentPageInfo,c=e.width,u=e.height,f=a.width+7>>3,l=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,p=this.buffer,d=128>>(7&e.x),h=e.y*f+(e.x>>3);switch(l){case 0:for(r=0;r<u;r++){i=d;o=h;for(n=0;n<c;n++){t[r][n]&&(p[o]|=i);if(!(i>>=1)){i=128;o++}}h+=f}break;case 2:for(r=0;r<u;r++){i=d;o=h;for(n=0;n<c;n++){t[r][n]&&(p[o]^=i);if(!(i>>=1)){i=128;o++}}h+=f}break;default:throw new s("operator ".concat(l," is not supported"))}},onImmediateGenericRegion:function SimpleSegmentVisitor_onImmediateGenericRegion(e,t,r,n){var i=e.info,o=new DecodingContext(t,r,n),a=decodeBitmap(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,o);this.drawBitmap(i,a)},onImmediateLosslessGenericRegion:function SimpleSegmentVisitor_onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function SimpleSegmentVisitor_onSymbolDictionary(e,t,r,n,o,a){var c,u;if(e.huffman){c=function getSymbolDictionaryHuffmanTables(e,t,r){var n,i,o,a,c=0;switch(e.huffmanDHSelector){case 0:case 1:n=getStandardTable(e.huffmanDHSelector+4);break;case 3:n=getCustomHuffmanTable(c,t,r);c++;break;default:throw new s("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:i=getStandardTable(e.huffmanDWSelector+2);break;case 3:i=getCustomHuffmanTable(c,t,r);c++;break;default:throw new s("invalid Huffman DW selector")}if(e.bitmapSizeSelector){o=getCustomHuffmanTable(c,t,r);c++}else o=getStandardTable(1);a=e.aggregationInstancesSelector?getCustomHuffmanTable(c,t,r):getStandardTable(1);return{tableDeltaHeight:n,tableDeltaWidth:i,tableBitmapSize:o,tableAggregateInstances:a}}(e,r,this.customTables);u=new Reader(n,o,a)}var f=this.symbols;f||(this.symbols=f={});for(var l=[],p=0,d=r.length;p<d;p++){var h=f[r[p]];h&&(l=l.concat(h))}var g=new DecodingContext(n,o,a);f[t]=function decodeSymbolDictionary(e,t,r,n,o,a,c,u,f,l,p,d){if(e&&t)throw new s("symbol refinement with Huffman is not supported");var h,g,v=[],m=0,y=(0,i.log2)(r.length+n),b=p.decoder,x=p.contextCache;if(e){h=getStandardTable(1);g=[];y=Math.max(y,1)}for(;v.length<n;){m+=e?a.tableDeltaHeight.decode(d):decodeInteger(x,"IADH",b);for(var w=0,S=0,_=e?g.length:0;;){var T,P=e?a.tableDeltaWidth.decode(d):decodeInteger(x,"IADW",b);if(null===P)break;S+=w+=P;if(t){var C=decodeInteger(x,"IAAI",b);if(C>1)T=decodeTextRegion(e,t,w,m,0,C,1,r.concat(v),y,0,0,1,0,a,f,l,p,0,d);else{var k=decodeIAID(x,b,y),I=decodeInteger(x,"IARDX",b),O=decodeInteger(x,"IARDY",b);T=decodeRefinement(w,m,f,k<r.length?r[k]:v[k-r.length],I,O,!1,l,p)}v.push(T)}else if(e)g.push(w);else{T=decodeBitmap(!1,w,m,c,!1,null,u,p);v.push(T)}}if(e&&!t){var E=a.tableBitmapSize.decode(d);d.byteAlign();var A=void 0;if(0===E)A=readUncompressedBitmap(d,S,m);else{var R=d.end,M=d.position+E;d.end=M;A=decodeMMRBitmap(d,S,m,!1);d.end=R;d.position=M}var D=g.length;if(_===D-1)v.push(A);else{var L=void 0,B=void 0,U=0,N=void 0,j=void 0;for(L=_;L<D;L++){N=U+g[L];j=[];for(B=0;B<m;B++)j.push(A[B].subarray(U,N));v.push(j);U=N}}}}for(var z=[],H=[],W=!1,X=r.length+n;H.length<X;){for(var q=e?h.decode(d):decodeInteger(x,"IAEX",b);q--;)H.push(W);W=!W}for(var Y=0,V=r.length;Y<V;Y++)H[Y]&&z.push(r[Y]);for(var J=0;J<n;Y++,J++)H[Y]&&z.push(v[J]);return z}(e.huffman,e.refinement,l,e.numberOfNewSymbols,e.numberOfExportedSymbols,c,e.template,e.at,e.refinementTemplate,e.refinementAt,g,u)},onImmediateTextRegion:function SimpleSegmentVisitor_onImmediateTextRegion(e,t,r,n,o){for(var a,c,u=e.info,f=this.symbols,l=[],p=0,d=t.length;p<d;p++){var h=f[t[p]];h&&(l=l.concat(h))}var g=(0,i.log2)(l.length);if(e.huffman){c=new Reader(r,n,o);a=function getTextRegionHuffmanTables(e,t,r,n,i){for(var o=[],a=0;a<=34;a++){var c=i.readBits(4);o.push(new HuffmanLine([a,c,0,0]))}var u=new HuffmanTable(o,!1);o.length=0;for(var f=0;f<n;){var l=u.decode(i);if(l>=32){var p=void 0,d=void 0,h=void 0;switch(l){case 32:if(0===f)throw new s("no previous value in symbol ID table");d=i.readBits(2)+3;p=o[f-1].prefixLength;break;case 33:d=i.readBits(3)+3;p=0;break;case 34:d=i.readBits(7)+11;p=0;break;default:throw new s("invalid code length in symbol ID table")}for(h=0;h<d;h++){o.push(new HuffmanLine([f,p,0,0]));f++}}else{o.push(new HuffmanLine([f,l,0,0]));f++}}i.byteAlign();var g,v,m,y=new HuffmanTable(o,!1),b=0;switch(e.huffmanFS){case 0:case 1:g=getStandardTable(e.huffmanFS+6);break;case 3:g=getCustomHuffmanTable(b,t,r);b++;break;default:throw new s("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:v=getStandardTable(e.huffmanDS+8);break;case 3:v=getCustomHuffmanTable(b,t,r);b++;break;default:throw new s("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:m=getStandardTable(e.huffmanDT+11);break;case 3:m=getCustomHuffmanTable(b,t,r);b++;break;default:throw new s("invalid Huffman DT selector")}if(e.refinement)throw new s("refinement with Huffman is not supported");return{symbolIDTable:y,tableFirstS:g,tableDeltaS:v,tableDeltaT:m}}(e,t,this.customTables,l.length,c)}var v=new DecodingContext(r,n,o),m=decodeTextRegion(e.huffman,e.refinement,u.width,u.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,l,g,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,a,e.refinementTemplate,e.refinementAt,v,e.logStripSize,c);this.drawBitmap(u,m)},onImmediateLosslessTextRegion:function SimpleSegmentVisitor_onImmediateLosslessTextRegion(){this.onImmediateTextRegion.apply(this,arguments)},onPatternDictionary:function onPatternDictionary(e,t,r,n,i){var o=this.patterns;o||(this.patterns=o={});var a=new DecodingContext(r,n,i);o[t]=function decodePatternDictionary(e,t,r,n,i,o){var a=[];if(!e){a.push({x:-t,y:0});if(0===i){a.push({x:-3,y:-1});a.push({x:2,y:-2});a.push({x:-2,y:-2})}}for(var s=decodeBitmap(e,(n+1)*t,r,i,!1,null,a,o),c=[],u=0;u<=n;u++){for(var f=[],l=t*u,p=l+t,d=0;d<r;d++)f.push(s[d].subarray(l,p));c.push(f)}return c}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,a)},onImmediateHalftoneRegion:function onImmediateHalftoneRegion(e,t,r,n,o){var a=this.patterns[t[0]],c=e.info,u=new DecodingContext(r,n,o),f=function decodeHalftoneRegion(e,t,r,n,o,a,c,u,f,l,p,d,h,g,v){if(c)throw new s("skip is not supported");if(0!==u)throw new s("operator "+u+" is not supported in halftone region");var m,y,b,x=[];for(m=0;m<o;m++){b=new Uint8Array(n);if(a)for(y=0;y<n;y++)b[y]=a;x.push(b)}var w=t.length,S=t[0],_=S[0].length,T=S.length,P=(0,i.log2)(w),C=[];if(!e){C.push({x:r<=1?3:2,y:-1});if(0===r){C.push({x:-3,y:-1});C.push({x:2,y:-2});C.push({x:-2,y:-2})}}var k,I,O,E,A,R,M,D,L,B,U,N=[];e&&(k=new Reader(v.data,v.start,v.end));for(m=P-1;m>=0;m--){I=e?decodeMMRBitmap(k,f,l,!0):decodeBitmap(!1,f,l,r,!1,null,C,v);N[m]=I}for(O=0;O<l;O++)for(E=0;E<f;E++){A=0;R=0;for(y=P-1;y>=0;y--)R|=(A=N[y][O][E]^A)<<y;M=t[R];L=d+O*h-E*g>>8;if((D=p+O*g+E*h>>8)>=0&&D+_<=n&&L>=0&&L+T<=o)for(m=0;m<T;m++){U=x[L+m];B=M[m];for(y=0;y<_;y++)U[D+y]|=B[y]}else{var j=void 0,z=void 0;for(m=0;m<T;m++)if(!((z=L+m)<0||z>=o)){U=x[z];B=M[m];for(y=0;y<_;y++)(j=D+y)>=0&&j<n&&(U[j]|=B[y])}}}return x}(e.mmr,a,e.template,c.width,c.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,u);this.drawBitmap(c,f)},onImmediateLosslessHalftoneRegion:function onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion.apply(this,arguments)},onTables:function onTables(e,t,r,n){var o=this.customTables;o||(this.customTables=o={});o[e]=function decodeTablesSegment(e,t,r){var n,o,a=e[t],s=4294967295&(0,i.readUint32)(e,t+1),c=4294967295&(0,i.readUint32)(e,t+5),u=new Reader(e,t+9,r),f=1+(a>>1&7),l=1+(a>>4&7),p=[],d=s;do{n=u.readBits(f);o=u.readBits(l);p.push(new HuffmanLine([d,n,o,0]));d+=1<<o}while(d<c);n=u.readBits(f);p.push(new HuffmanLine([s-1,n,32,0,"lower"]));n=u.readBits(f);p.push(new HuffmanLine([c,n,32,0]));if(1&a){n=u.readBits(f);p.push(new HuffmanLine([n,0]))}return new HuffmanTable(p,!1)}(t,r,n)}};function HuffmanLine(e){if(2===e.length){this.isOOB=!0;this.rangeLow=0;this.prefixLength=e[0];this.rangeLength=0;this.prefixCode=e[1];this.isLowerRange=!1}else{this.isOOB=!1;this.rangeLow=e[0];this.prefixLength=e[1];this.rangeLength=e[2];this.prefixCode=e[3];this.isLowerRange="lower"===e[4]}}function HuffmanTreeNode(e){this.children=[];if(e){this.isLeaf=!0;this.rangeLength=e.rangeLength;this.rangeLow=e.rangeLow;this.isLowerRange=e.isLowerRange;this.isOOB=e.isOOB}else this.isLeaf=!1}HuffmanTreeNode.prototype={buildTree:function buildTree(e,t){var r=e.prefixCode>>t&1;if(t<=0)this.children[r]=new HuffmanTreeNode(e);else{var n=this.children[r];n||(this.children[r]=n=new HuffmanTreeNode(null));n.buildTree(e,t-1)}},decodeNode:function decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new s("invalid Huffman data");return r.decodeNode(e)}};function HuffmanTable(e,t){t||this.assignPrefixCodes(e);this.rootNode=new HuffmanTreeNode(null);for(var r=0,n=e.length;r<n;r++){var i=e[r];i.prefixLength>0&&this.rootNode.buildTree(i,i.prefixLength-1)}}HuffmanTable.prototype={decode:function decode(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function assignPrefixCodes(e){for(var t=e.length,r=0,n=0;n<t;n++)r=Math.max(r,e[n].prefixLength);for(var i=new Uint32Array(r+1),o=0;o<t;o++)i[e[o].prefixLength]++;var a,s,c,u=1,f=0;i[0]=0;for(;u<=r;){a=f=f+i[u-1]<<1;s=0;for(;s<t;){if((c=e[s]).prefixLength===u){c.prefixCode=a;a++}s++}u++}}};var l={};function getStandardTable(e){var t,r=l[e];if(r)return r;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new s("standard table B.".concat(e," does not exist"))}for(var n=0,i=t.length;n<i;n++)t[n]=new HuffmanLine(t[n]);r=new HuffmanTable(t,!0);l[e]=r;return r}function Reader(e,t,r){this.data=e;this.start=t;this.end=r;this.position=t;this.shift=-1;this.currentByte=0}Reader.prototype={readBit:function readBit(){if(this.shift<0){if(this.position>=this.end)throw new s("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}var e=this.currentByte>>this.shift&1;this.shift--;return e},readBits:function readBits(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<<t;return r},byteAlign:function byteAlign(){this.shift=-1},next:function next(){return this.position>=this.end?-1:this.data[this.position++]}};function getCustomHuffmanTable(e,t,r){for(var n=0,i=0,o=t.length;i<o;i++){var a=r[t[i]];if(a){if(e===n)return a;n++}}throw new s("can't find custom Huffman table")}function readUncompressedBitmap(e,t,r){for(var n=[],i=0;i<r;i++){var o=new Uint8Array(t);n.push(o);for(var a=0;a<t;a++)o[a]=e.readBit();e.byteAlign()}return n}function decodeMMRBitmap(e,t,r,n){for(var i,o={K:-1,Columns:t,Rows:r,BlackIs1:!0,EndOfBlock:n},s=new a.CCITTFaxDecoder(e,o),c=[],u=!1,f=0;f<r;f++){var l=new Uint8Array(t);c.push(l);for(var p=-1,d=0;d<t;d++){if(p<0){if(-1===(i=s.readNextChar())){i=0;u=!0}p=7}l[d]=i>>p&1;p--}}if(n&&!u)for(var h=0;h<5&&-1!==s.readNextChar();h++);return c}function Jbig2Image(){}Jbig2Image.prototype={parseChunks:function parseChunks(e){return function parseJbig2Chunks(e){for(var t=new SimpleSegmentVisitor,r=0,n=e.length;r<n;r++){var i=e[r];processSegments(readSegments({},i.data,i.start,i.end),t)}return t.buffer}(e)},parse:function parse(e){var t=function parseJbig2(e){var t=e.length,r=0;if(151!==e[r]||74!==e[r+1]||66!==e[r+2]||50!==e[r+3]||13!==e[r+4]||10!==e[r+5]||26!==e[r+6]||10!==e[r+7])throw new s("parseJbig2 - invalid header.");var n=Object.create(null);r+=8;var o=e[r++];n.randomAccess=!(1&o);if(!(2&o)){n.numberOfPages=(0,i.readUint32)(e,r);r+=4}var a=readSegments(n,e,r,t),c=new SimpleSegmentVisitor;processSegments(a,c);for(var u=c.currentPageInfo,f=u.width,l=u.height,p=c.buffer,d=new Uint8ClampedArray(f*l),h=0,g=0,v=0;v<l;v++)for(var m=0,y=void 0,b=0;b<f;b++){if(!m){m=128;y=p[g++]}d[h++]=y&m?0:255;m>>=1}return{imgData:d,width:f,height:l}}(e),r=t.imgData,n=t.width,o=t.height;this.width=n;this.height=o;return r}};return Jbig2Image}();t.Jbig2Image=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getLookupTableFactory=function getLookupTableFactory(e){var t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}};t.getInheritableProperty=function getInheritableProperty(e){var t,r=e.dict,i=e.key,o=e.getArray,a=void 0!==o&&o,s=e.stopWhenFound,c=void 0===s||s,u=0;for(;r;){var f=a?r.getArray(i):r.get(i);if(void 0!==f){if(c)return f;t||(t=[]);t.push(f)}if(++u>100){(0,n.warn)('getInheritableProperty: maximum loop count exceeded for "'.concat(i,'"'));break}r=r.get("Parent")}return t};t.toRomanNumerals=function toRomanNumerals(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,n.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");var r,i=[];for(;e>=1e3;){e-=1e3;i.push("M")}r=e/100|0;e%=100;i.push(s[r]);r=e/10|0;e%=10;i.push(s[10+r]);i.push(s[20+e]);var o=i.join("");return t?o.toLowerCase():o};t.log2=function log2(e){if(e<=0)return 0;return Math.ceil(Math.log2(e))};t.readInt8=function readInt8(e,t){return e[t]<<24>>24};t.readUint16=function readUint16(e,t){return e[t]<<8|e[t+1]};t.readUint32=function readUint32(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0};t.isWhiteSpace=function isWhiteSpace(e){return 32===e||9===e||13===e||10===e};t.XRefParseException=t.XRefEntryException=t.MissingDataException=void 0;var n=r(1);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var i=function(e){_inherits(MissingDataException,e);var t=_createSuper(MissingDataException);function MissingDataException(e,r){var n;_classCallCheck(this,MissingDataException);(n=t.call(this,"Missing data [".concat(e,", ").concat(r,")"))).begin=e;n.end=r;return n}return MissingDataException}(n.BaseException);t.MissingDataException=i;var o=function(e){_inherits(XRefEntryException,e);var t=_createSuper(XRefEntryException);function XRefEntryException(){_classCallCheck(this,XRefEntryException);return t.apply(this,arguments)}return XRefEntryException}(n.BaseException);t.XRefEntryException=o;var a=function(e){_inherits(XRefParseException,e);var t=_createSuper(XRefParseException);function XRefParseException(){_classCallCheck(this,XRefParseException);return t.apply(this,arguments)}return XRefParseException}(n.BaseException);t.XRefParseException=a;var s=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ArithmeticDecoder=void 0;function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}var n=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}],i=function(){function ArithmeticDecoder(e,t,r){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,ArithmeticDecoder);this.data=e;this.bp=t;this.dataEnd=r;this.chigh=e[t];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}!function _createClass(e,t,r){t&&_defineProperties(e.prototype,t);r&&_defineProperties(e,r);return e}(ArithmeticDecoder,[{key:"byteIn",value:function byteIn(){var e=this.data,t=this.bp;if(255===e[t])if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this.clow+=e[t]<<9;this.ct=7;this.bp=t}else{t++;this.clow+=t<this.dataEnd?e[t]<<8:65280;this.ct=8;this.bp=t}if(this.clow>65535){this.chigh+=this.clow>>16;this.clow&=65535}}},{key:"readBit",value:function readBit(e,t){var r,i=e[t]>>1,o=1&e[t],a=n[i],s=a.qe,c=this.a-s;if(this.chigh<s)if(c<s){c=s;r=o;i=a.nmps}else{c=s;r=1^o;1===a.switchFlag&&(o=r);i=a.nlps}else{this.chigh-=s;if(0!=(32768&c)){this.a=c;return o}if(c<s){r=1^o;1===a.switchFlag&&(o=r);i=a.nlps}else{r=o;i=a.nmps}}do{0===this.ct&&this.byteIn();c<<=1;this.chigh=this.chigh<<1&65535|this.clow>>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&c));this.a=c;e[t]=i<<1|o;return r}}]);return ArithmeticDecoder}();t.ArithmeticDecoder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CCITTFaxDecoder=void 0;var n=r(1),i=function CCITTFaxDecoder(){var e=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],t=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],i=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],o=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],a=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];function CCITTFaxDecoder(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e;this.eof=!1;this.encoding=t.K||0;this.eoline=t.EndOfLine||!1;this.byteAlign=t.EncodedByteAlign||!1;this.columns=t.Columns||1728;this.rows=t.Rows||0;var r,n=t.EndOfBlock;null==n&&(n=!0);this.eoblock=n;this.black=t.BlackIs1||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;for(;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}CCITTFaxDecoder.prototype={readNextChar:function readNextChar(){if(this.eof)return-1;var e,t,r,i,o,a=this.refLine,s=this.codingLine,c=this.columns;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;var u,f,l;if(this.nextLine2D){for(i=0;s[i]<c;++i)a[i]=s[i];a[i++]=c;a[i]=c;s[0]=0;this.codingPos=0;e=0;t=0;for(;s[this.codingPos]<c;)switch(u=this._getTwoDimCode()){case 0:this._addPixels(a[e+1],t);a[e+1]<c&&(e+=2);break;case 1:u=f=0;if(t){do{u+=l=this._getBlackCode()}while(l>=64);do{f+=l=this._getWhiteCode()}while(l>=64)}else{do{u+=l=this._getWhiteCode()}while(l>=64);do{f+=l=this._getBlackCode()}while(l>=64)}this._addPixels(s[this.codingPos]+u,t);s[this.codingPos]<c&&this._addPixels(s[this.codingPos]+f,1^t);for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2;break;case 7:this._addPixels(a[e]+3,t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 5:this._addPixels(a[e]+2,t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 3:this._addPixels(a[e]+1,t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 2:this._addPixels(a[e],t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 8:this._addPixelsNeg(a[e]-3,t);t^=1;if(s[this.codingPos]<c){e>0?--e:++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 6:this._addPixelsNeg(a[e]-2,t);t^=1;if(s[this.codingPos]<c){e>0?--e:++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 4:this._addPixelsNeg(a[e]-1,t);t^=1;if(s[this.codingPos]<c){e>0?--e:++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case-1:this._addPixels(c,0);this.eof=!0;break;default:(0,n.info)("bad 2d code");this._addPixels(c,0);this.err=!0}}else{s[0]=0;this.codingPos=0;t=0;for(;s[this.codingPos]<c;){u=0;if(t)do{u+=l=this._getBlackCode()}while(l>=64);else do{u+=l=this._getWhiteCode()}while(l>=64);this._addPixels(s[this.codingPos]+u,t);t^=1}}var p=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){u=this._lookBits(12);if(this.eoline)for(;-1!==u&&1!==u;){this._eatBits(1);u=this._lookBits(12)}else for(;0===u;){this._eatBits(1);u=this._lookBits(12)}if(1===u){this._eatBits(12);p=!0}else-1===u&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&p&&this.byteAlign){if(1===(u=this._lookBits(12))){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(i=0;i<4;++i){1!==(u=this._lookBits(12))&&(0,n.info)("bad rtc code: "+u);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(-1===(u=this._lookBits(13))){this.eof=!0;return-1}if(u>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&u)}}s[0]>0?this.outputBits=s[this.codingPos=0]:this.outputBits=s[this.codingPos=1];this.row++}if(this.outputBits>=8){o=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&s[this.codingPos]<c){this.codingPos++;this.outputBits=s[this.codingPos]-s[this.codingPos-1]}}else{r=8;o=0;do{if(this.outputBits>r){o<<=r;1&this.codingPos||(o|=255>>8-r);this.outputBits-=r;r=0}else{o<<=this.outputBits;1&this.codingPos||(o|=255>>8-this.outputBits);r-=this.outputBits;this.outputBits=0;if(s[this.codingPos]<c){this.codingPos++;this.outputBits=s[this.codingPos]-s[this.codingPos-1]}else if(r>0){o<<=r;r=0}}}while(r)}this.black&&(o^=255);return o},_addPixels:function _addPixels(e,t){var r=this.codingLine,i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,n.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}this.codingPos=i},_addPixelsNeg:function _addPixelsNeg(e,t){var r=this.codingLine,i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,n.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}else if(e<r[i]){if(e<0){(0,n.info)("invalid code");this.err=!0;e=0}for(;i>0&&e<r[i-1];)--i;r[i]=e}this.codingPos=i},_findTableCode:function _findTableCode(e,t,r,n){for(var i=n||0,o=e;o<=t;++o){var a=this._lookBits(o);if(-1===a)return[!0,1,!1];o<t&&(a<<=t-o);if(!i||a>=i){var s=r[a-i];if(s[0]===o){this._eatBits(o);return[!0,s[1],!0]}}}return[!1,0,!1]},_getTwoDimCode:function _getTwoDimCode(){var t,r=0;if(this.eoblock){r=this._lookBits(7);if((t=e[r])&&t[0]>0){this._eatBits(t[0]);return t[1]}}else{var i=this._findTableCode(1,7,e);if(i[0]&&i[2])return i[1]}(0,n.info)("Bad two dim code");return-1},_getWhiteCode:function _getWhiteCode(){var e,i=0;if(this.eoblock){if(-1===(i=this._lookBits(12)))return 1;if((e=i>>5==0?t[i]:r[i>>3])[0]>0){this._eatBits(e[0]);return e[1]}}else{var o=this._findTableCode(1,9,r);if(o[0])return o[1];if((o=this._findTableCode(11,12,t))[0])return o[1]}(0,n.info)("bad white code");this._eatBits(1);return 1},_getBlackCode:function _getBlackCode(){var e,t;if(this.eoblock){if(-1===(e=this._lookBits(13)))return 1;if((t=e>>7==0?i[e]:e>>9==0&&e>>7!=0?o[(e>>1)-64]:a[e>>7])[0]>0){this._eatBits(t[0]);return t[1]}}else{var r=this._findTableCode(2,6,a);if(r[0])return r[1];if((r=this._findTableCode(7,12,o,64))[0])return r[1];if((r=this._findTableCode(10,13,i))[0])return r[1]}(0,n.info)("bad black code");this._eatBits(1);return 1},_lookBits:function _lookBits(e){for(var t;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?-1:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e},_eatBits:function _eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}};return CCITTFaxDecoder}();t.CCITTFaxDecoder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.JpegImage=void 0;var n=r(1),i=r(179);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var o=function(e){_inherits(JpegError,e);var t=_createSuper(JpegError);function JpegError(e){_classCallCheck(this,JpegError);return t.call(this,"JPEG error: ".concat(e))}return JpegError}(n.BaseException),a=function(e){_inherits(DNLMarkerError,e);var t=_createSuper(DNLMarkerError);function DNLMarkerError(e,r){var n;_classCallCheck(this,DNLMarkerError);(n=t.call(this,e)).scanLines=r;return n}return DNLMarkerError}(n.BaseException),s=function(e){_inherits(EOIMarkerError,e);var t=_createSuper(EOIMarkerError);function EOIMarkerError(){_classCallCheck(this,EOIMarkerError);return t.apply(this,arguments)}return EOIMarkerError}(n.BaseException),c=function JpegImageClosure(){var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function JpegImage(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.decodeTransform,r=void 0===t?null:t,n=e.colorTransform,i=void 0===n?-1:n;this._decodeTransform=r;this._colorTransform=i}function buildHuffmanTable(e,t){for(var r,n,i=0,o=[],a=16;a>0&&!e[a-1];)a--;o.push({children:[],index:0});var s,c=o[0];for(r=0;r<a;r++){for(n=0;n<e[r];n++){(c=o.pop()).children[c.index]=t[i];for(;c.index>0;)c=o.pop();c.index++;o.push(c);for(;o.length<=r;){o.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}i++}if(r+1<a){o.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}}return o[0].children}function getBlockBufferOffset(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function decodeScan(t,r,c,u,f,l,p,d,h){var g=arguments.length>9&&void 0!==arguments[9]&&arguments[9],v=c.mcusPerLine,m=c.progressive,y=r,b=0,x=0;function readBit(){if(x>0){x--;return b>>x&1}if(255===(b=t[r++])){var e=t[r++];if(e){if(220===e&&g){r+=2;var n=(0,i.readUint16)(t,r);r+=2;if(n>0&&n!==c.scanLines)throw new a("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===e){if(g){var u=T*(8===c.precision?8:0);if(u>0&&Math.round(c.scanLines/u)>=10)throw new a("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",u)}throw new s("Found EOI marker (0xFFD9) while parsing scan data")}throw new o("unexpected marker ".concat((b<<8|e).toString(16)))}}x=7;return b>>>7}function decodeHuffman(e){for(var t=e;;){switch(_typeof(t=t[readBit()])){case"number":return t;case"object":continue}throw new o("invalid huffman sequence")}}function receive(e){for(var t=0;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;var t=receive(e);return t>=1<<e-1?t:t+(-1<<e)+1}function decodeBaseline(t,r){var n=decodeHuffman(t.huffmanTableDC),i=0===n?0:receiveAndExtend(n);t.blockData[r]=t.pred+=i;for(var o=1;o<64;){var a=decodeHuffman(t.huffmanTableAC),s=15&a,c=a>>4;if(0!==s){var u=e[o+=c];t.blockData[r+u]=receiveAndExtend(s);o++}else{if(c<15)break;o+=16}}}function decodeDCFirst(e,t){var r=decodeHuffman(e.huffmanTableDC),n=0===r?0:receiveAndExtend(r)<<h;e.blockData[t]=e.pred+=n}function decodeDCSuccessive(e,t){e.blockData[t]|=readBit()<<h}var w=0;function decodeACFirst(t,r){if(w>0)w--;else for(var n=l,i=p;n<=i;){var o=decodeHuffman(t.huffmanTableAC),a=15&o,s=o>>4;if(0!==a){var c=e[n+=s];t.blockData[r+c]=receiveAndExtend(a)*(1<<h);n++}else{if(s<15){w=receive(s)+(1<<s)-1;break}n+=16}}}var S,_=0;function decodeACSuccessive(t,r){for(var n,i,a=l,s=p,c=0;a<=s;){var u=r+e[a],f=t.blockData[u]<0?-1:1;switch(_){case 0:c=(i=decodeHuffman(t.huffmanTableAC))>>4;if(0===(n=15&i))if(c<15){w=receive(c)+(1<<c);_=4}else{c=16;_=1}else{if(1!==n)throw new o("invalid ACn encoding");S=receiveAndExtend(n);_=c?2:3}continue;case 1:case 2:t.blockData[u]?t.blockData[u]+=f*(readBit()<<h):0===--c&&(_=2===_?3:0);break;case 3:if(t.blockData[u])t.blockData[u]+=f*(readBit()<<h);else{t.blockData[u]=S<<h;_=0}break;case 4:t.blockData[u]&&(t.blockData[u]+=f*(readBit()<<h))}a++}4===_&&0===--w&&(_=0)}var T=0;function decodeMcu(e,t,r,n,i){var o=r%v;T=(r/v|0)*e.v+n;var a=o*e.h+i;t(e,getBlockBufferOffset(e,T,a))}function decodeBlock(e,t,r){T=r/e.blocksPerLine|0;var n=r%e.blocksPerLine;t(e,getBlockBufferOffset(e,T,n))}var P,C,k,I,O,E,A=u.length;E=m?0===l?0===d?decodeDCFirst:decodeDCSuccessive:0===d?decodeACFirst:decodeACSuccessive:decodeBaseline;var R,M,D,L,B=0;M=1===A?u[0].blocksPerLine*u[0].blocksPerColumn:v*c.mcusPerColumn;for(;B<=M;){var U=f?Math.min(M-B,f):M;if(U>0){for(C=0;C<A;C++)u[C].pred=0;w=0;if(1===A){P=u[0];for(O=0;O<U;O++){decodeBlock(P,E,B);B++}}else for(O=0;O<U;O++){for(C=0;C<A;C++){D=(P=u[C]).h;L=P.v;for(k=0;k<L;k++)for(I=0;I<D;I++)decodeMcu(P,E,B,k,I)}B++}}x=0;if(!(R=findNextFileMarker(t,r)))break;if(R.invalid){var N=U>0?"unexpected":"excessive";(0,n.warn)("decodeScan - ".concat(N," MCU data, current marker is: ").concat(R.invalid));r=R.offset}if(!(R.marker>=65488&&R.marker<=65495))break;r+=2}return r-y}function quantizeAndInverse(e,t,r){var n,i,a,s,c,u,f,l,p,d,h,g,v,m,y,b,x,w=e.quantizationTable,S=e.blockData;if(!w)throw new o("missing required Quantization Table.");for(var _=0;_<64;_+=8){p=S[t+_];d=S[t+_+1];h=S[t+_+2];g=S[t+_+3];v=S[t+_+4];m=S[t+_+5];y=S[t+_+6];b=S[t+_+7];p*=w[_];if(0!=(d|h|g|v|m|y|b)){d*=w[_+1];h*=w[_+2];g*=w[_+3];v*=w[_+4];m*=w[_+5];i=(n=(n=5793*p+128>>8)+(i=5793*v+128>>8)+1>>1)-i;x=3784*(a=h)+1567*(s=y*=w[_+6])+128>>8;a=1567*a-3784*s+128>>8;f=(c=(c=2896*(d-(b*=w[_+7]))+128>>8)+(f=m<<4)+1>>1)-f;u=(l=(l=2896*(d+b)+128>>8)+(u=g<<4)+1>>1)-u;s=(n=n+(s=x)+1>>1)-s;a=(i=i+a+1>>1)-a;x=2276*c+3406*l+2048>>12;c=3406*c-2276*l+2048>>12;l=x;x=799*u+4017*f+2048>>12;u=4017*u-799*f+2048>>12;f=x;r[_]=n+l;r[_+7]=n-l;r[_+1]=i+f;r[_+6]=i-f;r[_+2]=a+u;r[_+5]=a-u;r[_+3]=s+c;r[_+4]=s-c}else{x=5793*p+512>>10;r[_]=x;r[_+1]=x;r[_+2]=x;r[_+3]=x;r[_+4]=x;r[_+5]=x;r[_+6]=x;r[_+7]=x}}for(var T=0;T<8;++T){p=r[T];if(0!=((d=r[T+8])|(h=r[T+16])|(g=r[T+24])|(v=r[T+32])|(m=r[T+40])|(y=r[T+48])|(b=r[T+56]))){i=(n=4112+((n=5793*p+2048>>12)+(i=5793*v+2048>>12)+1>>1))-i;x=3784*(a=h)+1567*(s=y)+2048>>12;a=1567*a-3784*s+2048>>12;s=x;f=(c=(c=2896*(d-b)+2048>>12)+(f=m)+1>>1)-f;u=(l=(l=2896*(d+b)+2048>>12)+(u=g)+1>>1)-u;x=2276*c+3406*l+2048>>12;c=3406*c-2276*l+2048>>12;l=x;x=799*u+4017*f+2048>>12;u=4017*u-799*f+2048>>12;(p=(n=n+s+1>>1)+l)<16?p=0:p>=4080?p=255:p>>=4;(d=(i=i+a+1>>1)+(f=x))<16?d=0:d>=4080?d=255:d>>=4;(h=(a=i-a)+u)<16?h=0:h>=4080?h=255:h>>=4;(g=(s=n-s)+c)<16?g=0:g>=4080?g=255:g>>=4;(v=s-c)<16?v=0:v>=4080?v=255:v>>=4;(m=a-u)<16?m=0:m>=4080?m=255:m>>=4;(y=i-f)<16?y=0:y>=4080?y=255:y>>=4;(b=n-l)<16?b=0:b>=4080?b=255:b>>=4;S[t+T]=p;S[t+T+8]=d;S[t+T+16]=h;S[t+T+24]=g;S[t+T+32]=v;S[t+T+40]=m;S[t+T+48]=y;S[t+T+56]=b}else{x=(x=5793*p+8192>>14)<-2040?0:x>=2024?255:x+2056>>4;S[t+T]=x;S[t+T+8]=x;S[t+T+16]=x;S[t+T+24]=x;S[t+T+32]=x;S[t+T+40]=x;S[t+T+48]=x;S[t+T+56]=x}}}function buildComponentData(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,i=new Int16Array(64),o=0;o<n;o++)for(var a=0;a<r;a++){quantizeAndInverse(t,getBlockBufferOffset(t,o,a),i)}return t.blockData}function findNextFileMarker(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e.length-1,o=r<t?r:t;if(t>=n)return null;var a=(0,i.readUint16)(e,t);if(a>=65472&&a<=65534)return{invalid:null,marker:a,offset:t};for(var s=(0,i.readUint16)(e,o);!(s>=65472&&s<=65534);){if(++o>=n)return null;s=(0,i.readUint16)(e,o)}return{invalid:a.toString(16),marker:s,offset:o}}JpegImage.prototype={parse:function parse(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=r.dnlScanLines,u=void 0===c?null:c;function readDataBlock(){var e=(0,i.readUint16)(t,p),r=(p+=2)+e-2,o=findNextFileMarker(t,r,p);if(o&&o.invalid){(0,n.warn)("readDataBlock - incorrect length, current marker is: "+o.invalid);r=o.offset}var a=t.subarray(p,r);p+=a.length;return a}function prepareComponents(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){W=e.components[n];var i=Math.ceil(Math.ceil(e.samplesPerLine/8)*W.h/e.maxH),o=Math.ceil(Math.ceil(e.scanLines/8)*W.v/e.maxV),a=t*W.h,s=64*(r*W.v)*(a+1);W.blockData=new Int16Array(s);W.blocksPerLine=i;W.blocksPerColumn=o}e.mcusPerLine=t;e.mcusPerColumn=r}var f,l,p=0,d=null,h=null,g=0,v=[],m=[],y=[],b=(0,i.readUint16)(t,p);p+=2;if(65496!==b)throw new o("SOI not found");b=(0,i.readUint16)(t,p);p+=2;e:for(;65497!==b;){var x,w,S;switch(b){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var _=readDataBlock();65504===b&&74===_[0]&&70===_[1]&&73===_[2]&&70===_[3]&&0===_[4]&&(d={version:{major:_[5],minor:_[6]},densityUnits:_[7],xDensity:_[8]<<8|_[9],yDensity:_[10]<<8|_[11],thumbWidth:_[12],thumbHeight:_[13],thumbData:_.subarray(14,14+3*_[12]*_[13])});65518===b&&65===_[0]&&100===_[1]&&111===_[2]&&98===_[3]&&101===_[4]&&(h={version:_[5]<<8|_[6],flags0:_[7]<<8|_[8],flags1:_[9]<<8|_[10],transformCode:_[11]});break;case 65499:for(var T=(0,i.readUint16)(t,p),P=T+(p+=2)-2;p<P;){var C=t[p++],k=new Uint16Array(64);if(C>>4==0)for(w=0;w<64;w++)k[e[w]]=t[p++];else{if(C>>4!=1)throw new o("DQT - invalid table spec");for(w=0;w<64;w++){k[e[w]]=(0,i.readUint16)(t,p);p+=2}}v[15&C]=k}break;case 65472:case 65473:case 65474:if(f)throw new o("Only single frame JPEGs supported");p+=2;(f={}).extended=65473===b;f.progressive=65474===b;f.precision=t[p++];var I=(0,i.readUint16)(t,p);p+=2;f.scanLines=u||I;f.samplesPerLine=(0,i.readUint16)(t,p);p+=2;f.components=[];f.componentIds={};var O,E=t[p++],A=0,R=0;for(x=0;x<E;x++){O=t[p];var M=t[p+1]>>4,D=15&t[p+1];A<M&&(A=M);R<D&&(R=D);var L=t[p+2];S=f.components.push({h:M,v:D,quantizationId:L,quantizationTable:null});f.componentIds[O]=S-1;p+=3}f.maxH=A;f.maxV=R;prepareComponents(f);break;case 65476:var B=(0,i.readUint16)(t,p);p+=2;for(x=2;x<B;){var U=t[p++],N=new Uint8Array(16),j=0;for(w=0;w<16;w++,p++)j+=N[w]=t[p];var z=new Uint8Array(j);for(w=0;w<j;w++,p++)z[w]=t[p];x+=17+j;(U>>4==0?y:m)[15&U]=buildHuffmanTable(N,z)}break;case 65501:p+=2;l=(0,i.readUint16)(t,p);p+=2;break;case 65498:var H=1==++g&&!u;p+=2;var W,X=t[p++],q=[];for(x=0;x<X;x++){var Y=t[p++],V=f.componentIds[Y];(W=f.components[V]).index=Y;var J=t[p++];W.huffmanTableDC=y[J>>4];W.huffmanTableAC=m[15&J];q.push(W)}var G=t[p++],K=t[p++],Q=t[p++];try{var Z=decodeScan(t,p,f,q,l,G,K,Q>>4,15&Q,H);p+=Z}catch(e){if(e instanceof a){(0,n.warn)("".concat(e.message," -- attempting to re-parse the JPEG image."));return this.parse(t,{dnlScanLines:e.scanLines})}if(e instanceof s){(0,n.warn)("".concat(e.message," -- ignoring the rest of the image data."));break e}throw e}break;case 65500:p+=4;break;case 65535:255!==t[p]&&p--;break;default:var $=findNextFileMarker(t,p-2,p-3);if($&&$.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+$.invalid);p=$.offset;break}if(p>=t.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new o("JpegImage.parse - unknown marker: "+b.toString(16))}b=(0,i.readUint16)(t,p);p+=2}this.width=f.samplesPerLine;this.height=f.scanLines;this.jfif=d;this.adobe=h;this.components=[];for(x=0;x<f.components.length;x++){var ee=v[(W=f.components[x]).quantizationId];ee&&(W.quantizationTable=ee);this.components.push({index:W.index,output:buildComponentData(0,W),scaleX:W.h/f.maxH,scaleY:W.v/f.maxV,blocksPerLine:W.blocksPerLine,blocksPerColumn:W.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function _getLinearizedBlockData(e,t){var r,n,i,o,a,s,c,u,f,l,p,d,h=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=this.width/e,v=this.height/t,m=0,y=this.components.length,b=e*t*y,x=new Uint8ClampedArray(b),w=new Uint32Array(e),S=4294967288;for(c=0;c<y;c++){n=(r=this.components[c]).scaleX*g;i=r.scaleY*v;m=c;p=r.output;o=r.blocksPerLine+1<<3;if(n!==d){for(a=0;a<e;a++){u=0|a*n;w[a]=(u&S)<<3|7&u}d=n}for(s=0;s<t;s++){l=o*((u=0|s*i)&S)|(7&u)<<3;for(a=0;a<e;a++){x[m]=p[l+w[a]];m+=y}}}var _=this._decodeTransform;h||4!==y||_||(_=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(_)for(c=0;c<b;)for(u=0,f=0;u<y;u++,c++,f+=2)x[c]=(x[c]*_[f]>>8)+_[f+1];return x},get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform},_convertYccToRgb:function convertYccToRgb(e){for(var t,r,n,i=0,o=e.length;i<o;i+=3){t=e[i];r=e[i+1];n=e[i+2];e[i]=t-179.456+1.402*n;e[i+1]=t+135.459-.344*r-.714*n;e[i+2]=t-226.816+1.772*r}return e},_convertYcckToRgb:function convertYcckToRgb(e){for(var t,r,n,i,o=0,a=0,s=e.length;a<s;a+=4){t=e[a];r=e[a+1];n=e[a+2];i=e[a+3];e[o++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776);e[o++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665);e[o++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407)}return e.subarray(0,o)},_convertYcckToCmyk:function convertYcckToCmyk(e){for(var t,r,n,i=0,o=e.length;i<o;i+=4){t=e[i];r=e[i+1];n=e[i+2];e[i]=434.456-t-1.402*n;e[i+1]=119.541-t+.344*r+.714*n;e[i+2]=481.816-t-1.772*r}return e},_convertCmykToRgb:function convertCmykToRgb(e){for(var t,r,n,i,o=0,a=0,s=e.length;a<s;a+=4){t=e[a];r=e[a+1];n=e[a+2];i=e[a+3];e[o++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*i-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*i-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*i+.0686742238595345)-i*(.0003361971776183937*i+.7430659151342254);e[o++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*i-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*i-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*i-.09751927774728933)-i*(.0003189131175883281*i+.7364883807733168);e[o++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*i-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*i-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*i-.7591454649749609)-i*(.0003435319965105553*i+.7063770186160144)}return e.subarray(0,o)},getData:function getData(e){var t=e.width,r=e.height,n=e.forceRGB,i=void 0!==n&&n,a=e.isSourcePDF,s=void 0!==a&&a;if(this.numComponents>4)throw new o("Unsupported color mode");var c=this._getLinearizedBlockData(t,r,s);if(1===this.numComponents&&i){for(var u=c.length,f=new Uint8ClampedArray(3*u),l=0,p=0;p<u;p++){var d=c[p];f[l++]=d;f[l++]=d;f[l++]=d}return f}if(3===this.numComponents&&this._isColorConversionNeeded)return this._convertYccToRgb(c);if(4===this.numComponents){if(this._isColorConversionNeeded)return i?this._convertYcckToRgb(c):this._convertYcckToCmyk(c);if(i)return this._convertCmykToRgb(c)}return c}};return JpegImage}();t.JpegImage=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.JpxImage=void 0;var n=r(1),i=r(179),o=r(180);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=function(e){!function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}(JpxError,e);var t=_createSuper(JpxError);function JpxError(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,JpxError);return t.call(this,"JPX error: ".concat(e))}return JpxError}(n.BaseException),s=function JpxImageClosure(){var e={LL:0,LH:1,HL:1,HH:2};function JpxImage(){this.failOnCorruptedImage=!1}JpxImage.prototype={parse:function JpxImage_parse(e){if(65359!==(0,i.readUint16)(e,0))for(var t=0,r=e.length;t<r;){var o=8,s=(0,i.readUint32)(e,t),c=(0,i.readUint32)(e,t+4);t+=o;if(1===s){s=4294967296*(0,i.readUint32)(e,t)+(0,i.readUint32)(e,t+4);t+=8;o+=8}0===s&&(s=r-t+o);if(s<o)throw new a("Invalid box field size");var u=s-o,f=!0;switch(c){case 1785737832:f=!1;break;case 1668246642:var l=e[t];if(1===l){var p=(0,i.readUint32)(e,t+3);switch(p){case 16:case 17:case 18:break;default:(0,n.warn)("Unknown colorspace "+p)}}else 2===l&&(0,n.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(e,t,t+u);break;case 1783636e3:218793738!==(0,i.readUint32)(e,t)&&(0,n.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var d=String.fromCharCode(c>>24&255,c>>16&255,c>>8&255,255&c);(0,n.warn)("Unsupported header type "+c+" ("+d+")")}f&&(t+=u)}else this.parseCodestream(e,0,e.length)},parseImageProperties:function JpxImage_parseImageProperties(e){for(var t=e.getByte();t>=0;){if(65361===(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.getInt32()>>>0,o=e.getInt32()>>>0;e.skip(16);var s=e.getUint16();this.width=r-i;this.height=n-o;this.componentsCount=s;this.bitsPerComponent=8;return}}throw new a("No size marker found in JPX stream")},parseCodestream:function JpxImage_parseCodestream(e,t,r){var o={},s=!1;try{for(var c=t;c+1<r;){var u=(0,i.readUint16)(e,c);c+=2;var f,l,p,d,h,g,v=0;switch(u){case 65359:o.mainHeader=!0;break;case 65497:break;case 65361:v=(0,i.readUint16)(e,c);var m={};m.Xsiz=(0,i.readUint32)(e,c+4);m.Ysiz=(0,i.readUint32)(e,c+8);m.XOsiz=(0,i.readUint32)(e,c+12);m.YOsiz=(0,i.readUint32)(e,c+16);m.XTsiz=(0,i.readUint32)(e,c+20);m.YTsiz=(0,i.readUint32)(e,c+24);m.XTOsiz=(0,i.readUint32)(e,c+28);m.YTOsiz=(0,i.readUint32)(e,c+32);var y=(0,i.readUint16)(e,c+36);m.Csiz=y;var b=[];f=c+38;for(var x=0;x<y;x++){var w={precision:1+(127&e[f]),isSigned:!!(128&e[f]),XRsiz:e[f+1],YRsiz:e[f+2]};f+=3;calculateComponentDimensions(w,m);b.push(w)}o.SIZ=m;o.components=b;calculateTileGrids(o,b);o.QCC=[];o.COC=[];break;case 65372:v=(0,i.readUint16)(e,c);var S={};f=c+2;switch(31&(l=e[f++])){case 0:d=8;h=!0;break;case 1:d=16;h=!1;break;case 2:d=16;h=!0;break;default:throw new Error("Invalid SQcd value "+l)}S.noQuantization=8===d;S.scalarExpounded=h;S.guardBits=l>>5;p=[];for(;f<v+c;){var _={};if(8===d){_.epsilon=e[f++]>>3;_.mu=0}else{_.epsilon=e[f]>>3;_.mu=(7&e[f])<<8|e[f+1];f+=2}p.push(_)}S.SPqcds=p;if(o.mainHeader)o.QCD=S;else{o.currentTile.QCD=S;o.currentTile.QCC=[]}break;case 65373:v=(0,i.readUint16)(e,c);var T,P={};f=c+2;if(o.SIZ.Csiz<257)T=e[f++];else{T=(0,i.readUint16)(e,f);f+=2}switch(31&(l=e[f++])){case 0:d=8;h=!0;break;case 1:d=16;h=!1;break;case 2:d=16;h=!0;break;default:throw new Error("Invalid SQcd value "+l)}P.noQuantization=8===d;P.scalarExpounded=h;P.guardBits=l>>5;p=[];for(;f<v+c;){_={};if(8===d){_.epsilon=e[f++]>>3;_.mu=0}else{_.epsilon=e[f]>>3;_.mu=(7&e[f])<<8|e[f+1];f+=2}p.push(_)}P.SPqcds=p;o.mainHeader?o.QCC[T]=P:o.currentTile.QCC[T]=P;break;case 65362:v=(0,i.readUint16)(e,c);var C={};f=c+2;var k=e[f++];C.entropyCoderWithCustomPrecincts=!!(1&k);C.sopMarkerUsed=!!(2&k);C.ephMarkerUsed=!!(4&k);C.progressionOrder=e[f++];C.layersCount=(0,i.readUint16)(e,f);f+=2;C.multipleComponentTransform=e[f++];C.decompositionLevelsCount=e[f++];C.xcb=2+(15&e[f++]);C.ycb=2+(15&e[f++]);var I=e[f++];C.selectiveArithmeticCodingBypass=!!(1&I);C.resetContextProbabilities=!!(2&I);C.terminationOnEachCodingPass=!!(4&I);C.verticallyStripe=!!(8&I);C.predictableTermination=!!(16&I);C.segmentationSymbolUsed=!!(32&I);C.reversibleTransformation=e[f++];if(C.entropyCoderWithCustomPrecincts){for(var O=[];f<v+c;){var E=e[f++];O.push({PPx:15&E,PPy:E>>4})}C.precinctsSizes=O}var A=[];C.selectiveArithmeticCodingBypass&&A.push("selectiveArithmeticCodingBypass");C.resetContextProbabilities&&A.push("resetContextProbabilities");C.terminationOnEachCodingPass&&A.push("terminationOnEachCodingPass");C.verticallyStripe&&A.push("verticallyStripe");C.predictableTermination&&A.push("predictableTermination");if(A.length>0){s=!0;throw new Error("Unsupported COD options ("+A.join(", ")+")")}if(o.mainHeader)o.COD=C;else{o.currentTile.COD=C;o.currentTile.COC=[]}break;case 65424:v=(0,i.readUint16)(e,c);(g={}).index=(0,i.readUint16)(e,c+2);g.length=(0,i.readUint32)(e,c+4);g.dataEnd=g.length+c-2;g.partIndex=e[c+8];g.partsCount=e[c+9];o.mainHeader=!1;if(0===g.partIndex){g.COD=o.COD;g.COC=o.COC.slice(0);g.QCD=o.QCD;g.QCC=o.QCC.slice(0)}o.currentTile=g;break;case 65427:if(0===(g=o.currentTile).partIndex){initializeTile(o,g.index);buildPackets(o)}parseTilePackets(o,e,c,v=g.dataEnd-c);break;case 65365:case 65367:case 65368:case 65380:v=(0,i.readUint16)(e,c);break;case 65363:throw new Error("Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("Unknown codestream code: "+u.toString(16))}c+=v}}catch(e){if(s||this.failOnCorruptedImage)throw new a(e.message);(0,n.warn)("JPX: Trying to recover from: "+e.message)}this.tiles=function transformComponents(e){for(var t=e.SIZ,r=e.components,n=t.Csiz,i=[],o=0,a=e.tiles.length;o<a;o++){var s,c=e.tiles[o],u=[];for(s=0;s<n;s++)u[s]=transformTile(e,c,s);var f,l,p,d,h,g,v,m=u[0],y=new Uint8ClampedArray(m.items.length*n),b={left:m.left,top:m.top,width:m.width,height:m.height,items:y},x=0;if(c.codingStyleDefaultParameters.multipleComponentTransform){var w=4===n,S=u[0].items,_=u[1].items,T=u[2].items,P=w?u[3].items:null;f=r[0].precision-8;l=.5+(128<<f);var C=c.components[0],k=n-3;d=S.length;if(C.codingStyleParameters.reversibleTransformation)for(p=0;p<d;p++,x+=k){h=S[p]+l;g=_[p];v=T[p];var I=h-(v+g>>2);y[x++]=I+v>>f;y[x++]=I>>f;y[x++]=I+g>>f}else for(p=0;p<d;p++,x+=k){h=S[p]+l;g=_[p];v=T[p];y[x++]=h+1.402*v>>f;y[x++]=h-.34413*g-.71414*v>>f;y[x++]=h+1.772*g>>f}if(w)for(p=0,x=3;p<d;p++,x+=4)y[x]=P[p]+l>>f}else for(s=0;s<n;s++){var O=u[s].items;f=r[s].precision-8;l=.5+(128<<f);for(x=s,p=0,d=O.length;p<d;p++){y[x]=O[p]+l>>f;x+=n}}i.push(b)}return i}(o);this.width=o.SIZ.Xsiz-o.SIZ.XOsiz;this.height=o.SIZ.Ysiz-o.SIZ.YOsiz;this.componentsCount=o.SIZ.Csiz}};function calculateComponentDimensions(e,t){e.x0=Math.ceil(t.XOsiz/e.XRsiz);e.x1=Math.ceil(t.Xsiz/e.XRsiz);e.y0=Math.ceil(t.YOsiz/e.YRsiz);e.y1=Math.ceil(t.Ysiz/e.YRsiz);e.width=e.x1-e.x0;e.height=e.y1-e.y0}function calculateTileGrids(e,t){for(var r,n=e.SIZ,i=[],o=Math.ceil((n.Xsiz-n.XTOsiz)/n.XTsiz),a=Math.ceil((n.Ysiz-n.YTOsiz)/n.YTsiz),s=0;s<a;s++)for(var c=0;c<o;c++){(r={}).tx0=Math.max(n.XTOsiz+c*n.XTsiz,n.XOsiz);r.ty0=Math.max(n.YTOsiz+s*n.YTsiz,n.YOsiz);r.tx1=Math.min(n.XTOsiz+(c+1)*n.XTsiz,n.Xsiz);r.ty1=Math.min(n.YTOsiz+(s+1)*n.YTsiz,n.Ysiz);r.width=r.tx1-r.tx0;r.height=r.ty1-r.ty0;r.components=[];i.push(r)}e.tiles=i;for(var u=0,f=n.Csiz;u<f;u++)for(var l=t[u],p=0,d=i.length;p<d;p++){var h={};r=i[p];h.tcx0=Math.ceil(r.tx0/l.XRsiz);h.tcy0=Math.ceil(r.ty0/l.YRsiz);h.tcx1=Math.ceil(r.tx1/l.XRsiz);h.tcy1=Math.ceil(r.ty1/l.YRsiz);h.width=h.tcx1-h.tcx0;h.height=h.tcy1-h.tcy0;r.components[u]=h}}function getBlocksDimensions(e,t,r){var n=t.codingStyleParameters,i={};if(n.entropyCoderWithCustomPrecincts){i.PPx=n.precinctsSizes[r].PPx;i.PPy=n.precinctsSizes[r].PPy}else{i.PPx=15;i.PPy=15}i.xcb_=r>0?Math.min(n.xcb,i.PPx-1):Math.min(n.xcb,i.PPx);i.ycb_=r>0?Math.min(n.ycb,i.PPy-1):Math.min(n.ycb,i.PPy);return i}function buildPrecincts(e,t,r){var n=1<<r.PPx,i=1<<r.PPy,o=0===t.resLevel,a=1<<r.PPx+(o?0:-1),s=1<<r.PPy+(o?0:-1),c=t.trx1>t.trx0?Math.ceil(t.trx1/n)-Math.floor(t.trx0/n):0,u=t.try1>t.try0?Math.ceil(t.try1/i)-Math.floor(t.try0/i):0,f=c*u;t.precinctParameters={precinctWidth:n,precinctHeight:i,numprecinctswide:c,numprecinctshigh:u,numprecincts:f,precinctWidthInSubband:a,precinctHeightInSubband:s}}function buildCodeblocks(e,t,r){var n,i,o,a,s=r.xcb_,c=r.ycb_,u=1<<s,f=1<<c,l=t.tbx0>>s,p=t.tby0>>c,d=t.tbx1+u-1>>s,h=t.tby1+f-1>>c,g=t.resolution.precinctParameters,v=[],m=[];for(i=p;i<h;i++)for(n=l;n<d;n++){(o={cbx:n,cby:i,tbx0:u*n,tby0:f*i,tbx1:u*(n+1),tby1:f*(i+1)}).tbx0_=Math.max(t.tbx0,o.tbx0);o.tby0_=Math.max(t.tby0,o.tby0);o.tbx1_=Math.min(t.tbx1,o.tbx1);o.tby1_=Math.min(t.tby1,o.tby1);a=Math.floor((o.tbx0_-t.tbx0)/g.precinctWidthInSubband)+Math.floor((o.tby0_-t.tby0)/g.precinctHeightInSubband)*g.numprecinctswide;o.precinctNumber=a;o.subbandType=t.type;o.Lblock=3;if(!(o.tbx1_<=o.tbx0_||o.tby1_<=o.tby0_)){v.push(o);var y=m[a];if(void 0!==y){n<y.cbxMin?y.cbxMin=n:n>y.cbxMax&&(y.cbxMax=n);i<y.cbyMin?y.cbxMin=i:i>y.cbyMax&&(y.cbyMax=i)}else m[a]=y={cbxMin:n,cbyMin:i,cbxMax:n,cbyMax:i};o.precinct=y}}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-l+1,numcodeblockhigh:h-p+1};t.codeblocks=v;t.precincts=m}function createPacket(e,t,r){for(var n=[],i=e.subbands,o=0,a=i.length;o<a;o++)for(var s=i[o].codeblocks,c=0,u=s.length;c<u;c++){var f=s[c];f.precinctNumber===t&&n.push(f)}return{layerNumber:r,codeblocks:n}}function LayerResolutionComponentPositionIterator(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=0,c=0;c<o;c++)s=Math.max(s,n.components[c].codingStyleParameters.decompositionLevelsCount);var u=0,f=0,l=0,p=0;this.nextPacket=function JpxImage_nextPacket(){for(;u<i;u++){for(;f<=s;f++){for(;l<o;l++){var e=n.components[l];if(!(f>e.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[f],r=t.precinctParameters.numprecincts;p<r;){var c=createPacket(t,p,u);p++;return c}p=0}}l=0}f=0}throw new a("Out of packets")}}function ResolutionLayerComponentPositionIterator(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=0,c=0;c<o;c++)s=Math.max(s,n.components[c].codingStyleParameters.decompositionLevelsCount);var u=0,f=0,l=0,p=0;this.nextPacket=function JpxImage_nextPacket(){for(;u<=s;u++){for(;f<i;f++){for(;l<o;l++){var e=n.components[l];if(!(u>e.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[u],r=t.precinctParameters.numprecincts;p<r;){var c=createPacket(t,p,f);p++;return c}p=0}}l=0}f=0}throw new a("Out of packets")}}function ResolutionPositionComponentLayerIterator(e){var t,r,n,i,o=e.SIZ,s=e.currentTile.index,c=e.tiles[s],u=c.codingStyleDefaultParameters.layersCount,f=o.Csiz,l=0;for(n=0;n<f;n++){var p=c.components[n];l=Math.max(l,p.codingStyleParameters.decompositionLevelsCount)}var d=new Int32Array(l+1);for(r=0;r<=l;++r){var h=0;for(n=0;n<f;++n){var g=c.components[n].resolutions;r<g.length&&(h=Math.max(h,g[r].precinctParameters.numprecincts))}d[r]=h}t=0;r=0;n=0;i=0;this.nextPacket=function JpxImage_nextPacket(){for(;r<=l;r++){for(;i<d[r];i++){for(;n<f;n++){var e=c.components[n];if(!(r>e.codingStyleParameters.decompositionLevelsCount)){var o=e.resolutions[r],s=o.precinctParameters.numprecincts;if(!(i>=s)){for(;t<u;){var p=createPacket(o,i,t);t++;return p}t=0}}}n=0}i=0}throw new a("Out of packets")}}function PositionComponentResolutionLayerIterator(e){var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=getPrecinctSizesInImageScale(n),c=s,u=0,f=0,l=0,p=0,d=0;this.nextPacket=function JpxImage_nextPacket(){for(;d<c.maxNumHigh;d++){for(;p<c.maxNumWide;p++){for(;l<o;l++){for(var e=n.components[l],t=e.codingStyleParameters.decompositionLevelsCount;f<=t;f++){var r=e.resolutions[f],h=s.components[l].resolutions[f],g=getPrecinctIndexIfExist(p,d,h,c,r);if(null!==g){for(;u<i;){var v=createPacket(r,g,u);u++;return v}u=0}}f=0}l=0}p=0}throw new a("Out of packets")}}function ComponentPositionResolutionLayerIterator(e){var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=getPrecinctSizesInImageScale(n),c=0,u=0,f=0,l=0,p=0;this.nextPacket=function JpxImage_nextPacket(){for(;f<o;++f){for(var e=n.components[f],t=s.components[f],r=e.codingStyleParameters.decompositionLevelsCount;p<t.maxNumHigh;p++){for(;l<t.maxNumWide;l++){for(;u<=r;u++){var d=e.resolutions[u],h=t.resolutions[u],g=getPrecinctIndexIfExist(l,p,h,t,d);if(null!==g){for(;c<i;){var v=createPacket(d,g,c);c++;return v}c=0}}u=0}l=0}p=0}throw new a("Out of packets")}}function getPrecinctIndexIfExist(e,t,r,n,i){var o=e*n.minWidth,a=t*n.minHeight;if(o%r.width!=0||a%r.height!=0)return null;var s=a/r.width*i.precinctParameters.numprecinctswide;return o/r.height+s}function getPrecinctSizesInImageScale(e){for(var t=e.components.length,r=Number.MAX_VALUE,n=Number.MAX_VALUE,i=0,o=0,a=new Array(t),s=0;s<t;s++){for(var c=e.components[s],u=c.codingStyleParameters.decompositionLevelsCount,f=new Array(u+1),l=Number.MAX_VALUE,p=Number.MAX_VALUE,d=0,h=0,g=1,v=u;v>=0;--v){var m=c.resolutions[v],y=g*m.precinctParameters.precinctWidth,b=g*m.precinctParameters.precinctHeight;l=Math.min(l,y);p=Math.min(p,b);d=Math.max(d,m.precinctParameters.numprecinctswide);h=Math.max(h,m.precinctParameters.numprecinctshigh);f[v]={width:y,height:b};g<<=1}r=Math.min(r,l);n=Math.min(n,p);i=Math.max(i,d);o=Math.max(o,h);a[s]={resolutions:f,minWidth:l,minHeight:p,maxNumWide:d,maxNumHigh:h}}return{components:a,minWidth:r,minHeight:n,maxNumWide:i,maxNumHigh:o}}function buildPackets(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=t.Csiz,o=0;o<i;o++){for(var s=n.components[o],c=s.codingStyleParameters.decompositionLevelsCount,u=[],f=[],l=0;l<=c;l++){var p,d=getBlocksDimensions(0,s,l),h={},g=1<<c-l;h.trx0=Math.ceil(s.tcx0/g);h.try0=Math.ceil(s.tcy0/g);h.trx1=Math.ceil(s.tcx1/g);h.try1=Math.ceil(s.tcy1/g);h.resLevel=l;buildPrecincts(0,h,d);u.push(h);if(0===l){(p={}).type="LL";p.tbx0=Math.ceil(s.tcx0/g);p.tby0=Math.ceil(s.tcy0/g);p.tbx1=Math.ceil(s.tcx1/g);p.tby1=Math.ceil(s.tcy1/g);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);h.subbands=[p]}else{var v=1<<c-l+1,m=[];(p={}).type="HL";p.tbx0=Math.ceil(s.tcx0/v-.5);p.tby0=Math.ceil(s.tcy0/v);p.tbx1=Math.ceil(s.tcx1/v-.5);p.tby1=Math.ceil(s.tcy1/v);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);m.push(p);(p={}).type="LH";p.tbx0=Math.ceil(s.tcx0/v);p.tby0=Math.ceil(s.tcy0/v-.5);p.tbx1=Math.ceil(s.tcx1/v);p.tby1=Math.ceil(s.tcy1/v-.5);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);m.push(p);(p={}).type="HH";p.tbx0=Math.ceil(s.tcx0/v-.5);p.tby0=Math.ceil(s.tcy0/v-.5);p.tbx1=Math.ceil(s.tcx1/v-.5);p.tby1=Math.ceil(s.tcy1/v-.5);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);m.push(p);h.subbands=m}}s.resolutions=u;s.subbands=f}var y=n.codingStyleDefaultParameters.progressionOrder;switch(y){case 0:n.packetsIterator=new LayerResolutionComponentPositionIterator(e);break;case 1:n.packetsIterator=new ResolutionLayerComponentPositionIterator(e);break;case 2:n.packetsIterator=new ResolutionPositionComponentLayerIterator(e);break;case 3:n.packetsIterator=new PositionComponentResolutionLayerIterator(e);break;case 4:n.packetsIterator=new ComponentPositionResolutionLayerIterator(e);break;default:throw new a("Unsupported progression order ".concat(y))}}function parseTilePackets(e,n,o,a){var s,c=0,u=0,f=!1;function readBits(e){for(;u<e;){var t=n[o+c];c++;if(f){s=s<<7|t;u+=7;f=!1}else{s=s<<8|t;u+=8}255===t&&(f=!0)}return s>>>(u-=e)&(1<<e)-1}function skipMarkerIfEqual(e){if(255===n[o+c-1]&&n[o+c]===e){skipBytes(1);return!0}if(255===n[o+c]&&n[o+c+1]===e){skipBytes(2);return!0}return!1}function skipBytes(e){c+=e}function alignToByte(){u=0;if(f){c++;f=!1}}function readCodingpasses(){if(0===readBits(1))return 1;if(0===readBits(1))return 2;var e=readBits(2);return e<3?e+3:(e=readBits(5))<31?e+6:(e=readBits(7))+37}for(var l=e.currentTile.index,p=e.tiles[l],d=e.COD.sopMarkerUsed,h=e.COD.ephMarkerUsed,g=p.packetsIterator;c<a;){alignToByte();d&&skipMarkerIfEqual(145)&&skipBytes(4);var v=g.nextPacket();if(readBits(1)){for(var m,y=v.layerNumber,b=[],x=0,w=v.codeblocks.length;x<w;x++){var S=(m=v.codeblocks[x]).precinct,_=m.cbx-S.cbxMin,T=m.cby-S.cbyMin,P=!1,C=!1;if(void 0!==m.included)P=!!readBits(1);else{var k,I;if(void 0!==(S=m.precinct).inclusionTree)k=S.inclusionTree;else{var O=S.cbxMax-S.cbxMin+1,E=S.cbyMax-S.cbyMin+1;k=new r(O,E,y);I=new t(O,E);S.inclusionTree=k;S.zeroBitPlanesTree=I}if(k.reset(_,T,y))for(;;){if(!readBits(1)){k.incrementValue(y);break}if(!k.nextLevel()){m.included=!0;P=C=!0;break}}}if(P){if(C){(I=S.zeroBitPlanesTree).reset(_,T);for(;;)if(readBits(1)){if(!I.nextLevel())break}else I.incrementValue();m.zeroBitPlanes=I.value}for(var A=readCodingpasses();readBits(1);)m.Lblock++;var R=(0,i.log2)(A),M=readBits((A<1<<R?R-1:R)+m.Lblock);b.push({codeblock:m,codingpasses:A,dataLength:M})}}alignToByte();h&&skipMarkerIfEqual(146);for(;b.length>0;){var D=b.shift();void 0===(m=D.codeblock).data&&(m.data=[]);m.data.push({data:n,start:o+c,end:o+c+D.dataLength,codingpasses:D.codingpasses});c+=D.dataLength}}}return c}function copyCoefficients(e,t,r,n,i,a,c,u){for(var f=n.tbx0,l=n.tby0,p=n.tbx1-n.tbx0,d=n.codeblocks,h="H"===n.type.charAt(0)?1:0,g="H"===n.type.charAt(1)?t:0,v=0,m=d.length;v<m;++v){var y=d[v],b=y.tbx1_-y.tbx0_,x=y.tby1_-y.tby0_;if(0!==b&&0!==x&&void 0!==y.data){var w,S;w=new s(b,x,y.subbandType,y.zeroBitPlanes,a);S=2;var _,T,P,C=y.data,k=0,I=0;for(_=0,T=C.length;_<T;_++){k+=(P=C[_]).end-P.start;I+=P.codingpasses}var O=new Uint8Array(k),E=0;for(_=0,T=C.length;_<T;_++){var A=(P=C[_]).data.subarray(P.start,P.end);O.set(A,E);E+=A.length}var R=new o.ArithmeticDecoder(O,0,k);w.setDecoder(R);for(_=0;_<I;_++){switch(S){case 0:w.runSignificancePropagationPass();break;case 1:w.runMagnitudeRefinementPass();break;case 2:w.runCleanupPass();u&&w.checkSegmentationSymbol()}S=(S+1)%3}var M,D,L,B=y.tbx0_-f+(y.tby0_-l)*p,U=w.coefficentsSign,N=w.coefficentsMagnitude,j=w.bitsDecoded,z=c?0:.5;E=0;var H="LL"!==n.type;for(_=0;_<x;_++){var W=2*(B/p|0)*(t-p)+h+g;for(M=0;M<b;M++){if(0!==(D=N[E])){D=(D+z)*i;0!==U[E]&&(D=-D);L=j[E];var X=H?W+(B<<1):B;e[X]=c&&L>=a?D:D*(1<<a-L)}B++;E++}B+=p-b}}}}function transformTile(t,r,n){for(var i=r.components[n],o=i.codingStyleParameters,a=i.quantizationParameters,s=o.decompositionLevelsCount,c=a.SPqcds,l=a.scalarExpounded,p=a.guardBits,d=o.segmentationSymbolUsed,h=t.components[n].precision,g=o.reversibleTransformation,v=g?new f:new u,m=[],y=0,b=0;b<=s;b++){for(var x=i.resolutions[b],w=x.trx1-x.trx0,S=x.try1-x.try0,_=new Float32Array(w*S),T=0,P=x.subbands.length;T<P;T++){var C,k;if(l){C=c[y].mu;k=c[y].epsilon;y++}else{C=c[0].mu;k=c[0].epsilon+(b>0?1-b:0)}var I=x.subbands[T],O=e[I.type];copyCoefficients(_,w,0,I,g?1:Math.pow(2,h+O-k)*(1+C/2048),p+k-1,g,d)}m.push({width:w,height:S,items:_})}var E=v.calculate(m,i.tcx0,i.tcy0);return{left:i.tcx0,top:i.tcy0,width:E.width,height:E.height,items:E.items}}function initializeTile(e,t){for(var r=e.SIZ.Csiz,n=e.tiles[t],i=0;i<r;i++){var o=n.components[i],a=void 0!==e.currentTile.QCC[i]?e.currentTile.QCC[i]:e.currentTile.QCD;o.quantizationParameters=a;var s=void 0!==e.currentTile.COC[i]?e.currentTile.COC[i]:e.currentTile.COD;o.codingStyleParameters=s}n.codingStyleDefaultParameters=e.currentTile.COD}var t=function TagTreeClosure(){function TagTree(e,t){var r=(0,i.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;n<r;n++){var o={width:e,height:t,items:[]};this.levels.push(o);e=Math.ceil(e/2);t=Math.ceil(t/2)}}TagTree.prototype={reset:function TagTree_reset(e,t){for(var r,n=0,i=0;n<this.levels.length;){var o=e+t*(r=this.levels[n]).width;if(void 0!==r.items[o]){i=r.items[o];break}r.index=o;e>>=1;t>>=1;n++}n--;(r=this.levels[n]).items[r.index]=i;this.currentLevel=n;delete this.value},incrementValue:function TagTree_incrementValue(){var e=this.levels[this.currentLevel];e.items[e.index]++},nextLevel:function TagTree_nextLevel(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];if(--e<0){this.value=r;return!1}this.currentLevel=e;(t=this.levels[e]).items[t.index]=r;return!0}};return TagTree}(),r=function InclusionTreeClosure(){function InclusionTree(e,t,r){var n=(0,i.log2)(Math.max(e,t))+1;this.levels=[];for(var o=0;o<n;o++){for(var a=new Uint8Array(e*t),s=0,c=a.length;s<c;s++)a[s]=r;var u={width:e,height:t,items:a};this.levels.push(u);e=Math.ceil(e/2);t=Math.ceil(t/2)}}InclusionTree.prototype={reset:function InclusionTree_reset(e,t,r){for(var n=0;n<this.levels.length;){var i=this.levels[n],o=e+t*i.width;i.index=o;var a=i.items[o];if(255===a)break;if(a>r){this.currentLevel=n;this.propagateValues();return!1}e>>=1;t>>=1;n++}this.currentLevel=n-1;return!0},incrementValue:function InclusionTree_incrementValue(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1;this.propagateValues()},propagateValues:function InclusionTree_propagateValues(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];--e>=0;)(t=this.levels[e]).items[t.index]=r},nextLevel:function InclusionTree_nextLevel(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];t.items[t.index]=255;if(--e<0)return!1;this.currentLevel=e;(t=this.levels[e]).items[t.index]=r;return!0}};return InclusionTree}(),s=function BitModelClosure(){var e=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),t=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),r=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function BitModel(n,i,o,a,s){this.width=n;this.height=i;var c;c="HH"===o?r:"HL"===o?t:e;this.contextLabelTable=c;var u,f=n*i;this.neighborsSignificance=new Uint8Array(f);this.coefficentsSign=new Uint8Array(f);u=s>14?new Uint32Array(f):s>6?new Uint16Array(f):new Uint8Array(f);this.coefficentsMagnitude=u;this.processingFlags=new Uint8Array(f);var l=new Uint8Array(f);if(0!==a)for(var p=0;p<f;p++)l[p]=a;this.bitsDecoded=l;this.reset()}BitModel.prototype={setDecoder:function BitModel_setDecoder(e){this.decoder=e},reset:function BitModel_reset(){this.contexts=new Int8Array(19);this.contexts[0]=8;this.contexts[17]=92;this.contexts[18]=6},setNeighborsSignificance:function BitModel_setNeighborsSignificance(e,t,r){var n,i=this.neighborsSignificance,o=this.width,a=this.height,s=t>0,c=t+1<o;if(e>0){n=r-o;s&&(i[n-1]+=16);c&&(i[n+1]+=16);i[n]+=4}if(e+1<a){n=r+o;s&&(i[n-1]+=16);c&&(i[n+1]+=16);i[n]+=4}s&&(i[r-1]+=1);c&&(i[r+1]+=1);i[r]|=128},runSignificancePropagationPass:function BitModel_runSignificancePropagationPass(){for(var e=this.decoder,t=this.width,r=this.height,n=this.coefficentsMagnitude,i=this.coefficentsSign,o=this.neighborsSignificance,a=this.processingFlags,s=this.contexts,c=this.contextLabelTable,u=this.bitsDecoded,f=0;f<r;f+=4)for(var l=0;l<t;l++)for(var p=f*t+l,d=0;d<4;d++,p+=t){var h=f+d;if(h>=r)break;a[p]&=-2;if(!n[p]&&o[p]){var g=c[o[p]];if(e.readBit(s,g)){var v=this.decodeSignBit(h,l,p);i[p]=v;n[p]=1;this.setNeighborsSignificance(h,l,p);a[p]|=2}u[p]++;a[p]|=1}}},decodeSignBit:function BitModel_decodeSignBit(e,t,r){var n,i,o,a,s,c,u=this.width,f=this.height,l=this.coefficentsMagnitude,p=this.coefficentsSign;a=t>0&&0!==l[r-1];if(t+1<u&&0!==l[r+1]){o=p[r+1];n=a?1-o-(i=p[r-1]):1-o-o}else n=a?1-(i=p[r-1])-i:0;var d=3*n;a=e>0&&0!==l[r-u];if(e+1<f&&0!==l[r+u]){o=p[r+u];n=a?1-o-(i=p[r-u])+d:1-o-o+d}else n=a?1-(i=p[r-u])-i+d:d;if(n>=0){s=9+n;c=this.decoder.readBit(this.contexts,s)}else{s=9-n;c=1^this.decoder.readBit(this.contexts,s)}return c},runMagnitudeRefinementPass:function BitModel_runMagnitudeRefinementPass(){for(var e,t=this.decoder,r=this.width,n=this.height,i=this.coefficentsMagnitude,o=this.neighborsSignificance,a=this.contexts,s=this.bitsDecoded,c=this.processingFlags,u=r*n,f=4*r,l=0;l<u;l=e){e=Math.min(u,l+f);for(var p=0;p<r;p++)for(var d=l+p;d<e;d+=r)if(i[d]&&0==(1&c[d])){var h=16;if(0!=(2&c[d])){c[d]^=2;h=0===(127&o[d])?15:14}var g=t.readBit(a,h);i[d]=i[d]<<1|g;s[d]++;c[d]|=1}}},runCleanupPass:function BitModel_runCleanupPass(){for(var e,t=this.decoder,r=this.width,n=this.height,i=this.neighborsSignificance,o=this.coefficentsMagnitude,a=this.coefficentsSign,s=this.contexts,c=this.contextLabelTable,u=this.bitsDecoded,f=this.processingFlags,l=r,p=2*r,d=3*r,h=0;h<n;h=e){e=Math.min(h+4,n);for(var g=h*r,v=h+3<n,m=0;m<r;m++){var y,b=g+m,x=0,w=b,S=h;if(v&&0===f[b]&&0===f[b+l]&&0===f[b+p]&&0===f[b+d]&&0===i[b]&&0===i[b+l]&&0===i[b+p]&&0===i[b+d]){if(!t.readBit(s,18)){u[b]++;u[b+l]++;u[b+p]++;u[b+d]++;continue}if(0!==(x=t.readBit(s,17)<<1|t.readBit(s,17))){S=h+x;w+=x*r}y=this.decodeSignBit(S,m,w);a[w]=y;o[w]=1;this.setNeighborsSignificance(S,m,w);f[w]|=2;w=b;for(var _=h;_<=S;_++,w+=r)u[w]++;x++}for(S=h+x;S<e;S++,w+=r)if(!o[w]&&0==(1&f[w])){var T=c[i[w]];if(1===t.readBit(s,T)){y=this.decodeSignBit(S,m,w);a[w]=y;o[w]=1;this.setNeighborsSignificance(S,m,w);f[w]|=2}u[w]++}}}},checkSegmentationSymbol:function BitModel_checkSegmentationSymbol(){var e=this.decoder,t=this.contexts;if(10!==(e.readBit(t,17)<<3|e.readBit(t,17)<<2|e.readBit(t,17)<<1|e.readBit(t,17)))throw new a("Invalid segmentation symbol")}};return BitModel}(),c=function TransformClosure(){function Transform(){}Transform.prototype.calculate=function transformCalculate(e,t,r){for(var n=e[0],i=1,o=e.length;i<o;i++)n=this.iterate(n,e[i],t,r);return n};Transform.prototype.extend=function extend(e,t,r){var n=t-1,i=t+1,o=t+r-2,a=t+r;e[n--]=e[i++];e[a++]=e[o--];e[n--]=e[i++];e[a++]=e[o--];e[n--]=e[i++];e[a++]=e[o--];e[n]=e[i];e[a]=e[o]};Transform.prototype.iterate=function Transform_iterate(e,t,r,n){var i,o,a,s,c,u,f=e.width,l=e.height,p=e.items,d=t.width,h=t.height,g=t.items;for(a=0,i=0;i<l;i++){s=2*i*d;for(o=0;o<f;o++,a++,s+=2)g[s]=p[a]}p=e.items=null;var v=new Float32Array(d+8);if(1===d){if(0!=(1&r))for(u=0,a=0;u<h;u++,a+=d)g[a]*=.5}else for(u=0,a=0;u<h;u++,a+=d){v.set(g.subarray(a,a+d),4);this.extend(v,4,d);this.filter(v,4,d);g.set(v.subarray(4,4+d),a)}var m=16,y=[];for(i=0;i<m;i++)y.push(new Float32Array(h+8));var b,x=0;e=4+h;if(1===h){if(0!=(1&n))for(c=0;c<d;c++)g[c]*=.5}else for(c=0;c<d;c++){if(0===x){m=Math.min(d-c,m);for(a=c,s=4;s<e;a+=d,s++)for(b=0;b<m;b++)y[b][s]=g[a+b];x=m}var w=y[--x];this.extend(w,4,h);this.filter(w,4,h);if(0===x){a=c-m+1;for(s=4;s<e;a+=d,s++)for(b=0;b<m;b++)g[a+b]=y[b][s]}}return{width:d,height:h,items:g}};return Transform}(),u=function IrreversibleTransformClosure(){function IrreversibleTransform(){c.call(this)}IrreversibleTransform.prototype=Object.create(c.prototype);IrreversibleTransform.prototype.filter=function irreversibleTransformFilter(e,t,r){var n,i,o,a,s=r>>1,c=-1.586134342059924,u=-.052980118572961,f=.882911075530934,l=.443506852043971,p=1.230174104914001;n=(t|=0)-3;for(i=s+4;i--;n+=2)e[n]*=.8128930661159609;o=l*e[(n=t-2)-1];for(i=s+3;i--;n+=2){a=l*e[n+1];e[n]=p*e[n]-o-a;if(!i--)break;o=l*e[(n+=2)+1];e[n]=p*e[n]-o-a}o=f*e[(n=t-1)-1];for(i=s+2;i--;n+=2){a=f*e[n+1];e[n]-=o+a;if(!i--)break;o=f*e[(n+=2)+1];e[n]-=o+a}o=u*e[(n=t)-1];for(i=s+1;i--;n+=2){a=u*e[n+1];e[n]-=o+a;if(!i--)break;o=u*e[(n+=2)+1];e[n]-=o+a}if(0!==s){o=c*e[(n=t+1)-1];for(i=s;i--;n+=2){a=c*e[n+1];e[n]-=o+a;if(!i--)break;o=c*e[(n+=2)+1];e[n]-=o+a}}};return IrreversibleTransform}(),f=function ReversibleTransformClosure(){function ReversibleTransform(){c.call(this)}ReversibleTransform.prototype=Object.create(c.prototype);ReversibleTransform.prototype.filter=function reversibleTransformFilter(e,t,r){var n,i,o=r>>1;for(n=t|=0,i=o+1;i--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,i=o;i--;n+=2)e[n]+=e[n-1]+e[n+1]>>1};return ReversibleTransform}();return JpxImage}();t.JpxImage=s}])}));
|
22
|
+
!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/image_decoders/pdf.image_decoders",[],r):"object"==typeof exports?exports["pdfjs-dist/image_decoders/pdf.image_decoders"]=r():t["pdfjs-dist/image_decoders/pdf.image_decoders"]=t.pdfjsImageDecoders=r()}(this,(function(){return(()=>{var t=[(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});Object.defineProperty(r,"getVerbosityLevel",{enumerable:!0,get:function get(){return o.getVerbosityLevel}});Object.defineProperty(r,"setVerbosityLevel",{enumerable:!0,get:function get(){return o.setVerbosityLevel}});Object.defineProperty(r,"Jbig2mage",{enumerable:!0,get:function get(){return a.Jbig2mage}});Object.defineProperty(r,"JpegImage",{enumerable:!0,get:function get(){return c.JpegImage}});Object.defineProperty(r,"JpxImage",{enumerable:!0,get:function get(){return u.JpxImage}});var o=i(1),a=i(93),c=i(100),u=i(101)},(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.arrayByteLength=arrayByteLength;r.arraysToBytes=function arraysToBytes(t){var r=t.length;if(1===r&&t[0]instanceof Uint8Array)return t[0];for(var i=0,o=0;o<r;o++)i+=arrayByteLength(t[o]);for(var a=0,c=new Uint8Array(i),u=0;u<r;u++){var l=t[u];l instanceof Uint8Array||(l="string"==typeof l?stringToBytes(l):new Uint8Array(l));var h=l.byteLength;c.set(l,a);a+=h}return c};r.assert=assert;r.bytesToString=function bytesToString(t){assert(null!==t&&"object"===_typeof(t)&&void 0!==t.length,"Invalid argument for bytesToString");var r=t.length,i=8192;if(r<i)return String.fromCharCode.apply(null,t);for(var o=[],a=0;a<r;a+=i){var c=Math.min(a+i,r),u=t.subarray(a,c);o.push(String.fromCharCode.apply(null,u))}return o.join("")};r.createPromiseCapability=function createPromiseCapability(){var t=Object.create(null),r=!1;Object.defineProperty(t,"settled",{get:function get(){return r}});t.promise=new Promise((function(i,o){t.resolve=function(t){r=!0;i(t)};t.reject=function(t){r=!0;o(t)}}));return t};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t,r){if(!t)return null;try{var i=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(t){}return null};r.encodeToXmlString=function encodeToXmlString(t){for(var r=[],i=0,o=0,a=t.length;o<a;o++){var c=t.codePointAt(o);if(32<=c&&c<=126){var u=C[c];if(u){i<o&&r.push(t.substring(i,o));r.push(u);i=o+1}}else{i<o&&r.push(t.substring(i,o));r.push("&#x".concat(c.toString(16).toUpperCase(),";"));c>55295&&(c<57344||c>65533)&&o++;i=o+1}}if(0===r.length)return t;i<t.length&&r.push(t.substring(i,t.length));return r.join("")};r.escapeString=function escapeString(t){return t.replace(/([()\\\n\r])/g,(function(t){return"\n"===t?"\\n":"\r"===t?"\\r":"\\".concat(t)}))};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,r=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return r.join("")};r.getVerbosityLevel=function getVerbosityLevel(){return a};r.info=function info(t){a>=o.INFOS&&console.log("Info: ".concat(t))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.byteLength};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;return t.every((function(t,i){return t===r[i]}))};r.isAscii=function isAscii(t){return/^[\x00-\x7F]*$/.test(t)};r.isBool=function isBool(t){return"boolean"==typeof t};r.isNum=function isNum(t){return"number"==typeof t};r.isSameOrigin=function isSameOrigin(t,r){var i;try{if(!(i=new URL(t)).origin||"null"===i.origin)return!1}catch(t){return!1}var o=new URL(r,i);return i.origin===o.origin};r.isString=function isString(t){return"string"==typeof t};r.objectFromEntries=function objectFromEntries(t){return Object.assign(Object.create(null),Object.fromEntries(t))};r.objectSize=function objectSize(t){return Object.keys(t).length};r.removeNullCharacters=function removeNullCharacters(t){if("string"!=typeof t){warn("The argument for removeNullCharacters must be a string.");return t}return t.replace(y,"")};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(a=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){var r=t.length,i=[];if("þ"===t[0]&&"ÿ"===t[1])for(var o=2;o<r;o+=2)i.push(String.fromCharCode(t.charCodeAt(o)<<8|t.charCodeAt(o+1)));else if("ÿ"===t[0]&&"þ"===t[1])for(var a=2;a<r;a+=2)i.push(String.fromCharCode(t.charCodeAt(a+1)<<8|t.charCodeAt(a)));else for(var c=0;c<r;++c){var u=_[t.charCodeAt(c)];i.push(u?String.fromCharCode(u):t.charAt(c))}return i.join("")};r.stringToUTF16BEString=function stringToUTF16BEString(t){for(var r=["þÿ"],i=0,o=t.length;i<o;i++){var a=t.charCodeAt(i);r.push(String.fromCharCode(a>>8&255));r.push(String.fromCharCode(255&a))}return r.join("")};r.stringToUTF8String=function stringToUTF8String(t){return decodeURIComponent(escape(t))};r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;r.VerbosityLevel=r.Util=r.UNSUPPORTED_FEATURES=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.IsLittleEndianCached=r.IsEvalSupportedCached=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FontType=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.createObjectURL=r.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;i(2);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};r.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};r.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};r.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};r.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var a=o.WARNINGS;function warn(t){a>=o.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}function assert(t,r){t||unreachable(r)}function shadow(t,r,i){Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!1});return i}var c=function BaseExceptionClosure(){function BaseException(t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=c;var u=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,i){var o;_classCallCheck(this,PasswordException);(o=r.call(this,t)).code=i;return o}return PasswordException}(c);r.PasswordException=u;var l=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,i){var o;_classCallCheck(this,UnknownErrorException);(o=r.call(this,t)).details=i;return o}return UnknownErrorException}(c);r.UnknownErrorException=l;var h=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return r.apply(this,arguments)}return InvalidPDFException}(c);r.InvalidPDFException=h;var p=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return r.apply(this,arguments)}return MissingPDFException}(c);r.MissingPDFException=p;var d=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,i){var o;_classCallCheck(this,UnexpectedResponseException);(o=r.call(this,t)).status=i;return o}return UnexpectedResponseException}(c);r.UnexpectedResponseException=d;var g=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return r.apply(this,arguments)}return FormatError}(c);r.FormatError=g;var m=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return r.apply(this,arguments)}return AbortException}(c);r.AbortException=m;var y=/\x00/g;function stringToBytes(t){assert("string"==typeof t,"Invalid argument for stringToBytes");for(var r=t.length,i=new Uint8Array(r),o=0;o<r;++o)i[o]=255&t.charCodeAt(o);return i}function arrayByteLength(t){if(void 0!==t.length)return t.length;assert(void 0!==t.byteLength,"arrayByteLength - invalid argument.");return t.byteLength}var v={get value(){return shadow(this,"value",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}};r.IsLittleEndianCached=v;var b={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=b;var x=function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),w=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);return t}(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,i){return"#".concat(x[t]).concat(x[r]).concat(x[i])}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var i=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/i,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/i]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var i=Util.applyTransform(t,r),o=Util.applyTransform(t.slice(2,4),r),a=Util.applyTransform([t[0],t[3]],r),c=Util.applyTransform([t[2],t[1]],r);return[Math.min(i[0],o[0],a[0],c[0]),Math.min(i[1],o[1],a[1],c[1]),Math.max(i[0],o[0],a[0],c[0]),Math.max(i[1],o[1],a[1],c[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"apply3dTransform",value:function apply3dTransform(t,r){return[t[0]*r[0]+t[1]*r[1]+t[2]*r[2],t[3]*r[0]+t[4]*r[1]+t[5]*r[2],t[6]*r[0]+t[7]*r[1]+t[8]*r[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],i=t[0]*r[0]+t[1]*r[2],o=t[0]*r[1]+t[1]*r[3],a=t[2]*r[0]+t[3]*r[2],c=t[2]*r[1]+t[3]*r[3],u=(i+c)/2,l=Math.sqrt((i+c)*(i+c)-4*(i*c-a*o))/2,h=u+l||1,p=u-l||1;return[Math.sqrt(h),Math.sqrt(p)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){function compare(t,r){return t-r}var i=[t[0],t[2],r[0],r[2]].sort(compare),o=[t[1],t[3],r[1],r[3]].sort(compare),a=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0]))return null;a[0]=i[1];a[2]=i[2];if(!(o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]))return null;a[1]=o[1];a[3]=o[2];return a}}]);return Util}();r.Util=w;var _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];var S=function createObjectURLClosure(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function createObjectURL(r,i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!o&&URL.createObjectURL){var a=new Blob([r],{type:i});return URL.createObjectURL(a)}for(var c="data:".concat(i,";base64,"),u=0,l=r.length;u<l;u+=3){var h=255&r[u],p=255&r[u+1],d=255&r[u+2],g=h>>2,m=(3&h)<<4|p>>4,y=u+1<l?(15&p)<<2|d>>6:64,v=u+2<l?63&d:64;c+=t[g]+t[m]+t[y]+t[v]}return c}}();r.createObjectURL=S;var C={60:"<",62:">",38:"&",34:""",39:"'"}},(t,r,i)=>{"use strict";var o=i(3);if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=i(4));globalThis._pdfjsCompatibilityChecked=!0;!function checkNodeBtoa(){!globalThis.btoa&&o.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&o.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkObjectFromEntries(){Object.fromEntries||i(49)}();!function checkStringPadStart(){String.prototype.padStart||i(79)}();!function checkStringPadEnd(){String.prototype.padEnd||i(86)}();!function checkObjectValues(){Object.values||(Object.values=i(88))}();!function checkObjectEntries(){Object.entries||(Object.entries=i(91))}()}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.isNodeJS=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=i},(t,r,i)=>{i(5);t.exports=i(7)},(t,r,i)=>{i(6)({global:!0},{globalThis:i(7)})},(t,r,i)=>{var o=i(7),a=i(8).f,c=i(22),u=i(25),l=i(26),h=i(36),p=i(48);t.exports=function(t,r){var i,d,g,m,y,v=t.target,b=t.global,x=t.stat;if(i=b?o:x?o[v]||l(v,{}):(o[v]||{}).prototype)for(d in r){m=r[d];g=t.noTargetGet?(y=a(i,d))&&y.value:i[d];if(!p(b?d:v+(x?".":"#")+d,t.forced)&&void 0!==g){if(typeof m==typeof g)continue;h(m,g)}(t.sham||g&&g.sham)&&c(m,"sham",!0);u(i,d,m,t)}}},t=>{var check=function(t){return t&&t.Math==Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(t,r,i)=>{var o=i(9),a=i(11),c=i(12),u=i(13),l=i(17),h=i(19),p=i(20),d=Object.getOwnPropertyDescriptor;r.f=o?d:function getOwnPropertyDescriptor(t,r){t=u(t);r=l(r,!0);if(p)try{return d(t,r)}catch(t){}if(h(t,r))return c(!a.f.call(t,r),t[r])}},(t,r,i)=>{var o=i(10);t.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r)=>{"use strict";var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!i.call({1:2},1);r.f=a?function propertyIsEnumerable(t){var r=o(this,t);return!!r&&r.enumerable}:i},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,i)=>{var o=i(14),a=i(16);t.exports=function(t){return o(a(t))}},(t,r,i)=>{var o=i(10),a=i(15),c="".split;t.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c.call(t,""):Object(t)}:Object},t=>{var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},(t,r,i)=>{var o=i(18);t.exports=function(t,r){if(!o(t))return t;var i,a;if(r&&"function"==typeof(i=t.toString)&&!o(a=i.call(t)))return a;if("function"==typeof(i=t.valueOf)&&!o(a=i.call(t)))return a;if(!r&&"function"==typeof(i=t.toString)&&!o(a=i.call(t)))return a;throw TypeError("Can't convert object to primitive value")}},t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},t=>{var r={}.hasOwnProperty;t.exports=function(t,i){return r.call(t,i)}},(t,r,i)=>{var o=i(9),a=i(10),c=i(21);t.exports=!o&&!a((function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a}))},(t,r,i)=>{var o=i(7),a=i(18),c=o.document,u=a(c)&&a(c.createElement);t.exports=function(t){return u?c.createElement(t):{}}},(t,r,i)=>{var o=i(9),a=i(23),c=i(12);t.exports=o?function(t,r,i){return a.f(t,r,c(1,i))}:function(t,r,i){t[r]=i;return t}},(t,r,i)=>{var o=i(9),a=i(20),c=i(24),u=i(17),l=Object.defineProperty;r.f=o?l:function defineProperty(t,r,i){c(t);r=u(r,!0);c(i);if(a)try{return l(t,r,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");"value"in i&&(t[r]=i.value);return t}},(t,r,i)=>{var o=i(18);t.exports=function(t){if(!o(t))throw TypeError(String(t)+" is not an object");return t}},(t,r,i)=>{var o=i(7),a=i(22),c=i(19),u=i(26),l=i(27),h=i(29),p=h.get,d=h.enforce,g=String(String).split("String");(t.exports=function(t,r,i,l){var h,p=!!l&&!!l.unsafe,m=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;if("function"==typeof i){"string"!=typeof r||c(i,"name")||a(i,"name",r);(h=d(i)).source||(h.source=g.join("string"==typeof r?r:""))}if(t!==o){p?!y&&t[r]&&(m=!0):delete t[r];m?t[r]=i:a(t,r,i)}else m?t[r]=i:u(r,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&p(this).source||l(this)}))},(t,r,i)=>{var o=i(7),a=i(22);t.exports=function(t,r){try{a(o,t,r)}catch(i){o[t]=r}return r}},(t,r,i)=>{var o=i(28),a=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(t){return a.call(t)});t.exports=o.inspectSource},(t,r,i)=>{var o=i(7),a=i(26),c="__core-js_shared__",u=o[c]||a(c,{});t.exports=u},(t,r,i)=>{var o,a,c,u=i(30),l=i(7),h=i(18),p=i(22),d=i(19),g=i(28),m=i(31),y=i(35),v=l.WeakMap;if(u){var b=g.state||(g.state=new v),x=b.get,w=b.has,_=b.set;o=function(t,r){r.facade=t;_.call(b,t,r);return r};a=function(t){return x.call(b,t)||{}};c=function(t){return w.call(b,t)}}else{var S=m("state");y[S]=!0;o=function(t,r){r.facade=t;p(t,S,r);return r};a=function(t){return d(t,S)?t[S]:{}};c=function(t){return d(t,S)}}t.exports={set:o,get:a,has:c,enforce:function(t){return c(t)?a(t):o(t,{})},getterFor:function(t){return function(r){var i;if(!h(r)||(i=a(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}}},(t,r,i)=>{var o=i(7),a=i(27),c=o.WeakMap;t.exports="function"==typeof c&&/native code/.test(a(c))},(t,r,i)=>{var o=i(32),a=i(34),c=o("keys");t.exports=function(t){return c[t]||(c[t]=a(t))}},(t,r,i)=>{var o=i(33),a=i(28);(t.exports=function(t,r){return a[t]||(a[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.8.3",mode:o?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},t=>{t.exports=!1},t=>{var r=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+i).toString(36)}},t=>{t.exports={}},(t,r,i)=>{var o=i(19),a=i(37),c=i(8),u=i(23);t.exports=function(t,r){for(var i=a(r),l=u.f,h=c.f,p=0;p<i.length;p++){var d=i[p];o(t,d)||l(t,d,h(r,d))}}},(t,r,i)=>{var o=i(38),a=i(40),c=i(47),u=i(24);t.exports=o("Reflect","ownKeys")||function ownKeys(t){var r=a.f(u(t)),i=c.f;return i?r.concat(i(t)):r}},(t,r,i)=>{var o=i(39),a=i(7),aFunction=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?aFunction(o[t])||aFunction(a[t]):o[t]&&o[t][r]||a[t]&&a[t][r]}},(t,r,i)=>{var o=i(7);t.exports=o},(t,r,i)=>{var o=i(41),a=i(46).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return o(t,a)}},(t,r,i)=>{var o=i(19),a=i(13),c=i(42).indexOf,u=i(35);t.exports=function(t,r){var i,l=a(t),h=0,p=[];for(i in l)!o(u,i)&&o(l,i)&&p.push(i);for(;r.length>h;)o(l,i=r[h++])&&(~c(p,i)||p.push(i));return p}},(t,r,i)=>{var o=i(13),a=i(43),c=i(45),createMethod=function(t){return function(r,i,u){var l,h=o(r),p=a(h.length),d=c(u,p);if(t&&i!=i){for(;p>d;)if((l=h[d++])!=l)return!0}else for(;p>d;d++)if((t||d in h)&&h[d]===i)return t||d||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,i)=>{var o=i(44),a=Math.min;t.exports=function(t){return t>0?a(o(t),9007199254740991):0}},t=>{var r=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},(t,r,i)=>{var o=i(44),a=Math.max,c=Math.min;t.exports=function(t,r){var i=o(t);return i<0?a(i+r,0):c(i,r)}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,i)=>{var o=i(10),a=/#|\.prototype\./,isForced=function(t,r){var i=u[c(t)];return i==h||i!=l&&("function"==typeof r?o(r):!!r)},c=isForced.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=isForced.data={},l=isForced.NATIVE="N",h=isForced.POLYFILL="P";t.exports=isForced},(t,r,i)=>{i(50);i(69);var o=i(39);t.exports=o.Object.fromEntries},(t,r,i)=>{"use strict";var o=i(13),a=i(51),c=i(59),u=i(29),l=i(60),h="Array Iterator",p=u.set,d=u.getterFor(h);t.exports=l(Array,"Array",(function(t,r){p(this,{type:h,target:o(t),index:0,kind:r})}),(function(){var t=d(this),r=t.target,i=t.kind,o=t.index++;if(!r||o>=r.length){t.target=void 0;return{value:void 0,done:!0}}return"keys"==i?{value:o,done:!1}:"values"==i?{value:r[o],done:!1}:{value:[o,r[o]],done:!1}}),"values");c.Arguments=c.Array;a("keys");a("values");a("entries")},(t,r,i)=>{var o=i(52),a=i(55),c=i(23),u=o("unscopables"),l=Array.prototype;null==l[u]&&c.f(l,u,{configurable:!0,value:a(null)});t.exports=function(t){l[u][t]=!0}},(t,r,i)=>{var o=i(7),a=i(32),c=i(19),u=i(34),l=i(53),h=i(54),p=a("wks"),d=o.Symbol,g=h?d:d&&d.withoutSetter||u;t.exports=function(t){c(p,t)||(l&&c(d,t)?p[t]=d[t]:p[t]=g("Symbol."+t));return p[t]}},(t,r,i)=>{var o=i(10);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},(t,r,i)=>{var o=i(53);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,i)=>{var o,a=i(24),c=i(56),u=i(46),l=i(35),h=i(58),p=i(21),d=i(31),g=d("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(t){}NullProtoObject=o?function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r}(o):function(){var t,r=p("iframe");r.style.display="none";h.appendChild(r);r.src=String("javascript:");(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}();for(var t=u.length;t--;)delete NullProtoObject.prototype[u[t]];return NullProtoObject()};l[g]=!0;t.exports=Object.create||function create(t,r){var i;if(null!==t){EmptyConstructor.prototype=a(t);i=new EmptyConstructor;EmptyConstructor.prototype=null;i[g]=t}else i=NullProtoObject();return void 0===r?i:c(i,r)}},(t,r,i)=>{var o=i(9),a=i(23),c=i(24),u=i(57);t.exports=o?Object.defineProperties:function defineProperties(t,r){c(t);for(var i,o=u(r),l=o.length,h=0;l>h;)a.f(t,i=o[h++],r[i]);return t}},(t,r,i)=>{var o=i(41),a=i(46);t.exports=Object.keys||function keys(t){return o(t,a)}},(t,r,i)=>{var o=i(38);t.exports=o("document","documentElement")},t=>{t.exports={}},(t,r,i)=>{"use strict";var o=i(6),a=i(61),c=i(63),u=i(67),l=i(66),h=i(22),p=i(25),d=i(52),g=i(33),m=i(59),y=i(62),v=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,x=d("iterator"),w="keys",_="values",S="entries",returnThis=function(){return this};t.exports=function(t,r,i,d,y,C,T){a(i,r,d);var P,I,k,getIterationMethod=function(t){if(t===y&&D)return D;if(!b&&t in A)return A[t];switch(t){case w:return function keys(){return new i(this,t)};case _:return function values(){return new i(this,t)};case S:return function entries(){return new i(this,t)}}return function(){return new i(this)}},O=r+" Iterator",E=!1,A=t.prototype,R=A[x]||A["@@iterator"]||y&&A[y],D=!b&&R||getIterationMethod(y),L="Array"==r&&A.entries||R;if(L){P=c(L.call(new t));if(v!==Object.prototype&&P.next){g||c(P)===v||(u?u(P,v):"function"!=typeof P[x]&&h(P,x,returnThis));l(P,O,!0,!0);g&&(m[O]=returnThis)}}if(y==_&&R&&R.name!==_){E=!0;D=function values(){return R.call(this)}}g&&!T||A[x]===D||h(A,x,D);m[r]=D;if(y){I={values:getIterationMethod(_),keys:C?D:getIterationMethod(w),entries:getIterationMethod(S)};if(T)for(k in I)(b||E||!(k in A))&&p(A,k,I[k]);else o({target:r,proto:!0,forced:b||E},I)}return I}},(t,r,i)=>{"use strict";var o=i(62).IteratorPrototype,a=i(55),c=i(12),u=i(66),l=i(59),returnThis=function(){return this};t.exports=function(t,r,i){var h=r+" Iterator";t.prototype=a(o,{next:c(1,i)});u(t,h,!1,!0);l[h]=returnThis;return t}},(t,r,i)=>{"use strict";var o,a,c,u=i(10),l=i(63),h=i(22),p=i(19),d=i(52),g=i(33),m=d("iterator"),y=!1;[].keys&&("next"in(c=[].keys())?(a=l(l(c)))!==Object.prototype&&(o=a):y=!0);var v=null==o||u((function(){var t={};return o[m].call(t)!==t}));v&&(o={});g&&!v||p(o,m)||h(o,m,(function(){return this}));t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:y}},(t,r,i)=>{var o=i(19),a=i(64),c=i(31),u=i(65),l=c("IE_PROTO"),h=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){t=a(t);return o(t,l)?t[l]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?h:null}},(t,r,i)=>{var o=i(16);t.exports=function(t){return Object(o(t))}},(t,r,i)=>{var o=i(10);t.exports=!o((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,i)=>{var o=i(23).f,a=i(19),c=i(52)("toStringTag");t.exports=function(t,r,i){t&&!a(t=i?t:t.prototype,c)&&o(t,c,{configurable:!0,value:r})}},(t,r,i)=>{var o=i(24),a=i(68);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]);r=i instanceof Array}catch(t){}return function setPrototypeOf(i,c){o(i);a(c);r?t.call(i,c):i.__proto__=c;return i}}():void 0)},(t,r,i)=>{var o=i(18);t.exports=function(t){if(!o(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},(t,r,i)=>{var o=i(6),a=i(70),c=i(78);o({target:"Object",stat:!0},{fromEntries:function fromEntries(t){var r={};a(t,(function(t,i){c(r,t,i)}),{AS_ENTRIES:!0});return r}})},(t,r,i)=>{var o=i(24),a=i(71),c=i(43),u=i(72),l=i(74),h=i(77),Result=function(t,r){this.stopped=t;this.result=r};t.exports=function(t,r,i){var p,d,g,m,y,v,b,x=i&&i.that,w=!(!i||!i.AS_ENTRIES),_=!(!i||!i.IS_ITERATOR),S=!(!i||!i.INTERRUPTED),C=u(r,x,1+w+S),stop=function(t){p&&h(p);return new Result(!0,t)},callFn=function(t){if(w){o(t);return S?C(t[0],t[1],stop):C(t[0],t[1])}return S?C(t,stop):C(t)};if(_)p=t;else{if("function"!=typeof(d=l(t)))throw TypeError("Target is not iterable");if(a(d)){for(g=0,m=c(t.length);m>g;g++)if((y=callFn(t[g]))&&y instanceof Result)return y;return new Result(!1)}p=d.call(t)}v=p.next;for(;!(b=v.call(p)).done;){try{y=callFn(b.value)}catch(t){h(p);throw t}if("object"==typeof y&&y&&y instanceof Result)return y}return new Result(!1)}},(t,r,i)=>{var o=i(52),a=i(59),c=o("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(a.Array===t||u[c]===t)}},(t,r,i)=>{var o=i(73);t.exports=function(t,r,i){o(t);if(void 0===r)return t;switch(i){case 0:return function(){return t.call(r)};case 1:return function(i){return t.call(r,i)};case 2:return function(i,o){return t.call(r,i,o)};case 3:return function(i,o,a){return t.call(r,i,o,a)}}return function(){return t.apply(r,arguments)}}},t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},(t,r,i)=>{var o=i(75),a=i(59),c=i(52)("iterator");t.exports=function(t){if(null!=t)return t[c]||t["@@iterator"]||a[o(t)]}},(t,r,i)=>{var o=i(76),a=i(15),c=i(52)("toStringTag"),u="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var r,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=Object(t),c))?i:u?a(r):"Object"==(o=a(r))&&"function"==typeof r.callee?"Arguments":o}},(t,r,i)=>{var o={};o[i(52)("toStringTag")]="z";t.exports="[object z]"===String(o)},(t,r,i)=>{var o=i(24);t.exports=function(t){var r=t.return;if(void 0!==r)return o(r.call(t)).value}},(t,r,i)=>{"use strict";var o=i(17),a=i(23),c=i(12);t.exports=function(t,r,i){var u=o(r);u in t?a.f(t,u,c(0,i)):t[u]=i}},(t,r,i)=>{i(80);var o=i(85);t.exports=o("String","padStart")},(t,r,i)=>{"use strict";var o=i(6),a=i(81).start;o({target:"String",proto:!0,forced:i(83)},{padStart:function padStart(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var o=i(43),a=i(82),c=i(16),u=Math.ceil,createMethod=function(t){return function(r,i,l){var h,p,d=String(c(r)),g=d.length,m=void 0===l?" ":String(l),y=o(i);if(y<=g||""==m)return d;h=y-g;(p=a.call(m,u(h/m.length))).length>h&&(p=p.slice(0,h));return t?d+p:p+d}};t.exports={start:createMethod(!1),end:createMethod(!0)}},(t,r,i)=>{"use strict";var o=i(44),a=i(16);t.exports="".repeat||function repeat(t){var r=String(a(this)),i="",c=o(t);if(c<0||c==1/0)throw RangeError("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(r+=r))1&c&&(i+=r);return i}},(t,r,i)=>{var o=i(84);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},(t,r,i)=>{var o=i(38);t.exports=o("navigator","userAgent")||""},(t,r,i)=>{var o=i(7),a=i(72),c=Function.call;t.exports=function(t,r,i){return a(c,o[t].prototype[r],i)}},(t,r,i)=>{i(87);var o=i(85);t.exports=o("String","padEnd")},(t,r,i)=>{"use strict";var o=i(6),a=i(81).end;o({target:"String",proto:!0,forced:i(83)},{padEnd:function padEnd(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{i(89);var o=i(39);t.exports=o.Object.values},(t,r,i)=>{var o=i(6),a=i(90).values;o({target:"Object",stat:!0},{values:function values(t){return a(t)}})},(t,r,i)=>{var o=i(9),a=i(57),c=i(13),u=i(11).f,createMethod=function(t){return function(r){for(var i,l=c(r),h=a(l),p=h.length,d=0,g=[];p>d;){i=h[d++];o&&!u.call(l,i)||g.push(t?[i,l[i]]:l[i])}return g}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},(t,r,i)=>{i(92);var o=i(39);t.exports=o.Object.entries},(t,r,i)=>{var o=i(6),a=i(90).entries;o({target:"Object",stat:!0},{entries:function entries(t){return a(t)}})},(t,r,i)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Jbig2Image=void 0;var o=i(1),a=i(94),c=i(98),u=i(99);function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}(Jbig2Error,t);var r=_createSuper(Jbig2Error);function Jbig2Error(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Jbig2Error);return r.call(this,"JBIG2 error: ".concat(t))}return Jbig2Error}(o.BaseException),h=function Jbig2ImageClosure(){function ContextCache(){}ContextCache.prototype={getContexts:function getContexts(t){return t in this?this[t]:this[t]=new Int8Array(65536)}};function DecodingContext(t,r,i){this.data=t;this.start=r;this.end=i}DecodingContext.prototype={get decoder(){var t=new c.ArithmeticDecoder(this.data,this.start,this.end);return(0,o.shadow)(this,"decoder",t)},get contextCache(){var t=new ContextCache;return(0,o.shadow)(this,"contextCache",t)}};function decodeInteger(t,r,i){var o=t.getContexts(r),a=1;function readBits(t){for(var r=0,c=0;c<t;c++){var u=i.readBit(o,a);a=a<256?a<<1|u:511&(a<<1|u)|256;r=r<<1|u}return r>>>0}var c=readBits(1),u=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);return 0===c?u:u>0?-u:null}function decodeIAID(t,r,i){for(var o=t.getContexts("IAID"),a=1,c=0;c<i;c++){a=a<<1|r.readBit(o,a)}return i<31?a&(1<<i)-1:2147483647&a}var t=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],r=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],i=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],h=[39717,1941,229,405],p=[32,8];function decodeBitmap(t,i,o,a,c,u,l,p){if(t){return decodeMMRBitmap(new Reader(p.data,p.start,p.end),i,o,!1)}if(0===a&&!u&&!c&&4===l.length&&3===l[0].x&&-1===l[0].y&&-3===l[1].x&&-1===l[1].y&&2===l[2].x&&-2===l[2].y&&-2===l[3].x&&-2===l[3].y)return function decodeBitmapTemplate0(t,r,i){var o,a,c,u,l,h,p,d=i.decoder,g=i.contextCache.getContexts("GB"),m=[];for(a=0;a<r;a++){l=m[a]=new Uint8Array(t);h=a<1?l:m[a-1];o=(p=a<2?l:m[a-2])[0]<<13|p[1]<<12|p[2]<<11|h[0]<<7|h[1]<<6|h[2]<<5|h[3]<<4;for(c=0;c<t;c++){l[c]=u=d.readBit(g,o);o=(31735&o)<<1|(c+3<t?p[c+3]<<11:0)|(c+4<t?h[c+4]<<4:0)|u}}return m}(i,o,p);var d=!!u,g=r[a].concat(l);g.sort((function(t,r){return t.y-r.y||t.x-r.x}));var m,y,v=g.length,b=new Int8Array(v),x=new Int8Array(v),w=[],_=0,S=0,C=0,T=0;for(y=0;y<v;y++){b[y]=g[y].x;x[y]=g[y].y;S=Math.min(S,g[y].x);C=Math.max(C,g[y].x);T=Math.min(T,g[y].y);y<v-1&&g[y].y===g[y+1].y&&g[y].x===g[y+1].x-1?_|=1<<v-1-y:w.push(y)}var P=w.length,I=new Int8Array(P),k=new Int8Array(P),O=new Uint16Array(P);for(m=0;m<P;m++){y=w[m];I[m]=g[y].x;k[m]=g[y].y;O[m]=1<<v-1-y}for(var E,A,R,D,L,B=-S,M=-T,U=i-C,N=h[a],j=new Uint8Array(i),H=[],z=p.decoder,X=p.contextCache.getContexts("GB"),G=0,Y=0,J=0;J<o;J++){if(c){if(G^=z.readBit(X,N)){H.push(j);continue}}j=new Uint8Array(j);H.push(j);for(E=0;E<i;E++)if(d&&u[J][E])j[E]=0;else{if(E>=B&&E<U&&J>=M){Y=Y<<1&_;for(y=0;y<P;y++){A=J+k[y];R=E+I[y];(D=H[A][R])&&(Y|=D=O[y])}}else{Y=0;L=v-1;for(y=0;y<v;y++,L--)(R=E+b[y])>=0&&R<i&&(A=J+x[y])>=0&&(D=H[A][R])&&(Y|=D<<L)}var q=z.readBit(X,Y);j[E]=q}}return H}function decodeRefinement(t,r,o,a,c,u,h,d,g){var m=i[o].coding;0===o&&(m=m.concat([d[0]]));var y,v=m.length,b=new Int32Array(v),x=new Int32Array(v);for(y=0;y<v;y++){b[y]=m[y].x;x[y]=m[y].y}var w=i[o].reference;0===o&&(w=w.concat([d[1]]));var _=w.length,S=new Int32Array(_),C=new Int32Array(_);for(y=0;y<_;y++){S[y]=w[y].x;C[y]=w[y].y}for(var T=a[0].length,P=a.length,I=p[o],k=[],O=g.decoder,E=g.contextCache.getContexts("GR"),A=0,R=0;R<r;R++){if(h){if(A^=O.readBit(E,I))throw new l("prediction is not supported")}var D=new Uint8Array(t);k.push(D);for(var L=0;L<t;L++){var B,M,U=0;for(y=0;y<v;y++){B=R+x[y];M=L+b[y];B<0||M<0||M>=t?U<<=1:U=U<<1|k[B][M]}for(y=0;y<_;y++){B=R+C[y]-u;M=L+S[y]-c;B<0||B>=P||M<0||M>=T?U<<=1:U=U<<1|a[B][M]}var N=O.readBit(E,U);D[L]=N}}return k}function decodeTextRegion(t,r,i,o,a,c,u,h,p,d,g,m,y,v,b,x,w,_,S){if(t&&r)throw new l("refinement with Huffman is not supported");var C,T,P=[];for(C=0;C<o;C++){T=new Uint8Array(i);if(a)for(var I=0;I<i;I++)T[I]=a;P.push(T)}var k=w.decoder,O=w.contextCache,E=t?-v.tableDeltaT.decode(S):-decodeInteger(O,"IADT",k),A=0;C=0;for(;C<c;){E+=t?v.tableDeltaT.decode(S):decodeInteger(O,"IADT",k);for(var R=A+=t?v.tableFirstS.decode(S):decodeInteger(O,"IAFS",k);;){var D=0;u>1&&(D=t?S.readBits(_):decodeInteger(O,"IAIT",k));var L=u*E+D,B=t?v.symbolIDTable.decode(S):decodeIAID(O,k,p),M=r&&(t?S.readBit():decodeInteger(O,"IARI",k)),U=h[B],N=U[0].length,j=U.length;if(M){var H=decodeInteger(O,"IARDW",k),z=decodeInteger(O,"IARDH",k);U=decodeRefinement(N+=H,j+=z,b,U,(H>>1)+decodeInteger(O,"IARDX",k),(z>>1)+decodeInteger(O,"IARDY",k),!1,x,w)}var X,G,Y,J=L-(1&m?0:j-1),q=R-(2&m?N-1:0);if(d){for(X=0;X<j;X++)if(T=P[q+X]){Y=U[X];var V=Math.min(i-J,N);switch(y){case 0:for(G=0;G<V;G++)T[J+G]|=Y[G];break;case 2:for(G=0;G<V;G++)T[J+G]^=Y[G];break;default:throw new l("operator ".concat(y," is not supported"))}}R+=j-1}else{for(G=0;G<j;G++)if(T=P[J+G]){Y=U[G];switch(y){case 0:for(X=0;X<N;X++)T[q+X]|=Y[X];break;case 2:for(X=0;X<N;X++)T[q+X]^=Y[X];break;default:throw new l("operator ".concat(y," is not supported"))}}R+=N-1}C++;var W=t?v.tableDeltaS.decode(S):decodeInteger(O,"IADS",k);if(null===W)break;R+=W+g}}return P}function readSegmentHeader(r,i){var o={};o.number=(0,a.readUint32)(r,i);var c=r[i+4],u=63&c;if(!t[u])throw new l("invalid segment type: "+u);o.type=u;o.typeName=t[u];o.deferredNonRetain=!!(128&c);var h=!!(64&c),p=r[i+5],g=p>>5&7,m=[31&p],y=i+6;if(7===p){g=536870911&(0,a.readUint32)(r,y-1);y+=3;var v=g+7>>3;m[0]=r[y++];for(;--v>0;)m.push(r[y++])}else if(5===p||6===p)throw new l("invalid referred-to flags");o.retainBits=m;var b=4;o.number<=256?b=1:o.number<=65536&&(b=2);var x,w,_=[];for(x=0;x<g;x++){var S=void 0;S=1===b?r[y]:2===b?(0,a.readUint16)(r,y):(0,a.readUint32)(r,y);_.push(S);y+=b}o.referredTo=_;if(h){o.pageAssociation=(0,a.readUint32)(r,y);y+=4}else o.pageAssociation=r[y++];o.length=(0,a.readUint32)(r,y);y+=4;if(4294967295===o.length){if(38!==u)throw new l("invalid unknown segment length");var C=readRegionSegmentInformation(r,y),T=!!(1&r[y+d]),P=new Uint8Array(6);if(!T){P[0]=255;P[1]=172}P[2]=C.height>>>24&255;P[3]=C.height>>16&255;P[4]=C.height>>8&255;P[5]=255&C.height;for(x=y,w=r.length;x<w;x++){for(var I=0;I<6&&P[I]===r[x+I];)I++;if(6===I){o.length=x+6;break}}if(4294967295===o.length)throw new l("segment end was not found")}o.headerEnd=y;return o}function readSegments(t,r,i,o){for(var a=[],c=i;c<o;){var u=readSegmentHeader(r,c);c=u.headerEnd;var l={header:u,data:r};if(!t.randomAccess){l.start=c;c+=u.length;l.end=c}a.push(l);if(51===u.type)break}if(t.randomAccess)for(var h=0,p=a.length;h<p;h++){a[h].start=c;c+=a[h].header.length;a[h].end=c}return a}function readRegionSegmentInformation(t,r){return{width:(0,a.readUint32)(t,r),height:(0,a.readUint32)(t,r+4),x:(0,a.readUint32)(t,r+8),y:(0,a.readUint32)(t,r+12),combinationOperator:7&t[r+16]}}var d=17;function processSegment(t,r){var i,o,c,u,h=t.header,p=t.data,g=t.start,m=t.end;switch(h.type){case 0:var y={},v=(0,a.readUint16)(p,g);y.huffman=!!(1&v);y.refinement=!!(2&v);y.huffmanDHSelector=v>>2&3;y.huffmanDWSelector=v>>4&3;y.bitmapSizeSelector=v>>6&1;y.aggregationInstancesSelector=v>>7&1;y.bitmapCodingContextUsed=!!(256&v);y.bitmapCodingContextRetained=!!(512&v);y.template=v>>10&3;y.refinementTemplate=v>>12&1;g+=2;if(!y.huffman){u=0===y.template?4:1;o=[];for(c=0;c<u;c++){o.push({x:(0,a.readInt8)(p,g),y:(0,a.readInt8)(p,g+1)});g+=2}y.at=o}if(y.refinement&&!y.refinementTemplate){o=[];for(c=0;c<2;c++){o.push({x:(0,a.readInt8)(p,g),y:(0,a.readInt8)(p,g+1)});g+=2}y.refinementAt=o}y.numberOfExportedSymbols=(0,a.readUint32)(p,g);g+=4;y.numberOfNewSymbols=(0,a.readUint32)(p,g);g+=4;i=[y,h.number,h.referredTo,p,g,m];break;case 6:case 7:var b={};b.info=readRegionSegmentInformation(p,g);g+=d;var x=(0,a.readUint16)(p,g);g+=2;b.huffman=!!(1&x);b.refinement=!!(2&x);b.logStripSize=x>>2&3;b.stripSize=1<<b.logStripSize;b.referenceCorner=x>>4&3;b.transposed=!!(64&x);b.combinationOperator=x>>7&3;b.defaultPixelValue=x>>9&1;b.dsOffset=x<<17>>27;b.refinementTemplate=x>>15&1;if(b.huffman){var w=(0,a.readUint16)(p,g);g+=2;b.huffmanFS=3&w;b.huffmanDS=w>>2&3;b.huffmanDT=w>>4&3;b.huffmanRefinementDW=w>>6&3;b.huffmanRefinementDH=w>>8&3;b.huffmanRefinementDX=w>>10&3;b.huffmanRefinementDY=w>>12&3;b.huffmanRefinementSizeSelector=!!(16384&w)}if(b.refinement&&!b.refinementTemplate){o=[];for(c=0;c<2;c++){o.push({x:(0,a.readInt8)(p,g),y:(0,a.readInt8)(p,g+1)});g+=2}b.refinementAt=o}b.numberOfSymbolInstances=(0,a.readUint32)(p,g);g+=4;i=[b,h.referredTo,p,g,m];break;case 16:var _={},S=p[g++];_.mmr=!!(1&S);_.template=S>>1&3;_.patternWidth=p[g++];_.patternHeight=p[g++];_.maxPatternIndex=(0,a.readUint32)(p,g);g+=4;i=[_,h.number,p,g,m];break;case 22:case 23:var C={};C.info=readRegionSegmentInformation(p,g);g+=d;var T=p[g++];C.mmr=!!(1&T);C.template=T>>1&3;C.enableSkip=!!(8&T);C.combinationOperator=T>>4&7;C.defaultPixelValue=T>>7&1;C.gridWidth=(0,a.readUint32)(p,g);g+=4;C.gridHeight=(0,a.readUint32)(p,g);g+=4;C.gridOffsetX=4294967295&(0,a.readUint32)(p,g);g+=4;C.gridOffsetY=4294967295&(0,a.readUint32)(p,g);g+=4;C.gridVectorX=(0,a.readUint16)(p,g);g+=2;C.gridVectorY=(0,a.readUint16)(p,g);g+=2;i=[C,h.referredTo,p,g,m];break;case 38:case 39:var P={};P.info=readRegionSegmentInformation(p,g);g+=d;var I=p[g++];P.mmr=!!(1&I);P.template=I>>1&3;P.prediction=!!(8&I);if(!P.mmr){u=0===P.template?4:1;o=[];for(c=0;c<u;c++){o.push({x:(0,a.readInt8)(p,g),y:(0,a.readInt8)(p,g+1)});g+=2}P.at=o}i=[P,p,g,m];break;case 48:var k={width:(0,a.readUint32)(p,g),height:(0,a.readUint32)(p,g+4),resolutionX:(0,a.readUint32)(p,g+8),resolutionY:(0,a.readUint32)(p,g+12)};4294967295===k.height&&delete k.height;var O=p[g+16];(0,a.readUint16)(p,g+17);k.lossless=!!(1&O);k.refinement=!!(2&O);k.defaultPixelValue=O>>2&1;k.combinationOperator=O>>3&3;k.requiresBuffer=!!(32&O);k.combinationOperatorOverride=!!(64&O);i=[k];break;case 49:case 50:case 51:break;case 53:i=[h.number,p,g,m];break;case 62:break;default:throw new l("segment type ".concat(h.typeName,"(").concat(h.type,")")+" is not implemented")}var E="on"+h.typeName;E in r&&r[E].apply(r,i)}function processSegments(t,r){for(var i=0,o=t.length;i<o;i++)processSegment(t[i],r)}function SimpleSegmentVisitor(){}SimpleSegmentVisitor.prototype={onPageInformation:function SimpleSegmentVisitor_onPageInformation(t){this.currentPageInfo=t;var r=t.width+7>>3,i=new Uint8ClampedArray(r*t.height);if(t.defaultPixelValue)for(var o=0,a=i.length;o<a;o++)i[o]=255;this.buffer=i},drawBitmap:function SimpleSegmentVisitor_drawBitmap(t,r){var i,o,a,c,u=this.currentPageInfo,h=t.width,p=t.height,d=u.width+7>>3,g=u.combinationOperatorOverride?t.combinationOperator:u.combinationOperator,m=this.buffer,y=128>>(7&t.x),v=t.y*d+(t.x>>3);switch(g){case 0:for(i=0;i<p;i++){a=y;c=v;for(o=0;o<h;o++){r[i][o]&&(m[c]|=a);if(!(a>>=1)){a=128;c++}}v+=d}break;case 2:for(i=0;i<p;i++){a=y;c=v;for(o=0;o<h;o++){r[i][o]&&(m[c]^=a);if(!(a>>=1)){a=128;c++}}v+=d}break;default:throw new l("operator ".concat(g," is not supported"))}},onImmediateGenericRegion:function SimpleSegmentVisitor_onImmediateGenericRegion(t,r,i,o){var a=t.info,c=new DecodingContext(r,i,o),u=decodeBitmap(t.mmr,a.width,a.height,t.template,t.prediction,null,t.at,c);this.drawBitmap(a,u)},onImmediateLosslessGenericRegion:function SimpleSegmentVisitor_onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function SimpleSegmentVisitor_onSymbolDictionary(t,r,i,o,c,u){var h,p;if(t.huffman){h=function getSymbolDictionaryHuffmanTables(t,r,i){var o,a,c,u,h=0;switch(t.huffmanDHSelector){case 0:case 1:o=getStandardTable(t.huffmanDHSelector+4);break;case 3:o=getCustomHuffmanTable(h,r,i);h++;break;default:throw new l("invalid Huffman DH selector")}switch(t.huffmanDWSelector){case 0:case 1:a=getStandardTable(t.huffmanDWSelector+2);break;case 3:a=getCustomHuffmanTable(h,r,i);h++;break;default:throw new l("invalid Huffman DW selector")}if(t.bitmapSizeSelector){c=getCustomHuffmanTable(h,r,i);h++}else c=getStandardTable(1);u=t.aggregationInstancesSelector?getCustomHuffmanTable(h,r,i):getStandardTable(1);return{tableDeltaHeight:o,tableDeltaWidth:a,tableBitmapSize:c,tableAggregateInstances:u}}(t,i,this.customTables);p=new Reader(o,c,u)}var d=this.symbols;d||(this.symbols=d={});for(var g=[],m=0,y=i.length;m<y;m++){var v=d[i[m]];v&&(g=g.concat(v))}var b=new DecodingContext(o,c,u);d[r]=function decodeSymbolDictionary(t,r,i,o,c,u,h,p,d,g,m,y){if(t&&r)throw new l("symbol refinement with Huffman is not supported");var v,b,x=[],w=0,_=(0,a.log2)(i.length+o),S=m.decoder,C=m.contextCache;if(t){v=getStandardTable(1);b=[];_=Math.max(_,1)}for(;x.length<o;){w+=t?u.tableDeltaHeight.decode(y):decodeInteger(C,"IADH",S);for(var T=0,P=0,I=t?b.length:0;;){var k,O=t?u.tableDeltaWidth.decode(y):decodeInteger(C,"IADW",S);if(null===O)break;P+=T+=O;if(r){var E=decodeInteger(C,"IAAI",S);if(E>1)k=decodeTextRegion(t,r,T,w,0,E,1,i.concat(x),_,0,0,1,0,u,d,g,m,0,y);else{var A=decodeIAID(C,S,_),R=decodeInteger(C,"IARDX",S),D=decodeInteger(C,"IARDY",S);k=decodeRefinement(T,w,d,A<i.length?i[A]:x[A-i.length],R,D,!1,g,m)}x.push(k)}else if(t)b.push(T);else{k=decodeBitmap(!1,T,w,h,!1,null,p,m);x.push(k)}}if(t&&!r){var L=u.tableBitmapSize.decode(y);y.byteAlign();var B=void 0;if(0===L)B=readUncompressedBitmap(y,P,w);else{var M=y.end,U=y.position+L;y.end=U;B=decodeMMRBitmap(y,P,w,!1);y.end=M;y.position=U}var N=b.length;if(I===N-1)x.push(B);else{var j=void 0,H=void 0,z=0,X=void 0,G=void 0;for(j=I;j<N;j++){X=z+b[j];G=[];for(H=0;H<w;H++)G.push(B[H].subarray(z,X));x.push(G);z=X}}}}for(var Y=[],J=[],q=!1,V=i.length+o;J.length<V;){for(var W=t?v.decode(y):decodeInteger(C,"IAEX",S);W--;)J.push(q);q=!q}for(var K=0,Q=i.length;K<Q;K++)J[K]&&Y.push(i[K]);for(var Z=0;Z<o;K++,Z++)J[K]&&Y.push(x[Z]);return Y}(t.huffman,t.refinement,g,t.numberOfNewSymbols,t.numberOfExportedSymbols,h,t.template,t.at,t.refinementTemplate,t.refinementAt,b,p)},onImmediateTextRegion:function SimpleSegmentVisitor_onImmediateTextRegion(t,r,i,o,c){for(var u,h,p=t.info,d=this.symbols,g=[],m=0,y=r.length;m<y;m++){var v=d[r[m]];v&&(g=g.concat(v))}var b=(0,a.log2)(g.length);if(t.huffman){h=new Reader(i,o,c);u=function getTextRegionHuffmanTables(t,r,i,o,a){for(var c=[],u=0;u<=34;u++){var h=a.readBits(4);c.push(new HuffmanLine([u,h,0,0]))}var p=new HuffmanTable(c,!1);c.length=0;for(var d=0;d<o;){var g=p.decode(a);if(g>=32){var m=void 0,y=void 0,v=void 0;switch(g){case 32:if(0===d)throw new l("no previous value in symbol ID table");y=a.readBits(2)+3;m=c[d-1].prefixLength;break;case 33:y=a.readBits(3)+3;m=0;break;case 34:y=a.readBits(7)+11;m=0;break;default:throw new l("invalid code length in symbol ID table")}for(v=0;v<y;v++){c.push(new HuffmanLine([d,m,0,0]));d++}}else{c.push(new HuffmanLine([d,g,0,0]));d++}}a.byteAlign();var b,x,w,_=new HuffmanTable(c,!1),S=0;switch(t.huffmanFS){case 0:case 1:b=getStandardTable(t.huffmanFS+6);break;case 3:b=getCustomHuffmanTable(S,r,i);S++;break;default:throw new l("invalid Huffman FS selector")}switch(t.huffmanDS){case 0:case 1:case 2:x=getStandardTable(t.huffmanDS+8);break;case 3:x=getCustomHuffmanTable(S,r,i);S++;break;default:throw new l("invalid Huffman DS selector")}switch(t.huffmanDT){case 0:case 1:case 2:w=getStandardTable(t.huffmanDT+11);break;case 3:w=getCustomHuffmanTable(S,r,i);S++;break;default:throw new l("invalid Huffman DT selector")}if(t.refinement)throw new l("refinement with Huffman is not supported");return{symbolIDTable:_,tableFirstS:b,tableDeltaS:x,tableDeltaT:w}}(t,r,this.customTables,g.length,h)}var x=new DecodingContext(i,o,c),w=decodeTextRegion(t.huffman,t.refinement,p.width,p.height,t.defaultPixelValue,t.numberOfSymbolInstances,t.stripSize,g,b,t.transposed,t.dsOffset,t.referenceCorner,t.combinationOperator,u,t.refinementTemplate,t.refinementAt,x,t.logStripSize,h);this.drawBitmap(p,w)},onImmediateLosslessTextRegion:function SimpleSegmentVisitor_onImmediateLosslessTextRegion(){this.onImmediateTextRegion.apply(this,arguments)},onPatternDictionary:function onPatternDictionary(t,r,i,o,a){var c=this.patterns;c||(this.patterns=c={});var u=new DecodingContext(i,o,a);c[r]=function decodePatternDictionary(t,r,i,o,a,c){var u=[];if(!t){u.push({x:-r,y:0});if(0===a){u.push({x:-3,y:-1});u.push({x:2,y:-2});u.push({x:-2,y:-2})}}for(var l=decodeBitmap(t,(o+1)*r,i,a,!1,null,u,c),h=[],p=0;p<=o;p++){for(var d=[],g=r*p,m=g+r,y=0;y<i;y++)d.push(l[y].subarray(g,m));h.push(d)}return h}(t.mmr,t.patternWidth,t.patternHeight,t.maxPatternIndex,t.template,u)},onImmediateHalftoneRegion:function onImmediateHalftoneRegion(t,r,i,o,c){var u=this.patterns[r[0]],h=t.info,p=new DecodingContext(i,o,c),d=function decodeHalftoneRegion(t,r,i,o,c,u,h,p,d,g,m,y,v,b,x){if(h)throw new l("skip is not supported");if(0!==p)throw new l("operator "+p+" is not supported in halftone region");var w,_,S,C=[];for(w=0;w<c;w++){S=new Uint8Array(o);if(u)for(_=0;_<o;_++)S[_]=u;C.push(S)}var T=r.length,P=r[0],I=P[0].length,k=P.length,O=(0,a.log2)(T),E=[];if(!t){E.push({x:i<=1?3:2,y:-1});if(0===i){E.push({x:-3,y:-1});E.push({x:2,y:-2});E.push({x:-2,y:-2})}}var A,R,D,L,B,M,U,N,j,H,z,X=[];t&&(A=new Reader(x.data,x.start,x.end));for(w=O-1;w>=0;w--){R=t?decodeMMRBitmap(A,d,g,!0):decodeBitmap(!1,d,g,i,!1,null,E,x);X[w]=R}for(D=0;D<g;D++)for(L=0;L<d;L++){B=0;M=0;for(_=O-1;_>=0;_--)M|=(B=X[_][D][L]^B)<<_;U=r[M];j=y+D*v-L*b>>8;if((N=m+D*b+L*v>>8)>=0&&N+I<=o&&j>=0&&j+k<=c)for(w=0;w<k;w++){z=C[j+w];H=U[w];for(_=0;_<I;_++)z[N+_]|=H[_]}else{var G=void 0,Y=void 0;for(w=0;w<k;w++)if(!((Y=j+w)<0||Y>=c)){z=C[Y];H=U[w];for(_=0;_<I;_++)(G=N+_)>=0&&G<o&&(z[G]|=H[_])}}}return C}(t.mmr,u,t.template,h.width,h.height,t.defaultPixelValue,t.enableSkip,t.combinationOperator,t.gridWidth,t.gridHeight,t.gridOffsetX,t.gridOffsetY,t.gridVectorX,t.gridVectorY,p);this.drawBitmap(h,d)},onImmediateLosslessHalftoneRegion:function onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion.apply(this,arguments)},onTables:function onTables(t,r,i,o){var c=this.customTables;c||(this.customTables=c={});c[t]=function decodeTablesSegment(t,r,i){var o,c,u=t[r],l=4294967295&(0,a.readUint32)(t,r+1),h=4294967295&(0,a.readUint32)(t,r+5),p=new Reader(t,r+9,i),d=1+(u>>1&7),g=1+(u>>4&7),m=[],y=l;do{o=p.readBits(d);c=p.readBits(g);m.push(new HuffmanLine([y,o,c,0]));y+=1<<c}while(y<h);o=p.readBits(d);m.push(new HuffmanLine([l-1,o,32,0,"lower"]));o=p.readBits(d);m.push(new HuffmanLine([h,o,32,0]));if(1&u){o=p.readBits(d);m.push(new HuffmanLine([o,0]))}return new HuffmanTable(m,!1)}(r,i,o)}};function HuffmanLine(t){if(2===t.length){this.isOOB=!0;this.rangeLow=0;this.prefixLength=t[0];this.rangeLength=0;this.prefixCode=t[1];this.isLowerRange=!1}else{this.isOOB=!1;this.rangeLow=t[0];this.prefixLength=t[1];this.rangeLength=t[2];this.prefixCode=t[3];this.isLowerRange="lower"===t[4]}}function HuffmanTreeNode(t){this.children=[];if(t){this.isLeaf=!0;this.rangeLength=t.rangeLength;this.rangeLow=t.rangeLow;this.isLowerRange=t.isLowerRange;this.isOOB=t.isOOB}else this.isLeaf=!1}HuffmanTreeNode.prototype={buildTree:function buildTree(t,r){var i=t.prefixCode>>r&1;if(r<=0)this.children[i]=new HuffmanTreeNode(t);else{var o=this.children[i];o||(this.children[i]=o=new HuffmanTreeNode(null));o.buildTree(t,r-1)}},decodeNode:function decodeNode(t){if(this.isLeaf){if(this.isOOB)return null;var r=t.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-r:r)}var i=this.children[t.readBit()];if(!i)throw new l("invalid Huffman data");return i.decodeNode(t)}};function HuffmanTable(t,r){r||this.assignPrefixCodes(t);this.rootNode=new HuffmanTreeNode(null);for(var i=0,o=t.length;i<o;i++){var a=t[i];a.prefixLength>0&&this.rootNode.buildTree(a,a.prefixLength-1)}}HuffmanTable.prototype={decode:function decode(t){return this.rootNode.decodeNode(t)},assignPrefixCodes:function assignPrefixCodes(t){for(var r=t.length,i=0,o=0;o<r;o++)i=Math.max(i,t[o].prefixLength);for(var a=new Uint32Array(i+1),c=0;c<r;c++)a[t[c].prefixLength]++;var u,l,h,p=1,d=0;a[0]=0;for(;p<=i;){u=d=d+a[p-1]<<1;l=0;for(;l<r;){if((h=t[l]).prefixLength===p){h.prefixCode=u;u++}l++}p++}}};var g={};function getStandardTable(t){var r,i=g[t];if(i)return i;switch(t){case 1:r=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:r=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:r=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:r=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:r=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:r=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:r=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:r=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:r=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:r=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:r=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:r=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:r=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:r=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:r=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new l("standard table B.".concat(t," does not exist"))}for(var o=0,a=r.length;o<a;o++)r[o]=new HuffmanLine(r[o]);i=new HuffmanTable(r,!0);g[t]=i;return i}function Reader(t,r,i){this.data=t;this.start=r;this.end=i;this.position=r;this.shift=-1;this.currentByte=0}Reader.prototype={readBit:function readBit(){if(this.shift<0){if(this.position>=this.end)throw new l("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}var t=this.currentByte>>this.shift&1;this.shift--;return t},readBits:function readBits(t){var r,i=0;for(r=t-1;r>=0;r--)i|=this.readBit()<<r;return i},byteAlign:function byteAlign(){this.shift=-1},next:function next(){return this.position>=this.end?-1:this.data[this.position++]}};function getCustomHuffmanTable(t,r,i){for(var o=0,a=0,c=r.length;a<c;a++){var u=i[r[a]];if(u){if(t===o)return u;o++}}throw new l("can't find custom Huffman table")}function readUncompressedBitmap(t,r,i){for(var o=[],a=0;a<i;a++){var c=new Uint8Array(r);o.push(c);for(var u=0;u<r;u++)c[u]=t.readBit();t.byteAlign()}return o}function decodeMMRBitmap(t,r,i,o){for(var a,c={K:-1,Columns:r,Rows:i,BlackIs1:!0,EndOfBlock:o},l=new u.CCITTFaxDecoder(t,c),h=[],p=!1,d=0;d<i;d++){var g=new Uint8Array(r);h.push(g);for(var m=-1,y=0;y<r;y++){if(m<0){if(-1===(a=l.readNextChar())){a=0;p=!0}m=7}g[y]=a>>m&1;m--}}if(o&&!p)for(var v=0;v<5&&-1!==l.readNextChar();v++);return h}function Jbig2Image(){}Jbig2Image.prototype={parseChunks:function parseChunks(t){return function parseJbig2Chunks(t){for(var r=new SimpleSegmentVisitor,i=0,o=t.length;i<o;i++){var a=t[i];processSegments(readSegments({},a.data,a.start,a.end),r)}return r.buffer}(t)},parse:function parse(t){var r=function parseJbig2(t){var r=t.length,i=0;if(151!==t[i]||74!==t[i+1]||66!==t[i+2]||50!==t[i+3]||13!==t[i+4]||10!==t[i+5]||26!==t[i+6]||10!==t[i+7])throw new l("parseJbig2 - invalid header.");var o=Object.create(null);i+=8;var c=t[i++];o.randomAccess=!(1&c);if(!(2&c)){o.numberOfPages=(0,a.readUint32)(t,i);i+=4}var u=readSegments(o,t,i,r),h=new SimpleSegmentVisitor;processSegments(u,h);for(var p=h.currentPageInfo,d=p.width,g=p.height,m=h.buffer,y=new Uint8ClampedArray(d*g),v=0,b=0,x=0;x<g;x++)for(var w=0,_=void 0,S=0;S<d;S++){if(!w){w=128;_=m[b++]}y[v++]=_&w?0:255;w>>=1}return{imgData:y,width:d,height:g}}(t),i=r.imgData,o=r.width,c=r.height;this.width=o;this.height=c;return i}};return Jbig2Image}();r.Jbig2Image=h},(t,r,i)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0});r.collectActions=function collectActions(t,r,i){var c=Object.create(null);if(r.has("AA")){var u,l=r.get("AA"),h=_createForOfIteratorHelper(l.getKeys());try{for(h.s();!(u=h.n()).done;){var p=u.value,d=i[p];if(d){var g=l.getRaw(p),m=new a.RefSet,y=[];_collectJS(g,t,y,m);y.length>0&&(c[d]=y)}}}catch(t){h.e(t)}finally{h.f()}}if(r.has("A")){var v=r.get("A"),b=new a.RefSet,x=[];_collectJS(v,t,x,b);x.length>0&&(c.Action=x)}return(0,o.objectSize)(c)>0?c:null};r.escapePDFName=function escapePDFName(t){for(var r=[],i=0,o=0,a=t.length;o<a;o++){var c=t.charCodeAt(o);if(c<33||c>126||35===c||40===c||41===c||60===c||62===c||91===c||93===c||123===c||125===c||47===c||37===c){i<o&&r.push(t.substring(i,o));r.push("#".concat(c.toString(16)));i=o+1}}if(0===r.length)return t;i<t.length&&r.push(t.substring(i,t.length));return r.join("")};r.getArrayLookupTableFactory=function getArrayLookupTableFactory(t){var r;return function(){if(t){var i=t();t=null;r=Object.create(null);for(var o=0,a=i.length;o<a;o+=2)r[i[o]]=i[o+1];i=null}return r}};r.getInheritableProperty=function getInheritableProperty(t){var r,i=t.dict,a=t.key,c=t.getArray,u=void 0!==c&&c,l=t.stopWhenFound,h=void 0===l||l,p=0;for(;i;){var d=u?i.getArray(a):i.get(a);if(void 0!==d){if(h)return d;r||(r=[]);r.push(d)}if(++p>100){(0,o.warn)('getInheritableProperty: maximum loop count exceeded for "'.concat(a,'"'));break}i=i.get("Parent")}return r};r.getLookupTableFactory=function getLookupTableFactory(t){var r;return function(){if(t){r=Object.create(null);t(r);t=null}return r}};r.isWhiteSpace=function isWhiteSpace(t){return 32===t||9===t||13===t||10===t};r.log2=function log2(t){if(t<=0)return 0;return Math.ceil(Math.log2(t))};r.parseXFAPath=function parseXFAPath(t){var r=/(.+)\[([0-9]+)\]$/;return t.split(".").map((function(t){var i=t.match(r);return i?{name:i[1],pos:parseInt(i[2],10)}:{name:t,pos:0}}))};r.readInt8=function readInt8(t,r){return t[r]<<24>>24};r.readUint16=function readUint16(t,r){return t[r]<<8|t[r+1]};r.readUint32=function readUint32(t,r){return(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3])>>>0};r.toRomanNumerals=function toRomanNumerals(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,o.assert)(Number.isInteger(t)&&t>0,"The number should be a positive integer.");var i,a=[];for(;t>=1e3;){t-=1e3;a.push("M")}i=t/100|0;t%=100;a.push(h[i]);i=t/10|0;t%=10;a.push(h[10+i]);a.push(h[20+t]);var c=a.join("");return r?c.toLowerCase():c};r.XRefParseException=r.XRefEntryException=r.MissingDataException=void 0;var o=i(1),a=i(95);function _createForOfIteratorHelper(t,r){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,l=!1;return{s:function s(){i=t[Symbol.iterator]()},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){l=!0;c=t},f:function f(){try{u||null==i.return||i.return()}finally{if(l)throw c}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var c=function(t){_inherits(MissingDataException,t);var r=_createSuper(MissingDataException);function MissingDataException(t,i){var o;_classCallCheck(this,MissingDataException);(o=r.call(this,"Missing data [".concat(t,", ").concat(i,")"))).begin=t;o.end=i;return o}return MissingDataException}(o.BaseException);r.MissingDataException=c;var u=function(t){_inherits(XRefEntryException,t);var r=_createSuper(XRefEntryException);function XRefEntryException(){_classCallCheck(this,XRefEntryException);return r.apply(this,arguments)}return XRefEntryException}(o.BaseException);r.XRefEntryException=u;var l=function(t){_inherits(XRefParseException,t);var r=_createSuper(XRefParseException);function XRefParseException(){_classCallCheck(this,XRefParseException);return r.apply(this,arguments)}return XRefParseException}(o.BaseException);r.XRefParseException=l;var h=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function _collectJS(t,r,i,c){if(t){var u=null;if((0,a.isRef)(t)){if(c.has(t))return;u=t;c.put(u);t=r.fetch(t)}if(Array.isArray(t)){var l,h=_createForOfIteratorHelper(t);try{for(h.s();!(l=h.n()).done;){_collectJS(l.value,r,i,c)}}catch(t){h.e(t)}finally{h.f()}}else if(t instanceof a.Dict){if((0,a.isName)(t.get("S"),"JavaScript")&&t.has("JS")){var p,d=t.get("JS");p=(0,a.isStream)(d)?(0,o.bytesToString)(d.getBytes()):d;(p=(0,o.stringToPDFString)(p))&&i.push(p)}_collectJS(t.getRaw("Next"),r,i,c)}u&&c.remove(u)}}},(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.clearPrimitiveCaches=function clearPrimitiveCaches(){l._clearCache();u._clearCache();p._clearCache()};r.isCmd=function isCmd(t,r){return t instanceof l&&(void 0===r||t.cmd===r)};r.isDict=function isDict(t,r){return t instanceof h&&(void 0===r||isName(t.get("Type"),r))};r.isEOF=function isEOF(t){return t===c};r.isName=isName;r.isRef=function isRef(t){return t instanceof p};r.isRefsEqual=function isRefsEqual(t,r){return t.num===r.num&&t.gen===r.gen};r.isStream=function isStream(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.getBytes};r.RefSetCache=r.RefSet=r.Ref=r.Name=r.EOF=r.Dict=r.Cmd=void 0;var o=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(96)),a=i(1);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);return t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],o=!0,a=!1,c=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){i.push(u.value);if(r&&i.length===r)break}}catch(t){a=!0;c=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw c}}return i}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,l=!1;return{s:function s(){i=t[Symbol.iterator]()},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){l=!0;c=t},f:function f(){try{u||null==i.return||i.return()}finally{if(l)throw c}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,c,u){try{var l=t[c](u),h=l.value}catch(t){i(t);return}l.done?r(h):Promise.resolve(h).then(o,a)}var c={};r.EOF=c;var u=function NameClosure(){var t=Object.create(null);function Name(t){this.name=t}Name.prototype={};Name.get=function Name_get(r){var i=t[r];return i||(t[r]=new Name(r))};Name._clearCache=function(){t=Object.create(null)};return Name}();r.Name=u;var l=function CmdClosure(){var t=Object.create(null);function Cmd(t){this.cmd=t}Cmd.prototype={};Cmd.get=function Cmd_get(r){var i=t[r];return i||(t[r]=new Cmd(r))};Cmd._clearCache=function(){t=Object.create(null)};return Cmd}();r.Cmd=l;var h=function DictClosure(){var t=function nonSerializableClosure(){return t};function Dict(r){this._map=Object.create(null);this.xref=r;this.objId=null;this.suppressEncryption=!1;this.__nonSerializable__=t}Dict.prototype={assignXref:function Dict_assignXref(t){this.xref=t},get size(){return Object.keys(this._map).length},get:function get(t,r,i){var o=this._map[t];void 0===o&&void 0!==r&&void 0===(o=this._map[r])&&void 0!==i&&(o=this._map[i]);return o instanceof p&&this.xref?this.xref.fetch(o,this.suppressEncryption):o},getAsync:function getAsync(t,r,i){var a=this;return function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var c=t.apply(r,i);function _next(t){asyncGeneratorStep(c,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(c,o,a,_next,_throw,"throw",t)}_next(void 0)}))}}(o.default.mark((function _callee(){var c;return o.default.wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:void 0===(c=a._map[t])&&void 0!==r&&void 0===(c=a._map[r])&&void 0!==i&&(c=a._map[i]);if(!(c instanceof p&&a.xref)){o.next=4;break}return o.abrupt("return",a.xref.fetchAsync(c,a.suppressEncryption));case 4:return o.abrupt("return",c);case 5:case"end":return o.stop()}}),_callee)})))()},getArray:function getArray(t,r,i){var o=this.get(t,r,i);if(!Array.isArray(o)||!this.xref)return o;for(var a=0,c=(o=o.slice()).length;a<c;a++)o[a]instanceof p&&(o[a]=this.xref.fetch(o[a],this.suppressEncryption));return o},getRaw:function Dict_getRaw(t){return this._map[t]},getKeys:function Dict_getKeys(){return Object.keys(this._map)},getRawValues:function Dict_getRawValues(){return Object.values(this._map)},set:function Dict_set(t,r){this._map[t]=r},has:function Dict_has(t){return void 0!==this._map[t]},forEach:function Dict_forEach(t){for(var r in this._map)t(r,this.get(r))}};Dict.empty=function(){var t=new Dict(null);t.set=function(t,r){(0,a.unreachable)("Should not call `set` on the empty dictionary.")};return t}();Dict.merge=function(t){var r=t.xref,i=t.dictArray,o=t.mergeSubDicts,a=void 0!==o&&o,c=new Dict(r);if(!a){var u,l=_createForOfIteratorHelper(i);try{for(l.s();!(u=l.n()).done;){var h=u.value;if(h instanceof Dict)for(var p=0,d=Object.entries(h._map);p<d.length;p++){var g=_slicedToArray(d[p],2),m=g[0],y=g[1];void 0===c._map[m]&&(c._map[m]=y)}}}catch(t){l.e(t)}finally{l.f()}return c.size>0?c:Dict.empty}var v,b=new Map,x=_createForOfIteratorHelper(i);try{for(x.s();!(v=x.n()).done;){var w=v.value;if(w instanceof Dict)for(var _=0,S=Object.entries(w._map);_<S.length;_++){var C=_slicedToArray(S[_],2),T=C[0],P=C[1],I=b.get(T);if(void 0===I){I=[];b.set(T,I)}I.push(P)}}}catch(t){x.e(t)}finally{x.f()}var k,O=_createForOfIteratorHelper(b);try{for(O.s();!(k=O.n()).done;){var E=_slicedToArray(k.value,2),A=E[0],R=E[1];if(1!==R.length&&R[0]instanceof Dict){var D,L=new Dict(r),B=_createForOfIteratorHelper(R);try{for(B.s();!(D=B.n()).done;){var M=D.value;if(M instanceof Dict)for(var U=0,N=Object.entries(M._map);U<N.length;U++){var j=_slicedToArray(N[U],2),H=j[0],z=j[1];void 0===L._map[H]&&(L._map[H]=z)}}}catch(t){B.e(t)}finally{B.f()}L.size>0&&(c._map[A]=L)}else c._map[A]=R[0]}}catch(t){O.e(t)}finally{O.f()}b.clear();return c.size>0?c:Dict.empty};return Dict}();r.Dict=h;var p=function RefClosure(){var t=Object.create(null);function Ref(t,r){this.num=t;this.gen=r}Ref.prototype={toString:function Ref_toString(){return 0===this.gen?"".concat(this.num,"R"):"".concat(this.num,"R").concat(this.gen)}};Ref.get=function(r,i){var o=0===i?"".concat(r,"R"):"".concat(r,"R").concat(i),a=t[o];return a||(t[o]=new Ref(r,i))};Ref._clearCache=function(){t=Object.create(null)};return Ref}();r.Ref=p;var d=function(){function RefSet(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;_classCallCheck(this,RefSet);this._set=new Set(t&&t._set)}_createClass(RefSet,[{key:"has",value:function has(t){return this._set.has(t.toString())}},{key:"put",value:function put(t){this._set.add(t.toString())}},{key:"remove",value:function remove(t){this._set.delete(t.toString())}},{key:"forEach",value:function forEach(t){var r,i=_createForOfIteratorHelper(this._set.values());try{for(i.s();!(r=i.n()).done;){t(r.value)}}catch(t){i.e(t)}finally{i.f()}}},{key:"clear",value:function clear(){this._set.clear()}}]);return RefSet}();r.RefSet=d;var g=function(){function RefSetCache(){_classCallCheck(this,RefSetCache);this._map=new Map}_createClass(RefSetCache,[{key:"get",value:function get(t){return this._map.get(t.toString())}},{key:"has",value:function has(t){return this._map.has(t.toString())}},{key:"put",value:function put(t,r){this._map.set(t.toString(),r)}},{key:"putAlias",value:function putAlias(t,r){this._map.set(t.toString(),this.get(r))}},{key:"forEach",value:function forEach(t){var r,i=_createForOfIteratorHelper(this._map.values());try{for(i.s();!(r=i.n()).done;){t(r.value)}}catch(t){i.e(t)}finally{i.f()}}},{key:"clear",value:function clear(){this._map.clear()}},{key:"size",get:function get(){return this._map.size}}]);return RefSetCache}();r.RefSetCache=g;function isName(t,r){return t instanceof u&&(void 0===r||t.name===r)}},(t,r,i)=>{"use strict";t.exports=i(97)},(t,r,i)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){var r,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function define(t,r,i){Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0});return t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var a=r&&r.prototype instanceof Generator?r:Generator,c=Object.create(a.prototype),u=new Context(o||[]);c._invoke=function makeInvokeMethod(t,r,i){var o=h;return function invoke(a,c){if(o===d)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw c;return doneResult()}i.method=a;i.arg=c;for(;;){var u=i.delegate;if(u){var l=maybeInvokeDelegate(u,i);if(l){if(l===m)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===h){o=g;throw i.arg}i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=d;var y=tryCatch(t,r,i);if("normal"===y.type){o=i.done?g:p;if(y.arg===m)continue;return{value:y.arg,done:i.done}}if("throw"===y.type){o=g;i.method="throw";i.arg=y.arg}}}}(t,i,u);return c}t.wrap=wrap;function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}var h="suspendedStart",p="suspendedYield",d="executing",g="completed",m={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var y={};y[c]=function(){return this};var v=Object.getPrototypeOf,b=v&&v(v(values([])));b&&b!==i&&o.call(b,c)&&(y=b);var x=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(y);GeneratorFunction.prototype=x.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName=define(GeneratorFunctionPrototype,l,"GeneratorFunction");function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))};t.mark=function(t){if(Object.setPrototypeOf)Object.setPrototypeOf(t,GeneratorFunctionPrototype);else{t.__proto__=GeneratorFunctionPrototype;define(t,l,"GeneratorFunction")}t.prototype=Object.create(x);return t};t.awrap=function(t){return{__await:t}};function AsyncIterator(t,r){function invoke(i,a,c,u){var l=tryCatch(t[i],t,a);if("throw"!==l.type){var h=l.arg,p=h.value;return p&&"object"===_typeof(p)&&o.call(p,"__await")?r.resolve(p.__await).then((function(t){invoke("next",t,c,u)}),(function(t){invoke("throw",t,c,u)})):r.resolve(p).then((function(t){h.value=t;c(h)}),(function(t){return invoke("throw",t,c,u)}))}u(l.arg)}var i;this._invoke=function enqueue(t,o){function callInvokeWithMethodAndArg(){return new r((function(r,i){invoke(t,o,r,i)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}defineIteratorMethods(AsyncIterator.prototype);AsyncIterator.prototype[u]=function(){return this};t.AsyncIterator=AsyncIterator;t.async=function(r,i,o,a,c){void 0===c&&(c=Promise);var u=new AsyncIterator(wrap(r,i,o,a),c);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))};function maybeInvokeDelegate(t,i){var o=t.iterator[i.method];if(o===r){i.delegate=null;if("throw"===i.method){if(t.iterator.return){i.method="return";i.arg=r;maybeInvokeDelegate(t,i);if("throw"===i.method)return m}i.method="throw";i.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=tryCatch(o,t.iterator,i.arg);if("throw"===a.type){i.method="throw";i.arg=a.arg;i.delegate=null;return m}var c=a.arg;if(!c){i.method="throw";i.arg=new TypeError("iterator result is not an object");i.delegate=null;return m}if(!c.done)return c;i[t.resultName]=c.value;i.next=t.nextLoc;if("return"!==i.method){i.method="next";i.arg=r}i.delegate=null;return m}defineIteratorMethods(x);define(x,l,"Generator");x[c]=function(){return this};x.toString=function(){return"[object Generator]"};function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]);if(2 in t){r.finallyLoc=t[2];r.afterLoc=t[3]}this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal";delete r.arg;t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}];t.forEach(pushTryEntry,this);this.reset(!0)}t.keys=function(t){var r=[];for(var i in t)r.push(i);r.reverse();return function next(){for(;r.length;){var i=r.pop();if(i in t){next.value=i;next.done=!1;return next}}next.done=!0;return next}};function values(t){if(t){var i=t[c];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,u=function next(){for(;++a<t.length;)if(o.call(t,a)){next.value=t[a];next.done=!1;return next}next.value=r;next.done=!0;return next};return u.next=u}}return{next:doneResult}}t.values=values;function doneResult(){return{value:r,done:!0}}Context.prototype={constructor:Context,reset:function reset(t){this.prev=0;this.next=0;this.sent=this._sent=r;this.done=!1;this.delegate=null;this.method="next";this.arg=r;this.tryEntries.forEach(resetTryEntry);if(!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var i=this;function handle(o,a){u.type="throw";u.arg=t;i.next=o;if(a){i.method="next";i.arg=r}return!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a],u=c.completion;if("root"===c.tryLoc)return handle("end");if(c.tryLoc<=this.prev){var l=o.call(c,"catchLoc"),h=o.call(c,"finallyLoc");if(l&&h){if(this.prev<c.catchLoc)return handle(c.catchLoc,!0);if(this.prev<c.finallyLoc)return handle(c.finallyLoc)}else if(l){if(this.prev<c.catchLoc)return handle(c.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return handle(c.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i];if(a.tryLoc<=this.prev&&o.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var c=a;break}}c&&("break"===t||"continue"===t)&&c.tryLoc<=r&&r<=c.finallyLoc&&(c=null);var u=c?c.completion:{};u.type=t;u.arg=r;if(c){this.method="next";this.next=c.finallyLoc;return m}return this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;if("break"===t.type||"continue"===t.type)this.next=t.arg;else if("return"===t.type){this.rval=this.arg=t.arg;this.method="return";this.next="end"}else"normal"===t.type&&r&&(this.next=r);return m},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t){this.complete(i.completion,i.afterLoc);resetTryEntry(i);return m}}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var a=o.arg;resetTryEntry(i)}return a}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,i,o){this.delegate={iterator:values(t),resultName:i,nextLoc:o};"next"===this.method&&(this.arg=r);return m}};return t}("object"===_typeof(t=i.nmd(t))?t.exports:{});try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.ArithmeticDecoder=void 0;function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}var i=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}],o=function(){function ArithmeticDecoder(t,r,i){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ArithmeticDecoder);this.data=t;this.bp=r;this.dataEnd=i;this.chigh=t[r];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);return t}(ArithmeticDecoder,[{key:"byteIn",value:function byteIn(){var t=this.data,r=this.bp;if(255===t[r])if(t[r+1]>143){this.clow+=65280;this.ct=8}else{r++;this.clow+=t[r]<<9;this.ct=7;this.bp=r}else{r++;this.clow+=r<this.dataEnd?t[r]<<8:65280;this.ct=8;this.bp=r}if(this.clow>65535){this.chigh+=this.clow>>16;this.clow&=65535}}},{key:"readBit",value:function readBit(t,r){var o,a=t[r]>>1,c=1&t[r],u=i[a],l=u.qe,h=this.a-l;if(this.chigh<l)if(h<l){h=l;o=c;a=u.nmps}else{h=l;o=1^c;1===u.switchFlag&&(c=o);a=u.nlps}else{this.chigh-=l;if(0!=(32768&h)){this.a=h;return c}if(h<l){o=1^c;1===u.switchFlag&&(c=o);a=u.nlps}else{o=c;a=u.nmps}}do{0===this.ct&&this.byteIn();h<<=1;this.chigh=this.chigh<<1&65535|this.clow>>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&h));this.a=h;t[r]=a<<1|c;return o}}]);return ArithmeticDecoder}();r.ArithmeticDecoder=o},(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.CCITTFaxDecoder=void 0;var o=i(1),a=function CCITTFaxDecoder(){var t=-1,r=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],i=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],a=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],c=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],u=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],l=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];function CCITTFaxDecoder(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||"function"!=typeof t.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=t;this.eof=!1;this.encoding=r.K||0;this.eoline=r.EndOfLine||!1;this.byteAlign=r.EncodedByteAlign||!1;this.columns=r.Columns||1728;this.rows=r.Rows||0;var i,o=r.EndOfBlock;null==o&&(o=!0);this.eoblock=o;this.black=r.BlackIs1||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;for(;0===(i=this._lookBits(12));)this._eatBits(1);1===i&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}CCITTFaxDecoder.prototype={readNextChar:function readNextChar(){if(this.eof)return-1;var r,i,a,c,u,l=this.refLine,h=this.codingLine,p=this.columns;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;var d,g,m;if(this.nextLine2D){for(c=0;h[c]<p;++c)l[c]=h[c];l[c++]=p;l[c]=p;h[0]=0;this.codingPos=0;r=0;i=0;for(;h[this.codingPos]<p;)switch(d=this._getTwoDimCode()){case 0:this._addPixels(l[r+1],i);l[r+1]<p&&(r+=2);break;case 1:d=g=0;if(i){do{d+=m=this._getBlackCode()}while(m>=64);do{g+=m=this._getWhiteCode()}while(m>=64)}else{do{d+=m=this._getWhiteCode()}while(m>=64);do{g+=m=this._getBlackCode()}while(m>=64)}this._addPixels(h[this.codingPos]+d,i);h[this.codingPos]<p&&this._addPixels(h[this.codingPos]+g,1^i);for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2;break;case 7:this._addPixels(l[r]+3,i);i^=1;if(h[this.codingPos]<p){++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case 5:this._addPixels(l[r]+2,i);i^=1;if(h[this.codingPos]<p){++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case 3:this._addPixels(l[r]+1,i);i^=1;if(h[this.codingPos]<p){++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case 2:this._addPixels(l[r],i);i^=1;if(h[this.codingPos]<p){++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case 8:this._addPixelsNeg(l[r]-3,i);i^=1;if(h[this.codingPos]<p){r>0?--r:++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case 6:this._addPixelsNeg(l[r]-2,i);i^=1;if(h[this.codingPos]<p){r>0?--r:++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case 4:this._addPixelsNeg(l[r]-1,i);i^=1;if(h[this.codingPos]<p){r>0?--r:++r;for(;l[r]<=h[this.codingPos]&&l[r]<p;)r+=2}break;case t:this._addPixels(p,0);this.eof=!0;break;default:(0,o.info)("bad 2d code");this._addPixels(p,0);this.err=!0}}else{h[0]=0;this.codingPos=0;i=0;for(;h[this.codingPos]<p;){d=0;if(i)do{d+=m=this._getBlackCode()}while(m>=64);else do{d+=m=this._getWhiteCode()}while(m>=64);this._addPixels(h[this.codingPos]+d,i);i^=1}}var y=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){d=this._lookBits(12);if(this.eoline)for(;d!==t&&1!==d;){this._eatBits(1);d=this._lookBits(12)}else for(;0===d;){this._eatBits(1);d=this._lookBits(12)}if(1===d){this._eatBits(12);y=!0}else d===t&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&y&&this.byteAlign){if(1===(d=this._lookBits(12))){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(c=0;c<4;++c){1!==(d=this._lookBits(12))&&(0,o.info)("bad rtc code: "+d);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){if((d=this._lookBits(13))===t){this.eof=!0;return-1}if(d>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&d)}}h[0]>0?this.outputBits=h[this.codingPos=0]:this.outputBits=h[this.codingPos=1];this.row++}if(this.outputBits>=8){u=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&h[this.codingPos]<p){this.codingPos++;this.outputBits=h[this.codingPos]-h[this.codingPos-1]}}else{a=8;u=0;do{if(this.outputBits>a){u<<=a;1&this.codingPos||(u|=255>>8-a);this.outputBits-=a;a=0}else{u<<=this.outputBits;1&this.codingPos||(u|=255>>8-this.outputBits);a-=this.outputBits;this.outputBits=0;if(h[this.codingPos]<p){this.codingPos++;this.outputBits=h[this.codingPos]-h[this.codingPos-1]}else if(a>0){u<<=a;a=0}}}while(a)}this.black&&(u^=255);return u},_addPixels:function _addPixels(t,r){var i=this.codingLine,a=this.codingPos;if(t>i[a]){if(t>this.columns){(0,o.info)("row is wrong length");this.err=!0;t=this.columns}1&a^r&&++a;i[a]=t}this.codingPos=a},_addPixelsNeg:function _addPixelsNeg(t,r){var i=this.codingLine,a=this.codingPos;if(t>i[a]){if(t>this.columns){(0,o.info)("row is wrong length");this.err=!0;t=this.columns}1&a^r&&++a;i[a]=t}else if(t<i[a]){if(t<0){(0,o.info)("invalid code");this.err=!0;t=0}for(;a>0&&t<i[a-1];)--a;i[a]=t}this.codingPos=a},_findTableCode:function _findTableCode(r,i,o,a){for(var c=a||0,u=r;u<=i;++u){var l=this._lookBits(u);if(l===t)return[!0,1,!1];u<i&&(l<<=i-u);if(!c||l>=c){var h=o[l-c];if(h[0]===u){this._eatBits(u);return[!0,h[1],!0]}}}return[!1,0,!1]},_getTwoDimCode:function _getTwoDimCode(){var i,a=0;if(this.eoblock){a=this._lookBits(7);if((i=r[a])&&i[0]>0){this._eatBits(i[0]);return i[1]}}else{var c=this._findTableCode(1,7,r);if(c[0]&&c[2])return c[1]}(0,o.info)("Bad two dim code");return t},_getWhiteCode:function _getWhiteCode(){var r,c=0;if(this.eoblock){if((c=this._lookBits(12))===t)return 1;if((r=c>>5==0?i[c]:a[c>>3])[0]>0){this._eatBits(r[0]);return r[1]}}else{var u=this._findTableCode(1,9,a);if(u[0])return u[1];if((u=this._findTableCode(11,12,i))[0])return u[1]}(0,o.info)("bad white code");this._eatBits(1);return 1},_getBlackCode:function _getBlackCode(){var r,i;if(this.eoblock){if((r=this._lookBits(13))===t)return 1;if((i=r>>7==0?c[r]:r>>9==0&&r>>7!=0?u[(r>>1)-64]:l[r>>7])[0]>0){this._eatBits(i[0]);return i[1]}}else{var a=this._findTableCode(2,6,l);if(a[0])return a[1];if((a=this._findTableCode(7,12,u,64))[0])return a[1];if((a=this._findTableCode(10,13,c))[0])return a[1]}(0,o.info)("bad black code");this._eatBits(1);return 1},_lookBits:function _lookBits(r){for(var i;this.inputBits<r;){if(-1===(i=this.source.next()))return 0===this.inputBits?t:this.inputBuf<<r-this.inputBits&65535>>16-r;this.inputBuf=this.inputBuf<<8|i;this.inputBits+=8}return this.inputBuf>>this.inputBits-r&65535>>16-r},_eatBits:function _eatBits(t){(this.inputBits-=t)<0&&(this.inputBits=0)}};return CCITTFaxDecoder}();r.CCITTFaxDecoder=a},(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.JpegImage=void 0;var o=i(1),a=i(94);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var c=function(t){_inherits(JpegError,t);var r=_createSuper(JpegError);function JpegError(t){_classCallCheck(this,JpegError);return r.call(this,"JPEG error: ".concat(t))}return JpegError}(o.BaseException),u=function(t){_inherits(DNLMarkerError,t);var r=_createSuper(DNLMarkerError);function DNLMarkerError(t,i){var o;_classCallCheck(this,DNLMarkerError);(o=r.call(this,t)).scanLines=i;return o}return DNLMarkerError}(o.BaseException),l=function(t){_inherits(EOIMarkerError,t);var r=_createSuper(EOIMarkerError);function EOIMarkerError(){_classCallCheck(this,EOIMarkerError);return r.apply(this,arguments)}return EOIMarkerError}(o.BaseException),h=function JpegImageClosure(){var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,i=799,h=3406,p=2276,d=1567,g=3784,m=5793,y=2896;function JpegImage(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.decodeTransform,i=void 0===r?null:r,o=t.colorTransform,a=void 0===o?-1:o;this._decodeTransform=i;this._colorTransform=a}function buildHuffmanTable(t,r){for(var i,o,a=0,c=[],u=16;u>0&&!t[u-1];)u--;c.push({children:[],index:0});var l,h=c[0];for(i=0;i<u;i++){for(o=0;o<t[i];o++){(h=c.pop()).children[h.index]=r[a];for(;h.index>0;)h=c.pop();h.index++;c.push(h);for(;c.length<=i;){c.push(l={children:[],index:0});h.children[h.index]=l.children;h=l}a++}if(i+1<u){c.push(l={children:[],index:0});h.children[h.index]=l.children;h=l}}return c[0].children}function getBlockBufferOffset(t,r,i){return 64*((t.blocksPerLine+1)*r+i)}function decodeScan(r,i,h,p,d,g,m,y,v){var b=arguments.length>9&&void 0!==arguments[9]&&arguments[9],x=h.mcusPerLine,w=h.progressive,_=i,S=0,C=0;function readBit(){if(C>0){C--;return S>>C&1}if(255===(S=r[i++])){var t=r[i++];if(t){if(220===t&&b){i+=2;var o=(0,a.readUint16)(r,i);i+=2;if(o>0&&o!==h.scanLines)throw new u("Found DNL marker (0xFFDC) while parsing scan data",o)}else if(217===t){if(b){var p=k*(8===h.precision?8:0);if(p>0&&Math.round(h.scanLines/p)>=10)throw new u("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",p)}throw new l("Found EOI marker (0xFFD9) while parsing scan data")}throw new c("unexpected marker ".concat((S<<8|t).toString(16)))}}C=7;return S>>>7}function decodeHuffman(t){for(var r=t;;){switch(_typeof(r=r[readBit()])){case"number":return r;case"object":continue}throw new c("invalid huffman sequence")}}function receive(t){for(var r=0;t>0;){r=r<<1|readBit();t--}return r}function receiveAndExtend(t){if(1===t)return 1===readBit()?1:-1;var r=receive(t);return r>=1<<t-1?r:r+(-1<<t)+1}function decodeBaseline(r,i){var o=decodeHuffman(r.huffmanTableDC),a=0===o?0:receiveAndExtend(o);r.blockData[i]=r.pred+=a;for(var c=1;c<64;){var u=decodeHuffman(r.huffmanTableAC),l=15&u,h=u>>4;if(0!==l){var p=t[c+=h];r.blockData[i+p]=receiveAndExtend(l);c++}else{if(h<15)break;c+=16}}}function decodeDCFirst(t,r){var i=decodeHuffman(t.huffmanTableDC),o=0===i?0:receiveAndExtend(i)<<v;t.blockData[r]=t.pred+=o}function decodeDCSuccessive(t,r){t.blockData[r]|=readBit()<<v}var T=0;function decodeACFirst(r,i){if(T>0)T--;else for(var o=g,a=m;o<=a;){var c=decodeHuffman(r.huffmanTableAC),u=15&c,l=c>>4;if(0!==u){var h=t[o+=l];r.blockData[i+h]=receiveAndExtend(u)*(1<<v);o++}else{if(l<15){T=receive(l)+(1<<l)-1;break}o+=16}}}var P,I=0;function decodeACSuccessive(r,i){for(var o,a,u=g,l=m,h=0;u<=l;){var p=i+t[u],d=r.blockData[p]<0?-1:1;switch(I){case 0:h=(a=decodeHuffman(r.huffmanTableAC))>>4;if(0===(o=15&a))if(h<15){T=receive(h)+(1<<h);I=4}else{h=16;I=1}else{if(1!==o)throw new c("invalid ACn encoding");P=receiveAndExtend(o);I=h?2:3}continue;case 1:case 2:r.blockData[p]?r.blockData[p]+=d*(readBit()<<v):0===--h&&(I=2===I?3:0);break;case 3:if(r.blockData[p])r.blockData[p]+=d*(readBit()<<v);else{r.blockData[p]=P<<v;I=0}break;case 4:r.blockData[p]&&(r.blockData[p]+=d*(readBit()<<v))}u++}4===I&&0===--T&&(I=0)}var k=0;function decodeMcu(t,r,i,o,a){var c=i%x;k=(i/x|0)*t.v+o;var u=c*t.h+a;r(t,getBlockBufferOffset(t,k,u))}function decodeBlock(t,r,i){k=i/t.blocksPerLine|0;var o=i%t.blocksPerLine;r(t,getBlockBufferOffset(t,k,o))}var O,E,A,R,D,L,B=p.length;L=w?0===g?0===y?decodeDCFirst:decodeDCSuccessive:0===y?decodeACFirst:decodeACSuccessive:decodeBaseline;var M,U,N,j,H=0;U=1===B?p[0].blocksPerLine*p[0].blocksPerColumn:x*h.mcusPerColumn;for(;H<=U;){var z=d?Math.min(U-H,d):U;if(z>0){for(E=0;E<B;E++)p[E].pred=0;T=0;if(1===B){O=p[0];for(D=0;D<z;D++){decodeBlock(O,L,H);H++}}else for(D=0;D<z;D++){for(E=0;E<B;E++){N=(O=p[E]).h;j=O.v;for(A=0;A<j;A++)for(R=0;R<N;R++)decodeMcu(O,L,H,A,R)}H++}}C=0;if(!(M=findNextFileMarker(r,i)))break;if(M.invalid){var X=z>0?"unexpected":"excessive";(0,o.warn)("decodeScan - ".concat(X," MCU data, current marker is: ").concat(M.invalid));i=M.offset}if(!(M.marker>=65488&&M.marker<=65495))break;i+=2}return i-_}function quantizeAndInverse(t,o,a){var u,l,v,b,x,w,_,S,C,T,P,I,k,O,E,A,R,D=t.quantizationTable,L=t.blockData;if(!D)throw new c("missing required Quantization Table.");for(var B=0;B<64;B+=8){C=L[o+B];T=L[o+B+1];P=L[o+B+2];I=L[o+B+3];k=L[o+B+4];O=L[o+B+5];E=L[o+B+6];A=L[o+B+7];C*=D[B];if(0!=(T|P|I|k|O|E|A)){T*=D[B+1];P*=D[B+2];I*=D[B+3];k*=D[B+4];O*=D[B+5];E*=D[B+6];A*=D[B+7];l=(u=(u=m*C+128>>8)+(l=m*k+128>>8)+1>>1)-l;R=(v=P)*g+(b=E)*d+128>>8;v=v*d-b*g+128>>8;_=(x=(x=y*(T-A)+128>>8)+(_=O<<4)+1>>1)-_;w=(S=(S=y*(T+A)+128>>8)+(w=I<<4)+1>>1)-w;b=(u=u+(b=R)+1>>1)-b;v=(l=l+v+1>>1)-v;R=x*p+S*h+2048>>12;x=x*h-S*p+2048>>12;S=R;R=w*i+_*r+2048>>12;w=w*r-_*i+2048>>12;_=R;a[B]=u+S;a[B+7]=u-S;a[B+1]=l+_;a[B+6]=l-_;a[B+2]=v+w;a[B+5]=v-w;a[B+3]=b+x;a[B+4]=b-x}else{R=m*C+512>>10;a[B]=R;a[B+1]=R;a[B+2]=R;a[B+3]=R;a[B+4]=R;a[B+5]=R;a[B+6]=R;a[B+7]=R}}for(var M=0;M<8;++M){C=a[M];if(0!=((T=a[M+8])|(P=a[M+16])|(I=a[M+24])|(k=a[M+32])|(O=a[M+40])|(E=a[M+48])|(A=a[M+56]))){l=(u=4112+((u=m*C+2048>>12)+(l=m*k+2048>>12)+1>>1))-l;R=(v=P)*g+(b=E)*d+2048>>12;v=v*d-b*g+2048>>12;b=R;_=(x=(x=y*(T-A)+2048>>12)+(_=O)+1>>1)-_;w=(S=(S=y*(T+A)+2048>>12)+(w=I)+1>>1)-w;R=x*p+S*h+2048>>12;x=x*h-S*p+2048>>12;S=R;R=w*i+_*r+2048>>12;w=w*r-_*i+2048>>12;(C=(u=u+b+1>>1)+S)<16?C=0:C>=4080?C=255:C>>=4;(T=(l=l+v+1>>1)+(_=R))<16?T=0:T>=4080?T=255:T>>=4;(P=(v=l-v)+w)<16?P=0:P>=4080?P=255:P>>=4;(I=(b=u-b)+x)<16?I=0:I>=4080?I=255:I>>=4;(k=b-x)<16?k=0:k>=4080?k=255:k>>=4;(O=v-w)<16?O=0:O>=4080?O=255:O>>=4;(E=l-_)<16?E=0:E>=4080?E=255:E>>=4;(A=u-S)<16?A=0:A>=4080?A=255:A>>=4;L[o+M]=C;L[o+M+8]=T;L[o+M+16]=P;L[o+M+24]=I;L[o+M+32]=k;L[o+M+40]=O;L[o+M+48]=E;L[o+M+56]=A}else{R=(R=m*C+8192>>14)<-2040?0:R>=2024?255:R+2056>>4;L[o+M]=R;L[o+M+8]=R;L[o+M+16]=R;L[o+M+24]=R;L[o+M+32]=R;L[o+M+40]=R;L[o+M+48]=R;L[o+M+56]=R}}}function buildComponentData(t,r){for(var i=r.blocksPerLine,o=r.blocksPerColumn,a=new Int16Array(64),c=0;c<o;c++)for(var u=0;u<i;u++){quantizeAndInverse(r,getBlockBufferOffset(r,c,u),a)}return r.blockData}function findNextFileMarker(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,o=t.length-1,c=i<r?i:r;if(r>=o)return null;var u=(0,a.readUint16)(t,r);if(u>=65472&&u<=65534)return{invalid:null,marker:u,offset:r};for(var l=(0,a.readUint16)(t,c);!(l>=65472&&l<=65534);){if(++c>=o)return null;l=(0,a.readUint16)(t,c)}return{invalid:u.toString(16),marker:l,offset:c}}JpegImage.prototype={parse:function parse(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=i.dnlScanLines,p=void 0===h?null:h;function readDataBlock(){var t=(0,a.readUint16)(r,m),i=(m+=2)+t-2,c=findNextFileMarker(r,i,m);if(c&&c.invalid){(0,o.warn)("readDataBlock - incorrect length, current marker is: "+c.invalid);i=c.offset}var u=r.subarray(m,i);m+=u.length;return u}function prepareComponents(t){for(var r=Math.ceil(t.samplesPerLine/8/t.maxH),i=Math.ceil(t.scanLines/8/t.maxV),o=0;o<t.components.length;o++){q=t.components[o];var a=Math.ceil(Math.ceil(t.samplesPerLine/8)*q.h/t.maxH),c=Math.ceil(Math.ceil(t.scanLines/8)*q.v/t.maxV),u=r*q.h,l=64*(i*q.v)*(u+1);q.blockData=new Int16Array(l);q.blocksPerLine=a;q.blocksPerColumn=c}t.mcusPerLine=r;t.mcusPerColumn=i}var d,g,m=0,y=null,v=null,b=0,x=[],w=[],_=[],S=(0,a.readUint16)(r,m);m+=2;if(65496!==S)throw new c("SOI not found");S=(0,a.readUint16)(r,m);m+=2;e:for(;65497!==S;){var C,T,P;switch(S){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var I=readDataBlock();65504===S&&74===I[0]&&70===I[1]&&73===I[2]&&70===I[3]&&0===I[4]&&(y={version:{major:I[5],minor:I[6]},densityUnits:I[7],xDensity:I[8]<<8|I[9],yDensity:I[10]<<8|I[11],thumbWidth:I[12],thumbHeight:I[13],thumbData:I.subarray(14,14+3*I[12]*I[13])});65518===S&&65===I[0]&&100===I[1]&&111===I[2]&&98===I[3]&&101===I[4]&&(v={version:I[5]<<8|I[6],flags0:I[7]<<8|I[8],flags1:I[9]<<8|I[10],transformCode:I[11]});break;case 65499:for(var k=(0,a.readUint16)(r,m),O=k+(m+=2)-2;m<O;){var E=r[m++],A=new Uint16Array(64);if(E>>4==0)for(T=0;T<64;T++)A[t[T]]=r[m++];else{if(E>>4!=1)throw new c("DQT - invalid table spec");for(T=0;T<64;T++){A[t[T]]=(0,a.readUint16)(r,m);m+=2}}x[15&E]=A}break;case 65472:case 65473:case 65474:if(d)throw new c("Only single frame JPEGs supported");m+=2;(d={}).extended=65473===S;d.progressive=65474===S;d.precision=r[m++];var R=(0,a.readUint16)(r,m);m+=2;d.scanLines=p||R;d.samplesPerLine=(0,a.readUint16)(r,m);m+=2;d.components=[];d.componentIds={};var D,L=r[m++],B=0,M=0;for(C=0;C<L;C++){D=r[m];var U=r[m+1]>>4,N=15&r[m+1];B<U&&(B=U);M<N&&(M=N);var j=r[m+2];P=d.components.push({h:U,v:N,quantizationId:j,quantizationTable:null});d.componentIds[D]=P-1;m+=3}d.maxH=B;d.maxV=M;prepareComponents(d);break;case 65476:var H=(0,a.readUint16)(r,m);m+=2;for(C=2;C<H;){var z=r[m++],X=new Uint8Array(16),G=0;for(T=0;T<16;T++,m++)G+=X[T]=r[m];var Y=new Uint8Array(G);for(T=0;T<G;T++,m++)Y[T]=r[m];C+=17+G;(z>>4==0?_:w)[15&z]=buildHuffmanTable(X,Y)}break;case 65501:m+=2;g=(0,a.readUint16)(r,m);m+=2;break;case 65498:var J=1==++b&&!p;m+=2;var q,V=r[m++],W=[];for(C=0;C<V;C++){var K=r[m++],Q=d.componentIds[K];(q=d.components[Q]).index=K;var Z=r[m++];q.huffmanTableDC=_[Z>>4];q.huffmanTableAC=w[15&Z];W.push(q)}var $=r[m++],ee=r[m++],te=r[m++];try{var re=decodeScan(r,m,d,W,g,$,ee,te>>4,15&te,J);m+=re}catch(t){if(t instanceof u){(0,o.warn)("".concat(t.message," -- attempting to re-parse the JPEG image."));return this.parse(r,{dnlScanLines:t.scanLines})}if(t instanceof l){(0,o.warn)("".concat(t.message," -- ignoring the rest of the image data."));break e}throw t}break;case 65500:m+=4;break;case 65535:255!==r[m]&&m--;break;default:var ne=findNextFileMarker(r,m-2,m-3);if(ne&&ne.invalid){(0,o.warn)("JpegImage.parse - unexpected data, current marker is: "+ne.invalid);m=ne.offset;break}if(!ne||m>=r.length-1){(0,o.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new c("JpegImage.parse - unknown marker: "+S.toString(16))}S=(0,a.readUint16)(r,m);m+=2}this.width=d.samplesPerLine;this.height=d.scanLines;this.jfif=y;this.adobe=v;this.components=[];for(C=0;C<d.components.length;C++){var ie=x[(q=d.components[C]).quantizationId];ie&&(q.quantizationTable=ie);this.components.push({index:q.index,output:buildComponentData(0,q),scaleX:q.h/d.maxH,scaleY:q.v/d.maxV,blocksPerLine:q.blocksPerLine,blocksPerColumn:q.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function _getLinearizedBlockData(t,r){var i,o,a,c,u,l,h,p,d,g,m,y,v=arguments.length>2&&void 0!==arguments[2]&&arguments[2],b=this.width/t,x=this.height/r,w=0,_=this.components.length,S=t*r*_,C=new Uint8ClampedArray(S),T=new Uint32Array(t),P=4294967288;for(h=0;h<_;h++){o=(i=this.components[h]).scaleX*b;a=i.scaleY*x;w=h;m=i.output;c=i.blocksPerLine+1<<3;if(o!==y){for(u=0;u<t;u++){p=0|u*o;T[u]=(p&P)<<3|7&p}y=o}for(l=0;l<r;l++){g=c*((p=0|l*a)&P)|(7&p)<<3;for(u=0;u<t;u++){C[w]=m[g+T[u]];w+=_}}}var I=this._decodeTransform;v||4!==_||I||(I=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(I)for(h=0;h<S;)for(p=0,d=0;p<_;p++,h++,d+=2)C[h]=(C[h]*I[d]>>8)+I[d+1];return C},get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform},_convertYccToRgb:function convertYccToRgb(t){for(var r,i,o,a=0,c=t.length;a<c;a+=3){r=t[a];i=t[a+1];o=t[a+2];t[a]=r-179.456+1.402*o;t[a+1]=r+135.459-.344*i-.714*o;t[a+2]=r-226.816+1.772*i}return t},_convertYcckToRgb:function convertYcckToRgb(t){for(var r,i,o,a,c=0,u=0,l=t.length;u<l;u+=4){r=t[u];i=t[u+1];o=t[u+2];a=t[u+3];t[c++]=i*(-660635669420364e-19*i+.000437130475926232*o-54080610064599e-18*r+.00048449797120281*a-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*r-.00477271405408747*a+1.53380253221734)+r*(.000961250184130688*r-.00266257332283933*a+.48357088451265)+a*(-.000336197177618394*a+.484791561490776);t[c++]=107.268039397724+i*(219927104525741e-19*i-.000640992018297945*o+.000659397001245577*r+.000426105652938837*a-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*r+.000770482631801132*a-.151051492775562)+r*(.00126935368114843*r-.00265090189010898*a+.25802910206845)+a*(-.000318913117588328*a-.213742400323665);t[c++]=i*(-.000570115196973677*i-263409051004589e-19*o+.0020741088115012*r-.00288260236853442*a+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*r+.000560833691242812*a-.195152027534049)+r*(.00174418132927582*r-.00255243321439347*a+.116935020465145)+a*(-.000343531996510555*a+.24165260232407)}return t.subarray(0,c)},_convertYcckToCmyk:function convertYcckToCmyk(t){for(var r,i,o,a=0,c=t.length;a<c;a+=4){r=t[a];i=t[a+1];o=t[a+2];t[a]=434.456-r-1.402*o;t[a+1]=119.541-r+.344*i+.714*o;t[a+2]=481.816-r-1.772*i}return t},_convertCmykToRgb:function convertCmykToRgb(t){for(var r,i,o,a,c=0,u=0,l=t.length;u<l;u+=4){r=t[u];i=t[u+1];o=t[u+2];a=t[u+3];t[c++]=255+r*(-6747147073602441e-20*r+.0008379262121013727*i+.0002894718188643294*o+.003264231057537806*a-1.1185611867203937)+i*(26374107616089405e-21*i-8626949158638572e-20*o-.0002748769067499491*a-.02155688794978967)+o*(-3878099212869363e-20*o-.0003267808279485286*a+.0686742238595345)-a*(.0003361971776183937*a+.7430659151342254);t[c++]=255+r*(.00013596372813588848*r+.000924537132573585*i+.00010567359618683593*o+.0004791864687436512*a-.3109689587515875)+i*(-.00023545346108370344*i+.0002702845253534714*o+.0020200308977307156*a-.7488052167015494)+o*(6834815998235662e-20*o+.00015168452363460973*a-.09751927774728933)-a*(.0003189131175883281*a+.7364883807733168);t[c++]=255+r*(13598650411385307e-21*r+.00012423956175490851*i+.0004751985097583589*o-36729317476630422e-22*a-.05562186980264034)+i*(.00016141380598724676*i+.0009692239130725186*o+.0007782692450036253*a-.44015232367526463)+o*(5.068882914068769e-7*o+.0017778369011375071*a-.7591454649749609)-a*(.0003435319965105553*a+.7063770186160144)}return t.subarray(0,c)},getData:function getData(t){var r=t.width,i=t.height,o=t.forceRGB,a=void 0!==o&&o,u=t.isSourcePDF,l=void 0!==u&&u;if(this.numComponents>4)throw new c("Unsupported color mode");var h=this._getLinearizedBlockData(r,i,l);if(1===this.numComponents&&a){for(var p=h.length,d=new Uint8ClampedArray(3*p),g=0,m=0;m<p;m++){var y=h[m];d[g++]=y;d[g++]=y;d[g++]=y}return d}if(3===this.numComponents&&this._isColorConversionNeeded)return this._convertYccToRgb(h);if(4===this.numComponents){if(this._isColorConversionNeeded)return a?this._convertYcckToRgb(h):this._convertYcckToCmyk(h);if(a)return this._convertCmykToRgb(h)}return h}};return JpegImage}();r.JpegImage=h},(t,r,i)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0});r.JpxImage=void 0;var o=i(1),a=i(94),c=i(98);function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var u=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}(JpxError,t);var r=_createSuper(JpxError);function JpxError(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,JpxError);return r.call(this,"JPX error: ".concat(t))}return JpxError}(o.BaseException),l=function JpxImageClosure(){var t={LL:0,LH:1,HL:1,HH:2};function JpxImage(){this.failOnCorruptedImage=!1}JpxImage.prototype={parse:function JpxImage_parse(t){if(65359!==(0,a.readUint16)(t,0))for(var r=0,i=t.length;r<i;){var c=8,l=(0,a.readUint32)(t,r),h=(0,a.readUint32)(t,r+4);r+=c;if(1===l){l=4294967296*(0,a.readUint32)(t,r)+(0,a.readUint32)(t,r+4);r+=8;c+=8}0===l&&(l=i-r+c);if(l<c)throw new u("Invalid box field size");var p=l-c,d=!0;switch(h){case 1785737832:d=!1;break;case 1668246642:var g=t[r];if(1===g){var m=(0,a.readUint32)(t,r+3);switch(m){case 16:case 17:case 18:break;default:(0,o.warn)("Unknown colorspace "+m)}}else 2===g&&(0,o.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(t,r,r+p);break;case 1783636e3:218793738!==(0,a.readUint32)(t,r)&&(0,o.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var y=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,255&h);(0,o.warn)("Unsupported header type "+h+" ("+y+")")}d&&(r+=p)}else this.parseCodestream(t,0,t.length)},parseImageProperties:function JpxImage_parseImageProperties(t){for(var r=t.getByte();r>=0;){if(65361===(r<<8|(r=t.getByte()))){t.skip(4);var i=t.getInt32()>>>0,o=t.getInt32()>>>0,a=t.getInt32()>>>0,c=t.getInt32()>>>0;t.skip(16);var l=t.getUint16();this.width=i-a;this.height=o-c;this.componentsCount=l;this.bitsPerComponent=8;return}}throw new u("No size marker found in JPX stream")},parseCodestream:function JpxImage_parseCodestream(t,r,i){var c={},l=!1;try{for(var h=r;h+1<i;){var p=(0,a.readUint16)(t,h);h+=2;var d,g,m,y,v,b,x=0;switch(p){case 65359:c.mainHeader=!0;break;case 65497:break;case 65361:x=(0,a.readUint16)(t,h);var w={};w.Xsiz=(0,a.readUint32)(t,h+4);w.Ysiz=(0,a.readUint32)(t,h+8);w.XOsiz=(0,a.readUint32)(t,h+12);w.YOsiz=(0,a.readUint32)(t,h+16);w.XTsiz=(0,a.readUint32)(t,h+20);w.YTsiz=(0,a.readUint32)(t,h+24);w.XTOsiz=(0,a.readUint32)(t,h+28);w.YTOsiz=(0,a.readUint32)(t,h+32);var _=(0,a.readUint16)(t,h+36);w.Csiz=_;var S=[];d=h+38;for(var C=0;C<_;C++){var T={precision:1+(127&t[d]),isSigned:!!(128&t[d]),XRsiz:t[d+1],YRsiz:t[d+2]};d+=3;calculateComponentDimensions(T,w);S.push(T)}c.SIZ=w;c.components=S;calculateTileGrids(c,S);c.QCC=[];c.COC=[];break;case 65372:x=(0,a.readUint16)(t,h);var P={};d=h+2;switch(31&(g=t[d++])){case 0:y=8;v=!0;break;case 1:y=16;v=!1;break;case 2:y=16;v=!0;break;default:throw new Error("Invalid SQcd value "+g)}P.noQuantization=8===y;P.scalarExpounded=v;P.guardBits=g>>5;m=[];for(;d<x+h;){var I={};if(8===y){I.epsilon=t[d++]>>3;I.mu=0}else{I.epsilon=t[d]>>3;I.mu=(7&t[d])<<8|t[d+1];d+=2}m.push(I)}P.SPqcds=m;if(c.mainHeader)c.QCD=P;else{c.currentTile.QCD=P;c.currentTile.QCC=[]}break;case 65373:x=(0,a.readUint16)(t,h);var k,O={};d=h+2;if(c.SIZ.Csiz<257)k=t[d++];else{k=(0,a.readUint16)(t,d);d+=2}switch(31&(g=t[d++])){case 0:y=8;v=!0;break;case 1:y=16;v=!1;break;case 2:y=16;v=!0;break;default:throw new Error("Invalid SQcd value "+g)}O.noQuantization=8===y;O.scalarExpounded=v;O.guardBits=g>>5;m=[];for(;d<x+h;){I={};if(8===y){I.epsilon=t[d++]>>3;I.mu=0}else{I.epsilon=t[d]>>3;I.mu=(7&t[d])<<8|t[d+1];d+=2}m.push(I)}O.SPqcds=m;c.mainHeader?c.QCC[k]=O:c.currentTile.QCC[k]=O;break;case 65362:x=(0,a.readUint16)(t,h);var E={};d=h+2;var A=t[d++];E.entropyCoderWithCustomPrecincts=!!(1&A);E.sopMarkerUsed=!!(2&A);E.ephMarkerUsed=!!(4&A);E.progressionOrder=t[d++];E.layersCount=(0,a.readUint16)(t,d);d+=2;E.multipleComponentTransform=t[d++];E.decompositionLevelsCount=t[d++];E.xcb=2+(15&t[d++]);E.ycb=2+(15&t[d++]);var R=t[d++];E.selectiveArithmeticCodingBypass=!!(1&R);E.resetContextProbabilities=!!(2&R);E.terminationOnEachCodingPass=!!(4&R);E.verticallyStripe=!!(8&R);E.predictableTermination=!!(16&R);E.segmentationSymbolUsed=!!(32&R);E.reversibleTransformation=t[d++];if(E.entropyCoderWithCustomPrecincts){for(var D=[];d<x+h;){var L=t[d++];D.push({PPx:15&L,PPy:L>>4})}E.precinctsSizes=D}var B=[];E.selectiveArithmeticCodingBypass&&B.push("selectiveArithmeticCodingBypass");E.resetContextProbabilities&&B.push("resetContextProbabilities");E.terminationOnEachCodingPass&&B.push("terminationOnEachCodingPass");E.verticallyStripe&&B.push("verticallyStripe");E.predictableTermination&&B.push("predictableTermination");if(B.length>0){l=!0;(0,o.warn)("JPX: Unsupported COD options (".concat(B.join(", "),")."))}if(c.mainHeader)c.COD=E;else{c.currentTile.COD=E;c.currentTile.COC=[]}break;case 65424:x=(0,a.readUint16)(t,h);(b={}).index=(0,a.readUint16)(t,h+2);b.length=(0,a.readUint32)(t,h+4);b.dataEnd=b.length+h-2;b.partIndex=t[h+8];b.partsCount=t[h+9];c.mainHeader=!1;if(0===b.partIndex){b.COD=c.COD;b.COC=c.COC.slice(0);b.QCD=c.QCD;b.QCC=c.QCC.slice(0)}c.currentTile=b;break;case 65427:if(0===(b=c.currentTile).partIndex){initializeTile(c,b.index);buildPackets(c)}parseTilePackets(c,t,h,x=b.dataEnd-h);break;case 65363:(0,o.warn)("JPX: Codestream code 0xFF53 (COC) is not implemented.");case 65365:case 65367:case 65368:case 65380:x=(0,a.readUint16)(t,h);break;default:throw new Error("Unknown codestream code: "+p.toString(16))}h+=x}}catch(t){if(l||this.failOnCorruptedImage)throw new u(t.message);(0,o.warn)('JPX: Trying to recover from: "'.concat(t.message,'".'))}this.tiles=function transformComponents(t){for(var r=t.SIZ,i=t.components,o=r.Csiz,a=[],c=0,u=t.tiles.length;c<u;c++){var l,h=t.tiles[c],p=[];for(l=0;l<o;l++)p[l]=transformTile(t,h,l);var d,g,m,y,v,b,x,w=p[0],_=new Uint8ClampedArray(w.items.length*o),S={left:w.left,top:w.top,width:w.width,height:w.height,items:_},C=0;if(h.codingStyleDefaultParameters.multipleComponentTransform){var T=4===o,P=p[0].items,I=p[1].items,k=p[2].items,O=T?p[3].items:null;g=.5+(128<<(d=i[0].precision-8));var E=h.components[0],A=o-3;y=P.length;if(E.codingStyleParameters.reversibleTransformation)for(m=0;m<y;m++,C+=A){v=P[m]+g;b=I[m];var R=v-((x=k[m])+b>>2);_[C++]=R+x>>d;_[C++]=R>>d;_[C++]=R+b>>d}else for(m=0;m<y;m++,C+=A){v=P[m]+g;b=I[m];x=k[m];_[C++]=v+1.402*x>>d;_[C++]=v-.34413*b-.71414*x>>d;_[C++]=v+1.772*b>>d}if(T)for(m=0,C=3;m<y;m++,C+=4)_[C]=O[m]+g>>d}else for(l=0;l<o;l++){var D=p[l].items;g=.5+(128<<(d=i[l].precision-8));for(C=l,m=0,y=D.length;m<y;m++){_[C]=D[m]+g>>d;C+=o}}a.push(S)}return a}(c);this.width=c.SIZ.Xsiz-c.SIZ.XOsiz;this.height=c.SIZ.Ysiz-c.SIZ.YOsiz;this.componentsCount=c.SIZ.Csiz}};function calculateComponentDimensions(t,r){t.x0=Math.ceil(r.XOsiz/t.XRsiz);t.x1=Math.ceil(r.Xsiz/t.XRsiz);t.y0=Math.ceil(r.YOsiz/t.YRsiz);t.y1=Math.ceil(r.Ysiz/t.YRsiz);t.width=t.x1-t.x0;t.height=t.y1-t.y0}function calculateTileGrids(t,r){for(var i,o=t.SIZ,a=[],c=Math.ceil((o.Xsiz-o.XTOsiz)/o.XTsiz),u=Math.ceil((o.Ysiz-o.YTOsiz)/o.YTsiz),l=0;l<u;l++)for(var h=0;h<c;h++){(i={}).tx0=Math.max(o.XTOsiz+h*o.XTsiz,o.XOsiz);i.ty0=Math.max(o.YTOsiz+l*o.YTsiz,o.YOsiz);i.tx1=Math.min(o.XTOsiz+(h+1)*o.XTsiz,o.Xsiz);i.ty1=Math.min(o.YTOsiz+(l+1)*o.YTsiz,o.Ysiz);i.width=i.tx1-i.tx0;i.height=i.ty1-i.ty0;i.components=[];a.push(i)}t.tiles=a;for(var p=0,d=o.Csiz;p<d;p++)for(var g=r[p],m=0,y=a.length;m<y;m++){var v={};i=a[m];v.tcx0=Math.ceil(i.tx0/g.XRsiz);v.tcy0=Math.ceil(i.ty0/g.YRsiz);v.tcx1=Math.ceil(i.tx1/g.XRsiz);v.tcy1=Math.ceil(i.ty1/g.YRsiz);v.width=v.tcx1-v.tcx0;v.height=v.tcy1-v.tcy0;i.components[p]=v}}function getBlocksDimensions(t,r,i){var o=r.codingStyleParameters,a={};if(o.entropyCoderWithCustomPrecincts){a.PPx=o.precinctsSizes[i].PPx;a.PPy=o.precinctsSizes[i].PPy}else{a.PPx=15;a.PPy=15}a.xcb_=i>0?Math.min(o.xcb,a.PPx-1):Math.min(o.xcb,a.PPx);a.ycb_=i>0?Math.min(o.ycb,a.PPy-1):Math.min(o.ycb,a.PPy);return a}function buildPrecincts(t,r,i){var o=1<<i.PPx,a=1<<i.PPy,c=0===r.resLevel,u=1<<i.PPx+(c?0:-1),l=1<<i.PPy+(c?0:-1),h=r.trx1>r.trx0?Math.ceil(r.trx1/o)-Math.floor(r.trx0/o):0,p=r.try1>r.try0?Math.ceil(r.try1/a)-Math.floor(r.try0/a):0,d=h*p;r.precinctParameters={precinctWidth:o,precinctHeight:a,numprecinctswide:h,numprecinctshigh:p,numprecincts:d,precinctWidthInSubband:u,precinctHeightInSubband:l}}function buildCodeblocks(t,r,i){var o,a,c,u,l=i.xcb_,h=i.ycb_,p=1<<l,d=1<<h,g=r.tbx0>>l,m=r.tby0>>h,y=r.tbx1+p-1>>l,v=r.tby1+d-1>>h,b=r.resolution.precinctParameters,x=[],w=[];for(a=m;a<v;a++)for(o=g;o<y;o++){(c={cbx:o,cby:a,tbx0:p*o,tby0:d*a,tbx1:p*(o+1),tby1:d*(a+1)}).tbx0_=Math.max(r.tbx0,c.tbx0);c.tby0_=Math.max(r.tby0,c.tby0);c.tbx1_=Math.min(r.tbx1,c.tbx1);c.tby1_=Math.min(r.tby1,c.tby1);u=Math.floor((c.tbx0_-r.tbx0)/b.precinctWidthInSubband)+Math.floor((c.tby0_-r.tby0)/b.precinctHeightInSubband)*b.numprecinctswide;c.precinctNumber=u;c.subbandType=r.type;c.Lblock=3;if(!(c.tbx1_<=c.tbx0_||c.tby1_<=c.tby0_)){x.push(c);var _=w[u];if(void 0!==_){o<_.cbxMin?_.cbxMin=o:o>_.cbxMax&&(_.cbxMax=o);a<_.cbyMin?_.cbxMin=a:a>_.cbyMax&&(_.cbyMax=a)}else w[u]=_={cbxMin:o,cbyMin:a,cbxMax:o,cbyMax:a};c.precinct=_}}r.codeblockParameters={codeblockWidth:l,codeblockHeight:h,numcodeblockwide:y-g+1,numcodeblockhigh:v-m+1};r.codeblocks=x;r.precincts=w}function createPacket(t,r,i){for(var o=[],a=t.subbands,c=0,u=a.length;c<u;c++)for(var l=a[c].codeblocks,h=0,p=l.length;h<p;h++){var d=l[h];d.precinctNumber===r&&o.push(d)}return{layerNumber:i,codeblocks:o}}function LayerResolutionComponentPositionIterator(t){for(var r=t.SIZ,i=t.currentTile.index,o=t.tiles[i],a=o.codingStyleDefaultParameters.layersCount,c=r.Csiz,l=0,h=0;h<c;h++)l=Math.max(l,o.components[h].codingStyleParameters.decompositionLevelsCount);var p=0,d=0,g=0,m=0;this.nextPacket=function JpxImage_nextPacket(){for(;p<a;p++){for(;d<=l;d++){for(;g<c;g++){var t=o.components[g];if(!(d>t.codingStyleParameters.decompositionLevelsCount)){for(var r=t.resolutions[d],i=r.precinctParameters.numprecincts;m<i;){var h=createPacket(r,m,p);m++;return h}m=0}}g=0}d=0}throw new u("Out of packets")}}function ResolutionLayerComponentPositionIterator(t){for(var r=t.SIZ,i=t.currentTile.index,o=t.tiles[i],a=o.codingStyleDefaultParameters.layersCount,c=r.Csiz,l=0,h=0;h<c;h++)l=Math.max(l,o.components[h].codingStyleParameters.decompositionLevelsCount);var p=0,d=0,g=0,m=0;this.nextPacket=function JpxImage_nextPacket(){for(;p<=l;p++){for(;d<a;d++){for(;g<c;g++){var t=o.components[g];if(!(p>t.codingStyleParameters.decompositionLevelsCount)){for(var r=t.resolutions[p],i=r.precinctParameters.numprecincts;m<i;){var h=createPacket(r,m,d);m++;return h}m=0}}g=0}d=0}throw new u("Out of packets")}}function ResolutionPositionComponentLayerIterator(t){var r,i,o,a,c=t.SIZ,l=t.currentTile.index,h=t.tiles[l],p=h.codingStyleDefaultParameters.layersCount,d=c.Csiz,g=0;for(o=0;o<d;o++){var m=h.components[o];g=Math.max(g,m.codingStyleParameters.decompositionLevelsCount)}var y=new Int32Array(g+1);for(i=0;i<=g;++i){var v=0;for(o=0;o<d;++o){var b=h.components[o].resolutions;i<b.length&&(v=Math.max(v,b[i].precinctParameters.numprecincts))}y[i]=v}r=0;i=0;o=0;a=0;this.nextPacket=function JpxImage_nextPacket(){for(;i<=g;i++){for(;a<y[i];a++){for(;o<d;o++){var t=h.components[o];if(!(i>t.codingStyleParameters.decompositionLevelsCount)){var c=t.resolutions[i],l=c.precinctParameters.numprecincts;if(!(a>=l)){for(;r<p;){var m=createPacket(c,a,r);r++;return m}r=0}}}o=0}a=0}throw new u("Out of packets")}}function PositionComponentResolutionLayerIterator(t){var r=t.SIZ,i=t.currentTile.index,o=t.tiles[i],a=o.codingStyleDefaultParameters.layersCount,c=r.Csiz,l=getPrecinctSizesInImageScale(o),h=l,p=0,d=0,g=0,m=0,y=0;this.nextPacket=function JpxImage_nextPacket(){for(;y<h.maxNumHigh;y++){for(;m<h.maxNumWide;m++){for(;g<c;g++){for(var t=o.components[g],r=t.codingStyleParameters.decompositionLevelsCount;d<=r;d++){var i=t.resolutions[d],v=l.components[g].resolutions[d],b=getPrecinctIndexIfExist(m,y,v,h,i);if(null!==b){for(;p<a;){var x=createPacket(i,b,p);p++;return x}p=0}}d=0}g=0}m=0}throw new u("Out of packets")}}function ComponentPositionResolutionLayerIterator(t){var r=t.SIZ,i=t.currentTile.index,o=t.tiles[i],a=o.codingStyleDefaultParameters.layersCount,c=r.Csiz,l=getPrecinctSizesInImageScale(o),h=0,p=0,d=0,g=0,m=0;this.nextPacket=function JpxImage_nextPacket(){for(;d<c;++d){for(var t=o.components[d],r=l.components[d],i=t.codingStyleParameters.decompositionLevelsCount;m<r.maxNumHigh;m++){for(;g<r.maxNumWide;g++){for(;p<=i;p++){var y=t.resolutions[p],v=r.resolutions[p],b=getPrecinctIndexIfExist(g,m,v,r,y);if(null!==b){for(;h<a;){var x=createPacket(y,b,h);h++;return x}h=0}}p=0}g=0}m=0}throw new u("Out of packets")}}function getPrecinctIndexIfExist(t,r,i,o,a){var c=t*o.minWidth,u=r*o.minHeight;if(c%i.width!=0||u%i.height!=0)return null;var l=u/i.width*a.precinctParameters.numprecinctswide;return c/i.height+l}function getPrecinctSizesInImageScale(t){for(var r=t.components.length,i=Number.MAX_VALUE,o=Number.MAX_VALUE,a=0,c=0,u=new Array(r),l=0;l<r;l++){for(var h=t.components[l],p=h.codingStyleParameters.decompositionLevelsCount,d=new Array(p+1),g=Number.MAX_VALUE,m=Number.MAX_VALUE,y=0,v=0,b=1,x=p;x>=0;--x){var w=h.resolutions[x],_=b*w.precinctParameters.precinctWidth,S=b*w.precinctParameters.precinctHeight;g=Math.min(g,_);m=Math.min(m,S);y=Math.max(y,w.precinctParameters.numprecinctswide);v=Math.max(v,w.precinctParameters.numprecinctshigh);d[x]={width:_,height:S};b<<=1}i=Math.min(i,g);o=Math.min(o,m);a=Math.max(a,y);c=Math.max(c,v);u[l]={resolutions:d,minWidth:g,minHeight:m,maxNumWide:y,maxNumHigh:v}}return{components:u,minWidth:i,minHeight:o,maxNumWide:a,maxNumHigh:c}}function buildPackets(t){for(var r=t.SIZ,i=t.currentTile.index,o=t.tiles[i],a=r.Csiz,c=0;c<a;c++){for(var l=o.components[c],h=l.codingStyleParameters.decompositionLevelsCount,p=[],d=[],g=0;g<=h;g++){var m,y=getBlocksDimensions(0,l,g),v={},b=1<<h-g;v.trx0=Math.ceil(l.tcx0/b);v.try0=Math.ceil(l.tcy0/b);v.trx1=Math.ceil(l.tcx1/b);v.try1=Math.ceil(l.tcy1/b);v.resLevel=g;buildPrecincts(0,v,y);p.push(v);if(0===g){(m={}).type="LL";m.tbx0=Math.ceil(l.tcx0/b);m.tby0=Math.ceil(l.tcy0/b);m.tbx1=Math.ceil(l.tcx1/b);m.tby1=Math.ceil(l.tcy1/b);m.resolution=v;buildCodeblocks(0,m,y);d.push(m);v.subbands=[m]}else{var x=1<<h-g+1,w=[];(m={}).type="HL";m.tbx0=Math.ceil(l.tcx0/x-.5);m.tby0=Math.ceil(l.tcy0/x);m.tbx1=Math.ceil(l.tcx1/x-.5);m.tby1=Math.ceil(l.tcy1/x);m.resolution=v;buildCodeblocks(0,m,y);d.push(m);w.push(m);(m={}).type="LH";m.tbx0=Math.ceil(l.tcx0/x);m.tby0=Math.ceil(l.tcy0/x-.5);m.tbx1=Math.ceil(l.tcx1/x);m.tby1=Math.ceil(l.tcy1/x-.5);m.resolution=v;buildCodeblocks(0,m,y);d.push(m);w.push(m);(m={}).type="HH";m.tbx0=Math.ceil(l.tcx0/x-.5);m.tby0=Math.ceil(l.tcy0/x-.5);m.tbx1=Math.ceil(l.tcx1/x-.5);m.tby1=Math.ceil(l.tcy1/x-.5);m.resolution=v;buildCodeblocks(0,m,y);d.push(m);w.push(m);v.subbands=w}}l.resolutions=p;l.subbands=d}var _=o.codingStyleDefaultParameters.progressionOrder;switch(_){case 0:o.packetsIterator=new LayerResolutionComponentPositionIterator(t);break;case 1:o.packetsIterator=new ResolutionLayerComponentPositionIterator(t);break;case 2:o.packetsIterator=new ResolutionPositionComponentLayerIterator(t);break;case 3:o.packetsIterator=new PositionComponentResolutionLayerIterator(t);break;case 4:o.packetsIterator=new ComponentPositionResolutionLayerIterator(t);break;default:throw new u("Unsupported progression order ".concat(_))}}function parseTilePackets(t,o,c,u){var l,h=0,p=0,d=!1;function readBits(t){for(;p<t;){var r=o[c+h];h++;if(d){l=l<<7|r;p+=7;d=!1}else{l=l<<8|r;p+=8}255===r&&(d=!0)}return l>>>(p-=t)&(1<<t)-1}function skipMarkerIfEqual(t){if(255===o[c+h-1]&&o[c+h]===t){skipBytes(1);return!0}if(255===o[c+h]&&o[c+h+1]===t){skipBytes(2);return!0}return!1}function skipBytes(t){h+=t}function alignToByte(){p=0;if(d){h++;d=!1}}function readCodingpasses(){if(0===readBits(1))return 1;if(0===readBits(1))return 2;var t=readBits(2);return t<3?t+3:(t=readBits(5))<31?t+6:(t=readBits(7))+37}for(var g=t.currentTile.index,m=t.tiles[g],y=t.COD.sopMarkerUsed,v=t.COD.ephMarkerUsed,b=m.packetsIterator;h<u;){alignToByte();y&&skipMarkerIfEqual(145)&&skipBytes(4);var x=b.nextPacket();if(readBits(1)){for(var w,_=x.layerNumber,S=[],C=0,T=x.codeblocks.length;C<T;C++){var P=(w=x.codeblocks[C]).precinct,I=w.cbx-P.cbxMin,k=w.cby-P.cbyMin,O=!1,E=!1;if(void 0!==w.included)O=!!readBits(1);else{var A,R;if(void 0!==(P=w.precinct).inclusionTree)A=P.inclusionTree;else{var D=P.cbxMax-P.cbxMin+1,L=P.cbyMax-P.cbyMin+1;A=new i(D,L,_);R=new r(D,L);P.inclusionTree=A;P.zeroBitPlanesTree=R}if(A.reset(I,k,_))for(;;){if(!readBits(1)){A.incrementValue(_);break}if(!A.nextLevel()){w.included=!0;O=E=!0;break}}}if(O){if(E){(R=P.zeroBitPlanesTree).reset(I,k);for(;;)if(readBits(1)){if(!R.nextLevel())break}else R.incrementValue();w.zeroBitPlanes=R.value}for(var B=readCodingpasses();readBits(1);)w.Lblock++;var M=(0,a.log2)(B),U=readBits((B<1<<M?M-1:M)+w.Lblock);S.push({codeblock:w,codingpasses:B,dataLength:U})}}alignToByte();v&&skipMarkerIfEqual(146);for(;S.length>0;){var N=S.shift();void 0===(w=N.codeblock).data&&(w.data=[]);w.data.push({data:o,start:c+h,end:c+h+N.dataLength,codingpasses:N.codingpasses});h+=N.dataLength}}}return h}function copyCoefficients(t,r,i,o,a,u,h,p){for(var d=o.tbx0,g=o.tby0,m=o.tbx1-o.tbx0,y=o.codeblocks,v="H"===o.type.charAt(0)?1:0,b="H"===o.type.charAt(1)?r:0,x=0,w=y.length;x<w;++x){var _=y[x],S=_.tbx1_-_.tbx0_,C=_.tby1_-_.tby0_;if(0!==S&&0!==C&&void 0!==_.data){var T,P;T=new l(S,C,_.subbandType,_.zeroBitPlanes,u);P=2;var I,k,O,E=_.data,A=0,R=0;for(I=0,k=E.length;I<k;I++){A+=(O=E[I]).end-O.start;R+=O.codingpasses}var D=new Uint8Array(A),L=0;for(I=0,k=E.length;I<k;I++){var B=(O=E[I]).data.subarray(O.start,O.end);D.set(B,L);L+=B.length}var M=new c.ArithmeticDecoder(D,0,A);T.setDecoder(M);for(I=0;I<R;I++){switch(P){case 0:T.runSignificancePropagationPass();break;case 1:T.runMagnitudeRefinementPass();break;case 2:T.runCleanupPass();p&&T.checkSegmentationSymbol()}P=(P+1)%3}var U,N,j,H=_.tbx0_-d+(_.tby0_-g)*m,z=T.coefficentsSign,X=T.coefficentsMagnitude,G=T.bitsDecoded,Y=h?0:.5;L=0;var J="LL"!==o.type;for(I=0;I<C;I++){var q=2*(H/m|0)*(r-m)+v+b;for(U=0;U<S;U++){if(0!==(N=X[L])){N=(N+Y)*a;0!==z[L]&&(N=-N);j=G[L];var V=J?q+(H<<1):H;t[V]=h&&j>=u?N:N*(1<<u-j)}H++;L++}H+=m-S}}}}function transformTile(r,i,o){for(var a=i.components[o],c=a.codingStyleParameters,u=a.quantizationParameters,l=c.decompositionLevelsCount,h=u.SPqcds,g=u.scalarExpounded,m=u.guardBits,y=c.segmentationSymbolUsed,v=r.components[o].precision,b=c.reversibleTransformation,x=b?new d:new p,w=[],_=0,S=0;S<=l;S++){for(var C=a.resolutions[S],T=C.trx1-C.trx0,P=C.try1-C.try0,I=new Float32Array(T*P),k=0,O=C.subbands.length;k<O;k++){var E,A;if(g){E=h[_].mu;A=h[_].epsilon;_++}else{E=h[0].mu;A=h[0].epsilon+(S>0?1-S:0)}var R=C.subbands[k],D=t[R.type];copyCoefficients(I,T,0,R,b?1:Math.pow(2,v+D-A)*(1+E/2048),m+A-1,b,y)}w.push({width:T,height:P,items:I})}var L=x.calculate(w,a.tcx0,a.tcy0);return{left:a.tcx0,top:a.tcy0,width:L.width,height:L.height,items:L.items}}function initializeTile(t,r){for(var i=t.SIZ.Csiz,o=t.tiles[r],a=0;a<i;a++){var c=o.components[a],u=void 0!==t.currentTile.QCC[a]?t.currentTile.QCC[a]:t.currentTile.QCD;c.quantizationParameters=u;var l=void 0!==t.currentTile.COC[a]?t.currentTile.COC[a]:t.currentTile.COD;c.codingStyleParameters=l}o.codingStyleDefaultParameters=t.currentTile.COD}var r=function TagTreeClosure(){function TagTree(t,r){var i=(0,a.log2)(Math.max(t,r))+1;this.levels=[];for(var o=0;o<i;o++){var c={width:t,height:r,items:[]};this.levels.push(c);t=Math.ceil(t/2);r=Math.ceil(r/2)}}TagTree.prototype={reset:function TagTree_reset(t,r){for(var i,o=0,a=0;o<this.levels.length;){var c=t+r*(i=this.levels[o]).width;if(void 0!==i.items[c]){a=i.items[c];break}i.index=c;t>>=1;r>>=1;o++}o--;(i=this.levels[o]).items[i.index]=a;this.currentLevel=o;delete this.value},incrementValue:function TagTree_incrementValue(){var t=this.levels[this.currentLevel];t.items[t.index]++},nextLevel:function TagTree_nextLevel(){var t=this.currentLevel,r=this.levels[t],i=r.items[r.index];if(--t<0){this.value=i;return!1}this.currentLevel=t;(r=this.levels[t]).items[r.index]=i;return!0}};return TagTree}(),i=function InclusionTreeClosure(){function InclusionTree(t,r,i){var o=(0,a.log2)(Math.max(t,r))+1;this.levels=[];for(var c=0;c<o;c++){for(var u=new Uint8Array(t*r),l=0,h=u.length;l<h;l++)u[l]=i;var p={width:t,height:r,items:u};this.levels.push(p);t=Math.ceil(t/2);r=Math.ceil(r/2)}}InclusionTree.prototype={reset:function InclusionTree_reset(t,r,i){for(var o=0;o<this.levels.length;){var a=this.levels[o],c=t+r*a.width;a.index=c;var u=a.items[c];if(255===u)break;if(u>i){this.currentLevel=o;this.propagateValues();return!1}t>>=1;r>>=1;o++}this.currentLevel=o-1;return!0},incrementValue:function InclusionTree_incrementValue(t){var r=this.levels[this.currentLevel];r.items[r.index]=t+1;this.propagateValues()},propagateValues:function InclusionTree_propagateValues(){for(var t=this.currentLevel,r=this.levels[t],i=r.items[r.index];--t>=0;)(r=this.levels[t]).items[r.index]=i},nextLevel:function InclusionTree_nextLevel(){var t=this.currentLevel,r=this.levels[t],i=r.items[r.index];r.items[r.index]=255;if(--t<0)return!1;this.currentLevel=t;(r=this.levels[t]).items[r.index]=i;return!0}};return InclusionTree}(),l=function BitModelClosure(){var t=17,r=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),i=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),o=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function BitModel(t,a,c,u,l){this.width=t;this.height=a;var h;h="HH"===c?o:"HL"===c?i:r;this.contextLabelTable=h;var p,d=t*a;this.neighborsSignificance=new Uint8Array(d);this.coefficentsSign=new Uint8Array(d);p=l>14?new Uint32Array(d):l>6?new Uint16Array(d):new Uint8Array(d);this.coefficentsMagnitude=p;this.processingFlags=new Uint8Array(d);var g=new Uint8Array(d);if(0!==u)for(var m=0;m<d;m++)g[m]=u;this.bitsDecoded=g;this.reset()}BitModel.prototype={setDecoder:function BitModel_setDecoder(t){this.decoder=t},reset:function BitModel_reset(){this.contexts=new Int8Array(19);this.contexts[0]=8;this.contexts[17]=92;this.contexts[18]=6},setNeighborsSignificance:function BitModel_setNeighborsSignificance(t,r,i){var o,a=this.neighborsSignificance,c=this.width,u=this.height,l=r>0,h=r+1<c;if(t>0){o=i-c;l&&(a[o-1]+=16);h&&(a[o+1]+=16);a[o]+=4}if(t+1<u){o=i+c;l&&(a[o-1]+=16);h&&(a[o+1]+=16);a[o]+=4}l&&(a[i-1]+=1);h&&(a[i+1]+=1);a[i]|=128},runSignificancePropagationPass:function BitModel_runSignificancePropagationPass(){for(var t=this.decoder,r=this.width,i=this.height,o=this.coefficentsMagnitude,a=this.coefficentsSign,c=this.neighborsSignificance,u=this.processingFlags,l=this.contexts,h=this.contextLabelTable,p=this.bitsDecoded,d=0;d<i;d+=4)for(var g=0;g<r;g++)for(var m=d*r+g,y=0;y<4;y++,m+=r){var v=d+y;if(v>=i)break;u[m]&=-2;if(!o[m]&&c[m]){var b=h[c[m]];if(t.readBit(l,b)){var x=this.decodeSignBit(v,g,m);a[m]=x;o[m]=1;this.setNeighborsSignificance(v,g,m);u[m]|=2}p[m]++;u[m]|=1}}},decodeSignBit:function BitModel_decodeSignBit(t,r,i){var o,a,c,u,l,h,p=this.width,d=this.height,g=this.coefficentsMagnitude,m=this.coefficentsSign;u=r>0&&0!==g[i-1];if(r+1<p&&0!==g[i+1]){c=m[i+1];o=u?1-c-(a=m[i-1]):1-c-c}else o=u?1-(a=m[i-1])-a:0;var y=3*o;u=t>0&&0!==g[i-p];if(t+1<d&&0!==g[i+p]){c=m[i+p];o=u?1-c-(a=m[i-p])+y:1-c-c+y}else o=u?1-(a=m[i-p])-a+y:y;if(o>=0){l=9+o;h=this.decoder.readBit(this.contexts,l)}else{l=9-o;h=1^this.decoder.readBit(this.contexts,l)}return h},runMagnitudeRefinementPass:function BitModel_runMagnitudeRefinementPass(){for(var t,r=this.decoder,i=this.width,o=this.height,a=this.coefficentsMagnitude,c=this.neighborsSignificance,u=this.contexts,l=this.bitsDecoded,h=this.processingFlags,p=i*o,d=4*i,g=0;g<p;g=t){t=Math.min(p,g+d);for(var m=0;m<i;m++)for(var y=g+m;y<t;y+=i)if(a[y]&&0==(1&h[y])){var v=16;if(0!=(2&h[y])){h[y]^=2;v=0===(127&c[y])?15:14}var b=r.readBit(u,v);a[y]=a[y]<<1|b;l[y]++;h[y]|=1}}},runCleanupPass:function BitModel_runCleanupPass(){for(var r,i=this.decoder,o=this.width,a=this.height,c=this.neighborsSignificance,u=this.coefficentsMagnitude,l=this.coefficentsSign,h=this.contexts,p=this.contextLabelTable,d=this.bitsDecoded,g=this.processingFlags,m=o,y=2*o,v=3*o,b=0;b<a;b=r){r=Math.min(b+4,a);for(var x=b*o,w=b+3<a,_=0;_<o;_++){var S,C=x+_,T=0,P=C,I=b;if(w&&0===g[C]&&0===g[C+m]&&0===g[C+y]&&0===g[C+v]&&0===c[C]&&0===c[C+m]&&0===c[C+y]&&0===c[C+v]){if(!i.readBit(h,18)){d[C]++;d[C+m]++;d[C+y]++;d[C+v]++;continue}if(0!==(T=i.readBit(h,t)<<1|i.readBit(h,t))){I=b+T;P+=T*o}S=this.decodeSignBit(I,_,P);l[P]=S;u[P]=1;this.setNeighborsSignificance(I,_,P);g[P]|=2;P=C;for(var k=b;k<=I;k++,P+=o)d[P]++;T++}for(I=b+T;I<r;I++,P+=o)if(!u[P]&&0==(1&g[P])){var O=p[c[P]];if(1===i.readBit(h,O)){S=this.decodeSignBit(I,_,P);l[P]=S;u[P]=1;this.setNeighborsSignificance(I,_,P);g[P]|=2}d[P]++}}}},checkSegmentationSymbol:function BitModel_checkSegmentationSymbol(){var r=this.decoder,i=this.contexts;if(10!==(r.readBit(i,t)<<3|r.readBit(i,t)<<2|r.readBit(i,t)<<1|r.readBit(i,t)))throw new u("Invalid segmentation symbol")}};return BitModel}(),h=function TransformClosure(){function Transform(){}Transform.prototype.calculate=function transformCalculate(t,r,i){for(var o=t[0],a=1,c=t.length;a<c;a++)o=this.iterate(o,t[a],r,i);return o};Transform.prototype.extend=function extend(t,r,i){var o=r-1,a=r+1,c=r+i-2,u=r+i;t[o--]=t[a++];t[u++]=t[c--];t[o--]=t[a++];t[u++]=t[c--];t[o--]=t[a++];t[u++]=t[c--];t[o]=t[a];t[u]=t[c]};Transform.prototype.iterate=function Transform_iterate(t,r,i,o){var a,c,u,l,h,p,d=t.width,g=t.height,m=t.items,y=r.width,v=r.height,b=r.items;for(u=0,a=0;a<g;a++){l=2*a*y;for(c=0;c<d;c++,u++,l+=2)b[l]=m[u]}m=t.items=null;var x=new Float32Array(y+8);if(1===y){if(0!=(1&i))for(p=0,u=0;p<v;p++,u+=y)b[u]*=.5}else for(p=0,u=0;p<v;p++,u+=y){x.set(b.subarray(u,u+y),4);this.extend(x,4,y);this.filter(x,4,y);b.set(x.subarray(4,4+y),u)}var w=16,_=[];for(a=0;a<w;a++)_.push(new Float32Array(v+8));var S,C=0;t=4+v;if(1===v){if(0!=(1&o))for(h=0;h<y;h++)b[h]*=.5}else for(h=0;h<y;h++){if(0===C){w=Math.min(y-h,w);for(u=h,l=4;l<t;u+=y,l++)for(S=0;S<w;S++)_[S][l]=b[u+S];C=w}var T=_[--C];this.extend(T,4,v);this.filter(T,4,v);if(0===C){u=h-w+1;for(l=4;l<t;u+=y,l++)for(S=0;S<w;S++)b[u+S]=_[S][l]}}return{width:y,height:v,items:b}};return Transform}(),p=function IrreversibleTransformClosure(){function IrreversibleTransform(){h.call(this)}IrreversibleTransform.prototype=Object.create(h.prototype);IrreversibleTransform.prototype.filter=function irreversibleTransformFilter(t,r,i){var o,a,c,u,l=i>>1,h=-1.586134342059924,p=-.052980118572961,d=.882911075530934,g=.443506852043971,m=1.230174104914001;o=(r|=0)-3;for(a=l+4;a--;o+=2)t[o]*=.8128930661159609;c=g*t[(o=r-2)-1];for(a=l+3;a--;o+=2){u=g*t[o+1];t[o]=m*t[o]-c-u;if(!a--)break;c=g*t[(o+=2)+1];t[o]=m*t[o]-c-u}c=d*t[(o=r-1)-1];for(a=l+2;a--;o+=2){u=d*t[o+1];t[o]-=c+u;if(!a--)break;c=d*t[(o+=2)+1];t[o]-=c+u}c=p*t[(o=r)-1];for(a=l+1;a--;o+=2){u=p*t[o+1];t[o]-=c+u;if(!a--)break;c=p*t[(o+=2)+1];t[o]-=c+u}if(0!==l){c=h*t[(o=r+1)-1];for(a=l;a--;o+=2){u=h*t[o+1];t[o]-=c+u;if(!a--)break;c=h*t[(o+=2)+1];t[o]-=c+u}}};return IrreversibleTransform}(),d=function ReversibleTransformClosure(){function ReversibleTransform(){h.call(this)}ReversibleTransform.prototype=Object.create(h.prototype);ReversibleTransform.prototype.filter=function reversibleTransformFilter(t,r,i){var o,a,c=i>>1;for(o=r|=0,a=c+1;a--;o+=2)t[o]-=t[o-1]+t[o+1]+2>>2;for(o=r+1,a=c;a--;o+=2)t[o]+=t[o-1]+t[o+1]>>1};return ReversibleTransform}();return JpxImage}();r.JpxImage=l}],r={};function __w_pdfjs_require__(i){if(r[i])return r[i].exports;var o=r[i]={id:i,loaded:!1,exports:{}};t[i](o,o.exports,__w_pdfjs_require__);o.loaded=!0;return o.exports}__w_pdfjs_require__.nmd=t=>{t.paths=[];t.children||(t.children=[]);return t};return __w_pdfjs_require__(0)})()}));
|